@vc-shell/framework 2.0.0-alpha.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts +2 -2
- package/dist/framework.js +12 -12
- package/dist/test-helpers.d.ts +4 -12
- package/dist/test-helpers.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-menu/vc-menu.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-menu/vc-menu.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/BladeHeader.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/VcDataTable.vue.d.ts +5 -5
- package/dist/ui/components/organisms/vc-table/VcDataTable.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/components/ColumnFilter.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/components/ColumnFilter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/components/TableRowActions.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/components/TableRowActions.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/components/TableSearchHeader.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/components/TableSearchHeader.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/components/VcColumn.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-table/components/mobile/PullToRefresh.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/components/mobile/PullToRefresh.vue.d.ts.map +1 -1
- package/dist/vendor-intlify-core-base-BmIo1dK4.js +1141 -0
- package/dist/{vendor-intlify-message-compiler-C5QaCXcF.js → vendor-intlify-message-compiler-D9VOavkL.js} +315 -307
- package/dist/{vendor-intlify-shared-BrKs3jCC.js → vendor-intlify-shared-SCAs3ybf.js} +2 -2
- package/dist/{vendor-prosemirror-gapcursor-BAwEBHgE.js → vendor-prosemirror-gapcursor-S3ikcYX6.js} +14 -14
- package/dist/{vendor-tiptap-core-BfrE48R3.js → vendor-tiptap-core-CDScflP1.js} +665 -628
- package/dist/{vendor-tiptap-extension-blockquote-DG5eEgV_.js → vendor-tiptap-extension-blockquote-ChRAwuus.js} +1 -1
- package/dist/{vendor-tiptap-extension-bold-CqPrSfgB.js → vendor-tiptap-extension-bold-BwoVpOFS.js} +1 -1
- package/dist/{vendor-tiptap-extension-code-Dj9HfL9x.js → vendor-tiptap-extension-code-DOlgG3ih.js} +1 -1
- package/dist/{vendor-tiptap-extension-code-block-YnlbQcbJ.js → vendor-tiptap-extension-code-block-CMeTs87s.js} +29 -29
- package/dist/{vendor-tiptap-extension-document-DyG2LNKD.js → vendor-tiptap-extension-document-DO8oly70.js} +1 -1
- package/dist/{vendor-tiptap-extension-hard-break-mzhqFFEq.js → vendor-tiptap-extension-hard-break-BgDl2sHf.js} +1 -1
- package/dist/{vendor-tiptap-extension-heading-DGnriW33.js → vendor-tiptap-extension-heading-DFuYlwHi.js} +1 -1
- package/dist/{vendor-tiptap-extension-horizontal-rule-pR7MlJHI.js → vendor-tiptap-extension-horizontal-rule-uyfttMp9.js} +1 -1
- package/dist/{vendor-tiptap-extension-image-BsXHNscz.js → vendor-tiptap-extension-image-DPeBaTE3.js} +1 -1
- package/dist/{vendor-tiptap-extension-italic-aoCbIXRj.js → vendor-tiptap-extension-italic-C9-3jNxO.js} +1 -1
- package/dist/{vendor-tiptap-extension-link-DiV7DqnY.js → vendor-tiptap-extension-link-B57VzStq.js} +1 -1
- package/dist/{vendor-tiptap-extension-list-BGYRWOyu.js → vendor-tiptap-extension-list-spvOF7Mz.js} +1 -1
- package/dist/{vendor-tiptap-extension-paragraph-BEBEvW1W.js → vendor-tiptap-extension-paragraph-Cj7auQB7.js} +1 -1
- package/dist/vendor-tiptap-extension-placeholder-DhwvmZ6Y.js +1 -0
- package/dist/{vendor-tiptap-extension-strike-6vob8J1A.js → vendor-tiptap-extension-strike-yj6UvnkO.js} +1 -1
- package/dist/vendor-tiptap-extension-table-cell-CQpTPSvF.js +1 -0
- package/dist/{vendor-tiptap-extension-table-CH-0UqG-.js → vendor-tiptap-extension-table-ex1kZQ-9.js} +1 -1
- package/dist/vendor-tiptap-extension-table-header-CQpTPSvF.js +1 -0
- package/dist/vendor-tiptap-extension-table-row-CQpTPSvF.js +1 -0
- package/dist/{vendor-tiptap-extension-text-CnqQVbB2.js → vendor-tiptap-extension-text-C8FG4KnI.js} +1 -1
- package/dist/{vendor-tiptap-extension-text-style-Bj4bCZI1.js → vendor-tiptap-extension-text-style-DsQDXowp.js} +1 -1
- package/dist/{vendor-tiptap-extension-underline-CVBZMhrs.js → vendor-tiptap-extension-underline-HB3fg6Dc.js} +1 -1
- package/dist/{vendor-tiptap-extensions-2ZbpCG7T.js → vendor-tiptap-extensions-CUGwjzl5.js} +2 -2
- package/dist/{vendor-tiptap-markdown-B7Wvo0s5.js → vendor-tiptap-markdown-DLzeP3KU.js} +1 -1
- package/dist/{vendor-tiptap-starter-kit-ipneJHYV.js → vendor-tiptap-starter-kit-C42PcJ7J.js} +17 -17
- package/dist/{vendor-tiptap-vue-3-IfJcIOl5.js → vendor-tiptap-vue-3-BxWCzu9Z.js} +1 -1
- package/dist/{vendor-vue-i18n-BguHiJqH.js → vendor-vue-i18n-DeO9Fa9I.js} +409 -403
- package/package.json +5 -5
- package/dist/vendor-intlify-core-base-YZqJSEvl.js +0 -1130
- package/dist/vendor-tiptap-extension-placeholder-ZfoeEW0T.js +0 -1
- package/dist/vendor-tiptap-extension-table-cell-_uzaJkJG.js +0 -1
- package/dist/vendor-tiptap-extension-table-header-_uzaJkJG.js +0 -1
- package/dist/vendor-tiptap-extension-table-row-_uzaJkJG.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as Se, a as re, i as z, j as
|
|
1
|
+
import { f as Se, a as re, i as z, j as ie } from "./vendor-intlify-shared-SCAs3ybf.js";
|
|
2
2
|
/*!
|
|
3
|
-
* message-compiler v11.
|
|
4
|
-
* (c)
|
|
3
|
+
* message-compiler v11.3.0
|
|
4
|
+
* (c) 2026 kazuya kawaguchi
|
|
5
5
|
* Released under the MIT License.
|
|
6
6
|
*/
|
|
7
7
|
function ke(r, n, c) {
|
|
@@ -31,7 +31,7 @@ const d = {
|
|
|
31
31
|
UNHANDLED_CODEGEN_NODE_TYPE: 15,
|
|
32
32
|
// minifier error codes
|
|
33
33
|
UNHANDLED_MINIFIER_NODE_TYPE: 16
|
|
34
|
-
},
|
|
34
|
+
}, Ze = 17, Pe = {
|
|
35
35
|
// tokenizer error messages
|
|
36
36
|
[d.EXPECTED_TOKEN]: "Expected token: '{0}'",
|
|
37
37
|
[d.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
|
|
@@ -54,26 +54,26 @@ const d = {
|
|
|
54
54
|
[d.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
55
55
|
};
|
|
56
56
|
function G(r, n, c = {}) {
|
|
57
|
-
const { domain:
|
|
58
|
-
return
|
|
57
|
+
const { domain: o, messages: _, args: u } = c, h = process.env.NODE_ENV !== "production" ? Se((_ || Pe)[r] || "", ...u || []) : r, C = new SyntaxError(String(h));
|
|
58
|
+
return C.code = r, n && (C.location = n), C.domain = o, C;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function ze(r) {
|
|
61
61
|
throw r;
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const De = /<\/?[\w\s="/.':;#-\/]+>/, et = (r) => De.test(r), M = " ", Oe = "\r", O = `
|
|
64
64
|
`, me = "\u2028", ye = "\u2029";
|
|
65
65
|
function be(r) {
|
|
66
66
|
const n = r;
|
|
67
|
-
let c = 0,
|
|
68
|
-
const h = (p) => n[p] === Oe && n[p + 1] === O,
|
|
69
|
-
function
|
|
70
|
-
return u = 0, b(c) && (
|
|
67
|
+
let c = 0, o = 1, _ = 1, u = 0;
|
|
68
|
+
const h = (p) => n[p] === Oe && n[p + 1] === O, C = (p) => n[p] === O, P = (p) => n[p] === ye, m = (p) => n[p] === me, b = (p) => h(p) || C(p) || P(p) || m(p), S = () => c, T = () => o, R = () => _, v = () => u, A = (p) => h(p) || P(p) || m(p) ? O : n[p], I = () => A(c), s = () => A(c + u);
|
|
69
|
+
function f() {
|
|
70
|
+
return u = 0, b(c) && (o++, _ = 0), h(c) && c++, c++, _++, n[c];
|
|
71
71
|
}
|
|
72
72
|
function E() {
|
|
73
73
|
return h(c + u) && u++, u++, n[c + u];
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
c = 0,
|
|
75
|
+
function l() {
|
|
76
|
+
c = 0, o = 1, _ = 1, u = 0;
|
|
77
77
|
}
|
|
78
78
|
function L(p = 0) {
|
|
79
79
|
u = p;
|
|
@@ -81,7 +81,7 @@ function be(r) {
|
|
|
81
81
|
function N() {
|
|
82
82
|
const p = c + u;
|
|
83
83
|
for (; p !== c; )
|
|
84
|
-
|
|
84
|
+
f();
|
|
85
85
|
u = 0;
|
|
86
86
|
}
|
|
87
87
|
return {
|
|
@@ -90,44 +90,44 @@ function be(r) {
|
|
|
90
90
|
column: R,
|
|
91
91
|
peekOffset: v,
|
|
92
92
|
charAt: A,
|
|
93
|
-
currentChar:
|
|
94
|
-
currentPeek:
|
|
95
|
-
next:
|
|
93
|
+
currentChar: I,
|
|
94
|
+
currentPeek: s,
|
|
95
|
+
next: f,
|
|
96
96
|
peek: E,
|
|
97
|
-
reset:
|
|
97
|
+
reset: l,
|
|
98
98
|
resetPeek: L,
|
|
99
99
|
skipToPeek: N
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
const w = void 0, Re = ".", ee = "'", Ue = "tokenizer";
|
|
103
103
|
function ve(r, n = {}) {
|
|
104
|
-
const c = n.location !== !1,
|
|
104
|
+
const c = n.location !== !1, o = be(r), _ = () => o.index(), u = () => ke(o.line(), o.column(), o.index()), h = u(), C = _(), P = {
|
|
105
105
|
currentType: 13,
|
|
106
|
-
offset:
|
|
106
|
+
offset: C,
|
|
107
107
|
startLoc: h,
|
|
108
108
|
endLoc: h,
|
|
109
109
|
lastType: 13,
|
|
110
|
-
lastOffset:
|
|
110
|
+
lastOffset: C,
|
|
111
111
|
lastStartLoc: h,
|
|
112
112
|
lastEndLoc: h,
|
|
113
113
|
braceNest: 0,
|
|
114
114
|
inLinked: !1,
|
|
115
115
|
text: ""
|
|
116
|
-
}, m = () =>
|
|
117
|
-
function S(e, t,
|
|
116
|
+
}, m = () => P, { onError: b } = n;
|
|
117
|
+
function S(e, t, i, ...a) {
|
|
118
118
|
const k = m();
|
|
119
|
-
if (t.column +=
|
|
120
|
-
const
|
|
119
|
+
if (t.column += i, t.offset += i, b) {
|
|
120
|
+
const D = c ? q(k.startLoc, t) : null, U = G(e, D, {
|
|
121
121
|
domain: Ue,
|
|
122
|
-
args:
|
|
122
|
+
args: a
|
|
123
123
|
});
|
|
124
124
|
b(U);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
function T(e, t,
|
|
127
|
+
function T(e, t, i) {
|
|
128
128
|
e.endLoc = u(), e.currentType = t;
|
|
129
|
-
const
|
|
130
|
-
return c && (
|
|
129
|
+
const a = { type: t };
|
|
130
|
+
return c && (a.loc = q(e.startLoc, e.endLoc)), i != null && (a.value = i), a;
|
|
131
131
|
}
|
|
132
132
|
const R = (e) => T(
|
|
133
133
|
e,
|
|
@@ -143,11 +143,11 @@ function ve(r, n = {}) {
|
|
|
143
143
|
t += e.currentPeek(), e.peek();
|
|
144
144
|
return t;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function I(e) {
|
|
147
147
|
const t = A(e);
|
|
148
148
|
return e.skipToPeek(), t;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function s(e) {
|
|
151
151
|
if (e === w)
|
|
152
152
|
return !1;
|
|
153
153
|
const t = e.charCodeAt(0);
|
|
@@ -155,87 +155,87 @@ function ve(r, n = {}) {
|
|
|
155
155
|
t >= 65 && t <= 90 || // A-Z
|
|
156
156
|
t === 95;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function f(e) {
|
|
159
159
|
if (e === w)
|
|
160
160
|
return !1;
|
|
161
161
|
const t = e.charCodeAt(0);
|
|
162
162
|
return t >= 48 && t <= 57;
|
|
163
163
|
}
|
|
164
164
|
function E(e, t) {
|
|
165
|
-
const { currentType:
|
|
166
|
-
if (
|
|
165
|
+
const { currentType: i } = t;
|
|
166
|
+
if (i !== 2)
|
|
167
167
|
return !1;
|
|
168
168
|
A(e);
|
|
169
|
-
const
|
|
170
|
-
return e.resetPeek(),
|
|
169
|
+
const a = s(e.currentPeek());
|
|
170
|
+
return e.resetPeek(), a;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
const { currentType:
|
|
174
|
-
if (
|
|
172
|
+
function l(e, t) {
|
|
173
|
+
const { currentType: i } = t;
|
|
174
|
+
if (i !== 2)
|
|
175
175
|
return !1;
|
|
176
176
|
A(e);
|
|
177
|
-
const
|
|
177
|
+
const a = e.currentPeek() === "-" ? e.peek() : e.currentPeek(), k = f(a);
|
|
178
178
|
return e.resetPeek(), k;
|
|
179
179
|
}
|
|
180
180
|
function L(e, t) {
|
|
181
|
-
const { currentType:
|
|
182
|
-
if (
|
|
181
|
+
const { currentType: i } = t;
|
|
182
|
+
if (i !== 2)
|
|
183
183
|
return !1;
|
|
184
184
|
A(e);
|
|
185
|
-
const
|
|
186
|
-
return e.resetPeek(),
|
|
185
|
+
const a = e.currentPeek() === ee;
|
|
186
|
+
return e.resetPeek(), a;
|
|
187
187
|
}
|
|
188
188
|
function N(e, t) {
|
|
189
|
-
const { currentType:
|
|
190
|
-
if (
|
|
189
|
+
const { currentType: i } = t;
|
|
190
|
+
if (i !== 7)
|
|
191
191
|
return !1;
|
|
192
192
|
A(e);
|
|
193
|
-
const
|
|
194
|
-
return e.resetPeek(),
|
|
193
|
+
const a = e.currentPeek() === ".";
|
|
194
|
+
return e.resetPeek(), a;
|
|
195
195
|
}
|
|
196
196
|
function p(e, t) {
|
|
197
|
-
const { currentType:
|
|
198
|
-
if (
|
|
197
|
+
const { currentType: i } = t;
|
|
198
|
+
if (i !== 8)
|
|
199
199
|
return !1;
|
|
200
200
|
A(e);
|
|
201
|
-
const
|
|
202
|
-
return e.resetPeek(),
|
|
201
|
+
const a = s(e.currentPeek());
|
|
202
|
+
return e.resetPeek(), a;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
const { currentType:
|
|
206
|
-
if (!(
|
|
204
|
+
function g(e, t) {
|
|
205
|
+
const { currentType: i } = t;
|
|
206
|
+
if (!(i === 7 || i === 11))
|
|
207
207
|
return !1;
|
|
208
208
|
A(e);
|
|
209
|
-
const
|
|
210
|
-
return e.resetPeek(),
|
|
209
|
+
const a = e.currentPeek() === ":";
|
|
210
|
+
return e.resetPeek(), a;
|
|
211
211
|
}
|
|
212
212
|
function y(e, t) {
|
|
213
|
-
const { currentType:
|
|
214
|
-
if (
|
|
213
|
+
const { currentType: i } = t;
|
|
214
|
+
if (i !== 9)
|
|
215
215
|
return !1;
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
return
|
|
219
|
-
}, k =
|
|
216
|
+
const a = () => {
|
|
217
|
+
const D = e.currentPeek();
|
|
218
|
+
return D === "{" ? s(e.peek()) : D === "@" || D === "|" || D === ":" || D === "." || D === M || !D ? !1 : D === O ? (e.peek(), a()) : F(e, !1);
|
|
219
|
+
}, k = a();
|
|
220
220
|
return e.resetPeek(), k;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function x(e) {
|
|
223
223
|
A(e);
|
|
224
224
|
const t = e.currentPeek() === "|";
|
|
225
225
|
return e.resetPeek(), t;
|
|
226
226
|
}
|
|
227
227
|
function F(e, t = !0) {
|
|
228
|
-
const
|
|
228
|
+
const i = (k = !1, D = "") => {
|
|
229
229
|
const U = e.currentPeek();
|
|
230
|
-
return U === "{" || U === "@" || !U ? k : U === "|" ? !(
|
|
231
|
-
},
|
|
232
|
-
return t && e.resetPeek(),
|
|
230
|
+
return U === "{" || U === "@" || !U ? k : U === "|" ? !(D === M || D === O) : U === M ? (e.peek(), i(!0, M)) : U === O ? (e.peek(), i(!0, O)) : !0;
|
|
231
|
+
}, a = i();
|
|
232
|
+
return t && e.resetPeek(), a;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
const
|
|
236
|
-
return
|
|
234
|
+
function H(e, t) {
|
|
235
|
+
const i = e.currentChar();
|
|
236
|
+
return i === w ? w : t(i) ? (e.next(), i) : null;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function se(e) {
|
|
239
239
|
const t = e.charCodeAt(0);
|
|
240
240
|
return t >= 97 && t <= 122 || // a-z
|
|
241
241
|
t >= 65 && t <= 90 || // A-Z
|
|
@@ -244,7 +244,7 @@ function ve(r, n = {}) {
|
|
|
244
244
|
t === 36;
|
|
245
245
|
}
|
|
246
246
|
function ce(e) {
|
|
247
|
-
return
|
|
247
|
+
return H(e, se);
|
|
248
248
|
}
|
|
249
249
|
function ue(e) {
|
|
250
250
|
const t = e.charCodeAt(0);
|
|
@@ -256,14 +256,14 @@ function ve(r, n = {}) {
|
|
|
256
256
|
t === 45;
|
|
257
257
|
}
|
|
258
258
|
function ae(e) {
|
|
259
|
-
return
|
|
259
|
+
return H(e, ue);
|
|
260
260
|
}
|
|
261
261
|
function oe(e) {
|
|
262
262
|
const t = e.charCodeAt(0);
|
|
263
263
|
return t >= 48 && t <= 57;
|
|
264
264
|
}
|
|
265
265
|
function le(e) {
|
|
266
|
-
return
|
|
266
|
+
return H(e, oe);
|
|
267
267
|
}
|
|
268
268
|
function fe(e) {
|
|
269
269
|
const t = e.charCodeAt(0);
|
|
@@ -272,47 +272,52 @@ function ve(r, n = {}) {
|
|
|
272
272
|
t >= 97 && t <= 102;
|
|
273
273
|
}
|
|
274
274
|
function Ee(e) {
|
|
275
|
-
return
|
|
275
|
+
return H(e, fe);
|
|
276
276
|
}
|
|
277
277
|
function J(e) {
|
|
278
|
-
let t = "",
|
|
278
|
+
let t = "", i = "";
|
|
279
279
|
for (; t = le(e); )
|
|
280
|
-
|
|
281
|
-
return
|
|
280
|
+
i += t;
|
|
281
|
+
return i;
|
|
282
282
|
}
|
|
283
283
|
function de(e) {
|
|
284
284
|
let t = "";
|
|
285
285
|
for (; ; ) {
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
286
|
+
const i = e.currentChar();
|
|
287
|
+
if (i === "\\") {
|
|
288
|
+
const a = e.peek();
|
|
289
|
+
a === "{" || a === "}" || a === "@" || a === "|" || a === "\\" ? (t += i + a, e.next(), e.next()) : (e.resetPeek(), t += i, e.next());
|
|
290
|
+
} else {
|
|
291
|
+
if (i === "{" || i === "}" || i === "@" || i === "|" || !i)
|
|
292
|
+
break;
|
|
293
|
+
if (i === M || i === O)
|
|
294
|
+
if (F(e))
|
|
295
|
+
t += i, e.next();
|
|
296
|
+
else {
|
|
297
|
+
if (x(e))
|
|
298
|
+
break;
|
|
299
|
+
t += i, e.next();
|
|
300
|
+
}
|
|
301
|
+
else
|
|
302
|
+
t += i, e.next();
|
|
303
|
+
}
|
|
299
304
|
}
|
|
300
305
|
return t;
|
|
301
306
|
}
|
|
302
307
|
function Le(e) {
|
|
303
|
-
|
|
304
|
-
let t = "",
|
|
308
|
+
I(e);
|
|
309
|
+
let t = "", i = "";
|
|
305
310
|
for (; t = ae(e); )
|
|
306
|
-
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
311
|
+
i += t;
|
|
312
|
+
const a = e.currentChar();
|
|
313
|
+
if (a && a !== "}" && a !== w && a !== M && a !== O && a !== " ") {
|
|
309
314
|
const k = Z(e);
|
|
310
|
-
return S(d.INVALID_TOKEN_IN_PLACEHOLDER, u(), 0,
|
|
315
|
+
return S(d.INVALID_TOKEN_IN_PLACEHOLDER, u(), 0, i + k), i + k;
|
|
311
316
|
}
|
|
312
|
-
return e.currentChar() === w && S(d.UNTERMINATED_CLOSING_BRACE, u(), 0),
|
|
317
|
+
return e.currentChar() === w && S(d.UNTERMINATED_CLOSING_BRACE, u(), 0), i;
|
|
313
318
|
}
|
|
314
319
|
function Ne(e) {
|
|
315
|
-
|
|
320
|
+
I(e);
|
|
316
321
|
let t = "";
|
|
317
322
|
return e.currentChar() === "-" ? (e.next(), t += `-${J(e)}`) : t += J(e), e.currentChar() === w && S(d.UNTERMINATED_CLOSING_BRACE, u(), 0), t;
|
|
318
323
|
}
|
|
@@ -320,14 +325,14 @@ function ve(r, n = {}) {
|
|
|
320
325
|
return e !== ee && e !== O;
|
|
321
326
|
}
|
|
322
327
|
function pe(e) {
|
|
323
|
-
|
|
324
|
-
let t = "",
|
|
325
|
-
for (; t =
|
|
326
|
-
t === "\\" ?
|
|
327
|
-
const
|
|
328
|
-
return
|
|
328
|
+
I(e), v(e, "'");
|
|
329
|
+
let t = "", i = "";
|
|
330
|
+
for (; t = H(e, _e); )
|
|
331
|
+
t === "\\" ? i += Ce(e) : i += t;
|
|
332
|
+
const a = e.currentChar();
|
|
333
|
+
return a === O || a === w ? (S(d.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, u(), 0), a === O && (e.next(), v(e, "'")), i) : (v(e, "'"), i);
|
|
329
334
|
}
|
|
330
|
-
function
|
|
335
|
+
function Ce(e) {
|
|
331
336
|
const t = e.currentChar();
|
|
332
337
|
switch (t) {
|
|
333
338
|
case "\\":
|
|
@@ -341,121 +346,121 @@ function ve(r, n = {}) {
|
|
|
341
346
|
return S(d.UNKNOWN_ESCAPE_SEQUENCE, u(), 0, t), "";
|
|
342
347
|
}
|
|
343
348
|
}
|
|
344
|
-
function j(e, t,
|
|
349
|
+
function j(e, t, i) {
|
|
345
350
|
v(e, t);
|
|
346
|
-
let
|
|
347
|
-
for (let k = 0; k <
|
|
348
|
-
const
|
|
349
|
-
if (!
|
|
350
|
-
S(d.INVALID_UNICODE_ESCAPE_SEQUENCE, u(), 0, `\\${t}${
|
|
351
|
+
let a = "";
|
|
352
|
+
for (let k = 0; k < i; k++) {
|
|
353
|
+
const D = Ee(e);
|
|
354
|
+
if (!D) {
|
|
355
|
+
S(d.INVALID_UNICODE_ESCAPE_SEQUENCE, u(), 0, `\\${t}${a}${e.currentChar()}`);
|
|
351
356
|
break;
|
|
352
357
|
}
|
|
353
|
-
|
|
358
|
+
a += D;
|
|
354
359
|
}
|
|
355
|
-
return `\\${t}${
|
|
360
|
+
return `\\${t}${a}`;
|
|
356
361
|
}
|
|
357
|
-
function
|
|
362
|
+
function Ie(e) {
|
|
358
363
|
return e !== "{" && e !== "}" && e !== M && e !== O;
|
|
359
364
|
}
|
|
360
365
|
function Z(e) {
|
|
361
|
-
|
|
362
|
-
let t = "",
|
|
363
|
-
for (; t =
|
|
364
|
-
|
|
365
|
-
return
|
|
366
|
+
I(e);
|
|
367
|
+
let t = "", i = "";
|
|
368
|
+
for (; t = H(e, Ie); )
|
|
369
|
+
i += t;
|
|
370
|
+
return i;
|
|
366
371
|
}
|
|
367
372
|
function he(e) {
|
|
368
|
-
let t = "",
|
|
373
|
+
let t = "", i = "";
|
|
369
374
|
for (; t = ce(e); )
|
|
370
|
-
|
|
371
|
-
return
|
|
375
|
+
i += t;
|
|
376
|
+
return i;
|
|
372
377
|
}
|
|
373
378
|
function Te(e) {
|
|
374
|
-
const t = (
|
|
375
|
-
const
|
|
376
|
-
return
|
|
379
|
+
const t = (i) => {
|
|
380
|
+
const a = e.currentChar();
|
|
381
|
+
return a === "{" || a === "@" || a === "|" || a === "(" || a === ")" || !a || a === M ? i : (i += a, e.next(), t(i));
|
|
377
382
|
};
|
|
378
383
|
return t("");
|
|
379
384
|
}
|
|
380
385
|
function V(e) {
|
|
381
|
-
|
|
386
|
+
I(e);
|
|
382
387
|
const t = v(
|
|
383
388
|
e,
|
|
384
389
|
"|"
|
|
385
390
|
/* TokenChars.Pipe */
|
|
386
391
|
);
|
|
387
|
-
return
|
|
392
|
+
return I(e), t;
|
|
388
393
|
}
|
|
389
394
|
function B(e, t) {
|
|
390
|
-
let
|
|
395
|
+
let i = null;
|
|
391
396
|
switch (e.currentChar()) {
|
|
392
397
|
case "{":
|
|
393
|
-
return t.braceNest >= 1 && S(d.NOT_ALLOW_NEST_PLACEHOLDER, u(), 0), e.next(),
|
|
398
|
+
return t.braceNest >= 1 && S(d.NOT_ALLOW_NEST_PLACEHOLDER, u(), 0), e.next(), i = T(
|
|
394
399
|
t,
|
|
395
400
|
2,
|
|
396
401
|
"{"
|
|
397
402
|
/* TokenChars.BraceLeft */
|
|
398
|
-
),
|
|
403
|
+
), I(e), t.braceNest++, i;
|
|
399
404
|
case "}":
|
|
400
|
-
return t.braceNest > 0 && t.currentType === 2 && S(d.EMPTY_PLACEHOLDER, u(), 0), e.next(),
|
|
405
|
+
return t.braceNest > 0 && t.currentType === 2 && S(d.EMPTY_PLACEHOLDER, u(), 0), e.next(), i = T(
|
|
401
406
|
t,
|
|
402
407
|
3,
|
|
403
408
|
"}"
|
|
404
409
|
/* TokenChars.BraceRight */
|
|
405
|
-
), t.braceNest--, t.braceNest > 0 &&
|
|
410
|
+
), t.braceNest--, t.braceNest > 0 && I(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), i;
|
|
406
411
|
case "@":
|
|
407
|
-
return t.braceNest > 0 && S(d.UNTERMINATED_CLOSING_BRACE, u(), 0),
|
|
412
|
+
return t.braceNest > 0 && S(d.UNTERMINATED_CLOSING_BRACE, u(), 0), i = $(e, t) || R(t), t.braceNest = 0, i;
|
|
408
413
|
default: {
|
|
409
|
-
let k = !0,
|
|
410
|
-
if (
|
|
411
|
-
return t.braceNest > 0 && S(d.UNTERMINATED_CLOSING_BRACE, u(), 0),
|
|
414
|
+
let k = !0, D = !0, U = !0;
|
|
415
|
+
if (x(e))
|
|
416
|
+
return t.braceNest > 0 && S(d.UNTERMINATED_CLOSING_BRACE, u(), 0), i = T(t, 1, V(e)), t.braceNest = 0, t.inLinked = !1, i;
|
|
412
417
|
if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6))
|
|
413
418
|
return S(d.UNTERMINATED_CLOSING_BRACE, u(), 0), t.braceNest = 0, Q(e, t);
|
|
414
419
|
if (k = E(e, t))
|
|
415
|
-
return
|
|
416
|
-
if (
|
|
417
|
-
return
|
|
420
|
+
return i = T(t, 4, Le(e)), I(e), i;
|
|
421
|
+
if (D = l(e, t))
|
|
422
|
+
return i = T(t, 5, Ne(e)), I(e), i;
|
|
418
423
|
if (U = L(e, t))
|
|
419
|
-
return
|
|
420
|
-
if (!k && !
|
|
421
|
-
return
|
|
424
|
+
return i = T(t, 6, pe(e)), I(e), i;
|
|
425
|
+
if (!k && !D && !U)
|
|
426
|
+
return i = T(t, 12, Z(e)), S(d.INVALID_TOKEN_IN_PLACEHOLDER, u(), 0, i.value), I(e), i;
|
|
422
427
|
break;
|
|
423
428
|
}
|
|
424
429
|
}
|
|
425
|
-
return
|
|
430
|
+
return i;
|
|
426
431
|
}
|
|
427
432
|
function $(e, t) {
|
|
428
|
-
const { currentType:
|
|
429
|
-
let
|
|
433
|
+
const { currentType: i } = t;
|
|
434
|
+
let a = null;
|
|
430
435
|
const k = e.currentChar();
|
|
431
|
-
switch ((
|
|
436
|
+
switch ((i === 7 || i === 8 || i === 11 || i === 9) && (k === O || k === M) && S(d.INVALID_LINKED_FORMAT, u(), 0), k) {
|
|
432
437
|
case "@":
|
|
433
|
-
return e.next(),
|
|
438
|
+
return e.next(), a = T(
|
|
434
439
|
t,
|
|
435
440
|
7,
|
|
436
441
|
"@"
|
|
437
442
|
/* TokenChars.LinkedAlias */
|
|
438
|
-
), t.inLinked = !0,
|
|
443
|
+
), t.inLinked = !0, a;
|
|
439
444
|
case ".":
|
|
440
|
-
return
|
|
445
|
+
return I(e), e.next(), T(
|
|
441
446
|
t,
|
|
442
447
|
8,
|
|
443
448
|
"."
|
|
444
449
|
/* TokenChars.LinkedDot */
|
|
445
450
|
);
|
|
446
451
|
case ":":
|
|
447
|
-
return
|
|
452
|
+
return I(e), e.next(), T(
|
|
448
453
|
t,
|
|
449
454
|
9,
|
|
450
455
|
":"
|
|
451
456
|
/* TokenChars.LinkedDelimiter */
|
|
452
457
|
);
|
|
453
458
|
default:
|
|
454
|
-
return
|
|
459
|
+
return x(e) ? (a = T(t, 1, V(e)), t.braceNest = 0, t.inLinked = !1, a) : N(e, t) || g(e, t) ? (I(e), $(e, t)) : p(e, t) ? (I(e), T(t, 11, he(e))) : y(e, t) ? (I(e), k === "{" ? B(e, t) || a : T(t, 10, Te(e))) : (i === 7 && S(d.INVALID_LINKED_FORMAT, u(), 0), t.braceNest = 0, t.inLinked = !1, Q(e, t));
|
|
455
460
|
}
|
|
456
461
|
}
|
|
457
462
|
function Q(e, t) {
|
|
458
|
-
let
|
|
463
|
+
let i = {
|
|
459
464
|
type: 13
|
|
460
465
|
/* TokenTypes.EOF */
|
|
461
466
|
};
|
|
@@ -476,22 +481,22 @@ function ve(r, n = {}) {
|
|
|
476
481
|
case "@":
|
|
477
482
|
return $(e, t) || R(t);
|
|
478
483
|
default: {
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
484
|
+
if (x(e))
|
|
485
|
+
return i = T(t, 1, V(e)), t.braceNest = 0, t.inLinked = !1, i;
|
|
481
486
|
if (F(e))
|
|
482
487
|
return T(t, 0, de(e));
|
|
483
488
|
break;
|
|
484
489
|
}
|
|
485
490
|
}
|
|
486
|
-
return
|
|
491
|
+
return i;
|
|
487
492
|
}
|
|
488
493
|
function Ae() {
|
|
489
|
-
const { currentType: e, offset: t, startLoc:
|
|
490
|
-
return
|
|
491
|
-
|
|
494
|
+
const { currentType: e, offset: t, startLoc: i, endLoc: a } = P;
|
|
495
|
+
return P.lastType = e, P.lastOffset = t, P.lastStartLoc = i, P.lastEndLoc = a, P.offset = _(), P.startLoc = u(), o.currentChar() === w ? T(
|
|
496
|
+
P,
|
|
492
497
|
13
|
|
493
498
|
/* TokenTypes.EOF */
|
|
494
|
-
) : Q(
|
|
499
|
+
) : Q(o, P);
|
|
495
500
|
}
|
|
496
501
|
return {
|
|
497
502
|
nextToken: Ae,
|
|
@@ -500,8 +505,11 @@ function ve(r, n = {}) {
|
|
|
500
505
|
context: m
|
|
501
506
|
};
|
|
502
507
|
}
|
|
503
|
-
const Me = "parser", Xe = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
|
|
504
|
-
function
|
|
508
|
+
const Me = "parser", Xe = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g, we = /\\([\\@{}|])/g;
|
|
509
|
+
function ge(r, n) {
|
|
510
|
+
return n;
|
|
511
|
+
}
|
|
512
|
+
function xe(r, n, c) {
|
|
505
513
|
switch (r) {
|
|
506
514
|
case "\\\\":
|
|
507
515
|
return "\\";
|
|
@@ -509,141 +517,141 @@ function we(r, n, c) {
|
|
|
509
517
|
case "\\'":
|
|
510
518
|
return "'";
|
|
511
519
|
default: {
|
|
512
|
-
const
|
|
513
|
-
return
|
|
520
|
+
const o = parseInt(n || c, 16);
|
|
521
|
+
return o <= 55295 || o >= 57344 ? String.fromCodePoint(o) : "�";
|
|
514
522
|
}
|
|
515
523
|
}
|
|
516
524
|
}
|
|
517
525
|
function He(r = {}) {
|
|
518
526
|
const n = r.location !== !1, { onError: c } = r;
|
|
519
|
-
function
|
|
520
|
-
const N =
|
|
521
|
-
if (N.offset +=
|
|
522
|
-
const p = n ? q(E, N) : null,
|
|
527
|
+
function o(s, f, E, l, ...L) {
|
|
528
|
+
const N = s.currentPosition();
|
|
529
|
+
if (N.offset += l, N.column += l, c) {
|
|
530
|
+
const p = n ? q(E, N) : null, g = G(f, p, {
|
|
523
531
|
domain: Me,
|
|
524
532
|
args: L
|
|
525
533
|
});
|
|
526
|
-
c(
|
|
534
|
+
c(g);
|
|
527
535
|
}
|
|
528
536
|
}
|
|
529
|
-
function _(
|
|
530
|
-
const
|
|
531
|
-
return n && (
|
|
537
|
+
function _(s, f, E) {
|
|
538
|
+
const l = { type: s };
|
|
539
|
+
return n && (l.start = f, l.end = f, l.loc = { start: E, end: E }), l;
|
|
532
540
|
}
|
|
533
|
-
function u(
|
|
534
|
-
n && (
|
|
541
|
+
function u(s, f, E, l) {
|
|
542
|
+
n && (s.end = f, s.loc && (s.loc.end = E));
|
|
535
543
|
}
|
|
536
|
-
function h(
|
|
537
|
-
const E =
|
|
538
|
-
return
|
|
544
|
+
function h(s, f) {
|
|
545
|
+
const E = s.context(), l = _(3, E.offset, E.startLoc);
|
|
546
|
+
return l.value = f.replace(we, ge), u(l, s.currentOffset(), s.currentPosition()), l;
|
|
539
547
|
}
|
|
540
|
-
function
|
|
541
|
-
const E =
|
|
542
|
-
return N.index = parseInt(
|
|
548
|
+
function C(s, f) {
|
|
549
|
+
const E = s.context(), { lastOffset: l, lastStartLoc: L } = E, N = _(5, l, L);
|
|
550
|
+
return N.index = parseInt(f, 10), s.nextToken(), u(N, s.currentOffset(), s.currentPosition()), N;
|
|
543
551
|
}
|
|
544
|
-
function
|
|
545
|
-
const E =
|
|
546
|
-
return N.key =
|
|
552
|
+
function P(s, f) {
|
|
553
|
+
const E = s.context(), { lastOffset: l, lastStartLoc: L } = E, N = _(4, l, L);
|
|
554
|
+
return N.key = f, s.nextToken(), u(N, s.currentOffset(), s.currentPosition()), N;
|
|
547
555
|
}
|
|
548
|
-
function m(
|
|
549
|
-
const E =
|
|
550
|
-
return N.value =
|
|
556
|
+
function m(s, f) {
|
|
557
|
+
const E = s.context(), { lastOffset: l, lastStartLoc: L } = E, N = _(9, l, L);
|
|
558
|
+
return N.value = f.replace(Xe, xe), s.nextToken(), u(N, s.currentOffset(), s.currentPosition()), N;
|
|
551
559
|
}
|
|
552
|
-
function b(
|
|
553
|
-
const
|
|
554
|
-
return
|
|
555
|
-
nextConsumeToken:
|
|
560
|
+
function b(s) {
|
|
561
|
+
const f = s.nextToken(), E = s.context(), { lastOffset: l, lastStartLoc: L } = E, N = _(8, l, L);
|
|
562
|
+
return f.type !== 11 ? (o(s, d.UNEXPECTED_EMPTY_LINKED_MODIFIER, E.lastStartLoc, 0), N.value = "", u(N, l, L), {
|
|
563
|
+
nextConsumeToken: f,
|
|
556
564
|
node: N
|
|
557
|
-
}) : (
|
|
565
|
+
}) : (f.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, X(f)), N.value = f.value || "", u(N, s.currentOffset(), s.currentPosition()), {
|
|
558
566
|
node: N
|
|
559
567
|
});
|
|
560
568
|
}
|
|
561
|
-
function S(
|
|
562
|
-
const E =
|
|
563
|
-
return
|
|
569
|
+
function S(s, f) {
|
|
570
|
+
const E = s.context(), l = _(7, E.offset, E.startLoc);
|
|
571
|
+
return l.value = f, u(l, s.currentOffset(), s.currentPosition()), l;
|
|
564
572
|
}
|
|
565
|
-
function T(
|
|
566
|
-
const
|
|
567
|
-
let
|
|
568
|
-
if (
|
|
569
|
-
const L = b(
|
|
570
|
-
E.modifier = L.node,
|
|
573
|
+
function T(s) {
|
|
574
|
+
const f = s.context(), E = _(6, f.offset, f.startLoc);
|
|
575
|
+
let l = s.nextToken();
|
|
576
|
+
if (l.type === 8) {
|
|
577
|
+
const L = b(s);
|
|
578
|
+
E.modifier = L.node, l = L.nextConsumeToken || s.nextToken();
|
|
571
579
|
}
|
|
572
|
-
switch (
|
|
580
|
+
switch (l.type !== 9 && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(l)), l = s.nextToken(), l.type === 2 && (l = s.nextToken()), l.type) {
|
|
573
581
|
case 10:
|
|
574
|
-
|
|
582
|
+
l.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(l)), E.key = S(s, l.value || "");
|
|
575
583
|
break;
|
|
576
584
|
case 4:
|
|
577
|
-
|
|
585
|
+
l.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(l)), E.key = P(s, l.value || "");
|
|
578
586
|
break;
|
|
579
587
|
case 5:
|
|
580
|
-
|
|
588
|
+
l.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(l)), E.key = C(s, l.value || "");
|
|
581
589
|
break;
|
|
582
590
|
case 6:
|
|
583
|
-
|
|
591
|
+
l.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(l)), E.key = m(s, l.value || "");
|
|
584
592
|
break;
|
|
585
593
|
default: {
|
|
586
|
-
|
|
587
|
-
const L =
|
|
594
|
+
o(s, d.UNEXPECTED_EMPTY_LINKED_KEY, f.lastStartLoc, 0);
|
|
595
|
+
const L = s.context(), N = _(7, L.offset, L.startLoc);
|
|
588
596
|
return N.value = "", u(N, L.offset, L.startLoc), E.key = N, u(E, L.offset, L.startLoc), {
|
|
589
|
-
nextConsumeToken:
|
|
597
|
+
nextConsumeToken: l,
|
|
590
598
|
node: E
|
|
591
599
|
};
|
|
592
600
|
}
|
|
593
601
|
}
|
|
594
|
-
return u(E,
|
|
602
|
+
return u(E, s.currentOffset(), s.currentPosition()), {
|
|
595
603
|
node: E
|
|
596
604
|
};
|
|
597
605
|
}
|
|
598
|
-
function R(
|
|
599
|
-
const
|
|
606
|
+
function R(s) {
|
|
607
|
+
const f = s.context(), E = f.currentType === 1 ? s.currentOffset() : f.offset, l = f.currentType === 1 ? f.endLoc : f.startLoc, L = _(2, E, l);
|
|
600
608
|
L.items = [];
|
|
601
609
|
let N = null;
|
|
602
610
|
do {
|
|
603
|
-
const y = N ||
|
|
611
|
+
const y = N || s.nextToken();
|
|
604
612
|
switch (N = null, y.type) {
|
|
605
613
|
case 0:
|
|
606
|
-
y.value == null &&
|
|
614
|
+
y.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(y)), L.items.push(h(s, y.value || ""));
|
|
607
615
|
break;
|
|
608
616
|
case 5:
|
|
609
|
-
y.value == null &&
|
|
617
|
+
y.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(y)), L.items.push(C(s, y.value || ""));
|
|
610
618
|
break;
|
|
611
619
|
case 4:
|
|
612
|
-
y.value == null &&
|
|
620
|
+
y.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(y)), L.items.push(P(s, y.value || ""));
|
|
613
621
|
break;
|
|
614
622
|
case 6:
|
|
615
|
-
y.value == null &&
|
|
623
|
+
y.value == null && o(s, d.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, X(y)), L.items.push(m(s, y.value || ""));
|
|
616
624
|
break;
|
|
617
625
|
case 7: {
|
|
618
|
-
const
|
|
619
|
-
L.items.push(
|
|
626
|
+
const x = T(s);
|
|
627
|
+
L.items.push(x.node), N = x.nextConsumeToken || null;
|
|
620
628
|
break;
|
|
621
629
|
}
|
|
622
630
|
}
|
|
623
|
-
} while (
|
|
624
|
-
const p =
|
|
625
|
-
return u(L, p,
|
|
626
|
-
}
|
|
627
|
-
function v(
|
|
628
|
-
const L =
|
|
629
|
-
let N =
|
|
630
|
-
const p = _(1,
|
|
631
|
-
p.cases = [], p.cases.push(
|
|
631
|
+
} while (f.currentType !== 13 && f.currentType !== 1);
|
|
632
|
+
const p = f.currentType === 1 ? f.lastOffset : s.currentOffset(), g = f.currentType === 1 ? f.lastEndLoc : s.currentPosition();
|
|
633
|
+
return u(L, p, g), L;
|
|
634
|
+
}
|
|
635
|
+
function v(s, f, E, l) {
|
|
636
|
+
const L = s.context();
|
|
637
|
+
let N = l.items.length === 0;
|
|
638
|
+
const p = _(1, f, E);
|
|
639
|
+
p.cases = [], p.cases.push(l);
|
|
632
640
|
do {
|
|
633
|
-
const
|
|
634
|
-
N || (N =
|
|
641
|
+
const g = R(s);
|
|
642
|
+
N || (N = g.items.length === 0), p.cases.push(g);
|
|
635
643
|
} while (L.currentType !== 13);
|
|
636
|
-
return N &&
|
|
644
|
+
return N && o(s, d.MUST_HAVE_MESSAGES_IN_PLURAL, E, 0), u(p, s.currentOffset(), s.currentPosition()), p;
|
|
637
645
|
}
|
|
638
|
-
function A(
|
|
639
|
-
const
|
|
640
|
-
return
|
|
646
|
+
function A(s) {
|
|
647
|
+
const f = s.context(), { offset: E, startLoc: l } = f, L = R(s);
|
|
648
|
+
return f.currentType === 13 ? L : v(s, E, l, L);
|
|
641
649
|
}
|
|
642
|
-
function
|
|
643
|
-
const
|
|
644
|
-
return n &&
|
|
650
|
+
function I(s) {
|
|
651
|
+
const f = ve(s, re({}, r)), E = f.context(), l = _(0, E.offset, E.startLoc);
|
|
652
|
+
return n && l.loc && (l.loc.source = s), l.body = A(f), r.onCacheKey && (l.cacheKey = r.onCacheKey(s)), E.currentType !== 13 && o(f, d.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, s[E.offset] || ""), u(l, f.currentOffset(), f.currentPosition()), l;
|
|
645
653
|
}
|
|
646
|
-
return { parse:
|
|
654
|
+
return { parse: I };
|
|
647
655
|
}
|
|
648
656
|
function X(r) {
|
|
649
657
|
if (r.type === 13)
|
|
@@ -703,16 +711,16 @@ function W(r, n) {
|
|
|
703
711
|
break;
|
|
704
712
|
}
|
|
705
713
|
}
|
|
706
|
-
function
|
|
714
|
+
function Ke(r, n = {}) {
|
|
707
715
|
const c = Ye(r);
|
|
708
716
|
c.helper(
|
|
709
717
|
"normalize"
|
|
710
718
|
/* HelperNameMap.NORMALIZE */
|
|
711
719
|
), r.body && W(r.body, c);
|
|
712
|
-
const
|
|
713
|
-
r.helpers = Array.from(
|
|
720
|
+
const o = c.context();
|
|
721
|
+
r.helpers = Array.from(o.helpers);
|
|
714
722
|
}
|
|
715
|
-
function
|
|
723
|
+
function $e(r) {
|
|
716
724
|
const n = r.body;
|
|
717
725
|
return n.type === 2 ? ne(n) : n.cases.forEach((c) => ne(c)), r;
|
|
718
726
|
}
|
|
@@ -723,39 +731,39 @@ function ne(r) {
|
|
|
723
731
|
} else {
|
|
724
732
|
const n = [];
|
|
725
733
|
for (let c = 0; c < r.items.length; c++) {
|
|
726
|
-
const
|
|
727
|
-
if (!(
|
|
734
|
+
const o = r.items[c];
|
|
735
|
+
if (!(o.type === 3 || o.type === 9) || o.value == null)
|
|
728
736
|
break;
|
|
729
|
-
n.push(
|
|
737
|
+
n.push(o.value);
|
|
730
738
|
}
|
|
731
739
|
if (n.length === r.items.length) {
|
|
732
|
-
r.static =
|
|
740
|
+
r.static = ie(n);
|
|
733
741
|
for (let c = 0; c < r.items.length; c++) {
|
|
734
|
-
const
|
|
735
|
-
(
|
|
742
|
+
const o = r.items[c];
|
|
743
|
+
(o.type === 3 || o.type === 9) && delete o.value;
|
|
736
744
|
}
|
|
737
745
|
}
|
|
738
746
|
}
|
|
739
747
|
}
|
|
740
|
-
const
|
|
741
|
-
function
|
|
748
|
+
const Ge = "minifier";
|
|
749
|
+
function Y(r) {
|
|
742
750
|
switch (r.t = r.type, r.type) {
|
|
743
751
|
case 0: {
|
|
744
752
|
const n = r;
|
|
745
|
-
|
|
753
|
+
Y(n.body), n.b = n.body, delete n.body;
|
|
746
754
|
break;
|
|
747
755
|
}
|
|
748
756
|
case 1: {
|
|
749
757
|
const n = r, c = n.cases;
|
|
750
|
-
for (let
|
|
751
|
-
|
|
758
|
+
for (let o = 0; o < c.length; o++)
|
|
759
|
+
Y(c[o]);
|
|
752
760
|
n.c = c, delete n.cases;
|
|
753
761
|
break;
|
|
754
762
|
}
|
|
755
763
|
case 2: {
|
|
756
764
|
const n = r, c = n.items;
|
|
757
|
-
for (let
|
|
758
|
-
|
|
765
|
+
for (let o = 0; o < c.length; o++)
|
|
766
|
+
Y(c[o]);
|
|
759
767
|
n.i = c, delete n.items, n.static && (n.s = n.static, delete n.static);
|
|
760
768
|
break;
|
|
761
769
|
}
|
|
@@ -769,7 +777,7 @@ function K(r) {
|
|
|
769
777
|
}
|
|
770
778
|
case 6: {
|
|
771
779
|
const n = r;
|
|
772
|
-
|
|
780
|
+
Y(n.key), n.k = n.key, delete n.key, n.modifier && (Y(n.modifier), n.m = n.modifier, delete n.modifier);
|
|
773
781
|
break;
|
|
774
782
|
}
|
|
775
783
|
case 5: {
|
|
@@ -785,48 +793,48 @@ function K(r) {
|
|
|
785
793
|
default:
|
|
786
794
|
if (process.env.NODE_ENV !== "production")
|
|
787
795
|
throw G(d.UNHANDLED_MINIFIER_NODE_TYPE, null, {
|
|
788
|
-
domain:
|
|
796
|
+
domain: Ge,
|
|
789
797
|
args: [r.type]
|
|
790
798
|
});
|
|
791
799
|
}
|
|
792
800
|
delete r.type;
|
|
793
801
|
}
|
|
794
|
-
const
|
|
795
|
-
function
|
|
796
|
-
const { filename: c, breakLineCode:
|
|
802
|
+
const Fe = "parser";
|
|
803
|
+
function Ve(r, n) {
|
|
804
|
+
const { filename: c, breakLineCode: o, needIndent: _ } = n, u = n.location !== !1, h = {
|
|
797
805
|
filename: c,
|
|
798
806
|
code: "",
|
|
799
807
|
column: 1,
|
|
800
808
|
line: 1,
|
|
801
809
|
offset: 0,
|
|
802
810
|
map: void 0,
|
|
803
|
-
breakLineCode:
|
|
811
|
+
breakLineCode: o,
|
|
804
812
|
needIndent: _,
|
|
805
813
|
indentLevel: 0
|
|
806
814
|
};
|
|
807
815
|
u && r.loc && (h.source = r.loc.source);
|
|
808
|
-
const
|
|
809
|
-
function
|
|
816
|
+
const C = () => h;
|
|
817
|
+
function P(A, I) {
|
|
810
818
|
h.code += A;
|
|
811
819
|
}
|
|
812
|
-
function m(A,
|
|
813
|
-
const
|
|
814
|
-
|
|
820
|
+
function m(A, I = !0) {
|
|
821
|
+
const s = I ? o : "";
|
|
822
|
+
P(_ ? s + " ".repeat(A) : s);
|
|
815
823
|
}
|
|
816
824
|
function b(A = !0) {
|
|
817
|
-
const
|
|
818
|
-
A && m(
|
|
825
|
+
const I = ++h.indentLevel;
|
|
826
|
+
A && m(I);
|
|
819
827
|
}
|
|
820
828
|
function S(A = !0) {
|
|
821
|
-
const
|
|
822
|
-
A && m(
|
|
829
|
+
const I = --h.indentLevel;
|
|
830
|
+
A && m(I);
|
|
823
831
|
}
|
|
824
832
|
function T() {
|
|
825
833
|
m(h.indentLevel);
|
|
826
834
|
}
|
|
827
835
|
return {
|
|
828
|
-
context:
|
|
829
|
-
push:
|
|
836
|
+
context: C,
|
|
837
|
+
push: P,
|
|
830
838
|
indent: b,
|
|
831
839
|
deindent: S,
|
|
832
840
|
newline: T,
|
|
@@ -834,54 +842,54 @@ function Ge(r, n) {
|
|
|
834
842
|
needIndent: () => h.needIndent
|
|
835
843
|
};
|
|
836
844
|
}
|
|
837
|
-
function
|
|
845
|
+
function Be(r, n) {
|
|
838
846
|
const { helper: c } = r;
|
|
839
847
|
r.push(`${c(
|
|
840
848
|
"linked"
|
|
841
849
|
/* HelperNameMap.LINKED */
|
|
842
|
-
)}(`),
|
|
850
|
+
)}(`), K(r, n.key), n.modifier ? (r.push(", "), K(r, n.modifier), r.push(", _type")) : r.push(", undefined, _type"), r.push(")");
|
|
843
851
|
}
|
|
844
|
-
function
|
|
845
|
-
const { helper: c, needIndent:
|
|
852
|
+
function Qe(r, n) {
|
|
853
|
+
const { helper: c, needIndent: o } = r;
|
|
846
854
|
r.push(`${c(
|
|
847
855
|
"normalize"
|
|
848
856
|
/* HelperNameMap.NORMALIZE */
|
|
849
|
-
)}([`), r.indent(
|
|
857
|
+
)}([`), r.indent(o());
|
|
850
858
|
const _ = n.items.length;
|
|
851
|
-
for (let u = 0; u < _ && (
|
|
859
|
+
for (let u = 0; u < _ && (K(r, n.items[u]), u !== _ - 1); u++)
|
|
852
860
|
r.push(", ");
|
|
853
|
-
r.deindent(
|
|
861
|
+
r.deindent(o()), r.push("])");
|
|
854
862
|
}
|
|
855
|
-
function
|
|
856
|
-
const { helper: c, needIndent:
|
|
863
|
+
function qe(r, n) {
|
|
864
|
+
const { helper: c, needIndent: o } = r;
|
|
857
865
|
if (n.cases.length > 1) {
|
|
858
866
|
r.push(`${c(
|
|
859
867
|
"plural"
|
|
860
868
|
/* HelperNameMap.PLURAL */
|
|
861
|
-
)}([`), r.indent(
|
|
869
|
+
)}([`), r.indent(o());
|
|
862
870
|
const _ = n.cases.length;
|
|
863
|
-
for (let u = 0; u < _ && (
|
|
871
|
+
for (let u = 0; u < _ && (K(r, n.cases[u]), u !== _ - 1); u++)
|
|
864
872
|
r.push(", ");
|
|
865
|
-
r.deindent(
|
|
873
|
+
r.deindent(o()), r.push("])");
|
|
866
874
|
}
|
|
867
875
|
}
|
|
868
|
-
function
|
|
869
|
-
n.body ?
|
|
876
|
+
function We(r, n) {
|
|
877
|
+
n.body ? K(r, n.body) : r.push("null");
|
|
870
878
|
}
|
|
871
|
-
function
|
|
879
|
+
function K(r, n) {
|
|
872
880
|
const { helper: c } = r;
|
|
873
881
|
switch (n.type) {
|
|
874
882
|
case 0:
|
|
875
|
-
|
|
883
|
+
We(r, n);
|
|
876
884
|
break;
|
|
877
885
|
case 1:
|
|
878
|
-
|
|
886
|
+
qe(r, n);
|
|
879
887
|
break;
|
|
880
888
|
case 2:
|
|
881
|
-
|
|
889
|
+
Qe(r, n);
|
|
882
890
|
break;
|
|
883
891
|
case 6:
|
|
884
|
-
|
|
892
|
+
Be(r, n);
|
|
885
893
|
break;
|
|
886
894
|
case 8:
|
|
887
895
|
r.push(JSON.stringify(n.value), n);
|
|
@@ -916,37 +924,37 @@ function x(r, n) {
|
|
|
916
924
|
default:
|
|
917
925
|
if (process.env.NODE_ENV !== "production")
|
|
918
926
|
throw G(d.UNHANDLED_CODEGEN_NODE_TYPE, null, {
|
|
919
|
-
domain:
|
|
927
|
+
domain: Fe,
|
|
920
928
|
args: [n.type]
|
|
921
929
|
});
|
|
922
930
|
}
|
|
923
931
|
}
|
|
924
|
-
const
|
|
925
|
-
const c = z(n.mode) ? n.mode : "normal",
|
|
932
|
+
const Je = (r, n = {}) => {
|
|
933
|
+
const c = z(n.mode) ? n.mode : "normal", o = z(n.filename) ? n.filename : "message.intl";
|
|
926
934
|
n.sourceMap;
|
|
927
935
|
const _ = n.breakLineCode != null ? n.breakLineCode : c === "arrow" ? ";" : `
|
|
928
|
-
`, u = n.needIndent ? n.needIndent : c !== "arrow", h = r.helpers || [],
|
|
929
|
-
filename:
|
|
936
|
+
`, u = n.needIndent ? n.needIndent : c !== "arrow", h = r.helpers || [], C = Ve(r, {
|
|
937
|
+
filename: o,
|
|
930
938
|
breakLineCode: _,
|
|
931
939
|
needIndent: u
|
|
932
940
|
});
|
|
933
|
-
|
|
934
|
-
const { code:
|
|
941
|
+
C.push(c === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), C.indent(u), h.length > 0 && (C.push(`const { ${ie(h.map((b) => `${b}: _${b}`), ", ")} } = ctx`), C.newline()), C.push("return "), K(C, r), C.deindent(u), C.push("}"), delete r.helpers;
|
|
942
|
+
const { code: P, map: m } = C.context();
|
|
935
943
|
return {
|
|
936
944
|
ast: r,
|
|
937
|
-
code:
|
|
945
|
+
code: P,
|
|
938
946
|
map: m ? m.toJSON() : void 0
|
|
939
947
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
940
948
|
};
|
|
941
949
|
};
|
|
942
|
-
function
|
|
943
|
-
const c = re({}, n),
|
|
944
|
-
return
|
|
950
|
+
function tt(r, n = {}) {
|
|
951
|
+
const c = re({}, n), o = !!c.jit, _ = !!c.minify, u = c.optimize == null ? !0 : c.optimize, C = He(c).parse(r);
|
|
952
|
+
return o ? (u && $e(C), _ && Y(C), { ast: C, code: "" }) : (Ke(C, c), Je(C, c));
|
|
945
953
|
}
|
|
946
954
|
export {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
955
|
+
Ze as C,
|
|
956
|
+
ze as a,
|
|
957
|
+
tt as b,
|
|
950
958
|
G as c,
|
|
951
|
-
|
|
959
|
+
et as d
|
|
952
960
|
};
|