oxfmt 0.56.0 → 0.58.0
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/{acorn-LGWopQvF.js → acorn-CZllRq2x.js} +1893 -1803
- package/dist/{angular-BbAuvH72.js → angular-CsoDKqo4.js} +1587 -995
- package/dist/{apis-C2fbFQF2.js → apis-DLO0lBDu.js} +4 -4
- package/dist/babel-DZD6u90w.js +9896 -0
- package/dist/{bindings-Ab6hoO7p.js → bindings-DTiEua0g.js} +26 -26
- package/dist/{chunk-DSjvVL_1-DaTvESxp.js → chunk-DSjvVL_1-DX2STy_I.js} +1 -1
- package/dist/cli-worker.d.ts +5 -5
- package/dist/cli-worker.js +1 -1
- package/dist/cli.js +3 -2
- package/dist/{dist-BMp5jzRv.js → dist-YOS4M6hk.js} +17 -17
- package/dist/estree-ChnhgzGg.js +7885 -0
- package/dist/flow-C6LkWPPl.js +9149 -0
- package/dist/{glimmer-Ba_8Z2bG.js → glimmer-YnkKK2a7.js} +204 -187
- package/dist/{graphql-CZ7EPWgo.js → graphql-BNiwkZTo.js} +905 -820
- package/dist/{html-DblM11Xw.js → html-DMHXIbrM.js} +1416 -1305
- package/dist/index.js +3 -3
- package/dist/{jiti-Bb1dT6Cw-DWQc1k7j.js → jiti-Bb1dT6Cw-B61jQmj-.js} +2 -2
- package/dist/markdown-BjyDFyaO.js +14010 -0
- package/dist/{meriyah-DafjRZfO.js → meriyah-zDNCk2o1.js} +1501 -1429
- package/dist/{migrate-prettier-DrYAkU3F.js → migrate-prettier-BmSsy164.js} +49 -42
- package/dist/{plugin-CYEM2898.js → plugin-B4cguZ1l.js} +16 -12
- package/dist/{postcss-CkhtwsAS.js → postcss-CwPwODg8.js} +2153 -2002
- package/dist/{prettier-DKAx5A83.js → prettier-BByt4AhK.js} +5674 -5038
- package/dist/{sorter-BZkvDMjt-c-GMCzH3.js → sorter-BZkvDMjt-B8ihSEiX.js} +7 -7
- package/dist/{sorter-DK1aMCjs.js → sorter-BcGkkjyR.js} +1 -1
- package/dist/{typescript-DaxiA0nr.js → typescript-Bq_S3kyC.js} +10499 -10252
- package/dist/{v3-D-mr2VVh-7G9Y2N0Q.js → v3-D-mr2VVh-p01OHBjH.js} +4 -4
- package/dist/{v4-C-HWEQJm-DKnDZXAs.js → v4-C-HWEQJm-BbuYNtSW.js} +4 -4
- package/dist/yaml-DlyuuZmC.js +6121 -0
- package/package.json +20 -20
- package/dist/babel-DLjwvkt5.js +0 -9884
- package/dist/estree-DbmUPhmV.js +0 -7269
- package/dist/flow-CJbpv7JL.js +0 -52916
- package/dist/markdown-B5hFVJKQ.js +0 -6880
- package/dist/yaml-BC7gw7un.js +0 -5280
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import { n as __esmMin } from "./rolldown-runtime-CE-6LUnI.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/prettier@3.
|
|
3
|
-
function
|
|
2
|
+
//#region ../../node_modules/.pnpm/prettier@3.9.4/node_modules/prettier/plugins/html.mjs
|
|
3
|
+
function is(e) {
|
|
4
4
|
return this[e < 0 ? this.length + e : e];
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
|
|
6
|
+
function mt(e, t, r) {
|
|
7
|
+
if (!e.has(t)) {
|
|
8
|
+
let n = r(t);
|
|
9
|
+
e.set(t, n);
|
|
10
|
+
}
|
|
11
|
+
return e.get(t);
|
|
12
|
+
}
|
|
13
|
+
function os(e) {
|
|
14
|
+
if (typeof e == "string") return Fe;
|
|
15
|
+
if (Array.isArray(e)) return Ve;
|
|
9
16
|
if (!e) return;
|
|
10
17
|
let { type: t } = e;
|
|
11
|
-
if (
|
|
18
|
+
if (ht.has(t)) return t;
|
|
12
19
|
}
|
|
13
|
-
function
|
|
20
|
+
function cs(e) {
|
|
14
21
|
let t = e === null ? "null" : typeof e;
|
|
15
22
|
if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
|
|
16
23
|
Expected it to be 'string' or 'object'.`;
|
|
17
24
|
if (ft(e)) throw new Error("doc is valid.");
|
|
18
25
|
let r = Object.prototype.toString.call(e);
|
|
19
26
|
if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
|
|
20
|
-
let n =
|
|
27
|
+
let n = ls([...ht].map((i) => `'${i}'`));
|
|
21
28
|
return `Unexpected doc.type '${e.type}'.
|
|
22
29
|
Expected it to be ${n}.`;
|
|
23
30
|
}
|
|
@@ -26,23 +33,21 @@ function Gt(e, t) {
|
|
|
26
33
|
let r = /* @__PURE__ */ new Map();
|
|
27
34
|
return n(e);
|
|
28
35
|
function n(s) {
|
|
29
|
-
|
|
30
|
-
let a = i(s);
|
|
31
|
-
return r.set(s, a), a;
|
|
36
|
+
return mt(r, s, i);
|
|
32
37
|
}
|
|
33
38
|
function i(s) {
|
|
34
39
|
switch (ft(s)) {
|
|
35
|
-
case
|
|
36
|
-
case
|
|
40
|
+
case Ve: return t(s.map(n));
|
|
41
|
+
case ye: return t({
|
|
37
42
|
...s,
|
|
38
43
|
parts: s.parts.map(n)
|
|
39
44
|
});
|
|
40
|
-
case
|
|
45
|
+
case Ee: return t({
|
|
41
46
|
...s,
|
|
42
47
|
breakContents: n(s.breakContents),
|
|
43
48
|
flatContents: n(s.flatContents)
|
|
44
49
|
});
|
|
45
|
-
case
|
|
50
|
+
case Te: {
|
|
46
51
|
let { expandedStates: a, contents: o } = s;
|
|
47
52
|
return a ? (a = a.map(n), o = a[0]) : o = n(o), t({
|
|
48
53
|
...s,
|
|
@@ -50,62 +55,62 @@ function Gt(e, t) {
|
|
|
50
55
|
expandedStates: a
|
|
51
56
|
});
|
|
52
57
|
}
|
|
58
|
+
case we:
|
|
53
59
|
case be:
|
|
54
|
-
case
|
|
55
|
-
case
|
|
56
|
-
case
|
|
57
|
-
case ut: return t({
|
|
60
|
+
case xe:
|
|
61
|
+
case pt:
|
|
62
|
+
case ct: return t({
|
|
58
63
|
...s,
|
|
59
64
|
contents: n(s.contents)
|
|
60
65
|
});
|
|
61
|
-
case
|
|
66
|
+
case Fe:
|
|
67
|
+
case ot:
|
|
62
68
|
case lt:
|
|
63
|
-
case
|
|
64
|
-
case
|
|
65
|
-
case
|
|
66
|
-
|
|
67
|
-
default: throw new Ir(s);
|
|
69
|
+
case ut:
|
|
70
|
+
case z:
|
|
71
|
+
case Le: return t(s);
|
|
72
|
+
default: throw new Or(s);
|
|
68
73
|
}
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
|
-
function L(e, t =
|
|
72
|
-
return Gt(e, (r) => typeof r == "string" ?
|
|
76
|
+
function L(e, t = Mr) {
|
|
77
|
+
return Gt(e, (r) => typeof r == "string" ? R(t, r.split(`
|
|
73
78
|
`)) : r);
|
|
74
79
|
}
|
|
75
80
|
function A(e) {
|
|
76
81
|
return D(e), {
|
|
77
|
-
type:
|
|
82
|
+
type: be,
|
|
78
83
|
contents: e
|
|
79
84
|
};
|
|
80
85
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
83
|
-
type:
|
|
86
|
+
function us(e, t) {
|
|
87
|
+
return qr(e), D(t), {
|
|
88
|
+
type: we,
|
|
84
89
|
contents: t,
|
|
85
90
|
n: e
|
|
86
91
|
};
|
|
87
92
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
93
|
+
function Hr(e) {
|
|
94
|
+
return us(Number.NEGATIVE_INFINITY, e);
|
|
90
95
|
}
|
|
91
96
|
function gt(e) {
|
|
92
|
-
return
|
|
93
|
-
type:
|
|
97
|
+
return Br(e), {
|
|
98
|
+
type: ye,
|
|
94
99
|
parts: e
|
|
95
100
|
};
|
|
96
101
|
}
|
|
97
|
-
function
|
|
102
|
+
function C(e, t = {}) {
|
|
98
103
|
return D(e), dt(t.expandedStates, !0), {
|
|
99
|
-
type:
|
|
104
|
+
type: Te,
|
|
100
105
|
id: t.id,
|
|
101
106
|
contents: e,
|
|
102
107
|
break: !!t.shouldBreak,
|
|
103
108
|
expandedStates: t.expandedStates
|
|
104
109
|
};
|
|
105
110
|
}
|
|
106
|
-
function
|
|
111
|
+
function $(e, t = "", r = {}) {
|
|
107
112
|
return D(e), t !== "" && D(t), {
|
|
108
|
-
type:
|
|
113
|
+
type: Ee,
|
|
109
114
|
breakContents: e,
|
|
110
115
|
flatContents: t,
|
|
111
116
|
groupId: r.groupId
|
|
@@ -113,47 +118,38 @@ function j(e, t = "", r = {}) {
|
|
|
113
118
|
}
|
|
114
119
|
function Fr(e, t) {
|
|
115
120
|
return D(e), {
|
|
116
|
-
type:
|
|
121
|
+
type: xe,
|
|
117
122
|
contents: e,
|
|
118
123
|
groupId: t.groupId,
|
|
119
124
|
negate: t.negate
|
|
120
125
|
};
|
|
121
126
|
}
|
|
122
|
-
function
|
|
127
|
+
function R(e, t) {
|
|
123
128
|
D(e), dt(t);
|
|
124
129
|
let r = [];
|
|
125
130
|
for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
|
|
126
131
|
return r;
|
|
127
132
|
}
|
|
128
|
-
function
|
|
129
|
-
let { preferred: r, alternate: n } = t === !0 || t === "'" ?
|
|
133
|
+
function Wr(e, t) {
|
|
134
|
+
let { preferred: r, alternate: n } = t === !0 || t === "'" ? ms : fs, { length: i } = e, s = 0, a = 0;
|
|
130
135
|
for (let o = 0; o < i; o++) {
|
|
131
|
-
let
|
|
132
|
-
|
|
136
|
+
let l = e.charCodeAt(o);
|
|
137
|
+
l === r.codePoint ? s++ : l === n.codePoint && a++;
|
|
133
138
|
}
|
|
134
139
|
return (s > a ? n : r).character;
|
|
135
140
|
}
|
|
136
|
-
function
|
|
141
|
+
function $t(e) {
|
|
137
142
|
if (typeof e != "string") throw new TypeError("Expected a string");
|
|
138
143
|
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
139
144
|
}
|
|
140
|
-
function
|
|
141
|
-
|
|
142
|
-
if (e.kind === "yaml" && delete t.value, e.kind === "attribute") {
|
|
143
|
-
let { fullName: n, value: i } = e;
|
|
144
|
-
n === "style" || n === "class" || n === "srcset" && (r.fullName === "img" || r.fullName === "source") || n === "allow" && r.fullName === "iframe" || n.startsWith("on") || n.startsWith("@") || n.startsWith(":") || n.startsWith(".") || n.startsWith("#") || n.startsWith("v-") || n === "vars" && r.fullName === "style" || (n === "setup" || n === "generic") && r.fullName === "script" || n === "slot-scope" || n.startsWith("(") || n.startsWith("[") || n.startsWith("*") || n.startsWith("bind") || n.startsWith("i18n") || n.startsWith("on-") || n.startsWith("ng-") || i?.includes("{{") ? delete t.value : i && (t.value = w(0, i, /'|"|'/gu, "\""));
|
|
145
|
-
}
|
|
146
|
-
if (e.kind === "docType" && (t.value = w(0, e.value.toLowerCase(), /\s+/gu, " ")), e.kind === "angularControlFlowBlock" && e.parameters?.children) for (let n of t.parameters.children) Ss.has(e.name) ? delete n.expression : n.expression = n.expression.trim();
|
|
147
|
-
e.kind === "angularIcuExpression" && (t.switchValue = e.switchValue.trim()), e.kind === "angularLetDeclarationInitializer" && delete t.value, e.kind === "element" && e.isVoid && !e.isSelfClosing && (t.isSelfClosing = !0);
|
|
148
|
-
}
|
|
149
|
-
function X(e, t = !0) {
|
|
150
|
-
return [A([k, e]), t ? k : ""];
|
|
145
|
+
function j(e, t = !0) {
|
|
146
|
+
return [A([y, e]), t ? y : ""];
|
|
151
147
|
}
|
|
152
|
-
function
|
|
148
|
+
function q(e, t) {
|
|
153
149
|
let r = e.type === "NGRoot" ? e.node.type === "NGMicrosyntax" && e.node.body.length === 1 && e.node.body[0].type === "NGMicrosyntaxExpression" ? e.node.body[0].expression : e.node : e.type === "JsExpressionRoot" ? e.node : e;
|
|
154
150
|
return r && (r.type === "ObjectExpression" || r.type === "ArrayExpression" || (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression" || t.parser === "__ng_binding" || t.parser === "__ng_directive") && (r.type === "TemplateLiteral" || r.type === "StringLiteral"));
|
|
155
151
|
}
|
|
156
|
-
async function
|
|
152
|
+
async function E(e, t, r, n) {
|
|
157
153
|
r = {
|
|
158
154
|
__isInHtmlAttribute: !0,
|
|
159
155
|
__embeddedInHtml: !0,
|
|
@@ -164,163 +160,168 @@ async function x(e, t, r, n) {
|
|
|
164
160
|
i = n(a, o);
|
|
165
161
|
});
|
|
166
162
|
let s = await t(e, r, t);
|
|
167
|
-
return i ?
|
|
163
|
+
return i ? C(s) : j(s);
|
|
168
164
|
}
|
|
169
|
-
function
|
|
165
|
+
function _s(e, t, r, n) {
|
|
170
166
|
let { node: i } = r, s = n.originalText.slice(i.sourceSpan.start.offset, i.sourceSpan.end.offset);
|
|
171
|
-
return /^\s
|
|
167
|
+
return /^\s*$/.test(s) ? "" : E(s, e, {
|
|
172
168
|
parser: "__ng_directive",
|
|
173
169
|
__isInHtmlAttribute: !1
|
|
174
|
-
},
|
|
170
|
+
}, q);
|
|
175
171
|
}
|
|
176
|
-
function
|
|
177
|
-
let e = globalThis, t = e.
|
|
178
|
-
|
|
172
|
+
function ks() {
|
|
173
|
+
let e = globalThis, t = e.process?.platform;
|
|
174
|
+
if (typeof t == "string") return t.startsWith("win");
|
|
175
|
+
let r = e.Deno?.build?.os;
|
|
176
|
+
return typeof r == "string" ? r === "windows" : e.navigator?.platform?.startsWith("Win") ?? !1;
|
|
179
177
|
}
|
|
180
|
-
function
|
|
178
|
+
function Yr(e) {
|
|
181
179
|
if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
|
|
182
180
|
return e;
|
|
183
181
|
}
|
|
184
182
|
function ws(e) {
|
|
185
|
-
return e =
|
|
183
|
+
return e = Yr(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
|
|
186
184
|
}
|
|
187
|
-
function
|
|
188
|
-
e =
|
|
185
|
+
function Ts(e) {
|
|
186
|
+
e = Yr(e);
|
|
189
187
|
let t = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
|
|
190
188
|
return e.hostname !== "" && (t = `\\\\${e.hostname}${t}`), t;
|
|
191
189
|
}
|
|
192
|
-
function
|
|
193
|
-
return bs ?
|
|
190
|
+
function Kt(e) {
|
|
191
|
+
return bs ? Ts(e) : ws(e);
|
|
194
192
|
}
|
|
195
|
-
function
|
|
193
|
+
function ys(e) {
|
|
196
194
|
return Array.isArray(e) && e.length > 0;
|
|
197
195
|
}
|
|
198
|
-
function
|
|
196
|
+
function Xr(e, t) {
|
|
199
197
|
if (!t) return;
|
|
200
198
|
let r = Kr(t).toLowerCase();
|
|
201
199
|
return e.find(({ filenames: n }) => n?.some((i) => i.toLowerCase() === r)) ?? e.find(({ extensions: n }) => n?.some((i) => r.endsWith(i)));
|
|
202
200
|
}
|
|
203
|
-
function
|
|
201
|
+
function Es(e, t) {
|
|
204
202
|
if (t) return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r?.includes(t)) ?? e.find(({ extensions: r }) => r?.includes(`.${t}`));
|
|
205
203
|
}
|
|
206
|
-
function
|
|
204
|
+
function Jr(e, t) {
|
|
207
205
|
if (t) {
|
|
208
206
|
if (Qr(t)) try {
|
|
209
|
-
t =
|
|
207
|
+
t = Kt(t);
|
|
210
208
|
} catch {
|
|
211
209
|
return;
|
|
212
210
|
}
|
|
213
211
|
if (typeof t == "string") return e.find(({ isSupported: r }) => r?.({ filepath: t }));
|
|
214
212
|
}
|
|
215
213
|
}
|
|
216
|
-
function
|
|
214
|
+
function Ls(e, t) {
|
|
217
215
|
let r = jr(0, e.plugins).flatMap((i) => i.languages ?? []);
|
|
218
|
-
return (
|
|
216
|
+
return (Es(r, t.language) ?? Xr(r, t.physicalFile) ?? Xr(r, t.file) ?? Jr(r, t.physicalFile) ?? Jr(r, t.file) ?? xs?.(r, t.physicalFile))?.parsers[0];
|
|
219
217
|
}
|
|
220
|
-
function
|
|
218
|
+
function As(e) {
|
|
221
219
|
return !!e?.[St];
|
|
222
220
|
}
|
|
223
221
|
function Ps(e) {
|
|
224
|
-
|
|
222
|
+
return T(0, e, /[^\n]/g, " ");
|
|
223
|
+
}
|
|
224
|
+
function Ns(e) {
|
|
225
|
+
let t = e.slice(0, Ue);
|
|
225
226
|
if (t !== "---" && t !== "+++") return;
|
|
226
227
|
let r = e.indexOf(`
|
|
227
|
-
`,
|
|
228
|
+
`, Ue);
|
|
228
229
|
if (r === -1) return;
|
|
229
|
-
let n = e.slice(
|
|
230
|
+
let n = e.slice(Ue, r).trim(), i = e.indexOf(`
|
|
230
231
|
${t}`, r), s = n;
|
|
231
232
|
if (s || (s = t === "+++" ? "toml" : "yaml"), i === -1 && t === "---" && s === "yaml" && (i = e.indexOf(`
|
|
232
233
|
...`, r)), i === -1) return;
|
|
233
|
-
let a = i + 1 +
|
|
234
|
-
if (!/\s
|
|
235
|
-
let
|
|
234
|
+
let a = i + 1 + Ue, o = e.charAt(a + 1);
|
|
235
|
+
if (!/\s?/.test(o)) return;
|
|
236
|
+
let l = e.slice(0, a), c;
|
|
236
237
|
return {
|
|
237
238
|
language: s,
|
|
238
239
|
explicitLanguage: n || null,
|
|
239
240
|
value: e.slice(r + 1, i),
|
|
240
241
|
startDelimiter: t,
|
|
241
|
-
endDelimiter:
|
|
242
|
-
raw:
|
|
242
|
+
endDelimiter: l.slice(-Ue),
|
|
243
|
+
raw: l,
|
|
243
244
|
start: {
|
|
244
245
|
line: 1,
|
|
245
246
|
column: 0,
|
|
246
247
|
index: 0
|
|
247
248
|
},
|
|
248
249
|
end: {
|
|
249
|
-
index:
|
|
250
|
+
index: l.length,
|
|
250
251
|
get line() {
|
|
251
|
-
return
|
|
252
|
-
`)),
|
|
252
|
+
return c ?? (c = l.split(`
|
|
253
|
+
`)), c.length;
|
|
253
254
|
},
|
|
254
255
|
get column() {
|
|
255
|
-
return
|
|
256
|
-
`)),
|
|
256
|
+
return c ?? (c = l.split(`
|
|
257
|
+
`)), I(0, c, -1).length;
|
|
257
258
|
}
|
|
258
259
|
},
|
|
259
260
|
[St]: !0
|
|
260
261
|
};
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
-
let t =
|
|
263
|
+
function Ds(e) {
|
|
264
|
+
let t = Ns(e);
|
|
264
265
|
return t ? {
|
|
265
266
|
frontMatter: t,
|
|
266
267
|
get content() {
|
|
267
268
|
let { raw: r } = t;
|
|
268
|
-
return
|
|
269
|
+
return vt(r) + e.slice(r.length);
|
|
269
270
|
}
|
|
270
271
|
} : { content: e };
|
|
271
272
|
}
|
|
272
|
-
function
|
|
273
|
+
function Is(e) {
|
|
273
274
|
return e.kind === "element" && !e.hasExplicitNamespace && !["html", "svg"].includes(e.namespace);
|
|
274
275
|
}
|
|
275
|
-
function
|
|
276
|
-
return !!(e.kind === "ieConditionalComment" && e.lastChild && !e.lastChild.isSelfClosing && !e.lastChild.endSourceSpan || e.kind === "ieConditionalComment" && !e.complete ||
|
|
276
|
+
function Ct(e, t) {
|
|
277
|
+
return !!(e.kind === "ieConditionalComment" && e.lastChild && !e.lastChild.isSelfClosing && !e.lastChild.endSourceSpan || e.kind === "ieConditionalComment" && !e.complete || Y(e) && e.children.some((r) => r.kind !== "text" && r.kind !== "interpolation") || wt(e, t) && !O(e, t) && e.kind !== "interpolation");
|
|
277
278
|
}
|
|
278
|
-
function
|
|
279
|
-
return e.kind === "attribute" || !e.parent || !e.prev ? !1 :
|
|
279
|
+
function le(e) {
|
|
280
|
+
return e.kind === "attribute" || !e.parent || !e.prev ? !1 : Os(e.prev);
|
|
280
281
|
}
|
|
281
|
-
function
|
|
282
|
+
function Os(e) {
|
|
282
283
|
return e.kind === "comment" && e.value.trim() === "prettier-ignore";
|
|
283
284
|
}
|
|
284
|
-
function
|
|
285
|
+
function N(e) {
|
|
285
286
|
return e.kind === "text" || e.kind === "comment";
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
-
return e.kind === "element" && (e.fullName === "script" || e.fullName === "style" || e.fullName === "svg:style" || e.fullName === "svg:script" || e.fullName === "mj-style" && t.parser === "mjml" ||
|
|
288
|
+
function O(e, t) {
|
|
289
|
+
return e.kind === "element" && (e.fullName === "script" || e.fullName === "style" || e.fullName === "svg:style" || e.fullName === "svg:script" || e.fullName === "mj-style" && t.parser === "mjml" || oe(e) && (e.name === "script" || e.name === "style"));
|
|
289
290
|
}
|
|
290
|
-
function
|
|
291
|
-
return e.children && !
|
|
291
|
+
function rn(e, t) {
|
|
292
|
+
return e.children && !O(e, t);
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
-
return
|
|
294
|
+
function nn(e, t) {
|
|
295
|
+
return O(e, t) || e.kind === "interpolation" || er(e);
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
-
return
|
|
297
|
+
function er(e) {
|
|
298
|
+
return dn(e).startsWith("pre");
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
+
function sn(e, t) {
|
|
300
301
|
let r = n();
|
|
301
302
|
if (r && !e.prev && e.parent?.tagDefinition?.ignoreFirstLf) return e.kind === "interpolation";
|
|
302
303
|
return r;
|
|
303
304
|
function n() {
|
|
304
|
-
return
|
|
305
|
+
return ae(e) || e.kind === "angularControlFlowBlock" ? !1 : (e.kind === "text" || e.kind === "interpolation") && e.prev && (e.prev.kind === "text" || e.prev.kind === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : Y(e.parent) ? !0 : !(!e.prev && (e.parent.kind === "root" || Y(e) && e.parent || O(e.parent, t) || Ge(e.parent, t) || !Vs(e.parent.cssDisplay)) || e.prev && !zs(e.prev.cssDisplay));
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
|
-
function
|
|
308
|
-
return
|
|
308
|
+
function an(e, t) {
|
|
309
|
+
return ae(e) || e.kind === "angularControlFlowBlock" ? !1 : (e.kind === "text" || e.kind === "interpolation") && e.next && (e.next.kind === "text" || e.next.kind === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : Y(e.parent) ? !0 : !(!e.next && (e.parent.kind === "root" || Y(e) && e.parent || O(e.parent, t) || Ge(e.parent, t) || !Us(e.parent.cssDisplay)) || e.next && !Ws(e.next.cssDisplay));
|
|
309
310
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
311
|
+
function on(e, t) {
|
|
312
|
+
return Gs(e.cssDisplay) && !O(e, t);
|
|
312
313
|
}
|
|
313
|
-
function
|
|
314
|
-
return
|
|
314
|
+
function We(e) {
|
|
315
|
+
return ae(e) || e.next && e.sourceSpan.end && e.sourceSpan.end.line + 1 < e.next.sourceSpan.start.line;
|
|
315
316
|
}
|
|
316
|
-
function
|
|
317
|
-
return
|
|
317
|
+
function ln(e) {
|
|
318
|
+
return tr(e) || e.kind === "element" && e.children.length > 0 && ([
|
|
318
319
|
"body",
|
|
319
320
|
"script",
|
|
320
321
|
"style"
|
|
321
|
-
].includes(e.name) || e.children.some((t) => Bs(t))) || e.firstChild && e.firstChild === e.lastChild && e.firstChild.kind !== "text" &&
|
|
322
|
+
].includes(e.name) || e.children.some((t) => Bs(t))) || e.firstChild && e.firstChild === e.lastChild && e.firstChild.kind !== "text" && un(e.firstChild) && (!e.lastChild.isTrailingSpaceSensitive || pn(e.lastChild));
|
|
322
323
|
}
|
|
323
|
-
function
|
|
324
|
+
function tr(e) {
|
|
324
325
|
return e.kind === "element" && e.children.length > 0 && ([
|
|
325
326
|
"html",
|
|
326
327
|
"head",
|
|
@@ -329,22 +330,22 @@ function er(e) {
|
|
|
329
330
|
"select"
|
|
330
331
|
].includes(e.name) || e.cssDisplay.startsWith("table") && e.cssDisplay !== "table-cell");
|
|
331
332
|
}
|
|
332
|
-
function
|
|
333
|
-
return
|
|
333
|
+
function kt(e) {
|
|
334
|
+
return hn(e) || e.prev && Ms(e.prev) || cn(e);
|
|
334
335
|
}
|
|
335
336
|
function Ms(e) {
|
|
336
|
-
return
|
|
337
|
+
return hn(e) || e.kind === "element" && e.fullName === "br" || cn(e);
|
|
337
338
|
}
|
|
338
|
-
function
|
|
339
|
-
return
|
|
339
|
+
function cn(e) {
|
|
340
|
+
return un(e) && pn(e);
|
|
340
341
|
}
|
|
341
|
-
function
|
|
342
|
+
function un(e) {
|
|
342
343
|
return e.hasLeadingSpaces && (e.prev ? e.prev.sourceSpan.end.line < e.sourceSpan.start.line : e.parent.kind === "root" || e.parent.startSourceSpan.end.line < e.sourceSpan.start.line);
|
|
343
344
|
}
|
|
344
|
-
function
|
|
345
|
+
function pn(e) {
|
|
345
346
|
return e.hasTrailingSpaces && (e.next ? e.next.sourceSpan.start.line > e.sourceSpan.end.line : e.parent.kind === "root" || e.parent.endSourceSpan && e.parent.endSourceSpan.start.line > e.sourceSpan.end.line);
|
|
346
347
|
}
|
|
347
|
-
function
|
|
348
|
+
function hn(e) {
|
|
348
349
|
switch (e.kind) {
|
|
349
350
|
case "ieConditionalComment":
|
|
350
351
|
case "comment":
|
|
@@ -353,13 +354,13 @@ function mn(e) {
|
|
|
353
354
|
}
|
|
354
355
|
return !1;
|
|
355
356
|
}
|
|
356
|
-
function
|
|
357
|
-
return e.lastChild ?
|
|
357
|
+
function bt(e) {
|
|
358
|
+
return e.lastChild ? bt(e.lastChild) : e;
|
|
358
359
|
}
|
|
359
360
|
function Bs(e) {
|
|
360
361
|
return e.children?.some((t) => t.kind !== "text");
|
|
361
362
|
}
|
|
362
|
-
function
|
|
363
|
+
function mn(e) {
|
|
363
364
|
if (e) switch (e) {
|
|
364
365
|
case "module":
|
|
365
366
|
case "text/javascript":
|
|
@@ -375,26 +376,26 @@ function fn(e) {
|
|
|
375
376
|
}
|
|
376
377
|
function qs(e, t) {
|
|
377
378
|
let { name: r, attrMap: n } = e;
|
|
378
|
-
if (r !== "script" ||
|
|
379
|
+
if (r !== "script" || se(n, "src")) return;
|
|
379
380
|
let { type: i, lang: s } = e.attrMap;
|
|
380
|
-
return !s && !i ? "babel" : _t(t, { language: s }) ??
|
|
381
|
+
return !s && !i ? "babel" : _t(t, { language: s }) ?? mn(i);
|
|
381
382
|
}
|
|
382
|
-
function
|
|
383
|
-
if (!
|
|
383
|
+
function Hs(e, t) {
|
|
384
|
+
if (!wt(e, t)) return;
|
|
384
385
|
let { attrMap: r } = e;
|
|
385
|
-
if (
|
|
386
|
+
if (se(r, "src")) return;
|
|
386
387
|
let { type: n, lang: i } = r;
|
|
387
|
-
return _t(t, { language: i }) ??
|
|
388
|
+
return _t(t, { language: i }) ?? mn(n);
|
|
388
389
|
}
|
|
389
|
-
function
|
|
390
|
+
function Fs(e, t) {
|
|
390
391
|
if (e.name === "style") {
|
|
391
392
|
let { lang: r } = e.attrMap;
|
|
392
393
|
return r ? _t(t, { language: r }) : "css";
|
|
393
394
|
}
|
|
394
395
|
if (e.name === "mj-style" && t.parser === "mjml") return "css";
|
|
395
396
|
}
|
|
396
|
-
function
|
|
397
|
-
return qs(e, t) ??
|
|
397
|
+
function rr(e, t) {
|
|
398
|
+
return qs(e, t) ?? Fs(e, t) ?? Hs(e, t);
|
|
398
399
|
}
|
|
399
400
|
function ze(e) {
|
|
400
401
|
return e === "block" || e === "list-item" || e.startsWith("table");
|
|
@@ -408,14 +409,14 @@ function Us(e) {
|
|
|
408
409
|
function Ws(e) {
|
|
409
410
|
return !ze(e);
|
|
410
411
|
}
|
|
411
|
-
function
|
|
412
|
+
function zs(e) {
|
|
412
413
|
return !ze(e);
|
|
413
414
|
}
|
|
414
|
-
function
|
|
415
|
+
function Gs(e) {
|
|
415
416
|
return !ze(e) && e !== "inline-block";
|
|
416
417
|
}
|
|
417
|
-
function
|
|
418
|
-
return
|
|
418
|
+
function Y(e) {
|
|
419
|
+
return dn(e).startsWith("pre");
|
|
419
420
|
}
|
|
420
421
|
function $s(e, t) {
|
|
421
422
|
let r = e;
|
|
@@ -425,10 +426,10 @@ function $s(e, t) {
|
|
|
425
426
|
}
|
|
426
427
|
return !1;
|
|
427
428
|
}
|
|
428
|
-
function
|
|
429
|
-
if (
|
|
429
|
+
function fn(e, t) {
|
|
430
|
+
if (ce(e, t)) return "block";
|
|
430
431
|
if (e.prev?.kind === "comment") {
|
|
431
|
-
let n = e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/
|
|
432
|
+
let n = e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);
|
|
432
433
|
if (n) return n[1];
|
|
433
434
|
}
|
|
434
435
|
let r = !1;
|
|
@@ -437,60 +438,60 @@ function dn(e, t) {
|
|
|
437
438
|
switch (t.htmlWhitespaceSensitivity) {
|
|
438
439
|
case "strict": return "inline";
|
|
439
440
|
case "ignore": return "block";
|
|
440
|
-
default: if (e.kind === "element" && (!e.namespace || r ||
|
|
441
|
+
default: if (e.kind === "element" && (!e.namespace || r || oe(e)) && se(Xt, e.name)) return Xt[e.name];
|
|
441
442
|
}
|
|
442
|
-
return
|
|
443
|
+
return Zr;
|
|
443
444
|
}
|
|
444
|
-
function
|
|
445
|
-
return e.kind === "element" && (!e.namespace ||
|
|
445
|
+
function dn(e) {
|
|
446
|
+
return e.kind === "element" && (!e.namespace || oe(e)) && se(Jt, e.name) ? Jt[e.name] : en;
|
|
446
447
|
}
|
|
447
|
-
function
|
|
448
|
-
return
|
|
448
|
+
function nr(e) {
|
|
449
|
+
return T(0, T(0, e, "'", "'"), """, "\"");
|
|
449
450
|
}
|
|
450
|
-
function
|
|
451
|
-
return
|
|
451
|
+
function w(e) {
|
|
452
|
+
return nr(e.value);
|
|
452
453
|
}
|
|
453
|
-
function
|
|
454
|
-
return
|
|
454
|
+
function Ge(e, t) {
|
|
455
|
+
return ce(e, t) && !js.has(e.fullName);
|
|
455
456
|
}
|
|
456
|
-
function
|
|
457
|
+
function ce(e, t) {
|
|
457
458
|
return t.parser === "vue" && e.kind === "element" && e.parent.kind === "root" && e.fullName.toLowerCase() !== "html";
|
|
458
459
|
}
|
|
459
|
-
function
|
|
460
|
-
return
|
|
460
|
+
function wt(e, t) {
|
|
461
|
+
return ce(e, t) && (Ge(e, t) || e.attrMap.lang && e.attrMap.lang !== "html");
|
|
461
462
|
}
|
|
462
|
-
function
|
|
463
|
+
function gn(e) {
|
|
463
464
|
let t = e.fullName;
|
|
464
465
|
return t.charAt(0) === "#" || t === "slot-scope" || t === "v-slot" || t.startsWith("v-slot:");
|
|
465
466
|
}
|
|
466
|
-
function
|
|
467
|
+
function _n(e, t) {
|
|
467
468
|
let r = e.parent;
|
|
468
|
-
if (!
|
|
469
|
+
if (!ce(r, t)) return !1;
|
|
469
470
|
let n = r.fullName, i = e.fullName;
|
|
470
471
|
return n === "script" && i === "setup" || n === "style" && i === "vars";
|
|
471
472
|
}
|
|
472
|
-
function
|
|
473
|
-
return e.parent.isWhitespaceSensitive ? e.parent.isIndentationSensitive ? L(t) : L(
|
|
473
|
+
function Tt(e, t = e.value) {
|
|
474
|
+
return e.parent.isWhitespaceSensitive ? e.parent.isIndentationSensitive ? L(t) : L(P.dedentString(Zt(t)), k) : R(S, P.split(t));
|
|
474
475
|
}
|
|
475
|
-
function
|
|
476
|
-
return
|
|
476
|
+
function yt(e, t) {
|
|
477
|
+
return ce(e, t) && e.name === "script";
|
|
477
478
|
}
|
|
478
|
-
function
|
|
479
|
+
function Ys(e) {
|
|
479
480
|
let { valueSpan: t, value: r } = e;
|
|
480
481
|
return t.end.offset - t.start.offset === r.length + 2;
|
|
481
482
|
}
|
|
482
|
-
function
|
|
483
|
-
if (
|
|
483
|
+
function Et(e, t) {
|
|
484
|
+
if (Ys(e)) return !1;
|
|
484
485
|
let { value: r } = e;
|
|
485
|
-
return /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS
|
|
486
|
+
return /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r) || t.parser === "lwc" && r.startsWith("{") && r.endsWith("}");
|
|
486
487
|
}
|
|
487
|
-
async function
|
|
488
|
-
let n =
|
|
489
|
-
for (let [s, a] of n.split(
|
|
488
|
+
async function Cn(e, t, r) {
|
|
489
|
+
let n = w(r.node), i = [];
|
|
490
|
+
for (let [s, a] of n.split(Sn).entries()) if (s % 2 === 0) i.push(L(a));
|
|
490
491
|
else try {
|
|
491
|
-
i.push(
|
|
492
|
+
i.push(C([
|
|
492
493
|
"{{",
|
|
493
|
-
A([S, await
|
|
494
|
+
A([S, await E(a, e, {
|
|
494
495
|
parser: "__ng_interpolation",
|
|
495
496
|
__isInHtmlInterpolation: !0
|
|
496
497
|
})]),
|
|
@@ -502,15 +503,15 @@ async function vn(e, t, r) {
|
|
|
502
503
|
}
|
|
503
504
|
return i;
|
|
504
505
|
}
|
|
505
|
-
function
|
|
506
|
-
let n =
|
|
507
|
-
return
|
|
506
|
+
function Qs(e, t, { node: r }) {
|
|
507
|
+
let n = w(r);
|
|
508
|
+
return j(gt(Tt(r, n.trim())), !n.includes("@@"));
|
|
508
509
|
}
|
|
509
510
|
function Zs(e) {
|
|
510
511
|
let t = [];
|
|
511
512
|
for (let r of e.split(";")) {
|
|
512
|
-
if (r =
|
|
513
|
-
let [n, ...i] =
|
|
513
|
+
if (r = P.trim(r), !r) continue;
|
|
514
|
+
let [n, ...i] = P.split(r);
|
|
514
515
|
t.push({
|
|
515
516
|
name: n,
|
|
516
517
|
value: i
|
|
@@ -518,172 +519,171 @@ function Zs(e) {
|
|
|
518
519
|
}
|
|
519
520
|
return t;
|
|
520
521
|
}
|
|
521
|
-
function
|
|
522
|
-
let { node: n } = r, i =
|
|
523
|
-
return i.length === 0 ? [""] :
|
|
522
|
+
function Ln(e, t, r) {
|
|
523
|
+
let { node: n } = r, i = En(w(n));
|
|
524
|
+
return i.length === 0 ? [""] : j(i.map(({ name: s, value: a }, o) => [[s, ...a].join(" "), o === i.length - 1 ? $(";") : [";", S]]));
|
|
524
525
|
}
|
|
525
|
-
function
|
|
526
|
+
function An(e) {
|
|
526
527
|
return e === " " || e === `
|
|
527
528
|
` || e === "\f" || e === "\r" || e === " ";
|
|
528
529
|
}
|
|
529
530
|
function sa(e) {
|
|
530
|
-
let t = e.length, r, n, i, s, a, o = 0,
|
|
531
|
-
function
|
|
532
|
-
let
|
|
533
|
-
if (
|
|
531
|
+
let t = e.length, r, n, i, s, a, o = 0, l;
|
|
532
|
+
function c(h) {
|
|
533
|
+
let f, g = h.exec(e.substring(o));
|
|
534
|
+
if (g) return [f] = g, o += f.length, f;
|
|
534
535
|
}
|
|
535
|
-
let
|
|
536
|
+
let u = [];
|
|
536
537
|
for (;;) {
|
|
537
|
-
if (
|
|
538
|
-
if (
|
|
539
|
-
return
|
|
538
|
+
if (c(ta), o >= t) {
|
|
539
|
+
if (u.length === 0) throw new Error("Must contain one or more image candidate strings.");
|
|
540
|
+
return u;
|
|
540
541
|
}
|
|
541
|
-
|
|
542
|
+
l = o, r = c(ra), n = [], r.slice(-1) === "," ? (r = r.replace(na, ""), _()) : d();
|
|
542
543
|
}
|
|
543
544
|
function d() {
|
|
544
|
-
for (
|
|
545
|
-
if (a = e.charAt(o), s === "in descriptor") if (
|
|
545
|
+
for (c(ea), i = "", s = "in descriptor";;) {
|
|
546
|
+
if (a = e.charAt(o), s === "in descriptor") if (An(a)) i && (n.push(i), i = "", s = "after descriptor");
|
|
546
547
|
else if (a === ",") {
|
|
547
|
-
o += 1, i && n.push(i),
|
|
548
|
+
o += 1, i && n.push(i), _();
|
|
548
549
|
return;
|
|
549
550
|
} else if (a === "(") i += a, s = "in parens";
|
|
550
551
|
else if (a === "") {
|
|
551
|
-
i && n.push(i),
|
|
552
|
+
i && n.push(i), _();
|
|
552
553
|
return;
|
|
553
554
|
} else i += a;
|
|
554
555
|
else if (s === "in parens") if (a === ")") i += a, s = "in descriptor";
|
|
555
556
|
else if (a === "") {
|
|
556
|
-
n.push(i),
|
|
557
|
+
n.push(i), _();
|
|
557
558
|
return;
|
|
558
559
|
} else i += a;
|
|
559
|
-
else if (s === "after descriptor" && !
|
|
560
|
-
|
|
560
|
+
else if (s === "after descriptor" && !An(a)) if (a === "") {
|
|
561
|
+
_();
|
|
561
562
|
return;
|
|
562
563
|
} else s = "in descriptor", o -= 1;
|
|
563
564
|
o += 1;
|
|
564
565
|
}
|
|
565
566
|
}
|
|
566
|
-
function
|
|
567
|
-
let
|
|
568
|
-
for (
|
|
569
|
-
if (!
|
|
567
|
+
function _() {
|
|
568
|
+
let h = !1, f, g, v, W, ie = {}, Q, at, Ce, Be, Ut;
|
|
569
|
+
for (W = 0; W < n.length; W++) Q = n[W], at = Q[Q.length - 1], Ce = Q.substring(0, Q.length - 1), Be = parseInt(Ce, 10), Ut = parseFloat(Ce), Pn.test(Ce) && at === "w" ? ((f || g) && (h = !0), Be === 0 ? h = !0 : f = Be) : ia.test(Ce) && at === "x" ? ((f || g || v) && (h = !0), Ut < 0 ? h = !0 : g = Ut) : Pn.test(Ce) && at === "h" ? ((v || g) && (h = !0), Be === 0 ? h = !0 : v = Be) : h = !0;
|
|
570
|
+
if (!h) ie.source = {
|
|
570
571
|
value: r,
|
|
571
|
-
startOffset:
|
|
572
|
-
},
|
|
572
|
+
startOffset: l
|
|
573
|
+
}, f && (ie.width = { value: f }), g && (ie.density = { value: g }), v && (ie.height = { value: v }), u.push(ie);
|
|
573
574
|
else throw new Error(`Invalid srcset descriptor found in "${e}" at "${Q}".`);
|
|
574
575
|
}
|
|
575
576
|
}
|
|
576
577
|
function Rn(e, t, r) {
|
|
577
|
-
let i =
|
|
578
|
+
let i = Nn(w(r.node)), s = aa.filter((h) => i.some((f) => se(f, h)));
|
|
578
579
|
if (s.length > 1) throw new Error("Mixed descriptor in srcset is not supported");
|
|
579
|
-
let [a] = s, o = In[a],
|
|
580
|
-
let
|
|
581
|
-
return
|
|
582
|
-
}),
|
|
583
|
-
return
|
|
584
|
-
let
|
|
585
|
-
if (
|
|
586
|
-
let
|
|
587
|
-
|
|
588
|
-
}
|
|
589
|
-
return
|
|
580
|
+
let [a] = s, o = In[a], l = i.map((h) => h.source.value), c = Math.max(...l.map((h) => h.length)), u = i.map((h) => h[a] ? String(h[a].value) : ""), d = u.map((h) => {
|
|
581
|
+
let f = h.indexOf(".");
|
|
582
|
+
return f === -1 ? h.length : f;
|
|
583
|
+
}), _ = Math.max(...d);
|
|
584
|
+
return j(R([",", S], l.map((h, f) => {
|
|
585
|
+
let g = [h], v = u[f];
|
|
586
|
+
if (v) {
|
|
587
|
+
let W = c - h.length + 1, ie = _ - d[f], Q = " ".repeat(W + ie);
|
|
588
|
+
g.push($(Q, " "), v + o);
|
|
589
|
+
}
|
|
590
|
+
return g;
|
|
590
591
|
})));
|
|
591
592
|
}
|
|
592
|
-
function
|
|
593
|
-
|
|
594
|
-
return sr.has(r) || sr.set(r, r.children.some((n) => wt(n, t) && ["ts", "typescript"].includes(n.attrMap.lang))), sr.get(r);
|
|
593
|
+
function la(e, t) {
|
|
594
|
+
return mt(oa, e.root, (r) => r.children.some((n) => yt(n, t) && ["ts", "typescript"].includes(n.attrMap.lang)));
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
596
|
+
function Bn(e, t, r) {
|
|
597
|
+
return E(`type T<${w(r.node)}> = any`, e, {
|
|
598
598
|
parser: "babel-ts",
|
|
599
599
|
__isEmbeddedTypescriptGenericParameters: !0
|
|
600
|
-
},
|
|
600
|
+
}, q);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
let i =
|
|
604
|
-
return
|
|
602
|
+
function qn(e, t, r, n) {
|
|
603
|
+
let i = w(r.node), s = H(r, n) ? "babel-ts" : "babel";
|
|
604
|
+
return E(`function _(${i}) {}`, e, {
|
|
605
605
|
parser: s,
|
|
606
606
|
__isVueBindings: !0
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
609
|
async function Hn(e, t, r, n) {
|
|
610
|
-
let { left: s, operator: a, right: o } =
|
|
610
|
+
let { left: s, operator: a, right: o } = ca(w(r.node)), l = H(r, n);
|
|
611
611
|
return [
|
|
612
|
-
|
|
613
|
-
parser:
|
|
612
|
+
C(await E(`function _(${s}) {}`, e, {
|
|
613
|
+
parser: l ? "babel-ts" : "babel",
|
|
614
614
|
__isVueForBindingLeft: !0
|
|
615
615
|
})),
|
|
616
616
|
" ",
|
|
617
617
|
a,
|
|
618
618
|
" ",
|
|
619
|
-
await
|
|
619
|
+
await E(o, e, { parser: l ? "__ts_expression" : "__js_expression" })
|
|
620
620
|
];
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
let
|
|
624
|
-
if (!
|
|
625
|
-
let
|
|
626
|
-
if (!
|
|
627
|
-
let a =
|
|
628
|
-
o ? (
|
|
629
|
-
let
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
622
|
+
function ca(e) {
|
|
623
|
+
let r = e.match(/(.*?)\s+(in|of)\s+(.*)/s);
|
|
624
|
+
if (!r) return;
|
|
625
|
+
let n = { for: r[3].trim() };
|
|
626
|
+
if (!n.for) return;
|
|
627
|
+
let i = /,([^,\]}]*)(?:,([^,\]}]*))?$/, a = T(0, r[1].trim(), /^\(|\)$/g, ""), o = a.match(i);
|
|
628
|
+
o ? (n.alias = a.replace(i, ""), n.iterator1 = o[1].trim(), o[2] && (n.iterator2 = o[2].trim())) : n.alias = a;
|
|
629
|
+
let l = [
|
|
630
|
+
n.alias,
|
|
631
|
+
n.iterator1,
|
|
632
|
+
n.iterator2
|
|
633
633
|
];
|
|
634
|
-
if (!
|
|
635
|
-
left:
|
|
636
|
-
operator:
|
|
637
|
-
right:
|
|
634
|
+
if (!l.some((c, u) => !c && (u === 0 || l.slice(u + 1).some(Boolean)))) return {
|
|
635
|
+
left: l.filter(Boolean).join(","),
|
|
636
|
+
operator: r[2],
|
|
637
|
+
right: n.for
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
|
-
async function
|
|
640
|
+
async function pa(e, t, r, n) {
|
|
641
641
|
try {
|
|
642
|
-
return await
|
|
642
|
+
return await Fn(e, t, r, n);
|
|
643
643
|
} catch (a) {
|
|
644
644
|
if (a.cause?.code !== "BABEL_PARSER_SYNTAX_ERROR") throw a;
|
|
645
645
|
}
|
|
646
|
-
return
|
|
646
|
+
return E(w(r.node), e, { parser: H(r, n) ? "__vue_ts_event_binding" : "__vue_event_binding" }, q);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
648
|
+
function ha(e, t, r, n) {
|
|
649
|
+
return E(w(r.node), e, { parser: H(r, n) ? "__vue_ts_expression" : "__vue_expression" }, q);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
return
|
|
651
|
+
function Fn(e, t, r, n) {
|
|
652
|
+
return E(w(r.node), e, { parser: H(r, n) ? "__ts_expression" : "__js_expression" }, q);
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function fa(e, t) {
|
|
655
655
|
let { node: r } = e, { value: n } = r;
|
|
656
|
-
if (n) return
|
|
656
|
+
if (n) return Et(r, t) ? [
|
|
657
657
|
r.rawName,
|
|
658
658
|
"=",
|
|
659
659
|
n
|
|
660
|
-
] :
|
|
660
|
+
] : ma.find(({ test: i }) => i(e, t))?.print;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function da(e) {
|
|
663
663
|
return async (t, r, n, i) => {
|
|
664
664
|
let s = await e(t, r, n, i);
|
|
665
|
-
if (s) return s = Gt(s, (a) => typeof a == "string" ?
|
|
665
|
+
if (s) return s = Gt(s, (a) => typeof a == "string" ? T(0, a, "\"", """) : a), [
|
|
666
666
|
n.node.rawName,
|
|
667
667
|
"=\"",
|
|
668
|
-
|
|
668
|
+
C(s),
|
|
669
669
|
"\""
|
|
670
670
|
];
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
return [e.isSelfClosing ? "" :
|
|
673
|
+
function $e(e, t) {
|
|
674
|
+
return [e.isSelfClosing ? "" : ga(e, t), ue(e, t)];
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
return e.lastChild &&
|
|
676
|
+
function ga(e, t) {
|
|
677
|
+
return e.lastChild && K(e.lastChild) ? "" : [_a(e, t), xt(e, t)];
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
return (e.next ?
|
|
679
|
+
function ue(e, t) {
|
|
680
|
+
return (e.next ? V(e.next) : he(e.parent)) ? "" : [pe(e, t), M(e, t)];
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
return
|
|
682
|
+
function _a(e, t) {
|
|
683
|
+
return he(e) ? pe(e.lastChild, t) : "";
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return
|
|
685
|
+
function M(e, t) {
|
|
686
|
+
return K(e) ? xt(e.parent, t) : je(e) ? Lt(e.next, t) : "";
|
|
687
687
|
}
|
|
688
688
|
function xt(e, t) {
|
|
689
689
|
if (zn(e, t)) return "";
|
|
@@ -693,7 +693,7 @@ function xt(e, t) {
|
|
|
693
693
|
default: return `</${e.rawName}`;
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function pe(e, t) {
|
|
697
697
|
if (zn(e, t)) return "";
|
|
698
698
|
switch (e.kind) {
|
|
699
699
|
case "ieConditionalComment":
|
|
@@ -706,51 +706,56 @@ function ue(e, t) {
|
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
function zn(e, t) {
|
|
709
|
-
return !e.isSelfClosing && !e.endSourceSpan && (
|
|
709
|
+
return !e.isSelfClosing && !e.endSourceSpan && (le(e) || Ct(e.parent, t));
|
|
710
710
|
}
|
|
711
|
-
function
|
|
712
|
-
return e.prev && e.prev.kind !== "docType" && e.kind !== "angularControlFlowBlock" && !
|
|
713
|
-
}
|
|
714
|
-
function pe(e) {
|
|
715
|
-
return e.lastChild?.isTrailingSpaceSensitive && !e.lastChild.hasTrailingSpaces && !O(vt(e.lastChild)) && !ae(e);
|
|
711
|
+
function V(e) {
|
|
712
|
+
return e.prev && e.prev.kind !== "docType" && e.kind !== "angularControlFlowBlock" && !N(e.prev) && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces;
|
|
716
713
|
}
|
|
717
714
|
function he(e) {
|
|
718
|
-
return
|
|
715
|
+
return e.lastChild?.isTrailingSpaceSensitive && !e.lastChild.hasTrailingSpaces && !N(bt(e.lastChild)) && !Y(e);
|
|
716
|
+
}
|
|
717
|
+
function K(e) {
|
|
718
|
+
return !e.next && !e.hasTrailingSpaces && e.isTrailingSpaceSensitive && N(bt(e));
|
|
719
719
|
}
|
|
720
720
|
function je(e) {
|
|
721
|
-
return e.next && !
|
|
721
|
+
return e.next && !N(e.next) && N(e) && e.isTrailingSpaceSensitive && !e.hasTrailingSpaces;
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
let t = e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/
|
|
725
|
-
return t ? t[1] ? t[1].split(/\s+/
|
|
723
|
+
function Sa(e) {
|
|
724
|
+
let t = e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);
|
|
725
|
+
return t ? t[1] ? t[1].split(/\s+/) : !0 : !1;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Ye(e) {
|
|
728
728
|
return !e.prev && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces;
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
let { node: n } = e;
|
|
732
|
-
if (
|
|
733
|
-
let
|
|
734
|
-
|
|
730
|
+
function va(e, t, r) {
|
|
731
|
+
let { node: n } = e, { attrs: i = [], startTagComments: s = [] } = n;
|
|
732
|
+
if (i.length === 0 && s.length === 0) return n.isSelfClosing ? " " : "";
|
|
733
|
+
let a = n.prev?.kind === "comment" && Sa(n.prev.value), o = typeof a == "boolean" ? () => a : Array.isArray(a) ? (g) => a.includes(g.rawName) : () => !1, l = ["attrs", "startTagComments"].filter((g) => X(n[g])), c = l.flatMap((g) => e.map(({ node: v }) => ({
|
|
734
|
+
loc: F(v),
|
|
735
|
+
printed: v.kind === "attribute" && o(v) ? L(t.originalText.slice(F(v), J(v))) : r()
|
|
736
|
+
}), g));
|
|
737
|
+
l.length > 1 && c.sort((g, v) => g.loc - v.loc);
|
|
738
|
+
let u = n.kind === "element" && n.fullName === "script" && i.length === 1 && i[0].fullName === "src" && n.children.length === 0 && s.length === 0, d = s.some((g) => g.type === "single"), h = d || t.singleAttributePerLine && i.length > 1 && !ce(n, t) ? k : S, f = [A([u ? " " : d ? k : S, R(h, c.map(({ printed: g }) => g))])];
|
|
739
|
+
return n.firstChild && Ye(n.firstChild) || n.isSelfClosing && he(n.parent) || u ? f.push(n.isSelfClosing ? " " : "") : f.push(t.bracketSameLine ? n.isSelfClosing ? " " : "" : n.isSelfClosing ? S : y), f;
|
|
735
740
|
}
|
|
736
|
-
function
|
|
737
|
-
return e.firstChild &&
|
|
741
|
+
function Ca(e) {
|
|
742
|
+
return e.firstChild && Ye(e.firstChild) ? "" : At(e);
|
|
738
743
|
}
|
|
739
744
|
function Ke(e, t, r) {
|
|
740
745
|
let { node: n } = e;
|
|
741
746
|
return [
|
|
742
747
|
me(n, t),
|
|
743
|
-
|
|
744
|
-
n.isSelfClosing ? "" :
|
|
748
|
+
va(e, t, r),
|
|
749
|
+
n.isSelfClosing ? "" : Ca(n)
|
|
745
750
|
];
|
|
746
751
|
}
|
|
747
752
|
function me(e, t) {
|
|
748
|
-
return e.prev && je(e.prev) ? "" : [
|
|
753
|
+
return e.prev && je(e.prev) ? "" : [B(e, t), Lt(e, t)];
|
|
749
754
|
}
|
|
750
|
-
function
|
|
751
|
-
return
|
|
755
|
+
function B(e, t) {
|
|
756
|
+
return Ye(e) ? At(e.parent) : V(e) ? pe(e.prev, t) : "";
|
|
752
757
|
}
|
|
753
|
-
function
|
|
758
|
+
function Lt(e, t) {
|
|
754
759
|
switch (e.kind) {
|
|
755
760
|
case "ieConditionalComment":
|
|
756
761
|
case "ieConditionalStartComment": return `<!--[if ${e.condition}`;
|
|
@@ -759,10 +764,10 @@ function yt(e, t) {
|
|
|
759
764
|
case "docType": {
|
|
760
765
|
if (e.value === "html") {
|
|
761
766
|
let { filepath: n } = t;
|
|
762
|
-
if (n && /\.html
|
|
767
|
+
if (n && /\.html?$/.test(n)) return Wn;
|
|
763
768
|
}
|
|
764
|
-
let r =
|
|
765
|
-
return t.originalText.slice(r, r +
|
|
769
|
+
let r = F(e);
|
|
770
|
+
return t.originalText.slice(r, r + Wn.length);
|
|
766
771
|
}
|
|
767
772
|
case "angularIcuExpression": return "{";
|
|
768
773
|
case "element": if (e.condition) return `<!--[if ${e.condition}]><!--><${e.rawName}`;
|
|
@@ -776,54 +781,54 @@ function At(e) {
|
|
|
776
781
|
default: return ">";
|
|
777
782
|
}
|
|
778
783
|
}
|
|
779
|
-
function
|
|
784
|
+
function ka(e, t) {
|
|
780
785
|
if (!e.endSourceSpan) return "";
|
|
781
786
|
let r = e.startSourceSpan.end.offset;
|
|
782
|
-
e.firstChild &&
|
|
787
|
+
e.firstChild && Ye(e.firstChild) && (r -= At(e).length);
|
|
783
788
|
let n = e.endSourceSpan.start.offset;
|
|
784
|
-
return e.lastChild &&
|
|
789
|
+
return e.lastChild && K(e.lastChild) ? n += xt(e, t).length : he(e) && (n -= pe(e.lastChild, t).length), t.originalText.slice(r, n);
|
|
785
790
|
}
|
|
786
|
-
function
|
|
791
|
+
function wa(e, t) {
|
|
787
792
|
let { node: r } = e;
|
|
788
793
|
switch (r.kind) {
|
|
789
794
|
case "element":
|
|
790
|
-
if (
|
|
791
|
-
if (!r.isSelfClosing &&
|
|
792
|
-
let n =
|
|
795
|
+
if (O(r, t) || r.kind === "interpolation") return;
|
|
796
|
+
if (!r.isSelfClosing && wt(r, t)) {
|
|
797
|
+
let n = rr(r, t);
|
|
793
798
|
return n ? async (i, s) => {
|
|
794
|
-
let a =
|
|
795
|
-
return o || (
|
|
799
|
+
let a = Pt(r, t), o = /^\s*$/.test(a), l = "";
|
|
800
|
+
return o || (l = await i(Zt(a), {
|
|
796
801
|
parser: n,
|
|
797
802
|
__embeddedInHtml: !0
|
|
798
|
-
}), o =
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
o ? "" :
|
|
802
|
-
|
|
803
|
-
o ? "" :
|
|
804
|
-
|
|
805
|
-
|
|
803
|
+
}), o = l === ""), [
|
|
804
|
+
B(r, t),
|
|
805
|
+
C(Ke(e, t, s)),
|
|
806
|
+
o ? "" : k,
|
|
807
|
+
l,
|
|
808
|
+
o ? "" : k,
|
|
809
|
+
$e(r, t),
|
|
810
|
+
M(r, t)
|
|
806
811
|
];
|
|
807
812
|
} : void 0;
|
|
808
813
|
}
|
|
809
814
|
break;
|
|
810
815
|
case "text":
|
|
811
|
-
if (
|
|
812
|
-
let n =
|
|
816
|
+
if (O(r.parent, t)) {
|
|
817
|
+
let n = rr(r.parent, t);
|
|
813
818
|
if (n) return async (i) => {
|
|
814
|
-
let s = n === "markdown" ?
|
|
819
|
+
let s = n === "markdown" ? P.dedentString(r.value.replace(/^[^\S\n]*\n/, "")) : r.value, a = {
|
|
815
820
|
parser: n,
|
|
816
821
|
__embeddedInHtml: !0
|
|
817
822
|
};
|
|
818
823
|
if (t.parser === "html" && n === "babel") {
|
|
819
|
-
let o = "script", { attrMap:
|
|
820
|
-
|
|
824
|
+
let o = "script", { attrMap: l } = r.parent;
|
|
825
|
+
l && (l.type === "module" || (l.type === "text/babel" || l.type === "text/jsx") && l["data-type"] === "module") && (o = "module"), a.__babelSourceType = o;
|
|
821
826
|
}
|
|
822
827
|
return [
|
|
823
|
-
|
|
824
|
-
|
|
828
|
+
G,
|
|
829
|
+
B(r, t),
|
|
825
830
|
await i(s, a),
|
|
826
|
-
|
|
831
|
+
M(r, t)
|
|
827
832
|
];
|
|
828
833
|
};
|
|
829
834
|
} else if (r.parent.kind === "interpolation") return async (n) => {
|
|
@@ -831,28 +836,28 @@ function Ta(e, t) {
|
|
|
831
836
|
__isInHtmlInterpolation: !0,
|
|
832
837
|
__embeddedInHtml: !0
|
|
833
838
|
};
|
|
834
|
-
return t.parser === "angular" ? i.parser = "__ng_interpolation" : t.parser === "vue" ? i.parser =
|
|
839
|
+
return t.parser === "angular" ? i.parser = "__ng_interpolation" : t.parser === "vue" ? i.parser = H(e, t) ? "__vue_ts_expression" : "__vue_expression" : i.parser = "__js_expression", [A([S, await n(r.value, i)]), r.parent.next && V(r.parent.next) ? " " : S];
|
|
835
840
|
};
|
|
836
841
|
break;
|
|
837
|
-
case "attribute": return
|
|
838
|
-
case "angularControlFlowBlockParameters": return
|
|
839
|
-
case "angularLetDeclarationInitializer": return (n) =>
|
|
842
|
+
case "attribute": return Un(e, t);
|
|
843
|
+
case "angularControlFlowBlockParameters": return ba.has(e.parent.name) ? $r : void 0;
|
|
844
|
+
case "angularLetDeclarationInitializer": return (n) => E(r.value, n, {
|
|
840
845
|
parser: "__ng_binding",
|
|
841
846
|
__isInHtmlAttribute: !1
|
|
842
847
|
});
|
|
843
848
|
}
|
|
844
849
|
}
|
|
845
|
-
function
|
|
850
|
+
function Xe(e) {
|
|
846
851
|
if (Qe !== null && typeof Qe.property) {
|
|
847
852
|
let t = Qe;
|
|
848
|
-
return Qe =
|
|
853
|
+
return Qe = Xe.prototype = null, t;
|
|
849
854
|
}
|
|
850
|
-
return Qe =
|
|
855
|
+
return Qe = Xe.prototype = e ?? Object.create(null), new Xe();
|
|
851
856
|
}
|
|
852
857
|
function ar(e) {
|
|
853
|
-
return
|
|
858
|
+
return Xe(e);
|
|
854
859
|
}
|
|
855
|
-
function
|
|
860
|
+
function ya(e, t = "type") {
|
|
856
861
|
ar(e);
|
|
857
862
|
function r(n) {
|
|
858
863
|
let i = n[t], s = e[i];
|
|
@@ -861,122 +866,141 @@ function wa(e, t = "type") {
|
|
|
861
866
|
}
|
|
862
867
|
return r;
|
|
863
868
|
}
|
|
864
|
-
function
|
|
869
|
+
function or(e, t, r) {
|
|
870
|
+
if (e.kind === "text" || e.kind === "comment") return null;
|
|
871
|
+
if (e.kind === "yaml" && delete t.value, e.kind === "attribute") {
|
|
872
|
+
let { fullName: n, value: i } = e;
|
|
873
|
+
n === "style" || n === "class" || n === "srcset" && (r.fullName === "img" || r.fullName === "source") || n === "allow" && r.fullName === "iframe" || n.startsWith("on") || n.startsWith("@") || n.startsWith(":") || n.startsWith(".") || n.startsWith("#") || n.startsWith("v-") || n === "vars" && r.fullName === "style" || (n === "setup" || n === "generic") && r.fullName === "script" || n === "slot-scope" || n.startsWith("(") || n.startsWith("[") || n.startsWith("*") || n.startsWith("bind") || n.startsWith("i18n") || n.startsWith("on-") || n.startsWith("ng-") || i?.includes("{{") ? delete t.value : i && (t.value = T(0, i, /'|"|'/g, "\""));
|
|
874
|
+
}
|
|
875
|
+
if (e.kind === "docType" && (t.value = T(0, e.value.toLowerCase(), /\s+/g, " ")), e.kind === "angularControlFlowBlock" && e.parameters?.children) for (let n of t.parameters.children) La.has(e.name) ? delete n.expression : n.expression = n.expression.trim();
|
|
876
|
+
e.kind === "angularIcuExpression" && (t.switchValue = e.switchValue.trim()), e.kind === "angularLetDeclarationInitializer" && delete t.value, e.kind === "element" && e.isVoid && !e.isSelfClosing && (t.isSelfClosing = !0);
|
|
877
|
+
}
|
|
878
|
+
function ri(e) {
|
|
865
879
|
let t = J(e);
|
|
866
|
-
return e.kind === "element" && !e.endSourceSpan &&
|
|
880
|
+
return e.kind === "element" && !e.endSourceSpan && X(e.children) ? Math.max(t, ri(I(0, e.children, -1))) : t;
|
|
867
881
|
}
|
|
868
882
|
function Ze(e, t, r) {
|
|
869
883
|
let n = e.node;
|
|
870
|
-
if (
|
|
871
|
-
let i =
|
|
884
|
+
if (le(n)) {
|
|
885
|
+
let i = ri(n);
|
|
872
886
|
return [
|
|
873
|
-
|
|
874
|
-
L(
|
|
875
|
-
|
|
887
|
+
B(n, t),
|
|
888
|
+
L(P.trimEnd(t.originalText.slice(F(n) + (n.prev && je(n.prev) ? Lt(n).length : 0), i - (n.next && V(n.next) ? pe(n, t).length : 0)))),
|
|
889
|
+
M(n, t)
|
|
876
890
|
];
|
|
877
891
|
}
|
|
878
892
|
return r();
|
|
879
893
|
}
|
|
880
|
-
function
|
|
881
|
-
return
|
|
894
|
+
function Nt(e, t) {
|
|
895
|
+
return N(e) && N(t) ? e.isTrailingSpaceSensitive ? e.hasTrailingSpaces ? kt(t) ? k : S : "" : kt(t) ? k : y : je(e) && (le(t) || t.firstChild || t.isSelfClosing || t.kind === "element" && t.attrs.length > 0) || e.kind === "element" && e.isSelfClosing && V(t) ? "" : t.kind === "comment" && t.isLeadingSpaceSensitive && !t.hasLeadingSpaces ? y : !t.isLeadingSpaceSensitive || kt(t) || V(t) && e.lastChild && K(e.lastChild) && e.lastChild.lastChild && K(e.lastChild.lastChild) ? k : t.hasLeadingSpaces ? S : y;
|
|
882
896
|
}
|
|
883
|
-
function
|
|
897
|
+
function Ae(e, t, r) {
|
|
884
898
|
let { node: n } = e;
|
|
885
|
-
if (
|
|
886
|
-
let s = e.node, a = s.prev ?
|
|
887
|
-
return [a ? [a,
|
|
899
|
+
if (tr(n)) return [G, ...e.map(() => {
|
|
900
|
+
let s = e.node, a = s.prev ? Nt(s.prev, s) : "";
|
|
901
|
+
return [a ? [a, We(s.prev) ? k : ""] : "", Ze(e, t, r)];
|
|
888
902
|
}, "children")];
|
|
889
903
|
let i = n.children.map(() => Symbol(""));
|
|
890
904
|
return e.map(({ node: s, index: a }) => {
|
|
891
|
-
if (
|
|
892
|
-
if (s.prev &&
|
|
893
|
-
let
|
|
894
|
-
if (
|
|
895
|
-
|
|
896
|
-
|
|
905
|
+
if (N(s)) {
|
|
906
|
+
if (s.prev && N(s.prev)) {
|
|
907
|
+
let h = Nt(s.prev, s);
|
|
908
|
+
if (h) return We(s.prev) ? [
|
|
909
|
+
k,
|
|
910
|
+
k,
|
|
897
911
|
Ze(e, t, r)
|
|
898
|
-
] : [
|
|
912
|
+
] : [h, Ze(e, t, r)];
|
|
899
913
|
}
|
|
900
914
|
return Ze(e, t, r);
|
|
901
915
|
}
|
|
902
|
-
let o = [],
|
|
903
|
-
return d && (
|
|
916
|
+
let o = [], l = [], c = [], u = [], d = s.prev ? Nt(s.prev, s) : "", _ = s.next ? Nt(s, s.next) : "";
|
|
917
|
+
return d && (We(s.prev) ? o.push(k, k) : d === k ? o.push(k) : N(s.prev) ? l.push(d) : l.push($("", y, { groupId: i[a - 1] }))), _ && (We(s) ? N(s.next) && u.push(k, k) : _ === k ? N(s.next) && u.push(k) : c.push(_)), [
|
|
904
918
|
...o,
|
|
905
|
-
|
|
906
|
-
...
|
|
919
|
+
C([...l, C([Ze(e, t, r), ...c], { id: i[a] })]),
|
|
920
|
+
...u
|
|
907
921
|
];
|
|
908
922
|
}, "children");
|
|
909
923
|
}
|
|
910
|
-
function
|
|
924
|
+
function ni(e, t, r) {
|
|
911
925
|
let { node: n } = e, i = [];
|
|
912
|
-
if (
|
|
913
|
-
if (n.parameters && i.push(" (",
|
|
926
|
+
if (Da(e) && i.push("} "), i.push("@", n.name), Pa(n)) return i.push(";"), i;
|
|
927
|
+
if (n.parameters && i.push(" ", "(", C(r("parameters")), ")"), !Na(n)) {
|
|
914
928
|
i.push(" {");
|
|
915
|
-
let s =
|
|
916
|
-
n.children.length > 0 ? (n.firstChild.hasLeadingSpaces = !0, n.lastChild.hasTrailingSpaces = !0, i.push(A([
|
|
929
|
+
let s = ii(n);
|
|
930
|
+
n.children.length > 0 ? (n.firstChild.hasLeadingSpaces = !0, n.lastChild.hasTrailingSpaces = !0, i.push(A([k, Ae(e, t, r)])), s && i.push(k, "}")) : s && i.push("}");
|
|
917
931
|
}
|
|
918
|
-
return
|
|
919
|
-
}
|
|
920
|
-
function si(e) {
|
|
921
|
-
return !(e.next?.kind === "angularControlFlowBlock" && ri.get(e.name)?.has(e.next.name));
|
|
932
|
+
return C(i, { shouldBreak: !0 });
|
|
922
933
|
}
|
|
923
|
-
function
|
|
924
|
-
return
|
|
934
|
+
function ii(e) {
|
|
935
|
+
return !(e.next?.kind === "angularControlFlowBlock" && ti.get(e.name)?.has(e.next.name));
|
|
925
936
|
}
|
|
926
937
|
function Na(e) {
|
|
938
|
+
return Aa(e) && e.endSourceSpan && e.endSourceSpan.start.offset === e.endSourceSpan.end.offset;
|
|
939
|
+
}
|
|
940
|
+
function Da(e) {
|
|
927
941
|
let { previous: t } = e;
|
|
928
|
-
return t?.kind === "angularControlFlowBlock" && !
|
|
942
|
+
return t?.kind === "angularControlFlowBlock" && !le(t) && !ii(t);
|
|
929
943
|
}
|
|
930
|
-
function
|
|
931
|
-
return [A([
|
|
944
|
+
function si(e, t, r) {
|
|
945
|
+
return [A([y, R([";", S], e.map(r, "children"))]), y];
|
|
932
946
|
}
|
|
933
|
-
function
|
|
947
|
+
function ai(e, t, r) {
|
|
934
948
|
let { node: n } = e;
|
|
935
949
|
return [
|
|
936
950
|
me(n, t),
|
|
937
|
-
|
|
951
|
+
C([
|
|
938
952
|
n.switchValue.trim(),
|
|
939
953
|
", ",
|
|
940
954
|
n.type,
|
|
941
|
-
n.cases.length > 0 ? [",", A([S,
|
|
942
|
-
|
|
955
|
+
n.cases.length > 0 ? [",", A([S, R(S, e.map(r, "cases"))])] : "",
|
|
956
|
+
y
|
|
943
957
|
]),
|
|
944
|
-
|
|
958
|
+
ue(n, t)
|
|
945
959
|
];
|
|
946
960
|
}
|
|
947
|
-
function
|
|
961
|
+
function oi(e, t, r) {
|
|
948
962
|
let { node: n } = e;
|
|
949
963
|
return [
|
|
950
964
|
n.value,
|
|
951
965
|
" {",
|
|
952
|
-
|
|
966
|
+
C([A([y, e.map(({ node: i, isLast: s }) => {
|
|
953
967
|
let a = [r()];
|
|
954
968
|
return i.kind === "text" && (i.hasLeadingSpaces && a.unshift(S), i.hasTrailingSpaces && !s && a.push(S)), a;
|
|
955
|
-
}, "expression")]),
|
|
969
|
+
}, "expression")]), y]),
|
|
956
970
|
"}"
|
|
957
971
|
];
|
|
958
972
|
}
|
|
959
|
-
function
|
|
973
|
+
function li(e, t, r) {
|
|
960
974
|
let { node: n } = e;
|
|
961
|
-
if (
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
L(
|
|
965
|
-
|
|
966
|
-
|
|
975
|
+
if (Ct(n, t)) return [
|
|
976
|
+
B(n, t),
|
|
977
|
+
C(Ke(e, t, r)),
|
|
978
|
+
L(Pt(n, t)),
|
|
979
|
+
...$e(n, t),
|
|
980
|
+
M(n, t)
|
|
967
981
|
];
|
|
968
|
-
let i = n.children.length === 1 && (n.firstChild.kind === "interpolation" || n.firstChild.kind === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = Symbol("element-attr-group-id"), a = (
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
])
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
982
|
+
let i = n.children.length === 1 && (n.firstChild.kind === "interpolation" || n.firstChild.kind === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = Symbol("element-attr-group-id"), a = (u) => C([
|
|
983
|
+
C(Ke(e, t, r), { id: s }),
|
|
984
|
+
u,
|
|
985
|
+
$e(n, t)
|
|
986
|
+
]);
|
|
987
|
+
if (n.children.length === 0) return a(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ? S : "");
|
|
988
|
+
let o = (u) => i ? Fr(u, { groupId: s }) : (O(n, t) || Ge(n, t)) && n.parent.kind === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? u : A(u), l = () => i ? $(y, "", { groupId: s }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? S : n.firstChild.kind === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? Hr(y) : y, c = () => (n.next ? V(n.next) : he(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : Y(n) && K(n.lastChild) ? "" : i ? $(y, "", { groupId: s }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? S : (n.lastChild.kind === "comment" || n.lastChild.kind === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`).test(n.lastChild.value) ? "" : y;
|
|
989
|
+
return a([
|
|
990
|
+
ln(n) ? G : "",
|
|
991
|
+
o([l(), Ae(e, t, r)]),
|
|
992
|
+
c()
|
|
977
993
|
]);
|
|
978
994
|
}
|
|
979
|
-
function
|
|
995
|
+
function ci(e) {
|
|
996
|
+
let { node: { value: t, type: r } } = e;
|
|
997
|
+
return r === "single" ? `//${t.trimEnd()}` : [
|
|
998
|
+
"/*",
|
|
999
|
+
L(t),
|
|
1000
|
+
"*/"
|
|
1001
|
+
];
|
|
1002
|
+
}
|
|
1003
|
+
function Z(e, t = !0) {
|
|
980
1004
|
if (e[0] != ":") return [null, e];
|
|
981
1005
|
let r = e.indexOf(":", 1);
|
|
982
1006
|
if (r === -1) {
|
|
@@ -985,142 +1009,98 @@ function et(e, t = !0) {
|
|
|
985
1009
|
}
|
|
986
1010
|
return [e.slice(1, r), e.slice(r + 1)];
|
|
987
1011
|
}
|
|
988
|
-
function
|
|
989
|
-
return
|
|
1012
|
+
function cr(e) {
|
|
1013
|
+
return Z(e)[1] === "ng-container";
|
|
990
1014
|
}
|
|
991
|
-
function
|
|
992
|
-
return
|
|
1015
|
+
function ur(e) {
|
|
1016
|
+
return Z(e)[1] === "ng-content";
|
|
993
1017
|
}
|
|
994
1018
|
function Pe(e) {
|
|
995
|
-
return e === null ? null :
|
|
1019
|
+
return e === null ? null : Z(e)[0];
|
|
996
1020
|
}
|
|
997
1021
|
function fe(e, t) {
|
|
998
1022
|
return e ? `:${e}:${t}` : t;
|
|
999
1023
|
}
|
|
1000
|
-
function
|
|
1001
|
-
return
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
"
|
|
1006
|
-
"
|
|
1007
|
-
"
|
|
1008
|
-
]),
|
|
1009
|
-
"
|
|
1010
|
-
"
|
|
1011
|
-
"
|
|
1012
|
-
"
|
|
1013
|
-
"
|
|
1014
|
-
"
|
|
1015
|
-
|
|
1016
|
-
"
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
"
|
|
1023
|
-
"
|
|
1024
|
-
"
|
|
1025
|
-
|
|
1026
|
-
"
|
|
1027
|
-
"
|
|
1028
|
-
"
|
|
1029
|
-
"
|
|
1030
|
-
"
|
|
1031
|
-
"
|
|
1032
|
-
"
|
|
1033
|
-
"
|
|
1034
|
-
"
|
|
1035
|
-
"
|
|
1036
|
-
"
|
|
1037
|
-
|
|
1038
|
-
"
|
|
1039
|
-
"
|
|
1040
|
-
"
|
|
1041
|
-
"
|
|
1042
|
-
"
|
|
1043
|
-
"
|
|
1044
|
-
"
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
"
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
"
|
|
1068
|
-
"
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
"img|src",
|
|
1081
|
-
"video|src"
|
|
1082
|
-
]), tt(Z.RESOURCE_URL, [
|
|
1083
|
-
"base|href",
|
|
1084
|
-
"embed|src",
|
|
1085
|
-
"frame|src",
|
|
1086
|
-
"iframe|src",
|
|
1087
|
-
"link|href",
|
|
1088
|
-
"object|codebase",
|
|
1089
|
-
"object|data",
|
|
1090
|
-
"script|src",
|
|
1091
|
-
"script|href",
|
|
1092
|
-
"script|xlink:href"
|
|
1093
|
-
]), tt(Z.ATTRIBUTE_NO_BINDING, [
|
|
1094
|
-
"animate|attributeName",
|
|
1095
|
-
"animate|values",
|
|
1096
|
-
"animate|to",
|
|
1097
|
-
"animate|from",
|
|
1098
|
-
"set|to",
|
|
1099
|
-
"set|attributeName",
|
|
1100
|
-
"animateMotion|attributeName",
|
|
1101
|
-
"animateTransform|attributeName",
|
|
1102
|
-
"unknown|attributeName",
|
|
1103
|
-
"unknown|values",
|
|
1104
|
-
"unknown|to",
|
|
1105
|
-
"unknown|from",
|
|
1106
|
-
"iframe|sandbox",
|
|
1107
|
-
"iframe|allow",
|
|
1108
|
-
"iframe|allowFullscreen",
|
|
1109
|
-
"iframe|referrerPolicy",
|
|
1110
|
-
"iframe|csp",
|
|
1111
|
-
"iframe|fetchPriority",
|
|
1112
|
-
"unknown|sandbox",
|
|
1113
|
-
"unknown|allow",
|
|
1114
|
-
"unknown|allowFullscreen",
|
|
1115
|
-
"unknown|referrerPolicy",
|
|
1116
|
-
"unknown|csp",
|
|
1117
|
-
"unknown|fetchPriority"
|
|
1118
|
-
])), Pt;
|
|
1119
|
-
}
|
|
1120
|
-
function tt(e, t) {
|
|
1121
|
-
for (let r of t) Pt[r.toLowerCase()] = e;
|
|
1122
|
-
}
|
|
1123
|
-
function Ba(e) {
|
|
1024
|
+
function Ra() {
|
|
1025
|
+
return et || (et = pr(), ee(1, void 0, [["iframe", ["srcdoc"]], ["*", ["innerHTML", "outerHTML"]]]), ee(2, void 0, [["*", ["style"]]]), ee(4, void 0, [
|
|
1026
|
+
["*", ["formAction"]],
|
|
1027
|
+
["area", ["href"]],
|
|
1028
|
+
["a", ["href", "xlink:href"]],
|
|
1029
|
+
["form", ["action"]],
|
|
1030
|
+
["img", ["src"]],
|
|
1031
|
+
["video", ["src"]]
|
|
1032
|
+
]), ee(4, Ia, [["*", ["href", "xlink:href"]]]), ee(5, void 0, [
|
|
1033
|
+
["base", ["href"]],
|
|
1034
|
+
["embed", ["src"]],
|
|
1035
|
+
["frame", ["src"]],
|
|
1036
|
+
["iframe", ["src"]],
|
|
1037
|
+
["link", ["href"]],
|
|
1038
|
+
["object", ["codebase", "data"]]
|
|
1039
|
+
]), ee(4, "svg", [["a", ["href", "xlink:href"]]]), ee(6, "svg", [
|
|
1040
|
+
["animate", [
|
|
1041
|
+
"attributeName",
|
|
1042
|
+
"values",
|
|
1043
|
+
"to",
|
|
1044
|
+
"from"
|
|
1045
|
+
]],
|
|
1046
|
+
["set", ["to", "attributeName"]],
|
|
1047
|
+
["animateMotion", ["attributeName"]],
|
|
1048
|
+
["animateTransform", ["attributeName"]]
|
|
1049
|
+
]), ee(6, void 0, [["unknown", [
|
|
1050
|
+
"attributeName",
|
|
1051
|
+
"values",
|
|
1052
|
+
"to",
|
|
1053
|
+
"from",
|
|
1054
|
+
"sandbox",
|
|
1055
|
+
"allow",
|
|
1056
|
+
"allowFullscreen",
|
|
1057
|
+
"referrerPolicy",
|
|
1058
|
+
"csp",
|
|
1059
|
+
"fetchPriority",
|
|
1060
|
+
"credentialless"
|
|
1061
|
+
]], ["iframe", [
|
|
1062
|
+
"sandbox",
|
|
1063
|
+
"allow",
|
|
1064
|
+
"allowFullscreen",
|
|
1065
|
+
"referrerPolicy",
|
|
1066
|
+
"csp",
|
|
1067
|
+
"fetchPriority",
|
|
1068
|
+
"credentialless"
|
|
1069
|
+
]]]), et);
|
|
1070
|
+
}
|
|
1071
|
+
function ee(e, t, r) {
|
|
1072
|
+
let n = t ?? "";
|
|
1073
|
+
for (let [s, a] of r) {
|
|
1074
|
+
let o = s.toLowerCase();
|
|
1075
|
+
for (let l of a) {
|
|
1076
|
+
var i;
|
|
1077
|
+
let c = l.toLowerCase(), u = (i = et)[c] ?? (i[c] = pr()), d = u[n] ?? (u[n] = pr());
|
|
1078
|
+
d[o] = e;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
function ui(e, t, r) {
|
|
1083
|
+
let n = Ra()[t.toLowerCase()];
|
|
1084
|
+
if (!n) return 0;
|
|
1085
|
+
let i = e.toLowerCase(), s;
|
|
1086
|
+
if (r) {
|
|
1087
|
+
let a = n[r];
|
|
1088
|
+
a && (s = a[i] ?? a["*"]);
|
|
1089
|
+
}
|
|
1090
|
+
if (s === void 0) {
|
|
1091
|
+
let a = n[""];
|
|
1092
|
+
a && (s = a[i] ?? a["*"]);
|
|
1093
|
+
}
|
|
1094
|
+
return s ?? 0;
|
|
1095
|
+
}
|
|
1096
|
+
function pi(e) {
|
|
1097
|
+
return e.replace(Oa, (...t) => t[1].toUpperCase());
|
|
1098
|
+
}
|
|
1099
|
+
function Dt(e) {
|
|
1100
|
+
let [t, r] = Z(e.toLowerCase(), !1);
|
|
1101
|
+
return t === "svg" || t === "math" ? `:${t}:${r}` : r;
|
|
1102
|
+
}
|
|
1103
|
+
function Ua(e) {
|
|
1124
1104
|
switch (e) {
|
|
1125
1105
|
case "width":
|
|
1126
1106
|
case "height":
|
|
@@ -1153,22 +1133,22 @@ function Ba(e) {
|
|
|
1153
1133
|
default: return !1;
|
|
1154
1134
|
}
|
|
1155
1135
|
}
|
|
1156
|
-
function
|
|
1157
|
-
return
|
|
1158
|
-
base: new
|
|
1159
|
-
meta: new
|
|
1160
|
-
area: new
|
|
1161
|
-
embed: new
|
|
1162
|
-
link: new
|
|
1163
|
-
img: new
|
|
1164
|
-
input: new
|
|
1165
|
-
param: new
|
|
1166
|
-
hr: new
|
|
1167
|
-
br: new
|
|
1168
|
-
source: new
|
|
1169
|
-
track: new
|
|
1170
|
-
wbr: new
|
|
1171
|
-
p: new
|
|
1136
|
+
function Ne(e) {
|
|
1137
|
+
return tt || (di = new m({ canSelfClose: !0 }), tt = Object.assign(Object.create(null), {
|
|
1138
|
+
base: new m({ isVoid: !0 }),
|
|
1139
|
+
meta: new m({ isVoid: !0 }),
|
|
1140
|
+
area: new m({ isVoid: !0 }),
|
|
1141
|
+
embed: new m({ isVoid: !0 }),
|
|
1142
|
+
link: new m({ isVoid: !0 }),
|
|
1143
|
+
img: new m({ isVoid: !0 }),
|
|
1144
|
+
input: new m({ isVoid: !0 }),
|
|
1145
|
+
param: new m({ isVoid: !0 }),
|
|
1146
|
+
hr: new m({ isVoid: !0 }),
|
|
1147
|
+
br: new m({ isVoid: !0 }),
|
|
1148
|
+
source: new m({ isVoid: !0 }),
|
|
1149
|
+
track: new m({ isVoid: !0 }),
|
|
1150
|
+
wbr: new m({ isVoid: !0 }),
|
|
1151
|
+
p: new m({
|
|
1172
1152
|
closedByChildren: [
|
|
1173
1153
|
"address",
|
|
1174
1154
|
"article",
|
|
@@ -1199,44 +1179,44 @@ function Oe(e) {
|
|
|
1199
1179
|
],
|
|
1200
1180
|
closedByParent: !0
|
|
1201
1181
|
}),
|
|
1202
|
-
thead: new
|
|
1203
|
-
tbody: new
|
|
1182
|
+
thead: new m({ closedByChildren: ["tbody", "tfoot"] }),
|
|
1183
|
+
tbody: new m({
|
|
1204
1184
|
closedByChildren: ["tbody", "tfoot"],
|
|
1205
1185
|
closedByParent: !0
|
|
1206
1186
|
}),
|
|
1207
|
-
tfoot: new
|
|
1187
|
+
tfoot: new m({
|
|
1208
1188
|
closedByChildren: ["tbody"],
|
|
1209
1189
|
closedByParent: !0
|
|
1210
1190
|
}),
|
|
1211
|
-
tr: new
|
|
1191
|
+
tr: new m({
|
|
1212
1192
|
closedByChildren: ["tr"],
|
|
1213
1193
|
closedByParent: !0
|
|
1214
1194
|
}),
|
|
1215
|
-
td: new
|
|
1195
|
+
td: new m({
|
|
1216
1196
|
closedByChildren: ["td", "th"],
|
|
1217
1197
|
closedByParent: !0
|
|
1218
1198
|
}),
|
|
1219
|
-
th: new
|
|
1199
|
+
th: new m({
|
|
1220
1200
|
closedByChildren: ["td", "th"],
|
|
1221
1201
|
closedByParent: !0
|
|
1222
1202
|
}),
|
|
1223
|
-
col: new
|
|
1224
|
-
svg: new
|
|
1225
|
-
foreignObject: new
|
|
1203
|
+
col: new m({ isVoid: !0 }),
|
|
1204
|
+
svg: new m({ implicitNamespacePrefix: "svg" }),
|
|
1205
|
+
foreignObject: new m({
|
|
1226
1206
|
implicitNamespacePrefix: "svg",
|
|
1227
1207
|
preventNamespaceInheritance: !0
|
|
1228
1208
|
}),
|
|
1229
|
-
math: new
|
|
1230
|
-
li: new
|
|
1209
|
+
math: new m({ implicitNamespacePrefix: "math" }),
|
|
1210
|
+
li: new m({
|
|
1231
1211
|
closedByChildren: ["li"],
|
|
1232
1212
|
closedByParent: !0
|
|
1233
1213
|
}),
|
|
1234
|
-
dt: new
|
|
1235
|
-
dd: new
|
|
1214
|
+
dt: new m({ closedByChildren: ["dt", "dd"] }),
|
|
1215
|
+
dd: new m({
|
|
1236
1216
|
closedByChildren: ["dt", "dd"],
|
|
1237
1217
|
closedByParent: !0
|
|
1238
1218
|
}),
|
|
1239
|
-
rb: new
|
|
1219
|
+
rb: new m({
|
|
1240
1220
|
closedByChildren: [
|
|
1241
1221
|
"rb",
|
|
1242
1222
|
"rt",
|
|
@@ -1245,7 +1225,7 @@ function Oe(e) {
|
|
|
1245
1225
|
],
|
|
1246
1226
|
closedByParent: !0
|
|
1247
1227
|
}),
|
|
1248
|
-
rt: new
|
|
1228
|
+
rt: new m({
|
|
1249
1229
|
closedByChildren: [
|
|
1250
1230
|
"rb",
|
|
1251
1231
|
"rt",
|
|
@@ -1254,7 +1234,7 @@ function Oe(e) {
|
|
|
1254
1234
|
],
|
|
1255
1235
|
closedByParent: !0
|
|
1256
1236
|
}),
|
|
1257
|
-
rtc: new
|
|
1237
|
+
rtc: new m({
|
|
1258
1238
|
closedByChildren: [
|
|
1259
1239
|
"rb",
|
|
1260
1240
|
"rtc",
|
|
@@ -1262,7 +1242,7 @@ function Oe(e) {
|
|
|
1262
1242
|
],
|
|
1263
1243
|
closedByParent: !0
|
|
1264
1244
|
}),
|
|
1265
|
-
rp: new
|
|
1245
|
+
rp: new m({
|
|
1266
1246
|
closedByChildren: [
|
|
1267
1247
|
"rb",
|
|
1268
1248
|
"rt",
|
|
@@ -1271,38 +1251,38 @@ function Oe(e) {
|
|
|
1271
1251
|
],
|
|
1272
1252
|
closedByParent: !0
|
|
1273
1253
|
}),
|
|
1274
|
-
optgroup: new
|
|
1254
|
+
optgroup: new m({
|
|
1275
1255
|
closedByChildren: ["optgroup"],
|
|
1276
1256
|
closedByParent: !0
|
|
1277
1257
|
}),
|
|
1278
|
-
option: new
|
|
1258
|
+
option: new m({
|
|
1279
1259
|
closedByChildren: ["option", "optgroup"],
|
|
1280
1260
|
closedByParent: !0
|
|
1281
1261
|
}),
|
|
1282
|
-
pre: new
|
|
1283
|
-
listing: new
|
|
1284
|
-
style: new
|
|
1285
|
-
script: new
|
|
1286
|
-
title: new
|
|
1287
|
-
default:
|
|
1288
|
-
svg:
|
|
1262
|
+
pre: new m({ ignoreFirstLf: !0 }),
|
|
1263
|
+
listing: new m({ ignoreFirstLf: !0 }),
|
|
1264
|
+
style: new m({ contentType: 0 }),
|
|
1265
|
+
script: new m({ contentType: 0 }),
|
|
1266
|
+
title: new m({ contentType: {
|
|
1267
|
+
default: 1,
|
|
1268
|
+
svg: 2
|
|
1289
1269
|
} }),
|
|
1290
|
-
textarea: new
|
|
1291
|
-
contentType:
|
|
1270
|
+
textarea: new m({
|
|
1271
|
+
contentType: 1,
|
|
1292
1272
|
ignoreFirstLf: !0
|
|
1293
1273
|
})
|
|
1294
|
-
}), new
|
|
1295
|
-
!
|
|
1296
|
-
})),
|
|
1274
|
+
}), new fi().allKnownElementNames().forEach((t) => {
|
|
1275
|
+
!tt[t] && Pe(t) === null && (tt[t] = new m({ canSelfClose: !1 }));
|
|
1276
|
+
})), tt[e] ?? di;
|
|
1297
1277
|
}
|
|
1298
|
-
function
|
|
1278
|
+
function It(e, t, r = null) {
|
|
1299
1279
|
let n = [], i = e.visit ? (s) => e.visit(s, r) || s.visit(e, r) : (s) => s.visit(e, r);
|
|
1300
1280
|
return t.forEach((s) => {
|
|
1301
1281
|
let a = i(s);
|
|
1302
1282
|
a && n.push(a);
|
|
1303
1283
|
}), n;
|
|
1304
1284
|
}
|
|
1305
|
-
function
|
|
1285
|
+
function nt(e) {
|
|
1306
1286
|
return e >= 9 && e <= 32 || e == 160;
|
|
1307
1287
|
}
|
|
1308
1288
|
function Ie(e) {
|
|
@@ -1311,21 +1291,21 @@ function Ie(e) {
|
|
|
1311
1291
|
function Re(e) {
|
|
1312
1292
|
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
1313
1293
|
}
|
|
1314
|
-
function
|
|
1294
|
+
function Ei(e) {
|
|
1315
1295
|
return e >= 97 && e <= 102 || e >= 65 && e <= 70 || Ie(e);
|
|
1316
1296
|
}
|
|
1317
|
-
function
|
|
1297
|
+
function Oe(e) {
|
|
1318
1298
|
return e === 10 || e === 13;
|
|
1319
1299
|
}
|
|
1320
|
-
function
|
|
1300
|
+
function _r(e) {
|
|
1321
1301
|
return 48 <= e && e <= 55;
|
|
1322
1302
|
}
|
|
1323
|
-
function
|
|
1303
|
+
function Rt(e) {
|
|
1324
1304
|
return e === 39 || e === 34 || e === 96;
|
|
1325
1305
|
}
|
|
1326
|
-
function
|
|
1327
|
-
let i = new
|
|
1328
|
-
return i.tokenize(), new
|
|
1306
|
+
function Di(e, t, r, n = {}) {
|
|
1307
|
+
let i = new Ya(new rt(e, t), r, n);
|
|
1308
|
+
return i.tokenize(), new za(to(i.tokens), i.errors, i.nonNormalizedIcuExpressions);
|
|
1329
1309
|
}
|
|
1330
1310
|
function Se(e) {
|
|
1331
1311
|
return `Unexpected character "${e === 0 ? "EOF" : String.fromCharCode(e)}"`;
|
|
@@ -1333,78 +1313,79 @@ function Se(e) {
|
|
|
1333
1313
|
function xi(e) {
|
|
1334
1314
|
return `Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`;
|
|
1335
1315
|
}
|
|
1336
|
-
function
|
|
1316
|
+
function $a(e, t) {
|
|
1337
1317
|
return `Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`;
|
|
1338
1318
|
}
|
|
1339
|
-
function
|
|
1340
|
-
return !
|
|
1319
|
+
function b(e) {
|
|
1320
|
+
return !nt(e) || e === 0;
|
|
1341
1321
|
}
|
|
1342
|
-
function
|
|
1343
|
-
return
|
|
1322
|
+
function ve(e) {
|
|
1323
|
+
return nt(e) || e === 62 || e === 60 || e === 47 || e === 39 || e === 34 || e === 61 || e === 0;
|
|
1344
1324
|
}
|
|
1345
|
-
function
|
|
1325
|
+
function Ka(e) {
|
|
1346
1326
|
return (e < 97 || 122 < e) && (e < 65 || 90 < e) && (e < 48 || e > 57);
|
|
1347
1327
|
}
|
|
1348
|
-
function
|
|
1349
|
-
return e === 59 || e === 0 || !
|
|
1328
|
+
function Qa(e) {
|
|
1329
|
+
return e === 59 || e === 0 || !Ei(e);
|
|
1350
1330
|
}
|
|
1351
|
-
function
|
|
1331
|
+
function Xa(e) {
|
|
1352
1332
|
return e === 59 || e === 0 || !(Re(e) || Ie(e));
|
|
1353
1333
|
}
|
|
1354
|
-
function
|
|
1334
|
+
function Ja(e) {
|
|
1355
1335
|
return e !== 125;
|
|
1356
1336
|
}
|
|
1357
|
-
function
|
|
1358
|
-
return
|
|
1337
|
+
function Za(e, t) {
|
|
1338
|
+
return Li(e) === Li(t);
|
|
1359
1339
|
}
|
|
1360
|
-
function
|
|
1340
|
+
function Li(e) {
|
|
1361
1341
|
return e >= 97 && e <= 122 ? e - 97 + 65 : e;
|
|
1362
1342
|
}
|
|
1363
|
-
function
|
|
1343
|
+
function eo(e) {
|
|
1364
1344
|
return Re(e) || Ie(e) || e === 95;
|
|
1365
1345
|
}
|
|
1366
1346
|
function Ai(e) {
|
|
1367
|
-
return e !== 59 &&
|
|
1347
|
+
return e !== 59 && b(e);
|
|
1368
1348
|
}
|
|
1369
|
-
function
|
|
1349
|
+
function Ot(e) {
|
|
1370
1350
|
return e === 95 || e >= 65 && e <= 90;
|
|
1371
1351
|
}
|
|
1372
|
-
function
|
|
1352
|
+
function Pi(e) {
|
|
1373
1353
|
return Re(e) || Ie(e) || e === 95;
|
|
1374
1354
|
}
|
|
1375
|
-
function
|
|
1355
|
+
function Ni(e) {
|
|
1376
1356
|
return e === 47 || e === 62 || e === 60 || e === 0;
|
|
1377
1357
|
}
|
|
1378
|
-
function
|
|
1358
|
+
function to(e) {
|
|
1379
1359
|
let t = [], r;
|
|
1380
1360
|
for (let n = 0; n < e.length; n++) {
|
|
1381
1361
|
let i = e[n];
|
|
1382
|
-
r && r.type ===
|
|
1362
|
+
r && r.type === 5 && i.type === 5 || r && r.type === 17 && i.type === 17 ? (r.parts[0] += i.parts[0], r.sourceSpan.end = i.sourceSpan.end) : (r = i, t.push(r));
|
|
1383
1363
|
}
|
|
1384
1364
|
return t;
|
|
1385
1365
|
}
|
|
1386
|
-
function
|
|
1366
|
+
function Ri(e, t) {
|
|
1387
1367
|
return e.length > 0 && e[e.length - 1] === t;
|
|
1388
1368
|
}
|
|
1389
|
-
function
|
|
1369
|
+
function Oi(e, t) {
|
|
1390
1370
|
return _e[t] !== void 0 ? _e[t] || e : /^#x[a-f0-9]+$/i.test(t) ? String.fromCodePoint(parseInt(t.slice(2), 16)) : /^#\d+$/.test(t) ? String.fromCodePoint(parseInt(t.slice(1), 10)) : e;
|
|
1391
1371
|
}
|
|
1392
|
-
function
|
|
1393
|
-
let { canSelfClose: r = !1, allowHtmComponentClosingTags: n = !1,
|
|
1394
|
-
return
|
|
1395
|
-
tokenizeExpansionForms:
|
|
1372
|
+
function Mt(e, t = {}) {
|
|
1373
|
+
let { canSelfClose: r = !1, allowHtmComponentClosingTags: n = !1, allowStartTagComments: i = !1, isTagNameCaseSensitive: s = !1, getTagContentType: a, tokenizeAngularBlocks: o = !1, tokenizeAngularLetDeclaration: l = !1, enableAngularSelectorlessSyntax: c = !1 } = t;
|
|
1374
|
+
return kr ?? (kr = new Hi()), kr.parse(e, "angular-html-parser", {
|
|
1375
|
+
tokenizeExpansionForms: o,
|
|
1396
1376
|
canSelfClose: r,
|
|
1397
1377
|
allowHtmComponentClosingTags: n,
|
|
1398
|
-
|
|
1399
|
-
|
|
1378
|
+
allowStartTagComments: i,
|
|
1379
|
+
tokenizeBlocks: o,
|
|
1380
|
+
tokenizeLet: l,
|
|
1400
1381
|
selectorlessEnabled: c
|
|
1401
|
-
},
|
|
1382
|
+
}, s, a);
|
|
1402
1383
|
}
|
|
1403
|
-
function
|
|
1404
|
-
for (let r of
|
|
1384
|
+
function ao(e, t) {
|
|
1385
|
+
for (let r of so) r(e, t);
|
|
1405
1386
|
return e;
|
|
1406
1387
|
}
|
|
1407
|
-
function
|
|
1388
|
+
function oo(e) {
|
|
1408
1389
|
e.walk((t) => {
|
|
1409
1390
|
if (t.kind === "element" && t.tagDefinition.ignoreFirstLf && t.children.length > 0 && t.children[0].kind === "text" && t.children[0].value[0] === `
|
|
1410
1391
|
`) {
|
|
@@ -1413,7 +1394,7 @@ function to(e) {
|
|
|
1413
1394
|
}
|
|
1414
1395
|
});
|
|
1415
1396
|
}
|
|
1416
|
-
function
|
|
1397
|
+
function lo(e) {
|
|
1417
1398
|
let t = (r) => r.kind === "element" && r.prev?.kind === "ieConditionalStartComment" && r.prev.sourceSpan.end.offset === r.startSourceSpan.start.offset && r.firstChild?.kind === "ieConditionalEndComment" && r.firstChild.sourceSpan.start.offset === r.startSourceSpan.end.offset;
|
|
1418
1399
|
e.walk((r) => {
|
|
1419
1400
|
if (r.children) for (let n = 0; n < r.children.length; n++) {
|
|
@@ -1421,60 +1402,60 @@ function ro(e) {
|
|
|
1421
1402
|
if (!t(i)) continue;
|
|
1422
1403
|
let s = i.prev, a = i.firstChild;
|
|
1423
1404
|
r.removeChild(s), n--;
|
|
1424
|
-
let o = new
|
|
1425
|
-
i.condition = s.condition, i.sourceSpan =
|
|
1405
|
+
let o = new p(s.sourceSpan.start, a.sourceSpan.end), l = new p(o.start, i.sourceSpan.end);
|
|
1406
|
+
i.condition = s.condition, i.sourceSpan = l, i.startSourceSpan = o, i.removeChild(a);
|
|
1426
1407
|
}
|
|
1427
1408
|
});
|
|
1428
1409
|
}
|
|
1429
|
-
function
|
|
1410
|
+
function co(e, t, r) {
|
|
1430
1411
|
e.walk((n) => {
|
|
1431
1412
|
if (n.children) for (let i = 0; i < n.children.length; i++) {
|
|
1432
1413
|
let s = n.children[i];
|
|
1433
1414
|
if (s.kind !== "text" && !t(s)) continue;
|
|
1434
1415
|
s.kind !== "text" && (s.kind = "text", s.value = r(s));
|
|
1435
1416
|
let a = s.prev;
|
|
1436
|
-
!a || a.kind !== "text" || (a.value += s.value, a.sourceSpan = new
|
|
1417
|
+
!a || a.kind !== "text" || (a.value += s.value, a.sourceSpan = new p(a.sourceSpan.start, s.sourceSpan.end), n.removeChild(s), i--);
|
|
1437
1418
|
}
|
|
1438
1419
|
});
|
|
1439
1420
|
}
|
|
1440
|
-
function
|
|
1441
|
-
return
|
|
1421
|
+
function uo(e) {
|
|
1422
|
+
return co(e, (t) => t.kind === "cdata", (t) => `<![CDATA[${t.value}]]>`);
|
|
1442
1423
|
}
|
|
1443
|
-
function
|
|
1444
|
-
let t = (r) => r.kind === "element" && r.attrs.length === 0 && r.children.length === 1 && r.firstChild.kind === "text" && !
|
|
1424
|
+
function po(e) {
|
|
1425
|
+
let t = (r) => r.kind === "element" && r.attrs.length === 0 && !X(r.startTagComments) && r.children.length === 1 && r.firstChild.kind === "text" && !P.hasWhitespaceCharacter(r.children[0].value) && !r.firstChild.hasLeadingSpaces && !r.firstChild.hasTrailingSpaces && r.isLeadingSpaceSensitive && !r.hasLeadingSpaces && r.isTrailingSpaceSensitive && !r.hasTrailingSpaces && r.prev?.kind === "text" && r.next?.kind === "text";
|
|
1445
1426
|
e.walk((r) => {
|
|
1446
1427
|
if (r.children) for (let n = 0; n < r.children.length; n++) {
|
|
1447
1428
|
let i = r.children[n];
|
|
1448
1429
|
if (!t(i)) continue;
|
|
1449
1430
|
let s = i.prev, a = i.next;
|
|
1450
|
-
s.value += `<${i.rawName}>` + i.firstChild.value + `</${i.rawName}>` + a.value, s.sourceSpan = new
|
|
1431
|
+
s.value += `<${i.rawName}>` + i.firstChild.value + `</${i.rawName}>` + a.value, s.sourceSpan = new p(s.sourceSpan.start, a.sourceSpan.end), s.isTrailingSpaceSensitive = a.isTrailingSpaceSensitive, s.hasTrailingSpaces = a.hasTrailingSpaces, r.removeChild(i), n--, r.removeChild(a);
|
|
1451
1432
|
}
|
|
1452
1433
|
});
|
|
1453
1434
|
}
|
|
1454
|
-
function
|
|
1435
|
+
function ho(e, t) {
|
|
1455
1436
|
if (t.parser === "html") return;
|
|
1456
|
-
let r = /\{\{(.+?)\}\}/
|
|
1437
|
+
let r = /\{\{(.+?)\}\}/s;
|
|
1457
1438
|
e.walk((n) => {
|
|
1458
|
-
if (
|
|
1439
|
+
if (rn(n, t)) for (let i of n.children) {
|
|
1459
1440
|
if (i.kind !== "text") continue;
|
|
1460
|
-
let s = i.sourceSpan.start, a
|
|
1461
|
-
for (let
|
|
1462
|
-
let
|
|
1463
|
-
if (
|
|
1464
|
-
a = s.moveBy(
|
|
1441
|
+
let s = i.sourceSpan.start, a, o = i.value.split(r);
|
|
1442
|
+
for (let l = 0; l < o.length; l++, s = a) {
|
|
1443
|
+
let c = o[l];
|
|
1444
|
+
if (l % 2 === 0) {
|
|
1445
|
+
a = s.moveBy(c.length), c.length > 0 && n.insertChildBefore(i, {
|
|
1465
1446
|
kind: "text",
|
|
1466
|
-
value:
|
|
1467
|
-
sourceSpan: new
|
|
1447
|
+
value: c,
|
|
1448
|
+
sourceSpan: new p(s, a)
|
|
1468
1449
|
});
|
|
1469
1450
|
continue;
|
|
1470
1451
|
}
|
|
1471
|
-
a = s.moveBy(
|
|
1452
|
+
a = s.moveBy(c.length + 4), n.insertChildBefore(i, {
|
|
1472
1453
|
kind: "interpolation",
|
|
1473
|
-
sourceSpan: new
|
|
1474
|
-
children:
|
|
1454
|
+
sourceSpan: new p(s, a),
|
|
1455
|
+
children: c.length === 0 ? [] : [{
|
|
1475
1456
|
kind: "text",
|
|
1476
|
-
value:
|
|
1477
|
-
sourceSpan: new
|
|
1457
|
+
value: c,
|
|
1458
|
+
sourceSpan: new p(s.moveBy(2), a.moveBy(-2))
|
|
1478
1459
|
}]
|
|
1479
1460
|
});
|
|
1480
1461
|
}
|
|
@@ -1482,48 +1463,48 @@ function ao(e, t) {
|
|
|
1482
1463
|
}
|
|
1483
1464
|
});
|
|
1484
1465
|
}
|
|
1485
|
-
function
|
|
1466
|
+
function mo(e, t) {
|
|
1486
1467
|
e.walk((r) => {
|
|
1487
1468
|
let n = r.$children;
|
|
1488
1469
|
if (!n) return;
|
|
1489
|
-
if (n.length === 0 || n.length === 1 && n[0].kind === "text" &&
|
|
1470
|
+
if (n.length === 0 || n.length === 1 && n[0].kind === "text" && P.trim(n[0].value).length === 0) {
|
|
1490
1471
|
r.hasDanglingSpaces = n.length > 0, r.$children = [];
|
|
1491
1472
|
return;
|
|
1492
1473
|
}
|
|
1493
|
-
let i =
|
|
1474
|
+
let i = nn(r, t), s = er(r);
|
|
1494
1475
|
if (!i) for (let a = 0; a < n.length; a++) {
|
|
1495
1476
|
let o = n[a];
|
|
1496
1477
|
if (o.kind !== "text") continue;
|
|
1497
|
-
let { leadingWhitespace:
|
|
1498
|
-
|
|
1478
|
+
let { leadingWhitespace: l, text: c, trailingWhitespace: u } = tn(o.value), d = o.prev, _ = o.next;
|
|
1479
|
+
c ? (o.value = c, o.sourceSpan = new p(o.sourceSpan.start.moveBy(l.length), o.sourceSpan.end.moveBy(-u.length)), l && (d && (d.hasTrailingSpaces = !0), o.hasLeadingSpaces = !0), u && (o.hasTrailingSpaces = !0, _ && (_.hasLeadingSpaces = !0))) : (r.removeChild(o), a--, (l || u) && (d && (d.hasTrailingSpaces = !0), _ && (_.hasLeadingSpaces = !0)));
|
|
1499
1480
|
}
|
|
1500
1481
|
r.isWhitespaceSensitive = i, r.isIndentationSensitive = s;
|
|
1501
1482
|
});
|
|
1502
1483
|
}
|
|
1503
|
-
function
|
|
1484
|
+
function fo(e) {
|
|
1504
1485
|
e.walk((t) => {
|
|
1505
1486
|
t.isSelfClosing = !t.children || t.kind === "element" && (t.tagDefinition.isVoid || t.endSourceSpan && t.startSourceSpan.start === t.endSourceSpan.start && t.startSourceSpan.end === t.endSourceSpan.end);
|
|
1506
1487
|
});
|
|
1507
1488
|
}
|
|
1508
|
-
function
|
|
1489
|
+
function go(e, t) {
|
|
1509
1490
|
e.walk((r) => {
|
|
1510
|
-
r.kind === "element" && (r.hasHtmComponentClosingTag = r.endSourceSpan && /^<\s*\/\s*\/\s
|
|
1491
|
+
r.kind === "element" && (r.hasHtmComponentClosingTag = r.endSourceSpan && /^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(r.endSourceSpan.start.offset, r.endSourceSpan.end.offset)));
|
|
1511
1492
|
});
|
|
1512
1493
|
}
|
|
1513
|
-
function
|
|
1494
|
+
function _o(e, t) {
|
|
1514
1495
|
e.walk((r) => {
|
|
1515
|
-
r.cssDisplay =
|
|
1496
|
+
r.cssDisplay = fn(r, t);
|
|
1516
1497
|
});
|
|
1517
1498
|
}
|
|
1518
|
-
function
|
|
1499
|
+
function So(e, t) {
|
|
1519
1500
|
e.walk((r) => {
|
|
1520
1501
|
let { children: n } = r;
|
|
1521
1502
|
if (n) {
|
|
1522
1503
|
if (n.length === 0) {
|
|
1523
|
-
r.isDanglingSpaceSensitive =
|
|
1504
|
+
r.isDanglingSpaceSensitive = on(r, t);
|
|
1524
1505
|
return;
|
|
1525
1506
|
}
|
|
1526
|
-
for (let i of n) i.isLeadingSpaceSensitive =
|
|
1507
|
+
for (let i of n) i.isLeadingSpaceSensitive = sn(i, t), i.isTrailingSpaceSensitive = an(i, t);
|
|
1527
1508
|
for (let i = 0; i < n.length; i++) {
|
|
1528
1509
|
let s = n[i];
|
|
1529
1510
|
s.isLeadingSpaceSensitive = (i === 0 || s.prev.isTrailingSpaceSensitive) && s.isLeadingSpaceSensitive, s.isTrailingSpaceSensitive = (i === n.length - 1 || s.next.isLeadingSpaceSensitive) && s.isTrailingSpaceSensitive;
|
|
@@ -1531,148 +1512,151 @@ function po(e, t) {
|
|
|
1531
1512
|
}
|
|
1532
1513
|
});
|
|
1533
1514
|
}
|
|
1534
|
-
function
|
|
1515
|
+
function vo(e, t, r) {
|
|
1535
1516
|
let { node: n } = e;
|
|
1536
1517
|
switch (n.kind) {
|
|
1537
|
-
case "root": return t.__onHtmlRoot && t.__onHtmlRoot(n), [
|
|
1518
|
+
case "root": return t.__onHtmlRoot && t.__onHtmlRoot(n), [C(Ae(e, t, r)), k];
|
|
1538
1519
|
case "element":
|
|
1539
|
-
case "ieConditionalComment": return
|
|
1540
|
-
case "angularControlFlowBlock": return
|
|
1541
|
-
case "angularControlFlowBlockParameters": return
|
|
1542
|
-
case "angularControlFlowBlockParameter": return
|
|
1543
|
-
case "angularLetDeclaration": return
|
|
1520
|
+
case "ieConditionalComment": return li(e, t, r);
|
|
1521
|
+
case "angularControlFlowBlock": return ni(e, t, r);
|
|
1522
|
+
case "angularControlFlowBlockParameters": return si(e, t, r);
|
|
1523
|
+
case "angularControlFlowBlockParameter": return P.trim(n.expression);
|
|
1524
|
+
case "angularLetDeclaration": return C([
|
|
1544
1525
|
"@let ",
|
|
1545
|
-
|
|
1526
|
+
C([
|
|
1546
1527
|
n.id,
|
|
1547
1528
|
" =",
|
|
1548
|
-
|
|
1529
|
+
C(A([S, r("init")]))
|
|
1549
1530
|
]),
|
|
1550
1531
|
";"
|
|
1551
1532
|
]);
|
|
1552
1533
|
case "angularLetDeclarationInitializer": return n.value;
|
|
1553
|
-
case "angularIcuExpression": return
|
|
1554
|
-
case "angularIcuCase": return
|
|
1534
|
+
case "angularIcuExpression": return ai(e, t, r);
|
|
1535
|
+
case "angularIcuCase": return oi(e, t, r);
|
|
1555
1536
|
case "ieConditionalStartComment":
|
|
1556
|
-
case "ieConditionalEndComment": return [me(n),
|
|
1537
|
+
case "ieConditionalEndComment": return [me(n), ue(n)];
|
|
1557
1538
|
case "interpolation": return [
|
|
1558
1539
|
me(n, t),
|
|
1559
1540
|
...e.map(r, "children"),
|
|
1560
|
-
|
|
1541
|
+
ue(n, t)
|
|
1561
1542
|
];
|
|
1562
1543
|
case "text": {
|
|
1563
1544
|
if (n.parent.kind === "interpolation") {
|
|
1564
|
-
let o = /\n[^\S\n]
|
|
1565
|
-
return [L(
|
|
1545
|
+
let o = /\n[^\S\n]*$/, l = o.test(n.value);
|
|
1546
|
+
return [L(l ? n.value.replace(o, "") : n.value), l ? k : ""];
|
|
1566
1547
|
}
|
|
1567
|
-
let i =
|
|
1548
|
+
let i = B(n, t), s = Tt(n), a = M(n, t);
|
|
1568
1549
|
return s[0] = [i, s[0]], s.push([s.pop(), a]), gt(s);
|
|
1569
1550
|
}
|
|
1570
|
-
case "docType": return [
|
|
1551
|
+
case "docType": return [C([
|
|
1571
1552
|
me(n, t),
|
|
1572
1553
|
" ",
|
|
1573
|
-
|
|
1574
|
-
]),
|
|
1554
|
+
T(0, n.value.replace(/^html\b/i, "html"), /\s+/g, " ")
|
|
1555
|
+
]), ue(n, t)];
|
|
1575
1556
|
case "comment": return [
|
|
1576
|
-
|
|
1577
|
-
L(t.originalText.slice(
|
|
1578
|
-
|
|
1557
|
+
B(n, t),
|
|
1558
|
+
L(t.originalText.slice(F(n), J(n))),
|
|
1559
|
+
M(n, t)
|
|
1579
1560
|
];
|
|
1580
1561
|
case "attribute": {
|
|
1581
1562
|
if (n.value === null) return n.rawName;
|
|
1582
|
-
let i =
|
|
1563
|
+
let i = nr(n.value), s = Et(n, t) ? "" : Wr(i, "\"");
|
|
1583
1564
|
return [
|
|
1584
1565
|
n.rawName,
|
|
1585
1566
|
"=",
|
|
1586
1567
|
s,
|
|
1587
|
-
L(s === "\"" ?
|
|
1568
|
+
L(s === "\"" ? T(0, i, "\"", """) : T(0, i, "'", "'")),
|
|
1588
1569
|
s
|
|
1589
1570
|
];
|
|
1590
1571
|
}
|
|
1572
|
+
case "startTagComment": return ci(e);
|
|
1591
1573
|
default: throw new Gr(n, "HTML");
|
|
1592
1574
|
}
|
|
1593
1575
|
}
|
|
1594
|
-
function
|
|
1576
|
+
function bo(e, t) {
|
|
1595
1577
|
let r = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
|
|
1596
1578
|
return Object.assign(r, t);
|
|
1597
1579
|
}
|
|
1598
|
-
function
|
|
1580
|
+
function Bt(e) {
|
|
1599
1581
|
return {
|
|
1600
|
-
...
|
|
1582
|
+
...wo,
|
|
1601
1583
|
...e
|
|
1602
1584
|
};
|
|
1603
1585
|
}
|
|
1604
|
-
function
|
|
1605
|
-
let { canSelfClose: t, allowHtmComponentClosingTags: r,
|
|
1586
|
+
function wr(e) {
|
|
1587
|
+
let { canSelfClose: t, allowHtmComponentClosingTags: r, allowStartTagComments: n, isTagNameCaseSensitive: i, shouldParseAsRawText: s, tokenizeAngularBlocks: a, tokenizeAngularLetDeclaration: o } = e;
|
|
1606
1588
|
return {
|
|
1607
1589
|
canSelfClose: t,
|
|
1608
1590
|
allowHtmComponentClosingTags: r,
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1591
|
+
allowStartTagComments: n,
|
|
1592
|
+
isTagNameCaseSensitive: i,
|
|
1593
|
+
getTagContentType: s ? (...l) => s(...l) ? lr.RAW_TEXT : void 0 : void 0,
|
|
1594
|
+
tokenizeAngularBlocks: a,
|
|
1595
|
+
tokenizeAngularLetDeclaration: o
|
|
1613
1596
|
};
|
|
1614
1597
|
}
|
|
1615
|
-
function
|
|
1598
|
+
function To(e, t) {
|
|
1616
1599
|
let r = e.map(t);
|
|
1617
1600
|
return r.some((n, i) => n !== e[i]) ? r : e;
|
|
1618
1601
|
}
|
|
1619
1602
|
function Yi(e, t) {
|
|
1620
|
-
if (e.value) for (let { regex: r, parse: n } of
|
|
1603
|
+
if (e.value) for (let { regex: r, parse: n } of yo) {
|
|
1621
1604
|
let i = e.value.match(r);
|
|
1622
1605
|
if (i) return n(e, i, t);
|
|
1623
1606
|
}
|
|
1624
1607
|
return null;
|
|
1625
1608
|
}
|
|
1626
|
-
function
|
|
1627
|
-
let { openingTagSuffix: n, condition: i, data: s } = t.groups, a = 4 + n.length, o = e.sourceSpan.start.moveBy(a),
|
|
1609
|
+
function Eo(e, t, r) {
|
|
1610
|
+
let { openingTagSuffix: n, condition: i, data: s } = t.groups, a = 4 + n.length, o = e.sourceSpan.start.moveBy(a), l = o.moveBy(s.length), [c, u] = (() => {
|
|
1628
1611
|
try {
|
|
1629
1612
|
return [!0, r(s, o).children];
|
|
1630
1613
|
} catch {
|
|
1631
1614
|
return [!1, [{
|
|
1632
1615
|
kind: "text",
|
|
1633
1616
|
value: s,
|
|
1634
|
-
sourceSpan: new
|
|
1617
|
+
sourceSpan: new p(o, l)
|
|
1635
1618
|
}]];
|
|
1636
1619
|
}
|
|
1637
1620
|
})();
|
|
1638
1621
|
return {
|
|
1639
1622
|
kind: "ieConditionalComment",
|
|
1640
|
-
complete:
|
|
1641
|
-
children:
|
|
1642
|
-
condition:
|
|
1623
|
+
complete: c,
|
|
1624
|
+
children: u,
|
|
1625
|
+
condition: T(0, i.trim(), /\s+/g, " "),
|
|
1643
1626
|
sourceSpan: e.sourceSpan,
|
|
1644
|
-
startSourceSpan: new
|
|
1645
|
-
endSourceSpan: new
|
|
1627
|
+
startSourceSpan: new p(e.sourceSpan.start, o),
|
|
1628
|
+
endSourceSpan: new p(l, e.sourceSpan.end)
|
|
1646
1629
|
};
|
|
1647
1630
|
}
|
|
1648
|
-
function
|
|
1631
|
+
function xo(e, t) {
|
|
1649
1632
|
let { condition: r } = t.groups;
|
|
1650
1633
|
return {
|
|
1651
1634
|
kind: "ieConditionalStartComment",
|
|
1652
|
-
condition:
|
|
1635
|
+
condition: T(0, r.trim(), /\s+/g, " "),
|
|
1653
1636
|
sourceSpan: e.sourceSpan
|
|
1654
1637
|
};
|
|
1655
1638
|
}
|
|
1656
|
-
function
|
|
1639
|
+
function Lo(e) {
|
|
1657
1640
|
return {
|
|
1658
1641
|
kind: "ieConditionalEndComment",
|
|
1659
1642
|
sourceSpan: e.sourceSpan
|
|
1660
1643
|
};
|
|
1661
1644
|
}
|
|
1662
|
-
function
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1645
|
+
function Xi(e, t, r, n) {
|
|
1646
|
+
let i = r.name === "angular";
|
|
1647
|
+
It(new Er(), e.children, { parseOptions: r }), t && e.children.unshift(t);
|
|
1648
|
+
let s = new Ft(e);
|
|
1649
|
+
return s.walk((a) => {
|
|
1650
|
+
if (a.kind === "comment") {
|
|
1651
|
+
let o = Yi(a, n);
|
|
1652
|
+
o && a.parent.replaceChild(a, o);
|
|
1653
|
+
} else i && a.kind === "element" && a.comments && (a.startTagComments = a.comments, delete a.comments);
|
|
1654
|
+
i && (Ao(a), Po(a), No(a));
|
|
1655
|
+
}), s;
|
|
1672
1656
|
}
|
|
1673
|
-
function
|
|
1657
|
+
function Ao(e) {
|
|
1674
1658
|
if (e.kind === "block") {
|
|
1675
|
-
if (e.name =
|
|
1659
|
+
if (e.name = T(0, e.name.toLowerCase(), /\s+/g, " ").trim(), e.kind = "angularControlFlowBlock", !X(e.parameters)) {
|
|
1676
1660
|
delete e.parameters;
|
|
1677
1661
|
return;
|
|
1678
1662
|
}
|
|
@@ -1680,33 +1664,33 @@ function bo(e) {
|
|
|
1680
1664
|
e.parameters = {
|
|
1681
1665
|
kind: "angularControlFlowBlockParameters",
|
|
1682
1666
|
children: e.parameters,
|
|
1683
|
-
sourceSpan: new
|
|
1667
|
+
sourceSpan: new p(e.parameters[0].sourceSpan.start, I(0, e.parameters, -1).sourceSpan.end)
|
|
1684
1668
|
};
|
|
1685
1669
|
}
|
|
1686
1670
|
}
|
|
1687
|
-
function
|
|
1671
|
+
function Po(e) {
|
|
1688
1672
|
e.kind === "letDeclaration" && (e.kind = "angularLetDeclaration", e.id = e.name, e.init = {
|
|
1689
1673
|
kind: "angularLetDeclarationInitializer",
|
|
1690
|
-
sourceSpan: new
|
|
1674
|
+
sourceSpan: new p(e.valueSpan.start, e.valueSpan.end),
|
|
1691
1675
|
value: e.value
|
|
1692
1676
|
}, delete e.name, delete e.value);
|
|
1693
1677
|
}
|
|
1694
|
-
function
|
|
1678
|
+
function No(e) {
|
|
1695
1679
|
e.kind === "expansion" && (e.kind = "angularIcuExpression"), e.kind === "expansionCase" && (e.kind = "angularIcuCase");
|
|
1696
1680
|
}
|
|
1697
|
-
function
|
|
1681
|
+
function Ki(e, t) {
|
|
1698
1682
|
let r = e.toLowerCase();
|
|
1699
1683
|
return t(r) ? r : e;
|
|
1700
1684
|
}
|
|
1701
|
-
function
|
|
1702
|
-
let t = e.name.startsWith(":") ? e.name.slice(1).split(":")[0] : null, r = e.nameSpan.toString(), n = t !== null && r.startsWith(`${t}:`);
|
|
1685
|
+
function Qi(e) {
|
|
1686
|
+
let t = e.name.startsWith(":") ? e.name.slice(1).split(":", 1)[0] : null, r = e.nameSpan.toString(), n = t !== null && r.startsWith(`${t}:`);
|
|
1703
1687
|
e.name = n ? r.slice(t.length + 1) : r, e.namespace = t, e.hasExplicitNamespace = n;
|
|
1704
1688
|
}
|
|
1705
|
-
function
|
|
1689
|
+
function Do(e) {
|
|
1706
1690
|
switch (e.kind) {
|
|
1707
1691
|
case "element":
|
|
1708
|
-
|
|
1709
|
-
for (let t of e.attrs)
|
|
1692
|
+
Qi(e);
|
|
1693
|
+
for (let t of e.attrs) Qi(t), t.valueSpan ? (t.value = t.valueSpan.toString(), /["']/.test(t.value[0]) && (t.value = t.value.slice(1, -1))) : t.value = null;
|
|
1710
1694
|
break;
|
|
1711
1695
|
case "comment":
|
|
1712
1696
|
e.value = e.sourceSpan.toString().slice(4, -3);
|
|
@@ -1716,40 +1700,40 @@ function xo(e) {
|
|
|
1716
1700
|
break;
|
|
1717
1701
|
}
|
|
1718
1702
|
}
|
|
1719
|
-
function
|
|
1703
|
+
function Io(e, t) {
|
|
1720
1704
|
if (e.kind === "element") {
|
|
1721
|
-
let r =
|
|
1722
|
-
!e.namespace || e.namespace === r.implicitNamespacePrefix ||
|
|
1705
|
+
let r = Ne(t.isTagNameCaseSensitive ? e.name : e.name.toLowerCase());
|
|
1706
|
+
!e.namespace || e.namespace === r.implicitNamespacePrefix || oe(e) ? e.tagDefinition = r : e.tagDefinition = Ne("");
|
|
1723
1707
|
}
|
|
1724
1708
|
}
|
|
1725
|
-
function
|
|
1726
|
-
e.sourceSpan && e.endSourceSpan && (e.sourceSpan = new
|
|
1709
|
+
function Ro(e) {
|
|
1710
|
+
e.sourceSpan && e.endSourceSpan && (e.sourceSpan = new p(e.sourceSpan.start, e.endSourceSpan.end));
|
|
1727
1711
|
}
|
|
1728
|
-
function
|
|
1729
|
-
if (e.kind === "element" && (t.normalizeTagName && (!e.namespace || e.namespace === e.tagDefinition.implicitNamespacePrefix ||
|
|
1712
|
+
function Oo(e, t) {
|
|
1713
|
+
if (e.kind === "element" && (t.normalizeTagName && (!e.namespace || e.namespace === e.tagDefinition.implicitNamespacePrefix || oe(e)) && (e.name = Ki(e.name, (r) => $i.has(r))), t.normalizeAttributeName)) for (let r of e.attrs) r.namespace || (r.name = Ki(r.name, (n) => qt.has(e.name) && (qt.get("*").has(n) || qt.get(e.name).has(n))));
|
|
1730
1714
|
}
|
|
1731
|
-
function
|
|
1732
|
-
let { rootNodes: r, errors: n } =
|
|
1715
|
+
function Lr(e, t) {
|
|
1716
|
+
let { rootNodes: r, errors: n } = Mt(e, wr(t));
|
|
1733
1717
|
return n.length > 0 && xr(n[0]), {
|
|
1734
1718
|
parseOptions: t,
|
|
1735
1719
|
rootNodes: r
|
|
1736
1720
|
};
|
|
1737
1721
|
}
|
|
1738
|
-
function
|
|
1739
|
-
let r =
|
|
1740
|
-
if (n.some((
|
|
1741
|
-
let a, o = () => a ?? (a =
|
|
1722
|
+
function Ji(e, t) {
|
|
1723
|
+
let r = wr(t), { rootNodes: n, errors: i } = Mt(e, r);
|
|
1724
|
+
if (n.some((c) => c.kind === "docType" && c.value === "html" || c.kind === "element" && c.name.toLowerCase() === "html")) return Lr(e, Vt);
|
|
1725
|
+
let a, o = () => a ?? (a = Mt(e, {
|
|
1742
1726
|
...r,
|
|
1743
1727
|
getTagContentType: void 0
|
|
1744
|
-
})),
|
|
1745
|
-
let { offset:
|
|
1746
|
-
return o().rootNodes.find((d) => d.kind === "element" && d.startSourceSpan.start.offset ===
|
|
1728
|
+
})), l = (c) => {
|
|
1729
|
+
let { offset: u } = c.startSourceSpan.start;
|
|
1730
|
+
return o().rootNodes.find((d) => d.kind === "element" && d.startSourceSpan.start.offset === u) ?? c;
|
|
1747
1731
|
};
|
|
1748
|
-
for (let [
|
|
1749
|
-
if (
|
|
1750
|
-
else if (
|
|
1751
|
-
let { endSourceSpan: d, startSourceSpan:
|
|
1752
|
-
|
|
1732
|
+
for (let [c, u] of n.entries()) if (u.kind === "element") {
|
|
1733
|
+
if (u.isVoid) i = o().errors, n[c] = l(u);
|
|
1734
|
+
else if (Mo(u)) {
|
|
1735
|
+
let { endSourceSpan: d, startSourceSpan: _ } = u, h = o().errors.find((f) => f.span.start.offset > _.start.offset && f.span.start.offset < d.end.offset);
|
|
1736
|
+
h && xr(h), n[c] = l(u);
|
|
1753
1737
|
}
|
|
1754
1738
|
}
|
|
1755
1739
|
return i.length > 0 && xr(i[0]), {
|
|
@@ -1757,7 +1741,7 @@ function Qi(e, t) {
|
|
|
1757
1741
|
rootNodes: n
|
|
1758
1742
|
};
|
|
1759
1743
|
}
|
|
1760
|
-
function
|
|
1744
|
+
function Mo(e) {
|
|
1761
1745
|
if (e.kind !== "element" || e.name !== "template") return !1;
|
|
1762
1746
|
let t = e.attrs.find((r) => r.name === "lang")?.value;
|
|
1763
1747
|
return !t || t === "html";
|
|
@@ -1778,131 +1762,130 @@ function xr(e) {
|
|
|
1778
1762
|
cause: e
|
|
1779
1763
|
});
|
|
1780
1764
|
}
|
|
1781
|
-
function
|
|
1782
|
-
let { offset: a } = n,
|
|
1765
|
+
function Bo(e, t, r, n, i, s) {
|
|
1766
|
+
let { offset: a } = n, l = Ar(vt(t.slice(0, a)) + r, e, {
|
|
1783
1767
|
...i,
|
|
1784
1768
|
shouldParseFrontMatter: !1
|
|
1785
1769
|
}, s);
|
|
1786
|
-
|
|
1787
|
-
let
|
|
1788
|
-
return
|
|
1770
|
+
l.sourceSpan = new p(n, I(0, l.children, -1).sourceSpan.end);
|
|
1771
|
+
let c = l.children[0];
|
|
1772
|
+
return c.length === a ? l.children.shift() : (c.sourceSpan = new p(c.sourceSpan.start.moveBy(a), c.sourceSpan.end), c.value = c.value.slice(a)), l;
|
|
1789
1773
|
}
|
|
1790
1774
|
function Ar(e, t, r, n = {}) {
|
|
1791
|
-
let { frontMatter: i, content: s } = r.shouldParseFrontMatter ?
|
|
1775
|
+
let { frontMatter: i, content: s } = r.shouldParseFrontMatter ? Qt(e) : { content: e }, a = new rt(e, n.filepath), o = new De(a, 0, 0, 0), l = o.moveBy(e.length), { parseOptions: c, rootNodes: u } = t(s, r), d = {
|
|
1792
1776
|
kind: "root",
|
|
1793
|
-
sourceSpan: new
|
|
1794
|
-
children:
|
|
1795
|
-
},
|
|
1777
|
+
sourceSpan: new p(o, l),
|
|
1778
|
+
children: u
|
|
1779
|
+
}, _;
|
|
1796
1780
|
if (i) {
|
|
1797
|
-
let [
|
|
1798
|
-
|
|
1781
|
+
let [f, g] = [i.start, i.end].map((v) => new De(a, v.index, v.line - 1, v.column));
|
|
1782
|
+
_ = {
|
|
1799
1783
|
...i,
|
|
1800
1784
|
kind: "frontMatter",
|
|
1801
|
-
sourceSpan: new
|
|
1785
|
+
sourceSpan: new p(f, g)
|
|
1802
1786
|
};
|
|
1803
1787
|
}
|
|
1804
|
-
return
|
|
1788
|
+
return Xi(d, _, c, (f, g) => Bo(t, e, f, g, c, n));
|
|
1805
1789
|
}
|
|
1806
|
-
function
|
|
1807
|
-
let t =
|
|
1790
|
+
function st(e) {
|
|
1791
|
+
let t = Bt(e), r = t.name === "vue" ? Ji : Lr;
|
|
1808
1792
|
return {
|
|
1809
1793
|
parse: (n, i) => Ar(n, r, t, i),
|
|
1810
|
-
hasPragma:
|
|
1811
|
-
hasIgnorePragma:
|
|
1794
|
+
hasPragma: Jn,
|
|
1795
|
+
hasIgnorePragma: Zn,
|
|
1812
1796
|
astFormat: "html",
|
|
1813
|
-
locStart:
|
|
1797
|
+
locStart: F,
|
|
1814
1798
|
locEnd: J
|
|
1815
1799
|
};
|
|
1816
1800
|
}
|
|
1817
|
-
var
|
|
1801
|
+
var Nr, Dr, es, Ir, Wt, ts, qe, Rr, Zi, ke, rs, T, I, as, He, Fe, Ve, ot, be, we, lt, Te, ye, Ee, xe, ct, ut, z, pt, Le, ht, ft, ls, zt, Or, D, dt, Br, qr, G, S, y, k, Mr, Vr, Ur, ms, fs, jt, P, Yt, Gr, $r, se, vs, jr, bs, Kr, Qr, X, xs, _t, St, ae, vt, Ue, Qt, Zr, Xt, en, Jt, oe, Rs, Zt, tn, js, Sn, vn, ir, Ks, kn, bn, wn, Js, Tn, yn, En, xn, ea, ta, ra, na, Pn, ia, Nn, Dn, In, aa, On, Mn, oa, H, ua, ma, Un, F, J, Wn, Pt, ba, Gn, Qe, Ta, $n, Je, Yn, xa, La, Kn, Qn, Xn, Jn, Zn, ei, ti, Aa, Pa, lr, et, Ia, pr, hr, mr, Oa, hi, Ma, Ba, qa, Ha, Fa, mi, Va, fi, m, di, tt, De, rt, p, Wa, te, de, _i, Si, vi, Ci, ki, bi, re, wi, Ti, ge, U, yi, fr, dr, gr, _e, za, Ga, ja, it, Ya, Ii, ro, Cr, x, no, Bi, io, Hi, kr, so, Fi, Vi, Ui, br, Wi, zi, Pr, Gi, wo, qt, $i, Ht, ji, ne, Tr, yr, Me, Ft, yo, Er, Vt, qo, Ho, Fo, Vo, Uo, Wo, zo;
|
|
1818
1802
|
//#endregion
|
|
1819
1803
|
__esmMin((() => {
|
|
1820
|
-
|
|
1821
|
-
|
|
1804
|
+
Nr = Object.defineProperty;
|
|
1805
|
+
Dr = (e) => {
|
|
1822
1806
|
throw TypeError(e);
|
|
1823
1807
|
};
|
|
1824
|
-
|
|
1808
|
+
es = (e, t, r) => t in e ? Nr(e, t, {
|
|
1825
1809
|
enumerable: !0,
|
|
1826
1810
|
configurable: !0,
|
|
1827
1811
|
writable: !0,
|
|
1828
1812
|
value: r
|
|
1829
1813
|
}) : e[t] = r;
|
|
1830
|
-
|
|
1831
|
-
for (var r in t)
|
|
1814
|
+
Ir = (e, t) => {
|
|
1815
|
+
for (var r in t) Nr(e, r, {
|
|
1832
1816
|
get: t[r],
|
|
1833
1817
|
enumerable: !0
|
|
1834
1818
|
});
|
|
1835
1819
|
};
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
languages: () =>
|
|
1841
|
-
options: () =>
|
|
1842
|
-
parsers: () =>
|
|
1843
|
-
printers: () =>
|
|
1820
|
+
Wt = (e, t, r) => es(e, typeof t != "symbol" ? t + "" : t, r), ts = (e, t, r) => t.has(e) || Dr("Cannot " + r);
|
|
1821
|
+
qe = (e, t, r) => (ts(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Rr = (e, t, r) => t.has(e) ? Dr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
|
|
1822
|
+
Zi = {};
|
|
1823
|
+
Ir(Zi, {
|
|
1824
|
+
languages: () => Ui,
|
|
1825
|
+
options: () => zi,
|
|
1826
|
+
parsers: () => Pr,
|
|
1827
|
+
printers: () => zo
|
|
1844
1828
|
});
|
|
1845
|
-
|
|
1846
|
-
|
|
1829
|
+
ke = (e, t) => (r, n, ...i) => r | 1 && n == null ? void 0 : (t.call(n) ?? n[e]).apply(n, i);
|
|
1830
|
+
rs = String.prototype.replaceAll ?? function(e, t) {
|
|
1847
1831
|
return e.global ? this.replace(e, t) : this.split(e).join(t);
|
|
1848
|
-
},
|
|
1849
|
-
if (typeof this == "string") return
|
|
1832
|
+
}, T = ke("replaceAll", function() {
|
|
1833
|
+
if (typeof this == "string") return rs;
|
|
1850
1834
|
});
|
|
1851
|
-
|
|
1852
|
-
if (Array.isArray(this) || typeof this == "string") return
|
|
1835
|
+
I = ke("at", function() {
|
|
1836
|
+
if (Array.isArray(this) || typeof this == "string") return is;
|
|
1853
1837
|
});
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
Te,
|
|
1838
|
+
as = () => {}, He = as;
|
|
1839
|
+
Fe = "string", Ve = "array", ot = "cursor", be = "indent", we = "align", lt = "trim", Te = "group", ye = "fill", Ee = "if-break", xe = "indent-if-break", ct = "line-suffix", ut = "line-suffix-boundary", z = "line", pt = "label", Le = "break-parent", ht = /* @__PURE__ */ new Set([
|
|
1840
|
+
ot,
|
|
1858
1841
|
be,
|
|
1859
|
-
ct,
|
|
1860
1842
|
we,
|
|
1861
|
-
|
|
1862
|
-
|
|
1843
|
+
lt,
|
|
1844
|
+
Te,
|
|
1863
1845
|
ye,
|
|
1846
|
+
Ee,
|
|
1847
|
+
xe,
|
|
1848
|
+
ct,
|
|
1864
1849
|
ut,
|
|
1850
|
+
z,
|
|
1865
1851
|
pt,
|
|
1866
|
-
|
|
1867
|
-
ht,
|
|
1868
|
-
Ae
|
|
1852
|
+
Le
|
|
1869
1853
|
]);
|
|
1870
|
-
ft =
|
|
1871
|
-
|
|
1872
|
-
|
|
1854
|
+
ft = os;
|
|
1855
|
+
ls = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
|
|
1856
|
+
zt = class extends Error {
|
|
1873
1857
|
name = "InvalidDocError";
|
|
1874
1858
|
constructor(t) {
|
|
1875
|
-
super(
|
|
1859
|
+
super(cs(t)), this.doc = t;
|
|
1876
1860
|
}
|
|
1877
|
-
},
|
|
1878
|
-
D = He, dt = He,
|
|
1879
|
-
|
|
1880
|
-
S = { type:
|
|
1881
|
-
type:
|
|
1861
|
+
}, Or = zt;
|
|
1862
|
+
D = He, dt = He, Br = He, qr = He;
|
|
1863
|
+
G = { type: Le };
|
|
1864
|
+
S = { type: z }, y = {
|
|
1865
|
+
type: z,
|
|
1882
1866
|
soft: !0
|
|
1883
|
-
},
|
|
1884
|
-
type:
|
|
1867
|
+
}, k = [{
|
|
1868
|
+
type: z,
|
|
1885
1869
|
hard: !0
|
|
1886
|
-
},
|
|
1887
|
-
type:
|
|
1870
|
+
}, G], Mr = [{
|
|
1871
|
+
type: z,
|
|
1888
1872
|
hard: !0,
|
|
1889
1873
|
literal: !0
|
|
1890
|
-
},
|
|
1891
|
-
|
|
1874
|
+
}, G];
|
|
1875
|
+
Vr = Object.freeze({
|
|
1892
1876
|
character: "'",
|
|
1893
1877
|
codePoint: 39
|
|
1894
|
-
}),
|
|
1878
|
+
}), Ur = Object.freeze({
|
|
1895
1879
|
character: "\"",
|
|
1896
1880
|
codePoint: 34
|
|
1897
|
-
}), hs = Object.freeze({
|
|
1898
|
-
preferred: Hr,
|
|
1899
|
-
alternate: Vr
|
|
1900
1881
|
}), ms = Object.freeze({
|
|
1901
1882
|
preferred: Vr,
|
|
1902
|
-
alternate:
|
|
1883
|
+
alternate: Ur
|
|
1884
|
+
}), fs = Object.freeze({
|
|
1885
|
+
preferred: Ur,
|
|
1886
|
+
alternate: Vr
|
|
1903
1887
|
});
|
|
1904
|
-
|
|
1905
|
-
$t = class {
|
|
1888
|
+
jt = class {
|
|
1906
1889
|
#e;
|
|
1907
1890
|
constructor(t) {
|
|
1908
1891
|
this.#e = new Set(t);
|
|
@@ -1929,7 +1912,7 @@ __esmMin((() => {
|
|
|
1929
1912
|
return this.#e.has(t.charAt(0));
|
|
1930
1913
|
}
|
|
1931
1914
|
hasTrailingWhitespace(t) {
|
|
1932
|
-
return this.#e.has(
|
|
1915
|
+
return this.#e.has(I(0, t, -1));
|
|
1933
1916
|
}
|
|
1934
1917
|
trimStart(t) {
|
|
1935
1918
|
let r = this.getLeadingWhitespaceCount(t);
|
|
@@ -1943,7 +1926,7 @@ __esmMin((() => {
|
|
|
1943
1926
|
return this.trimEnd(this.trimStart(t));
|
|
1944
1927
|
}
|
|
1945
1928
|
split(t, r = !1) {
|
|
1946
|
-
let n = `[${
|
|
1929
|
+
let n = `[${$t([...this.#e].join(""))}]+`, i = new RegExp(r ? `(${n})` : n);
|
|
1947
1930
|
return t.split(i);
|
|
1948
1931
|
}
|
|
1949
1932
|
hasWhitespaceCharacter(t) {
|
|
@@ -1976,7 +1959,7 @@ __esmMin((() => {
|
|
|
1976
1959
|
`);
|
|
1977
1960
|
}
|
|
1978
1961
|
};
|
|
1979
|
-
|
|
1962
|
+
P = new jt([
|
|
1980
1963
|
" ",
|
|
1981
1964
|
`
|
|
1982
1965
|
`,
|
|
@@ -1990,44 +1973,24 @@ __esmMin((() => {
|
|
|
1990
1973
|
super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`), this.node = t;
|
|
1991
1974
|
}
|
|
1992
1975
|
}, Gr = Yt;
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
"endSourceSpan",
|
|
1997
|
-
"nameSpan",
|
|
1998
|
-
"valueSpan",
|
|
1999
|
-
"keySpan",
|
|
2000
|
-
"tagDefinition",
|
|
2001
|
-
"tokens",
|
|
2002
|
-
"valueTokens",
|
|
2003
|
-
"switchValueSourceSpan",
|
|
2004
|
-
"expSourceSpan",
|
|
2005
|
-
"valueSourceSpan"
|
|
2006
|
-
]), Ss = /* @__PURE__ */ new Set([
|
|
2007
|
-
"if",
|
|
2008
|
-
"else if",
|
|
2009
|
-
"for",
|
|
2010
|
-
"switch",
|
|
2011
|
-
"case"
|
|
2012
|
-
]);
|
|
2013
|
-
zr.ignoredProperties = _s;
|
|
2014
|
-
$r = zr;
|
|
2015
|
-
Yr = Es;
|
|
2016
|
-
Cs = Array.prototype.toReversed ?? function() {
|
|
1976
|
+
$r = _s;
|
|
1977
|
+
se = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty);
|
|
1978
|
+
vs = Array.prototype.toReversed ?? function() {
|
|
2017
1979
|
return [...this].reverse();
|
|
2018
|
-
}, jr =
|
|
2019
|
-
if (Array.isArray(this)) return
|
|
1980
|
+
}, jr = ke("toReversed", function() {
|
|
1981
|
+
if (Array.isArray(this)) return vs;
|
|
2020
1982
|
});
|
|
2021
|
-
bs =
|
|
2022
|
-
Kr = (e) => String(e).split(/[/\\]/
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
_t =
|
|
1983
|
+
bs = ks();
|
|
1984
|
+
Kr = (e) => String(e).split(/[/\\]/).pop(), Qr = (e) => String(e).startsWith("file:");
|
|
1985
|
+
X = ys;
|
|
1986
|
+
xs = void 0;
|
|
1987
|
+
_t = Ls;
|
|
2026
1988
|
St = Symbol.for("PRETTIER_IS_FRONT_MATTER");
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
1989
|
+
ae = As;
|
|
1990
|
+
vt = Ps;
|
|
1991
|
+
Ue = 3;
|
|
1992
|
+
Qt = Ds;
|
|
1993
|
+
Zr = "inline", Xt = {
|
|
2031
1994
|
area: "none",
|
|
2032
1995
|
base: "none",
|
|
2033
1996
|
basefont: "none",
|
|
@@ -2112,7 +2075,7 @@ __esmMin((() => {
|
|
|
2112
2075
|
audio: "inline-block",
|
|
2113
2076
|
option: "block",
|
|
2114
2077
|
optgroup: "block"
|
|
2115
|
-
},
|
|
2078
|
+
}, en = "normal", Jt = {
|
|
2116
2079
|
listing: "pre",
|
|
2117
2080
|
plaintext: "pre",
|
|
2118
2081
|
pre: "pre",
|
|
@@ -2121,56 +2084,56 @@ __esmMin((() => {
|
|
|
2121
2084
|
table: "initial",
|
|
2122
2085
|
textarea: "pre-wrap"
|
|
2123
2086
|
};
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
let t = e, r =
|
|
2087
|
+
oe = Is;
|
|
2088
|
+
Rs = (e) => T(0, e, /^[\t\f\r ]*\n/g, ""), Zt = (e) => Rs(P.trimEnd(e)), tn = (e) => {
|
|
2089
|
+
let t = e, r = P.getLeadingWhitespace(t);
|
|
2127
2090
|
r && (t = t.slice(r.length));
|
|
2128
|
-
let n =
|
|
2091
|
+
let n = P.getTrailingWhitespace(t);
|
|
2129
2092
|
return n && (t = t.slice(0, -n.length)), {
|
|
2130
2093
|
leadingWhitespace: r,
|
|
2131
2094
|
trailingWhitespace: n,
|
|
2132
2095
|
text: t
|
|
2133
2096
|
};
|
|
2134
2097
|
};
|
|
2135
|
-
|
|
2098
|
+
js = /* @__PURE__ */ new Set([
|
|
2136
2099
|
"template",
|
|
2137
2100
|
"style",
|
|
2138
2101
|
"script"
|
|
2139
2102
|
]);
|
|
2140
|
-
|
|
2141
|
-
|
|
2103
|
+
Sn = /\{\{(.+?)\}\}/s, vn = ({ node: { value: e } }) => Sn.test(e);
|
|
2104
|
+
ir = (e) => (t, r, n) => E(w(n.node), t, { parser: e }, q), Ks = [
|
|
2142
2105
|
{
|
|
2143
2106
|
test(e) {
|
|
2144
2107
|
let t = e.node.fullName;
|
|
2145
2108
|
return t.startsWith("(") && t.endsWith(")") || t.startsWith("on-");
|
|
2146
2109
|
},
|
|
2147
|
-
print:
|
|
2110
|
+
print: ir("__ng_action")
|
|
2148
2111
|
},
|
|
2149
2112
|
{
|
|
2150
2113
|
test(e) {
|
|
2151
2114
|
let t = e.node.fullName;
|
|
2152
|
-
return t.startsWith("[") && t.endsWith("]") || /^bind(?:on)
|
|
2115
|
+
return t.startsWith("[") && t.endsWith("]") || /^bind(?:on)?-/.test(t) || /^ng-(?:if|show|hide|class|style)$/.test(t);
|
|
2153
2116
|
},
|
|
2154
|
-
print:
|
|
2117
|
+
print: ir("__ng_binding")
|
|
2155
2118
|
},
|
|
2156
2119
|
{
|
|
2157
2120
|
test: (e) => e.node.fullName.startsWith("*"),
|
|
2158
|
-
print:
|
|
2121
|
+
print: ir("__ng_directive")
|
|
2159
2122
|
},
|
|
2160
2123
|
{
|
|
2161
|
-
test: (e) => /^i18n(?:-.+)
|
|
2162
|
-
print:
|
|
2124
|
+
test: (e) => /^i18n(?:-.+)?$/.test(e.node.fullName),
|
|
2125
|
+
print: Qs
|
|
2163
2126
|
},
|
|
2164
2127
|
{
|
|
2165
|
-
test:
|
|
2166
|
-
print:
|
|
2128
|
+
test: vn,
|
|
2129
|
+
print: Cn
|
|
2167
2130
|
}
|
|
2168
2131
|
].map(({ test: e, print: t }) => ({
|
|
2169
2132
|
test: (r, n) => n.parser === "angular" && e(r),
|
|
2170
2133
|
print: t
|
|
2171
2134
|
}));
|
|
2172
|
-
|
|
2173
|
-
bn = ({ node: e }, t) => !t.parentParser && e.fullName === "class" && !e.value.includes("{{"), wn = (e, t, r) =>
|
|
2135
|
+
kn = Ks;
|
|
2136
|
+
bn = ({ node: e }, t) => !t.parentParser && e.fullName === "class" && !e.value.includes("{{"), wn = (e, t, r) => T(0, w(r.node).trim(), /\s+/g, " ");
|
|
2174
2137
|
Js = /* @__PURE__ */ new Set([
|
|
2175
2138
|
"onabort",
|
|
2176
2139
|
"onafterprint",
|
|
@@ -2262,130 +2225,156 @@ __esmMin((() => {
|
|
|
2262
2225
|
"onvolumechange",
|
|
2263
2226
|
"onwaiting",
|
|
2264
2227
|
"onwheel"
|
|
2265
|
-
]),
|
|
2228
|
+
]), Tn = ({ node: e }, t) => Js.has(e.fullName) && !t.parentParser && !e.value.includes("{{"), yn = (e, t, r) => E(w(r.node), e, {
|
|
2266
2229
|
parser: "babel",
|
|
2267
2230
|
__isHtmlInlineEventHandler: !0
|
|
2268
2231
|
}, () => !1);
|
|
2269
|
-
|
|
2270
|
-
|
|
2232
|
+
En = Zs;
|
|
2233
|
+
xn = ({ node: e }, t) => e.fullName === "allow" && !t.parentParser && e.parent.fullName === "iframe" && !e.value.includes("{{");
|
|
2271
2234
|
ea = /^[ \t\n\r\u000c]+/, ta = /^[, \t\n\r\u000c]+/, ra = /^[^ \t\n\r\u000c]+/, na = /[,]+$/, Pn = /^\d+$/, ia = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;
|
|
2272
|
-
|
|
2235
|
+
Nn = sa;
|
|
2273
2236
|
Dn = (e) => e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source"), In = {
|
|
2274
2237
|
width: "w",
|
|
2275
2238
|
height: "h",
|
|
2276
2239
|
density: "x"
|
|
2277
2240
|
}, aa = Object.keys(In);
|
|
2278
|
-
|
|
2241
|
+
On = ({ node: e }, t) => e.fullName === "style" && !t.parentParser && !e.value.includes("{{"), Mn = async (e, t, r) => j(await e(w(r.node), {
|
|
2279
2242
|
parser: "css",
|
|
2280
2243
|
__isHTMLStyleAttribute: !0
|
|
2281
2244
|
}));
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2245
|
+
oa = /* @__PURE__ */ new WeakMap();
|
|
2246
|
+
H = la;
|
|
2247
|
+
ua = [
|
|
2285
2248
|
{
|
|
2286
2249
|
test: (e) => e.node.fullName === "v-for",
|
|
2287
2250
|
print: Hn
|
|
2288
2251
|
},
|
|
2289
2252
|
{
|
|
2290
|
-
test: (e, t) => e.node.fullName === "generic" &&
|
|
2291
|
-
print:
|
|
2253
|
+
test: (e, t) => e.node.fullName === "generic" && yt(e.parent, t),
|
|
2254
|
+
print: Bn
|
|
2292
2255
|
},
|
|
2293
2256
|
{
|
|
2294
|
-
test: ({ node: e }, t) =>
|
|
2295
|
-
print:
|
|
2257
|
+
test: ({ node: e }, t) => gn(e) || _n(e, t),
|
|
2258
|
+
print: qn
|
|
2296
2259
|
},
|
|
2297
2260
|
{
|
|
2298
2261
|
test(e) {
|
|
2299
2262
|
let t = e.node.fullName;
|
|
2300
2263
|
return t.startsWith("@") || t.startsWith("v-on:");
|
|
2301
2264
|
},
|
|
2302
|
-
print:
|
|
2265
|
+
print: pa
|
|
2303
2266
|
},
|
|
2304
2267
|
{
|
|
2305
2268
|
test(e) {
|
|
2306
2269
|
let t = e.node.fullName;
|
|
2307
2270
|
return t.startsWith(":") || t.startsWith(".") || t.startsWith("v-bind:");
|
|
2308
2271
|
},
|
|
2309
|
-
print:
|
|
2272
|
+
print: ha
|
|
2310
2273
|
},
|
|
2311
2274
|
{
|
|
2312
2275
|
test: (e) => e.node.fullName.startsWith("v-"),
|
|
2313
|
-
print:
|
|
2276
|
+
print: Fn
|
|
2314
2277
|
}
|
|
2315
2278
|
].map(({ test: e, print: t }) => ({
|
|
2316
2279
|
test: (r, n) => n.parser === "vue" && e(r, n),
|
|
2317
2280
|
print: t
|
|
2318
2281
|
}));
|
|
2319
|
-
|
|
2282
|
+
ma = [
|
|
2320
2283
|
{
|
|
2321
2284
|
test: Dn,
|
|
2322
2285
|
print: Rn
|
|
2323
2286
|
},
|
|
2324
2287
|
{
|
|
2325
|
-
test:
|
|
2326
|
-
print:
|
|
2288
|
+
test: On,
|
|
2289
|
+
print: Mn
|
|
2327
2290
|
},
|
|
2328
2291
|
{
|
|
2329
|
-
test:
|
|
2330
|
-
print:
|
|
2292
|
+
test: Tn,
|
|
2293
|
+
print: yn
|
|
2331
2294
|
},
|
|
2332
2295
|
{
|
|
2333
2296
|
test: bn,
|
|
2334
2297
|
print: wn
|
|
2335
2298
|
},
|
|
2336
2299
|
{
|
|
2337
|
-
test:
|
|
2338
|
-
print:
|
|
2300
|
+
test: xn,
|
|
2301
|
+
print: Ln
|
|
2339
2302
|
},
|
|
2340
|
-
...
|
|
2341
|
-
...
|
|
2303
|
+
...ua,
|
|
2304
|
+
...kn
|
|
2342
2305
|
].map(({ test: e, print: t }) => ({
|
|
2343
2306
|
test: e,
|
|
2344
|
-
print:
|
|
2307
|
+
print: da(t)
|
|
2345
2308
|
}));
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2309
|
+
Un = fa;
|
|
2310
|
+
F = (e) => e.sourceSpan.start.offset, J = (e) => e.sourceSpan.end.offset;
|
|
2311
|
+
Wn = "<!doctype";
|
|
2312
|
+
Pt = ka;
|
|
2313
|
+
ba = /* @__PURE__ */ new Set([
|
|
2351
2314
|
"if",
|
|
2352
2315
|
"else if",
|
|
2353
2316
|
"for",
|
|
2354
2317
|
"switch",
|
|
2355
2318
|
"case"
|
|
2356
2319
|
]);
|
|
2357
|
-
|
|
2320
|
+
Gn = wa;
|
|
2358
2321
|
Qe = null;
|
|
2359
|
-
|
|
2360
|
-
for (let e = 0; e <=
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
root:
|
|
2365
|
-
element: [
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2322
|
+
Ta = 10;
|
|
2323
|
+
for (let e = 0; e <= Ta; e++) Xe();
|
|
2324
|
+
$n = ya;
|
|
2325
|
+
Je = [["children"]];
|
|
2326
|
+
Yn = $n({
|
|
2327
|
+
root: Je[0],
|
|
2328
|
+
element: [
|
|
2329
|
+
"attrs",
|
|
2330
|
+
"startTagComments",
|
|
2331
|
+
"children"
|
|
2332
|
+
],
|
|
2333
|
+
ieConditionalComment: Je[0],
|
|
2334
|
+
ieConditionalStartComment: [],
|
|
2335
|
+
ieConditionalEndComment: [],
|
|
2336
|
+
interpolation: Je[0],
|
|
2337
|
+
text: Je[0],
|
|
2338
|
+
docType: [],
|
|
2339
|
+
comment: [],
|
|
2340
|
+
attribute: [],
|
|
2341
|
+
startTagComment: [],
|
|
2342
|
+
cdata: [],
|
|
2375
2343
|
angularControlFlowBlock: ["children", "parameters"],
|
|
2376
|
-
angularControlFlowBlockParameters:
|
|
2377
|
-
angularControlFlowBlockParameter:
|
|
2344
|
+
angularControlFlowBlockParameters: Je[0],
|
|
2345
|
+
angularControlFlowBlockParameter: [],
|
|
2378
2346
|
angularLetDeclaration: ["init"],
|
|
2379
|
-
angularLetDeclarationInitializer:
|
|
2347
|
+
angularLetDeclarationInitializer: [],
|
|
2380
2348
|
angularIcuExpression: ["cases"],
|
|
2381
2349
|
angularIcuCase: ["expression"]
|
|
2382
2350
|
}, "kind");
|
|
2351
|
+
xa = /* @__PURE__ */ new Set([
|
|
2352
|
+
"sourceSpan",
|
|
2353
|
+
"startSourceSpan",
|
|
2354
|
+
"endSourceSpan",
|
|
2355
|
+
"nameSpan",
|
|
2356
|
+
"valueSpan",
|
|
2357
|
+
"keySpan",
|
|
2358
|
+
"tagDefinition",
|
|
2359
|
+
"tokens",
|
|
2360
|
+
"valueTokens",
|
|
2361
|
+
"switchValueSourceSpan",
|
|
2362
|
+
"expSourceSpan",
|
|
2363
|
+
"valueSourceSpan"
|
|
2364
|
+
]), La = /* @__PURE__ */ new Set([
|
|
2365
|
+
"if",
|
|
2366
|
+
"else if",
|
|
2367
|
+
"for",
|
|
2368
|
+
"switch",
|
|
2369
|
+
"case"
|
|
2370
|
+
]);
|
|
2371
|
+
or.ignoredProperties = xa;
|
|
2383
2372
|
Kn = "format";
|
|
2384
|
-
Qn = /^\s*<!--\s*@(?:noformat|noprettier)\s
|
|
2385
|
-
|
|
2373
|
+
Qn = /^\s*<!--\s*@(?:noformat|noprettier)\s*-->/, Xn = /^\s*<!--\s*@(?:format|prettier)\s*-->/;
|
|
2374
|
+
Jn = (e) => Xn.test(e), Zn = (e) => Qn.test(e), ei = (e) => `<!-- @${Kn} -->
|
|
2386
2375
|
|
|
2387
2376
|
${e}`;
|
|
2388
|
-
|
|
2377
|
+
ti = /* @__PURE__ */ new Map([
|
|
2389
2378
|
["if", /* @__PURE__ */ new Set(["else if", "else"])],
|
|
2390
2379
|
["else if", /* @__PURE__ */ new Set(["else if", "else"])],
|
|
2391
2380
|
["for", /* @__PURE__ */ new Set(["empty"])],
|
|
@@ -2410,16 +2399,17 @@ ${e}`;
|
|
|
2410
2399
|
"loading"
|
|
2411
2400
|
])]
|
|
2412
2401
|
]);
|
|
2413
|
-
|
|
2414
|
-
|
|
2402
|
+
Aa = (e) => e?.kind === "angularControlFlowBlock" && (e.name === "case" || e.name === "default"), Pa = (e) => e?.kind === "angularControlFlowBlock" && e.name === "default never";
|
|
2403
|
+
lr = (function(e) {
|
|
2415
2404
|
return e[e.RAW_TEXT = 0] = "RAW_TEXT", e[e.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", e[e.PARSABLE_DATA = 2] = "PARSABLE_DATA", e;
|
|
2416
2405
|
})({});
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2406
|
+
Ia = "math";
|
|
2407
|
+
pr = () => Object.create(null);
|
|
2408
|
+
hr = { name: "custom-elements" }, mr = { name: "no-errors-schema" };
|
|
2409
|
+
Oa = /-+([a-z0-9])/g;
|
|
2410
|
+
hi = class {};
|
|
2411
|
+
Ma = "boolean", Ba = "number", qa = "string", Ha = "object";
|
|
2412
|
+
Fa = [
|
|
2423
2413
|
"[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored",
|
|
2424
2414
|
"[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy",
|
|
2425
2415
|
"abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy",
|
|
@@ -2459,7 +2449,7 @@ ${e}`;
|
|
|
2459
2449
|
"head^[HTMLElement]|",
|
|
2460
2450
|
"h1,h2,h3,h4,h5,h6^[HTMLElement]|align",
|
|
2461
2451
|
"html^[HTMLElement]|version",
|
|
2462
|
-
"iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width",
|
|
2452
|
+
"iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,!credentialless,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width",
|
|
2463
2453
|
"img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width",
|
|
2464
2454
|
"input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width",
|
|
2465
2455
|
"li^[HTMLElement]|type,#value",
|
|
@@ -2605,7 +2595,7 @@ ${e}`;
|
|
|
2605
2595
|
":math:munder^:math:|",
|
|
2606
2596
|
":math:munderover^:math:|",
|
|
2607
2597
|
":math:semantics^:math:|"
|
|
2608
|
-
],
|
|
2598
|
+
], mi = new Map(Object.entries({
|
|
2609
2599
|
class: "className",
|
|
2610
2600
|
for: "htmlFor",
|
|
2611
2601
|
formaction: "formAction",
|
|
@@ -2660,57 +2650,60 @@ ${e}`;
|
|
|
2660
2650
|
"aria-valuemin": "ariaValueMin",
|
|
2661
2651
|
"aria-valuenow": "ariaValueNow",
|
|
2662
2652
|
"aria-valuetext": "ariaValueText"
|
|
2663
|
-
})),
|
|
2653
|
+
})), Va = Array.from(mi).reduce((e, [t, r]) => (e.set(t, r), e), /* @__PURE__ */ new Map()), fi = class extends hi {
|
|
2664
2654
|
_schema = /* @__PURE__ */ new Map();
|
|
2665
2655
|
_eventSchema = /* @__PURE__ */ new Map();
|
|
2666
2656
|
constructor() {
|
|
2667
|
-
super(),
|
|
2657
|
+
super(), Fa.forEach((e) => {
|
|
2668
2658
|
let t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), [n, i] = e.split("|"), s = i.split(","), [a, o] = n.split("^");
|
|
2669
|
-
a.split(",").forEach((
|
|
2670
|
-
this._schema.set(
|
|
2659
|
+
a.split(",").forEach((c) => {
|
|
2660
|
+
this._schema.set(c.toLowerCase(), t), this._eventSchema.set(c.toLowerCase(), r);
|
|
2671
2661
|
});
|
|
2672
|
-
let
|
|
2673
|
-
if (
|
|
2674
|
-
for (let [
|
|
2675
|
-
for (let
|
|
2662
|
+
let l = o && this._schema.get(o.toLowerCase());
|
|
2663
|
+
if (l) {
|
|
2664
|
+
for (let [c, u] of l) t.set(c, u);
|
|
2665
|
+
for (let c of this._eventSchema.get(o.toLowerCase())) r.add(c);
|
|
2676
2666
|
}
|
|
2677
|
-
s.forEach((
|
|
2678
|
-
if (
|
|
2667
|
+
s.forEach((c) => {
|
|
2668
|
+
if (c.length > 0) switch (c[0]) {
|
|
2679
2669
|
case "*":
|
|
2680
|
-
r.add(
|
|
2670
|
+
r.add(c.substring(1));
|
|
2681
2671
|
break;
|
|
2682
2672
|
case "!":
|
|
2683
|
-
t.set(
|
|
2673
|
+
t.set(c.substring(1), Ma);
|
|
2684
2674
|
break;
|
|
2685
2675
|
case "#":
|
|
2686
|
-
t.set(
|
|
2676
|
+
t.set(c.substring(1), Ba);
|
|
2687
2677
|
break;
|
|
2688
2678
|
case "%":
|
|
2689
|
-
t.set(
|
|
2679
|
+
t.set(c.substring(1), Ha);
|
|
2690
2680
|
break;
|
|
2691
|
-
default: t.set(
|
|
2681
|
+
default: t.set(c, qa);
|
|
2692
2682
|
}
|
|
2693
2683
|
});
|
|
2694
2684
|
});
|
|
2695
2685
|
}
|
|
2696
2686
|
hasProperty(e, t, r) {
|
|
2697
|
-
if (r.some((
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
if (
|
|
2687
|
+
if (r.some((i) => i.name === mr.name)) return !0;
|
|
2688
|
+
let n = Dt(e);
|
|
2689
|
+
if (n.includes("-")) {
|
|
2690
|
+
if (cr(n) || ur(n)) return !1;
|
|
2691
|
+
if (r.some((i) => i.name === hr.name)) return !0;
|
|
2701
2692
|
}
|
|
2702
|
-
return (this._schema.get(
|
|
2693
|
+
return (this._schema.get(n) || this._schema.get("unknown")).has(t);
|
|
2703
2694
|
}
|
|
2704
2695
|
hasElement(e, t) {
|
|
2705
|
-
|
|
2696
|
+
if (t.some((n) => n.name === mr.name)) return !0;
|
|
2697
|
+
let r = Dt(e);
|
|
2698
|
+
return r.includes("-") && (cr(r) || ur(r) || t.some((n) => n.name === hr.name)) ? !0 : this._schema.has(r);
|
|
2706
2699
|
}
|
|
2707
2700
|
securityContext(e, t, r) {
|
|
2708
|
-
r && (t = this.getMappedPropName(t))
|
|
2709
|
-
let n =
|
|
2710
|
-
return
|
|
2701
|
+
r && (t = this.getMappedPropName(t));
|
|
2702
|
+
let [n, i] = Z(e, !1);
|
|
2703
|
+
return ui(i, t, n);
|
|
2711
2704
|
}
|
|
2712
2705
|
getMappedPropName(e) {
|
|
2713
|
-
return
|
|
2706
|
+
return mi.get(e) ?? e;
|
|
2714
2707
|
}
|
|
2715
2708
|
getDefaultComponentElementName() {
|
|
2716
2709
|
return "ng-component";
|
|
@@ -2732,18 +2725,19 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2732
2725
|
return Array.from(this._schema.keys());
|
|
2733
2726
|
}
|
|
2734
2727
|
allKnownAttributesOfElement(e) {
|
|
2735
|
-
let t = this._schema.get(
|
|
2736
|
-
return Array.from(
|
|
2728
|
+
let t = Dt(e), r = this._schema.get(t) || this._schema.get("unknown");
|
|
2729
|
+
return Array.from(r.keys()).map((n) => Va.get(n) ?? n);
|
|
2737
2730
|
}
|
|
2738
2731
|
allKnownEventsOfElement(e) {
|
|
2739
|
-
|
|
2732
|
+
let t = Dt(e);
|
|
2733
|
+
return Array.from(this._eventSchema.get(t) ?? []);
|
|
2740
2734
|
}
|
|
2741
2735
|
normalizeAnimationStyleProperty(e) {
|
|
2742
|
-
return
|
|
2736
|
+
return pi(e);
|
|
2743
2737
|
}
|
|
2744
2738
|
normalizeAnimationStyleValue(e, t, r) {
|
|
2745
2739
|
let n = "", i = r.toString().trim(), s = null;
|
|
2746
|
-
if (
|
|
2740
|
+
if (Ua(e) && r !== 0 && r !== "0") if (typeof r == "number") n = "px";
|
|
2747
2741
|
else {
|
|
2748
2742
|
let a = r.match(/^[+-]?[\d\.]+([a-z]*)$/);
|
|
2749
2743
|
a && a[1].length == 0 && (s = `Please provide a CSS unit value for ${t}:${r}`);
|
|
@@ -2754,7 +2748,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2754
2748
|
};
|
|
2755
2749
|
}
|
|
2756
2750
|
};
|
|
2757
|
-
|
|
2751
|
+
m = class {
|
|
2758
2752
|
closedByChildren = {};
|
|
2759
2753
|
contentType;
|
|
2760
2754
|
closedByParent = !1;
|
|
@@ -2763,8 +2757,8 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2763
2757
|
ignoreFirstLf;
|
|
2764
2758
|
canSelfClose;
|
|
2765
2759
|
preventNamespaceInheritance;
|
|
2766
|
-
constructor({ closedByChildren: e, implicitNamespacePrefix: t, contentType: r =
|
|
2767
|
-
e && e.length > 0 && e.forEach((
|
|
2760
|
+
constructor({ closedByChildren: e, implicitNamespacePrefix: t, contentType: r = 2, closedByParent: n = !1, isVoid: i = !1, ignoreFirstLf: s = !1, preventNamespaceInheritance: a = !1, canSelfClose: o = !1 } = {}) {
|
|
2761
|
+
e && e.length > 0 && e.forEach((l) => this.closedByChildren[l] = !0), this.isVoid = i, this.closedByParent = n || i, this.implicitNamespacePrefix = t || null, this.contentType = r, this.ignoreFirstLf = s, this.preventNamespaceInheritance = a, this.canSelfClose = o ?? i;
|
|
2768
2762
|
}
|
|
2769
2763
|
isClosedByChild(e) {
|
|
2770
2764
|
return this.isVoid || e.toLowerCase() in this.closedByChildren;
|
|
@@ -2774,6 +2768,10 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2774
2768
|
}
|
|
2775
2769
|
};
|
|
2776
2770
|
De = class gi {
|
|
2771
|
+
file;
|
|
2772
|
+
offset;
|
|
2773
|
+
line;
|
|
2774
|
+
col;
|
|
2777
2775
|
constructor(t, r, n, i) {
|
|
2778
2776
|
this.file = t, this.offset = r, this.line = n, this.col = i;
|
|
2779
2777
|
}
|
|
@@ -2810,26 +2808,36 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2810
2808
|
}
|
|
2811
2809
|
return null;
|
|
2812
2810
|
}
|
|
2813
|
-
},
|
|
2811
|
+
}, rt = class {
|
|
2812
|
+
content;
|
|
2813
|
+
url;
|
|
2814
2814
|
constructor(e, t) {
|
|
2815
2815
|
this.content = e, this.url = t;
|
|
2816
2816
|
}
|
|
2817
|
-
},
|
|
2817
|
+
}, p = class {
|
|
2818
|
+
start;
|
|
2819
|
+
end;
|
|
2820
|
+
fullStart;
|
|
2821
|
+
details;
|
|
2818
2822
|
constructor(e, t, r = e, n = null) {
|
|
2819
2823
|
this.start = e, this.end = t, this.fullStart = r, this.details = n;
|
|
2820
2824
|
}
|
|
2821
2825
|
toString() {
|
|
2822
2826
|
return this.start.file.content.substring(this.start.offset, this.end.offset);
|
|
2823
2827
|
}
|
|
2824
|
-
},
|
|
2828
|
+
}, Wa = (function(e) {
|
|
2825
2829
|
return e[e.WARNING = 0] = "WARNING", e[e.ERROR = 1] = "ERROR", e;
|
|
2826
|
-
})({}),
|
|
2827
|
-
|
|
2830
|
+
})({}), te = class extends Error {
|
|
2831
|
+
span;
|
|
2832
|
+
msg;
|
|
2833
|
+
level;
|
|
2834
|
+
relatedError;
|
|
2835
|
+
constructor(e, t, r = 1, n) {
|
|
2828
2836
|
super(t), this.span = e, this.msg = t, this.level = r, this.relatedError = n, Object.setPrototypeOf(this, new.target.prototype);
|
|
2829
2837
|
}
|
|
2830
2838
|
contextualMessage() {
|
|
2831
2839
|
let e = this.span.start.getContext(100, 3);
|
|
2832
|
-
return e ? `${this.msg} ("${e.before}[${
|
|
2840
|
+
return e ? `${this.msg} ("${e.before}[${Wa[this.level]} ->]${e.after}")` : this.msg;
|
|
2833
2841
|
}
|
|
2834
2842
|
toString() {
|
|
2835
2843
|
let e = this.span.details ? `, ${this.span.details}` : "";
|
|
@@ -2837,10 +2845,14 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2837
2845
|
}
|
|
2838
2846
|
};
|
|
2839
2847
|
de = class {
|
|
2848
|
+
sourceSpan;
|
|
2849
|
+
i18n;
|
|
2840
2850
|
constructor(e, t) {
|
|
2841
2851
|
this.sourceSpan = e, this.i18n = t;
|
|
2842
2852
|
}
|
|
2843
2853
|
}, _i = class extends de {
|
|
2854
|
+
value;
|
|
2855
|
+
tokens;
|
|
2844
2856
|
constructor(e, t, r, n) {
|
|
2845
2857
|
super(t, n), this.value = e, this.tokens = r;
|
|
2846
2858
|
}
|
|
@@ -2849,6 +2861,8 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2849
2861
|
}
|
|
2850
2862
|
kind = "text";
|
|
2851
2863
|
}, Si = class extends de {
|
|
2864
|
+
value;
|
|
2865
|
+
tokens;
|
|
2852
2866
|
constructor(e, t, r, n) {
|
|
2853
2867
|
super(t, n), this.value = e, this.tokens = r;
|
|
2854
2868
|
}
|
|
@@ -2856,7 +2870,11 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2856
2870
|
return e.visitCdata(this, t);
|
|
2857
2871
|
}
|
|
2858
2872
|
kind = "cdata";
|
|
2859
|
-
},
|
|
2873
|
+
}, vi = class extends de {
|
|
2874
|
+
switchValue;
|
|
2875
|
+
type;
|
|
2876
|
+
cases;
|
|
2877
|
+
switchValueSourceSpan;
|
|
2860
2878
|
constructor(e, t, r, n, i, s) {
|
|
2861
2879
|
super(n, s), this.switchValue = e, this.type = t, this.cases = r, this.switchValueSourceSpan = i;
|
|
2862
2880
|
}
|
|
@@ -2865,6 +2883,11 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2865
2883
|
}
|
|
2866
2884
|
kind = "expansion";
|
|
2867
2885
|
}, Ci = class {
|
|
2886
|
+
value;
|
|
2887
|
+
expression;
|
|
2888
|
+
sourceSpan;
|
|
2889
|
+
valueSourceSpan;
|
|
2890
|
+
expSourceSpan;
|
|
2868
2891
|
constructor(e, t, r, n, i) {
|
|
2869
2892
|
this.value = e, this.expression = t, this.sourceSpan = r, this.valueSourceSpan = n, this.expSourceSpan = i;
|
|
2870
2893
|
}
|
|
@@ -2872,7 +2895,12 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2872
2895
|
return e.visitExpansionCase(this, t);
|
|
2873
2896
|
}
|
|
2874
2897
|
kind = "expansionCase";
|
|
2875
|
-
},
|
|
2898
|
+
}, ki = class extends de {
|
|
2899
|
+
name;
|
|
2900
|
+
value;
|
|
2901
|
+
keySpan;
|
|
2902
|
+
valueSpan;
|
|
2903
|
+
valueTokens;
|
|
2876
2904
|
constructor(e, t, r, n, i, s, a) {
|
|
2877
2905
|
super(r, a), this.name = e, this.value = t, this.keySpan = n, this.valueSpan = i, this.valueTokens = s;
|
|
2878
2906
|
}
|
|
@@ -2883,15 +2911,38 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2883
2911
|
get nameSpan() {
|
|
2884
2912
|
return this.keySpan;
|
|
2885
2913
|
}
|
|
2886
|
-
},
|
|
2887
|
-
|
|
2888
|
-
|
|
2914
|
+
}, bi = class {
|
|
2915
|
+
value;
|
|
2916
|
+
type;
|
|
2917
|
+
sourceSpan;
|
|
2918
|
+
constructor(e, t, r) {
|
|
2919
|
+
this.value = e, this.type = t, this.sourceSpan = r;
|
|
2920
|
+
}
|
|
2921
|
+
visit(e, t) {
|
|
2922
|
+
return e.visitAttributeComment ? e.visitAttributeComment(this, t) : void 0;
|
|
2923
|
+
}
|
|
2924
|
+
kind = "startTagComment";
|
|
2925
|
+
}, re = class extends de {
|
|
2926
|
+
name;
|
|
2927
|
+
attrs;
|
|
2928
|
+
directives;
|
|
2929
|
+
children;
|
|
2930
|
+
isSelfClosing;
|
|
2931
|
+
startSourceSpan;
|
|
2932
|
+
endSourceSpan;
|
|
2933
|
+
nameSpan;
|
|
2934
|
+
isVoid;
|
|
2935
|
+
comments;
|
|
2936
|
+
constructor(e, t, r, n, i, s, a, o = null, l = null, c, u, d = []) {
|
|
2937
|
+
super(s, u), this.name = e, this.attrs = t, this.directives = r, this.children = n, this.isSelfClosing = i, this.startSourceSpan = a, this.endSourceSpan = o, this.nameSpan = l, this.isVoid = c, this.comments = d;
|
|
2889
2938
|
}
|
|
2890
2939
|
visit(e, t) {
|
|
2891
2940
|
return e.visitElement(this, t);
|
|
2892
2941
|
}
|
|
2893
2942
|
kind = "element";
|
|
2894
|
-
},
|
|
2943
|
+
}, wi = class {
|
|
2944
|
+
value;
|
|
2945
|
+
sourceSpan;
|
|
2895
2946
|
constructor(e, t) {
|
|
2896
2947
|
this.value = e, this.sourceSpan = t;
|
|
2897
2948
|
}
|
|
@@ -2899,7 +2950,9 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2899
2950
|
return e.visitComment(this, t);
|
|
2900
2951
|
}
|
|
2901
2952
|
kind = "comment";
|
|
2902
|
-
},
|
|
2953
|
+
}, Ti = class {
|
|
2954
|
+
value;
|
|
2955
|
+
sourceSpan;
|
|
2903
2956
|
constructor(e, t) {
|
|
2904
2957
|
this.value = e, this.sourceSpan = t;
|
|
2905
2958
|
}
|
|
@@ -2908,6 +2961,12 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2908
2961
|
}
|
|
2909
2962
|
kind = "docType";
|
|
2910
2963
|
}, ge = class extends de {
|
|
2964
|
+
name;
|
|
2965
|
+
parameters;
|
|
2966
|
+
children;
|
|
2967
|
+
nameSpan;
|
|
2968
|
+
startSourceSpan;
|
|
2969
|
+
endSourceSpan;
|
|
2911
2970
|
constructor(e, t, r, n, i, s, a = null, o) {
|
|
2912
2971
|
super(n, o), this.name = e, this.parameters = t, this.children = r, this.nameSpan = i, this.startSourceSpan = s, this.endSourceSpan = a;
|
|
2913
2972
|
}
|
|
@@ -2915,15 +2974,30 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2915
2974
|
return e.visitBlock(this, t);
|
|
2916
2975
|
}
|
|
2917
2976
|
kind = "block";
|
|
2918
|
-
},
|
|
2919
|
-
|
|
2920
|
-
|
|
2977
|
+
}, U = class extends de {
|
|
2978
|
+
componentName;
|
|
2979
|
+
tagName;
|
|
2980
|
+
fullName;
|
|
2981
|
+
attrs;
|
|
2982
|
+
directives;
|
|
2983
|
+
children;
|
|
2984
|
+
isSelfClosing;
|
|
2985
|
+
startSourceSpan;
|
|
2986
|
+
endSourceSpan;
|
|
2987
|
+
comments;
|
|
2988
|
+
constructor(e, t, r, n, i, s, a, o, l, c = null, u, d = []) {
|
|
2989
|
+
super(o, u), this.componentName = e, this.tagName = t, this.fullName = r, this.attrs = n, this.directives = i, this.children = s, this.isSelfClosing = a, this.startSourceSpan = l, this.endSourceSpan = c, this.comments = d;
|
|
2921
2990
|
}
|
|
2922
2991
|
visit(e, t) {
|
|
2923
2992
|
return e.visitComponent(this, t);
|
|
2924
2993
|
}
|
|
2925
2994
|
kind = "component";
|
|
2926
|
-
},
|
|
2995
|
+
}, yi = class {
|
|
2996
|
+
name;
|
|
2997
|
+
attrs;
|
|
2998
|
+
sourceSpan;
|
|
2999
|
+
startSourceSpan;
|
|
3000
|
+
endSourceSpan;
|
|
2927
3001
|
constructor(e, t, r, n, i = null) {
|
|
2928
3002
|
this.name = e, this.attrs = t, this.sourceSpan = r, this.startSourceSpan = n, this.endSourceSpan = i;
|
|
2929
3003
|
}
|
|
@@ -2931,7 +3005,9 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2931
3005
|
return e.visitDirective(this, t);
|
|
2932
3006
|
}
|
|
2933
3007
|
kind = "directive";
|
|
2934
|
-
},
|
|
3008
|
+
}, fr = class {
|
|
3009
|
+
expression;
|
|
3010
|
+
sourceSpan;
|
|
2935
3011
|
constructor(e, t) {
|
|
2936
3012
|
this.expression = e, this.sourceSpan = t;
|
|
2937
3013
|
}
|
|
@@ -2941,7 +3017,12 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2941
3017
|
kind = "blockParameter";
|
|
2942
3018
|
startSourceSpan = null;
|
|
2943
3019
|
endSourceSpan = null;
|
|
2944
|
-
},
|
|
3020
|
+
}, dr = class {
|
|
3021
|
+
name;
|
|
3022
|
+
value;
|
|
3023
|
+
sourceSpan;
|
|
3024
|
+
nameSpan;
|
|
3025
|
+
valueSpan;
|
|
2945
3026
|
constructor(e, t, r, n, i) {
|
|
2946
3027
|
this.name = e, this.value = t, this.sourceSpan = r, this.nameSpan = n, this.valueSpan = i;
|
|
2947
3028
|
}
|
|
@@ -2952,14 +3033,15 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2952
3033
|
startSourceSpan = null;
|
|
2953
3034
|
endSourceSpan = null;
|
|
2954
3035
|
};
|
|
2955
|
-
|
|
3036
|
+
gr = class {
|
|
2956
3037
|
constructor() {}
|
|
2957
3038
|
visitElement(e, t) {
|
|
2958
3039
|
this.visitChildren(t, (r) => {
|
|
2959
|
-
r(e.attrs), r(e.directives), r(e.children);
|
|
3040
|
+
r(e.attrs), r(e.directives), r(e.comments), r(e.children);
|
|
2960
3041
|
});
|
|
2961
3042
|
}
|
|
2962
3043
|
visitAttribute(e, t) {}
|
|
3044
|
+
visitAttributeComment(e, t) {}
|
|
2963
3045
|
visitText(e, t) {}
|
|
2964
3046
|
visitCdata(e, t) {}
|
|
2965
3047
|
visitComment(e, t) {}
|
|
@@ -2979,7 +3061,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2979
3061
|
visitLetDeclaration(e, t) {}
|
|
2980
3062
|
visitComponent(e, t) {
|
|
2981
3063
|
this.visitChildren(t, (r) => {
|
|
2982
|
-
r(e.attrs), r(e.children);
|
|
3064
|
+
r(e.attrs), r(e.comments), r(e.children);
|
|
2983
3065
|
});
|
|
2984
3066
|
}
|
|
2985
3067
|
visitDirective(e, t) {
|
|
@@ -2990,7 +3072,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2990
3072
|
visitChildren(e, t) {
|
|
2991
3073
|
let r = [], n = this;
|
|
2992
3074
|
function i(s) {
|
|
2993
|
-
s && r.push(
|
|
3075
|
+
s && r.push(It(n, s, e));
|
|
2994
3076
|
}
|
|
2995
3077
|
return t(i), Array.prototype.concat.apply([], r);
|
|
2996
3078
|
}
|
|
@@ -5124,18 +5206,16 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5124
5206
|
zwnj: ""
|
|
5125
5207
|
};
|
|
5126
5208
|
_e.ngsp = "";
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5209
|
+
za = class {
|
|
5210
|
+
tokens;
|
|
5211
|
+
errors;
|
|
5212
|
+
nonNormalizedIcuExpressions;
|
|
5131
5213
|
constructor(e, t, r) {
|
|
5132
5214
|
this.tokens = e, this.errors = t, this.nonNormalizedIcuExpressions = r;
|
|
5133
5215
|
}
|
|
5134
5216
|
};
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
return e.HEX = "hexadecimal", e.DEC = "decimal", e;
|
|
5138
|
-
})(gr || {}), Va = [
|
|
5217
|
+
Ga = /\r\n?/g;
|
|
5218
|
+
ja = [
|
|
5139
5219
|
"@if",
|
|
5140
5220
|
"@else",
|
|
5141
5221
|
"@for",
|
|
@@ -5146,16 +5226,19 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5146
5226
|
"@defer",
|
|
5147
5227
|
"@placeholder",
|
|
5148
5228
|
"@loading",
|
|
5149
|
-
"@error"
|
|
5150
|
-
|
|
5229
|
+
"@error",
|
|
5230
|
+
"@content"
|
|
5231
|
+
], it = {
|
|
5151
5232
|
start: "{{",
|
|
5152
5233
|
end: "}}"
|
|
5153
|
-
},
|
|
5234
|
+
}, Ya = class {
|
|
5235
|
+
_getTagContentType;
|
|
5154
5236
|
_cursor;
|
|
5155
5237
|
_tokenizeIcu;
|
|
5156
5238
|
_leadingTriviaCodePoints;
|
|
5157
5239
|
_canSelfClose;
|
|
5158
5240
|
_allowHtmComponentClosingTags;
|
|
5241
|
+
_allowStartTagComments;
|
|
5159
5242
|
_currentTokenStart = null;
|
|
5160
5243
|
_currentTokenType = null;
|
|
5161
5244
|
_expansionCaseStack = [];
|
|
@@ -5171,14 +5254,14 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5171
5254
|
errors = [];
|
|
5172
5255
|
nonNormalizedIcuExpressions = [];
|
|
5173
5256
|
constructor(e, t, r) {
|
|
5174
|
-
this._getTagContentType = t, this._tokenizeIcu = r.tokenizeExpansionForms || !1, this._leadingTriviaCodePoints = r.leadingTriviaChars && r.leadingTriviaChars.map((i) => i.codePointAt(0) || 0), this._canSelfClose = r.canSelfClose || !1, this._allowHtmComponentClosingTags = r.allowHtmComponentClosingTags || !1;
|
|
5257
|
+
this._getTagContentType = t, this._tokenizeIcu = r.tokenizeExpansionForms || !1, this._leadingTriviaCodePoints = r.leadingTriviaChars && r.leadingTriviaChars.map((i) => i.codePointAt(0) || 0), this._canSelfClose = r.canSelfClose || !1, this._allowHtmComponentClosingTags = r.allowHtmComponentClosingTags || !1, this._allowStartTagComments = r.allowStartTagComments ?? !0;
|
|
5175
5258
|
let n = r.range || {
|
|
5176
5259
|
endPos: e.content.length,
|
|
5177
5260
|
startPos: 0,
|
|
5178
5261
|
startLine: 0,
|
|
5179
5262
|
startCol: 0
|
|
5180
5263
|
};
|
|
5181
|
-
this._cursor = r.escapedString ? new
|
|
5264
|
+
this._cursor = r.escapedString ? new ro(e, n) : new Ii(e, n), this._preserveLineEndings = r.preserveLineEndings || !1, this._i18nNormalizeLineEndingsInICUs = r.i18nNormalizeLineEndingsInICUs || !1, this._tokenizeBlocks = r.tokenizeBlocks ?? !0, this._tokenizeLet = r.tokenizeLet ?? !0, this._selectorlessEnabled = r.selectorlessEnabled ?? !1;
|
|
5182
5265
|
try {
|
|
5183
5266
|
this._cursor.init();
|
|
5184
5267
|
} catch (i) {
|
|
@@ -5186,7 +5269,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5186
5269
|
}
|
|
5187
5270
|
}
|
|
5188
5271
|
_processCarriageReturns(e) {
|
|
5189
|
-
return this._preserveLineEndings ? e : e.replace(
|
|
5272
|
+
return this._preserveLineEndings ? e : e.replace(Ga, `
|
|
5190
5273
|
`);
|
|
5191
5274
|
}
|
|
5192
5275
|
tokenize() {
|
|
@@ -5199,43 +5282,43 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5199
5282
|
let t = this._cursor.clone();
|
|
5200
5283
|
this._attemptCharCode(63) ? (this._cursor = t, this._consumeBogusComment(e)) : this._consumeTagOpen(e);
|
|
5201
5284
|
}
|
|
5202
|
-
else this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._isLetStart() ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._isBlockStart() ? this._consumeBlockStart(e) : this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode(125) ? this._consumeBlockEnd(e) : this._tokenizeIcu && this._tokenizeExpansionForm() || this._consumeWithInterpolation(
|
|
5285
|
+
else this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._isLetStart() ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._isBlockStart() ? this._consumeBlockStart(e) : this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode(125) ? this._consumeBlockEnd(e) : this._tokenizeIcu && this._tokenizeExpansionForm() || this._consumeWithInterpolation(5, 8, () => this._isTextEnd(), () => this._isTagStart());
|
|
5203
5286
|
} catch (t) {
|
|
5204
5287
|
this.handleError(t);
|
|
5205
5288
|
}
|
|
5206
5289
|
}
|
|
5207
|
-
this._beginToken(
|
|
5290
|
+
this._beginToken(43), this._endToken([]);
|
|
5208
5291
|
}
|
|
5209
5292
|
_getBlockName() {
|
|
5210
5293
|
let e = !1, t = this._cursor.clone();
|
|
5211
|
-
return this._attemptCharCodeUntilFn((r) =>
|
|
5294
|
+
return this._attemptCharCodeUntilFn((r) => nt(r) ? !e : eo(r) ? (e = !0, !1) : !0), this._cursor.getChars(t).trim();
|
|
5212
5295
|
}
|
|
5213
5296
|
_consumeBlockStart(e) {
|
|
5214
|
-
this._requireCharCode(64), this._beginToken(
|
|
5297
|
+
this._requireCharCode(64), this._beginToken(26, e);
|
|
5215
5298
|
let t = this._endToken([this._getBlockName()]);
|
|
5216
|
-
if (this._cursor.peek() === 40) if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(
|
|
5299
|
+
if (this._cursor.peek() === 40) if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(b), this._attemptCharCode(41)) this._attemptCharCodeUntilFn(b);
|
|
5217
5300
|
else {
|
|
5218
|
-
t.type =
|
|
5301
|
+
t.type = 30;
|
|
5219
5302
|
return;
|
|
5220
5303
|
}
|
|
5221
5304
|
if (t.parts[0] === "default never" && this._attemptCharCode(59)) {
|
|
5222
|
-
this._beginToken(
|
|
5305
|
+
this._beginToken(27), this._endToken([]), this._beginToken(28), this._endToken([]);
|
|
5223
5306
|
return;
|
|
5224
5307
|
}
|
|
5225
|
-
this._attemptCharCode(123) ? (this._beginToken(
|
|
5308
|
+
this._attemptCharCode(123) ? (this._beginToken(27), this._endToken([])) : this._isBlockStart() && (t.parts[0] === "case" || t.parts[0] === "default") ? (this._beginToken(27), this._endToken([]), this._beginToken(28), this._endToken([])) : t.type = 30;
|
|
5226
5309
|
}
|
|
5227
5310
|
_consumeBlockEnd(e) {
|
|
5228
|
-
this._beginToken(
|
|
5311
|
+
this._beginToken(28, e), this._endToken([]);
|
|
5229
5312
|
}
|
|
5230
5313
|
_consumeBlockParameters() {
|
|
5231
5314
|
for (this._attemptCharCodeUntilFn(Ai); this._cursor.peek() !== 41 && this._cursor.peek() !== 0;) {
|
|
5232
|
-
this._beginToken(
|
|
5315
|
+
this._beginToken(29);
|
|
5233
5316
|
let e = this._cursor.clone(), t = null, r = 0;
|
|
5234
5317
|
for (; this._cursor.peek() !== 59 && this._cursor.peek() !== 0 || t !== null;) {
|
|
5235
5318
|
let n = this._cursor.peek();
|
|
5236
5319
|
if (n === 92) this._cursor.advance();
|
|
5237
5320
|
else if (n === t) t = null;
|
|
5238
|
-
else if (t === null &&
|
|
5321
|
+
else if (t === null && Rt(n)) t = n;
|
|
5239
5322
|
else if (n === 40 && t === null) r++;
|
|
5240
5323
|
else if (n === 41 && t === null) {
|
|
5241
5324
|
if (r === 0) break;
|
|
@@ -5247,18 +5330,18 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5247
5330
|
}
|
|
5248
5331
|
}
|
|
5249
5332
|
_consumeLetDeclaration(e) {
|
|
5250
|
-
if (this._requireStr("@let"), this._beginToken(
|
|
5333
|
+
if (this._requireStr("@let"), this._beginToken(31, e), nt(this._cursor.peek())) this._attemptCharCodeUntilFn(b);
|
|
5251
5334
|
else {
|
|
5252
5335
|
let r = this._endToken([this._cursor.getChars(e)]);
|
|
5253
|
-
r.type =
|
|
5336
|
+
r.type = 34;
|
|
5254
5337
|
return;
|
|
5255
5338
|
}
|
|
5256
5339
|
let t = this._endToken([this._getLetDeclarationName()]);
|
|
5257
|
-
if (this._attemptCharCodeUntilFn(
|
|
5258
|
-
t.type =
|
|
5340
|
+
if (this._attemptCharCodeUntilFn(b), !this._attemptCharCode(61)) {
|
|
5341
|
+
t.type = 34;
|
|
5259
5342
|
return;
|
|
5260
5343
|
}
|
|
5261
|
-
this._attemptCharCodeUntilFn((r) =>
|
|
5344
|
+
this._attemptCharCodeUntilFn((r) => b(r) && !Oe(r)), this._consumeLetDeclarationValue(), this._cursor.peek() === 59 ? (this._beginToken(33), this._cursor.advance(), this._endToken([])) : (t.type = 34, t.sourceSpan = this._cursor.getSpan(e));
|
|
5262
5345
|
}
|
|
5263
5346
|
_getLetDeclarationName() {
|
|
5264
5347
|
let e = this._cursor.clone(), t = !1;
|
|
@@ -5266,16 +5349,16 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5266
5349
|
}
|
|
5267
5350
|
_consumeLetDeclarationValue() {
|
|
5268
5351
|
let e = this._cursor.clone();
|
|
5269
|
-
for (this._beginToken(
|
|
5352
|
+
for (this._beginToken(32, e); this._cursor.peek() !== 0;) {
|
|
5270
5353
|
let t = this._cursor.peek();
|
|
5271
5354
|
if (t === 59) break;
|
|
5272
|
-
|
|
5355
|
+
Rt(t) && (this._cursor.advance(), this._attemptCharCodeUntilFn((r) => r === 92 ? (this._cursor.advance(), !1) : r === t)), this._cursor.advance();
|
|
5273
5356
|
}
|
|
5274
5357
|
this._endToken([this._cursor.getChars(e)]);
|
|
5275
5358
|
}
|
|
5276
5359
|
_tokenizeExpansionForm() {
|
|
5277
5360
|
if (this.isExpansionFormStart()) return this._consumeExpansionFormStart(), !0;
|
|
5278
|
-
if (
|
|
5361
|
+
if (Ja(this._cursor.peek()) && this._isInExpansionForm()) return this._consumeExpansionCaseStart(), !0;
|
|
5279
5362
|
if (this._cursor.peek() === 125) {
|
|
5280
5363
|
if (this._isInExpansionCase()) return this._consumeExpansionCaseEnd(), !0;
|
|
5281
5364
|
if (this._isInExpansionForm()) return this._consumeExpansionFormEnd(), !0;
|
|
@@ -5286,8 +5369,8 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5286
5369
|
this._currentTokenStart = t, this._currentTokenType = e;
|
|
5287
5370
|
}
|
|
5288
5371
|
_endToken(e, t) {
|
|
5289
|
-
if (this._currentTokenStart === null) throw new
|
|
5290
|
-
if (this._currentTokenType === null) throw new
|
|
5372
|
+
if (this._currentTokenStart === null) throw new te(this._cursor.getSpan(t), "Programming error - attempted to end a token when there was no start to the token");
|
|
5373
|
+
if (this._currentTokenType === null) throw new te(this._cursor.getSpan(this._currentTokenStart), "Programming error - attempted to end a token which has no token type");
|
|
5291
5374
|
let r = {
|
|
5292
5375
|
type: this._currentTokenType,
|
|
5293
5376
|
parts: e,
|
|
@@ -5297,18 +5380,18 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5297
5380
|
}
|
|
5298
5381
|
_createError(e, t) {
|
|
5299
5382
|
this._isInExpansionForm() && (e += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);
|
|
5300
|
-
let r = new
|
|
5383
|
+
let r = new te(t, e);
|
|
5301
5384
|
return this._currentTokenStart = null, this._currentTokenType = null, r;
|
|
5302
5385
|
}
|
|
5303
5386
|
handleError(e) {
|
|
5304
|
-
if (e instanceof
|
|
5387
|
+
if (e instanceof Cr && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof te) this.errors.push(e);
|
|
5305
5388
|
else throw e;
|
|
5306
5389
|
}
|
|
5307
5390
|
_attemptCharCode(e) {
|
|
5308
5391
|
return this._cursor.peek() === e ? (this._cursor.advance(), !0) : !1;
|
|
5309
5392
|
}
|
|
5310
5393
|
_attemptCharCodeCaseInsensitive(e) {
|
|
5311
|
-
return
|
|
5394
|
+
return Za(this._cursor.peek(), e) ? (this._cursor.advance(), !0) : !1;
|
|
5312
5395
|
}
|
|
5313
5396
|
_requireCharCode(e) {
|
|
5314
5397
|
let t = this._cursor.clone();
|
|
@@ -5358,20 +5441,20 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5358
5441
|
return !0;
|
|
5359
5442
|
}
|
|
5360
5443
|
_isBlockStart() {
|
|
5361
|
-
return this._cursor.peek() === 64 &&
|
|
5444
|
+
return this._cursor.peek() === 64 && ja.some((e) => this._peekStr(e));
|
|
5362
5445
|
}
|
|
5363
5446
|
_isLetStart() {
|
|
5364
5447
|
return this._cursor.peek() === 64 && this._peekStr("@let");
|
|
5365
5448
|
}
|
|
5366
5449
|
_consumeEntity(e) {
|
|
5367
|
-
this._beginToken(
|
|
5450
|
+
this._beginToken(9);
|
|
5368
5451
|
let t = this._cursor.clone();
|
|
5369
5452
|
if (this._cursor.advance(), this._attemptCharCode(35)) {
|
|
5370
5453
|
let r = this._attemptCharCode(120) || this._attemptCharCode(88), n = this._cursor.clone();
|
|
5371
|
-
if (this._attemptCharCodeUntilFn(
|
|
5454
|
+
if (this._attemptCharCodeUntilFn(Qa), this._cursor.peek() != 59) {
|
|
5372
5455
|
this._cursor.advance();
|
|
5373
|
-
let s = r ?
|
|
5374
|
-
throw this._createError(
|
|
5456
|
+
let s = r ? "hexadecimal" : "decimal";
|
|
5457
|
+
throw this._createError($a(s, this._cursor.getChars(t)), this._cursor.getSpan());
|
|
5375
5458
|
}
|
|
5376
5459
|
let i = this._cursor.getChars(n);
|
|
5377
5460
|
this._cursor.advance();
|
|
@@ -5383,7 +5466,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5383
5466
|
}
|
|
5384
5467
|
} else {
|
|
5385
5468
|
let r = this._cursor.clone();
|
|
5386
|
-
if (this._attemptCharCodeUntilFn(
|
|
5469
|
+
if (this._attemptCharCodeUntilFn(Xa), this._cursor.peek() != 59) this._beginToken(e, t), this._cursor = r, this._endToken(["&"]);
|
|
5387
5470
|
else {
|
|
5388
5471
|
let n = this._cursor.getChars(r);
|
|
5389
5472
|
this._cursor.advance();
|
|
@@ -5394,104 +5477,113 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5394
5477
|
}
|
|
5395
5478
|
}
|
|
5396
5479
|
_consumeRawText(e, t) {
|
|
5397
|
-
this._beginToken(e ?
|
|
5480
|
+
this._beginToken(e ? 6 : 7);
|
|
5398
5481
|
let r = [];
|
|
5399
5482
|
for (;;) {
|
|
5400
5483
|
let n = this._cursor.clone(), i = t();
|
|
5401
5484
|
if (this._cursor = n, i) break;
|
|
5402
|
-
e && this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(r.join(""))]), r.length = 0, this._consumeEntity(
|
|
5485
|
+
e && this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(r.join(""))]), r.length = 0, this._consumeEntity(6), this._beginToken(6)) : r.push(this._readChar());
|
|
5403
5486
|
}
|
|
5404
5487
|
this._endToken([this._processCarriageReturns(r.join(""))]);
|
|
5405
5488
|
}
|
|
5406
5489
|
_consumeComment(e) {
|
|
5407
|
-
this._beginToken(
|
|
5490
|
+
this._beginToken(10, e), this._endToken([]), this._consumeRawText(!1, () => this._attemptStr("-->")), this._beginToken(11), this._requireStr("-->"), this._endToken([]);
|
|
5408
5491
|
}
|
|
5409
5492
|
_consumeBogusComment(e) {
|
|
5410
|
-
this._beginToken(
|
|
5493
|
+
this._beginToken(10, e), this._endToken([]), this._consumeRawText(!1, () => this._cursor.peek() === 62), this._beginToken(11), this._cursor.advance(), this._endToken([]);
|
|
5411
5494
|
}
|
|
5412
5495
|
_consumeCdata(e) {
|
|
5413
|
-
this._beginToken(
|
|
5496
|
+
this._beginToken(13, e), this._endToken([]), this._consumeRawText(!1, () => this._attemptStr("]]>")), this._beginToken(14), this._requireStr("]]>"), this._endToken([]);
|
|
5414
5497
|
}
|
|
5415
5498
|
_consumeDocType(e) {
|
|
5416
|
-
this._beginToken(
|
|
5499
|
+
this._beginToken(19, e), this._endToken([]), this._consumeRawText(!1, () => this._cursor.peek() === 62), this._beginToken(20), this._cursor.advance(), this._endToken([]);
|
|
5417
5500
|
}
|
|
5418
5501
|
_consumePrefixAndName(e) {
|
|
5419
5502
|
let t = this._cursor.clone(), r = "";
|
|
5420
|
-
for (; this._cursor.peek() !== 58 && !
|
|
5503
|
+
for (; this._cursor.peek() !== 58 && !Ka(this._cursor.peek());) this._cursor.advance();
|
|
5421
5504
|
let n;
|
|
5422
5505
|
this._cursor.peek() === 58 ? (r = this._cursor.getChars(t), this._cursor.advance(), n = this._cursor.clone()) : n = t, this._requireCharCodeUntilFn(e, r === "" ? 0 : 1);
|
|
5423
5506
|
let i = this._cursor.getChars(n);
|
|
5424
5507
|
return [r, i];
|
|
5425
5508
|
}
|
|
5426
|
-
_consumeSingleLineComment() {
|
|
5427
|
-
|
|
5509
|
+
_consumeSingleLineComment(e) {
|
|
5510
|
+
let t = this._cursor.clone();
|
|
5511
|
+
this._attemptCharCodeUntilFn((i) => Oe(i) || i === 0);
|
|
5512
|
+
let r = this._cursor.clone(), n = r.getChars(t);
|
|
5513
|
+
this._beginToken(12, e), this._endToken([n, "single"], r), this._attemptCharCodeUntilFn(b);
|
|
5428
5514
|
}
|
|
5429
|
-
_consumeMultiLineComment() {
|
|
5430
|
-
this.
|
|
5431
|
-
|
|
5432
|
-
if (
|
|
5433
|
-
|
|
5434
|
-
|
|
5515
|
+
_consumeMultiLineComment(e) {
|
|
5516
|
+
let t = this._cursor.clone();
|
|
5517
|
+
this._attemptCharCodeUntilFn((s) => {
|
|
5518
|
+
if (s === 0) return !0;
|
|
5519
|
+
if (s === 42) {
|
|
5520
|
+
let a = this._cursor.clone();
|
|
5521
|
+
return a.advance(), a.peek() === 47;
|
|
5435
5522
|
}
|
|
5436
5523
|
return !1;
|
|
5437
|
-
})
|
|
5524
|
+
});
|
|
5525
|
+
let r = this._cursor.clone(), n = r.getChars(t), i = r;
|
|
5526
|
+
this._attemptStr("*/") && (i = this._cursor.clone(), this._attemptCharCodeUntilFn(b)), this._beginToken(12, e), this._endToken([n, "multi"], i);
|
|
5438
5527
|
}
|
|
5439
5528
|
_consumeTagOpen(e) {
|
|
5440
5529
|
let t, r, n, i, s = [];
|
|
5441
5530
|
try {
|
|
5442
|
-
if (this._selectorlessEnabled &&
|
|
5531
|
+
if (this._selectorlessEnabled && Ot(this._cursor.peek())) i = this._consumeComponentOpenStart(e), [n, r, t] = i.parts, r && (n += `:${r}`), t && (n += `:${t}`), this._attemptCharCodeUntilFn(b);
|
|
5443
5532
|
else {
|
|
5444
5533
|
if (!Re(this._cursor.peek())) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(e));
|
|
5445
|
-
i = this._consumeTagOpenStart(e), r = i.parts[0], t = n = i.parts[1], this._attemptCharCodeUntilFn(
|
|
5534
|
+
i = this._consumeTagOpenStart(e), r = i.parts[0], t = n = i.parts[1], this._attemptCharCodeUntilFn(b);
|
|
5446
5535
|
}
|
|
5447
5536
|
for (;;) {
|
|
5448
|
-
if (this.
|
|
5449
|
-
this.
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5537
|
+
if (this._allowStartTagComments) {
|
|
5538
|
+
let o = this._cursor.clone();
|
|
5539
|
+
if (this._attemptStr("//")) {
|
|
5540
|
+
this._consumeSingleLineComment(o);
|
|
5541
|
+
continue;
|
|
5542
|
+
}
|
|
5543
|
+
if (this._attemptStr("/*")) {
|
|
5544
|
+
this._consumeMultiLineComment(o);
|
|
5545
|
+
continue;
|
|
5546
|
+
}
|
|
5455
5547
|
}
|
|
5456
|
-
if (
|
|
5548
|
+
if (Ni(this._cursor.peek())) break;
|
|
5457
5549
|
if (this._selectorlessEnabled && this._cursor.peek() === 64) {
|
|
5458
|
-
let o = this._cursor.clone(),
|
|
5459
|
-
|
|
5550
|
+
let o = this._cursor.clone(), l = o.clone();
|
|
5551
|
+
l.advance(), Ot(l.peek()) && this._consumeDirective(o, l);
|
|
5460
5552
|
} else {
|
|
5461
5553
|
let o = this._consumeAttribute();
|
|
5462
5554
|
s.push(o);
|
|
5463
5555
|
}
|
|
5464
5556
|
}
|
|
5465
|
-
i.type ===
|
|
5557
|
+
i.type === 35 ? this._consumeComponentOpenEnd() : this._consumeTagOpenEnd();
|
|
5466
5558
|
} catch (o) {
|
|
5467
|
-
if (o instanceof
|
|
5468
|
-
i ? i.type = i.type ===
|
|
5559
|
+
if (o instanceof te) {
|
|
5560
|
+
i ? i.type = i.type === 35 ? 39 : 4 : (this._beginToken(5, e), this._endToken(["<"]));
|
|
5469
5561
|
return;
|
|
5470
5562
|
}
|
|
5471
5563
|
throw o;
|
|
5472
5564
|
}
|
|
5473
|
-
if (this._canSelfClose && this.tokens[this.tokens.length - 1].type ===
|
|
5565
|
+
if (this._canSelfClose && this.tokens[this.tokens.length - 1].type === 2) return;
|
|
5474
5566
|
let a = this._getTagContentType(t, r, this._fullNameStack.length > 0, s);
|
|
5475
|
-
this._handleFullNameStackForTagOpen(r, t), a ===
|
|
5567
|
+
this._handleFullNameStackForTagOpen(r, t), a === 0 ? this._consumeRawTextWithTagClose(r, i, n, !1) : a === 1 && this._consumeRawTextWithTagClose(r, i, n, !0);
|
|
5476
5568
|
}
|
|
5477
5569
|
_consumeRawTextWithTagClose(e, t, r, n) {
|
|
5478
|
-
this._consumeRawText(n, () => !this._attemptCharCode(60) || !this._attemptCharCode(47) || (this._attemptCharCodeUntilFn(
|
|
5570
|
+
this._consumeRawText(n, () => !this._attemptCharCode(60) || !this._attemptCharCode(47) || (this._attemptCharCodeUntilFn(b), !this._attemptStrCaseInsensitive(e && t.type !== 35 ? `${e}:${r}` : r)) ? !1 : (this._attemptCharCodeUntilFn(b), this._attemptCharCode(62))), this._beginToken(t.type === 35 ? 38 : 3), this._requireCharCodeUntilFn((i) => i === 62, 3), this._cursor.advance(), this._endToken(t.parts), this._handleFullNameStackForTagClose(e, r);
|
|
5479
5571
|
}
|
|
5480
5572
|
_consumeTagOpenStart(e) {
|
|
5481
|
-
this._beginToken(
|
|
5482
|
-
let t = this._consumePrefixAndName(
|
|
5573
|
+
this._beginToken(0, e);
|
|
5574
|
+
let t = this._consumePrefixAndName(ve);
|
|
5483
5575
|
return this._endToken(t);
|
|
5484
5576
|
}
|
|
5485
5577
|
_consumeComponentOpenStart(e) {
|
|
5486
|
-
this._beginToken(
|
|
5578
|
+
this._beginToken(35, e);
|
|
5487
5579
|
let t = this._consumeComponentName();
|
|
5488
5580
|
return this._endToken(t);
|
|
5489
5581
|
}
|
|
5490
5582
|
_consumeComponentName() {
|
|
5491
5583
|
let e = this._cursor.clone();
|
|
5492
|
-
for (;
|
|
5584
|
+
for (; Pi(this._cursor.peek());) this._cursor.advance();
|
|
5493
5585
|
let t = this._cursor.getChars(e), r = "", n = "";
|
|
5494
|
-
return this._cursor.peek() === 58 && (this._cursor.advance(), [r, n] = this._consumePrefixAndName(
|
|
5586
|
+
return this._cursor.peek() === 58 && (this._cursor.advance(), [r, n] = this._consumePrefixAndName(ve)), [
|
|
5495
5587
|
t,
|
|
5496
5588
|
r,
|
|
5497
5589
|
n
|
|
@@ -5499,7 +5591,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5499
5591
|
}
|
|
5500
5592
|
_consumeAttribute() {
|
|
5501
5593
|
let [e, t] = this._consumeAttributeName(), r;
|
|
5502
|
-
return this._attemptCharCodeUntilFn(
|
|
5594
|
+
return this._attemptCharCodeUntilFn(b), this._attemptCharCode(61) && (this._attemptCharCodeUntilFn(b), r = this._consumeAttributeValue()), this._attemptCharCodeUntilFn(b), {
|
|
5503
5595
|
prefix: e,
|
|
5504
5596
|
name: t,
|
|
5505
5597
|
value: r
|
|
@@ -5508,7 +5600,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5508
5600
|
_consumeAttributeName() {
|
|
5509
5601
|
let e = this._cursor.peek();
|
|
5510
5602
|
if (e === 39 || e === 34) throw this._createError(Se(e), this._cursor.getSpan());
|
|
5511
|
-
this._beginToken(
|
|
5603
|
+
this._beginToken(15);
|
|
5512
5604
|
let t;
|
|
5513
5605
|
if (this._openDirectiveCount > 0) {
|
|
5514
5606
|
let n = 0;
|
|
@@ -5520,12 +5612,12 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5520
5612
|
n--;
|
|
5521
5613
|
}
|
|
5522
5614
|
}
|
|
5523
|
-
return
|
|
5615
|
+
return ve(i);
|
|
5524
5616
|
};
|
|
5525
5617
|
} else if (e === 91) {
|
|
5526
5618
|
let n = 0;
|
|
5527
|
-
t = (i) => (i === 91 ? n++ : i === 93 && n--, n <= 0 ?
|
|
5528
|
-
} else t =
|
|
5619
|
+
t = (i) => (i === 91 ? n++ : i === 93 && n--, n <= 0 ? ve(i) : Oe(i));
|
|
5620
|
+
} else t = ve;
|
|
5529
5621
|
let r = this._consumePrefixAndName(t);
|
|
5530
5622
|
return this._endToken(r), r;
|
|
5531
5623
|
}
|
|
@@ -5535,70 +5627,70 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5535
5627
|
let t = this._cursor.peek();
|
|
5536
5628
|
this._consumeQuote(t);
|
|
5537
5629
|
let r = () => this._cursor.peek() === t;
|
|
5538
|
-
e = this._consumeWithInterpolation(
|
|
5630
|
+
e = this._consumeWithInterpolation(17, 18, r, r), this._consumeQuote(t);
|
|
5539
5631
|
} else {
|
|
5540
|
-
let t = () =>
|
|
5541
|
-
e = this._consumeWithInterpolation(
|
|
5632
|
+
let t = () => ve(this._cursor.peek());
|
|
5633
|
+
e = this._consumeWithInterpolation(17, 18, t, t);
|
|
5542
5634
|
}
|
|
5543
5635
|
return e;
|
|
5544
5636
|
}
|
|
5545
5637
|
_consumeQuote(e) {
|
|
5546
|
-
this._beginToken(
|
|
5638
|
+
this._beginToken(16), this._requireCharCode(e), this._endToken([String.fromCodePoint(e)]);
|
|
5547
5639
|
}
|
|
5548
5640
|
_consumeTagOpenEnd() {
|
|
5549
|
-
let e = this._attemptCharCode(47) ?
|
|
5641
|
+
let e = this._attemptCharCode(47) ? 2 : 1;
|
|
5550
5642
|
this._beginToken(e), this._requireCharCode(62), this._endToken([]);
|
|
5551
5643
|
}
|
|
5552
5644
|
_consumeComponentOpenEnd() {
|
|
5553
|
-
let e = this._attemptCharCode(47) ?
|
|
5645
|
+
let e = this._attemptCharCode(47) ? 37 : 36;
|
|
5554
5646
|
this._beginToken(e), this._requireCharCode(62), this._endToken([]);
|
|
5555
5647
|
}
|
|
5556
5648
|
_consumeTagClose(e) {
|
|
5557
5649
|
if (this._selectorlessEnabled) {
|
|
5558
5650
|
let t = e.clone();
|
|
5559
|
-
for (; t.peek() !== 62 && !
|
|
5560
|
-
if (
|
|
5561
|
-
this._beginToken(
|
|
5651
|
+
for (; t.peek() !== 62 && !Ot(t.peek());) t.advance();
|
|
5652
|
+
if (Ot(t.peek())) {
|
|
5653
|
+
this._beginToken(38, e);
|
|
5562
5654
|
let r = this._consumeComponentName();
|
|
5563
|
-
this._attemptCharCodeUntilFn(
|
|
5655
|
+
this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken(r);
|
|
5564
5656
|
return;
|
|
5565
5657
|
}
|
|
5566
5658
|
}
|
|
5567
|
-
if (this._beginToken(
|
|
5659
|
+
if (this._beginToken(3, e), this._attemptCharCodeUntilFn(b), this._allowHtmComponentClosingTags && this._attemptCharCode(47)) this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken([]);
|
|
5568
5660
|
else {
|
|
5569
|
-
let [t, r] = this._consumePrefixAndName(
|
|
5570
|
-
this._attemptCharCodeUntilFn(
|
|
5661
|
+
let [t, r] = this._consumePrefixAndName(ve);
|
|
5662
|
+
this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken([t, r]), this._handleFullNameStackForTagClose(t, r);
|
|
5571
5663
|
}
|
|
5572
5664
|
}
|
|
5573
5665
|
_consumeExpansionFormStart() {
|
|
5574
|
-
this._beginToken(
|
|
5666
|
+
this._beginToken(21), this._requireCharCode(123), this._endToken([]), this._expansionCaseStack.push(21), this._beginToken(7);
|
|
5575
5667
|
let e = this._readUntil(44), t = this._processCarriageReturns(e);
|
|
5576
5668
|
if (this._i18nNormalizeLineEndingsInICUs) this._endToken([t]);
|
|
5577
5669
|
else {
|
|
5578
5670
|
let n = this._endToken([e]);
|
|
5579
5671
|
t !== e && this.nonNormalizedIcuExpressions.push(n);
|
|
5580
5672
|
}
|
|
5581
|
-
this._requireCharCode(44), this._attemptCharCodeUntilFn(
|
|
5673
|
+
this._requireCharCode(44), this._attemptCharCodeUntilFn(b), this._beginToken(7);
|
|
5582
5674
|
let r = this._readUntil(44);
|
|
5583
|
-
this._endToken([r]), this._requireCharCode(44), this._attemptCharCodeUntilFn(
|
|
5675
|
+
this._endToken([r]), this._requireCharCode(44), this._attemptCharCodeUntilFn(b);
|
|
5584
5676
|
}
|
|
5585
5677
|
_consumeExpansionCaseStart() {
|
|
5586
|
-
this._beginToken(
|
|
5678
|
+
this._beginToken(22);
|
|
5587
5679
|
let e = this._readUntil(123).trim();
|
|
5588
|
-
this._endToken([e]), this._attemptCharCodeUntilFn(
|
|
5680
|
+
this._endToken([e]), this._attemptCharCodeUntilFn(b), this._beginToken(23), this._requireCharCode(123), this._endToken([]), this._attemptCharCodeUntilFn(b), this._expansionCaseStack.push(23);
|
|
5589
5681
|
}
|
|
5590
5682
|
_consumeExpansionCaseEnd() {
|
|
5591
|
-
this._beginToken(
|
|
5683
|
+
this._beginToken(24), this._requireCharCode(125), this._endToken([]), this._attemptCharCodeUntilFn(b), this._expansionCaseStack.pop();
|
|
5592
5684
|
}
|
|
5593
5685
|
_consumeExpansionFormEnd() {
|
|
5594
|
-
this._beginToken(
|
|
5686
|
+
this._beginToken(25), this._requireCharCode(125), this._endToken([]), this._expansionCaseStack.pop();
|
|
5595
5687
|
}
|
|
5596
5688
|
_consumeWithInterpolation(e, t, r, n) {
|
|
5597
5689
|
this._beginToken(e);
|
|
5598
5690
|
let i = [];
|
|
5599
5691
|
for (; !r();) {
|
|
5600
5692
|
let a = this._cursor.clone();
|
|
5601
|
-
this._attemptStr(
|
|
5693
|
+
this._attemptStr(it.start) ? (this._endToken([this._processCarriageReturns(i.join(""))], a), i.length = 0, this._consumeInterpolation(t, a, n), this._beginToken(e)) : this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(i.join(""))]), i.length = 0, this._consumeEntity(e), this._beginToken(e)) : i.push(this._readChar());
|
|
5602
5694
|
}
|
|
5603
5695
|
this._inInterpolation = !1;
|
|
5604
5696
|
let s = this._processCarriageReturns(i.join(""));
|
|
@@ -5606,7 +5698,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5606
5698
|
}
|
|
5607
5699
|
_consumeInterpolation(e, t, r) {
|
|
5608
5700
|
let n = [];
|
|
5609
|
-
this._beginToken(e, t), n.push(
|
|
5701
|
+
this._beginToken(e, t), n.push(it.start);
|
|
5610
5702
|
let i = this._cursor.clone(), s = null, a = !1;
|
|
5611
5703
|
for (; this._cursor.peek() !== 0 && (r === null || !r());) {
|
|
5612
5704
|
let o = this._cursor.clone();
|
|
@@ -5614,26 +5706,26 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5614
5706
|
this._cursor = o, n.push(this._getProcessedChars(i, o)), this._endToken(n);
|
|
5615
5707
|
return;
|
|
5616
5708
|
}
|
|
5617
|
-
if (s === null) if (this._attemptStr(
|
|
5618
|
-
n.push(this._getProcessedChars(i, o)), n.push(
|
|
5709
|
+
if (s === null) if (this._attemptStr(it.end)) {
|
|
5710
|
+
n.push(this._getProcessedChars(i, o)), n.push(it.end), this._endToken(n);
|
|
5619
5711
|
return;
|
|
5620
5712
|
} else this._attemptStr("//") && (a = !0);
|
|
5621
|
-
let
|
|
5622
|
-
this._cursor.advance(),
|
|
5713
|
+
let l = this._cursor.peek();
|
|
5714
|
+
this._cursor.advance(), l === 92 ? this._cursor.advance() : l === s ? s = null : !a && s === null && Rt(l) && (s = l);
|
|
5623
5715
|
}
|
|
5624
5716
|
n.push(this._getProcessedChars(i, this._cursor)), this._endToken(n);
|
|
5625
5717
|
}
|
|
5626
5718
|
_consumeDirective(e, t) {
|
|
5627
|
-
for (this._requireCharCode(64), this._cursor.advance();
|
|
5628
|
-
this._beginToken(
|
|
5719
|
+
for (this._requireCharCode(64), this._cursor.advance(); Pi(this._cursor.peek());) this._cursor.advance();
|
|
5720
|
+
this._beginToken(40, e);
|
|
5629
5721
|
let r = this._cursor.getChars(t);
|
|
5630
|
-
if (this._endToken([r]), this._attemptCharCodeUntilFn(
|
|
5631
|
-
for (this._openDirectiveCount++, this._beginToken(
|
|
5632
|
-
if (this._attemptCharCodeUntilFn(
|
|
5722
|
+
if (this._endToken([r]), this._attemptCharCodeUntilFn(b), this._cursor.peek() === 40) {
|
|
5723
|
+
for (this._openDirectiveCount++, this._beginToken(41), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(b); !Ni(this._cursor.peek()) && this._cursor.peek() !== 41;) this._consumeAttribute();
|
|
5724
|
+
if (this._attemptCharCodeUntilFn(b), this._openDirectiveCount--, this._cursor.peek() !== 41) {
|
|
5633
5725
|
if (this._cursor.peek() === 62 || this._cursor.peek() === 47) return;
|
|
5634
5726
|
throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(e));
|
|
5635
5727
|
}
|
|
5636
|
-
this._beginToken(
|
|
5728
|
+
this._beginToken(42), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(b);
|
|
5637
5729
|
}
|
|
5638
5730
|
}
|
|
5639
5731
|
_getProcessedChars(e, t) {
|
|
@@ -5659,14 +5751,14 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5659
5751
|
return this._isInExpansionCase() || this._isInExpansionForm();
|
|
5660
5752
|
}
|
|
5661
5753
|
_isInExpansionCase() {
|
|
5662
|
-
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
|
|
5754
|
+
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 23;
|
|
5663
5755
|
}
|
|
5664
5756
|
_isInExpansionForm() {
|
|
5665
|
-
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
|
|
5757
|
+
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 21;
|
|
5666
5758
|
}
|
|
5667
5759
|
isExpansionFormStart() {
|
|
5668
5760
|
if (this._cursor.peek() !== 123) return !1;
|
|
5669
|
-
let e = this._cursor.clone(), t = this._attemptStr(
|
|
5761
|
+
let e = this._cursor.clone(), t = this._attemptStr(it.start);
|
|
5670
5762
|
return this._cursor = e, !t;
|
|
5671
5763
|
}
|
|
5672
5764
|
_handleFullNameStackForTagOpen(e, t) {
|
|
@@ -5678,13 +5770,13 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5678
5770
|
this._fullNameStack.length !== 0 && this._fullNameStack[this._fullNameStack.length - 1] === r && this._fullNameStack.pop();
|
|
5679
5771
|
}
|
|
5680
5772
|
};
|
|
5681
|
-
|
|
5773
|
+
Ii = class Sr {
|
|
5682
5774
|
state;
|
|
5683
5775
|
file;
|
|
5684
5776
|
input;
|
|
5685
5777
|
end;
|
|
5686
5778
|
constructor(t, r) {
|
|
5687
|
-
if (t instanceof
|
|
5779
|
+
if (t instanceof Sr) {
|
|
5688
5780
|
this.file = t.file, this.input = t.input, this.end = t.end;
|
|
5689
5781
|
let n = t.state;
|
|
5690
5782
|
this.state = {
|
|
@@ -5704,7 +5796,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5704
5796
|
}
|
|
5705
5797
|
}
|
|
5706
5798
|
clone() {
|
|
5707
|
-
return new
|
|
5799
|
+
return new Sr(this);
|
|
5708
5800
|
}
|
|
5709
5801
|
peek() {
|
|
5710
5802
|
return this.state.peek;
|
|
@@ -5726,7 +5818,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5726
5818
|
let n = t;
|
|
5727
5819
|
if (r) for (; this.diff(t) > 0 && r.indexOf(t.peek()) !== -1;) n === t && (t = t.clone()), t.advance();
|
|
5728
5820
|
let i = this.locationFromCursor(t);
|
|
5729
|
-
return new
|
|
5821
|
+
return new p(i, this.locationFromCursor(this), n !== t ? this.locationFromCursor(n) : i);
|
|
5730
5822
|
}
|
|
5731
5823
|
getChars(t) {
|
|
5732
5824
|
return this.input.substring(t.state.offset, this.state.offset);
|
|
@@ -5735,9 +5827,9 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5735
5827
|
return this.input.charCodeAt(t);
|
|
5736
5828
|
}
|
|
5737
5829
|
advanceState(t) {
|
|
5738
|
-
if (t.offset >= this.end) throw this.state = t, new
|
|
5830
|
+
if (t.offset >= this.end) throw this.state = t, new Cr("Unexpected character \"EOF\"", this);
|
|
5739
5831
|
let r = this.charAt(t.offset);
|
|
5740
|
-
r === 10 ? (t.line++, t.column = 0) :
|
|
5832
|
+
r === 10 ? (t.line++, t.column = 0) : Oe(r) || t.column++, t.offset++, this.updatePeek(t);
|
|
5741
5833
|
}
|
|
5742
5834
|
updatePeek(t) {
|
|
5743
5835
|
t.peek = t.offset >= this.end ? 0 : this.charAt(t.offset);
|
|
@@ -5745,10 +5837,10 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5745
5837
|
locationFromCursor(t) {
|
|
5746
5838
|
return new De(t.file, t.state.offset, t.state.line, t.state.column);
|
|
5747
5839
|
}
|
|
5748
|
-
},
|
|
5840
|
+
}, ro = class vr extends Ii {
|
|
5749
5841
|
internalState;
|
|
5750
5842
|
constructor(t, r) {
|
|
5751
|
-
t instanceof
|
|
5843
|
+
t instanceof vr ? (super(t), this.internalState = { ...t.internalState }) : (super(t, r), this.internalState = this.state);
|
|
5752
5844
|
}
|
|
5753
5845
|
advance() {
|
|
5754
5846
|
this.state = this.internalState, super.advance(), this.processEscapeSequence();
|
|
@@ -5757,7 +5849,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5757
5849
|
super.init(), this.processEscapeSequence();
|
|
5758
5850
|
}
|
|
5759
5851
|
clone() {
|
|
5760
|
-
return new
|
|
5852
|
+
return new vr(this);
|
|
5761
5853
|
}
|
|
5762
5854
|
getChars(t) {
|
|
5763
5855
|
let r = t.clone(), n = "";
|
|
@@ -5785,45 +5877,56 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5785
5877
|
this.advanceState(this.internalState);
|
|
5786
5878
|
let r = this.clone();
|
|
5787
5879
|
this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 2);
|
|
5788
|
-
} else if (
|
|
5880
|
+
} else if (_r(t())) {
|
|
5789
5881
|
let r = "", n = 0, i = this.clone();
|
|
5790
|
-
for (;
|
|
5882
|
+
for (; _r(t()) && n < 3;) i = this.clone(), r += String.fromCodePoint(t()), this.advanceState(this.internalState), n++;
|
|
5791
5883
|
this.state.peek = parseInt(r, 8), this.internalState = i.internalState;
|
|
5792
|
-
} else
|
|
5884
|
+
} else Oe(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek;
|
|
5793
5885
|
}
|
|
5794
5886
|
decodeHexDigits(t, r) {
|
|
5795
5887
|
let n = this.input.slice(t.internalState.offset, t.internalState.offset + r), i = parseInt(n, 16);
|
|
5796
|
-
if (isNaN(i)) throw t.state = t.internalState, new
|
|
5888
|
+
if (isNaN(i)) throw t.state = t.internalState, new Cr("Invalid hexadecimal escape sequence", t);
|
|
5797
5889
|
return i;
|
|
5798
5890
|
}
|
|
5799
|
-
},
|
|
5891
|
+
}, Cr = class extends Error {
|
|
5892
|
+
msg;
|
|
5893
|
+
cursor;
|
|
5800
5894
|
constructor(e, t) {
|
|
5801
5895
|
super(e), this.msg = e, this.cursor = t, Object.setPrototypeOf(this, new.target.prototype);
|
|
5802
5896
|
}
|
|
5803
5897
|
};
|
|
5804
|
-
|
|
5898
|
+
x = class Mi extends te {
|
|
5899
|
+
elementName;
|
|
5805
5900
|
static create(t, r, n) {
|
|
5806
|
-
return new
|
|
5901
|
+
return new Mi(t, r, n);
|
|
5807
5902
|
}
|
|
5808
5903
|
constructor(t, r, n) {
|
|
5809
5904
|
super(r, n), this.elementName = t;
|
|
5810
5905
|
}
|
|
5811
|
-
},
|
|
5906
|
+
}, no = class {
|
|
5907
|
+
rootNodes;
|
|
5908
|
+
errors;
|
|
5812
5909
|
constructor(e, t) {
|
|
5813
5910
|
this.rootNodes = e, this.errors = t;
|
|
5814
5911
|
}
|
|
5815
|
-
},
|
|
5912
|
+
}, Bi = class {
|
|
5913
|
+
getTagDefinition;
|
|
5816
5914
|
constructor(e) {
|
|
5817
5915
|
this.getTagDefinition = e;
|
|
5818
5916
|
}
|
|
5819
5917
|
parse(e, t, r, n = !1, i) {
|
|
5820
|
-
let s = (
|
|
5821
|
-
let
|
|
5822
|
-
return
|
|
5823
|
-
} : o, r),
|
|
5824
|
-
return
|
|
5825
|
-
}
|
|
5826
|
-
},
|
|
5918
|
+
let s = (h) => (f, ...g) => h(f.toLowerCase(), ...g), a = n ? this.getTagDefinition : s(this.getTagDefinition), o = (h) => a(h).getContentType(), l = n ? i : s(i), c = Di(e, t, i ? (h, f, g, v) => {
|
|
5919
|
+
let W = l(h, f, g, v);
|
|
5920
|
+
return W !== void 0 ? W : o(h);
|
|
5921
|
+
} : o, r), u = r && r.canSelfClose || !1, d = r && r.allowHtmComponentClosingTags || !1, _ = new io(c.tokens, a, u, d, n);
|
|
5922
|
+
return _.build(), new no(_.rootNodes, [...c.errors, ..._.errors]);
|
|
5923
|
+
}
|
|
5924
|
+
}, io = class qi {
|
|
5925
|
+
tokens;
|
|
5926
|
+
tagDefinitionResolver;
|
|
5927
|
+
canSelfClose;
|
|
5928
|
+
allowHtmComponentClosingTags;
|
|
5929
|
+
isTagNameCaseSensitive;
|
|
5827
5930
|
_index = -1;
|
|
5828
5931
|
_peek;
|
|
5829
5932
|
_containerStack = [];
|
|
@@ -5833,8 +5936,8 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5833
5936
|
this.tokens = t, this.tagDefinitionResolver = r, this.canSelfClose = n, this.allowHtmComponentClosingTags = i, this.isTagNameCaseSensitive = s, this._advance();
|
|
5834
5937
|
}
|
|
5835
5938
|
build() {
|
|
5836
|
-
for (; this._peek.type !==
|
|
5837
|
-
for (let t of this._containerStack) t instanceof ge && this.errors.push(
|
|
5939
|
+
for (; this._peek.type !== 43;) this._peek.type === 0 || this._peek.type === 4 ? this._consumeElementStartTag(this._advance()) : this._peek.type === 3 ? (this._closeVoidElement(), this._consumeElementEndTag(this._advance())) : this._peek.type === 13 ? (this._closeVoidElement(), this._consumeCdata(this._advance())) : this._peek.type === 10 ? (this._closeVoidElement(), this._consumeComment(this._advance())) : this._peek.type === 5 || this._peek.type === 7 || this._peek.type === 6 ? (this._closeVoidElement(), this._consumeText(this._advance())) : this._peek.type === 21 ? this._consumeExpansion(this._advance()) : this._peek.type === 26 ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === 28 ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === 30 ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === 31 ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === 19 ? this._consumeDocType(this._advance()) : this._peek.type === 34 ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._peek.type === 35 || this._peek.type === 39 ? this._consumeComponentStartTag(this._advance()) : this._peek.type === 38 ? this._consumeComponentEndTag(this._advance()) : this._advance();
|
|
5940
|
+
for (let t of this._containerStack) t instanceof ge && this.errors.push(x.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
|
|
5838
5941
|
}
|
|
5839
5942
|
_advance() {
|
|
5840
5943
|
let t = this._peek;
|
|
@@ -5844,56 +5947,56 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5844
5947
|
return this._peek.type === t ? this._advance() : null;
|
|
5845
5948
|
}
|
|
5846
5949
|
_consumeCdata(t) {
|
|
5847
|
-
let r = this._advance(), n = this._getText(r), i = this._advanceIf(
|
|
5848
|
-
this._addToParent(new Si(n, new
|
|
5950
|
+
let r = this._advance(), n = this._getText(r), i = this._advanceIf(14);
|
|
5951
|
+
this._addToParent(new Si(n, new p(t.sourceSpan.start, (i || r).sourceSpan.end), [r]));
|
|
5849
5952
|
}
|
|
5850
5953
|
_consumeComment(t) {
|
|
5851
|
-
let r = this._advanceIf(
|
|
5852
|
-
this._addToParent(new
|
|
5954
|
+
let r = this._advanceIf(7), n = this._advanceIf(11), i = r != null ? r.parts[0].trim() : null, s = n == null ? t.sourceSpan : new p(t.sourceSpan.start, n.sourceSpan.end, t.sourceSpan.fullStart);
|
|
5955
|
+
this._addToParent(new wi(i, s));
|
|
5853
5956
|
}
|
|
5854
5957
|
_consumeDocType(t) {
|
|
5855
|
-
let r = this._advanceIf(
|
|
5856
|
-
this._addToParent(new
|
|
5958
|
+
let r = this._advanceIf(7), n = this._advanceIf(20), i = r != null ? r.parts[0].trim() : null, s = new p(t.sourceSpan.start, (n || r || t).sourceSpan.end);
|
|
5959
|
+
this._addToParent(new Ti(i, s));
|
|
5857
5960
|
}
|
|
5858
5961
|
_consumeExpansion(t) {
|
|
5859
5962
|
let r = this._advance(), n = this._advance(), i = [];
|
|
5860
|
-
for (; this._peek.type ===
|
|
5963
|
+
for (; this._peek.type === 22;) {
|
|
5861
5964
|
let a = this._parseExpansionCase();
|
|
5862
5965
|
if (!a) return;
|
|
5863
5966
|
i.push(a);
|
|
5864
5967
|
}
|
|
5865
|
-
if (this._peek.type !==
|
|
5866
|
-
this.errors.push(
|
|
5968
|
+
if (this._peek.type !== 25) {
|
|
5969
|
+
this.errors.push(x.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'."));
|
|
5867
5970
|
return;
|
|
5868
5971
|
}
|
|
5869
|
-
let s = new
|
|
5870
|
-
this._addToParent(new
|
|
5972
|
+
let s = new p(t.sourceSpan.start, this._peek.sourceSpan.end, t.sourceSpan.fullStart);
|
|
5973
|
+
this._addToParent(new vi(r.parts[0], n.parts[0], i, s, r.sourceSpan)), this._advance();
|
|
5871
5974
|
}
|
|
5872
5975
|
_parseExpansionCase() {
|
|
5873
5976
|
let t = this._advance();
|
|
5874
|
-
if (this._peek.type !==
|
|
5977
|
+
if (this._peek.type !== 23) return this.errors.push(x.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
|
|
5875
5978
|
let r = this._advance(), n = this._collectExpansionExpTokens(r);
|
|
5876
5979
|
if (!n) return null;
|
|
5877
5980
|
let i = this._advance();
|
|
5878
5981
|
n.push({
|
|
5879
|
-
type:
|
|
5982
|
+
type: 43,
|
|
5880
5983
|
parts: [],
|
|
5881
5984
|
sourceSpan: i.sourceSpan
|
|
5882
5985
|
});
|
|
5883
|
-
let s = new
|
|
5986
|
+
let s = new qi(n, this.tagDefinitionResolver, this.canSelfClose, this.allowHtmComponentClosingTags, this.isTagNameCaseSensitive);
|
|
5884
5987
|
if (s.build(), s.errors.length > 0) return this.errors = this.errors.concat(s.errors), null;
|
|
5885
|
-
let a = new
|
|
5988
|
+
let a = new p(t.sourceSpan.start, i.sourceSpan.end, t.sourceSpan.fullStart), o = new p(r.sourceSpan.start, i.sourceSpan.end, r.sourceSpan.fullStart);
|
|
5886
5989
|
return new Ci(t.parts[0], s.rootNodes, a, t.sourceSpan, o);
|
|
5887
5990
|
}
|
|
5888
5991
|
_collectExpansionExpTokens(t) {
|
|
5889
|
-
let r = [], n = [
|
|
5992
|
+
let r = [], n = [23];
|
|
5890
5993
|
for (;;) {
|
|
5891
|
-
if ((this._peek.type ===
|
|
5994
|
+
if ((this._peek.type === 21 || this._peek.type === 23) && n.push(this._peek.type), this._peek.type === 24) if (Ri(n, 23)) {
|
|
5892
5995
|
if (n.pop(), n.length === 0) return r;
|
|
5893
|
-
} else return this.errors.push(
|
|
5894
|
-
if (this._peek.type ===
|
|
5895
|
-
else return this.errors.push(
|
|
5896
|
-
if (this._peek.type ===
|
|
5996
|
+
} else return this.errors.push(x.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
5997
|
+
if (this._peek.type === 25) if (Ri(n, 21)) n.pop();
|
|
5998
|
+
else return this.errors.push(x.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
5999
|
+
if (this._peek.type === 43) return this.errors.push(x.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
5897
6000
|
r.push(this._advance());
|
|
5898
6001
|
}
|
|
5899
6002
|
}
|
|
@@ -5919,10 +6022,10 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5919
6022
|
parts: [i]
|
|
5920
6023
|
});
|
|
5921
6024
|
}
|
|
5922
|
-
for (; this._peek.type ===
|
|
6025
|
+
for (; this._peek.type === 8 || this._peek.type === 5 || this._peek.type === 9;) t = this._advance(), r.push(t), t.type === 8 ? i += t.parts.join("").replace(/&([^;]+);/g, Oi) : t.type === 9 ? i += t.parts[0] : i += t.parts.join("");
|
|
5923
6026
|
if (i.length > 0) {
|
|
5924
6027
|
let a = t.sourceSpan;
|
|
5925
|
-
this._addToParent(new _i(i, new
|
|
6028
|
+
this._addToParent(new _i(i, new p(n.start, a.end, n.fullStart, n.details), r));
|
|
5926
6029
|
}
|
|
5927
6030
|
}
|
|
5928
6031
|
_closeVoidElement() {
|
|
@@ -5932,40 +6035,45 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5932
6035
|
}
|
|
5933
6036
|
_consumeElementStartTag(t) {
|
|
5934
6037
|
var r;
|
|
5935
|
-
let n = [], i = [];
|
|
5936
|
-
this._consumeAttributesAndDirectives(n, i);
|
|
5937
|
-
let
|
|
5938
|
-
if (this._peek.type ===
|
|
5939
|
-
this._advance(),
|
|
5940
|
-
let
|
|
5941
|
-
this.canSelfClose ||
|
|
5942
|
-
} else this._peek.type ===
|
|
5943
|
-
let c = this._peek.sourceSpan.fullStart, u = new
|
|
5944
|
-
this._pushContainer(
|
|
6038
|
+
let n = [], i = [], s = [];
|
|
6039
|
+
this._consumeAttributesAndDirectives(n, i, s);
|
|
6040
|
+
let a = this._getElementFullName(t, this._getClosestElementLikeParent()), o = this._getTagDefinition(a), l = !1;
|
|
6041
|
+
if (this._peek.type === 2) {
|
|
6042
|
+
this._advance(), l = !0;
|
|
6043
|
+
let v = this._getTagDefinition(a);
|
|
6044
|
+
this.canSelfClose || v?.canSelfClose || Pe(a) !== null || v?.isVoid || this.errors.push(x.create(a, t.sourceSpan, `Only void, custom and foreign elements can be self closed "${t.parts[1]}"`));
|
|
6045
|
+
} else this._peek.type === 1 && (this._advance(), l = !1);
|
|
6046
|
+
let c = this._peek.sourceSpan.fullStart, u = new p(t.sourceSpan.start, c, t.sourceSpan.fullStart), d = new p(t.sourceSpan.start, c, t.sourceSpan.fullStart), _ = new p(t.sourceSpan.start.moveBy(1), t.sourceSpan.end), h = new re(a, n, i, [], l, u, d, void 0, _, o?.isVoid ?? !1, void 0, s), f = this._getContainer(), g = f !== null && !!(!((r = this._getTagDefinition(f)) === null || r === void 0) && r.isClosedByChild(h.name));
|
|
6047
|
+
this._pushContainer(h, g), l ? this._popContainer(a, re, u) : t.type === 4 && (this._popContainer(a, re, null), this.errors.push(x.create(a, u, `Opening tag "${a}" not terminated.`)));
|
|
5945
6048
|
}
|
|
5946
6049
|
_consumeComponentStartTag(t) {
|
|
5947
6050
|
var r;
|
|
5948
|
-
let n = t.parts[0], i = [], s = [];
|
|
5949
|
-
this._consumeAttributesAndDirectives(i, s);
|
|
5950
|
-
let
|
|
6051
|
+
let n = t.parts[0], i = [], s = [], a = [];
|
|
6052
|
+
this._consumeAttributesAndDirectives(i, s, a);
|
|
6053
|
+
let o = this._getClosestElementLikeParent(), l = this._getComponentTagName(t, o), c = this._getComponentFullName(t, o), u = this._peek.type === 37;
|
|
5951
6054
|
this._advance();
|
|
5952
|
-
let
|
|
5953
|
-
this._pushContainer(
|
|
6055
|
+
let d = this._peek.sourceSpan.fullStart, _ = new p(t.sourceSpan.start, d, t.sourceSpan.fullStart), h = new U(n, l, c, i, s, [], u, _, new p(t.sourceSpan.start, d, t.sourceSpan.fullStart), void 0, void 0, a), f = this._getContainer(), g = f !== null && h.tagName !== null && !!(!((r = this._getTagDefinition(f)) === null || r === void 0) && r.isClosedByChild(h.tagName));
|
|
6056
|
+
this._pushContainer(h, g), u ? this._popContainer(c, U, _) : t.type === 39 && (this._popContainer(c, U, null), this.errors.push(x.create(c, _, `Opening tag "${c}" not terminated.`)));
|
|
5954
6057
|
}
|
|
5955
|
-
_consumeAttributesAndDirectives(t, r) {
|
|
5956
|
-
for (; this._peek.type ===
|
|
6058
|
+
_consumeAttributesAndDirectives(t, r, n) {
|
|
6059
|
+
for (; this._peek.type === 15 || this._peek.type === 40 || this._peek.type === 12;) if (this._peek.type === 40) r.push(this._consumeDirective(this._peek));
|
|
6060
|
+
else if (this._peek.type === 15) t.push(this._consumeAttr(this._advance()));
|
|
6061
|
+
else {
|
|
6062
|
+
let i = this._advance();
|
|
6063
|
+
n.push(new bi(i.parts[0], i.parts[1], i.sourceSpan));
|
|
6064
|
+
}
|
|
5957
6065
|
}
|
|
5958
6066
|
_consumeComponentEndTag(t) {
|
|
5959
6067
|
let r = this._getComponentFullName(t, this._getClosestElementLikeParent());
|
|
5960
|
-
if (!this._popContainer(r,
|
|
6068
|
+
if (!this._popContainer(r, U, t.sourceSpan)) {
|
|
5961
6069
|
let n = this._containerStack[this._containerStack.length - 1], i;
|
|
5962
|
-
n instanceof
|
|
6070
|
+
n instanceof U && n.componentName === t.parts[0] ? i = `, did you mean "${n.fullName}"?` : i = ". It may happen when the tag has already been closed by another tag.";
|
|
5963
6071
|
let s = `Unexpected closing tag "${r}"${i}`;
|
|
5964
|
-
this.errors.push(
|
|
6072
|
+
this.errors.push(x.create(r, t.sourceSpan, s));
|
|
5965
6073
|
}
|
|
5966
6074
|
}
|
|
5967
6075
|
_getTagDefinition(t) {
|
|
5968
|
-
return typeof t == "string" ? this.tagDefinitionResolver(t) : t instanceof
|
|
6076
|
+
return typeof t == "string" ? this.tagDefinitionResolver(t) : t instanceof re ? this.tagDefinitionResolver(t.name) : t instanceof U && t.tagName !== null ? this.tagDefinitionResolver(t.tagName) : null;
|
|
5969
6077
|
}
|
|
5970
6078
|
_pushContainer(t, r) {
|
|
5971
6079
|
r && this._containerStack.pop(), this._addToParent(t), this._containerStack.push(t);
|
|
@@ -5973,93 +6081,93 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
5973
6081
|
_consumeElementEndTag(t) {
|
|
5974
6082
|
var r;
|
|
5975
6083
|
let n = this.allowHtmComponentClosingTags && t.parts.length === 0 ? null : this._getElementFullName(t, this._getClosestElementLikeParent());
|
|
5976
|
-
if (n && !((r = this._getTagDefinition(n)) === null || r === void 0) && r.isVoid) this.errors.push(
|
|
5977
|
-
else if (!this._popContainer(n,
|
|
6084
|
+
if (n && !((r = this._getTagDefinition(n)) === null || r === void 0) && r.isVoid) this.errors.push(x.create(n, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
|
|
6085
|
+
else if (!this._popContainer(n, re, t.sourceSpan)) {
|
|
5978
6086
|
let i = `Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;
|
|
5979
|
-
this.errors.push(
|
|
6087
|
+
this.errors.push(x.create(n, t.sourceSpan, i));
|
|
5980
6088
|
}
|
|
5981
6089
|
}
|
|
5982
6090
|
_popContainer(t, r, n) {
|
|
5983
6091
|
let i = !1;
|
|
5984
6092
|
for (let a = this._containerStack.length - 1; a >= 0; a--) {
|
|
5985
6093
|
var s;
|
|
5986
|
-
let o = this._containerStack[a],
|
|
5987
|
-
if (Pe(
|
|
6094
|
+
let o = this._containerStack[a], l = o instanceof U ? o.fullName : o.name;
|
|
6095
|
+
if (Pe(l) ? l === t : (l === t || t === null) && o instanceof r) return o.endSourceSpan = n, o.sourceSpan.end = n !== null ? n.end : o.sourceSpan.end, this._containerStack.splice(a, this._containerStack.length - a), !i;
|
|
5988
6096
|
(o instanceof ge || !(!((s = this._getTagDefinition(o)) === null || s === void 0) && s.closedByParent)) && (i = !0);
|
|
5989
6097
|
}
|
|
5990
6098
|
return !1;
|
|
5991
6099
|
}
|
|
5992
6100
|
_consumeAttr(t) {
|
|
5993
6101
|
let r = fe(t.parts[0], t.parts[1]), n = t.sourceSpan.end, i;
|
|
5994
|
-
this._peek.type ===
|
|
5995
|
-
let s = "", a = [], o,
|
|
5996
|
-
if (this._peek.type ===
|
|
5997
|
-
let
|
|
5998
|
-
a.push(
|
|
6102
|
+
this._peek.type === 16 && (i = this._advance());
|
|
6103
|
+
let s = "", a = [], o, l;
|
|
6104
|
+
if (this._peek.type === 17) for (o = this._peek.sourceSpan, l = this._peek.sourceSpan.end; this._peek.type === 17 || this._peek.type === 18 || this._peek.type === 9;) {
|
|
6105
|
+
let u = this._advance();
|
|
6106
|
+
a.push(u), u.type === 18 ? s += u.parts.join("").replace(/&([^;]+);/g, Oi) : u.type === 9 ? s += u.parts[0] : s += u.parts.join(""), l = n = u.sourceSpan.end;
|
|
5999
6107
|
}
|
|
6000
|
-
this._peek.type ===
|
|
6001
|
-
let
|
|
6002
|
-
return new
|
|
6108
|
+
this._peek.type === 16 && (l = n = this._advance().sourceSpan.end);
|
|
6109
|
+
let c = o && l && new p(i?.sourceSpan.start ?? o.start, l, i?.sourceSpan.fullStart ?? o.fullStart);
|
|
6110
|
+
return new ki(r, s, new p(t.sourceSpan.start, n, t.sourceSpan.fullStart), t.sourceSpan, c, a.length > 0 ? a : void 0, void 0);
|
|
6003
6111
|
}
|
|
6004
6112
|
_consumeDirective(t) {
|
|
6005
6113
|
let r = [], n = t.sourceSpan.end, i = null;
|
|
6006
|
-
if (this._advance(), this._peek.type ===
|
|
6007
|
-
for (n = this._peek.sourceSpan.end, this._advance(); this._peek.type ===
|
|
6008
|
-
this._peek.type ===
|
|
6114
|
+
if (this._advance(), this._peek.type === 41) {
|
|
6115
|
+
for (n = this._peek.sourceSpan.end, this._advance(); this._peek.type === 15;) r.push(this._consumeAttr(this._advance()));
|
|
6116
|
+
this._peek.type === 42 ? (i = this._peek.sourceSpan, this._advance()) : this.errors.push(x.create(null, t.sourceSpan, "Unterminated directive definition"));
|
|
6009
6117
|
}
|
|
6010
|
-
let s = new
|
|
6011
|
-
return new
|
|
6118
|
+
let s = new p(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new p(s.start, i === null ? t.sourceSpan.end : i.end, s.fullStart);
|
|
6119
|
+
return new yi(t.parts[0], r, a, s, i);
|
|
6012
6120
|
}
|
|
6013
6121
|
_consumeBlockOpen(t) {
|
|
6014
6122
|
let r = [];
|
|
6015
|
-
for (; this._peek.type ===
|
|
6123
|
+
for (; this._peek.type === 29;) {
|
|
6016
6124
|
let o = this._advance();
|
|
6017
|
-
r.push(new
|
|
6125
|
+
r.push(new fr(o.parts[0], o.sourceSpan));
|
|
6018
6126
|
}
|
|
6019
|
-
this._peek.type ===
|
|
6020
|
-
let n = this._peek.sourceSpan.fullStart, i = new
|
|
6127
|
+
this._peek.type === 27 && this._advance();
|
|
6128
|
+
let n = this._peek.sourceSpan.fullStart, i = new p(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new p(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new ge(t.parts[0], r, [], i, t.sourceSpan, s);
|
|
6021
6129
|
this._pushContainer(a, !1);
|
|
6022
6130
|
}
|
|
6023
6131
|
_consumeBlockClose(t) {
|
|
6024
6132
|
let r = this._containerStack.length, n = this._containerStack[r - 1];
|
|
6025
6133
|
if (!this._popContainer(null, ge, t.sourceSpan)) {
|
|
6026
6134
|
if (this._containerStack.length < r) {
|
|
6027
|
-
let i = n instanceof
|
|
6028
|
-
this.errors.push(
|
|
6135
|
+
let i = n instanceof U ? n.fullName : n.name;
|
|
6136
|
+
this.errors.push(x.create(null, t.sourceSpan, `Unexpected closing block. The block may have been closed earlier. Did you forget to close the <${i}> element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));
|
|
6029
6137
|
return;
|
|
6030
6138
|
}
|
|
6031
|
-
this.errors.push(
|
|
6139
|
+
this.errors.push(x.create(null, t.sourceSpan, "Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the \"}\" HTML entity instead."));
|
|
6032
6140
|
}
|
|
6033
6141
|
}
|
|
6034
6142
|
_consumeIncompleteBlock(t) {
|
|
6035
6143
|
let r = [];
|
|
6036
|
-
for (; this._peek.type ===
|
|
6144
|
+
for (; this._peek.type === 29;) {
|
|
6037
6145
|
let o = this._advance();
|
|
6038
|
-
r.push(new
|
|
6146
|
+
r.push(new fr(o.parts[0], o.sourceSpan));
|
|
6039
6147
|
}
|
|
6040
|
-
let n = this._peek.sourceSpan.fullStart, i = new
|
|
6041
|
-
this._pushContainer(a, !1), this._popContainer(null, ge, null), this.errors.push(
|
|
6148
|
+
let n = this._peek.sourceSpan.fullStart, i = new p(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new p(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new ge(t.parts[0], r, [], i, t.sourceSpan, s);
|
|
6149
|
+
this._pushContainer(a, !1), this._popContainer(null, ge, null), this.errors.push(x.create(t.parts[0], i, `Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`));
|
|
6042
6150
|
}
|
|
6043
6151
|
_consumeLet(t) {
|
|
6044
6152
|
let r = t.parts[0], n, i;
|
|
6045
|
-
if (this._peek.type !==
|
|
6046
|
-
this.errors.push(
|
|
6153
|
+
if (this._peek.type !== 32) {
|
|
6154
|
+
this.errors.push(x.create(t.parts[0], t.sourceSpan, `Invalid @let declaration "${r}". Declaration must have a value.`));
|
|
6047
6155
|
return;
|
|
6048
6156
|
} else n = this._advance();
|
|
6049
|
-
if (this._peek.type !==
|
|
6050
|
-
this.errors.push(
|
|
6157
|
+
if (this._peek.type !== 33) {
|
|
6158
|
+
this.errors.push(x.create(t.parts[0], t.sourceSpan, `Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));
|
|
6051
6159
|
return;
|
|
6052
6160
|
} else i = this._advance();
|
|
6053
|
-
let s = i.sourceSpan.
|
|
6054
|
-
this._addToParent(
|
|
6161
|
+
let s = i.sourceSpan.end, a = new p(t.sourceSpan.start, s, t.sourceSpan.fullStart), o = t.sourceSpan.toString().lastIndexOf(r), l = new p(t.sourceSpan.start.moveBy(o), t.sourceSpan.end), c = new dr(r, n.parts[0], a, l, n.sourceSpan);
|
|
6162
|
+
this._addToParent(c);
|
|
6055
6163
|
}
|
|
6056
6164
|
_consumeIncompleteLet(t) {
|
|
6057
6165
|
let r = t.parts[0] ?? "", n = r ? ` "${r}"` : "";
|
|
6058
6166
|
if (r.length > 0) {
|
|
6059
|
-
let i = t.sourceSpan.toString().lastIndexOf(r), s = new
|
|
6167
|
+
let i = t.sourceSpan.toString().lastIndexOf(r), s = new p(t.sourceSpan.start.moveBy(i), t.sourceSpan.end), a = new p(t.sourceSpan.start, t.sourceSpan.start.moveBy(0)), o = new dr(r, "", t.sourceSpan, s, a);
|
|
6060
6168
|
this._addToParent(o);
|
|
6061
6169
|
}
|
|
6062
|
-
this.errors.push(
|
|
6170
|
+
this.errors.push(x.create(t.parts[0], t.sourceSpan, `Incomplete @let declaration${n}. @let declarations must be written as \`@let <name> = <value>;\``));
|
|
6063
6171
|
}
|
|
6064
6172
|
_getContainer() {
|
|
6065
6173
|
return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;
|
|
@@ -6067,7 +6175,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6067
6175
|
_getClosestElementLikeParent() {
|
|
6068
6176
|
for (let t = this._containerStack.length - 1; t > -1; t--) {
|
|
6069
6177
|
let r = this._containerStack[t];
|
|
6070
|
-
if (r instanceof
|
|
6178
|
+
if (r instanceof re || r instanceof U) return r;
|
|
6071
6179
|
}
|
|
6072
6180
|
return null;
|
|
6073
6181
|
}
|
|
@@ -6089,51 +6197,51 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6089
6197
|
_getPrefix(t, r) {
|
|
6090
6198
|
var n;
|
|
6091
6199
|
let i, s;
|
|
6092
|
-
if (t.type ===
|
|
6093
|
-
let a = r instanceof
|
|
6200
|
+
if (t.type === 35 || t.type === 39 || t.type === 38 ? (i = t.parts[1], s = t.parts[2]) : (i = t.parts[0], s = t.parts[1]), i = i || ((n = this._getTagDefinition(s)) === null || n === void 0 ? void 0 : n.implicitNamespacePrefix) || "", !i && r) {
|
|
6201
|
+
let a = r instanceof re ? r.name : r.tagName;
|
|
6094
6202
|
if (a !== null) {
|
|
6095
|
-
let o =
|
|
6096
|
-
|
|
6203
|
+
let o = Z(a)[1], l = this._getTagDefinition(o);
|
|
6204
|
+
l !== null && !l.preventNamespaceInheritance && (i = Pe(a));
|
|
6097
6205
|
}
|
|
6098
6206
|
}
|
|
6099
6207
|
return i;
|
|
6100
6208
|
}
|
|
6101
6209
|
};
|
|
6102
|
-
|
|
6210
|
+
Hi = class extends Bi {
|
|
6103
6211
|
constructor() {
|
|
6104
|
-
super(
|
|
6212
|
+
super(Ne);
|
|
6105
6213
|
}
|
|
6106
6214
|
parse(e, t, r, n = !1, i) {
|
|
6107
6215
|
return super.parse(e, t, r, n, i);
|
|
6108
6216
|
}
|
|
6109
6217
|
};
|
|
6110
|
-
|
|
6111
|
-
to,
|
|
6112
|
-
ro,
|
|
6113
|
-
io,
|
|
6114
|
-
ao,
|
|
6218
|
+
so = [
|
|
6115
6219
|
oo,
|
|
6116
|
-
uo,
|
|
6117
6220
|
lo,
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6221
|
+
uo,
|
|
6222
|
+
ho,
|
|
6223
|
+
mo,
|
|
6224
|
+
_o,
|
|
6225
|
+
fo,
|
|
6226
|
+
go,
|
|
6227
|
+
So,
|
|
6228
|
+
po
|
|
6121
6229
|
];
|
|
6122
|
-
Fi =
|
|
6123
|
-
|
|
6230
|
+
Fi = ao;
|
|
6231
|
+
Vi = {
|
|
6124
6232
|
features: { experimental_frontMatterSupport: {
|
|
6125
6233
|
massageAstNode: !0,
|
|
6126
6234
|
embed: !0,
|
|
6127
6235
|
print: !0
|
|
6128
6236
|
} },
|
|
6129
6237
|
preprocess: Fi,
|
|
6130
|
-
print:
|
|
6131
|
-
insertPragma:
|
|
6132
|
-
massageAstNode:
|
|
6133
|
-
embed:
|
|
6134
|
-
getVisitorKeys:
|
|
6238
|
+
print: vo,
|
|
6239
|
+
insertPragma: ei,
|
|
6240
|
+
massageAstNode: or,
|
|
6241
|
+
embed: Gn,
|
|
6242
|
+
getVisitorKeys: Yn
|
|
6135
6243
|
};
|
|
6136
|
-
|
|
6244
|
+
Ui = [
|
|
6137
6245
|
{
|
|
6138
6246
|
name: "Angular",
|
|
6139
6247
|
type: "markup",
|
|
@@ -6175,7 +6283,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6175
6283
|
aceMode: "html",
|
|
6176
6284
|
extensions: [],
|
|
6177
6285
|
tmScope: "text.html.basic",
|
|
6178
|
-
aliases: ["
|
|
6286
|
+
aliases: ["LWC", "lwc"],
|
|
6179
6287
|
codemirrorMode: "htmlmixed",
|
|
6180
6288
|
codemirrorMimeType: "text/html",
|
|
6181
6289
|
parsers: ["lwc"],
|
|
@@ -6202,7 +6310,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6202
6310
|
type: "markup",
|
|
6203
6311
|
aceMode: "vue",
|
|
6204
6312
|
extensions: [".vue"],
|
|
6205
|
-
tmScope: "
|
|
6313
|
+
tmScope: "text.html.vue",
|
|
6206
6314
|
codemirrorMode: "vue",
|
|
6207
6315
|
codemirrorMimeType: "text/x-vue",
|
|
6208
6316
|
parsers: ["vue"],
|
|
@@ -6210,7 +6318,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6210
6318
|
linguistLanguageId: 391
|
|
6211
6319
|
}
|
|
6212
6320
|
];
|
|
6213
|
-
|
|
6321
|
+
br = {
|
|
6214
6322
|
bracketSpacing: {
|
|
6215
6323
|
category: "Common",
|
|
6216
6324
|
type: "boolean",
|
|
@@ -6270,10 +6378,10 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6270
6378
|
description: "Enforce single attribute per line in HTML, Vue and JSX."
|
|
6271
6379
|
}
|
|
6272
6380
|
};
|
|
6273
|
-
|
|
6274
|
-
bracketSameLine:
|
|
6381
|
+
Wi = "HTML", zi = {
|
|
6382
|
+
bracketSameLine: br.bracketSameLine,
|
|
6275
6383
|
htmlWhitespaceSensitivity: {
|
|
6276
|
-
category:
|
|
6384
|
+
category: Wi,
|
|
6277
6385
|
type: "choice",
|
|
6278
6386
|
default: "css",
|
|
6279
6387
|
description: "How to handle whitespaces in HTML.",
|
|
@@ -6292,32 +6400,33 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6292
6400
|
}
|
|
6293
6401
|
]
|
|
6294
6402
|
},
|
|
6295
|
-
singleAttributePerLine:
|
|
6403
|
+
singleAttributePerLine: br.singleAttributePerLine,
|
|
6296
6404
|
vueIndentScriptAndStyle: {
|
|
6297
|
-
category:
|
|
6405
|
+
category: Wi,
|
|
6298
6406
|
type: "boolean",
|
|
6299
6407
|
default: !1,
|
|
6300
6408
|
description: "Indent script and style tags in Vue files."
|
|
6301
6409
|
}
|
|
6302
6410
|
};
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
angular: () =>
|
|
6306
|
-
html: () =>
|
|
6307
|
-
lwc: () =>
|
|
6308
|
-
mjml: () =>
|
|
6309
|
-
vue: () =>
|
|
6411
|
+
Pr = {};
|
|
6412
|
+
Ir(Pr, {
|
|
6413
|
+
angular: () => Vo,
|
|
6414
|
+
html: () => qo,
|
|
6415
|
+
lwc: () => Wo,
|
|
6416
|
+
mjml: () => Fo,
|
|
6417
|
+
vue: () => Uo
|
|
6310
6418
|
});
|
|
6311
|
-
Gi =
|
|
6312
|
-
|
|
6419
|
+
Gi = bo;
|
|
6420
|
+
wo = {
|
|
6313
6421
|
canSelfClose: !0,
|
|
6314
6422
|
normalizeTagName: !1,
|
|
6315
6423
|
normalizeAttributeName: !1,
|
|
6316
6424
|
allowHtmComponentClosingTags: !1,
|
|
6425
|
+
allowStartTagComments: !1,
|
|
6317
6426
|
isTagNameCaseSensitive: !1,
|
|
6318
6427
|
shouldParseFrontMatter: !0
|
|
6319
6428
|
};
|
|
6320
|
-
|
|
6429
|
+
qt = /* @__PURE__ */ new Map([
|
|
6321
6430
|
["*", /* @__PURE__ */ new Set([
|
|
6322
6431
|
"accesskey",
|
|
6323
6432
|
"autocapitalize",
|
|
@@ -6834,7 +6943,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6834
6943
|
"width"
|
|
6835
6944
|
])]
|
|
6836
6945
|
]);
|
|
6837
|
-
|
|
6946
|
+
$i = /* @__PURE__ */ new Set([
|
|
6838
6947
|
"a",
|
|
6839
6948
|
"abbr",
|
|
6840
6949
|
"acronym",
|
|
@@ -6887,6 +6996,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6887
6996
|
"form",
|
|
6888
6997
|
"frame",
|
|
6889
6998
|
"frameset",
|
|
6999
|
+
"geolocation",
|
|
6890
7000
|
"h1",
|
|
6891
7001
|
"h2",
|
|
6892
7002
|
"h3",
|
|
@@ -6986,22 +7096,22 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
6986
7096
|
"wbr",
|
|
6987
7097
|
"xmp"
|
|
6988
7098
|
]);
|
|
6989
|
-
|
|
7099
|
+
Ht = {
|
|
6990
7100
|
attrs: !0,
|
|
6991
7101
|
children: !0,
|
|
6992
7102
|
cases: !0,
|
|
6993
7103
|
expression: !0
|
|
6994
|
-
},
|
|
7104
|
+
}, ji = /* @__PURE__ */ new Set(["parent"]), Me = class Me {
|
|
6995
7105
|
constructor(t = {}) {
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
for (let r of /* @__PURE__ */ new Set([
|
|
7000
|
-
if (
|
|
7106
|
+
Rr(this, ne);
|
|
7107
|
+
Wt(this, "kind");
|
|
7108
|
+
Wt(this, "parent");
|
|
7109
|
+
for (let r of /* @__PURE__ */ new Set([...ji, ...Object.keys(t)])) this.setProperty(r, t[r]);
|
|
7110
|
+
if (ae(t)) for (let r of Object.getOwnPropertySymbols(t)) this.setProperty(r, t[r]);
|
|
7001
7111
|
}
|
|
7002
7112
|
setProperty(t, r) {
|
|
7003
7113
|
if (this[t] !== r) {
|
|
7004
|
-
if (t in
|
|
7114
|
+
if (t in Ht && (r = r.map((n) => this.createChild(n))), !ji.has(t)) {
|
|
7005
7115
|
this[t] = r;
|
|
7006
7116
|
return;
|
|
7007
7117
|
}
|
|
@@ -7014,25 +7124,25 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
7014
7124
|
}
|
|
7015
7125
|
map(t) {
|
|
7016
7126
|
let r;
|
|
7017
|
-
for (let n in
|
|
7127
|
+
for (let n in Ht) {
|
|
7018
7128
|
let i = this[n];
|
|
7019
7129
|
if (i) {
|
|
7020
|
-
let s =
|
|
7021
|
-
r !== i && (r
|
|
7130
|
+
let s = To(i, (a) => a.map(t));
|
|
7131
|
+
r !== i && (r ?? (r = new Me({ parent: this.parent })), r.setProperty(n, s));
|
|
7022
7132
|
}
|
|
7023
7133
|
}
|
|
7024
|
-
if (r) for (let n in this) n in
|
|
7134
|
+
if (r) for (let n in this) n in Ht || (r[n] = this[n]);
|
|
7025
7135
|
return t(r || this);
|
|
7026
7136
|
}
|
|
7027
7137
|
walk(t) {
|
|
7028
|
-
for (let r in
|
|
7138
|
+
for (let r in Ht) {
|
|
7029
7139
|
let n = this[r];
|
|
7030
7140
|
if (n) for (let i = 0; i < n.length; i++) n[i].walk(t);
|
|
7031
7141
|
}
|
|
7032
7142
|
t(this);
|
|
7033
7143
|
}
|
|
7034
7144
|
createChild(t) {
|
|
7035
|
-
let r = t instanceof
|
|
7145
|
+
let r = t instanceof Me ? t.clone() : new Me(t);
|
|
7036
7146
|
return r.setProperty("parent", this), r;
|
|
7037
7147
|
}
|
|
7038
7148
|
insertChildBefore(t, r) {
|
|
@@ -7048,26 +7158,26 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
7048
7158
|
n[n.indexOf(t)] = this.createChild(r);
|
|
7049
7159
|
}
|
|
7050
7160
|
clone() {
|
|
7051
|
-
return new
|
|
7161
|
+
return new Me(this);
|
|
7052
7162
|
}
|
|
7053
7163
|
get $children() {
|
|
7054
|
-
return this[
|
|
7164
|
+
return this[qe(this, ne, Tr)];
|
|
7055
7165
|
}
|
|
7056
7166
|
set $children(t) {
|
|
7057
|
-
this[
|
|
7167
|
+
this[qe(this, ne, Tr)] = t;
|
|
7058
7168
|
}
|
|
7059
7169
|
get firstChild() {
|
|
7060
7170
|
return this.$children?.[0];
|
|
7061
7171
|
}
|
|
7062
7172
|
get lastChild() {
|
|
7063
|
-
return
|
|
7173
|
+
return I(1, this.$children, -1);
|
|
7064
7174
|
}
|
|
7065
7175
|
get prev() {
|
|
7066
|
-
let t =
|
|
7176
|
+
let t = qe(this, ne, yr);
|
|
7067
7177
|
return t[t.indexOf(this) - 1];
|
|
7068
7178
|
}
|
|
7069
7179
|
get next() {
|
|
7070
|
-
let t =
|
|
7180
|
+
let t = qe(this, ne, yr);
|
|
7071
7181
|
return t[t.indexOf(this) + 1];
|
|
7072
7182
|
}
|
|
7073
7183
|
get rawName() {
|
|
@@ -7080,60 +7190,61 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
7080
7190
|
return Object.fromEntries(this.attrs.map((t) => [t.fullName, t.value]));
|
|
7081
7191
|
}
|
|
7082
7192
|
};
|
|
7083
|
-
|
|
7193
|
+
ne = /* @__PURE__ */ new WeakSet(), Tr = function() {
|
|
7084
7194
|
return this.kind === "angularIcuCase" ? "expression" : this.kind === "angularIcuExpression" ? "cases" : "children";
|
|
7085
|
-
},
|
|
7195
|
+
}, yr = function() {
|
|
7086
7196
|
return this.parent?.$children ?? [];
|
|
7087
7197
|
};
|
|
7088
|
-
Ft =
|
|
7089
|
-
|
|
7198
|
+
Ft = Me;
|
|
7199
|
+
yo = [
|
|
7090
7200
|
{
|
|
7091
|
-
regex: /^(?<openingTagSuffix>\[if(?<condition>[^\]]*)\]>)(?<data>.*?)<!\s*\[endif\]$/
|
|
7092
|
-
parse:
|
|
7201
|
+
regex: /^(?<openingTagSuffix>\[if(?<condition>[^\]]*)\]>)(?<data>.*?)<!\s*\[endif\]$/s,
|
|
7202
|
+
parse: Eo
|
|
7093
7203
|
},
|
|
7094
7204
|
{
|
|
7095
|
-
regex: /^\[if(?<condition>[^\]]*)\]
|
|
7096
|
-
parse:
|
|
7205
|
+
regex: /^\[if(?<condition>[^\]]*)\]><!$/,
|
|
7206
|
+
parse: xo
|
|
7097
7207
|
},
|
|
7098
7208
|
{
|
|
7099
|
-
regex: /^<!\s*\[endif\]
|
|
7100
|
-
parse:
|
|
7209
|
+
regex: /^<!\s*\[endif\]$/,
|
|
7210
|
+
parse: Lo
|
|
7101
7211
|
}
|
|
7102
7212
|
];
|
|
7103
|
-
|
|
7213
|
+
Er = class extends gr {
|
|
7104
7214
|
visitExpansionCase(t, r) {
|
|
7105
7215
|
r.parseOptions.name === "angular" && this.visitChildren(r, (n) => {
|
|
7106
7216
|
n(t.expression);
|
|
7107
7217
|
});
|
|
7108
7218
|
}
|
|
7109
7219
|
visit(t, { parseOptions: r }) {
|
|
7110
|
-
|
|
7220
|
+
Do(t), Io(t, r), Oo(t, r), Ro(t);
|
|
7111
7221
|
}
|
|
7112
7222
|
};
|
|
7113
|
-
|
|
7223
|
+
Vt = Bt({
|
|
7114
7224
|
name: "html",
|
|
7115
7225
|
normalizeTagName: !0,
|
|
7116
7226
|
normalizeAttributeName: !0,
|
|
7117
7227
|
allowHtmComponentClosingTags: !0
|
|
7118
7228
|
});
|
|
7119
|
-
|
|
7120
|
-
...
|
|
7229
|
+
qo = st(Vt), Ho = /* @__PURE__ */ new Set(["mj-style", "mj-raw"]), Fo = st({
|
|
7230
|
+
...Vt,
|
|
7121
7231
|
name: "mjml",
|
|
7122
|
-
shouldParseAsRawText: (e) =>
|
|
7123
|
-
}),
|
|
7232
|
+
shouldParseAsRawText: (e) => Ho.has(e)
|
|
7233
|
+
}), Vo = st({
|
|
7124
7234
|
name: "angular",
|
|
7125
7235
|
tokenizeAngularBlocks: !0,
|
|
7126
|
-
tokenizeAngularLetDeclaration: !0
|
|
7127
|
-
|
|
7236
|
+
tokenizeAngularLetDeclaration: !0,
|
|
7237
|
+
allowStartTagComments: !0
|
|
7238
|
+
}), Uo = st({
|
|
7128
7239
|
name: "vue",
|
|
7129
7240
|
isTagNameCaseSensitive: !0,
|
|
7130
7241
|
shouldParseAsRawText(e, t, r, n) {
|
|
7131
7242
|
return e.toLowerCase() !== "html" && !r && (e !== "template" || n.some(({ name: i, value: s }) => i === "lang" && s !== "html" && s !== "" && s !== void 0));
|
|
7132
7243
|
}
|
|
7133
|
-
}),
|
|
7244
|
+
}), Wo = st({
|
|
7134
7245
|
name: "lwc",
|
|
7135
7246
|
canSelfClose: !1
|
|
7136
7247
|
});
|
|
7137
|
-
|
|
7248
|
+
zo = { html: Vi };
|
|
7138
7249
|
}))();
|
|
7139
|
-
export {
|
|
7250
|
+
export { Zi as default, Ui as languages, zi as options, Pr as parsers, zo as printers };
|