@osdk/cli 0.29.0-beta.3 → 0.29.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/esm/{acorn-JD7YOXOW.js → acorn-OOLA2SYL.js} +1429 -1263
- package/build/esm/acorn-OOLA2SYL.js.map +1 -0
- package/build/esm/angular-B3DVBAJV.js +3921 -0
- package/build/esm/angular-B3DVBAJV.js.map +1 -0
- package/build/esm/{babel-QGX3VV5S.js → babel-QGU36NF2.js} +4749 -4416
- package/build/esm/babel-QGU36NF2.js.map +1 -0
- package/build/esm/{chunk-GQTSTRG7.js → chunk-2R54QG3I.js} +7 -6
- package/build/esm/chunk-2R54QG3I.js.map +1 -0
- package/build/esm/{chunk-XN5PUPF7.js → chunk-5WP6J4UN.js} +3 -3
- package/build/esm/{chunk-XN5PUPF7.js.map → chunk-5WP6J4UN.js.map} +1 -1
- package/build/esm/{chunk-HFQXGJUG.js → chunk-CZNX7NAA.js} +8 -8
- package/build/esm/{chunk-HFQXGJUG.js.map → chunk-CZNX7NAA.js.map} +1 -1
- package/build/esm/{chunk-MRRQIWFU.js → chunk-HDRBKETK.js} +3 -3
- package/build/esm/{chunk-MRRQIWFU.js.map → chunk-HDRBKETK.js.map} +1 -1
- package/build/esm/{chunk-WHNUNGND.js → chunk-QCQEOFJ7.js} +15 -10
- package/build/esm/chunk-QCQEOFJ7.js.map +1 -0
- package/build/esm/{chunk-DXFUAG7W.js → chunk-SEG3TN7G.js} +7 -7
- package/build/esm/{chunk-DXFUAG7W.js.map → chunk-SEG3TN7G.js.map} +1 -1
- package/build/esm/{chunk-MU732G7I.js → chunk-TGQMPTOO.js} +6 -5
- package/build/esm/chunk-TGQMPTOO.js.map +1 -0
- package/build/esm/{chunk-5PX3HSZR.js → chunk-WLPJIKJV.js} +3 -3
- package/build/esm/{chunk-5PX3HSZR.js.map → chunk-WLPJIKJV.js.map} +1 -1
- package/build/esm/{chunk-PFFPV5JQ.js → chunk-ZAWCQ47H.js} +9 -9
- package/build/esm/chunk-ZAWCQ47H.js.map +1 -0
- package/build/esm/estree-ATGZ6OGQ.js +6145 -0
- package/build/esm/estree-ATGZ6OGQ.js.map +1 -0
- package/build/esm/find-up-JM7QWHT3.js +4 -0
- package/build/esm/{find-up-W7EXJFQH.js.map → find-up-JM7QWHT3.js.map} +1 -1
- package/build/esm/flow-GUZBCHQS.js +27169 -0
- package/build/esm/flow-GUZBCHQS.js.map +1 -0
- package/build/esm/{glimmer-LTNZJIJW.js → glimmer-K2WK52BN.js} +2642 -2669
- package/build/esm/glimmer-K2WK52BN.js.map +1 -0
- package/build/esm/{graphql-KTAUFGIO.js → graphql-MBGHR3ZR.js} +543 -529
- package/build/esm/graphql-MBGHR3ZR.js.map +1 -0
- package/build/esm/{handleGenerate-WOXIHSCJ.js → handleGenerate-KGS77ERN.js} +4659 -8558
- package/build/esm/handleGenerate-KGS77ERN.js.map +1 -0
- package/build/esm/{html-GMDGBLFG.js → html-IRNVR4MI.js} +1485 -1328
- package/build/esm/html-IRNVR4MI.js.map +1 -0
- package/build/esm/index.js +27 -18
- package/build/esm/index.js.map +1 -1
- package/build/esm/loginFlow-AGXNBVJB.js +4 -0
- package/build/esm/{loginFlow-HRPXRVXN.js.map → loginFlow-AGXNBVJB.js.map} +1 -1
- package/build/esm/markdown-N3ITOTMK.js +6697 -0
- package/build/esm/markdown-N3ITOTMK.js.map +1 -0
- package/build/esm/meriyah-LUFL36FF.js +4343 -0
- package/build/esm/meriyah-LUFL36FF.js.map +1 -0
- package/build/esm/{postcss-HFWVKWXX.js → postcss-TV6UK7MR.js} +2266 -2173
- package/build/esm/postcss-TV6UK7MR.js.map +1 -0
- package/build/esm/{siteDeployCommand-YDROISOZ.js → siteDeployCommand-CWR5F4EH.js} +11 -11
- package/build/esm/{siteDeployCommand-YDROISOZ.js.map → siteDeployCommand-CWR5F4EH.js.map} +1 -1
- package/build/esm/typescript-KPTOIHC3.js +13078 -0
- package/build/esm/typescript-KPTOIHC3.js.map +1 -0
- package/build/esm/{versionDeleteCommand-VIPTBZ2L.js → versionDeleteCommand-5KF34BQE.js} +7 -7
- package/build/esm/{versionDeleteCommand-VIPTBZ2L.js.map → versionDeleteCommand-5KF34BQE.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-HUCQPSGV.js → versionDeleteCommand-5ZF5YLI4.js} +7 -7
- package/build/esm/{versionDeleteCommand-HUCQPSGV.js.map → versionDeleteCommand-5ZF5YLI4.js.map} +1 -1
- package/build/esm/{versionGetCommand-SAF7DVRA.js → versionGetCommand-JCTQEP3R.js} +6 -6
- package/build/esm/{versionGetCommand-SAF7DVRA.js.map → versionGetCommand-JCTQEP3R.js.map} +1 -1
- package/build/esm/{versionInfoCommand-DK25W5U7.js → versionInfoCommand-FCPKK743.js} +6 -6
- package/build/esm/{versionInfoCommand-DK25W5U7.js.map → versionInfoCommand-FCPKK743.js.map} +1 -1
- package/build/esm/{versionListCommand-MDBG5UYM.js → versionListCommand-6KQHQNSI.js} +6 -6
- package/build/esm/{versionListCommand-MDBG5UYM.js.map → versionListCommand-6KQHQNSI.js.map} +1 -1
- package/build/esm/{versionListCommand-VPPGAYL7.js → versionListCommand-HSSUX52Q.js} +6 -6
- package/build/esm/{versionListCommand-VPPGAYL7.js.map → versionListCommand-HSSUX52Q.js.map} +1 -1
- package/build/esm/{versionSetCommand-H34E5M4G.js → versionSetCommand-X4B2SNU4.js} +6 -6
- package/build/esm/{versionSetCommand-H34E5M4G.js.map → versionSetCommand-X4B2SNU4.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-DEHOEXY6.js → versionUnsetCommand-FPJ4K56H.js} +7 -7
- package/build/esm/{versionUnsetCommand-DEHOEXY6.js.map → versionUnsetCommand-FPJ4K56H.js.map} +1 -1
- package/build/esm/{widgetSetDeployCommand-3UOFO3I5.js → widgetSetDeployCommand-N34DLLLN.js} +10 -10
- package/build/esm/{widgetSetDeployCommand-3UOFO3I5.js.map → widgetSetDeployCommand-N34DLLLN.js.map} +1 -1
- package/build/esm/{yaml-AZTVLK7P.js → yaml-LD5K7H4C.js} +1294 -1270
- package/build/esm/yaml-LD5K7H4C.js.map +1 -0
- package/package.json +11 -11
- package/build/esm/acorn-JD7YOXOW.js.map +0 -1
- package/build/esm/angular-3AJ2SFX7.js +0 -1981
- package/build/esm/angular-3AJ2SFX7.js.map +0 -1
- package/build/esm/babel-QGX3VV5S.js.map +0 -1
- package/build/esm/chunk-GQTSTRG7.js.map +0 -1
- package/build/esm/chunk-MU732G7I.js.map +0 -1
- package/build/esm/chunk-PFFPV5JQ.js.map +0 -1
- package/build/esm/chunk-WHNUNGND.js.map +0 -1
- package/build/esm/estree-KG4K5QQZ.js +0 -6035
- package/build/esm/estree-KG4K5QQZ.js.map +0 -1
- package/build/esm/find-up-W7EXJFQH.js +0 -4
- package/build/esm/flow-JJAOFHVR.js +0 -26049
- package/build/esm/flow-JJAOFHVR.js.map +0 -1
- package/build/esm/glimmer-LTNZJIJW.js.map +0 -1
- package/build/esm/graphql-KTAUFGIO.js.map +0 -1
- package/build/esm/handleGenerate-WOXIHSCJ.js.map +0 -1
- package/build/esm/html-GMDGBLFG.js.map +0 -1
- package/build/esm/loginFlow-HRPXRVXN.js +0 -4
- package/build/esm/markdown-HFDLFZ5Y.js +0 -6529
- package/build/esm/markdown-HFDLFZ5Y.js.map +0 -1
- package/build/esm/meriyah-M2H255YT.js +0 -4105
- package/build/esm/meriyah-M2H255YT.js.map +0 -1
- package/build/esm/postcss-HFWVKWXX.js.map +0 -1
- package/build/esm/typescript-LVGK7LR7.js +0 -19653
- package/build/esm/typescript-LVGK7LR7.js.map +0 -1
- package/build/esm/yaml-AZTVLK7P.js.map +0 -1
|
@@ -1,1981 +0,0 @@
|
|
|
1
|
-
import { init_esm_shims } from './chunk-MU732G7I.js';
|
|
2
|
-
|
|
3
|
-
// ../../node_modules/.pnpm/prettier@3.2.5/node_modules/prettier/plugins/angular.mjs
|
|
4
|
-
init_esm_shims();
|
|
5
|
-
var Rt = Object.defineProperty;
|
|
6
|
-
var ze = (r3, e) => {
|
|
7
|
-
for (var t in e) Rt(r3, t, {
|
|
8
|
-
get: e[t],
|
|
9
|
-
enumerable: true
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
var Qe = {};
|
|
13
|
-
ze(Qe, {
|
|
14
|
-
parsers: () => Ve
|
|
15
|
-
});
|
|
16
|
-
var Ve = {};
|
|
17
|
-
ze(Ve, {
|
|
18
|
-
__ng_action: () => Cr,
|
|
19
|
-
__ng_binding: () => Ar,
|
|
20
|
-
__ng_directive: () => Nr,
|
|
21
|
-
__ng_interpolation: () => Or
|
|
22
|
-
});
|
|
23
|
-
var G = class {
|
|
24
|
-
constructor(e, t, s, n) {
|
|
25
|
-
this.input = t, this.errLocation = s, this.ctxLocation = n, this.message = `Parser Error: ${e} ${s} [${t}] in ${n}`;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var P = class {
|
|
29
|
-
constructor(e, t) {
|
|
30
|
-
this.start = e, this.end = t;
|
|
31
|
-
}
|
|
32
|
-
toAbsolute(e) {
|
|
33
|
-
return new I(e + this.start, e + this.end);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var w = class {
|
|
37
|
-
constructor(e, t) {
|
|
38
|
-
this.span = e, this.sourceSpan = t;
|
|
39
|
-
}
|
|
40
|
-
toString() {
|
|
41
|
-
return "AST";
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
var W = class extends w {
|
|
45
|
-
constructor(e, t, s) {
|
|
46
|
-
super(e, t), this.nameSpan = s;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var $ = class extends w {
|
|
50
|
-
visit(e, t = null) {
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var L = class extends w {
|
|
54
|
-
visit(e, t = null) {
|
|
55
|
-
return e.visitImplicitReceiver(this, t);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
var Se = class extends L {
|
|
59
|
-
visit(e, t = null) {
|
|
60
|
-
var s;
|
|
61
|
-
return (s = e.visitThisReceiver) == null ? void 0 : s.call(e, this, t);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
var V = class extends w {
|
|
65
|
-
constructor(e, t, s) {
|
|
66
|
-
super(e, t), this.expressions = s;
|
|
67
|
-
}
|
|
68
|
-
visit(e, t = null) {
|
|
69
|
-
return e.visitChain(this, t);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
var Q = class extends w {
|
|
73
|
-
constructor(e, t, s, n, i) {
|
|
74
|
-
super(e, t), this.condition = s, this.trueExp = n, this.falseExp = i;
|
|
75
|
-
}
|
|
76
|
-
visit(e, t = null) {
|
|
77
|
-
return e.visitConditional(this, t);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
var b = class extends W {
|
|
81
|
-
constructor(e, t, s, n, i) {
|
|
82
|
-
super(e, t, s), this.receiver = n, this.name = i;
|
|
83
|
-
}
|
|
84
|
-
visit(e, t = null) {
|
|
85
|
-
return e.visitPropertyRead(this, t);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
var H = class extends W {
|
|
89
|
-
constructor(e, t, s, n, i, a) {
|
|
90
|
-
super(e, t, s), this.receiver = n, this.name = i, this.value = a;
|
|
91
|
-
}
|
|
92
|
-
visit(e, t = null) {
|
|
93
|
-
return e.visitPropertyWrite(this, t);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
var z = class extends W {
|
|
97
|
-
constructor(e, t, s, n, i) {
|
|
98
|
-
super(e, t, s), this.receiver = n, this.name = i;
|
|
99
|
-
}
|
|
100
|
-
visit(e, t = null) {
|
|
101
|
-
return e.visitSafePropertyRead(this, t);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
var q = class extends w {
|
|
105
|
-
constructor(e, t, s, n) {
|
|
106
|
-
super(e, t), this.receiver = s, this.key = n;
|
|
107
|
-
}
|
|
108
|
-
visit(e, t = null) {
|
|
109
|
-
return e.visitKeyedRead(this, t);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
var j = class extends w {
|
|
113
|
-
constructor(e, t, s, n) {
|
|
114
|
-
super(e, t), this.receiver = s, this.key = n;
|
|
115
|
-
}
|
|
116
|
-
visit(e, t = null) {
|
|
117
|
-
return e.visitSafeKeyedRead(this, t);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
var X = class extends w {
|
|
121
|
-
constructor(e, t, s, n, i) {
|
|
122
|
-
super(e, t), this.receiver = s, this.key = n, this.value = i;
|
|
123
|
-
}
|
|
124
|
-
visit(e, t = null) {
|
|
125
|
-
return e.visitKeyedWrite(this, t);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
var Y = class extends W {
|
|
129
|
-
constructor(e, t, s, n, i, a) {
|
|
130
|
-
super(e, t, a), this.exp = s, this.name = n, this.args = i;
|
|
131
|
-
}
|
|
132
|
-
visit(e, t = null) {
|
|
133
|
-
return e.visitPipe(this, t);
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
var C = class extends w {
|
|
137
|
-
constructor(e, t, s) {
|
|
138
|
-
super(e, t), this.value = s;
|
|
139
|
-
}
|
|
140
|
-
visit(e, t = null) {
|
|
141
|
-
return e.visitLiteralPrimitive(this, t);
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
var Z = class extends w {
|
|
145
|
-
constructor(e, t, s) {
|
|
146
|
-
super(e, t), this.expressions = s;
|
|
147
|
-
}
|
|
148
|
-
visit(e, t = null) {
|
|
149
|
-
return e.visitLiteralArray(this, t);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
var J = class extends w {
|
|
153
|
-
constructor(e, t, s, n) {
|
|
154
|
-
super(e, t), this.keys = s, this.values = n;
|
|
155
|
-
}
|
|
156
|
-
visit(e, t = null) {
|
|
157
|
-
return e.visitLiteralMap(this, t);
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
var me = class extends w {
|
|
161
|
-
constructor(e, t, s, n) {
|
|
162
|
-
super(e, t), this.strings = s, this.expressions = n;
|
|
163
|
-
}
|
|
164
|
-
visit(e, t = null) {
|
|
165
|
-
return e.visitInterpolation(this, t);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
var A = class extends w {
|
|
169
|
-
constructor(e, t, s, n, i) {
|
|
170
|
-
super(e, t), this.operation = s, this.left = n, this.right = i;
|
|
171
|
-
}
|
|
172
|
-
visit(e, t = null) {
|
|
173
|
-
return e.visitBinary(this, t);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
var B = class r extends A {
|
|
177
|
-
static createMinus(e, t, s) {
|
|
178
|
-
return new r(e, t, "-", s, "-", new C(e, t, 0), s);
|
|
179
|
-
}
|
|
180
|
-
static createPlus(e, t, s) {
|
|
181
|
-
return new r(e, t, "+", s, "-", s, new C(e, t, 0));
|
|
182
|
-
}
|
|
183
|
-
constructor(e, t, s, n, i, a, h) {
|
|
184
|
-
super(e, t, i, a, h), this.operator = s, this.expr = n, this.left = null, this.right = null, this.operation = null;
|
|
185
|
-
}
|
|
186
|
-
visit(e, t = null) {
|
|
187
|
-
return e.visitUnary !== void 0 ? e.visitUnary(this, t) : e.visitBinary(this, t);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
var ee = class extends w {
|
|
191
|
-
constructor(e, t, s) {
|
|
192
|
-
super(e, t), this.expression = s;
|
|
193
|
-
}
|
|
194
|
-
visit(e, t = null) {
|
|
195
|
-
return e.visitPrefixNot(this, t);
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
var te = class extends w {
|
|
199
|
-
constructor(e, t, s) {
|
|
200
|
-
super(e, t), this.expression = s;
|
|
201
|
-
}
|
|
202
|
-
visit(e, t = null) {
|
|
203
|
-
return e.visitNonNullAssert(this, t);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
var re = class extends w {
|
|
207
|
-
constructor(e, t, s, n, i) {
|
|
208
|
-
super(e, t), this.receiver = s, this.args = n, this.argumentSpan = i;
|
|
209
|
-
}
|
|
210
|
-
visit(e, t = null) {
|
|
211
|
-
return e.visitCall(this, t);
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
var se = class extends w {
|
|
215
|
-
constructor(e, t, s, n, i) {
|
|
216
|
-
super(e, t), this.receiver = s, this.args = n, this.argumentSpan = i;
|
|
217
|
-
}
|
|
218
|
-
visit(e, t = null) {
|
|
219
|
-
return e.visitSafeCall(this, t);
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
var I = class {
|
|
223
|
-
constructor(e, t) {
|
|
224
|
-
this.start = e, this.end = t;
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
var R = class extends w {
|
|
228
|
-
constructor(e, t, s, n, i) {
|
|
229
|
-
super(new P(0, t === null ? 0 : t.length), new I(n, t === null ? n : n + t.length)), this.ast = e, this.source = t, this.location = s, this.errors = i;
|
|
230
|
-
}
|
|
231
|
-
visit(e, t = null) {
|
|
232
|
-
return e.visitASTWithSource ? e.visitASTWithSource(this, t) : this.ast.visit(e, t);
|
|
233
|
-
}
|
|
234
|
-
toString() {
|
|
235
|
-
return `${this.source} in ${this.location}`;
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
var T = class {
|
|
239
|
-
constructor(e, t, s) {
|
|
240
|
-
this.sourceSpan = e, this.key = t, this.value = s;
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
var ne = class {
|
|
244
|
-
constructor(e, t, s) {
|
|
245
|
-
this.sourceSpan = e, this.key = t, this.value = s;
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
var we = class {
|
|
249
|
-
visit(e, t) {
|
|
250
|
-
e.visit(this, t);
|
|
251
|
-
}
|
|
252
|
-
visitUnary(e, t) {
|
|
253
|
-
this.visit(e.expr, t);
|
|
254
|
-
}
|
|
255
|
-
visitBinary(e, t) {
|
|
256
|
-
this.visit(e.left, t), this.visit(e.right, t);
|
|
257
|
-
}
|
|
258
|
-
visitChain(e, t) {
|
|
259
|
-
this.visitAll(e.expressions, t);
|
|
260
|
-
}
|
|
261
|
-
visitConditional(e, t) {
|
|
262
|
-
this.visit(e.condition, t), this.visit(e.trueExp, t), this.visit(e.falseExp, t);
|
|
263
|
-
}
|
|
264
|
-
visitPipe(e, t) {
|
|
265
|
-
this.visit(e.exp, t), this.visitAll(e.args, t);
|
|
266
|
-
}
|
|
267
|
-
visitImplicitReceiver(e, t) {
|
|
268
|
-
}
|
|
269
|
-
visitThisReceiver(e, t) {
|
|
270
|
-
}
|
|
271
|
-
visitInterpolation(e, t) {
|
|
272
|
-
this.visitAll(e.expressions, t);
|
|
273
|
-
}
|
|
274
|
-
visitKeyedRead(e, t) {
|
|
275
|
-
this.visit(e.receiver, t), this.visit(e.key, t);
|
|
276
|
-
}
|
|
277
|
-
visitKeyedWrite(e, t) {
|
|
278
|
-
this.visit(e.receiver, t), this.visit(e.key, t), this.visit(e.value, t);
|
|
279
|
-
}
|
|
280
|
-
visitLiteralArray(e, t) {
|
|
281
|
-
this.visitAll(e.expressions, t);
|
|
282
|
-
}
|
|
283
|
-
visitLiteralMap(e, t) {
|
|
284
|
-
this.visitAll(e.values, t);
|
|
285
|
-
}
|
|
286
|
-
visitLiteralPrimitive(e, t) {
|
|
287
|
-
}
|
|
288
|
-
visitPrefixNot(e, t) {
|
|
289
|
-
this.visit(e.expression, t);
|
|
290
|
-
}
|
|
291
|
-
visitNonNullAssert(e, t) {
|
|
292
|
-
this.visit(e.expression, t);
|
|
293
|
-
}
|
|
294
|
-
visitPropertyRead(e, t) {
|
|
295
|
-
this.visit(e.receiver, t);
|
|
296
|
-
}
|
|
297
|
-
visitPropertyWrite(e, t) {
|
|
298
|
-
this.visit(e.receiver, t), this.visit(e.value, t);
|
|
299
|
-
}
|
|
300
|
-
visitSafePropertyRead(e, t) {
|
|
301
|
-
this.visit(e.receiver, t);
|
|
302
|
-
}
|
|
303
|
-
visitSafeKeyedRead(e, t) {
|
|
304
|
-
this.visit(e.receiver, t), this.visit(e.key, t);
|
|
305
|
-
}
|
|
306
|
-
visitCall(e, t) {
|
|
307
|
-
this.visit(e.receiver, t), this.visitAll(e.args, t);
|
|
308
|
-
}
|
|
309
|
-
visitSafeCall(e, t) {
|
|
310
|
-
this.visit(e.receiver, t), this.visitAll(e.args, t);
|
|
311
|
-
}
|
|
312
|
-
visitAll(e, t) {
|
|
313
|
-
for (let s of e) this.visit(s, t);
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
var qe;
|
|
317
|
-
(function(r3) {
|
|
318
|
-
r3[r3.DEFAULT = 0] = "DEFAULT", r3[r3.LITERAL_ATTR = 1] = "LITERAL_ATTR", r3[r3.ANIMATION = 2] = "ANIMATION", r3[r3.TWO_WAY = 3] = "TWO_WAY";
|
|
319
|
-
})(qe || (qe = {}));
|
|
320
|
-
function je(r3) {
|
|
321
|
-
return r3 >= 9 && r3 <= 32 || r3 == 160;
|
|
322
|
-
}
|
|
323
|
-
function K(r3) {
|
|
324
|
-
return 48 <= r3 && r3 <= 57;
|
|
325
|
-
}
|
|
326
|
-
function Xe(r3) {
|
|
327
|
-
return r3 >= 97 && r3 <= 122 || r3 >= 65 && r3 <= 90;
|
|
328
|
-
}
|
|
329
|
-
function Pe(r3) {
|
|
330
|
-
return r3 === 39 || r3 === 34 || r3 === 96;
|
|
331
|
-
}
|
|
332
|
-
var f;
|
|
333
|
-
(function(r3) {
|
|
334
|
-
r3[r3.Character = 0] = "Character", r3[r3.Identifier = 1] = "Identifier", r3[r3.PrivateIdentifier = 2] = "PrivateIdentifier", r3[r3.Keyword = 3] = "Keyword", r3[r3.String = 4] = "String", r3[r3.Operator = 5] = "Operator", r3[r3.Number = 6] = "Number", r3[r3.Error = 7] = "Error";
|
|
335
|
-
})(f || (f = {}));
|
|
336
|
-
var ar = ["var", "let", "as", "null", "undefined", "true", "false", "if", "else", "this"];
|
|
337
|
-
var le = class {
|
|
338
|
-
tokenize(e) {
|
|
339
|
-
let t = new be(e), s = [], n = t.scanToken();
|
|
340
|
-
for (; n != null; ) s.push(n), n = t.scanToken();
|
|
341
|
-
return s;
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
var O = class {
|
|
345
|
-
constructor(e, t, s, n, i) {
|
|
346
|
-
this.index = e, this.end = t, this.type = s, this.numValue = n, this.strValue = i;
|
|
347
|
-
}
|
|
348
|
-
isCharacter(e) {
|
|
349
|
-
return this.type == f.Character && this.numValue == e;
|
|
350
|
-
}
|
|
351
|
-
isNumber() {
|
|
352
|
-
return this.type == f.Number;
|
|
353
|
-
}
|
|
354
|
-
isString() {
|
|
355
|
-
return this.type == f.String;
|
|
356
|
-
}
|
|
357
|
-
isOperator(e) {
|
|
358
|
-
return this.type == f.Operator && this.strValue == e;
|
|
359
|
-
}
|
|
360
|
-
isIdentifier() {
|
|
361
|
-
return this.type == f.Identifier;
|
|
362
|
-
}
|
|
363
|
-
isPrivateIdentifier() {
|
|
364
|
-
return this.type == f.PrivateIdentifier;
|
|
365
|
-
}
|
|
366
|
-
isKeyword() {
|
|
367
|
-
return this.type == f.Keyword;
|
|
368
|
-
}
|
|
369
|
-
isKeywordLet() {
|
|
370
|
-
return this.type == f.Keyword && this.strValue == "let";
|
|
371
|
-
}
|
|
372
|
-
isKeywordAs() {
|
|
373
|
-
return this.type == f.Keyword && this.strValue == "as";
|
|
374
|
-
}
|
|
375
|
-
isKeywordNull() {
|
|
376
|
-
return this.type == f.Keyword && this.strValue == "null";
|
|
377
|
-
}
|
|
378
|
-
isKeywordUndefined() {
|
|
379
|
-
return this.type == f.Keyword && this.strValue == "undefined";
|
|
380
|
-
}
|
|
381
|
-
isKeywordTrue() {
|
|
382
|
-
return this.type == f.Keyword && this.strValue == "true";
|
|
383
|
-
}
|
|
384
|
-
isKeywordFalse() {
|
|
385
|
-
return this.type == f.Keyword && this.strValue == "false";
|
|
386
|
-
}
|
|
387
|
-
isKeywordThis() {
|
|
388
|
-
return this.type == f.Keyword && this.strValue == "this";
|
|
389
|
-
}
|
|
390
|
-
isError() {
|
|
391
|
-
return this.type == f.Error;
|
|
392
|
-
}
|
|
393
|
-
toNumber() {
|
|
394
|
-
return this.type == f.Number ? this.numValue : -1;
|
|
395
|
-
}
|
|
396
|
-
toString() {
|
|
397
|
-
switch (this.type) {
|
|
398
|
-
case f.Character:
|
|
399
|
-
case f.Identifier:
|
|
400
|
-
case f.Keyword:
|
|
401
|
-
case f.Operator:
|
|
402
|
-
case f.PrivateIdentifier:
|
|
403
|
-
case f.String:
|
|
404
|
-
case f.Error:
|
|
405
|
-
return this.strValue;
|
|
406
|
-
case f.Number:
|
|
407
|
-
return this.numValue.toString();
|
|
408
|
-
default:
|
|
409
|
-
return null;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
};
|
|
413
|
-
function tt(r3, e, t) {
|
|
414
|
-
return new O(r3, e, f.Character, t, String.fromCharCode(t));
|
|
415
|
-
}
|
|
416
|
-
function or(r3, e, t) {
|
|
417
|
-
return new O(r3, e, f.Identifier, 0, t);
|
|
418
|
-
}
|
|
419
|
-
function cr(r3, e, t) {
|
|
420
|
-
return new O(r3, e, f.PrivateIdentifier, 0, t);
|
|
421
|
-
}
|
|
422
|
-
function hr(r3, e, t) {
|
|
423
|
-
return new O(r3, e, f.Keyword, 0, t);
|
|
424
|
-
}
|
|
425
|
-
function Ke(r3, e, t) {
|
|
426
|
-
return new O(r3, e, f.Operator, 0, t);
|
|
427
|
-
}
|
|
428
|
-
function pr(r3, e, t) {
|
|
429
|
-
return new O(r3, e, f.String, 0, t);
|
|
430
|
-
}
|
|
431
|
-
function ur(r3, e, t) {
|
|
432
|
-
return new O(r3, e, f.Number, t, "");
|
|
433
|
-
}
|
|
434
|
-
function lr(r3, e, t) {
|
|
435
|
-
return new O(r3, e, f.Error, 0, t);
|
|
436
|
-
}
|
|
437
|
-
var Ce = new O(-1, -1, f.Character, 0, "");
|
|
438
|
-
var be = class {
|
|
439
|
-
constructor(e) {
|
|
440
|
-
this.input = e, this.peek = 0, this.index = -1, this.length = e.length, this.advance();
|
|
441
|
-
}
|
|
442
|
-
advance() {
|
|
443
|
-
this.peek = ++this.index >= this.length ? 0 : this.input.charCodeAt(this.index);
|
|
444
|
-
}
|
|
445
|
-
scanToken() {
|
|
446
|
-
let e = this.input, t = this.length, s = this.peek, n = this.index;
|
|
447
|
-
for (; s <= 32; ) if (++n >= t) {
|
|
448
|
-
s = 0;
|
|
449
|
-
break;
|
|
450
|
-
} else s = e.charCodeAt(n);
|
|
451
|
-
if (this.peek = s, this.index = n, n >= t) return null;
|
|
452
|
-
if (rt(s)) return this.scanIdentifier();
|
|
453
|
-
if (K(s)) return this.scanNumber(n);
|
|
454
|
-
let i = n;
|
|
455
|
-
switch (s) {
|
|
456
|
-
case 46:
|
|
457
|
-
return this.advance(), K(this.peek) ? this.scanNumber(i) : tt(i, this.index, 46);
|
|
458
|
-
case 40:
|
|
459
|
-
case 41:
|
|
460
|
-
case 123:
|
|
461
|
-
case 125:
|
|
462
|
-
case 91:
|
|
463
|
-
case 93:
|
|
464
|
-
case 44:
|
|
465
|
-
case 58:
|
|
466
|
-
case 59:
|
|
467
|
-
return this.scanCharacter(i, s);
|
|
468
|
-
case 39:
|
|
469
|
-
case 34:
|
|
470
|
-
return this.scanString();
|
|
471
|
-
case 35:
|
|
472
|
-
return this.scanPrivateIdentifier();
|
|
473
|
-
case 43:
|
|
474
|
-
case 45:
|
|
475
|
-
case 42:
|
|
476
|
-
case 47:
|
|
477
|
-
case 37:
|
|
478
|
-
case 94:
|
|
479
|
-
return this.scanOperator(i, String.fromCharCode(s));
|
|
480
|
-
case 63:
|
|
481
|
-
return this.scanQuestion(i);
|
|
482
|
-
case 60:
|
|
483
|
-
case 62:
|
|
484
|
-
return this.scanComplexOperator(i, String.fromCharCode(s), 61, "=");
|
|
485
|
-
case 33:
|
|
486
|
-
case 61:
|
|
487
|
-
return this.scanComplexOperator(i, String.fromCharCode(s), 61, "=", 61, "=");
|
|
488
|
-
case 38:
|
|
489
|
-
return this.scanComplexOperator(i, "&", 38, "&");
|
|
490
|
-
case 124:
|
|
491
|
-
return this.scanComplexOperator(i, "|", 124, "|");
|
|
492
|
-
case 160:
|
|
493
|
-
for (; je(this.peek); ) this.advance();
|
|
494
|
-
return this.scanToken();
|
|
495
|
-
}
|
|
496
|
-
return this.advance(), this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0);
|
|
497
|
-
}
|
|
498
|
-
scanCharacter(e, t) {
|
|
499
|
-
return this.advance(), tt(e, this.index, t);
|
|
500
|
-
}
|
|
501
|
-
scanOperator(e, t) {
|
|
502
|
-
return this.advance(), Ke(e, this.index, t);
|
|
503
|
-
}
|
|
504
|
-
scanComplexOperator(e, t, s, n, i, a) {
|
|
505
|
-
this.advance();
|
|
506
|
-
let h = t;
|
|
507
|
-
return this.peek == s && (this.advance(), h += n), i != null && this.peek == i && (this.advance(), h += a), Ke(e, this.index, h);
|
|
508
|
-
}
|
|
509
|
-
scanIdentifier() {
|
|
510
|
-
let e = this.index;
|
|
511
|
-
for (this.advance(); st(this.peek); ) this.advance();
|
|
512
|
-
let t = this.input.substring(e, this.index);
|
|
513
|
-
return ar.indexOf(t) > -1 ? hr(e, this.index, t) : or(e, this.index, t);
|
|
514
|
-
}
|
|
515
|
-
scanPrivateIdentifier() {
|
|
516
|
-
let e = this.index;
|
|
517
|
-
if (this.advance(), !rt(this.peek)) return this.error("Invalid character [#]", -1);
|
|
518
|
-
for (; st(this.peek); ) this.advance();
|
|
519
|
-
let t = this.input.substring(e, this.index);
|
|
520
|
-
return cr(e, this.index, t);
|
|
521
|
-
}
|
|
522
|
-
scanNumber(e) {
|
|
523
|
-
let t = this.index === e, s = false;
|
|
524
|
-
for (this.advance(); ; ) {
|
|
525
|
-
if (!K(this.peek)) if (this.peek === 95) {
|
|
526
|
-
if (!K(this.input.charCodeAt(this.index - 1)) || !K(this.input.charCodeAt(this.index + 1))) return this.error("Invalid numeric separator", 0);
|
|
527
|
-
s = true;
|
|
528
|
-
} else if (this.peek === 46) t = false;
|
|
529
|
-
else if (xr(this.peek)) {
|
|
530
|
-
if (this.advance(), dr(this.peek) && this.advance(), !K(this.peek)) return this.error("Invalid exponent", -1);
|
|
531
|
-
t = false;
|
|
532
|
-
} else break;
|
|
533
|
-
this.advance();
|
|
534
|
-
}
|
|
535
|
-
let n = this.input.substring(e, this.index);
|
|
536
|
-
s && (n = n.replace(/_/g, ""));
|
|
537
|
-
let i = t ? vr(n) : parseFloat(n);
|
|
538
|
-
return ur(e, this.index, i);
|
|
539
|
-
}
|
|
540
|
-
scanString() {
|
|
541
|
-
let e = this.index, t = this.peek;
|
|
542
|
-
this.advance();
|
|
543
|
-
let s = "", n = this.index, i = this.input;
|
|
544
|
-
for (; this.peek != t; ) if (this.peek == 92) {
|
|
545
|
-
s += i.substring(n, this.index);
|
|
546
|
-
let h;
|
|
547
|
-
if (this.advance(), this.peek == 117) {
|
|
548
|
-
let g = i.substring(this.index + 1, this.index + 5);
|
|
549
|
-
if (/^[0-9a-f]+$/i.test(g)) h = parseInt(g, 16);
|
|
550
|
-
else return this.error(`Invalid unicode escape [\\u${g}]`, 0);
|
|
551
|
-
for (let d = 0; d < 5; d++) this.advance();
|
|
552
|
-
} else h = fr(this.peek), this.advance();
|
|
553
|
-
s += String.fromCharCode(h), n = this.index;
|
|
554
|
-
} else {
|
|
555
|
-
if (this.peek == 0) return this.error("Unterminated quote", 0);
|
|
556
|
-
this.advance();
|
|
557
|
-
}
|
|
558
|
-
let a = i.substring(n, this.index);
|
|
559
|
-
return this.advance(), pr(e, this.index, s + a);
|
|
560
|
-
}
|
|
561
|
-
scanQuestion(e) {
|
|
562
|
-
this.advance();
|
|
563
|
-
let t = "?";
|
|
564
|
-
return (this.peek === 63 || this.peek === 46) && (t += this.peek === 46 ? "." : "?", this.advance()), Ke(e, this.index, t);
|
|
565
|
-
}
|
|
566
|
-
error(e, t) {
|
|
567
|
-
let s = this.index + t;
|
|
568
|
-
return lr(s, this.index, `Lexer Error: ${e} at column ${s} in expression [${this.input}]`);
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
function rt(r3) {
|
|
572
|
-
return 97 <= r3 && r3 <= 122 || 65 <= r3 && r3 <= 90 || r3 == 95 || r3 == 36;
|
|
573
|
-
}
|
|
574
|
-
function st(r3) {
|
|
575
|
-
return Xe(r3) || K(r3) || r3 == 95 || r3 == 36;
|
|
576
|
-
}
|
|
577
|
-
function xr(r3) {
|
|
578
|
-
return r3 == 101 || r3 == 69;
|
|
579
|
-
}
|
|
580
|
-
function dr(r3) {
|
|
581
|
-
return r3 == 45 || r3 == 43;
|
|
582
|
-
}
|
|
583
|
-
function fr(r3) {
|
|
584
|
-
switch (r3) {
|
|
585
|
-
case 110:
|
|
586
|
-
return 10;
|
|
587
|
-
case 102:
|
|
588
|
-
return 12;
|
|
589
|
-
case 114:
|
|
590
|
-
return 13;
|
|
591
|
-
case 116:
|
|
592
|
-
return 9;
|
|
593
|
-
case 118:
|
|
594
|
-
return 11;
|
|
595
|
-
default:
|
|
596
|
-
return r3;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
function vr(r3) {
|
|
600
|
-
let e = parseInt(r3);
|
|
601
|
-
if (isNaN(e)) throw new Error("Invalid integer literal when parsing " + r3);
|
|
602
|
-
return e;
|
|
603
|
-
}
|
|
604
|
-
var gr = [/^\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\/\//];
|
|
605
|
-
function ot(r3, e) {
|
|
606
|
-
if (e != null && !(Array.isArray(e) && e.length == 2)) throw new Error(`Expected '${r3}' to be an array, [start, end].`);
|
|
607
|
-
if (e != null) {
|
|
608
|
-
let t = e[0], s = e[1];
|
|
609
|
-
gr.forEach((n) => {
|
|
610
|
-
if (n.test(t) || n.test(s)) throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`);
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
var Te = class r2 {
|
|
615
|
-
static fromArray(e) {
|
|
616
|
-
return e ? (ot("interpolation", e), new r2(e[0], e[1])) : F;
|
|
617
|
-
}
|
|
618
|
-
constructor(e, t) {
|
|
619
|
-
this.start = e, this.end = t;
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
var F = new Te("{{", "}}");
|
|
623
|
-
var _e = class {
|
|
624
|
-
constructor(e, t, s) {
|
|
625
|
-
this.strings = e, this.expressions = t, this.offsets = s;
|
|
626
|
-
}
|
|
627
|
-
};
|
|
628
|
-
var Me = class {
|
|
629
|
-
constructor(e, t, s) {
|
|
630
|
-
this.templateBindings = e, this.warnings = t, this.errors = s;
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
|
-
var fe = class {
|
|
634
|
-
constructor(e) {
|
|
635
|
-
this._lexer = e, this.errors = [];
|
|
636
|
-
}
|
|
637
|
-
parseAction(e, t, s, n, i = F) {
|
|
638
|
-
this._checkNoInterpolation(e, s, i);
|
|
639
|
-
let a = this._stripComments(e), h = this._lexer.tokenize(a), g = 1;
|
|
640
|
-
t && (g |= 2);
|
|
641
|
-
let d = new U(e, s, n, h, g, this.errors, 0).parseChain();
|
|
642
|
-
return new R(d, e, s, n, this.errors);
|
|
643
|
-
}
|
|
644
|
-
parseBinding(e, t, s, n = F) {
|
|
645
|
-
let i = this._parseBindingAst(e, t, s, n);
|
|
646
|
-
return new R(i, e, t, s, this.errors);
|
|
647
|
-
}
|
|
648
|
-
checkSimpleExpression(e) {
|
|
649
|
-
let t = new Fe();
|
|
650
|
-
return e.visit(t), t.errors;
|
|
651
|
-
}
|
|
652
|
-
parseSimpleBinding(e, t, s, n = F) {
|
|
653
|
-
let i = this._parseBindingAst(e, t, s, n), a = this.checkSimpleExpression(i);
|
|
654
|
-
return a.length > 0 && this._reportError(`Host binding expression cannot contain ${a.join(" ")}`, e, t), new R(i, e, t, s, this.errors);
|
|
655
|
-
}
|
|
656
|
-
_reportError(e, t, s, n) {
|
|
657
|
-
this.errors.push(new G(e, t, s, n));
|
|
658
|
-
}
|
|
659
|
-
_parseBindingAst(e, t, s, n) {
|
|
660
|
-
this._checkNoInterpolation(e, t, n);
|
|
661
|
-
let i = this._stripComments(e), a = this._lexer.tokenize(i);
|
|
662
|
-
return new U(e, t, s, a, 0, this.errors, 0).parseChain();
|
|
663
|
-
}
|
|
664
|
-
parseTemplateBindings(e, t, s, n, i) {
|
|
665
|
-
let a = this._lexer.tokenize(t);
|
|
666
|
-
return new U(t, s, i, a, 0, this.errors, 0).parseTemplateBindings({
|
|
667
|
-
source: e,
|
|
668
|
-
span: new I(n, n + e.length)
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
parseInterpolation(e, t, s, n, i = F) {
|
|
672
|
-
let {
|
|
673
|
-
strings: a,
|
|
674
|
-
expressions: h,
|
|
675
|
-
offsets: g
|
|
676
|
-
} = this.splitInterpolation(e, t, n, i);
|
|
677
|
-
if (h.length === 0) return null;
|
|
678
|
-
let d = [];
|
|
679
|
-
for (let y = 0; y < h.length; ++y) {
|
|
680
|
-
let E = h[y].text, S = this._stripComments(E), o = this._lexer.tokenize(S), u = new U(e, t, s, o, 0, this.errors, g[y]).parseChain();
|
|
681
|
-
d.push(u);
|
|
682
|
-
}
|
|
683
|
-
return this.createInterpolationAst(a.map((y) => y.text), d, e, t, s);
|
|
684
|
-
}
|
|
685
|
-
parseInterpolationExpression(e, t, s) {
|
|
686
|
-
let n = this._stripComments(e), i = this._lexer.tokenize(n), a = new U(e, t, s, i, 0, this.errors, 0).parseChain(), h = ["", ""];
|
|
687
|
-
return this.createInterpolationAst(h, [a], e, t, s);
|
|
688
|
-
}
|
|
689
|
-
createInterpolationAst(e, t, s, n, i) {
|
|
690
|
-
let a = new P(0, s.length), h = new me(a, a.toAbsolute(i), e, t);
|
|
691
|
-
return new R(h, s, n, i, this.errors);
|
|
692
|
-
}
|
|
693
|
-
splitInterpolation(e, t, s, n = F) {
|
|
694
|
-
let i = [], a = [], h = [], g = s ? Sr(s) : null, d = 0, y = false, E = false, {
|
|
695
|
-
start: S,
|
|
696
|
-
end: o
|
|
697
|
-
} = n;
|
|
698
|
-
for (; d < e.length; ) if (y) {
|
|
699
|
-
let u = d, v = u + S.length, c = this._getInterpolationEndIndex(e, o, v);
|
|
700
|
-
if (c === -1) {
|
|
701
|
-
y = false, E = true;
|
|
702
|
-
break;
|
|
703
|
-
}
|
|
704
|
-
let x = c + o.length, l = e.substring(v, c);
|
|
705
|
-
l.trim().length === 0 && this._reportError("Blank expressions are not allowed in interpolated strings", e, `at column ${d} in`, t), a.push({
|
|
706
|
-
text: l,
|
|
707
|
-
start: u,
|
|
708
|
-
end: x
|
|
709
|
-
});
|
|
710
|
-
let k = ((g == null ? void 0 : g.get(u)) ?? u) + S.length;
|
|
711
|
-
h.push(k), d = x, y = false;
|
|
712
|
-
} else {
|
|
713
|
-
let u = d;
|
|
714
|
-
d = e.indexOf(S, d), d === -1 && (d = e.length);
|
|
715
|
-
let v = e.substring(u, d);
|
|
716
|
-
i.push({
|
|
717
|
-
text: v,
|
|
718
|
-
start: u,
|
|
719
|
-
end: d
|
|
720
|
-
}), y = true;
|
|
721
|
-
}
|
|
722
|
-
if (!y) if (E) {
|
|
723
|
-
let u = i[i.length - 1];
|
|
724
|
-
u.text += e.substring(d), u.end = e.length;
|
|
725
|
-
} else i.push({
|
|
726
|
-
text: e.substring(d),
|
|
727
|
-
start: d,
|
|
728
|
-
end: e.length
|
|
729
|
-
});
|
|
730
|
-
return new _e(i, a, h);
|
|
731
|
-
}
|
|
732
|
-
wrapLiteralPrimitive(e, t, s) {
|
|
733
|
-
let n = new P(0, e == null ? 0 : e.length);
|
|
734
|
-
return new R(new C(n, n.toAbsolute(s), e), e, t, s, this.errors);
|
|
735
|
-
}
|
|
736
|
-
_stripComments(e) {
|
|
737
|
-
let t = this._commentStart(e);
|
|
738
|
-
return t != null ? e.substring(0, t) : e;
|
|
739
|
-
}
|
|
740
|
-
_commentStart(e) {
|
|
741
|
-
let t = null;
|
|
742
|
-
for (let s = 0; s < e.length - 1; s++) {
|
|
743
|
-
let n = e.charCodeAt(s), i = e.charCodeAt(s + 1);
|
|
744
|
-
if (n === 47 && i == 47 && t == null) return s;
|
|
745
|
-
t === n ? t = null : t == null && Pe(n) && (t = n);
|
|
746
|
-
}
|
|
747
|
-
return null;
|
|
748
|
-
}
|
|
749
|
-
_checkNoInterpolation(e, t, {
|
|
750
|
-
start: s,
|
|
751
|
-
end: n
|
|
752
|
-
}) {
|
|
753
|
-
let i = -1, a = -1;
|
|
754
|
-
for (let h of this._forEachUnquotedChar(e, 0)) if (i === -1) e.startsWith(s) && (i = h);
|
|
755
|
-
else if (a = this._getInterpolationEndIndex(e, n, h), a > -1) break;
|
|
756
|
-
i > -1 && a > -1 && this._reportError(`Got interpolation (${s}${n}) where expression was expected`, e, `at column ${i} in`, t);
|
|
757
|
-
}
|
|
758
|
-
_getInterpolationEndIndex(e, t, s) {
|
|
759
|
-
for (let n of this._forEachUnquotedChar(e, s)) {
|
|
760
|
-
if (e.startsWith(t, n)) return n;
|
|
761
|
-
if (e.startsWith("//", n)) return e.indexOf(t, n);
|
|
762
|
-
}
|
|
763
|
-
return -1;
|
|
764
|
-
}
|
|
765
|
-
*_forEachUnquotedChar(e, t) {
|
|
766
|
-
let s = null, n = 0;
|
|
767
|
-
for (let i = t; i < e.length; i++) {
|
|
768
|
-
let a = e[i];
|
|
769
|
-
Pe(e.charCodeAt(i)) && (s === null || s === a) && n % 2 === 0 ? s = s === null ? a : null : s === null && (yield i), n = a === "\\" ? n + 1 : 0;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
};
|
|
773
|
-
var pe;
|
|
774
|
-
(function(r3) {
|
|
775
|
-
r3[r3.None = 0] = "None", r3[r3.Writable = 1] = "Writable";
|
|
776
|
-
})(pe || (pe = {}));
|
|
777
|
-
var U = class {
|
|
778
|
-
constructor(e, t, s, n, i, a, h) {
|
|
779
|
-
this.input = e, this.location = t, this.absoluteOffset = s, this.tokens = n, this.parseFlags = i, this.errors = a, this.offset = h, this.rparensExpected = 0, this.rbracketsExpected = 0, this.rbracesExpected = 0, this.context = pe.None, this.sourceSpanCache = /* @__PURE__ */ new Map(), this.index = 0;
|
|
780
|
-
}
|
|
781
|
-
peek(e) {
|
|
782
|
-
let t = this.index + e;
|
|
783
|
-
return t < this.tokens.length ? this.tokens[t] : Ce;
|
|
784
|
-
}
|
|
785
|
-
get next() {
|
|
786
|
-
return this.peek(0);
|
|
787
|
-
}
|
|
788
|
-
get atEOF() {
|
|
789
|
-
return this.index >= this.tokens.length;
|
|
790
|
-
}
|
|
791
|
-
get inputIndex() {
|
|
792
|
-
return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;
|
|
793
|
-
}
|
|
794
|
-
get currentEndIndex() {
|
|
795
|
-
return this.index > 0 ? this.peek(-1).end + this.offset : this.tokens.length === 0 ? this.input.length + this.offset : this.next.index + this.offset;
|
|
796
|
-
}
|
|
797
|
-
get currentAbsoluteOffset() {
|
|
798
|
-
return this.absoluteOffset + this.inputIndex;
|
|
799
|
-
}
|
|
800
|
-
span(e, t) {
|
|
801
|
-
let s = this.currentEndIndex;
|
|
802
|
-
if (t !== void 0 && t > this.currentEndIndex && (s = t), e > s) {
|
|
803
|
-
let n = s;
|
|
804
|
-
s = e, e = n;
|
|
805
|
-
}
|
|
806
|
-
return new P(e, s);
|
|
807
|
-
}
|
|
808
|
-
sourceSpan(e, t) {
|
|
809
|
-
let s = `${e}@${this.inputIndex}:${t}`;
|
|
810
|
-
return this.sourceSpanCache.has(s) || this.sourceSpanCache.set(s, this.span(e, t).toAbsolute(this.absoluteOffset)), this.sourceSpanCache.get(s);
|
|
811
|
-
}
|
|
812
|
-
advance() {
|
|
813
|
-
this.index++;
|
|
814
|
-
}
|
|
815
|
-
withContext(e, t) {
|
|
816
|
-
this.context |= e;
|
|
817
|
-
let s = t();
|
|
818
|
-
return this.context ^= e, s;
|
|
819
|
-
}
|
|
820
|
-
consumeOptionalCharacter(e) {
|
|
821
|
-
return this.next.isCharacter(e) ? (this.advance(), true) : false;
|
|
822
|
-
}
|
|
823
|
-
peekKeywordLet() {
|
|
824
|
-
return this.next.isKeywordLet();
|
|
825
|
-
}
|
|
826
|
-
peekKeywordAs() {
|
|
827
|
-
return this.next.isKeywordAs();
|
|
828
|
-
}
|
|
829
|
-
expectCharacter(e) {
|
|
830
|
-
this.consumeOptionalCharacter(e) || this.error(`Missing expected ${String.fromCharCode(e)}`);
|
|
831
|
-
}
|
|
832
|
-
consumeOptionalOperator(e) {
|
|
833
|
-
return this.next.isOperator(e) ? (this.advance(), true) : false;
|
|
834
|
-
}
|
|
835
|
-
expectOperator(e) {
|
|
836
|
-
this.consumeOptionalOperator(e) || this.error(`Missing expected operator ${e}`);
|
|
837
|
-
}
|
|
838
|
-
prettyPrintToken(e) {
|
|
839
|
-
return e === Ce ? "end of input" : `token ${e}`;
|
|
840
|
-
}
|
|
841
|
-
expectIdentifierOrKeyword() {
|
|
842
|
-
let e = this.next;
|
|
843
|
-
return !e.isIdentifier() && !e.isKeyword() ? (e.isPrivateIdentifier() ? this._reportErrorForPrivateIdentifier(e, "expected identifier or keyword") : this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`), null) : (this.advance(), e.toString());
|
|
844
|
-
}
|
|
845
|
-
expectIdentifierOrKeywordOrString() {
|
|
846
|
-
let e = this.next;
|
|
847
|
-
return !e.isIdentifier() && !e.isKeyword() && !e.isString() ? (e.isPrivateIdentifier() ? this._reportErrorForPrivateIdentifier(e, "expected identifier, keyword or string") : this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`), "") : (this.advance(), e.toString());
|
|
848
|
-
}
|
|
849
|
-
parseChain() {
|
|
850
|
-
let e = [], t = this.inputIndex;
|
|
851
|
-
for (; this.index < this.tokens.length; ) {
|
|
852
|
-
let s = this.parsePipe();
|
|
853
|
-
if (e.push(s), this.consumeOptionalCharacter(59)) for (this.parseFlags & 1 || this.error("Binding expression cannot contain chained expression"); this.consumeOptionalCharacter(59); ) ;
|
|
854
|
-
else if (this.index < this.tokens.length) {
|
|
855
|
-
let n = this.index;
|
|
856
|
-
if (this.error(`Unexpected token '${this.next}'`), this.index === n) break;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
if (e.length === 0) {
|
|
860
|
-
let s = this.offset, n = this.offset + this.input.length;
|
|
861
|
-
return new $(this.span(s, n), this.sourceSpan(s, n));
|
|
862
|
-
}
|
|
863
|
-
return e.length == 1 ? e[0] : new V(this.span(t), this.sourceSpan(t), e);
|
|
864
|
-
}
|
|
865
|
-
parsePipe() {
|
|
866
|
-
let e = this.inputIndex, t = this.parseExpression();
|
|
867
|
-
if (this.consumeOptionalOperator("|")) {
|
|
868
|
-
this.parseFlags & 1 && this.error("Cannot have a pipe in an action expression");
|
|
869
|
-
do {
|
|
870
|
-
let s = this.inputIndex, n = this.expectIdentifierOrKeyword(), i, a;
|
|
871
|
-
n !== null ? i = this.sourceSpan(s) : (n = "", a = this.next.index !== -1 ? this.next.index : this.input.length + this.offset, i = new P(a, a).toAbsolute(this.absoluteOffset));
|
|
872
|
-
let h = [];
|
|
873
|
-
for (; this.consumeOptionalCharacter(58); ) h.push(this.parseExpression());
|
|
874
|
-
t = new Y(this.span(e), this.sourceSpan(e, a), t, n, h, i);
|
|
875
|
-
} while (this.consumeOptionalOperator("|"));
|
|
876
|
-
}
|
|
877
|
-
return t;
|
|
878
|
-
}
|
|
879
|
-
parseExpression() {
|
|
880
|
-
return this.parseConditional();
|
|
881
|
-
}
|
|
882
|
-
parseConditional() {
|
|
883
|
-
let e = this.inputIndex, t = this.parseLogicalOr();
|
|
884
|
-
if (this.consumeOptionalOperator("?")) {
|
|
885
|
-
let s = this.parsePipe(), n;
|
|
886
|
-
if (this.consumeOptionalCharacter(58)) n = this.parsePipe();
|
|
887
|
-
else {
|
|
888
|
-
let i = this.inputIndex, a = this.input.substring(e, i);
|
|
889
|
-
this.error(`Conditional expression ${a} requires all 3 expressions`), n = new $(this.span(e), this.sourceSpan(e));
|
|
890
|
-
}
|
|
891
|
-
return new Q(this.span(e), this.sourceSpan(e), t, s, n);
|
|
892
|
-
} else return t;
|
|
893
|
-
}
|
|
894
|
-
parseLogicalOr() {
|
|
895
|
-
let e = this.inputIndex, t = this.parseLogicalAnd();
|
|
896
|
-
for (; this.consumeOptionalOperator("||"); ) {
|
|
897
|
-
let s = this.parseLogicalAnd();
|
|
898
|
-
t = new A(this.span(e), this.sourceSpan(e), "||", t, s);
|
|
899
|
-
}
|
|
900
|
-
return t;
|
|
901
|
-
}
|
|
902
|
-
parseLogicalAnd() {
|
|
903
|
-
let e = this.inputIndex, t = this.parseNullishCoalescing();
|
|
904
|
-
for (; this.consumeOptionalOperator("&&"); ) {
|
|
905
|
-
let s = this.parseNullishCoalescing();
|
|
906
|
-
t = new A(this.span(e), this.sourceSpan(e), "&&", t, s);
|
|
907
|
-
}
|
|
908
|
-
return t;
|
|
909
|
-
}
|
|
910
|
-
parseNullishCoalescing() {
|
|
911
|
-
let e = this.inputIndex, t = this.parseEquality();
|
|
912
|
-
for (; this.consumeOptionalOperator("??"); ) {
|
|
913
|
-
let s = this.parseEquality();
|
|
914
|
-
t = new A(this.span(e), this.sourceSpan(e), "??", t, s);
|
|
915
|
-
}
|
|
916
|
-
return t;
|
|
917
|
-
}
|
|
918
|
-
parseEquality() {
|
|
919
|
-
let e = this.inputIndex, t = this.parseRelational();
|
|
920
|
-
for (; this.next.type == f.Operator; ) {
|
|
921
|
-
let s = this.next.strValue;
|
|
922
|
-
switch (s) {
|
|
923
|
-
case "==":
|
|
924
|
-
case "===":
|
|
925
|
-
case "!=":
|
|
926
|
-
case "!==":
|
|
927
|
-
this.advance();
|
|
928
|
-
let n = this.parseRelational();
|
|
929
|
-
t = new A(this.span(e), this.sourceSpan(e), s, t, n);
|
|
930
|
-
continue;
|
|
931
|
-
}
|
|
932
|
-
break;
|
|
933
|
-
}
|
|
934
|
-
return t;
|
|
935
|
-
}
|
|
936
|
-
parseRelational() {
|
|
937
|
-
let e = this.inputIndex, t = this.parseAdditive();
|
|
938
|
-
for (; this.next.type == f.Operator; ) {
|
|
939
|
-
let s = this.next.strValue;
|
|
940
|
-
switch (s) {
|
|
941
|
-
case "<":
|
|
942
|
-
case ">":
|
|
943
|
-
case "<=":
|
|
944
|
-
case ">=":
|
|
945
|
-
this.advance();
|
|
946
|
-
let n = this.parseAdditive();
|
|
947
|
-
t = new A(this.span(e), this.sourceSpan(e), s, t, n);
|
|
948
|
-
continue;
|
|
949
|
-
}
|
|
950
|
-
break;
|
|
951
|
-
}
|
|
952
|
-
return t;
|
|
953
|
-
}
|
|
954
|
-
parseAdditive() {
|
|
955
|
-
let e = this.inputIndex, t = this.parseMultiplicative();
|
|
956
|
-
for (; this.next.type == f.Operator; ) {
|
|
957
|
-
let s = this.next.strValue;
|
|
958
|
-
switch (s) {
|
|
959
|
-
case "+":
|
|
960
|
-
case "-":
|
|
961
|
-
this.advance();
|
|
962
|
-
let n = this.parseMultiplicative();
|
|
963
|
-
t = new A(this.span(e), this.sourceSpan(e), s, t, n);
|
|
964
|
-
continue;
|
|
965
|
-
}
|
|
966
|
-
break;
|
|
967
|
-
}
|
|
968
|
-
return t;
|
|
969
|
-
}
|
|
970
|
-
parseMultiplicative() {
|
|
971
|
-
let e = this.inputIndex, t = this.parsePrefix();
|
|
972
|
-
for (; this.next.type == f.Operator; ) {
|
|
973
|
-
let s = this.next.strValue;
|
|
974
|
-
switch (s) {
|
|
975
|
-
case "*":
|
|
976
|
-
case "%":
|
|
977
|
-
case "/":
|
|
978
|
-
this.advance();
|
|
979
|
-
let n = this.parsePrefix();
|
|
980
|
-
t = new A(this.span(e), this.sourceSpan(e), s, t, n);
|
|
981
|
-
continue;
|
|
982
|
-
}
|
|
983
|
-
break;
|
|
984
|
-
}
|
|
985
|
-
return t;
|
|
986
|
-
}
|
|
987
|
-
parsePrefix() {
|
|
988
|
-
if (this.next.type == f.Operator) {
|
|
989
|
-
let e = this.inputIndex, t = this.next.strValue, s;
|
|
990
|
-
switch (t) {
|
|
991
|
-
case "+":
|
|
992
|
-
return this.advance(), s = this.parsePrefix(), B.createPlus(this.span(e), this.sourceSpan(e), s);
|
|
993
|
-
case "-":
|
|
994
|
-
return this.advance(), s = this.parsePrefix(), B.createMinus(this.span(e), this.sourceSpan(e), s);
|
|
995
|
-
case "!":
|
|
996
|
-
return this.advance(), s = this.parsePrefix(), new ee(this.span(e), this.sourceSpan(e), s);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
return this.parseCallChain();
|
|
1000
|
-
}
|
|
1001
|
-
parseCallChain() {
|
|
1002
|
-
let e = this.inputIndex, t = this.parsePrimary();
|
|
1003
|
-
for (; ; ) if (this.consumeOptionalCharacter(46)) t = this.parseAccessMember(t, e, false);
|
|
1004
|
-
else if (this.consumeOptionalOperator("?.")) this.consumeOptionalCharacter(40) ? t = this.parseCall(t, e, true) : t = this.consumeOptionalCharacter(91) ? this.parseKeyedReadOrWrite(t, e, true) : this.parseAccessMember(t, e, true);
|
|
1005
|
-
else if (this.consumeOptionalCharacter(91)) t = this.parseKeyedReadOrWrite(t, e, false);
|
|
1006
|
-
else if (this.consumeOptionalCharacter(40)) t = this.parseCall(t, e, false);
|
|
1007
|
-
else if (this.consumeOptionalOperator("!")) t = new te(this.span(e), this.sourceSpan(e), t);
|
|
1008
|
-
else return t;
|
|
1009
|
-
}
|
|
1010
|
-
parsePrimary() {
|
|
1011
|
-
let e = this.inputIndex;
|
|
1012
|
-
if (this.consumeOptionalCharacter(40)) {
|
|
1013
|
-
this.rparensExpected++;
|
|
1014
|
-
let t = this.parsePipe();
|
|
1015
|
-
return this.rparensExpected--, this.expectCharacter(41), t;
|
|
1016
|
-
} else {
|
|
1017
|
-
if (this.next.isKeywordNull()) return this.advance(), new C(this.span(e), this.sourceSpan(e), null);
|
|
1018
|
-
if (this.next.isKeywordUndefined()) return this.advance(), new C(this.span(e), this.sourceSpan(e), void 0);
|
|
1019
|
-
if (this.next.isKeywordTrue()) return this.advance(), new C(this.span(e), this.sourceSpan(e), true);
|
|
1020
|
-
if (this.next.isKeywordFalse()) return this.advance(), new C(this.span(e), this.sourceSpan(e), false);
|
|
1021
|
-
if (this.next.isKeywordThis()) return this.advance(), new Se(this.span(e), this.sourceSpan(e));
|
|
1022
|
-
if (this.consumeOptionalCharacter(91)) {
|
|
1023
|
-
this.rbracketsExpected++;
|
|
1024
|
-
let t = this.parseExpressionList(93);
|
|
1025
|
-
return this.rbracketsExpected--, this.expectCharacter(93), new Z(this.span(e), this.sourceSpan(e), t);
|
|
1026
|
-
} else {
|
|
1027
|
-
if (this.next.isCharacter(123)) return this.parseLiteralMap();
|
|
1028
|
-
if (this.next.isIdentifier()) return this.parseAccessMember(new L(this.span(e), this.sourceSpan(e)), e, false);
|
|
1029
|
-
if (this.next.isNumber()) {
|
|
1030
|
-
let t = this.next.toNumber();
|
|
1031
|
-
return this.advance(), new C(this.span(e), this.sourceSpan(e), t);
|
|
1032
|
-
} else if (this.next.isString()) {
|
|
1033
|
-
let t = this.next.toString();
|
|
1034
|
-
return this.advance(), new C(this.span(e), this.sourceSpan(e), t);
|
|
1035
|
-
} else return this.next.isPrivateIdentifier() ? (this._reportErrorForPrivateIdentifier(this.next, null), new $(this.span(e), this.sourceSpan(e))) : this.index >= this.tokens.length ? (this.error(`Unexpected end of expression: ${this.input}`), new $(this.span(e), this.sourceSpan(e))) : (this.error(`Unexpected token ${this.next}`), new $(this.span(e), this.sourceSpan(e)));
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
parseExpressionList(e) {
|
|
1040
|
-
let t = [];
|
|
1041
|
-
do
|
|
1042
|
-
if (!this.next.isCharacter(e)) t.push(this.parsePipe());
|
|
1043
|
-
else break;
|
|
1044
|
-
while (this.consumeOptionalCharacter(44));
|
|
1045
|
-
return t;
|
|
1046
|
-
}
|
|
1047
|
-
parseLiteralMap() {
|
|
1048
|
-
let e = [], t = [], s = this.inputIndex;
|
|
1049
|
-
if (this.expectCharacter(123), !this.consumeOptionalCharacter(125)) {
|
|
1050
|
-
this.rbracesExpected++;
|
|
1051
|
-
do {
|
|
1052
|
-
let n = this.inputIndex, i = this.next.isString(), a = this.expectIdentifierOrKeywordOrString();
|
|
1053
|
-
if (e.push({
|
|
1054
|
-
key: a,
|
|
1055
|
-
quoted: i
|
|
1056
|
-
}), i) this.expectCharacter(58), t.push(this.parsePipe());
|
|
1057
|
-
else if (this.consumeOptionalCharacter(58)) t.push(this.parsePipe());
|
|
1058
|
-
else {
|
|
1059
|
-
let h = this.span(n), g = this.sourceSpan(n);
|
|
1060
|
-
t.push(new b(h, g, g, new L(h, g), a));
|
|
1061
|
-
}
|
|
1062
|
-
} while (this.consumeOptionalCharacter(44) && !this.next.isCharacter(125));
|
|
1063
|
-
this.rbracesExpected--, this.expectCharacter(125);
|
|
1064
|
-
}
|
|
1065
|
-
return new J(this.span(s), this.sourceSpan(s), e, t);
|
|
1066
|
-
}
|
|
1067
|
-
parseAccessMember(e, t, s) {
|
|
1068
|
-
let n = this.inputIndex, i = this.withContext(pe.Writable, () => {
|
|
1069
|
-
let g = this.expectIdentifierOrKeyword() ?? "";
|
|
1070
|
-
return g.length === 0 && this.error("Expected identifier for property access", e.span.end), g;
|
|
1071
|
-
}), a = this.sourceSpan(n), h;
|
|
1072
|
-
if (s) this.consumeOptionalAssignment() ? (this.error("The '?.' operator cannot be used in the assignment"), h = new $(this.span(t), this.sourceSpan(t))) : h = new z(this.span(t), this.sourceSpan(t), a, e, i);
|
|
1073
|
-
else if (this.consumeOptionalAssignment()) {
|
|
1074
|
-
if (!(this.parseFlags & 1)) return this.error("Bindings cannot contain assignments"), new $(this.span(t), this.sourceSpan(t));
|
|
1075
|
-
let g = this.parseConditional();
|
|
1076
|
-
h = new H(this.span(t), this.sourceSpan(t), a, e, i, g);
|
|
1077
|
-
} else h = new b(this.span(t), this.sourceSpan(t), a, e, i);
|
|
1078
|
-
return h;
|
|
1079
|
-
}
|
|
1080
|
-
parseCall(e, t, s) {
|
|
1081
|
-
let n = this.inputIndex;
|
|
1082
|
-
this.rparensExpected++;
|
|
1083
|
-
let i = this.parseCallArguments(), a = this.span(n, this.inputIndex).toAbsolute(this.absoluteOffset);
|
|
1084
|
-
this.expectCharacter(41), this.rparensExpected--;
|
|
1085
|
-
let h = this.span(t), g = this.sourceSpan(t);
|
|
1086
|
-
return s ? new se(h, g, e, i, a) : new re(h, g, e, i, a);
|
|
1087
|
-
}
|
|
1088
|
-
consumeOptionalAssignment() {
|
|
1089
|
-
return this.parseFlags & 2 && this.next.isOperator("!") && this.peek(1).isOperator("=") ? (this.advance(), this.advance(), true) : this.consumeOptionalOperator("=");
|
|
1090
|
-
}
|
|
1091
|
-
parseCallArguments() {
|
|
1092
|
-
if (this.next.isCharacter(41)) return [];
|
|
1093
|
-
let e = [];
|
|
1094
|
-
do
|
|
1095
|
-
e.push(this.parsePipe());
|
|
1096
|
-
while (this.consumeOptionalCharacter(44));
|
|
1097
|
-
return e;
|
|
1098
|
-
}
|
|
1099
|
-
expectTemplateBindingKey() {
|
|
1100
|
-
let e = "", t = false, s = this.currentAbsoluteOffset;
|
|
1101
|
-
do
|
|
1102
|
-
e += this.expectIdentifierOrKeywordOrString(), t = this.consumeOptionalOperator("-"), t && (e += "-");
|
|
1103
|
-
while (t);
|
|
1104
|
-
return {
|
|
1105
|
-
source: e,
|
|
1106
|
-
span: new I(s, s + e.length)
|
|
1107
|
-
};
|
|
1108
|
-
}
|
|
1109
|
-
parseTemplateBindings(e) {
|
|
1110
|
-
let t = [];
|
|
1111
|
-
for (t.push(...this.parseDirectiveKeywordBindings(e)); this.index < this.tokens.length; ) {
|
|
1112
|
-
let s = this.parseLetBinding();
|
|
1113
|
-
if (s) t.push(s);
|
|
1114
|
-
else {
|
|
1115
|
-
let n = this.expectTemplateBindingKey(), i = this.parseAsBinding(n);
|
|
1116
|
-
i ? t.push(i) : (n.source = e.source + n.source.charAt(0).toUpperCase() + n.source.substring(1), t.push(...this.parseDirectiveKeywordBindings(n)));
|
|
1117
|
-
}
|
|
1118
|
-
this.consumeStatementTerminator();
|
|
1119
|
-
}
|
|
1120
|
-
return new Me(t, [], this.errors);
|
|
1121
|
-
}
|
|
1122
|
-
parseKeyedReadOrWrite(e, t, s) {
|
|
1123
|
-
return this.withContext(pe.Writable, () => {
|
|
1124
|
-
this.rbracketsExpected++;
|
|
1125
|
-
let n = this.parsePipe();
|
|
1126
|
-
if (n instanceof $ && this.error("Key access cannot be empty"), this.rbracketsExpected--, this.expectCharacter(93), this.consumeOptionalOperator("=")) {
|
|
1127
|
-
if (s) this.error("The '?.' operator cannot be used in the assignment");
|
|
1128
|
-
else {
|
|
1129
|
-
let i = this.parseConditional();
|
|
1130
|
-
return new X(this.span(t), this.sourceSpan(t), e, n, i);
|
|
1131
|
-
}
|
|
1132
|
-
} else return s ? new j(this.span(t), this.sourceSpan(t), e, n) : new q(this.span(t), this.sourceSpan(t), e, n);
|
|
1133
|
-
return new $(this.span(t), this.sourceSpan(t));
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
parseDirectiveKeywordBindings(e) {
|
|
1137
|
-
let t = [];
|
|
1138
|
-
this.consumeOptionalCharacter(58);
|
|
1139
|
-
let s = this.getDirectiveBoundTarget(), n = this.currentAbsoluteOffset, i = this.parseAsBinding(e);
|
|
1140
|
-
i || (this.consumeStatementTerminator(), n = this.currentAbsoluteOffset);
|
|
1141
|
-
let a = new I(e.span.start, n);
|
|
1142
|
-
return t.push(new ne(a, e, s)), i && t.push(i), t;
|
|
1143
|
-
}
|
|
1144
|
-
getDirectiveBoundTarget() {
|
|
1145
|
-
if (this.next === Ce || this.peekKeywordAs() || this.peekKeywordLet()) return null;
|
|
1146
|
-
let e = this.parsePipe(), {
|
|
1147
|
-
start: t,
|
|
1148
|
-
end: s
|
|
1149
|
-
} = e.span, n = this.input.substring(t, s);
|
|
1150
|
-
return new R(e, n, this.location, this.absoluteOffset + t, this.errors);
|
|
1151
|
-
}
|
|
1152
|
-
parseAsBinding(e) {
|
|
1153
|
-
if (!this.peekKeywordAs()) return null;
|
|
1154
|
-
this.advance();
|
|
1155
|
-
let t = this.expectTemplateBindingKey();
|
|
1156
|
-
this.consumeStatementTerminator();
|
|
1157
|
-
let s = new I(e.span.start, this.currentAbsoluteOffset);
|
|
1158
|
-
return new T(s, t, e);
|
|
1159
|
-
}
|
|
1160
|
-
parseLetBinding() {
|
|
1161
|
-
if (!this.peekKeywordLet()) return null;
|
|
1162
|
-
let e = this.currentAbsoluteOffset;
|
|
1163
|
-
this.advance();
|
|
1164
|
-
let t = this.expectTemplateBindingKey(), s = null;
|
|
1165
|
-
this.consumeOptionalOperator("=") && (s = this.expectTemplateBindingKey()), this.consumeStatementTerminator();
|
|
1166
|
-
let n = new I(e, this.currentAbsoluteOffset);
|
|
1167
|
-
return new T(n, t, s);
|
|
1168
|
-
}
|
|
1169
|
-
consumeStatementTerminator() {
|
|
1170
|
-
this.consumeOptionalCharacter(59) || this.consumeOptionalCharacter(44);
|
|
1171
|
-
}
|
|
1172
|
-
error(e, t = null) {
|
|
1173
|
-
this.errors.push(new G(e, this.input, this.locationText(t), this.location)), this.skip();
|
|
1174
|
-
}
|
|
1175
|
-
locationText(e = null) {
|
|
1176
|
-
return e == null && (e = this.index), e < this.tokens.length ? `at column ${this.tokens[e].index + 1} in` : "at the end of the expression";
|
|
1177
|
-
}
|
|
1178
|
-
_reportErrorForPrivateIdentifier(e, t) {
|
|
1179
|
-
let s = `Private identifiers are not supported. Unexpected private identifier: ${e}`;
|
|
1180
|
-
t !== null && (s += `, ${t}`), this.error(s);
|
|
1181
|
-
}
|
|
1182
|
-
skip() {
|
|
1183
|
-
let e = this.next;
|
|
1184
|
-
for (; this.index < this.tokens.length && !e.isCharacter(59) && !e.isOperator("|") && (this.rparensExpected <= 0 || !e.isCharacter(41)) && (this.rbracesExpected <= 0 || !e.isCharacter(125)) && (this.rbracketsExpected <= 0 || !e.isCharacter(93)) && (!(this.context & pe.Writable) || !e.isOperator("=")); ) this.next.isError() && this.errors.push(new G(this.next.toString(), this.input, this.locationText(), this.location)), this.advance(), e = this.next;
|
|
1185
|
-
}
|
|
1186
|
-
};
|
|
1187
|
-
var Fe = class extends we {
|
|
1188
|
-
constructor() {
|
|
1189
|
-
super(...arguments), this.errors = [];
|
|
1190
|
-
}
|
|
1191
|
-
visitPipe() {
|
|
1192
|
-
this.errors.push("pipes");
|
|
1193
|
-
}
|
|
1194
|
-
};
|
|
1195
|
-
function Sr(r3) {
|
|
1196
|
-
let e = /* @__PURE__ */ new Map(), t = 0, s = 0, n = 0;
|
|
1197
|
-
for (; n < r3.length; ) {
|
|
1198
|
-
let i = r3[n];
|
|
1199
|
-
if (i.type === 9) {
|
|
1200
|
-
let [a, h] = i.parts;
|
|
1201
|
-
t += h.length, s += a.length;
|
|
1202
|
-
} else {
|
|
1203
|
-
let a = i.parts.reduce((h, g) => h + g.length, 0);
|
|
1204
|
-
s += a, t += a;
|
|
1205
|
-
}
|
|
1206
|
-
e.set(s, t), n++;
|
|
1207
|
-
}
|
|
1208
|
-
return e;
|
|
1209
|
-
}
|
|
1210
|
-
var ht = "angular-estree-parser";
|
|
1211
|
-
var De = "NgEstreeParser";
|
|
1212
|
-
var Ue = 0;
|
|
1213
|
-
var Ae = [ht, Ue];
|
|
1214
|
-
function pt() {
|
|
1215
|
-
return new fe(new le());
|
|
1216
|
-
}
|
|
1217
|
-
function Oe(r3, e) {
|
|
1218
|
-
let t = pt(), {
|
|
1219
|
-
astInput: s,
|
|
1220
|
-
comments: n
|
|
1221
|
-
} = wr(r3, t), {
|
|
1222
|
-
ast: i,
|
|
1223
|
-
errors: a
|
|
1224
|
-
} = e(s, t);
|
|
1225
|
-
return vt(a), {
|
|
1226
|
-
ast: i,
|
|
1227
|
-
comments: n
|
|
1228
|
-
};
|
|
1229
|
-
}
|
|
1230
|
-
function ut(r3) {
|
|
1231
|
-
return Oe(r3, (e, t) => t.parseBinding(e, ...Ae));
|
|
1232
|
-
}
|
|
1233
|
-
function xt(r3) {
|
|
1234
|
-
return Oe(r3, (e, t) => t.parseAction(e, false, ...Ae));
|
|
1235
|
-
}
|
|
1236
|
-
function dt(r3) {
|
|
1237
|
-
return Oe(r3, (e, t) => {
|
|
1238
|
-
let s = t.parseInterpolationExpression(e, ...Ae);
|
|
1239
|
-
return s.ast = s.ast.expressions[0], s;
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
function ft(r3) {
|
|
1243
|
-
let e = pt(), {
|
|
1244
|
-
templateBindings: t,
|
|
1245
|
-
errors: s
|
|
1246
|
-
} = e.parseTemplateBindings(De, r3, ht, Ue, Ue);
|
|
1247
|
-
return vt(s), t;
|
|
1248
|
-
}
|
|
1249
|
-
function vt(r3) {
|
|
1250
|
-
if (r3.length !== 0) {
|
|
1251
|
-
let [{
|
|
1252
|
-
message: e
|
|
1253
|
-
}] = r3;
|
|
1254
|
-
throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g, ""));
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
function wr(r3, e) {
|
|
1258
|
-
let t = e._commentStart(r3);
|
|
1259
|
-
return t === null ? {
|
|
1260
|
-
astInput: r3,
|
|
1261
|
-
comments: []
|
|
1262
|
-
} : {
|
|
1263
|
-
astInput: r3.slice(0, t),
|
|
1264
|
-
comments: [{
|
|
1265
|
-
type: "Comment",
|
|
1266
|
-
value: r3.slice(t + 2),
|
|
1267
|
-
sourceSpan: {
|
|
1268
|
-
start: t,
|
|
1269
|
-
end: r3.length
|
|
1270
|
-
}
|
|
1271
|
-
}]
|
|
1272
|
-
};
|
|
1273
|
-
}
|
|
1274
|
-
function gt(r3) {
|
|
1275
|
-
return r3 instanceof B ? "Unary" : r3 instanceof A ? "Binary" : r3 instanceof Y ? "BindingPipe" : r3 instanceof re ? "Call" : r3 instanceof V ? "Chain" : r3 instanceof Q ? "Conditional" : r3 instanceof $ ? "EmptyExpr" : r3 instanceof L ? "ImplicitReceiver" : r3 instanceof q ? "KeyedRead" : r3 instanceof j ? "SafeKeyedRead" : r3 instanceof X ? "KeyedWrite" : r3 instanceof Z ? "LiteralArray" : r3 instanceof J ? "LiteralMap" : r3 instanceof C ? "LiteralPrimitive" : r3 instanceof te ? "NonNullAssert" : r3 instanceof ee ? "PrefixNot" : r3 instanceof b ? "PropertyRead" : r3 instanceof H ? "PropertyWrite" : r3 instanceof se ? "SafeCall" : r3 instanceof z ? "SafePropertyRead" : r3.type;
|
|
1276
|
-
}
|
|
1277
|
-
function ct({
|
|
1278
|
-
start: r3,
|
|
1279
|
-
end: e
|
|
1280
|
-
}, t) {
|
|
1281
|
-
let s = r3, n = e;
|
|
1282
|
-
for (; n !== s && /\s/.test(t[n - 1]); ) n--;
|
|
1283
|
-
for (; s !== n && /\s/.test(t[s]); ) s++;
|
|
1284
|
-
return {
|
|
1285
|
-
start: s,
|
|
1286
|
-
end: n
|
|
1287
|
-
};
|
|
1288
|
-
}
|
|
1289
|
-
function yr({
|
|
1290
|
-
start: r3,
|
|
1291
|
-
end: e
|
|
1292
|
-
}, t) {
|
|
1293
|
-
let s = r3, n = e;
|
|
1294
|
-
for (; n !== t.length && /\s/.test(t[n]); ) n++;
|
|
1295
|
-
for (; s !== 0 && /\s/.test(t[s - 1]); ) s--;
|
|
1296
|
-
return {
|
|
1297
|
-
start: s,
|
|
1298
|
-
end: n
|
|
1299
|
-
};
|
|
1300
|
-
}
|
|
1301
|
-
function Er(r3, e) {
|
|
1302
|
-
return e[r3.start - 1] === "(" && e[r3.end] === ")" ? {
|
|
1303
|
-
start: r3.start - 1,
|
|
1304
|
-
end: r3.end + 1
|
|
1305
|
-
} : r3;
|
|
1306
|
-
}
|
|
1307
|
-
function St(r3, e, t) {
|
|
1308
|
-
let s = 0, n = {
|
|
1309
|
-
start: r3.start,
|
|
1310
|
-
end: r3.end
|
|
1311
|
-
};
|
|
1312
|
-
for (; ; ) {
|
|
1313
|
-
let i = yr(n, e), a = Er(i, e);
|
|
1314
|
-
if (i.start === a.start && i.end === a.end) break;
|
|
1315
|
-
n.start = a.start, n.end = a.end, s++;
|
|
1316
|
-
}
|
|
1317
|
-
return {
|
|
1318
|
-
hasParens: (t ? s - 1 : s) !== 0,
|
|
1319
|
-
outerSpan: ct(t ? {
|
|
1320
|
-
start: n.start + 1,
|
|
1321
|
-
end: n.end - 1
|
|
1322
|
-
} : n, e),
|
|
1323
|
-
innerSpan: ct(r3, e)
|
|
1324
|
-
};
|
|
1325
|
-
}
|
|
1326
|
-
function mt(r3) {
|
|
1327
|
-
return typeof r3 == "string" ? (e) => e === r3 : (e) => r3.test(e);
|
|
1328
|
-
}
|
|
1329
|
-
function wt(r3, e, t) {
|
|
1330
|
-
let s = mt(e);
|
|
1331
|
-
for (let n = t; n >= 0; n--) {
|
|
1332
|
-
let i = r3[n];
|
|
1333
|
-
if (s(i)) return n;
|
|
1334
|
-
}
|
|
1335
|
-
throw new Error(`Cannot find front char ${e} from index ${t} in ${JSON.stringify(r3)}`);
|
|
1336
|
-
}
|
|
1337
|
-
function yt(r3, e, t) {
|
|
1338
|
-
let s = mt(e);
|
|
1339
|
-
for (let n = t; n < r3.length; n++) {
|
|
1340
|
-
let i = r3[n];
|
|
1341
|
-
if (s(i)) return n;
|
|
1342
|
-
}
|
|
1343
|
-
throw new Error(`Cannot find character ${e} from index ${t} in ${JSON.stringify(r3)}`);
|
|
1344
|
-
}
|
|
1345
|
-
function Et(r3) {
|
|
1346
|
-
return r3.slice(0, 1).toLowerCase() + r3.slice(1);
|
|
1347
|
-
}
|
|
1348
|
-
var ve = class {
|
|
1349
|
-
text;
|
|
1350
|
-
constructor(e) {
|
|
1351
|
-
this.text = e;
|
|
1352
|
-
}
|
|
1353
|
-
getCharacterIndex(e, t) {
|
|
1354
|
-
return yt(this.text, e, t);
|
|
1355
|
-
}
|
|
1356
|
-
getCharacterLastIndex(e, t) {
|
|
1357
|
-
return wt(this.text, e, t);
|
|
1358
|
-
}
|
|
1359
|
-
};
|
|
1360
|
-
var $r = (r3, e, t) => {
|
|
1361
|
-
if (!(r3 && e == null)) return Array.isArray(e) || typeof e == "string" ? e[t < 0 ? e.length + t : t] : e.at(t);
|
|
1362
|
-
};
|
|
1363
|
-
var Ne = $r;
|
|
1364
|
-
var D = (r3, e, t = false) => {
|
|
1365
|
-
let s = gt(r3);
|
|
1366
|
-
switch (s) {
|
|
1367
|
-
case "Unary": {
|
|
1368
|
-
let {
|
|
1369
|
-
operator: o,
|
|
1370
|
-
expr: u
|
|
1371
|
-
} = r3, v = n(u);
|
|
1372
|
-
return a("UnaryExpression", {
|
|
1373
|
-
prefix: true,
|
|
1374
|
-
argument: v,
|
|
1375
|
-
operator: o
|
|
1376
|
-
}, r3.sourceSpan, {
|
|
1377
|
-
hasParentParens: t
|
|
1378
|
-
});
|
|
1379
|
-
}
|
|
1380
|
-
case "Binary": {
|
|
1381
|
-
let {
|
|
1382
|
-
left: o,
|
|
1383
|
-
operation: u,
|
|
1384
|
-
right: v
|
|
1385
|
-
} = r3, c = n(o), x = n(v);
|
|
1386
|
-
return a(u === "&&" || u === "||" || u === "??" ? "LogicalExpression" : "BinaryExpression", {
|
|
1387
|
-
left: c,
|
|
1388
|
-
right: x,
|
|
1389
|
-
operator: u
|
|
1390
|
-
}, {
|
|
1391
|
-
start: E(c),
|
|
1392
|
-
end: S(x)
|
|
1393
|
-
}, {
|
|
1394
|
-
hasParentParens: t
|
|
1395
|
-
});
|
|
1396
|
-
}
|
|
1397
|
-
case "BindingPipe": {
|
|
1398
|
-
let {
|
|
1399
|
-
exp: o,
|
|
1400
|
-
name: u,
|
|
1401
|
-
args: v
|
|
1402
|
-
} = r3, c = n(o), x = e.getCharacterIndex(/\S/, e.getCharacterIndex("|", S(c)) + 1), l = a("Identifier", {
|
|
1403
|
-
name: u
|
|
1404
|
-
}, {
|
|
1405
|
-
start: x,
|
|
1406
|
-
end: x + u.length
|
|
1407
|
-
}), p = v.map(n);
|
|
1408
|
-
return a("NGPipeExpression", {
|
|
1409
|
-
left: c,
|
|
1410
|
-
right: l,
|
|
1411
|
-
arguments: p
|
|
1412
|
-
}, {
|
|
1413
|
-
start: E(c),
|
|
1414
|
-
end: S(p.length === 0 ? l : Ne(false, p, -1))
|
|
1415
|
-
}, {
|
|
1416
|
-
hasParentParens: t
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
case "Chain": {
|
|
1420
|
-
let {
|
|
1421
|
-
expressions: o
|
|
1422
|
-
} = r3;
|
|
1423
|
-
return a("NGChainedExpression", {
|
|
1424
|
-
expressions: o.map(n)
|
|
1425
|
-
}, r3.sourceSpan, {
|
|
1426
|
-
hasParentParens: t
|
|
1427
|
-
});
|
|
1428
|
-
}
|
|
1429
|
-
case "Comment": {
|
|
1430
|
-
let {
|
|
1431
|
-
value: o
|
|
1432
|
-
} = r3;
|
|
1433
|
-
return a("CommentLine", {
|
|
1434
|
-
value: o
|
|
1435
|
-
}, r3.sourceSpan, {
|
|
1436
|
-
processSpan: false
|
|
1437
|
-
});
|
|
1438
|
-
}
|
|
1439
|
-
case "Conditional": {
|
|
1440
|
-
let {
|
|
1441
|
-
condition: o,
|
|
1442
|
-
trueExp: u,
|
|
1443
|
-
falseExp: v
|
|
1444
|
-
} = r3, c = n(o), x = n(u), l = n(v);
|
|
1445
|
-
return a("ConditionalExpression", {
|
|
1446
|
-
test: c,
|
|
1447
|
-
consequent: x,
|
|
1448
|
-
alternate: l
|
|
1449
|
-
}, {
|
|
1450
|
-
start: E(c),
|
|
1451
|
-
end: S(l)
|
|
1452
|
-
}, {
|
|
1453
|
-
hasParentParens: t
|
|
1454
|
-
});
|
|
1455
|
-
}
|
|
1456
|
-
case "EmptyExpr":
|
|
1457
|
-
return a("NGEmptyExpression", {}, r3.sourceSpan, {
|
|
1458
|
-
hasParentParens: t
|
|
1459
|
-
});
|
|
1460
|
-
case "ImplicitReceiver":
|
|
1461
|
-
return a("ThisExpression", {}, r3.sourceSpan, {
|
|
1462
|
-
hasParentParens: t
|
|
1463
|
-
});
|
|
1464
|
-
case "KeyedRead":
|
|
1465
|
-
case "SafeKeyedRead": {
|
|
1466
|
-
let o = s === "SafeKeyedRead", {
|
|
1467
|
-
key: u
|
|
1468
|
-
} = r3, v = Object.prototype.hasOwnProperty.call(r3, "receiver") ? r3.receiver : r3.obj, c = n(u);
|
|
1469
|
-
return h(v, c, {
|
|
1470
|
-
computed: true,
|
|
1471
|
-
optional: o
|
|
1472
|
-
}, {
|
|
1473
|
-
end: r3.sourceSpan.end,
|
|
1474
|
-
hasParentParens: t
|
|
1475
|
-
});
|
|
1476
|
-
}
|
|
1477
|
-
case "LiteralArray": {
|
|
1478
|
-
let {
|
|
1479
|
-
expressions: o
|
|
1480
|
-
} = r3;
|
|
1481
|
-
return a("ArrayExpression", {
|
|
1482
|
-
elements: o.map(n)
|
|
1483
|
-
}, r3.sourceSpan, {
|
|
1484
|
-
hasParentParens: t
|
|
1485
|
-
});
|
|
1486
|
-
}
|
|
1487
|
-
case "LiteralMap": {
|
|
1488
|
-
let {
|
|
1489
|
-
keys: o,
|
|
1490
|
-
values: u
|
|
1491
|
-
} = r3, v = u.map((x) => n(x)), c = o.map(({
|
|
1492
|
-
key: x,
|
|
1493
|
-
quoted: l
|
|
1494
|
-
}, p) => {
|
|
1495
|
-
let k = v[p], m = E(k), N = S(k), ue = e.getCharacterIndex(/\S/, p === 0 ? r3.sourceSpan.start + 1 : e.getCharacterIndex(",", S(v[p - 1])) + 1), It = m === ue ? N : e.getCharacterLastIndex(/\S/, e.getCharacterLastIndex(":", m - 1) - 1) + 1, He = {
|
|
1496
|
-
start: ue,
|
|
1497
|
-
end: It
|
|
1498
|
-
}, ge = l ? a("StringLiteral", {
|
|
1499
|
-
value: x
|
|
1500
|
-
}, He) : a("Identifier", {
|
|
1501
|
-
name: x
|
|
1502
|
-
}, He), kt = ge.end < ge.start || ue === m;
|
|
1503
|
-
return a("ObjectProperty", {
|
|
1504
|
-
key: ge,
|
|
1505
|
-
value: k,
|
|
1506
|
-
shorthand: kt,
|
|
1507
|
-
computed: false
|
|
1508
|
-
}, {
|
|
1509
|
-
start: E(ge),
|
|
1510
|
-
end: N
|
|
1511
|
-
});
|
|
1512
|
-
});
|
|
1513
|
-
return a("ObjectExpression", {
|
|
1514
|
-
properties: c
|
|
1515
|
-
}, r3.sourceSpan, {
|
|
1516
|
-
hasParentParens: t
|
|
1517
|
-
});
|
|
1518
|
-
}
|
|
1519
|
-
case "LiteralPrimitive": {
|
|
1520
|
-
let {
|
|
1521
|
-
value: o
|
|
1522
|
-
} = r3;
|
|
1523
|
-
switch (typeof o) {
|
|
1524
|
-
case "boolean":
|
|
1525
|
-
return a("BooleanLiteral", {
|
|
1526
|
-
value: o
|
|
1527
|
-
}, r3.sourceSpan, {
|
|
1528
|
-
hasParentParens: t
|
|
1529
|
-
});
|
|
1530
|
-
case "number":
|
|
1531
|
-
return a("NumericLiteral", {
|
|
1532
|
-
value: o
|
|
1533
|
-
}, r3.sourceSpan, {
|
|
1534
|
-
hasParentParens: t
|
|
1535
|
-
});
|
|
1536
|
-
case "object":
|
|
1537
|
-
return a("NullLiteral", {}, r3.sourceSpan, {
|
|
1538
|
-
hasParentParens: t
|
|
1539
|
-
});
|
|
1540
|
-
case "string":
|
|
1541
|
-
return a("StringLiteral", {
|
|
1542
|
-
value: o
|
|
1543
|
-
}, r3.sourceSpan, {
|
|
1544
|
-
hasParentParens: t
|
|
1545
|
-
});
|
|
1546
|
-
case "undefined":
|
|
1547
|
-
return a("Identifier", {
|
|
1548
|
-
name: "undefined"
|
|
1549
|
-
}, r3.sourceSpan, {
|
|
1550
|
-
hasParentParens: t
|
|
1551
|
-
});
|
|
1552
|
-
default:
|
|
1553
|
-
throw new Error(`Unexpected LiteralPrimitive value type ${typeof o}`);
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
case "Call":
|
|
1557
|
-
case "SafeCall": {
|
|
1558
|
-
let o = s === "SafeCall", {
|
|
1559
|
-
receiver: u,
|
|
1560
|
-
args: v
|
|
1561
|
-
} = r3, c = v.length === 1 ? [i(v[0])] : v.map(n), x = n(u), l = d(x), p = o || l ? "OptionalCallExpression" : "CallExpression";
|
|
1562
|
-
return a(p, {
|
|
1563
|
-
callee: x,
|
|
1564
|
-
arguments: c,
|
|
1565
|
-
optional: p === "OptionalCallExpression" ? o : void 0
|
|
1566
|
-
}, {
|
|
1567
|
-
start: E(x),
|
|
1568
|
-
end: r3.sourceSpan.end
|
|
1569
|
-
}, {
|
|
1570
|
-
hasParentParens: t
|
|
1571
|
-
});
|
|
1572
|
-
}
|
|
1573
|
-
case "NonNullAssert": {
|
|
1574
|
-
let {
|
|
1575
|
-
expression: o
|
|
1576
|
-
} = r3, u = n(o);
|
|
1577
|
-
return a("TSNonNullExpression", {
|
|
1578
|
-
expression: u
|
|
1579
|
-
}, {
|
|
1580
|
-
start: E(u),
|
|
1581
|
-
end: r3.sourceSpan.end
|
|
1582
|
-
}, {
|
|
1583
|
-
hasParentParens: t
|
|
1584
|
-
});
|
|
1585
|
-
}
|
|
1586
|
-
case "PrefixNot": {
|
|
1587
|
-
let {
|
|
1588
|
-
expression: o
|
|
1589
|
-
} = r3, u = n(o);
|
|
1590
|
-
return a("UnaryExpression", {
|
|
1591
|
-
prefix: true,
|
|
1592
|
-
operator: "!",
|
|
1593
|
-
argument: u
|
|
1594
|
-
}, {
|
|
1595
|
-
start: r3.sourceSpan.start,
|
|
1596
|
-
end: S(u)
|
|
1597
|
-
}, {
|
|
1598
|
-
hasParentParens: t
|
|
1599
|
-
});
|
|
1600
|
-
}
|
|
1601
|
-
case "PropertyRead":
|
|
1602
|
-
case "SafePropertyRead": {
|
|
1603
|
-
let o = s === "SafePropertyRead", {
|
|
1604
|
-
receiver: u,
|
|
1605
|
-
name: v
|
|
1606
|
-
} = r3, c = e.getCharacterLastIndex(/\S/, r3.sourceSpan.end - 1) + 1, x = a("Identifier", {
|
|
1607
|
-
name: v
|
|
1608
|
-
}, {
|
|
1609
|
-
start: c - v.length,
|
|
1610
|
-
end: c
|
|
1611
|
-
}, g(u) ? {
|
|
1612
|
-
hasParentParens: t
|
|
1613
|
-
} : {});
|
|
1614
|
-
return h(u, x, {
|
|
1615
|
-
computed: false,
|
|
1616
|
-
optional: o
|
|
1617
|
-
}, {
|
|
1618
|
-
hasParentParens: t
|
|
1619
|
-
});
|
|
1620
|
-
}
|
|
1621
|
-
case "KeyedWrite": {
|
|
1622
|
-
let {
|
|
1623
|
-
key: o,
|
|
1624
|
-
value: u
|
|
1625
|
-
} = r3, v = Object.prototype.hasOwnProperty.call(r3, "receiver") ? r3.receiver : r3.obj, c = n(o), x = n(u), l = h(v, c, {
|
|
1626
|
-
computed: true,
|
|
1627
|
-
optional: false
|
|
1628
|
-
}, {
|
|
1629
|
-
end: e.getCharacterIndex("]", S(c)) + 1
|
|
1630
|
-
});
|
|
1631
|
-
return a("AssignmentExpression", {
|
|
1632
|
-
left: l,
|
|
1633
|
-
operator: "=",
|
|
1634
|
-
right: x
|
|
1635
|
-
}, {
|
|
1636
|
-
start: E(l),
|
|
1637
|
-
end: S(x)
|
|
1638
|
-
}, {
|
|
1639
|
-
hasParentParens: t
|
|
1640
|
-
});
|
|
1641
|
-
}
|
|
1642
|
-
case "PropertyWrite": {
|
|
1643
|
-
let {
|
|
1644
|
-
receiver: o,
|
|
1645
|
-
name: u,
|
|
1646
|
-
value: v
|
|
1647
|
-
} = r3, c = n(v), x = e.getCharacterLastIndex(/\S/, e.getCharacterLastIndex("=", E(c) - 1) - 1) + 1, l = a("Identifier", {
|
|
1648
|
-
name: u
|
|
1649
|
-
}, {
|
|
1650
|
-
start: x - u.length,
|
|
1651
|
-
end: x
|
|
1652
|
-
}), p = h(o, l, {
|
|
1653
|
-
computed: false,
|
|
1654
|
-
optional: false
|
|
1655
|
-
});
|
|
1656
|
-
return a("AssignmentExpression", {
|
|
1657
|
-
left: p,
|
|
1658
|
-
operator: "=",
|
|
1659
|
-
right: c
|
|
1660
|
-
}, {
|
|
1661
|
-
start: E(p),
|
|
1662
|
-
end: S(c)
|
|
1663
|
-
}, {
|
|
1664
|
-
hasParentParens: t
|
|
1665
|
-
});
|
|
1666
|
-
}
|
|
1667
|
-
default:
|
|
1668
|
-
throw new Error(`Unexpected node ${s}`);
|
|
1669
|
-
}
|
|
1670
|
-
function n(o) {
|
|
1671
|
-
return D(o, e);
|
|
1672
|
-
}
|
|
1673
|
-
function i(o) {
|
|
1674
|
-
return D(o, e, true);
|
|
1675
|
-
}
|
|
1676
|
-
function a(o, u, v, {
|
|
1677
|
-
processSpan: c = true,
|
|
1678
|
-
hasParentParens: x = false
|
|
1679
|
-
} = {}) {
|
|
1680
|
-
let l = {
|
|
1681
|
-
type: o,
|
|
1682
|
-
...Ie(v, e, c, x),
|
|
1683
|
-
...u
|
|
1684
|
-
};
|
|
1685
|
-
switch (o) {
|
|
1686
|
-
case "NumericLiteral": {
|
|
1687
|
-
let p = l;
|
|
1688
|
-
p.extra = {
|
|
1689
|
-
...p.extra,
|
|
1690
|
-
raw: e.text.slice(p.start, p.end),
|
|
1691
|
-
rawValue: p.value
|
|
1692
|
-
};
|
|
1693
|
-
break;
|
|
1694
|
-
}
|
|
1695
|
-
case "StringLiteral": {
|
|
1696
|
-
let p = l;
|
|
1697
|
-
p.extra = {
|
|
1698
|
-
...p.extra,
|
|
1699
|
-
raw: e.text.slice(p.start, p.end),
|
|
1700
|
-
rawValue: p.value
|
|
1701
|
-
};
|
|
1702
|
-
break;
|
|
1703
|
-
}
|
|
1704
|
-
case "ObjectProperty": {
|
|
1705
|
-
let p = l;
|
|
1706
|
-
p.shorthand && (p.extra = {
|
|
1707
|
-
...p.extra,
|
|
1708
|
-
shorthand: p.shorthand
|
|
1709
|
-
});
|
|
1710
|
-
break;
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
return l;
|
|
1714
|
-
}
|
|
1715
|
-
function h(o, u, v, {
|
|
1716
|
-
end: c = S(u),
|
|
1717
|
-
hasParentParens: x = false
|
|
1718
|
-
} = {}) {
|
|
1719
|
-
if (g(o) || o.sourceSpan.start === u.start) return u;
|
|
1720
|
-
let l = n(o), p = d(l);
|
|
1721
|
-
return a(v.optional || p ? "OptionalMemberExpression" : "MemberExpression", {
|
|
1722
|
-
object: l,
|
|
1723
|
-
property: u,
|
|
1724
|
-
computed: v.computed,
|
|
1725
|
-
...v.optional ? {
|
|
1726
|
-
optional: true
|
|
1727
|
-
} : p ? {
|
|
1728
|
-
optional: false
|
|
1729
|
-
} : null
|
|
1730
|
-
}, {
|
|
1731
|
-
start: E(l),
|
|
1732
|
-
end: c
|
|
1733
|
-
}, {
|
|
1734
|
-
hasParentParens: x
|
|
1735
|
-
});
|
|
1736
|
-
}
|
|
1737
|
-
function g(o) {
|
|
1738
|
-
return o.sourceSpan.start >= o.sourceSpan.end || /^\s+$/.test(e.text.slice(o.sourceSpan.start, o.sourceSpan.end));
|
|
1739
|
-
}
|
|
1740
|
-
function d(o) {
|
|
1741
|
-
return (o.type === "OptionalCallExpression" || o.type === "OptionalMemberExpression") && !y(o);
|
|
1742
|
-
}
|
|
1743
|
-
function y(o) {
|
|
1744
|
-
return o.extra && o.extra.parenthesized;
|
|
1745
|
-
}
|
|
1746
|
-
function E(o) {
|
|
1747
|
-
return y(o) ? o.extra.parenStart : o.start;
|
|
1748
|
-
}
|
|
1749
|
-
function S(o) {
|
|
1750
|
-
return y(o) ? o.extra.parenEnd : o.end;
|
|
1751
|
-
}
|
|
1752
|
-
};
|
|
1753
|
-
function Ie(r3, e, t = false, s = false) {
|
|
1754
|
-
if (!t) {
|
|
1755
|
-
let {
|
|
1756
|
-
start: g,
|
|
1757
|
-
end: d
|
|
1758
|
-
} = r3;
|
|
1759
|
-
return {
|
|
1760
|
-
start: g,
|
|
1761
|
-
end: d,
|
|
1762
|
-
range: [g, d]
|
|
1763
|
-
};
|
|
1764
|
-
}
|
|
1765
|
-
let {
|
|
1766
|
-
outerSpan: n,
|
|
1767
|
-
innerSpan: {
|
|
1768
|
-
start: i,
|
|
1769
|
-
end: a
|
|
1770
|
-
},
|
|
1771
|
-
hasParens: h
|
|
1772
|
-
} = St(r3, e.text, s);
|
|
1773
|
-
return {
|
|
1774
|
-
start: i,
|
|
1775
|
-
end: a,
|
|
1776
|
-
range: [i, a],
|
|
1777
|
-
...h && {
|
|
1778
|
-
extra: {
|
|
1779
|
-
parenthesized: true,
|
|
1780
|
-
parenStart: n.start,
|
|
1781
|
-
parenEnd: n.end
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
};
|
|
1785
|
-
}
|
|
1786
|
-
function $t(r3, e) {
|
|
1787
|
-
r3.forEach(o);
|
|
1788
|
-
let [t] = r3, {
|
|
1789
|
-
key: s
|
|
1790
|
-
} = t, n = e.text.slice(t.sourceSpan.start, t.sourceSpan.end).trim().length === 0 ? r3.slice(1) : r3, i = [], a = null;
|
|
1791
|
-
for (let c = 0; c < n.length; c++) {
|
|
1792
|
-
let x = n[c];
|
|
1793
|
-
if (a && E(a) && S(x) && x.value && x.value.source === a.key.source) {
|
|
1794
|
-
let l = d("NGMicrosyntaxKey", {
|
|
1795
|
-
name: x.key.source
|
|
1796
|
-
}, x.key.span), p = (N, ue) => ({
|
|
1797
|
-
...N,
|
|
1798
|
-
...Ie({
|
|
1799
|
-
start: N.start,
|
|
1800
|
-
end: ue
|
|
1801
|
-
}, e)
|
|
1802
|
-
}), k = (N) => ({
|
|
1803
|
-
...p(N, l.end),
|
|
1804
|
-
alias: l
|
|
1805
|
-
}), m = i.pop();
|
|
1806
|
-
if (m.type === "NGMicrosyntaxExpression") i.push(k(m));
|
|
1807
|
-
else if (m.type === "NGMicrosyntaxKeyedExpression") {
|
|
1808
|
-
let N = k(m.expression);
|
|
1809
|
-
i.push(p({
|
|
1810
|
-
...m,
|
|
1811
|
-
expression: N
|
|
1812
|
-
}, N.end));
|
|
1813
|
-
} else throw new Error(`Unexpected type ${m.type}`);
|
|
1814
|
-
} else i.push(h(x, c));
|
|
1815
|
-
a = x;
|
|
1816
|
-
}
|
|
1817
|
-
return d("NGMicrosyntax", {
|
|
1818
|
-
body: i
|
|
1819
|
-
}, i.length === 0 ? r3[0].sourceSpan : {
|
|
1820
|
-
start: i[0].start,
|
|
1821
|
-
end: Ne(false, i, -1).end
|
|
1822
|
-
});
|
|
1823
|
-
function h(c, x) {
|
|
1824
|
-
if (E(c)) {
|
|
1825
|
-
let {
|
|
1826
|
-
key: l,
|
|
1827
|
-
value: p
|
|
1828
|
-
} = c;
|
|
1829
|
-
return p ? x === 0 ? d("NGMicrosyntaxExpression", {
|
|
1830
|
-
expression: g(p.ast),
|
|
1831
|
-
alias: null
|
|
1832
|
-
}, p.sourceSpan) : d("NGMicrosyntaxKeyedExpression", {
|
|
1833
|
-
key: d("NGMicrosyntaxKey", {
|
|
1834
|
-
name: y(l.source)
|
|
1835
|
-
}, l.span),
|
|
1836
|
-
expression: d("NGMicrosyntaxExpression", {
|
|
1837
|
-
expression: g(p.ast),
|
|
1838
|
-
alias: null
|
|
1839
|
-
}, p.sourceSpan)
|
|
1840
|
-
}, {
|
|
1841
|
-
start: l.span.start,
|
|
1842
|
-
end: p.sourceSpan.end
|
|
1843
|
-
}) : d("NGMicrosyntaxKey", {
|
|
1844
|
-
name: y(l.source)
|
|
1845
|
-
}, l.span);
|
|
1846
|
-
} else {
|
|
1847
|
-
let {
|
|
1848
|
-
key: l,
|
|
1849
|
-
sourceSpan: p
|
|
1850
|
-
} = c;
|
|
1851
|
-
if (/^let\s$/.test(e.text.slice(p.start, p.start + 4))) {
|
|
1852
|
-
let {
|
|
1853
|
-
value: m
|
|
1854
|
-
} = c;
|
|
1855
|
-
return d("NGMicrosyntaxLet", {
|
|
1856
|
-
key: d("NGMicrosyntaxKey", {
|
|
1857
|
-
name: l.source
|
|
1858
|
-
}, l.span),
|
|
1859
|
-
value: m ? d("NGMicrosyntaxKey", {
|
|
1860
|
-
name: m.source
|
|
1861
|
-
}, m.span) : null
|
|
1862
|
-
}, {
|
|
1863
|
-
start: p.start,
|
|
1864
|
-
end: m ? m.span.end : l.span.end
|
|
1865
|
-
});
|
|
1866
|
-
} else {
|
|
1867
|
-
let m = v(c);
|
|
1868
|
-
return d("NGMicrosyntaxAs", {
|
|
1869
|
-
key: d("NGMicrosyntaxKey", {
|
|
1870
|
-
name: m.source
|
|
1871
|
-
}, m.span),
|
|
1872
|
-
alias: d("NGMicrosyntaxKey", {
|
|
1873
|
-
name: l.source
|
|
1874
|
-
}, l.span)
|
|
1875
|
-
}, {
|
|
1876
|
-
start: m.span.start,
|
|
1877
|
-
end: l.span.end
|
|
1878
|
-
});
|
|
1879
|
-
}
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
function g(c) {
|
|
1883
|
-
return D(c, e);
|
|
1884
|
-
}
|
|
1885
|
-
function d(c, x, l, p = true) {
|
|
1886
|
-
return {
|
|
1887
|
-
type: c,
|
|
1888
|
-
...Ie(l, e, p),
|
|
1889
|
-
...x
|
|
1890
|
-
};
|
|
1891
|
-
}
|
|
1892
|
-
function y(c) {
|
|
1893
|
-
return Et(c.slice(s.source.length));
|
|
1894
|
-
}
|
|
1895
|
-
function E(c) {
|
|
1896
|
-
return c instanceof ne;
|
|
1897
|
-
}
|
|
1898
|
-
function S(c) {
|
|
1899
|
-
return c instanceof T;
|
|
1900
|
-
}
|
|
1901
|
-
function o(c) {
|
|
1902
|
-
u(c.key.span), S(c) && c.value && u(c.value.span);
|
|
1903
|
-
}
|
|
1904
|
-
function u(c) {
|
|
1905
|
-
if (e.text[c.start] !== '"' && e.text[c.start] !== "'") return;
|
|
1906
|
-
let x = e.text[c.start], l = false;
|
|
1907
|
-
for (let p = c.start + 1; p < e.text.length; p++) switch (e.text[p]) {
|
|
1908
|
-
case x:
|
|
1909
|
-
if (!l) {
|
|
1910
|
-
c.end = p + 1;
|
|
1911
|
-
return;
|
|
1912
|
-
}
|
|
1913
|
-
default:
|
|
1914
|
-
l = false;
|
|
1915
|
-
break;
|
|
1916
|
-
case "\\":
|
|
1917
|
-
l = !l;
|
|
1918
|
-
break;
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
function v(c) {
|
|
1922
|
-
if (!c.value || c.value.source !== De) return c.value;
|
|
1923
|
-
let x = e.getCharacterIndex(/\S/, c.sourceSpan.start);
|
|
1924
|
-
return {
|
|
1925
|
-
source: "$implicit",
|
|
1926
|
-
span: {
|
|
1927
|
-
start: x,
|
|
1928
|
-
end: x
|
|
1929
|
-
}
|
|
1930
|
-
};
|
|
1931
|
-
}
|
|
1932
|
-
}
|
|
1933
|
-
function ke(r3) {
|
|
1934
|
-
return (e) => {
|
|
1935
|
-
let {
|
|
1936
|
-
ast: t,
|
|
1937
|
-
comments: s
|
|
1938
|
-
} = r3(e), n = new ve(e), i = D(t, n);
|
|
1939
|
-
return i.comments = s.map((a) => D(a, n)), i;
|
|
1940
|
-
};
|
|
1941
|
-
}
|
|
1942
|
-
var Ct = ke(ut);
|
|
1943
|
-
var At = ke(dt);
|
|
1944
|
-
var Ge = ke(xt);
|
|
1945
|
-
var Ot = (r3) => $t(ft(r3), new ve(r3));
|
|
1946
|
-
function We(r3) {
|
|
1947
|
-
var s, n, i;
|
|
1948
|
-
let e = ((s = r3.range) == null ? void 0 : s[0]) ?? r3.start, t = (i = ((n = r3.declaration) == null ? void 0 : n.decorators) ?? r3.decorators) == null ? void 0 : i[0];
|
|
1949
|
-
return t ? Math.min(We(t), e) : e;
|
|
1950
|
-
}
|
|
1951
|
-
function Nt(r3) {
|
|
1952
|
-
var e;
|
|
1953
|
-
return ((e = r3.range) == null ? void 0 : e[1]) ?? r3.end;
|
|
1954
|
-
}
|
|
1955
|
-
function Re(r3) {
|
|
1956
|
-
return {
|
|
1957
|
-
astFormat: "estree",
|
|
1958
|
-
parse(e) {
|
|
1959
|
-
let t = r3(e);
|
|
1960
|
-
return {
|
|
1961
|
-
type: "NGRoot",
|
|
1962
|
-
node: r3 === Ge && t.type !== "NGChainedExpression" ? {
|
|
1963
|
-
...t,
|
|
1964
|
-
type: "NGChainedExpression",
|
|
1965
|
-
expressions: [t]
|
|
1966
|
-
} : t
|
|
1967
|
-
};
|
|
1968
|
-
},
|
|
1969
|
-
locStart: We,
|
|
1970
|
-
locEnd: Nt
|
|
1971
|
-
};
|
|
1972
|
-
}
|
|
1973
|
-
var Cr = Re(Ge);
|
|
1974
|
-
var Ar = Re(Ct);
|
|
1975
|
-
var Or = Re(At);
|
|
1976
|
-
var Nr = Re(Ot);
|
|
1977
|
-
var hs = Qe;
|
|
1978
|
-
|
|
1979
|
-
export { hs as default, Ve as parsers };
|
|
1980
|
-
//# sourceMappingURL=angular-3AJ2SFX7.js.map
|
|
1981
|
-
//# sourceMappingURL=angular-3AJ2SFX7.js.map
|