@vue/compiler-sfc 3.6.0-rc.7 → 3.6.0-rc.9
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/compiler-sfc.cjs.js +144 -68
- package/dist/compiler-sfc.esm-browser.js +599 -319
- package/package.json +10 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.6.0-rc.
|
|
2
|
+
* @vue/compiler-sfc v3.6.0-rc.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -306,10 +306,10 @@ function normalizeStyle(value) {
|
|
|
306
306
|
}
|
|
307
307
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
308
308
|
const propertyDelimiterRE = /:([^]+)/;
|
|
309
|
-
const styleCommentRE =
|
|
309
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
310
310
|
function parseStringStyle(cssText) {
|
|
311
311
|
const ret = {};
|
|
312
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
312
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
313
313
|
if (item) {
|
|
314
314
|
const tmp = item.split(propertyDelimiterRE);
|
|
315
315
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -392,10 +392,25 @@ const isInlineTag = /*@__PURE__*/ makeMap(INLINE_TAGS);
|
|
|
392
392
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
393
393
|
*/
|
|
394
394
|
const isBlockTag = /*@__PURE__*/ makeMap(BLOCK_TAGS);
|
|
395
|
+
//#endregion
|
|
396
|
+
//#region packages/shared/src/domAttrConfig.ts
|
|
397
|
+
/**
|
|
398
|
+
* On the client we only need to offer special cases for boolean attributes that
|
|
399
|
+
* have different names from their corresponding dom properties:
|
|
400
|
+
* - itemscope -> N/A
|
|
401
|
+
* - allowfullscreen -> allowFullscreen
|
|
402
|
+
* - formnovalidate -> formNoValidate
|
|
403
|
+
* - ismap -> isMap
|
|
404
|
+
* - nomodule -> noModule
|
|
405
|
+
* - novalidate -> noValidate
|
|
406
|
+
* - readonly -> readOnly
|
|
407
|
+
*/
|
|
408
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
409
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
395
410
|
/**
|
|
396
411
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
397
412
|
*/
|
|
398
|
-
const isBooleanAttr = /*@__PURE__*/ makeMap("
|
|
413
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
399
414
|
/**
|
|
400
415
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
401
416
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -2637,11 +2652,11 @@ const defaultDelimitersClose = new Uint8Array([125, 125]);
|
|
|
2637
2652
|
function isTagStartChar(c) {
|
|
2638
2653
|
return c >= 97 && c <= 122 || c >= 65 && c <= 90;
|
|
2639
2654
|
}
|
|
2640
|
-
function isWhitespace(c) {
|
|
2655
|
+
function isWhitespace$1(c) {
|
|
2641
2656
|
return c === 32 || c === 10 || c === 9 || c === 12 || c === 13;
|
|
2642
2657
|
}
|
|
2643
2658
|
function isEndOfTagSection(c) {
|
|
2644
|
-
return c === 47 || c === 62 || isWhitespace(c);
|
|
2659
|
+
return c === 47 || c === 62 || isWhitespace$1(c);
|
|
2645
2660
|
}
|
|
2646
2661
|
function toCharCodes(str) {
|
|
2647
2662
|
const ret = new Uint8Array(str.length);
|
|
@@ -2850,7 +2865,7 @@ var Tokenizer = class {
|
|
|
2850
2865
|
/** Look for an end tag. For <title> and <textarea>, also decode entities. */
|
|
2851
2866
|
stateInRCDATA(c) {
|
|
2852
2867
|
if (this.sequenceIndex === this.currentSequence.length) {
|
|
2853
|
-
if (c === 62 || isWhitespace(c)) {
|
|
2868
|
+
if (c === 62 || isWhitespace$1(c)) {
|
|
2854
2869
|
const endOfText = this.index - this.currentSequence.length;
|
|
2855
2870
|
if (this.sectionStart < endOfText) {
|
|
2856
2871
|
const actualIndex = this.index;
|
|
@@ -2974,7 +2989,7 @@ var Tokenizer = class {
|
|
|
2974
2989
|
this.stateBeforeAttrName(c);
|
|
2975
2990
|
}
|
|
2976
2991
|
stateBeforeClosingTagName(c) {
|
|
2977
|
-
if (isWhitespace(c)) {} else if (c === 62) {
|
|
2992
|
+
if (isWhitespace$1(c)) {} else if (c === 62) {
|
|
2978
2993
|
this.cbs.onerr(14, this.index);
|
|
2979
2994
|
this.state = 1;
|
|
2980
2995
|
this.sectionStart = this.index + 1;
|
|
@@ -2984,7 +2999,7 @@ var Tokenizer = class {
|
|
|
2984
2999
|
}
|
|
2985
3000
|
}
|
|
2986
3001
|
stateInClosingTagName(c) {
|
|
2987
|
-
if (c === 62 || isWhitespace(c)) {
|
|
3002
|
+
if (c === 62 || isWhitespace$1(c)) {
|
|
2988
3003
|
this.cbs.onclosetag(this.sectionStart, this.index);
|
|
2989
3004
|
this.sectionStart = -1;
|
|
2990
3005
|
this.state = 10;
|
|
@@ -3010,7 +3025,7 @@ var Tokenizer = class {
|
|
|
3010
3025
|
this.cbs.onopentagend(this.index);
|
|
3011
3026
|
this.state = 5;
|
|
3012
3027
|
this.sectionStart = this.index;
|
|
3013
|
-
} else if (!isWhitespace(c)) {
|
|
3028
|
+
} else if (!isWhitespace$1(c)) {
|
|
3014
3029
|
if (c === 61) this.cbs.onerr(19, this.index);
|
|
3015
3030
|
this.handleAttrStart(c);
|
|
3016
3031
|
}
|
|
@@ -3034,7 +3049,7 @@ var Tokenizer = class {
|
|
|
3034
3049
|
this.state = 1;
|
|
3035
3050
|
this.sectionStart = this.index + 1;
|
|
3036
3051
|
this.inRCDATA = false;
|
|
3037
|
-
} else if (!isWhitespace(c)) {
|
|
3052
|
+
} else if (!isWhitespace$1(c)) {
|
|
3038
3053
|
this.state = 11;
|
|
3039
3054
|
this.stateBeforeAttrName(c);
|
|
3040
3055
|
}
|
|
@@ -3100,7 +3115,7 @@ var Tokenizer = class {
|
|
|
3100
3115
|
this.sectionStart = -1;
|
|
3101
3116
|
this.state = 11;
|
|
3102
3117
|
this.stateBeforeAttrName(c);
|
|
3103
|
-
} else if (!isWhitespace(c)) {
|
|
3118
|
+
} else if (!isWhitespace$1(c)) {
|
|
3104
3119
|
this.cbs.onattribend(0, this.sectionStart);
|
|
3105
3120
|
this.handleAttrStart(c);
|
|
3106
3121
|
}
|
|
@@ -3112,7 +3127,7 @@ var Tokenizer = class {
|
|
|
3112
3127
|
} else if (c === 39) {
|
|
3113
3128
|
this.state = 20;
|
|
3114
3129
|
this.sectionStart = this.index + 1;
|
|
3115
|
-
} else if (!isWhitespace(c)) {
|
|
3130
|
+
} else if (!isWhitespace$1(c)) {
|
|
3116
3131
|
this.sectionStart = this.index;
|
|
3117
3132
|
this.state = 21;
|
|
3118
3133
|
this.stateInAttrValueNoQuotes(c);
|
|
@@ -3133,7 +3148,7 @@ var Tokenizer = class {
|
|
|
3133
3148
|
this.handleInAttrValue(c, 39);
|
|
3134
3149
|
}
|
|
3135
3150
|
stateInAttrValueNoQuotes(c) {
|
|
3136
|
-
if (isWhitespace(c) || c === 62) {
|
|
3151
|
+
if (isWhitespace$1(c) || c === 62) {
|
|
3137
3152
|
this.cbs.onattribdata(this.sectionStart, this.index);
|
|
3138
3153
|
this.sectionStart = -1;
|
|
3139
3154
|
this.cbs.onattribend(1, this.index);
|
|
@@ -16973,7 +16988,7 @@ function isSingleIfBlock(parent) {
|
|
|
16973
16988
|
}
|
|
16974
16989
|
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;
|
|
16975
16990
|
function isAllWhitespace(str) {
|
|
16976
|
-
for (let i = 0; i < str.length; i++) if (!isWhitespace(str.charCodeAt(i))) return false;
|
|
16991
|
+
for (let i = 0; i < str.length; i++) if (!isWhitespace$1(str.charCodeAt(i))) return false;
|
|
16977
16992
|
return true;
|
|
16978
16993
|
}
|
|
16979
16994
|
function isWhitespaceText(node) {
|
|
@@ -17022,8 +17037,8 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
17022
17037
|
if (inVPre) return onText(getSlice(start, end), start, end);
|
|
17023
17038
|
let innerStart = start + tokenizer.delimiterOpen.length;
|
|
17024
17039
|
let innerEnd = end - tokenizer.delimiterClose.length;
|
|
17025
|
-
while (isWhitespace(currentInput.charCodeAt(innerStart))) innerStart++;
|
|
17026
|
-
while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) innerEnd--;
|
|
17040
|
+
while (isWhitespace$1(currentInput.charCodeAt(innerStart))) innerStart++;
|
|
17041
|
+
while (isWhitespace$1(currentInput.charCodeAt(innerEnd - 1))) innerEnd--;
|
|
17027
17042
|
let exp = getSlice(innerStart, innerEnd);
|
|
17028
17043
|
if (exp.includes("&")) exp = decodeHTML(exp);
|
|
17029
17044
|
addNode({
|
|
@@ -17386,7 +17401,7 @@ function hasNewlineChar(str) {
|
|
|
17386
17401
|
function condense(str) {
|
|
17387
17402
|
let ret = "";
|
|
17388
17403
|
let prevCharIsWhitespace = false;
|
|
17389
|
-
for (let i = 0; i < str.length; i++) if (isWhitespace(str.charCodeAt(i))) {
|
|
17404
|
+
for (let i = 0; i < str.length; i++) if (isWhitespace$1(str.charCodeAt(i))) {
|
|
17390
17405
|
if (!prevCharIsWhitespace) {
|
|
17391
17406
|
ret += " ";
|
|
17392
17407
|
prevCharIsWhitespace = true;
|
|
@@ -22855,7 +22870,7 @@ function parseCssVars(sfc) {
|
|
|
22855
22870
|
const vars = [];
|
|
22856
22871
|
sfc.styles.forEach((style) => {
|
|
22857
22872
|
let match;
|
|
22858
|
-
const content = style.content
|
|
22873
|
+
const content = stripComments(style.content);
|
|
22859
22874
|
while (match = vBindRE.exec(content)) {
|
|
22860
22875
|
const start = match.index + match[0].length;
|
|
22861
22876
|
const end = lexBinding(content, start);
|
|
@@ -22867,6 +22882,70 @@ function parseCssVars(sfc) {
|
|
|
22867
22882
|
});
|
|
22868
22883
|
return vars;
|
|
22869
22884
|
}
|
|
22885
|
+
const cssSpecialRE = /[/"'\\(]/g;
|
|
22886
|
+
function stripComments(content) {
|
|
22887
|
+
const len = content.length;
|
|
22888
|
+
let out = "";
|
|
22889
|
+
let last = 0;
|
|
22890
|
+
let i = 0;
|
|
22891
|
+
cssSpecialRE.lastIndex = 0;
|
|
22892
|
+
while (cssSpecialRE.test(content)) {
|
|
22893
|
+
i = cssSpecialRE.lastIndex - 1;
|
|
22894
|
+
const c = content.charCodeAt(i);
|
|
22895
|
+
if (c === 47) {
|
|
22896
|
+
const next = content.charCodeAt(i + 1);
|
|
22897
|
+
if (next === 42) {
|
|
22898
|
+
out += content.slice(last, i);
|
|
22899
|
+
const end = content.indexOf("*/", i + 2);
|
|
22900
|
+
i = last = end === -1 ? len : end + 2;
|
|
22901
|
+
} else if (next === 47) {
|
|
22902
|
+
out += content.slice(last, i);
|
|
22903
|
+
i += 2;
|
|
22904
|
+
while (i < len && !isNewline(content.charCodeAt(i))) i++;
|
|
22905
|
+
last = i;
|
|
22906
|
+
} else i++;
|
|
22907
|
+
} else if (c === 34 || c === 39) i = skipString(content, i + 1, c);
|
|
22908
|
+
else if (c === 92) i += 2;
|
|
22909
|
+
else if (isUrlFunction(content, i)) i = skipUrl(content, i + 1);
|
|
22910
|
+
else i++;
|
|
22911
|
+
cssSpecialRE.lastIndex = i;
|
|
22912
|
+
}
|
|
22913
|
+
return last === 0 ? content : out + content.slice(last);
|
|
22914
|
+
}
|
|
22915
|
+
function skipString(s, i, quote) {
|
|
22916
|
+
while (i < s.length) {
|
|
22917
|
+
const c = s.charCodeAt(i);
|
|
22918
|
+
if (c === quote) return i + 1;
|
|
22919
|
+
if (isNewline(c)) return i;
|
|
22920
|
+
if (c === 92) i += s.charCodeAt(i + 1) === 13 && s.charCodeAt(i + 2) === 10 ? 3 : 2;
|
|
22921
|
+
else i++;
|
|
22922
|
+
}
|
|
22923
|
+
return i;
|
|
22924
|
+
}
|
|
22925
|
+
function isUrlFunction(s, i) {
|
|
22926
|
+
const prev = s.charCodeAt(i - 4);
|
|
22927
|
+
return (s.charCodeAt(i - 3) | 32) === 117 && (s.charCodeAt(i - 2) | 32) === 114 && (s.charCodeAt(i - 1) | 32) === 108 && prev !== 92 && !isIdentChar(prev);
|
|
22928
|
+
}
|
|
22929
|
+
function skipUrl(s, i) {
|
|
22930
|
+
while (isWhitespace(s.charCodeAt(i))) i++;
|
|
22931
|
+
const c = s.charCodeAt(i);
|
|
22932
|
+
if (c === 34 || c === 39) return i;
|
|
22933
|
+
while (i < s.length) {
|
|
22934
|
+
const c = s.charCodeAt(i);
|
|
22935
|
+
if (c === 41) return i + 1;
|
|
22936
|
+
i += c === 92 ? 2 : 1;
|
|
22937
|
+
}
|
|
22938
|
+
return i;
|
|
22939
|
+
}
|
|
22940
|
+
function isIdentChar(c) {
|
|
22941
|
+
return c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c === 45 || c === 95 || c >= 128;
|
|
22942
|
+
}
|
|
22943
|
+
function isNewline(c) {
|
|
22944
|
+
return c === 10 || c === 13;
|
|
22945
|
+
}
|
|
22946
|
+
function isWhitespace(c) {
|
|
22947
|
+
return c === 32 || c === 9 || c === 12 || isNewline(c);
|
|
22948
|
+
}
|
|
22870
22949
|
function lexBinding(content, start) {
|
|
22871
22950
|
let state = 0;
|
|
22872
22951
|
let parenDepth = 0;
|
|
@@ -25070,6 +25149,9 @@ function isTeleportTag(tag) {
|
|
|
25070
25149
|
tag = tag.toLowerCase();
|
|
25071
25150
|
return tag === "teleport" || tag === "vaporteleport";
|
|
25072
25151
|
}
|
|
25152
|
+
function isComponentTag(tag) {
|
|
25153
|
+
return tag === "component" || tag === "Component";
|
|
25154
|
+
}
|
|
25073
25155
|
function isBuiltInComponent(tag) {
|
|
25074
25156
|
if (isTeleportTag(tag)) return "VaporTeleport";
|
|
25075
25157
|
else if (tag === "Suspense" || tag === "suspense") return "Suspense";
|
|
@@ -25079,7 +25161,8 @@ function isBuiltInComponent(tag) {
|
|
|
25079
25161
|
}
|
|
25080
25162
|
function getBlockShape(block) {
|
|
25081
25163
|
if (block.returns.length === 0) return 0;
|
|
25082
|
-
|
|
25164
|
+
if (block.returns.length > 1) return 2;
|
|
25165
|
+
return block.node.type === 1 && block.node.children.every((child) => child.type === 2 || child.type === 5) ? 2 : 1;
|
|
25083
25166
|
}
|
|
25084
25167
|
//#endregion
|
|
25085
25168
|
//#region packages/compiler-vapor/src/transform.ts
|
|
@@ -25244,6 +25327,7 @@ var TransformContext = class TransformContext {
|
|
|
25244
25327
|
node,
|
|
25245
25328
|
parent: this,
|
|
25246
25329
|
index,
|
|
25330
|
+
inVOnce: this.inVOnce && !isComponentNode(this.node),
|
|
25247
25331
|
template: "",
|
|
25248
25332
|
templateRoot: false,
|
|
25249
25333
|
childrenTemplate: [],
|
|
@@ -25418,8 +25502,18 @@ function getNextId(map, n) {
|
|
|
25418
25502
|
if (map && map.has(n)) return map.get(n);
|
|
25419
25503
|
return n;
|
|
25420
25504
|
}
|
|
25505
|
+
function isComponentNode(node) {
|
|
25506
|
+
return node.type === 1 && node.tagType === 1;
|
|
25507
|
+
}
|
|
25421
25508
|
//#endregion
|
|
25422
25509
|
//#region packages/compiler-vapor/src/generators/utils.ts
|
|
25510
|
+
/**
|
|
25511
|
+
* Run a helper call inside the once ambient: a helper that creates its own
|
|
25512
|
+
* effects at a v-once site has them run once like compiled ones do.
|
|
25513
|
+
*/
|
|
25514
|
+
function genOnce(call, context) {
|
|
25515
|
+
return genCall(context.helper("withOnce"), ["() => ", ...call]);
|
|
25516
|
+
}
|
|
25423
25517
|
const IMPORT_EXP_START = "__IMPORT_EXP_START__";
|
|
25424
25518
|
const IMPORT_EXP_END = "__IMPORT_EXP_END__";
|
|
25425
25519
|
const IMPORT_EXPR_RE = new RegExp(`${IMPORT_EXP_START}(.*?)${IMPORT_EXP_END}`, "g");
|
|
@@ -25577,7 +25671,7 @@ function genInsertNode({ parent, elements, anchor }, { helper }) {
|
|
|
25577
25671
|
//#endregion
|
|
25578
25672
|
//#region packages/compiler-vapor/src/generators/expression.ts
|
|
25579
25673
|
init_objectSpread2();
|
|
25580
|
-
function genExpression(node, context, assignment) {
|
|
25674
|
+
function genExpression(node, context, assignment, asParams = false) {
|
|
25581
25675
|
node = context.getExpressionReplacement(node);
|
|
25582
25676
|
const { content, ast, isStatic, loc } = node;
|
|
25583
25677
|
const { options } = context;
|
|
@@ -25596,10 +25690,13 @@ function genExpression(node, context, assignment) {
|
|
|
25596
25690
|
const ids = [];
|
|
25597
25691
|
const parentStackMap = /* @__PURE__ */ new Map();
|
|
25598
25692
|
const parentStack = [];
|
|
25599
|
-
walkIdentifiers(ast, (id) => {
|
|
25693
|
+
walkIdentifiers(ast, (id, _, __, isReference, isLocal) => {
|
|
25694
|
+
if (isLocal) {
|
|
25695
|
+
if (!id.typeAnnotation && !id.optional) return;
|
|
25696
|
+
} else if (!isReference) return;
|
|
25600
25697
|
ids.push(id);
|
|
25601
25698
|
parentStackMap.set(id, parentStack.slice());
|
|
25602
|
-
},
|
|
25699
|
+
}, asParams, parentStack);
|
|
25603
25700
|
let hasMemberExpression = false;
|
|
25604
25701
|
if (ids.length) {
|
|
25605
25702
|
const [frag, push] = buildCodeFragment();
|
|
@@ -25620,7 +25717,7 @@ function genExpression(node, context, assignment) {
|
|
|
25620
25717
|
const leadingText = content.slice(lastEnd, start);
|
|
25621
25718
|
if (leadingText.length) push([leadingText, -3]);
|
|
25622
25719
|
hasMemberExpression || (hasMemberExpression = parent && (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression"));
|
|
25623
|
-
push(...genIdentifier(source, context, {
|
|
25720
|
+
push(...genIdentifier(asParams ? id.name : source, context, {
|
|
25624
25721
|
start: advancePositionWithClone(node.loc.start, source, start),
|
|
25625
25722
|
end: advancePositionWithClone(node.loc.start, source, end),
|
|
25626
25723
|
source
|
|
@@ -25772,6 +25869,7 @@ function analyzeExpressions(expressions) {
|
|
|
25772
25869
|
const seenParents = /* @__PURE__ */ new Set();
|
|
25773
25870
|
walkIdentifiers(exp.ast, (currentNode, parent, parentStack) => {
|
|
25774
25871
|
if (parent && isMemberExpression(parent) && !seenParents.has(parent)) {
|
|
25872
|
+
var _parentStack$index;
|
|
25775
25873
|
seenParents.add(parent);
|
|
25776
25874
|
let hasGlobalIdentifier = false;
|
|
25777
25875
|
const memberExp = extractMemberExpression(parent, (id) => {
|
|
@@ -25781,8 +25879,14 @@ function analyzeExpressions(expressions) {
|
|
|
25781
25879
|
});
|
|
25782
25880
|
if (isGloballyAllowed(id.name)) hasGlobalIdentifier = true;
|
|
25783
25881
|
});
|
|
25882
|
+
if (memberExp === void 0) return;
|
|
25784
25883
|
const parentOfMemberExp = parentStack[parentStack.length - 2];
|
|
25785
25884
|
if (parentOfMemberExp && isCallExpression(parentOfMemberExp)) return;
|
|
25885
|
+
let chainChild = parent;
|
|
25886
|
+
let index = parentStack.length - 2;
|
|
25887
|
+
while (((_parentStack$index = parentStack[index]) === null || _parentStack$index === void 0 ? void 0 : _parentStack$index.type) === "TSNonNullExpression") chainChild = parentStack[index--];
|
|
25888
|
+
const chainParent = parentStack[index];
|
|
25889
|
+
if (chainParent && chainParent.type === "OptionalMemberExpression" && !chainParent.optional && chainParent.object === chainChild) return;
|
|
25786
25890
|
if (hasGlobalIdentifier) return;
|
|
25787
25891
|
registerVariable(memberExp, exp, false, {
|
|
25788
25892
|
start: parent.start,
|
|
@@ -25928,7 +26032,7 @@ function processRepeatedExpressions(context, expressions, varDeclarations, updat
|
|
|
25928
26032
|
for (const exp of expressions) {
|
|
25929
26033
|
const processed = getProcessedExpression(exp, expressionReplacements);
|
|
25930
26034
|
if (processed.content === content) setExpressionReplacement(expressionReplacements, exp, varName, null);
|
|
25931
|
-
else if (processed.content.includes(content)) {
|
|
26035
|
+
else if (!content.includes("?.") && processed.content.includes(content)) {
|
|
25932
26036
|
const replacements = findContentReplacements(processed, content, varName);
|
|
25933
26037
|
if (replacements.length) {
|
|
25934
26038
|
const replacedContent = applyContentReplacements(processed.content, replacements);
|
|
@@ -25961,23 +26065,14 @@ function applyReplacementPlan(context, expressionReplacements, replacementPlan)
|
|
|
25961
26065
|
}
|
|
25962
26066
|
}
|
|
25963
26067
|
function findContentReplacements(exp, content, replacement) {
|
|
25964
|
-
const
|
|
25965
|
-
if (!
|
|
26068
|
+
const nodeRanges = getNodeRanges(exp);
|
|
26069
|
+
if (!nodeRanges.size) return [];
|
|
25966
26070
|
const replacements = [];
|
|
25967
26071
|
let searchStart = 0;
|
|
25968
26072
|
let start = exp.content.indexOf(content, searchStart);
|
|
25969
26073
|
while (start !== -1) {
|
|
25970
26074
|
const end = start + content.length;
|
|
25971
|
-
|
|
25972
|
-
for (const identifier of identifiers) {
|
|
25973
|
-
if (start >= identifier.end || end <= identifier.start) continue;
|
|
25974
|
-
if (start > identifier.start || end < identifier.end) {
|
|
25975
|
-
canReplace = false;
|
|
25976
|
-
break;
|
|
25977
|
-
}
|
|
25978
|
-
canReplace = true;
|
|
25979
|
-
}
|
|
25980
|
-
if (canReplace) {
|
|
26075
|
+
if (nodeRanges.has(`${start}:${end}`)) {
|
|
25981
26076
|
replacements.push({
|
|
25982
26077
|
start,
|
|
25983
26078
|
end,
|
|
@@ -25998,6 +26093,15 @@ function findIdentifierReplacements(exp, name, replacement) {
|
|
|
25998
26093
|
});
|
|
25999
26094
|
return replacements;
|
|
26000
26095
|
}
|
|
26096
|
+
function getNodeRanges(exp) {
|
|
26097
|
+
const ranges = /* @__PURE__ */ new Set();
|
|
26098
|
+
if (!exp.ast || typeof exp.ast !== "object") return ranges;
|
|
26099
|
+
walk$2(exp.ast, { enter(node) {
|
|
26100
|
+
if (isFunctionType(node) || node.type === "TemplateElement" || node.type.startsWith("TS") && !TS_NODE_TYPES.includes(node.type)) return this.skip();
|
|
26101
|
+
if (node.start != null && node.end != null) ranges.add(`${node.start - 1}:${node.end - 1}`);
|
|
26102
|
+
} });
|
|
26103
|
+
return ranges;
|
|
26104
|
+
}
|
|
26001
26105
|
function getIdentifierRanges(exp) {
|
|
26002
26106
|
if (!exp.ast || typeof exp.ast !== "object") return [];
|
|
26003
26107
|
const identifiers = [];
|
|
@@ -26054,24 +26158,44 @@ function getUniqueDeclarationName(baseName, reservedNames) {
|
|
|
26054
26158
|
reservedNames.add(name);
|
|
26055
26159
|
return name;
|
|
26056
26160
|
}
|
|
26161
|
+
/**
|
|
26162
|
+
* Returns the source of a member expression, or `undefined` if it contains a
|
|
26163
|
+
* node that cannot be extracted, e.g. `foo[bar ? 'a' : 'b']`. Such expressions
|
|
26164
|
+
* must not be cached - the extracted source would be incomplete.
|
|
26165
|
+
*/
|
|
26057
26166
|
function extractMemberExpression(exp, onIdentifier) {
|
|
26058
|
-
if (!exp) return
|
|
26167
|
+
if (!exp) return;
|
|
26059
26168
|
switch (exp.type) {
|
|
26060
26169
|
case "Identifier":
|
|
26061
26170
|
onIdentifier(exp);
|
|
26062
26171
|
return exp.name;
|
|
26063
26172
|
case "StringLiteral": return exp.extra ? exp.extra.raw : exp.value;
|
|
26064
26173
|
case "NumericLiteral": return exp.value.toString();
|
|
26065
|
-
case "BinaryExpression":
|
|
26066
|
-
|
|
26067
|
-
|
|
26174
|
+
case "BinaryExpression": {
|
|
26175
|
+
var _exp$extra;
|
|
26176
|
+
const left = extractMemberExpression(exp.left, onIdentifier);
|
|
26177
|
+
const right = extractMemberExpression(exp.right, onIdentifier);
|
|
26178
|
+
if (left === void 0 || right === void 0) return;
|
|
26179
|
+
const expression = `${left} ${exp.operator} ${right}`;
|
|
26180
|
+
return ((_exp$extra = exp.extra) === null || _exp$extra === void 0 ? void 0 : _exp$extra.parenthesized) ? `(${expression})` : expression;
|
|
26181
|
+
}
|
|
26182
|
+
case "CallExpression":
|
|
26183
|
+
case "OptionalCallExpression": {
|
|
26184
|
+
const callee = extractMemberExpression(exp.callee, onIdentifier);
|
|
26185
|
+
const args = exp.arguments.map((arg) => extractMemberExpression(arg, onIdentifier));
|
|
26186
|
+
if (callee === void 0 || args.some((arg) => arg === void 0)) return;
|
|
26187
|
+
return `${callee}${exp.type === "OptionalCallExpression" ? "?." : ""}(${args.join(", ")})`;
|
|
26188
|
+
}
|
|
26068
26189
|
case "MemberExpression":
|
|
26069
|
-
case "OptionalMemberExpression":
|
|
26190
|
+
case "OptionalMemberExpression": {
|
|
26070
26191
|
const object = extractMemberExpression(exp.object, onIdentifier);
|
|
26192
|
+
const property = extractMemberExpression(exp.property, exp.computed ? onIdentifier : NOOP);
|
|
26193
|
+
if (object === void 0 || property === void 0) return;
|
|
26071
26194
|
const optional = exp.type === "OptionalMemberExpression" && exp.optional;
|
|
26072
|
-
return `${object}${exp.computed ? `${optional ? "?." : ""}[${
|
|
26073
|
-
|
|
26074
|
-
|
|
26195
|
+
return `${object}${exp.computed ? `${optional ? "?." : ""}[${property}]` : `${optional ? "?." : "."}${property}`}`;
|
|
26196
|
+
}
|
|
26197
|
+
case "TSNonNullExpression": return extractMemberExpression(exp.expression, onIdentifier);
|
|
26198
|
+
default: return;
|
|
26075
26199
|
}
|
|
26076
26200
|
}
|
|
26077
26201
|
const isCallExpression = (node) => {
|
|
@@ -26207,30 +26331,30 @@ function isConstantBinding(value, context) {
|
|
|
26207
26331
|
function genFor(oper, context) {
|
|
26208
26332
|
const { helper } = context;
|
|
26209
26333
|
const { source, value, key, index, render, keyProp, once, id, component, onlyChild, slotRoot, wrappedRows } = oper;
|
|
26210
|
-
const rawValue = value && value.content;
|
|
26211
|
-
const rawKey = key && key.content;
|
|
26212
|
-
const rawIndex = index && index.content;
|
|
26213
26334
|
const sourceExpr = [
|
|
26214
26335
|
"() => (",
|
|
26215
26336
|
...genExpression(source, context),
|
|
26216
26337
|
")"
|
|
26217
26338
|
];
|
|
26339
|
+
const plugins = context.options.expressionPlugins;
|
|
26218
26340
|
const idToPathMap = parseValueDestructure(value, context);
|
|
26341
|
+
const keyToPathMap = parseValueDestructure(key, context);
|
|
26342
|
+
const indexToPathMap = parseValueDestructure(index, context);
|
|
26219
26343
|
const [depth, exitScope] = context.enterScope();
|
|
26220
26344
|
const itemVar = `_for_item${depth}`;
|
|
26221
|
-
const idMap = buildDestructureIdMap(idToPathMap, `${itemVar}.value`,
|
|
26345
|
+
const idMap = buildDestructureIdMap(idToPathMap, `${itemVar}.value`, plugins);
|
|
26222
26346
|
idMap[itemVar] = null;
|
|
26223
26347
|
const args = [itemVar];
|
|
26224
|
-
if (
|
|
26348
|
+
if (key) {
|
|
26225
26349
|
const keyVar = `_for_key${depth}`;
|
|
26226
26350
|
args.push(`, ${keyVar}`);
|
|
26227
|
-
idMap
|
|
26351
|
+
Object.assign(idMap, buildDestructureIdMap(keyToPathMap, `${keyVar}.value`, plugins));
|
|
26228
26352
|
idMap[keyVar] = null;
|
|
26229
|
-
}
|
|
26230
|
-
if (
|
|
26353
|
+
} else if (index) args.push(", _");
|
|
26354
|
+
if (index) {
|
|
26231
26355
|
const indexVar = `_for_index${depth}`;
|
|
26232
26356
|
args.push(`, ${indexVar}`);
|
|
26233
|
-
idMap
|
|
26357
|
+
Object.assign(idMap, buildDestructureIdMap(indexToPathMap, `${indexVar}.value`, plugins));
|
|
26234
26358
|
idMap[indexVar] = null;
|
|
26235
26359
|
}
|
|
26236
26360
|
const { selectorPatterns, keyOnlyBindingPatterns, skippedEffectIndexes } = matchPatterns(render, keyProp, idMap, context);
|
|
@@ -26271,23 +26395,19 @@ function genFor(oper, context) {
|
|
|
26271
26395
|
];
|
|
26272
26396
|
function genCallback(expr) {
|
|
26273
26397
|
if (!expr) return false;
|
|
26274
|
-
|
|
26275
|
-
|
|
26276
|
-
...genMulti([
|
|
26277
|
-
"(",
|
|
26278
|
-
")",
|
|
26279
|
-
", "
|
|
26280
|
-
], rawValue ? rawValue : rawKey || rawIndex ? "_" : void 0, rawKey ? rawKey : rawIndex ? "__" : void 0, rawIndex),
|
|
26398
|
+
return context.withId(() => [
|
|
26399
|
+
...genAliasParams(value, key, index, context),
|
|
26281
26400
|
" => (",
|
|
26282
|
-
...
|
|
26401
|
+
...genExpression(expr, context),
|
|
26283
26402
|
")"
|
|
26284
|
-
];
|
|
26403
|
+
], genSimpleIdMap());
|
|
26285
26404
|
}
|
|
26286
26405
|
function genSimpleIdMap() {
|
|
26287
26406
|
const idMap = {};
|
|
26288
|
-
|
|
26289
|
-
|
|
26290
|
-
|
|
26407
|
+
const collect = (map) => map.forEach((_, id) => idMap[id] = null);
|
|
26408
|
+
collect(idToPathMap);
|
|
26409
|
+
collect(keyToPathMap);
|
|
26410
|
+
collect(indexToPathMap);
|
|
26291
26411
|
return idMap;
|
|
26292
26412
|
}
|
|
26293
26413
|
}
|
|
@@ -26340,6 +26460,13 @@ function getSingleReturnedChild(block) {
|
|
|
26340
26460
|
const id = block.returns[0];
|
|
26341
26461
|
for (const child of block.dynamic.children) if (child.id === id) return child;
|
|
26342
26462
|
}
|
|
26463
|
+
function genAliasParams(value, key, index, context) {
|
|
26464
|
+
return genMulti([
|
|
26465
|
+
"(",
|
|
26466
|
+
")",
|
|
26467
|
+
", "
|
|
26468
|
+
], value ? genExpression(value, context, void 0, true) : key || index ? "_" : void 0, key ? genExpression(key, context, void 0, true) : index ? "__" : void 0, index && genExpression(index, context, void 0, true));
|
|
26469
|
+
}
|
|
26343
26470
|
function parseValueDestructure(value, context) {
|
|
26344
26471
|
const map = /* @__PURE__ */ new Map();
|
|
26345
26472
|
if (value) {
|
|
@@ -26373,7 +26500,7 @@ function parseValueDestructure(value, context) {
|
|
|
26373
26500
|
} else return JSON.stringify(p.key.name);
|
|
26374
26501
|
}).join(", ") + "]";
|
|
26375
26502
|
}
|
|
26376
|
-
if (child.type === "AssignmentPattern" && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) {
|
|
26503
|
+
if (child.type === "AssignmentPattern" && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern" || parent.type === "ArrowFunctionExpression" && child.left === id)) {
|
|
26377
26504
|
isDynamic = true;
|
|
26378
26505
|
helper = context.helper("getDefaultValue");
|
|
26379
26506
|
helperArgs = `() => (${rawValue.slice(child.right.start - 1, child.right.end - 1)})`;
|
|
@@ -26459,7 +26586,7 @@ function matchSelectorPattern(effect, key, idMap, context) {
|
|
|
26459
26586
|
if (typeof node === "object" && node && node.type === "BinaryExpression" && node.operator === "===" && node.left.type !== "PrivateName") {
|
|
26460
26587
|
const { left, right } = node;
|
|
26461
26588
|
for (const [a, b] of [[left, right], [right, left]]) {
|
|
26462
|
-
const aIsKey =
|
|
26589
|
+
const aIsKey = content.slice(a.start - 1, a.end - 1) === key;
|
|
26463
26590
|
const bIsKey = isKeyOnlyBinding(b, key, content);
|
|
26464
26591
|
const bVars = analyzeVariableScopes(b, idMap);
|
|
26465
26592
|
if (aIsKey && !bIsKey && !bVars.length) matcheds.push([a, b]);
|
|
@@ -26569,7 +26696,7 @@ function genBlockShapeName(flags) {
|
|
|
26569
26696
|
//#endregion
|
|
26570
26697
|
//#region packages/compiler-vapor/src/generators/prop.ts
|
|
26571
26698
|
const helpers = {
|
|
26572
|
-
|
|
26699
|
+
setElementText: { name: "setElementText" },
|
|
26573
26700
|
setHtml: { name: "setHtml" },
|
|
26574
26701
|
setClass: { name: "setClass" },
|
|
26575
26702
|
setClassName: { name: "setClassName" },
|
|
@@ -26787,7 +26914,7 @@ function getSpecialHelper(keyName, tagName, isSVG) {
|
|
|
26787
26914
|
else if (keyName === "class") return extend({ isSVG }, helpers.setClass);
|
|
26788
26915
|
else if (keyName === "style") return helpers.setStyle;
|
|
26789
26916
|
else if (keyName === "innerHTML") return helpers.setHtml;
|
|
26790
|
-
else if (keyName === "textContent") return helpers.
|
|
26917
|
+
else if (keyName === "textContent") return helpers.setElementText;
|
|
26791
26918
|
}
|
|
26792
26919
|
//#endregion
|
|
26793
26920
|
//#region packages/compiler-vapor/src/generators/templateRef.ts
|
|
@@ -26832,16 +26959,6 @@ function genGetTextChild(oper, context) {
|
|
|
26832
26959
|
return [NEWLINE, `const x${oper.parent} = ${context.helper("txt")}(n${oper.parent})`];
|
|
26833
26960
|
}
|
|
26834
26961
|
//#endregion
|
|
26835
|
-
//#region packages/compiler-vapor/src/generators/vShow.ts
|
|
26836
|
-
function genVShow(oper, context) {
|
|
26837
|
-
const { element } = oper;
|
|
26838
|
-
return [NEWLINE, ...genCall(context.helper("applyVShow"), `n${element}`, [
|
|
26839
|
-
`() => (`,
|
|
26840
|
-
...genExpression(oper.dir.exp, context),
|
|
26841
|
-
`)`
|
|
26842
|
-
])];
|
|
26843
|
-
}
|
|
26844
|
-
//#endregion
|
|
26845
26962
|
//#region packages/compiler-vapor/src/generators/modifier.ts
|
|
26846
26963
|
function genDirectiveModifiers(modifiers) {
|
|
26847
26964
|
return modifiers.map((value) => `${isSimpleIdentifier(value) ? value : JSON.stringify(value)}: true`).join(", ");
|
|
@@ -26857,11 +26974,11 @@ const helperMap = {
|
|
|
26857
26974
|
};
|
|
26858
26975
|
function genVModel(oper, context) {
|
|
26859
26976
|
const { modelType, element, dir: { exp, modifiers } } = oper;
|
|
26860
|
-
return
|
|
26977
|
+
return genCall(context.helper(helperMap[modelType]), `n${element}`, [
|
|
26861
26978
|
`() => (`,
|
|
26862
26979
|
...genExpression(exp, context),
|
|
26863
26980
|
`)`
|
|
26864
|
-
], genModelHandler(exp, context), modifiers.length ? `{ ${genDirectiveModifiers(modifiers.map((e) => e.content))} }` : void 0)
|
|
26981
|
+
], genModelHandler(exp, context), modifiers.length ? `{ ${genDirectiveModifiers(modifiers.map((e) => e.content))} }` : void 0);
|
|
26865
26982
|
}
|
|
26866
26983
|
function genModelHandler(exp, context) {
|
|
26867
26984
|
return [
|
|
@@ -26871,47 +26988,6 @@ function genModelHandler(exp, context) {
|
|
|
26871
26988
|
];
|
|
26872
26989
|
}
|
|
26873
26990
|
//#endregion
|
|
26874
|
-
//#region packages/compiler-vapor/src/generators/directive.ts
|
|
26875
|
-
function genBuiltinDirective(oper, context) {
|
|
26876
|
-
switch (oper.name) {
|
|
26877
|
-
case "show": return genVShow(oper, context);
|
|
26878
|
-
case "model": return genVModel(oper, context);
|
|
26879
|
-
default: return [];
|
|
26880
|
-
}
|
|
26881
|
-
}
|
|
26882
|
-
/**
|
|
26883
|
-
* user directives via `withVaporDirectives`
|
|
26884
|
-
*/
|
|
26885
|
-
function genDirectivesForElement(id, context) {
|
|
26886
|
-
const dirs = filterCustomDirectives(id, context.block.operation);
|
|
26887
|
-
return dirs.length ? genCustomDirectives(dirs, context) : [];
|
|
26888
|
-
}
|
|
26889
|
-
function genCustomDirectives(opers, context) {
|
|
26890
|
-
const { helper } = context;
|
|
26891
|
-
const element = `n${opers[0].element}`;
|
|
26892
|
-
const directiveItems = opers.map(genDirectiveItem);
|
|
26893
|
-
const directives = genMulti(DELIMITERS_ARRAY, ...directiveItems);
|
|
26894
|
-
return [NEWLINE, ...genCall(helper("withVaporDirectives"), element, directives)];
|
|
26895
|
-
function genDirectiveItem({ dir, name, asset }) {
|
|
26896
|
-
const directiveVar = asset ? toValidAssetId(name, "directive") : genExpression(extend(createSimpleExpression(name, false), { ast: null }), context);
|
|
26897
|
-
const value = dir.exp && [
|
|
26898
|
-
"() => (",
|
|
26899
|
-
...genExpression(dir.exp, context),
|
|
26900
|
-
")"
|
|
26901
|
-
];
|
|
26902
|
-
const argument = dir.arg && genExpression(dir.arg, context);
|
|
26903
|
-
const modifiers = !!dir.modifiers.length && [
|
|
26904
|
-
"{ ",
|
|
26905
|
-
genDirectiveModifiers(dir.modifiers.map((m) => m.content)),
|
|
26906
|
-
" }"
|
|
26907
|
-
];
|
|
26908
|
-
return genMulti(DELIMITERS_ARRAY.concat("void 0"), directiveVar, value, argument, modifiers);
|
|
26909
|
-
}
|
|
26910
|
-
}
|
|
26911
|
-
function filterCustomDirectives(id, operations) {
|
|
26912
|
-
return operations.filter((oper) => oper.type === 13 && oper.element === id && !oper.builtin);
|
|
26913
|
-
}
|
|
26914
|
-
//#endregion
|
|
26915
26991
|
//#region packages/compiler-vapor/src/generators/component.ts
|
|
26916
26992
|
function genStaticModifierPropKey(name) {
|
|
26917
26993
|
const key = getModifierPropName(name);
|
|
@@ -26925,8 +27001,10 @@ function genCreateComponent(operation, context) {
|
|
|
26925
27001
|
const tag = genTag();
|
|
26926
27002
|
const { root, props, slots, once, slotRoot } = operation;
|
|
26927
27003
|
const isRuntimeDynamicComponent = !!(operation.dynamic && !operation.dynamic.isStatic);
|
|
26928
|
-
const dynamicComponentFlags = isRuntimeDynamicComponent ? genDynamicComponentFlags(root, once, slotRoot) : false;
|
|
26929
|
-
const
|
|
27004
|
+
const dynamicComponentFlags = isRuntimeDynamicComponent ? genDynamicComponentFlags(root, once, slotRoot, operation.ns) : false;
|
|
27005
|
+
const nsArg = !isRuntimeDynamicComponent && (operation.useCreateElement || operation.asset || !!operation.dynamic) && operation.ns ? String(operation.ns) : false;
|
|
27006
|
+
const slotDeclarations = [];
|
|
27007
|
+
const rawSlots = genRawSlots(slots, context, slotDeclarations);
|
|
26930
27008
|
const [ids, handlers] = processInlineHandlers(props, context);
|
|
26931
27009
|
const rawProps = context.withId(() => genRawProps(props, context, true), ids);
|
|
26932
27010
|
const inlineHandlers = handlers.reduce((acc, { name, value }) => {
|
|
@@ -26941,9 +27019,17 @@ function genCreateComponent(operation, context) {
|
|
|
26941
27019
|
return [
|
|
26942
27020
|
NEWLINE,
|
|
26943
27021
|
...inlineHandlers,
|
|
27022
|
+
...slotDeclarations.length ? genMulti([
|
|
27023
|
+
"let ",
|
|
27024
|
+
NEWLINE,
|
|
27025
|
+
", "
|
|
27026
|
+
], ...slotDeclarations) : [],
|
|
26944
27027
|
`const n${operation.id} = `,
|
|
26945
|
-
...genCall(isRuntimeDynamicComponent ? helper("createDynamicComponent") : operation.useCreateElement ? helper("createPlainElement") : useAssetComponentHelper ? helper("createAssetComponent") : operation.asset ? helper("createComponentWithFallback") : helper("createComponent"), tag, rawProps, rawSlots, isRuntimeDynamicComponent ? dynamicComponentFlags : root ? "true" : false, isRuntimeDynamicComponent ?
|
|
26946
|
-
|
|
27028
|
+
...genCall(isRuntimeDynamicComponent ? helper("createDynamicComponent") : operation.useCreateElement ? helper("createPlainElement") : useAssetComponentHelper ? helper("createAssetComponent") : operation.asset ? helper("createComponentWithFallback") : helper("createComponent"), tag, rawProps, rawSlots, isRuntimeDynamicComponent ? dynamicComponentFlags : root ? "true" : false, isRuntimeDynamicComponent ? operation.key && [
|
|
27029
|
+
"() => (",
|
|
27030
|
+
...genExpression(operation.key, context),
|
|
27031
|
+
")"
|
|
27032
|
+
] : once && "true", useAssetComponentHelper ? maybeSelfReference && "true" : nsArg, useAssetComponentHelper && nsArg)
|
|
26947
27033
|
];
|
|
26948
27034
|
function genTag() {
|
|
26949
27035
|
if (operation.useCreateElement) return JSON.stringify(operation.tag);
|
|
@@ -26969,7 +27055,7 @@ function genCreateComponent(operation, context) {
|
|
|
26969
27055
|
}
|
|
26970
27056
|
}
|
|
26971
27057
|
}
|
|
26972
|
-
function genDynamicComponentFlags(root, once, slotRoot) {
|
|
27058
|
+
function genDynamicComponentFlags(root, once, slotRoot, ns) {
|
|
26973
27059
|
let flags = 0;
|
|
26974
27060
|
const names = [];
|
|
26975
27061
|
if (root) {
|
|
@@ -26984,6 +27070,13 @@ function genDynamicComponentFlags(root, once, slotRoot) {
|
|
|
26984
27070
|
flags |= 4;
|
|
26985
27071
|
names.push("SLOT_ROOT");
|
|
26986
27072
|
}
|
|
27073
|
+
if (ns === 1) {
|
|
27074
|
+
flags |= 8;
|
|
27075
|
+
names.push("NS_SVG");
|
|
27076
|
+
} else if (ns === 2) {
|
|
27077
|
+
flags |= 16;
|
|
27078
|
+
names.push("NS_MATHML");
|
|
27079
|
+
}
|
|
26987
27080
|
if (!flags) return false;
|
|
26988
27081
|
return genFlags(flags, names);
|
|
26989
27082
|
}
|
|
@@ -27202,40 +27295,40 @@ function isDirectTemplateConstantAst(node) {
|
|
|
27202
27295
|
}
|
|
27203
27296
|
return false;
|
|
27204
27297
|
}
|
|
27205
|
-
function genRawSlots(slots, context) {
|
|
27298
|
+
function genRawSlots(slots, context, slotDeclarations) {
|
|
27206
27299
|
if (!slots.length) return;
|
|
27207
27300
|
const staticSlots = slots[0];
|
|
27208
27301
|
if (staticSlots.slotType === 0) {
|
|
27209
27302
|
const defaultSlot = getSingleDefaultSlot(staticSlots);
|
|
27210
27303
|
if (defaultSlot && slots.length === 1) return genSlotBlockWithProps(defaultSlot, context);
|
|
27211
|
-
return genStaticSlots(staticSlots, context, slots.length > 1 ? slots.slice(1) : void 0);
|
|
27304
|
+
return genStaticSlots(staticSlots, context, slotDeclarations, slots.length > 1 ? slots.slice(1) : void 0);
|
|
27212
27305
|
} else return genStaticSlots({
|
|
27213
27306
|
slotType: 0,
|
|
27214
27307
|
slots: {}
|
|
27215
|
-
}, context, slots);
|
|
27308
|
+
}, context, slotDeclarations, slots);
|
|
27216
27309
|
}
|
|
27217
27310
|
function getSingleDefaultSlot({ slots }) {
|
|
27218
27311
|
const names = Object.keys(slots);
|
|
27219
27312
|
return names.length === 1 && names[0] === "default" ? slots.default : void 0;
|
|
27220
27313
|
}
|
|
27221
|
-
function genStaticSlots({ slots }, context, dynamicSlots) {
|
|
27314
|
+
function genStaticSlots({ slots }, context, slotDeclarations, dynamicSlots) {
|
|
27222
27315
|
const args = Object.keys(slots).map((name) => [`${JSON.stringify(name)}: `, ...genSlotBlockWithProps(slots[name], context)]);
|
|
27223
|
-
if (dynamicSlots) args.push([`$: `, ...genDynamicSlots(dynamicSlots, context)]);
|
|
27316
|
+
if (dynamicSlots) args.push([`$: `, ...genDynamicSlots(dynamicSlots, context, slotDeclarations)]);
|
|
27224
27317
|
return genMulti(DELIMITERS_OBJECT_NEWLINE, ...args);
|
|
27225
27318
|
}
|
|
27226
|
-
function genDynamicSlots(slots, context) {
|
|
27227
|
-
return genMulti(DELIMITERS_ARRAY_NEWLINE, ...slots.map((slot) => slot.slotType === 0 ? genStaticSlots(slot, context) : slot.slotType === 4 ? slot.slots.content : genDynamicSlot(slot, context, slot.slotType !== 2)));
|
|
27319
|
+
function genDynamicSlots(slots, context, slotDeclarations) {
|
|
27320
|
+
return genMulti(DELIMITERS_ARRAY_NEWLINE, ...slots.map((slot) => slot.slotType === 0 ? genStaticSlots(slot, context, slotDeclarations) : slot.slotType === 4 ? slot.slots.content : genDynamicSlot(slot, context, slotDeclarations, slot.slotType !== 2)));
|
|
27228
27321
|
}
|
|
27229
|
-
function genDynamicSlot(slot, context, withFunction = false) {
|
|
27322
|
+
function genDynamicSlot(slot, context, slotDeclarations, withFunction = false) {
|
|
27230
27323
|
let frag;
|
|
27231
27324
|
switch (slot.slotType) {
|
|
27232
27325
|
case 1:
|
|
27233
|
-
frag = genBasicDynamicSlot(slot, context);
|
|
27326
|
+
frag = genBasicDynamicSlot(slot, context, slotDeclarations);
|
|
27234
27327
|
break;
|
|
27235
27328
|
case 2:
|
|
27236
27329
|
frag = genLoopSlot(slot, context);
|
|
27237
27330
|
break;
|
|
27238
|
-
case 3: frag = genConditionalSlot(slot, context);
|
|
27331
|
+
case 3: frag = genConditionalSlot(slot, context, slotDeclarations);
|
|
27239
27332
|
}
|
|
27240
27333
|
if (!withFunction) return frag;
|
|
27241
27334
|
return [
|
|
@@ -27244,32 +27337,38 @@ function genDynamicSlot(slot, context, withFunction = false) {
|
|
|
27244
27337
|
")"
|
|
27245
27338
|
];
|
|
27246
27339
|
}
|
|
27247
|
-
function genBasicDynamicSlot(slot, context) {
|
|
27340
|
+
function genBasicDynamicSlot(slot, context, slotDeclarations) {
|
|
27248
27341
|
const { name, fn } = slot;
|
|
27249
|
-
|
|
27342
|
+
const slotName = context.getUniqueLocalName("s");
|
|
27343
|
+
slotDeclarations.push(slotName);
|
|
27344
|
+
return genMulti(DELIMITERS_OBJECT_NEWLINE, ["name: ", ...genExpression(name, context)], [
|
|
27345
|
+
`fn: ${slotName} || (${slotName} = `,
|
|
27346
|
+
...genSlotBlockWithProps(fn, context, false),
|
|
27347
|
+
")"
|
|
27348
|
+
]);
|
|
27250
27349
|
}
|
|
27251
27350
|
function genLoopSlot(slot, context) {
|
|
27252
27351
|
const { name, fn, loop, keyProp } = slot;
|
|
27253
27352
|
const { value, key, index, source } = loop;
|
|
27254
|
-
const
|
|
27255
|
-
const rawKey = key && key.content;
|
|
27256
|
-
const rawIndex = index && index.content;
|
|
27353
|
+
const plugins = context.options.expressionPlugins;
|
|
27257
27354
|
const idToPathMap = parseValueDestructure(value, context);
|
|
27355
|
+
const keyToPathMap = parseValueDestructure(key, context);
|
|
27356
|
+
const indexToPathMap = parseValueDestructure(index, context);
|
|
27258
27357
|
const [depth, exitScope] = context.enterScope();
|
|
27259
27358
|
const itemVar = `_for_item${depth}`;
|
|
27260
|
-
const idMap = buildDestructureIdMap(idToPathMap, `${itemVar}.value`,
|
|
27359
|
+
const idMap = buildDestructureIdMap(idToPathMap, `${itemVar}.value`, plugins);
|
|
27261
27360
|
idMap[itemVar] = null;
|
|
27262
27361
|
const args = [itemVar];
|
|
27263
|
-
if (
|
|
27362
|
+
if (key) {
|
|
27264
27363
|
const keyVar = `_for_key${depth}`;
|
|
27265
27364
|
args.push(keyVar);
|
|
27266
|
-
idMap
|
|
27365
|
+
Object.assign(idMap, buildDestructureIdMap(keyToPathMap, `${keyVar}.value`, plugins));
|
|
27267
27366
|
idMap[keyVar] = null;
|
|
27268
|
-
} else if (
|
|
27269
|
-
if (
|
|
27367
|
+
} else if (index) args.push("_");
|
|
27368
|
+
if (index) {
|
|
27270
27369
|
const indexVar = `_for_index${depth}`;
|
|
27271
27370
|
args.push(indexVar);
|
|
27272
|
-
idMap
|
|
27371
|
+
Object.assign(idMap, buildDestructureIdMap(indexToPathMap, `${indexVar}.value`, plugins));
|
|
27273
27372
|
idMap[indexVar] = null;
|
|
27274
27373
|
}
|
|
27275
27374
|
const renderSlot = [
|
|
@@ -27283,14 +27382,11 @@ function genLoopSlot(slot, context) {
|
|
|
27283
27382
|
];
|
|
27284
27383
|
exitScope();
|
|
27285
27384
|
const rawIdMap = {};
|
|
27286
|
-
|
|
27287
|
-
|
|
27288
|
-
|
|
27289
|
-
|
|
27290
|
-
|
|
27291
|
-
")",
|
|
27292
|
-
", "
|
|
27293
|
-
], rawValue ? rawValue : rawKey || rawIndex ? "_" : void 0, rawKey ? rawKey : rawIndex ? "__" : void 0, rawIndex);
|
|
27385
|
+
const collect = (map) => map.forEach((_, id) => rawIdMap[id] = null);
|
|
27386
|
+
collect(idToPathMap);
|
|
27387
|
+
collect(keyToPathMap);
|
|
27388
|
+
collect(indexToPathMap);
|
|
27389
|
+
const rawParams = context.withId(() => genAliasParams(value, key, index, context), rawIdMap);
|
|
27294
27390
|
const getName = [
|
|
27295
27391
|
...rawParams,
|
|
27296
27392
|
" => (",
|
|
@@ -27309,17 +27405,17 @@ function genLoopSlot(slot, context) {
|
|
|
27309
27405
|
")"
|
|
27310
27406
|
], renderSlot, getName, getKey)];
|
|
27311
27407
|
}
|
|
27312
|
-
function genConditionalSlot(slot, context) {
|
|
27408
|
+
function genConditionalSlot(slot, context, slotDeclarations) {
|
|
27313
27409
|
const { condition, positive, negative } = slot;
|
|
27314
27410
|
return [
|
|
27315
27411
|
...genExpression(condition, context),
|
|
27316
27412
|
INDENT_START,
|
|
27317
27413
|
NEWLINE,
|
|
27318
27414
|
"? ",
|
|
27319
|
-
...genDynamicSlot(positive, context),
|
|
27415
|
+
...genDynamicSlot(positive, context, slotDeclarations),
|
|
27320
27416
|
NEWLINE,
|
|
27321
27417
|
": ",
|
|
27322
|
-
...negative ?
|
|
27418
|
+
...negative ? genDynamicSlot(negative, context, slotDeclarations) : ["void 0"],
|
|
27323
27419
|
INDENT_END
|
|
27324
27420
|
];
|
|
27325
27421
|
}
|
|
@@ -27377,6 +27473,73 @@ function genSlotFlags(flags) {
|
|
|
27377
27473
|
return genFlags(flags, names);
|
|
27378
27474
|
}
|
|
27379
27475
|
//#endregion
|
|
27476
|
+
//#region packages/compiler-vapor/src/generators/vShow.ts
|
|
27477
|
+
function genVShow(oper, context) {
|
|
27478
|
+
const { element } = oper;
|
|
27479
|
+
return genCall(context.helper("applyVShow"), `n${element}`, [
|
|
27480
|
+
`() => (`,
|
|
27481
|
+
...genExpression(oper.dir.exp, context),
|
|
27482
|
+
`)`
|
|
27483
|
+
]);
|
|
27484
|
+
}
|
|
27485
|
+
//#endregion
|
|
27486
|
+
//#region packages/compiler-vapor/src/generators/directive.ts
|
|
27487
|
+
function genBuiltinDirective(oper, context) {
|
|
27488
|
+
let call;
|
|
27489
|
+
switch (oper.name) {
|
|
27490
|
+
case "show":
|
|
27491
|
+
call = genVShow(oper, context);
|
|
27492
|
+
break;
|
|
27493
|
+
case "model":
|
|
27494
|
+
call = genVModel(oper, context);
|
|
27495
|
+
break;
|
|
27496
|
+
default: return [];
|
|
27497
|
+
}
|
|
27498
|
+
return [NEWLINE, ...oper.once ? genOnce(call, context) : call];
|
|
27499
|
+
}
|
|
27500
|
+
/**
|
|
27501
|
+
* user directives via `withVaporDirectives`, emitted at the end of the block
|
|
27502
|
+
* so the element's props, children and v-model are in place first
|
|
27503
|
+
*/
|
|
27504
|
+
function genCustomDirectives(operations, context) {
|
|
27505
|
+
const byElement = /* @__PURE__ */ new Map();
|
|
27506
|
+
for (const oper of operations) if (oper.type === 13 && !oper.builtin) {
|
|
27507
|
+
const dirs = byElement.get(oper.element);
|
|
27508
|
+
if (dirs) dirs.push(oper);
|
|
27509
|
+
else byElement.set(oper.element, [oper]);
|
|
27510
|
+
}
|
|
27511
|
+
const [frag, push] = buildCodeFragment();
|
|
27512
|
+
for (const dirs of byElement.values()) push(...genElementDirectives(dirs, context));
|
|
27513
|
+
return frag;
|
|
27514
|
+
}
|
|
27515
|
+
function genElementDirectives(opers, context) {
|
|
27516
|
+
const { helper } = context;
|
|
27517
|
+
const element = `n${opers[0].element}`;
|
|
27518
|
+
const directiveItems = opers.map(genDirectiveItem);
|
|
27519
|
+
const directives = genMulti(DELIMITERS_ARRAY, ...directiveItems);
|
|
27520
|
+
const call = genCall(helper("withVaporDirectives"), element, directives);
|
|
27521
|
+
return [NEWLINE, ...opers[0].once ? genOnce(call, context) : call];
|
|
27522
|
+
function genDirectiveItem({ dir, name, asset }) {
|
|
27523
|
+
const directiveVar = asset ? toValidAssetId(name, "directive") : genExpression(extend(createSimpleExpression(name, false), { ast: null }), context);
|
|
27524
|
+
const value = dir.exp && [
|
|
27525
|
+
"() => (",
|
|
27526
|
+
...genExpression(dir.exp, context),
|
|
27527
|
+
")"
|
|
27528
|
+
];
|
|
27529
|
+
const argument = dir.arg && [
|
|
27530
|
+
"() => (",
|
|
27531
|
+
...genExpression(dir.arg, context),
|
|
27532
|
+
")"
|
|
27533
|
+
];
|
|
27534
|
+
const modifiers = !!dir.modifiers.length && [
|
|
27535
|
+
"{ ",
|
|
27536
|
+
genDirectiveModifiers(dir.modifiers.map((m) => m.content)),
|
|
27537
|
+
" }"
|
|
27538
|
+
];
|
|
27539
|
+
return genMulti(DELIMITERS_ARRAY.concat("void 0"), directiveVar, value, argument, modifiers);
|
|
27540
|
+
}
|
|
27541
|
+
}
|
|
27542
|
+
//#endregion
|
|
27380
27543
|
//#region packages/compiler-vapor/src/generators/key.ts
|
|
27381
27544
|
function genKey(oper, context) {
|
|
27382
27545
|
const { id, value, block, slotRoot } = oper;
|
|
@@ -27489,10 +27652,7 @@ function genTemplates(templates, context) {
|
|
|
27489
27652
|
function genSelf(dynamic, context, flushBeforeDynamic) {
|
|
27490
27653
|
const [frag, push] = buildCodeFragment();
|
|
27491
27654
|
const { id, template, operation, hasDynamicChild } = dynamic;
|
|
27492
|
-
if (id !== void 0 && template !== void 0) {
|
|
27493
|
-
push(NEWLINE, `const n${id} = ${context.tName(template)}()`);
|
|
27494
|
-
push(...genDirectivesForElement(id, context));
|
|
27495
|
-
}
|
|
27655
|
+
if (id !== void 0 && template !== void 0) push(NEWLINE, `const n${id} = ${context.tName(template)}()`);
|
|
27496
27656
|
if (operation) push(...genOperationWithInsertionState(operation, context));
|
|
27497
27657
|
if (hasDynamicChild) push(...genChildren(dynamic, context, push, `n${id}`, flushBeforeDynamic));
|
|
27498
27658
|
return frag;
|
|
@@ -27524,14 +27684,15 @@ function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`, flush
|
|
|
27524
27684
|
continue;
|
|
27525
27685
|
}
|
|
27526
27686
|
const id = child.flags & 1 ? child.flags & 4 ? child.anchor : child.id : void 0;
|
|
27527
|
-
|
|
27687
|
+
const ownsSubtree = child.operation !== void 0;
|
|
27688
|
+
if (id === void 0 && (!child.hasDynamicChild || ownsSubtree)) {
|
|
27528
27689
|
flushBeforeDynamic && flushBeforeDynamic(child, push);
|
|
27529
27690
|
push(...genSelf(child, context, flushBeforeDynamic));
|
|
27530
27691
|
continue;
|
|
27531
27692
|
}
|
|
27532
27693
|
const elementIndex = index + offset;
|
|
27533
27694
|
const inlinePlaceholder = id === void 0 && canInlinePlaceholder(child) && child.template == null && child.operation === void 0 && !(child.flags & 6);
|
|
27534
|
-
const accessPath = genAccessPath(context, from, elementIndex, prev);
|
|
27695
|
+
const accessPath = genAccessPath(context, from, elementIndex, prev, child.isText);
|
|
27535
27696
|
if (inlinePlaceholder) {
|
|
27536
27697
|
if (prev && prev[2]) {
|
|
27537
27698
|
push(...genChildren(child, context, pushBlock, [
|
|
@@ -27561,17 +27722,16 @@ function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`, flush
|
|
|
27561
27722
|
variable = id === void 0 ? context.pName(context.block.tempId++) : `n${id}`;
|
|
27562
27723
|
pushBlock(NEWLINE, id === void 0 ? `let ${variable} = ` : `const ${variable} = `, ...accessPath);
|
|
27563
27724
|
}
|
|
27564
|
-
if (id === child.anchor && !child.hasDynamicChild) {
|
|
27725
|
+
if (id === child.anchor && (!child.hasDynamicChild || ownsSubtree)) {
|
|
27565
27726
|
flushBeforeDynamic && flushBeforeDynamic(child, push);
|
|
27566
27727
|
push(...genSelf(child, context, flushBeforeDynamic));
|
|
27567
27728
|
}
|
|
27568
|
-
if (id !== void 0) push(...genDirectivesForElement(id, context));
|
|
27569
27729
|
prev = [
|
|
27570
27730
|
variable,
|
|
27571
27731
|
elementIndex,
|
|
27572
27732
|
id === void 0
|
|
27573
27733
|
];
|
|
27574
|
-
push(...genChildren(child, context, pushBlock, variable, flushBeforeDynamic));
|
|
27734
|
+
if (!ownsSubtree) push(...genChildren(child, context, pushBlock, variable, flushBeforeDynamic));
|
|
27575
27735
|
}
|
|
27576
27736
|
return frag;
|
|
27577
27737
|
}
|
|
@@ -27579,14 +27739,15 @@ function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`, flush
|
|
|
27579
27739
|
* Build one DOM lookup path while preserving the fast sibling walk:
|
|
27580
27740
|
* adjacent nodes use _next(prev), otherwise fall back to _nthChild(parent).
|
|
27581
27741
|
*/
|
|
27582
|
-
function genAccessPath({ helper }, from, elementIndex, prev) {
|
|
27583
|
-
|
|
27584
|
-
if (elementIndex === 0)
|
|
27742
|
+
function genAccessPath({ helper }, from, elementIndex, prev, isText) {
|
|
27743
|
+
const textHint = isText ? "true" : void 0;
|
|
27744
|
+
if (prev) return elementIndex - prev[1] === 1 ? genCall(helper("next"), prev[0], textHint) : genCall(helper("nthChild"), from, String(elementIndex), textHint);
|
|
27745
|
+
if (elementIndex === 0) return genCall(helper("child"), from, textHint);
|
|
27585
27746
|
if (elementIndex === 1) {
|
|
27586
27747
|
const firstChild = genCall(helper("child"), from);
|
|
27587
|
-
return genCall(helper("next"), firstChild);
|
|
27748
|
+
return genCall(helper("next"), firstChild, textHint);
|
|
27588
27749
|
}
|
|
27589
|
-
return genCall(helper("nthChild"), from, String(elementIndex));
|
|
27750
|
+
return genCall(helper("nthChild"), from, String(elementIndex), textHint);
|
|
27590
27751
|
}
|
|
27591
27752
|
/**
|
|
27592
27753
|
* Only inline a placeholder when materializing it would not save a parent
|
|
@@ -27701,6 +27862,7 @@ function genBlockContent(block, context, root, genEffectsExtraFrag, skippedEffec
|
|
|
27701
27862
|
if (effectIndex < effect.length) push(...genEffectRange(effectIndex, effect.length, genEffectsExtraFrag));
|
|
27702
27863
|
else if (genEffectsExtraFrag) push(...genEffects([], context, genEffectsExtraFrag));
|
|
27703
27864
|
if (modelOperations.length) push(...genOperations(modelOperations, context));
|
|
27865
|
+
push(...genCustomDirectives(operation, context));
|
|
27704
27866
|
push(NEWLINE, `return `);
|
|
27705
27867
|
const returnNodes = returns.map((n) => `n${n}`);
|
|
27706
27868
|
push(...returnNodes.length > 1 ? genMulti(DELIMITERS_ARRAY, ...returnNodes) : [returnNodes[0] || "[]"]);
|
|
@@ -27915,14 +28077,16 @@ var CodegenContext = class {
|
|
|
27915
28077
|
enterScope() {
|
|
27916
28078
|
return [this.scopeLevel++, () => this.scopeLevel--];
|
|
27917
28079
|
}
|
|
27918
|
-
getUniqueLocalName(base, scopeNames) {
|
|
28080
|
+
getUniqueLocalName(base, scopeNames = this.generatedLocalNames) {
|
|
27919
28081
|
const name = this.findAvailableName(base, scopeNames);
|
|
27920
28082
|
scopeNames.add(name);
|
|
27921
28083
|
this.generatedLocalNames.add(name);
|
|
27922
28084
|
return name;
|
|
27923
28085
|
}
|
|
27924
28086
|
isNameAvailable(name, reservedNames) {
|
|
28087
|
+
var _this$identifiers$nam;
|
|
27925
28088
|
if (this.bindingNames.has(name) || reservedNames.has(name)) return false;
|
|
28089
|
+
if ((_this$identifiers$nam = this.identifiers[name]) === null || _this$identifiers$nam === void 0 ? void 0 : _this$identifiers$nam.length) return false;
|
|
27926
28090
|
for (const alias of this.helpers.values()) if (alias === name) return false;
|
|
27927
28091
|
return true;
|
|
27928
28092
|
}
|
|
@@ -28082,9 +28246,9 @@ const transformVBind = (dir, node, context) => {
|
|
|
28082
28246
|
context.options.onError(createCompilerError(34, loc));
|
|
28083
28247
|
exp = createSimpleExpression("", true, loc);
|
|
28084
28248
|
}
|
|
28085
|
-
const isComponent = node.tagType === 1;
|
|
28086
|
-
exp = resolveExpression(exp, isComponent);
|
|
28087
28249
|
arg = resolveExpression(arg);
|
|
28250
|
+
const excludeNumber = node.tagType === 1 || node.tagType === 2 || !!context.options.isCustomElement(node.tag) || !arg.isStatic || isSpecialBooleanAttr(arg.content) || isCheckboxValueProp(node, arg.content) || !modifiersString.includes("attr") && (isFoldableBooleanAttr(arg.content) || isModelValueProp(node, arg.content));
|
|
28251
|
+
exp = resolveExpression(exp, excludeNumber);
|
|
28088
28252
|
if (arg.isStatic && isReservedProp(arg.content)) return;
|
|
28089
28253
|
let camel = false;
|
|
28090
28254
|
if (modifiersString.includes("camel")) {
|
|
@@ -28100,6 +28264,37 @@ const transformVBind = (dir, node, context) => {
|
|
|
28100
28264
|
};
|
|
28101
28265
|
};
|
|
28102
28266
|
//#endregion
|
|
28267
|
+
//#region packages/compiler-vapor/src/transforms/transformKey.ts
|
|
28268
|
+
init_objectSpread2();
|
|
28269
|
+
const dynamicComponentKeys = /* @__PURE__ */ new WeakMap();
|
|
28270
|
+
const transformKey = (node, context) => {
|
|
28271
|
+
if (node.type !== 1 || context.inVOnce || findDir(node, "for") || node.tagType === 3 && findDir(node, /^(if|else-if|else|slot)$/, true)) return;
|
|
28272
|
+
const dir = findProp(node, "key", true, true);
|
|
28273
|
+
if (!dir || dir.type === 6) return;
|
|
28274
|
+
let value;
|
|
28275
|
+
value = dir.exp || normalizeBindShorthand(dir.arg, context);
|
|
28276
|
+
if (isStaticExpression(value, context.options.bindingMetadata)) return;
|
|
28277
|
+
if (isComponentTag(node.tag) && findProp(node, "is", true, true)) {
|
|
28278
|
+
dynamicComponentKeys.set(node, value);
|
|
28279
|
+
return;
|
|
28280
|
+
}
|
|
28281
|
+
let id = context.reference();
|
|
28282
|
+
context.dynamic.flags |= 6;
|
|
28283
|
+
context.node = node = wrapTemplate(node, ["key"]);
|
|
28284
|
+
const block = newBlock(node);
|
|
28285
|
+
const exitBlock = context.enterBlock(block);
|
|
28286
|
+
return () => {
|
|
28287
|
+
exitBlock();
|
|
28288
|
+
context.dynamic.operation = _objectSpread2(_objectSpread2({
|
|
28289
|
+
type: 16,
|
|
28290
|
+
id
|
|
28291
|
+
}, context.effectBoundary()), {}, {
|
|
28292
|
+
value,
|
|
28293
|
+
block
|
|
28294
|
+
});
|
|
28295
|
+
};
|
|
28296
|
+
};
|
|
28297
|
+
//#endregion
|
|
28103
28298
|
//#region packages/compiler-vapor/src/transforms/vHtml.ts
|
|
28104
28299
|
function ignoreVHtmlChildren(node, context, clear) {
|
|
28105
28300
|
if (!node.children.length) return;
|
|
@@ -28130,6 +28325,53 @@ const transformVHtml = (dir, node, context) => {
|
|
|
28130
28325
|
//#region packages/compiler-vapor/src/transforms/transformElement.ts
|
|
28131
28326
|
init_objectSpread2();
|
|
28132
28327
|
const isReservedProp = /*#__PURE__*/ makeMap(",key,ref,ref_for,ref_key,");
|
|
28328
|
+
/**
|
|
28329
|
+
* `true-value` / `false-value` are only read back by `v-model` on a checkbox,
|
|
28330
|
+
* and they are dropped from the ssr output, so a checkbox that only carries
|
|
28331
|
+
* them in the template has nothing left to read from after hydration. A
|
|
28332
|
+
* dynamic `type` can still make the element a checkbox at runtime.
|
|
28333
|
+
*/
|
|
28334
|
+
function isCheckboxValueProp(node, key) {
|
|
28335
|
+
if (node.tag !== "input" || key !== "true-value" && key !== "false-value") return false;
|
|
28336
|
+
const type = findProp(node, "type");
|
|
28337
|
+
return type ? type.type === 7 || type.value.content === "checkbox" : hasDynamicKeyVBind(node);
|
|
28338
|
+
}
|
|
28339
|
+
/**
|
|
28340
|
+
* Props the template string cannot carry, so they have to be applied by a
|
|
28341
|
+
* runtime prop setter instead:
|
|
28342
|
+
* - `<textarea>` / `<select>` ignore a `value` content attribute, the value
|
|
28343
|
+
* only takes effect as a dom property - which is where vdom sends it too,
|
|
28344
|
+
* see `shouldSetAsProp`
|
|
28345
|
+
* - `true-value` / `false-value`, see `isCheckboxValueProp`
|
|
28346
|
+
*/
|
|
28347
|
+
function isRuntimeOnlyProp(node, key) {
|
|
28348
|
+
return key === "value" && (node.tag === "textarea" || node.tag === "select") || isCheckboxValueProp(node, key);
|
|
28349
|
+
}
|
|
28350
|
+
/**
|
|
28351
|
+
* Props `v-model` reads back off the element as raw values (`_value`,
|
|
28352
|
+
* `_trueValue`, `_falseValue`), so a number literal bound to them has to keep
|
|
28353
|
+
* its type - vdom bails on `<option :value="1">` in its own static
|
|
28354
|
+
* stringification for the same reason.
|
|
28355
|
+
*
|
|
28356
|
+
* Deliberately wider than `isRuntimeOnlyProp`: a literal `<input value="1">`
|
|
28357
|
+
* belongs in the template string, only the type of a *bound* number has to
|
|
28358
|
+
* survive. So this one is consulted by `v-bind`, that one by
|
|
28359
|
+
* `transformNativeElement`.
|
|
28360
|
+
*/
|
|
28361
|
+
function isModelValueProp(node, key) {
|
|
28362
|
+
const { tag } = node;
|
|
28363
|
+
return key === "value" && (tag === "input" || tag === "option" || tag === "textarea" || tag === "select") || isCheckboxValueProp(node, key);
|
|
28364
|
+
}
|
|
28365
|
+
/**
|
|
28366
|
+
* Boolean attributes are folded into the template from the value itself, which
|
|
28367
|
+
* needs the type it was written with: `:disabled="0"` is `false`, while the
|
|
28368
|
+
* `"0"` a stringified template attribute would carry is `true`. `hidden` is
|
|
28369
|
+
* not a boolean attribute - it also takes `until-found` - but a number means
|
|
28370
|
+
* the same thing there.
|
|
28371
|
+
*/
|
|
28372
|
+
function isFoldableBooleanAttr(key) {
|
|
28373
|
+
return isBooleanAttr(key) || key === "hidden";
|
|
28374
|
+
}
|
|
28133
28375
|
const transformElement = (node, context) => {
|
|
28134
28376
|
let effectIndex = context.block.effect.length;
|
|
28135
28377
|
const getEffectIndex = () => effectIndex++;
|
|
@@ -28191,6 +28433,8 @@ function transformComponentElement(node, propsResult, staticKey, singleRoot, con
|
|
|
28191
28433
|
let { tag } = node;
|
|
28192
28434
|
let asset = true;
|
|
28193
28435
|
if (!dynamicComponent && !useCreateElement) {
|
|
28436
|
+
const isProp = findProp(node, "is");
|
|
28437
|
+
if (isProp && isProp.type === 6 && isVueIsValue(isProp)) tag = isProp.value.content.slice(4);
|
|
28194
28438
|
const fromSetup = resolveSetupReference(tag, context);
|
|
28195
28439
|
if (fromSetup) {
|
|
28196
28440
|
tag = fromSetup;
|
|
@@ -28227,11 +28471,16 @@ function transformComponentElement(node, propsResult, staticKey, singleRoot, con
|
|
|
28227
28471
|
slots: [...context.slots],
|
|
28228
28472
|
once: context.inVOnce,
|
|
28229
28473
|
dynamic: dynamicComponent,
|
|
28230
|
-
useCreateElement
|
|
28474
|
+
useCreateElement,
|
|
28475
|
+
ns: node.ns || void 0,
|
|
28476
|
+
key: dynamicComponentKeys.get(node)
|
|
28231
28477
|
});
|
|
28232
28478
|
if (staticKey) context.registerOperation(createSetBlockKey(id, staticKey));
|
|
28233
28479
|
context.slots = [];
|
|
28234
28480
|
}
|
|
28481
|
+
function isVueIsValue(prop) {
|
|
28482
|
+
return !!prop.value && prop.value.content.startsWith("vue:");
|
|
28483
|
+
}
|
|
28235
28484
|
function resolveDynamicComponent(node) {
|
|
28236
28485
|
const isProp = findProp(node, "is", false, true);
|
|
28237
28486
|
if (!isProp) return;
|
|
@@ -28247,6 +28496,7 @@ function resolveSetupReference(name, context) {
|
|
|
28247
28496
|
}
|
|
28248
28497
|
const dynamicKeys = ["indeterminate"];
|
|
28249
28498
|
const NEEDS_QUOTES_RE = /[\s"'`=<>]/;
|
|
28499
|
+
const LEADING_NEWLINE_RE = /^\r?\n/;
|
|
28250
28500
|
const UNSAFE_ATTR_NAME_RE = /[\u0000-\u0020"'<=/>]/;
|
|
28251
28501
|
function transformNativeElement(node, propsResult, staticKey, singleRoot, context, getEffectIndex, omitEndTag) {
|
|
28252
28502
|
const { tag } = node;
|
|
@@ -28275,10 +28525,10 @@ function transformNativeElement(node, propsResult, staticKey, singleRoot, contex
|
|
|
28275
28525
|
const canStringifyAttrName = key.isStatic && !UNSAFE_ATTR_NAME_RE.test(key.content);
|
|
28276
28526
|
let foldedValue;
|
|
28277
28527
|
if (canStringifyAttrName && context.imports.some((imported) => values[0].content.includes(imported.exp.content))) template += ` ${key.content}="${IMPORT_EXP_START}${values[0].content}${IMPORT_EXP_END}"`;
|
|
28278
|
-
else if (canStringifyAttrName && values.length === 1 && (values[0].isStatic || values[0].content === "''") && !dynamicKeys.includes(key.content)) {
|
|
28528
|
+
else if (canStringifyAttrName && values.length === 1 && (values[0].isStatic || values[0].content === "''") && !dynamicKeys.includes(key.content) && !isRuntimeOnlyProp(node, key.content)) {
|
|
28279
28529
|
const value = values[0].content === "''" ? "" : values[0].content;
|
|
28280
28530
|
appendTemplateProp(key.content, value);
|
|
28281
|
-
} else if (canStringifyAttrName && !prop.modifier && (
|
|
28531
|
+
} else if (canStringifyAttrName && !prop.modifier && isFoldableBooleanAttr(key.content) && (foldedValue = foldBooleanAttrValue(key.content, values)) != null) {
|
|
28282
28532
|
if (foldedValue) appendTemplateProp(key.content);
|
|
28283
28533
|
} else if (canStringifyAttrName && !prop.modifier && hasBoundValue(values) && (foldedValue = key.content === "class" ? foldClassValues(values) : key.content === "style" ? foldStyleValues(values) : void 0) != null) {
|
|
28284
28534
|
if (foldedValue) appendTemplateProp(key.content, foldedValue, true);
|
|
@@ -28290,7 +28540,9 @@ function transformNativeElement(node, propsResult, staticKey, singleRoot, contex
|
|
|
28290
28540
|
}, getEffectIndex);
|
|
28291
28541
|
}
|
|
28292
28542
|
}
|
|
28293
|
-
|
|
28543
|
+
let children = context.childrenTemplate.join("");
|
|
28544
|
+
if (node.ns === 0 && parserOptions.isIgnoreNewlineTag(tag) && LEADING_NEWLINE_RE.test(children)) children = `\n` + children;
|
|
28545
|
+
template += `>` + children;
|
|
28294
28546
|
if (!isVoidTag(tag) && !omitEndTag) template += `</${tag}>`;
|
|
28295
28547
|
context.templateRoot = singleRoot;
|
|
28296
28548
|
if (context.parent && context.parent.node.type === 1 && !isValidHTMLNesting(context.parent.node.tag, tag)) {
|
|
@@ -28419,6 +28671,7 @@ function evaluateObjectExpression(node) {
|
|
|
28419
28671
|
return { value };
|
|
28420
28672
|
}
|
|
28421
28673
|
function resolveStaticKey(node, context, isComponent) {
|
|
28674
|
+
if (context.parent.node !== context.block.node) return;
|
|
28422
28675
|
const keyProp = findProp(node, "key", false, true);
|
|
28423
28676
|
if (!keyProp) return;
|
|
28424
28677
|
if (keyProp.type === 6) return keyProp.value ? createSimpleExpression(keyProp.value.content, true, keyProp.value.loc) : EMPTY_EXPRESSION;
|
|
@@ -28491,7 +28744,7 @@ function buildProps(node, context, isComponent, isDynamicComponent, getEffectInd
|
|
|
28491
28744
|
continue;
|
|
28492
28745
|
}
|
|
28493
28746
|
}
|
|
28494
|
-
if (
|
|
28747
|
+
if (prop.type === 6 ? prop.name === "is" && (isDynamicComponent || isVueIsValue(prop)) : isDynamicComponent && prop.name === "bind" && isStaticArgOf(prop.arg, "is")) continue;
|
|
28495
28748
|
const result = transformProp(prop, node, context);
|
|
28496
28749
|
if (result) {
|
|
28497
28750
|
dynamicExpr.push(result.key, result.value);
|
|
@@ -28668,6 +28921,10 @@ function transformProp(prop, node, context) {
|
|
|
28668
28921
|
const directiveTransform = context.options.directiveTransforms[name];
|
|
28669
28922
|
if (directiveTransform) return directiveTransform(prop, node, context);
|
|
28670
28923
|
if (!isBuiltInDirective(name)) {
|
|
28924
|
+
if (node.tagType === 2) {
|
|
28925
|
+
context.options.onError(createCompilerError(36, prop.loc));
|
|
28926
|
+
return;
|
|
28927
|
+
}
|
|
28671
28928
|
const fromSetup = resolveSetupReference(`v-${name}`, context);
|
|
28672
28929
|
if (fromSetup) name = fromSetup;
|
|
28673
28930
|
else context.directive.add(name);
|
|
@@ -28676,7 +28933,8 @@ function transformProp(prop, node, context) {
|
|
|
28676
28933
|
element: context.reference(),
|
|
28677
28934
|
dir: prop,
|
|
28678
28935
|
name,
|
|
28679
|
-
asset: !fromSetup
|
|
28936
|
+
asset: !fromSetup,
|
|
28937
|
+
once: context.inVOnce
|
|
28680
28938
|
});
|
|
28681
28939
|
}
|
|
28682
28940
|
}
|
|
@@ -28717,9 +28975,6 @@ function mergePropValues(existing, incoming) {
|
|
|
28717
28975
|
const newValues = incoming.values;
|
|
28718
28976
|
existing.values.push(...newValues);
|
|
28719
28977
|
}
|
|
28720
|
-
function isComponentTag(tag) {
|
|
28721
|
-
return tag === "component" || tag === "Component";
|
|
28722
|
-
}
|
|
28723
28978
|
function shouldUseCreateElement(node, context) {
|
|
28724
28979
|
return context.options.isCustomElement(node.tag) || node.tagType === 0 && node.tag === "template";
|
|
28725
28980
|
}
|
|
@@ -28737,18 +28992,20 @@ const transformChildren = (node, context) => {
|
|
|
28737
28992
|
childContext.templateCloseBlocks = isInSameTemplate ? childTemplateCloseState.blocks : false;
|
|
28738
28993
|
transformNode(childContext);
|
|
28739
28994
|
const childDynamic = childContext.dynamic;
|
|
28995
|
+
const createsNode = isFragment || childContext.template !== "" || childDynamic.template != null || childDynamic.id !== void 0 || childDynamic.operation !== void 0 || childDynamic.hasDynamicChild === true;
|
|
28740
28996
|
if (isFragment) {
|
|
28741
28997
|
childContext.reference();
|
|
28742
28998
|
childContext.registerTemplate();
|
|
28743
28999
|
if (!(childDynamic.flags & 2) || childDynamic.flags & 4) context.block.returns.push(childContext.dynamic.id);
|
|
28744
29000
|
} else if (useCreateElement) {
|
|
28745
|
-
if (
|
|
29001
|
+
if (createsNode) {
|
|
28746
29002
|
childContext.reference();
|
|
28747
29003
|
childContext.registerTemplate();
|
|
28748
29004
|
childDynamic.flags |= 6;
|
|
28749
29005
|
}
|
|
28750
29006
|
} else context.childrenTemplate.push(childContext.template);
|
|
28751
29007
|
if (childDynamic.hasDynamicChild || childDynamic.id !== void 0 || childDynamic.flags & 2 || childDynamic.flags & 4) context.dynamic.hasDynamicChild = true;
|
|
29008
|
+
if (!createsNode) childDynamic.flags |= 2;
|
|
28752
29009
|
context.dynamic.children[i] = childDynamic;
|
|
28753
29010
|
}
|
|
28754
29011
|
if (!isFragment) processDynamicChildren(context);
|
|
@@ -28848,6 +29105,7 @@ function processInterpolation(context) {
|
|
|
28848
29105
|
}
|
|
28849
29106
|
context.template += " ";
|
|
28850
29107
|
const id = context.reference();
|
|
29108
|
+
context.dynamic.isText = isElementChild;
|
|
28851
29109
|
if (values.length === 0) return;
|
|
28852
29110
|
context.registerEffect(values, {
|
|
28853
29111
|
type: 5,
|
|
@@ -29100,7 +29358,8 @@ const transformVShow = (dir, node, context) => {
|
|
|
29100
29358
|
element: context.reference(),
|
|
29101
29359
|
dir,
|
|
29102
29360
|
name: "show",
|
|
29103
|
-
builtin: true
|
|
29361
|
+
builtin: true,
|
|
29362
|
+
once: context.inVOnce
|
|
29104
29363
|
});
|
|
29105
29364
|
};
|
|
29106
29365
|
//#endregion
|
|
@@ -29184,7 +29443,8 @@ const transformVModel = (dir, node, context) => {
|
|
|
29184
29443
|
dir,
|
|
29185
29444
|
name: "model",
|
|
29186
29445
|
modelType,
|
|
29187
|
-
builtin: true
|
|
29446
|
+
builtin: true,
|
|
29447
|
+
once: context.inVOnce
|
|
29188
29448
|
});
|
|
29189
29449
|
function checkDuplicatedValue() {
|
|
29190
29450
|
const value = findDir$1(node, "bind");
|
|
@@ -29428,8 +29688,6 @@ const transformSlotOutlet = (node, context) => {
|
|
|
29428
29688
|
if (slotProps.length) {
|
|
29429
29689
|
const [isDynamic, props] = buildProps(extend({}, node, { props: slotProps }), context, true);
|
|
29430
29690
|
irProps = isDynamic ? props : [props];
|
|
29431
|
-
const runtimeDirective = context.block.operation.find((oper) => oper.type === 13 && oper.element === id);
|
|
29432
|
-
if (runtimeDirective) context.options.onError(createCompilerError(36, runtimeDirective.dir.loc));
|
|
29433
29691
|
}
|
|
29434
29692
|
return () => {
|
|
29435
29693
|
exitBlock && exitBlock();
|
|
@@ -29627,32 +29885,6 @@ function hasMultipleChildren(node) {
|
|
|
29627
29885
|
return children.length !== 1;
|
|
29628
29886
|
}
|
|
29629
29887
|
//#endregion
|
|
29630
|
-
//#region packages/compiler-vapor/src/transforms/transformKey.ts
|
|
29631
|
-
init_objectSpread2();
|
|
29632
|
-
const transformKey = (node, context) => {
|
|
29633
|
-
if (node.type !== 1 || context.inVOnce || findDir(node, "for")) return;
|
|
29634
|
-
const dir = findProp(node, "key", true, true);
|
|
29635
|
-
if (!dir || dir.type === 6) return;
|
|
29636
|
-
let value;
|
|
29637
|
-
value = dir.exp || normalizeBindShorthand(dir.arg, context);
|
|
29638
|
-
if (isStaticExpression(value, context.options.bindingMetadata)) return;
|
|
29639
|
-
let id = context.reference();
|
|
29640
|
-
context.dynamic.flags |= 6;
|
|
29641
|
-
context.node = node = wrapTemplate(node, ["key"]);
|
|
29642
|
-
const block = newBlock(node);
|
|
29643
|
-
const exitBlock = context.enterBlock(block);
|
|
29644
|
-
return () => {
|
|
29645
|
-
exitBlock();
|
|
29646
|
-
context.dynamic.operation = _objectSpread2(_objectSpread2({
|
|
29647
|
-
type: 16,
|
|
29648
|
-
id
|
|
29649
|
-
}, context.effectBoundary()), {}, {
|
|
29650
|
-
value,
|
|
29651
|
-
block
|
|
29652
|
-
});
|
|
29653
|
-
};
|
|
29654
|
-
};
|
|
29655
|
-
//#endregion
|
|
29656
29888
|
//#region packages/compiler-vapor/src/compile.ts
|
|
29657
29889
|
function compile$1(source, options = {}) {
|
|
29658
29890
|
const resolvedOptions = extend({}, options);
|
|
@@ -30819,10 +31051,10 @@ var require_picocolors_browser = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
30819
31051
|
module.exports.createColors = create;
|
|
30820
31052
|
}));
|
|
30821
31053
|
//#endregion
|
|
30822
|
-
//#region (ignored) node_modules/.pnpm/postcss@8.5.
|
|
31054
|
+
//#region (ignored) node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/terminal-highlight
|
|
30823
31055
|
var require_terminal_highlight = /* @__PURE__ */ __commonJSMin((() => {}));
|
|
30824
31056
|
//#endregion
|
|
30825
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
31057
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/css-syntax-error.js
|
|
30826
31058
|
var require_css_syntax_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
30827
31059
|
let pico = require_picocolors_browser();
|
|
30828
31060
|
let terminalHighlight = require_terminal_highlight();
|
|
@@ -30899,10 +31131,11 @@ var require_css_syntax_error = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
30899
31131
|
CssSyntaxError.default = CssSyntaxError;
|
|
30900
31132
|
}));
|
|
30901
31133
|
//#endregion
|
|
30902
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
31134
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/stringifier.js
|
|
30903
31135
|
var require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
30904
31136
|
const STYLE_TAG = /(<)(\/?style\b)/gi;
|
|
30905
31137
|
const COMMENT_OPEN = /(<)(!--)/g;
|
|
31138
|
+
const AT_NAME_END = /[\t\n\f\r "#'()/;[\\\]{}]/;
|
|
30906
31139
|
function escapeHTMLInCSS(str) {
|
|
30907
31140
|
if (typeof str !== "string") return str;
|
|
30908
31141
|
if (!str.includes("<")) return str;
|
|
@@ -30928,9 +31161,15 @@ var require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
30928
31161
|
function atruleStart(str, node) {
|
|
30929
31162
|
let name = "@" + node.name;
|
|
30930
31163
|
let params = node.params ? str.rawValue(node, "params") : "";
|
|
30931
|
-
|
|
30932
|
-
|
|
30933
|
-
|
|
31164
|
+
let afterName = node.raws.afterName;
|
|
31165
|
+
if (typeof afterName === "undefined") afterName = params ? " " : "";
|
|
31166
|
+
else if (afterName === "" && params && !AT_NAME_END.test(params[0])) afterName = " ";
|
|
31167
|
+
return name + afterName + params;
|
|
31168
|
+
}
|
|
31169
|
+
function isCustomProperty(node) {
|
|
31170
|
+
if (!node.prop.startsWith("--")) return false;
|
|
31171
|
+
let before = node.raws.before;
|
|
31172
|
+
return typeof before === "undefined" || !/\S$/.test(before);
|
|
30934
31173
|
}
|
|
30935
31174
|
function pushBody(str, stack, node) {
|
|
30936
31175
|
let nodes = node.nodes;
|
|
@@ -30941,11 +31180,16 @@ var require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
30941
31180
|
}
|
|
30942
31181
|
let semicolon = str.raw(node, "semicolon");
|
|
30943
31182
|
let isDocument = node.type === "document";
|
|
30944
|
-
for (let i = nodes.length - 1; i >= 0; i--)
|
|
30945
|
-
|
|
30946
|
-
|
|
30947
|
-
|
|
30948
|
-
|
|
31183
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
31184
|
+
let child = nodes[i];
|
|
31185
|
+
let childSemicolon = last !== i || semicolon;
|
|
31186
|
+
if (!childSemicolon && i < nodes.length - 1 && (child.type === "atrule" && !child.nodes || child.type === "decl" && isCustomProperty(child))) childSemicolon = true;
|
|
31187
|
+
stack.push({
|
|
31188
|
+
document: isDocument,
|
|
31189
|
+
node: child,
|
|
31190
|
+
semicolon: childSemicolon
|
|
31191
|
+
});
|
|
31192
|
+
}
|
|
30949
31193
|
}
|
|
30950
31194
|
function pushBlock(str, stack, node, start) {
|
|
30951
31195
|
let between = str.raw(node, "between", "beforeOpen");
|
|
@@ -31190,6 +31434,7 @@ var require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31190
31434
|
return value;
|
|
31191
31435
|
}
|
|
31192
31436
|
root(node) {
|
|
31437
|
+
if (node.source && node.source.input.hasBOM) this.builder("", node, "start");
|
|
31193
31438
|
this.body(node);
|
|
31194
31439
|
if (node.raws.after) {
|
|
31195
31440
|
let after = node.raws.after;
|
|
@@ -31212,7 +31457,7 @@ var require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31212
31457
|
Stringifier.default = Stringifier;
|
|
31213
31458
|
}));
|
|
31214
31459
|
//#endregion
|
|
31215
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
31460
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/stringify.js
|
|
31216
31461
|
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31217
31462
|
let Stringifier = require_stringifier();
|
|
31218
31463
|
function stringify(node, builder) {
|
|
@@ -31222,13 +31467,13 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31222
31467
|
stringify.default = stringify;
|
|
31223
31468
|
}));
|
|
31224
31469
|
//#endregion
|
|
31225
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
31470
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/symbols.js
|
|
31226
31471
|
var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31227
31472
|
module.exports.isClean = Symbol("isClean");
|
|
31228
31473
|
module.exports.my = Symbol("my");
|
|
31229
31474
|
}));
|
|
31230
31475
|
//#endregion
|
|
31231
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
31476
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/node.js
|
|
31232
31477
|
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31233
31478
|
let CssSyntaxError = require_css_syntax_error();
|
|
31234
31479
|
let Stringifier = require_stringifier();
|
|
@@ -31590,7 +31835,7 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31590
31835
|
Node.default = Node;
|
|
31591
31836
|
}));
|
|
31592
31837
|
//#endregion
|
|
31593
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
31838
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/comment.js
|
|
31594
31839
|
var require_comment$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31595
31840
|
let Node = require_node$1();
|
|
31596
31841
|
var Comment = class extends Node {
|
|
@@ -31603,7 +31848,7 @@ var require_comment$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31603
31848
|
Comment.default = Comment;
|
|
31604
31849
|
}));
|
|
31605
31850
|
//#endregion
|
|
31606
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
31851
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/declaration.js
|
|
31607
31852
|
var require_declaration = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31608
31853
|
init_objectSpread2();
|
|
31609
31854
|
let Node = require_node$1();
|
|
@@ -31621,7 +31866,7 @@ var require_declaration = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31621
31866
|
Declaration.default = Declaration;
|
|
31622
31867
|
}));
|
|
31623
31868
|
//#endregion
|
|
31624
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
31869
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/container.js
|
|
31625
31870
|
var require_container$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31626
31871
|
let Comment = require_comment$1();
|
|
31627
31872
|
let Declaration = require_declaration();
|
|
@@ -31957,7 +32202,7 @@ var require_container$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31957
32202
|
}));
|
|
31958
32203
|
/* c8 ignore stop */
|
|
31959
32204
|
//#endregion
|
|
31960
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32205
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/at-rule.js
|
|
31961
32206
|
var require_at_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31962
32207
|
let Container = require_container$1();
|
|
31963
32208
|
var AtRule = class extends Container {
|
|
@@ -31979,7 +32224,7 @@ var require_at_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31979
32224
|
Container.registerAtRule(AtRule);
|
|
31980
32225
|
}));
|
|
31981
32226
|
//#endregion
|
|
31982
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32227
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/document.js
|
|
31983
32228
|
var require_document = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31984
32229
|
init_objectSpread2();
|
|
31985
32230
|
let Container = require_container$1();
|
|
@@ -32030,21 +32275,21 @@ var init_objectWithoutProperties = __esmMin((() => {
|
|
|
32030
32275
|
init_objectWithoutPropertiesLoose();
|
|
32031
32276
|
}));
|
|
32032
32277
|
//#endregion
|
|
32033
|
-
//#region node_modules/.pnpm/nanoid@3.3.
|
|
32278
|
+
//#region node_modules/.pnpm/nanoid@3.3.19/node_modules/nanoid/non-secure/index.cjs
|
|
32034
32279
|
var require_non_secure = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32035
32280
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
32036
32281
|
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
32037
32282
|
return (size = defaultSize) => {
|
|
32038
32283
|
let id = "";
|
|
32039
32284
|
let i = size | 0;
|
|
32040
|
-
while (i--) id += alphabet[Math.random() * alphabet.length | 0];
|
|
32285
|
+
while (i-- > 0) id += alphabet[Math.random() * alphabet.length | 0];
|
|
32041
32286
|
return id;
|
|
32042
32287
|
};
|
|
32043
32288
|
};
|
|
32044
32289
|
let nanoid = (size = 21) => {
|
|
32045
32290
|
let id = "";
|
|
32046
32291
|
let i = size | 0;
|
|
32047
|
-
while (i--) id += urlAlphabet[Math.random() * 64 | 0];
|
|
32292
|
+
while (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];
|
|
32048
32293
|
return id;
|
|
32049
32294
|
};
|
|
32050
32295
|
module.exports = {
|
|
@@ -32053,15 +32298,22 @@ var require_non_secure = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32053
32298
|
};
|
|
32054
32299
|
}));
|
|
32055
32300
|
//#endregion
|
|
32056
|
-
//#region (ignored) node_modules/.pnpm/postcss@8.5.
|
|
32301
|
+
//#region (ignored) node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib
|
|
32057
32302
|
var require_lib = /* @__PURE__ */ __commonJSMin((() => {}));
|
|
32058
32303
|
//#endregion
|
|
32059
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32304
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/previous-map.js
|
|
32060
32305
|
var require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32061
32306
|
init__polyfill_node_buffer();
|
|
32062
|
-
let { existsSync, readFileSync } = (init__polyfill_node_fs(), __toCommonJS(_polyfill_node_fs_exports));
|
|
32307
|
+
let { existsSync, readFileSync, realpathSync } = (init__polyfill_node_fs(), __toCommonJS(_polyfill_node_fs_exports));
|
|
32063
32308
|
let { dirname, isAbsolute, join, relative, sep } = (init__polyfill_node_path(), __toCommonJS(_polyfill_node_path_exports));
|
|
32064
32309
|
let { SourceMapConsumer, SourceMapGenerator } = require_lib();
|
|
32310
|
+
function realPath(path) {
|
|
32311
|
+
try {
|
|
32312
|
+
return realpathSync(path);
|
|
32313
|
+
} catch (_unused) {
|
|
32314
|
+
return path;
|
|
32315
|
+
}
|
|
32316
|
+
}
|
|
32065
32317
|
function fromBase64(str) {
|
|
32066
32318
|
if (Buffer$1) return Buffer$1.from(str, "base64").toString();
|
|
32067
32319
|
else
|
|
@@ -32111,11 +32363,10 @@ var require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32111
32363
|
}
|
|
32112
32364
|
loadFile(path, cssFile, trusted) {
|
|
32113
32365
|
if (!trusted && !this.unsafeMap) {
|
|
32114
|
-
if (!/\.map$/i.test(path)) return;
|
|
32115
|
-
if (cssFile)
|
|
32116
|
-
|
|
32117
|
-
|
|
32118
|
-
}
|
|
32366
|
+
if (!/\.map$/i.test(path)) return void 0;
|
|
32367
|
+
if (!cssFile) return void 0;
|
|
32368
|
+
let rel = relative(realPath(dirname(cssFile)), realPath(path));
|
|
32369
|
+
if (rel === ".." || rel.startsWith(".." + sep) || isAbsolute(rel)) return;
|
|
32119
32370
|
}
|
|
32120
32371
|
this.root = dirname(path);
|
|
32121
32372
|
if (existsSync(path)) {
|
|
@@ -32146,7 +32397,7 @@ var require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32146
32397
|
if (unknown) try {
|
|
32147
32398
|
/* c8 ignore next 4 */
|
|
32148
32399
|
this.json = JSON.parse(unknown.replace(/^\)]}'[^\n]*\n/, ""));
|
|
32149
|
-
} catch (
|
|
32400
|
+
} catch (_unused2) {
|
|
32150
32401
|
return;
|
|
32151
32402
|
}
|
|
32152
32403
|
return unknown;
|
|
@@ -32164,7 +32415,7 @@ var require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32164
32415
|
PreviousMap.default = PreviousMap;
|
|
32165
32416
|
}));
|
|
32166
32417
|
//#endregion
|
|
32167
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32418
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/input.js
|
|
32168
32419
|
var require_input = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32169
32420
|
init_objectSpread2();
|
|
32170
32421
|
let { nanoid } = require_non_secure();
|
|
@@ -32364,7 +32615,7 @@ var require_input = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32364
32615
|
if (terminalHighlight && terminalHighlight.registerInput) terminalHighlight.registerInput(Input);
|
|
32365
32616
|
}));
|
|
32366
32617
|
//#endregion
|
|
32367
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32618
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/root.js
|
|
32368
32619
|
var require_root$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32369
32620
|
let Container = require_container$1();
|
|
32370
32621
|
let LazyResult;
|
|
@@ -32409,7 +32660,7 @@ var require_root$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32409
32660
|
Container.registerRoot(Root);
|
|
32410
32661
|
}));
|
|
32411
32662
|
//#endregion
|
|
32412
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32663
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/list.js
|
|
32413
32664
|
var require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32414
32665
|
let list = {
|
|
32415
32666
|
comma(string) {
|
|
@@ -32423,6 +32674,7 @@ var require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32423
32674
|
]);
|
|
32424
32675
|
},
|
|
32425
32676
|
split(string, separators, last) {
|
|
32677
|
+
if (typeof string !== "string") return [];
|
|
32426
32678
|
let array = [];
|
|
32427
32679
|
let current = "";
|
|
32428
32680
|
let split = false;
|
|
@@ -32445,12 +32697,14 @@ var require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32445
32697
|
if (separators.includes(letter)) split = true;
|
|
32446
32698
|
}
|
|
32447
32699
|
if (split) {
|
|
32448
|
-
|
|
32700
|
+
let value = current.trim();
|
|
32701
|
+
if (last || value !== "") array.push(value);
|
|
32449
32702
|
current = "";
|
|
32450
32703
|
split = false;
|
|
32451
32704
|
} else current += letter;
|
|
32452
32705
|
}
|
|
32453
|
-
|
|
32706
|
+
let value = current.trim();
|
|
32707
|
+
if (last || value !== "") array.push(value);
|
|
32454
32708
|
return array;
|
|
32455
32709
|
}
|
|
32456
32710
|
};
|
|
@@ -32458,7 +32712,7 @@ var require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32458
32712
|
list.default = list;
|
|
32459
32713
|
}));
|
|
32460
32714
|
//#endregion
|
|
32461
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32715
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/rule.js
|
|
32462
32716
|
var require_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32463
32717
|
let Container = require_container$1();
|
|
32464
32718
|
let list = require_list();
|
|
@@ -32482,7 +32736,7 @@ var require_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32482
32736
|
Container.registerRule(Rule);
|
|
32483
32737
|
}));
|
|
32484
32738
|
//#endregion
|
|
32485
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32739
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/fromJSON.js
|
|
32486
32740
|
var require_fromJSON = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32487
32741
|
init_objectSpread2();
|
|
32488
32742
|
init_objectWithoutProperties();
|
|
@@ -32558,7 +32812,7 @@ var require_fromJSON = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32558
32812
|
fromJSON.default = fromJSON;
|
|
32559
32813
|
}));
|
|
32560
32814
|
//#endregion
|
|
32561
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
32815
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/map-generator.js
|
|
32562
32816
|
var require_map_generator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32563
32817
|
init__polyfill_node_buffer();
|
|
32564
32818
|
let { dirname, relative, resolve, sep } = (init__polyfill_node_path(), __toCommonJS(_polyfill_node_path_exports));
|
|
@@ -32612,9 +32866,10 @@ var require_map_generator = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
32612
32866
|
if (node.text.startsWith("# sourceMappingURL=")) this.root.removeChild(i);
|
|
32613
32867
|
}
|
|
32614
32868
|
} else if (this.css) {
|
|
32869
|
+
let annotation = "/*# sourceMappingURL=";
|
|
32615
32870
|
let startIndex;
|
|
32616
|
-
while ((startIndex = this.css.lastIndexOf(
|
|
32617
|
-
let endIndex = this.css.indexOf("*/", startIndex +
|
|
32871
|
+
while ((startIndex = this.css.lastIndexOf(annotation)) !== -1) {
|
|
32872
|
+
let endIndex = this.css.indexOf("*/", startIndex + 21);
|
|
32618
32873
|
if (endIndex === -1) break;
|
|
32619
32874
|
while (startIndex > 0 && this.css[startIndex - 1] === "\n") startIndex--;
|
|
32620
32875
|
this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2);
|
|
@@ -32829,7 +33084,7 @@ var require_map_generator = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
32829
33084
|
module.exports = MapGenerator;
|
|
32830
33085
|
}));
|
|
32831
33086
|
//#endregion
|
|
32832
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
33087
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/tokenize.js
|
|
32833
33088
|
var require_tokenize$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32834
33089
|
const SINGLE_QUOTE = "'".charCodeAt(0);
|
|
32835
33090
|
const DOUBLE_QUOTE = "\"".charCodeAt(0);
|
|
@@ -33066,7 +33321,7 @@ var require_tokenize$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33066
33321
|
};
|
|
33067
33322
|
}));
|
|
33068
33323
|
//#endregion
|
|
33069
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
33324
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/parser.js
|
|
33070
33325
|
var require_parser$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33071
33326
|
let AtRule = require_at_rule();
|
|
33072
33327
|
let Comment = require_comment$1();
|
|
@@ -33336,7 +33591,7 @@ var require_parser$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33336
33591
|
prev.raws.ownSemicolon = this.spaces;
|
|
33337
33592
|
this.spaces = "";
|
|
33338
33593
|
prev.source.end = this.getPosition(token[2]);
|
|
33339
|
-
prev.source.end.offset
|
|
33594
|
+
prev.source.end.offset++;
|
|
33340
33595
|
}
|
|
33341
33596
|
}
|
|
33342
33597
|
}
|
|
@@ -33528,7 +33783,7 @@ var require_parser$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33528
33783
|
module.exports = Parser;
|
|
33529
33784
|
}));
|
|
33530
33785
|
//#endregion
|
|
33531
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
33786
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/parse.js
|
|
33532
33787
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33533
33788
|
let Container = require_container$1();
|
|
33534
33789
|
let Input = require_input();
|
|
@@ -33553,13 +33808,16 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33553
33808
|
Container.registerParse(parse);
|
|
33554
33809
|
}));
|
|
33555
33810
|
//#endregion
|
|
33556
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
33811
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/warning.js
|
|
33557
33812
|
var require_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33813
|
+
let Container = require_container$1();
|
|
33814
|
+
let { my } = require_symbols();
|
|
33558
33815
|
var Warning = class {
|
|
33559
33816
|
constructor(text, opts = {}) {
|
|
33560
33817
|
this.type = "warning";
|
|
33561
33818
|
this.text = text;
|
|
33562
33819
|
if (opts.node && opts.node.source) {
|
|
33820
|
+
if (!opts.node[my]) Container.rebuild(opts.node);
|
|
33563
33821
|
let range = opts.node.rangeBy(opts);
|
|
33564
33822
|
this.line = range.start.line;
|
|
33565
33823
|
this.column = range.start.column;
|
|
@@ -33582,7 +33840,7 @@ var require_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33582
33840
|
Warning.default = Warning;
|
|
33583
33841
|
}));
|
|
33584
33842
|
//#endregion
|
|
33585
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
33843
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/result.js
|
|
33586
33844
|
var require_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33587
33845
|
let Warning = require_warning();
|
|
33588
33846
|
var Result = class {
|
|
@@ -33616,7 +33874,7 @@ var require_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33616
33874
|
Result.default = Result;
|
|
33617
33875
|
}));
|
|
33618
33876
|
//#endregion
|
|
33619
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
33877
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/warn-once.js
|
|
33620
33878
|
var require_warn_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33621
33879
|
let printed = {};
|
|
33622
33880
|
module.exports = function warnOnce(message) {
|
|
@@ -33626,7 +33884,7 @@ var require_warn_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33626
33884
|
};
|
|
33627
33885
|
}));
|
|
33628
33886
|
//#endregion
|
|
33629
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
33887
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/lazy-result.js
|
|
33630
33888
|
var require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33631
33889
|
init_objectSpread2();
|
|
33632
33890
|
init_asyncToGenerator();
|
|
@@ -33993,14 +34251,19 @@ var require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33993
34251
|
}
|
|
33994
34252
|
if (visit.iterator !== 0) {
|
|
33995
34253
|
let iterator = visit.iterator;
|
|
34254
|
+
if (visit.descending) {
|
|
34255
|
+
visit.descending = false;
|
|
34256
|
+
node.indexes[iterator] += 1;
|
|
34257
|
+
}
|
|
33996
34258
|
let child;
|
|
33997
34259
|
while (child = node.nodes[node.indexes[iterator]]) {
|
|
33998
|
-
node.indexes[iterator] += 1;
|
|
33999
34260
|
if (!child[isClean]) {
|
|
34000
34261
|
child[isClean] = true;
|
|
34262
|
+
visit.descending = true;
|
|
34001
34263
|
stack.push(toStack(child));
|
|
34002
34264
|
return;
|
|
34003
34265
|
}
|
|
34266
|
+
node.indexes[iterator] += 1;
|
|
34004
34267
|
}
|
|
34005
34268
|
visit.iterator = 0;
|
|
34006
34269
|
delete node.indexes[iterator];
|
|
@@ -34035,12 +34298,16 @@ var require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
34035
34298
|
let visitNode = visit.node;
|
|
34036
34299
|
if (visit.iterator !== 0) {
|
|
34037
34300
|
let iterator = visit.iterator;
|
|
34301
|
+
if (visit.descending) {
|
|
34302
|
+
visit.descending = false;
|
|
34303
|
+
visitNode.indexes[iterator] += 1;
|
|
34304
|
+
}
|
|
34038
34305
|
let child;
|
|
34039
34306
|
let descended = false;
|
|
34040
34307
|
while (child = visitNode.nodes[visitNode.indexes[iterator]]) {
|
|
34041
|
-
visitNode.indexes[iterator] += 1;
|
|
34042
34308
|
if (!child[isClean]) {
|
|
34043
34309
|
child[isClean] = true;
|
|
34310
|
+
visit.descending = true;
|
|
34044
34311
|
stack.push({
|
|
34045
34312
|
eventIndex: 0,
|
|
34046
34313
|
events: getEvents(child),
|
|
@@ -34050,6 +34317,7 @@ var require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
34050
34317
|
descended = true;
|
|
34051
34318
|
break;
|
|
34052
34319
|
}
|
|
34320
|
+
visitNode.indexes[iterator] += 1;
|
|
34053
34321
|
}
|
|
34054
34322
|
if (descended) continue;
|
|
34055
34323
|
visit.iterator = 0;
|
|
@@ -34084,7 +34352,7 @@ var require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
34084
34352
|
Document.registerLazyResult(LazyResult);
|
|
34085
34353
|
}));
|
|
34086
34354
|
//#endregion
|
|
34087
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
34355
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/no-work-result.js
|
|
34088
34356
|
var require_no_work_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
34089
34357
|
let MapGenerator = require_map_generator();
|
|
34090
34358
|
let parse = require_parse();
|
|
@@ -34181,7 +34449,7 @@ var require_no_work_result = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
34181
34449
|
NoWorkResult.default = NoWorkResult;
|
|
34182
34450
|
}));
|
|
34183
34451
|
//#endregion
|
|
34184
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
34452
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/processor.js
|
|
34185
34453
|
var require_processor$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
34186
34454
|
let Document = require_document();
|
|
34187
34455
|
let LazyResult = require_lazy_result();
|
|
@@ -34189,7 +34457,7 @@ var require_processor$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
34189
34457
|
let Root = require_root$1();
|
|
34190
34458
|
var Processor = class {
|
|
34191
34459
|
constructor(plugins = []) {
|
|
34192
|
-
this.version = "8.5.
|
|
34460
|
+
this.version = "8.5.28";
|
|
34193
34461
|
this.plugins = this.normalize(plugins);
|
|
34194
34462
|
}
|
|
34195
34463
|
normalize(plugins) {
|
|
@@ -34220,7 +34488,7 @@ var require_processor$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
34220
34488
|
Document.registerProcessor(Processor);
|
|
34221
34489
|
}));
|
|
34222
34490
|
//#endregion
|
|
34223
|
-
//#region node_modules/.pnpm/postcss@8.5.
|
|
34491
|
+
//#region node_modules/.pnpm/postcss@8.5.28/node_modules/postcss/lib/postcss.mjs
|
|
34224
34492
|
var import_postcss = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
34225
34493
|
init__polyfill_node_process();
|
|
34226
34494
|
let AtRule = require_at_rule();
|
|
@@ -34251,7 +34519,7 @@ var import_postcss = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((ex
|
|
|
34251
34519
|
if (console && console.warn && !warningPrinted) {
|
|
34252
34520
|
warningPrinted = true;
|
|
34253
34521
|
console.warn(name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration");
|
|
34254
|
-
if (browser$1.env.LANG && browser$1.env.LANG.startsWith("
|
|
34522
|
+
if (browser$1.env.LANG && browser$1.env.LANG.startsWith("zh"))
|
|
34255
34523
|
/* c8 ignore next 7 */
|
|
34256
34524
|
console.warn(name + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");
|
|
34257
34525
|
}
|
|
@@ -34339,7 +34607,7 @@ const trimPlugin = () => {
|
|
|
34339
34607
|
};
|
|
34340
34608
|
trimPlugin.postcss = true;
|
|
34341
34609
|
//#endregion
|
|
34342
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34610
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/util/unesc.js
|
|
34343
34611
|
var require_unesc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34344
34612
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34345
34613
|
exports.default = unesc;
|
|
@@ -34390,7 +34658,7 @@ var require_unesc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34390
34658
|
}
|
|
34391
34659
|
}));
|
|
34392
34660
|
//#endregion
|
|
34393
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34661
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/util/getProp.js
|
|
34394
34662
|
var require_getProp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34395
34663
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34396
34664
|
exports.default = getProp;
|
|
@@ -34406,7 +34674,7 @@ var require_getProp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34406
34674
|
}
|
|
34407
34675
|
}));
|
|
34408
34676
|
//#endregion
|
|
34409
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34677
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/util/ensureObject.js
|
|
34410
34678
|
var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34411
34679
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34412
34680
|
exports.default = ensureObject;
|
|
@@ -34421,7 +34689,7 @@ var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34421
34689
|
}
|
|
34422
34690
|
}));
|
|
34423
34691
|
//#endregion
|
|
34424
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34692
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/util/stripComments.js
|
|
34425
34693
|
var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34426
34694
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34427
34695
|
exports.default = stripComments;
|
|
@@ -34441,7 +34709,7 @@ var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34441
34709
|
}
|
|
34442
34710
|
}));
|
|
34443
34711
|
//#endregion
|
|
34444
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34712
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/util/maxNestingDepth.js
|
|
34445
34713
|
var require_maxNestingDepth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34446
34714
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34447
34715
|
exports.MAX_NESTING_DEPTH = void 0;
|
|
@@ -34468,7 +34736,7 @@ var require_maxNestingDepth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34468
34736
|
}
|
|
34469
34737
|
}));
|
|
34470
34738
|
//#endregion
|
|
34471
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34739
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/util/index.js
|
|
34472
34740
|
var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34473
34741
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
34474
34742
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -34518,7 +34786,7 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34518
34786
|
});
|
|
34519
34787
|
}));
|
|
34520
34788
|
//#endregion
|
|
34521
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34789
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/node.js
|
|
34522
34790
|
var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34523
34791
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34524
34792
|
var util_1 = require_util$1();
|
|
@@ -34672,7 +34940,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34672
34940
|
}();
|
|
34673
34941
|
}));
|
|
34674
34942
|
//#endregion
|
|
34675
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34943
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/types.js
|
|
34676
34944
|
var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34677
34945
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34678
34946
|
exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0;
|
|
@@ -34690,7 +34958,7 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34690
34958
|
exports.UNIVERSAL = "universal";
|
|
34691
34959
|
}));
|
|
34692
34960
|
//#endregion
|
|
34693
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
34961
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/container.js
|
|
34694
34962
|
var require_container = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
34695
34963
|
var __extends = exports && exports.__extends || (function() {
|
|
34696
34964
|
var extendStatics = function(d, b) {
|
|
@@ -35081,7 +35349,7 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35081
35349
|
}(node_1.default);
|
|
35082
35350
|
}));
|
|
35083
35351
|
//#endregion
|
|
35084
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35352
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/root.js
|
|
35085
35353
|
var require_root = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35086
35354
|
var __extends = exports && exports.__extends || (function() {
|
|
35087
35355
|
var extendStatics = function(d, b) {
|
|
@@ -35137,7 +35405,7 @@ var require_root = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35137
35405
|
}(container_1.default);
|
|
35138
35406
|
}));
|
|
35139
35407
|
//#endregion
|
|
35140
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35408
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/selector.js
|
|
35141
35409
|
var require_selector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35142
35410
|
var __extends = exports && exports.__extends || (function() {
|
|
35143
35411
|
var extendStatics = function(d, b) {
|
|
@@ -35236,7 +35504,7 @@ var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
35236
35504
|
module.exports = cssesc;
|
|
35237
35505
|
}));
|
|
35238
35506
|
//#endregion
|
|
35239
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35507
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/className.js
|
|
35240
35508
|
var require_className = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35241
35509
|
var __extends = exports && exports.__extends || (function() {
|
|
35242
35510
|
var extendStatics = function(d, b) {
|
|
@@ -35296,7 +35564,7 @@ var require_className = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35296
35564
|
}(node_1.default);
|
|
35297
35565
|
}));
|
|
35298
35566
|
//#endregion
|
|
35299
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35567
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/comment.js
|
|
35300
35568
|
var require_comment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35301
35569
|
var __extends = exports && exports.__extends || (function() {
|
|
35302
35570
|
var extendStatics = function(d, b) {
|
|
@@ -35333,7 +35601,7 @@ var require_comment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35333
35601
|
}(node_1.default);
|
|
35334
35602
|
}));
|
|
35335
35603
|
//#endregion
|
|
35336
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35604
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/id.js
|
|
35337
35605
|
var require_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35338
35606
|
var __extends = exports && exports.__extends || (function() {
|
|
35339
35607
|
var extendStatics = function(d, b) {
|
|
@@ -35373,7 +35641,7 @@ var require_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35373
35641
|
}(node_1.default);
|
|
35374
35642
|
}));
|
|
35375
35643
|
//#endregion
|
|
35376
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35644
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/namespace.js
|
|
35377
35645
|
var require_namespace = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35378
35646
|
var __extends = exports && exports.__extends || (function() {
|
|
35379
35647
|
var extendStatics = function(d, b) {
|
|
@@ -35456,7 +35724,7 @@ var require_namespace = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35456
35724
|
}(__importDefault(require_node()).default);
|
|
35457
35725
|
}));
|
|
35458
35726
|
//#endregion
|
|
35459
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35727
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/tag.js
|
|
35460
35728
|
var require_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35461
35729
|
var __extends = exports && exports.__extends || (function() {
|
|
35462
35730
|
var extendStatics = function(d, b) {
|
|
@@ -35493,7 +35761,7 @@ var require_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35493
35761
|
}(namespace_1.default);
|
|
35494
35762
|
}));
|
|
35495
35763
|
//#endregion
|
|
35496
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35764
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/string.js
|
|
35497
35765
|
var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35498
35766
|
var __extends = exports && exports.__extends || (function() {
|
|
35499
35767
|
var extendStatics = function(d, b) {
|
|
@@ -35531,7 +35799,7 @@ var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35531
35799
|
exports.default = String;
|
|
35532
35800
|
}));
|
|
35533
35801
|
//#endregion
|
|
35534
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35802
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
|
|
35535
35803
|
var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35536
35804
|
var __extends = exports && exports.__extends || (function() {
|
|
35537
35805
|
var extendStatics = function(d, b) {
|
|
@@ -35638,7 +35906,7 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
35638
35906
|
}
|
|
35639
35907
|
}));
|
|
35640
35908
|
//#endregion
|
|
35641
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
35909
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/attribute.js
|
|
35642
35910
|
var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35643
35911
|
var __extends = exports && exports.__extends || (function() {
|
|
35644
35912
|
var extendStatics = function(d, b) {
|
|
@@ -36024,7 +36292,7 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36024
36292
|
}
|
|
36025
36293
|
}));
|
|
36026
36294
|
//#endregion
|
|
36027
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
36295
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/universal.js
|
|
36028
36296
|
var require_universal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36029
36297
|
var __extends = exports && exports.__extends || (function() {
|
|
36030
36298
|
var extendStatics = function(d, b) {
|
|
@@ -36062,7 +36330,7 @@ var require_universal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36062
36330
|
}(namespace_1.default);
|
|
36063
36331
|
}));
|
|
36064
36332
|
//#endregion
|
|
36065
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
36333
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/combinator.js
|
|
36066
36334
|
var require_combinator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36067
36335
|
var __extends = exports && exports.__extends || (function() {
|
|
36068
36336
|
var extendStatics = function(d, b) {
|
|
@@ -36099,7 +36367,7 @@ var require_combinator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36099
36367
|
}(node_1.default);
|
|
36100
36368
|
}));
|
|
36101
36369
|
//#endregion
|
|
36102
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
36370
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/nesting.js
|
|
36103
36371
|
var require_nesting = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36104
36372
|
var __extends = exports && exports.__extends || (function() {
|
|
36105
36373
|
var extendStatics = function(d, b) {
|
|
@@ -36137,7 +36405,7 @@ var require_nesting = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36137
36405
|
}(node_1.default);
|
|
36138
36406
|
}));
|
|
36139
36407
|
//#endregion
|
|
36140
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
36408
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/sortAscending.js
|
|
36141
36409
|
var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36142
36410
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36143
36411
|
exports.default = sortAscending;
|
|
@@ -36148,7 +36416,7 @@ var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36148
36416
|
}
|
|
36149
36417
|
}));
|
|
36150
36418
|
//#endregion
|
|
36151
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
36419
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/tokenTypes.js
|
|
36152
36420
|
var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36153
36421
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36154
36422
|
exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0;
|
|
@@ -36185,7 +36453,7 @@ var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36185
36453
|
exports.combinator = -3;
|
|
36186
36454
|
}));
|
|
36187
36455
|
//#endregion
|
|
36188
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
36456
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/tokenize.js
|
|
36189
36457
|
var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36190
36458
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
36191
36459
|
if (k2 === void 0) k2 = k;
|
|
@@ -36427,7 +36695,7 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36427
36695
|
}
|
|
36428
36696
|
}));
|
|
36429
36697
|
//#endregion
|
|
36430
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
36698
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/parser.js
|
|
36431
36699
|
var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36432
36700
|
var __assign = exports && exports.__assign || function() {
|
|
36433
36701
|
__assign = Object.assign || function(t) {
|
|
@@ -36579,10 +36847,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36579
36847
|
return indexes;
|
|
36580
36848
|
}
|
|
36581
36849
|
function uniqs() {
|
|
36582
|
-
|
|
36583
|
-
return list.filter(function(item, i) {
|
|
36584
|
-
return i === list.indexOf(item);
|
|
36585
|
-
});
|
|
36850
|
+
return Array.from(new Set(Array.prototype.concat.apply([], arguments)));
|
|
36586
36851
|
}
|
|
36587
36852
|
exports.default = function() {
|
|
36588
36853
|
function Parser(rule, options) {
|
|
@@ -36630,6 +36895,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36630
36895
|
attr.push(this.currToken);
|
|
36631
36896
|
this.position++;
|
|
36632
36897
|
}
|
|
36898
|
+
if (!this.currToken) return this.expected("closing square bracket", startingToken[tokenize_1.FIELDS.START_POS]);
|
|
36633
36899
|
if (this.currToken[tokenize_1.FIELDS.TYPE] !== tokens.closeSquare) return this.expected("closing square bracket", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
36634
36900
|
var len = attr.length;
|
|
36635
36901
|
var node = {
|
|
@@ -36673,7 +36939,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36673
36939
|
}
|
|
36674
36940
|
if (commentBefore) {
|
|
36675
36941
|
(0, util_1.ensureObject)(node, "raws", "spaces", "attribute");
|
|
36676
|
-
node.raws.spaces.attribute.before =
|
|
36942
|
+
node.raws.spaces.attribute.before = commentBefore;
|
|
36677
36943
|
commentBefore = "";
|
|
36678
36944
|
}
|
|
36679
36945
|
node.namespace = (node.namespace || "") + content;
|
|
@@ -37010,7 +37276,9 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37010
37276
|
return this.error("Unexpected '|'.", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
37011
37277
|
};
|
|
37012
37278
|
Parser.prototype.namespace = function() {
|
|
37013
|
-
var
|
|
37279
|
+
var prev = this.prevToken;
|
|
37280
|
+
var before = prev && (prev[tokenize_1.FIELDS.TYPE] === tokens.word || prev[tokenize_1.FIELDS.TYPE] === tokens.asterisk || prev[tokenize_1.FIELDS.TYPE] === tokens.ampersand) ? this.content(prev) : true;
|
|
37281
|
+
if (!this.nextToken) return this.unexpectedPipe();
|
|
37014
37282
|
if (this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.word) {
|
|
37015
37283
|
this.position++;
|
|
37016
37284
|
return this.word(before);
|
|
@@ -37038,6 +37306,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37038
37306
|
Parser.prototype.parentheses = function() {
|
|
37039
37307
|
var last = this.current.last;
|
|
37040
37308
|
var unbalanced = 1;
|
|
37309
|
+
var openingToken = this.currToken;
|
|
37041
37310
|
this.position++;
|
|
37042
37311
|
if (last && last.type === types.PSEUDO) {
|
|
37043
37312
|
var selector = new selector_1.default({
|
|
@@ -37082,7 +37351,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37082
37351
|
sourceIndex: parenStart[tokenize_1.FIELDS.START_POS]
|
|
37083
37352
|
}));
|
|
37084
37353
|
}
|
|
37085
|
-
if (unbalanced) return this.expected("closing parenthesis", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
37354
|
+
if (unbalanced) return this.expected("closing parenthesis", (this.currToken || openingToken)[tokenize_1.FIELDS.START_POS]);
|
|
37086
37355
|
};
|
|
37087
37356
|
Parser.prototype.pseudo = function() {
|
|
37088
37357
|
var _this = this;
|
|
@@ -37170,9 +37439,14 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37170
37439
|
return word[i - 1] !== "\\";
|
|
37171
37440
|
});
|
|
37172
37441
|
var interpolations = indexesOf(word, "#{");
|
|
37173
|
-
if (interpolations.length)
|
|
37174
|
-
|
|
37175
|
-
|
|
37442
|
+
if (interpolations.length) {
|
|
37443
|
+
var interpolationIndexes_1 = new Set(interpolations);
|
|
37444
|
+
hasId = hasId.filter(function(hashIndex) {
|
|
37445
|
+
return !interpolationIndexes_1.has(hashIndex);
|
|
37446
|
+
});
|
|
37447
|
+
}
|
|
37448
|
+
var classIndexes = new Set(hasClass);
|
|
37449
|
+
var idIndexes = new Set(hasId);
|
|
37176
37450
|
var indices = (0, sortAscending_1.default)(uniqs(__spreadArray(__spreadArray([0], __read(hasClass), false), __read(hasId), false)));
|
|
37177
37451
|
indices.forEach(function(ind, i) {
|
|
37178
37452
|
var index = indices[i + 1] || word.length;
|
|
@@ -37182,14 +37456,14 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37182
37456
|
var current = _this.currToken;
|
|
37183
37457
|
var sourceIndex = current[tokenize_1.FIELDS.START_POS] + indices[i];
|
|
37184
37458
|
var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));
|
|
37185
|
-
if (
|
|
37459
|
+
if (classIndexes.has(ind)) {
|
|
37186
37460
|
var classNameOpts = {
|
|
37187
37461
|
value: value.slice(1),
|
|
37188
37462
|
source,
|
|
37189
37463
|
sourceIndex
|
|
37190
37464
|
};
|
|
37191
37465
|
node = new className_1.default(unescapeProp(classNameOpts, "value"));
|
|
37192
|
-
} else if (
|
|
37466
|
+
} else if (idIndexes.has(ind)) {
|
|
37193
37467
|
var idOpts = {
|
|
37194
37468
|
value: value.slice(1),
|
|
37195
37469
|
source,
|
|
@@ -37354,7 +37628,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37354
37628
|
}();
|
|
37355
37629
|
}));
|
|
37356
37630
|
//#endregion
|
|
37357
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
37631
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/processor.js
|
|
37358
37632
|
var require_processor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
37359
37633
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
37360
37634
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -37503,7 +37777,7 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37503
37777
|
}();
|
|
37504
37778
|
}));
|
|
37505
37779
|
//#endregion
|
|
37506
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
37780
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/constructors.js
|
|
37507
37781
|
var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
37508
37782
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
37509
37783
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -37572,7 +37846,7 @@ var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37572
37846
|
exports.universal = universal;
|
|
37573
37847
|
}));
|
|
37574
37848
|
//#endregion
|
|
37575
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
37849
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/guards.js
|
|
37576
37850
|
var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
37577
37851
|
var _a;
|
|
37578
37852
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -37616,7 +37890,7 @@ var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37616
37890
|
}
|
|
37617
37891
|
}));
|
|
37618
37892
|
//#endregion
|
|
37619
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
37893
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.6/node_modules/postcss-selector-parser/dist/selectors/index.js
|
|
37620
37894
|
var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
37621
37895
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
37622
37896
|
if (k2 === void 0) k2 = k;
|
|
@@ -41851,6 +42125,7 @@ function resolveExt(filename, fs) {
|
|
|
41851
42125
|
}
|
|
41852
42126
|
const tsConfigCache = createCache();
|
|
41853
42127
|
const tsConfigRefMap = /* @__PURE__ */ new Map();
|
|
42128
|
+
const extendedConfigCache = /* @__PURE__ */ new Map();
|
|
41854
42129
|
const fileToScopeCache = createCache();
|
|
41855
42130
|
const fileToGlobalScopeCache = createCache();
|
|
41856
42131
|
/**
|
|
@@ -41861,6 +42136,10 @@ function invalidateTypeCache(filename) {
|
|
|
41861
42136
|
fileToScopeCache.delete(filename);
|
|
41862
42137
|
fileToGlobalScopeCache.delete(filename);
|
|
41863
42138
|
tsConfigCache.delete(filename);
|
|
42139
|
+
if (filename.endsWith(".json")) {
|
|
42140
|
+
extendedConfigCache.clear();
|
|
42141
|
+
tsConfigCache.clear();
|
|
42142
|
+
}
|
|
41864
42143
|
const affectedConfig = tsConfigRefMap.get(filename);
|
|
41865
42144
|
if (affectedConfig) tsConfigCache.delete(affectedConfig);
|
|
41866
42145
|
}
|
|
@@ -43115,6 +43394,7 @@ function compileScript(sfc, options) {
|
|
|
43115
43394
|
enter(child, parent) {
|
|
43116
43395
|
if (isFunctionType(child)) this.skip();
|
|
43117
43396
|
if (child.type === "BlockStatement") scope.push(child.body);
|
|
43397
|
+
else if (child.type === "SwitchCase") scope.push(child.consequent);
|
|
43118
43398
|
if (child.type === "AwaitExpression") {
|
|
43119
43399
|
hasAwait = true;
|
|
43120
43400
|
const needsSemi = scope[scope.length - 1].some((n, i) => {
|
|
@@ -43123,8 +43403,8 @@ function compileScript(sfc, options) {
|
|
|
43123
43403
|
processAwait(ctx, child, needsSemi, parent.type === "ExpressionStatement");
|
|
43124
43404
|
}
|
|
43125
43405
|
},
|
|
43126
|
-
|
|
43127
|
-
if (node.type === "BlockStatement") scope.pop();
|
|
43406
|
+
leave(node) {
|
|
43407
|
+
if (node.type === "BlockStatement" || node.type === "SwitchCase") scope.pop();
|
|
43128
43408
|
}
|
|
43129
43409
|
});
|
|
43130
43410
|
}
|
|
@@ -43247,7 +43527,7 @@ function compileScript(sfc, options) {
|
|
|
43247
43527
|
}
|
|
43248
43528
|
if (preamble) ctx.s.prepend(preamble);
|
|
43249
43529
|
if (helpers && (helpers.has(UNREF) || helpers.has("unref"))) ctx.helperImports.delete("unref");
|
|
43250
|
-
returned = code;
|
|
43530
|
+
returned = vapor && !ssr && hasAwait ? `return () => {${code}}` : code;
|
|
43251
43531
|
} else returned = `() => {}`;
|
|
43252
43532
|
if (!inlineMode && true) ctx.s.appendRight(endOffset, `\nconst __returned__ = ${returned}\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n`);
|
|
43253
43533
|
else ctx.s.appendRight(endOffset, `\n${vapor && !ssr ? `` : `return `}${returned}\n}\n\n`);
|
|
@@ -43425,7 +43705,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
|
|
|
43425
43705
|
//#endregion
|
|
43426
43706
|
//#region packages/compiler-sfc/src/index.ts
|
|
43427
43707
|
init_objectSpread2();
|
|
43428
|
-
const version = "3.6.0-rc.
|
|
43708
|
+
const version = "3.6.0-rc.9";
|
|
43429
43709
|
const parseCache = parseCache$1;
|
|
43430
43710
|
const errorMessages = _objectSpread2(_objectSpread2({}, errorMessages$1), DOMErrorMessages);
|
|
43431
43711
|
const walk = walk$2;
|