themekit-js 1.2604.404 → 1.2604.419
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getDefaultExportFromCjs, q as c, t as clearCache, j as init, b as build, p as serve, d as createServer, v as version } from './serve-
|
|
1
|
+
import { a as getDefaultExportFromCjs, q as c, t as clearCache, j as init, b as build, p as serve, d as createServer, v as version } from './serve-DnazDMeO.js';
|
|
2
2
|
import { createLogger } from 'vite';
|
|
3
3
|
import 'path';
|
|
4
4
|
import 'markdown-it';
|
package/dist/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizePath } from 'vite';
|
|
2
2
|
export { loadEnv } from 'vite';
|
|
3
|
-
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-
|
|
4
|
-
export { S as ScaffoldThemeType, b as build, d as createServer, e as defineConfig, h as defineConfigWithTheme, i as defineLoader, j as init, k as mergeConfig, r as resolveConfig, l as resolvePages, n as resolveSiteData, o as resolveUserConfig, s as scaffold, p as serve } from './serve-
|
|
3
|
+
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-DnazDMeO.js';
|
|
4
|
+
export { S as ScaffoldThemeType, b as build, d as createServer, e as defineConfig, h as defineConfigWithTheme, i as defineLoader, j as init, k as mergeConfig, r as resolveConfig, l as resolvePages, n as resolveSiteData, o as resolveUserConfig, s as scaffold, p as serve } from './serve-DnazDMeO.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|
|
@@ -2176,11 +2176,22 @@ async function createSymlink$1 (srcpath, dstpath, type) {
|
|
|
2176
2176
|
} catch { }
|
|
2177
2177
|
|
|
2178
2178
|
if (stats && stats.isSymbolicLink()) {
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2179
|
+
// When srcpath is relative, resolve it relative to dstpath's directory
|
|
2180
|
+
// (standard symlink behavior) or fall back to cwd if that doesn't exist
|
|
2181
|
+
let srcStat;
|
|
2182
|
+
if (path$h.isAbsolute(srcpath)) {
|
|
2183
|
+
srcStat = await fs$e.stat(srcpath);
|
|
2184
|
+
} else {
|
|
2185
|
+
const dstdir = path$h.dirname(dstpath);
|
|
2186
|
+
const relativeToDst = path$h.join(dstdir, srcpath);
|
|
2187
|
+
try {
|
|
2188
|
+
srcStat = await fs$e.stat(relativeToDst);
|
|
2189
|
+
} catch {
|
|
2190
|
+
srcStat = await fs$e.stat(srcpath);
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2183
2193
|
|
|
2194
|
+
const dstStat = await fs$e.stat(dstpath);
|
|
2184
2195
|
if (areIdentical(srcStat, dstStat)) return
|
|
2185
2196
|
}
|
|
2186
2197
|
|
|
@@ -2202,7 +2213,21 @@ function createSymlinkSync$1 (srcpath, dstpath, type) {
|
|
|
2202
2213
|
stats = fs$e.lstatSync(dstpath);
|
|
2203
2214
|
} catch { }
|
|
2204
2215
|
if (stats && stats.isSymbolicLink()) {
|
|
2205
|
-
|
|
2216
|
+
// When srcpath is relative, resolve it relative to dstpath's directory
|
|
2217
|
+
// (standard symlink behavior) or fall back to cwd if that doesn't exist
|
|
2218
|
+
let srcStat;
|
|
2219
|
+
if (path$h.isAbsolute(srcpath)) {
|
|
2220
|
+
srcStat = fs$e.statSync(srcpath);
|
|
2221
|
+
} else {
|
|
2222
|
+
const dstdir = path$h.dirname(dstpath);
|
|
2223
|
+
const relativeToDst = path$h.join(dstdir, srcpath);
|
|
2224
|
+
try {
|
|
2225
|
+
srcStat = fs$e.statSync(relativeToDst);
|
|
2226
|
+
} catch {
|
|
2227
|
+
srcStat = fs$e.statSync(srcpath);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2206
2231
|
const dstStat = fs$e.statSync(dstpath);
|
|
2207
2232
|
if (areIdentical(srcStat, dstStat)) return
|
|
2208
2233
|
}
|
|
@@ -2985,7 +3010,7 @@ function expand$2(str, isTop) {
|
|
|
2985
3010
|
var y = numeric(n[1]);
|
|
2986
3011
|
var width = Math.max(n[0].length, n[1].length);
|
|
2987
3012
|
var incr = n.length == 3
|
|
2988
|
-
? Math.abs(numeric(n[2]))
|
|
3013
|
+
? Math.max(Math.abs(numeric(n[2])), 1)
|
|
2989
3014
|
: 1;
|
|
2990
3015
|
var test = lte;
|
|
2991
3016
|
var reverse = y < x;
|
|
@@ -14624,6 +14649,8 @@ const path$a = path$q;
|
|
|
14624
14649
|
const WIN_SLASH = '\\\\/';
|
|
14625
14650
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
14626
14651
|
|
|
14652
|
+
const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
14653
|
+
|
|
14627
14654
|
/**
|
|
14628
14655
|
* Posix glob regex
|
|
14629
14656
|
*/
|
|
@@ -14687,6 +14714,7 @@ const WINDOWS_CHARS = {
|
|
|
14687
14714
|
*/
|
|
14688
14715
|
|
|
14689
14716
|
const POSIX_REGEX_SOURCE$1 = {
|
|
14717
|
+
__proto__: null,
|
|
14690
14718
|
alnum: 'a-zA-Z0-9',
|
|
14691
14719
|
alpha: 'a-zA-Z',
|
|
14692
14720
|
ascii: '\\x00-\\x7F',
|
|
@@ -14704,6 +14732,7 @@ const POSIX_REGEX_SOURCE$1 = {
|
|
|
14704
14732
|
};
|
|
14705
14733
|
|
|
14706
14734
|
var constants$3 = {
|
|
14735
|
+
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
14707
14736
|
MAX_LENGTH: 1024 * 64,
|
|
14708
14737
|
POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1,
|
|
14709
14738
|
|
|
@@ -14717,6 +14746,7 @@ var constants$3 = {
|
|
|
14717
14746
|
|
|
14718
14747
|
// Replace globs with equivalent patterns to reduce parsing time.
|
|
14719
14748
|
REPLACEMENTS: {
|
|
14749
|
+
__proto__: null,
|
|
14720
14750
|
'***': '*',
|
|
14721
14751
|
'**/**': '**',
|
|
14722
14752
|
'**/**/**': '**'
|
|
@@ -15299,6 +15329,277 @@ const syntaxError = (type, char) => {
|
|
|
15299
15329
|
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
15300
15330
|
};
|
|
15301
15331
|
|
|
15332
|
+
const splitTopLevel = input => {
|
|
15333
|
+
const parts = [];
|
|
15334
|
+
let bracket = 0;
|
|
15335
|
+
let paren = 0;
|
|
15336
|
+
let quote = 0;
|
|
15337
|
+
let value = '';
|
|
15338
|
+
let escaped = false;
|
|
15339
|
+
|
|
15340
|
+
for (const ch of input) {
|
|
15341
|
+
if (escaped === true) {
|
|
15342
|
+
value += ch;
|
|
15343
|
+
escaped = false;
|
|
15344
|
+
continue;
|
|
15345
|
+
}
|
|
15346
|
+
|
|
15347
|
+
if (ch === '\\') {
|
|
15348
|
+
value += ch;
|
|
15349
|
+
escaped = true;
|
|
15350
|
+
continue;
|
|
15351
|
+
}
|
|
15352
|
+
|
|
15353
|
+
if (ch === '"') {
|
|
15354
|
+
quote = quote === 1 ? 0 : 1;
|
|
15355
|
+
value += ch;
|
|
15356
|
+
continue;
|
|
15357
|
+
}
|
|
15358
|
+
|
|
15359
|
+
if (quote === 0) {
|
|
15360
|
+
if (ch === '[') {
|
|
15361
|
+
bracket++;
|
|
15362
|
+
} else if (ch === ']' && bracket > 0) {
|
|
15363
|
+
bracket--;
|
|
15364
|
+
} else if (bracket === 0) {
|
|
15365
|
+
if (ch === '(') {
|
|
15366
|
+
paren++;
|
|
15367
|
+
} else if (ch === ')' && paren > 0) {
|
|
15368
|
+
paren--;
|
|
15369
|
+
} else if (ch === '|' && paren === 0) {
|
|
15370
|
+
parts.push(value);
|
|
15371
|
+
value = '';
|
|
15372
|
+
continue;
|
|
15373
|
+
}
|
|
15374
|
+
}
|
|
15375
|
+
}
|
|
15376
|
+
|
|
15377
|
+
value += ch;
|
|
15378
|
+
}
|
|
15379
|
+
|
|
15380
|
+
parts.push(value);
|
|
15381
|
+
return parts;
|
|
15382
|
+
};
|
|
15383
|
+
|
|
15384
|
+
const isPlainBranch = branch => {
|
|
15385
|
+
let escaped = false;
|
|
15386
|
+
|
|
15387
|
+
for (const ch of branch) {
|
|
15388
|
+
if (escaped === true) {
|
|
15389
|
+
escaped = false;
|
|
15390
|
+
continue;
|
|
15391
|
+
}
|
|
15392
|
+
|
|
15393
|
+
if (ch === '\\') {
|
|
15394
|
+
escaped = true;
|
|
15395
|
+
continue;
|
|
15396
|
+
}
|
|
15397
|
+
|
|
15398
|
+
if (/[?*+@!()[\]{}]/.test(ch)) {
|
|
15399
|
+
return false;
|
|
15400
|
+
}
|
|
15401
|
+
}
|
|
15402
|
+
|
|
15403
|
+
return true;
|
|
15404
|
+
};
|
|
15405
|
+
|
|
15406
|
+
const normalizeSimpleBranch = branch => {
|
|
15407
|
+
let value = branch.trim();
|
|
15408
|
+
let changed = true;
|
|
15409
|
+
|
|
15410
|
+
while (changed === true) {
|
|
15411
|
+
changed = false;
|
|
15412
|
+
|
|
15413
|
+
if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
|
|
15414
|
+
value = value.slice(2, -1);
|
|
15415
|
+
changed = true;
|
|
15416
|
+
}
|
|
15417
|
+
}
|
|
15418
|
+
|
|
15419
|
+
if (!isPlainBranch(value)) {
|
|
15420
|
+
return;
|
|
15421
|
+
}
|
|
15422
|
+
|
|
15423
|
+
return value.replace(/\\(.)/g, '$1');
|
|
15424
|
+
};
|
|
15425
|
+
|
|
15426
|
+
const hasRepeatedCharPrefixOverlap = branches => {
|
|
15427
|
+
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
15428
|
+
|
|
15429
|
+
for (let i = 0; i < values.length; i++) {
|
|
15430
|
+
for (let j = i + 1; j < values.length; j++) {
|
|
15431
|
+
const a = values[i];
|
|
15432
|
+
const b = values[j];
|
|
15433
|
+
const char = a[0];
|
|
15434
|
+
|
|
15435
|
+
if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
|
|
15436
|
+
continue;
|
|
15437
|
+
}
|
|
15438
|
+
|
|
15439
|
+
if (a === b || a.startsWith(b) || b.startsWith(a)) {
|
|
15440
|
+
return true;
|
|
15441
|
+
}
|
|
15442
|
+
}
|
|
15443
|
+
}
|
|
15444
|
+
|
|
15445
|
+
return false;
|
|
15446
|
+
};
|
|
15447
|
+
|
|
15448
|
+
const parseRepeatedExtglob = (pattern, requireEnd = true) => {
|
|
15449
|
+
if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') {
|
|
15450
|
+
return;
|
|
15451
|
+
}
|
|
15452
|
+
|
|
15453
|
+
let bracket = 0;
|
|
15454
|
+
let paren = 0;
|
|
15455
|
+
let quote = 0;
|
|
15456
|
+
let escaped = false;
|
|
15457
|
+
|
|
15458
|
+
for (let i = 1; i < pattern.length; i++) {
|
|
15459
|
+
const ch = pattern[i];
|
|
15460
|
+
|
|
15461
|
+
if (escaped === true) {
|
|
15462
|
+
escaped = false;
|
|
15463
|
+
continue;
|
|
15464
|
+
}
|
|
15465
|
+
|
|
15466
|
+
if (ch === '\\') {
|
|
15467
|
+
escaped = true;
|
|
15468
|
+
continue;
|
|
15469
|
+
}
|
|
15470
|
+
|
|
15471
|
+
if (ch === '"') {
|
|
15472
|
+
quote = quote === 1 ? 0 : 1;
|
|
15473
|
+
continue;
|
|
15474
|
+
}
|
|
15475
|
+
|
|
15476
|
+
if (quote === 1) {
|
|
15477
|
+
continue;
|
|
15478
|
+
}
|
|
15479
|
+
|
|
15480
|
+
if (ch === '[') {
|
|
15481
|
+
bracket++;
|
|
15482
|
+
continue;
|
|
15483
|
+
}
|
|
15484
|
+
|
|
15485
|
+
if (ch === ']' && bracket > 0) {
|
|
15486
|
+
bracket--;
|
|
15487
|
+
continue;
|
|
15488
|
+
}
|
|
15489
|
+
|
|
15490
|
+
if (bracket > 0) {
|
|
15491
|
+
continue;
|
|
15492
|
+
}
|
|
15493
|
+
|
|
15494
|
+
if (ch === '(') {
|
|
15495
|
+
paren++;
|
|
15496
|
+
continue;
|
|
15497
|
+
}
|
|
15498
|
+
|
|
15499
|
+
if (ch === ')') {
|
|
15500
|
+
paren--;
|
|
15501
|
+
|
|
15502
|
+
if (paren === 0) {
|
|
15503
|
+
if (requireEnd === true && i !== pattern.length - 1) {
|
|
15504
|
+
return;
|
|
15505
|
+
}
|
|
15506
|
+
|
|
15507
|
+
return {
|
|
15508
|
+
type: pattern[0],
|
|
15509
|
+
body: pattern.slice(2, i),
|
|
15510
|
+
end: i
|
|
15511
|
+
};
|
|
15512
|
+
}
|
|
15513
|
+
}
|
|
15514
|
+
}
|
|
15515
|
+
};
|
|
15516
|
+
|
|
15517
|
+
const getStarExtglobSequenceOutput = pattern => {
|
|
15518
|
+
let index = 0;
|
|
15519
|
+
const chars = [];
|
|
15520
|
+
|
|
15521
|
+
while (index < pattern.length) {
|
|
15522
|
+
const match = parseRepeatedExtglob(pattern.slice(index), false);
|
|
15523
|
+
|
|
15524
|
+
if (!match || match.type !== '*') {
|
|
15525
|
+
return;
|
|
15526
|
+
}
|
|
15527
|
+
|
|
15528
|
+
const branches = splitTopLevel(match.body).map(branch => branch.trim());
|
|
15529
|
+
if (branches.length !== 1) {
|
|
15530
|
+
return;
|
|
15531
|
+
}
|
|
15532
|
+
|
|
15533
|
+
const branch = normalizeSimpleBranch(branches[0]);
|
|
15534
|
+
if (!branch || branch.length !== 1) {
|
|
15535
|
+
return;
|
|
15536
|
+
}
|
|
15537
|
+
|
|
15538
|
+
chars.push(branch);
|
|
15539
|
+
index += match.end + 1;
|
|
15540
|
+
}
|
|
15541
|
+
|
|
15542
|
+
if (chars.length < 1) {
|
|
15543
|
+
return;
|
|
15544
|
+
}
|
|
15545
|
+
|
|
15546
|
+
const source = chars.length === 1
|
|
15547
|
+
? utils$k.escapeRegex(chars[0])
|
|
15548
|
+
: `[${chars.map(ch => utils$k.escapeRegex(ch)).join('')}]`;
|
|
15549
|
+
|
|
15550
|
+
return `${source}*`;
|
|
15551
|
+
};
|
|
15552
|
+
|
|
15553
|
+
const repeatedExtglobRecursion = pattern => {
|
|
15554
|
+
let depth = 0;
|
|
15555
|
+
let value = pattern.trim();
|
|
15556
|
+
let match = parseRepeatedExtglob(value);
|
|
15557
|
+
|
|
15558
|
+
while (match) {
|
|
15559
|
+
depth++;
|
|
15560
|
+
value = match.body.trim();
|
|
15561
|
+
match = parseRepeatedExtglob(value);
|
|
15562
|
+
}
|
|
15563
|
+
|
|
15564
|
+
return depth;
|
|
15565
|
+
};
|
|
15566
|
+
|
|
15567
|
+
const analyzeRepeatedExtglob = (body, options) => {
|
|
15568
|
+
if (options.maxExtglobRecursion === false) {
|
|
15569
|
+
return { risky: false };
|
|
15570
|
+
}
|
|
15571
|
+
|
|
15572
|
+
const max =
|
|
15573
|
+
typeof options.maxExtglobRecursion === 'number'
|
|
15574
|
+
? options.maxExtglobRecursion
|
|
15575
|
+
: constants$2.DEFAULT_MAX_EXTGLOB_RECURSION;
|
|
15576
|
+
|
|
15577
|
+
const branches = splitTopLevel(body).map(branch => branch.trim());
|
|
15578
|
+
|
|
15579
|
+
if (branches.length > 1) {
|
|
15580
|
+
if (
|
|
15581
|
+
branches.some(branch => branch === '') ||
|
|
15582
|
+
branches.some(branch => /^[*?]+$/.test(branch)) ||
|
|
15583
|
+
hasRepeatedCharPrefixOverlap(branches)
|
|
15584
|
+
) {
|
|
15585
|
+
return { risky: true };
|
|
15586
|
+
}
|
|
15587
|
+
}
|
|
15588
|
+
|
|
15589
|
+
for (const branch of branches) {
|
|
15590
|
+
const safeOutput = getStarExtglobSequenceOutput(branch);
|
|
15591
|
+
if (safeOutput) {
|
|
15592
|
+
return { risky: true, safeOutput };
|
|
15593
|
+
}
|
|
15594
|
+
|
|
15595
|
+
if (repeatedExtglobRecursion(branch) > max) {
|
|
15596
|
+
return { risky: true };
|
|
15597
|
+
}
|
|
15598
|
+
}
|
|
15599
|
+
|
|
15600
|
+
return { risky: false };
|
|
15601
|
+
};
|
|
15602
|
+
|
|
15302
15603
|
/**
|
|
15303
15604
|
* Parse the given input string.
|
|
15304
15605
|
* @param {String} input
|
|
@@ -15480,6 +15781,8 @@ const parse$8 = (input, options) => {
|
|
|
15480
15781
|
token.prev = prev;
|
|
15481
15782
|
token.parens = state.parens;
|
|
15482
15783
|
token.output = state.output;
|
|
15784
|
+
token.startIndex = state.index;
|
|
15785
|
+
token.tokensIndex = tokens.length;
|
|
15483
15786
|
const output = (opts.capture ? '(' : '') + token.open;
|
|
15484
15787
|
|
|
15485
15788
|
increment('parens');
|
|
@@ -15489,6 +15792,34 @@ const parse$8 = (input, options) => {
|
|
|
15489
15792
|
};
|
|
15490
15793
|
|
|
15491
15794
|
const extglobClose = token => {
|
|
15795
|
+
const literal = input.slice(token.startIndex, state.index + 1);
|
|
15796
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
15797
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
15798
|
+
|
|
15799
|
+
if ((token.type === 'plus' || token.type === 'star') && analysis.risky) {
|
|
15800
|
+
const safeOutput = analysis.safeOutput
|
|
15801
|
+
? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput)
|
|
15802
|
+
: undefined;
|
|
15803
|
+
const open = tokens[token.tokensIndex];
|
|
15804
|
+
|
|
15805
|
+
open.type = 'text';
|
|
15806
|
+
open.value = literal;
|
|
15807
|
+
open.output = safeOutput || utils$k.escapeRegex(literal);
|
|
15808
|
+
|
|
15809
|
+
for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
|
|
15810
|
+
tokens[i].value = '';
|
|
15811
|
+
tokens[i].output = '';
|
|
15812
|
+
delete tokens[i].suffix;
|
|
15813
|
+
}
|
|
15814
|
+
|
|
15815
|
+
state.output = token.output + open.output;
|
|
15816
|
+
state.backtrack = true;
|
|
15817
|
+
|
|
15818
|
+
push({ type: 'paren', extglob: true, value, output: '' });
|
|
15819
|
+
decrement('parens');
|
|
15820
|
+
return;
|
|
15821
|
+
}
|
|
15822
|
+
|
|
15492
15823
|
let output = token.close + (opts.capture ? ')' : '');
|
|
15493
15824
|
let rest;
|
|
15494
15825
|
|
|
@@ -29255,7 +29586,7 @@ function container_plugin (md, name, options) {
|
|
|
29255
29586
|
md.renderer.rules['container_' + name + '_close'] = render;
|
|
29256
29587
|
}
|
|
29257
29588
|
|
|
29258
|
-
|
|
29589
|
+
let urlAlphabet =
|
|
29259
29590
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
29260
29591
|
|
|
29261
29592
|
const POOL_SIZE_MULTIPLIER = 128;
|
|
@@ -30896,7 +31227,7 @@ async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, isBuild
|
|
|
30896
31227
|
let src2 = token.attrGet("src") == null ? "" : token.attrGet("src");
|
|
30897
31228
|
if (src2 != null && isBuild) {
|
|
30898
31229
|
siteConfig?.logger.info("raw:" + src2);
|
|
30899
|
-
src2 = src2.replace("../.themekit/dist", "
|
|
31230
|
+
src2 = src2.replace("../.themekit/dist/", "../");
|
|
30900
31231
|
if (siteConfig != null) {
|
|
30901
31232
|
src2 = src2.replace(".themekit/dist/", siteConfig?.site.base);
|
|
30902
31233
|
}
|
|
@@ -36757,6 +37088,7 @@ var sax = {};
|
|
|
36757
37088
|
clearBuffers(parser);
|
|
36758
37089
|
parser.q = parser.c = '';
|
|
36759
37090
|
parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH;
|
|
37091
|
+
parser.encoding = null;
|
|
36760
37092
|
parser.opt = opt || {};
|
|
36761
37093
|
parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags;
|
|
36762
37094
|
parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase';
|
|
@@ -36901,6 +37233,39 @@ var sax = {};
|
|
|
36901
37233
|
return new SAXStream(strict, opt)
|
|
36902
37234
|
}
|
|
36903
37235
|
|
|
37236
|
+
function determineBufferEncoding(data, isEnd) {
|
|
37237
|
+
// BOM-based detection is the most reliable signal when present.
|
|
37238
|
+
if (data.length >= 2) {
|
|
37239
|
+
if (data[0] === 0xff && data[1] === 0xfe) {
|
|
37240
|
+
return 'utf-16le'
|
|
37241
|
+
}
|
|
37242
|
+
|
|
37243
|
+
if (data[0] === 0xfe && data[1] === 0xff) {
|
|
37244
|
+
return 'utf-16be'
|
|
37245
|
+
}
|
|
37246
|
+
}
|
|
37247
|
+
|
|
37248
|
+
if (data.length >= 3 && data[0] === 0xef && data[1] === 0xbb && data[2] === 0xbf) {
|
|
37249
|
+
return 'utf8'
|
|
37250
|
+
}
|
|
37251
|
+
|
|
37252
|
+
if (data.length >= 4) {
|
|
37253
|
+
// XML documents without a BOM still start with "<?xml", which is enough
|
|
37254
|
+
// to distinguish UTF-16LE/BE from UTF-8 by looking at the zero bytes.
|
|
37255
|
+
if (data[0] === 0x3c && data[1] === 0x00 && data[2] === 0x3f && data[3] === 0x00) {
|
|
37256
|
+
return 'utf-16le'
|
|
37257
|
+
}
|
|
37258
|
+
|
|
37259
|
+
if (data[0] === 0x00 && data[1] === 0x3c && data[2] === 0x00 && data[3] === 0x3f) {
|
|
37260
|
+
return 'utf-16be'
|
|
37261
|
+
}
|
|
37262
|
+
|
|
37263
|
+
return 'utf8'
|
|
37264
|
+
}
|
|
37265
|
+
|
|
37266
|
+
return isEnd ? 'utf8' : null
|
|
37267
|
+
}
|
|
37268
|
+
|
|
36904
37269
|
function SAXStream(strict, opt) {
|
|
36905
37270
|
if (!(this instanceof SAXStream)) {
|
|
36906
37271
|
return new SAXStream(strict, opt)
|
|
@@ -36927,7 +37292,7 @@ var sax = {};
|
|
|
36927
37292
|
};
|
|
36928
37293
|
|
|
36929
37294
|
this._decoder = null;
|
|
36930
|
-
|
|
37295
|
+
this._decoderBuffer = null;
|
|
36931
37296
|
streamWraps.forEach(function (ev) {
|
|
36932
37297
|
Object.defineProperty(me, 'on' + ev, {
|
|
36933
37298
|
get: function () {
|
|
@@ -36953,16 +37318,47 @@ var sax = {};
|
|
|
36953
37318
|
},
|
|
36954
37319
|
});
|
|
36955
37320
|
|
|
37321
|
+
SAXStream.prototype._decodeBuffer = function (data, isEnd) {
|
|
37322
|
+
if (this._decoderBuffer) {
|
|
37323
|
+
// Keep incomplete leading bytes until we have enough data to infer the
|
|
37324
|
+
// stream encoding, then decode the buffered prefix together with the next chunk.
|
|
37325
|
+
data = Buffer.concat([this._decoderBuffer, data]);
|
|
37326
|
+
this._decoderBuffer = null;
|
|
37327
|
+
}
|
|
37328
|
+
|
|
37329
|
+
if (!this._decoder) {
|
|
37330
|
+
var encoding = determineBufferEncoding(data, isEnd);
|
|
37331
|
+
if (!encoding) {
|
|
37332
|
+
// A very short first chunk may not contain enough bytes to detect the
|
|
37333
|
+
// encoding yet, so defer decoding until the next write/end call.
|
|
37334
|
+
this._decoderBuffer = data;
|
|
37335
|
+
return ''
|
|
37336
|
+
}
|
|
37337
|
+
|
|
37338
|
+
// Store the detected transport encoding so strict mode can compare it
|
|
37339
|
+
// with the optional encoding declared in the XML prolog later on.
|
|
37340
|
+
this._parser.encoding = encoding;
|
|
37341
|
+
this._decoder = new TextDecoder(encoding);
|
|
37342
|
+
}
|
|
37343
|
+
|
|
37344
|
+
return this._decoder.decode(data, { stream: !isEnd })
|
|
37345
|
+
};
|
|
37346
|
+
|
|
36956
37347
|
SAXStream.prototype.write = function (data) {
|
|
36957
37348
|
if (
|
|
36958
37349
|
typeof Buffer === 'function' &&
|
|
36959
37350
|
typeof Buffer.isBuffer === 'function' &&
|
|
36960
37351
|
Buffer.isBuffer(data)
|
|
36961
37352
|
) {
|
|
36962
|
-
|
|
36963
|
-
|
|
37353
|
+
data = this._decodeBuffer(data, false);
|
|
37354
|
+
} else if (this._decoderBuffer) {
|
|
37355
|
+
// Flush any buffered binary prefix before handling a string chunk.
|
|
37356
|
+
// This only matters if the caller mixes Buffer and string writes (used in test).
|
|
37357
|
+
var remaining = this._decodeBuffer(Buffer.alloc(0), true);
|
|
37358
|
+
if (remaining) {
|
|
37359
|
+
this._parser.write(remaining);
|
|
37360
|
+
this.emit('data', remaining);
|
|
36964
37361
|
}
|
|
36965
|
-
data = this._decoder.decode(data, { stream: true });
|
|
36966
37362
|
}
|
|
36967
37363
|
|
|
36968
37364
|
this._parser.write(data.toString());
|
|
@@ -36975,7 +37371,13 @@ var sax = {};
|
|
|
36975
37371
|
this.write(chunk);
|
|
36976
37372
|
}
|
|
36977
37373
|
// Flush any remaining decoded data from the TextDecoder
|
|
36978
|
-
if (this.
|
|
37374
|
+
if (this._decoderBuffer) {
|
|
37375
|
+
var finalChunk = this._decodeBuffer(Buffer.alloc(0), true);
|
|
37376
|
+
if (finalChunk) {
|
|
37377
|
+
this._parser.write(finalChunk);
|
|
37378
|
+
this.emit('data', finalChunk);
|
|
37379
|
+
}
|
|
37380
|
+
} else if (this._decoder) {
|
|
36979
37381
|
var remaining = this._decoder.decode();
|
|
36980
37382
|
if (remaining) {
|
|
36981
37383
|
this._parser.write(remaining);
|
|
@@ -37368,6 +37770,59 @@ var sax = {};
|
|
|
37368
37770
|
parser[event] && parser[event](data);
|
|
37369
37771
|
}
|
|
37370
37772
|
|
|
37773
|
+
function getDeclaredEncoding(body) {
|
|
37774
|
+
var match = body && body.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);
|
|
37775
|
+
return match ? match[2] : null
|
|
37776
|
+
}
|
|
37777
|
+
|
|
37778
|
+
function normalizeEncodingName(encoding) {
|
|
37779
|
+
if (!encoding) {
|
|
37780
|
+
return null
|
|
37781
|
+
}
|
|
37782
|
+
|
|
37783
|
+
return encoding.toLowerCase().replace(/[^a-z0-9]/g, '')
|
|
37784
|
+
}
|
|
37785
|
+
|
|
37786
|
+
function encodingsMatch(detectedEncoding, declaredEncoding) {
|
|
37787
|
+
const detected = normalizeEncodingName(detectedEncoding);
|
|
37788
|
+
const declared = normalizeEncodingName(declaredEncoding);
|
|
37789
|
+
|
|
37790
|
+
if (!detected || !declared) {
|
|
37791
|
+
return true
|
|
37792
|
+
}
|
|
37793
|
+
|
|
37794
|
+
if (declared === 'utf16') {
|
|
37795
|
+
return detected === 'utf16le' || detected === 'utf16be'
|
|
37796
|
+
}
|
|
37797
|
+
|
|
37798
|
+
return detected === declared
|
|
37799
|
+
}
|
|
37800
|
+
|
|
37801
|
+
function validateXmlDeclarationEncoding(parser, data) {
|
|
37802
|
+
if (
|
|
37803
|
+
!parser.strict ||
|
|
37804
|
+
!parser.encoding ||
|
|
37805
|
+
!data ||
|
|
37806
|
+
data.name !== 'xml'
|
|
37807
|
+
) {
|
|
37808
|
+
return
|
|
37809
|
+
}
|
|
37810
|
+
|
|
37811
|
+
var declaredEncoding = getDeclaredEncoding(data.body);
|
|
37812
|
+
if (
|
|
37813
|
+
declaredEncoding &&
|
|
37814
|
+
!encodingsMatch(parser.encoding, declaredEncoding)
|
|
37815
|
+
) {
|
|
37816
|
+
strictFail(
|
|
37817
|
+
parser,
|
|
37818
|
+
'XML declaration encoding ' +
|
|
37819
|
+
declaredEncoding +
|
|
37820
|
+
' does not match detected stream encoding ' +
|
|
37821
|
+
parser.encoding.toUpperCase()
|
|
37822
|
+
);
|
|
37823
|
+
}
|
|
37824
|
+
}
|
|
37825
|
+
|
|
37371
37826
|
function emitNode(parser, nodeType, data) {
|
|
37372
37827
|
if (parser.textNode) closeText(parser);
|
|
37373
37828
|
emit(parser, nodeType, data);
|
|
@@ -38071,10 +38526,12 @@ var sax = {};
|
|
|
38071
38526
|
|
|
38072
38527
|
case S.PROC_INST_ENDING:
|
|
38073
38528
|
if (c === '>') {
|
|
38074
|
-
|
|
38529
|
+
const procInstEndData = {
|
|
38075
38530
|
name: parser.procInstName,
|
|
38076
38531
|
body: parser.procInstBody,
|
|
38077
|
-
}
|
|
38532
|
+
};
|
|
38533
|
+
validateXmlDeclarationEncoding(parser, procInstEndData);
|
|
38534
|
+
emitNode(parser, 'onprocessinginstruction', procInstEndData);
|
|
38078
38535
|
parser.procInstName = parser.procInstBody = '';
|
|
38079
38536
|
parser.state = S.TEXT;
|
|
38080
38537
|
} else {
|
|
@@ -39343,7 +39800,7 @@ async function generateSitemap(siteConfig) {
|
|
|
39343
39800
|
}
|
|
39344
39801
|
|
|
39345
39802
|
/**
|
|
39346
|
-
* @vue/shared v3.5.
|
|
39803
|
+
* @vue/shared v3.5.32
|
|
39347
39804
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
39348
39805
|
* @license MIT
|
|
39349
39806
|
**/
|
|
@@ -39441,7 +39898,7 @@ function escapeHtml(string) {
|
|
|
39441
39898
|
|
|
39442
39899
|
var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
|
|
39443
39900
|
|
|
39444
|
-
var version = "1.2604.
|
|
39901
|
+
var version = "1.2604.0419";
|
|
39445
39902
|
|
|
39446
39903
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
39447
39904
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
|
@@ -40313,7 +40770,7 @@ var lodash_templatesettings = templateSettings;
|
|
|
40313
40770
|
|
|
40314
40771
|
/**
|
|
40315
40772
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
40316
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
40773
|
+
* Build: `lodash modularize exports="npm" --repo lodash/lodash#4.18.1 -o ./`
|
|
40317
40774
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
40318
40775
|
* Released under MIT license <https://lodash.com/license>
|
|
40319
40776
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
@@ -40325,6 +40782,10 @@ lodash_template.exports;
|
|
|
40325
40782
|
var reInterpolate = lodash__reinterpolate,
|
|
40326
40783
|
templateSettings = lodash_templatesettings;
|
|
40327
40784
|
|
|
40785
|
+
/** Error message constants. */
|
|
40786
|
+
var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',
|
|
40787
|
+
INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';
|
|
40788
|
+
|
|
40328
40789
|
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
40329
40790
|
var HOT_COUNT = 800,
|
|
40330
40791
|
HOT_SPAN = 16;
|
|
@@ -40377,6 +40838,18 @@ lodash_template.exports;
|
|
|
40377
40838
|
*/
|
|
40378
40839
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
40379
40840
|
|
|
40841
|
+
/**
|
|
40842
|
+
* Used to validate the `validate` option in `_.template` variable.
|
|
40843
|
+
*
|
|
40844
|
+
* Forbids characters which could potentially change the meaning of the function argument definition:
|
|
40845
|
+
* - "()," (modification of function parameters)
|
|
40846
|
+
* - "=" (default value)
|
|
40847
|
+
* - "[]{}" (destructuring of function parameters)
|
|
40848
|
+
* - "/" (beginning of a comment)
|
|
40849
|
+
* - whitespace
|
|
40850
|
+
*/
|
|
40851
|
+
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
|
|
40852
|
+
|
|
40380
40853
|
/**
|
|
40381
40854
|
* Used to match
|
|
40382
40855
|
* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
|
|
@@ -40480,6 +40953,27 @@ lodash_template.exports;
|
|
|
40480
40953
|
return func.apply(thisArg, args);
|
|
40481
40954
|
}
|
|
40482
40955
|
|
|
40956
|
+
/**
|
|
40957
|
+
* A specialized version of `_.forEach` for arrays without support for
|
|
40958
|
+
* iteratee shorthands.
|
|
40959
|
+
*
|
|
40960
|
+
* @private
|
|
40961
|
+
* @param {Array} [array] The array to iterate over.
|
|
40962
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
40963
|
+
* @returns {Array} Returns `array`.
|
|
40964
|
+
*/
|
|
40965
|
+
function arrayEach(array, iteratee) {
|
|
40966
|
+
var index = -1,
|
|
40967
|
+
length = array == null ? 0 : array.length;
|
|
40968
|
+
|
|
40969
|
+
while (++index < length) {
|
|
40970
|
+
if (iteratee(array[index], index, array) === false) {
|
|
40971
|
+
break;
|
|
40972
|
+
}
|
|
40973
|
+
}
|
|
40974
|
+
return array;
|
|
40975
|
+
}
|
|
40976
|
+
|
|
40483
40977
|
/**
|
|
40484
40978
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
40485
40979
|
* shorthands.
|
|
@@ -40663,7 +41157,7 @@ lodash_template.exports;
|
|
|
40663
41157
|
length = result.length;
|
|
40664
41158
|
|
|
40665
41159
|
for (var key in value) {
|
|
40666
|
-
if ((
|
|
41160
|
+
if ((hasOwnProperty.call(value, key)) &&
|
|
40667
41161
|
!(skipIndexes && (
|
|
40668
41162
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
40669
41163
|
key == 'length' ||
|
|
@@ -40795,28 +41289,6 @@ lodash_template.exports;
|
|
|
40795
41289
|
return result;
|
|
40796
41290
|
}
|
|
40797
41291
|
|
|
40798
|
-
/**
|
|
40799
|
-
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
40800
|
-
*
|
|
40801
|
-
* @private
|
|
40802
|
-
* @param {Object} object The object to query.
|
|
40803
|
-
* @returns {Array} Returns the array of property names.
|
|
40804
|
-
*/
|
|
40805
|
-
function baseKeysIn(object) {
|
|
40806
|
-
if (!isObject(object)) {
|
|
40807
|
-
return nativeKeysIn(object);
|
|
40808
|
-
}
|
|
40809
|
-
var isProto = isPrototype(object),
|
|
40810
|
-
result = [];
|
|
40811
|
-
|
|
40812
|
-
for (var key in object) {
|
|
40813
|
-
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
|
40814
|
-
result.push(key);
|
|
40815
|
-
}
|
|
40816
|
-
}
|
|
40817
|
-
return result;
|
|
40818
|
-
}
|
|
40819
|
-
|
|
40820
41292
|
/**
|
|
40821
41293
|
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
40822
41294
|
*
|
|
@@ -41066,25 +41538,6 @@ lodash_template.exports;
|
|
|
41066
41538
|
return value === proto;
|
|
41067
41539
|
}
|
|
41068
41540
|
|
|
41069
|
-
/**
|
|
41070
|
-
* This function is like
|
|
41071
|
-
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
41072
|
-
* except that it includes inherited enumerable properties.
|
|
41073
|
-
*
|
|
41074
|
-
* @private
|
|
41075
|
-
* @param {Object} object The object to query.
|
|
41076
|
-
* @returns {Array} Returns the array of property names.
|
|
41077
|
-
*/
|
|
41078
|
-
function nativeKeysIn(object) {
|
|
41079
|
-
var result = [];
|
|
41080
|
-
if (object != null) {
|
|
41081
|
-
for (var key in Object(object)) {
|
|
41082
|
-
result.push(key);
|
|
41083
|
-
}
|
|
41084
|
-
}
|
|
41085
|
-
return result;
|
|
41086
|
-
}
|
|
41087
|
-
|
|
41088
41541
|
/**
|
|
41089
41542
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
41090
41543
|
*
|
|
@@ -41567,7 +42020,7 @@ lodash_template.exports;
|
|
|
41567
42020
|
}
|
|
41568
42021
|
|
|
41569
42022
|
/**
|
|
41570
|
-
* This method is like `_.
|
|
42023
|
+
* This method is like `_.assign` except that it accepts `customizer`
|
|
41571
42024
|
* which is invoked to produce the assigned values. If `customizer` returns
|
|
41572
42025
|
* `undefined`, assignment is handled by the method instead. The `customizer`
|
|
41573
42026
|
* is invoked with five arguments: (objValue, srcValue, key, object, source).
|
|
@@ -41577,26 +42030,25 @@ lodash_template.exports;
|
|
|
41577
42030
|
* @static
|
|
41578
42031
|
* @memberOf _
|
|
41579
42032
|
* @since 4.0.0
|
|
41580
|
-
* @alias extendWith
|
|
41581
42033
|
* @category Object
|
|
41582
42034
|
* @param {Object} object The destination object.
|
|
41583
42035
|
* @param {...Object} sources The source objects.
|
|
41584
42036
|
* @param {Function} [customizer] The function to customize assigned values.
|
|
41585
42037
|
* @returns {Object} Returns `object`.
|
|
41586
|
-
* @see _.
|
|
42038
|
+
* @see _.assignInWith
|
|
41587
42039
|
* @example
|
|
41588
42040
|
*
|
|
41589
42041
|
* function customizer(objValue, srcValue) {
|
|
41590
42042
|
* return _.isUndefined(objValue) ? srcValue : objValue;
|
|
41591
42043
|
* }
|
|
41592
42044
|
*
|
|
41593
|
-
* var defaults = _.partialRight(_.
|
|
42045
|
+
* var defaults = _.partialRight(_.assignWith, customizer);
|
|
41594
42046
|
*
|
|
41595
42047
|
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
41596
42048
|
* // => { 'a': 1, 'b': 2 }
|
|
41597
42049
|
*/
|
|
41598
|
-
var
|
|
41599
|
-
copyObject(source,
|
|
42050
|
+
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
42051
|
+
copyObject(source, keys(source), object, customizer);
|
|
41600
42052
|
});
|
|
41601
42053
|
|
|
41602
42054
|
/**
|
|
@@ -41631,33 +42083,6 @@ lodash_template.exports;
|
|
|
41631
42083
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
41632
42084
|
}
|
|
41633
42085
|
|
|
41634
|
-
/**
|
|
41635
|
-
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
41636
|
-
*
|
|
41637
|
-
* **Note:** Non-object values are coerced to objects.
|
|
41638
|
-
*
|
|
41639
|
-
* @static
|
|
41640
|
-
* @memberOf _
|
|
41641
|
-
* @since 3.0.0
|
|
41642
|
-
* @category Object
|
|
41643
|
-
* @param {Object} object The object to query.
|
|
41644
|
-
* @returns {Array} Returns the array of property names.
|
|
41645
|
-
* @example
|
|
41646
|
-
*
|
|
41647
|
-
* function Foo() {
|
|
41648
|
-
* this.a = 1;
|
|
41649
|
-
* this.b = 2;
|
|
41650
|
-
* }
|
|
41651
|
-
*
|
|
41652
|
-
* Foo.prototype.c = 3;
|
|
41653
|
-
*
|
|
41654
|
-
* _.keysIn(new Foo);
|
|
41655
|
-
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
41656
|
-
*/
|
|
41657
|
-
function keysIn(object) {
|
|
41658
|
-
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
41659
|
-
}
|
|
41660
|
-
|
|
41661
42086
|
/**
|
|
41662
42087
|
* Creates a compiled template function that can interpolate data properties
|
|
41663
42088
|
* in "interpolate" delimiters, HTML-escape interpolated data properties in
|
|
@@ -41665,6 +42090,10 @@ lodash_template.exports;
|
|
|
41665
42090
|
* properties may be accessed as free variables in the template. If a setting
|
|
41666
42091
|
* object is given, it takes precedence over `_.templateSettings` values.
|
|
41667
42092
|
*
|
|
42093
|
+
* **Security:** `_.template` is insecure and should not be used. It will be
|
|
42094
|
+
* removed in Lodash v5. Avoid untrusted input. See
|
|
42095
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).
|
|
42096
|
+
*
|
|
41668
42097
|
* **Note:** In the development build `_.template` utilizes
|
|
41669
42098
|
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
|
41670
42099
|
* for easier debugging.
|
|
@@ -41772,12 +42201,18 @@ lodash_template.exports;
|
|
|
41772
42201
|
options = undefined;
|
|
41773
42202
|
}
|
|
41774
42203
|
string = toString(string);
|
|
41775
|
-
options =
|
|
42204
|
+
options = assignWith({}, options, settings, customDefaultsAssignIn);
|
|
41776
42205
|
|
|
41777
|
-
var imports =
|
|
42206
|
+
var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),
|
|
41778
42207
|
importsKeys = keys(imports),
|
|
41779
42208
|
importsValues = baseValues(imports, importsKeys);
|
|
41780
42209
|
|
|
42210
|
+
arrayEach(importsKeys, function(key) {
|
|
42211
|
+
if (reForbiddenIdentifierChars.test(key)) {
|
|
42212
|
+
throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);
|
|
42213
|
+
}
|
|
42214
|
+
});
|
|
42215
|
+
|
|
41781
42216
|
var isEscaping,
|
|
41782
42217
|
isEvaluating,
|
|
41783
42218
|
index = 0,
|
|
@@ -41794,11 +42229,11 @@ lodash_template.exports;
|
|
|
41794
42229
|
|
|
41795
42230
|
// Use a sourceURL for easier debugging.
|
|
41796
42231
|
// The sourceURL gets injected into the source that's eval-ed, so be careful
|
|
41797
|
-
//
|
|
41798
|
-
//
|
|
42232
|
+
// to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
|
|
42233
|
+
// and escape the comment, thus injecting code that gets evaled.
|
|
41799
42234
|
var sourceURL = hasOwnProperty.call(options, 'sourceURL')
|
|
41800
42235
|
? ('//# sourceURL=' +
|
|
41801
|
-
(options.sourceURL + '').replace(/
|
|
42236
|
+
(options.sourceURL + '').replace(/\s/g, ' ') +
|
|
41802
42237
|
'\n')
|
|
41803
42238
|
: '';
|
|
41804
42239
|
|
|
@@ -41831,12 +42266,16 @@ lodash_template.exports;
|
|
|
41831
42266
|
|
|
41832
42267
|
// If `variable` is not specified wrap a with-statement around the generated
|
|
41833
42268
|
// code to add the data object to the top of the scope chain.
|
|
41834
|
-
// Like with sourceURL, we take care to not check the option's prototype,
|
|
41835
|
-
// as this configuration is a code injection vector.
|
|
41836
42269
|
var variable = hasOwnProperty.call(options, 'variable') && options.variable;
|
|
41837
42270
|
if (!variable) {
|
|
41838
42271
|
source = 'with (obj) {\n' + source + '\n}\n';
|
|
41839
42272
|
}
|
|
42273
|
+
// Throw an error if a forbidden character was found in `variable`, to prevent
|
|
42274
|
+
// potential command injection attacks.
|
|
42275
|
+
else if (reForbiddenIdentifierChars.test(variable)) {
|
|
42276
|
+
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
|
|
42277
|
+
}
|
|
42278
|
+
|
|
41840
42279
|
// Cleanup code by stripping empty strings.
|
|
41841
42280
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
|
41842
42281
|
.replace(reEmptyStringMiddle, '$1')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "themekit-js",
|
|
3
|
-
"version": "1.2604.
|
|
3
|
+
"version": "1.2604.0419",
|
|
4
4
|
"description": "基于VitePress开发的Markdown静态网站生成器",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@8.15.6",
|
|
@@ -110,9 +110,9 @@
|
|
|
110
110
|
"js-base64": "^3.7.7",
|
|
111
111
|
"mark.js": "8.11.1",
|
|
112
112
|
"minisearch": "^6.3.0",
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
|
|
113
|
+
"vite": "^6.2.5",
|
|
114
|
+
"shiki": "^1.2.4",
|
|
115
|
+
"vue": "^3.4.21",
|
|
116
116
|
"markdown-it": "^14.1.0"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|