@tinacms/mdx 1.3.12 → 1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.es.js +607 -633
- package/dist/index.es.js +872 -898
- package/dist/index.js +872 -898
- package/dist/next/stringify/acorn.d.ts +1 -1
- package/dist/stringify/acorn.d.ts +1 -1
- package/package.json +6 -52
package/dist/index.js
CHANGED
|
@@ -2298,11 +2298,11 @@ var require_acorn = __commonJS({
|
|
|
2298
2298
|
};
|
|
2299
2299
|
types$13.star.updateContext = function(prevType) {
|
|
2300
2300
|
if (prevType === types$13._function) {
|
|
2301
|
-
var
|
|
2302
|
-
if (this.context[
|
|
2303
|
-
this.context[
|
|
2301
|
+
var index2 = this.context.length - 1;
|
|
2302
|
+
if (this.context[index2] === types4.f_expr) {
|
|
2303
|
+
this.context[index2] = types4.f_expr_gen;
|
|
2304
2304
|
} else {
|
|
2305
|
-
this.context[
|
|
2305
|
+
this.context[index2] = types4.f_gen;
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
2308
|
this.exprAllowed = true;
|
|
@@ -4912,11 +4912,11 @@ var require_acorn = __commonJS({
|
|
|
4912
4912
|
}
|
|
4913
4913
|
this.inTemplateElement = false;
|
|
4914
4914
|
};
|
|
4915
|
-
pp3.invalidStringToken = function(
|
|
4915
|
+
pp3.invalidStringToken = function(position2, message) {
|
|
4916
4916
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
|
|
4917
4917
|
throw INVALID_TEMPLATE_ESCAPE_ERROR3;
|
|
4918
4918
|
} else {
|
|
4919
|
-
this.raise(
|
|
4919
|
+
this.raise(position2, message);
|
|
4920
4920
|
}
|
|
4921
4921
|
};
|
|
4922
4922
|
pp3.readTmplToken = function() {
|
|
@@ -5856,9 +5856,9 @@ var require_doc = __commonJS({
|
|
|
5856
5856
|
"use strict";
|
|
5857
5857
|
init_define_process();
|
|
5858
5858
|
function guessEndOfLine(text8) {
|
|
5859
|
-
const
|
|
5860
|
-
if (
|
|
5861
|
-
return text8.charAt(
|
|
5859
|
+
const index2 = text8.indexOf("\r");
|
|
5860
|
+
if (index2 >= 0) {
|
|
5861
|
+
return text8.charAt(index2 + 1) === "\n" ? "crlf" : "cr";
|
|
5862
5862
|
}
|
|
5863
5863
|
return "lf";
|
|
5864
5864
|
}
|
|
@@ -5967,8 +5967,8 @@ var require_doc = __commonJS({
|
|
|
5967
5967
|
}
|
|
5968
5968
|
string5 = string5.replace((0, import_emoji_regex.default)(), " ");
|
|
5969
5969
|
let width = 0;
|
|
5970
|
-
for (let
|
|
5971
|
-
const codePoint = string5.codePointAt(
|
|
5970
|
+
for (let index2 = 0; index2 < string5.length; index2++) {
|
|
5971
|
+
const codePoint = string5.codePointAt(index2);
|
|
5972
5972
|
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
5973
5973
|
continue;
|
|
5974
5974
|
}
|
|
@@ -5976,7 +5976,7 @@ var require_doc = __commonJS({
|
|
|
5976
5976
|
continue;
|
|
5977
5977
|
}
|
|
5978
5978
|
if (codePoint > 65535) {
|
|
5979
|
-
|
|
5979
|
+
index2++;
|
|
5980
5980
|
}
|
|
5981
5981
|
width += isFullwidthCodePoint(codePoint) ? 2 : 1;
|
|
5982
5982
|
}
|
|
@@ -6869,7 +6869,7 @@ var require_doc = __commonJS({
|
|
|
6869
6869
|
const printedSymbols = /* @__PURE__ */ Object.create(null);
|
|
6870
6870
|
const usedKeysForSymbols = /* @__PURE__ */ new Set();
|
|
6871
6871
|
return printDoc(flattenDoc(doc));
|
|
6872
|
-
function printDoc(doc2,
|
|
6872
|
+
function printDoc(doc2, index2, parentParts) {
|
|
6873
6873
|
if (typeof doc2 === "string") {
|
|
6874
6874
|
return JSON.stringify(doc2);
|
|
6875
6875
|
}
|
|
@@ -6878,7 +6878,7 @@ var require_doc = __commonJS({
|
|
|
6878
6878
|
return printed.length === 1 ? printed[0] : "[".concat(printed.join(", "), "]");
|
|
6879
6879
|
}
|
|
6880
6880
|
if (doc2.type === "line") {
|
|
6881
|
-
const withBreakParent = Array.isArray(parentParts) && parentParts[
|
|
6881
|
+
const withBreakParent = Array.isArray(parentParts) && parentParts[index2 + 1] && parentParts[index2 + 1].type === "break-parent";
|
|
6882
6882
|
if (doc2.literal) {
|
|
6883
6883
|
return withBreakParent ? "literalline" : "literallineWithoutBreakParent";
|
|
6884
6884
|
}
|
|
@@ -6891,7 +6891,7 @@ var require_doc = __commonJS({
|
|
|
6891
6891
|
return "line";
|
|
6892
6892
|
}
|
|
6893
6893
|
if (doc2.type === "break-parent") {
|
|
6894
|
-
const afterHardline = Array.isArray(parentParts) && parentParts[
|
|
6894
|
+
const afterHardline = Array.isArray(parentParts) && parentParts[index2 - 1] && parentParts[index2 - 1].type === "line" && parentParts[index2 - 1].hard;
|
|
6895
6895
|
return afterHardline ? void 0 : "breakParent";
|
|
6896
6896
|
}
|
|
6897
6897
|
if (doc2.type === "trim") {
|
|
@@ -7307,16 +7307,16 @@ var require_third_party = __commonJS({
|
|
|
7307
7307
|
}
|
|
7308
7308
|
this.offsets = offsets;
|
|
7309
7309
|
}
|
|
7310
|
-
LinesAndColumns2.prototype.locationForIndex = function(
|
|
7311
|
-
if (
|
|
7310
|
+
LinesAndColumns2.prototype.locationForIndex = function(index2) {
|
|
7311
|
+
if (index2 < 0 || index2 > this.string.length) {
|
|
7312
7312
|
return null;
|
|
7313
7313
|
}
|
|
7314
7314
|
var line2 = 0;
|
|
7315
7315
|
var offsets = this.offsets;
|
|
7316
|
-
while (offsets[line2 + 1] <=
|
|
7316
|
+
while (offsets[line2 + 1] <= index2) {
|
|
7317
7317
|
line2++;
|
|
7318
7318
|
}
|
|
7319
|
-
var column =
|
|
7319
|
+
var column = index2 - offsets[line2];
|
|
7320
7320
|
return {
|
|
7321
7321
|
line: line2,
|
|
7322
7322
|
column
|
|
@@ -9294,8 +9294,8 @@ var require_third_party = __commonJS({
|
|
|
9294
9294
|
const hasColumns = loc.start && typeof loc.start.column === "number";
|
|
9295
9295
|
const numberMaxWidth = String(end).length;
|
|
9296
9296
|
const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
|
|
9297
|
-
let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2,
|
|
9298
|
-
const number = start3 + 1 +
|
|
9297
|
+
let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2, index2) => {
|
|
9298
|
+
const number = start3 + 1 + index2;
|
|
9299
9299
|
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
|
9300
9300
|
const gutter = ` ${paddedNumber} |`;
|
|
9301
9301
|
const hasMarker = markerLines[number];
|
|
@@ -9384,8 +9384,8 @@ ${frame}`;
|
|
|
9384
9384
|
}
|
|
9385
9385
|
if (indexMatch && indexMatch.length > 0) {
|
|
9386
9386
|
const lines2 = new LinesAndColumns(string5);
|
|
9387
|
-
const
|
|
9388
|
-
const location2 = lines2.locationForIndex(
|
|
9387
|
+
const index2 = Number(indexMatch[1]);
|
|
9388
|
+
const location2 = lines2.locationForIndex(index2);
|
|
9389
9389
|
const codeFrame = codeFrameColumns(string5, {
|
|
9390
9390
|
start: {
|
|
9391
9391
|
line: location2.line + 1,
|
|
@@ -192671,8 +192671,8 @@ var require_prettier = __commonJS({
|
|
|
192671
192671
|
var toIntegerOrInfinity = require_to_integer_or_infinity();
|
|
192672
192672
|
var max = Math.max;
|
|
192673
192673
|
var min = Math.min;
|
|
192674
|
-
module22.exports = function(
|
|
192675
|
-
var integer = toIntegerOrInfinity(
|
|
192674
|
+
module22.exports = function(index2, length) {
|
|
192675
|
+
var integer = toIntegerOrInfinity(index2);
|
|
192676
192676
|
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
192677
192677
|
};
|
|
192678
192678
|
}
|
|
@@ -192703,18 +192703,18 @@ var require_prettier = __commonJS({
|
|
|
192703
192703
|
return function($this, el, fromIndex) {
|
|
192704
192704
|
var O = toIndexedObject($this);
|
|
192705
192705
|
var length = lengthOfArrayLike(O);
|
|
192706
|
-
var
|
|
192706
|
+
var index2 = toAbsoluteIndex(fromIndex, length);
|
|
192707
192707
|
var value;
|
|
192708
192708
|
if (IS_INCLUDES && el != el)
|
|
192709
|
-
while (length >
|
|
192710
|
-
value = O[
|
|
192709
|
+
while (length > index2) {
|
|
192710
|
+
value = O[index2++];
|
|
192711
192711
|
if (value != value)
|
|
192712
192712
|
return true;
|
|
192713
192713
|
}
|
|
192714
192714
|
else
|
|
192715
|
-
for (; length >
|
|
192716
|
-
if ((IS_INCLUDES ||
|
|
192717
|
-
return IS_INCLUDES ||
|
|
192715
|
+
for (; length > index2; index2++) {
|
|
192716
|
+
if ((IS_INCLUDES || index2 in O) && O[index2] === el)
|
|
192717
|
+
return IS_INCLUDES || index2 || 0;
|
|
192718
192718
|
}
|
|
192719
192719
|
return !IS_INCLUDES && -1;
|
|
192720
192720
|
};
|
|
@@ -193163,7 +193163,7 @@ var require_prettier = __commonJS({
|
|
|
193163
193163
|
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
193164
193164
|
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
193165
193165
|
var fn = bind(unboundFunction, that);
|
|
193166
|
-
var iterator, iterFn,
|
|
193166
|
+
var iterator, iterFn, index2, length, result, next, step;
|
|
193167
193167
|
var stop = function(condition) {
|
|
193168
193168
|
if (iterator)
|
|
193169
193169
|
iteratorClose(iterator, "normal", condition);
|
|
@@ -193183,8 +193183,8 @@ var require_prettier = __commonJS({
|
|
|
193183
193183
|
if (!iterFn)
|
|
193184
193184
|
throw TypeError2(tryToString(iterable) + " is not iterable");
|
|
193185
193185
|
if (isArrayIteratorMethod(iterFn)) {
|
|
193186
|
-
for (
|
|
193187
|
-
result = callFn(iterable[
|
|
193186
|
+
for (index2 = 0, length = lengthOfArrayLike(iterable); length > index2; index2++) {
|
|
193187
|
+
result = callFn(iterable[index2]);
|
|
193188
193188
|
if (result && isPrototypeOf(ResultPrototype, result))
|
|
193189
193189
|
return result;
|
|
193190
193190
|
}
|
|
@@ -193614,11 +193614,11 @@ var require_prettier = __commonJS({
|
|
|
193614
193614
|
var t = exports2.t = {};
|
|
193615
193615
|
var R = 0;
|
|
193616
193616
|
var createToken = (name2, value, isGlobal) => {
|
|
193617
|
-
const
|
|
193618
|
-
debug(name2,
|
|
193619
|
-
t[name2] =
|
|
193620
|
-
src[
|
|
193621
|
-
re[
|
|
193617
|
+
const index2 = R++;
|
|
193618
|
+
debug(name2, index2, value);
|
|
193619
|
+
t[name2] = index2;
|
|
193620
|
+
src[index2] = value;
|
|
193621
|
+
re[index2] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
193622
193622
|
};
|
|
193623
193623
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
193624
193624
|
createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
|
|
@@ -194563,8 +194563,8 @@ var require_prettier = __commonJS({
|
|
|
194563
194563
|
}
|
|
194564
194564
|
string5 = string5.replace((0, import_emoji_regex.default)(), " ");
|
|
194565
194565
|
let width = 0;
|
|
194566
|
-
for (let
|
|
194567
|
-
const codePoint = string5.codePointAt(
|
|
194566
|
+
for (let index2 = 0; index2 < string5.length; index2++) {
|
|
194567
|
+
const codePoint = string5.codePointAt(index2);
|
|
194568
194568
|
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
194569
194569
|
continue;
|
|
194570
194570
|
}
|
|
@@ -194572,7 +194572,7 @@ var require_prettier = __commonJS({
|
|
|
194572
194572
|
continue;
|
|
194573
194573
|
}
|
|
194574
194574
|
if (codePoint > 65535) {
|
|
194575
|
-
|
|
194575
|
+
index2++;
|
|
194576
194576
|
}
|
|
194577
194577
|
width += isFullwidthCodePoint(codePoint) ? 2 : 1;
|
|
194578
194578
|
}
|
|
@@ -194607,15 +194607,15 @@ var require_prettier = __commonJS({
|
|
|
194607
194607
|
"src/utils/text/skip.js"(exports2, module22) {
|
|
194608
194608
|
"use strict";
|
|
194609
194609
|
function skip(chars2) {
|
|
194610
|
-
return (text8,
|
|
194610
|
+
return (text8, index2, opts) => {
|
|
194611
194611
|
const backwards = opts && opts.backwards;
|
|
194612
|
-
if (
|
|
194612
|
+
if (index2 === false) {
|
|
194613
194613
|
return false;
|
|
194614
194614
|
}
|
|
194615
194615
|
const {
|
|
194616
194616
|
length
|
|
194617
194617
|
} = text8;
|
|
194618
|
-
let cursor =
|
|
194618
|
+
let cursor = index2;
|
|
194619
194619
|
while (cursor >= 0 && cursor < length) {
|
|
194620
194620
|
const c = text8.charAt(cursor);
|
|
194621
194621
|
if (chars2 instanceof RegExp) {
|
|
@@ -194648,18 +194648,18 @@ var require_prettier = __commonJS({
|
|
|
194648
194648
|
var require_skip_inline_comment = __commonJS22({
|
|
194649
194649
|
"src/utils/text/skip-inline-comment.js"(exports2, module22) {
|
|
194650
194650
|
"use strict";
|
|
194651
|
-
function skipInlineComment(text8,
|
|
194652
|
-
if (
|
|
194651
|
+
function skipInlineComment(text8, index2) {
|
|
194652
|
+
if (index2 === false) {
|
|
194653
194653
|
return false;
|
|
194654
194654
|
}
|
|
194655
|
-
if (text8.charAt(
|
|
194656
|
-
for (let i =
|
|
194655
|
+
if (text8.charAt(index2) === "/" && text8.charAt(index2 + 1) === "*") {
|
|
194656
|
+
for (let i = index2 + 2; i < text8.length; ++i) {
|
|
194657
194657
|
if (text8.charAt(i) === "*" && text8.charAt(i + 1) === "/") {
|
|
194658
194658
|
return i + 2;
|
|
194659
194659
|
}
|
|
194660
194660
|
}
|
|
194661
194661
|
}
|
|
194662
|
-
return
|
|
194662
|
+
return index2;
|
|
194663
194663
|
}
|
|
194664
194664
|
module22.exports = skipInlineComment;
|
|
194665
194665
|
}
|
|
@@ -194670,14 +194670,14 @@ var require_prettier = __commonJS({
|
|
|
194670
194670
|
var {
|
|
194671
194671
|
skipEverythingButNewLine
|
|
194672
194672
|
} = require_skip();
|
|
194673
|
-
function skipTrailingComment(text8,
|
|
194674
|
-
if (
|
|
194673
|
+
function skipTrailingComment(text8, index2) {
|
|
194674
|
+
if (index2 === false) {
|
|
194675
194675
|
return false;
|
|
194676
194676
|
}
|
|
194677
|
-
if (text8.charAt(
|
|
194678
|
-
return skipEverythingButNewLine(text8,
|
|
194677
|
+
if (text8.charAt(index2) === "/" && text8.charAt(index2 + 1) === "/") {
|
|
194678
|
+
return skipEverythingButNewLine(text8, index2);
|
|
194679
194679
|
}
|
|
194680
|
-
return
|
|
194680
|
+
return index2;
|
|
194681
194681
|
}
|
|
194682
194682
|
module22.exports = skipTrailingComment;
|
|
194683
194683
|
}
|
|
@@ -194685,28 +194685,28 @@ var require_prettier = __commonJS({
|
|
|
194685
194685
|
var require_skip_newline = __commonJS22({
|
|
194686
194686
|
"src/utils/text/skip-newline.js"(exports2, module22) {
|
|
194687
194687
|
"use strict";
|
|
194688
|
-
function skipNewline(text8,
|
|
194688
|
+
function skipNewline(text8, index2, opts) {
|
|
194689
194689
|
const backwards = opts && opts.backwards;
|
|
194690
|
-
if (
|
|
194690
|
+
if (index2 === false) {
|
|
194691
194691
|
return false;
|
|
194692
194692
|
}
|
|
194693
|
-
const atIndex = text8.charAt(
|
|
194693
|
+
const atIndex = text8.charAt(index2);
|
|
194694
194694
|
if (backwards) {
|
|
194695
|
-
if (text8.charAt(
|
|
194696
|
-
return
|
|
194695
|
+
if (text8.charAt(index2 - 1) === "\r" && atIndex === "\n") {
|
|
194696
|
+
return index2 - 2;
|
|
194697
194697
|
}
|
|
194698
194698
|
if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") {
|
|
194699
|
-
return
|
|
194699
|
+
return index2 - 1;
|
|
194700
194700
|
}
|
|
194701
194701
|
} else {
|
|
194702
|
-
if (atIndex === "\r" && text8.charAt(
|
|
194703
|
-
return
|
|
194702
|
+
if (atIndex === "\r" && text8.charAt(index2 + 1) === "\n") {
|
|
194703
|
+
return index2 + 2;
|
|
194704
194704
|
}
|
|
194705
194705
|
if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") {
|
|
194706
|
-
return
|
|
194706
|
+
return index2 + 1;
|
|
194707
194707
|
}
|
|
194708
194708
|
}
|
|
194709
|
-
return
|
|
194709
|
+
return index2;
|
|
194710
194710
|
}
|
|
194711
194711
|
module22.exports = skipNewline;
|
|
194712
194712
|
}
|
|
@@ -194759,15 +194759,15 @@ var require_prettier = __commonJS({
|
|
|
194759
194759
|
var getNextNonSpaceNonCommentCharacterIndexWithStartIndex = require_get_next_non_space_non_comment_character_index_with_start_index();
|
|
194760
194760
|
var getPenultimate = (arr) => arr[arr.length - 2];
|
|
194761
194761
|
function skip(chars2) {
|
|
194762
|
-
return (text8,
|
|
194762
|
+
return (text8, index2, opts) => {
|
|
194763
194763
|
const backwards = opts && opts.backwards;
|
|
194764
|
-
if (
|
|
194764
|
+
if (index2 === false) {
|
|
194765
194765
|
return false;
|
|
194766
194766
|
}
|
|
194767
194767
|
const {
|
|
194768
194768
|
length
|
|
194769
194769
|
} = text8;
|
|
194770
|
-
let cursor =
|
|
194770
|
+
let cursor = index2;
|
|
194771
194771
|
while (cursor >= 0 && cursor < length) {
|
|
194772
194772
|
const c = text8.charAt(cursor);
|
|
194773
194773
|
if (chars2 instanceof RegExp) {
|
|
@@ -194785,8 +194785,8 @@ var require_prettier = __commonJS({
|
|
|
194785
194785
|
return false;
|
|
194786
194786
|
};
|
|
194787
194787
|
}
|
|
194788
|
-
function hasNewline(text8,
|
|
194789
|
-
const idx = skipSpaces(text8, opts.backwards ?
|
|
194788
|
+
function hasNewline(text8, index2, opts = {}) {
|
|
194789
|
+
const idx = skipSpaces(text8, opts.backwards ? index2 - 1 : index2, opts);
|
|
194790
194790
|
const idx2 = skipNewline(text8, idx, opts);
|
|
194791
194791
|
return idx !== idx2;
|
|
194792
194792
|
}
|
|
@@ -194814,9 +194814,9 @@ var require_prettier = __commonJS({
|
|
|
194814
194814
|
});
|
|
194815
194815
|
return idx !== idx2;
|
|
194816
194816
|
}
|
|
194817
|
-
function isNextLineEmptyAfterIndex(text8,
|
|
194817
|
+
function isNextLineEmptyAfterIndex(text8, index2) {
|
|
194818
194818
|
let oldIdx = null;
|
|
194819
|
-
let idx =
|
|
194819
|
+
let idx = index2;
|
|
194820
194820
|
while (idx !== oldIdx) {
|
|
194821
194821
|
oldIdx = idx;
|
|
194822
194822
|
idx = skipToLineEnd(text8, idx);
|
|
@@ -194836,9 +194836,9 @@ var require_prettier = __commonJS({
|
|
|
194836
194836
|
function getNextNonSpaceNonCommentCharacter(text8, node, locEnd) {
|
|
194837
194837
|
return text8.charAt(getNextNonSpaceNonCommentCharacterIndex(text8, node, locEnd));
|
|
194838
194838
|
}
|
|
194839
|
-
function hasSpaces(text8,
|
|
194840
|
-
const idx = skipSpaces(text8, opts.backwards ?
|
|
194841
|
-
return idx !==
|
|
194839
|
+
function hasSpaces(text8, index2, opts = {}) {
|
|
194840
|
+
const idx = skipSpaces(text8, opts.backwards ? index2 - 1 : index2, opts);
|
|
194841
|
+
return idx !== index2;
|
|
194842
194842
|
}
|
|
194843
194843
|
function getAlignmentSize(value, tabWidth, startIndex = 0) {
|
|
194844
194844
|
let size = 0;
|
|
@@ -195034,9 +195034,9 @@ var require_prettier = __commonJS({
|
|
|
195034
195034
|
"src/common/end-of-line.js"(exports2, module22) {
|
|
195035
195035
|
"use strict";
|
|
195036
195036
|
function guessEndOfLine(text8) {
|
|
195037
|
-
const
|
|
195038
|
-
if (
|
|
195039
|
-
return text8.charAt(
|
|
195037
|
+
const index2 = text8.indexOf("\r");
|
|
195038
|
+
if (index2 >= 0) {
|
|
195039
|
+
return text8.charAt(index2 + 1) === "\n" ? "crlf" : "cr";
|
|
195040
195040
|
}
|
|
195041
195041
|
return "lf";
|
|
195042
195042
|
}
|
|
@@ -198963,8 +198963,8 @@ var require_prettier = __commonJS({
|
|
|
198963
198963
|
const hasColumns = loc.start && typeof loc.start.column === "number";
|
|
198964
198964
|
const numberMaxWidth = String(end).length;
|
|
198965
198965
|
const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
|
|
198966
|
-
let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2,
|
|
198967
|
-
const number = start3 + 1 +
|
|
198966
|
+
let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2, index2) => {
|
|
198967
|
+
const number = start3 + 1 + index2;
|
|
198968
198968
|
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
|
198969
198969
|
const gutter = ` ${paddedNumber} |`;
|
|
198970
198970
|
const hasMarker = markerLines[number];
|
|
@@ -199526,14 +199526,14 @@ ${frame}`;
|
|
|
199526
199526
|
endOfLine: handleEndOfLineComment = returnFalse,
|
|
199527
199527
|
remaining: handleRemainingComment = returnFalse
|
|
199528
199528
|
} = handleComments;
|
|
199529
|
-
const decoratedComments = comments.map((comment,
|
|
199529
|
+
const decoratedComments = comments.map((comment, index2) => Object.assign(Object.assign({}, decorateComment(ast, comment, options)), {}, {
|
|
199530
199530
|
comment,
|
|
199531
199531
|
text: text8,
|
|
199532
199532
|
options,
|
|
199533
199533
|
ast,
|
|
199534
|
-
isLastComment: comments.length - 1 ===
|
|
199534
|
+
isLastComment: comments.length - 1 === index2
|
|
199535
199535
|
}));
|
|
199536
|
-
for (const [
|
|
199536
|
+
for (const [index2, context] of decoratedComments.entries()) {
|
|
199537
199537
|
const {
|
|
199538
199538
|
comment,
|
|
199539
199539
|
precedingNode,
|
|
@@ -199563,7 +199563,7 @@ ${frame}`;
|
|
|
199563
199563
|
comment.followingNode = followingNode;
|
|
199564
199564
|
args = [comment, text22, options2, ast2, isLastComment];
|
|
199565
199565
|
}
|
|
199566
|
-
if (isOwnLineComment(text22, options2, decoratedComments,
|
|
199566
|
+
if (isOwnLineComment(text22, options2, decoratedComments, index2)) {
|
|
199567
199567
|
comment.placement = "ownLine";
|
|
199568
199568
|
if (handleOwnLineComment(...args)) {
|
|
199569
199569
|
} else if (followingNode) {
|
|
@@ -199575,7 +199575,7 @@ ${frame}`;
|
|
|
199575
199575
|
} else {
|
|
199576
199576
|
addDanglingComment(ast2, comment);
|
|
199577
199577
|
}
|
|
199578
|
-
} else if (isEndOfLineComment(text22, options2, decoratedComments,
|
|
199578
|
+
} else if (isEndOfLineComment(text22, options2, decoratedComments, index2)) {
|
|
199579
199579
|
comment.placement = "endOfLine";
|
|
199580
199580
|
if (handleEndOfLineComment(...args)) {
|
|
199581
199581
|
} else if (precedingNode) {
|
|
@@ -199631,11 +199631,11 @@ ${frame}`;
|
|
|
199631
199631
|
} = options;
|
|
199632
199632
|
let start3 = locStart(comment);
|
|
199633
199633
|
if (precedingNode) {
|
|
199634
|
-
for (let
|
|
199634
|
+
for (let index2 = commentIndex - 1; index2 >= 0; index2--) {
|
|
199635
199635
|
const {
|
|
199636
199636
|
comment: comment2,
|
|
199637
199637
|
precedingNode: currentCommentPrecedingNode
|
|
199638
|
-
} = decoratedComments[
|
|
199638
|
+
} = decoratedComments[index2];
|
|
199639
199639
|
if (currentCommentPrecedingNode !== precedingNode || !isAllEmptyAndNoLineBreak(text8.slice(locEnd(comment2), start3))) {
|
|
199640
199640
|
break;
|
|
199641
199641
|
}
|
|
@@ -199657,11 +199657,11 @@ ${frame}`;
|
|
|
199657
199657
|
} = options;
|
|
199658
199658
|
let end = locEnd(comment);
|
|
199659
199659
|
if (followingNode) {
|
|
199660
|
-
for (let
|
|
199660
|
+
for (let index2 = commentIndex + 1; index2 < decoratedComments.length; index2++) {
|
|
199661
199661
|
const {
|
|
199662
199662
|
comment: comment2,
|
|
199663
199663
|
followingNode: currentCommentFollowingNode
|
|
199664
|
-
} = decoratedComments[
|
|
199664
|
+
} = decoratedComments[index2];
|
|
199665
199665
|
if (currentCommentFollowingNode !== followingNode || !isAllEmptyAndNoLineBreak(text8.slice(end, locStart(comment2)))) {
|
|
199666
199666
|
break;
|
|
199667
199667
|
}
|
|
@@ -199746,8 +199746,8 @@ ${frame}`;
|
|
|
199746
199746
|
} else {
|
|
199747
199747
|
parts.push(hardline);
|
|
199748
199748
|
}
|
|
199749
|
-
const
|
|
199750
|
-
if (
|
|
199749
|
+
const index2 = skipNewline(originalText, skipSpaces(originalText, locEnd(comment)));
|
|
199750
|
+
if (index2 !== false && hasNewline(originalText, index2)) {
|
|
199751
199751
|
parts.push(hardline);
|
|
199752
199752
|
}
|
|
199753
199753
|
return parts;
|
|
@@ -199953,8 +199953,8 @@ ${frame}`;
|
|
|
199953
199953
|
}
|
|
199954
199954
|
map(callback, ...names) {
|
|
199955
199955
|
const result = [];
|
|
199956
|
-
this.each((path,
|
|
199957
|
-
result[
|
|
199956
|
+
this.each((path, index2, value) => {
|
|
199957
|
+
result[index2] = callback(path, index2, value);
|
|
199958
199958
|
}, ...names);
|
|
199959
199959
|
return result;
|
|
199960
199960
|
}
|
|
@@ -200500,11 +200500,11 @@ ${frame}`;
|
|
|
200500
200500
|
comments: rangeResult.comments
|
|
200501
200501
|
};
|
|
200502
200502
|
}
|
|
200503
|
-
function ensureIndexInText(text8,
|
|
200504
|
-
if (typeof
|
|
200503
|
+
function ensureIndexInText(text8, index2, defaultValue) {
|
|
200504
|
+
if (typeof index2 !== "number" || Number.isNaN(index2) || index2 < 0 || index2 > text8.length) {
|
|
200505
200505
|
return defaultValue;
|
|
200506
200506
|
}
|
|
200507
|
-
return
|
|
200507
|
+
return index2;
|
|
200508
200508
|
}
|
|
200509
200509
|
function normalizeIndexes(text8, options) {
|
|
200510
200510
|
let {
|
|
@@ -200539,7 +200539,7 @@ ${frame}`;
|
|
|
200539
200539
|
endOfLine = guessEndOfLine(text8);
|
|
200540
200540
|
}
|
|
200541
200541
|
if (text8.includes("\r")) {
|
|
200542
|
-
const countCrlfBefore = (
|
|
200542
|
+
const countCrlfBefore = (index2) => countEndOfLineChars(text8.slice(0, Math.max(index2, 0)), "\r\n");
|
|
200543
200543
|
cursorOffset -= countCrlfBefore(cursorOffset);
|
|
200544
200544
|
rangeStart -= countCrlfBefore(rangeStart);
|
|
200545
200545
|
rangeEnd -= countCrlfBefore(rangeEnd);
|
|
@@ -200995,14 +200995,14 @@ ${frame}`;
|
|
|
200995
200995
|
var isNumber = (num) => Number.isInteger(+num);
|
|
200996
200996
|
var zeros = (input) => {
|
|
200997
200997
|
let value = `${input}`;
|
|
200998
|
-
let
|
|
200998
|
+
let index2 = -1;
|
|
200999
200999
|
if (value[0] === "-")
|
|
201000
201000
|
value = value.slice(1);
|
|
201001
201001
|
if (value === "0")
|
|
201002
201002
|
return false;
|
|
201003
|
-
while (value[++
|
|
201003
|
+
while (value[++index2] === "0")
|
|
201004
201004
|
;
|
|
201005
|
-
return
|
|
201005
|
+
return index2 > 0;
|
|
201006
201006
|
};
|
|
201007
201007
|
var stringify2 = (start3, end, options) => {
|
|
201008
201008
|
if (typeof start3 === "string" || typeof end === "string") {
|
|
@@ -201119,15 +201119,15 @@ ${frame}`;
|
|
|
201119
201119
|
};
|
|
201120
201120
|
let push2 = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
|
|
201121
201121
|
let range = [];
|
|
201122
|
-
let
|
|
201122
|
+
let index2 = 0;
|
|
201123
201123
|
while (descending ? a >= b : a <= b) {
|
|
201124
201124
|
if (options.toRegex === true && step > 1) {
|
|
201125
201125
|
push2(a);
|
|
201126
201126
|
} else {
|
|
201127
|
-
range.push(pad(format3(a,
|
|
201127
|
+
range.push(pad(format3(a, index2), maxLen, toNumber));
|
|
201128
201128
|
}
|
|
201129
201129
|
a = descending ? a - step : a + step;
|
|
201130
|
-
|
|
201130
|
+
index2++;
|
|
201131
201131
|
}
|
|
201132
201132
|
if (options.toRegex === true) {
|
|
201133
201133
|
return step > 1 ? toSequence(parts, options) : toRegex(range, null, Object.assign({
|
|
@@ -201150,11 +201150,11 @@ ${frame}`;
|
|
|
201150
201150
|
return toRange(min, max, false, options);
|
|
201151
201151
|
}
|
|
201152
201152
|
let range = [];
|
|
201153
|
-
let
|
|
201153
|
+
let index2 = 0;
|
|
201154
201154
|
while (descending ? a >= b : a <= b) {
|
|
201155
|
-
range.push(format3(a,
|
|
201155
|
+
range.push(format3(a, index2));
|
|
201156
201156
|
a = descending ? a - step : a + step;
|
|
201157
|
-
|
|
201157
|
+
index2++;
|
|
201158
201158
|
}
|
|
201159
201159
|
if (options.toRegex === true) {
|
|
201160
201160
|
return toRegex(range, null, {
|
|
@@ -201435,11 +201435,11 @@ ${frame}`;
|
|
|
201435
201435
|
let prev = ast;
|
|
201436
201436
|
let brackets = 0;
|
|
201437
201437
|
let length = input.length;
|
|
201438
|
-
let
|
|
201438
|
+
let index2 = 0;
|
|
201439
201439
|
let depth = 0;
|
|
201440
201440
|
let value;
|
|
201441
201441
|
let memo = {};
|
|
201442
|
-
const advance3 = () => input[
|
|
201442
|
+
const advance3 = () => input[index2++];
|
|
201443
201443
|
const push2 = (node) => {
|
|
201444
201444
|
if (node.type === "text" && prev.type === "dot") {
|
|
201445
201445
|
prev.type = "text";
|
|
@@ -201457,7 +201457,7 @@ ${frame}`;
|
|
|
201457
201457
|
push2({
|
|
201458
201458
|
type: "bos"
|
|
201459
201459
|
});
|
|
201460
|
-
while (
|
|
201460
|
+
while (index2 < length) {
|
|
201461
201461
|
block = stack[stack.length - 1];
|
|
201462
201462
|
value = advance3();
|
|
201463
201463
|
if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
|
|
@@ -201481,7 +201481,7 @@ ${frame}`;
|
|
|
201481
201481
|
brackets++;
|
|
201482
201482
|
let closed = true;
|
|
201483
201483
|
let next;
|
|
201484
|
-
while (
|
|
201484
|
+
while (index2 < length && (next = advance3())) {
|
|
201485
201485
|
value += next;
|
|
201486
201486
|
if (next === CHAR_LEFT_SQUARE_BRACKET) {
|
|
201487
201487
|
brackets++;
|
|
@@ -201538,7 +201538,7 @@ ${frame}`;
|
|
|
201538
201538
|
if (options.keepQuotes !== true) {
|
|
201539
201539
|
value = "";
|
|
201540
201540
|
}
|
|
201541
|
-
while (
|
|
201541
|
+
while (index2 < length && (next = advance3())) {
|
|
201542
201542
|
if (next === CHAR_BACKSLASH) {
|
|
201543
201543
|
value += next + advance3();
|
|
201544
201544
|
continue;
|
|
@@ -202000,7 +202000,7 @@ ${frame}`;
|
|
|
202000
202000
|
const tokens = [];
|
|
202001
202001
|
const parts = [];
|
|
202002
202002
|
let str = input;
|
|
202003
|
-
let
|
|
202003
|
+
let index2 = -1;
|
|
202004
202004
|
let start3 = 0;
|
|
202005
202005
|
let lastIndex = 0;
|
|
202006
202006
|
let isBrace = false;
|
|
@@ -202021,13 +202021,13 @@ ${frame}`;
|
|
|
202021
202021
|
depth: 0,
|
|
202022
202022
|
isGlob: false
|
|
202023
202023
|
};
|
|
202024
|
-
const eos = () =>
|
|
202025
|
-
const peek = () => str.charCodeAt(
|
|
202024
|
+
const eos = () => index2 >= length;
|
|
202025
|
+
const peek = () => str.charCodeAt(index2 + 1);
|
|
202026
202026
|
const advance3 = () => {
|
|
202027
202027
|
prev = code2;
|
|
202028
|
-
return str.charCodeAt(++
|
|
202028
|
+
return str.charCodeAt(++index2);
|
|
202029
202029
|
};
|
|
202030
|
-
while (
|
|
202030
|
+
while (index2 < length) {
|
|
202031
202031
|
code2 = advance3();
|
|
202032
202032
|
let next;
|
|
202033
202033
|
if (code2 === CHAR_BACKWARD_SLASH) {
|
|
@@ -202084,7 +202084,7 @@ ${frame}`;
|
|
|
202084
202084
|
break;
|
|
202085
202085
|
}
|
|
202086
202086
|
if (code2 === CHAR_FORWARD_SLASH) {
|
|
202087
|
-
slashes.push(
|
|
202087
|
+
slashes.push(index2);
|
|
202088
202088
|
tokens.push(token);
|
|
202089
202089
|
token = {
|
|
202090
202090
|
value: "",
|
|
@@ -202093,11 +202093,11 @@ ${frame}`;
|
|
|
202093
202093
|
};
|
|
202094
202094
|
if (finished === true)
|
|
202095
202095
|
continue;
|
|
202096
|
-
if (prev === CHAR_DOT &&
|
|
202096
|
+
if (prev === CHAR_DOT && index2 === start3 + 1) {
|
|
202097
202097
|
start3 += 2;
|
|
202098
202098
|
continue;
|
|
202099
202099
|
}
|
|
202100
|
-
lastIndex =
|
|
202100
|
+
lastIndex = index2 + 1;
|
|
202101
202101
|
continue;
|
|
202102
202102
|
}
|
|
202103
202103
|
if (opts.noext !== true) {
|
|
@@ -202106,7 +202106,7 @@ ${frame}`;
|
|
|
202106
202106
|
isGlob = token.isGlob = true;
|
|
202107
202107
|
isExtglob = token.isExtglob = true;
|
|
202108
202108
|
finished = true;
|
|
202109
|
-
if (code2 === CHAR_EXCLAMATION_MARK &&
|
|
202109
|
+
if (code2 === CHAR_EXCLAMATION_MARK && index2 === start3) {
|
|
202110
202110
|
negatedExtglob = true;
|
|
202111
202111
|
}
|
|
202112
202112
|
if (scanToEnd === true) {
|
|
@@ -202164,7 +202164,7 @@ ${frame}`;
|
|
|
202164
202164
|
}
|
|
202165
202165
|
break;
|
|
202166
202166
|
}
|
|
202167
|
-
if (opts.nonegate !== true && code2 === CHAR_EXCLAMATION_MARK &&
|
|
202167
|
+
if (opts.nonegate !== true && code2 === CHAR_EXCLAMATION_MARK && index2 === start3) {
|
|
202168
202168
|
negated = token.negated = true;
|
|
202169
202169
|
start3++;
|
|
202170
202170
|
continue;
|
|
@@ -202500,7 +202500,7 @@ ${frame}`;
|
|
|
202500
202500
|
};
|
|
202501
202501
|
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
202502
202502
|
let backslashes = false;
|
|
202503
|
-
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars2, first, rest,
|
|
202503
|
+
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars2, first, rest, index2) => {
|
|
202504
202504
|
if (first === "\\") {
|
|
202505
202505
|
backslashes = true;
|
|
202506
202506
|
return m;
|
|
@@ -202509,7 +202509,7 @@ ${frame}`;
|
|
|
202509
202509
|
if (esc) {
|
|
202510
202510
|
return esc + first + (rest ? QMARK.repeat(rest.length) : "");
|
|
202511
202511
|
}
|
|
202512
|
-
if (
|
|
202512
|
+
if (index2 === 0) {
|
|
202513
202513
|
return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
|
|
202514
202514
|
}
|
|
202515
202515
|
return QMARK.repeat(chars2.length);
|
|
@@ -210102,7 +210102,7 @@ ${fromBody}`;
|
|
|
210102
210102
|
};
|
|
210103
210103
|
var REPLACERS = [[/\\?\s+$/, (match) => match.indexOf("\\") === 0 ? SPACE2 : EMPTY], [/\\\s/g, () => SPACE2], [/[\\$.|*+(){^]/g, (match) => `\\${match}`], [/(?!\\)\?/g, () => "[^/]"], [/^\//, () => "^"], [/\//g, () => "\\/"], [/^\^*\\\*\\\*\\\//, () => "^(?:.*\\/)?"], [/^(?=[^^])/, function startingReplacer() {
|
|
210104
210104
|
return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
|
|
210105
|
-
}], [/\\\/\\\*\\\*(?=\\\/|$)/g, (_,
|
|
210105
|
+
}], [/\\\/\\\*\\\*(?=\\\/|$)/g, (_, index2, str) => index2 + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"], [/(^|[^\\]+)\\\*(?=.+)/g, (_, p1) => `${p1}[^\\/]*`], [/\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE], [/\\\\/g, () => ESCAPE], [/(\\)?\[([^\]/]*?)(\\*)($|\])/g, (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"], [/(?:[^*])$/, (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`], [/(\^|\\\/)?\\\*$/, (_, p1) => {
|
|
210106
210106
|
const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
|
|
210107
210107
|
return `${prefix}(?=$|\\/$)`;
|
|
210108
210108
|
}]];
|
|
@@ -210578,54 +210578,54 @@ ${fromBody}`;
|
|
|
210578
210578
|
if (str[0] === "!") {
|
|
210579
210579
|
return true;
|
|
210580
210580
|
}
|
|
210581
|
-
var
|
|
210581
|
+
var index2 = 0;
|
|
210582
210582
|
var pipeIndex = -2;
|
|
210583
210583
|
var closeSquareIndex = -2;
|
|
210584
210584
|
var closeCurlyIndex = -2;
|
|
210585
210585
|
var closeParenIndex = -2;
|
|
210586
210586
|
var backSlashIndex = -2;
|
|
210587
|
-
while (
|
|
210588
|
-
if (str[
|
|
210587
|
+
while (index2 < str.length) {
|
|
210588
|
+
if (str[index2] === "*") {
|
|
210589
210589
|
return true;
|
|
210590
210590
|
}
|
|
210591
|
-
if (str[
|
|
210591
|
+
if (str[index2 + 1] === "?" && /[\].+)]/.test(str[index2])) {
|
|
210592
210592
|
return true;
|
|
210593
210593
|
}
|
|
210594
|
-
if (closeSquareIndex !== -1 && str[
|
|
210595
|
-
if (closeSquareIndex <
|
|
210596
|
-
closeSquareIndex = str.indexOf("]",
|
|
210594
|
+
if (closeSquareIndex !== -1 && str[index2] === "[" && str[index2 + 1] !== "]") {
|
|
210595
|
+
if (closeSquareIndex < index2) {
|
|
210596
|
+
closeSquareIndex = str.indexOf("]", index2);
|
|
210597
210597
|
}
|
|
210598
|
-
if (closeSquareIndex >
|
|
210598
|
+
if (closeSquareIndex > index2) {
|
|
210599
210599
|
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
|
210600
210600
|
return true;
|
|
210601
210601
|
}
|
|
210602
|
-
backSlashIndex = str.indexOf("\\",
|
|
210602
|
+
backSlashIndex = str.indexOf("\\", index2);
|
|
210603
210603
|
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
|
210604
210604
|
return true;
|
|
210605
210605
|
}
|
|
210606
210606
|
}
|
|
210607
210607
|
}
|
|
210608
|
-
if (closeCurlyIndex !== -1 && str[
|
|
210609
|
-
closeCurlyIndex = str.indexOf("}",
|
|
210610
|
-
if (closeCurlyIndex >
|
|
210611
|
-
backSlashIndex = str.indexOf("\\",
|
|
210608
|
+
if (closeCurlyIndex !== -1 && str[index2] === "{" && str[index2 + 1] !== "}") {
|
|
210609
|
+
closeCurlyIndex = str.indexOf("}", index2);
|
|
210610
|
+
if (closeCurlyIndex > index2) {
|
|
210611
|
+
backSlashIndex = str.indexOf("\\", index2);
|
|
210612
210612
|
if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
|
|
210613
210613
|
return true;
|
|
210614
210614
|
}
|
|
210615
210615
|
}
|
|
210616
210616
|
}
|
|
210617
|
-
if (closeParenIndex !== -1 && str[
|
|
210618
|
-
closeParenIndex = str.indexOf(")",
|
|
210619
|
-
if (closeParenIndex >
|
|
210620
|
-
backSlashIndex = str.indexOf("\\",
|
|
210617
|
+
if (closeParenIndex !== -1 && str[index2] === "(" && str[index2 + 1] === "?" && /[:!=]/.test(str[index2 + 2]) && str[index2 + 3] !== ")") {
|
|
210618
|
+
closeParenIndex = str.indexOf(")", index2);
|
|
210619
|
+
if (closeParenIndex > index2) {
|
|
210620
|
+
backSlashIndex = str.indexOf("\\", index2);
|
|
210621
210621
|
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
|
|
210622
210622
|
return true;
|
|
210623
210623
|
}
|
|
210624
210624
|
}
|
|
210625
210625
|
}
|
|
210626
|
-
if (pipeIndex !== -1 && str[
|
|
210627
|
-
if (pipeIndex <
|
|
210628
|
-
pipeIndex = str.indexOf("|",
|
|
210626
|
+
if (pipeIndex !== -1 && str[index2] === "(" && str[index2 + 1] !== "|") {
|
|
210627
|
+
if (pipeIndex < index2) {
|
|
210628
|
+
pipeIndex = str.indexOf("|", index2);
|
|
210629
210629
|
}
|
|
210630
210630
|
if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
|
|
210631
210631
|
closeParenIndex = str.indexOf(")", pipeIndex);
|
|
@@ -210637,21 +210637,21 @@ ${fromBody}`;
|
|
|
210637
210637
|
}
|
|
210638
210638
|
}
|
|
210639
210639
|
}
|
|
210640
|
-
if (str[
|
|
210641
|
-
var open = str[
|
|
210642
|
-
|
|
210640
|
+
if (str[index2] === "\\") {
|
|
210641
|
+
var open = str[index2 + 1];
|
|
210642
|
+
index2 += 2;
|
|
210643
210643
|
var close = chars2[open];
|
|
210644
210644
|
if (close) {
|
|
210645
|
-
var n = str.indexOf(close,
|
|
210645
|
+
var n = str.indexOf(close, index2);
|
|
210646
210646
|
if (n !== -1) {
|
|
210647
|
-
|
|
210647
|
+
index2 = n + 1;
|
|
210648
210648
|
}
|
|
210649
210649
|
}
|
|
210650
|
-
if (str[
|
|
210650
|
+
if (str[index2] === "!") {
|
|
210651
210651
|
return true;
|
|
210652
210652
|
}
|
|
210653
210653
|
} else {
|
|
210654
|
-
|
|
210654
|
+
index2++;
|
|
210655
210655
|
}
|
|
210656
210656
|
}
|
|
210657
210657
|
return false;
|
|
@@ -210660,26 +210660,26 @@ ${fromBody}`;
|
|
|
210660
210660
|
if (str[0] === "!") {
|
|
210661
210661
|
return true;
|
|
210662
210662
|
}
|
|
210663
|
-
var
|
|
210664
|
-
while (
|
|
210665
|
-
if (/[*?{}()[\]]/.test(str[
|
|
210663
|
+
var index2 = 0;
|
|
210664
|
+
while (index2 < str.length) {
|
|
210665
|
+
if (/[*?{}()[\]]/.test(str[index2])) {
|
|
210666
210666
|
return true;
|
|
210667
210667
|
}
|
|
210668
|
-
if (str[
|
|
210669
|
-
var open = str[
|
|
210670
|
-
|
|
210668
|
+
if (str[index2] === "\\") {
|
|
210669
|
+
var open = str[index2 + 1];
|
|
210670
|
+
index2 += 2;
|
|
210671
210671
|
var close = chars2[open];
|
|
210672
210672
|
if (close) {
|
|
210673
|
-
var n = str.indexOf(close,
|
|
210673
|
+
var n = str.indexOf(close, index2);
|
|
210674
210674
|
if (n !== -1) {
|
|
210675
|
-
|
|
210675
|
+
index2 = n + 1;
|
|
210676
210676
|
}
|
|
210677
210677
|
}
|
|
210678
|
-
if (str[
|
|
210678
|
+
if (str[index2] === "!") {
|
|
210679
210679
|
return true;
|
|
210680
210680
|
}
|
|
210681
210681
|
} else {
|
|
210682
|
-
|
|
210682
|
+
index2++;
|
|
210683
210683
|
}
|
|
210684
210684
|
}
|
|
210685
210685
|
return false;
|
|
@@ -212409,12 +212409,12 @@ ${fromBody}`;
|
|
|
212409
212409
|
const stream = new stream_1.PassThrough({
|
|
212410
212410
|
objectMode: true
|
|
212411
212411
|
});
|
|
212412
|
-
stream._write = (
|
|
212413
|
-
return this._getEntry(filepaths[
|
|
212412
|
+
stream._write = (index2, _enc, done) => {
|
|
212413
|
+
return this._getEntry(filepaths[index2], patterns[index2], options).then((entry) => {
|
|
212414
212414
|
if (entry !== null && options.entryFilter(entry)) {
|
|
212415
212415
|
stream.push(entry);
|
|
212416
212416
|
}
|
|
212417
|
-
if (
|
|
212417
|
+
if (index2 === filepaths.length - 1) {
|
|
212418
212418
|
stream.end();
|
|
212419
212419
|
}
|
|
212420
212420
|
done();
|
|
@@ -212513,8 +212513,8 @@ ${fromBody}`;
|
|
|
212513
212513
|
if (!pattern.complete && levels > section.length) {
|
|
212514
212514
|
return true;
|
|
212515
212515
|
}
|
|
212516
|
-
const match = parts.every((part,
|
|
212517
|
-
const segment = pattern.segments[
|
|
212516
|
+
const match = parts.every((part, index2) => {
|
|
212517
|
+
const segment = pattern.segments[index2];
|
|
212518
212518
|
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
212519
212519
|
return true;
|
|
212520
212520
|
}
|
|
@@ -213410,9 +213410,9 @@ ${fromBody}`;
|
|
|
213410
213410
|
"use strict";
|
|
213411
213411
|
function isNodeMatchesNameOrPath(node, nameOrPath) {
|
|
213412
213412
|
const names = nameOrPath.split(".");
|
|
213413
|
-
for (let
|
|
213414
|
-
const name2 = names[
|
|
213415
|
-
if (
|
|
213413
|
+
for (let index2 = names.length - 1; index2 >= 0; index2--) {
|
|
213414
|
+
const name2 = names[index2];
|
|
213415
|
+
if (index2 === 0) {
|
|
213416
213416
|
return node.type === "Identifier" && node.name === name2;
|
|
213417
213417
|
}
|
|
213418
213418
|
if (node.type !== "MemberExpression" || node.optional || node.computed || node.property.type !== "Identifier" || node.property.name !== name2) {
|
|
@@ -213833,7 +213833,7 @@ ${fromBody}`;
|
|
|
213833
213833
|
}
|
|
213834
213834
|
return true;
|
|
213835
213835
|
}
|
|
213836
|
-
var PRECEDENCE = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((operators,
|
|
213836
|
+
var PRECEDENCE = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((operators, index2) => operators.map((operator) => [operator, index2])));
|
|
213837
213837
|
function getPrecedence(operator) {
|
|
213838
213838
|
return PRECEDENCE.get(operator);
|
|
213839
213839
|
}
|
|
@@ -213876,8 +213876,8 @@ ${fromBody}`;
|
|
|
213876
213876
|
}
|
|
213877
213877
|
function iterateFunctionParametersPath(path, iteratee) {
|
|
213878
213878
|
const node = path.getValue();
|
|
213879
|
-
let
|
|
213880
|
-
const callback = (childPath) => iteratee(childPath,
|
|
213879
|
+
let index2 = 0;
|
|
213880
|
+
const callback = (childPath) => iteratee(childPath, index2++);
|
|
213881
213881
|
if (node.this) {
|
|
213882
213882
|
path.call(callback, "this");
|
|
213883
213883
|
}
|
|
@@ -213942,7 +213942,7 @@ ${fromBody}`;
|
|
|
213942
213942
|
flags = 0;
|
|
213943
213943
|
}
|
|
213944
213944
|
if (flags || fn) {
|
|
213945
|
-
return (comment,
|
|
213945
|
+
return (comment, index2, comments) => !(flags & CommentCheckFlags.Leading && !comment.leading || flags & CommentCheckFlags.Trailing && !comment.trailing || flags & CommentCheckFlags.Dangling && (comment.leading || comment.trailing) || flags & CommentCheckFlags.Block && !isBlockComment(comment) || flags & CommentCheckFlags.Line && !isLineComment(comment) || flags & CommentCheckFlags.First && index2 !== 0 || flags & CommentCheckFlags.Last && index2 !== comments.length - 1 || flags & CommentCheckFlags.PrettierIgnore && !isPrettierIgnoreComment(comment) || fn && !fn(comment));
|
|
213946
213946
|
}
|
|
213947
213947
|
};
|
|
213948
213948
|
function hasComment(node, flags, fn) {
|
|
@@ -214157,11 +214157,11 @@ ${fromBody}`;
|
|
|
214157
214157
|
for (const {
|
|
214158
214158
|
cells
|
|
214159
214159
|
} of table.filter((row) => !row.hasLineBreak)) {
|
|
214160
|
-
for (const [
|
|
214161
|
-
maxColumnWidths[
|
|
214160
|
+
for (const [index2, cell] of cells.entries()) {
|
|
214161
|
+
maxColumnWidths[index2] = Math.max(maxColumnWidths[index2], getStringWidth(cell));
|
|
214162
214162
|
}
|
|
214163
214163
|
}
|
|
214164
|
-
parts.push(lineSuffixBoundary, "`", indent([hardline, join3(hardline, table.map((row) => join3(" | ", row.cells.map((cell,
|
|
214164
|
+
parts.push(lineSuffixBoundary, "`", indent([hardline, join3(hardline, table.map((row) => join3(" | ", row.cells.map((cell, index2) => row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index2] - getStringWidth(cell))))))]), hardline, "`");
|
|
214165
214165
|
return parts;
|
|
214166
214166
|
}
|
|
214167
214167
|
}
|
|
@@ -214408,8 +214408,8 @@ ${fromBody}`;
|
|
|
214408
214408
|
const node = path.getValue();
|
|
214409
214409
|
const counter = htmlTemplateLiteralCounter;
|
|
214410
214410
|
htmlTemplateLiteralCounter = htmlTemplateLiteralCounter + 1 >>> 0;
|
|
214411
|
-
const composePlaceholder = (
|
|
214412
|
-
const text8 = node.quasis.map((quasi,
|
|
214411
|
+
const composePlaceholder = (index2) => `PRETTIER_HTML_PLACEHOLDER_${index2}_${counter}_IN_JS`;
|
|
214412
|
+
const text8 = node.quasis.map((quasi, index2, quasis) => index2 === quasis.length - 1 ? quasi.value.cooked : quasi.value.cooked + composePlaceholder(index2)).join("");
|
|
214413
214413
|
const expressionDocs = printTemplateExpressions(path, print);
|
|
214414
214414
|
if (expressionDocs.length === 0 && text8.trim().length === 0) {
|
|
214415
214415
|
return "``";
|
|
@@ -214643,8 +214643,8 @@ ${fromBody}`;
|
|
|
214643
214643
|
const expression = ast.expression || ast.callee;
|
|
214644
214644
|
if (ast.type === "Decorator" && expression.type === "CallExpression" && expression.callee.name === "Component" && expression.arguments.length === 1) {
|
|
214645
214645
|
const astProps = ast.expression.arguments[0].properties;
|
|
214646
|
-
for (const [
|
|
214647
|
-
switch (astProps[
|
|
214646
|
+
for (const [index2, prop] of newObj.expression.arguments[0].properties.entries()) {
|
|
214647
|
+
switch (astProps[index2].key.name) {
|
|
214648
214648
|
case "styles":
|
|
214649
214649
|
if (prop.value.type === "ArrayExpression") {
|
|
214650
214650
|
removeTemplateElementsValue(prop.value.elements[0]);
|
|
@@ -214807,11 +214807,11 @@ ${fromBody}`;
|
|
|
214807
214807
|
if (!text8.startsWith("#!")) {
|
|
214808
214808
|
return "";
|
|
214809
214809
|
}
|
|
214810
|
-
const
|
|
214811
|
-
if (
|
|
214810
|
+
const index2 = text8.indexOf("\n");
|
|
214811
|
+
if (index2 === -1) {
|
|
214812
214812
|
return text8;
|
|
214813
214813
|
}
|
|
214814
|
-
return text8.slice(0,
|
|
214814
|
+
return text8.slice(0, index2);
|
|
214815
214815
|
}
|
|
214816
214816
|
module22.exports = getShebang;
|
|
214817
214817
|
}
|
|
@@ -215153,8 +215153,8 @@ ${fromBody}`;
|
|
|
215153
215153
|
if (!((enclosingNode === null || enclosingNode === void 0 ? void 0 : enclosingNode.type) === "ArrowFunctionExpression")) {
|
|
215154
215154
|
return false;
|
|
215155
215155
|
}
|
|
215156
|
-
const
|
|
215157
|
-
if (
|
|
215156
|
+
const index2 = getNextNonSpaceNonCommentCharacterIndex(text8, comment, locEnd);
|
|
215157
|
+
if (index2 !== false && text8.slice(index2, index2 + 2) === "=>") {
|
|
215158
215158
|
addDanglingComment(enclosingNode, comment);
|
|
215159
215159
|
return true;
|
|
215160
215160
|
}
|
|
@@ -216221,15 +216221,15 @@ ${fromBody}`;
|
|
|
216221
216221
|
case "NGQuotedExpression":
|
|
216222
216222
|
return [node.prefix, ": ", node.value.trim()];
|
|
216223
216223
|
case "NGMicrosyntax":
|
|
216224
|
-
return path.map((childPath,
|
|
216224
|
+
return path.map((childPath, index2) => [index2 === 0 ? "" : isNgForOf(childPath.getValue(), index2, node) ? " " : [";", line2], print()], "body");
|
|
216225
216225
|
case "NGMicrosyntaxKey":
|
|
216226
216226
|
return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(node.name) ? node.name : JSON.stringify(node.name);
|
|
216227
216227
|
case "NGMicrosyntaxExpression":
|
|
216228
216228
|
return [print("expression"), node.alias === null ? "" : [" as ", print("alias")]];
|
|
216229
216229
|
case "NGMicrosyntaxKeyedExpression": {
|
|
216230
|
-
const
|
|
216230
|
+
const index2 = path.getName();
|
|
216231
216231
|
const parentNode = path.getParentNode();
|
|
216232
|
-
const shouldNotPrintColon = isNgForOf(node,
|
|
216232
|
+
const shouldNotPrintColon = isNgForOf(node, index2, parentNode) || (index2 === 1 && (node.key.name === "then" || node.key.name === "else") || index2 === 2 && node.key.name === "else" && parentNode.body[index2 - 1].type === "NGMicrosyntaxKeyedExpression" && parentNode.body[index2 - 1].key.name === "then") && parentNode.body[0].type === "NGMicrosyntaxExpression";
|
|
216233
216233
|
return [print("key"), shouldNotPrintColon ? " " : ": ", print("expression")];
|
|
216234
216234
|
}
|
|
216235
216235
|
case "NGMicrosyntaxLet":
|
|
@@ -216240,8 +216240,8 @@ ${fromBody}`;
|
|
|
216240
216240
|
throw new Error(`Unknown Angular node type: ${JSON.stringify(node.type)}.`);
|
|
216241
216241
|
}
|
|
216242
216242
|
}
|
|
216243
|
-
function isNgForOf(node,
|
|
216244
|
-
return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" &&
|
|
216243
|
+
function isNgForOf(node, index2, parentNode) {
|
|
216244
|
+
return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index2 === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null;
|
|
216245
216245
|
}
|
|
216246
216246
|
function hasNgSideEffect(path) {
|
|
216247
216247
|
return hasNode(path.getValue(), (node) => {
|
|
@@ -216656,9 +216656,9 @@ ${fromBody}`;
|
|
|
216656
216656
|
if (!parent || !node || !isJsxNode(node) || !isJsxNode(parent)) {
|
|
216657
216657
|
return false;
|
|
216658
216658
|
}
|
|
216659
|
-
const
|
|
216659
|
+
const index2 = parent.children.indexOf(node);
|
|
216660
216660
|
let prevSibling = null;
|
|
216661
|
-
for (let i =
|
|
216661
|
+
for (let i = index2; i > 0; i--) {
|
|
216662
216662
|
const candidate = parent.children[i - 1];
|
|
216663
216663
|
if (candidate.type === "JSXText" && !isMeaningfulJsxText(candidate)) {
|
|
216664
216664
|
continue;
|
|
@@ -216930,12 +216930,12 @@ ${fromBody}`;
|
|
|
216930
216930
|
let hasEmptyLineFollowingFirstArg = false;
|
|
216931
216931
|
const lastArgIndex = args.length - 1;
|
|
216932
216932
|
const printedArguments = [];
|
|
216933
|
-
iterateCallArgumentsPath(path, (argPath,
|
|
216933
|
+
iterateCallArgumentsPath(path, (argPath, index2) => {
|
|
216934
216934
|
const arg = argPath.getNode();
|
|
216935
216935
|
const parts = [print()];
|
|
216936
|
-
if (
|
|
216936
|
+
if (index2 === lastArgIndex) {
|
|
216937
216937
|
} else if (isNextLineEmpty(arg, options)) {
|
|
216938
|
-
if (
|
|
216938
|
+
if (index2 === 0) {
|
|
216939
216939
|
hasEmptyLineFollowingFirstArg = true;
|
|
216940
216940
|
}
|
|
216941
216941
|
anyArgEmptyLine = true;
|
|
@@ -217703,8 +217703,8 @@ ${fromBody}`;
|
|
|
217703
217703
|
const isParametersInTestCall = isTestCall(parent);
|
|
217704
217704
|
const shouldHugParameters = shouldHugFunctionParameters(functionNode);
|
|
217705
217705
|
const printed = [];
|
|
217706
|
-
iterateFunctionParametersPath(path, (parameterPath,
|
|
217707
|
-
const isLastParameter =
|
|
217706
|
+
iterateFunctionParametersPath(path, (parameterPath, index2) => {
|
|
217707
|
+
const isLastParameter = index2 === parameters.length - 1;
|
|
217708
217708
|
if (isLastParameter && functionNode.rest) {
|
|
217709
217709
|
printed.push("...");
|
|
217710
217710
|
}
|
|
@@ -217715,7 +217715,7 @@ ${fromBody}`;
|
|
|
217715
217715
|
printed.push(",");
|
|
217716
217716
|
if (isParametersInTestCall || shouldHugParameters) {
|
|
217717
217717
|
printed.push(" ");
|
|
217718
|
-
} else if (isNextLineEmpty(parameters[
|
|
217718
|
+
} else if (isNextLineEmpty(parameters[index2], options)) {
|
|
217719
217719
|
printed.push(hardline, hardline);
|
|
217720
217720
|
} else {
|
|
217721
217721
|
printed.push(line2);
|
|
@@ -219486,8 +219486,8 @@ ${fromBody}`;
|
|
|
219486
219486
|
} = require_doc();
|
|
219487
219487
|
function conditionalExpressionChainContainsJsx(node) {
|
|
219488
219488
|
const conditionalExpressions = [node];
|
|
219489
|
-
for (let
|
|
219490
|
-
const conditionalExpression = conditionalExpressions[
|
|
219489
|
+
for (let index2 = 0; index2 < conditionalExpressions.length; index2++) {
|
|
219490
|
+
const conditionalExpression = conditionalExpressions[index2];
|
|
219491
219491
|
for (const property of ["test", "consequent", "alternate"]) {
|
|
219492
219492
|
const node2 = conditionalExpression[property];
|
|
219493
219493
|
if (isJsxNode(node2)) {
|
|
@@ -219611,7 +219611,7 @@ ${fromBody}`;
|
|
|
219611
219611
|
const parts = [];
|
|
219612
219612
|
const isClassBody = node.type === "ClassBody";
|
|
219613
219613
|
const lastStatement = getLastStatement(node[property]);
|
|
219614
|
-
path.each((path2,
|
|
219614
|
+
path.each((path2, index2, statements) => {
|
|
219615
219615
|
const node2 = path2.getValue();
|
|
219616
219616
|
if (node2.type === "EmptyStatement") {
|
|
219617
219617
|
return;
|
|
@@ -219628,7 +219628,7 @@ ${fromBody}`;
|
|
|
219628
219628
|
} else {
|
|
219629
219629
|
parts.push(printed);
|
|
219630
219630
|
}
|
|
219631
|
-
if (!options.semi && isClassBody && isClassProperty(node2) && shouldPrintSemicolonAfterClassProperty(node2, statements[
|
|
219631
|
+
if (!options.semi && isClassBody && isClassProperty(node2) && shouldPrintSemicolonAfterClassProperty(node2, statements[index2 + 1])) {
|
|
219632
219632
|
parts.push(";");
|
|
219633
219633
|
}
|
|
219634
219634
|
if (node2 !== lastStatement) {
|
|
@@ -219827,9 +219827,9 @@ ${fromBody}`;
|
|
|
219827
219827
|
}
|
|
219828
219828
|
const parts = [];
|
|
219829
219829
|
if (nodeHasDirectives) {
|
|
219830
|
-
path.each((childPath,
|
|
219830
|
+
path.each((childPath, index2, directives) => {
|
|
219831
219831
|
parts.push(print());
|
|
219832
|
-
if (
|
|
219832
|
+
if (index2 < directives.length - 1 || nodeHasBody || nodeHasComment) {
|
|
219833
219833
|
parts.push(hardline);
|
|
219834
219834
|
if (isNextLineEmpty(childPath.getValue(), options)) {
|
|
219835
219835
|
parts.push(hardline);
|
|
@@ -220266,7 +220266,7 @@ ${fromBody}`;
|
|
|
220266
220266
|
}
|
|
220267
220267
|
function printIndentableBlockComment(comment) {
|
|
220268
220268
|
const lines2 = comment.value.split("\n");
|
|
220269
|
-
return ["/*", join3(hardline, lines2.map((line2,
|
|
220269
|
+
return ["/*", join3(hardline, lines2.map((line2, index2) => index2 === 0 ? line2.trimEnd() : " " + (index2 < lines2.length - 1 ? line2.trim() : line2.trimStart()))), "*/"];
|
|
220270
220270
|
}
|
|
220271
220271
|
module22.exports = {
|
|
220272
220272
|
printComment
|
|
@@ -220687,8 +220687,8 @@ ${fromBody}`;
|
|
|
220687
220687
|
const parent = path.getParentNode(0);
|
|
220688
220688
|
if (parent.type === "ExpressionStatement" || parent.type === "ForStatement") {
|
|
220689
220689
|
const parts2 = [];
|
|
220690
|
-
path.each((expressionPath,
|
|
220691
|
-
if (
|
|
220690
|
+
path.each((expressionPath, index2) => {
|
|
220691
|
+
if (index2 === 0) {
|
|
220692
220692
|
parts2.push(print());
|
|
220693
220693
|
} else {
|
|
220694
220694
|
parts2.push(",", indent([line2, print()]));
|
|
@@ -220819,9 +220819,9 @@ ${fromBody}`;
|
|
|
220819
220819
|
}
|
|
220820
220820
|
return ["catch ", print("body")];
|
|
220821
220821
|
case "SwitchStatement":
|
|
220822
|
-
return [group(["switch (", indent([softline, print("discriminant")]), softline, ")"]), " {", node.cases.length > 0 ? indent([hardline, join3(hardline, path.map((casePath,
|
|
220822
|
+
return [group(["switch (", indent([softline, print("discriminant")]), softline, ")"]), " {", node.cases.length > 0 ? indent([hardline, join3(hardline, path.map((casePath, index2, cases) => {
|
|
220823
220823
|
const caseNode = casePath.getValue();
|
|
220824
|
-
return [print(),
|
|
220824
|
+
return [print(), index2 !== cases.length - 1 && isNextLineEmpty(caseNode, options) ? hardline : ""];
|
|
220825
220825
|
}, "cases"))]) : "", hardline, "}"];
|
|
220826
220826
|
case "SwitchCase": {
|
|
220827
220827
|
if (node.test) {
|
|
@@ -220988,9 +220988,9 @@ ${fromBody}`;
|
|
|
220988
220988
|
return newNode.argument;
|
|
220989
220989
|
}
|
|
220990
220990
|
if (type === "ArrayExpression") {
|
|
220991
|
-
for (const [
|
|
220991
|
+
for (const [index2, element] of node.elements.entries()) {
|
|
220992
220992
|
if (element === null) {
|
|
220993
|
-
newNode.elements.splice(
|
|
220993
|
+
newNode.elements.splice(index2, 0, {
|
|
220994
220994
|
type: "NullLiteral"
|
|
220995
220995
|
});
|
|
220996
220996
|
}
|
|
@@ -221510,10 +221510,10 @@ ${fromBody}`;
|
|
|
221510
221510
|
delete newObj.value;
|
|
221511
221511
|
}
|
|
221512
221512
|
if (ast.type === "value-comma_group") {
|
|
221513
|
-
const
|
|
221514
|
-
if (
|
|
221515
|
-
newObj.groups[
|
|
221516
|
-
newObj.groups.splice(
|
|
221513
|
+
const index2 = ast.groups.findIndex((node) => node.type === "value-number" && node.unit === "...");
|
|
221514
|
+
if (index2 !== -1) {
|
|
221515
|
+
newObj.groups[index2].unit = "";
|
|
221516
|
+
newObj.groups.splice(index2 + 1, 0, {
|
|
221517
221517
|
type: "value-word",
|
|
221518
221518
|
value: "...",
|
|
221519
221519
|
isColor: false,
|
|
@@ -221824,11 +221824,11 @@ ${fromBody}`;
|
|
|
221824
221824
|
const {
|
|
221825
221825
|
groups
|
|
221826
221826
|
} = parentNode;
|
|
221827
|
-
const
|
|
221828
|
-
if (
|
|
221827
|
+
const index2 = groups.indexOf(node);
|
|
221828
|
+
if (index2 === -1) {
|
|
221829
221829
|
return false;
|
|
221830
221830
|
}
|
|
221831
|
-
return isColonNode(groups[
|
|
221831
|
+
return isColonNode(groups[index2 + 1]);
|
|
221832
221832
|
}
|
|
221833
221833
|
function isMediaAndSupportsKeywords(node) {
|
|
221834
221834
|
return node.value && ["not", "and", "or"].includes(node.value.toLowerCase());
|
|
@@ -221919,11 +221919,11 @@ ${fromBody}`;
|
|
|
221919
221919
|
"src/utils/line-column-to-index.js"(exports2, module22) {
|
|
221920
221920
|
"use strict";
|
|
221921
221921
|
module22.exports = function(lineColumn, text8) {
|
|
221922
|
-
let
|
|
221922
|
+
let index2 = 0;
|
|
221923
221923
|
for (let i = 0; i < lineColumn.line - 1; ++i) {
|
|
221924
|
-
|
|
221924
|
+
index2 = text8.indexOf("\n", index2) + 1;
|
|
221925
221925
|
}
|
|
221926
|
-
return
|
|
221926
|
+
return index2 + lineColumn.column;
|
|
221927
221927
|
};
|
|
221928
221928
|
}
|
|
221929
221929
|
});
|
|
@@ -222396,8 +222396,8 @@ ${fromBody}`;
|
|
|
222396
222396
|
}
|
|
222397
222397
|
case "selector-tag": {
|
|
222398
222398
|
const parentNode = path.getParentNode();
|
|
222399
|
-
const
|
|
222400
|
-
const prevNode =
|
|
222399
|
+
const index2 = parentNode && parentNode.nodes.indexOf(node);
|
|
222400
|
+
const prevNode = index2 && parentNode.nodes[index2 - 1];
|
|
222401
222401
|
return [node.namespace ? [node.namespace === true ? "" : node.namespace.trim(), "|"] : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isKeyframeAtRuleKeywords(path, node.value) ? node.value.toLowerCase() : node.value)];
|
|
222402
222402
|
}
|
|
222403
222403
|
case "selector-id": {
|
|
@@ -222624,9 +222624,9 @@ ${fromBody}`;
|
|
|
222624
222624
|
const isConfiguration = isConfigurationNode(node, parentNode);
|
|
222625
222625
|
const shouldBreak = isConfiguration || isSCSSMapItem && !isKey;
|
|
222626
222626
|
const shouldDedent = isConfiguration || isKey;
|
|
222627
|
-
const printed = group([node.open ? print("open") : "", indent([softline, join3([line2], path.map((childPath,
|
|
222627
|
+
const printed = group([node.open ? print("open") : "", indent([softline, join3([line2], path.map((childPath, index2) => {
|
|
222628
222628
|
const child = childPath.getValue();
|
|
222629
|
-
const isLast =
|
|
222629
|
+
const isLast = index2 === node.groups.length - 1;
|
|
222630
222630
|
const printed2 = [print(), isLast ? "" : ","];
|
|
222631
222631
|
if (isKeyValuePairNode(child) && child.type === "value-comma_group" && child.groups && child.groups[0].type !== "value-paren_group" && child.groups[2] && child.groups[2].type === "value-paren_group") {
|
|
222632
222632
|
const parts = getDocParts(printed2[0].contents.contents);
|
|
@@ -222665,8 +222665,8 @@ ${fromBody}`;
|
|
|
222665
222665
|
}
|
|
222666
222666
|
case "value-colon": {
|
|
222667
222667
|
const parentNode = path.getParentNode();
|
|
222668
|
-
const
|
|
222669
|
-
const prevNode =
|
|
222668
|
+
const index2 = parentNode && parentNode.groups.indexOf(node);
|
|
222669
|
+
const prevNode = index2 && parentNode.groups[index2 - 1];
|
|
222670
222670
|
return [node.value, prevNode && typeof prevNode.value === "string" && getLast(prevNode.value) === "\\" || insideValueFunctionNode(path, "url") ? "" : line2];
|
|
222671
222671
|
}
|
|
222672
222672
|
case "value-comma": {
|
|
@@ -222952,8 +222952,8 @@ ${fromBody}`;
|
|
|
222952
222952
|
const node = path.getValue();
|
|
222953
222953
|
const parentNode = (_path$getParentNode2 = path.getParentNode(0)) !== null && _path$getParentNode2 !== void 0 ? _path$getParentNode2 : {};
|
|
222954
222954
|
const children = (_ref7 = (_ref8 = (_parentNode$children = parentNode.children) !== null && _parentNode$children !== void 0 ? _parentNode$children : parentNode.body) !== null && _ref8 !== void 0 ? _ref8 : parentNode.parts) !== null && _ref7 !== void 0 ? _ref7 : [];
|
|
222955
|
-
const
|
|
222956
|
-
return
|
|
222955
|
+
const index2 = children.indexOf(node);
|
|
222956
|
+
return index2 !== -1 && children[index2 + offset3];
|
|
222957
222957
|
}
|
|
222958
222958
|
function getPreviousNode(path, lookBack = 1) {
|
|
222959
222959
|
return getSiblingNode(path, -lookBack);
|
|
@@ -223243,8 +223243,8 @@ ${fromBody}`;
|
|
|
223243
223243
|
const attributes2 = types4.flatMap((type) => node[type]).sort(sortByLoc);
|
|
223244
223244
|
for (const attributeType of types4) {
|
|
223245
223245
|
path.each((attributePath) => {
|
|
223246
|
-
const
|
|
223247
|
-
attributes2.splice(
|
|
223246
|
+
const index2 = attributes2.indexOf(attributePath.getValue());
|
|
223247
|
+
attributes2.splice(index2, 1, [line2, print2()]);
|
|
223248
223248
|
}, attributeType);
|
|
223249
223249
|
}
|
|
223250
223250
|
if (isNonEmptyArray(node.blockParams)) {
|
|
@@ -223415,13 +223415,13 @@ ${fromBody}`;
|
|
|
223415
223415
|
return [quote, stringLiteral.replace(regex, `\\${quote}`), quote];
|
|
223416
223416
|
}
|
|
223417
223417
|
function needsOppositeQuote(path) {
|
|
223418
|
-
let
|
|
223419
|
-
let parentNode = path.getParentNode(
|
|
223418
|
+
let index2 = 0;
|
|
223419
|
+
let parentNode = path.getParentNode(index2);
|
|
223420
223420
|
while (parentNode && isNodeOfSomeType(parentNode, ["SubExpression"])) {
|
|
223421
|
-
|
|
223422
|
-
parentNode = path.getParentNode(
|
|
223421
|
+
index2++;
|
|
223422
|
+
parentNode = path.getParentNode(index2);
|
|
223423
223423
|
}
|
|
223424
|
-
if (parentNode && isNodeOfSomeType(path.getParentNode(
|
|
223424
|
+
if (parentNode && isNodeOfSomeType(path.getParentNode(index2 + 1), ["ConcatStatement"]) && isNodeOfSomeType(path.getParentNode(index2 + 2), ["AttrNode"])) {
|
|
223425
223425
|
return true;
|
|
223426
223426
|
}
|
|
223427
223427
|
return false;
|
|
@@ -223587,9 +223587,9 @@ ${fromBody}`;
|
|
|
223587
223587
|
switch (node.kind) {
|
|
223588
223588
|
case "Document": {
|
|
223589
223589
|
const parts = [];
|
|
223590
|
-
path.each((pathChild,
|
|
223590
|
+
path.each((pathChild, index2, definitions) => {
|
|
223591
223591
|
parts.push(print());
|
|
223592
|
-
if (
|
|
223592
|
+
if (index2 !== definitions.length - 1) {
|
|
223593
223593
|
parts.push(hardline);
|
|
223594
223594
|
if (isNextLineEmpty(options.originalText, pathChild.getValue(), locEnd)) {
|
|
223595
223595
|
parts.push(hardline);
|
|
@@ -223733,9 +223733,9 @@ ${fromBody}`;
|
|
|
223733
223733
|
return [" ", group(indent([softline, printed]))];
|
|
223734
223734
|
}
|
|
223735
223735
|
function printSequence(path, options, print, property) {
|
|
223736
|
-
return path.map((path2,
|
|
223736
|
+
return path.map((path2, index2, sequence) => {
|
|
223737
223737
|
const printed = print();
|
|
223738
|
-
if (
|
|
223738
|
+
if (index2 < sequence.length - 1 && isNextLineEmpty(options.originalText, path2.getValue(), locEnd)) {
|
|
223739
223739
|
return [printed, hardline];
|
|
223740
223740
|
}
|
|
223741
223741
|
return printed;
|
|
@@ -223758,10 +223758,10 @@ ${fromBody}`;
|
|
|
223758
223758
|
interfaces
|
|
223759
223759
|
} = node;
|
|
223760
223760
|
const printed = path.map((node2) => print(node2), "interfaces");
|
|
223761
|
-
for (let
|
|
223762
|
-
const interfaceNode = interfaces[
|
|
223763
|
-
parts.push(printed[
|
|
223764
|
-
const nextInterfaceNode = interfaces[
|
|
223761
|
+
for (let index2 = 0; index2 < interfaces.length; index2++) {
|
|
223762
|
+
const interfaceNode = interfaces[index2];
|
|
223763
|
+
parts.push(printed[index2]);
|
|
223764
|
+
const nextInterfaceNode = interfaces[index2 + 1];
|
|
223765
223765
|
if (nextInterfaceNode) {
|
|
223766
223766
|
const textBetween = options.originalText.slice(interfaceNode.loc.end, nextInterfaceNode.loc.start);
|
|
223767
223767
|
const hasComment = textBetween.includes("#");
|
|
@@ -223898,15 +223898,15 @@ ${fromBody}`;
|
|
|
223898
223898
|
const nodes = [];
|
|
223899
223899
|
const tokens = (options.proseWrap === "preserve" ? text8 : text8.replace(new RegExp(`(${cjkPattern})
|
|
223900
223900
|
(${cjkPattern})`, "g"), "$1$2")).split(/([\t\n ]+)/);
|
|
223901
|
-
for (const [
|
|
223902
|
-
if (
|
|
223901
|
+
for (const [index2, token] of tokens.entries()) {
|
|
223902
|
+
if (index2 % 2 === 1) {
|
|
223903
223903
|
nodes.push({
|
|
223904
223904
|
type: "whitespace",
|
|
223905
223905
|
value: /\n/.test(token) ? "\n" : " "
|
|
223906
223906
|
});
|
|
223907
223907
|
continue;
|
|
223908
223908
|
}
|
|
223909
|
-
if ((
|
|
223909
|
+
if ((index2 === 0 || index2 === tokens.length - 1) && token === "") {
|
|
223910
223910
|
continue;
|
|
223911
223911
|
}
|
|
223912
223912
|
const innerTokens = token.split(new RegExp(`(${cjkPattern})`));
|
|
@@ -223996,8 +223996,8 @@ ${fromBody}`;
|
|
|
223996
223996
|
return value;
|
|
223997
223997
|
}
|
|
223998
223998
|
function mapAst(ast, handler) {
|
|
223999
|
-
return function preorder(node,
|
|
224000
|
-
const newNode = Object.assign({}, handler(node,
|
|
223999
|
+
return function preorder(node, index2, parentStack) {
|
|
224000
|
+
const newNode = Object.assign({}, handler(node, index2, parentStack));
|
|
224001
224001
|
if (newNode.children) {
|
|
224002
224002
|
newNode.children = newNode.children.map((child, index22) => preorder(child, index22, [newNode, ...parentStack]));
|
|
224003
224003
|
}
|
|
@@ -224205,7 +224205,7 @@ ${extracted.content}`;
|
|
|
224205
224205
|
}));
|
|
224206
224206
|
}
|
|
224207
224207
|
function splitTextIntoSentences(ast, options) {
|
|
224208
|
-
return mapAst(ast, (node,
|
|
224208
|
+
return mapAst(ast, (node, index2, [parentNode]) => {
|
|
224209
224209
|
if (node.type !== "text") {
|
|
224210
224210
|
return node;
|
|
224211
224211
|
}
|
|
@@ -224213,10 +224213,10 @@ ${extracted.content}`;
|
|
|
224213
224213
|
value
|
|
224214
224214
|
} = node;
|
|
224215
224215
|
if (parentNode.type === "paragraph") {
|
|
224216
|
-
if (
|
|
224216
|
+
if (index2 === 0) {
|
|
224217
224217
|
value = value.trimStart();
|
|
224218
224218
|
}
|
|
224219
|
-
if (
|
|
224219
|
+
if (index2 === parentNode.children.length - 1) {
|
|
224220
224220
|
value = value.trimEnd();
|
|
224221
224221
|
}
|
|
224222
224222
|
}
|
|
@@ -224228,7 +224228,7 @@ ${extracted.content}`;
|
|
|
224228
224228
|
});
|
|
224229
224229
|
}
|
|
224230
224230
|
function transformIndentedCodeblockAndMarkItsParentList(ast, options) {
|
|
224231
|
-
return mapAst(ast, (node,
|
|
224231
|
+
return mapAst(ast, (node, index2, parentStack) => {
|
|
224232
224232
|
if (node.type === "code") {
|
|
224233
224233
|
const isIndented = /^\n?(?: {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset));
|
|
224234
224234
|
node.isIndented = isIndented;
|
|
@@ -224248,7 +224248,7 @@ ${extracted.content}`;
|
|
|
224248
224248
|
});
|
|
224249
224249
|
}
|
|
224250
224250
|
function markAlignedList(ast, options) {
|
|
224251
|
-
return mapAst(ast, (node,
|
|
224251
|
+
return mapAst(ast, (node, index2, parentStack) => {
|
|
224252
224252
|
if (node.type === "list" && node.children.length > 0) {
|
|
224253
224253
|
for (let i = 0; i < parentStack.length; i++) {
|
|
224254
224254
|
const parent = parentStack[i];
|
|
@@ -224415,17 +224415,17 @@ ${extracted.content}`;
|
|
|
224415
224415
|
return printChildren(path, options, print);
|
|
224416
224416
|
case "word": {
|
|
224417
224417
|
let escapedValue = node.value.replace(/\*/g, "\\$&").replace(new RegExp([`(^|${punctuationPattern})(_+)`, `(_+)(${punctuationPattern}|$)`].join("|"), "g"), (_, text1, underscore1, underscore2, text22) => (underscore1 ? `${text1}${underscore1}` : `${underscore2}${text22}`).replace(/_/g, "\\_"));
|
|
224418
|
-
const isFirstSentence = (node2, name2,
|
|
224419
|
-
const isLastChildAutolink = (node2, name2,
|
|
224420
|
-
if (escapedValue !== node.value && (path.match(void 0, isFirstSentence, isLastChildAutolink) || path.match(void 0, isFirstSentence, (node2, name2,
|
|
224418
|
+
const isFirstSentence = (node2, name2, index2) => node2.type === "sentence" && index2 === 0;
|
|
224419
|
+
const isLastChildAutolink = (node2, name2, index2) => isAutolink(node2.children[index2 - 1]);
|
|
224420
|
+
if (escapedValue !== node.value && (path.match(void 0, isFirstSentence, isLastChildAutolink) || path.match(void 0, isFirstSentence, (node2, name2, index2) => node2.type === "emphasis" && index2 === 0, isLastChildAutolink))) {
|
|
224421
224421
|
escapedValue = escapedValue.replace(/^(\\?[*_])+/, (prefix) => prefix.replace(/\\/g, ""));
|
|
224422
224422
|
}
|
|
224423
224423
|
return escapedValue;
|
|
224424
224424
|
}
|
|
224425
224425
|
case "whitespace": {
|
|
224426
224426
|
const parentNode = path.getParentNode();
|
|
224427
|
-
const
|
|
224428
|
-
const nextNode = parentNode.children[
|
|
224427
|
+
const index2 = parentNode.children.indexOf(node);
|
|
224428
|
+
const nextNode = parentNode.children[index2 + 1];
|
|
224429
224429
|
const proseWrap = nextNode && /^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(nextNode.value) ? "never" : options.proseWrap;
|
|
224430
224430
|
return printLine(path, node.value, {
|
|
224431
224431
|
proseWrap
|
|
@@ -224437,9 +224437,9 @@ ${extracted.content}`;
|
|
|
224437
224437
|
style = options.originalText[node.position.start.offset];
|
|
224438
224438
|
} else {
|
|
224439
224439
|
const parentNode = path.getParentNode();
|
|
224440
|
-
const
|
|
224441
|
-
const prevNode = parentNode.children[
|
|
224442
|
-
const nextNode = parentNode.children[
|
|
224440
|
+
const index2 = parentNode.children.indexOf(node);
|
|
224441
|
+
const prevNode = parentNode.children[index2 - 1];
|
|
224442
|
+
const nextNode = parentNode.children[index2 + 1];
|
|
224443
224443
|
const hasPrevOrNextWord = prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && getLast(prevNode.children).type === "word" && !getLast(prevNode.children).hasTrailingPunctuation || nextNode && nextNode.type === "sentence" && nextNode.children.length > 0 && nextNode.children[0].type === "word" && !nextNode.children[0].hasLeadingPunctuation;
|
|
224444
224444
|
style = hasPrevOrNextWord || getAncestorNode(path, "emphasis") ? "*" : "_";
|
|
224445
224445
|
}
|
|
@@ -224501,7 +224501,7 @@ ${extracted.content}`;
|
|
|
224501
224501
|
const nthSiblingIndex = getNthListSiblingIndex(node, path.getParentNode());
|
|
224502
224502
|
const isGitDiffFriendlyOrderedList = hasGitDiffFriendlyOrderedList(node, options);
|
|
224503
224503
|
return printChildren(path, options, print, {
|
|
224504
|
-
processor: (childPath,
|
|
224504
|
+
processor: (childPath, index2) => {
|
|
224505
224505
|
const prefix = getPrefix();
|
|
224506
224506
|
const childNode = childPath.getValue();
|
|
224507
224507
|
if (childNode.children.length === 2 && childNode.children[1].type === "html" && childNode.children[0].position.start.column !== childNode.children[1].position.start.column) {
|
|
@@ -224509,7 +224509,7 @@ ${extracted.content}`;
|
|
|
224509
224509
|
}
|
|
224510
224510
|
return [prefix, align(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))];
|
|
224511
224511
|
function getPrefix() {
|
|
224512
|
-
const rawPrefix = node.ordered ? (
|
|
224512
|
+
const rawPrefix = node.ordered ? (index2 === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index2) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* ";
|
|
224513
224513
|
return node.isAligned || node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix;
|
|
224514
224514
|
}
|
|
224515
224515
|
}
|
|
@@ -224544,7 +224544,7 @@ ${extracted.content}`;
|
|
|
224544
224544
|
const nextNode = path.getParentNode().children[path.getName() + 1];
|
|
224545
224545
|
const shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line);
|
|
224546
224546
|
return ["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren(path, options, print) : group([align(" ".repeat(4), printChildren(path, options, print, {
|
|
224547
|
-
processor: (childPath,
|
|
224547
|
+
processor: (childPath, index2) => index2 === 0 ? group([softline, print()]) : print()
|
|
224548
224548
|
})), nextNode && nextNode.type === "footnoteDefinition" ? softline : ""])];
|
|
224549
224549
|
}
|
|
224550
224550
|
case "table":
|
|
@@ -224576,8 +224576,8 @@ ${extracted.content}`;
|
|
|
224576
224576
|
const node = path.getValue();
|
|
224577
224577
|
const prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] ";
|
|
224578
224578
|
return [prefix, printChildren(path, options, print, {
|
|
224579
|
-
processor: (childPath,
|
|
224580
|
-
if (
|
|
224579
|
+
processor: (childPath, index2) => {
|
|
224580
|
+
if (index2 === 0 && childPath.getValue().type !== "list") {
|
|
224581
224581
|
return align(" ".repeat(prefix.length), print());
|
|
224582
224582
|
}
|
|
224583
224583
|
const alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3));
|
|
@@ -224597,15 +224597,15 @@ ${extracted.content}`;
|
|
|
224597
224597
|
return getNthSiblingIndex(node, parentNode, (siblingNode) => siblingNode.ordered === node.ordered);
|
|
224598
224598
|
}
|
|
224599
224599
|
function getNthSiblingIndex(node, parentNode, condition) {
|
|
224600
|
-
let
|
|
224600
|
+
let index2 = -1;
|
|
224601
224601
|
for (const childNode of parentNode.children) {
|
|
224602
224602
|
if (childNode.type === node.type && condition(childNode)) {
|
|
224603
|
-
|
|
224603
|
+
index2++;
|
|
224604
224604
|
} else {
|
|
224605
|
-
|
|
224605
|
+
index2 = -1;
|
|
224606
224606
|
}
|
|
224607
224607
|
if (childNode === node) {
|
|
224608
|
-
return
|
|
224608
|
+
return index2;
|
|
224609
224609
|
}
|
|
224610
224610
|
}
|
|
224611
224611
|
}
|
|
@@ -224657,8 +224657,8 @@ ${extracted.content}`;
|
|
|
224657
224657
|
return join3(hardlineWithoutBreakParent, parts);
|
|
224658
224658
|
}
|
|
224659
224659
|
function printAlign(isCompact) {
|
|
224660
|
-
const align2 = columnMaxWidths.map((width,
|
|
224661
|
-
const align3 = node.align[
|
|
224660
|
+
const align2 = columnMaxWidths.map((width, index2) => {
|
|
224661
|
+
const align3 = node.align[index2];
|
|
224662
224662
|
const first = align3 === "center" || align3 === "left" ? ":" : "-";
|
|
224663
224663
|
const last = align3 === "center" || align3 === "right" ? ":" : "-";
|
|
224664
224664
|
const middle = isCompact ? "-" : "-".repeat(width - 2);
|
|
@@ -224694,12 +224694,12 @@ ${extracted.content}`;
|
|
|
224694
224694
|
const {
|
|
224695
224695
|
children
|
|
224696
224696
|
} = path.getValue();
|
|
224697
|
-
for (const [
|
|
224697
|
+
for (const [index2, childNode] of children.entries()) {
|
|
224698
224698
|
switch (isPrettierIgnore(childNode)) {
|
|
224699
224699
|
case "start":
|
|
224700
224700
|
if (ignoreStart === null) {
|
|
224701
224701
|
ignoreStart = {
|
|
224702
|
-
index:
|
|
224702
|
+
index: index2,
|
|
224703
224703
|
offset: childNode.position.end.offset
|
|
224704
224704
|
};
|
|
224705
224705
|
}
|
|
@@ -224709,7 +224709,7 @@ ${extracted.content}`;
|
|
|
224709
224709
|
ignoreRanges.push({
|
|
224710
224710
|
start: ignoreStart,
|
|
224711
224711
|
end: {
|
|
224712
|
-
index:
|
|
224712
|
+
index: index2,
|
|
224713
224713
|
offset: childNode.position.start.offset
|
|
224714
224714
|
}
|
|
224715
224715
|
});
|
|
@@ -224721,16 +224721,16 @@ ${extracted.content}`;
|
|
|
224721
224721
|
}
|
|
224722
224722
|
}
|
|
224723
224723
|
return printChildren(path, options, print, {
|
|
224724
|
-
processor: (childPath,
|
|
224724
|
+
processor: (childPath, index2) => {
|
|
224725
224725
|
if (ignoreRanges.length > 0) {
|
|
224726
224726
|
const ignoreRange = ignoreRanges[0];
|
|
224727
|
-
if (
|
|
224727
|
+
if (index2 === ignoreRange.start.index) {
|
|
224728
224728
|
return [children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value];
|
|
224729
224729
|
}
|
|
224730
|
-
if (ignoreRange.start.index <
|
|
224730
|
+
if (ignoreRange.start.index < index2 && index2 < ignoreRange.end.index) {
|
|
224731
224731
|
return false;
|
|
224732
224732
|
}
|
|
224733
|
-
if (
|
|
224733
|
+
if (index2 === ignoreRange.end.index) {
|
|
224734
224734
|
ignoreRanges.shift();
|
|
224735
224735
|
return false;
|
|
224736
224736
|
}
|
|
@@ -224747,9 +224747,9 @@ ${extracted.content}`;
|
|
|
224747
224747
|
const node = path.getValue();
|
|
224748
224748
|
const parts = [];
|
|
224749
224749
|
let lastChildNode;
|
|
224750
|
-
path.each((childPath,
|
|
224750
|
+
path.each((childPath, index2) => {
|
|
224751
224751
|
const childNode = childPath.getValue();
|
|
224752
|
-
const result = processor(childPath,
|
|
224752
|
+
const result = processor(childPath, index2);
|
|
224753
224753
|
if (result !== false) {
|
|
224754
224754
|
const data3 = {
|
|
224755
224755
|
parts,
|
|
@@ -224854,11 +224854,11 @@ ${extracted.content}`;
|
|
|
224854
224854
|
return value < min ? min : value > max ? max : value;
|
|
224855
224855
|
}
|
|
224856
224856
|
function hasPrettierIgnore(path) {
|
|
224857
|
-
const
|
|
224858
|
-
if (
|
|
224857
|
+
const index2 = Number(path.getName());
|
|
224858
|
+
if (index2 === 0) {
|
|
224859
224859
|
return false;
|
|
224860
224860
|
}
|
|
224861
|
-
const prevNode = path.getParentNode().children[
|
|
224861
|
+
const prevNode = path.getParentNode().children[index2 - 1];
|
|
224862
224862
|
return isPrettierIgnore(prevNode) === "next";
|
|
224863
224863
|
}
|
|
224864
224864
|
module22.exports = {
|
|
@@ -225732,12 +225732,12 @@ ${extracted.content}`;
|
|
|
225732
225732
|
}
|
|
225733
225733
|
function utf8Encode(str) {
|
|
225734
225734
|
let encoded = "";
|
|
225735
|
-
for (let
|
|
225736
|
-
let codePoint = str.charCodeAt(
|
|
225737
|
-
if (codePoint >= 55296 && codePoint <= 56319 && str.length >
|
|
225738
|
-
const low = str.charCodeAt(
|
|
225735
|
+
for (let index2 = 0; index2 < str.length; index2++) {
|
|
225736
|
+
let codePoint = str.charCodeAt(index2);
|
|
225737
|
+
if (codePoint >= 55296 && codePoint <= 56319 && str.length > index2 + 1) {
|
|
225738
|
+
const low = str.charCodeAt(index2 + 1);
|
|
225739
225739
|
if (low >= 56320 && low <= 57343) {
|
|
225740
|
-
|
|
225740
|
+
index2++;
|
|
225741
225741
|
codePoint = (codePoint - 55296 << 10) + low - 56320 + 65536;
|
|
225742
225742
|
}
|
|
225743
225743
|
}
|
|
@@ -226676,10 +226676,10 @@ ${extracted.content}`;
|
|
|
226676
226676
|
child.isLeadingSpaceSensitive = isLeadingSpaceSensitiveNode(child, options);
|
|
226677
226677
|
child.isTrailingSpaceSensitive = isTrailingSpaceSensitiveNode(child, options);
|
|
226678
226678
|
}
|
|
226679
|
-
for (let
|
|
226680
|
-
const child = children[
|
|
226681
|
-
child.isLeadingSpaceSensitive =
|
|
226682
|
-
child.isTrailingSpaceSensitive =
|
|
226679
|
+
for (let index2 = 0; index2 < children.length; index2++) {
|
|
226680
|
+
const child = children[index2];
|
|
226681
|
+
child.isLeadingSpaceSensitive = index2 === 0 ? child.isLeadingSpaceSensitive : child.prev.isTrailingSpaceSensitive && child.isLeadingSpaceSensitive;
|
|
226682
|
+
child.isTrailingSpaceSensitive = index2 === children.length - 1 ? child.isTrailingSpaceSensitive : child.next.isLeadingSpaceSensitive && child.isTrailingSpaceSensitive;
|
|
226683
226683
|
}
|
|
226684
226684
|
});
|
|
226685
226685
|
}
|
|
@@ -227119,16 +227119,16 @@ ${extracted.content}`;
|
|
|
227119
227119
|
const maxUrlLength = getMax(urls.map((url) => url.length));
|
|
227120
227120
|
const descriptors = srcset.map((src) => src[key]).map((descriptor) => descriptor ? descriptor.toString() : "");
|
|
227121
227121
|
const descriptorLeftLengths = descriptors.map((descriptor) => {
|
|
227122
|
-
const
|
|
227123
|
-
return
|
|
227122
|
+
const index2 = descriptor.indexOf(".");
|
|
227123
|
+
return index2 === -1 ? descriptor.length : index2;
|
|
227124
227124
|
});
|
|
227125
227125
|
const maxDescriptorLeftLength = getMax(descriptorLeftLengths);
|
|
227126
|
-
return join3([",", line2], urls.map((url,
|
|
227126
|
+
return join3([",", line2], urls.map((url, index2) => {
|
|
227127
227127
|
const parts = [url];
|
|
227128
|
-
const descriptor = descriptors[
|
|
227128
|
+
const descriptor = descriptors[index2];
|
|
227129
227129
|
if (descriptor) {
|
|
227130
227130
|
const urlPadding = maxUrlLength - url.length + 1;
|
|
227131
|
-
const descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[
|
|
227131
|
+
const descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[index2];
|
|
227132
227132
|
const alignment = " ".repeat(urlPadding + descriptorPadding);
|
|
227133
227133
|
parts.push(ifBreak(alignment, " "), descriptor + unit);
|
|
227134
227134
|
}
|
|
@@ -227192,7 +227192,7 @@ ${extracted.content}`;
|
|
|
227192
227192
|
res.alias = alias;
|
|
227193
227193
|
}
|
|
227194
227194
|
const left = [res.alias, res.iterator1, res.iterator2];
|
|
227195
|
-
if (left.some((part,
|
|
227195
|
+
if (left.some((part, index2) => !part && (index2 === 0 || left.slice(index2 + 1).some(Boolean)))) {
|
|
227196
227196
|
return;
|
|
227197
227197
|
}
|
|
227198
227198
|
return {
|
|
@@ -227388,8 +227388,8 @@ ${extracted.content}`;
|
|
|
227388
227388
|
const value = getValue();
|
|
227389
227389
|
if (interpolationRegex.test(value)) {
|
|
227390
227390
|
const parts = [];
|
|
227391
|
-
for (const [
|
|
227392
|
-
if (
|
|
227391
|
+
for (const [index2, part] of value.split(interpolationRegex).entries()) {
|
|
227392
|
+
if (index2 % 2 === 0) {
|
|
227393
227393
|
parts.push(replaceTextEndOfLine(part));
|
|
227394
227394
|
} else {
|
|
227395
227395
|
try {
|
|
@@ -228131,11 +228131,11 @@ ${text8}`;
|
|
|
228131
228131
|
return parts;
|
|
228132
228132
|
}
|
|
228133
228133
|
function getFlowScalarLineContents(nodeType, content4, options) {
|
|
228134
|
-
const rawLineContents = content4.split("\n").map((lineContent,
|
|
228134
|
+
const rawLineContents = content4.split("\n").map((lineContent, index2, lineContents) => index2 === 0 && index2 === lineContents.length - 1 ? lineContent : index2 !== 0 && index2 !== lineContents.length - 1 ? lineContent.trim() : index2 === 0 ? lineContent.trimEnd() : lineContent.trimStart());
|
|
228135
228135
|
if (options.proseWrap === "preserve") {
|
|
228136
228136
|
return rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : [lineContent]);
|
|
228137
228137
|
}
|
|
228138
|
-
return rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords,
|
|
228138
|
+
return rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords, index2) => index2 !== 0 && rawLineContents[index2 - 1].length > 0 && lineContentWords.length > 0 && !(nodeType === "quoteDouble" && getLast(getLast(reduced)).endsWith("\\")) ? [...reduced.slice(0, -1), [...getLast(reduced), ...lineContentWords]] : [...reduced, lineContentWords], []).map((lineContentWords) => options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords);
|
|
228139
228139
|
}
|
|
228140
228140
|
function getBlockValueLineContents(node, {
|
|
228141
228141
|
parentIndent,
|
|
@@ -228154,7 +228154,7 @@ ${text8}`;
|
|
|
228154
228154
|
if (options.proseWrap === "preserve" || node.type === "blockLiteral") {
|
|
228155
228155
|
return removeUnnecessaryTrailingNewlines(rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : [lineContent]));
|
|
228156
228156
|
}
|
|
228157
|
-
return removeUnnecessaryTrailingNewlines(rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords,
|
|
228157
|
+
return removeUnnecessaryTrailingNewlines(rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords, index2) => index2 !== 0 && rawLineContents[index2 - 1].length > 0 && lineContentWords.length > 0 && !/^\s/.test(lineContentWords[0]) && !/^\s|\s$/.test(getLast(reduced)) ? [...reduced.slice(0, -1), [...getLast(reduced), ...lineContentWords]] : [...reduced, lineContentWords], []).map((lineContentWords) => lineContentWords.reduce((reduced, word) => reduced.length > 0 && /\s$/.test(getLast(reduced)) ? [...reduced.slice(0, -1), getLast(reduced) + " " + word] : [...reduced, word], [])).map((lineContentWords) => options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords));
|
|
228158
228158
|
function removeUnnecessaryTrailingNewlines(lineContents) {
|
|
228159
228159
|
if (node.chomping === "keep") {
|
|
228160
228160
|
return getLast(lineContents).length === 0 ? lineContents.slice(0, -1) : lineContents;
|
|
@@ -228324,7 +228324,7 @@ ${text8}`;
|
|
|
228324
228324
|
}
|
|
228325
228325
|
function printChildren(path, print, options) {
|
|
228326
228326
|
const node = path.getValue();
|
|
228327
|
-
const parts = path.map((childPath,
|
|
228327
|
+
const parts = path.map((childPath, index2) => [print(), index2 === node.children.length - 1 ? "" : [",", line2, node.children[index2].position.start.line !== node.children[index2 + 1].position.start.line ? printNextEmptyLine(childPath, options.originalText) : ""]], "children");
|
|
228328
228328
|
return parts;
|
|
228329
228329
|
}
|
|
228330
228330
|
module22.exports = {
|
|
@@ -228507,12 +228507,12 @@ ${text8}`;
|
|
|
228507
228507
|
options
|
|
228508
228508
|
});
|
|
228509
228509
|
const contentsParts = [];
|
|
228510
|
-
for (const [
|
|
228511
|
-
if (
|
|
228510
|
+
for (const [index2, lineWords] of lineContents.entries()) {
|
|
228511
|
+
if (index2 === 0) {
|
|
228512
228512
|
contentsParts.push(hardline);
|
|
228513
228513
|
}
|
|
228514
228514
|
contentsParts.push(fill(getDocParts(join3(line2, lineWords))));
|
|
228515
|
-
if (
|
|
228515
|
+
if (index2 !== lineContents.length - 1) {
|
|
228516
228516
|
contentsParts.push(lineWords.length === 0 ? hardline : markAsRoot(literalline));
|
|
228517
228517
|
} else if (node.chomping === "keep" && isLastDescendant) {
|
|
228518
228518
|
contentsParts.push(dedentToRoot(lineWords.length === 0 ? hardline : literalline));
|
|
@@ -228637,10 +228637,10 @@ ${text8}`;
|
|
|
228637
228637
|
children
|
|
228638
228638
|
} = node;
|
|
228639
228639
|
const parts = [];
|
|
228640
|
-
path.each((childPath,
|
|
228641
|
-
const document6 = children[
|
|
228642
|
-
const nextDocument = children[
|
|
228643
|
-
if (
|
|
228640
|
+
path.each((childPath, index2) => {
|
|
228641
|
+
const document6 = children[index2];
|
|
228642
|
+
const nextDocument = children[index2 + 1];
|
|
228643
|
+
if (index2 !== 0) {
|
|
228644
228644
|
parts.push(hardline);
|
|
228645
228645
|
}
|
|
228646
228646
|
parts.push(print());
|
|
@@ -229071,14 +229071,14 @@ function trough() {
|
|
|
229071
229071
|
next(null, ...values2);
|
|
229072
229072
|
function next(error, ...output) {
|
|
229073
229073
|
const fn = fns[++middlewareIndex];
|
|
229074
|
-
let
|
|
229074
|
+
let index2 = -1;
|
|
229075
229075
|
if (error) {
|
|
229076
229076
|
callback(error);
|
|
229077
229077
|
return;
|
|
229078
229078
|
}
|
|
229079
|
-
while (++
|
|
229080
|
-
if (output[
|
|
229081
|
-
output[
|
|
229079
|
+
while (++index2 < values2.length) {
|
|
229080
|
+
if (output[index2] === null || output[index2] === void 0) {
|
|
229081
|
+
output[index2] = values2[index2];
|
|
229082
229082
|
}
|
|
229083
229083
|
}
|
|
229084
229084
|
values2 = output;
|
|
@@ -229157,8 +229157,8 @@ function stringifyPosition(value) {
|
|
|
229157
229157
|
}
|
|
229158
229158
|
return "";
|
|
229159
229159
|
}
|
|
229160
|
-
function point(
|
|
229161
|
-
return index(
|
|
229160
|
+
function point(point3) {
|
|
229161
|
+
return index(point3 && point3.line) + ":" + index(point3 && point3.column);
|
|
229162
229162
|
}
|
|
229163
229163
|
function position(pos) {
|
|
229164
229164
|
return point(pos && pos.start) + "-" + point(pos && pos.end);
|
|
@@ -229171,7 +229171,7 @@ function index(value) {
|
|
|
229171
229171
|
var VFileMessage = class extends Error {
|
|
229172
229172
|
constructor(reason, place, origin) {
|
|
229173
229173
|
const parts = [null, null];
|
|
229174
|
-
let
|
|
229174
|
+
let position2 = {
|
|
229175
229175
|
start: { line: null, column: null },
|
|
229176
229176
|
end: { line: null, column: null }
|
|
229177
229177
|
};
|
|
@@ -229181,23 +229181,23 @@ var VFileMessage = class extends Error {
|
|
|
229181
229181
|
place = void 0;
|
|
229182
229182
|
}
|
|
229183
229183
|
if (typeof origin === "string") {
|
|
229184
|
-
const
|
|
229185
|
-
if (
|
|
229184
|
+
const index2 = origin.indexOf(":");
|
|
229185
|
+
if (index2 === -1) {
|
|
229186
229186
|
parts[1] = origin;
|
|
229187
229187
|
} else {
|
|
229188
|
-
parts[0] = origin.slice(0,
|
|
229189
|
-
parts[1] = origin.slice(
|
|
229188
|
+
parts[0] = origin.slice(0, index2);
|
|
229189
|
+
parts[1] = origin.slice(index2 + 1);
|
|
229190
229190
|
}
|
|
229191
229191
|
}
|
|
229192
229192
|
if (place) {
|
|
229193
229193
|
if ("type" in place || "position" in place) {
|
|
229194
229194
|
if (place.position) {
|
|
229195
|
-
|
|
229195
|
+
position2 = place.position;
|
|
229196
229196
|
}
|
|
229197
229197
|
} else if ("start" in place || "end" in place) {
|
|
229198
|
-
|
|
229198
|
+
position2 = place;
|
|
229199
229199
|
} else if ("line" in place || "column" in place) {
|
|
229200
|
-
|
|
229200
|
+
position2.start = place;
|
|
229201
229201
|
}
|
|
229202
229202
|
}
|
|
229203
229203
|
this.name = stringifyPosition(place) || "1:1";
|
|
@@ -229208,9 +229208,9 @@ var VFileMessage = class extends Error {
|
|
|
229208
229208
|
}
|
|
229209
229209
|
this.reason = this.message;
|
|
229210
229210
|
this.fatal;
|
|
229211
|
-
this.line =
|
|
229212
|
-
this.column =
|
|
229213
|
-
this.position =
|
|
229211
|
+
this.line = position2.start.line;
|
|
229212
|
+
this.column = position2.start.column;
|
|
229213
|
+
this.position = position2;
|
|
229214
229214
|
this.source = parts[0];
|
|
229215
229215
|
this.ruleId = parts[1];
|
|
229216
229216
|
this.file;
|
|
@@ -229268,9 +229268,9 @@ var VFile = class {
|
|
|
229268
229268
|
this.stored;
|
|
229269
229269
|
this.result;
|
|
229270
229270
|
this.map;
|
|
229271
|
-
let
|
|
229272
|
-
while (++
|
|
229273
|
-
const prop2 = order[
|
|
229271
|
+
let index2 = -1;
|
|
229272
|
+
while (++index2 < order.length) {
|
|
229273
|
+
const prop2 = order[index2];
|
|
229274
229274
|
if (prop2 in options && options[prop2] !== void 0) {
|
|
229275
229275
|
this[prop2] = prop2 === "history" ? [...options[prop2]] : options[prop2];
|
|
229276
229276
|
}
|
|
@@ -229398,9 +229398,9 @@ function base() {
|
|
|
229398
229398
|
return processor;
|
|
229399
229399
|
function processor() {
|
|
229400
229400
|
const destination = base();
|
|
229401
|
-
let
|
|
229402
|
-
while (++
|
|
229403
|
-
destination.use(...attachers[
|
|
229401
|
+
let index2 = -1;
|
|
229402
|
+
while (++index2 < attachers.length) {
|
|
229403
|
+
destination.use(...attachers[index2]);
|
|
229404
229404
|
}
|
|
229405
229405
|
destination.data((0, import_extend.default)(true, {}, namespace));
|
|
229406
229406
|
return destination;
|
|
@@ -229482,11 +229482,11 @@ function base() {
|
|
|
229482
229482
|
}
|
|
229483
229483
|
}
|
|
229484
229484
|
function addList(plugins) {
|
|
229485
|
-
let
|
|
229485
|
+
let index2 = -1;
|
|
229486
229486
|
if (plugins === null || plugins === void 0) {
|
|
229487
229487
|
} else if (Array.isArray(plugins)) {
|
|
229488
|
-
while (++
|
|
229489
|
-
const thing = plugins[
|
|
229488
|
+
while (++index2 < plugins.length) {
|
|
229489
|
+
const thing = plugins[index2];
|
|
229490
229490
|
add(thing);
|
|
229491
229491
|
}
|
|
229492
229492
|
} else {
|
|
@@ -229494,11 +229494,11 @@ function base() {
|
|
|
229494
229494
|
}
|
|
229495
229495
|
}
|
|
229496
229496
|
function addPlugin(plugin, value2) {
|
|
229497
|
-
let
|
|
229497
|
+
let index2 = -1;
|
|
229498
229498
|
let entry;
|
|
229499
|
-
while (++
|
|
229500
|
-
if (attachers[
|
|
229501
|
-
entry = attachers[
|
|
229499
|
+
while (++index2 < attachers.length) {
|
|
229500
|
+
if (attachers[index2][0] === plugin) {
|
|
229501
|
+
entry = attachers[index2];
|
|
229502
229502
|
break;
|
|
229503
229503
|
}
|
|
229504
229504
|
}
|
|
@@ -229683,9 +229683,9 @@ function one(node, includeImageAlt) {
|
|
|
229683
229683
|
}
|
|
229684
229684
|
function all(values2, includeImageAlt) {
|
|
229685
229685
|
var result = [];
|
|
229686
|
-
var
|
|
229687
|
-
while (++
|
|
229688
|
-
result[
|
|
229686
|
+
var index2 = -1;
|
|
229687
|
+
while (++index2 < values2.length) {
|
|
229688
|
+
result[index2] = one(values2[index2], includeImageAlt);
|
|
229689
229689
|
}
|
|
229690
229690
|
return result.join("");
|
|
229691
229691
|
}
|
|
@@ -229729,9 +229729,9 @@ function push(list3, items) {
|
|
|
229729
229729
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
229730
229730
|
function combineExtensions(extensions) {
|
|
229731
229731
|
const all2 = {};
|
|
229732
|
-
let
|
|
229733
|
-
while (++
|
|
229734
|
-
syntaxExtension(all2, extensions[
|
|
229732
|
+
let index2 = -1;
|
|
229733
|
+
while (++index2 < extensions.length) {
|
|
229734
|
+
syntaxExtension(all2, extensions[index2]);
|
|
229735
229735
|
}
|
|
229736
229736
|
return all2;
|
|
229737
229737
|
}
|
|
@@ -229754,11 +229754,11 @@ function syntaxExtension(all2, extension3) {
|
|
|
229754
229754
|
}
|
|
229755
229755
|
}
|
|
229756
229756
|
function constructs(existing, list3) {
|
|
229757
|
-
let
|
|
229757
|
+
let index2 = -1;
|
|
229758
229758
|
const before = [];
|
|
229759
|
-
while (++
|
|
229759
|
+
while (++index2 < list3.length) {
|
|
229760
229760
|
;
|
|
229761
|
-
(list3[
|
|
229761
|
+
(list3[index2].add === "after" ? existing : before).push(list3[index2]);
|
|
229762
229762
|
}
|
|
229763
229763
|
splice(existing, 0, 0, before);
|
|
229764
229764
|
}
|
|
@@ -229906,18 +229906,18 @@ function initializeDocument(effects) {
|
|
|
229906
229906
|
}
|
|
229907
229907
|
const indexBeforeExits = self2.events.length;
|
|
229908
229908
|
let indexBeforeFlow = indexBeforeExits;
|
|
229909
|
-
let
|
|
229909
|
+
let point3;
|
|
229910
229910
|
while (indexBeforeFlow--) {
|
|
229911
229911
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
229912
|
-
|
|
229912
|
+
point3 = self2.events[indexBeforeFlow][1].end;
|
|
229913
229913
|
break;
|
|
229914
229914
|
}
|
|
229915
229915
|
}
|
|
229916
229916
|
exitContainers(continued);
|
|
229917
|
-
let
|
|
229918
|
-
while (
|
|
229919
|
-
self2.events[
|
|
229920
|
-
|
|
229917
|
+
let index2 = indexBeforeExits;
|
|
229918
|
+
while (index2 < self2.events.length) {
|
|
229919
|
+
self2.events[index2][1].end = Object.assign({}, point3);
|
|
229920
|
+
index2++;
|
|
229921
229921
|
}
|
|
229922
229922
|
splice(
|
|
229923
229923
|
self2.events,
|
|
@@ -229925,7 +229925,7 @@ function initializeDocument(effects) {
|
|
|
229925
229925
|
0,
|
|
229926
229926
|
self2.events.slice(indexBeforeExits)
|
|
229927
229927
|
);
|
|
229928
|
-
self2.events.length =
|
|
229928
|
+
self2.events.length = index2;
|
|
229929
229929
|
return checkNewContainers(code2);
|
|
229930
229930
|
}
|
|
229931
229931
|
return start3(code2);
|
|
@@ -230017,30 +230017,30 @@ function initializeDocument(effects) {
|
|
|
230017
230017
|
childFlow.defineSkip(token.start);
|
|
230018
230018
|
childFlow.write(stream);
|
|
230019
230019
|
if (self2.parser.lazy[token.start.line]) {
|
|
230020
|
-
let
|
|
230021
|
-
while (
|
|
230022
|
-
if (childFlow.events[
|
|
230020
|
+
let index2 = childFlow.events.length;
|
|
230021
|
+
while (index2--) {
|
|
230022
|
+
if (childFlow.events[index2][1].start.offset < lineStartOffset && (!childFlow.events[index2][1].end || childFlow.events[index2][1].end.offset > lineStartOffset)) {
|
|
230023
230023
|
return;
|
|
230024
230024
|
}
|
|
230025
230025
|
}
|
|
230026
230026
|
const indexBeforeExits = self2.events.length;
|
|
230027
230027
|
let indexBeforeFlow = indexBeforeExits;
|
|
230028
230028
|
let seen;
|
|
230029
|
-
let
|
|
230029
|
+
let point3;
|
|
230030
230030
|
while (indexBeforeFlow--) {
|
|
230031
230031
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
230032
230032
|
if (seen) {
|
|
230033
|
-
|
|
230033
|
+
point3 = self2.events[indexBeforeFlow][1].end;
|
|
230034
230034
|
break;
|
|
230035
230035
|
}
|
|
230036
230036
|
seen = true;
|
|
230037
230037
|
}
|
|
230038
230038
|
}
|
|
230039
230039
|
exitContainers(continued);
|
|
230040
|
-
|
|
230041
|
-
while (
|
|
230042
|
-
self2.events[
|
|
230043
|
-
|
|
230040
|
+
index2 = indexBeforeExits;
|
|
230041
|
+
while (index2 < self2.events.length) {
|
|
230042
|
+
self2.events[index2][1].end = Object.assign({}, point3);
|
|
230043
|
+
index2++;
|
|
230044
230044
|
}
|
|
230045
230045
|
splice(
|
|
230046
230046
|
self2.events,
|
|
@@ -230048,13 +230048,13 @@ function initializeDocument(effects) {
|
|
|
230048
230048
|
0,
|
|
230049
230049
|
self2.events.slice(indexBeforeExits)
|
|
230050
230050
|
);
|
|
230051
|
-
self2.events.length =
|
|
230051
|
+
self2.events.length = index2;
|
|
230052
230052
|
}
|
|
230053
230053
|
}
|
|
230054
230054
|
function exitContainers(size) {
|
|
230055
|
-
let
|
|
230056
|
-
while (
|
|
230057
|
-
const entry = stack[
|
|
230055
|
+
let index2 = stack.length;
|
|
230056
|
+
while (index2-- > size) {
|
|
230057
|
+
const entry = stack[index2];
|
|
230058
230058
|
self2.containerState = entry[1];
|
|
230059
230059
|
entry[0].exit.call(self2, effects);
|
|
230060
230060
|
}
|
|
@@ -230089,9 +230089,9 @@ function classifyCharacter(code2) {
|
|
|
230089
230089
|
// ../../../node_modules/.pnpm/micromark-util-resolve-all@1.0.0/node_modules/micromark-util-resolve-all/index.js
|
|
230090
230090
|
function resolveAll(constructs2, events, context) {
|
|
230091
230091
|
const called = [];
|
|
230092
|
-
let
|
|
230093
|
-
while (++
|
|
230094
|
-
const resolve = constructs2[
|
|
230092
|
+
let index2 = -1;
|
|
230093
|
+
while (++index2 < constructs2.length) {
|
|
230094
|
+
const resolve = constructs2[index2].resolveAll;
|
|
230095
230095
|
if (resolve && !called.includes(resolve)) {
|
|
230096
230096
|
events = resolve(events, context);
|
|
230097
230097
|
called.push(resolve);
|
|
@@ -230107,7 +230107,7 @@ var attention = {
|
|
|
230107
230107
|
resolveAll: resolveAllAttention
|
|
230108
230108
|
};
|
|
230109
230109
|
function resolveAllAttention(events, context) {
|
|
230110
|
-
let
|
|
230110
|
+
let index2 = -1;
|
|
230111
230111
|
let open;
|
|
230112
230112
|
let group;
|
|
230113
230113
|
let text8;
|
|
@@ -230116,17 +230116,17 @@ function resolveAllAttention(events, context) {
|
|
|
230116
230116
|
let use;
|
|
230117
230117
|
let nextEvents;
|
|
230118
230118
|
let offset3;
|
|
230119
|
-
while (++
|
|
230120
|
-
if (events[
|
|
230121
|
-
open =
|
|
230119
|
+
while (++index2 < events.length) {
|
|
230120
|
+
if (events[index2][0] === "enter" && events[index2][1].type === "attentionSequence" && events[index2][1]._close) {
|
|
230121
|
+
open = index2;
|
|
230122
230122
|
while (open--) {
|
|
230123
|
-
if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[
|
|
230124
|
-
if ((events[open][1]._close || events[
|
|
230123
|
+
if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index2][1]).charCodeAt(0)) {
|
|
230124
|
+
if ((events[open][1]._close || events[index2][1]._open) && (events[index2][1].end.offset - events[index2][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index2][1].end.offset - events[index2][1].start.offset) % 3)) {
|
|
230125
230125
|
continue;
|
|
230126
230126
|
}
|
|
230127
|
-
use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[
|
|
230127
|
+
use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index2][1].end.offset - events[index2][1].start.offset > 1 ? 2 : 1;
|
|
230128
230128
|
const start3 = Object.assign({}, events[open][1].end);
|
|
230129
|
-
const end = Object.assign({}, events[
|
|
230129
|
+
const end = Object.assign({}, events[index2][1].start);
|
|
230130
230130
|
movePoint(start3, -use);
|
|
230131
230131
|
movePoint(end, use);
|
|
230132
230132
|
openingSequence = {
|
|
@@ -230136,13 +230136,13 @@ function resolveAllAttention(events, context) {
|
|
|
230136
230136
|
};
|
|
230137
230137
|
closingSequence = {
|
|
230138
230138
|
type: use > 1 ? "strongSequence" : "emphasisSequence",
|
|
230139
|
-
start: Object.assign({}, events[
|
|
230139
|
+
start: Object.assign({}, events[index2][1].start),
|
|
230140
230140
|
end
|
|
230141
230141
|
};
|
|
230142
230142
|
text8 = {
|
|
230143
230143
|
type: use > 1 ? "strongText" : "emphasisText",
|
|
230144
230144
|
start: Object.assign({}, events[open][1].end),
|
|
230145
|
-
end: Object.assign({}, events[
|
|
230145
|
+
end: Object.assign({}, events[index2][1].start)
|
|
230146
230146
|
};
|
|
230147
230147
|
group = {
|
|
230148
230148
|
type: use > 1 ? "strong" : "emphasis",
|
|
@@ -230150,7 +230150,7 @@ function resolveAllAttention(events, context) {
|
|
|
230150
230150
|
end: Object.assign({}, closingSequence.end)
|
|
230151
230151
|
};
|
|
230152
230152
|
events[open][1].end = Object.assign({}, openingSequence.start);
|
|
230153
|
-
events[
|
|
230153
|
+
events[index2][1].start = Object.assign({}, closingSequence.end);
|
|
230154
230154
|
nextEvents = [];
|
|
230155
230155
|
if (events[open][1].end.offset - events[open][1].start.offset) {
|
|
230156
230156
|
nextEvents = push(nextEvents, [
|
|
@@ -230168,7 +230168,7 @@ function resolveAllAttention(events, context) {
|
|
|
230168
230168
|
nextEvents,
|
|
230169
230169
|
resolveAll(
|
|
230170
230170
|
context.parser.constructs.insideSpan.null,
|
|
230171
|
-
events.slice(open + 1,
|
|
230171
|
+
events.slice(open + 1, index2),
|
|
230172
230172
|
context
|
|
230173
230173
|
)
|
|
230174
230174
|
);
|
|
@@ -230178,26 +230178,26 @@ function resolveAllAttention(events, context) {
|
|
|
230178
230178
|
["exit", closingSequence, context],
|
|
230179
230179
|
["exit", group, context]
|
|
230180
230180
|
]);
|
|
230181
|
-
if (events[
|
|
230181
|
+
if (events[index2][1].end.offset - events[index2][1].start.offset) {
|
|
230182
230182
|
offset3 = 2;
|
|
230183
230183
|
nextEvents = push(nextEvents, [
|
|
230184
|
-
["enter", events[
|
|
230185
|
-
["exit", events[
|
|
230184
|
+
["enter", events[index2][1], context],
|
|
230185
|
+
["exit", events[index2][1], context]
|
|
230186
230186
|
]);
|
|
230187
230187
|
} else {
|
|
230188
230188
|
offset3 = 0;
|
|
230189
230189
|
}
|
|
230190
|
-
splice(events, open - 1,
|
|
230191
|
-
|
|
230190
|
+
splice(events, open - 1, index2 - open + 3, nextEvents);
|
|
230191
|
+
index2 = open + nextEvents.length - offset3 - 2;
|
|
230192
230192
|
break;
|
|
230193
230193
|
}
|
|
230194
230194
|
}
|
|
230195
230195
|
}
|
|
230196
230196
|
}
|
|
230197
|
-
|
|
230198
|
-
while (++
|
|
230199
|
-
if (events[
|
|
230200
|
-
events[
|
|
230197
|
+
index2 = -1;
|
|
230198
|
+
while (++index2 < events.length) {
|
|
230199
|
+
if (events[index2][1].type === "attentionSequence") {
|
|
230200
|
+
events[index2][1].type = "data";
|
|
230201
230201
|
}
|
|
230202
230202
|
}
|
|
230203
230203
|
return events;
|
|
@@ -230227,10 +230227,10 @@ function tokenizeAttention(effects, ok3) {
|
|
|
230227
230227
|
return ok3(code2);
|
|
230228
230228
|
}
|
|
230229
230229
|
}
|
|
230230
|
-
function movePoint(
|
|
230231
|
-
|
|
230232
|
-
|
|
230233
|
-
|
|
230230
|
+
function movePoint(point3, offset3) {
|
|
230231
|
+
point3.column += offset3;
|
|
230232
|
+
point3.offset += offset3;
|
|
230233
|
+
point3._bufferIndex += offset3;
|
|
230234
230234
|
}
|
|
230235
230235
|
|
|
230236
230236
|
// ../../../node_modules/.pnpm/micromark-core-commonmark@1.0.6/node_modules/micromark-core-commonmark/lib/autolink.js
|
|
@@ -232855,12 +232855,12 @@ var codeText = {
|
|
|
232855
232855
|
function resolveCodeText(events) {
|
|
232856
232856
|
let tailExitIndex = events.length - 4;
|
|
232857
232857
|
let headEnterIndex = 3;
|
|
232858
|
-
let
|
|
232858
|
+
let index2;
|
|
232859
232859
|
let enter;
|
|
232860
232860
|
if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
|
|
232861
|
-
|
|
232862
|
-
while (++
|
|
232863
|
-
if (events[
|
|
232861
|
+
index2 = headEnterIndex;
|
|
232862
|
+
while (++index2 < tailExitIndex) {
|
|
232863
|
+
if (events[index2][1].type === "codeTextData") {
|
|
232864
232864
|
events[headEnterIndex][1].type = "codeTextPadding";
|
|
232865
232865
|
events[tailExitIndex][1].type = "codeTextPadding";
|
|
232866
232866
|
headEnterIndex += 2;
|
|
@@ -232869,20 +232869,20 @@ function resolveCodeText(events) {
|
|
|
232869
232869
|
}
|
|
232870
232870
|
}
|
|
232871
232871
|
}
|
|
232872
|
-
|
|
232872
|
+
index2 = headEnterIndex - 1;
|
|
232873
232873
|
tailExitIndex++;
|
|
232874
|
-
while (++
|
|
232874
|
+
while (++index2 <= tailExitIndex) {
|
|
232875
232875
|
if (enter === void 0) {
|
|
232876
|
-
if (
|
|
232877
|
-
enter =
|
|
232876
|
+
if (index2 !== tailExitIndex && events[index2][1].type !== "lineEnding") {
|
|
232877
|
+
enter = index2;
|
|
232878
232878
|
}
|
|
232879
|
-
} else if (
|
|
232879
|
+
} else if (index2 === tailExitIndex || events[index2][1].type === "lineEnding") {
|
|
232880
232880
|
events[enter][1].type = "codeTextData";
|
|
232881
|
-
if (
|
|
232882
|
-
events[enter][1].end = events[
|
|
232883
|
-
events.splice(enter + 2,
|
|
232884
|
-
tailExitIndex -=
|
|
232885
|
-
|
|
232881
|
+
if (index2 !== enter + 2) {
|
|
232882
|
+
events[enter][1].end = events[index2 - 1][1].end;
|
|
232883
|
+
events.splice(enter + 2, index2 - enter - 2);
|
|
232884
|
+
tailExitIndex -= index2 - enter - 2;
|
|
232885
|
+
index2 = enter + 2;
|
|
232886
232886
|
}
|
|
232887
232887
|
enter = void 0;
|
|
232888
232888
|
}
|
|
@@ -232963,7 +232963,7 @@ function tokenizeCodeText(effects, ok3, nok) {
|
|
|
232963
232963
|
// ../../../node_modules/.pnpm/micromark-util-subtokenize@1.0.2/node_modules/micromark-util-subtokenize/index.js
|
|
232964
232964
|
function subtokenize(events) {
|
|
232965
232965
|
const jumps = {};
|
|
232966
|
-
let
|
|
232966
|
+
let index2 = -1;
|
|
232967
232967
|
let event;
|
|
232968
232968
|
let lineIndex;
|
|
232969
232969
|
let otherIndex;
|
|
@@ -232971,12 +232971,12 @@ function subtokenize(events) {
|
|
|
232971
232971
|
let parameters;
|
|
232972
232972
|
let subevents;
|
|
232973
232973
|
let more;
|
|
232974
|
-
while (++
|
|
232975
|
-
while (
|
|
232976
|
-
|
|
232974
|
+
while (++index2 < events.length) {
|
|
232975
|
+
while (index2 in jumps) {
|
|
232976
|
+
index2 = jumps[index2];
|
|
232977
232977
|
}
|
|
232978
|
-
event = events[
|
|
232979
|
-
if (
|
|
232978
|
+
event = events[index2];
|
|
232979
|
+
if (index2 && event[1].type === "chunkFlow" && events[index2 - 1][1].type === "listItemPrefix") {
|
|
232980
232980
|
subevents = event[1]._tokenizer.events;
|
|
232981
232981
|
otherIndex = 0;
|
|
232982
232982
|
if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") {
|
|
@@ -232996,12 +232996,12 @@ function subtokenize(events) {
|
|
|
232996
232996
|
}
|
|
232997
232997
|
if (event[0] === "enter") {
|
|
232998
232998
|
if (event[1].contentType) {
|
|
232999
|
-
Object.assign(jumps, subcontent(events,
|
|
233000
|
-
|
|
232999
|
+
Object.assign(jumps, subcontent(events, index2));
|
|
233000
|
+
index2 = jumps[index2];
|
|
233001
233001
|
more = true;
|
|
233002
233002
|
}
|
|
233003
233003
|
} else if (event[1]._container) {
|
|
233004
|
-
otherIndex =
|
|
233004
|
+
otherIndex = index2;
|
|
233005
233005
|
lineIndex = void 0;
|
|
233006
233006
|
while (otherIndex--) {
|
|
233007
233007
|
otherEvent = events[otherIndex];
|
|
@@ -233019,9 +233019,9 @@ function subtokenize(events) {
|
|
|
233019
233019
|
}
|
|
233020
233020
|
if (lineIndex) {
|
|
233021
233021
|
event[1].end = Object.assign({}, events[lineIndex][1].start);
|
|
233022
|
-
parameters = events.slice(lineIndex,
|
|
233022
|
+
parameters = events.slice(lineIndex, index2);
|
|
233023
233023
|
parameters.unshift(event);
|
|
233024
|
-
splice(events, lineIndex,
|
|
233024
|
+
splice(events, lineIndex, index2 - lineIndex + 1, parameters);
|
|
233025
233025
|
}
|
|
233026
233026
|
}
|
|
233027
233027
|
}
|
|
@@ -233038,7 +233038,7 @@ function subcontent(events, eventIndex) {
|
|
|
233038
233038
|
const gaps = {};
|
|
233039
233039
|
let stream;
|
|
233040
233040
|
let previous2;
|
|
233041
|
-
let
|
|
233041
|
+
let index2 = -1;
|
|
233042
233042
|
let current3 = token;
|
|
233043
233043
|
let adjust = 0;
|
|
233044
233044
|
let start3 = 0;
|
|
@@ -233067,9 +233067,9 @@ function subcontent(events, eventIndex) {
|
|
|
233067
233067
|
current3 = current3.next;
|
|
233068
233068
|
}
|
|
233069
233069
|
current3 = token;
|
|
233070
|
-
while (++
|
|
233071
|
-
if (childEvents[
|
|
233072
|
-
start3 =
|
|
233070
|
+
while (++index2 < childEvents.length) {
|
|
233071
|
+
if (childEvents[index2][0] === "exit" && childEvents[index2 - 1][0] === "enter" && childEvents[index2][1].type === childEvents[index2 - 1][1].type && childEvents[index2][1].start.line !== childEvents[index2][1].end.line) {
|
|
233072
|
+
start3 = index2 + 1;
|
|
233073
233073
|
breaks.push(start3);
|
|
233074
233074
|
current3._tokenizer = void 0;
|
|
233075
233075
|
current3.previous = void 0;
|
|
@@ -233083,17 +233083,17 @@ function subcontent(events, eventIndex) {
|
|
|
233083
233083
|
} else {
|
|
233084
233084
|
breaks.pop();
|
|
233085
233085
|
}
|
|
233086
|
-
|
|
233087
|
-
while (
|
|
233088
|
-
const slice = childEvents.slice(breaks[
|
|
233086
|
+
index2 = breaks.length;
|
|
233087
|
+
while (index2--) {
|
|
233088
|
+
const slice = childEvents.slice(breaks[index2], breaks[index2 + 1]);
|
|
233089
233089
|
const start4 = startPositions.pop();
|
|
233090
233090
|
jumps.unshift([start4, start4 + slice.length - 1]);
|
|
233091
233091
|
splice(events, start4, 2, slice);
|
|
233092
233092
|
}
|
|
233093
|
-
|
|
233094
|
-
while (++
|
|
233095
|
-
gaps[adjust + jumps[
|
|
233096
|
-
adjust += jumps[
|
|
233093
|
+
index2 = -1;
|
|
233094
|
+
while (++index2 < jumps.length) {
|
|
233095
|
+
gaps[adjust + jumps[index2][0]] = adjust + jumps[index2][1];
|
|
233096
|
+
adjust += jumps[index2][1] - jumps[index2][0] - 1;
|
|
233097
233097
|
}
|
|
233098
233098
|
return gaps;
|
|
233099
233099
|
}
|
|
@@ -233698,16 +233698,16 @@ var nextBlankConstruct = {
|
|
|
233698
233698
|
partial: true
|
|
233699
233699
|
};
|
|
233700
233700
|
function resolveToHtmlFlow(events) {
|
|
233701
|
-
let
|
|
233702
|
-
while (
|
|
233703
|
-
if (events[
|
|
233701
|
+
let index2 = events.length;
|
|
233702
|
+
while (index2--) {
|
|
233703
|
+
if (events[index2][0] === "enter" && events[index2][1].type === "htmlFlow") {
|
|
233704
233704
|
break;
|
|
233705
233705
|
}
|
|
233706
233706
|
}
|
|
233707
|
-
if (
|
|
233708
|
-
events[
|
|
233709
|
-
events[
|
|
233710
|
-
events.splice(
|
|
233707
|
+
if (index2 > 1 && events[index2 - 2][1].type === "linePrefix") {
|
|
233708
|
+
events[index2][1].start = events[index2 - 2][1].start;
|
|
233709
|
+
events[index2 + 1][1].start = events[index2 - 2][1].start;
|
|
233710
|
+
events.splice(index2 - 2, 2);
|
|
233711
233711
|
}
|
|
233712
233712
|
return events;
|
|
233713
233713
|
}
|
|
@@ -233716,7 +233716,7 @@ function tokenizeHtmlFlow(effects, ok3, nok) {
|
|
|
233716
233716
|
let kind;
|
|
233717
233717
|
let startTag;
|
|
233718
233718
|
let buffer2;
|
|
233719
|
-
let
|
|
233719
|
+
let index2;
|
|
233720
233720
|
let marker;
|
|
233721
233721
|
return start3;
|
|
233722
233722
|
function start3(code2) {
|
|
@@ -233757,7 +233757,7 @@ function tokenizeHtmlFlow(effects, ok3, nok) {
|
|
|
233757
233757
|
effects.consume(code2);
|
|
233758
233758
|
kind = 5;
|
|
233759
233759
|
buffer2 = "CDATA[";
|
|
233760
|
-
|
|
233760
|
+
index2 = 0;
|
|
233761
233761
|
return cdataOpenInside;
|
|
233762
233762
|
}
|
|
233763
233763
|
if (asciiAlpha(code2)) {
|
|
@@ -233775,9 +233775,9 @@ function tokenizeHtmlFlow(effects, ok3, nok) {
|
|
|
233775
233775
|
return nok(code2);
|
|
233776
233776
|
}
|
|
233777
233777
|
function cdataOpenInside(code2) {
|
|
233778
|
-
if (code2 === buffer2.charCodeAt(
|
|
233778
|
+
if (code2 === buffer2.charCodeAt(index2++)) {
|
|
233779
233779
|
effects.consume(code2);
|
|
233780
|
-
return
|
|
233780
|
+
return index2 === buffer2.length ? self2.interrupt ? ok3 : continuation : cdataOpenInside;
|
|
233781
233781
|
}
|
|
233782
233782
|
return nok(code2);
|
|
233783
233783
|
}
|
|
@@ -234059,7 +234059,7 @@ function tokenizeHtmlText(effects, ok3, nok) {
|
|
|
234059
234059
|
const self2 = this;
|
|
234060
234060
|
let marker;
|
|
234061
234061
|
let buffer2;
|
|
234062
|
-
let
|
|
234062
|
+
let index2;
|
|
234063
234063
|
let returnState;
|
|
234064
234064
|
return start3;
|
|
234065
234065
|
function start3(code2) {
|
|
@@ -234095,7 +234095,7 @@ function tokenizeHtmlText(effects, ok3, nok) {
|
|
|
234095
234095
|
if (code2 === 91) {
|
|
234096
234096
|
effects.consume(code2);
|
|
234097
234097
|
buffer2 = "CDATA[";
|
|
234098
|
-
|
|
234098
|
+
index2 = 0;
|
|
234099
234099
|
return cdataOpen;
|
|
234100
234100
|
}
|
|
234101
234101
|
if (asciiAlpha(code2)) {
|
|
@@ -234150,9 +234150,9 @@ function tokenizeHtmlText(effects, ok3, nok) {
|
|
|
234150
234150
|
return comment(code2);
|
|
234151
234151
|
}
|
|
234152
234152
|
function cdataOpen(code2) {
|
|
234153
|
-
if (code2 === buffer2.charCodeAt(
|
|
234153
|
+
if (code2 === buffer2.charCodeAt(index2++)) {
|
|
234154
234154
|
effects.consume(code2);
|
|
234155
|
-
return
|
|
234155
|
+
return index2 === buffer2.length ? cdata : cdataOpen;
|
|
234156
234156
|
}
|
|
234157
234157
|
return nok(code2);
|
|
234158
234158
|
}
|
|
@@ -234389,44 +234389,44 @@ var collapsedReferenceConstruct = {
|
|
|
234389
234389
|
tokenize: tokenizeCollapsedReference
|
|
234390
234390
|
};
|
|
234391
234391
|
function resolveAllLabelEnd(events) {
|
|
234392
|
-
let
|
|
234392
|
+
let index2 = -1;
|
|
234393
234393
|
let token;
|
|
234394
|
-
while (++
|
|
234395
|
-
token = events[
|
|
234394
|
+
while (++index2 < events.length) {
|
|
234395
|
+
token = events[index2][1];
|
|
234396
234396
|
if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
|
|
234397
|
-
events.splice(
|
|
234397
|
+
events.splice(index2 + 1, token.type === "labelImage" ? 4 : 2);
|
|
234398
234398
|
token.type = "data";
|
|
234399
|
-
|
|
234399
|
+
index2++;
|
|
234400
234400
|
}
|
|
234401
234401
|
}
|
|
234402
234402
|
return events;
|
|
234403
234403
|
}
|
|
234404
234404
|
function resolveToLabelEnd(events, context) {
|
|
234405
|
-
let
|
|
234405
|
+
let index2 = events.length;
|
|
234406
234406
|
let offset3 = 0;
|
|
234407
234407
|
let token;
|
|
234408
234408
|
let open;
|
|
234409
234409
|
let close;
|
|
234410
234410
|
let media;
|
|
234411
|
-
while (
|
|
234412
|
-
token = events[
|
|
234411
|
+
while (index2--) {
|
|
234412
|
+
token = events[index2][1];
|
|
234413
234413
|
if (open) {
|
|
234414
234414
|
if (token.type === "link" || token.type === "labelLink" && token._inactive) {
|
|
234415
234415
|
break;
|
|
234416
234416
|
}
|
|
234417
|
-
if (events[
|
|
234417
|
+
if (events[index2][0] === "enter" && token.type === "labelLink") {
|
|
234418
234418
|
token._inactive = true;
|
|
234419
234419
|
}
|
|
234420
234420
|
} else if (close) {
|
|
234421
|
-
if (events[
|
|
234422
|
-
open =
|
|
234421
|
+
if (events[index2][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
|
|
234422
|
+
open = index2;
|
|
234423
234423
|
if (token.type !== "labelLink") {
|
|
234424
234424
|
offset3 = 2;
|
|
234425
234425
|
break;
|
|
234426
234426
|
}
|
|
234427
234427
|
}
|
|
234428
234428
|
} else if (token.type === "labelEnd") {
|
|
234429
|
-
close =
|
|
234429
|
+
close = index2;
|
|
234430
234430
|
}
|
|
234431
234431
|
}
|
|
234432
234432
|
const group = {
|
|
@@ -234471,12 +234471,12 @@ function resolveToLabelEnd(events, context) {
|
|
|
234471
234471
|
}
|
|
234472
234472
|
function tokenizeLabelEnd(effects, ok3, nok) {
|
|
234473
234473
|
const self2 = this;
|
|
234474
|
-
let
|
|
234474
|
+
let index2 = self2.events.length;
|
|
234475
234475
|
let labelStart;
|
|
234476
234476
|
let defined;
|
|
234477
|
-
while (
|
|
234478
|
-
if ((self2.events[
|
|
234479
|
-
labelStart = self2.events[
|
|
234477
|
+
while (index2--) {
|
|
234478
|
+
if ((self2.events[index2][1].type === "labelImage" || self2.events[index2][1].type === "labelLink") && !self2.events[index2][1]._balanced) {
|
|
234479
|
+
labelStart = self2.events[index2][1];
|
|
234480
234480
|
break;
|
|
234481
234481
|
}
|
|
234482
234482
|
}
|
|
@@ -234886,25 +234886,25 @@ var setextUnderline = {
|
|
|
234886
234886
|
resolveTo: resolveToSetextUnderline
|
|
234887
234887
|
};
|
|
234888
234888
|
function resolveToSetextUnderline(events, context) {
|
|
234889
|
-
let
|
|
234889
|
+
let index2 = events.length;
|
|
234890
234890
|
let content4;
|
|
234891
234891
|
let text8;
|
|
234892
234892
|
let definition3;
|
|
234893
|
-
while (
|
|
234894
|
-
if (events[
|
|
234895
|
-
if (events[
|
|
234896
|
-
content4 =
|
|
234893
|
+
while (index2--) {
|
|
234894
|
+
if (events[index2][0] === "enter") {
|
|
234895
|
+
if (events[index2][1].type === "content") {
|
|
234896
|
+
content4 = index2;
|
|
234897
234897
|
break;
|
|
234898
234898
|
}
|
|
234899
|
-
if (events[
|
|
234900
|
-
text8 =
|
|
234899
|
+
if (events[index2][1].type === "paragraph") {
|
|
234900
|
+
text8 = index2;
|
|
234901
234901
|
}
|
|
234902
234902
|
} else {
|
|
234903
|
-
if (events[
|
|
234904
|
-
events.splice(
|
|
234903
|
+
if (events[index2][1].type === "content") {
|
|
234904
|
+
events.splice(index2, 1);
|
|
234905
234905
|
}
|
|
234906
|
-
if (!definition3 && events[
|
|
234907
|
-
definition3 =
|
|
234906
|
+
if (!definition3 && events[index2][1].type === "definition") {
|
|
234907
|
+
definition3 = index2;
|
|
234908
234908
|
}
|
|
234909
234909
|
}
|
|
234910
234910
|
}
|
|
@@ -234926,12 +234926,12 @@ function resolveToSetextUnderline(events, context) {
|
|
|
234926
234926
|
}
|
|
234927
234927
|
function tokenizeSetextUnderline(effects, ok3, nok) {
|
|
234928
234928
|
const self2 = this;
|
|
234929
|
-
let
|
|
234929
|
+
let index2 = self2.events.length;
|
|
234930
234930
|
let marker;
|
|
234931
234931
|
let paragraph2;
|
|
234932
|
-
while (
|
|
234933
|
-
if (self2.events[
|
|
234934
|
-
paragraph2 = self2.events[
|
|
234932
|
+
while (index2--) {
|
|
234933
|
+
if (self2.events[index2][1].type !== "lineEnding" && self2.events[index2][1].type !== "linePrefix" && self2.events[index2][1].type !== "content") {
|
|
234934
|
+
paragraph2 = self2.events[index2][1].type === "paragraph";
|
|
234935
234935
|
break;
|
|
234936
234936
|
}
|
|
234937
234937
|
}
|
|
@@ -235053,10 +235053,10 @@ function initializeFactory(field) {
|
|
|
235053
235053
|
return true;
|
|
235054
235054
|
}
|
|
235055
235055
|
const list3 = constructs2[code2];
|
|
235056
|
-
let
|
|
235056
|
+
let index2 = -1;
|
|
235057
235057
|
if (list3) {
|
|
235058
|
-
while (++
|
|
235059
|
-
const item = list3[
|
|
235058
|
+
while (++index2 < list3.length) {
|
|
235059
|
+
const item = list3[index2];
|
|
235060
235060
|
if (!item.previous || item.previous.call(self2, self2.previous)) {
|
|
235061
235061
|
return true;
|
|
235062
235062
|
}
|
|
@@ -235069,19 +235069,19 @@ function initializeFactory(field) {
|
|
|
235069
235069
|
function createResolver(extraResolver) {
|
|
235070
235070
|
return resolveAllText;
|
|
235071
235071
|
function resolveAllText(events, context) {
|
|
235072
|
-
let
|
|
235072
|
+
let index2 = -1;
|
|
235073
235073
|
let enter;
|
|
235074
|
-
while (++
|
|
235074
|
+
while (++index2 <= events.length) {
|
|
235075
235075
|
if (enter === void 0) {
|
|
235076
|
-
if (events[
|
|
235077
|
-
enter =
|
|
235078
|
-
|
|
235076
|
+
if (events[index2] && events[index2][1].type === "data") {
|
|
235077
|
+
enter = index2;
|
|
235078
|
+
index2++;
|
|
235079
235079
|
}
|
|
235080
|
-
} else if (!events[
|
|
235081
|
-
if (
|
|
235082
|
-
events[enter][1].end = events[
|
|
235083
|
-
events.splice(enter + 2,
|
|
235084
|
-
|
|
235080
|
+
} else if (!events[index2] || events[index2][1].type !== "data") {
|
|
235081
|
+
if (index2 !== enter + 2) {
|
|
235082
|
+
events[enter][1].end = events[index2 - 1][1].end;
|
|
235083
|
+
events.splice(enter + 2, index2 - enter - 2);
|
|
235084
|
+
index2 = enter + 2;
|
|
235085
235085
|
}
|
|
235086
235086
|
enter = void 0;
|
|
235087
235087
|
}
|
|
@@ -235095,12 +235095,12 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
235095
235095
|
if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
|
|
235096
235096
|
const data3 = events[eventIndex - 1][1];
|
|
235097
235097
|
const chunks = context.sliceStream(data3);
|
|
235098
|
-
let
|
|
235098
|
+
let index2 = chunks.length;
|
|
235099
235099
|
let bufferIndex = -1;
|
|
235100
235100
|
let size = 0;
|
|
235101
235101
|
let tabs;
|
|
235102
|
-
while (
|
|
235103
|
-
const chunk = chunks[
|
|
235102
|
+
while (index2--) {
|
|
235103
|
+
const chunk = chunks[index2];
|
|
235104
235104
|
if (typeof chunk === "string") {
|
|
235105
235105
|
bufferIndex = chunk.length;
|
|
235106
235106
|
while (chunk.charCodeAt(bufferIndex - 1) === 32) {
|
|
@@ -235115,7 +235115,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
235115
235115
|
size++;
|
|
235116
235116
|
} else if (chunk === -1) {
|
|
235117
235117
|
} else {
|
|
235118
|
-
|
|
235118
|
+
index2++;
|
|
235119
235119
|
break;
|
|
235120
235120
|
}
|
|
235121
235121
|
}
|
|
@@ -235126,8 +235126,8 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
235126
235126
|
line: data3.end.line,
|
|
235127
235127
|
column: data3.end.column - size,
|
|
235128
235128
|
offset: data3.end.offset - size,
|
|
235129
|
-
_index: data3.start._index +
|
|
235130
|
-
_bufferIndex:
|
|
235129
|
+
_index: data3.start._index + index2,
|
|
235130
|
+
_bufferIndex: index2 ? bufferIndex : data3.start._bufferIndex + bufferIndex
|
|
235131
235131
|
},
|
|
235132
235132
|
end: Object.assign({}, data3.end)
|
|
235133
235133
|
};
|
|
@@ -235152,7 +235152,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
235152
235152
|
|
|
235153
235153
|
// ../../../node_modules/.pnpm/micromark@3.0.10/node_modules/micromark/lib/create-tokenizer.js
|
|
235154
235154
|
function createTokenizer(parser, initialize, from) {
|
|
235155
|
-
let
|
|
235155
|
+
let point3 = Object.assign(
|
|
235156
235156
|
from ? Object.assign({}, from) : {
|
|
235157
235157
|
line: 1,
|
|
235158
235158
|
column: 1,
|
|
@@ -235213,7 +235213,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235213
235213
|
return sliceChunks(chunks, token);
|
|
235214
235214
|
}
|
|
235215
235215
|
function now() {
|
|
235216
|
-
return Object.assign({},
|
|
235216
|
+
return Object.assign({}, point3);
|
|
235217
235217
|
}
|
|
235218
235218
|
function defineSkip(value) {
|
|
235219
235219
|
columnStart[value.line] = value.column;
|
|
@@ -235221,15 +235221,15 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235221
235221
|
}
|
|
235222
235222
|
function main() {
|
|
235223
235223
|
let chunkIndex;
|
|
235224
|
-
while (
|
|
235225
|
-
const chunk = chunks[
|
|
235224
|
+
while (point3._index < chunks.length) {
|
|
235225
|
+
const chunk = chunks[point3._index];
|
|
235226
235226
|
if (typeof chunk === "string") {
|
|
235227
|
-
chunkIndex =
|
|
235228
|
-
if (
|
|
235229
|
-
|
|
235227
|
+
chunkIndex = point3._index;
|
|
235228
|
+
if (point3._bufferIndex < 0) {
|
|
235229
|
+
point3._bufferIndex = 0;
|
|
235230
235230
|
}
|
|
235231
|
-
while (
|
|
235232
|
-
go(chunk.charCodeAt(
|
|
235231
|
+
while (point3._index === chunkIndex && point3._bufferIndex < chunk.length) {
|
|
235232
|
+
go(chunk.charCodeAt(point3._bufferIndex));
|
|
235233
235233
|
}
|
|
235234
235234
|
} else {
|
|
235235
235235
|
go(chunk);
|
|
@@ -235243,21 +235243,21 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235243
235243
|
}
|
|
235244
235244
|
function consume(code2) {
|
|
235245
235245
|
if (markdownLineEnding(code2)) {
|
|
235246
|
-
|
|
235247
|
-
|
|
235248
|
-
|
|
235246
|
+
point3.line++;
|
|
235247
|
+
point3.column = 1;
|
|
235248
|
+
point3.offset += code2 === -3 ? 2 : 1;
|
|
235249
235249
|
accountForPotentialSkip();
|
|
235250
235250
|
} else if (code2 !== -1) {
|
|
235251
|
-
|
|
235252
|
-
|
|
235251
|
+
point3.column++;
|
|
235252
|
+
point3.offset++;
|
|
235253
235253
|
}
|
|
235254
|
-
if (
|
|
235255
|
-
|
|
235254
|
+
if (point3._bufferIndex < 0) {
|
|
235255
|
+
point3._index++;
|
|
235256
235256
|
} else {
|
|
235257
|
-
|
|
235258
|
-
if (
|
|
235259
|
-
|
|
235260
|
-
|
|
235257
|
+
point3._bufferIndex++;
|
|
235258
|
+
if (point3._bufferIndex === chunks[point3._index].length) {
|
|
235259
|
+
point3._bufferIndex = -1;
|
|
235260
|
+
point3._index++;
|
|
235261
235261
|
}
|
|
235262
235262
|
}
|
|
235263
235263
|
context.previous = code2;
|
|
@@ -235372,7 +235372,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235372
235372
|
from: startEventsIndex
|
|
235373
235373
|
};
|
|
235374
235374
|
function restore() {
|
|
235375
|
-
|
|
235375
|
+
point3 = startPoint;
|
|
235376
235376
|
context.previous = startPrevious;
|
|
235377
235377
|
context.currentConstruct = startCurrentConstruct;
|
|
235378
235378
|
context.events.length = startEventsIndex;
|
|
@@ -235381,9 +235381,9 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235381
235381
|
}
|
|
235382
235382
|
}
|
|
235383
235383
|
function accountForPotentialSkip() {
|
|
235384
|
-
if (
|
|
235385
|
-
|
|
235386
|
-
|
|
235384
|
+
if (point3.line in columnStart && point3.column < 2) {
|
|
235385
|
+
point3.column = columnStart[point3.line];
|
|
235386
|
+
point3.offset += columnStart[point3.line] - 1;
|
|
235387
235387
|
}
|
|
235388
235388
|
}
|
|
235389
235389
|
}
|
|
@@ -235407,11 +235407,11 @@ function sliceChunks(chunks, token) {
|
|
|
235407
235407
|
return view;
|
|
235408
235408
|
}
|
|
235409
235409
|
function serializeChunks(chunks, expandTabs) {
|
|
235410
|
-
let
|
|
235410
|
+
let index2 = -1;
|
|
235411
235411
|
const result = [];
|
|
235412
235412
|
let atTab;
|
|
235413
|
-
while (++
|
|
235414
|
-
const chunk = chunks[
|
|
235413
|
+
while (++index2 < chunks.length) {
|
|
235414
|
+
const chunk = chunks[index2];
|
|
235415
235415
|
let value;
|
|
235416
235416
|
if (typeof chunk === "string") {
|
|
235417
235417
|
value = chunk;
|
|
@@ -235664,32 +235664,6 @@ function decode($0, $1, $2) {
|
|
|
235664
235664
|
return decodeNamedCharacterReference($2) || $0;
|
|
235665
235665
|
}
|
|
235666
235666
|
|
|
235667
|
-
// ../../../node_modules/.pnpm/unist-util-stringify-position@3.0.2/node_modules/unist-util-stringify-position/index.js
|
|
235668
|
-
function stringifyPosition2(value) {
|
|
235669
|
-
if (!value || typeof value !== "object") {
|
|
235670
|
-
return "";
|
|
235671
|
-
}
|
|
235672
|
-
if ("position" in value || "type" in value) {
|
|
235673
|
-
return position2(value.position);
|
|
235674
|
-
}
|
|
235675
|
-
if ("start" in value || "end" in value) {
|
|
235676
|
-
return position2(value);
|
|
235677
|
-
}
|
|
235678
|
-
if ("line" in value || "column" in value) {
|
|
235679
|
-
return point2(value);
|
|
235680
|
-
}
|
|
235681
|
-
return "";
|
|
235682
|
-
}
|
|
235683
|
-
function point2(point4) {
|
|
235684
|
-
return index2(point4 && point4.line) + ":" + index2(point4 && point4.column);
|
|
235685
|
-
}
|
|
235686
|
-
function position2(pos) {
|
|
235687
|
-
return point2(pos && pos.start) + "-" + point2(pos && pos.end);
|
|
235688
|
-
}
|
|
235689
|
-
function index2(value) {
|
|
235690
|
-
return value && typeof value === "number" ? value : 1;
|
|
235691
|
-
}
|
|
235692
|
-
|
|
235693
235667
|
// ../../../node_modules/.pnpm/mdast-util-from-markdown@1.2.0/node_modules/mdast-util-from-markdown/lib/index.js
|
|
235694
235668
|
var own3 = {}.hasOwnProperty;
|
|
235695
235669
|
var fromMarkdown = function(value, encoding, options) {
|
|
@@ -235831,29 +235805,29 @@ function compiler(options = {}) {
|
|
|
235831
235805
|
setData,
|
|
235832
235806
|
getData
|
|
235833
235807
|
};
|
|
235834
|
-
let
|
|
235835
|
-
while (++
|
|
235836
|
-
if (events[
|
|
235837
|
-
if (events[
|
|
235838
|
-
listStack.push(
|
|
235808
|
+
let index2 = -1;
|
|
235809
|
+
while (++index2 < events.length) {
|
|
235810
|
+
if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
|
|
235811
|
+
if (events[index2][0] === "enter") {
|
|
235812
|
+
listStack.push(index2);
|
|
235839
235813
|
} else {
|
|
235840
235814
|
const tail = listStack.pop();
|
|
235841
|
-
|
|
235815
|
+
index2 = prepareList(events, tail, index2);
|
|
235842
235816
|
}
|
|
235843
235817
|
}
|
|
235844
235818
|
}
|
|
235845
|
-
|
|
235846
|
-
while (++
|
|
235847
|
-
const handler = config[events[
|
|
235848
|
-
if (own3.call(handler, events[
|
|
235849
|
-
handler[events[
|
|
235819
|
+
index2 = -1;
|
|
235820
|
+
while (++index2 < events.length) {
|
|
235821
|
+
const handler = config[events[index2][0]];
|
|
235822
|
+
if (own3.call(handler, events[index2][1].type)) {
|
|
235823
|
+
handler[events[index2][1].type].call(
|
|
235850
235824
|
Object.assign(
|
|
235851
235825
|
{
|
|
235852
|
-
sliceSerialize: events[
|
|
235826
|
+
sliceSerialize: events[index2][2].sliceSerialize
|
|
235853
235827
|
},
|
|
235854
235828
|
context
|
|
235855
235829
|
),
|
|
235856
|
-
events[
|
|
235830
|
+
events[index2][1]
|
|
235857
235831
|
);
|
|
235858
235832
|
}
|
|
235859
235833
|
}
|
|
@@ -235863,14 +235837,14 @@ function compiler(options = {}) {
|
|
|
235863
235837
|
handler.call(context, void 0, tail[0]);
|
|
235864
235838
|
}
|
|
235865
235839
|
tree.position = {
|
|
235866
|
-
start:
|
|
235840
|
+
start: point3(
|
|
235867
235841
|
events.length > 0 ? events[0][1].start : {
|
|
235868
235842
|
line: 1,
|
|
235869
235843
|
column: 1,
|
|
235870
235844
|
offset: 0
|
|
235871
235845
|
}
|
|
235872
235846
|
),
|
|
235873
|
-
end:
|
|
235847
|
+
end: point3(
|
|
235874
235848
|
events.length > 0 ? events[events.length - 2][1].end : {
|
|
235875
235849
|
line: 1,
|
|
235876
235850
|
column: 1,
|
|
@@ -235878,22 +235852,22 @@ function compiler(options = {}) {
|
|
|
235878
235852
|
}
|
|
235879
235853
|
)
|
|
235880
235854
|
};
|
|
235881
|
-
|
|
235882
|
-
while (++
|
|
235883
|
-
tree = config.transforms[
|
|
235855
|
+
index2 = -1;
|
|
235856
|
+
while (++index2 < config.transforms.length) {
|
|
235857
|
+
tree = config.transforms[index2](tree) || tree;
|
|
235884
235858
|
}
|
|
235885
235859
|
return tree;
|
|
235886
235860
|
}
|
|
235887
235861
|
function prepareList(events, start3, length) {
|
|
235888
|
-
let
|
|
235862
|
+
let index2 = start3 - 1;
|
|
235889
235863
|
let containerBalance = -1;
|
|
235890
235864
|
let listSpread = false;
|
|
235891
235865
|
let listItem3;
|
|
235892
235866
|
let lineIndex;
|
|
235893
235867
|
let firstBlankLineIndex;
|
|
235894
235868
|
let atMarker;
|
|
235895
|
-
while (++
|
|
235896
|
-
const event = events[
|
|
235869
|
+
while (++index2 <= length) {
|
|
235870
|
+
const event = events[index2];
|
|
235897
235871
|
if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") {
|
|
235898
235872
|
if (event[0] === "enter") {
|
|
235899
235873
|
containerBalance++;
|
|
@@ -235904,7 +235878,7 @@ function compiler(options = {}) {
|
|
|
235904
235878
|
} else if (event[1].type === "lineEndingBlank") {
|
|
235905
235879
|
if (event[0] === "enter") {
|
|
235906
235880
|
if (listItem3 && !atMarker && !containerBalance && !firstBlankLineIndex) {
|
|
235907
|
-
firstBlankLineIndex =
|
|
235881
|
+
firstBlankLineIndex = index2;
|
|
235908
235882
|
}
|
|
235909
235883
|
atMarker = void 0;
|
|
235910
235884
|
}
|
|
@@ -235914,7 +235888,7 @@ function compiler(options = {}) {
|
|
|
235914
235888
|
}
|
|
235915
235889
|
if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
|
|
235916
235890
|
if (listItem3) {
|
|
235917
|
-
let tailIndex =
|
|
235891
|
+
let tailIndex = index2;
|
|
235918
235892
|
lineIndex = void 0;
|
|
235919
235893
|
while (tailIndex--) {
|
|
235920
235894
|
const tailEvent = events[tailIndex];
|
|
@@ -235939,8 +235913,8 @@ function compiler(options = {}) {
|
|
|
235939
235913
|
{},
|
|
235940
235914
|
lineIndex ? events[lineIndex][1].start : event[1].end
|
|
235941
235915
|
);
|
|
235942
|
-
events.splice(lineIndex ||
|
|
235943
|
-
|
|
235916
|
+
events.splice(lineIndex || index2, 0, ["exit", listItem3, event[2]]);
|
|
235917
|
+
index2++;
|
|
235944
235918
|
length++;
|
|
235945
235919
|
}
|
|
235946
235920
|
if (event[1].type === "listItemPrefix") {
|
|
@@ -235949,8 +235923,8 @@ function compiler(options = {}) {
|
|
|
235949
235923
|
_spread: false,
|
|
235950
235924
|
start: Object.assign({}, event[1].start)
|
|
235951
235925
|
};
|
|
235952
|
-
events.splice(
|
|
235953
|
-
|
|
235926
|
+
events.splice(index2, 0, ["enter", listItem3, event[2]]);
|
|
235927
|
+
index2++;
|
|
235954
235928
|
length++;
|
|
235955
235929
|
firstBlankLineIndex = void 0;
|
|
235956
235930
|
atMarker = true;
|
|
@@ -235966,7 +235940,7 @@ function compiler(options = {}) {
|
|
|
235966
235940
|
function getData(key) {
|
|
235967
235941
|
return data3[key];
|
|
235968
235942
|
}
|
|
235969
|
-
function
|
|
235943
|
+
function point3(d) {
|
|
235970
235944
|
return {
|
|
235971
235945
|
line: d.line,
|
|
235972
235946
|
column: d.column,
|
|
@@ -235993,7 +235967,7 @@ function compiler(options = {}) {
|
|
|
235993
235967
|
this.stack.push(node);
|
|
235994
235968
|
this.tokenStack.push([token, errorHandler]);
|
|
235995
235969
|
node.position = {
|
|
235996
|
-
start:
|
|
235970
|
+
start: point3(token.start)
|
|
235997
235971
|
};
|
|
235998
235972
|
return node;
|
|
235999
235973
|
}
|
|
@@ -236010,7 +235984,7 @@ function compiler(options = {}) {
|
|
|
236010
235984
|
const open = this.tokenStack.pop();
|
|
236011
235985
|
if (!open) {
|
|
236012
235986
|
throw new Error(
|
|
236013
|
-
"Cannot close `" + token.type + "` (" +
|
|
235987
|
+
"Cannot close `" + token.type + "` (" + stringifyPosition({
|
|
236014
235988
|
start: token.start,
|
|
236015
235989
|
end: token.end
|
|
236016
235990
|
}) + "): it\u2019s not open"
|
|
@@ -236023,7 +235997,7 @@ function compiler(options = {}) {
|
|
|
236023
235997
|
handler.call(this, token, open[0]);
|
|
236024
235998
|
}
|
|
236025
235999
|
}
|
|
236026
|
-
node.position.end =
|
|
236000
|
+
node.position.end = point3(token.end);
|
|
236027
236001
|
return node;
|
|
236028
236002
|
}
|
|
236029
236003
|
function resume() {
|
|
@@ -236107,7 +236081,7 @@ function compiler(options = {}) {
|
|
|
236107
236081
|
if (!tail || tail.type !== "text") {
|
|
236108
236082
|
tail = text8();
|
|
236109
236083
|
tail.position = {
|
|
236110
|
-
start:
|
|
236084
|
+
start: point3(token.start)
|
|
236111
236085
|
};
|
|
236112
236086
|
parent.children.push(tail);
|
|
236113
236087
|
}
|
|
@@ -236116,13 +236090,13 @@ function compiler(options = {}) {
|
|
|
236116
236090
|
function onexitdata(token) {
|
|
236117
236091
|
const tail = this.stack.pop();
|
|
236118
236092
|
tail.value += this.sliceSerialize(token);
|
|
236119
|
-
tail.position.end =
|
|
236093
|
+
tail.position.end = point3(token.end);
|
|
236120
236094
|
}
|
|
236121
236095
|
function onexitlineending(token) {
|
|
236122
236096
|
const context = this.stack[this.stack.length - 1];
|
|
236123
236097
|
if (getData("atHardBreak")) {
|
|
236124
236098
|
const tail = context.children[context.children.length - 1];
|
|
236125
|
-
tail.position.end =
|
|
236099
|
+
tail.position.end = point3(token.end);
|
|
236126
236100
|
setData("atHardBreak");
|
|
236127
236101
|
return;
|
|
236128
236102
|
}
|
|
@@ -236235,7 +236209,7 @@ function compiler(options = {}) {
|
|
|
236235
236209
|
}
|
|
236236
236210
|
const tail = this.stack.pop();
|
|
236237
236211
|
tail.value += value;
|
|
236238
|
-
tail.position.end =
|
|
236212
|
+
tail.position.end = point3(token.end);
|
|
236239
236213
|
}
|
|
236240
236214
|
function onexitautolinkprotocol(token) {
|
|
236241
236215
|
onexitdata.call(this, token);
|
|
@@ -236358,9 +236332,9 @@ function compiler(options = {}) {
|
|
|
236358
236332
|
}
|
|
236359
236333
|
}
|
|
236360
236334
|
function configure(combined, extensions) {
|
|
236361
|
-
let
|
|
236362
|
-
while (++
|
|
236363
|
-
const value = extensions[
|
|
236335
|
+
let index2 = -1;
|
|
236336
|
+
while (++index2 < extensions.length) {
|
|
236337
|
+
const value = extensions[index2];
|
|
236364
236338
|
if (Array.isArray(value)) {
|
|
236365
236339
|
configure(combined, value);
|
|
236366
236340
|
} else {
|
|
@@ -236390,17 +236364,17 @@ function extension(combined, extension3) {
|
|
|
236390
236364
|
function defaultOnError(left, right) {
|
|
236391
236365
|
if (left) {
|
|
236392
236366
|
throw new Error(
|
|
236393
|
-
"Cannot close `" + left.type + "` (" +
|
|
236367
|
+
"Cannot close `" + left.type + "` (" + stringifyPosition({
|
|
236394
236368
|
start: left.start,
|
|
236395
236369
|
end: left.end
|
|
236396
|
-
}) + "): a different token (`" + right.type + "`, " +
|
|
236370
|
+
}) + "): a different token (`" + right.type + "`, " + stringifyPosition({
|
|
236397
236371
|
start: right.start,
|
|
236398
236372
|
end: right.end
|
|
236399
236373
|
}) + ") is open"
|
|
236400
236374
|
);
|
|
236401
236375
|
} else {
|
|
236402
236376
|
throw new Error(
|
|
236403
|
-
"Cannot close document, a token (`" + right.type + "`, " +
|
|
236377
|
+
"Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
|
|
236404
236378
|
start: right.start,
|
|
236405
236379
|
end: right.end
|
|
236406
236380
|
}) + ") is still open"
|
|
@@ -236448,11 +236422,11 @@ function zwitch(key, options) {
|
|
|
236448
236422
|
|
|
236449
236423
|
// ../../../node_modules/.pnpm/mdast-util-to-markdown@1.5.0/node_modules/mdast-util-to-markdown/lib/configure.js
|
|
236450
236424
|
function configure2(base2, extension3) {
|
|
236451
|
-
let
|
|
236425
|
+
let index2 = -1;
|
|
236452
236426
|
let key;
|
|
236453
236427
|
if (extension3.extensions) {
|
|
236454
|
-
while (++
|
|
236455
|
-
configure2(base2, extension3.extensions[
|
|
236428
|
+
while (++index2 < extension3.extensions.length) {
|
|
236429
|
+
configure2(base2, extension3.extensions[index2]);
|
|
236456
236430
|
}
|
|
236457
236431
|
}
|
|
236458
236432
|
for (key in extension3) {
|
|
@@ -236496,9 +236470,9 @@ function listInScope(stack, list3, none) {
|
|
|
236496
236470
|
if (!list3 || list3.length === 0) {
|
|
236497
236471
|
return none;
|
|
236498
236472
|
}
|
|
236499
|
-
let
|
|
236500
|
-
while (++
|
|
236501
|
-
if (stack.includes(list3[
|
|
236473
|
+
let index2 = -1;
|
|
236474
|
+
while (++index2 < list3.length) {
|
|
236475
|
+
if (stack.includes(list3[index2])) {
|
|
236502
236476
|
return true;
|
|
236503
236477
|
}
|
|
236504
236478
|
}
|
|
@@ -236507,9 +236481,9 @@ function listInScope(stack, list3, none) {
|
|
|
236507
236481
|
|
|
236508
236482
|
// ../../../node_modules/.pnpm/mdast-util-to-markdown@1.5.0/node_modules/mdast-util-to-markdown/lib/handle/break.js
|
|
236509
236483
|
function hardBreak(_, _1, state, info) {
|
|
236510
|
-
let
|
|
236511
|
-
while (++
|
|
236512
|
-
if (state.unsafe[
|
|
236484
|
+
let index2 = -1;
|
|
236485
|
+
while (++index2 < state.unsafe.length) {
|
|
236486
|
+
if (state.unsafe[index2].character === "\n" && patternInScope(state.stack, state.unsafe[index2])) {
|
|
236513
236487
|
return /[ \t]/.test(info.before) ? "" : " ";
|
|
236514
236488
|
}
|
|
236515
236489
|
}
|
|
@@ -236519,23 +236493,23 @@ function hardBreak(_, _1, state, info) {
|
|
|
236519
236493
|
// ../../../node_modules/.pnpm/longest-streak@3.0.1/node_modules/longest-streak/index.js
|
|
236520
236494
|
function longestStreak(value, character) {
|
|
236521
236495
|
const source2 = String(value);
|
|
236522
|
-
let
|
|
236523
|
-
let expected =
|
|
236496
|
+
let index2 = source2.indexOf(character);
|
|
236497
|
+
let expected = index2;
|
|
236524
236498
|
let count = 0;
|
|
236525
236499
|
let max = 0;
|
|
236526
236500
|
if (typeof character !== "string" || character.length !== 1) {
|
|
236527
236501
|
throw new Error("Expected character");
|
|
236528
236502
|
}
|
|
236529
|
-
while (
|
|
236530
|
-
if (
|
|
236503
|
+
while (index2 !== -1) {
|
|
236504
|
+
if (index2 === expected) {
|
|
236531
236505
|
if (++count > max) {
|
|
236532
236506
|
max = count;
|
|
236533
236507
|
}
|
|
236534
236508
|
} else {
|
|
236535
236509
|
count = 1;
|
|
236536
236510
|
}
|
|
236537
|
-
expected =
|
|
236538
|
-
|
|
236511
|
+
expected = index2 + 1;
|
|
236512
|
+
index2 = source2.indexOf(character, expected);
|
|
236539
236513
|
}
|
|
236540
236514
|
return max;
|
|
236541
236515
|
}
|
|
@@ -236724,15 +236698,15 @@ var convert = function(test) {
|
|
|
236724
236698
|
};
|
|
236725
236699
|
function anyFactory(tests) {
|
|
236726
236700
|
const checks = [];
|
|
236727
|
-
let
|
|
236728
|
-
while (++
|
|
236729
|
-
checks[
|
|
236701
|
+
let index2 = -1;
|
|
236702
|
+
while (++index2 < tests.length) {
|
|
236703
|
+
checks[index2] = convert(tests[index2]);
|
|
236730
236704
|
}
|
|
236731
236705
|
return castFactory(any);
|
|
236732
236706
|
function any(...parameters) {
|
|
236733
|
-
let
|
|
236734
|
-
while (++
|
|
236735
|
-
if (checks[
|
|
236707
|
+
let index3 = -1;
|
|
236708
|
+
while (++index3 < checks.length) {
|
|
236709
|
+
if (checks[index3].call(this, ...parameters))
|
|
236736
236710
|
return true;
|
|
236737
236711
|
}
|
|
236738
236712
|
return false;
|
|
@@ -236783,7 +236757,7 @@ var visitParents = function(tree, test, visitor, reverse) {
|
|
|
236783
236757
|
const is2 = convert(test);
|
|
236784
236758
|
const step = reverse ? -1 : 1;
|
|
236785
236759
|
factory(tree, void 0, [])();
|
|
236786
|
-
function factory(node,
|
|
236760
|
+
function factory(node, index2, parents) {
|
|
236787
236761
|
const value = node && typeof node === "object" ? node : {};
|
|
236788
236762
|
if (typeof value.type === "string") {
|
|
236789
236763
|
const name2 = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
|
|
@@ -236797,7 +236771,7 @@ var visitParents = function(tree, test, visitor, reverse) {
|
|
|
236797
236771
|
let subresult;
|
|
236798
236772
|
let offset3;
|
|
236799
236773
|
let grandparents;
|
|
236800
|
-
if (!test || is2(node,
|
|
236774
|
+
if (!test || is2(node, index2, parents[parents.length - 1] || null)) {
|
|
236801
236775
|
result = toResult(visitor(node, parents));
|
|
236802
236776
|
if (result[0] === EXIT) {
|
|
236803
236777
|
return result;
|
|
@@ -237017,25 +236991,25 @@ inlineCode.peek = inlineCodePeek;
|
|
|
237017
236991
|
function inlineCode(node, _, state) {
|
|
237018
236992
|
let value = node.value || "";
|
|
237019
236993
|
let sequence = "`";
|
|
237020
|
-
let
|
|
236994
|
+
let index2 = -1;
|
|
237021
236995
|
while (new RegExp("(^|[^`])" + sequence + "([^`]|$)").test(value)) {
|
|
237022
236996
|
sequence += "`";
|
|
237023
236997
|
}
|
|
237024
236998
|
if (/[^ \r\n]/.test(value) && (/^[ \r\n]/.test(value) && /[ \r\n]$/.test(value) || /^`|`$/.test(value))) {
|
|
237025
236999
|
value = " " + value + " ";
|
|
237026
237000
|
}
|
|
237027
|
-
while (++
|
|
237028
|
-
const pattern = state.unsafe[
|
|
237001
|
+
while (++index2 < state.unsafe.length) {
|
|
237002
|
+
const pattern = state.unsafe[index2];
|
|
237029
237003
|
const expression = patternCompile(pattern);
|
|
237030
237004
|
let match;
|
|
237031
237005
|
if (!pattern.atBreak)
|
|
237032
237006
|
continue;
|
|
237033
237007
|
while (match = expression.exec(value)) {
|
|
237034
|
-
let
|
|
237035
|
-
if (value.charCodeAt(
|
|
237036
|
-
|
|
237008
|
+
let position2 = match.index;
|
|
237009
|
+
if (value.charCodeAt(position2) === 10 && value.charCodeAt(position2 - 1) === 13) {
|
|
237010
|
+
position2--;
|
|
237037
237011
|
}
|
|
237038
|
-
value = value.slice(0,
|
|
237012
|
+
value = value.slice(0, position2) + " " + value.slice(match.index + 1);
|
|
237039
237013
|
}
|
|
237040
237014
|
}
|
|
237041
237015
|
return sequence + value + sequence;
|
|
@@ -237257,9 +237231,9 @@ function list2(node, parent, state, info) {
|
|
|
237257
237231
|
useDifferentMarker = true;
|
|
237258
237232
|
}
|
|
237259
237233
|
if (checkRule(state) === bullet && firstListItem) {
|
|
237260
|
-
let
|
|
237261
|
-
while (++
|
|
237262
|
-
const item = node.children[
|
|
237234
|
+
let index2 = -1;
|
|
237235
|
+
while (++index2 < node.children.length) {
|
|
237236
|
+
const item = node.children[index2];
|
|
237263
237237
|
if (item && item.type === "listItem" && item.children && item.children[0] && item.children[0].type === "thematicBreak") {
|
|
237264
237238
|
useDifferentMarker = true;
|
|
237265
237239
|
break;
|
|
@@ -237313,8 +237287,8 @@ function listItem(node, parent, state, info) {
|
|
|
237313
237287
|
);
|
|
237314
237288
|
exit2();
|
|
237315
237289
|
return value;
|
|
237316
|
-
function map3(line2,
|
|
237317
|
-
if (
|
|
237290
|
+
function map3(line2, index2, blank) {
|
|
237291
|
+
if (index2) {
|
|
237318
237292
|
return (blank ? "" : " ".repeat(size)) + line2;
|
|
237319
237293
|
}
|
|
237320
237294
|
return (blank ? bullet : bullet + " ".repeat(size - bullet.length)) + line2;
|
|
@@ -237559,19 +237533,19 @@ function containerPhrasing(parent, state, info) {
|
|
|
237559
237533
|
const indexStack = state.indexStack;
|
|
237560
237534
|
const children = parent.children || [];
|
|
237561
237535
|
const results = [];
|
|
237562
|
-
let
|
|
237536
|
+
let index2 = -1;
|
|
237563
237537
|
let before = info.before;
|
|
237564
237538
|
indexStack.push(-1);
|
|
237565
237539
|
let tracker = state.createTracker(info);
|
|
237566
|
-
while (++
|
|
237567
|
-
const child = children[
|
|
237540
|
+
while (++index2 < children.length) {
|
|
237541
|
+
const child = children[index2];
|
|
237568
237542
|
let after;
|
|
237569
|
-
indexStack[indexStack.length - 1] =
|
|
237570
|
-
if (
|
|
237571
|
-
let handle2 = state.handle.handlers[children[
|
|
237543
|
+
indexStack[indexStack.length - 1] = index2;
|
|
237544
|
+
if (index2 + 1 < children.length) {
|
|
237545
|
+
let handle2 = state.handle.handlers[children[index2 + 1].type];
|
|
237572
237546
|
if (handle2 && handle2.peek)
|
|
237573
237547
|
handle2 = handle2.peek;
|
|
237574
|
-
after = handle2 ? handle2(children[
|
|
237548
|
+
after = handle2 ? handle2(children[index2 + 1], parent, state, {
|
|
237575
237549
|
before: "",
|
|
237576
237550
|
after: "",
|
|
237577
237551
|
...tracker.current()
|
|
@@ -237609,11 +237583,11 @@ function containerFlow(parent, state, info) {
|
|
|
237609
237583
|
const children = parent.children || [];
|
|
237610
237584
|
const tracker = state.createTracker(info);
|
|
237611
237585
|
const results = [];
|
|
237612
|
-
let
|
|
237586
|
+
let index2 = -1;
|
|
237613
237587
|
indexStack.push(-1);
|
|
237614
|
-
while (++
|
|
237615
|
-
const child = children[
|
|
237616
|
-
indexStack[indexStack.length - 1] =
|
|
237588
|
+
while (++index2 < children.length) {
|
|
237589
|
+
const child = children[index2];
|
|
237590
|
+
indexStack[indexStack.length - 1] = index2;
|
|
237617
237591
|
results.push(
|
|
237618
237592
|
tracker.move(
|
|
237619
237593
|
state.handle(child, parent, state, {
|
|
@@ -237626,9 +237600,9 @@ function containerFlow(parent, state, info) {
|
|
|
237626
237600
|
if (child.type !== "list") {
|
|
237627
237601
|
state.bulletLastUsed = void 0;
|
|
237628
237602
|
}
|
|
237629
|
-
if (
|
|
237603
|
+
if (index2 < children.length - 1) {
|
|
237630
237604
|
results.push(
|
|
237631
|
-
tracker.move(between(child, children[
|
|
237605
|
+
tracker.move(between(child, children[index2 + 1], parent, state))
|
|
237632
237606
|
);
|
|
237633
237607
|
}
|
|
237634
237608
|
}
|
|
@@ -237636,9 +237610,9 @@ function containerFlow(parent, state, info) {
|
|
|
237636
237610
|
return results.join("");
|
|
237637
237611
|
}
|
|
237638
237612
|
function between(left, right, parent, state) {
|
|
237639
|
-
let
|
|
237640
|
-
while (
|
|
237641
|
-
const result = state.join[
|
|
237613
|
+
let index2 = state.join.length;
|
|
237614
|
+
while (index2--) {
|
|
237615
|
+
const result = state.join[index2](left, right, parent, state);
|
|
237642
237616
|
if (result === true || result === 1) {
|
|
237643
237617
|
break;
|
|
237644
237618
|
}
|
|
@@ -237678,9 +237652,9 @@ function safe(state, input, config) {
|
|
|
237678
237652
|
const positions = [];
|
|
237679
237653
|
const result = [];
|
|
237680
237654
|
const infos = {};
|
|
237681
|
-
let
|
|
237682
|
-
while (++
|
|
237683
|
-
const pattern = state.unsafe[
|
|
237655
|
+
let index2 = -1;
|
|
237656
|
+
while (++index2 < state.unsafe.length) {
|
|
237657
|
+
const pattern = state.unsafe[index2];
|
|
237684
237658
|
if (!patternInScope(state.stack, pattern)) {
|
|
237685
237659
|
continue;
|
|
237686
237660
|
}
|
|
@@ -237689,41 +237663,41 @@ function safe(state, input, config) {
|
|
|
237689
237663
|
while (match = expression.exec(value)) {
|
|
237690
237664
|
const before = "before" in pattern || Boolean(pattern.atBreak);
|
|
237691
237665
|
const after = "after" in pattern;
|
|
237692
|
-
const
|
|
237693
|
-
if (positions.includes(
|
|
237694
|
-
if (infos[
|
|
237695
|
-
infos[
|
|
237666
|
+
const position2 = match.index + (before ? match[1].length : 0);
|
|
237667
|
+
if (positions.includes(position2)) {
|
|
237668
|
+
if (infos[position2].before && !before) {
|
|
237669
|
+
infos[position2].before = false;
|
|
237696
237670
|
}
|
|
237697
|
-
if (infos[
|
|
237698
|
-
infos[
|
|
237671
|
+
if (infos[position2].after && !after) {
|
|
237672
|
+
infos[position2].after = false;
|
|
237699
237673
|
}
|
|
237700
237674
|
} else {
|
|
237701
|
-
positions.push(
|
|
237702
|
-
infos[
|
|
237675
|
+
positions.push(position2);
|
|
237676
|
+
infos[position2] = { before, after };
|
|
237703
237677
|
}
|
|
237704
237678
|
}
|
|
237705
237679
|
}
|
|
237706
237680
|
positions.sort(numerical);
|
|
237707
237681
|
let start3 = config.before ? config.before.length : 0;
|
|
237708
237682
|
const end = value.length - (config.after ? config.after.length : 0);
|
|
237709
|
-
|
|
237710
|
-
while (++
|
|
237711
|
-
const
|
|
237712
|
-
if (
|
|
237683
|
+
index2 = -1;
|
|
237684
|
+
while (++index2 < positions.length) {
|
|
237685
|
+
const position2 = positions[index2];
|
|
237686
|
+
if (position2 < start3 || position2 >= end) {
|
|
237713
237687
|
continue;
|
|
237714
237688
|
}
|
|
237715
|
-
if (
|
|
237689
|
+
if (position2 + 1 < end && positions[index2 + 1] === position2 + 1 && infos[position2].after && !infos[position2 + 1].before && !infos[position2 + 1].after || positions[index2 - 1] === position2 - 1 && infos[position2].before && !infos[position2 - 1].before && !infos[position2 - 1].after) {
|
|
237716
237690
|
continue;
|
|
237717
237691
|
}
|
|
237718
|
-
if (start3 !==
|
|
237719
|
-
result.push(escapeBackslashes(value.slice(start3,
|
|
237692
|
+
if (start3 !== position2) {
|
|
237693
|
+
result.push(escapeBackslashes(value.slice(start3, position2), "\\"));
|
|
237720
237694
|
}
|
|
237721
|
-
start3 =
|
|
237722
|
-
if (/[!-/:-@[-`{-~]/.test(value.charAt(
|
|
237695
|
+
start3 = position2;
|
|
237696
|
+
if (/[!-/:-@[-`{-~]/.test(value.charAt(position2)) && (!config.encode || !config.encode.includes(value.charAt(position2)))) {
|
|
237723
237697
|
result.push("\\");
|
|
237724
237698
|
} else {
|
|
237725
237699
|
result.push(
|
|
237726
|
-
"&#x" + value.charCodeAt(
|
|
237700
|
+
"&#x" + value.charCodeAt(position2).toString(16).toUpperCase() + ";"
|
|
237727
237701
|
);
|
|
237728
237702
|
start3++;
|
|
237729
237703
|
}
|
|
@@ -237739,18 +237713,18 @@ function escapeBackslashes(value, after) {
|
|
|
237739
237713
|
const positions = [];
|
|
237740
237714
|
const results = [];
|
|
237741
237715
|
const whole = value + after;
|
|
237742
|
-
let
|
|
237716
|
+
let index2 = -1;
|
|
237743
237717
|
let start3 = 0;
|
|
237744
237718
|
let match;
|
|
237745
237719
|
while (match = expression.exec(whole)) {
|
|
237746
237720
|
positions.push(match.index);
|
|
237747
237721
|
}
|
|
237748
|
-
while (++
|
|
237749
|
-
if (start3 !== positions[
|
|
237750
|
-
results.push(value.slice(start3, positions[
|
|
237722
|
+
while (++index2 < positions.length) {
|
|
237723
|
+
if (start3 !== positions[index2]) {
|
|
237724
|
+
results.push(value.slice(start3, positions[index2]));
|
|
237751
237725
|
}
|
|
237752
237726
|
results.push("\\");
|
|
237753
|
-
start3 = positions[
|
|
237727
|
+
start3 = positions[index2];
|
|
237754
237728
|
}
|
|
237755
237729
|
results.push(value.slice(start3));
|
|
237756
237730
|
return results.join("");
|
|
@@ -239790,11 +239764,11 @@ types$1.backQuote.updateContext = function() {
|
|
|
239790
239764
|
};
|
|
239791
239765
|
types$1.star.updateContext = function(prevType) {
|
|
239792
239766
|
if (prevType === types$1._function) {
|
|
239793
|
-
var
|
|
239794
|
-
if (this.context[
|
|
239795
|
-
this.context[
|
|
239767
|
+
var index2 = this.context.length - 1;
|
|
239768
|
+
if (this.context[index2] === types.f_expr) {
|
|
239769
|
+
this.context[index2] = types.f_expr_gen;
|
|
239796
239770
|
} else {
|
|
239797
|
-
this.context[
|
|
239771
|
+
this.context[index2] = types.f_gen;
|
|
239798
239772
|
}
|
|
239799
239773
|
}
|
|
239800
239774
|
this.exprAllowed = true;
|
|
@@ -242407,11 +242381,11 @@ pp.tryReadTemplateToken = function() {
|
|
|
242407
242381
|
}
|
|
242408
242382
|
this.inTemplateElement = false;
|
|
242409
242383
|
};
|
|
242410
|
-
pp.invalidStringToken = function(
|
|
242384
|
+
pp.invalidStringToken = function(position2, message) {
|
|
242411
242385
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
|
|
242412
242386
|
throw INVALID_TEMPLATE_ESCAPE_ERROR;
|
|
242413
242387
|
} else {
|
|
242414
|
-
this.raise(
|
|
242388
|
+
this.raise(position2, message);
|
|
242415
242389
|
}
|
|
242416
242390
|
};
|
|
242417
242391
|
pp.readTmplToken = function() {
|
|
@@ -242661,13 +242635,13 @@ function visit2(tree, visitor) {
|
|
|
242661
242635
|
leave = visitor.leave;
|
|
242662
242636
|
}
|
|
242663
242637
|
build(tree, null, null, [])();
|
|
242664
|
-
function build(node, key,
|
|
242638
|
+
function build(node, key, index2, parents) {
|
|
242665
242639
|
if (nodelike(node)) {
|
|
242666
242640
|
visit3.displayName = "node (" + color2(node.type) + ")";
|
|
242667
242641
|
}
|
|
242668
242642
|
return visit3;
|
|
242669
242643
|
function visit3() {
|
|
242670
|
-
var result = enter ? toResult2(enter(node, key,
|
|
242644
|
+
var result = enter ? toResult2(enter(node, key, index2, parents)) : [];
|
|
242671
242645
|
var cKey;
|
|
242672
242646
|
var cIndex;
|
|
242673
242647
|
var grandparents;
|
|
@@ -242703,7 +242677,7 @@ function visit2(tree, visitor) {
|
|
|
242703
242677
|
}
|
|
242704
242678
|
}
|
|
242705
242679
|
}
|
|
242706
|
-
return leave ? toResult2(leave(node, key,
|
|
242680
|
+
return leave ? toResult2(leave(node, key, index2, parents)) : result;
|
|
242707
242681
|
}
|
|
242708
242682
|
}
|
|
242709
242683
|
}
|
|
@@ -242733,13 +242707,13 @@ function location(file) {
|
|
|
242733
242707
|
indices.push(value.length + 1);
|
|
242734
242708
|
return { toPoint, toOffset };
|
|
242735
242709
|
function toPoint(offset3) {
|
|
242736
|
-
var
|
|
242710
|
+
var index2 = -1;
|
|
242737
242711
|
if (offset3 > -1 && offset3 < indices[indices.length - 1]) {
|
|
242738
|
-
while (++
|
|
242739
|
-
if (indices[
|
|
242712
|
+
while (++index2 < indices.length) {
|
|
242713
|
+
if (indices[index2] > offset3) {
|
|
242740
242714
|
return {
|
|
242741
|
-
line:
|
|
242742
|
-
column: offset3 - (indices[
|
|
242715
|
+
line: index2 + 1,
|
|
242716
|
+
column: offset3 - (indices[index2 - 1] || 0) + 1,
|
|
242743
242717
|
offset: offset3
|
|
242744
242718
|
};
|
|
242745
242719
|
}
|
|
@@ -242747,9 +242721,9 @@ function location(file) {
|
|
|
242747
242721
|
}
|
|
242748
242722
|
return { line: void 0, column: void 0, offset: void 0 };
|
|
242749
242723
|
}
|
|
242750
|
-
function toOffset(
|
|
242751
|
-
var line2 =
|
|
242752
|
-
var column =
|
|
242724
|
+
function toOffset(point3) {
|
|
242725
|
+
var line2 = point3 && point3.line;
|
|
242726
|
+
var column = point3 && point3.column;
|
|
242753
242727
|
var offset3;
|
|
242754
242728
|
if (typeof line2 === "number" && typeof column === "number" && !Number.isNaN(line2) && !Number.isNaN(column) && line2 - 1 in indices) {
|
|
242755
242729
|
offset3 = (indices[line2 - 2] || 0) + column - 1 || 0;
|
|
@@ -242773,7 +242747,7 @@ function eventsToAcorn(events, options) {
|
|
|
242773
242747
|
});
|
|
242774
242748
|
const chunks = [];
|
|
242775
242749
|
const lines2 = {};
|
|
242776
|
-
let
|
|
242750
|
+
let index2 = -1;
|
|
242777
242751
|
let swallow = false;
|
|
242778
242752
|
let estree;
|
|
242779
242753
|
let exception;
|
|
@@ -242782,8 +242756,8 @@ function eventsToAcorn(events, options) {
|
|
|
242782
242756
|
startLine = options.start.line;
|
|
242783
242757
|
lines2[startLine] = options.start;
|
|
242784
242758
|
}
|
|
242785
|
-
while (++
|
|
242786
|
-
const [kind, token, context] = events[
|
|
242759
|
+
while (++index2 < events.length) {
|
|
242760
|
+
const [kind, token, context] = events[index2];
|
|
242787
242761
|
if (kind === "exit") {
|
|
242788
242762
|
chunks.push(context.sliceSerialize(token));
|
|
242789
242763
|
setPoint(token.start);
|
|
@@ -242805,12 +242779,12 @@ function eventsToAcorn(events, options) {
|
|
|
242805
242779
|
estree = options.expression && !isEmptyExpression ? options.acorn.parseExpressionAt(value, 0, acornConfig) : options.acorn.parse(value, acornConfig);
|
|
242806
242780
|
} catch (error_) {
|
|
242807
242781
|
const error = error_;
|
|
242808
|
-
const
|
|
242782
|
+
const point3 = parseOffsetToUnistPoint(error.pos);
|
|
242809
242783
|
error.message = String(error.message).replace(/ \(\d+:\d+\)$/, "");
|
|
242810
|
-
error.pos =
|
|
242784
|
+
error.pos = point3.offset;
|
|
242811
242785
|
error.loc = {
|
|
242812
|
-
line:
|
|
242813
|
-
column:
|
|
242786
|
+
line: point3.line,
|
|
242787
|
+
column: point3.column - 1
|
|
242814
242788
|
};
|
|
242815
242789
|
exception = error;
|
|
242816
242790
|
swallow = error.raisedAt >= prefix.length + source2.length || error.message === "Unterminated comment";
|
|
@@ -242833,25 +242807,25 @@ function eventsToAcorn(events, options) {
|
|
|
242833
242807
|
comments: []
|
|
242834
242808
|
};
|
|
242835
242809
|
} else {
|
|
242836
|
-
const
|
|
242810
|
+
const point3 = parseOffsetToUnistPoint(estree.end);
|
|
242837
242811
|
exception = new Error("Unexpected content after expression");
|
|
242838
|
-
exception.pos =
|
|
242812
|
+
exception.pos = point3.offset;
|
|
242839
242813
|
exception.loc = {
|
|
242840
|
-
line:
|
|
242841
|
-
column:
|
|
242814
|
+
line: point3.line,
|
|
242815
|
+
column: point3.column - 1
|
|
242842
242816
|
};
|
|
242843
242817
|
estree = void 0;
|
|
242844
242818
|
}
|
|
242845
242819
|
}
|
|
242846
242820
|
if (estree) {
|
|
242847
242821
|
estree.comments = comments;
|
|
242848
|
-
visit2(estree, (esnode, field,
|
|
242822
|
+
visit2(estree, (esnode, field, index3, parents) => {
|
|
242849
242823
|
let context = parents[parents.length - 1];
|
|
242850
242824
|
let prop = field;
|
|
242851
242825
|
if (esnode.type === "ParenthesizedExpression" && context && prop) {
|
|
242852
|
-
if (typeof
|
|
242826
|
+
if (typeof index3 === "number") {
|
|
242853
242827
|
context = context[prop];
|
|
242854
|
-
prop =
|
|
242828
|
+
prop = index3;
|
|
242855
242829
|
}
|
|
242856
242830
|
context[prop] = esnode.expression;
|
|
242857
242831
|
}
|
|
@@ -242921,12 +242895,12 @@ function eventsToAcorn(events, options) {
|
|
|
242921
242895
|
offset: offset3
|
|
242922
242896
|
};
|
|
242923
242897
|
}
|
|
242924
|
-
function setPoint(
|
|
242925
|
-
if (!startLine ||
|
|
242926
|
-
startLine =
|
|
242898
|
+
function setPoint(point3) {
|
|
242899
|
+
if (!startLine || point3.line < startLine) {
|
|
242900
|
+
startLine = point3.line;
|
|
242927
242901
|
}
|
|
242928
|
-
if (!(
|
|
242929
|
-
lines2[
|
|
242902
|
+
if (!(point3.line in lines2) || lines2[point3.line].offset > point3.offset) {
|
|
242903
|
+
lines2[point3.line] = point3;
|
|
242930
242904
|
}
|
|
242931
242905
|
}
|
|
242932
242906
|
}
|
|
@@ -243815,7 +243789,7 @@ function mdxjsEsm(options) {
|
|
|
243815
243789
|
const self2 = this;
|
|
243816
243790
|
const definedModuleSpecifiers = self2.parser.definedModuleSpecifiers || (self2.parser.definedModuleSpecifiers = []);
|
|
243817
243791
|
const eventStart = this.events.length + 1;
|
|
243818
|
-
let
|
|
243792
|
+
let index2 = 0;
|
|
243819
243793
|
let buffer2;
|
|
243820
243794
|
return self2.interrupt ? nok : start3;
|
|
243821
243795
|
function start3(code2) {
|
|
@@ -243827,9 +243801,9 @@ function mdxjsEsm(options) {
|
|
|
243827
243801
|
return keyword(code2);
|
|
243828
243802
|
}
|
|
243829
243803
|
function keyword(code2) {
|
|
243830
|
-
if (code2 === buffer2.charCodeAt(
|
|
243804
|
+
if (code2 === buffer2.charCodeAt(index2++)) {
|
|
243831
243805
|
effects.consume(code2);
|
|
243832
|
-
return
|
|
243806
|
+
return index2 === buffer2.length ? after : keyword;
|
|
243833
243807
|
}
|
|
243834
243808
|
return nok(code2);
|
|
243835
243809
|
}
|
|
@@ -243872,7 +243846,7 @@ function mdxjsEsm(options) {
|
|
|
243872
243846
|
return atEnd(code2);
|
|
243873
243847
|
}
|
|
243874
243848
|
function atEnd(code2) {
|
|
243875
|
-
let
|
|
243849
|
+
let index3 = -1;
|
|
243876
243850
|
const result = eventsToAcorn(self2.events.slice(eventStart), {
|
|
243877
243851
|
acorn,
|
|
243878
243852
|
acornOptions,
|
|
@@ -243895,8 +243869,8 @@ function mdxjsEsm(options) {
|
|
|
243895
243869
|
if (definedModuleSpecifiers.length > 0) {
|
|
243896
243870
|
result.estree.body.shift();
|
|
243897
243871
|
}
|
|
243898
|
-
while (++
|
|
243899
|
-
const node = result.estree.body[
|
|
243872
|
+
while (++index3 < result.estree.body.length) {
|
|
243873
|
+
const node = result.estree.body[index3];
|
|
243900
243874
|
if (!allowedAcornTypes.has(node.type)) {
|
|
243901
243875
|
throw new VFileMessage(
|
|
243902
243876
|
"Unexpected `" + node.type + "` in code: only import/exports are supported",
|
|
@@ -243905,9 +243879,9 @@ function mdxjsEsm(options) {
|
|
|
243905
243879
|
);
|
|
243906
243880
|
}
|
|
243907
243881
|
if (node.type === "ImportDeclaration" && !self2.interrupt) {
|
|
243908
|
-
let
|
|
243909
|
-
while (++
|
|
243910
|
-
definedModuleSpecifiers.push(node.specifiers[
|
|
243882
|
+
let index4 = -1;
|
|
243883
|
+
while (++index4 < node.specifiers.length) {
|
|
243884
|
+
definedModuleSpecifiers.push(node.specifiers[index4].local.name);
|
|
243911
243885
|
}
|
|
243912
243886
|
}
|
|
243913
243887
|
}
|
|
@@ -244006,10 +243980,10 @@ function ccount(value, character) {
|
|
|
244006
243980
|
throw new TypeError("Expected character");
|
|
244007
243981
|
}
|
|
244008
243982
|
let count = 0;
|
|
244009
|
-
let
|
|
244010
|
-
while (
|
|
243983
|
+
let index2 = source2.indexOf(character);
|
|
243984
|
+
while (index2 !== -1) {
|
|
244011
243985
|
count++;
|
|
244012
|
-
|
|
243986
|
+
index2 = source2.indexOf(character, index2 + character.length);
|
|
244013
243987
|
}
|
|
244014
243988
|
return count;
|
|
244015
243989
|
}
|
|
@@ -244194,37 +244168,37 @@ var messages = [
|
|
|
244194
244168
|
function parseEntities(value, options = {}) {
|
|
244195
244169
|
const additional = typeof options.additional === "string" ? options.additional.charCodeAt(0) : options.additional;
|
|
244196
244170
|
const result = [];
|
|
244197
|
-
let
|
|
244171
|
+
let index2 = 0;
|
|
244198
244172
|
let lines2 = -1;
|
|
244199
244173
|
let queue = "";
|
|
244200
|
-
let
|
|
244174
|
+
let point3;
|
|
244201
244175
|
let indent;
|
|
244202
244176
|
if (options.position) {
|
|
244203
244177
|
if ("start" in options.position || "indent" in options.position) {
|
|
244204
244178
|
indent = options.position.indent;
|
|
244205
|
-
|
|
244179
|
+
point3 = options.position.start;
|
|
244206
244180
|
} else {
|
|
244207
|
-
|
|
244181
|
+
point3 = options.position;
|
|
244208
244182
|
}
|
|
244209
244183
|
}
|
|
244210
|
-
let line2 = (
|
|
244211
|
-
let column = (
|
|
244184
|
+
let line2 = (point3 ? point3.line : 0) || 1;
|
|
244185
|
+
let column = (point3 ? point3.column : 0) || 1;
|
|
244212
244186
|
let previous2 = now();
|
|
244213
244187
|
let character;
|
|
244214
|
-
|
|
244215
|
-
while (++
|
|
244188
|
+
index2--;
|
|
244189
|
+
while (++index2 <= value.length) {
|
|
244216
244190
|
if (character === 10) {
|
|
244217
244191
|
column = (indent ? indent[lines2] : 0) || 1;
|
|
244218
244192
|
}
|
|
244219
|
-
character = value.charCodeAt(
|
|
244193
|
+
character = value.charCodeAt(index2);
|
|
244220
244194
|
if (character === 38) {
|
|
244221
|
-
const following = value.charCodeAt(
|
|
244195
|
+
const following = value.charCodeAt(index2 + 1);
|
|
244222
244196
|
if (following === 9 || following === 10 || following === 12 || following === 32 || following === 38 || following === 60 || Number.isNaN(following) || additional && following === additional) {
|
|
244223
244197
|
queue += fromCharCode(character);
|
|
244224
244198
|
column++;
|
|
244225
244199
|
continue;
|
|
244226
244200
|
}
|
|
244227
|
-
const start3 =
|
|
244201
|
+
const start3 = index2 + 1;
|
|
244228
244202
|
let begin = start3;
|
|
244229
244203
|
let end = start3;
|
|
244230
244204
|
let type;
|
|
@@ -244329,7 +244303,7 @@ function parseEntities(value, options = {}) {
|
|
|
244329
244303
|
if (reference) {
|
|
244330
244304
|
flush();
|
|
244331
244305
|
previous2 = now();
|
|
244332
|
-
|
|
244306
|
+
index2 = end - 1;
|
|
244333
244307
|
column += end - start3 + 1;
|
|
244334
244308
|
result.push(reference);
|
|
244335
244309
|
const next = now();
|
|
@@ -244347,7 +244321,7 @@ function parseEntities(value, options = {}) {
|
|
|
244347
244321
|
characters = value.slice(start3 - 1, end);
|
|
244348
244322
|
queue += characters;
|
|
244349
244323
|
column += characters.length;
|
|
244350
|
-
|
|
244324
|
+
index2 = end - 1;
|
|
244351
244325
|
}
|
|
244352
244326
|
} else {
|
|
244353
244327
|
if (character === 10) {
|
|
@@ -244368,19 +244342,19 @@ function parseEntities(value, options = {}) {
|
|
|
244368
244342
|
return {
|
|
244369
244343
|
line: line2,
|
|
244370
244344
|
column,
|
|
244371
|
-
offset:
|
|
244345
|
+
offset: index2 + ((point3 ? point3.offset : 0) || 0)
|
|
244372
244346
|
};
|
|
244373
244347
|
}
|
|
244374
244348
|
function warning(code2, offset3) {
|
|
244375
|
-
let
|
|
244349
|
+
let position2;
|
|
244376
244350
|
if (options.warning) {
|
|
244377
|
-
|
|
244378
|
-
|
|
244379
|
-
|
|
244351
|
+
position2 = now();
|
|
244352
|
+
position2.column += offset3;
|
|
244353
|
+
position2.offset += offset3;
|
|
244380
244354
|
options.warning.call(
|
|
244381
244355
|
options.warningContext,
|
|
244382
244356
|
messages[code2],
|
|
244383
|
-
|
|
244357
|
+
position2,
|
|
244384
244358
|
code2
|
|
244385
244359
|
);
|
|
244386
244360
|
}
|
|
@@ -244418,26 +244392,26 @@ function core(value, options) {
|
|
|
244418
244392
|
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,
|
|
244419
244393
|
basic
|
|
244420
244394
|
);
|
|
244421
|
-
function surrogate(pair,
|
|
244395
|
+
function surrogate(pair, index2, all2) {
|
|
244422
244396
|
return options.format(
|
|
244423
244397
|
(pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536,
|
|
244424
|
-
all2.charCodeAt(
|
|
244398
|
+
all2.charCodeAt(index2 + 2),
|
|
244425
244399
|
options
|
|
244426
244400
|
);
|
|
244427
244401
|
}
|
|
244428
|
-
function basic(character,
|
|
244402
|
+
function basic(character, index2, all2) {
|
|
244429
244403
|
return options.format(
|
|
244430
244404
|
character.charCodeAt(0),
|
|
244431
|
-
all2.charCodeAt(
|
|
244405
|
+
all2.charCodeAt(index2 + 1),
|
|
244432
244406
|
options
|
|
244433
244407
|
);
|
|
244434
244408
|
}
|
|
244435
244409
|
}
|
|
244436
244410
|
function charactersToExpression(subset) {
|
|
244437
244411
|
const groups = [];
|
|
244438
|
-
let
|
|
244439
|
-
while (++
|
|
244440
|
-
groups.push(subset[
|
|
244412
|
+
let index2 = -1;
|
|
244413
|
+
while (++index2 < subset.length) {
|
|
244414
|
+
groups.push(subset[index2].replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"));
|
|
244441
244415
|
}
|
|
244442
244416
|
return new RegExp("(?:" + groups.join("|") + ")", "g");
|
|
244443
244417
|
}
|
|
@@ -244656,10 +244630,10 @@ function mdxJsxFromMarkdown() {
|
|
|
244656
244630
|
function onErrorRightIsTag(closing, open) {
|
|
244657
244631
|
const tag = this.getData("mdxJsxTag");
|
|
244658
244632
|
const place = closing ? " before the end of `" + closing.type + "`" : "";
|
|
244659
|
-
const
|
|
244633
|
+
const position2 = closing ? { start: closing.start, end: closing.end } : void 0;
|
|
244660
244634
|
throw new VFileMessage(
|
|
244661
244635
|
"Expected a closing tag for `" + serializeAbbreviatedTag(tag) + "` (" + stringifyPosition({ start: open.start, end: open.end }) + ")" + place,
|
|
244662
|
-
|
|
244636
|
+
position2,
|
|
244663
244637
|
"mdast-util-mdx-jsx:end-tag-mismatch"
|
|
244664
244638
|
);
|
|
244665
244639
|
}
|
|
@@ -244704,15 +244678,15 @@ function mdxJsxToMarkdown(options) {
|
|
|
244704
244678
|
const tracker = track(safeOptions);
|
|
244705
244679
|
const selfClosing = node.name && (!node.children || node.children.length === 0);
|
|
244706
244680
|
const exit2 = context.enter(node.type);
|
|
244707
|
-
let
|
|
244681
|
+
let index2 = -1;
|
|
244708
244682
|
const serializedAttributes = [];
|
|
244709
244683
|
let value = tracker.move("<" + (node.name || ""));
|
|
244710
244684
|
if (node.attributes && node.attributes.length > 0) {
|
|
244711
244685
|
if (!node.name) {
|
|
244712
244686
|
throw new Error("Cannot serialize fragment w/ attributes");
|
|
244713
244687
|
}
|
|
244714
|
-
while (++
|
|
244715
|
-
const attribute = node.attributes[
|
|
244688
|
+
while (++index2 < node.attributes.length) {
|
|
244689
|
+
const attribute = node.attributes[index2];
|
|
244716
244690
|
let result;
|
|
244717
244691
|
if (attribute.type === "mdxJsxExpressionAttribute") {
|
|
244718
244692
|
result = "{" + (attribute.value || "") + "}";
|
|
@@ -245059,10 +245033,10 @@ function mdxJsxFromMarkdown2({ patterns }) {
|
|
|
245059
245033
|
if (!tag)
|
|
245060
245034
|
return;
|
|
245061
245035
|
const place = closing ? " before the end of `" + closing.type + "`" : "";
|
|
245062
|
-
const
|
|
245036
|
+
const position2 = closing ? { start: closing.start, end: closing.end } : void 0;
|
|
245063
245037
|
throw new VFileMessage(
|
|
245064
245038
|
"Expected a closing tag for `" + serializeAbbreviatedTag(tag) + "` (" + stringifyPosition({ start: open.start, end: open.end }) + ")" + place,
|
|
245065
|
-
|
|
245039
|
+
position2,
|
|
245066
245040
|
"mdast-util-mdx-jsx:end-tag-mismatch"
|
|
245067
245041
|
);
|
|
245068
245042
|
};
|
|
@@ -245145,15 +245119,15 @@ var mdxJsxToMarkdown2 = function(options) {
|
|
|
245145
245119
|
const tracker = track(safeOptions);
|
|
245146
245120
|
const selfClosing = pattern.leaf;
|
|
245147
245121
|
const exit2 = context.enter(node.type);
|
|
245148
|
-
let
|
|
245122
|
+
let index2 = -1;
|
|
245149
245123
|
const serializedAttributes = [];
|
|
245150
245124
|
let value = tracker.move(pattern.start + " " + (patternName || ""));
|
|
245151
245125
|
if (node.attributes && node.attributes.length > 0) {
|
|
245152
245126
|
if (!node.name) {
|
|
245153
245127
|
throw new Error("Cannot serialize fragment w/ attributes");
|
|
245154
245128
|
}
|
|
245155
|
-
while (++
|
|
245156
|
-
const attribute = node.attributes[
|
|
245129
|
+
while (++index2 < node.attributes.length) {
|
|
245130
|
+
const attribute = node.attributes[index2];
|
|
245157
245131
|
let result;
|
|
245158
245132
|
if ((attribute == null ? void 0 : attribute.type) === "mdxJsxExpressionAttribute") {
|
|
245159
245133
|
result = "{" + (attribute.value || "") + "}";
|
|
@@ -245688,11 +245662,11 @@ var eat2 = (c, field, imageCallback) => {
|
|
|
245688
245662
|
}
|
|
245689
245663
|
}
|
|
245690
245664
|
let nonMatchingSiblingIndex = 0;
|
|
245691
|
-
if (content4.slice(1).every((content5,
|
|
245665
|
+
if (content4.slice(1).every((content5, index2) => {
|
|
245692
245666
|
if (matches(marks, getMarks(content5))) {
|
|
245693
245667
|
return true;
|
|
245694
245668
|
} else {
|
|
245695
|
-
nonMatchingSiblingIndex =
|
|
245669
|
+
nonMatchingSiblingIndex = index2;
|
|
245696
245670
|
return false;
|
|
245697
245671
|
}
|
|
245698
245672
|
})) {
|
|
@@ -245702,9 +245676,9 @@ var eat2 = (c, field, imageCallback) => {
|
|
|
245702
245676
|
const markCounts = {};
|
|
245703
245677
|
marks.forEach((mark) => {
|
|
245704
245678
|
let count2 = 1;
|
|
245705
|
-
matchingSiblings.every((sibling,
|
|
245679
|
+
matchingSiblings.every((sibling, index2) => {
|
|
245706
245680
|
if (getMarks(sibling).includes(mark)) {
|
|
245707
|
-
count2 =
|
|
245681
|
+
count2 = index2 + 1;
|
|
245708
245682
|
return true;
|
|
245709
245683
|
}
|
|
245710
245684
|
});
|
|
@@ -246534,11 +246508,11 @@ var eat3 = (c, field, imageCallback) => {
|
|
|
246534
246508
|
}
|
|
246535
246509
|
}
|
|
246536
246510
|
let nonMatchingSiblingIndex = 0;
|
|
246537
|
-
if (content4.slice(1).every((content5,
|
|
246511
|
+
if (content4.slice(1).every((content5, index2) => {
|
|
246538
246512
|
if (matches2(marks, getMarks(content5))) {
|
|
246539
246513
|
return true;
|
|
246540
246514
|
} else {
|
|
246541
|
-
nonMatchingSiblingIndex =
|
|
246515
|
+
nonMatchingSiblingIndex = index2;
|
|
246542
246516
|
return false;
|
|
246543
246517
|
}
|
|
246544
246518
|
})) {
|
|
@@ -246548,9 +246522,9 @@ var eat3 = (c, field, imageCallback) => {
|
|
|
246548
246522
|
const markCounts = {};
|
|
246549
246523
|
marks.forEach((mark) => {
|
|
246550
246524
|
let count2 = 1;
|
|
246551
|
-
matchingSiblings.every((sibling,
|
|
246525
|
+
matchingSiblings.every((sibling, index2) => {
|
|
246552
246526
|
if (getMarks(sibling).includes(mark)) {
|
|
246553
|
-
count2 =
|
|
246527
|
+
count2 = index2 + 1;
|
|
246554
246528
|
return true;
|
|
246555
246529
|
}
|
|
246556
246530
|
});
|
|
@@ -246866,18 +246840,18 @@ function initializeDocument2(effects) {
|
|
|
246866
246840
|
}
|
|
246867
246841
|
const indexBeforeExits = self2.events.length;
|
|
246868
246842
|
let indexBeforeFlow = indexBeforeExits;
|
|
246869
|
-
let
|
|
246843
|
+
let point3;
|
|
246870
246844
|
while (indexBeforeFlow--) {
|
|
246871
246845
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
246872
|
-
|
|
246846
|
+
point3 = self2.events[indexBeforeFlow][1].end;
|
|
246873
246847
|
break;
|
|
246874
246848
|
}
|
|
246875
246849
|
}
|
|
246876
246850
|
exitContainers(continued);
|
|
246877
|
-
let
|
|
246878
|
-
while (
|
|
246879
|
-
self2.events[
|
|
246880
|
-
|
|
246851
|
+
let index2 = indexBeforeExits;
|
|
246852
|
+
while (index2 < self2.events.length) {
|
|
246853
|
+
self2.events[index2][1].end = Object.assign({}, point3);
|
|
246854
|
+
index2++;
|
|
246881
246855
|
}
|
|
246882
246856
|
splice(
|
|
246883
246857
|
self2.events,
|
|
@@ -246885,7 +246859,7 @@ function initializeDocument2(effects) {
|
|
|
246885
246859
|
0,
|
|
246886
246860
|
self2.events.slice(indexBeforeExits)
|
|
246887
246861
|
);
|
|
246888
|
-
self2.events.length =
|
|
246862
|
+
self2.events.length = index2;
|
|
246889
246863
|
return checkNewContainers(code2);
|
|
246890
246864
|
}
|
|
246891
246865
|
return start3(code2);
|
|
@@ -246977,30 +246951,30 @@ function initializeDocument2(effects) {
|
|
|
246977
246951
|
childFlow.defineSkip(token.start);
|
|
246978
246952
|
childFlow.write(stream);
|
|
246979
246953
|
if (self2.parser.lazy[token.start.line]) {
|
|
246980
|
-
let
|
|
246981
|
-
while (
|
|
246982
|
-
if (childFlow.events[
|
|
246954
|
+
let index2 = childFlow.events.length;
|
|
246955
|
+
while (index2--) {
|
|
246956
|
+
if (childFlow.events[index2][1].start.offset < lineStartOffset && (!childFlow.events[index2][1].end || childFlow.events[index2][1].end.offset > lineStartOffset)) {
|
|
246983
246957
|
return;
|
|
246984
246958
|
}
|
|
246985
246959
|
}
|
|
246986
246960
|
const indexBeforeExits = self2.events.length;
|
|
246987
246961
|
let indexBeforeFlow = indexBeforeExits;
|
|
246988
246962
|
let seen;
|
|
246989
|
-
let
|
|
246963
|
+
let point3;
|
|
246990
246964
|
while (indexBeforeFlow--) {
|
|
246991
246965
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
246992
246966
|
if (seen) {
|
|
246993
|
-
|
|
246967
|
+
point3 = self2.events[indexBeforeFlow][1].end;
|
|
246994
246968
|
break;
|
|
246995
246969
|
}
|
|
246996
246970
|
seen = true;
|
|
246997
246971
|
}
|
|
246998
246972
|
}
|
|
246999
246973
|
exitContainers(continued);
|
|
247000
|
-
|
|
247001
|
-
while (
|
|
247002
|
-
self2.events[
|
|
247003
|
-
|
|
246974
|
+
index2 = indexBeforeExits;
|
|
246975
|
+
while (index2 < self2.events.length) {
|
|
246976
|
+
self2.events[index2][1].end = Object.assign({}, point3);
|
|
246977
|
+
index2++;
|
|
247004
246978
|
}
|
|
247005
246979
|
splice(
|
|
247006
246980
|
self2.events,
|
|
@@ -247008,13 +246982,13 @@ function initializeDocument2(effects) {
|
|
|
247008
246982
|
0,
|
|
247009
246983
|
self2.events.slice(indexBeforeExits)
|
|
247010
246984
|
);
|
|
247011
|
-
self2.events.length =
|
|
246985
|
+
self2.events.length = index2;
|
|
247012
246986
|
}
|
|
247013
246987
|
}
|
|
247014
246988
|
function exitContainers(size) {
|
|
247015
|
-
let
|
|
247016
|
-
while (
|
|
247017
|
-
const entry = stack[
|
|
246989
|
+
let index2 = stack.length;
|
|
246990
|
+
while (index2-- > size) {
|
|
246991
|
+
const entry = stack[index2];
|
|
247018
246992
|
self2.containerState = entry[1];
|
|
247019
246993
|
entry[0].exit.call(self2, effects);
|
|
247020
246994
|
}
|
|
@@ -247127,10 +247101,10 @@ function initializeFactory2(field) {
|
|
|
247127
247101
|
return true;
|
|
247128
247102
|
}
|
|
247129
247103
|
const list3 = constructs2[code2];
|
|
247130
|
-
let
|
|
247104
|
+
let index2 = -1;
|
|
247131
247105
|
if (list3) {
|
|
247132
|
-
while (++
|
|
247133
|
-
const item = list3[
|
|
247106
|
+
while (++index2 < list3.length) {
|
|
247107
|
+
const item = list3[index2];
|
|
247134
247108
|
if (!item.previous || item.previous.call(self2, self2.previous)) {
|
|
247135
247109
|
return true;
|
|
247136
247110
|
}
|
|
@@ -247143,19 +247117,19 @@ function initializeFactory2(field) {
|
|
|
247143
247117
|
function createResolver2(extraResolver) {
|
|
247144
247118
|
return resolveAllText;
|
|
247145
247119
|
function resolveAllText(events, context) {
|
|
247146
|
-
let
|
|
247120
|
+
let index2 = -1;
|
|
247147
247121
|
let enter;
|
|
247148
|
-
while (++
|
|
247122
|
+
while (++index2 <= events.length) {
|
|
247149
247123
|
if (enter === void 0) {
|
|
247150
|
-
if (events[
|
|
247151
|
-
enter =
|
|
247152
|
-
|
|
247124
|
+
if (events[index2] && events[index2][1].type === "data") {
|
|
247125
|
+
enter = index2;
|
|
247126
|
+
index2++;
|
|
247153
247127
|
}
|
|
247154
|
-
} else if (!events[
|
|
247155
|
-
if (
|
|
247156
|
-
events[enter][1].end = events[
|
|
247157
|
-
events.splice(enter + 2,
|
|
247158
|
-
|
|
247128
|
+
} else if (!events[index2] || events[index2][1].type !== "data") {
|
|
247129
|
+
if (index2 !== enter + 2) {
|
|
247130
|
+
events[enter][1].end = events[index2 - 1][1].end;
|
|
247131
|
+
events.splice(enter + 2, index2 - enter - 2);
|
|
247132
|
+
index2 = enter + 2;
|
|
247159
247133
|
}
|
|
247160
247134
|
enter = void 0;
|
|
247161
247135
|
}
|
|
@@ -247169,12 +247143,12 @@ function resolveAllLineSuffixes2(events, context) {
|
|
|
247169
247143
|
if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
|
|
247170
247144
|
const data3 = events[eventIndex - 1][1];
|
|
247171
247145
|
const chunks = context.sliceStream(data3);
|
|
247172
|
-
let
|
|
247146
|
+
let index2 = chunks.length;
|
|
247173
247147
|
let bufferIndex = -1;
|
|
247174
247148
|
let size = 0;
|
|
247175
247149
|
let tabs;
|
|
247176
|
-
while (
|
|
247177
|
-
const chunk = chunks[
|
|
247150
|
+
while (index2--) {
|
|
247151
|
+
const chunk = chunks[index2];
|
|
247178
247152
|
if (typeof chunk === "string") {
|
|
247179
247153
|
bufferIndex = chunk.length;
|
|
247180
247154
|
while (chunk.charCodeAt(bufferIndex - 1) === 32) {
|
|
@@ -247189,7 +247163,7 @@ function resolveAllLineSuffixes2(events, context) {
|
|
|
247189
247163
|
size++;
|
|
247190
247164
|
} else if (chunk === -1) {
|
|
247191
247165
|
} else {
|
|
247192
|
-
|
|
247166
|
+
index2++;
|
|
247193
247167
|
break;
|
|
247194
247168
|
}
|
|
247195
247169
|
}
|
|
@@ -247200,8 +247174,8 @@ function resolveAllLineSuffixes2(events, context) {
|
|
|
247200
247174
|
line: data3.end.line,
|
|
247201
247175
|
column: data3.end.column - size,
|
|
247202
247176
|
offset: data3.end.offset - size,
|
|
247203
|
-
_index: data3.start._index +
|
|
247204
|
-
_bufferIndex:
|
|
247177
|
+
_index: data3.start._index + index2,
|
|
247178
|
+
_bufferIndex: index2 ? bufferIndex : data3.start._bufferIndex + bufferIndex
|
|
247205
247179
|
},
|
|
247206
247180
|
end: Object.assign({}, data3.end)
|
|
247207
247181
|
};
|
|
@@ -247226,7 +247200,7 @@ function resolveAllLineSuffixes2(events, context) {
|
|
|
247226
247200
|
|
|
247227
247201
|
// ../../../node_modules/.pnpm/micromark@3.1.0/node_modules/micromark/lib/create-tokenizer.js
|
|
247228
247202
|
function createTokenizer2(parser, initialize, from) {
|
|
247229
|
-
let
|
|
247203
|
+
let point3 = Object.assign(
|
|
247230
247204
|
from ? Object.assign({}, from) : {
|
|
247231
247205
|
line: 1,
|
|
247232
247206
|
column: 1,
|
|
@@ -247287,7 +247261,7 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247287
247261
|
return sliceChunks2(chunks, token);
|
|
247288
247262
|
}
|
|
247289
247263
|
function now() {
|
|
247290
|
-
return Object.assign({},
|
|
247264
|
+
return Object.assign({}, point3);
|
|
247291
247265
|
}
|
|
247292
247266
|
function defineSkip(value) {
|
|
247293
247267
|
columnStart[value.line] = value.column;
|
|
@@ -247295,15 +247269,15 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247295
247269
|
}
|
|
247296
247270
|
function main() {
|
|
247297
247271
|
let chunkIndex;
|
|
247298
|
-
while (
|
|
247299
|
-
const chunk = chunks[
|
|
247272
|
+
while (point3._index < chunks.length) {
|
|
247273
|
+
const chunk = chunks[point3._index];
|
|
247300
247274
|
if (typeof chunk === "string") {
|
|
247301
|
-
chunkIndex =
|
|
247302
|
-
if (
|
|
247303
|
-
|
|
247275
|
+
chunkIndex = point3._index;
|
|
247276
|
+
if (point3._bufferIndex < 0) {
|
|
247277
|
+
point3._bufferIndex = 0;
|
|
247304
247278
|
}
|
|
247305
|
-
while (
|
|
247306
|
-
go(chunk.charCodeAt(
|
|
247279
|
+
while (point3._index === chunkIndex && point3._bufferIndex < chunk.length) {
|
|
247280
|
+
go(chunk.charCodeAt(point3._bufferIndex));
|
|
247307
247281
|
}
|
|
247308
247282
|
} else {
|
|
247309
247283
|
go(chunk);
|
|
@@ -247317,21 +247291,21 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247317
247291
|
}
|
|
247318
247292
|
function consume(code2) {
|
|
247319
247293
|
if (markdownLineEnding(code2)) {
|
|
247320
|
-
|
|
247321
|
-
|
|
247322
|
-
|
|
247294
|
+
point3.line++;
|
|
247295
|
+
point3.column = 1;
|
|
247296
|
+
point3.offset += code2 === -3 ? 2 : 1;
|
|
247323
247297
|
accountForPotentialSkip();
|
|
247324
247298
|
} else if (code2 !== -1) {
|
|
247325
|
-
|
|
247326
|
-
|
|
247299
|
+
point3.column++;
|
|
247300
|
+
point3.offset++;
|
|
247327
247301
|
}
|
|
247328
|
-
if (
|
|
247329
|
-
|
|
247302
|
+
if (point3._bufferIndex < 0) {
|
|
247303
|
+
point3._index++;
|
|
247330
247304
|
} else {
|
|
247331
|
-
|
|
247332
|
-
if (
|
|
247333
|
-
|
|
247334
|
-
|
|
247305
|
+
point3._bufferIndex++;
|
|
247306
|
+
if (point3._bufferIndex === chunks[point3._index].length) {
|
|
247307
|
+
point3._bufferIndex = -1;
|
|
247308
|
+
point3._index++;
|
|
247335
247309
|
}
|
|
247336
247310
|
}
|
|
247337
247311
|
context.previous = code2;
|
|
@@ -247446,7 +247420,7 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247446
247420
|
from: startEventsIndex
|
|
247447
247421
|
};
|
|
247448
247422
|
function restore() {
|
|
247449
|
-
|
|
247423
|
+
point3 = startPoint;
|
|
247450
247424
|
context.previous = startPrevious;
|
|
247451
247425
|
context.currentConstruct = startCurrentConstruct;
|
|
247452
247426
|
context.events.length = startEventsIndex;
|
|
@@ -247455,9 +247429,9 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247455
247429
|
}
|
|
247456
247430
|
}
|
|
247457
247431
|
function accountForPotentialSkip() {
|
|
247458
|
-
if (
|
|
247459
|
-
|
|
247460
|
-
|
|
247432
|
+
if (point3.line in columnStart && point3.column < 2) {
|
|
247433
|
+
point3.column = columnStart[point3.line];
|
|
247434
|
+
point3.offset += columnStart[point3.line] - 1;
|
|
247461
247435
|
}
|
|
247462
247436
|
}
|
|
247463
247437
|
}
|
|
@@ -247481,11 +247455,11 @@ function sliceChunks2(chunks, token) {
|
|
|
247481
247455
|
return view;
|
|
247482
247456
|
}
|
|
247483
247457
|
function serializeChunks2(chunks, expandTabs) {
|
|
247484
|
-
let
|
|
247458
|
+
let index2 = -1;
|
|
247485
247459
|
const result = [];
|
|
247486
247460
|
let atTab;
|
|
247487
|
-
while (++
|
|
247488
|
-
const chunk = chunks[
|
|
247461
|
+
while (++index2 < chunks.length) {
|
|
247462
|
+
const chunk = chunks[index2];
|
|
247489
247463
|
let value;
|
|
247490
247464
|
if (typeof chunk === "string") {
|
|
247491
247465
|
value = chunk;
|
|
@@ -247842,29 +247816,29 @@ function compiler2(options) {
|
|
|
247842
247816
|
getData
|
|
247843
247817
|
};
|
|
247844
247818
|
const listStack = [];
|
|
247845
|
-
let
|
|
247846
|
-
while (++
|
|
247847
|
-
if (events[
|
|
247848
|
-
if (events[
|
|
247849
|
-
listStack.push(
|
|
247819
|
+
let index2 = -1;
|
|
247820
|
+
while (++index2 < events.length) {
|
|
247821
|
+
if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
|
|
247822
|
+
if (events[index2][0] === "enter") {
|
|
247823
|
+
listStack.push(index2);
|
|
247850
247824
|
} else {
|
|
247851
247825
|
const tail = listStack.pop();
|
|
247852
|
-
|
|
247826
|
+
index2 = prepareList(events, tail, index2);
|
|
247853
247827
|
}
|
|
247854
247828
|
}
|
|
247855
247829
|
}
|
|
247856
|
-
|
|
247857
|
-
while (++
|
|
247858
|
-
const handler = config[events[
|
|
247859
|
-
if (own7.call(handler, events[
|
|
247860
|
-
handler[events[
|
|
247830
|
+
index2 = -1;
|
|
247831
|
+
while (++index2 < events.length) {
|
|
247832
|
+
const handler = config[events[index2][0]];
|
|
247833
|
+
if (own7.call(handler, events[index2][1].type)) {
|
|
247834
|
+
handler[events[index2][1].type].call(
|
|
247861
247835
|
Object.assign(
|
|
247862
247836
|
{
|
|
247863
|
-
sliceSerialize: events[
|
|
247837
|
+
sliceSerialize: events[index2][2].sliceSerialize
|
|
247864
247838
|
},
|
|
247865
247839
|
context
|
|
247866
247840
|
),
|
|
247867
|
-
events[
|
|
247841
|
+
events[index2][1]
|
|
247868
247842
|
);
|
|
247869
247843
|
}
|
|
247870
247844
|
}
|
|
@@ -247874,14 +247848,14 @@ function compiler2(options) {
|
|
|
247874
247848
|
handler.call(context, void 0, tail[0]);
|
|
247875
247849
|
}
|
|
247876
247850
|
tree.position = {
|
|
247877
|
-
start:
|
|
247851
|
+
start: point2(
|
|
247878
247852
|
events.length > 0 ? events[0][1].start : {
|
|
247879
247853
|
line: 1,
|
|
247880
247854
|
column: 1,
|
|
247881
247855
|
offset: 0
|
|
247882
247856
|
}
|
|
247883
247857
|
),
|
|
247884
|
-
end:
|
|
247858
|
+
end: point2(
|
|
247885
247859
|
events.length > 0 ? events[events.length - 2][1].end : {
|
|
247886
247860
|
line: 1,
|
|
247887
247861
|
column: 1,
|
|
@@ -247889,22 +247863,22 @@ function compiler2(options) {
|
|
|
247889
247863
|
}
|
|
247890
247864
|
)
|
|
247891
247865
|
};
|
|
247892
|
-
|
|
247893
|
-
while (++
|
|
247894
|
-
tree = config.transforms[
|
|
247866
|
+
index2 = -1;
|
|
247867
|
+
while (++index2 < config.transforms.length) {
|
|
247868
|
+
tree = config.transforms[index2](tree) || tree;
|
|
247895
247869
|
}
|
|
247896
247870
|
return tree;
|
|
247897
247871
|
}
|
|
247898
247872
|
function prepareList(events, start3, length) {
|
|
247899
|
-
let
|
|
247873
|
+
let index2 = start3 - 1;
|
|
247900
247874
|
let containerBalance = -1;
|
|
247901
247875
|
let listSpread = false;
|
|
247902
247876
|
let listItem3;
|
|
247903
247877
|
let lineIndex;
|
|
247904
247878
|
let firstBlankLineIndex;
|
|
247905
247879
|
let atMarker;
|
|
247906
|
-
while (++
|
|
247907
|
-
const event = events[
|
|
247880
|
+
while (++index2 <= length) {
|
|
247881
|
+
const event = events[index2];
|
|
247908
247882
|
if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") {
|
|
247909
247883
|
if (event[0] === "enter") {
|
|
247910
247884
|
containerBalance++;
|
|
@@ -247915,7 +247889,7 @@ function compiler2(options) {
|
|
|
247915
247889
|
} else if (event[1].type === "lineEndingBlank") {
|
|
247916
247890
|
if (event[0] === "enter") {
|
|
247917
247891
|
if (listItem3 && !atMarker && !containerBalance && !firstBlankLineIndex) {
|
|
247918
|
-
firstBlankLineIndex =
|
|
247892
|
+
firstBlankLineIndex = index2;
|
|
247919
247893
|
}
|
|
247920
247894
|
atMarker = void 0;
|
|
247921
247895
|
}
|
|
@@ -247925,7 +247899,7 @@ function compiler2(options) {
|
|
|
247925
247899
|
}
|
|
247926
247900
|
if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
|
|
247927
247901
|
if (listItem3) {
|
|
247928
|
-
let tailIndex =
|
|
247902
|
+
let tailIndex = index2;
|
|
247929
247903
|
lineIndex = void 0;
|
|
247930
247904
|
while (tailIndex--) {
|
|
247931
247905
|
const tailEvent = events[tailIndex];
|
|
@@ -247950,8 +247924,8 @@ function compiler2(options) {
|
|
|
247950
247924
|
{},
|
|
247951
247925
|
lineIndex ? events[lineIndex][1].start : event[1].end
|
|
247952
247926
|
);
|
|
247953
|
-
events.splice(lineIndex ||
|
|
247954
|
-
|
|
247927
|
+
events.splice(lineIndex || index2, 0, ["exit", listItem3, event[2]]);
|
|
247928
|
+
index2++;
|
|
247955
247929
|
length++;
|
|
247956
247930
|
}
|
|
247957
247931
|
if (event[1].type === "listItemPrefix") {
|
|
@@ -247960,8 +247934,8 @@ function compiler2(options) {
|
|
|
247960
247934
|
_spread: false,
|
|
247961
247935
|
start: Object.assign({}, event[1].start)
|
|
247962
247936
|
};
|
|
247963
|
-
events.splice(
|
|
247964
|
-
|
|
247937
|
+
events.splice(index2, 0, ["enter", listItem3, event[2]]);
|
|
247938
|
+
index2++;
|
|
247965
247939
|
length++;
|
|
247966
247940
|
firstBlankLineIndex = void 0;
|
|
247967
247941
|
atMarker = true;
|
|
@@ -247997,7 +247971,7 @@ function compiler2(options) {
|
|
|
247997
247971
|
this.stack.push(node);
|
|
247998
247972
|
this.tokenStack.push([token, errorHandler]);
|
|
247999
247973
|
node.position = {
|
|
248000
|
-
start:
|
|
247974
|
+
start: point2(token.start)
|
|
248001
247975
|
};
|
|
248002
247976
|
return node;
|
|
248003
247977
|
}
|
|
@@ -248027,7 +248001,7 @@ function compiler2(options) {
|
|
|
248027
248001
|
handler.call(this, token, open[0]);
|
|
248028
248002
|
}
|
|
248029
248003
|
}
|
|
248030
|
-
node.position.end =
|
|
248004
|
+
node.position.end = point2(token.end);
|
|
248031
248005
|
return node;
|
|
248032
248006
|
}
|
|
248033
248007
|
function resume() {
|
|
@@ -248111,7 +248085,7 @@ function compiler2(options) {
|
|
|
248111
248085
|
if (!tail || tail.type !== "text") {
|
|
248112
248086
|
tail = text8();
|
|
248113
248087
|
tail.position = {
|
|
248114
|
-
start:
|
|
248088
|
+
start: point2(token.start)
|
|
248115
248089
|
};
|
|
248116
248090
|
node.children.push(tail);
|
|
248117
248091
|
}
|
|
@@ -248120,13 +248094,13 @@ function compiler2(options) {
|
|
|
248120
248094
|
function onexitdata(token) {
|
|
248121
248095
|
const tail = this.stack.pop();
|
|
248122
248096
|
tail.value += this.sliceSerialize(token);
|
|
248123
|
-
tail.position.end =
|
|
248097
|
+
tail.position.end = point2(token.end);
|
|
248124
248098
|
}
|
|
248125
248099
|
function onexitlineending(token) {
|
|
248126
248100
|
const context = this.stack[this.stack.length - 1];
|
|
248127
248101
|
if (getData("atHardBreak")) {
|
|
248128
248102
|
const tail = context.children[context.children.length - 1];
|
|
248129
|
-
tail.position.end =
|
|
248103
|
+
tail.position.end = point2(token.end);
|
|
248130
248104
|
setData("atHardBreak");
|
|
248131
248105
|
return;
|
|
248132
248106
|
}
|
|
@@ -248243,7 +248217,7 @@ function compiler2(options) {
|
|
|
248243
248217
|
}
|
|
248244
248218
|
const tail = this.stack.pop();
|
|
248245
248219
|
tail.value += value;
|
|
248246
|
-
tail.position.end =
|
|
248220
|
+
tail.position.end = point2(token.end);
|
|
248247
248221
|
}
|
|
248248
248222
|
function onexitautolinkprotocol(token) {
|
|
248249
248223
|
onexitdata.call(this, token);
|
|
@@ -248365,7 +248339,7 @@ function compiler2(options) {
|
|
|
248365
248339
|
};
|
|
248366
248340
|
}
|
|
248367
248341
|
}
|
|
248368
|
-
function
|
|
248342
|
+
function point2(d) {
|
|
248369
248343
|
return {
|
|
248370
248344
|
line: d.line,
|
|
248371
248345
|
column: d.column,
|
|
@@ -248373,9 +248347,9 @@ function point3(d) {
|
|
|
248373
248347
|
};
|
|
248374
248348
|
}
|
|
248375
248349
|
function configure3(combined, extensions) {
|
|
248376
|
-
let
|
|
248377
|
-
while (++
|
|
248378
|
-
const value = extensions[
|
|
248350
|
+
let index2 = -1;
|
|
248351
|
+
while (++index2 < extensions.length) {
|
|
248352
|
+
const value = extensions[index2];
|
|
248379
248353
|
if (Array.isArray(value)) {
|
|
248380
248354
|
configure3(combined, value);
|
|
248381
248355
|
} else {
|
|
@@ -252297,11 +252271,11 @@ types$12.backQuote.updateContext = function() {
|
|
|
252297
252271
|
};
|
|
252298
252272
|
types$12.star.updateContext = function(prevType) {
|
|
252299
252273
|
if (prevType === types$12._function) {
|
|
252300
|
-
var
|
|
252301
|
-
if (this.context[
|
|
252302
|
-
this.context[
|
|
252274
|
+
var index2 = this.context.length - 1;
|
|
252275
|
+
if (this.context[index2] === types3.f_expr) {
|
|
252276
|
+
this.context[index2] = types3.f_expr_gen;
|
|
252303
252277
|
} else {
|
|
252304
|
-
this.context[
|
|
252278
|
+
this.context[index2] = types3.f_gen;
|
|
252305
252279
|
}
|
|
252306
252280
|
}
|
|
252307
252281
|
this.exprAllowed = true;
|
|
@@ -254918,11 +254892,11 @@ pp2.tryReadTemplateToken = function() {
|
|
|
254918
254892
|
}
|
|
254919
254893
|
this.inTemplateElement = false;
|
|
254920
254894
|
};
|
|
254921
|
-
pp2.invalidStringToken = function(
|
|
254895
|
+
pp2.invalidStringToken = function(position2, message) {
|
|
254922
254896
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
|
|
254923
254897
|
throw INVALID_TEMPLATE_ESCAPE_ERROR2;
|
|
254924
254898
|
} else {
|
|
254925
|
-
this.raise(
|
|
254899
|
+
this.raise(position2, message);
|
|
254926
254900
|
}
|
|
254927
254901
|
};
|
|
254928
254902
|
pp2.readTmplToken = function() {
|
|
@@ -255140,7 +255114,7 @@ function tokenizer3(input, options) {
|
|
|
255140
255114
|
var fromMarkdown3 = (value, field) => {
|
|
255141
255115
|
const patterns = getFieldPatterns(field);
|
|
255142
255116
|
const acornDefault = acorn_exports;
|
|
255143
|
-
|
|
255117
|
+
const skipHTML = false;
|
|
255144
255118
|
const tree = fromMarkdown2(value, {
|
|
255145
255119
|
extensions: [
|
|
255146
255120
|
mdxJsx2({ acorn: acornDefault, patterns, addResult: true, skipHTML })
|
|
@@ -255152,9 +255126,9 @@ var fromMarkdown3 = (value, field) => {
|
|
|
255152
255126
|
|
|
255153
255127
|
// ../../../node_modules/.pnpm/mdast-util-compact@4.1.1/node_modules/mdast-util-compact/lib/index.js
|
|
255154
255128
|
function compact(tree) {
|
|
255155
|
-
visit(tree, function(child,
|
|
255156
|
-
if (parent &&
|
|
255157
|
-
const previous2 = parent.children[
|
|
255129
|
+
visit(tree, function(child, index2, parent) {
|
|
255130
|
+
if (parent && index2 && (child.type === "text" || child.type === "blockquote")) {
|
|
255131
|
+
const previous2 = parent.children[index2 - 1];
|
|
255158
255132
|
if (previous2.type === child.type) {
|
|
255159
255133
|
if ("value" in child) {
|
|
255160
255134
|
previous2.value += child.value;
|
|
@@ -255162,11 +255136,11 @@ function compact(tree) {
|
|
|
255162
255136
|
if ("children" in child) {
|
|
255163
255137
|
previous2.children = previous2.children.concat(child.children);
|
|
255164
255138
|
}
|
|
255165
|
-
parent.children.splice(
|
|
255139
|
+
parent.children.splice(index2, 1);
|
|
255166
255140
|
if (previous2.position && child.position) {
|
|
255167
255141
|
previous2.position.end = child.position.end;
|
|
255168
255142
|
}
|
|
255169
|
-
return
|
|
255143
|
+
return index2;
|
|
255170
255144
|
}
|
|
255171
255145
|
}
|
|
255172
255146
|
});
|
|
@@ -255260,9 +255234,9 @@ var isArguments_default = isArguments;
|
|
|
255260
255234
|
|
|
255261
255235
|
// ../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayPush.js
|
|
255262
255236
|
function arrayPush(array, values2) {
|
|
255263
|
-
var
|
|
255264
|
-
while (++
|
|
255265
|
-
array[offset3 +
|
|
255237
|
+
var index2 = -1, length = values2.length, offset3 = array.length;
|
|
255238
|
+
while (++index2 < length) {
|
|
255239
|
+
array[offset3 + index2] = values2[index2];
|
|
255266
255240
|
}
|
|
255267
255241
|
return array;
|
|
255268
255242
|
}
|
|
@@ -255277,11 +255251,11 @@ var isFlattenable_default = isFlattenable;
|
|
|
255277
255251
|
|
|
255278
255252
|
// ../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFlatten.js
|
|
255279
255253
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
255280
|
-
var
|
|
255254
|
+
var index2 = -1, length = array.length;
|
|
255281
255255
|
predicate || (predicate = isFlattenable_default);
|
|
255282
255256
|
result || (result = []);
|
|
255283
|
-
while (++
|
|
255284
|
-
var value = array[
|
|
255257
|
+
while (++index2 < length) {
|
|
255258
|
+
var value = array[index2];
|
|
255285
255259
|
if (depth > 0 && predicate(value)) {
|
|
255286
255260
|
if (depth > 1) {
|
|
255287
255261
|
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
@@ -255491,18 +255465,18 @@ var trimFragments = (string5) => {
|
|
|
255491
255465
|
const rawArr = string5.split("\n");
|
|
255492
255466
|
let openingFragmentIndex = null;
|
|
255493
255467
|
let closingFragmentIndex = null;
|
|
255494
|
-
rawArr.forEach((item,
|
|
255468
|
+
rawArr.forEach((item, index2) => {
|
|
255495
255469
|
if (item.trim() === "<>") {
|
|
255496
255470
|
if (!openingFragmentIndex) {
|
|
255497
|
-
openingFragmentIndex =
|
|
255471
|
+
openingFragmentIndex = index2 + 1;
|
|
255498
255472
|
}
|
|
255499
255473
|
}
|
|
255500
255474
|
});
|
|
255501
|
-
rawArr.reverse().forEach((item,
|
|
255475
|
+
rawArr.reverse().forEach((item, index2) => {
|
|
255502
255476
|
if (item.trim() === "</>") {
|
|
255503
255477
|
const length = rawArr.length - 1;
|
|
255504
255478
|
if (!closingFragmentIndex) {
|
|
255505
|
-
closingFragmentIndex = length -
|
|
255479
|
+
closingFragmentIndex = length - index2;
|
|
255506
255480
|
}
|
|
255507
255481
|
}
|
|
255508
255482
|
});
|
|
@@ -255515,12 +255489,12 @@ var search3 = /\r?\n|\r/g;
|
|
|
255515
255489
|
function source(value, file) {
|
|
255516
255490
|
const doc = String(file);
|
|
255517
255491
|
const loc = location(file);
|
|
255518
|
-
const
|
|
255519
|
-
if (!
|
|
255492
|
+
const position2 = value && typeof value === "object" ? "type" in value ? value.position : value : void 0;
|
|
255493
|
+
if (!position2 || !position2.start || !position2.end) {
|
|
255520
255494
|
return null;
|
|
255521
255495
|
}
|
|
255522
|
-
const endOffset = loc.toOffset(
|
|
255523
|
-
let startOffset = loc.toOffset(
|
|
255496
|
+
const endOffset = loc.toOffset(position2.end);
|
|
255497
|
+
let startOffset = loc.toOffset(position2.start);
|
|
255524
255498
|
if (endOffset === -1 || startOffset === -1) {
|
|
255525
255499
|
return null;
|
|
255526
255500
|
}
|
|
@@ -255766,13 +255740,13 @@ var remarkToSlate = (root3, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
255766
255740
|
child.position
|
|
255767
255741
|
);
|
|
255768
255742
|
default:
|
|
255769
|
-
let
|
|
255743
|
+
let position2;
|
|
255770
255744
|
if (child.type !== "containerDirective") {
|
|
255771
|
-
|
|
255745
|
+
position2 = child.position;
|
|
255772
255746
|
}
|
|
255773
255747
|
throw new RichTextParseError(
|
|
255774
255748
|
`Unknown list item of type ${child.type}`,
|
|
255775
|
-
|
|
255749
|
+
position2
|
|
255776
255750
|
);
|
|
255777
255751
|
}
|
|
255778
255752
|
})
|
|
@@ -255998,13 +255972,13 @@ var remarkToSlate = (root3, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
255998
255972
|
};
|
|
255999
255973
|
var RichTextParseError = class extends Error {
|
|
256000
255974
|
position;
|
|
256001
|
-
constructor(message,
|
|
255975
|
+
constructor(message, position2) {
|
|
256002
255976
|
super(message);
|
|
256003
255977
|
if (Error.captureStackTrace) {
|
|
256004
255978
|
Error.captureStackTrace(this, RichTextParseError);
|
|
256005
255979
|
}
|
|
256006
255980
|
this.name = "RichTextParseError";
|
|
256007
|
-
this.position =
|
|
255981
|
+
this.position = position2;
|
|
256008
255982
|
}
|
|
256009
255983
|
};
|
|
256010
255984
|
|