@aws/nx-plugin-mcp 1.0.0-rc.32 → 1.0.0-rc.34
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/bin/aws-nx-mcp.js +1444 -1348
- package/docs/guides/connection/py-agent-rdb.mdx +162 -0
- package/docs/guides/connection/py-fast-api-rdb.mdx +170 -0
- package/docs/guides/connection/py-mcp-server-rdb.mdx +171 -0
- package/docs/guides/connection/smithy-rdb.mdx +1 -1
- package/docs/guides/connection/trpc-rdb.mdx +1 -1
- package/docs/guides/connection/ts-agent-rdb.mdx +45 -16
- package/docs/guides/connection/ts-mcp-server-rdb.mdx +45 -11
- package/docs/guides/connection.mdx +28 -1
- package/docs/guides/py-rdb.mdx +250 -0
- package/docs/guides/ts-rdb.mdx +48 -483
- package/docs/snippets/connection/py-lambda-rdb-ssl-requirements.mdx +7 -0
- package/docs/snippets/connection/rdb-api-infrastructure.mdx +36 -15
- package/docs/snippets/rdb/architecture.mdx +38 -0
- package/docs/snippets/rdb/cluster-instances.mdx +31 -0
- package/docs/snippets/rdb/deletion-protection.mdx +34 -0
- package/docs/snippets/rdb/deploying.mdx +107 -0
- package/docs/snippets/rdb/encryption-key-rotation.mdx +30 -0
- package/docs/snippets/rdb/engine-version.mdx +63 -0
- package/docs/snippets/rdb/infrastructure.mdx +35 -0
- package/docs/snippets/rdb/logging.mdx +32 -0
- package/docs/snippets/rdb/rds-proxy.mdx +50 -0
- package/docs/snippets/rdb/removal-policy.mdx +57 -0
- package/docs/snippets/rdb/serverless-capacity.mdx +32 -0
- package/generators.json +27 -0
- package/package.json +1 -1
- package/src/preset/schema.json +6 -0
- package/src/py/rdb/agent-connection/schema.json +27 -0
- package/src/py/rdb/fast-api-connection/schema.json +23 -0
- package/src/py/rdb/mcp-server-connection/schema.json +27 -0
- package/src/py/rdb/schema.json +77 -0
- package/src/ts/rdb/schema.json +1 -1
- /package/docs/snippets/connection/{lambda-rdb-ssl-requirements.mdx → ts-lambda-rdb-ssl-requirements.mdx} +0 -0
- /package/docs/snippets/connection/{mcp-server-rdb-ssl-requirements.mdx → ts-mcp-server-rdb-ssl-requirements.mdx} +0 -0
package/bin/aws-nx-mcp.js
CHANGED
|
@@ -4275,11 +4275,12 @@ const ZodObject$1 = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
|
|
|
4275
4275
|
});
|
|
4276
4276
|
});
|
|
4277
4277
|
function object$1(shape, params) {
|
|
4278
|
-
|
|
4278
|
+
const def = {
|
|
4279
4279
|
type: "object",
|
|
4280
4280
|
shape: shape ?? {},
|
|
4281
4281
|
...normalizeParams(params)
|
|
4282
|
-
}
|
|
4282
|
+
};
|
|
4283
|
+
return new ZodObject$1(def);
|
|
4283
4284
|
}
|
|
4284
4285
|
function looseObject(shape, params) {
|
|
4285
4286
|
return new ZodObject$1({
|
|
@@ -4378,9 +4379,10 @@ const ZodEnum$1 = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
|
|
|
4378
4379
|
};
|
|
4379
4380
|
});
|
|
4380
4381
|
function _enum(values, params) {
|
|
4382
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
|
|
4381
4383
|
return new ZodEnum$1({
|
|
4382
4384
|
type: "enum",
|
|
4383
|
-
entries
|
|
4385
|
+
entries,
|
|
4384
4386
|
...normalizeParams(params)
|
|
4385
4387
|
});
|
|
4386
4388
|
}
|
|
@@ -7062,11 +7064,12 @@ var ZodType = class {
|
|
|
7062
7064
|
data,
|
|
7063
7065
|
parsedType: getParsedType(data)
|
|
7064
7066
|
};
|
|
7065
|
-
|
|
7067
|
+
const result = this._parseSync({
|
|
7066
7068
|
data,
|
|
7067
7069
|
path: ctx.path,
|
|
7068
7070
|
parent: ctx
|
|
7069
|
-
})
|
|
7071
|
+
});
|
|
7072
|
+
return handleResult(ctx, result);
|
|
7070
7073
|
}
|
|
7071
7074
|
"~validate"(data) {
|
|
7072
7075
|
const ctx = {
|
|
@@ -7123,7 +7126,8 @@ var ZodType = class {
|
|
|
7123
7126
|
path: ctx.path,
|
|
7124
7127
|
parent: ctx
|
|
7125
7128
|
});
|
|
7126
|
-
|
|
7129
|
+
const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
|
|
7130
|
+
return handleResult(ctx, result);
|
|
7127
7131
|
}
|
|
7128
7132
|
refine(check, message) {
|
|
7129
7133
|
const getIssueProperties = (val) => {
|
|
@@ -10140,11 +10144,12 @@ const ZodMiniObject = /*@__PURE__*/ $constructor("ZodMiniObject", (inst, def) =>
|
|
|
10140
10144
|
});
|
|
10141
10145
|
// @__NO_SIDE_EFFECTS__
|
|
10142
10146
|
function object(shape, params) {
|
|
10143
|
-
|
|
10147
|
+
const def = {
|
|
10144
10148
|
type: "object",
|
|
10145
10149
|
shape: shape ?? {},
|
|
10146
10150
|
...normalizeParams(params)
|
|
10147
|
-
}
|
|
10151
|
+
};
|
|
10152
|
+
return new ZodMiniObject(def);
|
|
10148
10153
|
}
|
|
10149
10154
|
//#endregion
|
|
10150
10155
|
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
@@ -20199,6 +20204,33 @@ var generators$1 = {
|
|
|
20199
20204
|
"description": "Connect a py#mcp-server to a py#dynamodb project",
|
|
20200
20205
|
"metric": "g55",
|
|
20201
20206
|
"hidden": true
|
|
20207
|
+
},
|
|
20208
|
+
"py#rdb": {
|
|
20209
|
+
"factory": "./src/py/rdb/generator",
|
|
20210
|
+
"schema": "./src/py/rdb/schema.json",
|
|
20211
|
+
"description": "Create a Python relational database project",
|
|
20212
|
+
"metric": "g56"
|
|
20213
|
+
},
|
|
20214
|
+
"py#rdb#fast-api-connection": {
|
|
20215
|
+
"factory": "./src/py/rdb/fast-api-connection/generator",
|
|
20216
|
+
"schema": "./src/py/rdb/fast-api-connection/schema.json",
|
|
20217
|
+
"description": "Connect a py#fast-api project to a py#rdb project",
|
|
20218
|
+
"metric": "g57",
|
|
20219
|
+
"hidden": true
|
|
20220
|
+
},
|
|
20221
|
+
"py#rdb#agent-connection": {
|
|
20222
|
+
"factory": "./src/py/rdb/agent-connection/generator",
|
|
20223
|
+
"schema": "./src/py/rdb/agent-connection/schema.json",
|
|
20224
|
+
"description": "Connect a py#agent to a py#rdb project",
|
|
20225
|
+
"metric": "g58",
|
|
20226
|
+
"hidden": true
|
|
20227
|
+
},
|
|
20228
|
+
"py#rdb#mcp-server-connection": {
|
|
20229
|
+
"factory": "./src/py/rdb/mcp-server-connection/generator",
|
|
20230
|
+
"schema": "./src/py/rdb/mcp-server-connection/schema.json",
|
|
20231
|
+
"description": "Connect a py#mcp-server to a py#rdb project",
|
|
20232
|
+
"metric": "g59",
|
|
20233
|
+
"hidden": true
|
|
20202
20234
|
}
|
|
20203
20235
|
};
|
|
20204
20236
|
//#endregion
|
|
@@ -20279,13 +20311,14 @@ const buildInstallCommand = (pm, pkg, dev) => {
|
|
|
20279
20311
|
* The package manager is auto-detected by @aws/create-nx-workspace from the
|
|
20280
20312
|
* invoking command, so --pm is not needed.
|
|
20281
20313
|
*/
|
|
20282
|
-
const buildCreateNxWorkspaceCommand = (pm, workspace, iac, tag) => {
|
|
20314
|
+
const buildCreateNxWorkspaceCommand = (pm, workspace, iac, tag, module) => {
|
|
20283
20315
|
return [
|
|
20284
20316
|
PACKAGE_MANAGER_COMMANDS[pm]?.create ?? `${pm} create`,
|
|
20285
20317
|
tag ? `@aws/nx-workspace@${tag}` : "@aws/nx-workspace",
|
|
20286
20318
|
...pm === "npm" ? ["--"] : [],
|
|
20287
20319
|
workspace,
|
|
20288
|
-
...iac ? [`--iac=${iac}`] : []
|
|
20320
|
+
...iac ? [`--iac=${iac}`] : [],
|
|
20321
|
+
...module ? [`--module=${module}`] : []
|
|
20289
20322
|
].join(" ");
|
|
20290
20323
|
};
|
|
20291
20324
|
//#endregion
|
|
@@ -20353,19 +20386,53 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
20353
20386
|
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
20354
20387
|
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
20355
20388
|
/** Used to compose unicode character classes. */
|
|
20356
|
-
var rsAstralRange = "\\ud800-\\udfff"
|
|
20389
|
+
var rsAstralRange = "\\ud800-\\udfff";
|
|
20390
|
+
var rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23";
|
|
20391
|
+
var rsComboSymbolsRange = "\\u20d0-\\u20f0";
|
|
20392
|
+
var rsDingbatRange = "\\u2700-\\u27bf";
|
|
20393
|
+
var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
|
|
20394
|
+
var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
|
|
20395
|
+
var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
|
|
20396
|
+
var rsPunctuationRange = "\\u2000-\\u206f";
|
|
20397
|
+
var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
|
|
20398
|
+
var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
|
|
20399
|
+
var rsVarRange = "\\ufe0e\\ufe0f";
|
|
20400
|
+
var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
20357
20401
|
/** Used to compose unicode capture groups. */
|
|
20358
|
-
var rsApos = "['’]"
|
|
20402
|
+
var rsApos = "['’]";
|
|
20403
|
+
var rsAstral = "[" + rsAstralRange + "]";
|
|
20404
|
+
var rsBreak = "[" + rsBreakRange + "]";
|
|
20405
|
+
var rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]";
|
|
20406
|
+
var rsDigits = "\\d+";
|
|
20407
|
+
var rsDingbat = "[" + rsDingbatRange + "]";
|
|
20408
|
+
var rsLower = "[" + rsLowerRange + "]";
|
|
20409
|
+
var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
|
|
20410
|
+
var rsFitz = "\\ud83c[\\udffb-\\udfff]";
|
|
20411
|
+
var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
|
|
20412
|
+
var rsNonAstral = "[^" + rsAstralRange + "]";
|
|
20413
|
+
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
20414
|
+
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
20415
|
+
var rsUpper = "[" + rsUpperRange + "]";
|
|
20416
|
+
var rsZWJ = "\\u200d";
|
|
20359
20417
|
/** Used to compose unicode regexes. */
|
|
20360
|
-
var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")"
|
|
20418
|
+
var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")";
|
|
20419
|
+
var rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")";
|
|
20420
|
+
var rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
|
|
20421
|
+
var rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
|
|
20422
|
+
var reOptMod = rsModifier + "?";
|
|
20423
|
+
var rsOptVar = "[" + rsVarRange + "]?";
|
|
20424
|
+
var rsOptJoin = "(?:" + rsZWJ + "(?:" + [
|
|
20361
20425
|
rsNonAstral,
|
|
20362
20426
|
rsRegional,
|
|
20363
20427
|
rsSurrPair
|
|
20364
|
-
].join("|") + ")" + rsOptVar + reOptMod + ")*"
|
|
20428
|
+
].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
20429
|
+
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
20430
|
+
var rsEmoji = "(?:" + [
|
|
20365
20431
|
rsDingbat,
|
|
20366
20432
|
rsRegional,
|
|
20367
20433
|
rsSurrPair
|
|
20368
|
-
].join("|") + ")" + rsSeq
|
|
20434
|
+
].join("|") + ")" + rsSeq;
|
|
20435
|
+
var rsSymbol = "(?:" + [
|
|
20369
20436
|
rsNonAstral + rsCombo + "?",
|
|
20370
20437
|
rsCombo,
|
|
20371
20438
|
rsRegional,
|
|
@@ -20719,7 +20786,8 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
20719
20786
|
/** Built-in value references. */
|
|
20720
20787
|
var Symbol = root.Symbol;
|
|
20721
20788
|
/** Used to convert symbols to primitives and strings. */
|
|
20722
|
-
var symbolProto = Symbol ? Symbol.prototype : void 0
|
|
20789
|
+
var symbolProto = Symbol ? Symbol.prototype : void 0;
|
|
20790
|
+
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
20723
20791
|
/**
|
|
20724
20792
|
* The base implementation of `_.slice` without an iteratee call guard.
|
|
20725
20793
|
*
|
|
@@ -21217,7 +21285,8 @@ var require_lodash_deburr = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
21217
21285
|
/** Built-in value references. */
|
|
21218
21286
|
var Symbol = root.Symbol;
|
|
21219
21287
|
/** Used to convert symbols to primitives and strings. */
|
|
21220
|
-
var symbolProto = Symbol ? Symbol.prototype : void 0
|
|
21288
|
+
var symbolProto = Symbol ? Symbol.prototype : void 0;
|
|
21289
|
+
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
21221
21290
|
/**
|
|
21222
21291
|
* The base implementation of `_.toString` which doesn't convert nullish
|
|
21223
21292
|
* values to empty strings.
|
|
@@ -21368,7 +21437,8 @@ const renderSchema = (schema) => {
|
|
|
21368
21437
|
*/
|
|
21369
21438
|
const renderGeneratorCommand = (generatorId, schema, packageManager) => {
|
|
21370
21439
|
const required = new Set(schema.required ?? []);
|
|
21371
|
-
|
|
21440
|
+
const args = Object.keys(schema.properties ?? {}).filter((k) => required.has(k)).map((k) => `--${k}=<${k}>`).join(" ");
|
|
21441
|
+
return `\`\`\`bash\n${buildNxCommand(`g @aws/nx-plugin:${generatorId} --no-interactive ${args}`, packageManager)}\n\`\`\``;
|
|
21372
21442
|
};
|
|
21373
21443
|
//#endregion
|
|
21374
21444
|
//#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/dist/js-yaml.mjs
|
|
@@ -25905,1267 +25975,6 @@ var init_mdast_util_to_string = __esmMin((() => {
|
|
|
25905
25975
|
init_lib$21();
|
|
25906
25976
|
}));
|
|
25907
25977
|
//#endregion
|
|
25908
|
-
//#region ../../node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.js
|
|
25909
|
-
/**
|
|
25910
|
-
* Like `Array#splice`, but smarter for giant arrays.
|
|
25911
|
-
*
|
|
25912
|
-
* `Array#splice` takes all items to be inserted as individual argument which
|
|
25913
|
-
* causes a stack overflow in V8 when trying to insert 100k items for instance.
|
|
25914
|
-
*
|
|
25915
|
-
* Otherwise, this does not return the removed items, and takes `items` as an
|
|
25916
|
-
* array instead of rest parameters.
|
|
25917
|
-
*
|
|
25918
|
-
* @template {unknown} T
|
|
25919
|
-
* Item type.
|
|
25920
|
-
* @param {Array<T>} list
|
|
25921
|
-
* List to operate on.
|
|
25922
|
-
* @param {number} start
|
|
25923
|
-
* Index to remove/insert at (can be negative).
|
|
25924
|
-
* @param {number} remove
|
|
25925
|
-
* Number of items to remove.
|
|
25926
|
-
* @param {Array<T>} items
|
|
25927
|
-
* Items to inject into `list`.
|
|
25928
|
-
* @returns {undefined}
|
|
25929
|
-
* Nothing.
|
|
25930
|
-
*/
|
|
25931
|
-
function splice(list, start, remove, items) {
|
|
25932
|
-
const end = list.length;
|
|
25933
|
-
let chunkStart = 0;
|
|
25934
|
-
/** @type {Array<unknown>} */
|
|
25935
|
-
let parameters;
|
|
25936
|
-
if (start < 0) start = -start > end ? 0 : end + start;
|
|
25937
|
-
else start = start > end ? end : start;
|
|
25938
|
-
remove = remove > 0 ? remove : 0;
|
|
25939
|
-
if (items.length < 1e4) {
|
|
25940
|
-
parameters = Array.from(items);
|
|
25941
|
-
parameters.unshift(start, remove);
|
|
25942
|
-
list.splice(...parameters);
|
|
25943
|
-
} else {
|
|
25944
|
-
if (remove) list.splice(start, remove);
|
|
25945
|
-
while (chunkStart < items.length) {
|
|
25946
|
-
parameters = items.slice(chunkStart, chunkStart + 1e4);
|
|
25947
|
-
parameters.unshift(start, 0);
|
|
25948
|
-
list.splice(...parameters);
|
|
25949
|
-
chunkStart += 1e4;
|
|
25950
|
-
start += 1e4;
|
|
25951
|
-
}
|
|
25952
|
-
}
|
|
25953
|
-
}
|
|
25954
|
-
/**
|
|
25955
|
-
* Append `items` (an array) at the end of `list` (another array).
|
|
25956
|
-
* When `list` was empty, returns `items` instead.
|
|
25957
|
-
*
|
|
25958
|
-
* This prevents a potentially expensive operation when `list` is empty,
|
|
25959
|
-
* and adds items in batches to prevent V8 from hanging.
|
|
25960
|
-
*
|
|
25961
|
-
* @template {unknown} T
|
|
25962
|
-
* Item type.
|
|
25963
|
-
* @param {Array<T>} list
|
|
25964
|
-
* List to operate on.
|
|
25965
|
-
* @param {Array<T>} items
|
|
25966
|
-
* Items to add to `list`.
|
|
25967
|
-
* @returns {Array<T>}
|
|
25968
|
-
* Either `list` or `items`.
|
|
25969
|
-
*/
|
|
25970
|
-
function push(list, items) {
|
|
25971
|
-
if (list.length > 0) {
|
|
25972
|
-
splice(list, list.length, 0, items);
|
|
25973
|
-
return list;
|
|
25974
|
-
}
|
|
25975
|
-
return items;
|
|
25976
|
-
}
|
|
25977
|
-
var init_micromark_util_chunked = __esmMin((() => {}));
|
|
25978
|
-
//#endregion
|
|
25979
|
-
//#region ../../node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
|
|
25980
|
-
/**
|
|
25981
|
-
* Combine multiple syntax extensions into one.
|
|
25982
|
-
*
|
|
25983
|
-
* @param {ReadonlyArray<Extension>} extensions
|
|
25984
|
-
* List of syntax extensions.
|
|
25985
|
-
* @returns {NormalizedExtension}
|
|
25986
|
-
* A single combined extension.
|
|
25987
|
-
*/
|
|
25988
|
-
function combineExtensions(extensions) {
|
|
25989
|
-
/** @type {NormalizedExtension} */
|
|
25990
|
-
const all = {};
|
|
25991
|
-
let index = -1;
|
|
25992
|
-
while (++index < extensions.length) syntaxExtension(all, extensions[index]);
|
|
25993
|
-
return all;
|
|
25994
|
-
}
|
|
25995
|
-
/**
|
|
25996
|
-
* Merge `extension` into `all`.
|
|
25997
|
-
*
|
|
25998
|
-
* @param {NormalizedExtension} all
|
|
25999
|
-
* Extension to merge into.
|
|
26000
|
-
* @param {Extension} extension
|
|
26001
|
-
* Extension to merge.
|
|
26002
|
-
* @returns {undefined}
|
|
26003
|
-
* Nothing.
|
|
26004
|
-
*/
|
|
26005
|
-
function syntaxExtension(all, extension) {
|
|
26006
|
-
/** @type {keyof Extension} */
|
|
26007
|
-
let hook;
|
|
26008
|
-
for (hook in extension) {
|
|
26009
|
-
/** @type {Record<string, unknown>} */
|
|
26010
|
-
const left = (hasOwnProperty$1.call(all, hook) ? all[hook] : void 0) || (all[hook] = {});
|
|
26011
|
-
/** @type {Record<string, unknown> | undefined} */
|
|
26012
|
-
const right = extension[hook];
|
|
26013
|
-
/** @type {string} */
|
|
26014
|
-
let code;
|
|
26015
|
-
if (right) for (code in right) {
|
|
26016
|
-
if (!hasOwnProperty$1.call(left, code)) left[code] = [];
|
|
26017
|
-
const value = right[code];
|
|
26018
|
-
constructs(left[code], Array.isArray(value) ? value : value ? [value] : []);
|
|
26019
|
-
}
|
|
26020
|
-
}
|
|
26021
|
-
}
|
|
26022
|
-
/**
|
|
26023
|
-
* Merge `list` into `existing` (both lists of constructs).
|
|
26024
|
-
* Mutates `existing`.
|
|
26025
|
-
*
|
|
26026
|
-
* @param {Array<unknown>} existing
|
|
26027
|
-
* List of constructs to merge into.
|
|
26028
|
-
* @param {Array<unknown>} list
|
|
26029
|
-
* List of constructs to merge.
|
|
26030
|
-
* @returns {undefined}
|
|
26031
|
-
* Nothing.
|
|
26032
|
-
*/
|
|
26033
|
-
function constructs(existing, list) {
|
|
26034
|
-
let index = -1;
|
|
26035
|
-
/** @type {Array<unknown>} */
|
|
26036
|
-
const before = [];
|
|
26037
|
-
while (++index < list.length) (list[index].add === "after" ? existing : before).push(list[index]);
|
|
26038
|
-
splice(existing, 0, 0, before);
|
|
26039
|
-
}
|
|
26040
|
-
var hasOwnProperty$1;
|
|
26041
|
-
var init_micromark_util_combine_extensions = __esmMin((() => {
|
|
26042
|
-
init_micromark_util_chunked();
|
|
26043
|
-
hasOwnProperty$1 = {}.hasOwnProperty;
|
|
26044
|
-
}));
|
|
26045
|
-
//#endregion
|
|
26046
|
-
//#region ../../node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js
|
|
26047
|
-
/**
|
|
26048
|
-
* Check whether a character code is an ASCII control character.
|
|
26049
|
-
*
|
|
26050
|
-
* An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
|
|
26051
|
-
* to U+001F (US), or U+007F (DEL).
|
|
26052
|
-
*
|
|
26053
|
-
* @param {Code} code
|
|
26054
|
-
* Code.
|
|
26055
|
-
* @returns {boolean}
|
|
26056
|
-
* Whether it matches.
|
|
26057
|
-
*/
|
|
26058
|
-
function asciiControl(code) {
|
|
26059
|
-
return code !== null && (code < 32 || code === 127);
|
|
26060
|
-
}
|
|
26061
|
-
/**
|
|
26062
|
-
* Check whether a character code is a markdown line ending.
|
|
26063
|
-
*
|
|
26064
|
-
* A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
|
|
26065
|
-
* LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
|
|
26066
|
-
*
|
|
26067
|
-
* In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
|
|
26068
|
-
* RETURN (CR) are replaced by these virtual characters depending on whether
|
|
26069
|
-
* they occurred together.
|
|
26070
|
-
*
|
|
26071
|
-
* @param {Code} code
|
|
26072
|
-
* Code.
|
|
26073
|
-
* @returns {boolean}
|
|
26074
|
-
* Whether it matches.
|
|
26075
|
-
*/
|
|
26076
|
-
function markdownLineEnding(code) {
|
|
26077
|
-
return code !== null && code < -2;
|
|
26078
|
-
}
|
|
26079
|
-
/**
|
|
26080
|
-
* Check whether a character code is a markdown line ending (see
|
|
26081
|
-
* `markdownLineEnding`) or markdown space (see `markdownSpace`).
|
|
26082
|
-
*
|
|
26083
|
-
* @param {Code} code
|
|
26084
|
-
* Code.
|
|
26085
|
-
* @returns {boolean}
|
|
26086
|
-
* Whether it matches.
|
|
26087
|
-
*/
|
|
26088
|
-
function markdownLineEndingOrSpace(code) {
|
|
26089
|
-
return code !== null && (code < 0 || code === 32);
|
|
26090
|
-
}
|
|
26091
|
-
/**
|
|
26092
|
-
* Check whether a character code is a markdown space.
|
|
26093
|
-
*
|
|
26094
|
-
* A **markdown space** is the concrete character U+0020 SPACE (SP) and the
|
|
26095
|
-
* virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
|
|
26096
|
-
*
|
|
26097
|
-
* In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
|
|
26098
|
-
* replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
|
|
26099
|
-
* SPACE (VS) characters, depending on the column at which the tab occurred.
|
|
26100
|
-
*
|
|
26101
|
-
* @param {Code} code
|
|
26102
|
-
* Code.
|
|
26103
|
-
* @returns {boolean}
|
|
26104
|
-
* Whether it matches.
|
|
26105
|
-
*/
|
|
26106
|
-
function markdownSpace(code) {
|
|
26107
|
-
return code === -2 || code === -1 || code === 32;
|
|
26108
|
-
}
|
|
26109
|
-
/**
|
|
26110
|
-
* Create a code check from a regex.
|
|
26111
|
-
*
|
|
26112
|
-
* @param {RegExp} regex
|
|
26113
|
-
* Expression.
|
|
26114
|
-
* @returns {(code: Code) => boolean}
|
|
26115
|
-
* Check.
|
|
26116
|
-
*/
|
|
26117
|
-
function regexCheck(regex) {
|
|
26118
|
-
return check;
|
|
26119
|
-
/**
|
|
26120
|
-
* Check whether a code matches the bound regex.
|
|
26121
|
-
*
|
|
26122
|
-
* @param {Code} code
|
|
26123
|
-
* Character code.
|
|
26124
|
-
* @returns {boolean}
|
|
26125
|
-
* Whether the character code matches the bound regex.
|
|
26126
|
-
*/
|
|
26127
|
-
function check(code) {
|
|
26128
|
-
return code !== null && code > -1 && regex.test(String.fromCharCode(code));
|
|
26129
|
-
}
|
|
26130
|
-
}
|
|
26131
|
-
var asciiAlpha, asciiAlphanumeric, asciiAtext, asciiDigit, asciiHexDigit, asciiPunctuation, unicodePunctuation, unicodeWhitespace;
|
|
26132
|
-
var init_micromark_util_character = __esmMin((() => {
|
|
26133
|
-
asciiAlpha = regexCheck(/[A-Za-z]/);
|
|
26134
|
-
asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
|
|
26135
|
-
asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
|
|
26136
|
-
asciiDigit = regexCheck(/\d/);
|
|
26137
|
-
asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
|
|
26138
|
-
asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
|
|
26139
|
-
unicodePunctuation = regexCheck(/\p{P}|\p{S}/u);
|
|
26140
|
-
unicodeWhitespace = regexCheck(/\s/);
|
|
26141
|
-
}));
|
|
26142
|
-
//#endregion
|
|
26143
|
-
//#region ../../node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js
|
|
26144
|
-
/**
|
|
26145
|
-
* Parse spaces and tabs.
|
|
26146
|
-
*
|
|
26147
|
-
* There is no `nok` parameter:
|
|
26148
|
-
*
|
|
26149
|
-
* * spaces in markdown are often optional, in which case this factory can be
|
|
26150
|
-
* used and `ok` will be switched to whether spaces were found or not
|
|
26151
|
-
* * one line ending or space can be detected with `markdownSpace(code)` right
|
|
26152
|
-
* before using `factorySpace`
|
|
26153
|
-
*
|
|
26154
|
-
* ###### Examples
|
|
26155
|
-
*
|
|
26156
|
-
* Where `␉` represents a tab (plus how much it expands) and `␠` represents a
|
|
26157
|
-
* single space.
|
|
26158
|
-
*
|
|
26159
|
-
* ```markdown
|
|
26160
|
-
* ␉
|
|
26161
|
-
* ␠␠␠␠
|
|
26162
|
-
* ␉␠
|
|
26163
|
-
* ```
|
|
26164
|
-
*
|
|
26165
|
-
* @param {Effects} effects
|
|
26166
|
-
* Context.
|
|
26167
|
-
* @param {State} ok
|
|
26168
|
-
* State switched to when successful.
|
|
26169
|
-
* @param {TokenType} type
|
|
26170
|
-
* Type (`' \t'`).
|
|
26171
|
-
* @param {number | undefined} [max=Infinity]
|
|
26172
|
-
* Max (exclusive).
|
|
26173
|
-
* @returns {State}
|
|
26174
|
-
* Start state.
|
|
26175
|
-
*/
|
|
26176
|
-
function factorySpace(effects, ok, type, max) {
|
|
26177
|
-
const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
|
|
26178
|
-
let size = 0;
|
|
26179
|
-
return start;
|
|
26180
|
-
/** @type {State} */
|
|
26181
|
-
function start(code) {
|
|
26182
|
-
if (markdownSpace(code)) {
|
|
26183
|
-
effects.enter(type);
|
|
26184
|
-
return prefix(code);
|
|
26185
|
-
}
|
|
26186
|
-
return ok(code);
|
|
26187
|
-
}
|
|
26188
|
-
/** @type {State} */
|
|
26189
|
-
function prefix(code) {
|
|
26190
|
-
if (markdownSpace(code) && size++ < limit) {
|
|
26191
|
-
effects.consume(code);
|
|
26192
|
-
return prefix;
|
|
26193
|
-
}
|
|
26194
|
-
effects.exit(type);
|
|
26195
|
-
return ok(code);
|
|
26196
|
-
}
|
|
26197
|
-
}
|
|
26198
|
-
var init_micromark_factory_space = __esmMin((() => {
|
|
26199
|
-
init_micromark_util_character();
|
|
26200
|
-
}));
|
|
26201
|
-
//#endregion
|
|
26202
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js
|
|
26203
|
-
/**
|
|
26204
|
-
* @this {TokenizeContext}
|
|
26205
|
-
* Context.
|
|
26206
|
-
* @type {Initializer}
|
|
26207
|
-
* Content.
|
|
26208
|
-
*/
|
|
26209
|
-
function initializeContent(effects) {
|
|
26210
|
-
const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
|
|
26211
|
-
/** @type {Token} */
|
|
26212
|
-
let previous;
|
|
26213
|
-
return contentStart;
|
|
26214
|
-
/** @type {State} */
|
|
26215
|
-
function afterContentStartConstruct(code) {
|
|
26216
|
-
if (code === null) {
|
|
26217
|
-
effects.consume(code);
|
|
26218
|
-
return;
|
|
26219
|
-
}
|
|
26220
|
-
effects.enter("lineEnding");
|
|
26221
|
-
effects.consume(code);
|
|
26222
|
-
effects.exit("lineEnding");
|
|
26223
|
-
return factorySpace(effects, contentStart, "linePrefix");
|
|
26224
|
-
}
|
|
26225
|
-
/** @type {State} */
|
|
26226
|
-
function paragraphInitial(code) {
|
|
26227
|
-
effects.enter("paragraph");
|
|
26228
|
-
return lineStart(code);
|
|
26229
|
-
}
|
|
26230
|
-
/** @type {State} */
|
|
26231
|
-
function lineStart(code) {
|
|
26232
|
-
const token = effects.enter("chunkText", {
|
|
26233
|
-
contentType: "text",
|
|
26234
|
-
previous
|
|
26235
|
-
});
|
|
26236
|
-
if (previous) previous.next = token;
|
|
26237
|
-
previous = token;
|
|
26238
|
-
return data(code);
|
|
26239
|
-
}
|
|
26240
|
-
/** @type {State} */
|
|
26241
|
-
function data(code) {
|
|
26242
|
-
if (code === null) {
|
|
26243
|
-
effects.exit("chunkText");
|
|
26244
|
-
effects.exit("paragraph");
|
|
26245
|
-
effects.consume(code);
|
|
26246
|
-
return;
|
|
26247
|
-
}
|
|
26248
|
-
if (markdownLineEnding(code)) {
|
|
26249
|
-
effects.consume(code);
|
|
26250
|
-
effects.exit("chunkText");
|
|
26251
|
-
return lineStart;
|
|
26252
|
-
}
|
|
26253
|
-
effects.consume(code);
|
|
26254
|
-
return data;
|
|
26255
|
-
}
|
|
26256
|
-
}
|
|
26257
|
-
var content$1;
|
|
26258
|
-
var init_content$1 = __esmMin((() => {
|
|
26259
|
-
init_micromark_factory_space();
|
|
26260
|
-
init_micromark_util_character();
|
|
26261
|
-
content$1 = { tokenize: initializeContent };
|
|
26262
|
-
}));
|
|
26263
|
-
//#endregion
|
|
26264
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.js
|
|
26265
|
-
/**
|
|
26266
|
-
* @this {TokenizeContext}
|
|
26267
|
-
* Self.
|
|
26268
|
-
* @type {Initializer}
|
|
26269
|
-
* Initializer.
|
|
26270
|
-
*/
|
|
26271
|
-
function initializeDocument(effects) {
|
|
26272
|
-
const self = this;
|
|
26273
|
-
/** @type {Array<StackItem>} */
|
|
26274
|
-
const stack = [];
|
|
26275
|
-
let continued = 0;
|
|
26276
|
-
/** @type {TokenizeContext | undefined} */
|
|
26277
|
-
let childFlow;
|
|
26278
|
-
/** @type {Token | undefined} */
|
|
26279
|
-
let childToken;
|
|
26280
|
-
/** @type {number} */
|
|
26281
|
-
let lineStartOffset;
|
|
26282
|
-
return start;
|
|
26283
|
-
/** @type {State} */
|
|
26284
|
-
function start(code) {
|
|
26285
|
-
if (continued < stack.length) {
|
|
26286
|
-
const item = stack[continued];
|
|
26287
|
-
self.containerState = item[1];
|
|
26288
|
-
return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);
|
|
26289
|
-
}
|
|
26290
|
-
return checkNewContainers(code);
|
|
26291
|
-
}
|
|
26292
|
-
/** @type {State} */
|
|
26293
|
-
function documentContinue(code) {
|
|
26294
|
-
continued++;
|
|
26295
|
-
if (self.containerState._closeFlow) {
|
|
26296
|
-
self.containerState._closeFlow = void 0;
|
|
26297
|
-
if (childFlow) closeFlow();
|
|
26298
|
-
const indexBeforeExits = self.events.length;
|
|
26299
|
-
let indexBeforeFlow = indexBeforeExits;
|
|
26300
|
-
/** @type {Point | undefined} */
|
|
26301
|
-
let point;
|
|
26302
|
-
while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
26303
|
-
point = self.events[indexBeforeFlow][1].end;
|
|
26304
|
-
break;
|
|
26305
|
-
}
|
|
26306
|
-
exitContainers(continued);
|
|
26307
|
-
let index = indexBeforeExits;
|
|
26308
|
-
while (index < self.events.length) {
|
|
26309
|
-
self.events[index][1].end = { ...point };
|
|
26310
|
-
index++;
|
|
26311
|
-
}
|
|
26312
|
-
splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
26313
|
-
self.events.length = index;
|
|
26314
|
-
return checkNewContainers(code);
|
|
26315
|
-
}
|
|
26316
|
-
return start(code);
|
|
26317
|
-
}
|
|
26318
|
-
/** @type {State} */
|
|
26319
|
-
function checkNewContainers(code) {
|
|
26320
|
-
if (continued === stack.length) {
|
|
26321
|
-
if (!childFlow) return documentContinued(code);
|
|
26322
|
-
if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) return flowStart(code);
|
|
26323
|
-
self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);
|
|
26324
|
-
}
|
|
26325
|
-
self.containerState = {};
|
|
26326
|
-
return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);
|
|
26327
|
-
}
|
|
26328
|
-
/** @type {State} */
|
|
26329
|
-
function thereIsANewContainer(code) {
|
|
26330
|
-
if (childFlow) closeFlow();
|
|
26331
|
-
exitContainers(continued);
|
|
26332
|
-
return documentContinued(code);
|
|
26333
|
-
}
|
|
26334
|
-
/** @type {State} */
|
|
26335
|
-
function thereIsNoNewContainer(code) {
|
|
26336
|
-
self.parser.lazy[self.now().line] = continued !== stack.length;
|
|
26337
|
-
lineStartOffset = self.now().offset;
|
|
26338
|
-
return flowStart(code);
|
|
26339
|
-
}
|
|
26340
|
-
/** @type {State} */
|
|
26341
|
-
function documentContinued(code) {
|
|
26342
|
-
self.containerState = {};
|
|
26343
|
-
return effects.attempt(containerConstruct, containerContinue, flowStart)(code);
|
|
26344
|
-
}
|
|
26345
|
-
/** @type {State} */
|
|
26346
|
-
function containerContinue(code) {
|
|
26347
|
-
continued++;
|
|
26348
|
-
stack.push([self.currentConstruct, self.containerState]);
|
|
26349
|
-
return documentContinued(code);
|
|
26350
|
-
}
|
|
26351
|
-
/** @type {State} */
|
|
26352
|
-
function flowStart(code) {
|
|
26353
|
-
if (code === null) {
|
|
26354
|
-
if (childFlow) closeFlow();
|
|
26355
|
-
exitContainers(0);
|
|
26356
|
-
effects.consume(code);
|
|
26357
|
-
return;
|
|
26358
|
-
}
|
|
26359
|
-
childFlow = childFlow || self.parser.flow(self.now());
|
|
26360
|
-
effects.enter("chunkFlow", {
|
|
26361
|
-
_tokenizer: childFlow,
|
|
26362
|
-
contentType: "flow",
|
|
26363
|
-
previous: childToken
|
|
26364
|
-
});
|
|
26365
|
-
return flowContinue(code);
|
|
26366
|
-
}
|
|
26367
|
-
/** @type {State} */
|
|
26368
|
-
function flowContinue(code) {
|
|
26369
|
-
if (code === null) {
|
|
26370
|
-
writeToChild(effects.exit("chunkFlow"), true);
|
|
26371
|
-
exitContainers(0);
|
|
26372
|
-
effects.consume(code);
|
|
26373
|
-
return;
|
|
26374
|
-
}
|
|
26375
|
-
if (markdownLineEnding(code)) {
|
|
26376
|
-
effects.consume(code);
|
|
26377
|
-
writeToChild(effects.exit("chunkFlow"));
|
|
26378
|
-
continued = 0;
|
|
26379
|
-
self.interrupt = void 0;
|
|
26380
|
-
return start;
|
|
26381
|
-
}
|
|
26382
|
-
effects.consume(code);
|
|
26383
|
-
return flowContinue;
|
|
26384
|
-
}
|
|
26385
|
-
/**
|
|
26386
|
-
* @param {Token} token
|
|
26387
|
-
* Token.
|
|
26388
|
-
* @param {boolean | undefined} [endOfFile]
|
|
26389
|
-
* Whether the token is at the end of the file (default: `false`).
|
|
26390
|
-
* @returns {undefined}
|
|
26391
|
-
* Nothing.
|
|
26392
|
-
*/
|
|
26393
|
-
function writeToChild(token, endOfFile) {
|
|
26394
|
-
const stream = self.sliceStream(token);
|
|
26395
|
-
if (endOfFile) stream.push(null);
|
|
26396
|
-
token.previous = childToken;
|
|
26397
|
-
if (childToken) childToken.next = token;
|
|
26398
|
-
childToken = token;
|
|
26399
|
-
childFlow.defineSkip(token.start);
|
|
26400
|
-
childFlow.write(stream);
|
|
26401
|
-
if (self.parser.lazy[token.start.line]) {
|
|
26402
|
-
let index = childFlow.events.length;
|
|
26403
|
-
while (index--) if (childFlow.events[index][1].start.offset < lineStartOffset && (!childFlow.events[index][1].end || childFlow.events[index][1].end.offset > lineStartOffset)) return;
|
|
26404
|
-
const indexBeforeExits = self.events.length;
|
|
26405
|
-
let indexBeforeFlow = indexBeforeExits;
|
|
26406
|
-
/** @type {boolean | undefined} */
|
|
26407
|
-
let seen;
|
|
26408
|
-
/** @type {Point | undefined} */
|
|
26409
|
-
let point;
|
|
26410
|
-
while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
26411
|
-
if (seen) {
|
|
26412
|
-
point = self.events[indexBeforeFlow][1].end;
|
|
26413
|
-
break;
|
|
26414
|
-
}
|
|
26415
|
-
seen = true;
|
|
26416
|
-
}
|
|
26417
|
-
exitContainers(continued);
|
|
26418
|
-
index = indexBeforeExits;
|
|
26419
|
-
while (index < self.events.length) {
|
|
26420
|
-
self.events[index][1].end = { ...point };
|
|
26421
|
-
index++;
|
|
26422
|
-
}
|
|
26423
|
-
splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
26424
|
-
self.events.length = index;
|
|
26425
|
-
}
|
|
26426
|
-
}
|
|
26427
|
-
/**
|
|
26428
|
-
* @param {number} size
|
|
26429
|
-
* Size.
|
|
26430
|
-
* @returns {undefined}
|
|
26431
|
-
* Nothing.
|
|
26432
|
-
*/
|
|
26433
|
-
function exitContainers(size) {
|
|
26434
|
-
let index = stack.length;
|
|
26435
|
-
while (index-- > size) {
|
|
26436
|
-
const entry = stack[index];
|
|
26437
|
-
self.containerState = entry[1];
|
|
26438
|
-
entry[0].exit.call(self, effects);
|
|
26439
|
-
}
|
|
26440
|
-
stack.length = size;
|
|
26441
|
-
}
|
|
26442
|
-
function closeFlow() {
|
|
26443
|
-
childFlow.write([null]);
|
|
26444
|
-
childToken = void 0;
|
|
26445
|
-
childFlow = void 0;
|
|
26446
|
-
self.containerState._closeFlow = void 0;
|
|
26447
|
-
}
|
|
26448
|
-
}
|
|
26449
|
-
/**
|
|
26450
|
-
* @this {TokenizeContext}
|
|
26451
|
-
* Context.
|
|
26452
|
-
* @type {Tokenizer}
|
|
26453
|
-
* Tokenizer.
|
|
26454
|
-
*/
|
|
26455
|
-
function tokenizeContainer(effects, ok, nok) {
|
|
26456
|
-
return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
26457
|
-
}
|
|
26458
|
-
var document$1, containerConstruct;
|
|
26459
|
-
var init_document = __esmMin((() => {
|
|
26460
|
-
init_micromark_factory_space();
|
|
26461
|
-
init_micromark_util_character();
|
|
26462
|
-
init_micromark_util_chunked();
|
|
26463
|
-
document$1 = { tokenize: initializeDocument };
|
|
26464
|
-
containerConstruct = { tokenize: tokenizeContainer };
|
|
26465
|
-
}));
|
|
26466
|
-
//#endregion
|
|
26467
|
-
//#region ../../node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js
|
|
26468
|
-
/**
|
|
26469
|
-
* Classify whether a code represents whitespace, punctuation, or something
|
|
26470
|
-
* else.
|
|
26471
|
-
*
|
|
26472
|
-
* Used for attention (emphasis, strong), whose sequences can open or close
|
|
26473
|
-
* based on the class of surrounding characters.
|
|
26474
|
-
*
|
|
26475
|
-
* > 👉 **Note**: eof (`null`) is seen as whitespace.
|
|
26476
|
-
*
|
|
26477
|
-
* @param {Code} code
|
|
26478
|
-
* Code.
|
|
26479
|
-
* @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}
|
|
26480
|
-
* Group.
|
|
26481
|
-
*/
|
|
26482
|
-
function classifyCharacter(code) {
|
|
26483
|
-
if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) return 1;
|
|
26484
|
-
if (unicodePunctuation(code)) return 2;
|
|
26485
|
-
}
|
|
26486
|
-
var init_micromark_util_classify_character = __esmMin((() => {
|
|
26487
|
-
init_micromark_util_character();
|
|
26488
|
-
}));
|
|
26489
|
-
//#endregion
|
|
26490
|
-
//#region ../../node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
|
|
26491
|
-
/**
|
|
26492
|
-
* @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'
|
|
26493
|
-
*/
|
|
26494
|
-
/**
|
|
26495
|
-
* Call all `resolveAll`s.
|
|
26496
|
-
*
|
|
26497
|
-
* @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs
|
|
26498
|
-
* List of constructs, optionally with `resolveAll`s.
|
|
26499
|
-
* @param {Array<Event>} events
|
|
26500
|
-
* List of events.
|
|
26501
|
-
* @param {TokenizeContext} context
|
|
26502
|
-
* Context used by `tokenize`.
|
|
26503
|
-
* @returns {Array<Event>}
|
|
26504
|
-
* Changed events.
|
|
26505
|
-
*/
|
|
26506
|
-
function resolveAll(constructs, events, context) {
|
|
26507
|
-
/** @type {Array<Resolver>} */
|
|
26508
|
-
const called = [];
|
|
26509
|
-
let index = -1;
|
|
26510
|
-
while (++index < constructs.length) {
|
|
26511
|
-
const resolve = constructs[index].resolveAll;
|
|
26512
|
-
if (resolve && !called.includes(resolve)) {
|
|
26513
|
-
events = resolve(events, context);
|
|
26514
|
-
called.push(resolve);
|
|
26515
|
-
}
|
|
26516
|
-
}
|
|
26517
|
-
return events;
|
|
26518
|
-
}
|
|
26519
|
-
var init_micromark_util_resolve_all = __esmMin((() => {}));
|
|
26520
|
-
//#endregion
|
|
26521
|
-
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.js
|
|
26522
|
-
/**
|
|
26523
|
-
* Take all events and resolve attention to emphasis or strong.
|
|
26524
|
-
*
|
|
26525
|
-
* @type {Resolver}
|
|
26526
|
-
*/
|
|
26527
|
-
function resolveAllAttention(events, context) {
|
|
26528
|
-
let index = -1;
|
|
26529
|
-
/** @type {number} */
|
|
26530
|
-
let open;
|
|
26531
|
-
/** @type {Token} */
|
|
26532
|
-
let group;
|
|
26533
|
-
/** @type {Token} */
|
|
26534
|
-
let text;
|
|
26535
|
-
/** @type {Token} */
|
|
26536
|
-
let openingSequence;
|
|
26537
|
-
/** @type {Token} */
|
|
26538
|
-
let closingSequence;
|
|
26539
|
-
/** @type {number} */
|
|
26540
|
-
let use;
|
|
26541
|
-
/** @type {Array<Event>} */
|
|
26542
|
-
let nextEvents;
|
|
26543
|
-
/** @type {number} */
|
|
26544
|
-
let offset;
|
|
26545
|
-
while (++index < events.length) if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) {
|
|
26546
|
-
open = index;
|
|
26547
|
-
while (open--) if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {
|
|
26548
|
-
if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) continue;
|
|
26549
|
-
use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;
|
|
26550
|
-
const start = { ...events[open][1].end };
|
|
26551
|
-
const end = { ...events[index][1].start };
|
|
26552
|
-
movePoint(start, -use);
|
|
26553
|
-
movePoint(end, use);
|
|
26554
|
-
openingSequence = {
|
|
26555
|
-
type: use > 1 ? "strongSequence" : "emphasisSequence",
|
|
26556
|
-
start,
|
|
26557
|
-
end: { ...events[open][1].end }
|
|
26558
|
-
};
|
|
26559
|
-
closingSequence = {
|
|
26560
|
-
type: use > 1 ? "strongSequence" : "emphasisSequence",
|
|
26561
|
-
start: { ...events[index][1].start },
|
|
26562
|
-
end
|
|
26563
|
-
};
|
|
26564
|
-
text = {
|
|
26565
|
-
type: use > 1 ? "strongText" : "emphasisText",
|
|
26566
|
-
start: { ...events[open][1].end },
|
|
26567
|
-
end: { ...events[index][1].start }
|
|
26568
|
-
};
|
|
26569
|
-
group = {
|
|
26570
|
-
type: use > 1 ? "strong" : "emphasis",
|
|
26571
|
-
start: { ...openingSequence.start },
|
|
26572
|
-
end: { ...closingSequence.end }
|
|
26573
|
-
};
|
|
26574
|
-
events[open][1].end = { ...openingSequence.start };
|
|
26575
|
-
events[index][1].start = { ...closingSequence.end };
|
|
26576
|
-
nextEvents = [];
|
|
26577
|
-
if (events[open][1].end.offset - events[open][1].start.offset) nextEvents = push(nextEvents, [[
|
|
26578
|
-
"enter",
|
|
26579
|
-
events[open][1],
|
|
26580
|
-
context
|
|
26581
|
-
], [
|
|
26582
|
-
"exit",
|
|
26583
|
-
events[open][1],
|
|
26584
|
-
context
|
|
26585
|
-
]]);
|
|
26586
|
-
nextEvents = push(nextEvents, [
|
|
26587
|
-
[
|
|
26588
|
-
"enter",
|
|
26589
|
-
group,
|
|
26590
|
-
context
|
|
26591
|
-
],
|
|
26592
|
-
[
|
|
26593
|
-
"enter",
|
|
26594
|
-
openingSequence,
|
|
26595
|
-
context
|
|
26596
|
-
],
|
|
26597
|
-
[
|
|
26598
|
-
"exit",
|
|
26599
|
-
openingSequence,
|
|
26600
|
-
context
|
|
26601
|
-
],
|
|
26602
|
-
[
|
|
26603
|
-
"enter",
|
|
26604
|
-
text,
|
|
26605
|
-
context
|
|
26606
|
-
]
|
|
26607
|
-
]);
|
|
26608
|
-
nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));
|
|
26609
|
-
nextEvents = push(nextEvents, [
|
|
26610
|
-
[
|
|
26611
|
-
"exit",
|
|
26612
|
-
text,
|
|
26613
|
-
context
|
|
26614
|
-
],
|
|
26615
|
-
[
|
|
26616
|
-
"enter",
|
|
26617
|
-
closingSequence,
|
|
26618
|
-
context
|
|
26619
|
-
],
|
|
26620
|
-
[
|
|
26621
|
-
"exit",
|
|
26622
|
-
closingSequence,
|
|
26623
|
-
context
|
|
26624
|
-
],
|
|
26625
|
-
[
|
|
26626
|
-
"exit",
|
|
26627
|
-
group,
|
|
26628
|
-
context
|
|
26629
|
-
]
|
|
26630
|
-
]);
|
|
26631
|
-
if (events[index][1].end.offset - events[index][1].start.offset) {
|
|
26632
|
-
offset = 2;
|
|
26633
|
-
nextEvents = push(nextEvents, [[
|
|
26634
|
-
"enter",
|
|
26635
|
-
events[index][1],
|
|
26636
|
-
context
|
|
26637
|
-
], [
|
|
26638
|
-
"exit",
|
|
26639
|
-
events[index][1],
|
|
26640
|
-
context
|
|
26641
|
-
]]);
|
|
26642
|
-
} else offset = 0;
|
|
26643
|
-
splice(events, open - 1, index - open + 3, nextEvents);
|
|
26644
|
-
index = open + nextEvents.length - offset - 2;
|
|
26645
|
-
break;
|
|
26646
|
-
}
|
|
26647
|
-
}
|
|
26648
|
-
index = -1;
|
|
26649
|
-
while (++index < events.length) if (events[index][1].type === "attentionSequence") events[index][1].type = "data";
|
|
26650
|
-
return events;
|
|
26651
|
-
}
|
|
26652
|
-
/**
|
|
26653
|
-
* @this {TokenizeContext}
|
|
26654
|
-
* Context.
|
|
26655
|
-
* @type {Tokenizer}
|
|
26656
|
-
*/
|
|
26657
|
-
function tokenizeAttention(effects, ok) {
|
|
26658
|
-
const attentionMarkers = this.parser.constructs.attentionMarkers.null;
|
|
26659
|
-
const previous = this.previous;
|
|
26660
|
-
const before = classifyCharacter(previous);
|
|
26661
|
-
/** @type {NonNullable<Code>} */
|
|
26662
|
-
let marker;
|
|
26663
|
-
return start;
|
|
26664
|
-
/**
|
|
26665
|
-
* Before a sequence.
|
|
26666
|
-
*
|
|
26667
|
-
* ```markdown
|
|
26668
|
-
* > | **
|
|
26669
|
-
* ^
|
|
26670
|
-
* ```
|
|
26671
|
-
*
|
|
26672
|
-
* @type {State}
|
|
26673
|
-
*/
|
|
26674
|
-
function start(code) {
|
|
26675
|
-
marker = code;
|
|
26676
|
-
effects.enter("attentionSequence");
|
|
26677
|
-
return inside(code);
|
|
26678
|
-
}
|
|
26679
|
-
/**
|
|
26680
|
-
* In a sequence.
|
|
26681
|
-
*
|
|
26682
|
-
* ```markdown
|
|
26683
|
-
* > | **
|
|
26684
|
-
* ^^
|
|
26685
|
-
* ```
|
|
26686
|
-
*
|
|
26687
|
-
* @type {State}
|
|
26688
|
-
*/
|
|
26689
|
-
function inside(code) {
|
|
26690
|
-
if (code === marker) {
|
|
26691
|
-
effects.consume(code);
|
|
26692
|
-
return inside;
|
|
26693
|
-
}
|
|
26694
|
-
const token = effects.exit("attentionSequence");
|
|
26695
|
-
const after = classifyCharacter(code);
|
|
26696
|
-
const open = !after || after === 2 && before || attentionMarkers.includes(code);
|
|
26697
|
-
const close = !before || before === 2 && after || attentionMarkers.includes(previous);
|
|
26698
|
-
token._open = Boolean(marker === 42 ? open : open && (before || !close));
|
|
26699
|
-
token._close = Boolean(marker === 42 ? close : close && (after || !open));
|
|
26700
|
-
return ok(code);
|
|
26701
|
-
}
|
|
26702
|
-
}
|
|
26703
|
-
/**
|
|
26704
|
-
* Move a point a bit.
|
|
26705
|
-
*
|
|
26706
|
-
* Note: `move` only works inside lines! It’s not possible to move past other
|
|
26707
|
-
* chunks (replacement characters, tabs, or line endings).
|
|
26708
|
-
*
|
|
26709
|
-
* @param {Point} point
|
|
26710
|
-
* Point.
|
|
26711
|
-
* @param {number} offset
|
|
26712
|
-
* Amount to move.
|
|
26713
|
-
* @returns {undefined}
|
|
26714
|
-
* Nothing.
|
|
26715
|
-
*/
|
|
26716
|
-
function movePoint(point, offset) {
|
|
26717
|
-
point.column += offset;
|
|
26718
|
-
point.offset += offset;
|
|
26719
|
-
point._bufferIndex += offset;
|
|
26720
|
-
}
|
|
26721
|
-
var attention;
|
|
26722
|
-
var init_attention = __esmMin((() => {
|
|
26723
|
-
init_micromark_util_chunked();
|
|
26724
|
-
init_micromark_util_classify_character();
|
|
26725
|
-
init_micromark_util_resolve_all();
|
|
26726
|
-
attention = {
|
|
26727
|
-
name: "attention",
|
|
26728
|
-
resolveAll: resolveAllAttention,
|
|
26729
|
-
tokenize: tokenizeAttention
|
|
26730
|
-
};
|
|
26731
|
-
}));
|
|
26732
|
-
//#endregion
|
|
26733
|
-
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.js
|
|
26734
|
-
/**
|
|
26735
|
-
* @this {TokenizeContext}
|
|
26736
|
-
* Context.
|
|
26737
|
-
* @type {Tokenizer}
|
|
26738
|
-
*/
|
|
26739
|
-
function tokenizeAutolink(effects, ok, nok) {
|
|
26740
|
-
let size = 0;
|
|
26741
|
-
return start;
|
|
26742
|
-
/**
|
|
26743
|
-
* Start of an autolink.
|
|
26744
|
-
*
|
|
26745
|
-
* ```markdown
|
|
26746
|
-
* > | a<https://example.com>b
|
|
26747
|
-
* ^
|
|
26748
|
-
* > | a<user@example.com>b
|
|
26749
|
-
* ^
|
|
26750
|
-
* ```
|
|
26751
|
-
*
|
|
26752
|
-
* @type {State}
|
|
26753
|
-
*/
|
|
26754
|
-
function start(code) {
|
|
26755
|
-
effects.enter("autolink");
|
|
26756
|
-
effects.enter("autolinkMarker");
|
|
26757
|
-
effects.consume(code);
|
|
26758
|
-
effects.exit("autolinkMarker");
|
|
26759
|
-
effects.enter("autolinkProtocol");
|
|
26760
|
-
return open;
|
|
26761
|
-
}
|
|
26762
|
-
/**
|
|
26763
|
-
* After `<`, at protocol or atext.
|
|
26764
|
-
*
|
|
26765
|
-
* ```markdown
|
|
26766
|
-
* > | a<https://example.com>b
|
|
26767
|
-
* ^
|
|
26768
|
-
* > | a<user@example.com>b
|
|
26769
|
-
* ^
|
|
26770
|
-
* ```
|
|
26771
|
-
*
|
|
26772
|
-
* @type {State}
|
|
26773
|
-
*/
|
|
26774
|
-
function open(code) {
|
|
26775
|
-
if (asciiAlpha(code)) {
|
|
26776
|
-
effects.consume(code);
|
|
26777
|
-
return schemeOrEmailAtext;
|
|
26778
|
-
}
|
|
26779
|
-
if (code === 64) return nok(code);
|
|
26780
|
-
return emailAtext(code);
|
|
26781
|
-
}
|
|
26782
|
-
/**
|
|
26783
|
-
* At second byte of protocol or atext.
|
|
26784
|
-
*
|
|
26785
|
-
* ```markdown
|
|
26786
|
-
* > | a<https://example.com>b
|
|
26787
|
-
* ^
|
|
26788
|
-
* > | a<user@example.com>b
|
|
26789
|
-
* ^
|
|
26790
|
-
* ```
|
|
26791
|
-
*
|
|
26792
|
-
* @type {State}
|
|
26793
|
-
*/
|
|
26794
|
-
function schemeOrEmailAtext(code) {
|
|
26795
|
-
if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {
|
|
26796
|
-
size = 1;
|
|
26797
|
-
return schemeInsideOrEmailAtext(code);
|
|
26798
|
-
}
|
|
26799
|
-
return emailAtext(code);
|
|
26800
|
-
}
|
|
26801
|
-
/**
|
|
26802
|
-
* In ambiguous protocol or atext.
|
|
26803
|
-
*
|
|
26804
|
-
* ```markdown
|
|
26805
|
-
* > | a<https://example.com>b
|
|
26806
|
-
* ^
|
|
26807
|
-
* > | a<user@example.com>b
|
|
26808
|
-
* ^
|
|
26809
|
-
* ```
|
|
26810
|
-
*
|
|
26811
|
-
* @type {State}
|
|
26812
|
-
*/
|
|
26813
|
-
function schemeInsideOrEmailAtext(code) {
|
|
26814
|
-
if (code === 58) {
|
|
26815
|
-
effects.consume(code);
|
|
26816
|
-
size = 0;
|
|
26817
|
-
return urlInside;
|
|
26818
|
-
}
|
|
26819
|
-
if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {
|
|
26820
|
-
effects.consume(code);
|
|
26821
|
-
return schemeInsideOrEmailAtext;
|
|
26822
|
-
}
|
|
26823
|
-
size = 0;
|
|
26824
|
-
return emailAtext(code);
|
|
26825
|
-
}
|
|
26826
|
-
/**
|
|
26827
|
-
* After protocol, in URL.
|
|
26828
|
-
*
|
|
26829
|
-
* ```markdown
|
|
26830
|
-
* > | a<https://example.com>b
|
|
26831
|
-
* ^
|
|
26832
|
-
* ```
|
|
26833
|
-
*
|
|
26834
|
-
* @type {State}
|
|
26835
|
-
*/
|
|
26836
|
-
function urlInside(code) {
|
|
26837
|
-
if (code === 62) {
|
|
26838
|
-
effects.exit("autolinkProtocol");
|
|
26839
|
-
effects.enter("autolinkMarker");
|
|
26840
|
-
effects.consume(code);
|
|
26841
|
-
effects.exit("autolinkMarker");
|
|
26842
|
-
effects.exit("autolink");
|
|
26843
|
-
return ok;
|
|
26844
|
-
}
|
|
26845
|
-
if (code === null || code === 32 || code === 60 || asciiControl(code)) return nok(code);
|
|
26846
|
-
effects.consume(code);
|
|
26847
|
-
return urlInside;
|
|
26848
|
-
}
|
|
26849
|
-
/**
|
|
26850
|
-
* In email atext.
|
|
26851
|
-
*
|
|
26852
|
-
* ```markdown
|
|
26853
|
-
* > | a<user.name@example.com>b
|
|
26854
|
-
* ^
|
|
26855
|
-
* ```
|
|
26856
|
-
*
|
|
26857
|
-
* @type {State}
|
|
26858
|
-
*/
|
|
26859
|
-
function emailAtext(code) {
|
|
26860
|
-
if (code === 64) {
|
|
26861
|
-
effects.consume(code);
|
|
26862
|
-
return emailAtSignOrDot;
|
|
26863
|
-
}
|
|
26864
|
-
if (asciiAtext(code)) {
|
|
26865
|
-
effects.consume(code);
|
|
26866
|
-
return emailAtext;
|
|
26867
|
-
}
|
|
26868
|
-
return nok(code);
|
|
26869
|
-
}
|
|
26870
|
-
/**
|
|
26871
|
-
* In label, after at-sign or dot.
|
|
26872
|
-
*
|
|
26873
|
-
* ```markdown
|
|
26874
|
-
* > | a<user.name@example.com>b
|
|
26875
|
-
* ^ ^
|
|
26876
|
-
* ```
|
|
26877
|
-
*
|
|
26878
|
-
* @type {State}
|
|
26879
|
-
*/
|
|
26880
|
-
function emailAtSignOrDot(code) {
|
|
26881
|
-
return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);
|
|
26882
|
-
}
|
|
26883
|
-
/**
|
|
26884
|
-
* In label, where `.` and `>` are allowed.
|
|
26885
|
-
*
|
|
26886
|
-
* ```markdown
|
|
26887
|
-
* > | a<user.name@example.com>b
|
|
26888
|
-
* ^
|
|
26889
|
-
* ```
|
|
26890
|
-
*
|
|
26891
|
-
* @type {State}
|
|
26892
|
-
*/
|
|
26893
|
-
function emailLabel(code) {
|
|
26894
|
-
if (code === 46) {
|
|
26895
|
-
effects.consume(code);
|
|
26896
|
-
size = 0;
|
|
26897
|
-
return emailAtSignOrDot;
|
|
26898
|
-
}
|
|
26899
|
-
if (code === 62) {
|
|
26900
|
-
effects.exit("autolinkProtocol").type = "autolinkEmail";
|
|
26901
|
-
effects.enter("autolinkMarker");
|
|
26902
|
-
effects.consume(code);
|
|
26903
|
-
effects.exit("autolinkMarker");
|
|
26904
|
-
effects.exit("autolink");
|
|
26905
|
-
return ok;
|
|
26906
|
-
}
|
|
26907
|
-
return emailValue(code);
|
|
26908
|
-
}
|
|
26909
|
-
/**
|
|
26910
|
-
* In label, where `.` and `>` are *not* allowed.
|
|
26911
|
-
*
|
|
26912
|
-
* Though, this is also used in `emailLabel` to parse other values.
|
|
26913
|
-
*
|
|
26914
|
-
* ```markdown
|
|
26915
|
-
* > | a<user.name@ex-ample.com>b
|
|
26916
|
-
* ^
|
|
26917
|
-
* ```
|
|
26918
|
-
*
|
|
26919
|
-
* @type {State}
|
|
26920
|
-
*/
|
|
26921
|
-
function emailValue(code) {
|
|
26922
|
-
if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
|
|
26923
|
-
const next = code === 45 ? emailValue : emailLabel;
|
|
26924
|
-
effects.consume(code);
|
|
26925
|
-
return next;
|
|
26926
|
-
}
|
|
26927
|
-
return nok(code);
|
|
26928
|
-
}
|
|
26929
|
-
}
|
|
26930
|
-
var autolink;
|
|
26931
|
-
var init_autolink = __esmMin((() => {
|
|
26932
|
-
init_micromark_util_character();
|
|
26933
|
-
autolink = {
|
|
26934
|
-
name: "autolink",
|
|
26935
|
-
tokenize: tokenizeAutolink
|
|
26936
|
-
};
|
|
26937
|
-
}));
|
|
26938
|
-
//#endregion
|
|
26939
|
-
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.js
|
|
26940
|
-
/**
|
|
26941
|
-
* @this {TokenizeContext}
|
|
26942
|
-
* Context.
|
|
26943
|
-
* @type {Tokenizer}
|
|
26944
|
-
*/
|
|
26945
|
-
function tokenizeBlankLine(effects, ok, nok) {
|
|
26946
|
-
return start;
|
|
26947
|
-
/**
|
|
26948
|
-
* Start of blank line.
|
|
26949
|
-
*
|
|
26950
|
-
* > 👉 **Note**: `␠` represents a space character.
|
|
26951
|
-
*
|
|
26952
|
-
* ```markdown
|
|
26953
|
-
* > | ␠␠␊
|
|
26954
|
-
* ^
|
|
26955
|
-
* > | ␊
|
|
26956
|
-
* ^
|
|
26957
|
-
* ```
|
|
26958
|
-
*
|
|
26959
|
-
* @type {State}
|
|
26960
|
-
*/
|
|
26961
|
-
function start(code) {
|
|
26962
|
-
return markdownSpace(code) ? factorySpace(effects, after, "linePrefix")(code) : after(code);
|
|
26963
|
-
}
|
|
26964
|
-
/**
|
|
26965
|
-
* At eof/eol, after optional whitespace.
|
|
26966
|
-
*
|
|
26967
|
-
* > 👉 **Note**: `␠` represents a space character.
|
|
26968
|
-
*
|
|
26969
|
-
* ```markdown
|
|
26970
|
-
* > | ␠␠␊
|
|
26971
|
-
* ^
|
|
26972
|
-
* > | ␊
|
|
26973
|
-
* ^
|
|
26974
|
-
* ```
|
|
26975
|
-
*
|
|
26976
|
-
* @type {State}
|
|
26977
|
-
*/
|
|
26978
|
-
function after(code) {
|
|
26979
|
-
return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
|
|
26980
|
-
}
|
|
26981
|
-
}
|
|
26982
|
-
var blankLine;
|
|
26983
|
-
var init_blank_line = __esmMin((() => {
|
|
26984
|
-
init_micromark_factory_space();
|
|
26985
|
-
init_micromark_util_character();
|
|
26986
|
-
blankLine = {
|
|
26987
|
-
partial: true,
|
|
26988
|
-
tokenize: tokenizeBlankLine
|
|
26989
|
-
};
|
|
26990
|
-
}));
|
|
26991
|
-
//#endregion
|
|
26992
|
-
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.js
|
|
26993
|
-
/**
|
|
26994
|
-
* @this {TokenizeContext}
|
|
26995
|
-
* Context.
|
|
26996
|
-
* @type {Tokenizer}
|
|
26997
|
-
*/
|
|
26998
|
-
function tokenizeBlockQuoteStart(effects, ok, nok) {
|
|
26999
|
-
const self = this;
|
|
27000
|
-
return start;
|
|
27001
|
-
/**
|
|
27002
|
-
* Start of block quote.
|
|
27003
|
-
*
|
|
27004
|
-
* ```markdown
|
|
27005
|
-
* > | > a
|
|
27006
|
-
* ^
|
|
27007
|
-
* ```
|
|
27008
|
-
*
|
|
27009
|
-
* @type {State}
|
|
27010
|
-
*/
|
|
27011
|
-
function start(code) {
|
|
27012
|
-
if (code === 62) {
|
|
27013
|
-
const state = self.containerState;
|
|
27014
|
-
if (!state.open) {
|
|
27015
|
-
effects.enter("blockQuote", { _container: true });
|
|
27016
|
-
state.open = true;
|
|
27017
|
-
}
|
|
27018
|
-
effects.enter("blockQuotePrefix");
|
|
27019
|
-
effects.enter("blockQuoteMarker");
|
|
27020
|
-
effects.consume(code);
|
|
27021
|
-
effects.exit("blockQuoteMarker");
|
|
27022
|
-
return after;
|
|
27023
|
-
}
|
|
27024
|
-
return nok(code);
|
|
27025
|
-
}
|
|
27026
|
-
/**
|
|
27027
|
-
* After `>`, before optional whitespace.
|
|
27028
|
-
*
|
|
27029
|
-
* ```markdown
|
|
27030
|
-
* > | > a
|
|
27031
|
-
* ^
|
|
27032
|
-
* ```
|
|
27033
|
-
*
|
|
27034
|
-
* @type {State}
|
|
27035
|
-
*/
|
|
27036
|
-
function after(code) {
|
|
27037
|
-
if (markdownSpace(code)) {
|
|
27038
|
-
effects.enter("blockQuotePrefixWhitespace");
|
|
27039
|
-
effects.consume(code);
|
|
27040
|
-
effects.exit("blockQuotePrefixWhitespace");
|
|
27041
|
-
effects.exit("blockQuotePrefix");
|
|
27042
|
-
return ok;
|
|
27043
|
-
}
|
|
27044
|
-
effects.exit("blockQuotePrefix");
|
|
27045
|
-
return ok(code);
|
|
27046
|
-
}
|
|
27047
|
-
}
|
|
27048
|
-
/**
|
|
27049
|
-
* Start of block quote continuation.
|
|
27050
|
-
*
|
|
27051
|
-
* ```markdown
|
|
27052
|
-
* | > a
|
|
27053
|
-
* > | > b
|
|
27054
|
-
* ^
|
|
27055
|
-
* ```
|
|
27056
|
-
*
|
|
27057
|
-
* @this {TokenizeContext}
|
|
27058
|
-
* Context.
|
|
27059
|
-
* @type {Tokenizer}
|
|
27060
|
-
*/
|
|
27061
|
-
function tokenizeBlockQuoteContinuation(effects, ok, nok) {
|
|
27062
|
-
const self = this;
|
|
27063
|
-
return contStart;
|
|
27064
|
-
/**
|
|
27065
|
-
* Start of block quote continuation.
|
|
27066
|
-
*
|
|
27067
|
-
* Also used to parse the first block quote opening.
|
|
27068
|
-
*
|
|
27069
|
-
* ```markdown
|
|
27070
|
-
* | > a
|
|
27071
|
-
* > | > b
|
|
27072
|
-
* ^
|
|
27073
|
-
* ```
|
|
27074
|
-
*
|
|
27075
|
-
* @type {State}
|
|
27076
|
-
*/
|
|
27077
|
-
function contStart(code) {
|
|
27078
|
-
if (markdownSpace(code)) return factorySpace(effects, contBefore, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
|
|
27079
|
-
return contBefore(code);
|
|
27080
|
-
}
|
|
27081
|
-
/**
|
|
27082
|
-
* At `>`, after optional whitespace.
|
|
27083
|
-
*
|
|
27084
|
-
* Also used to parse the first block quote opening.
|
|
27085
|
-
*
|
|
27086
|
-
* ```markdown
|
|
27087
|
-
* | > a
|
|
27088
|
-
* > | > b
|
|
27089
|
-
* ^
|
|
27090
|
-
* ```
|
|
27091
|
-
*
|
|
27092
|
-
* @type {State}
|
|
27093
|
-
*/
|
|
27094
|
-
function contBefore(code) {
|
|
27095
|
-
return effects.attempt(blockQuote, ok, nok)(code);
|
|
27096
|
-
}
|
|
27097
|
-
}
|
|
27098
|
-
/** @type {Exiter} */
|
|
27099
|
-
function exit(effects) {
|
|
27100
|
-
effects.exit("blockQuote");
|
|
27101
|
-
}
|
|
27102
|
-
var blockQuote;
|
|
27103
|
-
var init_block_quote = __esmMin((() => {
|
|
27104
|
-
init_micromark_factory_space();
|
|
27105
|
-
init_micromark_util_character();
|
|
27106
|
-
blockQuote = {
|
|
27107
|
-
continuation: { tokenize: tokenizeBlockQuoteContinuation },
|
|
27108
|
-
exit,
|
|
27109
|
-
name: "blockQuote",
|
|
27110
|
-
tokenize: tokenizeBlockQuoteStart
|
|
27111
|
-
};
|
|
27112
|
-
}));
|
|
27113
|
-
//#endregion
|
|
27114
|
-
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.js
|
|
27115
|
-
/**
|
|
27116
|
-
* @this {TokenizeContext}
|
|
27117
|
-
* Context.
|
|
27118
|
-
* @type {Tokenizer}
|
|
27119
|
-
*/
|
|
27120
|
-
function tokenizeCharacterEscape(effects, ok, nok) {
|
|
27121
|
-
return start;
|
|
27122
|
-
/**
|
|
27123
|
-
* Start of character escape.
|
|
27124
|
-
*
|
|
27125
|
-
* ```markdown
|
|
27126
|
-
* > | a\*b
|
|
27127
|
-
* ^
|
|
27128
|
-
* ```
|
|
27129
|
-
*
|
|
27130
|
-
* @type {State}
|
|
27131
|
-
*/
|
|
27132
|
-
function start(code) {
|
|
27133
|
-
effects.enter("characterEscape");
|
|
27134
|
-
effects.enter("escapeMarker");
|
|
27135
|
-
effects.consume(code);
|
|
27136
|
-
effects.exit("escapeMarker");
|
|
27137
|
-
return inside;
|
|
27138
|
-
}
|
|
27139
|
-
/**
|
|
27140
|
-
* After `\`, at punctuation.
|
|
27141
|
-
*
|
|
27142
|
-
* ```markdown
|
|
27143
|
-
* > | a\*b
|
|
27144
|
-
* ^
|
|
27145
|
-
* ```
|
|
27146
|
-
*
|
|
27147
|
-
* @type {State}
|
|
27148
|
-
*/
|
|
27149
|
-
function inside(code) {
|
|
27150
|
-
if (asciiPunctuation(code)) {
|
|
27151
|
-
effects.enter("characterEscapeValue");
|
|
27152
|
-
effects.consume(code);
|
|
27153
|
-
effects.exit("characterEscapeValue");
|
|
27154
|
-
effects.exit("characterEscape");
|
|
27155
|
-
return ok;
|
|
27156
|
-
}
|
|
27157
|
-
return nok(code);
|
|
27158
|
-
}
|
|
27159
|
-
}
|
|
27160
|
-
var characterEscape;
|
|
27161
|
-
var init_character_escape = __esmMin((() => {
|
|
27162
|
-
init_micromark_util_character();
|
|
27163
|
-
characterEscape = {
|
|
27164
|
-
name: "characterEscape",
|
|
27165
|
-
tokenize: tokenizeCharacterEscape
|
|
27166
|
-
};
|
|
27167
|
-
}));
|
|
27168
|
-
//#endregion
|
|
27169
25978
|
//#region ../../node_modules/.pnpm/character-entities@2.0.2/node_modules/character-entities/index.js
|
|
27170
25979
|
var characterEntities;
|
|
27171
25980
|
var init_character_entities = __esmMin((() => {
|
|
@@ -29298,25 +28107,1333 @@ var init_character_entities = __esmMin((() => {
|
|
|
29298
28107
|
};
|
|
29299
28108
|
}));
|
|
29300
28109
|
//#endregion
|
|
29301
|
-
//#region ../../node_modules/.pnpm/decode-named-character-reference@1.2.0/node_modules/decode-named-character-reference/index.js
|
|
28110
|
+
//#region ../../node_modules/.pnpm/decode-named-character-reference@1.2.0/node_modules/decode-named-character-reference/index.js
|
|
28111
|
+
/**
|
|
28112
|
+
* Decode a single character reference (without the `&` or `;`).
|
|
28113
|
+
* You probably only need this when you’re building parsers yourself that follow
|
|
28114
|
+
* different rules compared to HTML.
|
|
28115
|
+
* This is optimized to be tiny in browsers.
|
|
28116
|
+
*
|
|
28117
|
+
* @param {string} value
|
|
28118
|
+
* `notin` (named), `#123` (deci), `#x123` (hexa).
|
|
28119
|
+
* @returns {string|false}
|
|
28120
|
+
* Decoded reference.
|
|
28121
|
+
*/
|
|
28122
|
+
function decodeNamedCharacterReference(value) {
|
|
28123
|
+
return own$5.call(characterEntities, value) ? characterEntities[value] : false;
|
|
28124
|
+
}
|
|
28125
|
+
var own$5;
|
|
28126
|
+
var init_decode_named_character_reference = __esmMin((() => {
|
|
28127
|
+
init_character_entities();
|
|
28128
|
+
own$5 = {}.hasOwnProperty;
|
|
28129
|
+
}));
|
|
28130
|
+
//#endregion
|
|
28131
|
+
//#region ../../node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.js
|
|
28132
|
+
/**
|
|
28133
|
+
* Like `Array#splice`, but smarter for giant arrays.
|
|
28134
|
+
*
|
|
28135
|
+
* `Array#splice` takes all items to be inserted as individual argument which
|
|
28136
|
+
* causes a stack overflow in V8 when trying to insert 100k items for instance.
|
|
28137
|
+
*
|
|
28138
|
+
* Otherwise, this does not return the removed items, and takes `items` as an
|
|
28139
|
+
* array instead of rest parameters.
|
|
28140
|
+
*
|
|
28141
|
+
* @template {unknown} T
|
|
28142
|
+
* Item type.
|
|
28143
|
+
* @param {Array<T>} list
|
|
28144
|
+
* List to operate on.
|
|
28145
|
+
* @param {number} start
|
|
28146
|
+
* Index to remove/insert at (can be negative).
|
|
28147
|
+
* @param {number} remove
|
|
28148
|
+
* Number of items to remove.
|
|
28149
|
+
* @param {Array<T>} items
|
|
28150
|
+
* Items to inject into `list`.
|
|
28151
|
+
* @returns {undefined}
|
|
28152
|
+
* Nothing.
|
|
28153
|
+
*/
|
|
28154
|
+
function splice(list, start, remove, items) {
|
|
28155
|
+
const end = list.length;
|
|
28156
|
+
let chunkStart = 0;
|
|
28157
|
+
/** @type {Array<unknown>} */
|
|
28158
|
+
let parameters;
|
|
28159
|
+
if (start < 0) start = -start > end ? 0 : end + start;
|
|
28160
|
+
else start = start > end ? end : start;
|
|
28161
|
+
remove = remove > 0 ? remove : 0;
|
|
28162
|
+
if (items.length < 1e4) {
|
|
28163
|
+
parameters = Array.from(items);
|
|
28164
|
+
parameters.unshift(start, remove);
|
|
28165
|
+
list.splice(...parameters);
|
|
28166
|
+
} else {
|
|
28167
|
+
if (remove) list.splice(start, remove);
|
|
28168
|
+
while (chunkStart < items.length) {
|
|
28169
|
+
parameters = items.slice(chunkStart, chunkStart + 1e4);
|
|
28170
|
+
parameters.unshift(start, 0);
|
|
28171
|
+
list.splice(...parameters);
|
|
28172
|
+
chunkStart += 1e4;
|
|
28173
|
+
start += 1e4;
|
|
28174
|
+
}
|
|
28175
|
+
}
|
|
28176
|
+
}
|
|
28177
|
+
/**
|
|
28178
|
+
* Append `items` (an array) at the end of `list` (another array).
|
|
28179
|
+
* When `list` was empty, returns `items` instead.
|
|
28180
|
+
*
|
|
28181
|
+
* This prevents a potentially expensive operation when `list` is empty,
|
|
28182
|
+
* and adds items in batches to prevent V8 from hanging.
|
|
28183
|
+
*
|
|
28184
|
+
* @template {unknown} T
|
|
28185
|
+
* Item type.
|
|
28186
|
+
* @param {Array<T>} list
|
|
28187
|
+
* List to operate on.
|
|
28188
|
+
* @param {Array<T>} items
|
|
28189
|
+
* Items to add to `list`.
|
|
28190
|
+
* @returns {Array<T>}
|
|
28191
|
+
* Either `list` or `items`.
|
|
28192
|
+
*/
|
|
28193
|
+
function push(list, items) {
|
|
28194
|
+
if (list.length > 0) {
|
|
28195
|
+
splice(list, list.length, 0, items);
|
|
28196
|
+
return list;
|
|
28197
|
+
}
|
|
28198
|
+
return items;
|
|
28199
|
+
}
|
|
28200
|
+
var init_micromark_util_chunked = __esmMin((() => {}));
|
|
28201
|
+
//#endregion
|
|
28202
|
+
//#region ../../node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
|
|
28203
|
+
/**
|
|
28204
|
+
* Combine multiple syntax extensions into one.
|
|
28205
|
+
*
|
|
28206
|
+
* @param {ReadonlyArray<Extension>} extensions
|
|
28207
|
+
* List of syntax extensions.
|
|
28208
|
+
* @returns {NormalizedExtension}
|
|
28209
|
+
* A single combined extension.
|
|
28210
|
+
*/
|
|
28211
|
+
function combineExtensions(extensions) {
|
|
28212
|
+
/** @type {NormalizedExtension} */
|
|
28213
|
+
const all = {};
|
|
28214
|
+
let index = -1;
|
|
28215
|
+
while (++index < extensions.length) syntaxExtension(all, extensions[index]);
|
|
28216
|
+
return all;
|
|
28217
|
+
}
|
|
28218
|
+
/**
|
|
28219
|
+
* Merge `extension` into `all`.
|
|
28220
|
+
*
|
|
28221
|
+
* @param {NormalizedExtension} all
|
|
28222
|
+
* Extension to merge into.
|
|
28223
|
+
* @param {Extension} extension
|
|
28224
|
+
* Extension to merge.
|
|
28225
|
+
* @returns {undefined}
|
|
28226
|
+
* Nothing.
|
|
28227
|
+
*/
|
|
28228
|
+
function syntaxExtension(all, extension) {
|
|
28229
|
+
/** @type {keyof Extension} */
|
|
28230
|
+
let hook;
|
|
28231
|
+
for (hook in extension) {
|
|
28232
|
+
/** @type {Record<string, unknown>} */
|
|
28233
|
+
const left = (hasOwnProperty$1.call(all, hook) ? all[hook] : void 0) || (all[hook] = {});
|
|
28234
|
+
/** @type {Record<string, unknown> | undefined} */
|
|
28235
|
+
const right = extension[hook];
|
|
28236
|
+
/** @type {string} */
|
|
28237
|
+
let code;
|
|
28238
|
+
if (right) for (code in right) {
|
|
28239
|
+
if (!hasOwnProperty$1.call(left, code)) left[code] = [];
|
|
28240
|
+
const value = right[code];
|
|
28241
|
+
constructs(left[code], Array.isArray(value) ? value : value ? [value] : []);
|
|
28242
|
+
}
|
|
28243
|
+
}
|
|
28244
|
+
}
|
|
28245
|
+
/**
|
|
28246
|
+
* Merge `list` into `existing` (both lists of constructs).
|
|
28247
|
+
* Mutates `existing`.
|
|
28248
|
+
*
|
|
28249
|
+
* @param {Array<unknown>} existing
|
|
28250
|
+
* List of constructs to merge into.
|
|
28251
|
+
* @param {Array<unknown>} list
|
|
28252
|
+
* List of constructs to merge.
|
|
28253
|
+
* @returns {undefined}
|
|
28254
|
+
* Nothing.
|
|
28255
|
+
*/
|
|
28256
|
+
function constructs(existing, list) {
|
|
28257
|
+
let index = -1;
|
|
28258
|
+
/** @type {Array<unknown>} */
|
|
28259
|
+
const before = [];
|
|
28260
|
+
while (++index < list.length) (list[index].add === "after" ? existing : before).push(list[index]);
|
|
28261
|
+
splice(existing, 0, 0, before);
|
|
28262
|
+
}
|
|
28263
|
+
var hasOwnProperty$1;
|
|
28264
|
+
var init_micromark_util_combine_extensions = __esmMin((() => {
|
|
28265
|
+
init_micromark_util_chunked();
|
|
28266
|
+
hasOwnProperty$1 = {}.hasOwnProperty;
|
|
28267
|
+
}));
|
|
28268
|
+
//#endregion
|
|
28269
|
+
//#region ../../node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js
|
|
28270
|
+
/**
|
|
28271
|
+
* Turn the number (in string form as either hexa- or plain decimal) coming from
|
|
28272
|
+
* a numeric character reference into a character.
|
|
28273
|
+
*
|
|
28274
|
+
* Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes
|
|
28275
|
+
* non-characters and control characters safe.
|
|
28276
|
+
*
|
|
28277
|
+
* @param {string} value
|
|
28278
|
+
* Value to decode.
|
|
28279
|
+
* @param {number} base
|
|
28280
|
+
* Numeric base.
|
|
28281
|
+
* @returns {string}
|
|
28282
|
+
* Character.
|
|
28283
|
+
*/
|
|
28284
|
+
function decodeNumericCharacterReference(value, base) {
|
|
28285
|
+
const code = Number.parseInt(value, base);
|
|
28286
|
+
if (code < 9 || code === 11 || code > 13 && code < 32 || code > 126 && code < 160 || code > 55295 && code < 57344 || code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || code > 1114111) return "�";
|
|
28287
|
+
return String.fromCodePoint(code);
|
|
28288
|
+
}
|
|
28289
|
+
var init_micromark_util_decode_numeric_character_reference = __esmMin((() => {}));
|
|
28290
|
+
//#endregion
|
|
28291
|
+
//#region ../../node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.js
|
|
28292
|
+
/**
|
|
28293
|
+
* Normalize an identifier (as found in references, definitions).
|
|
28294
|
+
*
|
|
28295
|
+
* Collapses markdown whitespace, trim, and then lower- and uppercase.
|
|
28296
|
+
*
|
|
28297
|
+
* Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their
|
|
28298
|
+
* lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different
|
|
28299
|
+
* uppercase character (U+0398 (`Θ`)).
|
|
28300
|
+
* So, to get a canonical form, we perform both lower- and uppercase.
|
|
28301
|
+
*
|
|
28302
|
+
* Using uppercase last makes sure keys will never interact with default
|
|
28303
|
+
* prototypal values (such as `constructor`): nothing in the prototype of
|
|
28304
|
+
* `Object` is uppercase.
|
|
28305
|
+
*
|
|
28306
|
+
* @param {string} value
|
|
28307
|
+
* Identifier to normalize.
|
|
28308
|
+
* @returns {string}
|
|
28309
|
+
* Normalized identifier.
|
|
28310
|
+
*/
|
|
28311
|
+
function normalizeIdentifier(value) {
|
|
28312
|
+
return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
28313
|
+
}
|
|
28314
|
+
var init_micromark_util_normalize_identifier = __esmMin((() => {}));
|
|
28315
|
+
//#endregion
|
|
28316
|
+
//#region ../../node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js
|
|
28317
|
+
/**
|
|
28318
|
+
* Check whether a character code is an ASCII control character.
|
|
28319
|
+
*
|
|
28320
|
+
* An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
|
|
28321
|
+
* to U+001F (US), or U+007F (DEL).
|
|
28322
|
+
*
|
|
28323
|
+
* @param {Code} code
|
|
28324
|
+
* Code.
|
|
28325
|
+
* @returns {boolean}
|
|
28326
|
+
* Whether it matches.
|
|
28327
|
+
*/
|
|
28328
|
+
function asciiControl(code) {
|
|
28329
|
+
return code !== null && (code < 32 || code === 127);
|
|
28330
|
+
}
|
|
28331
|
+
/**
|
|
28332
|
+
* Check whether a character code is a markdown line ending.
|
|
28333
|
+
*
|
|
28334
|
+
* A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
|
|
28335
|
+
* LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
|
|
28336
|
+
*
|
|
28337
|
+
* In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
|
|
28338
|
+
* RETURN (CR) are replaced by these virtual characters depending on whether
|
|
28339
|
+
* they occurred together.
|
|
28340
|
+
*
|
|
28341
|
+
* @param {Code} code
|
|
28342
|
+
* Code.
|
|
28343
|
+
* @returns {boolean}
|
|
28344
|
+
* Whether it matches.
|
|
28345
|
+
*/
|
|
28346
|
+
function markdownLineEnding(code) {
|
|
28347
|
+
return code !== null && code < -2;
|
|
28348
|
+
}
|
|
28349
|
+
/**
|
|
28350
|
+
* Check whether a character code is a markdown line ending (see
|
|
28351
|
+
* `markdownLineEnding`) or markdown space (see `markdownSpace`).
|
|
28352
|
+
*
|
|
28353
|
+
* @param {Code} code
|
|
28354
|
+
* Code.
|
|
28355
|
+
* @returns {boolean}
|
|
28356
|
+
* Whether it matches.
|
|
28357
|
+
*/
|
|
28358
|
+
function markdownLineEndingOrSpace(code) {
|
|
28359
|
+
return code !== null && (code < 0 || code === 32);
|
|
28360
|
+
}
|
|
28361
|
+
/**
|
|
28362
|
+
* Check whether a character code is a markdown space.
|
|
28363
|
+
*
|
|
28364
|
+
* A **markdown space** is the concrete character U+0020 SPACE (SP) and the
|
|
28365
|
+
* virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
|
|
28366
|
+
*
|
|
28367
|
+
* In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
|
|
28368
|
+
* replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
|
|
28369
|
+
* SPACE (VS) characters, depending on the column at which the tab occurred.
|
|
28370
|
+
*
|
|
28371
|
+
* @param {Code} code
|
|
28372
|
+
* Code.
|
|
28373
|
+
* @returns {boolean}
|
|
28374
|
+
* Whether it matches.
|
|
28375
|
+
*/
|
|
28376
|
+
function markdownSpace(code) {
|
|
28377
|
+
return code === -2 || code === -1 || code === 32;
|
|
28378
|
+
}
|
|
28379
|
+
/**
|
|
28380
|
+
* Create a code check from a regex.
|
|
28381
|
+
*
|
|
28382
|
+
* @param {RegExp} regex
|
|
28383
|
+
* Expression.
|
|
28384
|
+
* @returns {(code: Code) => boolean}
|
|
28385
|
+
* Check.
|
|
28386
|
+
*/
|
|
28387
|
+
function regexCheck(regex) {
|
|
28388
|
+
return check;
|
|
28389
|
+
/**
|
|
28390
|
+
* Check whether a code matches the bound regex.
|
|
28391
|
+
*
|
|
28392
|
+
* @param {Code} code
|
|
28393
|
+
* Character code.
|
|
28394
|
+
* @returns {boolean}
|
|
28395
|
+
* Whether the character code matches the bound regex.
|
|
28396
|
+
*/
|
|
28397
|
+
function check(code) {
|
|
28398
|
+
return code !== null && code > -1 && regex.test(String.fromCharCode(code));
|
|
28399
|
+
}
|
|
28400
|
+
}
|
|
28401
|
+
var asciiAlpha, asciiAlphanumeric, asciiAtext, asciiDigit, asciiHexDigit, asciiPunctuation, unicodePunctuation, unicodeWhitespace;
|
|
28402
|
+
var init_micromark_util_character = __esmMin((() => {
|
|
28403
|
+
asciiAlpha = regexCheck(/[A-Za-z]/);
|
|
28404
|
+
asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
|
|
28405
|
+
asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
|
|
28406
|
+
asciiDigit = regexCheck(/\d/);
|
|
28407
|
+
asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
|
|
28408
|
+
asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
|
|
28409
|
+
unicodePunctuation = regexCheck(/\p{P}|\p{S}/u);
|
|
28410
|
+
unicodeWhitespace = regexCheck(/\s/);
|
|
28411
|
+
}));
|
|
28412
|
+
//#endregion
|
|
28413
|
+
//#region ../../node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js
|
|
28414
|
+
/**
|
|
28415
|
+
* Parse spaces and tabs.
|
|
28416
|
+
*
|
|
28417
|
+
* There is no `nok` parameter:
|
|
28418
|
+
*
|
|
28419
|
+
* * spaces in markdown are often optional, in which case this factory can be
|
|
28420
|
+
* used and `ok` will be switched to whether spaces were found or not
|
|
28421
|
+
* * one line ending or space can be detected with `markdownSpace(code)` right
|
|
28422
|
+
* before using `factorySpace`
|
|
28423
|
+
*
|
|
28424
|
+
* ###### Examples
|
|
28425
|
+
*
|
|
28426
|
+
* Where `␉` represents a tab (plus how much it expands) and `␠` represents a
|
|
28427
|
+
* single space.
|
|
28428
|
+
*
|
|
28429
|
+
* ```markdown
|
|
28430
|
+
* ␉
|
|
28431
|
+
* ␠␠␠␠
|
|
28432
|
+
* ␉␠
|
|
28433
|
+
* ```
|
|
28434
|
+
*
|
|
28435
|
+
* @param {Effects} effects
|
|
28436
|
+
* Context.
|
|
28437
|
+
* @param {State} ok
|
|
28438
|
+
* State switched to when successful.
|
|
28439
|
+
* @param {TokenType} type
|
|
28440
|
+
* Type (`' \t'`).
|
|
28441
|
+
* @param {number | undefined} [max=Infinity]
|
|
28442
|
+
* Max (exclusive).
|
|
28443
|
+
* @returns {State}
|
|
28444
|
+
* Start state.
|
|
28445
|
+
*/
|
|
28446
|
+
function factorySpace(effects, ok, type, max) {
|
|
28447
|
+
const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
|
|
28448
|
+
let size = 0;
|
|
28449
|
+
return start;
|
|
28450
|
+
/** @type {State} */
|
|
28451
|
+
function start(code) {
|
|
28452
|
+
if (markdownSpace(code)) {
|
|
28453
|
+
effects.enter(type);
|
|
28454
|
+
return prefix(code);
|
|
28455
|
+
}
|
|
28456
|
+
return ok(code);
|
|
28457
|
+
}
|
|
28458
|
+
/** @type {State} */
|
|
28459
|
+
function prefix(code) {
|
|
28460
|
+
if (markdownSpace(code) && size++ < limit) {
|
|
28461
|
+
effects.consume(code);
|
|
28462
|
+
return prefix;
|
|
28463
|
+
}
|
|
28464
|
+
effects.exit(type);
|
|
28465
|
+
return ok(code);
|
|
28466
|
+
}
|
|
28467
|
+
}
|
|
28468
|
+
var init_micromark_factory_space = __esmMin((() => {
|
|
28469
|
+
init_micromark_util_character();
|
|
28470
|
+
}));
|
|
28471
|
+
//#endregion
|
|
28472
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js
|
|
28473
|
+
/**
|
|
28474
|
+
* @this {TokenizeContext}
|
|
28475
|
+
* Context.
|
|
28476
|
+
* @type {Initializer}
|
|
28477
|
+
* Content.
|
|
28478
|
+
*/
|
|
28479
|
+
function initializeContent(effects) {
|
|
28480
|
+
const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
|
|
28481
|
+
/** @type {Token} */
|
|
28482
|
+
let previous;
|
|
28483
|
+
return contentStart;
|
|
28484
|
+
/** @type {State} */
|
|
28485
|
+
function afterContentStartConstruct(code) {
|
|
28486
|
+
if (code === null) {
|
|
28487
|
+
effects.consume(code);
|
|
28488
|
+
return;
|
|
28489
|
+
}
|
|
28490
|
+
effects.enter("lineEnding");
|
|
28491
|
+
effects.consume(code);
|
|
28492
|
+
effects.exit("lineEnding");
|
|
28493
|
+
return factorySpace(effects, contentStart, "linePrefix");
|
|
28494
|
+
}
|
|
28495
|
+
/** @type {State} */
|
|
28496
|
+
function paragraphInitial(code) {
|
|
28497
|
+
effects.enter("paragraph");
|
|
28498
|
+
return lineStart(code);
|
|
28499
|
+
}
|
|
28500
|
+
/** @type {State} */
|
|
28501
|
+
function lineStart(code) {
|
|
28502
|
+
const token = effects.enter("chunkText", {
|
|
28503
|
+
contentType: "text",
|
|
28504
|
+
previous
|
|
28505
|
+
});
|
|
28506
|
+
if (previous) previous.next = token;
|
|
28507
|
+
previous = token;
|
|
28508
|
+
return data(code);
|
|
28509
|
+
}
|
|
28510
|
+
/** @type {State} */
|
|
28511
|
+
function data(code) {
|
|
28512
|
+
if (code === null) {
|
|
28513
|
+
effects.exit("chunkText");
|
|
28514
|
+
effects.exit("paragraph");
|
|
28515
|
+
effects.consume(code);
|
|
28516
|
+
return;
|
|
28517
|
+
}
|
|
28518
|
+
if (markdownLineEnding(code)) {
|
|
28519
|
+
effects.consume(code);
|
|
28520
|
+
effects.exit("chunkText");
|
|
28521
|
+
return lineStart;
|
|
28522
|
+
}
|
|
28523
|
+
effects.consume(code);
|
|
28524
|
+
return data;
|
|
28525
|
+
}
|
|
28526
|
+
}
|
|
28527
|
+
var content$1;
|
|
28528
|
+
var init_content$1 = __esmMin((() => {
|
|
28529
|
+
init_micromark_factory_space();
|
|
28530
|
+
init_micromark_util_character();
|
|
28531
|
+
content$1 = { tokenize: initializeContent };
|
|
28532
|
+
}));
|
|
28533
|
+
//#endregion
|
|
28534
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.js
|
|
28535
|
+
/**
|
|
28536
|
+
* @this {TokenizeContext}
|
|
28537
|
+
* Self.
|
|
28538
|
+
* @type {Initializer}
|
|
28539
|
+
* Initializer.
|
|
28540
|
+
*/
|
|
28541
|
+
function initializeDocument(effects) {
|
|
28542
|
+
const self = this;
|
|
28543
|
+
/** @type {Array<StackItem>} */
|
|
28544
|
+
const stack = [];
|
|
28545
|
+
let continued = 0;
|
|
28546
|
+
/** @type {TokenizeContext | undefined} */
|
|
28547
|
+
let childFlow;
|
|
28548
|
+
/** @type {Token | undefined} */
|
|
28549
|
+
let childToken;
|
|
28550
|
+
/** @type {number} */
|
|
28551
|
+
let lineStartOffset;
|
|
28552
|
+
return start;
|
|
28553
|
+
/** @type {State} */
|
|
28554
|
+
function start(code) {
|
|
28555
|
+
if (continued < stack.length) {
|
|
28556
|
+
const item = stack[continued];
|
|
28557
|
+
self.containerState = item[1];
|
|
28558
|
+
return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);
|
|
28559
|
+
}
|
|
28560
|
+
return checkNewContainers(code);
|
|
28561
|
+
}
|
|
28562
|
+
/** @type {State} */
|
|
28563
|
+
function documentContinue(code) {
|
|
28564
|
+
continued++;
|
|
28565
|
+
if (self.containerState._closeFlow) {
|
|
28566
|
+
self.containerState._closeFlow = void 0;
|
|
28567
|
+
if (childFlow) closeFlow();
|
|
28568
|
+
const indexBeforeExits = self.events.length;
|
|
28569
|
+
let indexBeforeFlow = indexBeforeExits;
|
|
28570
|
+
/** @type {Point | undefined} */
|
|
28571
|
+
let point;
|
|
28572
|
+
while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
28573
|
+
point = self.events[indexBeforeFlow][1].end;
|
|
28574
|
+
break;
|
|
28575
|
+
}
|
|
28576
|
+
exitContainers(continued);
|
|
28577
|
+
let index = indexBeforeExits;
|
|
28578
|
+
while (index < self.events.length) {
|
|
28579
|
+
self.events[index][1].end = { ...point };
|
|
28580
|
+
index++;
|
|
28581
|
+
}
|
|
28582
|
+
splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
28583
|
+
self.events.length = index;
|
|
28584
|
+
return checkNewContainers(code);
|
|
28585
|
+
}
|
|
28586
|
+
return start(code);
|
|
28587
|
+
}
|
|
28588
|
+
/** @type {State} */
|
|
28589
|
+
function checkNewContainers(code) {
|
|
28590
|
+
if (continued === stack.length) {
|
|
28591
|
+
if (!childFlow) return documentContinued(code);
|
|
28592
|
+
if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) return flowStart(code);
|
|
28593
|
+
self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);
|
|
28594
|
+
}
|
|
28595
|
+
self.containerState = {};
|
|
28596
|
+
return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);
|
|
28597
|
+
}
|
|
28598
|
+
/** @type {State} */
|
|
28599
|
+
function thereIsANewContainer(code) {
|
|
28600
|
+
if (childFlow) closeFlow();
|
|
28601
|
+
exitContainers(continued);
|
|
28602
|
+
return documentContinued(code);
|
|
28603
|
+
}
|
|
28604
|
+
/** @type {State} */
|
|
28605
|
+
function thereIsNoNewContainer(code) {
|
|
28606
|
+
self.parser.lazy[self.now().line] = continued !== stack.length;
|
|
28607
|
+
lineStartOffset = self.now().offset;
|
|
28608
|
+
return flowStart(code);
|
|
28609
|
+
}
|
|
28610
|
+
/** @type {State} */
|
|
28611
|
+
function documentContinued(code) {
|
|
28612
|
+
self.containerState = {};
|
|
28613
|
+
return effects.attempt(containerConstruct, containerContinue, flowStart)(code);
|
|
28614
|
+
}
|
|
28615
|
+
/** @type {State} */
|
|
28616
|
+
function containerContinue(code) {
|
|
28617
|
+
continued++;
|
|
28618
|
+
stack.push([self.currentConstruct, self.containerState]);
|
|
28619
|
+
return documentContinued(code);
|
|
28620
|
+
}
|
|
28621
|
+
/** @type {State} */
|
|
28622
|
+
function flowStart(code) {
|
|
28623
|
+
if (code === null) {
|
|
28624
|
+
if (childFlow) closeFlow();
|
|
28625
|
+
exitContainers(0);
|
|
28626
|
+
effects.consume(code);
|
|
28627
|
+
return;
|
|
28628
|
+
}
|
|
28629
|
+
childFlow = childFlow || self.parser.flow(self.now());
|
|
28630
|
+
effects.enter("chunkFlow", {
|
|
28631
|
+
_tokenizer: childFlow,
|
|
28632
|
+
contentType: "flow",
|
|
28633
|
+
previous: childToken
|
|
28634
|
+
});
|
|
28635
|
+
return flowContinue(code);
|
|
28636
|
+
}
|
|
28637
|
+
/** @type {State} */
|
|
28638
|
+
function flowContinue(code) {
|
|
28639
|
+
if (code === null) {
|
|
28640
|
+
writeToChild(effects.exit("chunkFlow"), true);
|
|
28641
|
+
exitContainers(0);
|
|
28642
|
+
effects.consume(code);
|
|
28643
|
+
return;
|
|
28644
|
+
}
|
|
28645
|
+
if (markdownLineEnding(code)) {
|
|
28646
|
+
effects.consume(code);
|
|
28647
|
+
writeToChild(effects.exit("chunkFlow"));
|
|
28648
|
+
continued = 0;
|
|
28649
|
+
self.interrupt = void 0;
|
|
28650
|
+
return start;
|
|
28651
|
+
}
|
|
28652
|
+
effects.consume(code);
|
|
28653
|
+
return flowContinue;
|
|
28654
|
+
}
|
|
28655
|
+
/**
|
|
28656
|
+
* @param {Token} token
|
|
28657
|
+
* Token.
|
|
28658
|
+
* @param {boolean | undefined} [endOfFile]
|
|
28659
|
+
* Whether the token is at the end of the file (default: `false`).
|
|
28660
|
+
* @returns {undefined}
|
|
28661
|
+
* Nothing.
|
|
28662
|
+
*/
|
|
28663
|
+
function writeToChild(token, endOfFile) {
|
|
28664
|
+
const stream = self.sliceStream(token);
|
|
28665
|
+
if (endOfFile) stream.push(null);
|
|
28666
|
+
token.previous = childToken;
|
|
28667
|
+
if (childToken) childToken.next = token;
|
|
28668
|
+
childToken = token;
|
|
28669
|
+
childFlow.defineSkip(token.start);
|
|
28670
|
+
childFlow.write(stream);
|
|
28671
|
+
if (self.parser.lazy[token.start.line]) {
|
|
28672
|
+
let index = childFlow.events.length;
|
|
28673
|
+
while (index--) if (childFlow.events[index][1].start.offset < lineStartOffset && (!childFlow.events[index][1].end || childFlow.events[index][1].end.offset > lineStartOffset)) return;
|
|
28674
|
+
const indexBeforeExits = self.events.length;
|
|
28675
|
+
let indexBeforeFlow = indexBeforeExits;
|
|
28676
|
+
/** @type {boolean | undefined} */
|
|
28677
|
+
let seen;
|
|
28678
|
+
/** @type {Point | undefined} */
|
|
28679
|
+
let point;
|
|
28680
|
+
while (indexBeforeFlow--) if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
28681
|
+
if (seen) {
|
|
28682
|
+
point = self.events[indexBeforeFlow][1].end;
|
|
28683
|
+
break;
|
|
28684
|
+
}
|
|
28685
|
+
seen = true;
|
|
28686
|
+
}
|
|
28687
|
+
exitContainers(continued);
|
|
28688
|
+
index = indexBeforeExits;
|
|
28689
|
+
while (index < self.events.length) {
|
|
28690
|
+
self.events[index][1].end = { ...point };
|
|
28691
|
+
index++;
|
|
28692
|
+
}
|
|
28693
|
+
splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
28694
|
+
self.events.length = index;
|
|
28695
|
+
}
|
|
28696
|
+
}
|
|
28697
|
+
/**
|
|
28698
|
+
* @param {number} size
|
|
28699
|
+
* Size.
|
|
28700
|
+
* @returns {undefined}
|
|
28701
|
+
* Nothing.
|
|
28702
|
+
*/
|
|
28703
|
+
function exitContainers(size) {
|
|
28704
|
+
let index = stack.length;
|
|
28705
|
+
while (index-- > size) {
|
|
28706
|
+
const entry = stack[index];
|
|
28707
|
+
self.containerState = entry[1];
|
|
28708
|
+
entry[0].exit.call(self, effects);
|
|
28709
|
+
}
|
|
28710
|
+
stack.length = size;
|
|
28711
|
+
}
|
|
28712
|
+
function closeFlow() {
|
|
28713
|
+
childFlow.write([null]);
|
|
28714
|
+
childToken = void 0;
|
|
28715
|
+
childFlow = void 0;
|
|
28716
|
+
self.containerState._closeFlow = void 0;
|
|
28717
|
+
}
|
|
28718
|
+
}
|
|
28719
|
+
/**
|
|
28720
|
+
* @this {TokenizeContext}
|
|
28721
|
+
* Context.
|
|
28722
|
+
* @type {Tokenizer}
|
|
28723
|
+
* Tokenizer.
|
|
28724
|
+
*/
|
|
28725
|
+
function tokenizeContainer(effects, ok, nok) {
|
|
28726
|
+
return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
28727
|
+
}
|
|
28728
|
+
var document$1, containerConstruct;
|
|
28729
|
+
var init_document = __esmMin((() => {
|
|
28730
|
+
init_micromark_factory_space();
|
|
28731
|
+
init_micromark_util_character();
|
|
28732
|
+
init_micromark_util_chunked();
|
|
28733
|
+
document$1 = { tokenize: initializeDocument };
|
|
28734
|
+
containerConstruct = { tokenize: tokenizeContainer };
|
|
28735
|
+
}));
|
|
28736
|
+
//#endregion
|
|
28737
|
+
//#region ../../node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js
|
|
28738
|
+
/**
|
|
28739
|
+
* Classify whether a code represents whitespace, punctuation, or something
|
|
28740
|
+
* else.
|
|
28741
|
+
*
|
|
28742
|
+
* Used for attention (emphasis, strong), whose sequences can open or close
|
|
28743
|
+
* based on the class of surrounding characters.
|
|
28744
|
+
*
|
|
28745
|
+
* > 👉 **Note**: eof (`null`) is seen as whitespace.
|
|
28746
|
+
*
|
|
28747
|
+
* @param {Code} code
|
|
28748
|
+
* Code.
|
|
28749
|
+
* @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}
|
|
28750
|
+
* Group.
|
|
28751
|
+
*/
|
|
28752
|
+
function classifyCharacter(code) {
|
|
28753
|
+
if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) return 1;
|
|
28754
|
+
if (unicodePunctuation(code)) return 2;
|
|
28755
|
+
}
|
|
28756
|
+
var init_micromark_util_classify_character = __esmMin((() => {
|
|
28757
|
+
init_micromark_util_character();
|
|
28758
|
+
}));
|
|
28759
|
+
//#endregion
|
|
28760
|
+
//#region ../../node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
|
|
28761
|
+
/**
|
|
28762
|
+
* @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'
|
|
28763
|
+
*/
|
|
28764
|
+
/**
|
|
28765
|
+
* Call all `resolveAll`s.
|
|
28766
|
+
*
|
|
28767
|
+
* @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs
|
|
28768
|
+
* List of constructs, optionally with `resolveAll`s.
|
|
28769
|
+
* @param {Array<Event>} events
|
|
28770
|
+
* List of events.
|
|
28771
|
+
* @param {TokenizeContext} context
|
|
28772
|
+
* Context used by `tokenize`.
|
|
28773
|
+
* @returns {Array<Event>}
|
|
28774
|
+
* Changed events.
|
|
28775
|
+
*/
|
|
28776
|
+
function resolveAll(constructs, events, context) {
|
|
28777
|
+
/** @type {Array<Resolver>} */
|
|
28778
|
+
const called = [];
|
|
28779
|
+
let index = -1;
|
|
28780
|
+
while (++index < constructs.length) {
|
|
28781
|
+
const resolve = constructs[index].resolveAll;
|
|
28782
|
+
if (resolve && !called.includes(resolve)) {
|
|
28783
|
+
events = resolve(events, context);
|
|
28784
|
+
called.push(resolve);
|
|
28785
|
+
}
|
|
28786
|
+
}
|
|
28787
|
+
return events;
|
|
28788
|
+
}
|
|
28789
|
+
var init_micromark_util_resolve_all = __esmMin((() => {}));
|
|
28790
|
+
//#endregion
|
|
28791
|
+
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.js
|
|
28792
|
+
/**
|
|
28793
|
+
* Take all events and resolve attention to emphasis or strong.
|
|
28794
|
+
*
|
|
28795
|
+
* @type {Resolver}
|
|
28796
|
+
*/
|
|
28797
|
+
function resolveAllAttention(events, context) {
|
|
28798
|
+
let index = -1;
|
|
28799
|
+
/** @type {number} */
|
|
28800
|
+
let open;
|
|
28801
|
+
/** @type {Token} */
|
|
28802
|
+
let group;
|
|
28803
|
+
/** @type {Token} */
|
|
28804
|
+
let text;
|
|
28805
|
+
/** @type {Token} */
|
|
28806
|
+
let openingSequence;
|
|
28807
|
+
/** @type {Token} */
|
|
28808
|
+
let closingSequence;
|
|
28809
|
+
/** @type {number} */
|
|
28810
|
+
let use;
|
|
28811
|
+
/** @type {Array<Event>} */
|
|
28812
|
+
let nextEvents;
|
|
28813
|
+
/** @type {number} */
|
|
28814
|
+
let offset;
|
|
28815
|
+
while (++index < events.length) if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) {
|
|
28816
|
+
open = index;
|
|
28817
|
+
while (open--) if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {
|
|
28818
|
+
if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) continue;
|
|
28819
|
+
use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;
|
|
28820
|
+
const start = { ...events[open][1].end };
|
|
28821
|
+
const end = { ...events[index][1].start };
|
|
28822
|
+
movePoint(start, -use);
|
|
28823
|
+
movePoint(end, use);
|
|
28824
|
+
openingSequence = {
|
|
28825
|
+
type: use > 1 ? "strongSequence" : "emphasisSequence",
|
|
28826
|
+
start,
|
|
28827
|
+
end: { ...events[open][1].end }
|
|
28828
|
+
};
|
|
28829
|
+
closingSequence = {
|
|
28830
|
+
type: use > 1 ? "strongSequence" : "emphasisSequence",
|
|
28831
|
+
start: { ...events[index][1].start },
|
|
28832
|
+
end
|
|
28833
|
+
};
|
|
28834
|
+
text = {
|
|
28835
|
+
type: use > 1 ? "strongText" : "emphasisText",
|
|
28836
|
+
start: { ...events[open][1].end },
|
|
28837
|
+
end: { ...events[index][1].start }
|
|
28838
|
+
};
|
|
28839
|
+
group = {
|
|
28840
|
+
type: use > 1 ? "strong" : "emphasis",
|
|
28841
|
+
start: { ...openingSequence.start },
|
|
28842
|
+
end: { ...closingSequence.end }
|
|
28843
|
+
};
|
|
28844
|
+
events[open][1].end = { ...openingSequence.start };
|
|
28845
|
+
events[index][1].start = { ...closingSequence.end };
|
|
28846
|
+
nextEvents = [];
|
|
28847
|
+
if (events[open][1].end.offset - events[open][1].start.offset) nextEvents = push(nextEvents, [[
|
|
28848
|
+
"enter",
|
|
28849
|
+
events[open][1],
|
|
28850
|
+
context
|
|
28851
|
+
], [
|
|
28852
|
+
"exit",
|
|
28853
|
+
events[open][1],
|
|
28854
|
+
context
|
|
28855
|
+
]]);
|
|
28856
|
+
nextEvents = push(nextEvents, [
|
|
28857
|
+
[
|
|
28858
|
+
"enter",
|
|
28859
|
+
group,
|
|
28860
|
+
context
|
|
28861
|
+
],
|
|
28862
|
+
[
|
|
28863
|
+
"enter",
|
|
28864
|
+
openingSequence,
|
|
28865
|
+
context
|
|
28866
|
+
],
|
|
28867
|
+
[
|
|
28868
|
+
"exit",
|
|
28869
|
+
openingSequence,
|
|
28870
|
+
context
|
|
28871
|
+
],
|
|
28872
|
+
[
|
|
28873
|
+
"enter",
|
|
28874
|
+
text,
|
|
28875
|
+
context
|
|
28876
|
+
]
|
|
28877
|
+
]);
|
|
28878
|
+
nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));
|
|
28879
|
+
nextEvents = push(nextEvents, [
|
|
28880
|
+
[
|
|
28881
|
+
"exit",
|
|
28882
|
+
text,
|
|
28883
|
+
context
|
|
28884
|
+
],
|
|
28885
|
+
[
|
|
28886
|
+
"enter",
|
|
28887
|
+
closingSequence,
|
|
28888
|
+
context
|
|
28889
|
+
],
|
|
28890
|
+
[
|
|
28891
|
+
"exit",
|
|
28892
|
+
closingSequence,
|
|
28893
|
+
context
|
|
28894
|
+
],
|
|
28895
|
+
[
|
|
28896
|
+
"exit",
|
|
28897
|
+
group,
|
|
28898
|
+
context
|
|
28899
|
+
]
|
|
28900
|
+
]);
|
|
28901
|
+
if (events[index][1].end.offset - events[index][1].start.offset) {
|
|
28902
|
+
offset = 2;
|
|
28903
|
+
nextEvents = push(nextEvents, [[
|
|
28904
|
+
"enter",
|
|
28905
|
+
events[index][1],
|
|
28906
|
+
context
|
|
28907
|
+
], [
|
|
28908
|
+
"exit",
|
|
28909
|
+
events[index][1],
|
|
28910
|
+
context
|
|
28911
|
+
]]);
|
|
28912
|
+
} else offset = 0;
|
|
28913
|
+
splice(events, open - 1, index - open + 3, nextEvents);
|
|
28914
|
+
index = open + nextEvents.length - offset - 2;
|
|
28915
|
+
break;
|
|
28916
|
+
}
|
|
28917
|
+
}
|
|
28918
|
+
index = -1;
|
|
28919
|
+
while (++index < events.length) if (events[index][1].type === "attentionSequence") events[index][1].type = "data";
|
|
28920
|
+
return events;
|
|
28921
|
+
}
|
|
28922
|
+
/**
|
|
28923
|
+
* @this {TokenizeContext}
|
|
28924
|
+
* Context.
|
|
28925
|
+
* @type {Tokenizer}
|
|
28926
|
+
*/
|
|
28927
|
+
function tokenizeAttention(effects, ok) {
|
|
28928
|
+
const attentionMarkers = this.parser.constructs.attentionMarkers.null;
|
|
28929
|
+
const previous = this.previous;
|
|
28930
|
+
const before = classifyCharacter(previous);
|
|
28931
|
+
/** @type {NonNullable<Code>} */
|
|
28932
|
+
let marker;
|
|
28933
|
+
return start;
|
|
28934
|
+
/**
|
|
28935
|
+
* Before a sequence.
|
|
28936
|
+
*
|
|
28937
|
+
* ```markdown
|
|
28938
|
+
* > | **
|
|
28939
|
+
* ^
|
|
28940
|
+
* ```
|
|
28941
|
+
*
|
|
28942
|
+
* @type {State}
|
|
28943
|
+
*/
|
|
28944
|
+
function start(code) {
|
|
28945
|
+
marker = code;
|
|
28946
|
+
effects.enter("attentionSequence");
|
|
28947
|
+
return inside(code);
|
|
28948
|
+
}
|
|
28949
|
+
/**
|
|
28950
|
+
* In a sequence.
|
|
28951
|
+
*
|
|
28952
|
+
* ```markdown
|
|
28953
|
+
* > | **
|
|
28954
|
+
* ^^
|
|
28955
|
+
* ```
|
|
28956
|
+
*
|
|
28957
|
+
* @type {State}
|
|
28958
|
+
*/
|
|
28959
|
+
function inside(code) {
|
|
28960
|
+
if (code === marker) {
|
|
28961
|
+
effects.consume(code);
|
|
28962
|
+
return inside;
|
|
28963
|
+
}
|
|
28964
|
+
const token = effects.exit("attentionSequence");
|
|
28965
|
+
const after = classifyCharacter(code);
|
|
28966
|
+
const open = !after || after === 2 && before || attentionMarkers.includes(code);
|
|
28967
|
+
const close = !before || before === 2 && after || attentionMarkers.includes(previous);
|
|
28968
|
+
token._open = Boolean(marker === 42 ? open : open && (before || !close));
|
|
28969
|
+
token._close = Boolean(marker === 42 ? close : close && (after || !open));
|
|
28970
|
+
return ok(code);
|
|
28971
|
+
}
|
|
28972
|
+
}
|
|
28973
|
+
/**
|
|
28974
|
+
* Move a point a bit.
|
|
28975
|
+
*
|
|
28976
|
+
* Note: `move` only works inside lines! It’s not possible to move past other
|
|
28977
|
+
* chunks (replacement characters, tabs, or line endings).
|
|
28978
|
+
*
|
|
28979
|
+
* @param {Point} point
|
|
28980
|
+
* Point.
|
|
28981
|
+
* @param {number} offset
|
|
28982
|
+
* Amount to move.
|
|
28983
|
+
* @returns {undefined}
|
|
28984
|
+
* Nothing.
|
|
28985
|
+
*/
|
|
28986
|
+
function movePoint(point, offset) {
|
|
28987
|
+
point.column += offset;
|
|
28988
|
+
point.offset += offset;
|
|
28989
|
+
point._bufferIndex += offset;
|
|
28990
|
+
}
|
|
28991
|
+
var attention;
|
|
28992
|
+
var init_attention = __esmMin((() => {
|
|
28993
|
+
init_micromark_util_chunked();
|
|
28994
|
+
init_micromark_util_classify_character();
|
|
28995
|
+
init_micromark_util_resolve_all();
|
|
28996
|
+
attention = {
|
|
28997
|
+
name: "attention",
|
|
28998
|
+
resolveAll: resolveAllAttention,
|
|
28999
|
+
tokenize: tokenizeAttention
|
|
29000
|
+
};
|
|
29001
|
+
}));
|
|
29002
|
+
//#endregion
|
|
29003
|
+
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.js
|
|
29302
29004
|
/**
|
|
29303
|
-
*
|
|
29304
|
-
*
|
|
29305
|
-
*
|
|
29306
|
-
|
|
29005
|
+
* @this {TokenizeContext}
|
|
29006
|
+
* Context.
|
|
29007
|
+
* @type {Tokenizer}
|
|
29008
|
+
*/
|
|
29009
|
+
function tokenizeAutolink(effects, ok, nok) {
|
|
29010
|
+
let size = 0;
|
|
29011
|
+
return start;
|
|
29012
|
+
/**
|
|
29013
|
+
* Start of an autolink.
|
|
29014
|
+
*
|
|
29015
|
+
* ```markdown
|
|
29016
|
+
* > | a<https://example.com>b
|
|
29017
|
+
* ^
|
|
29018
|
+
* > | a<user@example.com>b
|
|
29019
|
+
* ^
|
|
29020
|
+
* ```
|
|
29021
|
+
*
|
|
29022
|
+
* @type {State}
|
|
29023
|
+
*/
|
|
29024
|
+
function start(code) {
|
|
29025
|
+
effects.enter("autolink");
|
|
29026
|
+
effects.enter("autolinkMarker");
|
|
29027
|
+
effects.consume(code);
|
|
29028
|
+
effects.exit("autolinkMarker");
|
|
29029
|
+
effects.enter("autolinkProtocol");
|
|
29030
|
+
return open;
|
|
29031
|
+
}
|
|
29032
|
+
/**
|
|
29033
|
+
* After `<`, at protocol or atext.
|
|
29034
|
+
*
|
|
29035
|
+
* ```markdown
|
|
29036
|
+
* > | a<https://example.com>b
|
|
29037
|
+
* ^
|
|
29038
|
+
* > | a<user@example.com>b
|
|
29039
|
+
* ^
|
|
29040
|
+
* ```
|
|
29041
|
+
*
|
|
29042
|
+
* @type {State}
|
|
29043
|
+
*/
|
|
29044
|
+
function open(code) {
|
|
29045
|
+
if (asciiAlpha(code)) {
|
|
29046
|
+
effects.consume(code);
|
|
29047
|
+
return schemeOrEmailAtext;
|
|
29048
|
+
}
|
|
29049
|
+
if (code === 64) return nok(code);
|
|
29050
|
+
return emailAtext(code);
|
|
29051
|
+
}
|
|
29052
|
+
/**
|
|
29053
|
+
* At second byte of protocol or atext.
|
|
29054
|
+
*
|
|
29055
|
+
* ```markdown
|
|
29056
|
+
* > | a<https://example.com>b
|
|
29057
|
+
* ^
|
|
29058
|
+
* > | a<user@example.com>b
|
|
29059
|
+
* ^
|
|
29060
|
+
* ```
|
|
29061
|
+
*
|
|
29062
|
+
* @type {State}
|
|
29063
|
+
*/
|
|
29064
|
+
function schemeOrEmailAtext(code) {
|
|
29065
|
+
if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {
|
|
29066
|
+
size = 1;
|
|
29067
|
+
return schemeInsideOrEmailAtext(code);
|
|
29068
|
+
}
|
|
29069
|
+
return emailAtext(code);
|
|
29070
|
+
}
|
|
29071
|
+
/**
|
|
29072
|
+
* In ambiguous protocol or atext.
|
|
29073
|
+
*
|
|
29074
|
+
* ```markdown
|
|
29075
|
+
* > | a<https://example.com>b
|
|
29076
|
+
* ^
|
|
29077
|
+
* > | a<user@example.com>b
|
|
29078
|
+
* ^
|
|
29079
|
+
* ```
|
|
29080
|
+
*
|
|
29081
|
+
* @type {State}
|
|
29082
|
+
*/
|
|
29083
|
+
function schemeInsideOrEmailAtext(code) {
|
|
29084
|
+
if (code === 58) {
|
|
29085
|
+
effects.consume(code);
|
|
29086
|
+
size = 0;
|
|
29087
|
+
return urlInside;
|
|
29088
|
+
}
|
|
29089
|
+
if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {
|
|
29090
|
+
effects.consume(code);
|
|
29091
|
+
return schemeInsideOrEmailAtext;
|
|
29092
|
+
}
|
|
29093
|
+
size = 0;
|
|
29094
|
+
return emailAtext(code);
|
|
29095
|
+
}
|
|
29096
|
+
/**
|
|
29097
|
+
* After protocol, in URL.
|
|
29098
|
+
*
|
|
29099
|
+
* ```markdown
|
|
29100
|
+
* > | a<https://example.com>b
|
|
29101
|
+
* ^
|
|
29102
|
+
* ```
|
|
29103
|
+
*
|
|
29104
|
+
* @type {State}
|
|
29105
|
+
*/
|
|
29106
|
+
function urlInside(code) {
|
|
29107
|
+
if (code === 62) {
|
|
29108
|
+
effects.exit("autolinkProtocol");
|
|
29109
|
+
effects.enter("autolinkMarker");
|
|
29110
|
+
effects.consume(code);
|
|
29111
|
+
effects.exit("autolinkMarker");
|
|
29112
|
+
effects.exit("autolink");
|
|
29113
|
+
return ok;
|
|
29114
|
+
}
|
|
29115
|
+
if (code === null || code === 32 || code === 60 || asciiControl(code)) return nok(code);
|
|
29116
|
+
effects.consume(code);
|
|
29117
|
+
return urlInside;
|
|
29118
|
+
}
|
|
29119
|
+
/**
|
|
29120
|
+
* In email atext.
|
|
29121
|
+
*
|
|
29122
|
+
* ```markdown
|
|
29123
|
+
* > | a<user.name@example.com>b
|
|
29124
|
+
* ^
|
|
29125
|
+
* ```
|
|
29126
|
+
*
|
|
29127
|
+
* @type {State}
|
|
29128
|
+
*/
|
|
29129
|
+
function emailAtext(code) {
|
|
29130
|
+
if (code === 64) {
|
|
29131
|
+
effects.consume(code);
|
|
29132
|
+
return emailAtSignOrDot;
|
|
29133
|
+
}
|
|
29134
|
+
if (asciiAtext(code)) {
|
|
29135
|
+
effects.consume(code);
|
|
29136
|
+
return emailAtext;
|
|
29137
|
+
}
|
|
29138
|
+
return nok(code);
|
|
29139
|
+
}
|
|
29140
|
+
/**
|
|
29141
|
+
* In label, after at-sign or dot.
|
|
29142
|
+
*
|
|
29143
|
+
* ```markdown
|
|
29144
|
+
* > | a<user.name@example.com>b
|
|
29145
|
+
* ^ ^
|
|
29146
|
+
* ```
|
|
29147
|
+
*
|
|
29148
|
+
* @type {State}
|
|
29149
|
+
*/
|
|
29150
|
+
function emailAtSignOrDot(code) {
|
|
29151
|
+
return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);
|
|
29152
|
+
}
|
|
29153
|
+
/**
|
|
29154
|
+
* In label, where `.` and `>` are allowed.
|
|
29155
|
+
*
|
|
29156
|
+
* ```markdown
|
|
29157
|
+
* > | a<user.name@example.com>b
|
|
29158
|
+
* ^
|
|
29159
|
+
* ```
|
|
29160
|
+
*
|
|
29161
|
+
* @type {State}
|
|
29162
|
+
*/
|
|
29163
|
+
function emailLabel(code) {
|
|
29164
|
+
if (code === 46) {
|
|
29165
|
+
effects.consume(code);
|
|
29166
|
+
size = 0;
|
|
29167
|
+
return emailAtSignOrDot;
|
|
29168
|
+
}
|
|
29169
|
+
if (code === 62) {
|
|
29170
|
+
effects.exit("autolinkProtocol").type = "autolinkEmail";
|
|
29171
|
+
effects.enter("autolinkMarker");
|
|
29172
|
+
effects.consume(code);
|
|
29173
|
+
effects.exit("autolinkMarker");
|
|
29174
|
+
effects.exit("autolink");
|
|
29175
|
+
return ok;
|
|
29176
|
+
}
|
|
29177
|
+
return emailValue(code);
|
|
29178
|
+
}
|
|
29179
|
+
/**
|
|
29180
|
+
* In label, where `.` and `>` are *not* allowed.
|
|
29181
|
+
*
|
|
29182
|
+
* Though, this is also used in `emailLabel` to parse other values.
|
|
29183
|
+
*
|
|
29184
|
+
* ```markdown
|
|
29185
|
+
* > | a<user.name@ex-ample.com>b
|
|
29186
|
+
* ^
|
|
29187
|
+
* ```
|
|
29188
|
+
*
|
|
29189
|
+
* @type {State}
|
|
29190
|
+
*/
|
|
29191
|
+
function emailValue(code) {
|
|
29192
|
+
if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
|
|
29193
|
+
const next = code === 45 ? emailValue : emailLabel;
|
|
29194
|
+
effects.consume(code);
|
|
29195
|
+
return next;
|
|
29196
|
+
}
|
|
29197
|
+
return nok(code);
|
|
29198
|
+
}
|
|
29199
|
+
}
|
|
29200
|
+
var autolink;
|
|
29201
|
+
var init_autolink = __esmMin((() => {
|
|
29202
|
+
init_micromark_util_character();
|
|
29203
|
+
autolink = {
|
|
29204
|
+
name: "autolink",
|
|
29205
|
+
tokenize: tokenizeAutolink
|
|
29206
|
+
};
|
|
29207
|
+
}));
|
|
29208
|
+
//#endregion
|
|
29209
|
+
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.js
|
|
29210
|
+
/**
|
|
29211
|
+
* @this {TokenizeContext}
|
|
29212
|
+
* Context.
|
|
29213
|
+
* @type {Tokenizer}
|
|
29214
|
+
*/
|
|
29215
|
+
function tokenizeBlankLine(effects, ok, nok) {
|
|
29216
|
+
return start;
|
|
29217
|
+
/**
|
|
29218
|
+
* Start of blank line.
|
|
29219
|
+
*
|
|
29220
|
+
* > 👉 **Note**: `␠` represents a space character.
|
|
29221
|
+
*
|
|
29222
|
+
* ```markdown
|
|
29223
|
+
* > | ␠␠␊
|
|
29224
|
+
* ^
|
|
29225
|
+
* > | ␊
|
|
29226
|
+
* ^
|
|
29227
|
+
* ```
|
|
29228
|
+
*
|
|
29229
|
+
* @type {State}
|
|
29230
|
+
*/
|
|
29231
|
+
function start(code) {
|
|
29232
|
+
return markdownSpace(code) ? factorySpace(effects, after, "linePrefix")(code) : after(code);
|
|
29233
|
+
}
|
|
29234
|
+
/**
|
|
29235
|
+
* At eof/eol, after optional whitespace.
|
|
29236
|
+
*
|
|
29237
|
+
* > 👉 **Note**: `␠` represents a space character.
|
|
29238
|
+
*
|
|
29239
|
+
* ```markdown
|
|
29240
|
+
* > | ␠␠␊
|
|
29241
|
+
* ^
|
|
29242
|
+
* > | ␊
|
|
29243
|
+
* ^
|
|
29244
|
+
* ```
|
|
29245
|
+
*
|
|
29246
|
+
* @type {State}
|
|
29247
|
+
*/
|
|
29248
|
+
function after(code) {
|
|
29249
|
+
return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
|
|
29250
|
+
}
|
|
29251
|
+
}
|
|
29252
|
+
var blankLine;
|
|
29253
|
+
var init_blank_line = __esmMin((() => {
|
|
29254
|
+
init_micromark_factory_space();
|
|
29255
|
+
init_micromark_util_character();
|
|
29256
|
+
blankLine = {
|
|
29257
|
+
partial: true,
|
|
29258
|
+
tokenize: tokenizeBlankLine
|
|
29259
|
+
};
|
|
29260
|
+
}));
|
|
29261
|
+
//#endregion
|
|
29262
|
+
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.js
|
|
29263
|
+
/**
|
|
29264
|
+
* @this {TokenizeContext}
|
|
29265
|
+
* Context.
|
|
29266
|
+
* @type {Tokenizer}
|
|
29267
|
+
*/
|
|
29268
|
+
function tokenizeBlockQuoteStart(effects, ok, nok) {
|
|
29269
|
+
const self = this;
|
|
29270
|
+
return start;
|
|
29271
|
+
/**
|
|
29272
|
+
* Start of block quote.
|
|
29273
|
+
*
|
|
29274
|
+
* ```markdown
|
|
29275
|
+
* > | > a
|
|
29276
|
+
* ^
|
|
29277
|
+
* ```
|
|
29278
|
+
*
|
|
29279
|
+
* @type {State}
|
|
29280
|
+
*/
|
|
29281
|
+
function start(code) {
|
|
29282
|
+
if (code === 62) {
|
|
29283
|
+
const state = self.containerState;
|
|
29284
|
+
if (!state.open) {
|
|
29285
|
+
effects.enter("blockQuote", { _container: true });
|
|
29286
|
+
state.open = true;
|
|
29287
|
+
}
|
|
29288
|
+
effects.enter("blockQuotePrefix");
|
|
29289
|
+
effects.enter("blockQuoteMarker");
|
|
29290
|
+
effects.consume(code);
|
|
29291
|
+
effects.exit("blockQuoteMarker");
|
|
29292
|
+
return after;
|
|
29293
|
+
}
|
|
29294
|
+
return nok(code);
|
|
29295
|
+
}
|
|
29296
|
+
/**
|
|
29297
|
+
* After `>`, before optional whitespace.
|
|
29298
|
+
*
|
|
29299
|
+
* ```markdown
|
|
29300
|
+
* > | > a
|
|
29301
|
+
* ^
|
|
29302
|
+
* ```
|
|
29303
|
+
*
|
|
29304
|
+
* @type {State}
|
|
29305
|
+
*/
|
|
29306
|
+
function after(code) {
|
|
29307
|
+
if (markdownSpace(code)) {
|
|
29308
|
+
effects.enter("blockQuotePrefixWhitespace");
|
|
29309
|
+
effects.consume(code);
|
|
29310
|
+
effects.exit("blockQuotePrefixWhitespace");
|
|
29311
|
+
effects.exit("blockQuotePrefix");
|
|
29312
|
+
return ok;
|
|
29313
|
+
}
|
|
29314
|
+
effects.exit("blockQuotePrefix");
|
|
29315
|
+
return ok(code);
|
|
29316
|
+
}
|
|
29317
|
+
}
|
|
29318
|
+
/**
|
|
29319
|
+
* Start of block quote continuation.
|
|
29307
29320
|
*
|
|
29308
|
-
*
|
|
29309
|
-
*
|
|
29310
|
-
*
|
|
29311
|
-
*
|
|
29321
|
+
* ```markdown
|
|
29322
|
+
* | > a
|
|
29323
|
+
* > | > b
|
|
29324
|
+
* ^
|
|
29325
|
+
* ```
|
|
29326
|
+
*
|
|
29327
|
+
* @this {TokenizeContext}
|
|
29328
|
+
* Context.
|
|
29329
|
+
* @type {Tokenizer}
|
|
29312
29330
|
*/
|
|
29313
|
-
function
|
|
29314
|
-
|
|
29331
|
+
function tokenizeBlockQuoteContinuation(effects, ok, nok) {
|
|
29332
|
+
const self = this;
|
|
29333
|
+
return contStart;
|
|
29334
|
+
/**
|
|
29335
|
+
* Start of block quote continuation.
|
|
29336
|
+
*
|
|
29337
|
+
* Also used to parse the first block quote opening.
|
|
29338
|
+
*
|
|
29339
|
+
* ```markdown
|
|
29340
|
+
* | > a
|
|
29341
|
+
* > | > b
|
|
29342
|
+
* ^
|
|
29343
|
+
* ```
|
|
29344
|
+
*
|
|
29345
|
+
* @type {State}
|
|
29346
|
+
*/
|
|
29347
|
+
function contStart(code) {
|
|
29348
|
+
if (markdownSpace(code)) return factorySpace(effects, contBefore, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
|
|
29349
|
+
return contBefore(code);
|
|
29350
|
+
}
|
|
29351
|
+
/**
|
|
29352
|
+
* At `>`, after optional whitespace.
|
|
29353
|
+
*
|
|
29354
|
+
* Also used to parse the first block quote opening.
|
|
29355
|
+
*
|
|
29356
|
+
* ```markdown
|
|
29357
|
+
* | > a
|
|
29358
|
+
* > | > b
|
|
29359
|
+
* ^
|
|
29360
|
+
* ```
|
|
29361
|
+
*
|
|
29362
|
+
* @type {State}
|
|
29363
|
+
*/
|
|
29364
|
+
function contBefore(code) {
|
|
29365
|
+
return effects.attempt(blockQuote, ok, nok)(code);
|
|
29366
|
+
}
|
|
29315
29367
|
}
|
|
29316
|
-
|
|
29317
|
-
|
|
29318
|
-
|
|
29319
|
-
|
|
29368
|
+
/** @type {Exiter} */
|
|
29369
|
+
function exit(effects) {
|
|
29370
|
+
effects.exit("blockQuote");
|
|
29371
|
+
}
|
|
29372
|
+
var blockQuote;
|
|
29373
|
+
var init_block_quote = __esmMin((() => {
|
|
29374
|
+
init_micromark_factory_space();
|
|
29375
|
+
init_micromark_util_character();
|
|
29376
|
+
blockQuote = {
|
|
29377
|
+
continuation: { tokenize: tokenizeBlockQuoteContinuation },
|
|
29378
|
+
exit,
|
|
29379
|
+
name: "blockQuote",
|
|
29380
|
+
tokenize: tokenizeBlockQuoteStart
|
|
29381
|
+
};
|
|
29382
|
+
}));
|
|
29383
|
+
//#endregion
|
|
29384
|
+
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.js
|
|
29385
|
+
/**
|
|
29386
|
+
* @this {TokenizeContext}
|
|
29387
|
+
* Context.
|
|
29388
|
+
* @type {Tokenizer}
|
|
29389
|
+
*/
|
|
29390
|
+
function tokenizeCharacterEscape(effects, ok, nok) {
|
|
29391
|
+
return start;
|
|
29392
|
+
/**
|
|
29393
|
+
* Start of character escape.
|
|
29394
|
+
*
|
|
29395
|
+
* ```markdown
|
|
29396
|
+
* > | a\*b
|
|
29397
|
+
* ^
|
|
29398
|
+
* ```
|
|
29399
|
+
*
|
|
29400
|
+
* @type {State}
|
|
29401
|
+
*/
|
|
29402
|
+
function start(code) {
|
|
29403
|
+
effects.enter("characterEscape");
|
|
29404
|
+
effects.enter("escapeMarker");
|
|
29405
|
+
effects.consume(code);
|
|
29406
|
+
effects.exit("escapeMarker");
|
|
29407
|
+
return inside;
|
|
29408
|
+
}
|
|
29409
|
+
/**
|
|
29410
|
+
* After `\`, at punctuation.
|
|
29411
|
+
*
|
|
29412
|
+
* ```markdown
|
|
29413
|
+
* > | a\*b
|
|
29414
|
+
* ^
|
|
29415
|
+
* ```
|
|
29416
|
+
*
|
|
29417
|
+
* @type {State}
|
|
29418
|
+
*/
|
|
29419
|
+
function inside(code) {
|
|
29420
|
+
if (asciiPunctuation(code)) {
|
|
29421
|
+
effects.enter("characterEscapeValue");
|
|
29422
|
+
effects.consume(code);
|
|
29423
|
+
effects.exit("characterEscapeValue");
|
|
29424
|
+
effects.exit("characterEscape");
|
|
29425
|
+
return ok;
|
|
29426
|
+
}
|
|
29427
|
+
return nok(code);
|
|
29428
|
+
}
|
|
29429
|
+
}
|
|
29430
|
+
var characterEscape;
|
|
29431
|
+
var init_character_escape = __esmMin((() => {
|
|
29432
|
+
init_micromark_util_character();
|
|
29433
|
+
characterEscape = {
|
|
29434
|
+
name: "characterEscape",
|
|
29435
|
+
tokenize: tokenizeCharacterEscape
|
|
29436
|
+
};
|
|
29320
29437
|
}));
|
|
29321
29438
|
//#endregion
|
|
29322
29439
|
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.js
|
|
@@ -31154,31 +31271,6 @@ var init_micromark_factory_whitespace = __esmMin((() => {
|
|
|
31154
31271
|
init_micromark_util_character();
|
|
31155
31272
|
}));
|
|
31156
31273
|
//#endregion
|
|
31157
|
-
//#region ../../node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.js
|
|
31158
|
-
/**
|
|
31159
|
-
* Normalize an identifier (as found in references, definitions).
|
|
31160
|
-
*
|
|
31161
|
-
* Collapses markdown whitespace, trim, and then lower- and uppercase.
|
|
31162
|
-
*
|
|
31163
|
-
* Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their
|
|
31164
|
-
* lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different
|
|
31165
|
-
* uppercase character (U+0398 (`Θ`)).
|
|
31166
|
-
* So, to get a canonical form, we perform both lower- and uppercase.
|
|
31167
|
-
*
|
|
31168
|
-
* Using uppercase last makes sure keys will never interact with default
|
|
31169
|
-
* prototypal values (such as `constructor`): nothing in the prototype of
|
|
31170
|
-
* `Object` is uppercase.
|
|
31171
|
-
*
|
|
31172
|
-
* @param {string} value
|
|
31173
|
-
* Identifier to normalize.
|
|
31174
|
-
* @returns {string}
|
|
31175
|
-
* Normalized identifier.
|
|
31176
|
-
*/
|
|
31177
|
-
function normalizeIdentifier(value) {
|
|
31178
|
-
return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
31179
|
-
}
|
|
31180
|
-
var init_micromark_util_normalize_identifier = __esmMin((() => {}));
|
|
31181
|
-
//#endregion
|
|
31182
31274
|
//#region ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.js
|
|
31183
31275
|
/**
|
|
31184
31276
|
* @this {TokenizeContext}
|
|
@@ -34998,33 +35090,14 @@ var init_preprocess = __esmMin((() => {
|
|
|
34998
35090
|
//#endregion
|
|
34999
35091
|
//#region ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/index.js
|
|
35000
35092
|
var init_micromark = __esmMin((() => {
|
|
35093
|
+
init_decode_named_character_reference();
|
|
35094
|
+
init_micromark_util_combine_extensions();
|
|
35095
|
+
init_micromark_util_character();
|
|
35001
35096
|
init_parse();
|
|
35002
35097
|
init_postprocess();
|
|
35003
35098
|
init_preprocess();
|
|
35004
35099
|
}));
|
|
35005
35100
|
//#endregion
|
|
35006
|
-
//#region ../../node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js
|
|
35007
|
-
/**
|
|
35008
|
-
* Turn the number (in string form as either hexa- or plain decimal) coming from
|
|
35009
|
-
* a numeric character reference into a character.
|
|
35010
|
-
*
|
|
35011
|
-
* Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes
|
|
35012
|
-
* non-characters and control characters safe.
|
|
35013
|
-
*
|
|
35014
|
-
* @param {string} value
|
|
35015
|
-
* Value to decode.
|
|
35016
|
-
* @param {number} base
|
|
35017
|
-
* Numeric base.
|
|
35018
|
-
* @returns {string}
|
|
35019
|
-
* Character.
|
|
35020
|
-
*/
|
|
35021
|
-
function decodeNumericCharacterReference(value, base) {
|
|
35022
|
-
const code = Number.parseInt(value, base);
|
|
35023
|
-
if (code < 9 || code === 11 || code > 13 && code < 32 || code > 126 && code < 160 || code > 55295 && code < 57344 || code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || code > 1114111) return "�";
|
|
35024
|
-
return String.fromCodePoint(code);
|
|
35025
|
-
}
|
|
35026
|
-
var init_micromark_util_decode_numeric_character_reference = __esmMin((() => {}));
|
|
35027
|
-
//#endregion
|
|
35028
35101
|
//#region ../../node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.js
|
|
35029
35102
|
/**
|
|
35030
35103
|
* Decode markdown strings (which occur in places such as fenced code info
|
|
@@ -38578,7 +38651,8 @@ var init_acorn = __esmMin((() => {
|
|
|
38578
38651
|
this.binop = conf.binop || null;
|
|
38579
38652
|
this.updateContext = null;
|
|
38580
38653
|
};
|
|
38581
|
-
beforeExpr = { beforeExpr: true }
|
|
38654
|
+
beforeExpr = { beforeExpr: true };
|
|
38655
|
+
startsExpr = { startsExpr: true };
|
|
38582
38656
|
keywords = {};
|
|
38583
38657
|
types$1 = {
|
|
38584
38658
|
num: new TokenType("num", startsExpr),
|
|
@@ -38763,8 +38837,24 @@ var init_acorn = __esmMin((() => {
|
|
|
38763
38837
|
preserveParens: false
|
|
38764
38838
|
};
|
|
38765
38839
|
warnedAboutEcmaVersion = false;
|
|
38766
|
-
SCOPE_TOP = 1
|
|
38767
|
-
|
|
38840
|
+
SCOPE_TOP = 1;
|
|
38841
|
+
SCOPE_FUNCTION = 2;
|
|
38842
|
+
SCOPE_ASYNC = 4;
|
|
38843
|
+
SCOPE_GENERATOR = 8;
|
|
38844
|
+
SCOPE_ARROW = 16;
|
|
38845
|
+
SCOPE_SIMPLE_CATCH = 32;
|
|
38846
|
+
SCOPE_SUPER = 64;
|
|
38847
|
+
SCOPE_DIRECT_SUPER = 128;
|
|
38848
|
+
SCOPE_CLASS_STATIC_BLOCK = 256;
|
|
38849
|
+
SCOPE_CLASS_FIELD_INIT = 512;
|
|
38850
|
+
SCOPE_SWITCH = 1024;
|
|
38851
|
+
SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
|
38852
|
+
BIND_NONE = 0;
|
|
38853
|
+
BIND_VAR = 1;
|
|
38854
|
+
BIND_LEXICAL = 2;
|
|
38855
|
+
BIND_FUNCTION = 3;
|
|
38856
|
+
BIND_SIMPLE_CATCH = 4;
|
|
38857
|
+
BIND_OUTSIDE = 5;
|
|
38768
38858
|
Parser = function Parser(options, input, startPos) {
|
|
38769
38859
|
this.options = options = getOptions(options);
|
|
38770
38860
|
this.sourceFile = options.sourceFile;
|
|
@@ -38998,7 +39088,8 @@ var init_acorn = __esmMin((() => {
|
|
|
38998
39088
|
node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
|
|
38999
39089
|
return this.finishNode(node, "Program");
|
|
39000
39090
|
};
|
|
39001
|
-
loopLabel = { kind: "loop" }
|
|
39091
|
+
loopLabel = { kind: "loop" };
|
|
39092
|
+
switchLabel = { kind: "switch" };
|
|
39002
39093
|
pp$8.isLet = function(context) {
|
|
39003
39094
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
|
|
39004
39095
|
skipWhiteSpace.lastIndex = this.pos;
|
|
@@ -39419,7 +39510,9 @@ var init_acorn = __esmMin((() => {
|
|
|
39419
39510
|
decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom();
|
|
39420
39511
|
this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
|
|
39421
39512
|
};
|
|
39422
|
-
FUNC_STATEMENT = 1
|
|
39513
|
+
FUNC_STATEMENT = 1;
|
|
39514
|
+
FUNC_HANGING_STATEMENT = 2;
|
|
39515
|
+
FUNC_NULLABLE_ID = 4;
|
|
39423
39516
|
pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
|
|
39424
39517
|
this.initFunction(node);
|
|
39425
39518
|
if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
|
|
@@ -52657,6 +52750,7 @@ var init_lib$3 = __esmMin((() => {
|
|
|
52657
52750
|
//#region ../../node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/index.js
|
|
52658
52751
|
var init_mdast_util_to_markdown = __esmMin((() => {
|
|
52659
52752
|
init_lib$3();
|
|
52753
|
+
init_handle();
|
|
52660
52754
|
}));
|
|
52661
52755
|
//#endregion
|
|
52662
52756
|
//#region ../../node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.js
|
|
@@ -53430,7 +53524,8 @@ const parseMdxWithDeps = (source, deps) => deps.unified().use(deps.remarkParse).
|
|
|
53430
53524
|
/** Parse MDX (with frontmatter) into mdast. Exposed so callers like
|
|
53431
53525
|
* `fetchGuideFrontmatters` don't need to re-load remark themselves. */
|
|
53432
53526
|
const parseMdx = async (source) => {
|
|
53433
|
-
|
|
53527
|
+
const deps = await loadRemarkDeps();
|
|
53528
|
+
return parseMdxWithDeps(source, deps);
|
|
53434
53529
|
};
|
|
53435
53530
|
const stringifyMdx = (tree, deps) => String(deps.unified().use(deps.remarkFrontmatter).use(deps.remarkMdx).use(deps.remarkStringify, {
|
|
53436
53531
|
bullet: "-",
|
|
@@ -53683,7 +53778,8 @@ const renderComponent = (node, opts, pm, deps) => {
|
|
|
53683
53778
|
case "CreateNxWorkspaceCommand": {
|
|
53684
53779
|
const workspace = readStringAttr(node, "workspace");
|
|
53685
53780
|
if (!workspace) return void 0;
|
|
53686
|
-
|
|
53781
|
+
const iac = readStringAttr(node, "iac");
|
|
53782
|
+
return [codeBlock(buildCreateNxWorkspaceCommand(pm, workspace, iac))];
|
|
53687
53783
|
}
|
|
53688
53784
|
case "InstallCommand": {
|
|
53689
53785
|
const pkg = readStringAttr(node, "pkg") ?? readExpressionAttr(node, "pkg");
|