@datapos/datapos-development 0.3.438 → 0.3.440
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.
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { promises as
|
|
2
|
-
import
|
|
3
|
-
import { promisify as
|
|
4
|
-
import { exec as
|
|
5
|
-
import { fileURLToPath as
|
|
6
|
-
const
|
|
7
|
-
let
|
|
1
|
+
import { promises as ne, existsSync as ys } from "node:fs";
|
|
2
|
+
import Ye from "node:path";
|
|
3
|
+
import { promisify as xs } from "node:util";
|
|
4
|
+
import { exec as vs, spawn as gs } from "node:child_process";
|
|
5
|
+
import { fileURLToPath as gi, URL as bs } from "node:url";
|
|
6
|
+
const Ps = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
7
|
+
let Ss = (e = 21) => {
|
|
8
8
|
let t = "", s = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
9
9
|
for (; e--; )
|
|
10
|
-
t +=
|
|
10
|
+
t += Ps[s[e] & 63];
|
|
11
11
|
return t;
|
|
12
|
-
},
|
|
12
|
+
}, Et;
|
|
13
13
|
// @__NO_SIDE_EFFECTS__
|
|
14
|
-
function
|
|
14
|
+
function Ts(e) {
|
|
15
15
|
return {
|
|
16
|
-
lang: e?.lang ??
|
|
16
|
+
lang: e?.lang ?? Et?.lang,
|
|
17
17
|
message: e?.message,
|
|
18
|
-
abortEarly: e?.abortEarly ??
|
|
19
|
-
abortPipeEarly: e?.abortPipeEarly ??
|
|
18
|
+
abortEarly: e?.abortEarly ?? Et?.abortEarly,
|
|
19
|
+
abortPipeEarly: e?.abortPipeEarly ?? Et?.abortPipeEarly
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
// @__NO_SIDE_EFFECTS__
|
|
23
|
-
function
|
|
24
|
-
const a = e["~run"]({ value: t }, /* @__PURE__ */
|
|
23
|
+
function Bt(e, t, s) {
|
|
24
|
+
const a = e["~run"]({ value: t }, /* @__PURE__ */ Ts(s));
|
|
25
25
|
return {
|
|
26
26
|
typed: a.typed,
|
|
27
27
|
success: !a.issues,
|
|
@@ -29,16 +29,21 @@ function $t(e, t, s) {
|
|
|
29
29
|
issues: a.issues
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
let
|
|
32
|
+
let It;
|
|
33
33
|
// @__NO_SIDE_EFFECTS__
|
|
34
|
-
function
|
|
34
|
+
function Cs(e) {
|
|
35
35
|
return {
|
|
36
|
-
lang: e?.lang ??
|
|
36
|
+
lang: e?.lang ?? It?.lang,
|
|
37
37
|
message: e?.message,
|
|
38
|
-
abortEarly: e?.abortEarly ??
|
|
39
|
-
abortPipeEarly: e?.abortPipeEarly ??
|
|
38
|
+
abortEarly: e?.abortEarly ?? It?.abortEarly,
|
|
39
|
+
abortPipeEarly: e?.abortPipeEarly ?? It?.abortPipeEarly
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
+
let ks;
|
|
43
|
+
// @__NO_SIDE_EFFECTS__
|
|
44
|
+
function ws(e) {
|
|
45
|
+
return ks?.get(e);
|
|
46
|
+
}
|
|
42
47
|
let As;
|
|
43
48
|
// @__NO_SIDE_EFFECTS__
|
|
44
49
|
function Es(e) {
|
|
@@ -46,21 +51,16 @@ function Es(e) {
|
|
|
46
51
|
}
|
|
47
52
|
let Is;
|
|
48
53
|
// @__NO_SIDE_EFFECTS__
|
|
49
|
-
function _s(e) {
|
|
50
|
-
return Is?.get(e);
|
|
51
|
-
}
|
|
52
|
-
let Ns;
|
|
53
|
-
// @__NO_SIDE_EFFECTS__
|
|
54
|
-
function Ls(e, t) {
|
|
55
|
-
return Ns?.get(e)?.get(t);
|
|
54
|
+
function _s(e, t) {
|
|
55
|
+
return Is?.get(e)?.get(t);
|
|
56
56
|
}
|
|
57
57
|
// @__NO_SIDE_EFFECTS__
|
|
58
|
-
function
|
|
58
|
+
function bi(e) {
|
|
59
59
|
const t = typeof e;
|
|
60
60
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const p = n && "input" in n ? n.input : s.value, f = n?.expected ?? e.expects ?? null, v = n?.received ?? /* @__PURE__ */
|
|
62
|
+
function be(e, t, s, a, n) {
|
|
63
|
+
const p = n && "input" in n ? n.input : s.value, f = n?.expected ?? e.expects ?? null, v = n?.received ?? /* @__PURE__ */ bi(p), x = {
|
|
64
64
|
kind: e.kind,
|
|
65
65
|
type: e.type,
|
|
66
66
|
input: p,
|
|
@@ -73,8 +73,8 @@ function Se(e, t, s, a, n) {
|
|
|
73
73
|
lang: a.lang,
|
|
74
74
|
abortEarly: a.abortEarly,
|
|
75
75
|
abortPipeEarly: a.abortPipeEarly
|
|
76
|
-
}, o = e.kind === "schema",
|
|
77
|
-
|
|
76
|
+
}, o = e.kind === "schema", S = n?.message ?? e.message ?? /* @__PURE__ */ _s(e.reference, x.lang) ?? (o ? /* @__PURE__ */ Es(x.lang) : null) ?? a.message ?? /* @__PURE__ */ ws(x.lang);
|
|
77
|
+
S !== void 0 && (x.message = typeof S == "function" ? S(x) : S), o && (s.typed = !1), s.issues ? s.issues.push(x) : s.issues = [x];
|
|
78
78
|
}
|
|
79
79
|
// @__NO_SIDE_EFFECTS__
|
|
80
80
|
function Pe(e) {
|
|
@@ -82,33 +82,33 @@ function Pe(e) {
|
|
|
82
82
|
version: 1,
|
|
83
83
|
vendor: "valibot",
|
|
84
84
|
validate(t) {
|
|
85
|
-
return e["~run"]({ value: t }, /* @__PURE__ */
|
|
85
|
+
return e["~run"]({ value: t }, /* @__PURE__ */ Cs());
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
// @__NO_SIDE_EFFECTS__
|
|
90
|
-
function
|
|
90
|
+
function Ns(e, t) {
|
|
91
91
|
return Object.hasOwn(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
92
92
|
}
|
|
93
93
|
// @__NO_SIDE_EFFECTS__
|
|
94
|
-
function
|
|
94
|
+
function Ls(e, t) {
|
|
95
95
|
const s = [...new Set(e)];
|
|
96
96
|
return s.length > 1 ? `(${s.join(` ${t} `)})` : s[0] ?? "never";
|
|
97
97
|
}
|
|
98
98
|
// @__NO_SIDE_EFFECTS__
|
|
99
|
-
function
|
|
99
|
+
function Os(e, t, s) {
|
|
100
100
|
return typeof e.fallback == "function" ? e.fallback(t, s) : e.fallback;
|
|
101
101
|
}
|
|
102
102
|
// @__NO_SIDE_EFFECTS__
|
|
103
|
-
function
|
|
103
|
+
function Ut(e, t, s) {
|
|
104
104
|
return typeof e.default == "function" ? e.default(t, s) : e.default;
|
|
105
105
|
}
|
|
106
106
|
// @__NO_SIDE_EFFECTS__
|
|
107
|
-
function
|
|
107
|
+
function Re(e, t) {
|
|
108
108
|
return {
|
|
109
109
|
kind: "schema",
|
|
110
110
|
type: "array",
|
|
111
|
-
reference:
|
|
111
|
+
reference: Re,
|
|
112
112
|
expects: "Array",
|
|
113
113
|
async: !1,
|
|
114
114
|
item: e,
|
|
@@ -139,17 +139,17 @@ function Me(e, t) {
|
|
|
139
139
|
}
|
|
140
140
|
v.typed || (s.typed = !1), s.value.push(v.value);
|
|
141
141
|
}
|
|
142
|
-
} else
|
|
142
|
+
} else be(this, "type", s, a);
|
|
143
143
|
return s;
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
// @__NO_SIDE_EFFECTS__
|
|
148
|
-
function
|
|
148
|
+
function Pi(e) {
|
|
149
149
|
return {
|
|
150
150
|
kind: "schema",
|
|
151
151
|
type: "boolean",
|
|
152
|
-
reference:
|
|
152
|
+
reference: Pi,
|
|
153
153
|
expects: "boolean",
|
|
154
154
|
async: !1,
|
|
155
155
|
message: e,
|
|
@@ -157,17 +157,17 @@ function Ti(e) {
|
|
|
157
157
|
return /* @__PURE__ */ Pe(this);
|
|
158
158
|
},
|
|
159
159
|
"~run"(t, s) {
|
|
160
|
-
return typeof t.value == "boolean" ? t.typed = !0 :
|
|
160
|
+
return typeof t.value == "boolean" ? t.typed = !0 : be(this, "type", t, s), t;
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
// @__NO_SIDE_EFFECTS__
|
|
165
|
-
function
|
|
165
|
+
function He(e, t) {
|
|
166
166
|
return {
|
|
167
167
|
kind: "schema",
|
|
168
168
|
type: "literal",
|
|
169
|
-
reference:
|
|
170
|
-
expects: /* @__PURE__ */
|
|
169
|
+
reference: He,
|
|
170
|
+
expects: /* @__PURE__ */ bi(e),
|
|
171
171
|
async: !1,
|
|
172
172
|
literal: e,
|
|
173
173
|
message: t,
|
|
@@ -175,16 +175,16 @@ function Ge(e, t) {
|
|
|
175
175
|
return /* @__PURE__ */ Pe(this);
|
|
176
176
|
},
|
|
177
177
|
"~run"(s, a) {
|
|
178
|
-
return s.value === this.literal ? s.typed = !0 :
|
|
178
|
+
return s.value === this.literal ? s.typed = !0 : be(this, "type", s, a), s;
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
182
|
// @__NO_SIDE_EFFECTS__
|
|
183
|
-
function
|
|
183
|
+
function me(e, t) {
|
|
184
184
|
return {
|
|
185
185
|
kind: "schema",
|
|
186
186
|
type: "nullable",
|
|
187
|
-
reference:
|
|
187
|
+
reference: me,
|
|
188
188
|
expects: `(${e.expects} | null)`,
|
|
189
189
|
async: !1,
|
|
190
190
|
wrapped: e,
|
|
@@ -193,16 +193,16 @@ function ye(e, t) {
|
|
|
193
193
|
return /* @__PURE__ */ Pe(this);
|
|
194
194
|
},
|
|
195
195
|
"~run"(s, a) {
|
|
196
|
-
return s.value === null && (this.default !== void 0 && (s.value = /* @__PURE__ */
|
|
196
|
+
return s.value === null && (this.default !== void 0 && (s.value = /* @__PURE__ */ Ut(this, s, a)), s.value === null) ? (s.typed = !0, s) : this.wrapped["~run"](s, a);
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
// @__NO_SIDE_EFFECTS__
|
|
201
|
-
function
|
|
201
|
+
function De(e) {
|
|
202
202
|
return {
|
|
203
203
|
kind: "schema",
|
|
204
204
|
type: "number",
|
|
205
|
-
reference:
|
|
205
|
+
reference: De,
|
|
206
206
|
expects: "number",
|
|
207
207
|
async: !1,
|
|
208
208
|
message: e,
|
|
@@ -210,16 +210,16 @@ function Ve(e) {
|
|
|
210
210
|
return /* @__PURE__ */ Pe(this);
|
|
211
211
|
},
|
|
212
212
|
"~run"(t, s) {
|
|
213
|
-
return typeof t.value == "number" && !isNaN(t.value) ? t.typed = !0 :
|
|
213
|
+
return typeof t.value == "number" && !isNaN(t.value) ? t.typed = !0 : be(this, "type", t, s), t;
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
// @__NO_SIDE_EFFECTS__
|
|
218
|
-
function
|
|
218
|
+
function ve(e, t) {
|
|
219
219
|
return {
|
|
220
220
|
kind: "schema",
|
|
221
221
|
type: "object",
|
|
222
|
-
reference:
|
|
222
|
+
reference: ve,
|
|
223
223
|
expects: "Object",
|
|
224
224
|
async: !1,
|
|
225
225
|
entries: e,
|
|
@@ -234,7 +234,7 @@ function xe(e, t) {
|
|
|
234
234
|
for (const p in this.entries) {
|
|
235
235
|
const f = this.entries[p];
|
|
236
236
|
if (p in n || (f.type === "exact_optional" || f.type === "optional" || f.type === "nullish") && f.default !== void 0) {
|
|
237
|
-
const v = p in n ? n[p] : /* @__PURE__ */
|
|
237
|
+
const v = p in n ? n[p] : /* @__PURE__ */ Ut(f), x = f["~run"]({ value: v }, a);
|
|
238
238
|
if (x.issues) {
|
|
239
239
|
const o = {
|
|
240
240
|
type: "object",
|
|
@@ -243,16 +243,16 @@ function xe(e, t) {
|
|
|
243
243
|
key: p,
|
|
244
244
|
value: v
|
|
245
245
|
};
|
|
246
|
-
for (const
|
|
247
|
-
|
|
246
|
+
for (const S of x.issues)
|
|
247
|
+
S.path ? S.path.unshift(o) : S.path = [o], s.issues?.push(S);
|
|
248
248
|
if (s.issues || (s.issues = x.issues), a.abortEarly) {
|
|
249
249
|
s.typed = !1;
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
x.typed || (s.typed = !1), s.value[p] = x.value;
|
|
254
|
-
} else if (f.fallback !== void 0) s.value[p] = /* @__PURE__ */
|
|
255
|
-
else if (f.type !== "exact_optional" && f.type !== "optional" && f.type !== "nullish" && (
|
|
254
|
+
} else if (f.fallback !== void 0) s.value[p] = /* @__PURE__ */ Os(f);
|
|
255
|
+
else if (f.type !== "exact_optional" && f.type !== "optional" && f.type !== "nullish" && (be(this, "key", s, a, {
|
|
256
256
|
input: void 0,
|
|
257
257
|
expected: `"${p}"`,
|
|
258
258
|
path: [{
|
|
@@ -265,17 +265,17 @@ function xe(e, t) {
|
|
|
265
265
|
}), a.abortEarly))
|
|
266
266
|
break;
|
|
267
267
|
}
|
|
268
|
-
} else
|
|
268
|
+
} else be(this, "type", s, a);
|
|
269
269
|
return s;
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
273
|
// @__NO_SIDE_EFFECTS__
|
|
274
|
-
function
|
|
274
|
+
function ce(e, t) {
|
|
275
275
|
return {
|
|
276
276
|
kind: "schema",
|
|
277
277
|
type: "optional",
|
|
278
|
-
reference:
|
|
278
|
+
reference: ce,
|
|
279
279
|
expects: `(${e.expects} | undefined)`,
|
|
280
280
|
async: !1,
|
|
281
281
|
wrapped: e,
|
|
@@ -284,16 +284,16 @@ function pe(e, t) {
|
|
|
284
284
|
return /* @__PURE__ */ Pe(this);
|
|
285
285
|
},
|
|
286
286
|
"~run"(s, a) {
|
|
287
|
-
return s.value === void 0 && (this.default !== void 0 && (s.value = /* @__PURE__ */
|
|
287
|
+
return s.value === void 0 && (this.default !== void 0 && (s.value = /* @__PURE__ */ Ut(this, s, a)), s.value === void 0) ? (s.typed = !0, s) : this.wrapped["~run"](s, a);
|
|
288
288
|
}
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
// @__NO_SIDE_EFFECTS__
|
|
292
|
-
function
|
|
292
|
+
function $t(e, t, s) {
|
|
293
293
|
return {
|
|
294
294
|
kind: "schema",
|
|
295
295
|
type: "record",
|
|
296
|
-
reference:
|
|
296
|
+
reference: $t,
|
|
297
297
|
expects: "Object",
|
|
298
298
|
async: !1,
|
|
299
299
|
key: e,
|
|
@@ -306,10 +306,10 @@ function Ht(e, t, s) {
|
|
|
306
306
|
const p = a.value;
|
|
307
307
|
if (p && typeof p == "object") {
|
|
308
308
|
a.typed = !0, a.value = {};
|
|
309
|
-
for (const f in p) if (/* @__PURE__ */
|
|
309
|
+
for (const f in p) if (/* @__PURE__ */ Ns(p, f)) {
|
|
310
310
|
const v = p[f], x = this.key["~run"]({ value: f }, n);
|
|
311
311
|
if (x.issues) {
|
|
312
|
-
const
|
|
312
|
+
const S = {
|
|
313
313
|
type: "object",
|
|
314
314
|
origin: "key",
|
|
315
315
|
input: p,
|
|
@@ -317,7 +317,7 @@ function Ht(e, t, s) {
|
|
|
317
317
|
value: v
|
|
318
318
|
};
|
|
319
319
|
for (const I of x.issues)
|
|
320
|
-
I.path = [
|
|
320
|
+
I.path = [S], a.issues?.push(I);
|
|
321
321
|
if (a.issues || (a.issues = x.issues), n.abortEarly) {
|
|
322
322
|
a.typed = !1;
|
|
323
323
|
break;
|
|
@@ -325,7 +325,7 @@ function Ht(e, t, s) {
|
|
|
325
325
|
}
|
|
326
326
|
const o = this.value["~run"]({ value: v }, n);
|
|
327
327
|
if (o.issues) {
|
|
328
|
-
const
|
|
328
|
+
const S = {
|
|
329
329
|
type: "object",
|
|
330
330
|
origin: "value",
|
|
331
331
|
input: p,
|
|
@@ -333,7 +333,7 @@ function Ht(e, t, s) {
|
|
|
333
333
|
value: v
|
|
334
334
|
};
|
|
335
335
|
for (const I of o.issues)
|
|
336
|
-
I.path ? I.path.unshift(
|
|
336
|
+
I.path ? I.path.unshift(S) : I.path = [S], a.issues?.push(I);
|
|
337
337
|
if (a.issues || (a.issues = o.issues), n.abortEarly) {
|
|
338
338
|
a.typed = !1;
|
|
339
339
|
break;
|
|
@@ -341,7 +341,7 @@ function Ht(e, t, s) {
|
|
|
341
341
|
}
|
|
342
342
|
(!x.typed || !o.typed) && (a.typed = !1), x.typed && (a.value[x.value] = o.value);
|
|
343
343
|
}
|
|
344
|
-
} else
|
|
344
|
+
} else be(this, "type", a, n);
|
|
345
345
|
return a;
|
|
346
346
|
}
|
|
347
347
|
};
|
|
@@ -359,23 +359,23 @@ function V(e) {
|
|
|
359
359
|
return /* @__PURE__ */ Pe(this);
|
|
360
360
|
},
|
|
361
361
|
"~run"(t, s) {
|
|
362
|
-
return typeof t.value == "string" ? t.typed = !0 :
|
|
362
|
+
return typeof t.value == "string" ? t.typed = !0 : be(this, "type", t, s), t;
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
// @__NO_SIDE_EFFECTS__
|
|
367
|
-
function
|
|
367
|
+
function ri(e) {
|
|
368
368
|
let t;
|
|
369
369
|
if (e) for (const s of e) t ? t.push(...s.issues) : t = s.issues;
|
|
370
370
|
return t;
|
|
371
371
|
}
|
|
372
372
|
// @__NO_SIDE_EFFECTS__
|
|
373
|
-
function
|
|
373
|
+
function Si(e, t) {
|
|
374
374
|
return {
|
|
375
375
|
kind: "schema",
|
|
376
376
|
type: "union",
|
|
377
|
-
reference:
|
|
378
|
-
expects: /* @__PURE__ */
|
|
377
|
+
reference: Si,
|
|
378
|
+
expects: /* @__PURE__ */ Ls(e.map((s) => s.expects), "|"),
|
|
379
379
|
async: !1,
|
|
380
380
|
options: e,
|
|
381
381
|
message: t,
|
|
@@ -396,26 +396,26 @@ function Ci(e, t) {
|
|
|
396
396
|
if (n) return n;
|
|
397
397
|
if (p) {
|
|
398
398
|
if (p.length === 1) return p[0];
|
|
399
|
-
|
|
399
|
+
be(this, "type", s, a, { issues: /* @__PURE__ */ ri(p) }), s.typed = !0;
|
|
400
400
|
} else {
|
|
401
401
|
if (f?.length === 1) return f[0];
|
|
402
|
-
|
|
402
|
+
be(this, "type", s, a, { issues: /* @__PURE__ */ ri(f) });
|
|
403
403
|
}
|
|
404
404
|
return s;
|
|
405
405
|
}
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
|
-
const
|
|
408
|
+
const Se = (e) => /* @__PURE__ */ Si(e.map((t) => /* @__PURE__ */ He(t))), Rs = /* @__PURE__ */ ve({
|
|
409
409
|
"en-au": /* @__PURE__ */ V(),
|
|
410
410
|
"en-gb": /* @__PURE__ */ V(),
|
|
411
411
|
"en-us": /* @__PURE__ */ V(),
|
|
412
412
|
"es-es": /* @__PURE__ */ V()
|
|
413
|
-
}),
|
|
414
|
-
"en-au": /* @__PURE__ */
|
|
415
|
-
"en-gb": /* @__PURE__ */
|
|
416
|
-
"en-us": /* @__PURE__ */
|
|
417
|
-
"es-es": /* @__PURE__ */
|
|
418
|
-
}),
|
|
413
|
+
}), tt = /* @__PURE__ */ ve({
|
|
414
|
+
"en-au": /* @__PURE__ */ ce(/* @__PURE__ */ V()),
|
|
415
|
+
"en-gb": /* @__PURE__ */ ce(/* @__PURE__ */ V()),
|
|
416
|
+
"en-us": /* @__PURE__ */ ce(/* @__PURE__ */ V()),
|
|
417
|
+
"es-es": /* @__PURE__ */ ce(/* @__PURE__ */ V())
|
|
418
|
+
}), Ms = Se(["amber", "green", "red", "other"]), Ds = Se([
|
|
419
419
|
"alpha",
|
|
420
420
|
"beta",
|
|
421
421
|
"generalAvailability",
|
|
@@ -426,7 +426,7 @@ const Te = (e) => /* @__PURE__ */ Ci(e.map((t) => /* @__PURE__ */ Ge(t))), Ds =
|
|
|
426
426
|
"unavailable",
|
|
427
427
|
"underReview"
|
|
428
428
|
]);
|
|
429
|
-
|
|
429
|
+
Se([
|
|
430
430
|
"app",
|
|
431
431
|
"connector",
|
|
432
432
|
"connectorConnection",
|
|
@@ -451,62 +451,44 @@ Te([
|
|
|
451
451
|
"presenterPresentation",
|
|
452
452
|
"tool"
|
|
453
453
|
]);
|
|
454
|
-
const
|
|
454
|
+
const Vs = /* @__PURE__ */ ve({
|
|
455
455
|
id: /* @__PURE__ */ V(),
|
|
456
|
-
color:
|
|
456
|
+
color: Ms,
|
|
457
457
|
label: /* @__PURE__ */ V()
|
|
458
|
-
}),
|
|
458
|
+
}), Ti = {
|
|
459
459
|
id: /* @__PURE__ */ V(),
|
|
460
|
-
label:
|
|
461
|
-
description:
|
|
462
|
-
firstCreatedAt: /* @__PURE__ */
|
|
463
|
-
icon: /* @__PURE__ */
|
|
464
|
-
iconDark: /* @__PURE__ */
|
|
465
|
-
lastUpdatedAt: /* @__PURE__ */
|
|
466
|
-
status: /* @__PURE__ */
|
|
467
|
-
statusId:
|
|
468
|
-
},
|
|
460
|
+
label: tt,
|
|
461
|
+
description: tt,
|
|
462
|
+
firstCreatedAt: /* @__PURE__ */ ce(/* @__PURE__ */ De()),
|
|
463
|
+
icon: /* @__PURE__ */ me(/* @__PURE__ */ V()),
|
|
464
|
+
iconDark: /* @__PURE__ */ me(/* @__PURE__ */ V()),
|
|
465
|
+
lastUpdatedAt: /* @__PURE__ */ me(/* @__PURE__ */ De()),
|
|
466
|
+
status: /* @__PURE__ */ me(Vs),
|
|
467
|
+
statusId: Ds
|
|
468
|
+
}, Ci = /* @__PURE__ */ ve({
|
|
469
469
|
id: /* @__PURE__ */ V(),
|
|
470
|
-
label:
|
|
471
|
-
description:
|
|
472
|
-
icon: /* @__PURE__ */
|
|
473
|
-
iconDark: /* @__PURE__ */
|
|
474
|
-
order: /* @__PURE__ */
|
|
470
|
+
label: tt,
|
|
471
|
+
description: tt,
|
|
472
|
+
icon: /* @__PURE__ */ me(/* @__PURE__ */ V()),
|
|
473
|
+
iconDark: /* @__PURE__ */ me(/* @__PURE__ */ V()),
|
|
474
|
+
order: /* @__PURE__ */ De(),
|
|
475
475
|
path: /* @__PURE__ */ V()
|
|
476
476
|
});
|
|
477
|
-
|
|
478
|
-
const
|
|
479
|
-
...
|
|
477
|
+
Se(["app", "engine", "connector", "context", "presenter", "tool"]);
|
|
478
|
+
const qt = {
|
|
479
|
+
...Ti,
|
|
480
480
|
version: /* @__PURE__ */ V()
|
|
481
|
-
},
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
operations: /* @__PURE__ */ Me(Bs)
|
|
491
|
-
}), qs = Te(["list", "render", "setColorMode"]), Hs = /* @__PURE__ */ xe({
|
|
492
|
-
...Gt,
|
|
493
|
-
typeId: /* @__PURE__ */ Ge("presenter"),
|
|
494
|
-
presentations: /* @__PURE__ */ Me(wi),
|
|
495
|
-
operations: /* @__PURE__ */ Me(qs)
|
|
496
|
-
}), K = (e) => new Map(Object.entries(e));
|
|
497
|
-
K({ "en-gb": "Delimited Text" }), K({ "en-gb": "Entity/Event" }), K({ "en-gb": "JSON Array" }), K({ "en-gb": "SPSS" }), K({ "en-gb": "XLS" }), K({ "en-gb": "XLSX" }), K({ "en-gb": "XML" });
|
|
498
|
-
K({ "en-gb": "Newline" }), K({ "en-gb": "Carriage Return" }), K({ "en-gb": "Carriage Return/Newline" });
|
|
499
|
-
K({ "en-gb": "Colon" }), K({ "en-gb": "Comma" }), K({ "en-gb": "Exclamation Mark" }), K({ "en-gb": "Record Separator" }), K({ "en-gb": "Semicolon" }), K({ "en-gb": "Space" }), K({ "en-gb": "Tab" }), K({ "en-gb": "Underscore" }), K({ "en-gb": "Unit Separator" }), K({ "en-gb": "Vertical Bar" });
|
|
500
|
-
const Gs = Te(["apiKey", "disabled", "oAuth2", "none"]), Ks = /* @__PURE__ */ xe({
|
|
501
|
-
authMethodId: Gs,
|
|
502
|
-
activeConnectionCount: /* @__PURE__ */ pe(/* @__PURE__ */ Ve()),
|
|
503
|
-
canDescribe: /* @__PURE__ */ pe(/* @__PURE__ */ Ti()),
|
|
504
|
-
id: /* @__PURE__ */ pe(/* @__PURE__ */ V()),
|
|
505
|
-
label: /* @__PURE__ */ pe(Ds),
|
|
506
|
-
maxConnectionCount: /* @__PURE__ */ pe(/* @__PURE__ */ Ve()),
|
|
507
|
-
params: /* @__PURE__ */ pe(/* @__PURE__ */ Me(/* @__PURE__ */ Ht(/* @__PURE__ */ V(), /* @__PURE__ */ V())))
|
|
508
|
-
}), Ws = Te(["application", "curatedDataset", "database", "fileStore"]), zs = Te([
|
|
481
|
+
}, js = Se(["apiKey", "disabled", "oAuth2", "none"]), Fs = /* @__PURE__ */ ve({
|
|
482
|
+
authMethodId: js,
|
|
483
|
+
activeConnectionCount: /* @__PURE__ */ ce(/* @__PURE__ */ De()),
|
|
484
|
+
canDescribe: /* @__PURE__ */ ce(/* @__PURE__ */ Pi()),
|
|
485
|
+
id: /* @__PURE__ */ ce(/* @__PURE__ */ V()),
|
|
486
|
+
label: /* @__PURE__ */ ce(Rs),
|
|
487
|
+
maxConnectionCount: /* @__PURE__ */ ce(/* @__PURE__ */ De()),
|
|
488
|
+
params: /* @__PURE__ */ ce(/* @__PURE__ */ Re(/* @__PURE__ */ $t(/* @__PURE__ */ V(), /* @__PURE__ */ V())))
|
|
489
|
+
}), Bs = Se(["application", "curatedDataset", "database", "fileStore"]), Us = Se([
|
|
509
490
|
"abortOperation",
|
|
491
|
+
"auditContent",
|
|
510
492
|
"authenticateConnection",
|
|
511
493
|
"createObject",
|
|
512
494
|
"describeConnection",
|
|
@@ -520,34 +502,48 @@ const Gs = Te(["apiKey", "disabled", "oAuth2", "none"]), Ks = /* @__PURE__ */ xe
|
|
|
520
502
|
"retrieveChunks",
|
|
521
503
|
"retrieveRecords",
|
|
522
504
|
"upsertRecords"
|
|
523
|
-
]),
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
|
|
505
|
+
]), $s = Se(["bidirectional", "destination", "source", "unknown"]), qs = /* @__PURE__ */ ve({
|
|
506
|
+
id: /* @__PURE__ */ V(),
|
|
507
|
+
label: tt
|
|
508
|
+
}), Hs = /* @__PURE__ */ ve({
|
|
509
|
+
...qt,
|
|
510
|
+
typeId: /* @__PURE__ */ He("connector"),
|
|
511
|
+
category: /* @__PURE__ */ me(qs),
|
|
512
|
+
categoryId: Bs,
|
|
513
|
+
implementations: /* @__PURE__ */ $t(/* @__PURE__ */ V(), Fs),
|
|
514
|
+
operations: /* @__PURE__ */ Re(Us),
|
|
515
|
+
usageId: $s,
|
|
516
|
+
vendorAccountURL: /* @__PURE__ */ me(/* @__PURE__ */ V()),
|
|
517
|
+
vendorDocumentationURL: /* @__PURE__ */ me(/* @__PURE__ */ V()),
|
|
518
|
+
vendorHomeURL: /* @__PURE__ */ me(/* @__PURE__ */ V())
|
|
519
|
+
}), Gs = Se(["list"]), Ks = /* @__PURE__ */ ve({
|
|
520
|
+
...Ti,
|
|
521
|
+
typeId: /* @__PURE__ */ He("contextModelGroup"),
|
|
522
|
+
modelRefs: /* @__PURE__ */ Re(Ci),
|
|
523
|
+
order: /* @__PURE__ */ De()
|
|
524
|
+
}), Ws = /* @__PURE__ */ ve({
|
|
525
|
+
...qt,
|
|
526
|
+
typeId: /* @__PURE__ */ He("context"),
|
|
527
|
+
models: /* @__PURE__ */ Re(Ks),
|
|
528
|
+
operations: /* @__PURE__ */ Re(Gs)
|
|
529
|
+
}), zs = Se(["list", "render", "setColorMode"]), Xs = /* @__PURE__ */ ve({
|
|
530
|
+
...qt,
|
|
531
|
+
typeId: /* @__PURE__ */ He("presenter"),
|
|
532
|
+
presentations: /* @__PURE__ */ Re(Ci),
|
|
533
|
+
operations: /* @__PURE__ */ Re(zs)
|
|
534
|
+
});
|
|
535
|
+
var Qs = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], ki = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], Js = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", wi = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", _t = {
|
|
540
536
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
541
537
|
5: "class enum extends super const export import",
|
|
542
538
|
6: "enum",
|
|
543
539
|
strict: "implements interface let package private protected public static yield",
|
|
544
540
|
strictBind: "eval arguments"
|
|
545
|
-
},
|
|
546
|
-
5:
|
|
547
|
-
"5module":
|
|
548
|
-
6:
|
|
549
|
-
},
|
|
550
|
-
function
|
|
541
|
+
}, Nt = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", Ys = {
|
|
542
|
+
5: Nt,
|
|
543
|
+
"5module": Nt + " export import",
|
|
544
|
+
6: Nt + " const class extends export import super"
|
|
545
|
+
}, Zs = /^in(stanceof)?$/, er = new RegExp("[" + wi + "]"), tr = new RegExp("[" + wi + Js + "]");
|
|
546
|
+
function Mt(e, t) {
|
|
551
547
|
for (var s = 65536, a = 0; a < t.length; a += 2) {
|
|
552
548
|
if (s += t[a], s > e)
|
|
553
549
|
return !1;
|
|
@@ -556,28 +552,28 @@ function Vt(e, t) {
|
|
|
556
552
|
}
|
|
557
553
|
return !1;
|
|
558
554
|
}
|
|
559
|
-
function
|
|
560
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
555
|
+
function ye(e, t) {
|
|
556
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && er.test(String.fromCharCode(e)) : t === !1 ? !1 : Mt(e, ki);
|
|
561
557
|
}
|
|
562
|
-
function
|
|
563
|
-
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
558
|
+
function we(e, t) {
|
|
559
|
+
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && tr.test(String.fromCharCode(e)) : t === !1 ? !1 : Mt(e, ki) || Mt(e, Qs);
|
|
564
560
|
}
|
|
565
561
|
var O = function(t, s) {
|
|
566
562
|
s === void 0 && (s = {}), this.label = t, this.keyword = s.keyword, this.beforeExpr = !!s.beforeExpr, this.startsExpr = !!s.startsExpr, this.isLoop = !!s.isLoop, this.isAssign = !!s.isAssign, this.prefix = !!s.prefix, this.postfix = !!s.postfix, this.binop = s.binop || null, this.updateContext = null;
|
|
567
563
|
};
|
|
568
|
-
function
|
|
564
|
+
function ue(e, t) {
|
|
569
565
|
return new O(e, { beforeExpr: !0, binop: t });
|
|
570
566
|
}
|
|
571
|
-
var
|
|
567
|
+
var he = { beforeExpr: !0 }, ie = { startsExpr: !0 }, $e = {};
|
|
572
568
|
function M(e, t) {
|
|
573
|
-
return t === void 0 && (t = {}), t.keyword = e,
|
|
569
|
+
return t === void 0 && (t = {}), t.keyword = e, $e[e] = new O(e, t);
|
|
574
570
|
}
|
|
575
571
|
var h = {
|
|
576
|
-
num: new O("num",
|
|
577
|
-
regexp: new O("regexp",
|
|
578
|
-
string: new O("string",
|
|
579
|
-
name: new O("name",
|
|
580
|
-
privateId: new O("privateId",
|
|
572
|
+
num: new O("num", ie),
|
|
573
|
+
regexp: new O("regexp", ie),
|
|
574
|
+
string: new O("string", ie),
|
|
575
|
+
name: new O("name", ie),
|
|
576
|
+
privateId: new O("privateId", ie),
|
|
581
577
|
eof: new O("eof"),
|
|
582
578
|
// Punctuation token types.
|
|
583
579
|
bracketL: new O("[", { beforeExpr: !0, startsExpr: !0 }),
|
|
@@ -586,17 +582,17 @@ var h = {
|
|
|
586
582
|
braceR: new O("}"),
|
|
587
583
|
parenL: new O("(", { beforeExpr: !0, startsExpr: !0 }),
|
|
588
584
|
parenR: new O(")"),
|
|
589
|
-
comma: new O(",",
|
|
590
|
-
semi: new O(";",
|
|
591
|
-
colon: new O(":",
|
|
585
|
+
comma: new O(",", he),
|
|
586
|
+
semi: new O(";", he),
|
|
587
|
+
colon: new O(":", he),
|
|
592
588
|
dot: new O("."),
|
|
593
|
-
question: new O("?",
|
|
589
|
+
question: new O("?", he),
|
|
594
590
|
questionDot: new O("?."),
|
|
595
|
-
arrow: new O("=>",
|
|
591
|
+
arrow: new O("=>", he),
|
|
596
592
|
template: new O("template"),
|
|
597
593
|
invalidTemplate: new O("invalidTemplate"),
|
|
598
|
-
ellipsis: new O("...",
|
|
599
|
-
backQuote: new O("`",
|
|
594
|
+
ellipsis: new O("...", he),
|
|
595
|
+
backQuote: new O("`", ie),
|
|
600
596
|
dollarBraceL: new O("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
601
597
|
// Operators. These carry several kinds of properties to help the
|
|
602
598
|
// parser use them properly (the presence of these properties is
|
|
@@ -615,98 +611,98 @@ var h = {
|
|
|
615
611
|
assign: new O("_=", { beforeExpr: !0, isAssign: !0 }),
|
|
616
612
|
incDec: new O("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
|
|
617
613
|
prefix: new O("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
618
|
-
logicalOR:
|
|
619
|
-
logicalAND:
|
|
620
|
-
bitwiseOR:
|
|
621
|
-
bitwiseXOR:
|
|
622
|
-
bitwiseAND:
|
|
623
|
-
equality:
|
|
624
|
-
relational:
|
|
625
|
-
bitShift:
|
|
614
|
+
logicalOR: ue("||", 1),
|
|
615
|
+
logicalAND: ue("&&", 2),
|
|
616
|
+
bitwiseOR: ue("|", 3),
|
|
617
|
+
bitwiseXOR: ue("^", 4),
|
|
618
|
+
bitwiseAND: ue("&", 5),
|
|
619
|
+
equality: ue("==/!=/===/!==", 6),
|
|
620
|
+
relational: ue("</>/<=/>=", 7),
|
|
621
|
+
bitShift: ue("<</>>/>>>", 8),
|
|
626
622
|
plusMin: new O("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
|
|
627
|
-
modulo:
|
|
628
|
-
star:
|
|
629
|
-
slash:
|
|
623
|
+
modulo: ue("%", 10),
|
|
624
|
+
star: ue("*", 10),
|
|
625
|
+
slash: ue("/", 10),
|
|
630
626
|
starstar: new O("**", { beforeExpr: !0 }),
|
|
631
|
-
coalesce:
|
|
627
|
+
coalesce: ue("??", 1),
|
|
632
628
|
// Keyword token types.
|
|
633
629
|
_break: M("break"),
|
|
634
|
-
_case: M("case",
|
|
630
|
+
_case: M("case", he),
|
|
635
631
|
_catch: M("catch"),
|
|
636
632
|
_continue: M("continue"),
|
|
637
633
|
_debugger: M("debugger"),
|
|
638
|
-
_default: M("default",
|
|
634
|
+
_default: M("default", he),
|
|
639
635
|
_do: M("do", { isLoop: !0, beforeExpr: !0 }),
|
|
640
|
-
_else: M("else",
|
|
636
|
+
_else: M("else", he),
|
|
641
637
|
_finally: M("finally"),
|
|
642
638
|
_for: M("for", { isLoop: !0 }),
|
|
643
|
-
_function: M("function",
|
|
639
|
+
_function: M("function", ie),
|
|
644
640
|
_if: M("if"),
|
|
645
|
-
_return: M("return",
|
|
641
|
+
_return: M("return", he),
|
|
646
642
|
_switch: M("switch"),
|
|
647
|
-
_throw: M("throw",
|
|
643
|
+
_throw: M("throw", he),
|
|
648
644
|
_try: M("try"),
|
|
649
645
|
_var: M("var"),
|
|
650
646
|
_const: M("const"),
|
|
651
647
|
_while: M("while", { isLoop: !0 }),
|
|
652
648
|
_with: M("with"),
|
|
653
649
|
_new: M("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
654
|
-
_this: M("this",
|
|
655
|
-
_super: M("super",
|
|
656
|
-
_class: M("class",
|
|
657
|
-
_extends: M("extends",
|
|
650
|
+
_this: M("this", ie),
|
|
651
|
+
_super: M("super", ie),
|
|
652
|
+
_class: M("class", ie),
|
|
653
|
+
_extends: M("extends", he),
|
|
658
654
|
_export: M("export"),
|
|
659
|
-
_import: M("import",
|
|
660
|
-
_null: M("null",
|
|
661
|
-
_true: M("true",
|
|
662
|
-
_false: M("false",
|
|
655
|
+
_import: M("import", ie),
|
|
656
|
+
_null: M("null", ie),
|
|
657
|
+
_true: M("true", ie),
|
|
658
|
+
_false: M("false", ie),
|
|
663
659
|
_in: M("in", { beforeExpr: !0, binop: 7 }),
|
|
664
660
|
_instanceof: M("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
665
661
|
_typeof: M("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
666
662
|
_void: M("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
667
663
|
_delete: M("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
668
|
-
},
|
|
669
|
-
function
|
|
664
|
+
}, Y = /\r\n?|\n|\u2028|\u2029/, Ai = new RegExp(Y.source, "g");
|
|
665
|
+
function je(e) {
|
|
670
666
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
671
667
|
}
|
|
672
|
-
function
|
|
668
|
+
function Ei(e, t, s) {
|
|
673
669
|
s === void 0 && (s = e.length);
|
|
674
670
|
for (var a = t; a < s; a++) {
|
|
675
671
|
var n = e.charCodeAt(a);
|
|
676
|
-
if (
|
|
672
|
+
if (je(n))
|
|
677
673
|
return a < s - 1 && n === 13 && e.charCodeAt(a + 1) === 10 ? a + 2 : a + 1;
|
|
678
674
|
}
|
|
679
675
|
return -1;
|
|
680
676
|
}
|
|
681
|
-
var
|
|
682
|
-
return
|
|
683
|
-
}),
|
|
684
|
-
return
|
|
685
|
-
}),
|
|
686
|
-
function
|
|
687
|
-
return
|
|
677
|
+
var Ht = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, z = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Ii = Object.prototype, ir = Ii.hasOwnProperty, sr = Ii.toString, Ge = Object.hasOwn || (function(e, t) {
|
|
678
|
+
return ir.call(e, t);
|
|
679
|
+
}), ai = Array.isArray || (function(e) {
|
|
680
|
+
return sr.call(e) === "[object Array]";
|
|
681
|
+
}), ni = /* @__PURE__ */ Object.create(null);
|
|
682
|
+
function Oe(e) {
|
|
683
|
+
return ni[e] || (ni[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
688
684
|
}
|
|
689
|
-
function
|
|
685
|
+
function Ae(e) {
|
|
690
686
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
691
687
|
}
|
|
692
|
-
var
|
|
688
|
+
var rr = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, qe = function(t, s) {
|
|
693
689
|
this.line = t, this.column = s;
|
|
694
690
|
};
|
|
695
|
-
|
|
696
|
-
return new
|
|
691
|
+
qe.prototype.offset = function(t) {
|
|
692
|
+
return new qe(this.line, this.column + t);
|
|
697
693
|
};
|
|
698
694
|
var rt = function(t, s, a) {
|
|
699
695
|
this.start = s, this.end = a, t.sourceFile !== null && (this.source = t.sourceFile);
|
|
700
696
|
};
|
|
701
|
-
function
|
|
697
|
+
function Gt(e, t) {
|
|
702
698
|
for (var s = 1, a = 0; ; ) {
|
|
703
|
-
var n =
|
|
699
|
+
var n = Ei(e, a, t);
|
|
704
700
|
if (n < 0)
|
|
705
|
-
return new
|
|
701
|
+
return new qe(s, t - a);
|
|
706
702
|
++s, a = n;
|
|
707
703
|
}
|
|
708
704
|
}
|
|
709
|
-
var
|
|
705
|
+
var lt = {
|
|
710
706
|
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
|
711
707
|
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
|
712
708
|
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
|
|
@@ -802,21 +798,21 @@ var dt = {
|
|
|
802
798
|
// When enabled, parenthesized expressions are represented by
|
|
803
799
|
// (non-standard) ParenthesizedExpression nodes
|
|
804
800
|
preserveParens: !1
|
|
805
|
-
},
|
|
806
|
-
function
|
|
801
|
+
}, oi = !1;
|
|
802
|
+
function ar(e) {
|
|
807
803
|
var t = {};
|
|
808
|
-
for (var s in
|
|
809
|
-
t[s] = e &&
|
|
810
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
811
|
-
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14),
|
|
804
|
+
for (var s in lt)
|
|
805
|
+
t[s] = e && Ge(e, s) ? e[s] : lt[s];
|
|
806
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!oi && typeof console == "object" && console.warn && (oi = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
807
|
+
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), ai(t.onToken)) {
|
|
812
808
|
var a = t.onToken;
|
|
813
809
|
t.onToken = function(n) {
|
|
814
810
|
return a.push(n);
|
|
815
811
|
};
|
|
816
812
|
}
|
|
817
|
-
return
|
|
813
|
+
return ai(t.onComment) && (t.onComment = nr(t, t.onComment)), t;
|
|
818
814
|
}
|
|
819
|
-
function
|
|
815
|
+
function nr(e, t) {
|
|
820
816
|
return function(s, a, n, p, f, v) {
|
|
821
817
|
var x = {
|
|
822
818
|
type: s ? "Block" : "Line",
|
|
@@ -827,61 +823,61 @@ function or(e, t) {
|
|
|
827
823
|
e.locations && (x.loc = new rt(this, f, v)), e.ranges && (x.range = [n, p]), t.push(x);
|
|
828
824
|
};
|
|
829
825
|
}
|
|
830
|
-
var it = 1,
|
|
831
|
-
function
|
|
832
|
-
return
|
|
826
|
+
var it = 1, Ke = 2, Kt = 4, _i = 8, Wt = 16, Ni = 32, gt = 64, Li = 128, Fe = 256, at = 512, bt = it | Ke | Fe;
|
|
827
|
+
function zt(e, t) {
|
|
828
|
+
return Ke | (e ? Kt : 0) | (t ? _i : 0);
|
|
833
829
|
}
|
|
834
|
-
var
|
|
835
|
-
this.options = t =
|
|
830
|
+
var ft = 0, Xt = 1, Ie = 2, Oi = 3, Ri = 4, Mi = 5, H = function(t, s, a) {
|
|
831
|
+
this.options = t = ar(t), this.sourceFile = t.sourceFile, this.keywords = Oe(Ys[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
836
832
|
var n = "";
|
|
837
|
-
t.allowReserved !== !0 && (n =
|
|
838
|
-
var p = (n ? n + " " : "") +
|
|
839
|
-
this.reservedWordsStrict =
|
|
840
|
-
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
841
|
-
},
|
|
833
|
+
t.allowReserved !== !0 && (n = _t[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (n += " await")), this.reservedWords = Oe(n);
|
|
834
|
+
var p = (n ? n + " " : "") + _t.strict;
|
|
835
|
+
this.reservedWordsStrict = Oe(p), this.reservedWordsStrictBind = Oe(p + " " + _t.strictBind), this.input = String(s), this.containsEsc = !1, a ? (this.pos = a, this.lineStart = this.input.lastIndexOf(`
|
|
836
|
+
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(Y).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = h.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = t.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(it), this.regexpState = null, this.privateNameStack = [];
|
|
837
|
+
}, Te = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
842
838
|
H.prototype.parse = function() {
|
|
843
839
|
var t = this.options.program || this.startNode();
|
|
844
840
|
return this.nextToken(), this.parseTopLevel(t);
|
|
845
841
|
};
|
|
846
|
-
|
|
847
|
-
return (this.currentVarScope().flags &
|
|
842
|
+
Te.inFunction.get = function() {
|
|
843
|
+
return (this.currentVarScope().flags & Ke) > 0;
|
|
848
844
|
};
|
|
849
|
-
|
|
850
|
-
return (this.currentVarScope().flags &
|
|
845
|
+
Te.inGenerator.get = function() {
|
|
846
|
+
return (this.currentVarScope().flags & _i) > 0;
|
|
851
847
|
};
|
|
852
|
-
|
|
853
|
-
return (this.currentVarScope().flags &
|
|
848
|
+
Te.inAsync.get = function() {
|
|
849
|
+
return (this.currentVarScope().flags & Kt) > 0;
|
|
854
850
|
};
|
|
855
|
-
|
|
851
|
+
Te.canAwait.get = function() {
|
|
856
852
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
857
853
|
var t = this.scopeStack[e], s = t.flags;
|
|
858
|
-
if (s & (
|
|
854
|
+
if (s & (Fe | at))
|
|
859
855
|
return !1;
|
|
860
|
-
if (s &
|
|
861
|
-
return (s &
|
|
856
|
+
if (s & Ke)
|
|
857
|
+
return (s & Kt) > 0;
|
|
862
858
|
}
|
|
863
859
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
864
860
|
};
|
|
865
|
-
|
|
861
|
+
Te.allowSuper.get = function() {
|
|
866
862
|
var e = this.currentThisScope(), t = e.flags;
|
|
867
|
-
return (t &
|
|
863
|
+
return (t & gt) > 0 || this.options.allowSuperOutsideMethod;
|
|
868
864
|
};
|
|
869
|
-
|
|
870
|
-
return (this.currentThisScope().flags &
|
|
865
|
+
Te.allowDirectSuper.get = function() {
|
|
866
|
+
return (this.currentThisScope().flags & Li) > 0;
|
|
871
867
|
};
|
|
872
|
-
|
|
868
|
+
Te.treatFunctionsAsVar.get = function() {
|
|
873
869
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
874
870
|
};
|
|
875
|
-
|
|
871
|
+
Te.allowNewDotTarget.get = function() {
|
|
876
872
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
877
873
|
var t = this.scopeStack[e], s = t.flags;
|
|
878
|
-
if (s & (
|
|
874
|
+
if (s & (Fe | at) || s & Ke && !(s & Wt))
|
|
879
875
|
return !0;
|
|
880
876
|
}
|
|
881
877
|
return !1;
|
|
882
878
|
};
|
|
883
|
-
|
|
884
|
-
return (this.currentVarScope().flags &
|
|
879
|
+
Te.inClassStaticBlock.get = function() {
|
|
880
|
+
return (this.currentVarScope().flags & Fe) > 0;
|
|
885
881
|
};
|
|
886
882
|
H.extend = function() {
|
|
887
883
|
for (var t = [], s = arguments.length; s--; ) t[s] = arguments[s];
|
|
@@ -899,67 +895,67 @@ H.parseExpressionAt = function(t, s, a) {
|
|
|
899
895
|
H.tokenizer = function(t, s) {
|
|
900
896
|
return new this(s, t);
|
|
901
897
|
};
|
|
902
|
-
Object.defineProperties(H.prototype,
|
|
903
|
-
var
|
|
904
|
-
|
|
898
|
+
Object.defineProperties(H.prototype, Te);
|
|
899
|
+
var Z = H.prototype, or = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
900
|
+
Z.strictDirective = function(e) {
|
|
905
901
|
if (this.options.ecmaVersion < 5)
|
|
906
902
|
return !1;
|
|
907
903
|
for (; ; ) {
|
|
908
|
-
|
|
909
|
-
var t =
|
|
904
|
+
z.lastIndex = e, e += z.exec(this.input)[0].length;
|
|
905
|
+
var t = or.exec(this.input.slice(e));
|
|
910
906
|
if (!t)
|
|
911
907
|
return !1;
|
|
912
908
|
if ((t[1] || t[2]) === "use strict") {
|
|
913
|
-
|
|
914
|
-
var s =
|
|
915
|
-
return n === ";" || n === "}" ||
|
|
909
|
+
z.lastIndex = e + t[0].length;
|
|
910
|
+
var s = z.exec(this.input), a = s.index + s[0].length, n = this.input.charAt(a);
|
|
911
|
+
return n === ";" || n === "}" || Y.test(s[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(n) || n === "!" && this.input.charAt(a + 1) === "=");
|
|
916
912
|
}
|
|
917
|
-
e += t[0].length,
|
|
913
|
+
e += t[0].length, z.lastIndex = e, e += z.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
918
914
|
}
|
|
919
915
|
};
|
|
920
|
-
|
|
916
|
+
Z.eat = function(e) {
|
|
921
917
|
return this.type === e ? (this.next(), !0) : !1;
|
|
922
918
|
};
|
|
923
|
-
|
|
919
|
+
Z.isContextual = function(e) {
|
|
924
920
|
return this.type === h.name && this.value === e && !this.containsEsc;
|
|
925
921
|
};
|
|
926
|
-
|
|
922
|
+
Z.eatContextual = function(e) {
|
|
927
923
|
return this.isContextual(e) ? (this.next(), !0) : !1;
|
|
928
924
|
};
|
|
929
|
-
|
|
925
|
+
Z.expectContextual = function(e) {
|
|
930
926
|
this.eatContextual(e) || this.unexpected();
|
|
931
927
|
};
|
|
932
|
-
|
|
933
|
-
return this.type === h.eof || this.type === h.braceR ||
|
|
928
|
+
Z.canInsertSemicolon = function() {
|
|
929
|
+
return this.type === h.eof || this.type === h.braceR || Y.test(this.input.slice(this.lastTokEnd, this.start));
|
|
934
930
|
};
|
|
935
|
-
|
|
931
|
+
Z.insertSemicolon = function() {
|
|
936
932
|
if (this.canInsertSemicolon())
|
|
937
933
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
938
934
|
};
|
|
939
|
-
|
|
935
|
+
Z.semicolon = function() {
|
|
940
936
|
!this.eat(h.semi) && !this.insertSemicolon() && this.unexpected();
|
|
941
937
|
};
|
|
942
|
-
|
|
938
|
+
Z.afterTrailingComma = function(e, t) {
|
|
943
939
|
if (this.type === e)
|
|
944
940
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0;
|
|
945
941
|
};
|
|
946
|
-
|
|
942
|
+
Z.expect = function(e) {
|
|
947
943
|
this.eat(e) || this.unexpected();
|
|
948
944
|
};
|
|
949
|
-
|
|
945
|
+
Z.unexpected = function(e) {
|
|
950
946
|
this.raise(e ?? this.start, "Unexpected token");
|
|
951
947
|
};
|
|
952
|
-
var
|
|
948
|
+
var Pt = function() {
|
|
953
949
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
954
950
|
};
|
|
955
|
-
|
|
951
|
+
Z.checkPatternErrors = function(e, t) {
|
|
956
952
|
if (e) {
|
|
957
953
|
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
|
|
958
954
|
var s = t ? e.parenthesizedAssign : e.parenthesizedBind;
|
|
959
955
|
s > -1 && this.raiseRecoverable(s, t ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
960
956
|
}
|
|
961
957
|
};
|
|
962
|
-
|
|
958
|
+
Z.checkExpressionErrors = function(e, t) {
|
|
963
959
|
if (!e)
|
|
964
960
|
return !1;
|
|
965
961
|
var s = e.shorthandAssign, a = e.doubleProto;
|
|
@@ -967,10 +963,10 @@ ee.checkExpressionErrors = function(e, t) {
|
|
|
967
963
|
return s >= 0 || a >= 0;
|
|
968
964
|
s >= 0 && this.raise(s, "Shorthand property assignments are valid only in destructuring patterns"), a >= 0 && this.raiseRecoverable(a, "Redefinition of __proto__ property");
|
|
969
965
|
};
|
|
970
|
-
|
|
966
|
+
Z.checkYieldAwaitInDefaultParams = function() {
|
|
971
967
|
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
|
|
972
968
|
};
|
|
973
|
-
|
|
969
|
+
Z.isSimpleAssignTarget = function(e) {
|
|
974
970
|
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
|
|
975
971
|
};
|
|
976
972
|
var w = H.prototype;
|
|
@@ -987,25 +983,25 @@ w.parseTopLevel = function(e) {
|
|
|
987
983
|
}
|
|
988
984
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
989
985
|
};
|
|
990
|
-
var
|
|
986
|
+
var Qt = { kind: "loop" }, ur = { kind: "switch" };
|
|
991
987
|
w.isLet = function(e) {
|
|
992
988
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
993
989
|
return !1;
|
|
994
|
-
|
|
995
|
-
var t =
|
|
990
|
+
z.lastIndex = this.pos;
|
|
991
|
+
var t = z.exec(this.input), s = this.pos + t[0].length, a = this.input.charCodeAt(s);
|
|
996
992
|
if (a === 91 || a === 92)
|
|
997
993
|
return !0;
|
|
998
994
|
if (e)
|
|
999
995
|
return !1;
|
|
1000
996
|
if (a === 123 || a > 55295 && a < 56320)
|
|
1001
997
|
return !0;
|
|
1002
|
-
if (
|
|
1003
|
-
for (var n = s + 1;
|
|
998
|
+
if (ye(a, !0)) {
|
|
999
|
+
for (var n = s + 1; we(a = this.input.charCodeAt(n), !0); )
|
|
1004
1000
|
++n;
|
|
1005
1001
|
if (a === 92 || a > 55295 && a < 56320)
|
|
1006
1002
|
return !0;
|
|
1007
1003
|
var p = this.input.slice(s, n);
|
|
1008
|
-
if (!
|
|
1004
|
+
if (!Zs.test(p))
|
|
1009
1005
|
return !0;
|
|
1010
1006
|
}
|
|
1011
1007
|
return !1;
|
|
@@ -1013,33 +1009,33 @@ w.isLet = function(e) {
|
|
|
1013
1009
|
w.isAsyncFunction = function() {
|
|
1014
1010
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
1015
1011
|
return !1;
|
|
1016
|
-
|
|
1017
|
-
var e =
|
|
1018
|
-
return !
|
|
1012
|
+
z.lastIndex = this.pos;
|
|
1013
|
+
var e = z.exec(this.input), t = this.pos + e[0].length, s;
|
|
1014
|
+
return !Y.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(we(s = this.input.charCodeAt(t + 8)) || s > 55295 && s < 56320));
|
|
1019
1015
|
};
|
|
1020
1016
|
w.isUsingKeyword = function(e, t) {
|
|
1021
1017
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using"))
|
|
1022
1018
|
return !1;
|
|
1023
|
-
|
|
1024
|
-
var s =
|
|
1025
|
-
if (
|
|
1019
|
+
z.lastIndex = this.pos;
|
|
1020
|
+
var s = z.exec(this.input), a = this.pos + s[0].length;
|
|
1021
|
+
if (Y.test(this.input.slice(this.pos, a)))
|
|
1026
1022
|
return !1;
|
|
1027
1023
|
if (e) {
|
|
1028
1024
|
var n = a + 5, p;
|
|
1029
|
-
if (this.input.slice(a, n) !== "using" || n === this.input.length ||
|
|
1025
|
+
if (this.input.slice(a, n) !== "using" || n === this.input.length || we(p = this.input.charCodeAt(n)) || p > 55295 && p < 56320)
|
|
1030
1026
|
return !1;
|
|
1031
|
-
|
|
1032
|
-
var f =
|
|
1033
|
-
if (f &&
|
|
1027
|
+
z.lastIndex = n;
|
|
1028
|
+
var f = z.exec(this.input);
|
|
1029
|
+
if (f && Y.test(this.input.slice(n, n + f[0].length)))
|
|
1034
1030
|
return !1;
|
|
1035
1031
|
}
|
|
1036
1032
|
if (t) {
|
|
1037
1033
|
var v = a + 2, x;
|
|
1038
|
-
if (this.input.slice(a, v) === "of" && (v === this.input.length || !
|
|
1034
|
+
if (this.input.slice(a, v) === "of" && (v === this.input.length || !we(x = this.input.charCodeAt(v)) && !(x > 55295 && x < 56320)))
|
|
1039
1035
|
return !1;
|
|
1040
1036
|
}
|
|
1041
1037
|
var o = this.input.charCodeAt(a);
|
|
1042
|
-
return
|
|
1038
|
+
return ye(o, !0) || o === 92;
|
|
1043
1039
|
};
|
|
1044
1040
|
w.isAwaitUsing = function(e) {
|
|
1045
1041
|
return this.isUsingKeyword(!0, e);
|
|
@@ -1087,8 +1083,8 @@ w.parseStatement = function(e, t, s) {
|
|
|
1087
1083
|
case h._export:
|
|
1088
1084
|
case h._import:
|
|
1089
1085
|
if (this.options.ecmaVersion > 10 && a === h._import) {
|
|
1090
|
-
|
|
1091
|
-
var f =
|
|
1086
|
+
z.lastIndex = this.pos;
|
|
1087
|
+
var f = z.exec(this.input), v = this.pos + f[0].length, x = this.input.charCodeAt(v);
|
|
1092
1088
|
if (x === 40 || x === 46)
|
|
1093
1089
|
return this.parseExpressionStatement(n, this.parseExpression());
|
|
1094
1090
|
}
|
|
@@ -1104,8 +1100,8 @@ w.parseStatement = function(e, t, s) {
|
|
|
1104
1100
|
var o = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
1105
1101
|
if (o)
|
|
1106
1102
|
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), o === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(n, !1, o), this.semicolon(), this.finishNode(n, "VariableDeclaration");
|
|
1107
|
-
var
|
|
1108
|
-
return a === h.name && I.type === "Identifier" && this.eat(h.colon) ? this.parseLabeledStatement(n,
|
|
1103
|
+
var S = this.value, I = this.parseExpression();
|
|
1104
|
+
return a === h.name && I.type === "Identifier" && this.eat(h.colon) ? this.parseLabeledStatement(n, S, I, e) : this.parseExpressionStatement(n, I);
|
|
1109
1105
|
}
|
|
1110
1106
|
};
|
|
1111
1107
|
w.parseBreakContinueStatement = function(e, t) {
|
|
@@ -1122,12 +1118,12 @@ w.parseDebuggerStatement = function(e) {
|
|
|
1122
1118
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
1123
1119
|
};
|
|
1124
1120
|
w.parseDoStatement = function(e) {
|
|
1125
|
-
return this.next(), this.labels.push(
|
|
1121
|
+
return this.next(), this.labels.push(Qt), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(h._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(h.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
1126
1122
|
};
|
|
1127
1123
|
w.parseForStatement = function(e) {
|
|
1128
1124
|
this.next();
|
|
1129
1125
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
1130
|
-
if (this.labels.push(
|
|
1126
|
+
if (this.labels.push(Qt), this.enterScope(0), this.expect(h.parenL), this.type === h.semi)
|
|
1131
1127
|
return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
1132
1128
|
var s = this.isLet();
|
|
1133
1129
|
if (this.type === h._var || this.type === h._const || s) {
|
|
@@ -1139,14 +1135,14 @@ w.parseForStatement = function(e) {
|
|
|
1139
1135
|
var x = this.startNode();
|
|
1140
1136
|
return this.next(), v === "await using" && this.next(), this.parseVar(x, !0, v), this.finishNode(x, "VariableDeclaration"), this.parseForAfterInit(e, x, t);
|
|
1141
1137
|
}
|
|
1142
|
-
var o = this.containsEsc,
|
|
1143
|
-
return this.type === h._in || (f = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === h._in && this.unexpected(t), e.await = !0) : f && this.options.ecmaVersion >= 8 && (B.start === I && !o && B.type === "Identifier" && B.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), p && f && this.raise(B.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(B, !1,
|
|
1138
|
+
var o = this.containsEsc, S = new Pt(), I = this.start, B = t > -1 ? this.parseExprSubscripts(S, "await") : this.parseExpression(!0, S);
|
|
1139
|
+
return this.type === h._in || (f = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === h._in && this.unexpected(t), e.await = !0) : f && this.options.ecmaVersion >= 8 && (B.start === I && !o && B.type === "Identifier" && B.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), p && f && this.raise(B.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(B, !1, S), this.checkLValPattern(B), this.parseForIn(e, B)) : (this.checkExpressionErrors(S, !0), t > -1 && this.unexpected(t), this.parseFor(e, B));
|
|
1144
1140
|
};
|
|
1145
1141
|
w.parseForAfterInit = function(e, t, s) {
|
|
1146
1142
|
return (this.type === h._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === h._in ? s > -1 && this.unexpected(s) : e.await = s > -1), this.parseForIn(e, t)) : (s > -1 && this.unexpected(s), this.parseFor(e, t));
|
|
1147
1143
|
};
|
|
1148
1144
|
w.parseFunctionStatement = function(e, t, s) {
|
|
1149
|
-
return this.next(), this.parseFunction(e,
|
|
1145
|
+
return this.next(), this.parseFunction(e, Ze | (s ? 0 : Dt), !1, t);
|
|
1150
1146
|
};
|
|
1151
1147
|
w.parseIfStatement = function(e) {
|
|
1152
1148
|
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(h._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
@@ -1155,7 +1151,7 @@ w.parseReturnStatement = function(e) {
|
|
|
1155
1151
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(h.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
1156
1152
|
};
|
|
1157
1153
|
w.parseSwitchStatement = function(e) {
|
|
1158
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(h.braceL), this.labels.push(
|
|
1154
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(h.braceL), this.labels.push(ur), this.enterScope(0);
|
|
1159
1155
|
for (var t, s = !1; this.type !== h.braceR; )
|
|
1160
1156
|
if (this.type === h._case || this.type === h._default) {
|
|
1161
1157
|
var a = this.type === h._case;
|
|
@@ -1165,12 +1161,12 @@ w.parseSwitchStatement = function(e) {
|
|
|
1165
1161
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
1166
1162
|
};
|
|
1167
1163
|
w.parseThrowStatement = function(e) {
|
|
1168
|
-
return this.next(),
|
|
1164
|
+
return this.next(), Y.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
1169
1165
|
};
|
|
1170
|
-
var
|
|
1166
|
+
var hr = [];
|
|
1171
1167
|
w.parseCatchClauseParam = function() {
|
|
1172
1168
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
1173
|
-
return this.enterScope(t ?
|
|
1169
|
+
return this.enterScope(t ? Ni : 0), this.checkLValPattern(e, t ? Ri : Ie), this.expect(h.parenR), e;
|
|
1174
1170
|
};
|
|
1175
1171
|
w.parseTryStatement = function(e) {
|
|
1176
1172
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === h._catch) {
|
|
@@ -1183,7 +1179,7 @@ w.parseVarStatement = function(e, t, s) {
|
|
|
1183
1179
|
return this.next(), this.parseVar(e, !1, t, s), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
1184
1180
|
};
|
|
1185
1181
|
w.parseWhileStatement = function(e) {
|
|
1186
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
1182
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(Qt), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
1187
1183
|
};
|
|
1188
1184
|
w.parseWithStatement = function(e) {
|
|
1189
1185
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
@@ -1234,13 +1230,13 @@ w.parseVar = function(e, t, s, a) {
|
|
|
1234
1230
|
return e;
|
|
1235
1231
|
};
|
|
1236
1232
|
w.parseVarId = function(e, t) {
|
|
1237
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
1233
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Xt : Ie, !1);
|
|
1238
1234
|
};
|
|
1239
|
-
var
|
|
1235
|
+
var Ze = 1, Dt = 2, Di = 4;
|
|
1240
1236
|
w.parseFunction = function(e, t, s, a, n) {
|
|
1241
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !a) && (this.type === h.star && t &
|
|
1237
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !a) && (this.type === h.star && t & Dt && this.unexpected(), e.generator = this.eat(h.star)), this.options.ecmaVersion >= 8 && (e.async = !!a), t & Ze && (e.id = t & Di && this.type !== h.name ? null : this.parseIdent(), e.id && !(t & Dt) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Xt : Ie : Oi));
|
|
1242
1238
|
var p = this.yieldPos, f = this.awaitPos, v = this.awaitIdentPos;
|
|
1243
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
1239
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(zt(e.async, e.generator)), t & Ze || (e.id = this.type === h.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, s, !1, n), this.yieldPos = p, this.awaitPos = f, this.awaitIdentPos = v, this.finishNode(e, t & Ze ? "FunctionDeclaration" : "FunctionExpression");
|
|
1244
1240
|
};
|
|
1245
1241
|
w.parseFunctionParams = function(e) {
|
|
1246
1242
|
this.expect(h.parenL), e.params = this.parseBindingList(h.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -1252,7 +1248,7 @@ w.parseClass = function(e, t) {
|
|
|
1252
1248
|
var a = this.enterClassBody(), n = this.startNode(), p = !1;
|
|
1253
1249
|
for (n.body = [], this.expect(h.braceL); this.type !== h.braceR; ) {
|
|
1254
1250
|
var f = this.parseClassElement(e.superClass !== null);
|
|
1255
|
-
f && (n.body.push(f), f.type === "MethodDefinition" && f.kind === "constructor" ? (p && this.raiseRecoverable(f.start, "Duplicate constructor in the same class"), p = !0) : f.key && f.key.type === "PrivateIdentifier" &&
|
|
1251
|
+
f && (n.body.push(f), f.type === "MethodDefinition" && f.kind === "constructor" ? (p && this.raiseRecoverable(f.start, "Duplicate constructor in the same class"), p = !0) : f.key && f.key.type === "PrivateIdentifier" && cr(a, f) && this.raiseRecoverable(f.key.start, "Identifier '#" + f.key.name + "' has already been declared"));
|
|
1256
1252
|
}
|
|
1257
1253
|
return this.strict = s, this.next(), e.body = this.finishNode(n, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
1258
1254
|
};
|
|
@@ -1270,8 +1266,8 @@ w.parseClassElement = function(e) {
|
|
|
1270
1266
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? f = x : a = x);
|
|
1271
1267
|
}
|
|
1272
1268
|
if (a ? (s.computed = !1, s.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), s.key.name = a, this.finishNode(s.key, "Identifier")) : this.parseClassElementName(s), t < 13 || this.type === h.parenL || f !== "method" || n || p) {
|
|
1273
|
-
var o = !s.static &&
|
|
1274
|
-
o && f !== "method" && this.raise(s.key.start, "Constructor can't have get/set modifier"), s.kind = o ? "constructor" : f, this.parseClassMethod(s, n, p,
|
|
1269
|
+
var o = !s.static && dt(s, "constructor"), S = o && e;
|
|
1270
|
+
o && f !== "method" && this.raise(s.key.start, "Constructor can't have get/set modifier"), s.kind = o ? "constructor" : f, this.parseClassMethod(s, n, p, S);
|
|
1275
1271
|
} else
|
|
1276
1272
|
this.parseClassField(s);
|
|
1277
1273
|
return s;
|
|
@@ -1284,24 +1280,24 @@ w.parseClassElementName = function(e) {
|
|
|
1284
1280
|
};
|
|
1285
1281
|
w.parseClassMethod = function(e, t, s, a) {
|
|
1286
1282
|
var n = e.key;
|
|
1287
|
-
e.kind === "constructor" ? (t && this.raise(n.start, "Constructor can't be a generator"), s && this.raise(n.start, "Constructor can't be an async method")) : e.static &&
|
|
1283
|
+
e.kind === "constructor" ? (t && this.raise(n.start, "Constructor can't be a generator"), s && this.raise(n.start, "Constructor can't be an async method")) : e.static && dt(e, "prototype") && this.raise(n.start, "Classes may not have a static property named prototype");
|
|
1288
1284
|
var p = e.value = this.parseMethod(t, s, a);
|
|
1289
1285
|
return e.kind === "get" && p.params.length !== 0 && this.raiseRecoverable(p.start, "getter should have no params"), e.kind === "set" && p.params.length !== 1 && this.raiseRecoverable(p.start, "setter should have exactly one param"), e.kind === "set" && p.params[0].type === "RestElement" && this.raiseRecoverable(p.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
1290
1286
|
};
|
|
1291
1287
|
w.parseClassField = function(e) {
|
|
1292
|
-
return
|
|
1288
|
+
return dt(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && dt(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(h.eq) ? (this.enterScope(at | gt), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
1293
1289
|
};
|
|
1294
1290
|
w.parseClassStaticBlock = function(e) {
|
|
1295
1291
|
e.body = [];
|
|
1296
1292
|
var t = this.labels;
|
|
1297
|
-
for (this.labels = [], this.enterScope(
|
|
1293
|
+
for (this.labels = [], this.enterScope(Fe | gt); this.type !== h.braceR; ) {
|
|
1298
1294
|
var s = this.parseStatement(null);
|
|
1299
1295
|
e.body.push(s);
|
|
1300
1296
|
}
|
|
1301
1297
|
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
1302
1298
|
};
|
|
1303
1299
|
w.parseClassId = function(e, t) {
|
|
1304
|
-
this.type === h.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id,
|
|
1300
|
+
this.type === h.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, Ie, !1)) : (t === !0 && this.unexpected(), e.id = null);
|
|
1305
1301
|
};
|
|
1306
1302
|
w.parseClassSuper = function(e) {
|
|
1307
1303
|
e.superClass = this.eat(h._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
@@ -1315,14 +1311,14 @@ w.exitClassBody = function() {
|
|
|
1315
1311
|
if (this.options.checkPrivateFields)
|
|
1316
1312
|
for (var a = this.privateNameStack.length, n = a === 0 ? null : this.privateNameStack[a - 1], p = 0; p < s.length; ++p) {
|
|
1317
1313
|
var f = s[p];
|
|
1318
|
-
|
|
1314
|
+
Ge(t, f.name) || (n ? n.used.push(f) : this.raiseRecoverable(f.start, "Private field '#" + f.name + "' must be declared in an enclosing class"));
|
|
1319
1315
|
}
|
|
1320
1316
|
};
|
|
1321
|
-
function
|
|
1317
|
+
function cr(e, t) {
|
|
1322
1318
|
var s = t.key.name, a = e[s], n = "true";
|
|
1323
1319
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (n = (t.static ? "s" : "i") + t.kind), a === "iget" && n === "iset" || a === "iset" && n === "iget" || a === "sget" && n === "sset" || a === "sset" && n === "sget" ? (e[s] = "true", !1) : a ? !0 : (e[s] = n, !1);
|
|
1324
1320
|
}
|
|
1325
|
-
function
|
|
1321
|
+
function dt(e, t) {
|
|
1326
1322
|
var s = e.computed, a = e.key;
|
|
1327
1323
|
return !s && (a.type === "Identifier" && a.name === t || a.type === "Literal" && a.value === t);
|
|
1328
1324
|
}
|
|
@@ -1357,7 +1353,7 @@ w.parseExportDefaultDeclaration = function() {
|
|
|
1357
1353
|
var e;
|
|
1358
1354
|
if (this.type === h._function || (e = this.isAsyncFunction())) {
|
|
1359
1355
|
var t = this.startNode();
|
|
1360
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
1356
|
+
return this.next(), e && this.next(), this.parseFunction(t, Ze | Di, !1, e);
|
|
1361
1357
|
} else if (this.type === h._class) {
|
|
1362
1358
|
var s = this.startNode();
|
|
1363
1359
|
return this.parseClass(s, "nullableID");
|
|
@@ -1367,7 +1363,7 @@ w.parseExportDefaultDeclaration = function() {
|
|
|
1367
1363
|
}
|
|
1368
1364
|
};
|
|
1369
1365
|
w.checkExport = function(e, t, s) {
|
|
1370
|
-
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value),
|
|
1366
|
+
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), Ge(e, t) && this.raiseRecoverable(s, "Duplicate export '" + t + "'"), e[t] = !0);
|
|
1371
1367
|
};
|
|
1372
1368
|
w.checkPatternExport = function(e, t) {
|
|
1373
1369
|
var s = t.type;
|
|
@@ -1415,19 +1411,19 @@ w.parseExportSpecifiers = function(e) {
|
|
|
1415
1411
|
return t;
|
|
1416
1412
|
};
|
|
1417
1413
|
w.parseImport = function(e) {
|
|
1418
|
-
return this.next(), this.type === h.string ? (e.specifiers =
|
|
1414
|
+
return this.next(), this.type === h.string ? (e.specifiers = hr, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === h.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
1419
1415
|
};
|
|
1420
1416
|
w.parseImportSpecifier = function() {
|
|
1421
1417
|
var e = this.startNode();
|
|
1422
|
-
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local,
|
|
1418
|
+
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, Ie), this.finishNode(e, "ImportSpecifier");
|
|
1423
1419
|
};
|
|
1424
1420
|
w.parseImportDefaultSpecifier = function() {
|
|
1425
1421
|
var e = this.startNode();
|
|
1426
|
-
return e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
1422
|
+
return e.local = this.parseIdent(), this.checkLValSimple(e.local, Ie), this.finishNode(e, "ImportDefaultSpecifier");
|
|
1427
1423
|
};
|
|
1428
1424
|
w.parseImportNamespaceSpecifier = function() {
|
|
1429
1425
|
var e = this.startNode();
|
|
1430
|
-
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
1426
|
+
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, Ie), this.finishNode(e, "ImportNamespaceSpecifier");
|
|
1431
1427
|
};
|
|
1432
1428
|
w.parseImportSpecifiers = function() {
|
|
1433
1429
|
var e = [], t = !0;
|
|
@@ -1455,7 +1451,7 @@ w.parseWithClause = function() {
|
|
|
1455
1451
|
else if (this.expect(h.comma), this.afterTrailingComma(h.braceR))
|
|
1456
1452
|
break;
|
|
1457
1453
|
var a = this.parseImportAttribute(), n = a.key.type === "Identifier" ? a.key.name : a.key.value;
|
|
1458
|
-
|
|
1454
|
+
Ge(t, n) && this.raiseRecoverable(a.key.start, "Duplicate attribute key '" + n + "'"), t[n] = !0, e.push(a);
|
|
1459
1455
|
}
|
|
1460
1456
|
return e;
|
|
1461
1457
|
};
|
|
@@ -1466,7 +1462,7 @@ w.parseImportAttribute = function() {
|
|
|
1466
1462
|
w.parseModuleExportName = function() {
|
|
1467
1463
|
if (this.options.ecmaVersion >= 13 && this.type === h.string) {
|
|
1468
1464
|
var e = this.parseLiteral(this.value);
|
|
1469
|
-
return
|
|
1465
|
+
return rr.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
1470
1466
|
}
|
|
1471
1467
|
return this.parseIdent(!0);
|
|
1472
1468
|
};
|
|
@@ -1478,8 +1474,8 @@ w.isDirectiveCandidate = function(e) {
|
|
|
1478
1474
|
return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && // Reject parenthesized strings.
|
|
1479
1475
|
(this.input[e.start] === '"' || this.input[e.start] === "'");
|
|
1480
1476
|
};
|
|
1481
|
-
var
|
|
1482
|
-
|
|
1477
|
+
var fe = H.prototype;
|
|
1478
|
+
fe.toAssignable = function(e, t, s) {
|
|
1483
1479
|
if (this.options.ecmaVersion >= 6 && e)
|
|
1484
1480
|
switch (e.type) {
|
|
1485
1481
|
case "Identifier":
|
|
@@ -1524,7 +1520,7 @@ de.toAssignable = function(e, t, s) {
|
|
|
1524
1520
|
else s && this.checkPatternErrors(s, !0);
|
|
1525
1521
|
return e;
|
|
1526
1522
|
};
|
|
1527
|
-
|
|
1523
|
+
fe.toAssignableList = function(e, t) {
|
|
1528
1524
|
for (var s = e.length, a = 0; a < s; a++) {
|
|
1529
1525
|
var n = e[a];
|
|
1530
1526
|
n && this.toAssignable(n, t);
|
|
@@ -1535,15 +1531,15 @@ de.toAssignableList = function(e, t) {
|
|
|
1535
1531
|
}
|
|
1536
1532
|
return e;
|
|
1537
1533
|
};
|
|
1538
|
-
|
|
1534
|
+
fe.parseSpread = function(e) {
|
|
1539
1535
|
var t = this.startNode();
|
|
1540
1536
|
return this.next(), t.argument = this.parseMaybeAssign(!1, e), this.finishNode(t, "SpreadElement");
|
|
1541
1537
|
};
|
|
1542
|
-
|
|
1538
|
+
fe.parseRestBinding = function() {
|
|
1543
1539
|
var e = this.startNode();
|
|
1544
1540
|
return this.next(), this.options.ecmaVersion === 6 && this.type !== h.name && this.unexpected(), e.argument = this.parseBindingAtom(), this.finishNode(e, "RestElement");
|
|
1545
1541
|
};
|
|
1546
|
-
|
|
1542
|
+
fe.parseBindingAtom = function() {
|
|
1547
1543
|
if (this.options.ecmaVersion >= 6)
|
|
1548
1544
|
switch (this.type) {
|
|
1549
1545
|
case h.bracketL:
|
|
@@ -1554,7 +1550,7 @@ de.parseBindingAtom = function() {
|
|
|
1554
1550
|
}
|
|
1555
1551
|
return this.parseIdent();
|
|
1556
1552
|
};
|
|
1557
|
-
|
|
1553
|
+
fe.parseBindingList = function(e, t, s, a) {
|
|
1558
1554
|
for (var n = [], p = !0; !this.eat(e); )
|
|
1559
1555
|
if (p ? p = !1 : this.expect(h.comma), t && this.type === h.comma)
|
|
1560
1556
|
n.push(null);
|
|
@@ -1570,25 +1566,25 @@ de.parseBindingList = function(e, t, s, a) {
|
|
|
1570
1566
|
}
|
|
1571
1567
|
return n;
|
|
1572
1568
|
};
|
|
1573
|
-
|
|
1569
|
+
fe.parseAssignableListItem = function(e) {
|
|
1574
1570
|
var t = this.parseMaybeDefault(this.start, this.startLoc);
|
|
1575
1571
|
return this.parseBindingListItem(t), t;
|
|
1576
1572
|
};
|
|
1577
|
-
|
|
1573
|
+
fe.parseBindingListItem = function(e) {
|
|
1578
1574
|
return e;
|
|
1579
1575
|
};
|
|
1580
|
-
|
|
1576
|
+
fe.parseMaybeDefault = function(e, t, s) {
|
|
1581
1577
|
if (s = s || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(h.eq))
|
|
1582
1578
|
return s;
|
|
1583
1579
|
var a = this.startNodeAt(e, t);
|
|
1584
1580
|
return a.left = s, a.right = this.parseMaybeAssign(), this.finishNode(a, "AssignmentPattern");
|
|
1585
1581
|
};
|
|
1586
|
-
|
|
1587
|
-
t === void 0 && (t =
|
|
1588
|
-
var a = t !==
|
|
1582
|
+
fe.checkLValSimple = function(e, t, s) {
|
|
1583
|
+
t === void 0 && (t = ft);
|
|
1584
|
+
var a = t !== ft;
|
|
1589
1585
|
switch (e.type) {
|
|
1590
1586
|
case "Identifier":
|
|
1591
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (a ? "Binding " : "Assigning to ") + e.name + " in strict mode"), a && (t ===
|
|
1587
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (a ? "Binding " : "Assigning to ") + e.name + " in strict mode"), a && (t === Ie && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), s && (Ge(s, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), s[e.name] = !0), t !== Mi && this.declareName(e.name, t, e.start));
|
|
1592
1588
|
break;
|
|
1593
1589
|
case "ChainExpression":
|
|
1594
1590
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1602,8 +1598,8 @@ de.checkLValSimple = function(e, t, s) {
|
|
|
1602
1598
|
this.raise(e.start, (a ? "Binding" : "Assigning to") + " rvalue");
|
|
1603
1599
|
}
|
|
1604
1600
|
};
|
|
1605
|
-
|
|
1606
|
-
switch (t === void 0 && (t =
|
|
1601
|
+
fe.checkLValPattern = function(e, t, s) {
|
|
1602
|
+
switch (t === void 0 && (t = ft), e.type) {
|
|
1607
1603
|
case "ObjectPattern":
|
|
1608
1604
|
for (var a = 0, n = e.properties; a < n.length; a += 1) {
|
|
1609
1605
|
var p = n[a];
|
|
@@ -1620,8 +1616,8 @@ de.checkLValPattern = function(e, t, s) {
|
|
|
1620
1616
|
this.checkLValSimple(e, t, s);
|
|
1621
1617
|
}
|
|
1622
1618
|
};
|
|
1623
|
-
|
|
1624
|
-
switch (t === void 0 && (t =
|
|
1619
|
+
fe.checkLValInnerPattern = function(e, t, s) {
|
|
1620
|
+
switch (t === void 0 && (t = ft), e.type) {
|
|
1625
1621
|
case "Property":
|
|
1626
1622
|
this.checkLValInnerPattern(e.value, t, s);
|
|
1627
1623
|
break;
|
|
@@ -1635,33 +1631,33 @@ de.checkLValInnerPattern = function(e, t, s) {
|
|
|
1635
1631
|
this.checkLValPattern(e, t, s);
|
|
1636
1632
|
}
|
|
1637
1633
|
};
|
|
1638
|
-
var
|
|
1634
|
+
var Q = function(t, s, a, n, p) {
|
|
1639
1635
|
this.token = t, this.isExpr = !!s, this.preserveSpace = !!a, this.override = n, this.generator = !!p;
|
|
1640
1636
|
}, F = {
|
|
1641
|
-
b_stat: new
|
|
1642
|
-
b_expr: new
|
|
1643
|
-
b_tmpl: new
|
|
1644
|
-
p_stat: new
|
|
1645
|
-
p_expr: new
|
|
1646
|
-
q_tmpl: new
|
|
1637
|
+
b_stat: new Q("{", !1),
|
|
1638
|
+
b_expr: new Q("{", !0),
|
|
1639
|
+
b_tmpl: new Q("${", !1),
|
|
1640
|
+
p_stat: new Q("(", !1),
|
|
1641
|
+
p_expr: new Q("(", !0),
|
|
1642
|
+
q_tmpl: new Q("`", !0, !0, function(e) {
|
|
1647
1643
|
return e.tryReadTemplateToken();
|
|
1648
1644
|
}),
|
|
1649
|
-
f_stat: new
|
|
1650
|
-
f_expr: new
|
|
1651
|
-
f_expr_gen: new
|
|
1652
|
-
f_gen: new
|
|
1653
|
-
},
|
|
1654
|
-
|
|
1645
|
+
f_stat: new Q("function", !1),
|
|
1646
|
+
f_expr: new Q("function", !0),
|
|
1647
|
+
f_expr_gen: new Q("function", !0, !1, null, !0),
|
|
1648
|
+
f_gen: new Q("function", !1, !1, null, !0)
|
|
1649
|
+
}, We = H.prototype;
|
|
1650
|
+
We.initialContext = function() {
|
|
1655
1651
|
return [F.b_stat];
|
|
1656
1652
|
};
|
|
1657
|
-
|
|
1653
|
+
We.curContext = function() {
|
|
1658
1654
|
return this.context[this.context.length - 1];
|
|
1659
1655
|
};
|
|
1660
|
-
|
|
1656
|
+
We.braceIsBlock = function(e) {
|
|
1661
1657
|
var t = this.curContext();
|
|
1662
|
-
return t === F.f_expr || t === F.f_stat ? !0 : e === h.colon && (t === F.b_stat || t === F.b_expr) ? !t.isExpr : e === h._return || e === h.name && this.exprAllowed ?
|
|
1658
|
+
return t === F.f_expr || t === F.f_stat ? !0 : e === h.colon && (t === F.b_stat || t === F.b_expr) ? !t.isExpr : e === h._return || e === h.name && this.exprAllowed ? Y.test(this.input.slice(this.lastTokEnd, this.start)) : e === h._else || e === h.semi || e === h.eof || e === h.parenR || e === h.arrow ? !0 : e === h.braceL ? t === F.b_stat : e === h._var || e === h._const || e === h.name ? !1 : !this.exprAllowed;
|
|
1663
1659
|
};
|
|
1664
|
-
|
|
1660
|
+
We.inGeneratorContext = function() {
|
|
1665
1661
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
1666
1662
|
var t = this.context[e];
|
|
1667
1663
|
if (t.token === "function")
|
|
@@ -1669,11 +1665,11 @@ ze.inGeneratorContext = function() {
|
|
|
1669
1665
|
}
|
|
1670
1666
|
return !1;
|
|
1671
1667
|
};
|
|
1672
|
-
|
|
1668
|
+
We.updateContext = function(e) {
|
|
1673
1669
|
var t, s = this.type;
|
|
1674
1670
|
s.keyword && e === h.dot ? this.exprAllowed = !1 : (t = s.updateContext) ? t.call(this, e) : this.exprAllowed = s.beforeExpr;
|
|
1675
1671
|
};
|
|
1676
|
-
|
|
1672
|
+
We.overrideContext = function(e) {
|
|
1677
1673
|
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
1678
1674
|
};
|
|
1679
1675
|
h.parenR.updateContext = h.braceR.updateContext = function() {
|
|
@@ -1697,7 +1693,7 @@ h.parenL.updateContext = function(e) {
|
|
|
1697
1693
|
h.incDec.updateContext = function() {
|
|
1698
1694
|
};
|
|
1699
1695
|
h._function.updateContext = h._class.updateContext = function(e) {
|
|
1700
|
-
e.beforeExpr && e !== h._else && !(e === h.semi && this.curContext() !== F.p_stat) && !(e === h._return &&
|
|
1696
|
+
e.beforeExpr && e !== h._else && !(e === h.semi && this.curContext() !== F.p_stat) && !(e === h._return && Y.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === h.colon || e === h.braceL) && this.curContext() === F.b_stat) ? this.context.push(F.f_expr) : this.context.push(F.f_stat), this.exprAllowed = !1;
|
|
1701
1697
|
};
|
|
1702
1698
|
h.colon.updateContext = function() {
|
|
1703
1699
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -1766,13 +1762,13 @@ N.parseMaybeAssign = function(e, t, s) {
|
|
|
1766
1762
|
this.exprAllowed = !1;
|
|
1767
1763
|
}
|
|
1768
1764
|
var a = !1, n = -1, p = -1, f = -1;
|
|
1769
|
-
t ? (n = t.parenthesizedAssign, p = t.trailingComma, f = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
1765
|
+
t ? (n = t.parenthesizedAssign, p = t.trailingComma, f = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new Pt(), a = !0);
|
|
1770
1766
|
var v = this.start, x = this.startLoc;
|
|
1771
1767
|
(this.type === h.parenL || this.type === h.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
1772
1768
|
var o = this.parseMaybeConditional(e, t);
|
|
1773
1769
|
if (s && (o = s.call(this, o, v, x)), this.type.isAssign) {
|
|
1774
|
-
var
|
|
1775
|
-
return
|
|
1770
|
+
var S = this.startNodeAt(v, x);
|
|
1771
|
+
return S.operator = this.value, this.type === h.eq && (o = this.toAssignable(o, !1, t)), a || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= o.start && (t.shorthandAssign = -1), this.type === h.eq ? this.checkLValPattern(o) : this.checkLValSimple(o), S.left = o, this.next(), S.right = this.parseMaybeAssign(e), f > -1 && (t.doubleProto = f), this.finishNode(S, "AssignmentExpression");
|
|
1776
1772
|
} else
|
|
1777
1773
|
a && this.checkExpressionErrors(t, !0);
|
|
1778
1774
|
return n > -1 && (t.parenthesizedAssign = n), p > -1 && (t.trailingComma = p), o;
|
|
@@ -1798,7 +1794,7 @@ N.parseExprOp = function(e, t, s, a, n) {
|
|
|
1798
1794
|
v && (p = h.logicalAND.binop);
|
|
1799
1795
|
var x = this.value;
|
|
1800
1796
|
this.next();
|
|
1801
|
-
var o = this.start,
|
|
1797
|
+
var o = this.start, S = this.startLoc, I = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, n), o, S, p, n), B = this.buildBinary(t, s, e, I, x, f || v);
|
|
1802
1798
|
return (f && this.type === h.coalesce || v && (this.type === h.logicalOR || this.type === h.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(B, t, s, a, n);
|
|
1803
1799
|
}
|
|
1804
1800
|
return e;
|
|
@@ -1814,7 +1810,7 @@ N.parseMaybeUnary = function(e, t, s, a) {
|
|
|
1814
1810
|
f = this.parseAwait(a), t = !0;
|
|
1815
1811
|
else if (this.type.prefix) {
|
|
1816
1812
|
var v = this.startNode(), x = this.type === h.incDec;
|
|
1817
|
-
v.operator = this.value, v.prefix = !0, this.next(), v.argument = this.parseMaybeUnary(null, !0, x, a), this.checkExpressionErrors(e, !0), x ? this.checkLValSimple(v.argument) : this.strict && v.operator === "delete" &&
|
|
1813
|
+
v.operator = this.value, v.prefix = !0, this.next(), v.argument = this.parseMaybeUnary(null, !0, x, a), this.checkExpressionErrors(e, !0), x ? this.checkLValSimple(v.argument) : this.strict && v.operator === "delete" && Vi(v.argument) ? this.raiseRecoverable(v.start, "Deleting local variable in strict mode") : v.operator === "delete" && Vt(v.argument) ? this.raiseRecoverable(v.start, "Private fields can not be deleted") : t = !0, f = this.finishNode(v, x ? "UpdateExpression" : "UnaryExpression");
|
|
1818
1814
|
} else if (!t && this.type === h.privateId)
|
|
1819
1815
|
(a || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), f = this.parsePrivateIdent(), this.type !== h._in && this.unexpected();
|
|
1820
1816
|
else {
|
|
@@ -1833,11 +1829,11 @@ N.parseMaybeUnary = function(e, t, s, a) {
|
|
|
1833
1829
|
else
|
|
1834
1830
|
return f;
|
|
1835
1831
|
};
|
|
1836
|
-
function
|
|
1837
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
1832
|
+
function Vi(e) {
|
|
1833
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && Vi(e.expression);
|
|
1838
1834
|
}
|
|
1839
|
-
function
|
|
1840
|
-
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" &&
|
|
1835
|
+
function Vt(e) {
|
|
1836
|
+
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && Vt(e.expression) || e.type === "ParenthesizedExpression" && Vt(e.expression);
|
|
1841
1837
|
}
|
|
1842
1838
|
N.parseExprSubscripts = function(e, t) {
|
|
1843
1839
|
var s = this.start, a = this.startLoc, n = this.parseExprAtom(e, t);
|
|
@@ -1870,21 +1866,21 @@ N.parseSubscript = function(e, t, s, a, n, p, f) {
|
|
|
1870
1866
|
a && x && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
1871
1867
|
var o = this.eat(h.bracketL);
|
|
1872
1868
|
if (o || x && this.type !== h.parenL && this.type !== h.backQuote || this.eat(h.dot)) {
|
|
1873
|
-
var
|
|
1874
|
-
|
|
1869
|
+
var S = this.startNodeAt(t, s);
|
|
1870
|
+
S.object = e, o ? (S.property = this.parseExpression(), this.expect(h.bracketR)) : this.type === h.privateId && e.type !== "Super" ? S.property = this.parsePrivateIdent() : S.property = this.parseIdent(this.options.allowReserved !== "never"), S.computed = !!o, v && (S.optional = x), e = this.finishNode(S, "MemberExpression");
|
|
1875
1871
|
} else if (!a && this.eat(h.parenL)) {
|
|
1876
|
-
var I = new
|
|
1872
|
+
var I = new Pt(), B = this.yieldPos, oe = this.awaitPos, de = this.awaitIdentPos;
|
|
1877
1873
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1878
|
-
var
|
|
1874
|
+
var Be = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1, I);
|
|
1879
1875
|
if (n && !x && this.shouldParseAsyncArrow())
|
|
1880
|
-
return this.checkPatternErrors(I, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = B, this.awaitPos =
|
|
1881
|
-
this.checkExpressionErrors(I, !0), this.yieldPos = B || this.yieldPos, this.awaitPos =
|
|
1876
|
+
return this.checkPatternErrors(I, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = B, this.awaitPos = oe, this.awaitIdentPos = de, this.parseSubscriptAsyncArrow(t, s, Be, f);
|
|
1877
|
+
this.checkExpressionErrors(I, !0), this.yieldPos = B || this.yieldPos, this.awaitPos = oe || this.awaitPos, this.awaitIdentPos = de || this.awaitIdentPos;
|
|
1882
1878
|
var _ = this.startNodeAt(t, s);
|
|
1883
|
-
_.callee = e, _.arguments =
|
|
1879
|
+
_.callee = e, _.arguments = Be, v && (_.optional = x), e = this.finishNode(_, "CallExpression");
|
|
1884
1880
|
} else if (this.type === h.backQuote) {
|
|
1885
1881
|
(x || p) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1886
|
-
var
|
|
1887
|
-
|
|
1882
|
+
var ee = this.startNodeAt(t, s);
|
|
1883
|
+
ee.tag = e, ee.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(ee, "TaggedTemplateExpression");
|
|
1888
1884
|
}
|
|
1889
1885
|
return e;
|
|
1890
1886
|
};
|
|
@@ -1918,8 +1914,8 @@ N.parseExprAtom = function(e, t, s) {
|
|
|
1918
1914
|
case h._false:
|
|
1919
1915
|
return a = this.startNode(), a.value = this.type === h._null ? null : this.type === h._true, a.raw = this.type.keyword, this.next(), this.finishNode(a, "Literal");
|
|
1920
1916
|
case h.parenL:
|
|
1921
|
-
var
|
|
1922
|
-
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(I) && (e.parenthesizedAssign =
|
|
1917
|
+
var S = this.start, I = this.parseParenAndDistinguishExpression(n, t);
|
|
1918
|
+
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(I) && (e.parenthesizedAssign = S), e.parenthesizedBind < 0 && (e.parenthesizedBind = S)), I;
|
|
1923
1919
|
case h.bracketL:
|
|
1924
1920
|
return a = this.startNode(), this.next(), a.elements = this.parseExprList(h.bracketR, !0, !0, e), this.finishNode(a, "ArrayExpression");
|
|
1925
1921
|
case h.braceL:
|
|
@@ -1981,28 +1977,28 @@ N.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
1981
1977
|
var s = this.start, a = this.startLoc, n, p = this.options.ecmaVersion >= 8;
|
|
1982
1978
|
if (this.options.ecmaVersion >= 6) {
|
|
1983
1979
|
this.next();
|
|
1984
|
-
var f = this.start, v = this.startLoc, x = [], o = !0,
|
|
1980
|
+
var f = this.start, v = this.startLoc, x = [], o = !0, S = !1, I = new Pt(), B = this.yieldPos, oe = this.awaitPos, de;
|
|
1985
1981
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== h.parenR; )
|
|
1986
1982
|
if (o ? o = !1 : this.expect(h.comma), p && this.afterTrailingComma(h.parenR, !0)) {
|
|
1987
|
-
|
|
1983
|
+
S = !0;
|
|
1988
1984
|
break;
|
|
1989
1985
|
} else if (this.type === h.ellipsis) {
|
|
1990
|
-
|
|
1986
|
+
de = this.start, x.push(this.parseParenItem(this.parseRestBinding())), this.type === h.comma && this.raiseRecoverable(
|
|
1991
1987
|
this.start,
|
|
1992
1988
|
"Comma is not permitted after the rest element"
|
|
1993
1989
|
);
|
|
1994
1990
|
break;
|
|
1995
1991
|
} else
|
|
1996
1992
|
x.push(this.parseMaybeAssign(!1, I, this.parseParenItem));
|
|
1997
|
-
var
|
|
1993
|
+
var Be = this.lastTokEnd, _ = this.lastTokEndLoc;
|
|
1998
1994
|
if (this.expect(h.parenR), e && this.shouldParseArrow(x) && this.eat(h.arrow))
|
|
1999
|
-
return this.checkPatternErrors(I, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = B, this.awaitPos =
|
|
2000
|
-
(!x.length ||
|
|
1995
|
+
return this.checkPatternErrors(I, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = B, this.awaitPos = oe, this.parseParenArrowList(s, a, x, t);
|
|
1996
|
+
(!x.length || S) && this.unexpected(this.lastTokStart), de && this.unexpected(de), this.checkExpressionErrors(I, !0), this.yieldPos = B || this.yieldPos, this.awaitPos = oe || this.awaitPos, x.length > 1 ? (n = this.startNodeAt(f, v), n.expressions = x, this.finishNodeAt(n, "SequenceExpression", Be, _)) : n = x[0];
|
|
2001
1997
|
} else
|
|
2002
1998
|
n = this.parseParenExpression();
|
|
2003
1999
|
if (this.options.preserveParens) {
|
|
2004
|
-
var
|
|
2005
|
-
return
|
|
2000
|
+
var ee = this.startNodeAt(s, a);
|
|
2001
|
+
return ee.expression = n, this.finishNode(ee, "ParenthesizedExpression");
|
|
2006
2002
|
} else
|
|
2007
2003
|
return n;
|
|
2008
2004
|
};
|
|
@@ -2012,7 +2008,7 @@ N.parseParenItem = function(e) {
|
|
|
2012
2008
|
N.parseParenArrowList = function(e, t, s, a) {
|
|
2013
2009
|
return this.parseArrowExpression(this.startNodeAt(e, t), s, !1, a);
|
|
2014
2010
|
};
|
|
2015
|
-
var
|
|
2011
|
+
var pr = [];
|
|
2016
2012
|
N.parseNew = function() {
|
|
2017
2013
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
2018
2014
|
var e = this.startNode();
|
|
@@ -2023,7 +2019,7 @@ N.parseNew = function() {
|
|
|
2023
2019
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), s && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
2024
2020
|
}
|
|
2025
2021
|
var a = this.start, n = this.startLoc;
|
|
2026
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), a, n, !0, !1), this.eat(h.parenL) ? e.arguments = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
2022
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), a, n, !0, !1), this.eat(h.parenL) ? e.arguments = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = pr, this.finishNode(e, "NewExpression");
|
|
2027
2023
|
};
|
|
2028
2024
|
N.parseTemplateElement = function(e) {
|
|
2029
2025
|
var t = e.isTagged, s = this.startNode();
|
|
@@ -2049,7 +2045,7 @@ N.parseTemplate = function(e) {
|
|
|
2049
2045
|
return this.next(), this.finishNode(s, "TemplateLiteral");
|
|
2050
2046
|
};
|
|
2051
2047
|
N.isAsyncProp = function(e) {
|
|
2052
|
-
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !
|
|
2048
|
+
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !Y.test(this.input.slice(this.lastTokEnd, this.start));
|
|
2053
2049
|
};
|
|
2054
2050
|
N.parseObj = function(e, t) {
|
|
2055
2051
|
var s = this.startNode(), a = !0, n = {};
|
|
@@ -2097,11 +2093,11 @@ N.initFunction = function(e) {
|
|
|
2097
2093
|
};
|
|
2098
2094
|
N.parseMethod = function(e, t, s) {
|
|
2099
2095
|
var a = this.startNode(), n = this.yieldPos, p = this.awaitPos, f = this.awaitIdentPos;
|
|
2100
|
-
return this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
2096
|
+
return this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(zt(t, a.generator) | gt | (s ? Li : 0)), this.expect(h.parenL), a.params = this.parseBindingList(h.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(a, !1, !0, !1), this.yieldPos = n, this.awaitPos = p, this.awaitIdentPos = f, this.finishNode(a, "FunctionExpression");
|
|
2101
2097
|
};
|
|
2102
2098
|
N.parseArrowExpression = function(e, t, s, a) {
|
|
2103
2099
|
var n = this.yieldPos, p = this.awaitPos, f = this.awaitIdentPos;
|
|
2104
|
-
return this.enterScope(
|
|
2100
|
+
return this.enterScope(zt(s, !1) | Wt), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!s), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, a), this.yieldPos = n, this.awaitPos = p, this.awaitIdentPos = f, this.finishNode(e, "ArrowFunctionExpression");
|
|
2105
2101
|
};
|
|
2106
2102
|
N.parseFunctionBody = function(e, t, s, a) {
|
|
2107
2103
|
var n = t && this.type !== h.braceL, p = this.strict, f = !1;
|
|
@@ -2111,7 +2107,7 @@ N.parseFunctionBody = function(e, t, s, a) {
|
|
|
2111
2107
|
var v = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
2112
2108
|
(!p || v) && (f = this.strictDirective(this.end), f && v && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
2113
2109
|
var x = this.labels;
|
|
2114
|
-
this.labels = [], f && (this.strict = !0), this.checkParams(e, !p && !f && !t && !s && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
2110
|
+
this.labels = [], f && (this.strict = !0), this.checkParams(e, !p && !f && !t && !s && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, Mi), e.body = this.parseBlock(!1, void 0, f && !p), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = x;
|
|
2115
2111
|
}
|
|
2116
2112
|
this.exitScope();
|
|
2117
2113
|
};
|
|
@@ -2126,7 +2122,7 @@ N.isSimpleParamList = function(e) {
|
|
|
2126
2122
|
N.checkParams = function(e, t) {
|
|
2127
2123
|
for (var s = /* @__PURE__ */ Object.create(null), a = 0, n = e.params; a < n.length; a += 1) {
|
|
2128
2124
|
var p = n[a];
|
|
2129
|
-
this.checkLValInnerPattern(p,
|
|
2125
|
+
this.checkLValInnerPattern(p, Xt, t ? null : s);
|
|
2130
2126
|
}
|
|
2131
2127
|
};
|
|
2132
2128
|
N.parseExprList = function(e, t, s, a) {
|
|
@@ -2142,7 +2138,7 @@ N.parseExprList = function(e, t, s, a) {
|
|
|
2142
2138
|
};
|
|
2143
2139
|
N.checkUnreserved = function(e) {
|
|
2144
2140
|
var t = e.start, s = e.end, a = e.name;
|
|
2145
|
-
if (this.inGenerator && a === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && a === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags &
|
|
2141
|
+
if (this.inGenerator && a === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && a === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & bt) && a === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (a === "arguments" || a === "await") && this.raise(t, "Cannot use " + a + " in class static initialization block"), this.keywords.test(a) && this.raise(t, "Unexpected keyword '" + a + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, s).indexOf("\\") !== -1)) {
|
|
2146
2142
|
var n = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
|
2147
2143
|
n.test(a) && (!this.inAsync && a === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + a + "' is reserved"));
|
|
2148
2144
|
}
|
|
@@ -2169,70 +2165,70 @@ N.parseAwait = function(e) {
|
|
|
2169
2165
|
var t = this.startNode();
|
|
2170
2166
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
2171
2167
|
};
|
|
2172
|
-
var
|
|
2173
|
-
|
|
2174
|
-
var s =
|
|
2168
|
+
var mt = H.prototype;
|
|
2169
|
+
mt.raise = function(e, t) {
|
|
2170
|
+
var s = Gt(this.input, e);
|
|
2175
2171
|
t += " (" + s.line + ":" + s.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
2176
2172
|
var a = new SyntaxError(t);
|
|
2177
2173
|
throw a.pos = e, a.loc = s, a.raisedAt = this.pos, a;
|
|
2178
2174
|
};
|
|
2179
|
-
|
|
2180
|
-
|
|
2175
|
+
mt.raiseRecoverable = mt.raise;
|
|
2176
|
+
mt.curPosition = function() {
|
|
2181
2177
|
if (this.options.locations)
|
|
2182
|
-
return new
|
|
2178
|
+
return new qe(this.curLine, this.pos - this.lineStart);
|
|
2183
2179
|
};
|
|
2184
|
-
var
|
|
2180
|
+
var Me = H.prototype, lr = function(t) {
|
|
2185
2181
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
2186
2182
|
};
|
|
2187
|
-
|
|
2188
|
-
this.scopeStack.push(new
|
|
2183
|
+
Me.enterScope = function(e) {
|
|
2184
|
+
this.scopeStack.push(new lr(e));
|
|
2189
2185
|
};
|
|
2190
|
-
|
|
2186
|
+
Me.exitScope = function() {
|
|
2191
2187
|
this.scopeStack.pop();
|
|
2192
2188
|
};
|
|
2193
|
-
|
|
2194
|
-
return e.flags &
|
|
2189
|
+
Me.treatFunctionsAsVarInScope = function(e) {
|
|
2190
|
+
return e.flags & Ke || !this.inModule && e.flags & it;
|
|
2195
2191
|
};
|
|
2196
|
-
|
|
2192
|
+
Me.declareName = function(e, t, s) {
|
|
2197
2193
|
var a = !1;
|
|
2198
|
-
if (t ===
|
|
2194
|
+
if (t === Ie) {
|
|
2199
2195
|
var n = this.currentScope();
|
|
2200
2196
|
a = n.lexical.indexOf(e) > -1 || n.functions.indexOf(e) > -1 || n.var.indexOf(e) > -1, n.lexical.push(e), this.inModule && n.flags & it && delete this.undefinedExports[e];
|
|
2201
|
-
} else if (t ===
|
|
2197
|
+
} else if (t === Ri) {
|
|
2202
2198
|
var p = this.currentScope();
|
|
2203
2199
|
p.lexical.push(e);
|
|
2204
|
-
} else if (t ===
|
|
2200
|
+
} else if (t === Oi) {
|
|
2205
2201
|
var f = this.currentScope();
|
|
2206
2202
|
this.treatFunctionsAsVar ? a = f.lexical.indexOf(e) > -1 : a = f.lexical.indexOf(e) > -1 || f.var.indexOf(e) > -1, f.functions.push(e);
|
|
2207
2203
|
} else
|
|
2208
2204
|
for (var v = this.scopeStack.length - 1; v >= 0; --v) {
|
|
2209
2205
|
var x = this.scopeStack[v];
|
|
2210
|
-
if (x.lexical.indexOf(e) > -1 && !(x.flags &
|
|
2206
|
+
if (x.lexical.indexOf(e) > -1 && !(x.flags & Ni && x.lexical[0] === e) || !this.treatFunctionsAsVarInScope(x) && x.functions.indexOf(e) > -1) {
|
|
2211
2207
|
a = !0;
|
|
2212
2208
|
break;
|
|
2213
2209
|
}
|
|
2214
|
-
if (x.var.push(e), this.inModule && x.flags & it && delete this.undefinedExports[e], x.flags &
|
|
2210
|
+
if (x.var.push(e), this.inModule && x.flags & it && delete this.undefinedExports[e], x.flags & bt)
|
|
2215
2211
|
break;
|
|
2216
2212
|
}
|
|
2217
2213
|
a && this.raiseRecoverable(s, "Identifier '" + e + "' has already been declared");
|
|
2218
2214
|
};
|
|
2219
|
-
|
|
2215
|
+
Me.checkLocalExport = function(e) {
|
|
2220
2216
|
this.scopeStack[0].lexical.indexOf(e.name) === -1 && this.scopeStack[0].var.indexOf(e.name) === -1 && (this.undefinedExports[e.name] = e);
|
|
2221
2217
|
};
|
|
2222
|
-
|
|
2218
|
+
Me.currentScope = function() {
|
|
2223
2219
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
2224
2220
|
};
|
|
2225
|
-
|
|
2221
|
+
Me.currentVarScope = function() {
|
|
2226
2222
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
2227
2223
|
var t = this.scopeStack[e];
|
|
2228
|
-
if (t.flags & (
|
|
2224
|
+
if (t.flags & (bt | at | Fe))
|
|
2229
2225
|
return t;
|
|
2230
2226
|
}
|
|
2231
2227
|
};
|
|
2232
|
-
|
|
2228
|
+
Me.currentThisScope = function() {
|
|
2233
2229
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
2234
2230
|
var t = this.scopeStack[e];
|
|
2235
|
-
if (t.flags & (
|
|
2231
|
+
if (t.flags & (bt | at | Fe) && !(t.flags & Wt))
|
|
2236
2232
|
return t;
|
|
2237
2233
|
}
|
|
2238
2234
|
};
|
|
@@ -2245,14 +2241,14 @@ ot.startNode = function() {
|
|
|
2245
2241
|
ot.startNodeAt = function(e, t) {
|
|
2246
2242
|
return new nt(this, e, t);
|
|
2247
2243
|
};
|
|
2248
|
-
function
|
|
2244
|
+
function ji(e, t, s, a) {
|
|
2249
2245
|
return e.type = t, e.end = s, this.options.locations && (e.loc.end = a), this.options.ranges && (e.range[1] = s), e;
|
|
2250
2246
|
}
|
|
2251
2247
|
ot.finishNode = function(e, t) {
|
|
2252
|
-
return
|
|
2248
|
+
return ji.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
2253
2249
|
};
|
|
2254
2250
|
ot.finishNodeAt = function(e, t, s, a) {
|
|
2255
|
-
return
|
|
2251
|
+
return ji.call(this, e, t, s, a);
|
|
2256
2252
|
};
|
|
2257
2253
|
ot.copyNode = function(e) {
|
|
2258
2254
|
var t = new nt(this, e.start, this.startLoc);
|
|
@@ -2260,67 +2256,67 @@ ot.copyNode = function(e) {
|
|
|
2260
2256
|
t[s] = e[s];
|
|
2261
2257
|
return t;
|
|
2262
2258
|
};
|
|
2263
|
-
var
|
|
2264
|
-
9:
|
|
2265
|
-
10:
|
|
2266
|
-
11:
|
|
2267
|
-
12:
|
|
2268
|
-
13:
|
|
2269
|
-
14:
|
|
2270
|
-
},
|
|
2259
|
+
var fr = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", Fi = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", Bi = Fi + " Extended_Pictographic", Ui = Bi, $i = Ui + " EBase EComp EMod EPres ExtPict", qi = $i, dr = qi, mr = {
|
|
2260
|
+
9: Fi,
|
|
2261
|
+
10: Bi,
|
|
2262
|
+
11: Ui,
|
|
2263
|
+
12: $i,
|
|
2264
|
+
13: qi,
|
|
2265
|
+
14: dr
|
|
2266
|
+
}, yr = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", xr = {
|
|
2271
2267
|
9: "",
|
|
2272
2268
|
10: "",
|
|
2273
2269
|
11: "",
|
|
2274
2270
|
12: "",
|
|
2275
2271
|
13: "",
|
|
2276
|
-
14:
|
|
2277
|
-
},
|
|
2278
|
-
9:
|
|
2279
|
-
10:
|
|
2280
|
-
11:
|
|
2281
|
-
12:
|
|
2282
|
-
13:
|
|
2283
|
-
14:
|
|
2284
|
-
},
|
|
2285
|
-
function
|
|
2286
|
-
var t =
|
|
2287
|
-
binary:
|
|
2288
|
-
binaryOfStrings:
|
|
2272
|
+
14: yr
|
|
2273
|
+
}, ui = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", Hi = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", Gi = Hi + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Ki = Gi + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", Wi = Ki + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", zi = Wi + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", vr = zi + " " + fr, gr = {
|
|
2274
|
+
9: Hi,
|
|
2275
|
+
10: Gi,
|
|
2276
|
+
11: Ki,
|
|
2277
|
+
12: Wi,
|
|
2278
|
+
13: zi,
|
|
2279
|
+
14: vr
|
|
2280
|
+
}, Xi = {};
|
|
2281
|
+
function br(e) {
|
|
2282
|
+
var t = Xi[e] = {
|
|
2283
|
+
binary: Oe(mr[e] + " " + ui),
|
|
2284
|
+
binaryOfStrings: Oe(xr[e]),
|
|
2289
2285
|
nonBinary: {
|
|
2290
|
-
General_Category:
|
|
2291
|
-
Script:
|
|
2286
|
+
General_Category: Oe(ui),
|
|
2287
|
+
Script: Oe(gr[e])
|
|
2292
2288
|
}
|
|
2293
2289
|
};
|
|
2294
2290
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
2295
2291
|
}
|
|
2296
|
-
for (var
|
|
2297
|
-
var Pr =
|
|
2298
|
-
|
|
2292
|
+
for (var Lt = 0, hi = [9, 10, 11, 12, 13, 14]; Lt < hi.length; Lt += 1) {
|
|
2293
|
+
var Pr = hi[Lt];
|
|
2294
|
+
br(Pr);
|
|
2299
2295
|
}
|
|
2300
|
-
var C = H.prototype,
|
|
2296
|
+
var C = H.prototype, yt = function(t, s) {
|
|
2301
2297
|
this.parent = t, this.base = s || this;
|
|
2302
2298
|
};
|
|
2303
|
-
|
|
2299
|
+
yt.prototype.separatedFrom = function(t) {
|
|
2304
2300
|
for (var s = this; s; s = s.parent)
|
|
2305
2301
|
for (var a = t; a; a = a.parent)
|
|
2306
2302
|
if (s.base === a.base && s !== a)
|
|
2307
2303
|
return !0;
|
|
2308
2304
|
return !1;
|
|
2309
2305
|
};
|
|
2310
|
-
|
|
2311
|
-
return new
|
|
2306
|
+
yt.prototype.sibling = function() {
|
|
2307
|
+
return new yt(this.parent, this.base);
|
|
2312
2308
|
};
|
|
2313
|
-
var
|
|
2314
|
-
this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties =
|
|
2309
|
+
var Ce = function(t) {
|
|
2310
|
+
this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = Xi[t.options.ecmaVersion >= 14 ? 14 : t.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
2315
2311
|
};
|
|
2316
|
-
|
|
2312
|
+
Ce.prototype.reset = function(t, s, a) {
|
|
2317
2313
|
var n = a.indexOf("v") !== -1, p = a.indexOf("u") !== -1;
|
|
2318
2314
|
this.start = t | 0, this.source = s + "", this.flags = a, n && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = p && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = p && this.parser.options.ecmaVersion >= 9);
|
|
2319
2315
|
};
|
|
2320
|
-
|
|
2316
|
+
Ce.prototype.raise = function(t) {
|
|
2321
2317
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + t);
|
|
2322
2318
|
};
|
|
2323
|
-
|
|
2319
|
+
Ce.prototype.at = function(t, s) {
|
|
2324
2320
|
s === void 0 && (s = !1);
|
|
2325
2321
|
var a = this.source, n = a.length;
|
|
2326
2322
|
if (t >= n)
|
|
@@ -2331,7 +2327,7 @@ ke.prototype.at = function(t, s) {
|
|
|
2331
2327
|
var f = a.charCodeAt(t + 1);
|
|
2332
2328
|
return f >= 56320 && f <= 57343 ? (p << 10) + f - 56613888 : p;
|
|
2333
2329
|
};
|
|
2334
|
-
|
|
2330
|
+
Ce.prototype.nextIndex = function(t, s) {
|
|
2335
2331
|
s === void 0 && (s = !1);
|
|
2336
2332
|
var a = this.source, n = a.length;
|
|
2337
2333
|
if (t >= n)
|
|
@@ -2339,19 +2335,19 @@ ke.prototype.nextIndex = function(t, s) {
|
|
|
2339
2335
|
var p = a.charCodeAt(t), f;
|
|
2340
2336
|
return !(s || this.switchU) || p <= 55295 || p >= 57344 || t + 1 >= n || (f = a.charCodeAt(t + 1)) < 56320 || f > 57343 ? t + 1 : t + 2;
|
|
2341
2337
|
};
|
|
2342
|
-
|
|
2338
|
+
Ce.prototype.current = function(t) {
|
|
2343
2339
|
return t === void 0 && (t = !1), this.at(this.pos, t);
|
|
2344
2340
|
};
|
|
2345
|
-
|
|
2341
|
+
Ce.prototype.lookahead = function(t) {
|
|
2346
2342
|
return t === void 0 && (t = !1), this.at(this.nextIndex(this.pos, t), t);
|
|
2347
2343
|
};
|
|
2348
|
-
|
|
2344
|
+
Ce.prototype.advance = function(t) {
|
|
2349
2345
|
t === void 0 && (t = !1), this.pos = this.nextIndex(this.pos, t);
|
|
2350
2346
|
};
|
|
2351
|
-
|
|
2347
|
+
Ce.prototype.eat = function(t, s) {
|
|
2352
2348
|
return s === void 0 && (s = !1), this.current(s) === t ? (this.advance(s), !0) : !1;
|
|
2353
2349
|
};
|
|
2354
|
-
|
|
2350
|
+
Ce.prototype.eatChars = function(t, s) {
|
|
2355
2351
|
s === void 0 && (s = !1);
|
|
2356
2352
|
for (var a = this.pos, n = 0, p = t; n < p.length; n += 1) {
|
|
2357
2353
|
var f = p[n], v = this.at(a, s);
|
|
@@ -2368,13 +2364,13 @@ C.validateRegExpFlags = function(e) {
|
|
|
2368
2364
|
}
|
|
2369
2365
|
this.options.ecmaVersion >= 15 && a && n && this.raise(e.start, "Invalid regular expression flag");
|
|
2370
2366
|
};
|
|
2371
|
-
function
|
|
2367
|
+
function Sr(e) {
|
|
2372
2368
|
for (var t in e)
|
|
2373
2369
|
return !0;
|
|
2374
2370
|
return !1;
|
|
2375
2371
|
}
|
|
2376
2372
|
C.validateRegExpPattern = function(e) {
|
|
2377
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
2373
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && Sr(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
2378
2374
|
};
|
|
2379
2375
|
C.regexp_pattern = function(e) {
|
|
2380
2376
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = /* @__PURE__ */ Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(
|
|
@@ -2394,7 +2390,7 @@ C.regexp_pattern = function(e) {
|
|
|
2394
2390
|
};
|
|
2395
2391
|
C.regexp_disjunction = function(e) {
|
|
2396
2392
|
var t = this.options.ecmaVersion >= 16;
|
|
2397
|
-
for (t && (e.branchID = new
|
|
2393
|
+
for (t && (e.branchID = new yt(e.branchID, null)), this.regexp_alternative(e); e.eat(
|
|
2398
2394
|
124
|
|
2399
2395
|
/* | */
|
|
2400
2396
|
); )
|
|
@@ -2576,11 +2572,11 @@ C.regexp_eatCapturingGroup = function(e) {
|
|
|
2576
2572
|
return !1;
|
|
2577
2573
|
};
|
|
2578
2574
|
C.regexp_eatModifiers = function(e) {
|
|
2579
|
-
for (var t = "", s = 0; (s = e.current()) !== -1 &&
|
|
2580
|
-
t +=
|
|
2575
|
+
for (var t = "", s = 0; (s = e.current()) !== -1 && Tr(s); )
|
|
2576
|
+
t += Ae(s), e.advance();
|
|
2581
2577
|
return t;
|
|
2582
2578
|
};
|
|
2583
|
-
function
|
|
2579
|
+
function Tr(e) {
|
|
2584
2580
|
return e === 105 || e === 109 || e === 115;
|
|
2585
2581
|
}
|
|
2586
2582
|
C.regexp_eatExtendedAtom = function(e) {
|
|
@@ -2594,13 +2590,13 @@ C.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
|
2594
2590
|
};
|
|
2595
2591
|
C.regexp_eatSyntaxCharacter = function(e) {
|
|
2596
2592
|
var t = e.current();
|
|
2597
|
-
return
|
|
2593
|
+
return Qi(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2598
2594
|
};
|
|
2599
|
-
function
|
|
2595
|
+
function Qi(e) {
|
|
2600
2596
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2601
2597
|
}
|
|
2602
2598
|
C.regexp_eatPatternCharacters = function(e) {
|
|
2603
|
-
for (var t = e.pos, s = 0; (s = e.current()) !== -1 && !
|
|
2599
|
+
for (var t = e.pos, s = 0; (s = e.current()) !== -1 && !Qi(s); )
|
|
2604
2600
|
e.advance();
|
|
2605
2601
|
return e.pos !== t;
|
|
2606
2602
|
};
|
|
@@ -2642,25 +2638,25 @@ C.regexp_eatGroupName = function(e) {
|
|
|
2642
2638
|
};
|
|
2643
2639
|
C.regexp_eatRegExpIdentifierName = function(e) {
|
|
2644
2640
|
if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
|
|
2645
|
-
for (e.lastStringValue +=
|
|
2646
|
-
e.lastStringValue +=
|
|
2641
|
+
for (e.lastStringValue += Ae(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e); )
|
|
2642
|
+
e.lastStringValue += Ae(e.lastIntValue);
|
|
2647
2643
|
return !0;
|
|
2648
2644
|
}
|
|
2649
2645
|
return !1;
|
|
2650
2646
|
};
|
|
2651
2647
|
C.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2652
2648
|
var t = e.pos, s = this.options.ecmaVersion >= 11, a = e.current(s);
|
|
2653
|
-
return e.advance(s), a === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, s) && (a = e.lastIntValue),
|
|
2649
|
+
return e.advance(s), a === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, s) && (a = e.lastIntValue), Cr(a) ? (e.lastIntValue = a, !0) : (e.pos = t, !1);
|
|
2654
2650
|
};
|
|
2655
|
-
function
|
|
2656
|
-
return
|
|
2651
|
+
function Cr(e) {
|
|
2652
|
+
return ye(e, !0) || e === 36 || e === 95;
|
|
2657
2653
|
}
|
|
2658
2654
|
C.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2659
2655
|
var t = e.pos, s = this.options.ecmaVersion >= 11, a = e.current(s);
|
|
2660
|
-
return e.advance(s), a === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, s) && (a = e.lastIntValue),
|
|
2656
|
+
return e.advance(s), a === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, s) && (a = e.lastIntValue), kr(a) ? (e.lastIntValue = a, !0) : (e.pos = t, !1);
|
|
2661
2657
|
};
|
|
2662
|
-
function
|
|
2663
|
-
return
|
|
2658
|
+
function kr(e) {
|
|
2659
|
+
return we(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2664
2660
|
}
|
|
2665
2661
|
C.regexp_eatAtomEscape = function(e) {
|
|
2666
2662
|
return this.regexp_eatBackReference(e) || this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e) || e.switchN && this.regexp_eatKGroupName(e) ? !0 : (e.switchU && (e.current() === 99 && e.raise("Invalid unicode escape"), e.raise("Invalid escape")), !1);
|
|
@@ -2704,7 +2700,7 @@ C.regexp_eatCControlLetter = function(e) {
|
|
|
2704
2700
|
return !1;
|
|
2705
2701
|
};
|
|
2706
2702
|
C.regexp_eatZero = function(e) {
|
|
2707
|
-
return e.current() === 48 && !
|
|
2703
|
+
return e.current() === 48 && !St(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
2708
2704
|
};
|
|
2709
2705
|
C.regexp_eatControlEscape = function(e) {
|
|
2710
2706
|
var t = e.current();
|
|
@@ -2712,9 +2708,9 @@ C.regexp_eatControlEscape = function(e) {
|
|
|
2712
2708
|
};
|
|
2713
2709
|
C.regexp_eatControlLetter = function(e) {
|
|
2714
2710
|
var t = e.current();
|
|
2715
|
-
return
|
|
2711
|
+
return Ji(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2716
2712
|
};
|
|
2717
|
-
function
|
|
2713
|
+
function Ji(e) {
|
|
2718
2714
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2719
2715
|
}
|
|
2720
2716
|
C.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -2749,13 +2745,13 @@ C.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2749
2745
|
) && this.regexp_eatHexDigits(e) && e.eat(
|
|
2750
2746
|
125
|
|
2751
2747
|
/* } */
|
|
2752
|
-
) &&
|
|
2748
|
+
) && wr(e.lastIntValue))
|
|
2753
2749
|
return !0;
|
|
2754
2750
|
a && e.raise("Invalid unicode escape"), e.pos = s;
|
|
2755
2751
|
}
|
|
2756
2752
|
return !1;
|
|
2757
2753
|
};
|
|
2758
|
-
function
|
|
2754
|
+
function wr(e) {
|
|
2759
2755
|
return e >= 0 && e <= 1114111;
|
|
2760
2756
|
}
|
|
2761
2757
|
C.regexp_eatIdentityEscape = function(e) {
|
|
@@ -2778,11 +2774,11 @@ C.regexp_eatDecimalEscape = function(e) {
|
|
|
2778
2774
|
}
|
|
2779
2775
|
return !1;
|
|
2780
2776
|
};
|
|
2781
|
-
var
|
|
2777
|
+
var Yi = 0, Ee = 1, pe = 2;
|
|
2782
2778
|
C.regexp_eatCharacterClassEscape = function(e) {
|
|
2783
2779
|
var t = e.current();
|
|
2784
|
-
if (
|
|
2785
|
-
return e.lastIntValue = -1, e.advance(),
|
|
2780
|
+
if (Ar(t))
|
|
2781
|
+
return e.lastIntValue = -1, e.advance(), Ee;
|
|
2786
2782
|
var s = !1;
|
|
2787
2783
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((s = t === 80) || t === 112)) {
|
|
2788
2784
|
e.lastIntValue = -1, e.advance();
|
|
@@ -2794,12 +2790,12 @@ C.regexp_eatCharacterClassEscape = function(e) {
|
|
|
2794
2790
|
125
|
|
2795
2791
|
/* } */
|
|
2796
2792
|
))
|
|
2797
|
-
return s && a ===
|
|
2793
|
+
return s && a === pe && e.raise("Invalid property name"), a;
|
|
2798
2794
|
e.raise("Invalid property name");
|
|
2799
2795
|
}
|
|
2800
|
-
return
|
|
2796
|
+
return Yi;
|
|
2801
2797
|
};
|
|
2802
|
-
function
|
|
2798
|
+
function Ar(e) {
|
|
2803
2799
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
2804
2800
|
}
|
|
2805
2801
|
C.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -2811,42 +2807,42 @@ C.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2811
2807
|
var s = e.lastStringValue;
|
|
2812
2808
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
2813
2809
|
var a = e.lastStringValue;
|
|
2814
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, s, a),
|
|
2810
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, s, a), Ee;
|
|
2815
2811
|
}
|
|
2816
2812
|
}
|
|
2817
2813
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
2818
2814
|
var n = e.lastStringValue;
|
|
2819
2815
|
return this.regexp_validateUnicodePropertyNameOrValue(e, n);
|
|
2820
2816
|
}
|
|
2821
|
-
return
|
|
2817
|
+
return Yi;
|
|
2822
2818
|
};
|
|
2823
2819
|
C.regexp_validateUnicodePropertyNameAndValue = function(e, t, s) {
|
|
2824
|
-
|
|
2820
|
+
Ge(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(s) || e.raise("Invalid property value");
|
|
2825
2821
|
};
|
|
2826
2822
|
C.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
2827
2823
|
if (e.unicodeProperties.binary.test(t))
|
|
2828
|
-
return
|
|
2824
|
+
return Ee;
|
|
2829
2825
|
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t))
|
|
2830
|
-
return
|
|
2826
|
+
return pe;
|
|
2831
2827
|
e.raise("Invalid property name");
|
|
2832
2828
|
};
|
|
2833
2829
|
C.regexp_eatUnicodePropertyName = function(e) {
|
|
2834
2830
|
var t = 0;
|
|
2835
|
-
for (e.lastStringValue = "";
|
|
2836
|
-
e.lastStringValue +=
|
|
2831
|
+
for (e.lastStringValue = ""; Zi(t = e.current()); )
|
|
2832
|
+
e.lastStringValue += Ae(t), e.advance();
|
|
2837
2833
|
return e.lastStringValue !== "";
|
|
2838
2834
|
};
|
|
2839
|
-
function
|
|
2840
|
-
return
|
|
2835
|
+
function Zi(e) {
|
|
2836
|
+
return Ji(e) || e === 95;
|
|
2841
2837
|
}
|
|
2842
2838
|
C.regexp_eatUnicodePropertyValue = function(e) {
|
|
2843
2839
|
var t = 0;
|
|
2844
|
-
for (e.lastStringValue = "";
|
|
2845
|
-
e.lastStringValue +=
|
|
2840
|
+
for (e.lastStringValue = ""; Er(t = e.current()); )
|
|
2841
|
+
e.lastStringValue += Ae(t), e.advance();
|
|
2846
2842
|
return e.lastStringValue !== "";
|
|
2847
2843
|
};
|
|
2848
|
-
function
|
|
2849
|
-
return
|
|
2844
|
+
function Er(e) {
|
|
2845
|
+
return Zi(e) || St(e);
|
|
2850
2846
|
}
|
|
2851
2847
|
C.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2852
2848
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
@@ -2863,12 +2859,12 @@ C.regexp_eatCharacterClass = function(e) {
|
|
|
2863
2859
|
return e.eat(
|
|
2864
2860
|
93
|
|
2865
2861
|
/* ] */
|
|
2866
|
-
) || e.raise("Unterminated character class"), t && s ===
|
|
2862
|
+
) || e.raise("Unterminated character class"), t && s === pe && e.raise("Negated character class may contain strings"), !0;
|
|
2867
2863
|
}
|
|
2868
2864
|
return !1;
|
|
2869
2865
|
};
|
|
2870
2866
|
C.regexp_classContents = function(e) {
|
|
2871
|
-
return e.current() === 93 ?
|
|
2867
|
+
return e.current() === 93 ? Ee : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), Ee);
|
|
2872
2868
|
};
|
|
2873
2869
|
C.regexp_nonEmptyClassRanges = function(e) {
|
|
2874
2870
|
for (; this.regexp_eatClassAtom(e); ) {
|
|
@@ -2892,7 +2888,7 @@ C.regexp_eatClassAtom = function(e) {
|
|
|
2892
2888
|
return !0;
|
|
2893
2889
|
if (e.switchU) {
|
|
2894
2890
|
var s = e.current();
|
|
2895
|
-
(s === 99 ||
|
|
2891
|
+
(s === 99 || is(s)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2896
2892
|
}
|
|
2897
2893
|
e.pos = t;
|
|
2898
2894
|
}
|
|
@@ -2922,15 +2918,15 @@ C.regexp_eatClassEscape = function(e) {
|
|
|
2922
2918
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
2923
2919
|
};
|
|
2924
2920
|
C.regexp_classSetExpression = function(e) {
|
|
2925
|
-
var t =
|
|
2921
|
+
var t = Ee, s;
|
|
2926
2922
|
if (!this.regexp_eatClassSetRange(e)) if (s = this.regexp_eatClassSetOperand(e)) {
|
|
2927
|
-
s ===
|
|
2923
|
+
s === pe && (t = pe);
|
|
2928
2924
|
for (var a = e.pos; e.eatChars(
|
|
2929
2925
|
[38, 38]
|
|
2930
2926
|
/* && */
|
|
2931
2927
|
); ) {
|
|
2932
2928
|
if (e.current() !== 38 && (s = this.regexp_eatClassSetOperand(e))) {
|
|
2933
|
-
s !==
|
|
2929
|
+
s !== pe && (t = Ee);
|
|
2934
2930
|
continue;
|
|
2935
2931
|
}
|
|
2936
2932
|
e.raise("Invalid character in character class");
|
|
@@ -2950,7 +2946,7 @@ C.regexp_classSetExpression = function(e) {
|
|
|
2950
2946
|
if (!this.regexp_eatClassSetRange(e)) {
|
|
2951
2947
|
if (s = this.regexp_eatClassSetOperand(e), !s)
|
|
2952
2948
|
return t;
|
|
2953
|
-
s ===
|
|
2949
|
+
s === pe && (t = pe);
|
|
2954
2950
|
}
|
|
2955
2951
|
};
|
|
2956
2952
|
C.regexp_eatClassSetRange = function(e) {
|
|
@@ -2969,7 +2965,7 @@ C.regexp_eatClassSetRange = function(e) {
|
|
|
2969
2965
|
return !1;
|
|
2970
2966
|
};
|
|
2971
2967
|
C.regexp_eatClassSetOperand = function(e) {
|
|
2972
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
2968
|
+
return this.regexp_eatClassSetCharacter(e) ? Ee : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
2973
2969
|
};
|
|
2974
2970
|
C.regexp_eatNestedClass = function(e) {
|
|
2975
2971
|
var t = e.pos;
|
|
@@ -2985,7 +2981,7 @@ C.regexp_eatNestedClass = function(e) {
|
|
|
2985
2981
|
93
|
|
2986
2982
|
/* ] */
|
|
2987
2983
|
))
|
|
2988
|
-
return s && a ===
|
|
2984
|
+
return s && a === pe && e.raise("Negated character class may contain strings"), a;
|
|
2989
2985
|
e.pos = t;
|
|
2990
2986
|
}
|
|
2991
2987
|
if (e.eat(
|
|
@@ -3026,13 +3022,13 @@ C.regexp_classStringDisjunctionContents = function(e) {
|
|
|
3026
3022
|
124
|
|
3027
3023
|
/* | */
|
|
3028
3024
|
); )
|
|
3029
|
-
this.regexp_classString(e) ===
|
|
3025
|
+
this.regexp_classString(e) === pe && (t = pe);
|
|
3030
3026
|
return t;
|
|
3031
3027
|
};
|
|
3032
3028
|
C.regexp_classString = function(e) {
|
|
3033
3029
|
for (var t = 0; this.regexp_eatClassSetCharacter(e); )
|
|
3034
3030
|
t++;
|
|
3035
|
-
return t === 1 ?
|
|
3031
|
+
return t === 1 ? Ee : pe;
|
|
3036
3032
|
};
|
|
3037
3033
|
C.regexp_eatClassSetCharacter = function(e) {
|
|
3038
3034
|
var t = e.pos;
|
|
@@ -3045,24 +3041,24 @@ C.regexp_eatClassSetCharacter = function(e) {
|
|
|
3045
3041
|
/* b */
|
|
3046
3042
|
) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
3047
3043
|
var s = e.current();
|
|
3048
|
-
return s < 0 || s === e.lookahead() &&
|
|
3044
|
+
return s < 0 || s === e.lookahead() && Ir(s) || _r(s) ? !1 : (e.advance(), e.lastIntValue = s, !0);
|
|
3049
3045
|
};
|
|
3050
|
-
function
|
|
3046
|
+
function Ir(e) {
|
|
3051
3047
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
3052
3048
|
}
|
|
3053
|
-
function
|
|
3049
|
+
function _r(e) {
|
|
3054
3050
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
3055
3051
|
}
|
|
3056
3052
|
C.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
3057
3053
|
var t = e.current();
|
|
3058
|
-
return
|
|
3054
|
+
return Nr(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
3059
3055
|
};
|
|
3060
|
-
function
|
|
3056
|
+
function Nr(e) {
|
|
3061
3057
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
3062
3058
|
}
|
|
3063
3059
|
C.regexp_eatClassControlLetter = function(e) {
|
|
3064
3060
|
var t = e.current();
|
|
3065
|
-
return
|
|
3061
|
+
return St(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
3066
3062
|
};
|
|
3067
3063
|
C.regexp_eatHexEscapeSequence = function(e) {
|
|
3068
3064
|
var t = e.pos;
|
|
@@ -3078,23 +3074,23 @@ C.regexp_eatHexEscapeSequence = function(e) {
|
|
|
3078
3074
|
};
|
|
3079
3075
|
C.regexp_eatDecimalDigits = function(e) {
|
|
3080
3076
|
var t = e.pos, s = 0;
|
|
3081
|
-
for (e.lastIntValue = 0;
|
|
3077
|
+
for (e.lastIntValue = 0; St(s = e.current()); )
|
|
3082
3078
|
e.lastIntValue = 10 * e.lastIntValue + (s - 48), e.advance();
|
|
3083
3079
|
return e.pos !== t;
|
|
3084
3080
|
};
|
|
3085
|
-
function
|
|
3081
|
+
function St(e) {
|
|
3086
3082
|
return e >= 48 && e <= 57;
|
|
3087
3083
|
}
|
|
3088
3084
|
C.regexp_eatHexDigits = function(e) {
|
|
3089
3085
|
var t = e.pos, s = 0;
|
|
3090
|
-
for (e.lastIntValue = 0;
|
|
3091
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
3086
|
+
for (e.lastIntValue = 0; es(s = e.current()); )
|
|
3087
|
+
e.lastIntValue = 16 * e.lastIntValue + ts(s), e.advance();
|
|
3092
3088
|
return e.pos !== t;
|
|
3093
3089
|
};
|
|
3094
|
-
function
|
|
3090
|
+
function es(e) {
|
|
3095
3091
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
3096
3092
|
}
|
|
3097
|
-
function
|
|
3093
|
+
function ts(e) {
|
|
3098
3094
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
3099
3095
|
}
|
|
3100
3096
|
C.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -3111,9 +3107,9 @@ C.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
3111
3107
|
};
|
|
3112
3108
|
C.regexp_eatOctalDigit = function(e) {
|
|
3113
3109
|
var t = e.current();
|
|
3114
|
-
return
|
|
3110
|
+
return is(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
3115
3111
|
};
|
|
3116
|
-
function
|
|
3112
|
+
function is(e) {
|
|
3117
3113
|
return e >= 48 && e <= 55;
|
|
3118
3114
|
}
|
|
3119
3115
|
C.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -3121,20 +3117,20 @@ C.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
3121
3117
|
e.lastIntValue = 0;
|
|
3122
3118
|
for (var a = 0; a < t; ++a) {
|
|
3123
3119
|
var n = e.current();
|
|
3124
|
-
if (!
|
|
3120
|
+
if (!es(n))
|
|
3125
3121
|
return e.pos = s, !1;
|
|
3126
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
3122
|
+
e.lastIntValue = 16 * e.lastIntValue + ts(n), e.advance();
|
|
3127
3123
|
}
|
|
3128
3124
|
return !0;
|
|
3129
3125
|
};
|
|
3130
|
-
var
|
|
3126
|
+
var Tt = function(t) {
|
|
3131
3127
|
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new rt(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]);
|
|
3132
3128
|
}, R = H.prototype;
|
|
3133
3129
|
R.next = function(e) {
|
|
3134
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
3130
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Tt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
3135
3131
|
};
|
|
3136
3132
|
R.getToken = function() {
|
|
3137
|
-
return this.next(), new
|
|
3133
|
+
return this.next(), new Tt(this);
|
|
3138
3134
|
};
|
|
3139
3135
|
typeof Symbol < "u" && (R[Symbol.iterator] = function() {
|
|
3140
3136
|
var e = this;
|
|
@@ -3157,7 +3153,7 @@ R.nextToken = function() {
|
|
|
3157
3153
|
this.readToken(this.fullCharCodeAtPos());
|
|
3158
3154
|
};
|
|
3159
3155
|
R.readToken = function(e) {
|
|
3160
|
-
return
|
|
3156
|
+
return ye(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
3161
3157
|
};
|
|
3162
3158
|
R.fullCharCodeAtPos = function() {
|
|
3163
3159
|
var e = this.input.charCodeAt(this.pos);
|
|
@@ -3169,7 +3165,7 @@ R.fullCharCodeAtPos = function() {
|
|
|
3169
3165
|
R.skipBlockComment = function() {
|
|
3170
3166
|
var e = this.options.onComment && this.curPosition(), t = this.pos, s = this.input.indexOf("*/", this.pos += 2);
|
|
3171
3167
|
if (s === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = s + 2, this.options.locations)
|
|
3172
|
-
for (var a = void 0, n = t; (a =
|
|
3168
|
+
for (var a = void 0, n = t; (a = Ei(this.input, n, this.pos)) > -1; )
|
|
3173
3169
|
++this.curLine, n = this.lineStart = a;
|
|
3174
3170
|
this.options.onComment && this.options.onComment(
|
|
3175
3171
|
!0,
|
|
@@ -3181,7 +3177,7 @@ R.skipBlockComment = function() {
|
|
|
3181
3177
|
);
|
|
3182
3178
|
};
|
|
3183
3179
|
R.skipLineComment = function(e) {
|
|
3184
|
-
for (var t = this.pos, s = this.options.onComment && this.curPosition(), a = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !
|
|
3180
|
+
for (var t = this.pos, s = this.options.onComment && this.curPosition(), a = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !je(a); )
|
|
3185
3181
|
a = this.input.charCodeAt(++this.pos);
|
|
3186
3182
|
this.options.onComment && this.options.onComment(
|
|
3187
3183
|
!1,
|
|
@@ -3220,7 +3216,7 @@ R.skipSpace = function() {
|
|
|
3220
3216
|
}
|
|
3221
3217
|
break;
|
|
3222
3218
|
default:
|
|
3223
|
-
if (e > 8 && e < 14 || e >= 5760 &&
|
|
3219
|
+
if (e > 8 && e < 14 || e >= 5760 && Ht.test(String.fromCharCode(e)))
|
|
3224
3220
|
++this.pos;
|
|
3225
3221
|
else
|
|
3226
3222
|
break e;
|
|
@@ -3265,7 +3261,7 @@ R.readToken_caret = function() {
|
|
|
3265
3261
|
};
|
|
3266
3262
|
R.readToken_plus_min = function(e) {
|
|
3267
3263
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3268
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
3264
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || Y.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(h.incDec, 2) : t === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.plusMin, 1);
|
|
3269
3265
|
};
|
|
3270
3266
|
R.readToken_lt_gt = function(e) {
|
|
3271
3267
|
var t = this.input.charCodeAt(this.pos + 1), s = 1;
|
|
@@ -3297,9 +3293,9 @@ R.readToken_question = function() {
|
|
|
3297
3293
|
};
|
|
3298
3294
|
R.readToken_numberSign = function() {
|
|
3299
3295
|
var e = this.options.ecmaVersion, t = 35;
|
|
3300
|
-
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(),
|
|
3296
|
+
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), ye(t, !0) || t === 92))
|
|
3301
3297
|
return this.finishToken(h.privateId, this.readWord1());
|
|
3302
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
3298
|
+
this.raise(this.pos, "Unexpected character '" + Ae(t) + "'");
|
|
3303
3299
|
};
|
|
3304
3300
|
R.getTokenFromCode = function(e) {
|
|
3305
3301
|
switch (e) {
|
|
@@ -3386,7 +3382,7 @@ R.getTokenFromCode = function(e) {
|
|
|
3386
3382
|
case 35:
|
|
3387
3383
|
return this.readToken_numberSign();
|
|
3388
3384
|
}
|
|
3389
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
3385
|
+
this.raise(this.pos, "Unexpected character '" + Ae(e) + "'");
|
|
3390
3386
|
};
|
|
3391
3387
|
R.finishOp = function(e, t) {
|
|
3392
3388
|
var s = this.input.slice(this.pos, this.pos + t);
|
|
@@ -3396,7 +3392,7 @@ R.readRegexp = function() {
|
|
|
3396
3392
|
for (var e, t, s = this.pos; ; ) {
|
|
3397
3393
|
this.pos >= this.input.length && this.raise(s, "Unterminated regular expression");
|
|
3398
3394
|
var a = this.input.charAt(this.pos);
|
|
3399
|
-
if (
|
|
3395
|
+
if (Y.test(a) && this.raise(s, "Unterminated regular expression"), e)
|
|
3400
3396
|
e = !1;
|
|
3401
3397
|
else {
|
|
3402
3398
|
if (a === "[")
|
|
@@ -3413,7 +3409,7 @@ R.readRegexp = function() {
|
|
|
3413
3409
|
++this.pos;
|
|
3414
3410
|
var p = this.pos, f = this.readWord1();
|
|
3415
3411
|
this.containsEsc && this.unexpected(p);
|
|
3416
|
-
var v = this.regexpState || (this.regexpState = new
|
|
3412
|
+
var v = this.regexpState || (this.regexpState = new Ce(this));
|
|
3417
3413
|
v.reset(s, n, f), this.validateRegExpFlags(v), this.validateRegExpPattern(v);
|
|
3418
3414
|
var x = null;
|
|
3419
3415
|
try {
|
|
@@ -3424,28 +3420,28 @@ R.readRegexp = function() {
|
|
|
3424
3420
|
};
|
|
3425
3421
|
R.readInt = function(e, t, s) {
|
|
3426
3422
|
for (var a = this.options.ecmaVersion >= 12 && t === void 0, n = s && this.input.charCodeAt(this.pos) === 48, p = this.pos, f = 0, v = 0, x = 0, o = t ?? 1 / 0; x < o; ++x, ++this.pos) {
|
|
3427
|
-
var
|
|
3428
|
-
if (a &&
|
|
3429
|
-
n && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), v === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), x === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), v =
|
|
3423
|
+
var S = this.input.charCodeAt(this.pos), I = void 0;
|
|
3424
|
+
if (a && S === 95) {
|
|
3425
|
+
n && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), v === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), x === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), v = S;
|
|
3430
3426
|
continue;
|
|
3431
3427
|
}
|
|
3432
|
-
if (
|
|
3428
|
+
if (S >= 97 ? I = S - 97 + 10 : S >= 65 ? I = S - 65 + 10 : S >= 48 && S <= 57 ? I = S - 48 : I = 1 / 0, I >= e)
|
|
3433
3429
|
break;
|
|
3434
|
-
v =
|
|
3430
|
+
v = S, f = f * e + I;
|
|
3435
3431
|
}
|
|
3436
3432
|
return a && v === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === p || t != null && this.pos - p !== t ? null : f;
|
|
3437
3433
|
};
|
|
3438
|
-
function
|
|
3434
|
+
function Lr(e, t) {
|
|
3439
3435
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
3440
3436
|
}
|
|
3441
|
-
function
|
|
3437
|
+
function ss(e) {
|
|
3442
3438
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
3443
3439
|
}
|
|
3444
3440
|
R.readRadixNumber = function(e) {
|
|
3445
3441
|
var t = this.pos;
|
|
3446
3442
|
this.pos += 2;
|
|
3447
3443
|
var s = this.readInt(e);
|
|
3448
|
-
return s == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (s =
|
|
3444
|
+
return s == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (s = ss(this.input.slice(t, this.pos)), ++this.pos) : ye(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(h.num, s);
|
|
3449
3445
|
};
|
|
3450
3446
|
R.readNumber = function(e) {
|
|
3451
3447
|
var t = this.pos;
|
|
@@ -3454,11 +3450,11 @@ R.readNumber = function(e) {
|
|
|
3454
3450
|
s && this.strict && this.raise(t, "Invalid number");
|
|
3455
3451
|
var a = this.input.charCodeAt(this.pos);
|
|
3456
3452
|
if (!s && !e && this.options.ecmaVersion >= 11 && a === 110) {
|
|
3457
|
-
var n =
|
|
3458
|
-
return ++this.pos,
|
|
3453
|
+
var n = ss(this.input.slice(t, this.pos));
|
|
3454
|
+
return ++this.pos, ye(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(h.num, n);
|
|
3459
3455
|
}
|
|
3460
|
-
s && /[89]/.test(this.input.slice(t, this.pos)) && (s = !1), a === 46 && !s && (++this.pos, this.readInt(10), a = this.input.charCodeAt(this.pos)), (a === 69 || a === 101) && !s && (a = this.input.charCodeAt(++this.pos), (a === 43 || a === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")),
|
|
3461
|
-
var p =
|
|
3456
|
+
s && /[89]/.test(this.input.slice(t, this.pos)) && (s = !1), a === 46 && !s && (++this.pos, this.readInt(10), a = this.input.charCodeAt(this.pos)), (a === 69 || a === 101) && !s && (a = this.input.charCodeAt(++this.pos), (a === 43 || a === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), ye(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
3457
|
+
var p = Lr(this.input.slice(t, this.pos), s);
|
|
3462
3458
|
return this.finishToken(h.num, p);
|
|
3463
3459
|
};
|
|
3464
3460
|
R.readCodePoint = function() {
|
|
@@ -3477,17 +3473,17 @@ R.readString = function(e) {
|
|
|
3477
3473
|
var a = this.input.charCodeAt(this.pos);
|
|
3478
3474
|
if (a === e)
|
|
3479
3475
|
break;
|
|
3480
|
-
a === 92 ? (t += this.input.slice(s, this.pos), t += this.readEscapedChar(!1), s = this.pos) : a === 8232 || a === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (
|
|
3476
|
+
a === 92 ? (t += this.input.slice(s, this.pos), t += this.readEscapedChar(!1), s = this.pos) : a === 8232 || a === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (je(a) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
3481
3477
|
}
|
|
3482
3478
|
return t += this.input.slice(s, this.pos++), this.finishToken(h.string, t);
|
|
3483
3479
|
};
|
|
3484
|
-
var
|
|
3480
|
+
var rs = {};
|
|
3485
3481
|
R.tryReadTemplateToken = function() {
|
|
3486
3482
|
this.inTemplateElement = !0;
|
|
3487
3483
|
try {
|
|
3488
3484
|
this.readTmplToken();
|
|
3489
3485
|
} catch (e) {
|
|
3490
|
-
if (e ===
|
|
3486
|
+
if (e === rs)
|
|
3491
3487
|
this.readInvalidTemplateToken();
|
|
3492
3488
|
else
|
|
3493
3489
|
throw e;
|
|
@@ -3496,7 +3492,7 @@ R.tryReadTemplateToken = function() {
|
|
|
3496
3492
|
};
|
|
3497
3493
|
R.invalidStringToken = function(e, t) {
|
|
3498
3494
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
3499
|
-
throw
|
|
3495
|
+
throw rs;
|
|
3500
3496
|
this.raise(e, t);
|
|
3501
3497
|
};
|
|
3502
3498
|
R.readTmplToken = function() {
|
|
@@ -3507,7 +3503,7 @@ R.readTmplToken = function() {
|
|
|
3507
3503
|
return this.pos === this.start && (this.type === h.template || this.type === h.invalidTemplate) ? s === 36 ? (this.pos += 2, this.finishToken(h.dollarBraceL)) : (++this.pos, this.finishToken(h.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(h.template, e));
|
|
3508
3504
|
if (s === 92)
|
|
3509
3505
|
e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
3510
|
-
else if (
|
|
3506
|
+
else if (je(s)) {
|
|
3511
3507
|
switch (e += this.input.slice(t, this.pos), ++this.pos, s) {
|
|
3512
3508
|
case 13:
|
|
3513
3509
|
this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
@@ -3563,7 +3559,7 @@ R.readEscapedChar = function(e) {
|
|
|
3563
3559
|
return String.fromCharCode(this.readHexChar(2));
|
|
3564
3560
|
// 'x'
|
|
3565
3561
|
case 117:
|
|
3566
|
-
return
|
|
3562
|
+
return Ae(this.readCodePoint());
|
|
3567
3563
|
// 'u'
|
|
3568
3564
|
case 116:
|
|
3569
3565
|
return " ";
|
|
@@ -3602,7 +3598,7 @@ R.readEscapedChar = function(e) {
|
|
|
3602
3598
|
e ? "Octal literal in template string" : "Octal literal in strict mode"
|
|
3603
3599
|
), String.fromCharCode(n);
|
|
3604
3600
|
}
|
|
3605
|
-
return
|
|
3601
|
+
return je(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3606
3602
|
}
|
|
3607
3603
|
};
|
|
3608
3604
|
R.readHexChar = function(e) {
|
|
@@ -3613,14 +3609,14 @@ R.readWord1 = function() {
|
|
|
3613
3609
|
this.containsEsc = !1;
|
|
3614
3610
|
for (var e = "", t = !0, s = this.pos, a = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
3615
3611
|
var n = this.fullCharCodeAtPos();
|
|
3616
|
-
if (
|
|
3612
|
+
if (we(n, a))
|
|
3617
3613
|
this.pos += n <= 65535 ? 1 : 2;
|
|
3618
3614
|
else if (n === 92) {
|
|
3619
3615
|
this.containsEsc = !0, e += this.input.slice(s, this.pos);
|
|
3620
3616
|
var p = this.pos;
|
|
3621
3617
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3622
3618
|
var f = this.readCodePoint();
|
|
3623
|
-
(t ?
|
|
3619
|
+
(t ? ye : we)(f, a) || this.invalidStringToken(p, "Invalid Unicode escape"), e += Ae(f), s = this.pos;
|
|
3624
3620
|
} else
|
|
3625
3621
|
break;
|
|
3626
3622
|
t = !1;
|
|
@@ -3629,65 +3625,65 @@ R.readWord1 = function() {
|
|
|
3629
3625
|
};
|
|
3630
3626
|
R.readWord = function() {
|
|
3631
3627
|
var e = this.readWord1(), t = h.name;
|
|
3632
|
-
return this.keywords.test(e) && (t =
|
|
3628
|
+
return this.keywords.test(e) && (t = $e[e]), this.finishToken(t, e);
|
|
3633
3629
|
};
|
|
3634
|
-
var
|
|
3630
|
+
var as = "8.15.0";
|
|
3635
3631
|
H.acorn = {
|
|
3636
3632
|
Parser: H,
|
|
3637
|
-
version:
|
|
3638
|
-
defaultOptions:
|
|
3639
|
-
Position:
|
|
3633
|
+
version: as,
|
|
3634
|
+
defaultOptions: lt,
|
|
3635
|
+
Position: qe,
|
|
3640
3636
|
SourceLocation: rt,
|
|
3641
|
-
getLineInfo:
|
|
3637
|
+
getLineInfo: Gt,
|
|
3642
3638
|
Node: nt,
|
|
3643
3639
|
TokenType: O,
|
|
3644
3640
|
tokTypes: h,
|
|
3645
|
-
keywordTypes:
|
|
3646
|
-
TokContext:
|
|
3641
|
+
keywordTypes: $e,
|
|
3642
|
+
TokContext: Q,
|
|
3647
3643
|
tokContexts: F,
|
|
3648
|
-
isIdentifierChar:
|
|
3649
|
-
isIdentifierStart:
|
|
3650
|
-
Token:
|
|
3651
|
-
isNewLine:
|
|
3652
|
-
lineBreak:
|
|
3653
|
-
lineBreakG:
|
|
3654
|
-
nonASCIIwhitespace:
|
|
3655
|
-
};
|
|
3656
|
-
function
|
|
3644
|
+
isIdentifierChar: we,
|
|
3645
|
+
isIdentifierStart: ye,
|
|
3646
|
+
Token: Tt,
|
|
3647
|
+
isNewLine: je,
|
|
3648
|
+
lineBreak: Y,
|
|
3649
|
+
lineBreakG: Ai,
|
|
3650
|
+
nonASCIIwhitespace: Ht
|
|
3651
|
+
};
|
|
3652
|
+
function Or(e, t) {
|
|
3657
3653
|
return H.parse(e, t);
|
|
3658
3654
|
}
|
|
3659
|
-
function
|
|
3655
|
+
function Rr(e, t, s) {
|
|
3660
3656
|
return H.parseExpressionAt(e, t, s);
|
|
3661
3657
|
}
|
|
3662
|
-
function
|
|
3658
|
+
function Mr(e, t) {
|
|
3663
3659
|
return H.tokenizer(e, t);
|
|
3664
3660
|
}
|
|
3665
|
-
const
|
|
3661
|
+
const Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3666
3662
|
__proto__: null,
|
|
3667
3663
|
Node: nt,
|
|
3668
3664
|
Parser: H,
|
|
3669
|
-
Position:
|
|
3665
|
+
Position: qe,
|
|
3670
3666
|
SourceLocation: rt,
|
|
3671
|
-
TokContext:
|
|
3672
|
-
Token:
|
|
3667
|
+
TokContext: Q,
|
|
3668
|
+
Token: Tt,
|
|
3673
3669
|
TokenType: O,
|
|
3674
|
-
defaultOptions:
|
|
3675
|
-
getLineInfo:
|
|
3676
|
-
isIdentifierChar:
|
|
3677
|
-
isIdentifierStart:
|
|
3678
|
-
isNewLine:
|
|
3679
|
-
keywordTypes:
|
|
3680
|
-
lineBreak:
|
|
3681
|
-
lineBreakG:
|
|
3682
|
-
nonASCIIwhitespace:
|
|
3683
|
-
parse:
|
|
3684
|
-
parseExpressionAt:
|
|
3670
|
+
defaultOptions: lt,
|
|
3671
|
+
getLineInfo: Gt,
|
|
3672
|
+
isIdentifierChar: we,
|
|
3673
|
+
isIdentifierStart: ye,
|
|
3674
|
+
isNewLine: je,
|
|
3675
|
+
keywordTypes: $e,
|
|
3676
|
+
lineBreak: Y,
|
|
3677
|
+
lineBreakG: Ai,
|
|
3678
|
+
nonASCIIwhitespace: Ht,
|
|
3679
|
+
parse: Or,
|
|
3680
|
+
parseExpressionAt: Rr,
|
|
3685
3681
|
tokContexts: F,
|
|
3686
3682
|
tokTypes: h,
|
|
3687
|
-
tokenizer:
|
|
3688
|
-
version:
|
|
3683
|
+
tokenizer: Mr,
|
|
3684
|
+
version: as
|
|
3689
3685
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3690
|
-
function
|
|
3686
|
+
function ci(e, t) {
|
|
3691
3687
|
for (var s = 0; s < t.length; s++) {
|
|
3692
3688
|
var a = t[s];
|
|
3693
3689
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, typeof (n = (function(p, f) {
|
|
@@ -3703,36 +3699,36 @@ function li(e, t) {
|
|
|
3703
3699
|
}
|
|
3704
3700
|
var n;
|
|
3705
3701
|
}
|
|
3706
|
-
function
|
|
3707
|
-
return
|
|
3702
|
+
function xt() {
|
|
3703
|
+
return xt = Object.assign ? Object.assign.bind() : function(e) {
|
|
3708
3704
|
for (var t = 1; t < arguments.length; t++) {
|
|
3709
3705
|
var s = arguments[t];
|
|
3710
3706
|
for (var a in s) Object.prototype.hasOwnProperty.call(s, a) && (e[a] = s[a]);
|
|
3711
3707
|
}
|
|
3712
3708
|
return e;
|
|
3713
|
-
},
|
|
3709
|
+
}, xt.apply(this, arguments);
|
|
3714
3710
|
}
|
|
3715
|
-
function
|
|
3716
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
3711
|
+
function pt(e, t) {
|
|
3712
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, jt(e, t);
|
|
3717
3713
|
}
|
|
3718
|
-
function
|
|
3719
|
-
return
|
|
3714
|
+
function jt(e, t) {
|
|
3715
|
+
return jt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(s, a) {
|
|
3720
3716
|
return s.__proto__ = a, s;
|
|
3721
|
-
},
|
|
3717
|
+
}, jt(e, t);
|
|
3722
3718
|
}
|
|
3723
|
-
function
|
|
3719
|
+
function pi(e, t) {
|
|
3724
3720
|
(t == null || t > e.length) && (t = e.length);
|
|
3725
3721
|
for (var s = 0, a = new Array(t); s < t; s++) a[s] = e[s];
|
|
3726
3722
|
return a;
|
|
3727
3723
|
}
|
|
3728
|
-
function
|
|
3724
|
+
function li(e, t) {
|
|
3729
3725
|
var s = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
3730
3726
|
if (s) return (s = s.call(e)).next.bind(s);
|
|
3731
3727
|
if (Array.isArray(e) || (s = (function(n, p) {
|
|
3732
3728
|
if (n) {
|
|
3733
|
-
if (typeof n == "string") return
|
|
3729
|
+
if (typeof n == "string") return pi(n, p);
|
|
3734
3730
|
var f = Object.prototype.toString.call(n).slice(8, -1);
|
|
3735
|
-
return f === "Object" && n.constructor && (f = n.constructor.name), f === "Map" || f === "Set" ? Array.from(n) : f === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f) ?
|
|
3731
|
+
return f === "Object" && n.constructor && (f = n.constructor.name), f === "Map" || f === "Set" ? Array.from(n) : f === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f) ? pi(n, p) : void 0;
|
|
3736
3732
|
}
|
|
3737
3733
|
})(e)) || t) {
|
|
3738
3734
|
s && (e = s);
|
|
@@ -3744,24 +3740,24 @@ function di(e, t) {
|
|
|
3744
3740
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3745
3741
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3746
3742
|
}
|
|
3747
|
-
var
|
|
3748
|
-
function
|
|
3743
|
+
var re = !0;
|
|
3744
|
+
function ae(e, t) {
|
|
3749
3745
|
return t === void 0 && (t = {}), new O("name", t);
|
|
3750
3746
|
}
|
|
3751
|
-
var
|
|
3752
|
-
function
|
|
3753
|
-
var t =
|
|
3747
|
+
var Vr = /* @__PURE__ */ new WeakMap();
|
|
3748
|
+
function jr(e) {
|
|
3749
|
+
var t = Vr.get(e.Parser.acorn || e);
|
|
3754
3750
|
if (!t) {
|
|
3755
|
-
var s = { assert:
|
|
3751
|
+
var s = { assert: ae(0, { startsExpr: re }), asserts: ae(0, { startsExpr: re }), global: ae(0, { startsExpr: re }), keyof: ae(0, { startsExpr: re }), readonly: ae(0, { startsExpr: re }), unique: ae(0, { startsExpr: re }), abstract: ae(0, { startsExpr: re }), declare: ae(0, { startsExpr: re }), enum: ae(0, { startsExpr: re }), module: ae(0, { startsExpr: re }), namespace: ae(0, { startsExpr: re }), interface: ae(0, { startsExpr: re }), type: ae(0, { startsExpr: re }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, n = { tc_oTag: new Q("<tag", !1, !1), tc_cTag: new Q("</tag", !1, !1), tc_expr: new Q("<tag>...</tag>", !0, !0) }, p = new RegExp("^(?:" + Object.keys(s).join("|") + ")$");
|
|
3756
3752
|
a.jsxTagStart.updateContext = function() {
|
|
3757
3753
|
this.context.push(n.tc_expr), this.context.push(n.tc_oTag), this.exprAllowed = !1;
|
|
3758
3754
|
}, a.jsxTagEnd.updateContext = function(f) {
|
|
3759
3755
|
var v = this.context.pop();
|
|
3760
3756
|
v === n.tc_oTag && f === h.slash || v === n.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === n.tc_expr) : this.exprAllowed = !0;
|
|
3761
|
-
}, t = { tokTypes:
|
|
3762
|
-
return [h.name, h.string, h.num].concat(Object.values(
|
|
3757
|
+
}, t = { tokTypes: xt({}, s, a), tokContexts: xt({}, n), keywordsRegExp: p, tokenIsLiteralPropertyName: function(f) {
|
|
3758
|
+
return [h.name, h.string, h.num].concat(Object.values($e), Object.values(s)).includes(f);
|
|
3763
3759
|
}, tokenIsKeywordOrIdentifier: function(f) {
|
|
3764
|
-
return [h.name].concat(Object.values(
|
|
3760
|
+
return [h.name].concat(Object.values($e), Object.values(s)).includes(f);
|
|
3765
3761
|
}, tokenIsIdentifier: function(f) {
|
|
3766
3762
|
return [].concat(Object.values(s), [h.name]).includes(f);
|
|
3767
3763
|
}, tokenIsTSDeclarationStart: function(f) {
|
|
@@ -3774,14 +3770,14 @@ function Fr(e) {
|
|
|
3774
3770
|
}
|
|
3775
3771
|
return t;
|
|
3776
3772
|
}
|
|
3777
|
-
var
|
|
3773
|
+
var Qe = 1024, Fr = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"), fi = new RegExp("(?=(" + Fr.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"), Je = function() {
|
|
3778
3774
|
this.shorthandAssign = void 0, this.trailingComma = void 0, this.parenthesizedAssign = void 0, this.parenthesizedBind = void 0, this.doubleProto = void 0, this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3779
3775
|
};
|
|
3780
|
-
function
|
|
3776
|
+
function Br(e, t) {
|
|
3781
3777
|
var s = t.key.name, a = e[s], n = "true";
|
|
3782
3778
|
return t.type !== "MethodDefinition" || t.kind !== "get" && t.kind !== "set" || (n = (t.static ? "s" : "i") + t.kind), a === "iget" && n === "iset" || a === "iset" && n === "iget" || a === "sget" && n === "sset" || a === "sset" && n === "sget" ? (e[s] = "true", !1) : !!a || (e[s] = n, !1);
|
|
3783
3779
|
}
|
|
3784
|
-
function
|
|
3780
|
+
function di(e, t) {
|
|
3785
3781
|
var s = e.key;
|
|
3786
3782
|
return !e.computed && (s.type === "Identifier" && s.name === t || s.type === "Literal" && s.value === t);
|
|
3787
3783
|
}
|
|
@@ -3822,53 +3818,53 @@ var A = { AbstractMethodHasImplementation: function(e) {
|
|
|
3822
3818
|
return "Single type parameter " + t + " should have a trailing comma. Example usage: <" + t + ",>.";
|
|
3823
3819
|
}, StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", GenericsEndWithComma: "Trailing comma is not allowed at the end of generics.", UnexpectedTypeAnnotation: "Did not expect a type annotation here.", UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", UnsupportedSignatureParameterKind: function(e) {
|
|
3824
3820
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
3825
|
-
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
|
|
3826
|
-
function
|
|
3827
|
-
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ?
|
|
3821
|
+
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Ur = { quot: '"', amp: "&", apos: "'", lt: "<", gt: ">", nbsp: " ", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", Agrave: "À", Aacute: "Á", Acirc: "Â", Atilde: "Ã", Auml: "Ä", Aring: "Å", AElig: "Æ", Ccedil: "Ç", Egrave: "È", Eacute: "É", Ecirc: "Ê", Euml: "Ë", Igrave: "Ì", Iacute: "Í", Icirc: "Î", Iuml: "Ï", ETH: "Ð", Ntilde: "Ñ", Ograve: "Ò", Oacute: "Ó", Ocirc: "Ô", Otilde: "Õ", Ouml: "Ö", times: "×", Oslash: "Ø", Ugrave: "Ù", Uacute: "Ú", Ucirc: "Û", Uuml: "Ü", Yacute: "Ý", THORN: "Þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", divide: "÷", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", OElig: "Œ", oelig: "œ", Scaron: "Š", scaron: "š", Yuml: "Ÿ", fnof: "ƒ", circ: "ˆ", tilde: "˜", Alpha: "Α", Beta: "Β", Gamma: "Γ", Delta: "Δ", Epsilon: "Ε", Zeta: "Ζ", Eta: "Η", Theta: "Θ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Xi: "Ξ", Omicron: "Ο", Pi: "Π", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Upsilon: "Υ", Phi: "Φ", Chi: "Χ", Psi: "Ψ", Omega: "Ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "ϒ", piv: "ϖ", ensp: " ", emsp: " ", thinsp: " ", zwnj: "", zwj: "", lrm: "", rlm: "", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", Dagger: "‡", bull: "•", hellip: "…", permil: "‰", prime: "′", Prime: "″", lsaquo: "‹", rsaquo: "›", oline: "‾", frasl: "⁄", euro: "€", image: "ℑ", weierp: "℘", real: "ℜ", trade: "™", alefsym: "ℵ", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lArr: "⇐", uArr: "⇑", rArr: "⇒", dArr: "⇓", hArr: "⇔", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "∧", or: "∨", cap: "∩", cup: "∪", int: "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", lang: "〈", rang: "〉", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦" }, $r = /^[\da-fA-F]+$/, qr = /^\d+$/;
|
|
3822
|
+
function et(e) {
|
|
3823
|
+
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? et(e.object) + "." + et(e.property) : void 0);
|
|
3828
3824
|
}
|
|
3829
|
-
var
|
|
3830
|
-
function
|
|
3825
|
+
var Ot = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
3826
|
+
function mi(e) {
|
|
3831
3827
|
if (!e) throw new Error("Assert fail");
|
|
3832
3828
|
}
|
|
3833
|
-
function
|
|
3829
|
+
function Hr(e) {
|
|
3834
3830
|
return e === "accessor";
|
|
3835
3831
|
}
|
|
3836
|
-
function
|
|
3832
|
+
function Gr(e) {
|
|
3837
3833
|
return e === "in" || e === "out";
|
|
3838
3834
|
}
|
|
3839
|
-
function
|
|
3835
|
+
function Rt(e, t) {
|
|
3840
3836
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
3841
3837
|
}
|
|
3842
|
-
function
|
|
3838
|
+
function Kr(e) {
|
|
3843
3839
|
if (e.type !== "MemberExpression") return !1;
|
|
3844
3840
|
var t = e.property;
|
|
3845
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
3841
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && ns(e.object);
|
|
3846
3842
|
}
|
|
3847
|
-
function
|
|
3848
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed &&
|
|
3843
|
+
function ns(e) {
|
|
3844
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && ns(e.object);
|
|
3849
3845
|
}
|
|
3850
|
-
function
|
|
3846
|
+
function yi(e) {
|
|
3851
3847
|
return e === "private" || e === "public" || e === "protected";
|
|
3852
3848
|
}
|
|
3853
|
-
function
|
|
3849
|
+
function Wr(e) {
|
|
3854
3850
|
var t = {}, s = t.dts, a = s !== void 0 && s, n = t.allowSatisfies, p = n !== void 0 && n;
|
|
3855
3851
|
return function(f) {
|
|
3856
|
-
var v = f.acorn ||
|
|
3857
|
-
function
|
|
3858
|
-
|
|
3859
|
-
for (var G =
|
|
3852
|
+
var v = f.acorn || Dr, x = jr(v), o = v.tokTypes, S = v.keywordTypes, I = v.isIdentifierStart, B = v.lineBreak, oe = v.isNewLine, de = v.tokContexts, Be = v.isIdentifierChar, _ = x.tokTypes, ee = x.tokContexts, Ct = x.keywordsRegExp, cs = x.tokenIsLiteralPropertyName, ps = x.tokenIsTemplate, ls = x.tokenIsTSDeclarationStart, j = x.tokenIsIdentifier, ut = x.tokenIsKeywordOrIdentifier, fs = x.tokenIsTSTypeOperator;
|
|
3853
|
+
function ds(T, te, X) {
|
|
3854
|
+
X === void 0 && (X = T.length);
|
|
3855
|
+
for (var G = te; G < X; G++) {
|
|
3860
3856
|
var D = T.charCodeAt(G);
|
|
3861
|
-
if (
|
|
3857
|
+
if (oe(D)) return G < X - 1 && D === 13 && T.charCodeAt(G + 1) === 10 ? G + 2 : G + 1;
|
|
3862
3858
|
}
|
|
3863
3859
|
return -1;
|
|
3864
3860
|
}
|
|
3865
|
-
f = (function(T,
|
|
3866
|
-
var G =
|
|
3861
|
+
f = (function(T, te, X) {
|
|
3862
|
+
var G = X.tokTypes, D = te.tokTypes;
|
|
3867
3863
|
return (function(l) {
|
|
3868
3864
|
function i() {
|
|
3869
3865
|
return l.apply(this, arguments) || this;
|
|
3870
3866
|
}
|
|
3871
|
-
|
|
3867
|
+
pt(i, l);
|
|
3872
3868
|
var r = i.prototype;
|
|
3873
3869
|
return r.takeDecorators = function(u) {
|
|
3874
3870
|
var c = this.decoratorStack[this.decoratorStack.length - 1];
|
|
@@ -3890,8 +3886,8 @@ function zr(e) {
|
|
|
3890
3886
|
b.expression = c, c = this.finishNode(b, "ParenthesizedExpression");
|
|
3891
3887
|
}
|
|
3892
3888
|
} else for (c = this.parseIdent(!1); this.eat(G.dot); ) {
|
|
3893
|
-
var
|
|
3894
|
-
|
|
3889
|
+
var P = this.startNodeAt(d, m);
|
|
3890
|
+
P.object = c, P.property = this.parseIdent(!0), P.computed = !1, c = this.finishNode(P, "MemberExpression");
|
|
3895
3891
|
}
|
|
3896
3892
|
return u.expression = this.parseMaybeDecoratorArguments(c), this.decoratorStack.pop(), this.finishNode(u, "Decorator");
|
|
3897
3893
|
}, r.parseMaybeDecoratorArguments = function(u) {
|
|
@@ -3902,13 +3898,13 @@ function zr(e) {
|
|
|
3902
3898
|
return u;
|
|
3903
3899
|
}, i;
|
|
3904
3900
|
})(T);
|
|
3905
|
-
})(f, x, v), f = (function(T,
|
|
3906
|
-
var D = T.tokTypes, l =
|
|
3901
|
+
})(f, x, v), f = (function(T, te, X, G) {
|
|
3902
|
+
var D = T.tokTypes, l = te.tokTypes, i = T.isNewLine, r = T.isIdentifierChar, u = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
3907
3903
|
return (function(c) {
|
|
3908
3904
|
function d() {
|
|
3909
3905
|
return c.apply(this, arguments) || this;
|
|
3910
3906
|
}
|
|
3911
|
-
|
|
3907
|
+
pt(d, c);
|
|
3912
3908
|
var m = d.prototype;
|
|
3913
3909
|
return m.jsx_readToken = function() {
|
|
3914
3910
|
for (var y = "", g = this.pos; ; ) {
|
|
@@ -3936,20 +3932,20 @@ function zr(e) {
|
|
|
3936
3932
|
}, m.jsx_readString = function(y) {
|
|
3937
3933
|
for (var g = "", b = ++this.pos; ; ) {
|
|
3938
3934
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3939
|
-
var
|
|
3940
|
-
if (
|
|
3941
|
-
|
|
3935
|
+
var P = this.input.charCodeAt(this.pos);
|
|
3936
|
+
if (P === y) break;
|
|
3937
|
+
P === 38 ? (g += this.input.slice(b, this.pos), g += this.jsx_readEntity(), b = this.pos) : i(P) ? (g += this.input.slice(b, this.pos), g += this.jsx_readNewLine(!1), b = this.pos) : ++this.pos;
|
|
3942
3938
|
}
|
|
3943
3939
|
return g += this.input.slice(b, this.pos++), this.finishToken(D.string, g);
|
|
3944
3940
|
}, m.jsx_readEntity = function() {
|
|
3945
|
-
var y, g = "", b = 0,
|
|
3946
|
-
|
|
3941
|
+
var y, g = "", b = 0, P = this.input[this.pos];
|
|
3942
|
+
P !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
3947
3943
|
for (var E = ++this.pos; this.pos < this.input.length && b++ < 10; ) {
|
|
3948
|
-
if ((
|
|
3949
|
-
g[0] === "#" ? g[1] === "x" ? (g = g.substr(2),
|
|
3944
|
+
if ((P = this.input[this.pos++]) === ";") {
|
|
3945
|
+
g[0] === "#" ? g[1] === "x" ? (g = g.substr(2), $r.test(g) && (y = String.fromCharCode(parseInt(g, 16)))) : (g = g.substr(1), qr.test(g) && (y = String.fromCharCode(parseInt(g, 10)))) : y = Ur[g];
|
|
3950
3946
|
break;
|
|
3951
3947
|
}
|
|
3952
|
-
g +=
|
|
3948
|
+
g += P;
|
|
3953
3949
|
}
|
|
3954
3950
|
return y || (this.pos = E, "&");
|
|
3955
3951
|
}, m.jsx_readWord = function() {
|
|
@@ -3964,14 +3960,14 @@ function zr(e) {
|
|
|
3964
3960
|
}, m.jsx_parseNamespacedName = function() {
|
|
3965
3961
|
var y = this.start, g = this.startLoc, b = this.jsx_parseIdentifier();
|
|
3966
3962
|
if (!u.allowNamespaces || !this.eat(D.colon)) return b;
|
|
3967
|
-
var
|
|
3968
|
-
return
|
|
3963
|
+
var P = this.startNodeAt(y, g);
|
|
3964
|
+
return P.namespace = b, P.name = this.jsx_parseIdentifier(), this.finishNode(P, "JSXNamespacedName");
|
|
3969
3965
|
}, m.jsx_parseElementName = function() {
|
|
3970
3966
|
if (this.type === l.jsxTagEnd) return "";
|
|
3971
3967
|
var y = this.start, g = this.startLoc, b = this.jsx_parseNamespacedName();
|
|
3972
3968
|
for (this.type !== D.dot || b.type !== "JSXNamespacedName" || u.allowNamespacedObjects || this.unexpected(); this.eat(D.dot); ) {
|
|
3973
|
-
var
|
|
3974
|
-
|
|
3969
|
+
var P = this.startNodeAt(y, g);
|
|
3970
|
+
P.object = b, P.property = this.jsx_parseIdentifier(), b = this.finishNode(P, "JSXMemberExpression");
|
|
3975
3971
|
}
|
|
3976
3972
|
return b;
|
|
3977
3973
|
}, m.jsx_parseAttributeValue = function() {
|
|
@@ -3997,14 +3993,14 @@ function zr(e) {
|
|
|
3997
3993
|
}, m.jsx_parseOpeningElementAt = function(y, g) {
|
|
3998
3994
|
var b = this.startNodeAt(y, g);
|
|
3999
3995
|
b.attributes = [];
|
|
4000
|
-
var
|
|
4001
|
-
for (
|
|
4002
|
-
return b.selfClosing = this.eat(D.slash), this.expect(l.jsxTagEnd), this.finishNode(b,
|
|
3996
|
+
var P = this.jsx_parseElementName();
|
|
3997
|
+
for (P && (b.name = P); this.type !== D.slash && this.type !== l.jsxTagEnd; ) b.attributes.push(this.jsx_parseAttribute());
|
|
3998
|
+
return b.selfClosing = this.eat(D.slash), this.expect(l.jsxTagEnd), this.finishNode(b, P ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
4003
3999
|
}, m.jsx_parseClosingElementAt = function(y, g) {
|
|
4004
|
-
var b = this.startNodeAt(y, g),
|
|
4005
|
-
return
|
|
4000
|
+
var b = this.startNodeAt(y, g), P = this.jsx_parseElementName();
|
|
4001
|
+
return P && (b.name = P), this.expect(l.jsxTagEnd), this.finishNode(b, P ? "JSXClosingElement" : "JSXClosingFragment");
|
|
4006
4002
|
}, m.jsx_parseElementAt = function(y, g) {
|
|
4007
|
-
var b = this.startNodeAt(y, g),
|
|
4003
|
+
var b = this.startNodeAt(y, g), P = [], E = this.jsx_parseOpeningElementAt(y, g), L = null;
|
|
4008
4004
|
if (!E.selfClosing) {
|
|
4009
4005
|
e: for (; ; ) switch (this.type) {
|
|
4010
4006
|
case l.jsxTagStart:
|
|
@@ -4012,21 +4008,21 @@ function zr(e) {
|
|
|
4012
4008
|
L = this.jsx_parseClosingElementAt(y, g);
|
|
4013
4009
|
break e;
|
|
4014
4010
|
}
|
|
4015
|
-
|
|
4011
|
+
P.push(this.jsx_parseElementAt(y, g));
|
|
4016
4012
|
break;
|
|
4017
4013
|
case l.jsxText:
|
|
4018
|
-
|
|
4014
|
+
P.push(this.parseExprAtom());
|
|
4019
4015
|
break;
|
|
4020
4016
|
case D.braceL:
|
|
4021
|
-
|
|
4017
|
+
P.push(this.jsx_parseExpressionContainer());
|
|
4022
4018
|
break;
|
|
4023
4019
|
default:
|
|
4024
4020
|
this.unexpected();
|
|
4025
4021
|
}
|
|
4026
|
-
|
|
4022
|
+
et(L.name) !== et(E.name) && this.raise(L.start, "Expected corresponding JSX closing tag for <" + et(E.name) + ">");
|
|
4027
4023
|
}
|
|
4028
4024
|
var k = E.name ? "Element" : "Fragment";
|
|
4029
|
-
return b["opening" + k] = E, b["closing" + k] = L, b.children =
|
|
4025
|
+
return b["opening" + k] = E, b["closing" + k] = L, b.children = P, this.type === D.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(b, "JSX" + k);
|
|
4030
4026
|
}, m.jsx_parseText = function() {
|
|
4031
4027
|
var y = this.parseLiteral(this.value);
|
|
4032
4028
|
return y.type = "JSXText", y;
|
|
@@ -4034,14 +4030,14 @@ function zr(e) {
|
|
|
4034
4030
|
var y = this.start, g = this.startLoc;
|
|
4035
4031
|
return this.next(), this.jsx_parseElementAt(y, g);
|
|
4036
4032
|
}, d;
|
|
4037
|
-
})(
|
|
4038
|
-
})(v, x, f), f = (function(T,
|
|
4039
|
-
var G =
|
|
4033
|
+
})(X);
|
|
4034
|
+
})(v, x, f), f = (function(T, te, X) {
|
|
4035
|
+
var G = te.tokTypes, D = X.tokTypes;
|
|
4040
4036
|
return (function(l) {
|
|
4041
4037
|
function i() {
|
|
4042
4038
|
return l.apply(this, arguments) || this;
|
|
4043
4039
|
}
|
|
4044
|
-
|
|
4040
|
+
pt(i, l);
|
|
4045
4041
|
var r = i.prototype;
|
|
4046
4042
|
return r.parseMaybeImportAttributes = function(u) {
|
|
4047
4043
|
if (this.type === D._with || this.type === G.assert) {
|
|
@@ -4064,26 +4060,26 @@ function zr(e) {
|
|
|
4064
4060
|
}, i;
|
|
4065
4061
|
})(T);
|
|
4066
4062
|
})(f, x, v);
|
|
4067
|
-
var
|
|
4068
|
-
function
|
|
4063
|
+
var ms = /* @__PURE__ */ (function(T) {
|
|
4064
|
+
function te(i, r, u) {
|
|
4069
4065
|
var c;
|
|
4070
4066
|
return (c = T.call(this, i, r, u) || this).preValue = null, c.preToken = null, c.isLookahead = !1, c.isAmbientContext = !1, c.inAbstractClass = !1, c.inType = !1, c.inDisallowConditionalTypesContext = !1, c.maybeInArrowParameters = !1, c.shouldParseArrowReturnType = void 0, c.shouldParseAsyncArrowReturnType = void 0, c.decoratorStack = [[]], c.importsStack = [[]], c.importOrExportOuterKind = void 0, c.tsParseConstModifier = c.tsParseModifiers.bind((function(d) {
|
|
4071
4067
|
if (d === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4072
4068
|
return d;
|
|
4073
4069
|
})(c), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: A.InvalidModifierOnTypeParameterPositions }), c;
|
|
4074
4070
|
}
|
|
4075
|
-
|
|
4076
|
-
var
|
|
4071
|
+
pt(te, T);
|
|
4072
|
+
var X, G, D, l = te.prototype;
|
|
4077
4073
|
return l.getTokenFromCodeInType = function(i) {
|
|
4078
4074
|
return i === 62 || i === 60 ? this.finishOp(o.relational, 1) : T.prototype.getTokenFromCode.call(this, i);
|
|
4079
4075
|
}, l.readToken = function(i) {
|
|
4080
4076
|
if (!this.inType) {
|
|
4081
4077
|
var r = this.curContext();
|
|
4082
|
-
if (r ===
|
|
4083
|
-
if (r ===
|
|
4078
|
+
if (r === ee.tc_expr) return this.jsx_readToken();
|
|
4079
|
+
if (r === ee.tc_oTag || r === ee.tc_cTag) {
|
|
4084
4080
|
if (I(i)) return this.jsx_readWord();
|
|
4085
4081
|
if (i == 62) return ++this.pos, this.finishToken(_.jsxTagEnd);
|
|
4086
|
-
if ((i === 34 || i === 39) && r ==
|
|
4082
|
+
if ((i === 34 || i === 39) && r == ee.tc_oTag) return this.jsx_readString(i);
|
|
4087
4083
|
}
|
|
4088
4084
|
if (i === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) return ++this.pos, this.finishToken(_.jsxTagStart);
|
|
4089
4085
|
}
|
|
@@ -4123,7 +4119,7 @@ function zr(e) {
|
|
|
4123
4119
|
return this.nextTokenStartSince(this.pos);
|
|
4124
4120
|
}, l.tsHasSomeModifiers = function(i, r) {
|
|
4125
4121
|
return r.some(function(u) {
|
|
4126
|
-
return
|
|
4122
|
+
return yi(u) ? i.accessibility === u : !!i[u];
|
|
4127
4123
|
});
|
|
4128
4124
|
}, l.tsIsStartOfStaticBlocks = function() {
|
|
4129
4125
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
@@ -4165,13 +4161,13 @@ function zr(e) {
|
|
|
4165
4161
|
var u = i + r.length;
|
|
4166
4162
|
if (this.input.slice(i, u) === r) {
|
|
4167
4163
|
var c = this.input.charCodeAt(u);
|
|
4168
|
-
return !(
|
|
4164
|
+
return !(Be(c) || (64512 & c) == 55296);
|
|
4169
4165
|
}
|
|
4170
4166
|
return !1;
|
|
4171
4167
|
}, l.isAbstractConstructorSignature = function() {
|
|
4172
4168
|
return this.ts_isContextual(_.abstract) && this.lookahead().type === o._new;
|
|
4173
4169
|
}, l.nextTokenStartSince = function(i) {
|
|
4174
|
-
return
|
|
4170
|
+
return Ot.lastIndex = i, Ot.test(this.input) ? Ot.lastIndex : i;
|
|
4175
4171
|
}, l.lookaheadCharCode = function() {
|
|
4176
4172
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
4177
4173
|
}, l.compareLookaheadState = function(i, r) {
|
|
@@ -4200,17 +4196,17 @@ function zr(e) {
|
|
|
4200
4196
|
return this.setLookaheadState(r), c;
|
|
4201
4197
|
}, l.readWord = function() {
|
|
4202
4198
|
var i = this.readWord1(), r = o.name;
|
|
4203
|
-
return this.keywords.test(i) ? r =
|
|
4199
|
+
return this.keywords.test(i) ? r = S[i] : new RegExp(Ct).test(i) && (r = _[i]), this.finishToken(r, i);
|
|
4204
4200
|
}, l.skipBlockComment = function() {
|
|
4205
4201
|
var i;
|
|
4206
4202
|
this.isLookahead || (i = this.options.onComment && this.curPosition());
|
|
4207
4203
|
var r = this.pos, u = this.input.indexOf("*/", this.pos += 2);
|
|
4208
|
-
if (u === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = u + 2, this.options.locations) for (var c, d = r; (c =
|
|
4204
|
+
if (u === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = u + 2, this.options.locations) for (var c, d = r; (c = ds(this.input, d, this.pos)) > -1; ) ++this.curLine, d = this.lineStart = c;
|
|
4209
4205
|
this.isLookahead || this.options.onComment && this.options.onComment(!0, this.input.slice(r + 2, u), r, this.pos, i, this.curPosition());
|
|
4210
4206
|
}, l.skipLineComment = function(i) {
|
|
4211
4207
|
var r, u = this.pos;
|
|
4212
4208
|
this.isLookahead || (r = this.options.onComment && this.curPosition());
|
|
4213
|
-
for (var c = this.input.charCodeAt(this.pos += i); this.pos < this.input.length && !
|
|
4209
|
+
for (var c = this.input.charCodeAt(this.pos += i); this.pos < this.input.length && !oe(c); ) c = this.input.charCodeAt(++this.pos);
|
|
4214
4210
|
this.isLookahead || this.options.onComment && this.options.onComment(!1, this.input.slice(u + i, this.pos), u, this.pos, r, this.curPosition());
|
|
4215
4211
|
}, l.finishToken = function(i, r) {
|
|
4216
4212
|
this.preValue = this.value, this.preToken = this.type, this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
@@ -4221,14 +4217,14 @@ function zr(e) {
|
|
|
4221
4217
|
}, l.isLineTerminator = function() {
|
|
4222
4218
|
return this.eat(o.semi) || T.prototype.canInsertSemicolon.call(this);
|
|
4223
4219
|
}, l.hasFollowingLineBreak = function() {
|
|
4224
|
-
return
|
|
4220
|
+
return fi.lastIndex = this.end, fi.test(this.input);
|
|
4225
4221
|
}, l.addExtra = function(i, r, u, c) {
|
|
4226
4222
|
if (c === void 0 && (c = !0), i) {
|
|
4227
4223
|
var d = i.extra = i.extra || {};
|
|
4228
4224
|
c ? d[r] = u : Object.defineProperty(d, r, { enumerable: c, value: u });
|
|
4229
4225
|
}
|
|
4230
4226
|
}, l.isLiteralPropertyName = function() {
|
|
4231
|
-
return
|
|
4227
|
+
return cs(this.type);
|
|
4232
4228
|
}, l.hasPrecedingLineBreak = function() {
|
|
4233
4229
|
return B.test(this.input.slice(this.lastTokEndLoc.index, this.start));
|
|
4234
4230
|
}, l.createIdentifier = function(i, r) {
|
|
@@ -4271,7 +4267,7 @@ function zr(e) {
|
|
|
4271
4267
|
}
|
|
4272
4268
|
return !1;
|
|
4273
4269
|
}, l.ts_eatContextualWithState = function(i, r, u) {
|
|
4274
|
-
if (
|
|
4270
|
+
if (Ct.test(i)) {
|
|
4275
4271
|
if (this.ts_isContextualWithState(u, _[i])) {
|
|
4276
4272
|
for (var c = 0; c < r; c++) this.next();
|
|
4277
4273
|
return !0;
|
|
@@ -4284,7 +4280,7 @@ function zr(e) {
|
|
|
4284
4280
|
}, l.canHaveLeadingDecorator = function() {
|
|
4285
4281
|
return this.match(o._class);
|
|
4286
4282
|
}, l.eatContextual = function(i) {
|
|
4287
|
-
return
|
|
4283
|
+
return Ct.test(i) ? !!this.ts_isContextual(_[i]) && (this.next(), !0) : T.prototype.eatContextual.call(this, i);
|
|
4288
4284
|
}, l.tsIsExternalModuleReference = function() {
|
|
4289
4285
|
return this.isContextual("require") && this.lookaheadCharCode() === 40;
|
|
4290
4286
|
}, l.tsParseExternalModuleReference = function() {
|
|
@@ -4310,7 +4306,7 @@ function zr(e) {
|
|
|
4310
4306
|
}
|
|
4311
4307
|
return this.next(), T.prototype.exitScope.call(this), this.finishNode(i, "TSModuleBlock");
|
|
4312
4308
|
}, l.tsParseAmbientExternalModuleDeclaration = function(i) {
|
|
4313
|
-
return this.ts_isContextual(_.global) ? (i.global = !0, i.id = this.parseIdent()) : this.match(o.string) ? i.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (T.prototype.enterScope.call(this,
|
|
4309
|
+
return this.ts_isContextual(_.global) ? (i.global = !0, i.id = this.parseIdent()) : this.match(o.string) ? i.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (T.prototype.enterScope.call(this, Qe), i.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this)) : T.prototype.semicolon.call(this), this.finishNode(i, "TSModuleDeclaration");
|
|
4314
4310
|
}, l.tsTryParseDeclare = function(i) {
|
|
4315
4311
|
var r = this;
|
|
4316
4312
|
if (!this.isLineTerminator()) {
|
|
@@ -4638,7 +4634,7 @@ function zr(e) {
|
|
|
4638
4634
|
return i;
|
|
4639
4635
|
}, l.tsParseTypeOperatorOrHigher = function() {
|
|
4640
4636
|
var i = this;
|
|
4641
|
-
return
|
|
4637
|
+
return fs(this.type) && !this.containsEsc ? this.tsParseTypeOperator() : this.isContextual("infer") ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(function() {
|
|
4642
4638
|
return i.tsParseArrayTypeOrHigher();
|
|
4643
4639
|
});
|
|
4644
4640
|
}, l.tsParseIntersectionTypeOrHigher = function() {
|
|
@@ -4649,7 +4645,7 @@ function zr(e) {
|
|
|
4649
4645
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(o._new) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
4650
4646
|
}, l.tsParseType = function() {
|
|
4651
4647
|
var i = this;
|
|
4652
|
-
|
|
4648
|
+
mi(this.inType);
|
|
4653
4649
|
var r = this.tsParseNonConditionalType();
|
|
4654
4650
|
if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(o._extends)) return r;
|
|
4655
4651
|
var u = this.startNodeAtNode(r);
|
|
@@ -4712,14 +4708,14 @@ function zr(e) {
|
|
|
4712
4708
|
r[m] = u[m];
|
|
4713
4709
|
}
|
|
4714
4710
|
}, l.tsParseModifiers = function(i) {
|
|
4715
|
-
for (var r = this, u = i.modified, c = i.allowedModifiers, d = i.disallowedModifiers, m = i.stopOnStartOfClassStaticBlock, y = i.errorTemplate, g = y === void 0 ? A.InvalidModifierOnTypeMember : y, b = {},
|
|
4716
|
-
U === q && u[
|
|
4717
|
-
}, E = function($, U, q,
|
|
4718
|
-
(u[q] && U ===
|
|
4711
|
+
for (var r = this, u = i.modified, c = i.allowedModifiers, d = i.disallowedModifiers, m = i.stopOnStartOfClassStaticBlock, y = i.errorTemplate, g = y === void 0 ? A.InvalidModifierOnTypeMember : y, b = {}, P = function($, U, q, K) {
|
|
4712
|
+
U === q && u[K] && r.raise($.column, A.InvalidModifiersOrder({ orderedModifiers: [q, K] }));
|
|
4713
|
+
}, E = function($, U, q, K) {
|
|
4714
|
+
(u[q] && U === K || u[K] && U === q) && r.raise($.column, A.IncompatibleModifiers({ modifiers: [q, K] }));
|
|
4719
4715
|
}; ; ) {
|
|
4720
4716
|
var L = this.startLoc, k = this.tsParseModifier(c.concat(d ?? []), m);
|
|
4721
4717
|
if (!k) break;
|
|
4722
|
-
|
|
4718
|
+
yi(k) ? u.accessibility ? this.raise(this.start, A.DuplicateAccessibilityModifier()) : (P(L, k, k, "override"), P(L, k, k, "static"), P(L, k, k, "readonly"), P(L, k, k, "accessor"), b.accessibility = k, u.accessibility = k) : Gr(k) ? u[k] ? this.raise(this.start, A.DuplicateModifier({ modifier: k })) : (P(L, k, "in", "out"), b[k] = k, u[k] = !0) : Hr(k) ? u[k] ? this.raise(this.start, A.DuplicateModifier({ modifier: k })) : (E(L, k, "accessor", "readonly"), E(L, k, "accessor", "static"), E(L, k, "accessor", "override"), b[k] = k, u[k] = !0) : Object.hasOwnProperty.call(u, k) ? this.raise(this.start, A.DuplicateModifier({ modifier: k })) : (P(L, k, "static", "readonly"), P(L, k, "static", "override"), P(L, k, "override", "readonly"), P(L, k, "abstract", "override"), E(L, k, "declare", "override"), E(L, k, "static", "abstract"), b[k] = k, u[k] = !0), d != null && d.includes(k) && this.raise(this.start, g);
|
|
4723
4719
|
}
|
|
4724
4720
|
return b;
|
|
4725
4721
|
}, l.tsParseInOutModifiers = function(i) {
|
|
@@ -4795,7 +4791,7 @@ function zr(e) {
|
|
|
4795
4791
|
if (!this.hasFollowingLineBreak()) return i.abstract = !0, this.tsParseInterfaceDeclaration(i);
|
|
4796
4792
|
} else this.unexpected(i.start);
|
|
4797
4793
|
}, l.tsIsDeclarationStart = function() {
|
|
4798
|
-
return
|
|
4794
|
+
return ls(this.type);
|
|
4799
4795
|
}, l.tsParseExpressionStatement = function(i, r) {
|
|
4800
4796
|
switch (r.name) {
|
|
4801
4797
|
case "declare":
|
|
@@ -4804,7 +4800,7 @@ function zr(e) {
|
|
|
4804
4800
|
break;
|
|
4805
4801
|
case "global":
|
|
4806
4802
|
if (this.match(o.braceL)) {
|
|
4807
|
-
T.prototype.enterScope.call(this,
|
|
4803
|
+
T.prototype.enterScope.call(this, Qe);
|
|
4808
4804
|
var c = i;
|
|
4809
4805
|
return c.global = !0, c.id = r, c.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this), this.finishNode(c, "TSModuleDeclaration");
|
|
4810
4806
|
}
|
|
@@ -4844,7 +4840,7 @@ function zr(e) {
|
|
|
4844
4840
|
if (r === void 0 && (r = !1), i.id = this.parseIdent(), r || this.checkLValSimple(i.id, 8), this.eat(o.dot)) {
|
|
4845
4841
|
var u = this.startNode();
|
|
4846
4842
|
this.tsParseModuleOrNamespaceDeclaration(u, !0), i.body = u;
|
|
4847
|
-
} else T.prototype.enterScope.call(this,
|
|
4843
|
+
} else T.prototype.enterScope.call(this, Qe), i.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this);
|
|
4848
4844
|
return this.finishNode(i, "TSModuleDeclaration");
|
|
4849
4845
|
}, l.checkLValSimple = function(i, r, u) {
|
|
4850
4846
|
return r === void 0 && (r = 0), T.prototype.checkLValSimple.call(this, i, r, u);
|
|
@@ -4906,9 +4902,9 @@ function zr(e) {
|
|
|
4906
4902
|
}, l.parseFunction = function(i, r, u, c, d) {
|
|
4907
4903
|
this.initFunction(i), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !c) && (this.type === o.star && 2 & r && this.unexpected(), i.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (i.async = !!c), 1 & r && (i.id = 4 & r && this.type !== o.name ? null : this.parseIdent());
|
|
4908
4904
|
var m = this.yieldPos, y = this.awaitPos, g = this.awaitIdentPos, b = this.maybeInArrowParameters;
|
|
4909
|
-
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
4910
|
-
var
|
|
4911
|
-
return this.parseFunctionBody(i, u, !1, d, { isFunctionDeclaration:
|
|
4905
|
+
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Rt(i.async, i.generator)), 1 & r || (i.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(i);
|
|
4906
|
+
var P = 1 & r;
|
|
4907
|
+
return this.parseFunctionBody(i, u, !1, d, { isFunctionDeclaration: P }), this.yieldPos = m, this.awaitPos = y, this.awaitIdentPos = g, 1 & r && i.id && !(2 & r) && this.checkLValSimple(i.id, i.body ? this.strict || i.generator || i.async ? this.treatFunctionsAsVar ? 1 : 2 : 3 : 0), this.maybeInArrowParameters = b, this.finishNode(i, P ? "FunctionDeclaration" : "FunctionExpression");
|
|
4912
4908
|
}, l.parseFunctionBody = function(i, r, u, c, d) {
|
|
4913
4909
|
r === void 0 && (r = !1), u === void 0 && (u = !1), c === void 0 && (c = !1), this.match(o.colon) && (i.returnType = this.tsParseTypeOrTypePredicateAnnotation(o.colon));
|
|
4914
4910
|
var m = d != null && d.isFunctionDeclaration ? "TSDeclareFunction" : d != null && d.isClassMethod ? "TSDeclareMethod" : void 0;
|
|
@@ -4999,7 +4995,7 @@ function zr(e) {
|
|
|
4999
4995
|
else {
|
|
5000
4996
|
if (i.declaration = null, i.specifiers = this.parseExportSpecifiers(r), this.eatContextual("from")) this.type !== o.string && this.unexpected(), i.source = this.parseExprAtom(), this.parseMaybeImportAttributes(i);
|
|
5001
4997
|
else {
|
|
5002
|
-
for (var y, g =
|
|
4998
|
+
for (var y, g = li(i.specifiers); !(y = g()).done; ) {
|
|
5003
4999
|
var b = y.value;
|
|
5004
5000
|
this.checkUnreserved(b.local), this.checkLocalExport(b.local), b.local.type === "Literal" && this.raise(b.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
5005
5001
|
}
|
|
@@ -5028,7 +5024,7 @@ function zr(e) {
|
|
|
5028
5024
|
if (this.type === _.at) return this.parseDecorators(), this.parseExprAtom();
|
|
5029
5025
|
if (j(this.type)) {
|
|
5030
5026
|
var c = this.potentialArrowAt === this.start, d = this.start, m = this.startLoc, y = this.containsEsc, g = this.parseIdent(!1);
|
|
5031
|
-
if (this.options.ecmaVersion >= 8 && !y && g.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(
|
|
5027
|
+
if (this.options.ecmaVersion >= 8 && !y && g.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(de.f_expr), this.parseFunction(this.startNodeAt(d, m), 0, !1, !0, r);
|
|
5032
5028
|
if (c && !this.canInsertSemicolon()) {
|
|
5033
5029
|
if (this.eat(o.arrow)) return this.parseArrowExpression(this.startNodeAt(d, m), [g], !1, r);
|
|
5034
5030
|
if (this.options.ecmaVersion >= 8 && g.name === "async" && this.type === o.name && !y && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return g = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(o.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(d, m), [g], !0, r);
|
|
@@ -5062,9 +5058,9 @@ function zr(e) {
|
|
|
5062
5058
|
this.next(), T.prototype.parseVar.call(this, i, !1, r, u || c), this.semicolon();
|
|
5063
5059
|
var d = this.finishNode(i, "VariableDeclaration");
|
|
5064
5060
|
if (!c) return d;
|
|
5065
|
-
for (var m, y =
|
|
5061
|
+
for (var m, y = li(d.declarations); !(m = y()).done; ) {
|
|
5066
5062
|
var g = m.value, b = g.init;
|
|
5067
|
-
b && (r !== "const" || g.id.typeAnnotation ? this.raise(b.start, A.InitializerNotAllowedInAmbientContext) : b.type !== "StringLiteral" && b.type !== "BooleanLiteral" && b.type !== "NumericLiteral" && b.type !== "BigIntLiteral" && (b.type !== "TemplateLiteral" || b.expressions.length > 0) && !
|
|
5063
|
+
b && (r !== "const" || g.id.typeAnnotation ? this.raise(b.start, A.InitializerNotAllowedInAmbientContext) : b.type !== "StringLiteral" && b.type !== "BooleanLiteral" && b.type !== "NumericLiteral" && b.type !== "BigIntLiteral" && (b.type !== "TemplateLiteral" || b.expressions.length > 0) && !Kr(b) && this.raise(b.start, A.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
5068
5064
|
}
|
|
5069
5065
|
return d;
|
|
5070
5066
|
}, l.parseStatement = function(i, r, u) {
|
|
@@ -5138,8 +5134,8 @@ function zr(e) {
|
|
|
5138
5134
|
m ? (y && (i.typeParameters = y), i.accessibility && this.raise(i.start, A.PrivateMethodsHasAccessibility({ modifier: i.accessibility }))) : y && d && this.raise(y.start, A.ConstructorHasTypeParameters);
|
|
5139
5135
|
var g = i.declare, b = i.kind;
|
|
5140
5136
|
!(g !== void 0 && g) || b !== "get" && b !== "set" || this.raise(i.start, A.DeclareAccessor({ kind: b })), y && (i.typeParameters = y);
|
|
5141
|
-
var
|
|
5142
|
-
i.kind === "constructor" ? (r && this.raise(
|
|
5137
|
+
var P = i.key;
|
|
5138
|
+
i.kind === "constructor" ? (r && this.raise(P.start, "Constructor can't be a generator"), u && this.raise(P.start, "Constructor can't be an async method")) : i.static && di(i, "prototype") && this.raise(P.start, "Classes may not have a static property named prototype");
|
|
5143
5139
|
var E = i.value = this.parseMethod(r, u, c, !0, i);
|
|
5144
5140
|
return i.kind === "get" && E.params.length !== 0 && this.raiseRecoverable(E.start, "getter should have no params"), i.kind === "set" && E.params.length !== 1 && this.raiseRecoverable(E.start, "setter should have exactly one param"), i.kind === "set" && E.params[0].type === "RestElement" && this.raiseRecoverable(E.params[0].start, "Setter cannot use rest params"), this.finishNode(i, "MethodDefinition");
|
|
5145
5141
|
}, l.isClassMethod = function() {
|
|
@@ -5147,7 +5143,7 @@ function zr(e) {
|
|
|
5147
5143
|
}, l.parseClassElement = function(i) {
|
|
5148
5144
|
var r = this;
|
|
5149
5145
|
if (this.eat(o.semi)) return null;
|
|
5150
|
-
var u, c = this.options.ecmaVersion, d = this.startNode(), m = "", y = !1, g = !1, b = "method",
|
|
5146
|
+
var u, c = this.options.ecmaVersion, d = this.startNode(), m = "", y = !1, g = !1, b = "method", P = ["declare", "private", "public", "protected", "accessor", "override", "abstract", "readonly", "static"], E = this.tsParseModifiers({ modified: d, allowedModifiers: P, disallowedModifiers: ["in", "out"], stopOnStartOfClassStaticBlock: !0, errorTemplate: A.InvalidModifierOnTypeParameterPositions });
|
|
5151
5147
|
u = !!E.static;
|
|
5152
5148
|
var L = function() {
|
|
5153
5149
|
if (!r.tsIsStartOfStaticBlocks()) {
|
|
@@ -5158,12 +5154,12 @@ function zr(e) {
|
|
|
5158
5154
|
(r.eatContextual("get") || r.eatContextual("set")) && (r.isClassElementNameStart() ? b = $ : m = $);
|
|
5159
5155
|
}
|
|
5160
5156
|
if (m ? (d.computed = !1, d.key = r.startNodeAt(r.lastTokStart, r.lastTokStartLoc), d.key.name = m, r.finishNode(d.key, "Identifier")) : r.parseClassElementName(d), r.parsePostMemberNameModifiers(d), r.isClassMethod() || c < 13 || r.type === o.parenL || b !== "method" || y || g) {
|
|
5161
|
-
var U = !d.static &&
|
|
5157
|
+
var U = !d.static && di(d, "constructor"), q = U && i;
|
|
5162
5158
|
U && b !== "method" && r.raise(d.key.start, "Constructor can't have get/set modifier"), d.kind = U ? "constructor" : b, r.parseClassMethod(d, y, g, q);
|
|
5163
5159
|
} else r.parseClassField(d);
|
|
5164
5160
|
return d;
|
|
5165
5161
|
}
|
|
5166
|
-
if (r.next(), r.next(), r.tsHasSomeModifiers(d,
|
|
5162
|
+
if (r.next(), r.next(), r.tsHasSomeModifiers(d, P) && r.raise(r.start, A.StaticBlockCannotHaveModifier), c >= 13) return T.prototype.parseClassStaticBlock.call(r, d), d;
|
|
5167
5163
|
};
|
|
5168
5164
|
return d.declare ? this.tsInAmbientContext(L) : L(), d;
|
|
5169
5165
|
}, l.isClassElementNameStart = function() {
|
|
@@ -5180,7 +5176,7 @@ function zr(e) {
|
|
|
5180
5176
|
}, l.parseArrowExpression = function(i, r, u, c) {
|
|
5181
5177
|
this.match(o.colon) && (i.returnType = this.tsParseTypeAnnotation());
|
|
5182
5178
|
var d = this.yieldPos, m = this.awaitPos, y = this.awaitIdentPos;
|
|
5183
|
-
this.enterScope(16 |
|
|
5179
|
+
this.enterScope(16 | Rt(u, !1)), this.initFunction(i);
|
|
5184
5180
|
var g = this.maybeInArrowParameters;
|
|
5185
5181
|
return this.options.ecmaVersion >= 8 && (i.async = !!u), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.maybeInArrowParameters = !0, i.params = this.toAssignableList(r, !0), this.maybeInArrowParameters = !1, this.parseFunctionBody(i, !0, !1, c), this.yieldPos = d, this.awaitPos = m, this.awaitIdentPos = y, this.maybeInArrowParameters = g, this.finishNode(i, "ArrowFunctionExpression");
|
|
5186
5182
|
}, l.parseMaybeAssignOrigin = function(i, r, u) {
|
|
@@ -5189,40 +5185,40 @@ function zr(e) {
|
|
|
5189
5185
|
this.exprAllowed = !1;
|
|
5190
5186
|
}
|
|
5191
5187
|
var c = !1, d = -1, m = -1, y = -1;
|
|
5192
|
-
r ? (d = r.parenthesizedAssign, m = r.trailingComma, y = r.doubleProto, r.parenthesizedAssign = r.trailingComma = -1) : (r = new
|
|
5188
|
+
r ? (d = r.parenthesizedAssign, m = r.trailingComma, y = r.doubleProto, r.parenthesizedAssign = r.trailingComma = -1) : (r = new Je(), c = !0);
|
|
5193
5189
|
var g = this.start, b = this.startLoc;
|
|
5194
5190
|
(this.type === o.parenL || j(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = i === "await");
|
|
5195
|
-
var
|
|
5196
|
-
if (u && (
|
|
5191
|
+
var P = this.parseMaybeConditional(i, r);
|
|
5192
|
+
if (u && (P = u.call(this, P, g, b)), this.type.isAssign) {
|
|
5197
5193
|
var E = this.startNodeAt(g, b);
|
|
5198
|
-
return E.operator = this.value, this.type === o.eq && (
|
|
5194
|
+
return E.operator = this.value, this.type === o.eq && (P = this.toAssignable(P, !0, r)), c || (r.parenthesizedAssign = r.trailingComma = r.doubleProto = -1), r.shorthandAssign >= P.start && (r.shorthandAssign = -1), this.type === o.eq ? this.checkLValPattern(P) : this.checkLValSimple(P), E.left = P, this.next(), E.right = this.parseMaybeAssign(i), y > -1 && (r.doubleProto = y), this.finishNode(E, "AssignmentExpression");
|
|
5199
5195
|
}
|
|
5200
|
-
return c && this.checkExpressionErrors(r, !0), d > -1 && (r.parenthesizedAssign = d), m > -1 && (r.trailingComma = m),
|
|
5196
|
+
return c && this.checkExpressionErrors(r, !0), d > -1 && (r.parenthesizedAssign = d), m > -1 && (r.trailingComma = m), P;
|
|
5201
5197
|
}, l.parseMaybeAssign = function(i, r, u) {
|
|
5202
|
-
var c, d, m, y, g, b,
|
|
5198
|
+
var c, d, m, y, g, b, P, E, L, k, $, U = this;
|
|
5203
5199
|
if (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational()) {
|
|
5204
5200
|
if (E = this.cloneCurLookaheadState(), !(L = this.tryParse(function() {
|
|
5205
5201
|
return U.parseMaybeAssignOrigin(i, r, u);
|
|
5206
5202
|
}, E)).error) return L.node;
|
|
5207
|
-
var q = this.context,
|
|
5208
|
-
|
|
5203
|
+
var q = this.context, K = q[q.length - 1];
|
|
5204
|
+
K === x.tokContexts.tc_oTag && q[q.length - 2] === x.tokContexts.tc_expr ? (q.pop(), q.pop()) : K !== x.tokContexts.tc_oTag && K !== x.tokContexts.tc_expr || q.pop();
|
|
5209
5205
|
}
|
|
5210
5206
|
if (!((c = L) != null && c.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(i, r, u);
|
|
5211
5207
|
E && !this.compareLookaheadState(E, this.getCurLookaheadState()) || (E = this.cloneCurLookaheadState());
|
|
5212
|
-
var
|
|
5213
|
-
var
|
|
5208
|
+
var se = this.tryParse(function(Ne) {
|
|
5209
|
+
var ze, Xe;
|
|
5214
5210
|
$ = U.tsParseTypeParameters();
|
|
5215
|
-
var
|
|
5216
|
-
return (
|
|
5211
|
+
var Le = U.parseMaybeAssignOrigin(i, r, u);
|
|
5212
|
+
return (Le.type !== "ArrowFunctionExpression" || (ze = Le.extra) != null && ze.parenthesized) && Ne(), ((Xe = $) == null ? void 0 : Xe.params.length) !== 0 && U.resetStartLocationFromNode(Le, $), Le.typeParameters = $, Le;
|
|
5217
5213
|
}, E);
|
|
5218
|
-
if (!
|
|
5219
|
-
if (!L && (
|
|
5214
|
+
if (!se.error && !se.aborted) return $ && this.reportReservedArrowTypeParam($), se.node;
|
|
5215
|
+
if (!L && (mi(!0), !(k = this.tryParse(function() {
|
|
5220
5216
|
return U.parseMaybeAssignOrigin(i, r, u);
|
|
5221
5217
|
}, E)).error)) return k.node;
|
|
5222
5218
|
if ((d = L) != null && d.node) return this.setLookaheadState(L.failState), L.node;
|
|
5223
|
-
if (
|
|
5219
|
+
if (se.node) return this.setLookaheadState(se.failState), $ && this.reportReservedArrowTypeParam($), se.node;
|
|
5224
5220
|
if ((m = k) != null && m.node) return this.setLookaheadState(k.failState), k.node;
|
|
5225
|
-
throw (y = L) != null && y.thrown ? L.error :
|
|
5221
|
+
throw (y = L) != null && y.thrown ? L.error : se.thrown ? se.error : (g = k) != null && g.thrown ? k.error : ((b = L) == null ? void 0 : b.error) || se.error || ((P = k) == null ? void 0 : P.error);
|
|
5226
5222
|
}, l.parseAssignableListItem = function(i) {
|
|
5227
5223
|
for (var r = []; this.match(_.at); ) r.push(this.parseDecorator());
|
|
5228
5224
|
var u, c = this.start, d = this.startLoc, m = !1, y = !1;
|
|
@@ -5232,12 +5228,12 @@ function zr(e) {
|
|
|
5232
5228
|
}
|
|
5233
5229
|
var b = this.parseMaybeDefault(c, d);
|
|
5234
5230
|
this.parseBindingListItem(b);
|
|
5235
|
-
var
|
|
5236
|
-
if (r.length && (
|
|
5231
|
+
var P = this.parseMaybeDefault(b.start, b.loc, b);
|
|
5232
|
+
if (r.length && (P.decorators = r), u || m || y) {
|
|
5237
5233
|
var E = this.startNodeAt(c, d);
|
|
5238
|
-
return u && (E.accessibility = u), m && (E.readonly = m), y && (E.override = y),
|
|
5234
|
+
return u && (E.accessibility = u), m && (E.readonly = m), y && (E.override = y), P.type !== "Identifier" && P.type !== "AssignmentPattern" && this.raise(E.start, A.UnsupportedParameterPropertyKind), E.parameter = P, this.finishNode(E, "TSParameterProperty");
|
|
5239
5235
|
}
|
|
5240
|
-
return
|
|
5236
|
+
return P;
|
|
5241
5237
|
}, l.checkLValInnerPattern = function(i, r, u) {
|
|
5242
5238
|
r === void 0 && (r = 0), i.type === "TSParameterProperty" ? this.checkLValInnerPattern(i.parameter, r, u) : T.prototype.checkLValInnerPattern.call(this, i, r, u);
|
|
5243
5239
|
}, l.parseBindingListItem = function(i) {
|
|
@@ -5281,7 +5277,7 @@ function zr(e) {
|
|
|
5281
5277
|
return !1;
|
|
5282
5278
|
}
|
|
5283
5279
|
}, l.toAssignable = function(i, r, u) {
|
|
5284
|
-
switch (r === void 0 && (r = !1), u === void 0 && (u = new
|
|
5280
|
+
switch (r === void 0 && (r = !1), u === void 0 && (u = new Je()), i.type) {
|
|
5285
5281
|
case "ParenthesizedExpression":
|
|
5286
5282
|
return this.toAssignableParenthesizedExpression(i, r, u);
|
|
5287
5283
|
case "TSAsExpression":
|
|
@@ -5346,7 +5342,7 @@ function zr(e) {
|
|
|
5346
5342
|
if (this.options.ecmaVersion >= 6) {
|
|
5347
5343
|
var y = this.maybeInArrowParameters;
|
|
5348
5344
|
this.maybeInArrowParameters = !0, this.next();
|
|
5349
|
-
var g, b = this.start,
|
|
5345
|
+
var g, b = this.start, P = this.startLoc, E = [], L = !0, k = !1, $ = new Je(), U = this.yieldPos, q = this.awaitPos;
|
|
5350
5346
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; ) {
|
|
5351
5347
|
if (L ? L = !1 : this.expect(o.comma), m && this.afterTrailingComma(o.parenR, !0)) {
|
|
5352
5348
|
k = !0;
|
|
@@ -5358,13 +5354,13 @@ function zr(e) {
|
|
|
5358
5354
|
}
|
|
5359
5355
|
E.push(this.parseMaybeAssign(r, $, this.parseParenItem));
|
|
5360
5356
|
}
|
|
5361
|
-
var
|
|
5357
|
+
var K = this.lastTokEnd, se = this.lastTokEndLoc;
|
|
5362
5358
|
if (this.expect(o.parenR), this.maybeInArrowParameters = y, i && this.shouldParseArrow(E) && this.eat(o.arrow)) return this.checkPatternErrors($, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = U, this.awaitPos = q, this.parseParenArrowList(c, d, E, r);
|
|
5363
|
-
E.length && !k || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors($, !0), this.yieldPos = U || this.yieldPos, this.awaitPos = q || this.awaitPos, E.length > 1 ? ((u = this.startNodeAt(b,
|
|
5359
|
+
E.length && !k || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors($, !0), this.yieldPos = U || this.yieldPos, this.awaitPos = q || this.awaitPos, E.length > 1 ? ((u = this.startNodeAt(b, P)).expressions = E, this.finishNodeAt(u, "SequenceExpression", K, se)) : u = E[0];
|
|
5364
5360
|
} else u = this.parseParenExpression();
|
|
5365
5361
|
if (this.options.preserveParens) {
|
|
5366
|
-
var
|
|
5367
|
-
return
|
|
5362
|
+
var Ne = this.startNodeAt(c, d);
|
|
5363
|
+
return Ne.expression = u, this.finishNode(Ne, "ParenthesizedExpression");
|
|
5368
5364
|
}
|
|
5369
5365
|
return u;
|
|
5370
5366
|
}, l.parseTaggedTemplateExpression = function(i, r, u, c) {
|
|
@@ -5393,8 +5389,8 @@ function zr(e) {
|
|
|
5393
5389
|
var g = this, b = m;
|
|
5394
5390
|
if (!this.hasPrecedingLineBreak() && this.value === "!" && this.match(o.prefix)) {
|
|
5395
5391
|
this.exprAllowed = !1, this.next();
|
|
5396
|
-
var
|
|
5397
|
-
return
|
|
5392
|
+
var P = this.startNodeAt(r, u);
|
|
5393
|
+
return P.expression = i, i = this.finishNode(P, "TSNonNullExpression");
|
|
5398
5394
|
}
|
|
5399
5395
|
var E = !1;
|
|
5400
5396
|
if (this.match(o.questionDot) && this.lookaheadCharCode() === 60) {
|
|
@@ -5404,24 +5400,24 @@ function zr(e) {
|
|
|
5404
5400
|
if (this.tsMatchLeftRelational() || this.match(o.bitShift)) {
|
|
5405
5401
|
var L, k = this.tsTryParseAndCatch(function() {
|
|
5406
5402
|
if (!c && g.atPossibleAsyncArrow(i)) {
|
|
5407
|
-
var
|
|
5408
|
-
if (
|
|
5403
|
+
var ei = g.tsTryParseGenericAsyncArrowFunction(r, u, y);
|
|
5404
|
+
if (ei) return i = ei;
|
|
5409
5405
|
}
|
|
5410
5406
|
var ct = g.tsParseTypeArgumentsInExpression();
|
|
5411
5407
|
if (!ct) return i;
|
|
5412
5408
|
if (E && !g.match(o.parenL)) return L = g.curPosition(), i;
|
|
5413
|
-
if (
|
|
5414
|
-
var
|
|
5415
|
-
return
|
|
5409
|
+
if (ps(g.type) || g.type === o.backQuote) {
|
|
5410
|
+
var ti = g.parseTaggedTemplateExpression(i, r, u, b);
|
|
5411
|
+
return ti.typeParameters = ct, ti;
|
|
5416
5412
|
}
|
|
5417
5413
|
if (!c && g.eat(o.parenL)) {
|
|
5418
|
-
var
|
|
5419
|
-
return
|
|
5414
|
+
var ii = new Je(), Ue = g.startNodeAt(r, u);
|
|
5415
|
+
return Ue.callee = i, Ue.arguments = g.parseExprList(o.parenR, g.options.ecmaVersion >= 8, !1, ii), g.tsCheckForInvalidTypeCasts(Ue.arguments), Ue.typeParameters = ct, b && (Ue.optional = E), g.checkExpressionErrors(ii, !0), i = g.finishNode(Ue, "CallExpression");
|
|
5420
5416
|
}
|
|
5421
|
-
var
|
|
5422
|
-
if (!(g.tsMatchRightRelational() ||
|
|
5423
|
-
var
|
|
5424
|
-
return
|
|
5417
|
+
var wt = g.type;
|
|
5418
|
+
if (!(g.tsMatchRightRelational() || wt === o.bitShift || wt !== o.parenL && (si = wt, !!si.startsExpr) && !g.hasPrecedingLineBreak())) {
|
|
5419
|
+
var si, At = g.startNodeAt(r, u);
|
|
5420
|
+
return At.expression = i, At.typeParameters = ct, g.finishNode(At, "TSInstantiationExpression");
|
|
5425
5421
|
}
|
|
5426
5422
|
});
|
|
5427
5423
|
if (L && this.unexpected(L), k) return k.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, A.InvalidPropertyAccessAfterInstantiationExpression), i = k;
|
|
@@ -5430,25 +5426,25 @@ function zr(e) {
|
|
|
5430
5426
|
c && U && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
5431
5427
|
var q = this.eat(o.bracketL);
|
|
5432
5428
|
if (q || U && this.type !== o.parenL && this.type !== o.backQuote || this.eat(o.dot)) {
|
|
5433
|
-
var
|
|
5434
|
-
|
|
5429
|
+
var K = this.startNodeAt(r, u);
|
|
5430
|
+
K.object = i, q ? (K.property = this.parseExpression(), this.expect(o.bracketR)) : K.property = this.type === o.privateId && i.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), K.computed = !!q, $ && (K.optional = U), i = this.finishNode(K, "MemberExpression");
|
|
5435
5431
|
} else if (!c && this.eat(o.parenL)) {
|
|
5436
|
-
var
|
|
5432
|
+
var se = this.maybeInArrowParameters;
|
|
5437
5433
|
this.maybeInArrowParameters = !0;
|
|
5438
|
-
var
|
|
5434
|
+
var Ne = new Je(), ze = this.yieldPos, Xe = this.awaitPos, Le = this.awaitIdentPos;
|
|
5439
5435
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
5440
|
-
var
|
|
5441
|
-
if (d && !U && this.shouldParseAsyncArrow()) this.checkPatternErrors(
|
|
5436
|
+
var Zt = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, Ne);
|
|
5437
|
+
if (d && !U && this.shouldParseAsyncArrow()) this.checkPatternErrors(Ne, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = ze, this.awaitPos = Xe, this.awaitIdentPos = Le, i = this.parseSubscriptAsyncArrow(r, u, Zt, y);
|
|
5442
5438
|
else {
|
|
5443
|
-
this.checkExpressionErrors(
|
|
5439
|
+
this.checkExpressionErrors(Ne, !0), this.yieldPos = ze || this.yieldPos, this.awaitPos = Xe || this.awaitPos, this.awaitIdentPos = Le || this.awaitIdentPos;
|
|
5444
5440
|
var ht = this.startNodeAt(r, u);
|
|
5445
|
-
ht.callee = i, ht.arguments =
|
|
5441
|
+
ht.callee = i, ht.arguments = Zt, $ && (ht.optional = U), i = this.finishNode(ht, "CallExpression");
|
|
5446
5442
|
}
|
|
5447
|
-
this.maybeInArrowParameters =
|
|
5443
|
+
this.maybeInArrowParameters = se;
|
|
5448
5444
|
} else if (this.type === o.backQuote) {
|
|
5449
5445
|
(U || b) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
5450
|
-
var
|
|
5451
|
-
|
|
5446
|
+
var kt = this.startNodeAt(r, u);
|
|
5447
|
+
kt.tag = i, kt.quasi = this.parseTemplate({ isTagged: !0 }), i = this.finishNode(kt, "TaggedTemplateExpression");
|
|
5452
5448
|
}
|
|
5453
5449
|
return i;
|
|
5454
5450
|
}, l.parseGetterSetter = function(i) {
|
|
@@ -5481,7 +5477,7 @@ function zr(e) {
|
|
|
5481
5477
|
for (this.expect(o.braceL); this.type !== o.braceR; ) if (this.match(_.at)) g.push(this.parseDecorator());
|
|
5482
5478
|
else {
|
|
5483
5479
|
var b = this.parseClassElement(i.superClass !== null);
|
|
5484
|
-
g.length && (b.decorators = g, this.resetStartLocationFromNode(b, g[0]), g = []), b && (m.body.push(b), b.type === "MethodDefinition" && b.kind === "constructor" && b.value.type === "FunctionExpression" ? (y && this.raiseRecoverable(b.start, "Duplicate constructor in the same class"), y = !0, b.decorators && b.decorators.length > 0 && this.raise(b.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : b.key && b.key.type === "PrivateIdentifier" &&
|
|
5480
|
+
g.length && (b.decorators = g, this.resetStartLocationFromNode(b, g[0]), g = []), b && (m.body.push(b), b.type === "MethodDefinition" && b.kind === "constructor" && b.value.type === "FunctionExpression" ? (y && this.raiseRecoverable(b.start, "Duplicate constructor in the same class"), y = !0, b.decorators && b.decorators.length > 0 && this.raise(b.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : b.key && b.key.type === "PrivateIdentifier" && Br(d, b) && this.raiseRecoverable(b.key.start, "Identifier '#" + b.key.name + "' has already been declared"));
|
|
5485
5481
|
}
|
|
5486
5482
|
return this.strict = c, this.next(), g.length && this.raise(this.start, "Decorators must be attached to a class element."), i.body = this.finishNode(m, "ClassBody"), this.exitClassBody(), this.finishNode(i, r ? "ClassDeclaration" : "ClassExpression");
|
|
5487
5483
|
} finally {
|
|
@@ -5492,17 +5488,17 @@ function zr(e) {
|
|
|
5492
5488
|
return i && (r.typeParameters = i), r;
|
|
5493
5489
|
}, l.parseMethod = function(i, r, u, c, d) {
|
|
5494
5490
|
var m = this.startNode(), y = this.yieldPos, g = this.awaitPos, b = this.awaitIdentPos;
|
|
5495
|
-
if (this.initFunction(m), this.options.ecmaVersion >= 6 && (m.generator = i), this.options.ecmaVersion >= 8 && (m.async = !!r), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 |
|
|
5496
|
-
var
|
|
5497
|
-
this.raise(d.start, A.AbstractMethodHasImplementation({ methodName:
|
|
5491
|
+
if (this.initFunction(m), this.options.ecmaVersion >= 6 && (m.generator = i), this.options.ecmaVersion >= 8 && (m.async = !!r), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | Rt(r, m.generator) | (u ? 128 : 0)), this.expect(o.parenL), m.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(m, !1, !0, !1, { isClassMethod: c }), this.yieldPos = y, this.awaitPos = g, this.awaitIdentPos = b, d && d.abstract && m.body) {
|
|
5492
|
+
var P = d.key;
|
|
5493
|
+
this.raise(d.start, A.AbstractMethodHasImplementation({ methodName: P.type !== "Identifier" || d.computed ? "[" + this.input.slice(P.start, P.end) + "]" : P.name }));
|
|
5498
5494
|
}
|
|
5499
5495
|
return this.finishNode(m, "FunctionExpression");
|
|
5500
|
-
},
|
|
5496
|
+
}, te.parse = function(i, r) {
|
|
5501
5497
|
if (r.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
5502
5498
|
r.locations = !0;
|
|
5503
5499
|
var u = new this(r, i);
|
|
5504
5500
|
return a && (u.isAmbientContext = !0), u.parse();
|
|
5505
|
-
},
|
|
5501
|
+
}, te.parseExpressionAt = function(i, r, u) {
|
|
5506
5502
|
if (u.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
5507
5503
|
u.locations = !0;
|
|
5508
5504
|
var c = new this(u, i, r);
|
|
@@ -5523,7 +5519,7 @@ function zr(e) {
|
|
|
5523
5519
|
var c = T.prototype.parseExportSpecifier.call(this, i);
|
|
5524
5520
|
return c.exportKind = "value", c;
|
|
5525
5521
|
}, l.parseTypeOnlyImportExportSpecifier = function(i, r, u) {
|
|
5526
|
-
var c, d = r ? "imported" : "local", m = r ? "local" : "exported", y = i[d], g = !1, b = !0,
|
|
5522
|
+
var c, d = r ? "imported" : "local", m = r ? "local" : "exported", y = i[d], g = !1, b = !0, P = y.start;
|
|
5527
5523
|
if (this.isContextual("as")) {
|
|
5528
5524
|
var E = this.parseIdent();
|
|
5529
5525
|
if (this.isContextual("as")) {
|
|
@@ -5531,7 +5527,7 @@ function zr(e) {
|
|
|
5531
5527
|
ut(this.type) ? (g = !0, y = E, c = r ? this.parseIdent() : this.parseModuleExportName(), b = !1) : (c = L, b = !1);
|
|
5532
5528
|
} else ut(this.type) ? (b = !1, c = r ? this.parseIdent() : this.parseModuleExportName()) : (g = !0, y = E);
|
|
5533
5529
|
} else ut(this.type) && (g = !0, r ? (y = T.prototype.parseIdent.call(this, !0), this.isContextual("as") || this.checkUnreserved(y)) : y = this.parseModuleExportName());
|
|
5534
|
-
g && u && this.raise(
|
|
5530
|
+
g && u && this.raise(P, r ? A.TypeModifierIsUsedInTypeImports : A.TypeModifierIsUsedInTypeExports), i[d] = y, i[m] = c, i[r ? "importKind" : "exportKind"] = g ? "type" : "value", b && this.eatContextual("as") && (i[m] = r ? this.parseIdent() : this.parseModuleExportName()), i[m] || (i[m] = this.copyNode(i[d])), r && this.checkLValSimple(i[m], 2);
|
|
5535
5531
|
}, l.raiseCommonCheck = function(i, r, u) {
|
|
5536
5532
|
return r === "Comma is not permitted after the rest element" ? this.isAmbientContext && this.match(o.comma) && this.lookaheadCharCode() === 41 ? void this.next() : T.prototype.raise.call(this, i, r) : u ? T.prototype.raiseRecoverable.call(this, i, r) : T.prototype.raise.call(this, i, r);
|
|
5537
5533
|
}, l.raiseRecoverable = function(i, r) {
|
|
@@ -5542,10 +5538,10 @@ function zr(e) {
|
|
|
5542
5538
|
var r = this.type;
|
|
5543
5539
|
if (r == o.braceL) {
|
|
5544
5540
|
var u = this.curContext();
|
|
5545
|
-
u ==
|
|
5541
|
+
u == ee.tc_oTag ? this.context.push(de.b_expr) : u == ee.tc_expr ? this.context.push(de.b_tmpl) : T.prototype.updateContext.call(this, i), this.exprAllowed = !0;
|
|
5546
5542
|
} else {
|
|
5547
5543
|
if (r !== o.slash || i !== _.jsxTagStart) return T.prototype.updateContext.call(this, i);
|
|
5548
|
-
this.context.length -= 2, this.context.push(
|
|
5544
|
+
this.context.length -= 2, this.context.push(ee.tc_cTag), this.exprAllowed = !1;
|
|
5549
5545
|
}
|
|
5550
5546
|
}, l.jsx_parseOpeningElementAt = function(i, r) {
|
|
5551
5547
|
var u = this, c = this.startNodeAt(i, r), d = this.jsx_parseElementName();
|
|
@@ -5558,11 +5554,11 @@ function zr(e) {
|
|
|
5558
5554
|
for (c.attributes = []; this.type !== o.slash && this.type !== _.jsxTagEnd; ) c.attributes.push(this.jsx_parseAttribute());
|
|
5559
5555
|
return c.selfClosing = this.eat(o.slash), this.expect(_.jsxTagEnd), this.finishNode(c, d ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
5560
5556
|
}, l.enterScope = function(i) {
|
|
5561
|
-
i ===
|
|
5557
|
+
i === Qe && this.importsStack.push([]), T.prototype.enterScope.call(this, i);
|
|
5562
5558
|
var r = T.prototype.currentScope.call(this);
|
|
5563
5559
|
r.types = [], r.enums = [], r.constEnums = [], r.classes = [], r.exportOnlyBindings = [];
|
|
5564
5560
|
}, l.exitScope = function() {
|
|
5565
|
-
T.prototype.currentScope.call(this).flags ===
|
|
5561
|
+
T.prototype.currentScope.call(this).flags === Qe && this.importsStack.pop(), T.prototype.exitScope.call(this);
|
|
5566
5562
|
}, l.hasImport = function(i, r) {
|
|
5567
5563
|
var u = this.importsStack.length;
|
|
5568
5564
|
if (this.importsStack[u - 1].indexOf(i) > -1) return !0;
|
|
@@ -5590,16 +5586,16 @@ function zr(e) {
|
|
|
5590
5586
|
}
|
|
5591
5587
|
T.prototype.checkLocalExport.call(this, i);
|
|
5592
5588
|
}
|
|
5593
|
-
},
|
|
5589
|
+
}, X = te, D = [{ key: "acornTypeScript", get: function() {
|
|
5594
5590
|
return x;
|
|
5595
5591
|
} }], (G = [{ key: "acornTypeScript", get: function() {
|
|
5596
5592
|
return x;
|
|
5597
|
-
} }]) &&
|
|
5593
|
+
} }]) && ci(X.prototype, G), D && ci(X, D), Object.defineProperty(X, "prototype", { writable: !1 }), te;
|
|
5598
5594
|
})(f);
|
|
5599
|
-
return
|
|
5595
|
+
return ms;
|
|
5600
5596
|
};
|
|
5601
5597
|
}
|
|
5602
|
-
const
|
|
5598
|
+
const zr = [
|
|
5603
5599
|
{ idPrefix: "datapos-app-nuxt", typeId: "app", isPublish: !1, uploadGroupName: void 0 },
|
|
5604
5600
|
{ idPrefix: "datapos-api", typeId: "api", isPublish: !1, uploadGroupName: void 0 },
|
|
5605
5601
|
{ idPrefix: "datapos-connector", typeId: "connector", isPublish: !0, uploadGroupName: "connectors" },
|
|
@@ -5611,33 +5607,33 @@ const Xr = [
|
|
|
5611
5607
|
{ idPrefix: "datapos-shared", typeId: "shared", isPublish: !0, uploadGroupName: void 0 },
|
|
5612
5608
|
{ idPrefix: "datapos-tool", typeId: "tool", isPublish: !0, uploadGroupName: "tools" },
|
|
5613
5609
|
{ idPrefix: "eslint-config-datapos", typeId: "eslint", isPublish: !0, uploadGroupName: void 0 }
|
|
5614
|
-
],
|
|
5615
|
-
async function
|
|
5610
|
+
], Xr = xs(vs);
|
|
5611
|
+
async function Qr(e) {
|
|
5616
5612
|
let t;
|
|
5617
5613
|
try {
|
|
5618
|
-
t = await
|
|
5614
|
+
t = await ne.readdir(e, { withFileTypes: !0 });
|
|
5619
5615
|
} catch (s) {
|
|
5620
5616
|
if (s.code === "ENOENT") return;
|
|
5621
5617
|
throw s;
|
|
5622
5618
|
}
|
|
5623
5619
|
await Promise.all(
|
|
5624
5620
|
t.map(async (s) => {
|
|
5625
|
-
const a =
|
|
5621
|
+
const a = Ye.join(e, s.name);
|
|
5626
5622
|
try {
|
|
5627
|
-
await
|
|
5623
|
+
await ne.rm(a, { recursive: !0, force: !0 });
|
|
5628
5624
|
} catch (n) {
|
|
5629
5625
|
if (n.code !== "ENOENT") throw n;
|
|
5630
5626
|
}
|
|
5631
5627
|
})
|
|
5632
5628
|
);
|
|
5633
5629
|
}
|
|
5634
|
-
function
|
|
5635
|
-
const s = H.extend(
|
|
5630
|
+
function Jt(e) {
|
|
5631
|
+
const s = H.extend(Wr()).parse(e, {
|
|
5636
5632
|
ecmaVersion: "latest",
|
|
5637
5633
|
sourceType: "module",
|
|
5638
5634
|
locations: !0
|
|
5639
5635
|
}), a = [];
|
|
5640
|
-
return
|
|
5636
|
+
return Ft(s, (n) => {
|
|
5641
5637
|
if (n.type !== "MethodDefinition") return;
|
|
5642
5638
|
const p = n, f = p.key;
|
|
5643
5639
|
if (f.type !== "Identifier") return;
|
|
@@ -5645,69 +5641,69 @@ function Zt(e) {
|
|
|
5645
5641
|
v && v !== "constructor" && p.accessibility !== "private" && a.push(v);
|
|
5646
5642
|
}), a;
|
|
5647
5643
|
}
|
|
5648
|
-
async function
|
|
5644
|
+
async function le(e, t, s = [], a) {
|
|
5649
5645
|
const n = `${t} ${s.join(" ")}`;
|
|
5650
|
-
e !== void 0 &&
|
|
5651
|
-
const { stdout: p, stderr: f } = await
|
|
5652
|
-
a === void 0 ? p.trim() && console.log(p.trim()) : await
|
|
5646
|
+
e !== void 0 && W(`${e} - exec(${n})`);
|
|
5647
|
+
const { stdout: p, stderr: f } = await Xr(n);
|
|
5648
|
+
a === void 0 ? p.trim() && console.log(p.trim()) : await ne.writeFile(a, p.trim(), "utf8"), f.trim() && console.error(f.trim());
|
|
5653
5649
|
}
|
|
5654
|
-
async function
|
|
5655
|
-
return
|
|
5650
|
+
async function Jr(e, t) {
|
|
5651
|
+
return ne.readdir(e, t);
|
|
5656
5652
|
}
|
|
5657
|
-
function
|
|
5658
|
-
const t =
|
|
5653
|
+
function os(e) {
|
|
5654
|
+
const t = zr.find((s) => e.startsWith(s.idPrefix));
|
|
5659
5655
|
if (!t) throw new Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
5660
5656
|
return t;
|
|
5661
5657
|
}
|
|
5662
|
-
function
|
|
5658
|
+
function ke(e) {
|
|
5663
5659
|
const t = "\x1B[36m", s = "\x1B[0m", a = "─".repeat(Math.max(e.length + 60, 60));
|
|
5664
5660
|
console.info(`
|
|
5665
5661
|
${t}${a}`), console.info(`▶️ ${e}`), console.info(`${a}${s}`);
|
|
5666
5662
|
}
|
|
5667
|
-
function
|
|
5663
|
+
function _e(e) {
|
|
5668
5664
|
console.info(`
|
|
5669
5665
|
✅ ${e}
|
|
5670
5666
|
`);
|
|
5671
5667
|
}
|
|
5672
|
-
function
|
|
5668
|
+
function W(e) {
|
|
5673
5669
|
console.info(`
|
|
5674
5670
|
${e}
|
|
5675
5671
|
`);
|
|
5676
5672
|
}
|
|
5677
|
-
async function
|
|
5678
|
-
return JSON.parse(await
|
|
5673
|
+
async function J(e) {
|
|
5674
|
+
return JSON.parse(await ne.readFile(e, "utf8"));
|
|
5679
5675
|
}
|
|
5680
|
-
async function
|
|
5681
|
-
return await
|
|
5676
|
+
async function Ve(e) {
|
|
5677
|
+
return await ne.readFile(e, "utf8");
|
|
5682
5678
|
}
|
|
5683
|
-
async function
|
|
5679
|
+
async function Yr(e) {
|
|
5684
5680
|
try {
|
|
5685
|
-
await
|
|
5681
|
+
await ne.unlink(e);
|
|
5686
5682
|
} catch (t) {
|
|
5687
5683
|
if (t.code !== "ENOENT") throw t;
|
|
5688
5684
|
}
|
|
5689
5685
|
}
|
|
5690
|
-
async function
|
|
5691
|
-
return
|
|
5692
|
-
|
|
5686
|
+
async function xe(e, t, s = [], a = !1) {
|
|
5687
|
+
return W(`${e} - spawn(${t} ${s.join(" ")})`), new Promise((n, p) => {
|
|
5688
|
+
gs(t, s, { stdio: "inherit" }).on("close", (v) => {
|
|
5693
5689
|
v === 0 || a ? n() : p(new Error(`${t} exited with code ${v}`));
|
|
5694
5690
|
});
|
|
5695
5691
|
});
|
|
5696
5692
|
}
|
|
5697
|
-
function
|
|
5693
|
+
function us(e, t, s, a) {
|
|
5698
5694
|
const n = e.indexOf(s), p = e.indexOf(a);
|
|
5699
5695
|
if (n === -1 || p === -1) throw new Error(`Markers ${s}-${a} not found in content.`);
|
|
5700
5696
|
return `${e.slice(0, Math.max(0, n + s.length))}
|
|
5701
5697
|
${t}
|
|
5702
5698
|
${e.slice(Math.max(0, p))}`;
|
|
5703
5699
|
}
|
|
5704
|
-
async function
|
|
5705
|
-
await
|
|
5700
|
+
async function vt(e, t) {
|
|
5701
|
+
await ne.writeFile(e, JSON.stringify(t, void 0, 4), "utf8");
|
|
5706
5702
|
}
|
|
5707
5703
|
async function st(e, t) {
|
|
5708
|
-
await
|
|
5704
|
+
await ne.writeFile(e, t, "utf8");
|
|
5709
5705
|
}
|
|
5710
|
-
function
|
|
5706
|
+
function Ft(e, t) {
|
|
5711
5707
|
t(e);
|
|
5712
5708
|
for (const [s, a] of Object.entries(e)) {
|
|
5713
5709
|
if (["loc", "range", "start", "end", "comments"].includes(s)) continue;
|
|
@@ -5715,20 +5711,20 @@ function Ut(e, t) {
|
|
|
5715
5711
|
if (Array.isArray(n))
|
|
5716
5712
|
for (const p of n) {
|
|
5717
5713
|
const f = p;
|
|
5718
|
-
f && typeof f.type == "string" &&
|
|
5714
|
+
f && typeof f.type == "string" && Ft(f, t);
|
|
5719
5715
|
}
|
|
5720
|
-
else n && typeof n == "object" && typeof n.type == "string" &&
|
|
5716
|
+
else n && typeof n == "object" && typeof n.type == "string" && Ft(n, t);
|
|
5721
5717
|
}
|
|
5722
5718
|
}
|
|
5723
|
-
async function
|
|
5724
|
-
const e = await
|
|
5719
|
+
async function Zr() {
|
|
5720
|
+
const e = await J("config.json"), t = {
|
|
5725
5721
|
body: JSON.stringify(e),
|
|
5726
5722
|
headers: { "Content-Type": "application/json" },
|
|
5727
5723
|
method: "PUT"
|
|
5728
5724
|
}, s = await fetch(`https://api.datapos.app/states/${e.id}`, t);
|
|
5729
5725
|
if (!s.ok) throw new Error(await s.text());
|
|
5730
5726
|
}
|
|
5731
|
-
async function
|
|
5727
|
+
async function xi(e) {
|
|
5732
5728
|
const t = e.id, s = {
|
|
5733
5729
|
body: JSON.stringify(e),
|
|
5734
5730
|
headers: { "Content-Type": "application/json" },
|
|
@@ -5736,150 +5732,159 @@ async function gi(e) {
|
|
|
5736
5732
|
}, a = await fetch(`https://api.datapos.app/states/${t}`, s);
|
|
5737
5733
|
if (!a.ok) throw new Error(await a.text());
|
|
5738
5734
|
}
|
|
5739
|
-
async function
|
|
5735
|
+
async function vi(e, t) {
|
|
5740
5736
|
const s = `v${e.version}`;
|
|
5741
5737
|
async function a(n, p = "") {
|
|
5742
|
-
const f = await
|
|
5738
|
+
const f = await Jr(n, { withFileTypes: !0 });
|
|
5743
5739
|
for (const v of f) {
|
|
5744
5740
|
const x = `${n}/${v.name}`, o = p ? `${p}/${v.name}` : v.name;
|
|
5745
5741
|
if (v.isDirectory()) continue;
|
|
5746
|
-
const
|
|
5747
|
-
console.info(`⚙️ Uploading '${o}' → '${
|
|
5742
|
+
const S = `${t}_${s}/${o}`.replaceAll("\\", "/"), I = v.name.endsWith(".css") ? "text/css" : "application/octet-stream", B = v.name.endsWith(".js") ? "application/javascript" : I;
|
|
5743
|
+
console.info(`⚙️ Uploading '${o}' → '${S}'...`), await le(void 0, `wrangler r2 object put "${S}" --file="${x}" --content-type ${B} --jurisdiction=eu --remote`);
|
|
5748
5744
|
}
|
|
5749
5745
|
}
|
|
5750
5746
|
await a("dist");
|
|
5751
5747
|
}
|
|
5752
|
-
const
|
|
5753
|
-
|
|
5748
|
+
const ea = /* @__PURE__ */ new Set(["createObject", "dropObject", "removeRecords", "upsertRecords"]), ta = /* @__PURE__ */ new Set([
|
|
5749
|
+
"auditContent",
|
|
5750
|
+
"findObjectFolderPath",
|
|
5751
|
+
"getReadableStream",
|
|
5752
|
+
"getRecord",
|
|
5753
|
+
"listNodes",
|
|
5754
|
+
"previewObject",
|
|
5755
|
+
"retrieveChunks",
|
|
5756
|
+
"retrieveRecords"
|
|
5757
|
+
]);
|
|
5758
|
+
async function Ta() {
|
|
5754
5759
|
try {
|
|
5755
|
-
|
|
5760
|
+
ke("Build Project"), await xe("1️⃣ Bundle project", "vite", ["build"]), _e("Project built.");
|
|
5756
5761
|
} catch (e) {
|
|
5757
5762
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
5758
5763
|
}
|
|
5759
5764
|
}
|
|
5760
|
-
async function
|
|
5765
|
+
async function Ca() {
|
|
5761
5766
|
try {
|
|
5762
|
-
|
|
5763
|
-
const e = await
|
|
5764
|
-
let t = await
|
|
5765
|
-
await
|
|
5766
|
-
const s =
|
|
5767
|
+
ke("Release Project");
|
|
5768
|
+
const e = await J("package.json");
|
|
5769
|
+
let t = await J("config.json");
|
|
5770
|
+
await hs("1️⃣", e);
|
|
5771
|
+
const s = os(t.id);
|
|
5767
5772
|
switch (s.typeId) {
|
|
5768
5773
|
case "connector":
|
|
5769
|
-
t = await
|
|
5774
|
+
t = await sa("2️⃣", e);
|
|
5770
5775
|
break;
|
|
5771
5776
|
case "context":
|
|
5772
|
-
t = await
|
|
5777
|
+
t = await ra("2️⃣", e);
|
|
5773
5778
|
break;
|
|
5774
5779
|
case "presenter":
|
|
5775
|
-
t = await
|
|
5780
|
+
t = await aa("2️⃣", e);
|
|
5776
5781
|
break;
|
|
5777
5782
|
default:
|
|
5778
|
-
t = await
|
|
5783
|
+
t = await ia("2️⃣", e);
|
|
5779
5784
|
}
|
|
5780
|
-
if (await
|
|
5781
|
-
|
|
5785
|
+
if (await xe("3️⃣ Bundle project", "vite", ["build"]), await le("4️⃣ Stage changes", "git", ["add", "."]), await le("5️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await le("6️⃣ Push changes", "git", ["push", "origin", "main:main"]), s.typeId === "app")
|
|
5786
|
+
W("7️⃣ Register module"), await Zr();
|
|
5782
5787
|
else if (s.typeId === "engine")
|
|
5783
|
-
|
|
5788
|
+
W("7️⃣ Register module"), await vi(e, `datapos-engine-eu/${s.uploadGroupName}`), await xi(t);
|
|
5784
5789
|
else if (s.uploadGroupName === void 0)
|
|
5785
|
-
|
|
5790
|
+
W("7️⃣ Registration NOT required.");
|
|
5786
5791
|
else {
|
|
5787
|
-
|
|
5792
|
+
W("7️⃣ Register module");
|
|
5788
5793
|
const a = t.id.split("-").slice(2).join("-");
|
|
5789
|
-
await
|
|
5794
|
+
await vi(e, `datapos-engine-eu/${s.uploadGroupName}/${a}`), await xi(t);
|
|
5790
5795
|
}
|
|
5791
5796
|
if (s.isPublish) {
|
|
5792
5797
|
const a = ".npmrc";
|
|
5793
5798
|
try {
|
|
5794
5799
|
await st(a, `registry=https://registry.npmjs.org/
|
|
5795
|
-
//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await
|
|
5800
|
+
//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await xe("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"]);
|
|
5796
5801
|
} finally {
|
|
5797
|
-
await
|
|
5802
|
+
await Yr(a);
|
|
5798
5803
|
}
|
|
5799
5804
|
} else
|
|
5800
|
-
|
|
5801
|
-
|
|
5805
|
+
W(`8️⃣ Publishing NOT required for package with type identifier of '${s.typeId}'.`);
|
|
5806
|
+
_e(`Project version '${e.version}' released.`);
|
|
5802
5807
|
} catch (e) {
|
|
5803
5808
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
5804
5809
|
}
|
|
5805
5810
|
}
|
|
5806
|
-
async function
|
|
5811
|
+
async function ka() {
|
|
5807
5812
|
try {
|
|
5808
|
-
|
|
5809
|
-
const e = await
|
|
5810
|
-
|
|
5813
|
+
ke("Synchronise Project with GitHub");
|
|
5814
|
+
const e = await J("package.json");
|
|
5815
|
+
W("Bump project version"), await hs("1️⃣", e), await le("2️⃣ Stage changes", "git", ["add", "."]), await le("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await le("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), _e(`Project version '${e.version}' synchronised with GitHub.`);
|
|
5811
5816
|
} catch (e) {
|
|
5812
5817
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
5813
5818
|
}
|
|
5814
5819
|
}
|
|
5815
|
-
function
|
|
5820
|
+
function wa() {
|
|
5816
5821
|
try {
|
|
5817
|
-
|
|
5822
|
+
ke("Test Project"), console.error(`
|
|
5818
5823
|
❌ No tests implemented.
|
|
5819
5824
|
`);
|
|
5820
5825
|
} catch (e) {
|
|
5821
5826
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
5822
5827
|
}
|
|
5823
5828
|
}
|
|
5824
|
-
async function
|
|
5825
|
-
|
|
5826
|
-
const s = await
|
|
5827
|
-
return t.name != null && (s.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (s.version = t.version), await
|
|
5829
|
+
async function ia(e, t) {
|
|
5830
|
+
W(`${e} Build project configuration`);
|
|
5831
|
+
const s = await J("config.json");
|
|
5832
|
+
return t.name != null && (s.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (s.version = t.version), await vt("config.json", s), s;
|
|
5828
5833
|
}
|
|
5829
|
-
async function
|
|
5830
|
-
|
|
5831
|
-
const [s, a] = await Promise.all([
|
|
5834
|
+
async function sa(e, t) {
|
|
5835
|
+
W(`${e} Build connector project configuration`);
|
|
5836
|
+
const [s, a] = await Promise.all([J("config.json"), Ve("src/index.ts")]), n = /* @__PURE__ */ Bt(Hs, s);
|
|
5832
5837
|
if (!n.success)
|
|
5833
5838
|
throw console.error("❌ Configuration is invalid:"), console.table(n.issues), new Error("Configuration is invalid.");
|
|
5834
|
-
const p =
|
|
5835
|
-
return await
|
|
5839
|
+
const p = Jt(a), f = na(p);
|
|
5840
|
+
return await Yt(t, s, p, f);
|
|
5836
5841
|
}
|
|
5837
|
-
async function
|
|
5838
|
-
return s.length > 0 ? (console.info(`ℹ️ Implements ${s.length} operations:`), console.table(s)) : console.warn("⚠️ Implements no operations."), a === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${a}' usage.`), e.name != null && (t.id = e.name.replace("@datapos/", "").replace("@data-positioning/", "")), e.version != null && (t.version = e.version), t.operations = s, t.usageId = a ?? "unknown", await
|
|
5842
|
+
async function Yt(e, t, s, a) {
|
|
5843
|
+
return s.length > 0 ? (console.info(`ℹ️ Implements ${s.length} operations:`), console.table(s)) : console.warn("⚠️ Implements no operations."), a === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${a}' usage.`), e.name != null && (t.id = e.name.replace("@datapos/", "").replace("@data-positioning/", "")), e.version != null && (t.version = e.version), t.operations = s, t.usageId = a ?? "unknown", await vt("config.json", t), t;
|
|
5839
5844
|
}
|
|
5840
|
-
async function
|
|
5841
|
-
|
|
5842
|
-
const [s, a] = await Promise.all([
|
|
5845
|
+
async function ra(e, t) {
|
|
5846
|
+
W(`${e} Build context project configuration`);
|
|
5847
|
+
const [s, a] = await Promise.all([J("config.json"), Ve("src/index.ts")]), n = /* @__PURE__ */ Bt(Ws, s);
|
|
5843
5848
|
if (!n.success)
|
|
5844
5849
|
throw console.error("❌ Configuration is invalid:"), console.table(n.issues), new Error("Configuration is invalid.");
|
|
5845
|
-
const p =
|
|
5846
|
-
return await
|
|
5850
|
+
const p = Jt(a);
|
|
5851
|
+
return await Yt(t, s, p);
|
|
5847
5852
|
}
|
|
5848
|
-
async function
|
|
5849
|
-
|
|
5850
|
-
const [s, a] = await Promise.all([
|
|
5853
|
+
async function aa(e, t) {
|
|
5854
|
+
W(`${e} Build presenter project configuration`);
|
|
5855
|
+
const [s, a] = await Promise.all([J("config.json"), Ve("src/index.ts")]), n = /* @__PURE__ */ Bt(Xs, s);
|
|
5851
5856
|
if (!n.success)
|
|
5852
5857
|
throw console.error("❌ Configuration is invalid:"), console.table(n.issues), new Error("Configuration is invalid.");
|
|
5853
|
-
const p =
|
|
5854
|
-
return await
|
|
5858
|
+
const p = Jt(a);
|
|
5859
|
+
return await Yt(t, s, p);
|
|
5855
5860
|
}
|
|
5856
|
-
async function
|
|
5857
|
-
if (
|
|
5858
|
-
t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await
|
|
5861
|
+
async function hs(e, t, s = "./") {
|
|
5862
|
+
if (W(`${e} Bump project version`), t.version == null)
|
|
5863
|
+
t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await vt(`${s}package.json`, t);
|
|
5859
5864
|
else {
|
|
5860
5865
|
const a = t.version, n = t.version.split(".");
|
|
5861
|
-
t.version = `${n[0]}.${n[1]}.${Number(n[2]) + 1}`, console.info(`Project version bumped from '${a}' to '${t.version}'.`), await
|
|
5866
|
+
t.version = `${n[0]}.${n[1]}.${Number(n[2]) + 1}`, console.info(`Project version bumped from '${a}' to '${t.version}'.`), await vt(`${s}package.json`, t);
|
|
5862
5867
|
}
|
|
5863
5868
|
}
|
|
5864
|
-
function
|
|
5869
|
+
function na(e) {
|
|
5865
5870
|
let t = !1, s = !1;
|
|
5866
5871
|
for (const a of e)
|
|
5867
|
-
|
|
5872
|
+
ta.has(a) && (t = !0), ea.has(a) && (s = !0);
|
|
5868
5873
|
return t && s ? "bidirectional" : t ? "source" : s ? "destination" : "unknown";
|
|
5869
5874
|
}
|
|
5870
|
-
const
|
|
5875
|
+
const oa = {
|
|
5871
5876
|
critical: { color: "D32F2F", label: "critical" },
|
|
5872
5877
|
high: { color: "EF6C00", label: "high" },
|
|
5873
5878
|
moderate: { color: "FBC02D", label: "moderate" },
|
|
5874
5879
|
low: { color: "6D8C31", label: "low" },
|
|
5875
5880
|
unknown: { color: "616161", label: "unknown" }
|
|
5876
5881
|
// See sample badges in ~/tests/sampleBadges.md. Also included 'info' colouring.
|
|
5877
|
-
},
|
|
5878
|
-
async function
|
|
5882
|
+
}, ua = "<!-- OWASP_BADGES_START -->", ha = "<!-- OWASP_BADGES_END -->";
|
|
5883
|
+
async function Aa() {
|
|
5879
5884
|
try {
|
|
5880
|
-
|
|
5881
|
-
const e = await
|
|
5882
|
-
await
|
|
5885
|
+
ke("Audit Dependencies");
|
|
5886
|
+
const e = await J("package.json");
|
|
5887
|
+
await xe("1️⃣", "owasp-dependency-check", [
|
|
5883
5888
|
"--out",
|
|
5884
5889
|
"dependency-check-reports",
|
|
5885
5890
|
"--project",
|
|
@@ -5888,59 +5893,59 @@ async function Ea() {
|
|
|
5888
5893
|
"--nodePackageSkipDevDependencies",
|
|
5889
5894
|
"--nvdApiKey",
|
|
5890
5895
|
process.env.OWASP_NVD_API_KEY ?? ""
|
|
5891
|
-
]), await
|
|
5896
|
+
]), await ca("2️⃣"), await xe("3️⃣ Check using 'npm audit'", "npm", ["audit"]), _e("Dependencies audited.");
|
|
5892
5897
|
} catch (e) {
|
|
5893
5898
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
5894
5899
|
}
|
|
5895
5900
|
}
|
|
5896
|
-
async function
|
|
5897
|
-
|
|
5898
|
-
const t = await
|
|
5901
|
+
async function ca(e) {
|
|
5902
|
+
W(`${e} Insert OWASP Badge(s) into 'README.md'`);
|
|
5903
|
+
const t = await J("dependency-check-reports/dependency-check-report.json"), s = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
5899
5904
|
for (const f of t.dependencies)
|
|
5900
5905
|
if (f.vulnerabilities != null)
|
|
5901
5906
|
for (const v of f.vulnerabilities) {
|
|
5902
5907
|
const x = v.severity?.toLowerCase() ?? "unknown";
|
|
5903
5908
|
x in s ? s[x]++ : s.unknown++;
|
|
5904
5909
|
}
|
|
5905
|
-
const a = await
|
|
5910
|
+
const a = await pa(s), n = await Ve("./README.md"), p = us(n, a.join(" "), ua, ha);
|
|
5906
5911
|
await st("README.md", p), console.info("OWASP audit badge(s) inserted into 'README.md'");
|
|
5907
5912
|
}
|
|
5908
|
-
async function
|
|
5909
|
-
const t = await
|
|
5913
|
+
async function pa(e) {
|
|
5914
|
+
const t = await J("config.json"), s = [];
|
|
5910
5915
|
if (Object.values(e).reduce((n, p) => n + p, 0) === 0)
|
|
5911
5916
|
console.info("No vulnerabilities found."), s.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5912
5917
|
else
|
|
5913
5918
|
for (const [n, p] of Object.entries(e)) {
|
|
5914
|
-
const f =
|
|
5919
|
+
const f = oa[n];
|
|
5915
5920
|
if (console.warn(`⚠️ ${p} ${f.label} vulnerability(ies) found.`), p === 0) continue;
|
|
5916
5921
|
const v = `https://img.shields.io/badge/OWASP-${p}%20${f.label}-${f.color}`;
|
|
5917
5922
|
s.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5918
5923
|
}
|
|
5919
5924
|
return s;
|
|
5920
5925
|
}
|
|
5921
|
-
async function
|
|
5926
|
+
async function Ea() {
|
|
5922
5927
|
try {
|
|
5923
|
-
|
|
5928
|
+
ke("Check Dependencies"), await xe("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await xe("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", ["-i"]), _e("Dependencies checked.");
|
|
5924
5929
|
} catch (e) {
|
|
5925
5930
|
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
5926
5931
|
}
|
|
5927
5932
|
}
|
|
5928
|
-
const
|
|
5929
|
-
async function
|
|
5933
|
+
const la = "<!-- DEPENDENCY_LICENSES_START -->", fa = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
5934
|
+
async function Ia(e = [], t = !0) {
|
|
5930
5935
|
try {
|
|
5931
|
-
|
|
5932
|
-
const s = e.flatMap((n) => ["--allowed", `'${n}'`]), a =
|
|
5933
|
-
await
|
|
5936
|
+
ke("Document Dependencies");
|
|
5937
|
+
const s = e.flatMap((n) => ["--allowed", `'${n}'`]), a = gi(new bs(import.meta.resolve("@datapos/datapos-development/license-report-config")));
|
|
5938
|
+
await le(
|
|
5934
5939
|
"1️⃣ Generate 'licenses.json' file",
|
|
5935
5940
|
"license-report",
|
|
5936
5941
|
["--config", `'${a}'`, "--only=prod,peer", "--output=json"],
|
|
5937
5942
|
"licenses/licenses.json"
|
|
5938
|
-
), await
|
|
5943
|
+
), await le("2️⃣ Check 'licenses.json' file", "license-report-check", ["--source", "licenses/licenses.json", "--output=table", ...s]), t ? (await le(
|
|
5939
5944
|
"3️⃣ Generate 'licenseTree.json' file",
|
|
5940
5945
|
"license-report-recursive",
|
|
5941
5946
|
["--only=prod,peer", "--output=tree", "--recurse", "--department.value=n/a", "--licensePeriod.value=n/a", "--material.value=n/a", "--relatedTo.value=n/a"],
|
|
5942
5947
|
"licenses/licenseTree.json"
|
|
5943
|
-
), await
|
|
5948
|
+
), await le("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...s])) : (W("3️⃣ Skip 'licenses/licenseTree.json' file generate"), W("4️⃣ Skip 'licenses/licenseTree.json' file check")), await Qr("licenses/downloads"), await le("5️⃣ Download license files", "license-downloader", [
|
|
5944
5949
|
"--source",
|
|
5945
5950
|
"licenses/licenses.json",
|
|
5946
5951
|
"--licDir",
|
|
@@ -5948,28 +5953,28 @@ async function _a(e = [], t = !0) {
|
|
|
5948
5953
|
"--githubToken.tokenEnvVar",
|
|
5949
5954
|
"GITHUB_TOKEN",
|
|
5950
5955
|
"--download"
|
|
5951
|
-
]), await
|
|
5956
|
+
]), await da("6️⃣", t), _e("Dependencies documented.");
|
|
5952
5957
|
} catch (s) {
|
|
5953
5958
|
console.error("❌ Error documenting dependencies.", s), process.exit(1);
|
|
5954
5959
|
}
|
|
5955
5960
|
}
|
|
5956
|
-
async function
|
|
5957
|
-
|
|
5958
|
-
const s = await
|
|
5961
|
+
async function da(e, t) {
|
|
5962
|
+
W(`${e} Insert licenses into 'README.md'`);
|
|
5963
|
+
const s = await J("licenses/licenses.json"), a = await J("licenses/downloads/licenses.ext.json");
|
|
5959
5964
|
let n = [];
|
|
5960
|
-
t && (n = await
|
|
5965
|
+
t && (n = await J("licenses/licenseTree.json"));
|
|
5961
5966
|
const p = [
|
|
5962
5967
|
...(() => {
|
|
5963
5968
|
const o = /* @__PURE__ */ new Map();
|
|
5964
|
-
for (const
|
|
5965
|
-
o.set(
|
|
5966
|
-
for (const
|
|
5967
|
-
const I = o.get(
|
|
5968
|
-
o.set(
|
|
5969
|
+
for (const S of s)
|
|
5970
|
+
o.set(S.name, { ...S });
|
|
5971
|
+
for (const S of a) {
|
|
5972
|
+
const I = o.get(S.name);
|
|
5973
|
+
o.set(S.name, I ? { ...I, ...S } : { ...S });
|
|
5969
5974
|
}
|
|
5970
|
-
for (const
|
|
5971
|
-
const I = o.get(
|
|
5972
|
-
I && o.set(
|
|
5975
|
+
for (const S of n) {
|
|
5976
|
+
const I = o.get(S.name);
|
|
5977
|
+
I && o.set(S.name, { ...I, dependencyCount: S.requires?.length ?? 0 });
|
|
5973
5978
|
}
|
|
5974
5979
|
return o.values();
|
|
5975
5980
|
})()
|
|
@@ -5978,15 +5983,15 @@ async function ma(e, t) {
|
|
|
5978
5983
|
|:-|:-|:-:|:-:|:-|-:|:-|
|
|
5979
5984
|
`;
|
|
5980
5985
|
for (const o of p) {
|
|
5981
|
-
const
|
|
5982
|
-
let
|
|
5983
|
-
o.licenseFileLink == null || o.licenseFileLink == "" ?
|
|
5986
|
+
const S = o.installedVersion === o.remoteVersion ? o.installedVersion : `${o.installedVersion} ⚠️`, I = o.latestRemoteModified ? ma(o.latestRemoteModified.split("T")[0]) : "n/a", B = o.dependencyCount != null && o.dependencyCount >= 0 ? o.dependencyCount : "n/a";
|
|
5987
|
+
let oe;
|
|
5988
|
+
o.licenseFileLink == null || o.licenseFileLink == "" ? oe = "⚠️ No license file" : oe = `[${o.licenseFileLink.slice(Math.max(0, o.licenseFileLink.lastIndexOf("/") + 1))}](${o.licenseFileLink})`, f += `|${o.name}|${o.licenseType}|${S}|${o.remoteVersion}|${I}|${B}|${oe}|
|
|
5984
5989
|
`;
|
|
5985
5990
|
}
|
|
5986
|
-
const v = await
|
|
5991
|
+
const v = await Ve("./README.md"), x = us(v, f, la, fa);
|
|
5987
5992
|
await st("README.md", x), console.info("OWASP audit badge(s) inserted into 'README.md'"), await st("README.md", x);
|
|
5988
5993
|
}
|
|
5989
|
-
function
|
|
5994
|
+
function ma(e) {
|
|
5990
5995
|
if (e == null || e === "") return "n/a";
|
|
5991
5996
|
const t = e.split("T")[0];
|
|
5992
5997
|
if (t == null || t === "") return "n/a";
|
|
@@ -5994,49 +5999,49 @@ function ya(e) {
|
|
|
5994
5999
|
let n = (a.getFullYear() - s.getFullYear()) * 12 + (a.getMonth() - s.getMonth());
|
|
5995
6000
|
return a.getDate() < s.getDate() && (n -= 1), n === 0 ? `this month: ${t}` : n === 1 ? `1 month ago: ${t}` : n <= 6 ? `${n} months ago: ${t}` : n <= 12 ? `${n} months ago: ${t} ⚠️` : `${n} months ago: ${t}❗`;
|
|
5996
6001
|
}
|
|
5997
|
-
async function
|
|
6002
|
+
async function _a() {
|
|
5998
6003
|
try {
|
|
5999
|
-
|
|
6000
|
-
const s = ["--write", "*.json", "*.md", "*.ts", ...["app", "src"].filter((a) =>
|
|
6001
|
-
await
|
|
6004
|
+
ke("Format Code");
|
|
6005
|
+
const s = ["--write", "*.json", "*.md", "*.ts", ...["app", "src"].filter((a) => ys(a)).map((a) => `${a}/**`)];
|
|
6006
|
+
await xe("1️⃣ Format", "prettier", s), _e("Code formatted.");
|
|
6002
6007
|
} catch (e) {
|
|
6003
6008
|
console.error("❌ Error formatting code.", e), process.exit(1);
|
|
6004
6009
|
}
|
|
6005
6010
|
}
|
|
6006
|
-
async function
|
|
6011
|
+
async function Na() {
|
|
6007
6012
|
try {
|
|
6008
|
-
|
|
6013
|
+
ke("Lint Code"), await xe("1️⃣ Lint", "eslint", ["."]), _e("Code linted.");
|
|
6009
6014
|
} catch (e) {
|
|
6010
6015
|
console.error("❌ Error linting code.", e), process.exit(1);
|
|
6011
6016
|
}
|
|
6012
6017
|
}
|
|
6013
|
-
const
|
|
6014
|
-
async function
|
|
6018
|
+
const ya = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣"];
|
|
6019
|
+
async function La(e = []) {
|
|
6015
6020
|
try {
|
|
6016
|
-
|
|
6021
|
+
ke("Update '@datapos/datapos' Dependencies");
|
|
6017
6022
|
for (const [t, s] of e.entries()) {
|
|
6018
|
-
const a =
|
|
6023
|
+
const a = ya.at(t) ?? "🔢";
|
|
6019
6024
|
if (s === "eslint")
|
|
6020
|
-
await
|
|
6021
|
-
else if (await
|
|
6022
|
-
const n = await
|
|
6023
|
-
await
|
|
6025
|
+
await xe(`${a} Update '${s}'`, "npm", ["install", "@datapos/eslint-config-datapos@latest"]);
|
|
6026
|
+
else if (await xe(`${a} Update '${s}'`, "npm", ["install", `@datapos/datapos-${s}@latest`]), s === "development") {
|
|
6027
|
+
const n = await J("config.json"), p = os(n.id);
|
|
6028
|
+
await xa(p);
|
|
6024
6029
|
}
|
|
6025
6030
|
}
|
|
6026
|
-
|
|
6031
|
+
_e("'@datapos/datapos' dependencies updated.");
|
|
6027
6032
|
} catch (t) {
|
|
6028
6033
|
console.error("❌ Error updating '@datapos/datapos' dependencies.", t), process.exit(1);
|
|
6029
6034
|
}
|
|
6030
6035
|
}
|
|
6031
|
-
async function
|
|
6032
|
-
const t =
|
|
6033
|
-
await
|
|
6036
|
+
async function xa(e) {
|
|
6037
|
+
const t = Ye.dirname(gi(import.meta.url));
|
|
6038
|
+
await ge(t, "../", ".editorconfig"), await ge(t, "../", ".gitattributes"), await (e.isPublish ? ge(t, "../", ".gitignore_published", ".gitignore2") : ge(t, "../", ".gitignore_unpublished", ".gitignore2")), await ge(t, "../", ".markdownlint.json"), await ge(t, "../", "LICENSE"), await ge(t, "../", "tsconfig.json", "tsconfig2.json"), e.typeId === "eslint" || (await ge(t, "../", "eslint.config.ts", "eslint.config2.ts"), await ge(t, "../", "vite.config.ts", "vite.config2.ts"), await ge(t, "../", "vitest.config.ts", "vitest.config2.ts"));
|
|
6034
6039
|
}
|
|
6035
|
-
async function
|
|
6036
|
-
const n =
|
|
6040
|
+
async function ge(e, t, s, a) {
|
|
6041
|
+
const n = Ye.resolve(e, `${t}${s}`), p = await Ve(n), f = Ye.resolve(process.cwd(), s.split("_")[0] ?? s), v = Ye.resolve(process.cwd(), a ?? s);
|
|
6037
6042
|
let x;
|
|
6038
6043
|
try {
|
|
6039
|
-
x = await
|
|
6044
|
+
x = await Ve(f);
|
|
6040
6045
|
} catch (o) {
|
|
6041
6046
|
if (o.code !== "ENOENT") throw o;
|
|
6042
6047
|
}
|
|
@@ -6046,7 +6051,7 @@ async function be(e, t, s, a) {
|
|
|
6046
6051
|
}
|
|
6047
6052
|
await st(v, p), console.info(`ℹ️ File '${a ?? s}' synchronised.`);
|
|
6048
6053
|
}
|
|
6049
|
-
async function
|
|
6054
|
+
async function Oa(e) {
|
|
6050
6055
|
try {
|
|
6051
6056
|
console.info(`🚀 Building public directory index for identifier '${e}'...`);
|
|
6052
6057
|
const t = {};
|
|
@@ -6057,40 +6062,40 @@ async function Ra(e) {
|
|
|
6057
6062
|
for (const x of p) {
|
|
6058
6063
|
const o = `${n}/${x}`;
|
|
6059
6064
|
try {
|
|
6060
|
-
const
|
|
6061
|
-
if (
|
|
6062
|
-
const I = await
|
|
6065
|
+
const S = await ne.stat(o);
|
|
6066
|
+
if (S.isDirectory()) {
|
|
6067
|
+
const I = await ne.readdir(o), B = { childCount: I.length, name: x, typeId: "folder" };
|
|
6063
6068
|
f.push(B), await s(o, I);
|
|
6064
6069
|
} else {
|
|
6065
|
-
const I = { id:
|
|
6070
|
+
const I = { id: Ss(), lastModifiedAt: S.mtimeMs, name: x, size: S.size, typeId: "object" };
|
|
6066
6071
|
f.push(I);
|
|
6067
6072
|
}
|
|
6068
|
-
} catch (
|
|
6069
|
-
throw new Error(`Unable to get information for '${x}' in 'buildPublicDirectoryIndex'. ${String(
|
|
6073
|
+
} catch (S) {
|
|
6074
|
+
throw new Error(`Unable to get information for '${x}' in 'buildPublicDirectoryIndex'. ${String(S)}`);
|
|
6070
6075
|
}
|
|
6071
6076
|
}
|
|
6072
6077
|
f.sort((x, o) => {
|
|
6073
|
-
const
|
|
6074
|
-
return
|
|
6078
|
+
const S = x.typeId.localeCompare(o.typeId);
|
|
6079
|
+
return S === 0 ? x.name.localeCompare(o.name) : S;
|
|
6075
6080
|
});
|
|
6076
6081
|
}
|
|
6077
|
-
const a = await
|
|
6078
|
-
await s(`public/${e}`, a), await
|
|
6082
|
+
const a = await ne.readdir(`public/${e}`);
|
|
6083
|
+
await s(`public/${e}`, a), await ne.writeFile(`./public/${e}Index.json`, JSON.stringify(t), "utf8"), console.info("✅ Public directory index built.");
|
|
6079
6084
|
} catch (t) {
|
|
6080
6085
|
console.error("❌ Error building public directory index.", t);
|
|
6081
6086
|
}
|
|
6082
6087
|
}
|
|
6083
6088
|
export {
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6089
|
+
Aa as auditDependencies,
|
|
6090
|
+
Oa as buildDirectoryIndex,
|
|
6091
|
+
Ta as buildProject,
|
|
6092
|
+
Ea as checkDependencies,
|
|
6093
|
+
Ia as documentDependencies,
|
|
6094
|
+
_a as formatCode,
|
|
6095
|
+
Na as lintCode,
|
|
6096
|
+
Ca as releaseProject,
|
|
6097
|
+
ka as syncProjectWithGitHub,
|
|
6098
|
+
wa as testProject,
|
|
6099
|
+
La as updateDataPosDependencies
|
|
6095
6100
|
};
|
|
6096
6101
|
//# sourceMappingURL=datapos-development.es.js.map
|