@probelabs/probe 0.6.0-rc251 → 0.6.0-rc253

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.
@@ -15708,6 +15708,9 @@ function getOptions(opts) {
15708
15708
  if (isArray(options.onComment)) {
15709
15709
  options.onComment = pushComment(options, options.onComment);
15710
15710
  }
15711
+ if (options.sourceType === "commonjs" && options.allowAwaitOutsideFunction) {
15712
+ throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
15713
+ }
15711
15714
  return options;
15712
15715
  }
15713
15716
  function pushComment(options, array) {
@@ -15858,13 +15861,13 @@ function stringToBigInt(str) {
15858
15861
  function parse3(input, options) {
15859
15862
  return Parser.parse(input, options);
15860
15863
  }
15861
- var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty, toString, hasOwn, isArray, regexpCache, loneSurrogate, Position, SourceLocation, defaultOptions, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_CLASS_FIELD_INIT, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope, Node, pp$2, scriptValuesAddedInUnicode, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, ecma14BinaryProperties, unicodeBinaryProperties, ecma14BinaryPropertiesOfStrings, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, ecma14ScriptValues, unicodeScriptValues, data, ecmaVersion, i, list, pp$1, BranchID, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, version;
15864
+ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty, toString, hasOwn, isArray, regexpCache, loneSurrogate, Position, SourceLocation, defaultOptions, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_CLASS_FIELD_INIT, SCOPE_SWITCH, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope, Node, pp$2, scriptValuesAddedInUnicode, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, ecma14BinaryProperties, unicodeBinaryProperties, ecma14BinaryPropertiesOfStrings, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, ecma14ScriptValues, unicodeScriptValues, data, ecmaVersion, i, list, pp$1, BranchID, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, version;
15862
15865
  var init_acorn = __esm({
15863
15866
  "node_modules/acorn/dist/acorn.mjs"() {
15864
- astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
15865
- astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
15866
- nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
15867
- nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
15867
+ astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
15868
+ astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
15869
+ nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
15870
+ nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
15868
15871
  reservedWords = {
15869
15872
  3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
15870
15873
  5: "class enum extends super const export import",
@@ -16029,7 +16032,7 @@ var init_acorn = __esm({
16029
16032
  // for new syntax features.
16030
16033
  ecmaVersion: null,
16031
16034
  // `sourceType` indicates the mode the code should be parsed in.
16032
- // Can be either `"script"` or `"module"`. This influences global
16035
+ // Can be either `"script"`, `"module"` or `"commonjs"`. This influences global
16033
16036
  // strict mode and parsing of `import` and `export` declarations.
16034
16037
  sourceType: "script",
16035
16038
  // `onInsertedSemicolon` can be a callback that will be called when
@@ -16128,6 +16131,7 @@ var init_acorn = __esm({
16128
16131
  SCOPE_DIRECT_SUPER = 128;
16129
16132
  SCOPE_CLASS_STATIC_BLOCK = 256;
16130
16133
  SCOPE_CLASS_FIELD_INIT = 512;
16134
+ SCOPE_SWITCH = 1024;
16131
16135
  SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
16132
16136
  BIND_NONE = 0;
16133
16137
  BIND_VAR = 1;
@@ -16179,11 +16183,13 @@ var init_acorn = __esm({
16179
16183
  this.skipLineComment(2);
16180
16184
  }
16181
16185
  this.scopeStack = [];
16182
- this.enterScope(SCOPE_TOP);
16186
+ this.enterScope(
16187
+ this.options.sourceType === "commonjs" ? SCOPE_FUNCTION : SCOPE_TOP
16188
+ );
16183
16189
  this.regexpState = null;
16184
16190
  this.privateNameStack = [];
16185
16191
  };
16186
- prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
16192
+ prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowReturn: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, allowUsing: { configurable: true }, inClassStaticBlock: { configurable: true } };
16187
16193
  Parser.prototype.parse = function parse() {
16188
16194
  var node = this.options.program || this.startNode();
16189
16195
  this.nextToken();
@@ -16211,6 +16217,15 @@ var init_acorn = __esm({
16211
16217
  }
16212
16218
  return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
16213
16219
  };
16220
+ prototypeAccessors.allowReturn.get = function() {
16221
+ if (this.inFunction) {
16222
+ return true;
16223
+ }
16224
+ if (this.options.allowReturnOutsideFunction && this.currentVarScope().flags & SCOPE_TOP) {
16225
+ return true;
16226
+ }
16227
+ return false;
16228
+ };
16214
16229
  prototypeAccessors.allowSuper.get = function() {
16215
16230
  var ref2 = this.currentThisScope();
16216
16231
  var flags = ref2.flags;
@@ -16232,6 +16247,17 @@ var init_acorn = __esm({
16232
16247
  }
16233
16248
  return false;
16234
16249
  };
16250
+ prototypeAccessors.allowUsing.get = function() {
16251
+ var ref2 = this.currentScope();
16252
+ var flags = ref2.flags;
16253
+ if (flags & SCOPE_SWITCH) {
16254
+ return false;
16255
+ }
16256
+ if (!this.inModule && flags & SCOPE_TOP) {
16257
+ return false;
16258
+ }
16259
+ return true;
16260
+ };
16235
16261
  prototypeAccessors.inClassStaticBlock.get = function() {
16236
16262
  return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
16237
16263
  };
@@ -16402,7 +16428,7 @@ var init_acorn = __esm({
16402
16428
  }
16403
16429
  this.adaptDirectivePrologue(node.body);
16404
16430
  this.next();
16405
- node.sourceType = this.options.sourceType;
16431
+ node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
16406
16432
  return this.finishNode(node, "Program");
16407
16433
  };
16408
16434
  loopLabel = { kind: "loop" };
@@ -16413,25 +16439,25 @@ var init_acorn = __esm({
16413
16439
  }
16414
16440
  skipWhiteSpace.lastIndex = this.pos;
16415
16441
  var skip = skipWhiteSpace.exec(this.input);
16416
- var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
16442
+ var next = this.pos + skip[0].length, nextCh = this.fullCharCodeAt(next);
16417
16443
  if (nextCh === 91 || nextCh === 92) {
16418
16444
  return true;
16419
16445
  }
16420
16446
  if (context) {
16421
16447
  return false;
16422
16448
  }
16423
- if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) {
16449
+ if (nextCh === 123) {
16424
16450
  return true;
16425
16451
  }
16426
- if (isIdentifierStart(nextCh, true)) {
16427
- var pos = next + 1;
16428
- while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) {
16429
- ++pos;
16430
- }
16431
- if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
16452
+ if (isIdentifierStart(nextCh)) {
16453
+ var start = next;
16454
+ do {
16455
+ next += nextCh <= 65535 ? 1 : 2;
16456
+ } while (isIdentifierChar(nextCh = this.fullCharCodeAt(next)));
16457
+ if (nextCh === 92) {
16432
16458
  return true;
16433
16459
  }
16434
- var ident = this.input.slice(next, pos);
16460
+ var ident = this.input.slice(start, next);
16435
16461
  if (!keywordRelationalOperator.test(ident)) {
16436
16462
  return true;
16437
16463
  }
@@ -16445,7 +16471,7 @@ var init_acorn = __esm({
16445
16471
  skipWhiteSpace.lastIndex = this.pos;
16446
16472
  var skip = skipWhiteSpace.exec(this.input);
16447
16473
  var next = this.pos + skip[0].length, after;
16448
- return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
16474
+ return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.fullCharCodeAt(next + 8)) || after === 92));
16449
16475
  };
16450
16476
  pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
16451
16477
  if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) {
@@ -16458,26 +16484,33 @@ var init_acorn = __esm({
16458
16484
  return false;
16459
16485
  }
16460
16486
  if (isAwaitUsing) {
16461
- var awaitEndPos = next + 5, after;
16462
- if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320) {
16487
+ var usingEndPos = next + 5, after;
16488
+ if (this.input.slice(next, usingEndPos) !== "using" || usingEndPos === this.input.length || isIdentifierChar(after = this.fullCharCodeAt(usingEndPos)) || after === 92) {
16463
16489
  return false;
16464
16490
  }
16465
- skipWhiteSpace.lastIndex = awaitEndPos;
16491
+ skipWhiteSpace.lastIndex = usingEndPos;
16466
16492
  var skipAfterUsing = skipWhiteSpace.exec(this.input);
16467
- if (skipAfterUsing && lineBreak.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length))) {
16493
+ next = usingEndPos + skipAfterUsing[0].length;
16494
+ if (skipAfterUsing && lineBreak.test(this.input.slice(usingEndPos, next))) {
16468
16495
  return false;
16469
16496
  }
16470
16497
  }
16471
- if (isFor) {
16472
- var ofEndPos = next + 2, after$1;
16473
- if (this.input.slice(next, ofEndPos) === "of") {
16474
- if (ofEndPos === this.input.length || !isIdentifierChar(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320)) {
16475
- return false;
16476
- }
16477
- }
16498
+ var ch = this.fullCharCodeAt(next);
16499
+ if (!isIdentifierStart(ch) && ch !== 92) {
16500
+ return false;
16501
+ }
16502
+ var idStart = next;
16503
+ do {
16504
+ next += ch <= 65535 ? 1 : 2;
16505
+ } while (isIdentifierChar(ch = this.fullCharCodeAt(next)));
16506
+ if (ch === 92) {
16507
+ return true;
16508
+ }
16509
+ var id = this.input.slice(idStart, next);
16510
+ if (keywordRelationalOperator.test(id) || isFor && id === "of") {
16511
+ return false;
16478
16512
  }
16479
- var ch = this.input.charCodeAt(next);
16480
- return isIdentifierStart(ch, true) || ch === 92;
16513
+ return true;
16481
16514
  };
16482
16515
  pp$8.isAwaitUsing = function(isFor) {
16483
16516
  return this.isUsingKeyword(true, isFor);
@@ -16570,8 +16603,8 @@ var init_acorn = __esm({
16570
16603
  }
16571
16604
  var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
16572
16605
  if (usingKind) {
16573
- if (topLevel && this.options.sourceType === "script") {
16574
- this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`");
16606
+ if (!this.allowUsing) {
16607
+ this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");
16575
16608
  }
16576
16609
  if (usingKind === "await using") {
16577
16610
  if (!this.canAwait) {
@@ -16665,6 +16698,9 @@ var init_acorn = __esm({
16665
16698
  var init$2 = this.startNode();
16666
16699
  this.next();
16667
16700
  if (usingKind === "await using") {
16701
+ if (!this.canAwait) {
16702
+ this.raise(this.start, "Await using cannot appear outside of async function");
16703
+ }
16668
16704
  this.next();
16669
16705
  }
16670
16706
  this.parseVar(init$2, true, usingKind);
@@ -16732,7 +16768,7 @@ var init_acorn = __esm({
16732
16768
  return this.finishNode(node, "IfStatement");
16733
16769
  };
16734
16770
  pp$8.parseReturnStatement = function(node) {
16735
- if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
16771
+ if (!this.allowReturn) {
16736
16772
  this.raise(this.start, "'return' outside of function");
16737
16773
  }
16738
16774
  this.next();
@@ -16750,7 +16786,7 @@ var init_acorn = __esm({
16750
16786
  node.cases = [];
16751
16787
  this.expect(types$1.braceL);
16752
16788
  this.labels.push(switchLabel);
16753
- this.enterScope(0);
16789
+ this.enterScope(SCOPE_SWITCH);
16754
16790
  var cur;
16755
16791
  for (var sawDefault = false; this.type !== types$1.braceR; ) {
16756
16792
  if (this.type === types$1._case || this.type === types$1._default) {
@@ -19053,7 +19089,7 @@ var init_acorn = __esm({
19053
19089
  }
19054
19090
  return newNode;
19055
19091
  };
19056
- scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz";
19092
+ scriptValuesAddedInUnicode = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz";
19057
19093
  ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
19058
19094
  ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
19059
19095
  ecma11BinaryProperties = ecma10BinaryProperties;
@@ -20397,14 +20433,17 @@ var init_acorn = __esm({
20397
20433
  }
20398
20434
  return this.getTokenFromCode(code);
20399
20435
  };
20400
- pp.fullCharCodeAtPos = function() {
20401
- var code = this.input.charCodeAt(this.pos);
20436
+ pp.fullCharCodeAt = function(pos) {
20437
+ var code = this.input.charCodeAt(pos);
20402
20438
  if (code <= 55295 || code >= 56320) {
20403
20439
  return code;
20404
20440
  }
20405
- var next = this.input.charCodeAt(this.pos + 1);
20441
+ var next = this.input.charCodeAt(pos + 1);
20406
20442
  return next <= 56319 || next >= 57344 ? code : (code << 10) + next - 56613888;
20407
20443
  };
20444
+ pp.fullCharCodeAtPos = function() {
20445
+ return this.fullCharCodeAt(this.pos);
20446
+ };
20408
20447
  pp.skipBlockComment = function() {
20409
20448
  var startLoc = this.options.onComment && this.curPosition();
20410
20449
  var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
@@ -21162,7 +21201,7 @@ var init_acorn = __esm({
21162
21201
  }
21163
21202
  return this.finishToken(type, word);
21164
21203
  };
21165
- version = "8.15.0";
21204
+ version = "8.16.0";
21166
21205
  Parser.acorn = {
21167
21206
  Parser,
21168
21207
  version,
@@ -21195,7 +21234,7 @@ function full(node, callback, baseVisitor, state, override) {
21195
21234
  var last2;
21196
21235
  (function c(node2, st, override2) {
21197
21236
  var type = override2 || node2.type;
21198
- baseVisitor[type](node2, st, c);
21237
+ visitNode(baseVisitor, type, node2, st, c);
21199
21238
  if (last2 !== node2) {
21200
21239
  callback(node2, st, type);
21201
21240
  last2 = node2;
@@ -21207,6 +21246,12 @@ function skipThrough(node, st, c) {
21207
21246
  }
21208
21247
  function ignore(_node, _st, _c) {
21209
21248
  }
21249
+ function visitNode(baseVisitor, type, node, st, c) {
21250
+ if (baseVisitor[type] == null) {
21251
+ throw new Error("No walker function defined for node type " + type);
21252
+ }
21253
+ baseVisitor[type](node, st, c);
21254
+ }
21210
21255
  var base;
21211
21256
  var init_walk = __esm({
21212
21257
  "node_modules/acorn-walk/dist/walk.mjs"() {
@@ -21437,12 +21482,27 @@ var init_walk = __esm({
21437
21482
  if (node.source) {
21438
21483
  c(node.source, st, "Expression");
21439
21484
  }
21485
+ if (node.attributes) {
21486
+ for (var i = 0, list = node.attributes; i < list.length; i += 1) {
21487
+ var attr = list[i];
21488
+ c(attr, st);
21489
+ }
21490
+ }
21440
21491
  };
21441
21492
  base.ExportAllDeclaration = function(node, st, c) {
21442
21493
  if (node.exported) {
21443
21494
  c(node.exported, st);
21444
21495
  }
21445
21496
  c(node.source, st, "Expression");
21497
+ if (node.attributes) {
21498
+ for (var i = 0, list = node.attributes; i < list.length; i += 1) {
21499
+ var attr = list[i];
21500
+ c(attr, st);
21501
+ }
21502
+ }
21503
+ };
21504
+ base.ImportAttribute = function(node, st, c) {
21505
+ c(node.value, st, "Expression");
21446
21506
  };
21447
21507
  base.ImportDeclaration = function(node, st, c) {
21448
21508
  for (var i = 0, list = node.specifiers; i < list.length; i += 1) {
@@ -21450,9 +21510,18 @@ var init_walk = __esm({
21450
21510
  c(spec, st);
21451
21511
  }
21452
21512
  c(node.source, st, "Expression");
21513
+ if (node.attributes) {
21514
+ for (var i$1 = 0, list$1 = node.attributes; i$1 < list$1.length; i$1 += 1) {
21515
+ var attr = list$1[i$1];
21516
+ c(attr, st);
21517
+ }
21518
+ }
21453
21519
  };
21454
21520
  base.ImportExpression = function(node, st, c) {
21455
21521
  c(node.source, st, "Expression");
21522
+ if (node.options) {
21523
+ c(node.options, st, "Expression");
21524
+ }
21456
21525
  };
21457
21526
  base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore;
21458
21527
  base.TaggedTemplateExpression = function(node, st, c) {
@@ -28993,8 +29062,13 @@ function stripCodeWrapping(code) {
28993
29062
  s = decodeHtmlEntities(s);
28994
29063
  return s.trim();
28995
29064
  }
28996
- function buildToolImplementations(configOptions) {
28997
- const { sessionId, cwd } = configOptions;
29065
+ function generatePlanSessionId(baseSessionId) {
29066
+ const uniquePart = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID().slice(0, 8) : `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
29067
+ return `${baseSessionId || "plan"}-${uniquePart}`;
29068
+ }
29069
+ function buildToolImplementations(configOptions, planSessionId) {
29070
+ const { cwd } = configOptions;
29071
+ const sessionId = planSessionId || configOptions.sessionId;
28998
29072
  const tools2 = {};
28999
29073
  tools2.search = {
29000
29074
  execute: async (params) => {
@@ -29180,7 +29254,7 @@ function createExecutePlanTool(options) {
29180
29254
  const isMcpToolAllowed = options.isMcpToolAllowed || (() => true);
29181
29255
  let cachedMcpBridge = null;
29182
29256
  let runtime = null;
29183
- function buildRuntime() {
29257
+ function buildRuntime(planSessionId) {
29184
29258
  const currentMcpBridge = getMcpBridge();
29185
29259
  const currentMcpTools = getMcpTools();
29186
29260
  const filteredMcpTools = {};
@@ -29202,7 +29276,7 @@ function createExecutePlanTool(options) {
29202
29276
  } else {
29203
29277
  llmCallFn = llmCallFn || buildLLMCall(options);
29204
29278
  runtimeOptions = {
29205
- toolImplementations: buildToolImplementations(options),
29279
+ toolImplementations: buildToolImplementations(options, planSessionId),
29206
29280
  llmCall: llmCallFn,
29207
29281
  mcpBridge: currentMcpBridge,
29208
29282
  mcpTools: filteredMcpTools,
@@ -29230,12 +29304,15 @@ function createExecutePlanTool(options) {
29230
29304
  description: "Execute a JavaScript DSL program to orchestrate tool calls. Use for batch processing, paginated APIs, multi-step workflows where intermediate data is large. Write simple synchronous-looking code \u2014 do NOT use async/await.",
29231
29305
  parameters: executePlanSchema,
29232
29306
  execute: async ({ code, description }) => {
29307
+ const planSessionId = generatePlanSessionId(options.sessionId);
29233
29308
  const planSpan = tracer?.createToolSpan?.("execute_plan", {
29234
29309
  "dsl.description": description || "",
29235
29310
  "dsl.code_length": code.length,
29236
29311
  "dsl.code": code,
29237
- "dsl.max_retries": maxRetries
29312
+ "dsl.max_retries": maxRetries,
29313
+ "dsl.plan_session_id": planSessionId
29238
29314
  }) || null;
29315
+ const planRuntime = buildRuntime(planSessionId);
29239
29316
  let currentCode = stripCodeWrapping(code);
29240
29317
  let lastError = null;
29241
29318
  let finalOutput;
@@ -29291,7 +29368,7 @@ Original error: ${lastError}`;
29291
29368
  return finalOutput;
29292
29369
  }
29293
29370
  }
29294
- const result = await getRuntime().execute(currentCode, description);
29371
+ const result = await planRuntime.execute(currentCode, description);
29295
29372
  if (result.status === "success") {
29296
29373
  finalOutput = formatSuccess(result, description, attempt, outputBuffer);
29297
29374
  planSpan?.setAttributes?.({
@@ -29389,8 +29466,14 @@ ${userLogs.join("\n")}
29389
29466
  }
29390
29467
  }
29391
29468
  const resultValue = result.result;
29469
+ const hasOutputBufferContent = outputBuffer && outputBuffer.items && outputBuffer.items.length > 0;
29392
29470
  if (resultValue === void 0 || resultValue === null) {
29393
- output += "Plan completed (no return value).";
29471
+ if (hasOutputBufferContent) {
29472
+ const totalChars = outputBuffer.items.reduce((sum, item) => sum + item.length, 0);
29473
+ output += `Plan completed successfully. Output captured (${totalChars} chars) via output() and will be included in the final response.`;
29474
+ } else {
29475
+ output += "Plan completed (no return value).";
29476
+ }
29394
29477
  } else if (typeof resultValue === "string") {
29395
29478
  output += `Result:
29396
29479
  ${resultValue}`;
@@ -31464,7 +31547,21 @@ function removeThinkingTags(xmlString) {
31464
31547
  }
31465
31548
  function extractThinkingContent(xmlString) {
31466
31549
  const thinkingMatch = xmlString.match(/<thinking>([\s\S]*?)<\/thinking>/);
31467
- return thinkingMatch ? thinkingMatch[1].trim() : null;
31550
+ if (!thinkingMatch) {
31551
+ return null;
31552
+ }
31553
+ let content = thinkingMatch[1].trim();
31554
+ while (content.startsWith("<thinking>")) {
31555
+ const innerMatch = content.match(/<thinking>([\s\S]*?)<\/thinking>/);
31556
+ if (innerMatch) {
31557
+ content = innerMatch[1].trim();
31558
+ } else {
31559
+ content = content.substring("<thinking>".length).trim();
31560
+ break;
31561
+ }
31562
+ }
31563
+ content = content.replace(/<\/?thinking>/g, "").trim();
31564
+ return content || null;
31468
31565
  }
31469
31566
  function checkAttemptCompleteRecovery(cleanedXmlString, validTools = []) {
31470
31567
  const openTagIndex = cleanedXmlString.indexOf("<attempt_completion>");
@@ -81832,6 +81929,7 @@ var init_ProbeAgent = __esm({
81832
81929
  initializeTools() {
81833
81930
  const isToolAllowed = (toolName) => this.allowedTools.isEnabled(toolName);
81834
81931
  this._outputBuffer = { items: [] };
81932
+ this._extractedRawBlocks = [];
81835
81933
  const configOptions = {
81836
81934
  sessionId: this.sessionId,
81837
81935
  debug: this.debug,
@@ -83566,6 +83664,7 @@ You are working with a workspace. Available paths: ${workspaceDesc}
83566
83664
  const oldHistoryLength = this.history.length;
83567
83665
  if (this._outputBuffer && !options?._schemaFormatted && !options?._completionPromptProcessed) {
83568
83666
  this._outputBuffer.items = [];
83667
+ this._extractedRawBlocks = [];
83569
83668
  }
83570
83669
  if (this.enableTasks) {
83571
83670
  try {
@@ -84014,7 +84113,10 @@ You are working with a workspace. Available paths: ${workspaceDesc}
84014
84113
  finalResult = strippedContent;
84015
84114
  if (this.debug) console.log(`[DEBUG] Using previous response (thinking-stripped) as completion: ${finalResult.substring(0, 100)}...`);
84016
84115
  } else {
84017
- const thinkingContent = extractThinkingContent(prevContent);
84116
+ let thinkingContent = extractThinkingContent(prevContent);
84117
+ if (thinkingContent) {
84118
+ thinkingContent = removeThinkingTags(thinkingContent) || thinkingContent.replace(/<\/?thinking>/g, "");
84119
+ }
84018
84120
  if (thinkingContent && thinkingContent.length > 50) {
84019
84121
  finalResult = thinkingContent;
84020
84122
  if (this.debug) console.log(`[DEBUG] Previous response was mostly in thinking tags \u2014 using thinking content as completion: ${finalResult.substring(0, 100)}...`);
@@ -84065,13 +84167,12 @@ You are working with a workspace. Available paths: ${workspaceDesc}
84065
84167
  }
84066
84168
  const executionResult = await this.mcpBridge.mcpTools[toolName].execute(params);
84067
84169
  let toolResultContent = typeof executionResult === "string" ? executionResult : JSON.stringify(executionResult, null, 2);
84068
- if (this._outputBuffer) {
84069
- const { cleanedContent, extractedBlocks } = extractRawOutputBlocks(toolResultContent, this._outputBuffer);
84070
- if (extractedBlocks.length > 0) {
84071
- toolResultContent = cleanedContent;
84072
- if (this.debug) {
84073
- console.log(`[DEBUG] Extracted ${extractedBlocks.length} raw output blocks (${extractedBlocks.reduce((sum, b) => sum + b.length, 0)} chars) to output buffer`);
84074
- }
84170
+ const { cleanedContent, extractedBlocks } = extractRawOutputBlocks(toolResultContent);
84171
+ if (extractedBlocks.length > 0) {
84172
+ toolResultContent = cleanedContent;
84173
+ this._extractedRawBlocks.push(...extractedBlocks);
84174
+ if (this.debug) {
84175
+ console.log(`[DEBUG] Extracted ${extractedBlocks.length} raw output blocks (${extractedBlocks.reduce((sum, b) => sum + b.length, 0)} chars) from tool result`);
84075
84176
  }
84076
84177
  }
84077
84178
  try {
@@ -84280,13 +84381,12 @@ ${errorXml}
84280
84381
  const wsPrefix = this.workspaceRoot.endsWith(sep5) ? this.workspaceRoot : this.workspaceRoot + sep5;
84281
84382
  toolResultContent = toolResultContent.split(wsPrefix).join("");
84282
84383
  }
84283
- if (this._outputBuffer) {
84284
- const { cleanedContent, extractedBlocks } = extractRawOutputBlocks(toolResultContent, this._outputBuffer);
84285
- if (extractedBlocks.length > 0) {
84286
- toolResultContent = cleanedContent;
84287
- if (this.debug) {
84288
- console.log(`[DEBUG] Extracted ${extractedBlocks.length} raw output blocks (${extractedBlocks.reduce((sum, b) => sum + b.length, 0)} chars) to output buffer`);
84289
- }
84384
+ const { cleanedContent, extractedBlocks } = extractRawOutputBlocks(toolResultContent);
84385
+ if (extractedBlocks.length > 0) {
84386
+ toolResultContent = cleanedContent;
84387
+ this._extractedRawBlocks.push(...extractedBlocks);
84388
+ if (this.debug) {
84389
+ console.log(`[DEBUG] Extracted ${extractedBlocks.length} raw output blocks (${extractedBlocks.reduce((sum, b) => sum + b.length, 0)} chars) from tool result`);
84290
84390
  }
84291
84391
  }
84292
84392
  try {
@@ -84595,6 +84695,7 @@ ${finalResult}
84595
84695
 
84596
84696
  After reviewing, provide your final answer using attempt_completion.`;
84597
84697
  const savedOutputItems = this._outputBuffer ? [...this._outputBuffer.items] : [];
84698
+ const savedExtractedBlocks = this._extractedRawBlocks ? [...this._extractedRawBlocks] : [];
84598
84699
  const completionResult = await this.answer(completionPromptMessage, [], {
84599
84700
  ...options,
84600
84701
  _completionPromptProcessed: true
@@ -84602,6 +84703,7 @@ After reviewing, provide your final answer using attempt_completion.`;
84602
84703
  if (this._outputBuffer) {
84603
84704
  this._outputBuffer.items = savedOutputItems;
84604
84705
  }
84706
+ this._extractedRawBlocks = savedExtractedBlocks;
84605
84707
  finalResult = completionResult;
84606
84708
  if (this.debug) {
84607
84709
  console.log(`[DEBUG] Completion prompt finished. New result length: ${finalResult?.length || 0}`);
@@ -84977,13 +85079,27 @@ Convert your previous response content into actual JSON data that follows this s
84977
85079
  console.log(`[DEBUG] Mermaid validation: Skipped final validation due to disableMermaidValidation option`);
84978
85080
  }
84979
85081
  if (!options._schemaFormatted) {
84980
- finalResult = removeThinkingTags(finalResult);
84981
- if (this.debug) {
84982
- console.log(`[DEBUG] Removed thinking tags from final result`);
85082
+ let isValidJson = false;
85083
+ try {
85084
+ JSON.parse(finalResult);
85085
+ isValidJson = true;
85086
+ } catch {
85087
+ }
85088
+ if (!isValidJson) {
85089
+ finalResult = removeThinkingTags(finalResult);
85090
+ if (this.debug) {
85091
+ console.log(`[DEBUG] Removed thinking tags from final result`);
85092
+ }
85093
+ } else if (this.debug) {
85094
+ console.log(`[DEBUG] Skipped thinking tag removal for valid JSON result (issue #439)`);
84983
85095
  }
84984
85096
  }
84985
- if (this._outputBuffer && this._outputBuffer.items.length > 0 && !options._schemaFormatted && !options._completionPromptProcessed) {
84986
- const outputContent = this._outputBuffer.items.join("\n\n");
85097
+ const allOutputItems = [
85098
+ ...this._outputBuffer?.items || [],
85099
+ ...this._extractedRawBlocks || []
85100
+ ];
85101
+ if (allOutputItems.length > 0 && !options._schemaFormatted && !options._completionPromptProcessed) {
85102
+ const outputContent = allOutputItems.join("\n\n");
84987
85103
  if (options.schema) {
84988
85104
  finalResult = (finalResult || "") + "\n<<<RAW_OUTPUT>>>\n" + outputContent + "\n<<<END_RAW_OUTPUT>>>";
84989
85105
  } else {
@@ -84993,9 +85109,10 @@ Convert your previous response content into actual JSON data that follows this s
84993
85109
  options.onStream("\n\n" + outputContent);
84994
85110
  }
84995
85111
  if (this.debug) {
84996
- console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result${options.schema ? " (with RAW_OUTPUT delimiters)" : ""}`);
85112
+ console.log(`[DEBUG] Appended ${allOutputItems.length} output items (${outputContent.length} chars) to final result${options.schema ? " (with RAW_OUTPUT delimiters)" : ""}`);
84997
85113
  }
84998
85114
  this._outputBuffer.items = [];
85115
+ this._extractedRawBlocks = [];
84999
85116
  }
85000
85117
  return finalResult;
85001
85118
  } catch (error) {
@@ -45,12 +45,38 @@ export function removeThinkingTags(xmlString) {
45
45
 
46
46
  /**
47
47
  * Extract thinking content for potential logging
48
+ * Handles nested thinking tags by recursively stripping inner tags.
48
49
  * @param {string} xmlString - The XML string to extract from
49
- * @returns {string|null} - Thinking content or null if not found
50
+ * @returns {string|null} - Thinking content (cleaned of nested tags) or null if not found
50
51
  */
51
52
  export function extractThinkingContent(xmlString) {
52
53
  const thinkingMatch = xmlString.match(/<thinking>([\s\S]*?)<\/thinking>/);
53
- return thinkingMatch ? thinkingMatch[1].trim() : null;
54
+ if (!thinkingMatch) {
55
+ return null;
56
+ }
57
+
58
+ let content = thinkingMatch[1].trim();
59
+
60
+ // Handle nested thinking tags: if the extracted content itself starts with <thinking>,
61
+ // recursively extract from it until we get clean content.
62
+ // This handles: <thinking><thinking>content</thinking></thinking>
63
+ // where non-greedy match captures "<thinking>content" (issue #439)
64
+ while (content.startsWith('<thinking>')) {
65
+ const innerMatch = content.match(/<thinking>([\s\S]*?)<\/thinking>/);
66
+ if (innerMatch) {
67
+ content = innerMatch[1].trim();
68
+ } else {
69
+ // Unclosed inner <thinking> tag - strip the opening tag and use remaining content
70
+ // e.g., "<thinking>content" becomes "content"
71
+ content = content.substring('<thinking>'.length).trim();
72
+ break;
73
+ }
74
+ }
75
+
76
+ // Also strip any remaining thinking tags that might be embedded in the content
77
+ content = content.replace(/<\/?thinking>/g, '').trim();
78
+
79
+ return content || null;
54
80
  }
55
81
 
56
82
  /**