eddyter 1.3.64 → 1.3.65
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/LICENSE +24 -24
- package/README.md +493 -493
- package/dist/Provider/EditorProvider.d.ts +1 -0
- package/dist/api/auth.d.ts +9 -0
- package/dist/assets/style.css +1 -1
- package/dist/{babel-CCPWkrf4.js → babel-B9hn44Wo.js} +726 -1302
- package/dist/components/LockedFeature/LockedFeature.d.ts +8 -2
- package/dist/{estree-CxUPh9wa.js → estree-CocPn_Md.js} +529 -917
- package/dist/{html-CmniStvG.js → html-CxCicOef.js} +350 -589
- package/dist/{html2pdf.bundle-C1B1lr_T.js → html2pdf.bundle-9PCiy6C2.js} +2778 -3797
- package/dist/{html2pdf.bundle.min-kPviTsNx.js → html2pdf.bundle.min-D_g_u6ug.js} +3405 -5221
- package/dist/{index-BpsoOKOs.js → index-B9Gjsq91.js} +1 -1
- package/dist/{index-BL8HWCRw.js → index-CI28isEa.js} +9 -12
- package/dist/{index-FZVNbwSO.js → index-DWw_26Wr.js} +8155 -8463
- package/dist/{index-DHKx5grA.js → index-dZIrqvsF.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{markdown-B0mEGGfQ.js → markdown-BUjgWFLu.js} +578 -1015
- package/dist/{postcss-B0bxXf7u.js → postcss-CGIcwj_g.js} +615 -1065
- package/dist/{standalone-DmuJV5rn.js → standalone-C0qguT38.js} +350 -596
- package/dist/{typescript-DZlC_9M8.js → typescript-BM7wk6k-.js} +1114 -1806
- package/package.json +151 -151
|
@@ -1,39 +1,29 @@
|
|
|
1
1
|
var hr = Object.defineProperty, dr = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
}, mn = (e, t, r) => t in e ? hr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, mr = (e, t) => {
|
|
4
|
-
for (var r in t)
|
|
5
|
-
hr(e, r, { get: t[r], enumerable: !0 });
|
|
4
|
+
for (var r in t) hr(e, r, { get: t[r], enumerable: !0 });
|
|
6
5
|
}, Et = (e, t, r) => mn(e, typeof t != "symbol" ? t + "" : t, r), gr = (e, t, r) => t.has(e) || dr("Cannot " + r), F = (e, t, r) => (gr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), fr = (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), gn = (e, t, r, n) => (gr(e, t, "write to private field"), t.set(e, r), r), vr = {};
|
|
7
6
|
mr(vr, { languages: () => oi, options: () => ci, parsers: () => rn, printers: () => Su });
|
|
8
7
|
var fn = (e, t, r, n) => {
|
|
9
|
-
if (!(e && t == null))
|
|
10
|
-
return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
|
|
8
|
+
if (!(e && t == null)) return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
|
|
11
9
|
}, L = fn, Cr = "string", Sr = "array", yr = "cursor", at = "indent", st = "align", br = "trim", it = "group", ut = "fill", ot = "if-break", lt = "indent-if-break", _r = "line-suffix", wr = "line-suffix-boundary", Q = "line", Ar = "label", ct = "break-parent", kr = /* @__PURE__ */ new Set([yr, at, st, br, it, ut, ot, lt, _r, wr, Q, Ar, ct]), vn = (e, t, r) => {
|
|
12
|
-
if (!(e && t == null))
|
|
13
|
-
return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
|
|
10
|
+
if (!(e && t == null)) return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
|
|
14
11
|
}, de = vn;
|
|
15
12
|
function Cn(e) {
|
|
16
|
-
if (typeof e == "string")
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
return Sr;
|
|
20
|
-
if (!e)
|
|
21
|
-
return;
|
|
13
|
+
if (typeof e == "string") return Cr;
|
|
14
|
+
if (Array.isArray(e)) return Sr;
|
|
15
|
+
if (!e) return;
|
|
22
16
|
let { type: t } = e;
|
|
23
|
-
if (kr.has(t))
|
|
24
|
-
return t;
|
|
17
|
+
if (kr.has(t)) return t;
|
|
25
18
|
}
|
|
26
19
|
var Er = Cn, Sn = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
|
|
27
20
|
function yn(e) {
|
|
28
21
|
let t = e === null ? "null" : typeof e;
|
|
29
|
-
if (t !== "string" && t !== "object")
|
|
30
|
-
return `Unexpected doc '${t}',
|
|
22
|
+
if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
|
|
31
23
|
Expected it to be 'string' or 'object'.`;
|
|
32
|
-
if (Er(e))
|
|
33
|
-
throw new Error("doc is valid.");
|
|
24
|
+
if (Er(e)) throw new Error("doc is valid.");
|
|
34
25
|
let r = Object.prototype.toString.call(e);
|
|
35
|
-
if (r !== "[object Object]")
|
|
36
|
-
return `Unexpected doc '${r}'.`;
|
|
26
|
+
if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
|
|
37
27
|
let n = Sn([...kr].map((a) => `'${a}'`));
|
|
38
28
|
return `Unexpected doc.type '${e.type}'.
|
|
39
29
|
Expected it to be ${n}.`;
|
|
@@ -45,13 +35,11 @@ var bn = class extends Error {
|
|
|
45
35
|
}
|
|
46
36
|
}, _n = bn;
|
|
47
37
|
function xr(e, t) {
|
|
48
|
-
if (typeof e == "string")
|
|
49
|
-
return t(e);
|
|
38
|
+
if (typeof e == "string") return t(e);
|
|
50
39
|
let r = /* @__PURE__ */ new Map();
|
|
51
40
|
return n(e);
|
|
52
41
|
function n(s) {
|
|
53
|
-
if (r.has(s))
|
|
54
|
-
return r.get(s);
|
|
42
|
+
if (r.has(s)) return r.get(s);
|
|
55
43
|
let i = a(s);
|
|
56
44
|
return r.set(s, i), i;
|
|
57
45
|
}
|
|
@@ -118,21 +106,18 @@ function xn(e, t) {
|
|
|
118
106
|
var me = { type: ct }, Dn = { type: Q, hard: !0 }, Tn = { type: Q, hard: !0, literal: !0 }, _ = { type: Q }, D = { type: Q, soft: !0 }, S = [Dn, me], Bn = [Tn, me];
|
|
119
107
|
function Z(e, t) {
|
|
120
108
|
let r = [];
|
|
121
|
-
for (let n = 0; n < t.length; n++)
|
|
122
|
-
n !== 0 && r.push(e), r.push(t[n]);
|
|
109
|
+
for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
|
|
123
110
|
return r;
|
|
124
111
|
}
|
|
125
112
|
var ye = "'", xt = '"';
|
|
126
113
|
function Ln(e, t) {
|
|
127
114
|
let r = t === !0 || t === ye ? ye : xt, n = r === ye ? xt : ye, a = 0, s = 0;
|
|
128
|
-
for (let i of e)
|
|
129
|
-
i === r ? a++ : i === n && s++;
|
|
115
|
+
for (let i of e) i === r ? a++ : i === n && s++;
|
|
130
116
|
return a > s ? n : r;
|
|
131
117
|
}
|
|
132
118
|
var Fn = Ln;
|
|
133
119
|
function qn(e) {
|
|
134
|
-
if (typeof e != "string")
|
|
135
|
-
throw new TypeError("Expected a string");
|
|
120
|
+
if (typeof e != "string") throw new TypeError("Expected a string");
|
|
136
121
|
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
137
122
|
}
|
|
138
123
|
var N, Nn = class {
|
|
@@ -141,14 +126,12 @@ var N, Nn = class {
|
|
|
141
126
|
}
|
|
142
127
|
getLeadingWhitespaceCount(e) {
|
|
143
128
|
let t = F(this, N), r = 0;
|
|
144
|
-
for (let n = 0; n < e.length && t.has(e.charAt(n)); n++)
|
|
145
|
-
r++;
|
|
129
|
+
for (let n = 0; n < e.length && t.has(e.charAt(n)); n++) r++;
|
|
146
130
|
return r;
|
|
147
131
|
}
|
|
148
132
|
getTrailingWhitespaceCount(e) {
|
|
149
133
|
let t = F(this, N), r = 0;
|
|
150
|
-
for (let n = e.length - 1; n >= 0 && t.has(e.charAt(n)); n--)
|
|
151
|
-
r++;
|
|
134
|
+
for (let n = e.length - 1; n >= 0 && t.has(e.charAt(n)); n--) r++;
|
|
152
135
|
return r;
|
|
153
136
|
}
|
|
154
137
|
getLeadingWhitespace(e) {
|
|
@@ -207,11 +190,8 @@ function Un(e) {
|
|
|
207
190
|
var Ne = Un, Vn = /* @__PURE__ */ new Set(["sourceSpan", "startSourceSpan", "endSourceSpan", "nameSpan", "valueSpan", "keySpan", "tagDefinition", "tokens", "valueTokens", "switchValueSourceSpan", "expSourceSpan", "valueSourceSpan"]), On = /* @__PURE__ */ new Set(["if", "else if", "for", "switch", "case"]);
|
|
208
191
|
function Br(e, t) {
|
|
209
192
|
var r;
|
|
210
|
-
if (e.type === "text" || e.type === "comment" || Ne(e) || e.type === "yaml" || e.type === "toml")
|
|
211
|
-
|
|
212
|
-
if (e.type === "attribute" && delete t.value, e.type === "docType" && delete t.value, e.type === "angularControlFlowBlock" && (r = e.parameters) != null && r.children)
|
|
213
|
-
for (let n of t.parameters.children)
|
|
214
|
-
On.has(e.name) ? delete n.expression : n.expression = n.expression.trim();
|
|
193
|
+
if (e.type === "text" || e.type === "comment" || Ne(e) || e.type === "yaml" || e.type === "toml") return null;
|
|
194
|
+
if (e.type === "attribute" && delete t.value, e.type === "docType" && delete t.value, e.type === "angularControlFlowBlock" && (r = e.parameters) != null && r.children) for (let n of t.parameters.children) On.has(e.name) ? delete n.expression : n.expression = n.expression.trim();
|
|
215
195
|
e.type === "angularIcuExpression" && (t.switchValue = e.switchValue.trim()), e.type === "angularLetDeclarationInitializer" && delete t.value;
|
|
216
196
|
}
|
|
217
197
|
Br.ignoredProperties = Vn;
|
|
@@ -244,16 +224,14 @@ function jn(e, t, r, n) {
|
|
|
244
224
|
return /^\s*$/u.test(s) ? "" : M(s, e, { parser: "__ng_directive", __isInHtmlAttribute: !1 }, ee);
|
|
245
225
|
}
|
|
246
226
|
var Gn = jn, Kn = (e, t) => {
|
|
247
|
-
if (!(e && t == null))
|
|
248
|
-
return t.toReversed || !Array.isArray(t) ? t.toReversed() : [...t].reverse();
|
|
227
|
+
if (!(e && t == null)) return t.toReversed || !Array.isArray(t) ? t.toReversed() : [...t].reverse();
|
|
249
228
|
}, Xn = Kn;
|
|
250
229
|
function Jn(e) {
|
|
251
230
|
return Array.isArray(e) && e.length > 0;
|
|
252
231
|
}
|
|
253
232
|
var pt = Jn, Dt, Tt, Bt, Lt, Ft, Yn = ((Dt = globalThis.Deno) == null ? void 0 : Dt.build.os) === "windows" || ((Bt = (Tt = globalThis.navigator) == null ? void 0 : Tt.platform) == null ? void 0 : Bt.startsWith("Win")) || ((Ft = (Lt = globalThis.process) == null ? void 0 : Lt.platform) == null ? void 0 : Ft.startsWith("win")) || !1;
|
|
254
233
|
function Lr(e) {
|
|
255
|
-
if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:")
|
|
256
|
-
throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
|
|
234
|
+
if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
|
|
257
235
|
return e;
|
|
258
236
|
}
|
|
259
237
|
function Qn(e) {
|
|
@@ -269,25 +247,21 @@ function ea(e) {
|
|
|
269
247
|
}
|
|
270
248
|
var ta = ea, ra = (e) => String(e).split(/[/\\]/u).pop();
|
|
271
249
|
function qt(e, t) {
|
|
272
|
-
if (!t)
|
|
273
|
-
return;
|
|
250
|
+
if (!t) return;
|
|
274
251
|
let r = ra(t).toLowerCase();
|
|
275
252
|
return e.find(({ filenames: n }) => n?.some((a) => a.toLowerCase() === r)) ?? e.find(({ extensions: n }) => n?.some((a) => r.endsWith(a)));
|
|
276
253
|
}
|
|
277
254
|
function na(e, t) {
|
|
278
|
-
if (t)
|
|
279
|
-
return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r?.includes(t)) ?? e.find(({ extensions: r }) => r?.includes(`.${t}`));
|
|
255
|
+
if (t) return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r?.includes(t)) ?? e.find(({ extensions: r }) => r?.includes(`.${t}`));
|
|
280
256
|
}
|
|
281
257
|
function Nt(e, t) {
|
|
282
258
|
if (t) {
|
|
283
|
-
if (String(t).startsWith("file:"))
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
if (typeof t == "string")
|
|
290
|
-
return e.find(({ isSupported: r }) => r?.({ filepath: t }));
|
|
259
|
+
if (String(t).startsWith("file:")) try {
|
|
260
|
+
t = ta(t);
|
|
261
|
+
} catch {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (typeof t == "string") return e.find(({ isSupported: r }) => r?.({ filepath: t }));
|
|
291
265
|
}
|
|
292
266
|
}
|
|
293
267
|
function aa(e, t) {
|
|
@@ -331,8 +305,7 @@ function Nr(e) {
|
|
|
331
305
|
function da(e, t) {
|
|
332
306
|
var r, n;
|
|
333
307
|
let a = s();
|
|
334
|
-
if (a && !e.prev && (n = (r = e.parent) == null ? void 0 : r.tagDefinition) != null && n.ignoreFirstLf)
|
|
335
|
-
return e.type === "interpolation";
|
|
308
|
+
if (a && !e.prev && (n = (r = e.parent) == null ? void 0 : r.tagDefinition) != null && n.ignoreFirstLf) return e.type === "interpolation";
|
|
336
309
|
return a;
|
|
337
310
|
function s() {
|
|
338
311
|
return Ne(e) || e.type === "angularControlFlowBlock" ? !1 : (e.type === "text" || e.type === "interpolation") && e.prev && (e.prev.type === "text" || e.prev.type === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : Y(e.parent) ? !0 : !(!e.prev && (e.parent.type === "root" || Y(e) && e.parent || U(e.parent, t) || He(e.parent, t) || !_a(e.parent.cssDisplay)) || e.prev && !ka(e.prev.cssDisplay));
|
|
@@ -387,40 +360,35 @@ function Ca(e) {
|
|
|
387
360
|
return (t = e.children) == null ? void 0 : t.some((r) => r.type !== "text");
|
|
388
361
|
}
|
|
389
362
|
function Ur(e) {
|
|
390
|
-
if (e)
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
return "json";
|
|
409
|
-
}
|
|
363
|
+
if (e) switch (e) {
|
|
364
|
+
case "module":
|
|
365
|
+
case "text/javascript":
|
|
366
|
+
case "text/babel":
|
|
367
|
+
case "text/jsx":
|
|
368
|
+
case "application/javascript":
|
|
369
|
+
return "babel";
|
|
370
|
+
case "application/x-typescript":
|
|
371
|
+
return "typescript";
|
|
372
|
+
case "text/markdown":
|
|
373
|
+
return "markdown";
|
|
374
|
+
case "text/html":
|
|
375
|
+
return "html";
|
|
376
|
+
case "text/x-handlebars-template":
|
|
377
|
+
return "glimmer";
|
|
378
|
+
default:
|
|
379
|
+
if (e.endsWith("json") || e.endsWith("importmap") || e === "speculationrules") return "json";
|
|
380
|
+
}
|
|
410
381
|
}
|
|
411
382
|
function Sa(e, t) {
|
|
412
383
|
let { name: r, attrMap: n } = e;
|
|
413
|
-
if (r !== "script" || Object.prototype.hasOwnProperty.call(n, "src"))
|
|
414
|
-
return;
|
|
384
|
+
if (r !== "script" || Object.prototype.hasOwnProperty.call(n, "src")) return;
|
|
415
385
|
let { type: a, lang: s } = e.attrMap;
|
|
416
386
|
return !s && !a ? "babel" : Pe(t, { language: s }) ?? Ur(a);
|
|
417
387
|
}
|
|
418
388
|
function ya(e, t) {
|
|
419
|
-
if (!dt(e, t))
|
|
420
|
-
return;
|
|
389
|
+
if (!dt(e, t)) return;
|
|
421
390
|
let { attrMap: r } = e;
|
|
422
|
-
if (Object.prototype.hasOwnProperty.call(r, "src"))
|
|
423
|
-
return;
|
|
391
|
+
if (Object.prototype.hasOwnProperty.call(r, "src")) return;
|
|
424
392
|
let { type: n, lang: a } = r;
|
|
425
393
|
return Pe(t, { language: a }) ?? Ur(n);
|
|
426
394
|
}
|
|
@@ -429,8 +397,7 @@ function ba(e, t) {
|
|
|
429
397
|
let { lang: r } = e.attrMap;
|
|
430
398
|
return r ? Pe(t, { language: r }) : "css";
|
|
431
399
|
}
|
|
432
|
-
if (e.name === "mj-style" && t.parser === "mjml")
|
|
433
|
-
return "css";
|
|
400
|
+
if (e.name === "mj-style" && t.parser === "mjml") return "css";
|
|
434
401
|
}
|
|
435
402
|
function Mt(e, t) {
|
|
436
403
|
return Sa(e, t) ?? ba(e, t) ?? ya(e, t);
|
|
@@ -459,35 +426,28 @@ function Y(e) {
|
|
|
459
426
|
function xa(e, t) {
|
|
460
427
|
let r = e;
|
|
461
428
|
for (; r; ) {
|
|
462
|
-
if (t(r))
|
|
463
|
-
return !0;
|
|
429
|
+
if (t(r)) return !0;
|
|
464
430
|
r = r.parent;
|
|
465
431
|
}
|
|
466
432
|
return !1;
|
|
467
433
|
}
|
|
468
434
|
function Da(e, t) {
|
|
469
435
|
var r;
|
|
470
|
-
if (te(e, t))
|
|
471
|
-
return "block";
|
|
436
|
+
if (te(e, t)) return "block";
|
|
472
437
|
if (((r = e.prev) == null ? void 0 : r.type) === "comment") {
|
|
473
438
|
let a = e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);
|
|
474
|
-
if (a)
|
|
475
|
-
return a[1];
|
|
439
|
+
if (a) return a[1];
|
|
476
440
|
}
|
|
477
441
|
let n = !1;
|
|
478
|
-
if (e.type === "element" && e.namespace === "svg")
|
|
479
|
-
|
|
480
|
-
n = !0;
|
|
481
|
-
else
|
|
482
|
-
return e.name === "svg" ? "inline-block" : "block";
|
|
442
|
+
if (e.type === "element" && e.namespace === "svg") if (xa(e, (a) => a.fullName === "svg:foreignObject")) n = !0;
|
|
443
|
+
else return e.name === "svg" ? "inline-block" : "block";
|
|
483
444
|
switch (t.htmlWhitespaceSensitivity) {
|
|
484
445
|
case "strict":
|
|
485
446
|
return "inline";
|
|
486
447
|
case "ignore":
|
|
487
448
|
return "block";
|
|
488
449
|
default:
|
|
489
|
-
if (e.type === "element" && (!e.namespace || n || pe(e)) && Object.prototype.hasOwnProperty.call(It, e.name))
|
|
490
|
-
return It[e.name];
|
|
450
|
+
if (e.type === "element" && (!e.namespace || n || pe(e)) && Object.prototype.hasOwnProperty.call(It, e.name)) return It[e.name];
|
|
491
451
|
}
|
|
492
452
|
return sa;
|
|
493
453
|
}
|
|
@@ -498,11 +458,9 @@ function Ta(e) {
|
|
|
498
458
|
let t = Number.POSITIVE_INFINITY;
|
|
499
459
|
for (let r of e.split(`
|
|
500
460
|
`)) {
|
|
501
|
-
if (r.length === 0)
|
|
502
|
-
continue;
|
|
461
|
+
if (r.length === 0) continue;
|
|
503
462
|
let n = R.getLeadingWhitespaceCount(r);
|
|
504
|
-
if (n === 0)
|
|
505
|
-
return 0;
|
|
463
|
+
if (n === 0) return 0;
|
|
506
464
|
r.length !== n && n < t && (t = n);
|
|
507
465
|
}
|
|
508
466
|
return t === Number.POSITIVE_INFINITY ? 0 : t;
|
|
@@ -534,8 +492,7 @@ function La(e) {
|
|
|
534
492
|
}
|
|
535
493
|
function Fa(e, t) {
|
|
536
494
|
let r = e.parent;
|
|
537
|
-
if (!te(r, t))
|
|
538
|
-
return !1;
|
|
495
|
+
if (!te(r, t)) return !1;
|
|
539
496
|
let n = r.fullName, a = e.fullName;
|
|
540
497
|
return n === "script" && a === "setup" || n === "style" && a === "vars";
|
|
541
498
|
}
|
|
@@ -548,15 +505,12 @@ function zr(e, t) {
|
|
|
548
505
|
var jr = /\{\{(.+?)\}\}/su;
|
|
549
506
|
async function qa(e, t) {
|
|
550
507
|
let r = [];
|
|
551
|
-
for (let [n, a] of e.split(jr).entries())
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
} catch {
|
|
558
|
-
r.push("{{", P(a), "}}");
|
|
559
|
-
}
|
|
508
|
+
for (let [n, a] of e.split(jr).entries()) if (n % 2 === 0) r.push(P(a));
|
|
509
|
+
else try {
|
|
510
|
+
r.push(k(["{{", H([_, await M(a, t, { parser: "__ng_interpolation", __isInHtmlInterpolation: !0 })]), _, "}}"]));
|
|
511
|
+
} catch {
|
|
512
|
+
r.push("{{", P(a), "}}");
|
|
513
|
+
}
|
|
560
514
|
return r;
|
|
561
515
|
}
|
|
562
516
|
function mt({ parser: e }) {
|
|
@@ -564,26 +518,19 @@ function mt({ parser: e }) {
|
|
|
564
518
|
}
|
|
565
519
|
var Na = mt({ parser: "__ng_action" }), Ia = mt({ parser: "__ng_binding" }), Pa = mt({ parser: "__ng_directive" });
|
|
566
520
|
function Ma(e, t) {
|
|
567
|
-
if (t.parser !== "angular")
|
|
568
|
-
return;
|
|
521
|
+
if (t.parser !== "angular") return;
|
|
569
522
|
let { node: r } = e, n = r.fullName;
|
|
570
|
-
if (n.startsWith("(") && n.endsWith(")") || n.startsWith("on-"))
|
|
571
|
-
|
|
572
|
-
if (n.startsWith("
|
|
573
|
-
return Ia;
|
|
574
|
-
if (n.startsWith("*"))
|
|
575
|
-
return Pa;
|
|
523
|
+
if (n.startsWith("(") && n.endsWith(")") || n.startsWith("on-")) return Na;
|
|
524
|
+
if (n.startsWith("[") && n.endsWith("]") || /^bind(?:on)?-/u.test(n) || /^ng-(?:if|show|hide|class|style)$/u.test(n)) return Ia;
|
|
525
|
+
if (n.startsWith("*")) return Pa;
|
|
576
526
|
let a = O(r);
|
|
577
|
-
if (/^i18n(?:-.+)?$/u.test(n))
|
|
578
|
-
|
|
579
|
-
if (jr.test(a))
|
|
580
|
-
return (s) => qa(a, s);
|
|
527
|
+
if (/^i18n(?:-.+)?$/u.test(n)) return () => Ie(Tr($r(r, a.trim())), !a.includes("@@"));
|
|
528
|
+
if (jr.test(a)) return (s) => qa(a, s);
|
|
581
529
|
}
|
|
582
530
|
var Ha = Ma;
|
|
583
531
|
function Ra(e, t) {
|
|
584
532
|
let { node: r } = e, n = O(r);
|
|
585
|
-
if (r.fullName === "class" && !t.parentParser && !n.includes("{{"))
|
|
586
|
-
return () => n.trim().split(/\s+/u).join(" ");
|
|
533
|
+
if (r.fullName === "class" && !t.parentParser && !n.includes("{{")) return () => n.trim().split(/\s+/u).join(" ");
|
|
587
534
|
}
|
|
588
535
|
var Ua = Ra;
|
|
589
536
|
function Ht(e) {
|
|
@@ -595,70 +542,54 @@ function ja(e) {
|
|
|
595
542
|
let t = e.length, r, n, a, s, i, u = 0, o;
|
|
596
543
|
function p(g) {
|
|
597
544
|
let C, w = g.exec(e.substring(u));
|
|
598
|
-
if (w)
|
|
599
|
-
return [C] = w, u += C.length, C;
|
|
545
|
+
if (w) return [C] = w, u += C.length, C;
|
|
600
546
|
}
|
|
601
547
|
let l = [];
|
|
602
548
|
for (; ; ) {
|
|
603
549
|
if (p(Oa), u >= t) {
|
|
604
|
-
if (l.length === 0)
|
|
605
|
-
throw new Error("Must contain one or more image candidate strings.");
|
|
550
|
+
if (l.length === 0) throw new Error("Must contain one or more image candidate strings.");
|
|
606
551
|
return l;
|
|
607
552
|
}
|
|
608
553
|
o = u, r = p(Wa), n = [], r.slice(-1) === "," ? (r = r.replace($a, ""), d()) : v();
|
|
609
554
|
}
|
|
610
555
|
function v() {
|
|
611
556
|
for (p(Va), a = "", s = "in descriptor"; ; ) {
|
|
612
|
-
if (i = e.charAt(u), s === "in descriptor")
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
else
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
return;
|
|
631
|
-
} else
|
|
632
|
-
a += i;
|
|
633
|
-
else if (s === "after descriptor" && !Ht(i))
|
|
634
|
-
if (i === "") {
|
|
635
|
-
d();
|
|
636
|
-
return;
|
|
637
|
-
} else
|
|
638
|
-
s = "in descriptor", u -= 1;
|
|
557
|
+
if (i = e.charAt(u), s === "in descriptor") if (Ht(i)) a && (n.push(a), a = "", s = "after descriptor");
|
|
558
|
+
else if (i === ",") {
|
|
559
|
+
u += 1, a && n.push(a), d();
|
|
560
|
+
return;
|
|
561
|
+
} else if (i === "(") a += i, s = "in parens";
|
|
562
|
+
else if (i === "") {
|
|
563
|
+
a && n.push(a), d();
|
|
564
|
+
return;
|
|
565
|
+
} else a += i;
|
|
566
|
+
else if (s === "in parens") if (i === ")") a += i, s = "in descriptor";
|
|
567
|
+
else if (i === "") {
|
|
568
|
+
n.push(a), d();
|
|
569
|
+
return;
|
|
570
|
+
} else a += i;
|
|
571
|
+
else if (s === "after descriptor" && !Ht(i)) if (i === "") {
|
|
572
|
+
d();
|
|
573
|
+
return;
|
|
574
|
+
} else s = "in descriptor", u -= 1;
|
|
639
575
|
u += 1;
|
|
640
576
|
}
|
|
641
577
|
}
|
|
642
578
|
function d() {
|
|
643
579
|
let g = !1, C, w, E, x, c = {}, f, A, y, T, G;
|
|
644
|
-
for (x = 0; x < n.length; x++)
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
c.source = { value: r, startOffset: o }, C && (c.width = { value: C }), w && (c.density = { value: w }), E && (c.height = { value: E }), l.push(c);
|
|
648
|
-
else
|
|
649
|
-
throw new Error(`Invalid srcset descriptor found in "${e}" at "${f}".`);
|
|
580
|
+
for (x = 0; x < n.length; x++) f = n[x], A = f[f.length - 1], y = f.substring(0, f.length - 1), T = parseInt(y, 10), G = parseFloat(y), Rt.test(y) && A === "w" ? ((C || w) && (g = !0), T === 0 ? g = !0 : C = T) : za.test(y) && A === "x" ? ((C || w || E) && (g = !0), G < 0 ? g = !0 : w = G) : Rt.test(y) && A === "h" ? ((E || w) && (g = !0), T === 0 ? g = !0 : E = T) : g = !0;
|
|
581
|
+
if (!g) c.source = { value: r, startOffset: o }, C && (c.width = { value: C }), w && (c.density = { value: w }), E && (c.height = { value: E }), l.push(c);
|
|
582
|
+
else throw new Error(`Invalid srcset descriptor found in "${e}" at "${f}".`);
|
|
650
583
|
}
|
|
651
584
|
}
|
|
652
585
|
var Ga = ja;
|
|
653
586
|
function Ka(e) {
|
|
654
|
-
if (e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source"))
|
|
655
|
-
return () => Ja(O(e.node));
|
|
587
|
+
if (e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source")) return () => Ja(O(e.node));
|
|
656
588
|
}
|
|
657
589
|
var Gr = { width: "w", height: "h", density: "x" }, Xa = Object.keys(Gr);
|
|
658
590
|
function Ja(e) {
|
|
659
591
|
let t = Ga(e), r = Xa.filter((l) => t.some((v) => Object.prototype.hasOwnProperty.call(v, l)));
|
|
660
|
-
if (r.length > 1)
|
|
661
|
-
throw new Error("Mixed descriptor in srcset is not supported");
|
|
592
|
+
if (r.length > 1) throw new Error("Mixed descriptor in srcset is not supported");
|
|
662
593
|
let [n] = r, a = Gr[n], s = t.map((l) => l.source.value), i = Math.max(...s.map((l) => l.length)), u = t.map((l) => l[n] ? String(l[n].value) : ""), o = u.map((l) => {
|
|
663
594
|
let v = l.indexOf(".");
|
|
664
595
|
return v === -1 ? l.length : v;
|
|
@@ -675,8 +606,7 @@ function Ja(e) {
|
|
|
675
606
|
var Ya = Ka;
|
|
676
607
|
function Qa(e, t) {
|
|
677
608
|
let { node: r } = e, n = O(e.node).trim();
|
|
678
|
-
if (r.fullName === "style" && !t.parentParser && !n.includes("{{"))
|
|
679
|
-
return async (a) => Ie(await a(n, { parser: "css", __isHTMLStyleAttribute: !0 }));
|
|
609
|
+
if (r.fullName === "style" && !t.parentParser && !n.includes("{{")) return async (a) => Ie(await a(n, { parser: "css", __isHTMLStyleAttribute: !0 }));
|
|
680
610
|
}
|
|
681
611
|
var $e = /* @__PURE__ */ new WeakMap();
|
|
682
612
|
function Za(e, t) {
|
|
@@ -697,42 +627,31 @@ async function rs(e, t, r, n) {
|
|
|
697
627
|
}
|
|
698
628
|
function ns(e) {
|
|
699
629
|
let t = /(.*?)\s+(in|of)\s+(.*)/su, r = /,([^,\]}]*)(?:,([^,\]}]*))?$/u, n = /^\(|\)$/gu, a = e.match(t);
|
|
700
|
-
if (!a)
|
|
701
|
-
return;
|
|
630
|
+
if (!a) return;
|
|
702
631
|
let s = {};
|
|
703
|
-
if (s.for = a[3].trim(), !s.for)
|
|
704
|
-
return;
|
|
632
|
+
if (s.for = a[3].trim(), !s.for) return;
|
|
705
633
|
let i = L(!1, a[1].trim(), n, ""), u = i.match(r);
|
|
706
634
|
u ? (s.alias = i.replace(r, ""), s.iterator1 = u[1].trim(), u[2] && (s.iterator2 = u[2].trim())) : s.alias = i;
|
|
707
635
|
let o = [s.alias, s.iterator1, s.iterator2];
|
|
708
|
-
if (!o.some((p, l) => !p && (l === 0 || o.slice(l + 1).some(Boolean))))
|
|
709
|
-
return { left: o.filter(Boolean).join(","), operator: a[2], right: s.for };
|
|
636
|
+
if (!o.some((p, l) => !p && (l === 0 || o.slice(l + 1).some(Boolean)))) return { left: o.filter(Boolean).join(","), operator: a[2], right: s.for };
|
|
710
637
|
}
|
|
711
638
|
function as(e, t) {
|
|
712
|
-
if (t.parser !== "vue")
|
|
713
|
-
return;
|
|
639
|
+
if (t.parser !== "vue") return;
|
|
714
640
|
let { node: r } = e, n = r.fullName;
|
|
715
|
-
if (n === "v-for")
|
|
716
|
-
|
|
717
|
-
if (n === "generic" && zr(r.parent, t))
|
|
718
|
-
return es;
|
|
641
|
+
if (n === "v-for") return rs;
|
|
642
|
+
if (n === "generic" && zr(r.parent, t)) return es;
|
|
719
643
|
let a = O(r), s = gt(e, t);
|
|
720
|
-
if (La(r) || Fa(r, t))
|
|
721
|
-
|
|
722
|
-
if (n.startsWith("
|
|
723
|
-
|
|
724
|
-
if (n.startsWith(":") || n.startsWith(".") || n.startsWith("v-bind:"))
|
|
725
|
-
return (i) => is(a, i, { parseWithTs: s });
|
|
726
|
-
if (n.startsWith("v-"))
|
|
727
|
-
return (i) => Kr(a, i, { parseWithTs: s });
|
|
644
|
+
if (La(r) || Fa(r, t)) return (i) => ts(a, i, { parseWithTs: s });
|
|
645
|
+
if (n.startsWith("@") || n.startsWith("v-on:")) return (i) => ss(a, i, { parseWithTs: s });
|
|
646
|
+
if (n.startsWith(":") || n.startsWith(".") || n.startsWith("v-bind:")) return (i) => is(a, i, { parseWithTs: s });
|
|
647
|
+
if (n.startsWith("v-")) return (i) => Kr(a, i, { parseWithTs: s });
|
|
728
648
|
}
|
|
729
649
|
async function ss(e, t, { parseWithTs: r }) {
|
|
730
650
|
var n;
|
|
731
651
|
try {
|
|
732
652
|
return await Kr(e, t, { parseWithTs: r });
|
|
733
653
|
} catch (a) {
|
|
734
|
-
if (((n = a.cause) == null ? void 0 : n.code) !== "BABEL_PARSER_SYNTAX_ERROR")
|
|
735
|
-
throw a;
|
|
654
|
+
if (((n = a.cause) == null ? void 0 : n.code) !== "BABEL_PARSER_SYNTAX_ERROR") throw a;
|
|
736
655
|
}
|
|
737
656
|
return M(e, t, { parser: r ? "__vue_ts_event_binding" : "__vue_event_binding" }, ee);
|
|
738
657
|
}
|
|
@@ -746,20 +665,17 @@ var us = as;
|
|
|
746
665
|
function os(e, t) {
|
|
747
666
|
let { node: r } = e;
|
|
748
667
|
if (r.value) {
|
|
749
|
-
if (/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(t.originalText.slice(r.valueSpan.start.offset, r.valueSpan.end.offset)) || t.parser === "lwc" && r.value.startsWith("{") && r.value.endsWith("}"))
|
|
750
|
-
return [r.rawName, "=", r.value];
|
|
668
|
+
if (/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(t.originalText.slice(r.valueSpan.start.offset, r.valueSpan.end.offset)) || t.parser === "lwc" && r.value.startsWith("{") && r.value.endsWith("}")) return [r.rawName, "=", r.value];
|
|
751
669
|
for (let n of [Ya, Qa, Ua, us, Ha]) {
|
|
752
670
|
let a = n(e, t);
|
|
753
|
-
if (a)
|
|
754
|
-
return ls(a);
|
|
671
|
+
if (a) return ls(a);
|
|
755
672
|
}
|
|
756
673
|
}
|
|
757
674
|
}
|
|
758
675
|
function ls(e) {
|
|
759
676
|
return async (t, r, n, a) => {
|
|
760
677
|
let s = await e(t, r, n, a);
|
|
761
|
-
if (s)
|
|
762
|
-
return s = xr(s, (i) => typeof i == "string" ? L(!1, i, '"', """) : i), [n.node.rawName, '="', k(s), '"'];
|
|
678
|
+
if (s) return s = xr(s, (i) => typeof i == "string" ? L(!1, i, '"', """) : i), [n.node.rawName, '="', k(s), '"'];
|
|
763
679
|
};
|
|
764
680
|
}
|
|
765
681
|
var cs = os, ps = new Proxy(() => {
|
|
@@ -786,21 +702,18 @@ function $(e, t) {
|
|
|
786
702
|
return he(e) ? ft(e.parent, t) : Ue(e) ? vt(e.next, t) : "";
|
|
787
703
|
}
|
|
788
704
|
function ft(e, t) {
|
|
789
|
-
if (Xr(e, t))
|
|
790
|
-
return "";
|
|
705
|
+
if (Xr(e, t)) return "";
|
|
791
706
|
switch (e.type) {
|
|
792
707
|
case "ieConditionalComment":
|
|
793
708
|
return "<!";
|
|
794
709
|
case "element":
|
|
795
|
-
if (e.hasHtmComponentClosingTag)
|
|
796
|
-
return "<//";
|
|
710
|
+
if (e.hasHtmComponentClosingTag) return "<//";
|
|
797
711
|
default:
|
|
798
712
|
return `</${e.rawName}`;
|
|
799
713
|
}
|
|
800
714
|
}
|
|
801
715
|
function ve(e, t) {
|
|
802
|
-
if (Xr(e, t))
|
|
803
|
-
return "";
|
|
716
|
+
if (Xr(e, t)) return "";
|
|
804
717
|
switch (e.type) {
|
|
805
718
|
case "ieConditionalComment":
|
|
806
719
|
case "ieConditionalEndComment":
|
|
@@ -812,8 +725,7 @@ function ve(e, t) {
|
|
|
812
725
|
case "angularIcuExpression":
|
|
813
726
|
return "}";
|
|
814
727
|
case "element":
|
|
815
|
-
if (e.isSelfClosing)
|
|
816
|
-
return "/>";
|
|
728
|
+
if (e.isSelfClosing) return "/>";
|
|
817
729
|
default:
|
|
818
730
|
return ">";
|
|
819
731
|
}
|
|
@@ -844,8 +756,7 @@ function Ve(e) {
|
|
|
844
756
|
function gs(e, t, r) {
|
|
845
757
|
var n;
|
|
846
758
|
let { node: a } = e;
|
|
847
|
-
if (!pt(a.attrs))
|
|
848
|
-
return a.isSelfClosing ? " " : "";
|
|
759
|
+
if (!pt(a.attrs)) return a.isSelfClosing ? " " : "";
|
|
849
760
|
let s = ((n = a.prev) == null ? void 0 : n.type) === "comment" && ms(a.prev.value), i = typeof s == "boolean" ? () => s : Array.isArray(s) ? (v) => s.includes(v.rawName) : () => !1, u = e.map(({ node: v }) => i(v) ? P(t.originalText.slice(fe(v), Re(v))) : r(), "attrs"), o = a.type === "element" && a.fullName === "script" && a.attrs.length === 1 && a.attrs[0].fullName === "src" && a.children.length === 0, p = t.singleAttributePerLine && a.attrs.length > 1 && !te(a, t) ? S : _, l = [H([o ? " " : _, Z(p, u)])];
|
|
850
761
|
return a.firstChild && Ve(a.firstChild) || a.isSelfClosing && Ce(a.parent) || o ? l.push(a.isSelfClosing ? " " : "") : l.push(t.bracketSameLine ? a.isSelfClosing ? " " : "" : a.isSelfClosing ? _ : D), l;
|
|
851
762
|
}
|
|
@@ -875,8 +786,7 @@ function vt(e, t) {
|
|
|
875
786
|
case "docType": {
|
|
876
787
|
if (e.value === "html") {
|
|
877
788
|
let { filepath: n } = t;
|
|
878
|
-
if (n && /\.html?$/u.test(n))
|
|
879
|
-
return Ut;
|
|
789
|
+
if (n && /\.html?$/u.test(n)) return Ut;
|
|
880
790
|
}
|
|
881
791
|
let r = fe(e);
|
|
882
792
|
return t.originalText.slice(r, r + Ut.length);
|
|
@@ -884,8 +794,7 @@ function vt(e, t) {
|
|
|
884
794
|
case "angularIcuExpression":
|
|
885
795
|
return "{";
|
|
886
796
|
case "element":
|
|
887
|
-
if (e.condition)
|
|
888
|
-
return `<!--[if ${e.condition}]><!--><${e.rawName}`;
|
|
797
|
+
if (e.condition) return `<!--[if ${e.condition}]><!--><${e.rawName}`;
|
|
889
798
|
default:
|
|
890
799
|
return `<${e.rawName}`;
|
|
891
800
|
}
|
|
@@ -895,15 +804,13 @@ function Ct(e) {
|
|
|
895
804
|
case "ieConditionalComment":
|
|
896
805
|
return "]>";
|
|
897
806
|
case "element":
|
|
898
|
-
if (e.condition)
|
|
899
|
-
return "><!--<![endif]-->";
|
|
807
|
+
if (e.condition) return "><!--<![endif]-->";
|
|
900
808
|
default:
|
|
901
809
|
return ">";
|
|
902
810
|
}
|
|
903
811
|
}
|
|
904
812
|
function vs(e, t) {
|
|
905
|
-
if (!e.endSourceSpan)
|
|
906
|
-
return "";
|
|
813
|
+
if (!e.endSourceSpan) return "";
|
|
907
814
|
let r = e.startSourceSpan.end.offset;
|
|
908
815
|
e.firstChild && Ve(e.firstChild) && (r -= Ct(e).length);
|
|
909
816
|
let n = e.endSourceSpan.start.offset;
|
|
@@ -914,8 +821,7 @@ function Ss(e, t) {
|
|
|
914
821
|
let { node: r } = e;
|
|
915
822
|
switch (r.type) {
|
|
916
823
|
case "element":
|
|
917
|
-
if (U(r, t) || r.type === "interpolation")
|
|
918
|
-
return;
|
|
824
|
+
if (U(r, t) || r.type === "interpolation") return;
|
|
919
825
|
if (!r.isSelfClosing && dt(r, t)) {
|
|
920
826
|
let n = Mt(r, t);
|
|
921
827
|
return n ? async (a, s) => {
|
|
@@ -927,20 +833,18 @@ function Ss(e, t) {
|
|
|
927
833
|
case "text":
|
|
928
834
|
if (U(r.parent, t)) {
|
|
929
835
|
let n = Mt(r.parent, t);
|
|
930
|
-
if (n)
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
return [me, j(r, t), await a(s, i), $(r, t)];
|
|
938
|
-
};
|
|
939
|
-
} else if (r.parent.type === "interpolation")
|
|
940
|
-
return async (n) => {
|
|
941
|
-
let a = { __isInHtmlInterpolation: !0, __embeddedInHtml: !0 };
|
|
942
|
-
return t.parser === "angular" ? a.parser = "__ng_interpolation" : t.parser === "vue" ? a.parser = gt(e, t) ? "__vue_ts_expression" : "__vue_expression" : a.parser = "__js_expression", [H([_, await n(r.value, a)]), r.parent.next && z(r.parent.next) ? " " : _];
|
|
836
|
+
if (n) return async (a) => {
|
|
837
|
+
let s = n === "markdown" ? Or(r.value.replace(/^[^\S\n]*\n/u, "")) : r.value, i = { parser: n, __embeddedInHtml: !0 };
|
|
838
|
+
if (t.parser === "html" && n === "babel") {
|
|
839
|
+
let u = "script", { attrMap: o } = r.parent;
|
|
840
|
+
o && (o.type === "module" || (o.type === "text/babel" || o.type === "text/jsx") && o["data-type"] === "module") && (u = "module"), i.__babelSourceType = u;
|
|
841
|
+
}
|
|
842
|
+
return [me, j(r, t), await a(s, i), $(r, t)];
|
|
943
843
|
};
|
|
844
|
+
} else if (r.parent.type === "interpolation") return async (n) => {
|
|
845
|
+
let a = { __isInHtmlInterpolation: !0, __embeddedInHtml: !0 };
|
|
846
|
+
return t.parser === "angular" ? a.parser = "__ng_interpolation" : t.parser === "vue" ? a.parser = gt(e, t) ? "__vue_ts_expression" : "__vue_expression" : a.parser = "__js_expression", [H([_, await n(r.value, a)]), r.parent.next && z(r.parent.next) ? " " : _];
|
|
847
|
+
};
|
|
944
848
|
break;
|
|
945
849
|
case "attribute":
|
|
946
850
|
return cs(e, t);
|
|
@@ -961,8 +865,7 @@ function ce(e) {
|
|
|
961
865
|
return ne = ce.prototype = e ?? /* @__PURE__ */ Object.create(null), new ce();
|
|
962
866
|
}
|
|
963
867
|
var bs = 10;
|
|
964
|
-
for (let e = 0; e <= bs; e++)
|
|
965
|
-
ce();
|
|
868
|
+
for (let e = 0; e <= bs; e++) ce();
|
|
966
869
|
function _s(e) {
|
|
967
870
|
return ce(e);
|
|
968
871
|
}
|
|
@@ -970,8 +873,7 @@ function ws(e, t = "type") {
|
|
|
970
873
|
_s(e);
|
|
971
874
|
function r(n) {
|
|
972
875
|
let a = n[t], s = e[a];
|
|
973
|
-
if (!Array.isArray(s))
|
|
974
|
-
throw Object.assign(new Error(`Missing visitor keys for '${a}'.`), { node: n });
|
|
876
|
+
if (!Array.isArray(s)) throw Object.assign(new Error(`Missing visitor keys for '${a}'.`), { node: n });
|
|
975
877
|
return s;
|
|
976
878
|
}
|
|
977
879
|
return r;
|
|
@@ -1006,19 +908,17 @@ function _e(e, t) {
|
|
|
1006
908
|
}
|
|
1007
909
|
function St(e, t, r) {
|
|
1008
910
|
let { node: n } = e;
|
|
1009
|
-
if (Ir(n))
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
let a = n.children.map(() => Symbol(""));
|
|
911
|
+
if (Ir(n)) return [me, ...e.map((s) => {
|
|
912
|
+
let i = s.node, u = i.prev ? _e(i.prev, i) : "";
|
|
913
|
+
return [u ? [u, be(i.prev) ? S : ""] : "", ae(s, t, r)];
|
|
914
|
+
}, "children")];
|
|
915
|
+
let a = n.children.map(() => /* @__PURE__ */ Symbol(""));
|
|
1015
916
|
return e.map((s, i) => {
|
|
1016
917
|
let u = s.node;
|
|
1017
918
|
if (q(u)) {
|
|
1018
919
|
if (u.prev && q(u.prev)) {
|
|
1019
920
|
let C = _e(u.prev, u);
|
|
1020
|
-
if (C)
|
|
1021
|
-
return be(u.prev) ? [S, S, ae(s, t, r)] : [C, ae(s, t, r)];
|
|
921
|
+
if (C) return be(u.prev) ? [S, S, ae(s, t, r)] : [C, ae(s, t, r)];
|
|
1022
922
|
}
|
|
1023
923
|
return ae(s, t, r);
|
|
1024
924
|
}
|
|
@@ -1056,9 +956,8 @@ function Us(e, t, r) {
|
|
|
1056
956
|
}
|
|
1057
957
|
function Vs(e, t, r) {
|
|
1058
958
|
let { node: n } = e;
|
|
1059
|
-
if (qr(n, t))
|
|
1060
|
-
|
|
1061
|
-
let a = n.children.length === 1 && (n.firstChild.type === "interpolation" || n.firstChild.type === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = Symbol("element-attr-group-id"), i = (l) => k([k(Ye(e, t, r), { id: s }), l, Je(n, t)]), u = (l) => a ? xn(l, { groupId: s }) : (U(n, t) || He(n, t)) && n.parent.type === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? l : H(l), o = () => a ? xe(D, "", { groupId: s }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? _ : n.firstChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? kn(D) : D, p = () => (n.next ? z(n.next) : Ce(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : a ? xe(D, "", { groupId: s }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? _ : (n.lastChild.type === "comment" || n.lastChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : D;
|
|
959
|
+
if (qr(n, t)) return [j(n, t), k(Ye(e, t, r)), P(Jr(n, t)), ...Je(n, t), $(n, t)];
|
|
960
|
+
let a = n.children.length === 1 && (n.firstChild.type === "interpolation" || n.firstChild.type === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = /* @__PURE__ */ Symbol("element-attr-group-id"), i = (l) => k([k(Ye(e, t, r), { id: s }), l, Je(n, t)]), u = (l) => a ? xn(l, { groupId: s }) : (U(n, t) || He(n, t)) && n.parent.type === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? l : H(l), o = () => a ? xe(D, "", { groupId: s }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? _ : n.firstChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? kn(D) : D, p = () => (n.next ? z(n.next) : Ce(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : a ? xe(D, "", { groupId: s }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? _ : (n.lastChild.type === "comment" || n.lastChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : D;
|
|
1062
961
|
return n.children.length === 0 ? i(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ? _ : "") : i([fa(n) ? me : "", u([o(), St(e, t, r)]), p()]);
|
|
1063
962
|
}
|
|
1064
963
|
function De(e) {
|
|
@@ -1095,13 +994,12 @@ var Qe = class Zr {
|
|
|
1095
994
|
}
|
|
1096
995
|
moveBy(t) {
|
|
1097
996
|
let r = this.file.content, n = r.length, a = this.offset, s = this.line, i = this.col;
|
|
1098
|
-
for (; a > 0 && t < 0; )
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
i--;
|
|
997
|
+
for (; a > 0 && t < 0; ) if (a--, t++, r.charCodeAt(a) == 10) {
|
|
998
|
+
s--;
|
|
999
|
+
let u = r.substring(0, a - 1).lastIndexOf(`
|
|
1000
|
+
`);
|
|
1001
|
+
i = u > 0 ? a - u : a;
|
|
1002
|
+
} else i--;
|
|
1105
1003
|
for (; a < n && t > 0; ) {
|
|
1106
1004
|
let u = r.charCodeAt(a);
|
|
1107
1005
|
a++, t--, u == 10 ? (s++, i = 0) : i++;
|
|
@@ -1114,11 +1012,9 @@ var Qe = class Zr {
|
|
|
1114
1012
|
a > n.length - 1 && (a = n.length - 1);
|
|
1115
1013
|
let s = a, i = 0, u = 0;
|
|
1116
1014
|
for (; i < t && a > 0 && (a--, i++, !(n[a] == `
|
|
1117
|
-
` && ++u == r)); )
|
|
1118
|
-
;
|
|
1015
|
+
` && ++u == r)); ) ;
|
|
1119
1016
|
for (i = 0, u = 0; i < t && s < n.length - 1 && (s++, i++, !(n[s] == `
|
|
1120
|
-
` && ++u == r)); )
|
|
1121
|
-
;
|
|
1017
|
+
` && ++u == r)); ) ;
|
|
1122
1018
|
return { before: n.substring(a, this.offset), after: n.substring(this.offset, s + 1) };
|
|
1123
1019
|
}
|
|
1124
1020
|
return null;
|
|
@@ -1152,8 +1048,7 @@ var tn = class {
|
|
|
1152
1048
|
}
|
|
1153
1049
|
}, zs = [Gs, Ks, Js, Qs, Zs, ri, ei, ti, ni, Ys];
|
|
1154
1050
|
function js(e, t) {
|
|
1155
|
-
for (let r of zs)
|
|
1156
|
-
r(e, t);
|
|
1051
|
+
for (let r of zs) r(e, t);
|
|
1157
1052
|
return e;
|
|
1158
1053
|
}
|
|
1159
1054
|
function Gs(e) {
|
|
@@ -1171,29 +1066,25 @@ function Ks(e) {
|
|
|
1171
1066
|
return r.type === "element" && ((n = r.prev) == null ? void 0 : n.type) === "ieConditionalStartComment" && r.prev.sourceSpan.end.offset === r.startSourceSpan.start.offset && ((a = r.firstChild) == null ? void 0 : a.type) === "ieConditionalEndComment" && r.firstChild.sourceSpan.start.offset === r.startSourceSpan.end.offset;
|
|
1172
1067
|
};
|
|
1173
1068
|
e.walk((r) => {
|
|
1174
|
-
if (r.children)
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
a.condition = s.condition, a.sourceSpan = o, a.startSourceSpan = u, a.removeChild(i);
|
|
1183
|
-
}
|
|
1069
|
+
if (r.children) for (let n = 0; n < r.children.length; n++) {
|
|
1070
|
+
let a = r.children[n];
|
|
1071
|
+
if (!t(a)) continue;
|
|
1072
|
+
let s = a.prev, i = a.firstChild;
|
|
1073
|
+
r.removeChild(s), n--;
|
|
1074
|
+
let u = new m(s.sourceSpan.start, i.sourceSpan.end), o = new m(u.start, a.sourceSpan.end);
|
|
1075
|
+
a.condition = s.condition, a.sourceSpan = o, a.startSourceSpan = u, a.removeChild(i);
|
|
1076
|
+
}
|
|
1184
1077
|
});
|
|
1185
1078
|
}
|
|
1186
1079
|
function Xs(e, t, r) {
|
|
1187
1080
|
e.walk((n) => {
|
|
1188
|
-
if (n.children)
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
!i || i.type !== "text" || (i.value += s.value, i.sourceSpan = new m(i.sourceSpan.start, s.sourceSpan.end), n.removeChild(s), a--);
|
|
1196
|
-
}
|
|
1081
|
+
if (n.children) for (let a = 0; a < n.children.length; a++) {
|
|
1082
|
+
let s = n.children[a];
|
|
1083
|
+
if (s.type !== "text" && !t(s)) continue;
|
|
1084
|
+
s.type !== "text" && (s.type = "text", s.value = r(s));
|
|
1085
|
+
let i = s.prev;
|
|
1086
|
+
!i || i.type !== "text" || (i.value += s.value, i.sourceSpan = new m(i.sourceSpan.start, s.sourceSpan.end), n.removeChild(s), a--);
|
|
1087
|
+
}
|
|
1197
1088
|
});
|
|
1198
1089
|
}
|
|
1199
1090
|
function Js(e) {
|
|
@@ -1205,56 +1096,48 @@ function Ys(e) {
|
|
|
1205
1096
|
return r.type === "element" && r.attrs.length === 0 && r.children.length === 1 && r.firstChild.type === "text" && !R.hasWhitespaceCharacter(r.children[0].value) && !r.firstChild.hasLeadingSpaces && !r.firstChild.hasTrailingSpaces && r.isLeadingSpaceSensitive && !r.hasLeadingSpaces && r.isTrailingSpaceSensitive && !r.hasTrailingSpaces && ((n = r.prev) == null ? void 0 : n.type) === "text" && ((a = r.next) == null ? void 0 : a.type) === "text";
|
|
1206
1097
|
};
|
|
1207
1098
|
e.walk((r) => {
|
|
1208
|
-
if (r.children)
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
s.value += `<${a.rawName}>` + a.firstChild.value + `</${a.rawName}>` + i.value, s.sourceSpan = new m(s.sourceSpan.start, i.sourceSpan.end), s.isTrailingSpaceSensitive = i.isTrailingSpaceSensitive, s.hasTrailingSpaces = i.hasTrailingSpaces, r.removeChild(a), n--, r.removeChild(i);
|
|
1215
|
-
}
|
|
1099
|
+
if (r.children) for (let n = 0; n < r.children.length; n++) {
|
|
1100
|
+
let a = r.children[n];
|
|
1101
|
+
if (!t(a)) continue;
|
|
1102
|
+
let s = a.prev, i = a.next;
|
|
1103
|
+
s.value += `<${a.rawName}>` + a.firstChild.value + `</${a.rawName}>` + i.value, s.sourceSpan = new m(s.sourceSpan.start, i.sourceSpan.end), s.isTrailingSpaceSensitive = i.isTrailingSpaceSensitive, s.hasTrailingSpaces = i.hasTrailingSpaces, r.removeChild(a), n--, r.removeChild(i);
|
|
1104
|
+
}
|
|
1216
1105
|
});
|
|
1217
1106
|
}
|
|
1218
1107
|
function Qs(e, t) {
|
|
1219
|
-
if (t.parser === "html")
|
|
1220
|
-
return;
|
|
1108
|
+
if (t.parser === "html") return;
|
|
1221
1109
|
let r = /\{\{(.+?)\}\}/su;
|
|
1222
1110
|
e.walk((n) => {
|
|
1223
|
-
if (pa(n, t))
|
|
1224
|
-
|
|
1225
|
-
|
|
1111
|
+
if (pa(n, t)) for (let a of n.children) {
|
|
1112
|
+
if (a.type !== "text") continue;
|
|
1113
|
+
let s = a.sourceSpan.start, i = null, u = a.value.split(r);
|
|
1114
|
+
for (let o = 0; o < u.length; o++, s = i) {
|
|
1115
|
+
let p = u[o];
|
|
1116
|
+
if (o % 2 === 0) {
|
|
1117
|
+
i = s.moveBy(p.length), p.length > 0 && n.insertChildBefore(a, { type: "text", value: p, sourceSpan: new m(s, i) });
|
|
1226
1118
|
continue;
|
|
1227
|
-
let s = a.sourceSpan.start, i = null, u = a.value.split(r);
|
|
1228
|
-
for (let o = 0; o < u.length; o++, s = i) {
|
|
1229
|
-
let p = u[o];
|
|
1230
|
-
if (o % 2 === 0) {
|
|
1231
|
-
i = s.moveBy(p.length), p.length > 0 && n.insertChildBefore(a, { type: "text", value: p, sourceSpan: new m(s, i) });
|
|
1232
|
-
continue;
|
|
1233
|
-
}
|
|
1234
|
-
i = s.moveBy(p.length + 4), n.insertChildBefore(a, { type: "interpolation", sourceSpan: new m(s, i), children: p.length === 0 ? [] : [{ type: "text", value: p, sourceSpan: new m(s.moveBy(2), i.moveBy(-2)) }] });
|
|
1235
1119
|
}
|
|
1236
|
-
n.
|
|
1120
|
+
i = s.moveBy(p.length + 4), n.insertChildBefore(a, { type: "interpolation", sourceSpan: new m(s, i), children: p.length === 0 ? [] : [{ type: "text", value: p, sourceSpan: new m(s.moveBy(2), i.moveBy(-2)) }] });
|
|
1237
1121
|
}
|
|
1122
|
+
n.removeChild(a);
|
|
1123
|
+
}
|
|
1238
1124
|
});
|
|
1239
1125
|
}
|
|
1240
1126
|
function Zs(e, t) {
|
|
1241
1127
|
e.walk((r) => {
|
|
1242
1128
|
let n = r.$children;
|
|
1243
|
-
if (!n)
|
|
1244
|
-
return;
|
|
1129
|
+
if (!n) return;
|
|
1245
1130
|
if (n.length === 0 || n.length === 1 && n[0].type === "text" && R.trim(n[0].value).length === 0) {
|
|
1246
1131
|
r.hasDanglingSpaces = n.length > 0, r.$children = [];
|
|
1247
1132
|
return;
|
|
1248
1133
|
}
|
|
1249
1134
|
let a = ha(r, t), s = Nr(r);
|
|
1250
|
-
if (!a)
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
p ? (u.value = p, u.sourceSpan = new m(u.sourceSpan.start.moveBy(o.length), u.sourceSpan.end.moveBy(-l.length)), o && (v && (v.hasTrailingSpaces = !0), u.hasLeadingSpaces = !0), l && (u.hasTrailingSpaces = !0, d && (d.hasLeadingSpaces = !0))) : (r.removeChild(u), i--, (o || l) && (v && (v.hasTrailingSpaces = !0), d && (d.hasLeadingSpaces = !0)));
|
|
1257
|
-
}
|
|
1135
|
+
if (!a) for (let i = 0; i < n.length; i++) {
|
|
1136
|
+
let u = n[i];
|
|
1137
|
+
if (u.type !== "text") continue;
|
|
1138
|
+
let { leadingWhitespace: o, text: p, trailingWhitespace: l } = la(u.value), v = u.prev, d = u.next;
|
|
1139
|
+
p ? (u.value = p, u.sourceSpan = new m(u.sourceSpan.start.moveBy(o.length), u.sourceSpan.end.moveBy(-l.length)), o && (v && (v.hasTrailingSpaces = !0), u.hasLeadingSpaces = !0), l && (u.hasTrailingSpaces = !0, d && (d.hasLeadingSpaces = !0))) : (r.removeChild(u), i--, (o || l) && (v && (v.hasTrailingSpaces = !0), d && (d.hasLeadingSpaces = !0)));
|
|
1140
|
+
}
|
|
1258
1141
|
r.isWhitespaceSensitive = a, r.isIndentationSensitive = s;
|
|
1259
1142
|
});
|
|
1260
1143
|
}
|
|
@@ -1281,8 +1164,7 @@ function ni(e, t) {
|
|
|
1281
1164
|
r.isDanglingSpaceSensitive = ga(r, t);
|
|
1282
1165
|
return;
|
|
1283
1166
|
}
|
|
1284
|
-
for (let a of n)
|
|
1285
|
-
a.isLeadingSpaceSensitive = da(a, t), a.isTrailingSpaceSensitive = ma(a, t);
|
|
1167
|
+
for (let a of n) a.isLeadingSpaceSensitive = da(a, t), a.isTrailingSpaceSensitive = ma(a, t);
|
|
1286
1168
|
for (let a = 0; a < n.length; a++) {
|
|
1287
1169
|
let s = n[a];
|
|
1288
1170
|
s.isLeadingSpaceSensitive = (a === 0 || s.prev.isTrailingSpaceSensitive) && s.isLeadingSpaceSensitive, s.isTrailingSpaceSensitive = (a === n.length - 1 || s.next.isLeadingSpaceSensitive) && s.isTrailingSpaceSensitive;
|
|
@@ -1333,12 +1215,10 @@ function si(e, t, r) {
|
|
|
1333
1215
|
case "comment":
|
|
1334
1216
|
return [j(n, t), P(t.originalText.slice(fe(n), Re(n))), $(n, t)];
|
|
1335
1217
|
case "attribute": {
|
|
1336
|
-
if (n.value === null)
|
|
1337
|
-
return n.rawName;
|
|
1218
|
+
if (n.value === null) return n.rawName;
|
|
1338
1219
|
let a = Wr(n.value), s = Fn(a, '"');
|
|
1339
1220
|
return [n.rawName, "=", s, P(s === '"' ? L(!1, a, '"', """) : L(!1, a, "'", "'")), s];
|
|
1340
1221
|
}
|
|
1341
|
-
case "cdata":
|
|
1342
1222
|
default:
|
|
1343
1223
|
throw new Rn(n, "HTML");
|
|
1344
1224
|
}
|
|
@@ -1370,12 +1250,10 @@ var I;
|
|
|
1370
1250
|
e[e.RAW_TEXT = 0] = "RAW_TEXT", e[e.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", e[e.PARSABLE_DATA = 2] = "PARSABLE_DATA";
|
|
1371
1251
|
})(I || (I = {}));
|
|
1372
1252
|
function Oe(e, t = !0) {
|
|
1373
|
-
if (e[0] != ":")
|
|
1374
|
-
return [null, e];
|
|
1253
|
+
if (e[0] != ":") return [null, e];
|
|
1375
1254
|
let r = e.indexOf(":", 1);
|
|
1376
1255
|
if (r === -1) {
|
|
1377
|
-
if (t)
|
|
1378
|
-
throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);
|
|
1256
|
+
if (t) throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);
|
|
1379
1257
|
return [null, e];
|
|
1380
1258
|
}
|
|
1381
1259
|
return [e.slice(1, r), e.slice(r + 1)];
|
|
@@ -1397,8 +1275,7 @@ function Qt() {
|
|
|
1397
1275
|
return Ee || (Ee = {}, we(W.HTML, ["iframe|srcdoc", "*|innerHTML", "*|outerHTML"]), we(W.STYLE, ["*|style"]), we(W.URL, ["*|formAction", "area|href", "area|ping", "audio|src", "a|href", "a|ping", "blockquote|cite", "body|background", "del|cite", "form|action", "img|src", "input|src", "ins|cite", "q|cite", "source|src", "track|src", "video|poster", "video|src"]), we(W.RESOURCE_URL, ["applet|code", "applet|codebase", "base|href", "embed|src", "frame|src", "head|profile", "html|manifest", "iframe|src", "link|href", "media|src", "object|codebase", "object|data", "script|src"])), Ee;
|
|
1398
1276
|
}
|
|
1399
1277
|
function we(e, t) {
|
|
1400
|
-
for (let r of t)
|
|
1401
|
-
Ee[r.toLowerCase()] = e;
|
|
1278
|
+
for (let r of t) Ee[r.toLowerCase()] = e;
|
|
1402
1279
|
}
|
|
1403
1280
|
var pi = class {
|
|
1404
1281
|
}, hi = "boolean", di = "number", mi = "string", gi = "object", fi = ["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%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", "[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", "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,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", "media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume", ":svg:^[HTMLElement]|!autofocus,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,%style,#tabIndex", ":svg:graphics^:svg:|", ":svg:animation^:svg:|*begin,*end,*repeat", ":svg:geometry^:svg:|", ":svg:componentTransferFunction^:svg:|", ":svg:gradient^:svg:|", ":svg:textContent^:svg:graphics|", ":svg:textPositioning^:svg:textContent|", "a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username", "area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username", "audio^media|", "br^[HTMLElement]|clear", "base^[HTMLElement]|href,target", "body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink", "button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value", "canvas^[HTMLElement]|#height,#width", "content^[HTMLElement]|select", "dl^[HTMLElement]|!compact", "data^[HTMLElement]|value", "datalist^[HTMLElement]|", "details^[HTMLElement]|!open", "dialog^[HTMLElement]|!open,returnValue", "dir^[HTMLElement]|!compact", "div^[HTMLElement]|align", "embed^[HTMLElement]|align,height,name,src,type,width", "fieldset^[HTMLElement]|!disabled,name", "font^[HTMLElement]|color,face,size", "form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target", "frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src", "frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows", "hr^[HTMLElement]|align,color,!noShade,size,width", "head^[HTMLElement]|", "h1,h2,h3,h4,h5,h6^[HTMLElement]|align", "html^[HTMLElement]|version", "iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width", "img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width", "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", "li^[HTMLElement]|type,#value", "label^[HTMLElement]|htmlFor", "legend^[HTMLElement]|align", "link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type", "map^[HTMLElement]|name", "marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width", "menu^[HTMLElement]|!compact", "meta^[HTMLElement]|content,httpEquiv,media,name,scheme", "meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value", "ins,del^[HTMLElement]|cite,dateTime", "ol^[HTMLElement]|!compact,!reversed,#start,type", "object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width", "optgroup^[HTMLElement]|!disabled,label", "option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value", "output^[HTMLElement]|defaultValue,%htmlFor,name,value", "p^[HTMLElement]|align", "param^[HTMLElement]|name,type,value,valueType", "picture^[HTMLElement]|", "pre^[HTMLElement]|#width", "progress^[HTMLElement]|#max,#value", "q,blockquote,cite^[HTMLElement]|", "script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type", "select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value", "slot^[HTMLElement]|name", "source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width", "span^[HTMLElement]|", "style^[HTMLElement]|!disabled,media,type", "caption^[HTMLElement]|align", "th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width", "col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width", "table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width", "tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign", "tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign", "template^[HTMLElement]|", "textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap", "time^[HTMLElement]|dateTime", "title^[HTMLElement]|text", "track^[HTMLElement]|!default,kind,label,src,srclang", "ul^[HTMLElement]|!compact,type", "unknown^[HTMLElement]|", "video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width", ":svg:a^:svg:graphics|", ":svg:animate^:svg:animation|", ":svg:animateMotion^:svg:animation|", ":svg:animateTransform^:svg:animation|", ":svg:circle^:svg:geometry|", ":svg:clipPath^:svg:graphics|", ":svg:defs^:svg:graphics|", ":svg:desc^:svg:|", ":svg:discard^:svg:|", ":svg:ellipse^:svg:geometry|", ":svg:feBlend^:svg:|", ":svg:feColorMatrix^:svg:|", ":svg:feComponentTransfer^:svg:|", ":svg:feComposite^:svg:|", ":svg:feConvolveMatrix^:svg:|", ":svg:feDiffuseLighting^:svg:|", ":svg:feDisplacementMap^:svg:|", ":svg:feDistantLight^:svg:|", ":svg:feDropShadow^:svg:|", ":svg:feFlood^:svg:|", ":svg:feFuncA^:svg:componentTransferFunction|", ":svg:feFuncB^:svg:componentTransferFunction|", ":svg:feFuncG^:svg:componentTransferFunction|", ":svg:feFuncR^:svg:componentTransferFunction|", ":svg:feGaussianBlur^:svg:|", ":svg:feImage^:svg:|", ":svg:feMerge^:svg:|", ":svg:feMergeNode^:svg:|", ":svg:feMorphology^:svg:|", ":svg:feOffset^:svg:|", ":svg:fePointLight^:svg:|", ":svg:feSpecularLighting^:svg:|", ":svg:feSpotLight^:svg:|", ":svg:feTile^:svg:|", ":svg:feTurbulence^:svg:|", ":svg:filter^:svg:|", ":svg:foreignObject^:svg:graphics|", ":svg:g^:svg:graphics|", ":svg:image^:svg:graphics|decoding", ":svg:line^:svg:geometry|", ":svg:linearGradient^:svg:gradient|", ":svg:mpath^:svg:|", ":svg:marker^:svg:|", ":svg:mask^:svg:|", ":svg:metadata^:svg:|", ":svg:path^:svg:geometry|", ":svg:pattern^:svg:|", ":svg:polygon^:svg:geometry|", ":svg:polyline^:svg:geometry|", ":svg:radialGradient^:svg:gradient|", ":svg:rect^:svg:geometry|", ":svg:svg^:svg:graphics|#currentScale,#zoomAndPan", ":svg:script^:svg:|type", ":svg:set^:svg:animation|", ":svg:stop^:svg:|", ":svg:style^:svg:|!disabled,media,title,type", ":svg:switch^:svg:graphics|", ":svg:symbol^:svg:|", ":svg:tspan^:svg:textPositioning|", ":svg:text^:svg:textPositioning|", ":svg:textPath^:svg:textContent|", ":svg:title^:svg:|", ":svg:use^:svg:graphics|", ":svg:view^:svg:|#zoomAndPan", "data^[HTMLElement]|value", "keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name", "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default", "summary^[HTMLElement]|", "time^[HTMLElement]|dateTime", ":svg:cursor^:svg:|", ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*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,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":math:math^:math:|", ":math:maction^:math:|", ":math:menclose^:math:|", ":math:merror^:math:|", ":math:mfenced^:math:|", ":math:mfrac^:math:|", ":math:mi^:math:|", ":math:mmultiscripts^:math:|", ":math:mn^:math:|", ":math:mo^:math:|", ":math:mover^:math:|", ":math:mpadded^:math:|", ":math:mphantom^:math:|", ":math:mroot^:math:|", ":math:mrow^:math:|", ":math:ms^:math:|", ":math:mspace^:math:|", ":math:msqrt^:math:|", ":math:mstyle^:math:|", ":math:msub^:math:|", ":math:msubsup^:math:|", ":math:msup^:math:|", ":math:mtable^:math:|", ":math:mtd^:math:|", ":math:mtext^:math:|", ":math:mtr^:math:|", ":math:munder^:math:|", ":math:munderover^:math:|", ":math:semantics^:math:|"], nn = new Map(Object.entries({ class: "className", for: "htmlFor", formaction: "formAction", innerHtml: "innerHTML", readonly: "readOnly", tabindex: "tabIndex" })), vi = Array.from(nn).reduce((e, [t, r]) => (e.set(t, r), e), /* @__PURE__ */ new Map()), Ci = class extends pi {
|
|
@@ -1410,40 +1287,34 @@ var pi = class {
|
|
|
1410
1287
|
});
|
|
1411
1288
|
let o = u && this._schema.get(u.toLowerCase());
|
|
1412
1289
|
if (o) {
|
|
1413
|
-
for (let [p, l] of o)
|
|
1414
|
-
|
|
1415
|
-
for (let p of this._eventSchema.get(u.toLowerCase()))
|
|
1416
|
-
r.add(p);
|
|
1290
|
+
for (let [p, l] of o) t.set(p, l);
|
|
1291
|
+
for (let p of this._eventSchema.get(u.toLowerCase())) r.add(p);
|
|
1417
1292
|
}
|
|
1418
1293
|
s.forEach((p) => {
|
|
1419
|
-
if (p.length > 0)
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
}
|
|
1294
|
+
if (p.length > 0) switch (p[0]) {
|
|
1295
|
+
case "*":
|
|
1296
|
+
r.add(p.substring(1));
|
|
1297
|
+
break;
|
|
1298
|
+
case "!":
|
|
1299
|
+
t.set(p.substring(1), hi);
|
|
1300
|
+
break;
|
|
1301
|
+
case "#":
|
|
1302
|
+
t.set(p.substring(1), di);
|
|
1303
|
+
break;
|
|
1304
|
+
case "%":
|
|
1305
|
+
t.set(p.substring(1), gi);
|
|
1306
|
+
break;
|
|
1307
|
+
default:
|
|
1308
|
+
t.set(p, mi);
|
|
1309
|
+
}
|
|
1436
1310
|
});
|
|
1437
1311
|
});
|
|
1438
1312
|
}
|
|
1439
1313
|
hasProperty(e, t, r) {
|
|
1440
|
-
if (r.some((n) => n.name === Kt.name))
|
|
1441
|
-
return !0;
|
|
1314
|
+
if (r.some((n) => n.name === Kt.name)) return !0;
|
|
1442
1315
|
if (e.indexOf("-") > -1) {
|
|
1443
|
-
if (Jt(e) || Yt(e))
|
|
1444
|
-
|
|
1445
|
-
if (r.some((n) => n.name === Gt.name))
|
|
1446
|
-
return !0;
|
|
1316
|
+
if (Jt(e) || Yt(e)) return !1;
|
|
1317
|
+
if (r.some((n) => n.name === Gt.name)) return !0;
|
|
1447
1318
|
}
|
|
1448
1319
|
return (this._schema.get(e.toLowerCase()) || this._schema.get("unknown")).has(t);
|
|
1449
1320
|
}
|
|
@@ -1483,13 +1354,11 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
1483
1354
|
}
|
|
1484
1355
|
normalizeAnimationStyleValue(e, t, r) {
|
|
1485
1356
|
let n = "", a = r.toString().trim(), s = null;
|
|
1486
|
-
if (Si(e) && r !== 0 && r !== "0")
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
i && i[1].length == 0 && (s = `Please provide a CSS unit value for ${t}:${r}`);
|
|
1492
|
-
}
|
|
1357
|
+
if (Si(e) && r !== 0 && r !== "0") if (typeof r == "number") n = "px";
|
|
1358
|
+
else {
|
|
1359
|
+
let i = r.match(/^[+-]?[\d\.]+([a-z]*)$/);
|
|
1360
|
+
i && i[1].length == 0 && (s = `Please provide a CSS unit value for ${t}:${r}`);
|
|
1361
|
+
}
|
|
1493
1362
|
return { error: s, value: a + n };
|
|
1494
1363
|
}
|
|
1495
1364
|
};
|
|
@@ -1682,13 +1551,11 @@ var xi = class {
|
|
|
1682
1551
|
Fe.ngsp = Di;
|
|
1683
1552
|
var Ti = [/@/, /^\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\/\//];
|
|
1684
1553
|
function Bi(e, t) {
|
|
1685
|
-
if (t != null && !(Array.isArray(t) && t.length == 2))
|
|
1686
|
-
throw new Error(`Expected '${e}' to be an array, [start, end].`);
|
|
1554
|
+
if (t != null && !(Array.isArray(t) && t.length == 2)) throw new Error(`Expected '${e}' to be an array, [start, end].`);
|
|
1687
1555
|
if (t != null) {
|
|
1688
1556
|
let r = t[0], n = t[1];
|
|
1689
1557
|
Ti.forEach((a) => {
|
|
1690
|
-
if (a.test(r) || a.test(n))
|
|
1691
|
-
throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`);
|
|
1558
|
+
if (a.test(r) || a.test(n)) throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`);
|
|
1692
1559
|
});
|
|
1693
1560
|
}
|
|
1694
1561
|
}
|
|
@@ -1749,17 +1616,13 @@ var Ge = class {
|
|
|
1749
1616
|
for (; this._cursor.peek() !== 0; ) {
|
|
1750
1617
|
let e = this._cursor.clone();
|
|
1751
1618
|
try {
|
|
1752
|
-
if (this._attemptCharCode(60))
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
this._attemptCharCode(63) ? (this._cursor = t, this._consumeBogusComment(e)) : this._consumeTagOpen(e);
|
|
1760
|
-
}
|
|
1761
|
-
else
|
|
1762
|
-
this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._attemptStr("@let") ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._attemptCharCode(64) ? 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());
|
|
1619
|
+
if (this._attemptCharCode(60)) if (this._attemptCharCode(33)) this._attemptStr("[CDATA[") ? this._consumeCdata(e) : this._attemptStr("--") ? this._consumeComment(e) : this._attemptStrCaseInsensitive("doctype") ? this._consumeDocType(e) : this._consumeBogusComment(e);
|
|
1620
|
+
else if (this._attemptCharCode(47)) this._consumeTagClose(e);
|
|
1621
|
+
else {
|
|
1622
|
+
let t = this._cursor.clone();
|
|
1623
|
+
this._attemptCharCode(63) ? (this._cursor = t, this._consumeBogusComment(e)) : this._consumeTagOpen(e);
|
|
1624
|
+
}
|
|
1625
|
+
else this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._attemptStr("@let") ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._attemptCharCode(64) ? 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());
|
|
1763
1626
|
} catch (t) {
|
|
1764
1627
|
this.handleError(t);
|
|
1765
1628
|
}
|
|
@@ -1773,13 +1636,11 @@ var Ge = class {
|
|
|
1773
1636
|
_consumeBlockStart(e) {
|
|
1774
1637
|
this._beginToken(25, e);
|
|
1775
1638
|
let t = this._endToken([this._getBlockName()]);
|
|
1776
|
-
if (this._cursor.peek() === 40)
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
return;
|
|
1782
|
-
}
|
|
1639
|
+
if (this._cursor.peek() === 40) if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(b), this._attemptCharCode(41)) this._attemptCharCodeUntilFn(b);
|
|
1640
|
+
else {
|
|
1641
|
+
t.type = 29;
|
|
1642
|
+
return;
|
|
1643
|
+
}
|
|
1783
1644
|
this._attemptCharCode(123) ? (this._beginToken(26), this._endToken([])) : t.type = 29;
|
|
1784
1645
|
}
|
|
1785
1646
|
_consumeBlockEnd(e) {
|
|
@@ -1791,17 +1652,12 @@ var Ge = class {
|
|
|
1791
1652
|
let e = this._cursor.clone(), t = null, r = 0;
|
|
1792
1653
|
for (; this._cursor.peek() !== 59 && this._cursor.peek() !== 0 || t !== null; ) {
|
|
1793
1654
|
let n = this._cursor.peek();
|
|
1794
|
-
if (n === 92)
|
|
1795
|
-
|
|
1796
|
-
else if (
|
|
1797
|
-
|
|
1798
|
-
else if (t === null && ze(n))
|
|
1799
|
-
t = n;
|
|
1800
|
-
else if (n === 40 && t === null)
|
|
1801
|
-
r++;
|
|
1655
|
+
if (n === 92) this._cursor.advance();
|
|
1656
|
+
else if (n === t) t = null;
|
|
1657
|
+
else if (t === null && ze(n)) t = n;
|
|
1658
|
+
else if (n === 40 && t === null) r++;
|
|
1802
1659
|
else if (n === 41 && t === null) {
|
|
1803
|
-
if (r === 0)
|
|
1804
|
-
break;
|
|
1660
|
+
if (r === 0) break;
|
|
1805
1661
|
r > 0 && r--;
|
|
1806
1662
|
}
|
|
1807
1663
|
this._cursor.advance();
|
|
@@ -1810,8 +1666,7 @@ var Ge = class {
|
|
|
1810
1666
|
}
|
|
1811
1667
|
}
|
|
1812
1668
|
_consumeLetDeclaration(e) {
|
|
1813
|
-
if (this._beginToken(30, e), De(this._cursor.peek()))
|
|
1814
|
-
this._attemptCharCodeUntilFn(b);
|
|
1669
|
+
if (this._beginToken(30, e), De(this._cursor.peek())) this._attemptCharCodeUntilFn(b);
|
|
1815
1670
|
else {
|
|
1816
1671
|
let r = this._endToken([this._cursor.getChars(e)]);
|
|
1817
1672
|
r.type = 33;
|
|
@@ -1832,22 +1687,17 @@ var Ge = class {
|
|
|
1832
1687
|
let e = this._cursor.clone();
|
|
1833
1688
|
for (this._beginToken(31, e); this._cursor.peek() !== 0; ) {
|
|
1834
1689
|
let t = this._cursor.peek();
|
|
1835
|
-
if (t === 59)
|
|
1836
|
-
break;
|
|
1690
|
+
if (t === 59) break;
|
|
1837
1691
|
ze(t) && (this._cursor.advance(), this._attemptCharCodeUntilFn((r) => r === 92 ? (this._cursor.advance(), !1) : r === t)), this._cursor.advance();
|
|
1838
1692
|
}
|
|
1839
1693
|
this._endToken([this._cursor.getChars(e)]);
|
|
1840
1694
|
}
|
|
1841
1695
|
_tokenizeExpansionForm() {
|
|
1842
|
-
if (this.isExpansionFormStart())
|
|
1843
|
-
|
|
1844
|
-
if (Ui(this._cursor.peek()) && this._isInExpansionForm())
|
|
1845
|
-
return this._consumeExpansionCaseStart(), !0;
|
|
1696
|
+
if (this.isExpansionFormStart()) return this._consumeExpansionFormStart(), !0;
|
|
1697
|
+
if (Ui(this._cursor.peek()) && this._isInExpansionForm()) return this._consumeExpansionCaseStart(), !0;
|
|
1846
1698
|
if (this._cursor.peek() === 125) {
|
|
1847
|
-
if (this._isInExpansionCase())
|
|
1848
|
-
|
|
1849
|
-
if (this._isInExpansionForm())
|
|
1850
|
-
return this._consumeExpansionFormEnd(), !0;
|
|
1699
|
+
if (this._isInExpansionCase()) return this._consumeExpansionCaseEnd(), !0;
|
|
1700
|
+
if (this._isInExpansionForm()) return this._consumeExpansionFormEnd(), !0;
|
|
1851
1701
|
}
|
|
1852
1702
|
return !1;
|
|
1853
1703
|
}
|
|
@@ -1855,10 +1705,8 @@ var Ge = class {
|
|
|
1855
1705
|
this._currentTokenStart = t, this._currentTokenType = e;
|
|
1856
1706
|
}
|
|
1857
1707
|
_endToken(e, t) {
|
|
1858
|
-
if (this._currentTokenStart === null)
|
|
1859
|
-
|
|
1860
|
-
if (this._currentTokenType === null)
|
|
1861
|
-
throw new je("Programming error - attempted to end a token which has no token type", null, this._cursor.getSpan(this._currentTokenStart));
|
|
1708
|
+
if (this._currentTokenStart === null) throw new je("Programming error - attempted to end a token when there was no start to the token", this._currentTokenType, this._cursor.getSpan(t));
|
|
1709
|
+
if (this._currentTokenType === null) throw new je("Programming error - attempted to end a token which has no token type", null, this._cursor.getSpan(this._currentTokenStart));
|
|
1862
1710
|
let r = { type: this._currentTokenType, parts: e, sourceSpan: (t ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints) };
|
|
1863
1711
|
return this.tokens.push(r), this._currentTokenStart = null, this._currentTokenType = null, r;
|
|
1864
1712
|
}
|
|
@@ -1868,10 +1716,8 @@ var Ge = class {
|
|
|
1868
1716
|
return this._currentTokenStart = null, this._currentTokenType = null, new Ge(r);
|
|
1869
1717
|
}
|
|
1870
1718
|
handleError(e) {
|
|
1871
|
-
if (e instanceof _t && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof Ge)
|
|
1872
|
-
|
|
1873
|
-
else
|
|
1874
|
-
throw e;
|
|
1719
|
+
if (e instanceof _t && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof Ge) this.errors.push(e.error);
|
|
1720
|
+
else throw e;
|
|
1875
1721
|
}
|
|
1876
1722
|
_attemptCharCode(e) {
|
|
1877
1723
|
return this._cursor.peek() === e ? (this._cursor.advance(), !0) : !1;
|
|
@@ -1881,47 +1727,36 @@ var Ge = class {
|
|
|
1881
1727
|
}
|
|
1882
1728
|
_requireCharCode(e) {
|
|
1883
1729
|
let t = this._cursor.clone();
|
|
1884
|
-
if (!this._attemptCharCode(e))
|
|
1885
|
-
throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1730
|
+
if (!this._attemptCharCode(e)) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1886
1731
|
}
|
|
1887
1732
|
_attemptStr(e) {
|
|
1888
1733
|
let t = e.length;
|
|
1889
|
-
if (this._cursor.charsLeft() < t)
|
|
1890
|
-
return !1;
|
|
1734
|
+
if (this._cursor.charsLeft() < t) return !1;
|
|
1891
1735
|
let r = this._cursor.clone();
|
|
1892
|
-
for (let n = 0; n < t; n++)
|
|
1893
|
-
if (!this._attemptCharCode(e.charCodeAt(n)))
|
|
1894
|
-
return this._cursor = r, !1;
|
|
1736
|
+
for (let n = 0; n < t; n++) if (!this._attemptCharCode(e.charCodeAt(n))) return this._cursor = r, !1;
|
|
1895
1737
|
return !0;
|
|
1896
1738
|
}
|
|
1897
1739
|
_attemptStrCaseInsensitive(e) {
|
|
1898
|
-
for (let t = 0; t < e.length; t++)
|
|
1899
|
-
if (!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))
|
|
1900
|
-
return !1;
|
|
1740
|
+
for (let t = 0; t < e.length; t++) if (!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t))) return !1;
|
|
1901
1741
|
return !0;
|
|
1902
1742
|
}
|
|
1903
1743
|
_requireStr(e) {
|
|
1904
1744
|
let t = this._cursor.clone();
|
|
1905
|
-
if (!this._attemptStr(e))
|
|
1906
|
-
throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1745
|
+
if (!this._attemptStr(e)) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1907
1746
|
}
|
|
1908
1747
|
_requireStrCaseInsensitive(e) {
|
|
1909
1748
|
let t = this._cursor.clone();
|
|
1910
|
-
if (!this._attemptStrCaseInsensitive(e))
|
|
1911
|
-
throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1749
|
+
if (!this._attemptStrCaseInsensitive(e)) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1912
1750
|
}
|
|
1913
1751
|
_attemptCharCodeUntilFn(e) {
|
|
1914
|
-
for (; !e(this._cursor.peek()); )
|
|
1915
|
-
this._cursor.advance();
|
|
1752
|
+
for (; !e(this._cursor.peek()); ) this._cursor.advance();
|
|
1916
1753
|
}
|
|
1917
1754
|
_requireCharCodeUntilFn(e, t) {
|
|
1918
1755
|
let r = this._cursor.clone();
|
|
1919
|
-
if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t)
|
|
1920
|
-
throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(r));
|
|
1756
|
+
if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(r));
|
|
1921
1757
|
}
|
|
1922
1758
|
_attemptUntilChar(e) {
|
|
1923
|
-
for (; this._cursor.peek() !== e; )
|
|
1924
|
-
this._cursor.advance();
|
|
1759
|
+
for (; this._cursor.peek() !== e; ) this._cursor.advance();
|
|
1925
1760
|
}
|
|
1926
1761
|
_readChar() {
|
|
1927
1762
|
let e = String.fromCodePoint(this._cursor.peek());
|
|
@@ -1947,14 +1782,12 @@ var Ge = class {
|
|
|
1947
1782
|
}
|
|
1948
1783
|
} else {
|
|
1949
1784
|
let r = this._cursor.clone();
|
|
1950
|
-
if (this._attemptCharCodeUntilFn(Ri), this._cursor.peek() != 59)
|
|
1951
|
-
this._beginToken(e, t), this._cursor = r, this._endToken(["&"]);
|
|
1785
|
+
if (this._attemptCharCodeUntilFn(Ri), this._cursor.peek() != 59) this._beginToken(e, t), this._cursor = r, this._endToken(["&"]);
|
|
1952
1786
|
else {
|
|
1953
1787
|
let n = this._cursor.getChars(r);
|
|
1954
1788
|
this._cursor.advance();
|
|
1955
1789
|
let a = Fe[n];
|
|
1956
|
-
if (!a)
|
|
1957
|
-
throw this._createError(rr(n), this._cursor.getSpan(t));
|
|
1790
|
+
if (!a) throw this._createError(rr(n), this._cursor.getSpan(t));
|
|
1958
1791
|
this._endToken([a, `&${n};`]);
|
|
1959
1792
|
}
|
|
1960
1793
|
}
|
|
@@ -1964,8 +1797,7 @@ var Ge = class {
|
|
|
1964
1797
|
let r = [];
|
|
1965
1798
|
for (; ; ) {
|
|
1966
1799
|
let n = this._cursor.clone(), a = t();
|
|
1967
|
-
if (this._cursor = n, a)
|
|
1968
|
-
break;
|
|
1800
|
+
if (this._cursor = n, a) break;
|
|
1969
1801
|
e && this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(r.join(""))]), r.length = 0, this._consumeEntity(6), this._beginToken(6)) : r.push(this._readChar());
|
|
1970
1802
|
}
|
|
1971
1803
|
this._endToken([this._processCarriageReturns(r.join(""))]);
|
|
@@ -1984,8 +1816,7 @@ var Ge = class {
|
|
|
1984
1816
|
}
|
|
1985
1817
|
_consumePrefixAndName() {
|
|
1986
1818
|
let e = this._cursor.clone(), t = "";
|
|
1987
|
-
for (; this._cursor.peek() !== 58 && !Mi(this._cursor.peek()); )
|
|
1988
|
-
this._cursor.advance();
|
|
1819
|
+
for (; this._cursor.peek() !== 58 && !Mi(this._cursor.peek()); ) this._cursor.advance();
|
|
1989
1820
|
let r;
|
|
1990
1821
|
this._cursor.peek() === 58 ? (t = this._cursor.getChars(e), this._cursor.advance(), r = this._cursor.clone()) : r = e, this._requireCharCodeUntilFn(nr, t === "" ? 0 : 1);
|
|
1991
1822
|
let n = this._cursor.getChars(r);
|
|
@@ -1994,16 +1825,14 @@ var Ge = class {
|
|
|
1994
1825
|
_consumeTagOpen(e) {
|
|
1995
1826
|
let t, r, n, a = [];
|
|
1996
1827
|
try {
|
|
1997
|
-
if (!Te(this._cursor.peek()))
|
|
1998
|
-
throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(e));
|
|
1828
|
+
if (!Te(this._cursor.peek())) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(e));
|
|
1999
1829
|
for (n = this._consumeTagOpenStart(e), r = n.parts[0], t = n.parts[1], this._attemptCharCodeUntilFn(b); this._cursor.peek() !== 47 && this._cursor.peek() !== 62 && this._cursor.peek() !== 60 && this._cursor.peek() !== 0; ) {
|
|
2000
1830
|
let [i, u] = this._consumeAttributeName();
|
|
2001
1831
|
if (this._attemptCharCodeUntilFn(b), this._attemptCharCode(61)) {
|
|
2002
1832
|
this._attemptCharCodeUntilFn(b);
|
|
2003
1833
|
let o = this._consumeAttributeValue();
|
|
2004
1834
|
a.push({ prefix: i, name: u, value: o });
|
|
2005
|
-
} else
|
|
2006
|
-
a.push({ prefix: i, name: u });
|
|
1835
|
+
} else a.push({ prefix: i, name: u });
|
|
2007
1836
|
this._attemptCharCodeUntilFn(b);
|
|
2008
1837
|
}
|
|
2009
1838
|
this._consumeTagOpenEnd();
|
|
@@ -2014,8 +1843,7 @@ var Ge = class {
|
|
|
2014
1843
|
}
|
|
2015
1844
|
throw i;
|
|
2016
1845
|
}
|
|
2017
|
-
if (this._canSelfClose && this.tokens[this.tokens.length - 1].type === 2)
|
|
2018
|
-
return;
|
|
1846
|
+
if (this._canSelfClose && this.tokens[this.tokens.length - 1].type === 2) return;
|
|
2019
1847
|
let s = this._getTagContentType(t, r, this._fullNameStack.length > 0, a);
|
|
2020
1848
|
this._handleFullNameStackForTagOpen(r, t), s === I.RAW_TEXT ? this._consumeRawTextWithTagClose(r, t, !1) : s === I.ESCAPABLE_RAW_TEXT && this._consumeRawTextWithTagClose(r, t, !0);
|
|
2021
1849
|
}
|
|
@@ -2029,8 +1857,7 @@ var Ge = class {
|
|
|
2029
1857
|
}
|
|
2030
1858
|
_consumeAttributeName() {
|
|
2031
1859
|
let e = this._cursor.peek();
|
|
2032
|
-
if (e === 39 || e === 34)
|
|
2033
|
-
throw this._createError(X(e), this._cursor.getSpan());
|
|
1860
|
+
if (e === 39 || e === 34) throw this._createError(X(e), this._cursor.getSpan());
|
|
2034
1861
|
this._beginToken(14);
|
|
2035
1862
|
let t = this._consumePrefixAndName();
|
|
2036
1863
|
return this._endToken(t), t;
|
|
@@ -2056,8 +1883,7 @@ var Ge = class {
|
|
|
2056
1883
|
this._beginToken(e), this._requireCharCode(62), this._endToken([]);
|
|
2057
1884
|
}
|
|
2058
1885
|
_consumeTagClose(e) {
|
|
2059
|
-
if (this._beginToken(3, e), this._attemptCharCodeUntilFn(b), this._allowHtmComponentClosingTags && this._attemptCharCode(47))
|
|
2060
|
-
this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken([]);
|
|
1886
|
+
if (this._beginToken(3, e), this._attemptCharCodeUntilFn(b), this._allowHtmComponentClosingTags && this._attemptCharCode(47)) this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken([]);
|
|
2061
1887
|
else {
|
|
2062
1888
|
let [t, r] = this._consumePrefixAndName();
|
|
2063
1889
|
this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken([t, r]), this._handleFullNameStackForTagClose(t, r);
|
|
@@ -2066,8 +1892,7 @@ var Ge = class {
|
|
|
2066
1892
|
_consumeExpansionFormStart() {
|
|
2067
1893
|
this._beginToken(20), this._requireCharCode(123), this._endToken([]), this._expansionCaseStack.push(20), this._beginToken(7);
|
|
2068
1894
|
let e = this._readUntil(44), t = this._processCarriageReturns(e);
|
|
2069
|
-
if (this._i18nNormalizeLineEndingsInICUs)
|
|
2070
|
-
this._endToken([t]);
|
|
1895
|
+
if (this._i18nNormalizeLineEndingsInICUs) this._endToken([t]);
|
|
2071
1896
|
else {
|
|
2072
1897
|
let n = this._endToken([e]);
|
|
2073
1898
|
t !== e && this.nonNormalizedIcuExpressions.push(n);
|
|
@@ -2108,12 +1933,10 @@ var Ge = class {
|
|
|
2108
1933
|
this._cursor = u, n.push(this._getProcessedChars(a, u)), this._endToken(n);
|
|
2109
1934
|
return;
|
|
2110
1935
|
}
|
|
2111
|
-
if (s === null)
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
} else
|
|
2116
|
-
this._attemptStr("//") && (i = !0);
|
|
1936
|
+
if (s === null) if (this._attemptStr(this._interpolationConfig.end)) {
|
|
1937
|
+
n.push(this._getProcessedChars(a, u)), n.push(this._interpolationConfig.end), this._endToken(n);
|
|
1938
|
+
return;
|
|
1939
|
+
} else this._attemptStr("//") && (i = !0);
|
|
2117
1940
|
let o = this._cursor.peek();
|
|
2118
1941
|
this._cursor.advance(), o === 92 ? this._cursor.advance() : o === s ? s = null : !i && s === null && ze(o) && (s = o);
|
|
2119
1942
|
}
|
|
@@ -2130,16 +1953,14 @@ var Ge = class {
|
|
|
2130
1953
|
let e = this._cursor.clone();
|
|
2131
1954
|
e.advance();
|
|
2132
1955
|
let t = e.peek();
|
|
2133
|
-
if (97 <= t && t <= 122 || 65 <= t && t <= 90 || t === 47 || t === 33)
|
|
2134
|
-
return !0;
|
|
1956
|
+
if (97 <= t && t <= 122 || 65 <= t && t <= 90 || t === 47 || t === 33) return !0;
|
|
2135
1957
|
}
|
|
2136
1958
|
return !1;
|
|
2137
1959
|
}
|
|
2138
1960
|
_isBlockStart() {
|
|
2139
1961
|
if (this._tokenizeBlocks && this._cursor.peek() === 64) {
|
|
2140
1962
|
let e = this._cursor.clone();
|
|
2141
|
-
if (e.advance(), sr(e.peek()))
|
|
2142
|
-
return !0;
|
|
1963
|
+
if (e.advance(), sr(e.peek())) return !0;
|
|
2143
1964
|
}
|
|
2144
1965
|
return !1;
|
|
2145
1966
|
}
|
|
@@ -2157,8 +1978,7 @@ var Ge = class {
|
|
|
2157
1978
|
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 20;
|
|
2158
1979
|
}
|
|
2159
1980
|
isExpansionFormStart() {
|
|
2160
|
-
if (this._cursor.peek() !== 123)
|
|
2161
|
-
return !1;
|
|
1981
|
+
if (this._cursor.peek() !== 123) return !1;
|
|
2162
1982
|
if (this._interpolationConfig) {
|
|
2163
1983
|
let e = this._cursor.clone(), t = this._attemptStr(this._interpolationConfig.start);
|
|
2164
1984
|
return this._cursor = e, !t;
|
|
@@ -2219,8 +2039,7 @@ var on = class et {
|
|
|
2219
2039
|
let n = t.state;
|
|
2220
2040
|
this.state = { peek: n.peek, offset: n.offset, line: n.line, column: n.column };
|
|
2221
2041
|
} else {
|
|
2222
|
-
if (!r)
|
|
2223
|
-
throw new Error("Programming error: the range argument must be provided with a file argument.");
|
|
2042
|
+
if (!r) throw new Error("Programming error: the range argument must be provided with a file argument.");
|
|
2224
2043
|
this.file = t, this.input = t.content, this.end = r.endPos, this.state = { peek: -1, offset: r.startPos, line: r.startLine, column: r.startCol };
|
|
2225
2044
|
}
|
|
2226
2045
|
}
|
|
@@ -2245,9 +2064,7 @@ var on = class et {
|
|
|
2245
2064
|
getSpan(t, r) {
|
|
2246
2065
|
t = t || this;
|
|
2247
2066
|
let n = t;
|
|
2248
|
-
if (r)
|
|
2249
|
-
for (; this.diff(t) > 0 && r.indexOf(t.peek()) !== -1; )
|
|
2250
|
-
n === t && (t = t.clone()), t.advance();
|
|
2067
|
+
if (r) for (; this.diff(t) > 0 && r.indexOf(t.peek()) !== -1; ) n === t && (t = t.clone()), t.advance();
|
|
2251
2068
|
let a = this.locationFromCursor(t), s = this.locationFromCursor(this), i = n !== t ? this.locationFromCursor(n) : a;
|
|
2252
2069
|
return new m(a, s, i);
|
|
2253
2070
|
}
|
|
@@ -2258,8 +2075,7 @@ var on = class et {
|
|
|
2258
2075
|
return this.input.charCodeAt(t);
|
|
2259
2076
|
}
|
|
2260
2077
|
advanceState(t) {
|
|
2261
|
-
if (t.offset >= this.end)
|
|
2262
|
-
throw this.state = t, new _t('Unexpected character "EOF"', this);
|
|
2078
|
+
if (t.offset >= this.end) throw this.state = t, new _t('Unexpected character "EOF"', this);
|
|
2263
2079
|
let r = this.charAt(t.offset);
|
|
2264
2080
|
r === 10 ? (t.line++, t.column = 0) : bt(r) || t.column++, t.offset++, this.updatePeek(t);
|
|
2265
2081
|
}
|
|
@@ -2284,52 +2100,39 @@ var on = class et {
|
|
|
2284
2100
|
}
|
|
2285
2101
|
getChars(t) {
|
|
2286
2102
|
let r = t.clone(), n = "";
|
|
2287
|
-
for (; r.internalState.offset < this.internalState.offset; )
|
|
2288
|
-
n += String.fromCodePoint(r.peek()), r.advance();
|
|
2103
|
+
for (; r.internalState.offset < this.internalState.offset; ) n += String.fromCodePoint(r.peek()), r.advance();
|
|
2289
2104
|
return n;
|
|
2290
2105
|
}
|
|
2291
2106
|
processEscapeSequence() {
|
|
2292
2107
|
let t = () => this.internalState.peek;
|
|
2293
|
-
if (t() === 92)
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
else if (t() === 120) {
|
|
2318
|
-
this.advanceState(this.internalState);
|
|
2319
|
-
let r = this.clone();
|
|
2320
|
-
this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 2);
|
|
2321
|
-
} else if (Vt(t())) {
|
|
2322
|
-
let r = "", n = 0, a = this.clone();
|
|
2323
|
-
for (; Vt(t()) && n < 3; )
|
|
2324
|
-
a = this.clone(), r += String.fromCodePoint(t()), this.advanceState(this.internalState), n++;
|
|
2325
|
-
this.state.peek = parseInt(r, 8), this.internalState = a.internalState;
|
|
2326
|
-
} else
|
|
2327
|
-
bt(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek;
|
|
2108
|
+
if (t() === 92) if (this.internalState = { ...this.state }, this.advanceState(this.internalState), t() === 110) this.state.peek = 10;
|
|
2109
|
+
else if (t() === 114) this.state.peek = 13;
|
|
2110
|
+
else if (t() === 118) this.state.peek = 11;
|
|
2111
|
+
else if (t() === 116) this.state.peek = 9;
|
|
2112
|
+
else if (t() === 98) this.state.peek = 8;
|
|
2113
|
+
else if (t() === 102) this.state.peek = 12;
|
|
2114
|
+
else if (t() === 117) if (this.advanceState(this.internalState), t() === 123) {
|
|
2115
|
+
this.advanceState(this.internalState);
|
|
2116
|
+
let r = this.clone(), n = 0;
|
|
2117
|
+
for (; t() !== 125; ) this.advanceState(this.internalState), n++;
|
|
2118
|
+
this.state.peek = this.decodeHexDigits(r, n);
|
|
2119
|
+
} else {
|
|
2120
|
+
let r = this.clone();
|
|
2121
|
+
this.advanceState(this.internalState), this.advanceState(this.internalState), this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 4);
|
|
2122
|
+
}
|
|
2123
|
+
else if (t() === 120) {
|
|
2124
|
+
this.advanceState(this.internalState);
|
|
2125
|
+
let r = this.clone();
|
|
2126
|
+
this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 2);
|
|
2127
|
+
} else if (Vt(t())) {
|
|
2128
|
+
let r = "", n = 0, a = this.clone();
|
|
2129
|
+
for (; Vt(t()) && n < 3; ) a = this.clone(), r += String.fromCodePoint(t()), this.advanceState(this.internalState), n++;
|
|
2130
|
+
this.state.peek = parseInt(r, 8), this.internalState = a.internalState;
|
|
2131
|
+
} else bt(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek;
|
|
2328
2132
|
}
|
|
2329
2133
|
decodeHexDigits(t, r) {
|
|
2330
2134
|
let n = this.input.slice(t.internalState.offset, t.internalState.offset + r), a = parseInt(n, 16);
|
|
2331
|
-
if (isNaN(a))
|
|
2332
|
-
throw t.state = t.internalState, new _t("Invalid hexadecimal escape sequence", t);
|
|
2135
|
+
if (isNaN(a)) throw t.state = t.internalState, new _t("Invalid hexadecimal escape sequence", t);
|
|
2333
2136
|
return a;
|
|
2334
2137
|
}
|
|
2335
2138
|
}, _t = class {
|
|
@@ -2363,10 +2166,8 @@ var on = class et {
|
|
|
2363
2166
|
this.tokens = t, this.getTagDefinition = r, this.canSelfClose = n, this.allowHtmComponentClosingTags = a, this.isTagNameCaseSensitive = s, this._index = -1, this._containerStack = [], this.rootNodes = [], this.errors = [], this._advance();
|
|
2364
2167
|
}
|
|
2365
2168
|
build() {
|
|
2366
|
-
for (; this._peek.type !== 34; )
|
|
2367
|
-
|
|
2368
|
-
for (let t of this._containerStack)
|
|
2369
|
-
t instanceof K && this.errors.push(B.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
|
|
2169
|
+
for (; this._peek.type !== 34; ) this._peek.type === 0 || this._peek.type === 4 ? this._consumeStartTag(this._advance()) : this._peek.type === 3 ? (this._closeVoidElement(), this._consumeEndTag(this._advance())) : this._peek.type === 12 ? (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 === 20 ? this._consumeExpansion(this._advance()) : this._peek.type === 25 ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === 27 ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === 29 ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === 30 ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === 18 ? this._consumeDocType(this._advance()) : this._peek.type === 33 ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._advance();
|
|
2170
|
+
for (let t of this._containerStack) t instanceof K && this.errors.push(B.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
|
|
2370
2171
|
}
|
|
2371
2172
|
_advance() {
|
|
2372
2173
|
let t = this._peek;
|
|
@@ -2391,8 +2192,7 @@ var on = class et {
|
|
|
2391
2192
|
let r = this._advance(), n = this._advance(), a = [];
|
|
2392
2193
|
for (; this._peek.type === 21; ) {
|
|
2393
2194
|
let i = this._parseExpansionCase();
|
|
2394
|
-
if (!i)
|
|
2395
|
-
return;
|
|
2195
|
+
if (!i) return;
|
|
2396
2196
|
a.push(i);
|
|
2397
2197
|
}
|
|
2398
2198
|
if (this._peek.type !== 24) {
|
|
@@ -2404,35 +2204,25 @@ var on = class et {
|
|
|
2404
2204
|
}
|
|
2405
2205
|
_parseExpansionCase() {
|
|
2406
2206
|
let t = this._advance();
|
|
2407
|
-
if (this._peek.type !== 22)
|
|
2408
|
-
return this.errors.push(B.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
|
|
2207
|
+
if (this._peek.type !== 22) return this.errors.push(B.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
|
|
2409
2208
|
let r = this._advance(), n = this._collectExpansionExpTokens(r);
|
|
2410
|
-
if (!n)
|
|
2411
|
-
return null;
|
|
2209
|
+
if (!n) return null;
|
|
2412
2210
|
let a = this._advance();
|
|
2413
2211
|
n.push({ type: 34, parts: [], sourceSpan: a.sourceSpan });
|
|
2414
2212
|
let s = new cn(n, this.getTagDefinition, this.canSelfClose, this.allowHtmComponentClosingTags, this.isTagNameCaseSensitive);
|
|
2415
|
-
if (s.build(), s.errors.length > 0)
|
|
2416
|
-
return this.errors = this.errors.concat(s.errors), null;
|
|
2213
|
+
if (s.build(), s.errors.length > 0) return this.errors = this.errors.concat(s.errors), null;
|
|
2417
2214
|
let i = new m(t.sourceSpan.start, a.sourceSpan.end, t.sourceSpan.fullStart), u = new m(r.sourceSpan.start, a.sourceSpan.end, r.sourceSpan.fullStart);
|
|
2418
2215
|
return new wi(t.parts[0], s.rootNodes, i, t.sourceSpan, u);
|
|
2419
2216
|
}
|
|
2420
2217
|
_collectExpansionExpTokens(t) {
|
|
2421
2218
|
let r = [], n = [22];
|
|
2422
2219
|
for (; ; ) {
|
|
2423
|
-
if ((this._peek.type === 20 || this._peek.type === 22) && n.push(this._peek.type), this._peek.type === 23)
|
|
2424
|
-
if (
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
if (this._peek.type === 24)
|
|
2430
|
-
if (ur(n, 20))
|
|
2431
|
-
n.pop();
|
|
2432
|
-
else
|
|
2433
|
-
return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
2434
|
-
if (this._peek.type === 34)
|
|
2435
|
-
return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
2220
|
+
if ((this._peek.type === 20 || this._peek.type === 22) && n.push(this._peek.type), this._peek.type === 23) if (ur(n, 22)) {
|
|
2221
|
+
if (n.pop(), n.length === 0) return r;
|
|
2222
|
+
} else return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
2223
|
+
if (this._peek.type === 24) if (ur(n, 20)) n.pop();
|
|
2224
|
+
else return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
2225
|
+
if (this._peek.type === 34) return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
2436
2226
|
r.push(this._advance());
|
|
2437
2227
|
}
|
|
2438
2228
|
}
|
|
@@ -2452,8 +2242,7 @@ var on = class et {
|
|
|
2452
2242
|
let s = this._getContainer();
|
|
2453
2243
|
s != null && s.children.length === 0 && this.getTagDefinition(s.name).ignoreFirstLf && (a = a.substring(1), r[0] = { type: t.type, sourceSpan: t.sourceSpan, parts: [a] });
|
|
2454
2244
|
}
|
|
2455
|
-
for (; this._peek.type === 8 || this._peek.type === 5 || this._peek.type === 9; )
|
|
2456
|
-
t = this._advance(), r.push(t), t.type === 8 ? a += t.parts.join("").replace(/&([^;]+);/g, or) : t.type === 9 ? a += t.parts[0] : a += t.parts.join("");
|
|
2245
|
+
for (; this._peek.type === 8 || this._peek.type === 5 || this._peek.type === 9; ) t = this._advance(), r.push(t), t.type === 8 ? a += t.parts.join("").replace(/&([^;]+);/g, or) : t.type === 9 ? a += t.parts[0] : a += t.parts.join("");
|
|
2457
2246
|
if (a.length > 0) {
|
|
2458
2247
|
let s = t.sourceSpan;
|
|
2459
2248
|
this._addToParent(new yi(a, new m(n.start, s.end, n.fullStart, n.details), r));
|
|
@@ -2465,15 +2254,13 @@ var on = class et {
|
|
|
2465
2254
|
}
|
|
2466
2255
|
_consumeStartTag(t) {
|
|
2467
2256
|
let [r, n] = t.parts, a = [];
|
|
2468
|
-
for (; this._peek.type === 14; )
|
|
2469
|
-
a.push(this._consumeAttr(this._advance()));
|
|
2257
|
+
for (; this._peek.type === 14; ) a.push(this._consumeAttr(this._advance()));
|
|
2470
2258
|
let s = this._getElementFullName(r, n, this._getClosestParentElement()), i = !1;
|
|
2471
2259
|
if (this._peek.type === 2) {
|
|
2472
2260
|
this._advance(), i = !0;
|
|
2473
2261
|
let g = this.getTagDefinition(s);
|
|
2474
2262
|
this.canSelfClose || g.canSelfClose || ke(s) !== null || g.isVoid || this.errors.push(B.create(s, t.sourceSpan, `Only void, custom and foreign elements can be self closed "${t.parts[1]}"`));
|
|
2475
|
-
} else
|
|
2476
|
-
this._peek.type === 1 && (this._advance(), i = !1);
|
|
2263
|
+
} else this._peek.type === 1 && (this._advance(), i = !1);
|
|
2477
2264
|
let u = this._peek.sourceSpan.fullStart, o = new m(t.sourceSpan.start, u, t.sourceSpan.fullStart), p = new m(t.sourceSpan.start, u, t.sourceSpan.fullStart), l = new m(t.sourceSpan.start.moveBy(1), t.sourceSpan.end), v = new V(s, a, [], o, p, void 0, l), d = this._getContainer();
|
|
2478
2265
|
this._pushContainer(v, d instanceof V && this.getTagDefinition(d.name).isClosedByChild(v.name)), i ? this._popContainer(s, V, o) : t.type === 4 && (this._popContainer(s, V, null), this.errors.push(B.create(s, o, `Opening tag "${s}" not terminated.`)));
|
|
2479
2266
|
}
|
|
@@ -2482,8 +2269,7 @@ var on = class et {
|
|
|
2482
2269
|
}
|
|
2483
2270
|
_consumeEndTag(t) {
|
|
2484
2271
|
let r = this.allowHtmComponentClosingTags && t.parts.length === 0 ? null : this._getElementFullName(t.parts[0], t.parts[1], this._getClosestParentElement());
|
|
2485
|
-
if (r && this.getTagDefinition(r).isVoid)
|
|
2486
|
-
this.errors.push(B.create(r, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
|
|
2272
|
+
if (r && this.getTagDefinition(r).isVoid) this.errors.push(B.create(r, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
|
|
2487
2273
|
else if (!this._popContainer(r, V, t.sourceSpan)) {
|
|
2488
2274
|
let n = `Unexpected closing tag "${r}". 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`;
|
|
2489
2275
|
this.errors.push(B.create(r, t.sourceSpan, n));
|
|
@@ -2493,8 +2279,7 @@ var on = class et {
|
|
|
2493
2279
|
let a = !1;
|
|
2494
2280
|
for (let s = this._containerStack.length - 1; s >= 0; s--) {
|
|
2495
2281
|
let i = this._containerStack[s];
|
|
2496
|
-
if (ke(i.name) ? i.name === t : (t == null || i.name.toLowerCase() === t.toLowerCase()) && i instanceof r)
|
|
2497
|
-
return i.endSourceSpan = n, i.sourceSpan.end = n !== null ? n.end : i.sourceSpan.end, this._containerStack.splice(s, this._containerStack.length - s), !a;
|
|
2282
|
+
if (ke(i.name) ? i.name === t : (t == null || i.name.toLowerCase() === t.toLowerCase()) && i instanceof r) return i.endSourceSpan = n, i.sourceSpan.end = n !== null ? n.end : i.sourceSpan.end, this._containerStack.splice(s, this._containerStack.length - s), !a;
|
|
2498
2283
|
(i instanceof K || i instanceof V && !this.getTagDefinition(i.name).closedByParent) && (a = !0);
|
|
2499
2284
|
}
|
|
2500
2285
|
return !1;
|
|
@@ -2503,11 +2288,10 @@ var on = class et {
|
|
|
2503
2288
|
let r = Le(t.parts[0], t.parts[1]), n = t.sourceSpan.end, a;
|
|
2504
2289
|
this._peek.type === 15 && (a = this._advance());
|
|
2505
2290
|
let s = "", i = [], u, o;
|
|
2506
|
-
if (this._peek.type === 16)
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
}
|
|
2291
|
+
if (this._peek.type === 16) for (u = this._peek.sourceSpan, o = this._peek.sourceSpan.end; this._peek.type === 16 || this._peek.type === 17 || this._peek.type === 9; ) {
|
|
2292
|
+
let l = this._advance();
|
|
2293
|
+
i.push(l), l.type === 17 ? s += l.parts.join("").replace(/&([^;]+);/g, or) : l.type === 9 ? s += l.parts[0] : s += l.parts.join(""), o = n = l.sourceSpan.end;
|
|
2294
|
+
}
|
|
2511
2295
|
this._peek.type === 15 && (o = n = this._advance().sourceSpan.end);
|
|
2512
2296
|
let p = u && o && new m(a?.sourceSpan.start ?? u.start, o, a?.sourceSpan.fullStart ?? u.fullStart);
|
|
2513
2297
|
return new Ai(r, s, new m(t.sourceSpan.start, n, t.sourceSpan.fullStart), t.sourceSpan, p, i.length > 0 ? i : void 0, void 0);
|
|
@@ -2539,13 +2323,11 @@ var on = class et {
|
|
|
2539
2323
|
if (this._peek.type !== 31) {
|
|
2540
2324
|
this.errors.push(B.create(t.parts[0], t.sourceSpan, `Invalid @let declaration "${r}". Declaration must have a value.`));
|
|
2541
2325
|
return;
|
|
2542
|
-
} else
|
|
2543
|
-
n = this._advance();
|
|
2326
|
+
} else n = this._advance();
|
|
2544
2327
|
if (this._peek.type !== 32) {
|
|
2545
2328
|
this.errors.push(B.create(t.parts[0], t.sourceSpan, `Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));
|
|
2546
2329
|
return;
|
|
2547
|
-
} else
|
|
2548
|
-
a = this._advance();
|
|
2330
|
+
} else a = this._advance();
|
|
2549
2331
|
let s = a.sourceSpan.fullStart, i = new m(t.sourceSpan.start, s, t.sourceSpan.fullStart), u = t.sourceSpan.toString().lastIndexOf(r), o = t.sourceSpan.start.moveBy(u), p = new m(o, t.sourceSpan.end), l = new tr(r, n.parts[0], i, p, n.sourceSpan);
|
|
2550
2332
|
this._addToParent(l);
|
|
2551
2333
|
}
|
|
@@ -2561,9 +2343,7 @@ var on = class et {
|
|
|
2561
2343
|
return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;
|
|
2562
2344
|
}
|
|
2563
2345
|
_getClosestParentElement() {
|
|
2564
|
-
for (let t = this._containerStack.length - 1; t > -1; t--)
|
|
2565
|
-
if (this._containerStack[t] instanceof V)
|
|
2566
|
-
return this._containerStack[t];
|
|
2346
|
+
for (let t = this._containerStack.length - 1; t > -1; t--) if (this._containerStack[t] instanceof V) return this._containerStack[t];
|
|
2567
2347
|
return null;
|
|
2568
2348
|
}
|
|
2569
2349
|
_addToParent(t) {
|
|
@@ -2603,35 +2383,29 @@ function Xi(e, t) {
|
|
|
2603
2383
|
var Ji = Xi, ie = 3;
|
|
2604
2384
|
function Yi(e) {
|
|
2605
2385
|
let t = e.slice(0, ie);
|
|
2606
|
-
if (t !== "---" && t !== "+++")
|
|
2607
|
-
return;
|
|
2386
|
+
if (t !== "---" && t !== "+++") return;
|
|
2608
2387
|
let r = e.indexOf(`
|
|
2609
2388
|
`, ie);
|
|
2610
|
-
if (r === -1)
|
|
2611
|
-
return;
|
|
2389
|
+
if (r === -1) return;
|
|
2612
2390
|
let n = e.slice(ie, r).trim(), a = e.indexOf(`
|
|
2613
2391
|
${t}`, r), s = n;
|
|
2614
2392
|
if (s || (s = t === "+++" ? "toml" : "yaml"), a === -1 && t === "---" && s === "yaml" && (a = e.indexOf(`
|
|
2615
|
-
...`, r)), a === -1)
|
|
2616
|
-
return;
|
|
2393
|
+
...`, r)), a === -1) return;
|
|
2617
2394
|
let i = a + 1 + ie, u = e.charAt(i + 1);
|
|
2618
|
-
if (!/\s?/u.test(u))
|
|
2619
|
-
return;
|
|
2395
|
+
if (!/\s?/u.test(u)) return;
|
|
2620
2396
|
let o = e.slice(0, i);
|
|
2621
2397
|
return { type: "front-matter", language: s, explicitLanguage: n, value: e.slice(r + 1, a), startDelimiter: t, endDelimiter: o.slice(-ie), raw: o };
|
|
2622
2398
|
}
|
|
2623
2399
|
function Qi(e) {
|
|
2624
2400
|
let t = Yi(e);
|
|
2625
|
-
if (!t)
|
|
2626
|
-
return { content: e };
|
|
2401
|
+
if (!t) return { content: e };
|
|
2627
2402
|
let { raw: r } = t;
|
|
2628
2403
|
return { frontMatter: t, content: L(!1, r, /[^\n]/gu, " ") + e.slice(r.length) };
|
|
2629
2404
|
}
|
|
2630
2405
|
var Zi = Qi, Ae = { attrs: !0, children: !0, cases: !0, expression: !0 }, cr = /* @__PURE__ */ new Set(["parent"]), J, rt, nt, eu = class ue {
|
|
2631
2406
|
constructor(t = {}) {
|
|
2632
2407
|
fr(this, J), Et(this, "type"), Et(this, "parent");
|
|
2633
|
-
for (let r of /* @__PURE__ */ new Set([...cr, ...Object.keys(t)]))
|
|
2634
|
-
this.setProperty(r, t[r]);
|
|
2408
|
+
for (let r of /* @__PURE__ */ new Set([...cr, ...Object.keys(t)])) this.setProperty(r, t[r]);
|
|
2635
2409
|
}
|
|
2636
2410
|
setProperty(t, r) {
|
|
2637
2411
|
if (this[t] !== r) {
|
|
@@ -2651,17 +2425,13 @@ var Zi = Qi, Ae = { attrs: !0, children: !0, cases: !0, expression: !0 }, cr = /
|
|
|
2651
2425
|
r !== a && (r || (r = new ue({ parent: this.parent })), r.setProperty(n, s));
|
|
2652
2426
|
}
|
|
2653
2427
|
}
|
|
2654
|
-
if (r)
|
|
2655
|
-
for (let n in this)
|
|
2656
|
-
n in Ae || (r[n] = this[n]);
|
|
2428
|
+
if (r) for (let n in this) n in Ae || (r[n] = this[n]);
|
|
2657
2429
|
return t(r || this);
|
|
2658
2430
|
}
|
|
2659
2431
|
walk(t) {
|
|
2660
2432
|
for (let r in Ae) {
|
|
2661
2433
|
let n = this[r];
|
|
2662
|
-
if (n)
|
|
2663
|
-
for (let a = 0; a < n.length; a++)
|
|
2664
|
-
n[a].walk(t);
|
|
2434
|
+
if (n) for (let a = 0; a < n.length; a++) n[a].walk(t);
|
|
2665
2435
|
}
|
|
2666
2436
|
t(this);
|
|
2667
2437
|
}
|
|
@@ -2728,12 +2498,10 @@ function ru(e, t) {
|
|
|
2728
2498
|
}
|
|
2729
2499
|
var nu = [{ regex: /^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su, parse: su }, { regex: /^\[if([^\]]*)\]><!$/u, parse: iu }, { regex: /^<!\s*\[endif\]$/u, parse: uu }];
|
|
2730
2500
|
function au(e, t) {
|
|
2731
|
-
if (e.value)
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
return n(e, t, a);
|
|
2736
|
-
}
|
|
2501
|
+
if (e.value) for (let { regex: r, parse: n } of nu) {
|
|
2502
|
+
let a = e.value.match(r);
|
|
2503
|
+
if (a) return n(e, t, a);
|
|
2504
|
+
}
|
|
2737
2505
|
return null;
|
|
2738
2506
|
}
|
|
2739
2507
|
function su(e, t, r) {
|
|
@@ -2760,8 +2528,7 @@ function lu(e) {
|
|
|
2760
2528
|
delete e.parameters;
|
|
2761
2529
|
return;
|
|
2762
2530
|
}
|
|
2763
|
-
for (let t of e.parameters)
|
|
2764
|
-
t.type = "angularControlFlowBlockParameter";
|
|
2531
|
+
for (let t of e.parameters) t.type = "angularControlFlowBlockParameter";
|
|
2765
2532
|
e.parameters = { type: "angularControlFlowBlockParameters", children: e.parameters, sourceSpan: new m(e.parameters[0].sourceSpan.start, de(!1, e.parameters, -1).sourceSpan.end) };
|
|
2766
2533
|
}
|
|
2767
2534
|
}
|
|
@@ -2774,13 +2541,11 @@ function pu(e) {
|
|
|
2774
2541
|
function pn(e, t, r) {
|
|
2775
2542
|
let { name: n, canSelfClose: a = !0, normalizeTagName: s = !1, normalizeAttributeName: i = !1, allowHtmComponentClosingTags: u = !1, isTagNameCaseSensitive: o = !1, shouldParseAsRawText: p } = t, { rootNodes: l, errors: v } = lr(e, { canSelfClose: a, allowHtmComponentClosingTags: u, isTagNameCaseSensitive: o, getTagContentType: p ? (...c) => p(...c) ? I.RAW_TEXT : void 0 : void 0, tokenizeAngularBlocks: n === "angular" ? !0 : void 0, tokenizeAngularLetDeclaration: n === "angular" ? !0 : void 0 });
|
|
2776
2543
|
if (n === "vue") {
|
|
2777
|
-
if (l.some((y) => y.type === "docType" && y.value === "html" || y.type === "element" && y.name.toLowerCase() === "html"))
|
|
2778
|
-
return pn(e, wt, r);
|
|
2544
|
+
if (l.some((y) => y.type === "docType" && y.value === "html" || y.type === "element" && y.name.toLowerCase() === "html")) return pn(e, wt, r);
|
|
2779
2545
|
let c, f = () => c ?? (c = lr(e, { canSelfClose: a, allowHtmComponentClosingTags: u, isTagNameCaseSensitive: o })), A = (y) => f().rootNodes.find(({ startSourceSpan: T }) => T && T.start.offset === y.startSourceSpan.start.offset) ?? y;
|
|
2780
2546
|
for (let [y, T] of l.entries()) {
|
|
2781
2547
|
let { endSourceSpan: G, startSourceSpan: dn } = T;
|
|
2782
|
-
if (G === null)
|
|
2783
|
-
v = f().errors, l[y] = A(T);
|
|
2548
|
+
if (G === null) v = f().errors, l[y] = A(T);
|
|
2784
2549
|
else if (hu(T, r)) {
|
|
2785
2550
|
let At = f().errors.find((kt) => kt.span.start.offset > dn.start.offset && kt.span.start.offset < G.end.offset);
|
|
2786
2551
|
At && pr(At), l[y] = A(T);
|
|
@@ -2795,8 +2560,7 @@ function pn(e, t, r) {
|
|
|
2795
2560
|
switch (c.type) {
|
|
2796
2561
|
case "element":
|
|
2797
2562
|
d(c);
|
|
2798
|
-
for (let f of c.attrs)
|
|
2799
|
-
d(f), f.valueSpan ? (f.value = f.valueSpan.toString(), /["']/u.test(f.value[0]) && (f.value = f.value.slice(1, -1))) : f.value = null;
|
|
2563
|
+
for (let f of c.attrs) d(f), f.valueSpan ? (f.value = f.valueSpan.toString(), /["']/u.test(f.value[0]) && (f.value = f.value.slice(1, -1))) : f.value = null;
|
|
2800
2564
|
break;
|
|
2801
2565
|
case "comment":
|
|
2802
2566
|
c.value = c.sourceSpan.toString().slice(4, -3);
|
|
@@ -2809,9 +2573,7 @@ function pn(e, t, r) {
|
|
|
2809
2573
|
let A = c.toLowerCase();
|
|
2810
2574
|
return f(A) ? A : c;
|
|
2811
2575
|
}, w = (c) => {
|
|
2812
|
-
if (c.type === "element" && (s && (!c.namespace || c.namespace === c.tagDefinition.implicitNamespacePrefix || pe(c)) && (c.name = C(c.name, (f) => ou.has(f))), i))
|
|
2813
|
-
for (let f of c.attrs)
|
|
2814
|
-
f.namespace || (f.name = C(f.name, (A) => Xe.has(c.name) && (Xe.get("*").has(A) || Xe.get(c.name).has(A))));
|
|
2576
|
+
if (c.type === "element" && (s && (!c.namespace || c.namespace === c.tagDefinition.implicitNamespacePrefix || pe(c)) && (c.name = C(c.name, (f) => ou.has(f))), i)) for (let f of c.attrs) f.namespace || (f.name = C(f.name, (A) => Xe.has(c.name) && (Xe.get("*").has(A) || Xe.get(c.name).has(A))));
|
|
2815
2577
|
}, E = (c) => {
|
|
2816
2578
|
c.sourceSpan && c.endSourceSpan && (c.sourceSpan = new m(c.sourceSpan.start, c.endSourceSpan.end));
|
|
2817
2579
|
}, x = (c) => {
|
|
@@ -2833,8 +2595,7 @@ function pn(e, t, r) {
|
|
|
2833
2595
|
}
|
|
2834
2596
|
function hu(e, t) {
|
|
2835
2597
|
var r;
|
|
2836
|
-
if (e.type !== "element" || e.name !== "template")
|
|
2837
|
-
return !1;
|
|
2598
|
+
if (e.type !== "element" || e.name !== "template") return !1;
|
|
2838
2599
|
let n = (r = e.attrs.find((a) => a.name === "lang")) == null ? void 0 : r.value;
|
|
2839
2600
|
return !n || Pe(t, { language: n }) === "html";
|
|
2840
2601
|
}
|