lty-protocol 1.0.28 → 1.0.30
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/index.d.ts +3 -11
- package/dist/lty-protocol.mjs +139 -3852
- package/dist/lty-protocol.umd.js +1 -6
- package/dist/plugin.d.ts +3 -5
- package/package.json +1 -1
- package/dist/App.vue.d.ts +0 -2
- package/dist/components/Ethernet.vue.d.ts +0 -5
- package/dist/i18n/lang/en.json.d.ts +0 -47
- package/dist/i18n/lang/zh.json.d.ts +0 -47
package/dist/lty-protocol.mjs
CHANGED
|
@@ -1,180 +1,175 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const Qr = /* @__PURE__ */ pe({
|
|
1
|
+
import { defineComponent as f, openBlock as p, createElementBlock as y, renderSlot as v, inject as I, computed as C, createBlock as M, resolveDynamicComponent as T, unref as V, normalizeProps as P, guardReactiveProps as k, Fragment as B, renderList as R } from "vue";
|
|
2
|
+
const K = /* @__PURE__ */ f({
|
|
4
3
|
name: "MyButton",
|
|
5
4
|
__name: "MyButton",
|
|
6
5
|
emits: ["click"],
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
|
|
6
|
+
setup(n, { emit: e }) {
|
|
7
|
+
const t = e, o = () => {
|
|
8
|
+
t("click");
|
|
10
9
|
};
|
|
11
|
-
return (
|
|
10
|
+
return (a, s) => (p(), y("button", {
|
|
12
11
|
class: "my-btn",
|
|
13
|
-
onClick:
|
|
12
|
+
onClick: o
|
|
14
13
|
}, [
|
|
15
|
-
|
|
14
|
+
v(a.$slots, "default", {}, void 0, !0)
|
|
16
15
|
]));
|
|
17
16
|
}
|
|
18
|
-
}),
|
|
19
|
-
const
|
|
20
|
-
for (const [
|
|
21
|
-
|
|
22
|
-
return
|
|
23
|
-
},
|
|
17
|
+
}), A = (n, e) => {
|
|
18
|
+
const t = n.__vccOpts || n;
|
|
19
|
+
for (const [o, a] of e)
|
|
20
|
+
t[o] = a;
|
|
21
|
+
return t;
|
|
22
|
+
}, w = /* @__PURE__ */ A(K, [["__scopeId", "data-v-c654f959"]]), N = /* @__PURE__ */ f({
|
|
24
23
|
name: "MyButton",
|
|
25
24
|
__name: "button2",
|
|
26
25
|
emits: ["click"],
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
-
|
|
26
|
+
setup(n, { emit: e }) {
|
|
27
|
+
const t = e, o = () => {
|
|
28
|
+
t("click");
|
|
30
29
|
};
|
|
31
|
-
return (
|
|
30
|
+
return (a, s) => (p(), y("button", {
|
|
32
31
|
class: "my-btn",
|
|
33
|
-
onClick:
|
|
32
|
+
onClick: o
|
|
34
33
|
}, [
|
|
35
|
-
|
|
34
|
+
v(a.$slots, "default", {}, void 0, !0)
|
|
36
35
|
]));
|
|
37
36
|
}
|
|
38
|
-
}),
|
|
37
|
+
}), Q = /* @__PURE__ */ A(N, [["__scopeId", "data-v-1477cfc3"]]), D = /* @__PURE__ */ Symbol("UI_KEY"), U = /* @__PURE__ */ f({
|
|
39
38
|
__name: "Input",
|
|
40
39
|
props: {
|
|
41
40
|
modelValue: {}
|
|
42
41
|
},
|
|
43
42
|
emits: ["update:modelValue"],
|
|
44
|
-
setup(
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
43
|
+
setup(n, { emit: e }) {
|
|
44
|
+
const t = n, o = e, a = I(D);
|
|
45
|
+
if (console.log("inject result:", a), !a || !a.Input)
|
|
47
46
|
throw new Error("Input not registered");
|
|
48
|
-
const
|
|
49
|
-
[
|
|
50
|
-
[u]: (
|
|
51
|
-
})),
|
|
52
|
-
return (
|
|
47
|
+
const s = a.Input, l = s.modelProp ?? "modelValue", c = s.modelEvent ?? "update:modelValue", u = "on" + c.charAt(0).toUpperCase() + c.slice(1), d = C(() => ({
|
|
48
|
+
[l]: t.modelValue,
|
|
49
|
+
[u]: (_) => o("update:modelValue", _)
|
|
50
|
+
})), m = s.component;
|
|
51
|
+
return (_, O) => (p(), M(T(V(m)), P(k(d.value)), null, 16));
|
|
53
52
|
}
|
|
54
|
-
}),
|
|
53
|
+
}), L = { style: { display: "flex", gap: "6px" } }, x = /* @__PURE__ */ f({
|
|
55
54
|
__name: "IpInput",
|
|
56
55
|
props: {
|
|
57
56
|
modelValue: {}
|
|
58
57
|
},
|
|
59
58
|
emits: ["update:modelValue"],
|
|
60
|
-
setup(
|
|
61
|
-
const
|
|
62
|
-
get: () => (
|
|
63
|
-
set: (
|
|
64
|
-
}),
|
|
65
|
-
const u = [...
|
|
66
|
-
u[
|
|
59
|
+
setup(n, { emit: e }) {
|
|
60
|
+
const t = n, o = e, a = C({
|
|
61
|
+
get: () => (t.modelValue || "0.0.0.0").split("."),
|
|
62
|
+
set: (l) => o("update:modelValue", l.join("."))
|
|
63
|
+
}), s = (l, c) => {
|
|
64
|
+
const u = [...a.value];
|
|
65
|
+
u[l] = c, a.value = u;
|
|
67
66
|
};
|
|
68
|
-
return (
|
|
69
|
-
(
|
|
70
|
-
key:
|
|
67
|
+
return (l, c) => (p(), y("div", L, [
|
|
68
|
+
(p(!0), y(B, null, R(a.value, (u, d) => (p(), M(U, {
|
|
69
|
+
key: d,
|
|
71
70
|
"model-value": u,
|
|
72
|
-
"onUpdate:modelValue": (
|
|
71
|
+
"onUpdate:modelValue": (m) => s(d, m)
|
|
73
72
|
}, null, 8, ["model-value", "onUpdate:modelValue"]))), 128))
|
|
74
73
|
]));
|
|
75
74
|
}
|
|
76
|
-
}),
|
|
75
|
+
}), $ = /* @__PURE__ */ f({
|
|
77
76
|
__name: "InputNumber",
|
|
78
77
|
props: {
|
|
79
78
|
modelValue: {}
|
|
80
79
|
},
|
|
81
80
|
emits: ["update:modelValue"],
|
|
82
|
-
setup(
|
|
83
|
-
const
|
|
84
|
-
if (!
|
|
81
|
+
setup(n, { emit: e }) {
|
|
82
|
+
const t = n, o = e, s = I("UIComponents", {}).InputNumber;
|
|
83
|
+
if (!s)
|
|
85
84
|
throw new Error("InputNumber not registered");
|
|
86
|
-
const
|
|
87
|
-
[
|
|
88
|
-
[u]: (
|
|
89
|
-
})),
|
|
90
|
-
return (
|
|
91
|
-
}
|
|
92
|
-
}), ts = {
|
|
93
|
-
install(e, t) {
|
|
94
|
-
e.provide(ar, t);
|
|
85
|
+
const l = s.modelProp ?? "modelValue", c = s.modelEvent ?? "update:modelValue", u = "on" + c.charAt(0).toUpperCase() + c.slice(1), d = C(() => ({
|
|
86
|
+
[l]: t.modelValue,
|
|
87
|
+
[u]: (_) => o("update:modelValue", _)
|
|
88
|
+
})), m = s.component;
|
|
89
|
+
return (_, O) => (p(), M(T(V(m)), P(k(d.value)), null, 16));
|
|
95
90
|
}
|
|
96
|
-
};
|
|
97
|
-
class
|
|
91
|
+
});
|
|
92
|
+
class r {
|
|
98
93
|
id;
|
|
99
94
|
deviceId;
|
|
100
95
|
type;
|
|
101
96
|
static registry = {};
|
|
102
|
-
constructor(
|
|
103
|
-
this.id =
|
|
97
|
+
constructor(e) {
|
|
98
|
+
this.id = e.id, this.deviceId = e.deviceId;
|
|
104
99
|
}
|
|
105
|
-
static register(
|
|
106
|
-
|
|
100
|
+
static register(e, t) {
|
|
101
|
+
r.registry[e] = t;
|
|
107
102
|
}
|
|
108
|
-
static fromPlain(
|
|
109
|
-
const
|
|
110
|
-
if (!
|
|
111
|
-
return
|
|
103
|
+
static fromPlain(e) {
|
|
104
|
+
const t = r.registry[e.type];
|
|
105
|
+
if (!t) throw new Error(`Unsupported protocol type: ${e.type}`);
|
|
106
|
+
return t.fromPlain(e);
|
|
112
107
|
}
|
|
113
108
|
}
|
|
114
|
-
class
|
|
115
|
-
static getDefaultConfig(
|
|
116
|
-
console.log(1231231,
|
|
117
|
-
const
|
|
109
|
+
class H {
|
|
110
|
+
static getDefaultConfig(e) {
|
|
111
|
+
console.log(1231231, e);
|
|
112
|
+
const t = e.baseInfo, o = e.configuration, a = e.tab;
|
|
118
113
|
return {
|
|
119
|
-
baseInfo:
|
|
120
|
-
config:
|
|
121
|
-
tab:
|
|
114
|
+
baseInfo: t,
|
|
115
|
+
config: o,
|
|
116
|
+
tab: a
|
|
122
117
|
};
|
|
123
118
|
}
|
|
124
119
|
}
|
|
125
|
-
const
|
|
126
|
-
type:
|
|
127
|
-
baseInfo:
|
|
128
|
-
tab:
|
|
129
|
-
configuration:
|
|
120
|
+
const j = "Ethernet", G = [{ key: "name", name: { i18nKey: "name" }, defaultValue: "Ethernet" }, { key: "supplier", name: { i18nKey: "supplier" }, defaultValue: { i18nKey: "company" } }, { key: "version", name: { i18nKey: "verison" }, defaultValue: "1.0.0.0" }, { key: "description", name: { i18nKey: "description" }, defaultValue: { i18nKey: "descriptionMap.ethernet" } }, { key: "category", name: { i18nKey: "category" }, defaultValue: { i18nKey: "ethernet" } }], Y = [{ name: { i18nKey: "general" }, key: "general" }, { name: { i18nKey: "ioMapping" }, key: "ioMapping" }], z = { general: [{ key: "netInterface", name: { i18nKey: "netInterface" }, dataType: "string", componentType: "strInput", defaultValue: "" }, { key: "ipAddress", name: { i18nKey: "ipAddress" }, dataType: "string", componentType: "ipInput", defaultValue: "192.168.1.1" }, { key: "subnetMask", name: { i18nKey: "subnetMask" }, dataType: "string", componentType: "ipInput", defaultValue: "255.255.255.0" }, { key: "defaultGateway", name: { i18nKey: "defaultGateway" }, dataType: "string", componentType: "ipInput", defaultValue: "0.0.0.0" }, { key: "adaptedOSConfiguration", name: { i18nKey: "adaptedOSConfiguration" }, dataType: "boolean", componentType: "switch", defaultValue: !1 }], ioMapping: [{ key: "busCycleTask", name: { i18nKey: "busCycleTask" }, dataType: "string", componentType: "select", defaultValue: "-1" }] }, F = {
|
|
121
|
+
type: j,
|
|
122
|
+
baseInfo: G,
|
|
123
|
+
tab: Y,
|
|
124
|
+
configuration: z
|
|
130
125
|
};
|
|
131
|
-
class
|
|
132
|
-
type =
|
|
133
|
-
moduleType =
|
|
126
|
+
class g extends r {
|
|
127
|
+
type = i.ETHERNET;
|
|
128
|
+
moduleType = E[i.ETHERNET];
|
|
134
129
|
baseInfo;
|
|
135
130
|
config;
|
|
136
131
|
tab;
|
|
137
|
-
constructor(
|
|
138
|
-
super(
|
|
139
|
-
const { baseInfo:
|
|
140
|
-
this.baseInfo =
|
|
132
|
+
constructor(e) {
|
|
133
|
+
super(e);
|
|
134
|
+
const { baseInfo: t, config: o, tab: a } = H.getDefaultConfig(F);
|
|
135
|
+
this.baseInfo = t, this.config = o, this.tab = a;
|
|
141
136
|
}
|
|
142
|
-
static fromPlain(
|
|
143
|
-
return new
|
|
137
|
+
static fromPlain(e) {
|
|
138
|
+
return new g(e);
|
|
144
139
|
}
|
|
145
140
|
}
|
|
146
|
-
class
|
|
147
|
-
type =
|
|
148
|
-
moduleType =
|
|
149
|
-
constructor(
|
|
150
|
-
super(
|
|
141
|
+
class S extends r {
|
|
142
|
+
type = i.MODBUS_TCP_SERVER;
|
|
143
|
+
moduleType = E[i.MODBUS_TCP_SERVER];
|
|
144
|
+
constructor(e) {
|
|
145
|
+
super(e);
|
|
151
146
|
}
|
|
152
|
-
static fromPlain(
|
|
153
|
-
return new
|
|
147
|
+
static fromPlain(e) {
|
|
148
|
+
return new S(e);
|
|
154
149
|
}
|
|
155
150
|
}
|
|
156
|
-
class
|
|
157
|
-
type =
|
|
158
|
-
moduleType =
|
|
159
|
-
constructor(
|
|
160
|
-
super(
|
|
151
|
+
class b extends r {
|
|
152
|
+
type = i.MODBUS_TCP_CLIENT;
|
|
153
|
+
moduleType = E[i.MODBUS_TCP_CLIENT];
|
|
154
|
+
constructor(e) {
|
|
155
|
+
super(e);
|
|
161
156
|
}
|
|
162
|
-
static fromPlain(
|
|
163
|
-
return new
|
|
157
|
+
static fromPlain(e) {
|
|
158
|
+
return new b(e);
|
|
164
159
|
}
|
|
165
160
|
}
|
|
166
|
-
class
|
|
167
|
-
type =
|
|
168
|
-
moduleType =
|
|
169
|
-
constructor(
|
|
170
|
-
super(
|
|
161
|
+
class h extends r {
|
|
162
|
+
type = i.MODBUS_TCP_SLAVE_DEVICE;
|
|
163
|
+
moduleType = E[i.MODBUS_TCP_SLAVE_DEVICE];
|
|
164
|
+
constructor(e) {
|
|
165
|
+
super(e);
|
|
171
166
|
}
|
|
172
|
-
static fromPlain(
|
|
173
|
-
return new
|
|
167
|
+
static fromPlain(e) {
|
|
168
|
+
return new h(e);
|
|
174
169
|
}
|
|
175
170
|
}
|
|
176
|
-
var
|
|
177
|
-
const
|
|
171
|
+
var i = /* @__PURE__ */ ((n) => (n.ETHERNET = "Ethernet", n.MODBUS_TCP_SERVER = "ModbusTCPServer", n.MODBUS_TCP_CLIENT = "ModbusTCPClient", n.MODBUS_TCP_SLAVE_DEVICE = "ModbusTCPSlaveDevice", n.MODBUS_SERIAL_PORT = "ModbusSerialPort", n.MODBUS_MASTER = "ModbusMaster", n.MODBUS_SLAVE = "ModbusSlave", n.MODBUS_SERIAL = "ModbusSerial", n.OPCUA_SERVER = "OPCUAServer", n.ETHER_CAT_MASTER = "EtherCatMaster", n.ETHER_CAT_SLAVE = "EtherCatSlave", n.ETHER_CAT_MODULE = "EtherCatModule", n))(i || {});
|
|
172
|
+
const E = {
|
|
178
173
|
Pprogrammable: 4096,
|
|
179
174
|
// 根节点
|
|
180
175
|
Protgrammable_Safety: 4098,
|
|
@@ -228,3765 +223,57 @@ const lt = {
|
|
|
228
223
|
EtherCatModule: 16384
|
|
229
224
|
// Ethercat子模块
|
|
230
225
|
};
|
|
231
|
-
class
|
|
226
|
+
class W {
|
|
232
227
|
map = /* @__PURE__ */ new Map();
|
|
233
228
|
constructor() {
|
|
234
|
-
|
|
229
|
+
r.register("Ethernet", g), r.register("ModbusTCPServer", S), r.register("ModbusTCPClient", b), r.register("ModbusTCPSlaveDevice", h);
|
|
235
230
|
}
|
|
236
|
-
init(
|
|
237
|
-
this.clear(),
|
|
238
|
-
const
|
|
239
|
-
this.map.set(
|
|
231
|
+
init(e) {
|
|
232
|
+
this.clear(), e.forEach((t) => {
|
|
233
|
+
const o = r.fromPlain(t);
|
|
234
|
+
this.map.set(t.id, o);
|
|
240
235
|
});
|
|
241
236
|
}
|
|
242
|
-
build(
|
|
237
|
+
build(e) {
|
|
243
238
|
return "";
|
|
244
239
|
}
|
|
245
|
-
get(
|
|
246
|
-
const
|
|
247
|
-
if (Array.isArray(
|
|
248
|
-
throw new Error(`Protocol ${
|
|
249
|
-
return
|
|
240
|
+
get(e) {
|
|
241
|
+
const t = Array.isArray(e) ? e.map((o) => this.map.get(o)).filter((o) => o !== void 0) : this.map.get(e);
|
|
242
|
+
if (Array.isArray(t) && !t.length || !t)
|
|
243
|
+
throw new Error(`Protocol ${e} is not found.`);
|
|
244
|
+
return t;
|
|
250
245
|
}
|
|
251
|
-
add(
|
|
252
|
-
this.map.set(
|
|
246
|
+
add(e) {
|
|
247
|
+
this.map.set(e.id, e);
|
|
253
248
|
}
|
|
254
|
-
delete(
|
|
255
|
-
Array.isArray(
|
|
249
|
+
delete(e) {
|
|
250
|
+
Array.isArray(e) ? e.forEach((t) => this.map.delete(t)) : this.map.delete(e);
|
|
256
251
|
}
|
|
257
252
|
clear() {
|
|
258
253
|
this.map.clear();
|
|
259
254
|
}
|
|
260
255
|
}
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return new is(), new ot({
|
|
266
|
-
id: 1,
|
|
267
|
-
deviceId: 1,
|
|
268
|
-
type: "Ethernet"
|
|
269
|
-
}), (s, a) => {
|
|
270
|
-
const o = yt("IpInput"), i = yt("Input"), u = yt("InputNumber");
|
|
271
|
-
return Ne(), He("div", null, [
|
|
272
|
-
rt(o, {
|
|
273
|
-
modelValue: t.value,
|
|
274
|
-
"onUpdate:modelValue": a[0] || (a[0] = (m) => t.value = m)
|
|
275
|
-
}, null, 8, ["modelValue"]),
|
|
276
|
-
rt(i, {
|
|
277
|
-
value: n.value,
|
|
278
|
-
"onUpdate:value": a[1] || (a[1] = (m) => n.value = m)
|
|
279
|
-
}, null, 8, ["value"]),
|
|
280
|
-
rt(u, {
|
|
281
|
-
value: r.value,
|
|
282
|
-
"onUpdate:value": a[2] || (a[2] = (m) => r.value = m),
|
|
283
|
-
"show-button": !1
|
|
284
|
-
}, null, 8, ["value"])
|
|
285
|
-
]);
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
function ue(e, t) {
|
|
290
|
-
typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
|
|
291
|
-
}
|
|
292
|
-
const pn = {};
|
|
293
|
-
function en(e) {
|
|
294
|
-
pn[e] || (pn[e] = !0, ue(e));
|
|
295
|
-
}
|
|
296
|
-
const le = typeof window < "u";
|
|
297
|
-
let ee, Ce;
|
|
298
|
-
if (process.env.NODE_ENV !== "production") {
|
|
299
|
-
const e = le && window.performance;
|
|
300
|
-
e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat
|
|
301
|
-
e.clearMeasures && (ee = (t) => {
|
|
302
|
-
e.mark(t);
|
|
303
|
-
}, Ce = (t, n, r) => {
|
|
304
|
-
e.measure(t, n, r), e.clearMarks(n), e.clearMarks(r);
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
const us = /\{([0-9a-zA-Z]+)\}/g;
|
|
308
|
-
function it(e, ...t) {
|
|
309
|
-
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(us, (n, r) => t.hasOwnProperty(r) ? t[r] : "");
|
|
310
|
-
}
|
|
311
|
-
const fe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), fs = (e, t, n) => _s({ l: e, k: t, s: n }), _s = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), j = (e) => typeof e == "number" && isFinite(e), ms = (e) => tn(e) === "[object Date]", Me = (e) => tn(e) === "[object RegExp]", ct = (e) => R(e) && Object.keys(e).length === 0, J = Object.assign, ds = Object.create, $ = (e = null) => ds(e);
|
|
312
|
-
let gn;
|
|
313
|
-
const ve = () => gn || (gn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : $());
|
|
314
|
-
function Nn(e) {
|
|
315
|
-
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/").replace(/=/g, "=");
|
|
316
|
-
}
|
|
317
|
-
function Tn(e) {
|
|
318
|
-
return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
319
|
-
}
|
|
320
|
-
function Es(e) {
|
|
321
|
-
return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (r, s, a) => `${s}="${Tn(a)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (r, s, a) => `${s}='${Tn(a)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (process.env.NODE_ENV !== "production" && ue("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."), e = e.replace(/(\s+)(on)(\w+\s*=)/gi, "$1on$3")), [
|
|
322
|
-
// In href, src, action, formaction attributes
|
|
323
|
-
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
|
324
|
-
// In style attributes within url()
|
|
325
|
-
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
|
326
|
-
].forEach((r) => {
|
|
327
|
-
e = e.replace(r, "$1javascript:");
|
|
328
|
-
}), e;
|
|
329
|
-
}
|
|
330
|
-
const ps = Object.prototype.hasOwnProperty;
|
|
331
|
-
function oe(e, t) {
|
|
332
|
-
return ps.call(e, t);
|
|
333
|
-
}
|
|
334
|
-
const H = Array.isArray, W = (e) => typeof e == "function", L = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object", gs = (e) => M(e) && W(e.then) && W(e.catch), ir = Object.prototype.toString, tn = (e) => ir.call(e), R = (e) => tn(e) === "[object Object]", Ns = (e) => e == null ? "" : H(e) || R(e) && e.toString === ir ? JSON.stringify(e, null, 2) : String(e);
|
|
335
|
-
function nn(e, t = "") {
|
|
336
|
-
return e.reduce((n, r, s) => s === 0 ? n + r : n + t + r, "");
|
|
337
|
-
}
|
|
338
|
-
const bn = 2;
|
|
339
|
-
function Ts(e, t = 0, n = e.length) {
|
|
340
|
-
const r = e.split(/\r?\n/);
|
|
341
|
-
let s = 0;
|
|
342
|
-
const a = [];
|
|
343
|
-
for (let o = 0; o < r.length; o++)
|
|
344
|
-
if (s += r[o].length + 1, s >= t) {
|
|
345
|
-
for (let i = o - bn; i <= o + bn || n > s; i++) {
|
|
346
|
-
if (i < 0 || i >= r.length)
|
|
347
|
-
continue;
|
|
348
|
-
const u = i + 1;
|
|
349
|
-
a.push(`${u}${" ".repeat(3 - String(u).length)}| ${r[i]}`);
|
|
350
|
-
const m = r[i].length;
|
|
351
|
-
if (i === o) {
|
|
352
|
-
const b = t - (s - m) + 1, T = Math.max(1, n > s ? m - b : n - t);
|
|
353
|
-
a.push(" | " + " ".repeat(b) + "^".repeat(T));
|
|
354
|
-
} else if (i > o) {
|
|
355
|
-
if (n > s) {
|
|
356
|
-
const b = Math.max(Math.min(n - s, m), 1);
|
|
357
|
-
a.push(" | " + "^".repeat(b));
|
|
358
|
-
}
|
|
359
|
-
s += m + 1;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
break;
|
|
363
|
-
}
|
|
364
|
-
return a.join(`
|
|
365
|
-
`);
|
|
366
|
-
}
|
|
367
|
-
function rn() {
|
|
368
|
-
const e = /* @__PURE__ */ new Map();
|
|
369
|
-
return {
|
|
370
|
-
events: e,
|
|
371
|
-
on(n, r) {
|
|
372
|
-
const s = e.get(n);
|
|
373
|
-
s && s.push(r) || e.set(n, [r]);
|
|
374
|
-
},
|
|
375
|
-
off(n, r) {
|
|
376
|
-
const s = e.get(n);
|
|
377
|
-
s && s.splice(s.indexOf(r) >>> 0, 1);
|
|
378
|
-
},
|
|
379
|
-
emit(n, r) {
|
|
380
|
-
(e.get(n) || []).slice().map((s) => s(r)), (e.get("*") || []).slice().map((s) => s(n, r));
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
const ze = (e) => !M(e) || H(e);
|
|
385
|
-
function st(e, t) {
|
|
386
|
-
if (ze(e) || ze(t))
|
|
387
|
-
throw new Error("Invalid value");
|
|
388
|
-
const n = [{ src: e, des: t }];
|
|
389
|
-
for (; n.length; ) {
|
|
390
|
-
const { src: r, des: s } = n.pop();
|
|
391
|
-
Object.keys(r).forEach((a) => {
|
|
392
|
-
a !== "__proto__" && (M(r[a]) && !M(s[a]) && (s[a] = Array.isArray(r[a]) ? [] : $()), ze(s[a]) || ze(r[a]) ? s[a] = r[a] : n.push({ src: r[a], des: s[a] }));
|
|
256
|
+
const J = [w, U, $, x], X = {
|
|
257
|
+
install(n, e) {
|
|
258
|
+
e && n.provide(D, e), J.forEach((t) => {
|
|
259
|
+
n.component(t.name, t);
|
|
393
260
|
});
|
|
394
261
|
}
|
|
395
|
-
}
|
|
396
|
-
function bs(e, t, n) {
|
|
397
|
-
return { line: e, column: t, offset: n };
|
|
398
|
-
}
|
|
399
|
-
function Ft(e, t, n) {
|
|
400
|
-
return { start: e, end: t };
|
|
401
|
-
}
|
|
402
|
-
const P = {
|
|
403
|
-
// tokenizer error codes
|
|
404
|
-
EXPECTED_TOKEN: 1,
|
|
405
|
-
INVALID_TOKEN_IN_PLACEHOLDER: 2,
|
|
406
|
-
UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
|
|
407
|
-
UNKNOWN_ESCAPE_SEQUENCE: 4,
|
|
408
|
-
INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
|
|
409
|
-
UNBALANCED_CLOSING_BRACE: 6,
|
|
410
|
-
UNTERMINATED_CLOSING_BRACE: 7,
|
|
411
|
-
EMPTY_PLACEHOLDER: 8,
|
|
412
|
-
NOT_ALLOW_NEST_PLACEHOLDER: 9,
|
|
413
|
-
INVALID_LINKED_FORMAT: 10,
|
|
414
|
-
// parser error codes
|
|
415
|
-
MUST_HAVE_MESSAGES_IN_PLURAL: 11,
|
|
416
|
-
UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
|
|
417
|
-
UNEXPECTED_EMPTY_LINKED_KEY: 13,
|
|
418
|
-
UNEXPECTED_LEXICAL_ANALYSIS: 14,
|
|
419
|
-
// generator error codes
|
|
420
|
-
UNHANDLED_CODEGEN_NODE_TYPE: 15,
|
|
421
|
-
// minifier error codes
|
|
422
|
-
UNHANDLED_MINIFIER_NODE_TYPE: 16
|
|
423
|
-
}, Is = 17, hs = {
|
|
424
|
-
// tokenizer error messages
|
|
425
|
-
[P.EXPECTED_TOKEN]: "Expected token: '{0}'",
|
|
426
|
-
[P.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
|
|
427
|
-
[P.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
|
|
428
|
-
[P.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
|
|
429
|
-
[P.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
|
|
430
|
-
[P.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
|
|
431
|
-
[P.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
|
|
432
|
-
[P.EMPTY_PLACEHOLDER]: "Empty placeholder",
|
|
433
|
-
[P.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
|
|
434
|
-
[P.INVALID_LINKED_FORMAT]: "Invalid linked format",
|
|
435
|
-
// parser error messages
|
|
436
|
-
[P.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
|
|
437
|
-
[P.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
|
|
438
|
-
[P.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
|
|
439
|
-
[P.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
|
|
440
|
-
// generator error messages
|
|
441
|
-
[P.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
|
|
442
|
-
// minimizer error messages
|
|
443
|
-
[P.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
444
|
-
};
|
|
445
|
-
function we(e, t, n = {}) {
|
|
446
|
-
const { domain: r, messages: s, args: a } = n, o = process.env.NODE_ENV !== "production" ? it((s || hs)[e] || "", ...a || []) : e, i = new SyntaxError(String(o));
|
|
447
|
-
return i.code = e, t && (i.location = t), i.domain = r, i;
|
|
448
|
-
}
|
|
449
|
-
function Ls(e) {
|
|
450
|
-
throw e;
|
|
451
|
-
}
|
|
452
|
-
const Os = /<\/?[\w\s="/.':;#-\/]+>/, vs = (e) => Os.test(e), ie = " ", Cs = "\r", Q = `
|
|
453
|
-
`, As = "\u2028", Ss = "\u2029";
|
|
454
|
-
function ys(e) {
|
|
455
|
-
const t = e;
|
|
456
|
-
let n = 0, r = 1, s = 1, a = 0;
|
|
457
|
-
const o = (p) => t[p] === Cs && t[p + 1] === Q, i = (p) => t[p] === Q, u = (p) => t[p] === Ss, m = (p) => t[p] === As, b = (p) => o(p) || i(p) || u(p) || m(p), T = () => n, N = () => r, A = () => s, D = () => a, C = (p) => o(p) || u(p) || m(p) ? Q : t[p], S = () => C(n), f = () => C(n + a);
|
|
458
|
-
function d() {
|
|
459
|
-
return a = 0, b(n) && (r++, s = 0), o(n) && n++, n++, s++, t[n];
|
|
460
|
-
}
|
|
461
|
-
function h() {
|
|
462
|
-
return o(n + a) && a++, a++, t[n + a];
|
|
463
|
-
}
|
|
464
|
-
function E() {
|
|
465
|
-
n = 0, r = 1, s = 1, a = 0;
|
|
466
|
-
}
|
|
467
|
-
function O(p = 0) {
|
|
468
|
-
a = p;
|
|
469
|
-
}
|
|
470
|
-
function v() {
|
|
471
|
-
const p = n + a;
|
|
472
|
-
for (; p !== n; )
|
|
473
|
-
d();
|
|
474
|
-
a = 0;
|
|
475
|
-
}
|
|
476
|
-
return {
|
|
477
|
-
index: T,
|
|
478
|
-
line: N,
|
|
479
|
-
column: A,
|
|
480
|
-
peekOffset: D,
|
|
481
|
-
charAt: C,
|
|
482
|
-
currentChar: S,
|
|
483
|
-
currentPeek: f,
|
|
484
|
-
next: d,
|
|
485
|
-
peek: h,
|
|
486
|
-
reset: E,
|
|
487
|
-
resetPeek: O,
|
|
488
|
-
skipToPeek: v
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
const me = void 0, Ps = ".", In = "'", Ds = "tokenizer";
|
|
492
|
-
function ks(e, t = {}) {
|
|
493
|
-
const n = t.location !== !1, r = ys(e), s = () => r.index(), a = () => bs(r.line(), r.column(), r.index()), o = a(), i = s(), u = {
|
|
494
|
-
currentType: 13,
|
|
495
|
-
offset: i,
|
|
496
|
-
startLoc: o,
|
|
497
|
-
endLoc: o,
|
|
498
|
-
lastType: 13,
|
|
499
|
-
lastOffset: i,
|
|
500
|
-
lastStartLoc: o,
|
|
501
|
-
lastEndLoc: o,
|
|
502
|
-
braceNest: 0,
|
|
503
|
-
inLinked: !1,
|
|
504
|
-
text: ""
|
|
505
|
-
}, m = () => u, { onError: b } = t;
|
|
506
|
-
function T(l, c, g, ...y) {
|
|
507
|
-
const x = m();
|
|
508
|
-
if (c.column += g, c.offset += g, b) {
|
|
509
|
-
const K = n ? Ft(x.startLoc, c) : null, U = we(l, K, {
|
|
510
|
-
domain: Ds,
|
|
511
|
-
args: y
|
|
512
|
-
});
|
|
513
|
-
b(U);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
function N(l, c, g) {
|
|
517
|
-
l.endLoc = a(), l.currentType = c;
|
|
518
|
-
const y = { type: c };
|
|
519
|
-
return n && (y.loc = Ft(l.startLoc, l.endLoc)), g != null && (y.value = g), y;
|
|
520
|
-
}
|
|
521
|
-
const A = (l) => N(
|
|
522
|
-
l,
|
|
523
|
-
13
|
|
524
|
-
/* TokenTypes.EOF */
|
|
525
|
-
);
|
|
526
|
-
function D(l, c) {
|
|
527
|
-
return l.currentChar() === c ? (l.next(), c) : (T(P.EXPECTED_TOKEN, a(), 0, c), "");
|
|
528
|
-
}
|
|
529
|
-
function C(l) {
|
|
530
|
-
let c = "";
|
|
531
|
-
for (; l.currentPeek() === ie || l.currentPeek() === Q; )
|
|
532
|
-
c += l.currentPeek(), l.peek();
|
|
533
|
-
return c;
|
|
534
|
-
}
|
|
535
|
-
function S(l) {
|
|
536
|
-
const c = C(l);
|
|
537
|
-
return l.skipToPeek(), c;
|
|
538
|
-
}
|
|
539
|
-
function f(l) {
|
|
540
|
-
if (l === me)
|
|
541
|
-
return !1;
|
|
542
|
-
const c = l.charCodeAt(0);
|
|
543
|
-
return c >= 97 && c <= 122 || // a-z
|
|
544
|
-
c >= 65 && c <= 90 || // A-Z
|
|
545
|
-
c === 95;
|
|
546
|
-
}
|
|
547
|
-
function d(l) {
|
|
548
|
-
if (l === me)
|
|
549
|
-
return !1;
|
|
550
|
-
const c = l.charCodeAt(0);
|
|
551
|
-
return c >= 48 && c <= 57;
|
|
552
|
-
}
|
|
553
|
-
function h(l, c) {
|
|
554
|
-
const { currentType: g } = c;
|
|
555
|
-
if (g !== 2)
|
|
556
|
-
return !1;
|
|
557
|
-
C(l);
|
|
558
|
-
const y = f(l.currentPeek());
|
|
559
|
-
return l.resetPeek(), y;
|
|
560
|
-
}
|
|
561
|
-
function E(l, c) {
|
|
562
|
-
const { currentType: g } = c;
|
|
563
|
-
if (g !== 2)
|
|
564
|
-
return !1;
|
|
565
|
-
C(l);
|
|
566
|
-
const y = l.currentPeek() === "-" ? l.peek() : l.currentPeek(), x = d(y);
|
|
567
|
-
return l.resetPeek(), x;
|
|
568
|
-
}
|
|
569
|
-
function O(l, c) {
|
|
570
|
-
const { currentType: g } = c;
|
|
571
|
-
if (g !== 2)
|
|
572
|
-
return !1;
|
|
573
|
-
C(l);
|
|
574
|
-
const y = l.currentPeek() === In;
|
|
575
|
-
return l.resetPeek(), y;
|
|
576
|
-
}
|
|
577
|
-
function v(l, c) {
|
|
578
|
-
const { currentType: g } = c;
|
|
579
|
-
if (g !== 7)
|
|
580
|
-
return !1;
|
|
581
|
-
C(l);
|
|
582
|
-
const y = l.currentPeek() === ".";
|
|
583
|
-
return l.resetPeek(), y;
|
|
584
|
-
}
|
|
585
|
-
function p(l, c) {
|
|
586
|
-
const { currentType: g } = c;
|
|
587
|
-
if (g !== 8)
|
|
588
|
-
return !1;
|
|
589
|
-
C(l);
|
|
590
|
-
const y = f(l.currentPeek());
|
|
591
|
-
return l.resetPeek(), y;
|
|
592
|
-
}
|
|
593
|
-
function k(l, c) {
|
|
594
|
-
const { currentType: g } = c;
|
|
595
|
-
if (!(g === 7 || g === 11))
|
|
596
|
-
return !1;
|
|
597
|
-
C(l);
|
|
598
|
-
const y = l.currentPeek() === ":";
|
|
599
|
-
return l.resetPeek(), y;
|
|
600
|
-
}
|
|
601
|
-
function w(l, c) {
|
|
602
|
-
const { currentType: g } = c;
|
|
603
|
-
if (g !== 9)
|
|
604
|
-
return !1;
|
|
605
|
-
const y = () => {
|
|
606
|
-
const K = l.currentPeek();
|
|
607
|
-
return K === "{" ? f(l.peek()) : K === "@" || K === "|" || K === ":" || K === "." || K === ie || !K ? !1 : K === Q ? (l.peek(), y()) : ae(l, !1);
|
|
608
|
-
}, x = y();
|
|
609
|
-
return l.resetPeek(), x;
|
|
610
|
-
}
|
|
611
|
-
function X(l) {
|
|
612
|
-
C(l);
|
|
613
|
-
const c = l.currentPeek() === "|";
|
|
614
|
-
return l.resetPeek(), c;
|
|
615
|
-
}
|
|
616
|
-
function ae(l, c = !0) {
|
|
617
|
-
const g = (x = !1, K = "") => {
|
|
618
|
-
const U = l.currentPeek();
|
|
619
|
-
return U === "{" || U === "@" || !U ? x : U === "|" ? !(K === ie || K === Q) : U === ie ? (l.peek(), g(!0, ie)) : U === Q ? (l.peek(), g(!0, Q)) : !0;
|
|
620
|
-
}, y = g();
|
|
621
|
-
return c && l.resetPeek(), y;
|
|
622
|
-
}
|
|
623
|
-
function Y(l, c) {
|
|
624
|
-
const g = l.currentChar();
|
|
625
|
-
return g === me ? me : c(g) ? (l.next(), g) : null;
|
|
626
|
-
}
|
|
627
|
-
function ye(l) {
|
|
628
|
-
const c = l.charCodeAt(0);
|
|
629
|
-
return c >= 97 && c <= 122 || // a-z
|
|
630
|
-
c >= 65 && c <= 90 || // A-Z
|
|
631
|
-
c >= 48 && c <= 57 || // 0-9
|
|
632
|
-
c === 95 || // _
|
|
633
|
-
c === 36;
|
|
634
|
-
}
|
|
635
|
-
function mt(l) {
|
|
636
|
-
return Y(l, ye);
|
|
637
|
-
}
|
|
638
|
-
function dt(l) {
|
|
639
|
-
const c = l.charCodeAt(0);
|
|
640
|
-
return c >= 97 && c <= 122 || // a-z
|
|
641
|
-
c >= 65 && c <= 90 || // A-Z
|
|
642
|
-
c >= 48 && c <= 57 || // 0-9
|
|
643
|
-
c === 95 || // _
|
|
644
|
-
c === 36 || // $
|
|
645
|
-
c === 45;
|
|
646
|
-
}
|
|
647
|
-
function Et(l) {
|
|
648
|
-
return Y(l, dt);
|
|
649
|
-
}
|
|
650
|
-
function pt(l) {
|
|
651
|
-
const c = l.charCodeAt(0);
|
|
652
|
-
return c >= 48 && c <= 57;
|
|
653
|
-
}
|
|
654
|
-
function gt(l) {
|
|
655
|
-
return Y(l, pt);
|
|
656
|
-
}
|
|
657
|
-
function Nt(l) {
|
|
658
|
-
const c = l.charCodeAt(0);
|
|
659
|
-
return c >= 48 && c <= 57 || // 0-9
|
|
660
|
-
c >= 65 && c <= 70 || // A-F
|
|
661
|
-
c >= 97 && c <= 102;
|
|
662
|
-
}
|
|
663
|
-
function _e(l) {
|
|
664
|
-
return Y(l, Nt);
|
|
665
|
-
}
|
|
666
|
-
function Ve(l) {
|
|
667
|
-
let c = "", g = "";
|
|
668
|
-
for (; c = gt(l); )
|
|
669
|
-
g += c;
|
|
670
|
-
return g;
|
|
671
|
-
}
|
|
672
|
-
function Tt(l) {
|
|
673
|
-
let c = "";
|
|
674
|
-
for (; ; ) {
|
|
675
|
-
const g = l.currentChar();
|
|
676
|
-
if (g === "{" || g === "}" || g === "@" || g === "|" || !g)
|
|
677
|
-
break;
|
|
678
|
-
if (g === ie || g === Q)
|
|
679
|
-
if (ae(l))
|
|
680
|
-
c += g, l.next();
|
|
681
|
-
else {
|
|
682
|
-
if (X(l))
|
|
683
|
-
break;
|
|
684
|
-
c += g, l.next();
|
|
685
|
-
}
|
|
686
|
-
else
|
|
687
|
-
c += g, l.next();
|
|
688
|
-
}
|
|
689
|
-
return c;
|
|
690
|
-
}
|
|
691
|
-
function bt(l) {
|
|
692
|
-
S(l);
|
|
693
|
-
let c = "", g = "";
|
|
694
|
-
for (; c = Et(l); )
|
|
695
|
-
g += c;
|
|
696
|
-
const y = l.currentChar();
|
|
697
|
-
if (y && y !== "}" && y !== me && y !== ie && y !== Q && y !== " ") {
|
|
698
|
-
const x = qe(l);
|
|
699
|
-
return T(P.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, g + x), g + x;
|
|
700
|
-
}
|
|
701
|
-
return l.currentChar() === me && T(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g;
|
|
702
|
-
}
|
|
703
|
-
function It(l) {
|
|
704
|
-
S(l);
|
|
705
|
-
let c = "";
|
|
706
|
-
return l.currentChar() === "-" ? (l.next(), c += `-${Ve(l)}`) : c += Ve(l), l.currentChar() === me && T(P.UNTERMINATED_CLOSING_BRACE, a(), 0), c;
|
|
707
|
-
}
|
|
708
|
-
function ht(l) {
|
|
709
|
-
return l !== In && l !== Q;
|
|
710
|
-
}
|
|
711
|
-
function dn(l) {
|
|
712
|
-
S(l), D(l, "'");
|
|
713
|
-
let c = "", g = "";
|
|
714
|
-
for (; c = Y(l, ht); )
|
|
715
|
-
c === "\\" ? g += Lt(l) : g += c;
|
|
716
|
-
const y = l.currentChar();
|
|
717
|
-
return y === Q || y === me ? (T(P.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), y === Q && (l.next(), D(l, "'")), g) : (D(l, "'"), g);
|
|
718
|
-
}
|
|
719
|
-
function Lt(l) {
|
|
720
|
-
const c = l.currentChar();
|
|
721
|
-
switch (c) {
|
|
722
|
-
case "\\":
|
|
723
|
-
case "'":
|
|
724
|
-
return l.next(), `\\${c}`;
|
|
725
|
-
case "u":
|
|
726
|
-
return Qe(l, c, 4);
|
|
727
|
-
case "U":
|
|
728
|
-
return Qe(l, c, 6);
|
|
729
|
-
default:
|
|
730
|
-
return T(P.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, c), "";
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
function Qe(l, c, g) {
|
|
734
|
-
D(l, c);
|
|
735
|
-
let y = "";
|
|
736
|
-
for (let x = 0; x < g; x++) {
|
|
737
|
-
const K = _e(l);
|
|
738
|
-
if (!K) {
|
|
739
|
-
T(P.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${c}${y}${l.currentChar()}`);
|
|
740
|
-
break;
|
|
741
|
-
}
|
|
742
|
-
y += K;
|
|
743
|
-
}
|
|
744
|
-
return `\\${c}${y}`;
|
|
745
|
-
}
|
|
746
|
-
function Ot(l) {
|
|
747
|
-
return l !== "{" && l !== "}" && l !== ie && l !== Q;
|
|
748
|
-
}
|
|
749
|
-
function qe(l) {
|
|
750
|
-
S(l);
|
|
751
|
-
let c = "", g = "";
|
|
752
|
-
for (; c = Y(l, Ot); )
|
|
753
|
-
g += c;
|
|
754
|
-
return g;
|
|
755
|
-
}
|
|
756
|
-
function vt(l) {
|
|
757
|
-
let c = "", g = "";
|
|
758
|
-
for (; c = mt(l); )
|
|
759
|
-
g += c;
|
|
760
|
-
return g;
|
|
761
|
-
}
|
|
762
|
-
function Ct(l) {
|
|
763
|
-
const c = (g) => {
|
|
764
|
-
const y = l.currentChar();
|
|
765
|
-
return y === "{" || y === "@" || y === "|" || y === "(" || y === ")" || !y || y === ie ? g : (g += y, l.next(), c(g));
|
|
766
|
-
};
|
|
767
|
-
return c("");
|
|
768
|
-
}
|
|
769
|
-
function $e(l) {
|
|
770
|
-
S(l);
|
|
771
|
-
const c = D(
|
|
772
|
-
l,
|
|
773
|
-
"|"
|
|
774
|
-
/* TokenChars.Pipe */
|
|
775
|
-
);
|
|
776
|
-
return S(l), c;
|
|
777
|
-
}
|
|
778
|
-
function We(l, c) {
|
|
779
|
-
let g = null;
|
|
780
|
-
switch (l.currentChar()) {
|
|
781
|
-
case "{":
|
|
782
|
-
return c.braceNest >= 1 && T(P.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), l.next(), g = N(
|
|
783
|
-
c,
|
|
784
|
-
2,
|
|
785
|
-
"{"
|
|
786
|
-
/* TokenChars.BraceLeft */
|
|
787
|
-
), S(l), c.braceNest++, g;
|
|
788
|
-
case "}":
|
|
789
|
-
return c.braceNest > 0 && c.currentType === 2 && T(P.EMPTY_PLACEHOLDER, a(), 0), l.next(), g = N(
|
|
790
|
-
c,
|
|
791
|
-
3,
|
|
792
|
-
"}"
|
|
793
|
-
/* TokenChars.BraceRight */
|
|
794
|
-
), c.braceNest--, c.braceNest > 0 && S(l), c.inLinked && c.braceNest === 0 && (c.inLinked = !1), g;
|
|
795
|
-
case "@":
|
|
796
|
-
return c.braceNest > 0 && T(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g = Ie(l, c) || A(c), c.braceNest = 0, g;
|
|
797
|
-
default: {
|
|
798
|
-
let x = !0, K = !0, U = !0;
|
|
799
|
-
if (X(l))
|
|
800
|
-
return c.braceNest > 0 && T(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g = N(c, 1, $e(l)), c.braceNest = 0, c.inLinked = !1, g;
|
|
801
|
-
if (c.braceNest > 0 && (c.currentType === 4 || c.currentType === 5 || c.currentType === 6))
|
|
802
|
-
return T(P.UNTERMINATED_CLOSING_BRACE, a(), 0), c.braceNest = 0, Ge(l, c);
|
|
803
|
-
if (x = h(l, c))
|
|
804
|
-
return g = N(c, 4, bt(l)), S(l), g;
|
|
805
|
-
if (K = E(l, c))
|
|
806
|
-
return g = N(c, 5, It(l)), S(l), g;
|
|
807
|
-
if (U = O(l, c))
|
|
808
|
-
return g = N(c, 6, dn(l)), S(l), g;
|
|
809
|
-
if (!x && !K && !U)
|
|
810
|
-
return g = N(c, 12, qe(l)), T(P.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, g.value), S(l), g;
|
|
811
|
-
break;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
return g;
|
|
815
|
-
}
|
|
816
|
-
function Ie(l, c) {
|
|
817
|
-
const { currentType: g } = c;
|
|
818
|
-
let y = null;
|
|
819
|
-
const x = l.currentChar();
|
|
820
|
-
switch ((g === 7 || g === 8 || g === 11 || g === 9) && (x === Q || x === ie) && T(P.INVALID_LINKED_FORMAT, a(), 0), x) {
|
|
821
|
-
case "@":
|
|
822
|
-
return l.next(), y = N(
|
|
823
|
-
c,
|
|
824
|
-
7,
|
|
825
|
-
"@"
|
|
826
|
-
/* TokenChars.LinkedAlias */
|
|
827
|
-
), c.inLinked = !0, y;
|
|
828
|
-
case ".":
|
|
829
|
-
return S(l), l.next(), N(
|
|
830
|
-
c,
|
|
831
|
-
8,
|
|
832
|
-
"."
|
|
833
|
-
/* TokenChars.LinkedDot */
|
|
834
|
-
);
|
|
835
|
-
case ":":
|
|
836
|
-
return S(l), l.next(), N(
|
|
837
|
-
c,
|
|
838
|
-
9,
|
|
839
|
-
":"
|
|
840
|
-
/* TokenChars.LinkedDelimiter */
|
|
841
|
-
);
|
|
842
|
-
default:
|
|
843
|
-
return X(l) ? (y = N(c, 1, $e(l)), c.braceNest = 0, c.inLinked = !1, y) : v(l, c) || k(l, c) ? (S(l), Ie(l, c)) : p(l, c) ? (S(l), N(c, 11, vt(l))) : w(l, c) ? (S(l), x === "{" ? We(l, c) || y : N(c, 10, Ct(l))) : (g === 7 && T(P.INVALID_LINKED_FORMAT, a(), 0), c.braceNest = 0, c.inLinked = !1, Ge(l, c));
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
function Ge(l, c) {
|
|
847
|
-
let g = {
|
|
848
|
-
type: 13
|
|
849
|
-
/* TokenTypes.EOF */
|
|
850
|
-
};
|
|
851
|
-
if (c.braceNest > 0)
|
|
852
|
-
return We(l, c) || A(c);
|
|
853
|
-
if (c.inLinked)
|
|
854
|
-
return Ie(l, c) || A(c);
|
|
855
|
-
switch (l.currentChar()) {
|
|
856
|
-
case "{":
|
|
857
|
-
return We(l, c) || A(c);
|
|
858
|
-
case "}":
|
|
859
|
-
return T(P.UNBALANCED_CLOSING_BRACE, a(), 0), l.next(), N(
|
|
860
|
-
c,
|
|
861
|
-
3,
|
|
862
|
-
"}"
|
|
863
|
-
/* TokenChars.BraceRight */
|
|
864
|
-
);
|
|
865
|
-
case "@":
|
|
866
|
-
return Ie(l, c) || A(c);
|
|
867
|
-
default: {
|
|
868
|
-
if (X(l))
|
|
869
|
-
return g = N(c, 1, $e(l)), c.braceNest = 0, c.inLinked = !1, g;
|
|
870
|
-
if (ae(l))
|
|
871
|
-
return N(c, 0, Tt(l));
|
|
872
|
-
break;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
return g;
|
|
876
|
-
}
|
|
877
|
-
function At() {
|
|
878
|
-
const { currentType: l, offset: c, startLoc: g, endLoc: y } = u;
|
|
879
|
-
return u.lastType = l, u.lastOffset = c, u.lastStartLoc = g, u.lastEndLoc = y, u.offset = s(), u.startLoc = a(), r.currentChar() === me ? N(
|
|
880
|
-
u,
|
|
881
|
-
13
|
|
882
|
-
/* TokenTypes.EOF */
|
|
883
|
-
) : Ge(r, u);
|
|
884
|
-
}
|
|
885
|
-
return {
|
|
886
|
-
nextToken: At,
|
|
887
|
-
currentOffset: s,
|
|
888
|
-
currentPosition: a,
|
|
889
|
-
context: m
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
const Rs = "parser", Ms = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
|
|
893
|
-
function Fs(e, t, n) {
|
|
894
|
-
switch (e) {
|
|
895
|
-
case "\\\\":
|
|
896
|
-
return "\\";
|
|
897
|
-
// eslint-disable-next-line no-useless-escape
|
|
898
|
-
case "\\'":
|
|
899
|
-
return "'";
|
|
900
|
-
default: {
|
|
901
|
-
const r = parseInt(t || n, 16);
|
|
902
|
-
return r <= 55295 || r >= 57344 ? String.fromCodePoint(r) : "�";
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
function Us(e = {}) {
|
|
907
|
-
const t = e.location !== !1, { onError: n } = e;
|
|
908
|
-
function r(f, d, h, E, ...O) {
|
|
909
|
-
const v = f.currentPosition();
|
|
910
|
-
if (v.offset += E, v.column += E, n) {
|
|
911
|
-
const p = t ? Ft(h, v) : null, k = we(d, p, {
|
|
912
|
-
domain: Rs,
|
|
913
|
-
args: O
|
|
914
|
-
});
|
|
915
|
-
n(k);
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
function s(f, d, h) {
|
|
919
|
-
const E = { type: f };
|
|
920
|
-
return t && (E.start = d, E.end = d, E.loc = { start: h, end: h }), E;
|
|
921
|
-
}
|
|
922
|
-
function a(f, d, h, E) {
|
|
923
|
-
t && (f.end = d, f.loc && (f.loc.end = h));
|
|
924
|
-
}
|
|
925
|
-
function o(f, d) {
|
|
926
|
-
const h = f.context(), E = s(3, h.offset, h.startLoc);
|
|
927
|
-
return E.value = d, a(E, f.currentOffset(), f.currentPosition()), E;
|
|
928
|
-
}
|
|
929
|
-
function i(f, d) {
|
|
930
|
-
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(5, E, O);
|
|
931
|
-
return v.index = parseInt(d, 10), f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
932
|
-
}
|
|
933
|
-
function u(f, d) {
|
|
934
|
-
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(4, E, O);
|
|
935
|
-
return v.key = d, f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
936
|
-
}
|
|
937
|
-
function m(f, d) {
|
|
938
|
-
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(9, E, O);
|
|
939
|
-
return v.value = d.replace(Ms, Fs), f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
940
|
-
}
|
|
941
|
-
function b(f) {
|
|
942
|
-
const d = f.nextToken(), h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(8, E, O);
|
|
943
|
-
return d.type !== 11 ? (r(f, P.UNEXPECTED_EMPTY_LINKED_MODIFIER, h.lastStartLoc, 0), v.value = "", a(v, E, O), {
|
|
944
|
-
nextConsumeToken: d,
|
|
945
|
-
node: v
|
|
946
|
-
}) : (d.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ce(d)), v.value = d.value || "", a(v, f.currentOffset(), f.currentPosition()), {
|
|
947
|
-
node: v
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
function T(f, d) {
|
|
951
|
-
const h = f.context(), E = s(7, h.offset, h.startLoc);
|
|
952
|
-
return E.value = d, a(E, f.currentOffset(), f.currentPosition()), E;
|
|
953
|
-
}
|
|
954
|
-
function N(f) {
|
|
955
|
-
const d = f.context(), h = s(6, d.offset, d.startLoc);
|
|
956
|
-
let E = f.nextToken();
|
|
957
|
-
if (E.type === 8) {
|
|
958
|
-
const O = b(f);
|
|
959
|
-
h.modifier = O.node, E = O.nextConsumeToken || f.nextToken();
|
|
960
|
-
}
|
|
961
|
-
switch (E.type !== 9 && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(E)), E = f.nextToken(), E.type === 2 && (E = f.nextToken()), E.type) {
|
|
962
|
-
case 10:
|
|
963
|
-
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(E)), h.key = T(f, E.value || "");
|
|
964
|
-
break;
|
|
965
|
-
case 4:
|
|
966
|
-
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(E)), h.key = u(f, E.value || "");
|
|
967
|
-
break;
|
|
968
|
-
case 5:
|
|
969
|
-
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(E)), h.key = i(f, E.value || "");
|
|
970
|
-
break;
|
|
971
|
-
case 6:
|
|
972
|
-
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(E)), h.key = m(f, E.value || "");
|
|
973
|
-
break;
|
|
974
|
-
default: {
|
|
975
|
-
r(f, P.UNEXPECTED_EMPTY_LINKED_KEY, d.lastStartLoc, 0);
|
|
976
|
-
const O = f.context(), v = s(7, O.offset, O.startLoc);
|
|
977
|
-
return v.value = "", a(v, O.offset, O.startLoc), h.key = v, a(h, O.offset, O.startLoc), {
|
|
978
|
-
nextConsumeToken: E,
|
|
979
|
-
node: h
|
|
980
|
-
};
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
return a(h, f.currentOffset(), f.currentPosition()), {
|
|
984
|
-
node: h
|
|
985
|
-
};
|
|
986
|
-
}
|
|
987
|
-
function A(f) {
|
|
988
|
-
const d = f.context(), h = d.currentType === 1 ? f.currentOffset() : d.offset, E = d.currentType === 1 ? d.endLoc : d.startLoc, O = s(2, h, E);
|
|
989
|
-
O.items = [];
|
|
990
|
-
let v = null;
|
|
991
|
-
do {
|
|
992
|
-
const w = v || f.nextToken();
|
|
993
|
-
switch (v = null, w.type) {
|
|
994
|
-
case 0:
|
|
995
|
-
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(w)), O.items.push(o(f, w.value || ""));
|
|
996
|
-
break;
|
|
997
|
-
case 5:
|
|
998
|
-
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(w)), O.items.push(i(f, w.value || ""));
|
|
999
|
-
break;
|
|
1000
|
-
case 4:
|
|
1001
|
-
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(w)), O.items.push(u(f, w.value || ""));
|
|
1002
|
-
break;
|
|
1003
|
-
case 6:
|
|
1004
|
-
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(w)), O.items.push(m(f, w.value || ""));
|
|
1005
|
-
break;
|
|
1006
|
-
case 7: {
|
|
1007
|
-
const X = N(f);
|
|
1008
|
-
O.items.push(X.node), v = X.nextConsumeToken || null;
|
|
1009
|
-
break;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
} while (d.currentType !== 13 && d.currentType !== 1);
|
|
1013
|
-
const p = d.currentType === 1 ? d.lastOffset : f.currentOffset(), k = d.currentType === 1 ? d.lastEndLoc : f.currentPosition();
|
|
1014
|
-
return a(O, p, k), O;
|
|
1015
|
-
}
|
|
1016
|
-
function D(f, d, h, E) {
|
|
1017
|
-
const O = f.context();
|
|
1018
|
-
let v = E.items.length === 0;
|
|
1019
|
-
const p = s(1, d, h);
|
|
1020
|
-
p.cases = [], p.cases.push(E);
|
|
1021
|
-
do {
|
|
1022
|
-
const k = A(f);
|
|
1023
|
-
v || (v = k.items.length === 0), p.cases.push(k);
|
|
1024
|
-
} while (O.currentType !== 13);
|
|
1025
|
-
return v && r(f, P.MUST_HAVE_MESSAGES_IN_PLURAL, h, 0), a(p, f.currentOffset(), f.currentPosition()), p;
|
|
1026
|
-
}
|
|
1027
|
-
function C(f) {
|
|
1028
|
-
const d = f.context(), { offset: h, startLoc: E } = d, O = A(f);
|
|
1029
|
-
return d.currentType === 13 ? O : D(f, h, E, O);
|
|
1030
|
-
}
|
|
1031
|
-
function S(f) {
|
|
1032
|
-
const d = ks(f, J({}, e)), h = d.context(), E = s(0, h.offset, h.startLoc);
|
|
1033
|
-
return t && E.loc && (E.loc.source = f), E.body = C(d), e.onCacheKey && (E.cacheKey = e.onCacheKey(f)), h.currentType !== 13 && r(d, P.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, f[h.offset] || ""), a(E, d.currentOffset(), d.currentPosition()), E;
|
|
1034
|
-
}
|
|
1035
|
-
return { parse: S };
|
|
1036
|
-
}
|
|
1037
|
-
function ce(e) {
|
|
1038
|
-
if (e.type === 13)
|
|
1039
|
-
return "EOF";
|
|
1040
|
-
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
|
|
1041
|
-
return t.length > 10 ? t.slice(0, 9) + "…" : t;
|
|
1042
|
-
}
|
|
1043
|
-
function ws(e, t = {}) {
|
|
1044
|
-
const n = {
|
|
1045
|
-
ast: e,
|
|
1046
|
-
helpers: /* @__PURE__ */ new Set()
|
|
1047
|
-
};
|
|
1048
|
-
return { context: () => n, helper: (a) => (n.helpers.add(a), a) };
|
|
1049
|
-
}
|
|
1050
|
-
function hn(e, t) {
|
|
1051
|
-
for (let n = 0; n < e.length; n++)
|
|
1052
|
-
sn(e[n], t);
|
|
1053
|
-
}
|
|
1054
|
-
function sn(e, t) {
|
|
1055
|
-
switch (e.type) {
|
|
1056
|
-
case 1:
|
|
1057
|
-
hn(e.cases, t), t.helper(
|
|
1058
|
-
"plural"
|
|
1059
|
-
/* HelperNameMap.PLURAL */
|
|
1060
|
-
);
|
|
1061
|
-
break;
|
|
1062
|
-
case 2:
|
|
1063
|
-
hn(e.items, t);
|
|
1064
|
-
break;
|
|
1065
|
-
case 6: {
|
|
1066
|
-
sn(e.key, t), t.helper(
|
|
1067
|
-
"linked"
|
|
1068
|
-
/* HelperNameMap.LINKED */
|
|
1069
|
-
), t.helper(
|
|
1070
|
-
"type"
|
|
1071
|
-
/* HelperNameMap.TYPE */
|
|
1072
|
-
);
|
|
1073
|
-
break;
|
|
1074
|
-
}
|
|
1075
|
-
case 5:
|
|
1076
|
-
t.helper(
|
|
1077
|
-
"interpolate"
|
|
1078
|
-
/* HelperNameMap.INTERPOLATE */
|
|
1079
|
-
), t.helper(
|
|
1080
|
-
"list"
|
|
1081
|
-
/* HelperNameMap.LIST */
|
|
1082
|
-
);
|
|
1083
|
-
break;
|
|
1084
|
-
case 4:
|
|
1085
|
-
t.helper(
|
|
1086
|
-
"interpolate"
|
|
1087
|
-
/* HelperNameMap.INTERPOLATE */
|
|
1088
|
-
), t.helper(
|
|
1089
|
-
"named"
|
|
1090
|
-
/* HelperNameMap.NAMED */
|
|
1091
|
-
);
|
|
1092
|
-
break;
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
function Vs(e, t = {}) {
|
|
1096
|
-
const n = ws(e);
|
|
1097
|
-
n.helper(
|
|
1098
|
-
"normalize"
|
|
1099
|
-
/* HelperNameMap.NORMALIZE */
|
|
1100
|
-
), e.body && sn(e.body, n);
|
|
1101
|
-
const r = n.context();
|
|
1102
|
-
e.helpers = Array.from(r.helpers);
|
|
1103
|
-
}
|
|
1104
|
-
function $s(e) {
|
|
1105
|
-
const t = e.body;
|
|
1106
|
-
return t.type === 2 ? Ln(t) : t.cases.forEach((n) => Ln(n)), e;
|
|
1107
|
-
}
|
|
1108
|
-
function Ln(e) {
|
|
1109
|
-
if (e.items.length === 1) {
|
|
1110
|
-
const t = e.items[0];
|
|
1111
|
-
(t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
|
|
1112
|
-
} else {
|
|
1113
|
-
const t = [];
|
|
1114
|
-
for (let n = 0; n < e.items.length; n++) {
|
|
1115
|
-
const r = e.items[n];
|
|
1116
|
-
if (!(r.type === 3 || r.type === 9) || r.value == null)
|
|
1117
|
-
break;
|
|
1118
|
-
t.push(r.value);
|
|
1119
|
-
}
|
|
1120
|
-
if (t.length === e.items.length) {
|
|
1121
|
-
e.static = nn(t);
|
|
1122
|
-
for (let n = 0; n < e.items.length; n++) {
|
|
1123
|
-
const r = e.items[n];
|
|
1124
|
-
(r.type === 3 || r.type === 9) && delete r.value;
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
const Ws = "minifier";
|
|
1130
|
-
function ke(e) {
|
|
1131
|
-
switch (e.t = e.type, e.type) {
|
|
1132
|
-
case 0: {
|
|
1133
|
-
const t = e;
|
|
1134
|
-
ke(t.body), t.b = t.body, delete t.body;
|
|
1135
|
-
break;
|
|
1136
|
-
}
|
|
1137
|
-
case 1: {
|
|
1138
|
-
const t = e, n = t.cases;
|
|
1139
|
-
for (let r = 0; r < n.length; r++)
|
|
1140
|
-
ke(n[r]);
|
|
1141
|
-
t.c = n, delete t.cases;
|
|
1142
|
-
break;
|
|
1143
|
-
}
|
|
1144
|
-
case 2: {
|
|
1145
|
-
const t = e, n = t.items;
|
|
1146
|
-
for (let r = 0; r < n.length; r++)
|
|
1147
|
-
ke(n[r]);
|
|
1148
|
-
t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
|
|
1149
|
-
break;
|
|
1150
|
-
}
|
|
1151
|
-
case 3:
|
|
1152
|
-
case 9:
|
|
1153
|
-
case 8:
|
|
1154
|
-
case 7: {
|
|
1155
|
-
const t = e;
|
|
1156
|
-
t.value && (t.v = t.value, delete t.value);
|
|
1157
|
-
break;
|
|
1158
|
-
}
|
|
1159
|
-
case 6: {
|
|
1160
|
-
const t = e;
|
|
1161
|
-
ke(t.key), t.k = t.key, delete t.key, t.modifier && (ke(t.modifier), t.m = t.modifier, delete t.modifier);
|
|
1162
|
-
break;
|
|
1163
|
-
}
|
|
1164
|
-
case 5: {
|
|
1165
|
-
const t = e;
|
|
1166
|
-
t.i = t.index, delete t.index;
|
|
1167
|
-
break;
|
|
1168
|
-
}
|
|
1169
|
-
case 4: {
|
|
1170
|
-
const t = e;
|
|
1171
|
-
t.k = t.key, delete t.key;
|
|
1172
|
-
break;
|
|
1173
|
-
}
|
|
1174
|
-
default:
|
|
1175
|
-
if (process.env.NODE_ENV !== "production")
|
|
1176
|
-
throw we(P.UNHANDLED_MINIFIER_NODE_TYPE, null, {
|
|
1177
|
-
domain: Ws,
|
|
1178
|
-
args: [e.type]
|
|
1179
|
-
});
|
|
1180
|
-
}
|
|
1181
|
-
delete e.type;
|
|
1182
|
-
}
|
|
1183
|
-
const Gs = "parser";
|
|
1184
|
-
function xs(e, t) {
|
|
1185
|
-
const { filename: n, breakLineCode: r, needIndent: s } = t, a = t.location !== !1, o = {
|
|
1186
|
-
filename: n,
|
|
1187
|
-
code: "",
|
|
1188
|
-
column: 1,
|
|
1189
|
-
line: 1,
|
|
1190
|
-
offset: 0,
|
|
1191
|
-
map: void 0,
|
|
1192
|
-
breakLineCode: r,
|
|
1193
|
-
needIndent: s,
|
|
1194
|
-
indentLevel: 0
|
|
1195
|
-
};
|
|
1196
|
-
a && e.loc && (o.source = e.loc.source);
|
|
1197
|
-
const i = () => o;
|
|
1198
|
-
function u(C, S) {
|
|
1199
|
-
o.code += C;
|
|
1200
|
-
}
|
|
1201
|
-
function m(C, S = !0) {
|
|
1202
|
-
const f = S ? r : "";
|
|
1203
|
-
u(s ? f + " ".repeat(C) : f);
|
|
1204
|
-
}
|
|
1205
|
-
function b(C = !0) {
|
|
1206
|
-
const S = ++o.indentLevel;
|
|
1207
|
-
C && m(S);
|
|
1208
|
-
}
|
|
1209
|
-
function T(C = !0) {
|
|
1210
|
-
const S = --o.indentLevel;
|
|
1211
|
-
C && m(S);
|
|
1212
|
-
}
|
|
1213
|
-
function N() {
|
|
1214
|
-
m(o.indentLevel);
|
|
1215
|
-
}
|
|
1216
|
-
return {
|
|
1217
|
-
context: i,
|
|
1218
|
-
push: u,
|
|
1219
|
-
indent: b,
|
|
1220
|
-
deindent: T,
|
|
1221
|
-
newline: N,
|
|
1222
|
-
helper: (C) => `_${C}`,
|
|
1223
|
-
needIndent: () => o.needIndent
|
|
1224
|
-
};
|
|
1225
|
-
}
|
|
1226
|
-
function Hs(e, t) {
|
|
1227
|
-
const { helper: n } = e;
|
|
1228
|
-
e.push(`${n(
|
|
1229
|
-
"linked"
|
|
1230
|
-
/* HelperNameMap.LINKED */
|
|
1231
|
-
)}(`), Fe(e, t.key), t.modifier ? (e.push(", "), Fe(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
|
|
1232
|
-
}
|
|
1233
|
-
function Ys(e, t) {
|
|
1234
|
-
const { helper: n, needIndent: r } = e;
|
|
1235
|
-
e.push(`${n(
|
|
1236
|
-
"normalize"
|
|
1237
|
-
/* HelperNameMap.NORMALIZE */
|
|
1238
|
-
)}([`), e.indent(r());
|
|
1239
|
-
const s = t.items.length;
|
|
1240
|
-
for (let a = 0; a < s && (Fe(e, t.items[a]), a !== s - 1); a++)
|
|
1241
|
-
e.push(", ");
|
|
1242
|
-
e.deindent(r()), e.push("])");
|
|
1243
|
-
}
|
|
1244
|
-
function Ks(e, t) {
|
|
1245
|
-
const { helper: n, needIndent: r } = e;
|
|
1246
|
-
if (t.cases.length > 1) {
|
|
1247
|
-
e.push(`${n(
|
|
1248
|
-
"plural"
|
|
1249
|
-
/* HelperNameMap.PLURAL */
|
|
1250
|
-
)}([`), e.indent(r());
|
|
1251
|
-
const s = t.cases.length;
|
|
1252
|
-
for (let a = 0; a < s && (Fe(e, t.cases[a]), a !== s - 1); a++)
|
|
1253
|
-
e.push(", ");
|
|
1254
|
-
e.deindent(r()), e.push("])");
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
function Bs(e, t) {
|
|
1258
|
-
t.body ? Fe(e, t.body) : e.push("null");
|
|
1259
|
-
}
|
|
1260
|
-
function Fe(e, t) {
|
|
1261
|
-
const { helper: n } = e;
|
|
1262
|
-
switch (t.type) {
|
|
1263
|
-
case 0:
|
|
1264
|
-
Bs(e, t);
|
|
1265
|
-
break;
|
|
1266
|
-
case 1:
|
|
1267
|
-
Ks(e, t);
|
|
1268
|
-
break;
|
|
1269
|
-
case 2:
|
|
1270
|
-
Ys(e, t);
|
|
1271
|
-
break;
|
|
1272
|
-
case 6:
|
|
1273
|
-
Hs(e, t);
|
|
1274
|
-
break;
|
|
1275
|
-
case 8:
|
|
1276
|
-
e.push(JSON.stringify(t.value), t);
|
|
1277
|
-
break;
|
|
1278
|
-
case 7:
|
|
1279
|
-
e.push(JSON.stringify(t.value), t);
|
|
1280
|
-
break;
|
|
1281
|
-
case 5:
|
|
1282
|
-
e.push(`${n(
|
|
1283
|
-
"interpolate"
|
|
1284
|
-
/* HelperNameMap.INTERPOLATE */
|
|
1285
|
-
)}(${n(
|
|
1286
|
-
"list"
|
|
1287
|
-
/* HelperNameMap.LIST */
|
|
1288
|
-
)}(${t.index}))`, t);
|
|
1289
|
-
break;
|
|
1290
|
-
case 4:
|
|
1291
|
-
e.push(`${n(
|
|
1292
|
-
"interpolate"
|
|
1293
|
-
/* HelperNameMap.INTERPOLATE */
|
|
1294
|
-
)}(${n(
|
|
1295
|
-
"named"
|
|
1296
|
-
/* HelperNameMap.NAMED */
|
|
1297
|
-
)}(${JSON.stringify(t.key)}))`, t);
|
|
1298
|
-
break;
|
|
1299
|
-
case 9:
|
|
1300
|
-
e.push(JSON.stringify(t.value), t);
|
|
1301
|
-
break;
|
|
1302
|
-
case 3:
|
|
1303
|
-
e.push(JSON.stringify(t.value), t);
|
|
1304
|
-
break;
|
|
1305
|
-
default:
|
|
1306
|
-
if (process.env.NODE_ENV !== "production")
|
|
1307
|
-
throw we(P.UNHANDLED_CODEGEN_NODE_TYPE, null, {
|
|
1308
|
-
domain: Gs,
|
|
1309
|
-
args: [t.type]
|
|
1310
|
-
});
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
const js = (e, t = {}) => {
|
|
1314
|
-
const n = L(t.mode) ? t.mode : "normal", r = L(t.filename) ? t.filename : "message.intl";
|
|
1315
|
-
t.sourceMap;
|
|
1316
|
-
const s = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
1317
|
-
`, a = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], i = xs(e, {
|
|
1318
|
-
filename: r,
|
|
1319
|
-
breakLineCode: s,
|
|
1320
|
-
needIndent: a
|
|
1321
|
-
});
|
|
1322
|
-
i.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(a), o.length > 0 && (i.push(`const { ${nn(o.map((b) => `${b}: _${b}`), ", ")} } = ctx`), i.newline()), i.push("return "), Fe(i, e), i.deindent(a), i.push("}"), delete e.helpers;
|
|
1323
|
-
const { code: u, map: m } = i.context();
|
|
1324
|
-
return {
|
|
1325
|
-
ast: e,
|
|
1326
|
-
code: u,
|
|
1327
|
-
map: m ? m.toJSON() : void 0
|
|
1328
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1329
|
-
};
|
|
1330
|
-
};
|
|
1331
|
-
function Xs(e, t = {}) {
|
|
1332
|
-
const n = J({}, t), r = !!n.jit, s = !!n.minify, a = n.optimize == null ? !0 : n.optimize, i = Us(n).parse(e);
|
|
1333
|
-
return r ? (a && $s(i), s && ke(i), { ast: i, code: "" }) : (Vs(i, n), js(i, n));
|
|
1334
|
-
}
|
|
1335
|
-
function Js() {
|
|
1336
|
-
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (ve().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (ve().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
1337
|
-
}
|
|
1338
|
-
function se(e) {
|
|
1339
|
-
return M(e) && an(e) === 0 && (oe(e, "b") || oe(e, "body"));
|
|
1340
|
-
}
|
|
1341
|
-
const cr = ["b", "body"];
|
|
1342
|
-
function Qs(e) {
|
|
1343
|
-
return Te(e, cr);
|
|
1344
|
-
}
|
|
1345
|
-
const ur = ["c", "cases"];
|
|
1346
|
-
function qs(e) {
|
|
1347
|
-
return Te(e, ur, []);
|
|
1348
|
-
}
|
|
1349
|
-
const fr = ["s", "static"];
|
|
1350
|
-
function Zs(e) {
|
|
1351
|
-
return Te(e, fr);
|
|
1352
|
-
}
|
|
1353
|
-
const _r = ["i", "items"];
|
|
1354
|
-
function zs(e) {
|
|
1355
|
-
return Te(e, _r, []);
|
|
1356
|
-
}
|
|
1357
|
-
const mr = ["t", "type"];
|
|
1358
|
-
function an(e) {
|
|
1359
|
-
return Te(e, mr);
|
|
1360
|
-
}
|
|
1361
|
-
const dr = ["v", "value"];
|
|
1362
|
-
function et(e, t) {
|
|
1363
|
-
const n = Te(e, dr);
|
|
1364
|
-
if (n != null)
|
|
1365
|
-
return n;
|
|
1366
|
-
throw Ye(t);
|
|
1367
|
-
}
|
|
1368
|
-
const Er = ["m", "modifier"];
|
|
1369
|
-
function ea(e) {
|
|
1370
|
-
return Te(e, Er);
|
|
1371
|
-
}
|
|
1372
|
-
const pr = ["k", "key"];
|
|
1373
|
-
function ta(e) {
|
|
1374
|
-
const t = Te(e, pr);
|
|
1375
|
-
if (t)
|
|
1376
|
-
return t;
|
|
1377
|
-
throw Ye(
|
|
1378
|
-
6
|
|
1379
|
-
/* NodeTypes.Linked */
|
|
1380
|
-
);
|
|
1381
|
-
}
|
|
1382
|
-
function Te(e, t, n) {
|
|
1383
|
-
for (let r = 0; r < t.length; r++) {
|
|
1384
|
-
const s = t[r];
|
|
1385
|
-
if (oe(e, s) && e[s] != null)
|
|
1386
|
-
return e[s];
|
|
1387
|
-
}
|
|
1388
|
-
return n;
|
|
1389
|
-
}
|
|
1390
|
-
const gr = [
|
|
1391
|
-
...cr,
|
|
1392
|
-
...ur,
|
|
1393
|
-
...fr,
|
|
1394
|
-
..._r,
|
|
1395
|
-
...pr,
|
|
1396
|
-
...Er,
|
|
1397
|
-
...dr,
|
|
1398
|
-
...mr
|
|
1399
|
-
];
|
|
1400
|
-
function Ye(e) {
|
|
1401
|
-
return new Error(`unhandled node type: ${e}`);
|
|
1402
|
-
}
|
|
1403
|
-
function Pt(e) {
|
|
1404
|
-
return (n) => na(n, e);
|
|
1405
|
-
}
|
|
1406
|
-
function na(e, t) {
|
|
1407
|
-
const n = Qs(t);
|
|
1408
|
-
if (n == null)
|
|
1409
|
-
throw Ye(
|
|
1410
|
-
0
|
|
1411
|
-
/* NodeTypes.Resource */
|
|
1412
|
-
);
|
|
1413
|
-
if (an(n) === 1) {
|
|
1414
|
-
const a = qs(n);
|
|
1415
|
-
return e.plural(a.reduce((o, i) => [
|
|
1416
|
-
...o,
|
|
1417
|
-
On(e, i)
|
|
1418
|
-
], []));
|
|
1419
|
-
} else
|
|
1420
|
-
return On(e, n);
|
|
1421
|
-
}
|
|
1422
|
-
function On(e, t) {
|
|
1423
|
-
const n = Zs(t);
|
|
1424
|
-
if (n != null)
|
|
1425
|
-
return e.type === "text" ? n : e.normalize([n]);
|
|
1426
|
-
{
|
|
1427
|
-
const r = zs(t).reduce((s, a) => [...s, Ut(e, a)], []);
|
|
1428
|
-
return e.normalize(r);
|
|
1429
|
-
}
|
|
1430
|
-
}
|
|
1431
|
-
function Ut(e, t) {
|
|
1432
|
-
const n = an(t);
|
|
1433
|
-
switch (n) {
|
|
1434
|
-
case 3:
|
|
1435
|
-
return et(t, n);
|
|
1436
|
-
case 9:
|
|
1437
|
-
return et(t, n);
|
|
1438
|
-
case 4: {
|
|
1439
|
-
const r = t;
|
|
1440
|
-
if (oe(r, "k") && r.k)
|
|
1441
|
-
return e.interpolate(e.named(r.k));
|
|
1442
|
-
if (oe(r, "key") && r.key)
|
|
1443
|
-
return e.interpolate(e.named(r.key));
|
|
1444
|
-
throw Ye(n);
|
|
1445
|
-
}
|
|
1446
|
-
case 5: {
|
|
1447
|
-
const r = t;
|
|
1448
|
-
if (oe(r, "i") && j(r.i))
|
|
1449
|
-
return e.interpolate(e.list(r.i));
|
|
1450
|
-
if (oe(r, "index") && j(r.index))
|
|
1451
|
-
return e.interpolate(e.list(r.index));
|
|
1452
|
-
throw Ye(n);
|
|
1453
|
-
}
|
|
1454
|
-
case 6: {
|
|
1455
|
-
const r = t, s = ea(r), a = ta(r);
|
|
1456
|
-
return e.linked(Ut(e, a), s ? Ut(e, s) : void 0, e.type);
|
|
1457
|
-
}
|
|
1458
|
-
case 7:
|
|
1459
|
-
return et(t, n);
|
|
1460
|
-
case 8:
|
|
1461
|
-
return et(t, n);
|
|
1462
|
-
default:
|
|
1463
|
-
throw new Error(`unhandled node on format message part: ${n}`);
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
const ra = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
|
|
1467
|
-
function sa(e, t) {
|
|
1468
|
-
t && vs(e) && ue(it(ra, { source: e }));
|
|
1469
|
-
}
|
|
1470
|
-
const aa = (e) => e;
|
|
1471
|
-
let tt = $();
|
|
1472
|
-
function oa(e, t = {}) {
|
|
1473
|
-
let n = !1;
|
|
1474
|
-
const r = t.onError || Ls;
|
|
1475
|
-
return t.onError = (s) => {
|
|
1476
|
-
n = !0, r(s);
|
|
1477
|
-
}, { ...Xs(e, t), detectError: n };
|
|
1478
|
-
}
|
|
1479
|
-
// @__NO_SIDE_EFFECTS__
|
|
1480
|
-
function la(e, t) {
|
|
1481
|
-
if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && L(e)) {
|
|
1482
|
-
const n = F(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
|
|
1483
|
-
process.env.NODE_ENV !== "production" && sa(e, n);
|
|
1484
|
-
const s = (t.onCacheKey || aa)(e), a = tt[s];
|
|
1485
|
-
if (a)
|
|
1486
|
-
return a;
|
|
1487
|
-
const { ast: o, detectError: i } = oa(e, {
|
|
1488
|
-
...t,
|
|
1489
|
-
location: process.env.NODE_ENV !== "production",
|
|
1490
|
-
jit: !0
|
|
1491
|
-
}), u = Pt(o);
|
|
1492
|
-
return i ? u : tt[s] = u;
|
|
1493
|
-
} else {
|
|
1494
|
-
if (process.env.NODE_ENV !== "production" && !se(e))
|
|
1495
|
-
return ue(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), (() => e);
|
|
1496
|
-
const n = e.cacheKey;
|
|
1497
|
-
if (n) {
|
|
1498
|
-
const r = tt[n];
|
|
1499
|
-
return r || (tt[n] = Pt(e));
|
|
1500
|
-
} else
|
|
1501
|
-
return Pt(e);
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
let Ke = null;
|
|
1505
|
-
function ia(e) {
|
|
1506
|
-
Ke = e;
|
|
1507
|
-
}
|
|
1508
|
-
function ca(e, t, n) {
|
|
1509
|
-
Ke && Ke.emit("i18n:init", {
|
|
1510
|
-
timestamp: Date.now(),
|
|
1511
|
-
i18n: e,
|
|
1512
|
-
version: t,
|
|
1513
|
-
meta: n
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
const ua = /* @__PURE__ */ fa("function:translate");
|
|
1517
|
-
function fa(e) {
|
|
1518
|
-
return (t) => Ke && Ke.emit(e, t);
|
|
1519
|
-
}
|
|
1520
|
-
const q = {
|
|
1521
|
-
INVALID_ARGUMENT: Is,
|
|
1522
|
-
// 17
|
|
1523
|
-
INVALID_DATE_ARGUMENT: 18,
|
|
1524
|
-
INVALID_ISO_DATE_ARGUMENT: 19,
|
|
1525
|
-
NOT_SUPPORT_NON_STRING_MESSAGE: 20,
|
|
1526
|
-
NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
|
|
1527
|
-
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
|
|
1528
|
-
NOT_SUPPORT_LOCALE_TYPE: 23
|
|
1529
|
-
}, _a = 24;
|
|
1530
|
-
function de(e) {
|
|
1531
|
-
return we(e, null, process.env.NODE_ENV !== "production" ? { messages: ma } : void 0);
|
|
1532
|
-
}
|
|
1533
|
-
const ma = {
|
|
1534
|
-
[q.INVALID_ARGUMENT]: "Invalid arguments",
|
|
1535
|
-
[q.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
|
|
1536
|
-
[q.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
|
|
1537
|
-
[q.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
|
|
1538
|
-
[q.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
|
|
1539
|
-
[q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
|
|
1540
|
-
[q.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
|
|
1541
|
-
};
|
|
1542
|
-
function on(e, t) {
|
|
1543
|
-
return t.locale != null ? vn(t.locale) : vn(e.locale);
|
|
1544
|
-
}
|
|
1545
|
-
let Dt;
|
|
1546
|
-
function vn(e) {
|
|
1547
|
-
if (L(e))
|
|
1548
|
-
return e;
|
|
1549
|
-
if (W(e)) {
|
|
1550
|
-
if (e.resolvedOnce && Dt != null)
|
|
1551
|
-
return Dt;
|
|
1552
|
-
if (e.constructor.name === "Function") {
|
|
1553
|
-
const t = e();
|
|
1554
|
-
if (gs(t))
|
|
1555
|
-
throw de(q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
1556
|
-
return Dt = t;
|
|
1557
|
-
} else
|
|
1558
|
-
throw de(q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
1559
|
-
} else
|
|
1560
|
-
throw de(q.NOT_SUPPORT_LOCALE_TYPE);
|
|
1561
|
-
}
|
|
1562
|
-
function da(e, t, n) {
|
|
1563
|
-
return [.../* @__PURE__ */ new Set([
|
|
1564
|
-
n,
|
|
1565
|
-
...H(t) ? t : M(t) ? Object.keys(t) : L(t) ? [t] : [n]
|
|
1566
|
-
])];
|
|
1567
|
-
}
|
|
1568
|
-
function Nr(e, t, n) {
|
|
1569
|
-
const r = L(n) ? n : Be, s = e;
|
|
1570
|
-
s.__localeChainCache || (s.__localeChainCache = /* @__PURE__ */ new Map());
|
|
1571
|
-
let a = s.__localeChainCache.get(r);
|
|
1572
|
-
if (!a) {
|
|
1573
|
-
a = [];
|
|
1574
|
-
let o = [n];
|
|
1575
|
-
for (; H(o); )
|
|
1576
|
-
o = Cn(a, o, t);
|
|
1577
|
-
const i = H(t) || !R(t) ? t : t.default ? t.default : null;
|
|
1578
|
-
o = L(i) ? [i] : i, H(o) && Cn(a, o, !1), s.__localeChainCache.set(r, a);
|
|
1579
|
-
}
|
|
1580
|
-
return a;
|
|
1581
|
-
}
|
|
1582
|
-
function Cn(e, t, n) {
|
|
1583
|
-
let r = !0;
|
|
1584
|
-
for (let s = 0; s < t.length && F(r); s++) {
|
|
1585
|
-
const a = t[s];
|
|
1586
|
-
L(a) && (r = Ea(e, t[s], n));
|
|
1587
|
-
}
|
|
1588
|
-
return r;
|
|
1589
|
-
}
|
|
1590
|
-
function Ea(e, t, n) {
|
|
1591
|
-
let r;
|
|
1592
|
-
const s = t.split("-");
|
|
1593
|
-
do {
|
|
1594
|
-
const a = s.join("-");
|
|
1595
|
-
r = pa(e, a, n), s.splice(-1, 1);
|
|
1596
|
-
} while (s.length && r === !0);
|
|
1597
|
-
return r;
|
|
1598
|
-
}
|
|
1599
|
-
function pa(e, t, n) {
|
|
1600
|
-
let r = !1;
|
|
1601
|
-
if (!e.includes(t) && (r = !0, t)) {
|
|
1602
|
-
r = t[t.length - 1] !== "!";
|
|
1603
|
-
const s = t.replace(/!/g, "");
|
|
1604
|
-
e.push(s), (H(n) || R(n)) && n[s] && (r = n[s]);
|
|
1605
|
-
}
|
|
1606
|
-
return r;
|
|
1607
|
-
}
|
|
1608
|
-
const be = [];
|
|
1609
|
-
be[
|
|
1610
|
-
0
|
|
1611
|
-
/* States.BEFORE_PATH */
|
|
1612
|
-
] = {
|
|
1613
|
-
w: [
|
|
1614
|
-
0
|
|
1615
|
-
/* States.BEFORE_PATH */
|
|
1616
|
-
],
|
|
1617
|
-
i: [
|
|
1618
|
-
3,
|
|
1619
|
-
0
|
|
1620
|
-
/* Actions.APPEND */
|
|
1621
|
-
],
|
|
1622
|
-
"[": [
|
|
1623
|
-
4
|
|
1624
|
-
/* States.IN_SUB_PATH */
|
|
1625
|
-
],
|
|
1626
|
-
o: [
|
|
1627
|
-
7
|
|
1628
|
-
/* States.AFTER_PATH */
|
|
1629
|
-
]
|
|
1630
|
-
};
|
|
1631
|
-
be[
|
|
1632
|
-
1
|
|
1633
|
-
/* States.IN_PATH */
|
|
1634
|
-
] = {
|
|
1635
|
-
w: [
|
|
1636
|
-
1
|
|
1637
|
-
/* States.IN_PATH */
|
|
1638
|
-
],
|
|
1639
|
-
".": [
|
|
1640
|
-
2
|
|
1641
|
-
/* States.BEFORE_IDENT */
|
|
1642
|
-
],
|
|
1643
|
-
"[": [
|
|
1644
|
-
4
|
|
1645
|
-
/* States.IN_SUB_PATH */
|
|
1646
|
-
],
|
|
1647
|
-
o: [
|
|
1648
|
-
7
|
|
1649
|
-
/* States.AFTER_PATH */
|
|
1650
|
-
]
|
|
1651
|
-
};
|
|
1652
|
-
be[
|
|
1653
|
-
2
|
|
1654
|
-
/* States.BEFORE_IDENT */
|
|
1655
|
-
] = {
|
|
1656
|
-
w: [
|
|
1657
|
-
2
|
|
1658
|
-
/* States.BEFORE_IDENT */
|
|
1659
|
-
],
|
|
1660
|
-
i: [
|
|
1661
|
-
3,
|
|
1662
|
-
0
|
|
1663
|
-
/* Actions.APPEND */
|
|
1664
|
-
],
|
|
1665
|
-
0: [
|
|
1666
|
-
3,
|
|
1667
|
-
0
|
|
1668
|
-
/* Actions.APPEND */
|
|
1669
|
-
]
|
|
1670
|
-
};
|
|
1671
|
-
be[
|
|
1672
|
-
3
|
|
1673
|
-
/* States.IN_IDENT */
|
|
1674
|
-
] = {
|
|
1675
|
-
i: [
|
|
1676
|
-
3,
|
|
1677
|
-
0
|
|
1678
|
-
/* Actions.APPEND */
|
|
1679
|
-
],
|
|
1680
|
-
0: [
|
|
1681
|
-
3,
|
|
1682
|
-
0
|
|
1683
|
-
/* Actions.APPEND */
|
|
1684
|
-
],
|
|
1685
|
-
w: [
|
|
1686
|
-
1,
|
|
1687
|
-
1
|
|
1688
|
-
/* Actions.PUSH */
|
|
1689
|
-
],
|
|
1690
|
-
".": [
|
|
1691
|
-
2,
|
|
1692
|
-
1
|
|
1693
|
-
/* Actions.PUSH */
|
|
1694
|
-
],
|
|
1695
|
-
"[": [
|
|
1696
|
-
4,
|
|
1697
|
-
1
|
|
1698
|
-
/* Actions.PUSH */
|
|
1699
|
-
],
|
|
1700
|
-
o: [
|
|
1701
|
-
7,
|
|
1702
|
-
1
|
|
1703
|
-
/* Actions.PUSH */
|
|
1704
|
-
]
|
|
1705
|
-
};
|
|
1706
|
-
be[
|
|
1707
|
-
4
|
|
1708
|
-
/* States.IN_SUB_PATH */
|
|
1709
|
-
] = {
|
|
1710
|
-
"'": [
|
|
1711
|
-
5,
|
|
1712
|
-
0
|
|
1713
|
-
/* Actions.APPEND */
|
|
1714
|
-
],
|
|
1715
|
-
'"': [
|
|
1716
|
-
6,
|
|
1717
|
-
0
|
|
1718
|
-
/* Actions.APPEND */
|
|
1719
|
-
],
|
|
1720
|
-
"[": [
|
|
1721
|
-
4,
|
|
1722
|
-
2
|
|
1723
|
-
/* Actions.INC_SUB_PATH_DEPTH */
|
|
1724
|
-
],
|
|
1725
|
-
"]": [
|
|
1726
|
-
1,
|
|
1727
|
-
3
|
|
1728
|
-
/* Actions.PUSH_SUB_PATH */
|
|
1729
|
-
],
|
|
1730
|
-
o: 8,
|
|
1731
|
-
l: [
|
|
1732
|
-
4,
|
|
1733
|
-
0
|
|
1734
|
-
/* Actions.APPEND */
|
|
1735
|
-
]
|
|
1736
|
-
};
|
|
1737
|
-
be[
|
|
1738
|
-
5
|
|
1739
|
-
/* States.IN_SINGLE_QUOTE */
|
|
1740
|
-
] = {
|
|
1741
|
-
"'": [
|
|
1742
|
-
4,
|
|
1743
|
-
0
|
|
1744
|
-
/* Actions.APPEND */
|
|
1745
|
-
],
|
|
1746
|
-
o: 8,
|
|
1747
|
-
l: [
|
|
1748
|
-
5,
|
|
1749
|
-
0
|
|
1750
|
-
/* Actions.APPEND */
|
|
1751
|
-
]
|
|
1752
|
-
};
|
|
1753
|
-
be[
|
|
1754
|
-
6
|
|
1755
|
-
/* States.IN_DOUBLE_QUOTE */
|
|
1756
|
-
] = {
|
|
1757
|
-
'"': [
|
|
1758
|
-
4,
|
|
1759
|
-
0
|
|
1760
|
-
/* Actions.APPEND */
|
|
1761
|
-
],
|
|
1762
|
-
o: 8,
|
|
1763
|
-
l: [
|
|
1764
|
-
6,
|
|
1765
|
-
0
|
|
1766
|
-
/* Actions.APPEND */
|
|
1767
|
-
]
|
|
1768
|
-
};
|
|
1769
|
-
const ga = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
|
|
1770
|
-
function Na(e) {
|
|
1771
|
-
return ga.test(e);
|
|
1772
|
-
}
|
|
1773
|
-
function Ta(e) {
|
|
1774
|
-
const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
|
|
1775
|
-
return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
|
|
1776
|
-
}
|
|
1777
|
-
function ba(e) {
|
|
1778
|
-
if (e == null)
|
|
1779
|
-
return "o";
|
|
1780
|
-
switch (e.charCodeAt(0)) {
|
|
1781
|
-
case 91:
|
|
1782
|
-
// [
|
|
1783
|
-
case 93:
|
|
1784
|
-
// ]
|
|
1785
|
-
case 46:
|
|
1786
|
-
// .
|
|
1787
|
-
case 34:
|
|
1788
|
-
// "
|
|
1789
|
-
case 39:
|
|
1790
|
-
return e;
|
|
1791
|
-
case 95:
|
|
1792
|
-
// _
|
|
1793
|
-
case 36:
|
|
1794
|
-
// $
|
|
1795
|
-
case 45:
|
|
1796
|
-
return "i";
|
|
1797
|
-
case 9:
|
|
1798
|
-
// Tab (HT)
|
|
1799
|
-
case 10:
|
|
1800
|
-
// Newline (LF)
|
|
1801
|
-
case 13:
|
|
1802
|
-
// Return (CR)
|
|
1803
|
-
case 160:
|
|
1804
|
-
// No-break space (NBSP)
|
|
1805
|
-
case 65279:
|
|
1806
|
-
// Byte Order Mark (BOM)
|
|
1807
|
-
case 8232:
|
|
1808
|
-
// Line Separator (LS)
|
|
1809
|
-
case 8233:
|
|
1810
|
-
return "w";
|
|
1811
|
-
}
|
|
1812
|
-
return "i";
|
|
1813
|
-
}
|
|
1814
|
-
function Ia(e) {
|
|
1815
|
-
const t = e.trim();
|
|
1816
|
-
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Na(t) ? Ta(t) : "*" + t;
|
|
1817
|
-
}
|
|
1818
|
-
function ha(e) {
|
|
1819
|
-
const t = [];
|
|
1820
|
-
let n = -1, r = 0, s = 0, a, o, i, u, m, b, T;
|
|
1821
|
-
const N = [];
|
|
1822
|
-
N[
|
|
1823
|
-
0
|
|
1824
|
-
/* Actions.APPEND */
|
|
1825
|
-
] = () => {
|
|
1826
|
-
o === void 0 ? o = i : o += i;
|
|
1827
|
-
}, N[
|
|
1828
|
-
1
|
|
1829
|
-
/* Actions.PUSH */
|
|
1830
|
-
] = () => {
|
|
1831
|
-
o !== void 0 && (t.push(o), o = void 0);
|
|
1832
|
-
}, N[
|
|
1833
|
-
2
|
|
1834
|
-
/* Actions.INC_SUB_PATH_DEPTH */
|
|
1835
|
-
] = () => {
|
|
1836
|
-
N[
|
|
1837
|
-
0
|
|
1838
|
-
/* Actions.APPEND */
|
|
1839
|
-
](), s++;
|
|
1840
|
-
}, N[
|
|
1841
|
-
3
|
|
1842
|
-
/* Actions.PUSH_SUB_PATH */
|
|
1843
|
-
] = () => {
|
|
1844
|
-
if (s > 0)
|
|
1845
|
-
s--, r = 4, N[
|
|
1846
|
-
0
|
|
1847
|
-
/* Actions.APPEND */
|
|
1848
|
-
]();
|
|
1849
|
-
else {
|
|
1850
|
-
if (s = 0, o === void 0 || (o = Ia(o), o === !1))
|
|
1851
|
-
return !1;
|
|
1852
|
-
N[
|
|
1853
|
-
1
|
|
1854
|
-
/* Actions.PUSH */
|
|
1855
|
-
]();
|
|
1856
|
-
}
|
|
1857
|
-
};
|
|
1858
|
-
function A() {
|
|
1859
|
-
const D = e[n + 1];
|
|
1860
|
-
if (r === 5 && D === "'" || r === 6 && D === '"')
|
|
1861
|
-
return n++, i = "\\" + D, N[
|
|
1862
|
-
0
|
|
1863
|
-
/* Actions.APPEND */
|
|
1864
|
-
](), !0;
|
|
1865
|
-
}
|
|
1866
|
-
for (; r !== null; )
|
|
1867
|
-
if (n++, a = e[n], !(a === "\\" && A())) {
|
|
1868
|
-
if (u = ba(a), T = be[r], m = T[u] || T.l || 8, m === 8 || (r = m[0], m[1] !== void 0 && (b = N[m[1]], b && (i = a, b() === !1))))
|
|
1869
|
-
return;
|
|
1870
|
-
if (r === 7)
|
|
1871
|
-
return t;
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
const An = /* @__PURE__ */ new Map();
|
|
1875
|
-
function La(e, t) {
|
|
1876
|
-
return M(e) ? e[t] : null;
|
|
1877
|
-
}
|
|
1878
|
-
function Oa(e, t) {
|
|
1879
|
-
if (!M(e))
|
|
1880
|
-
return null;
|
|
1881
|
-
let n = An.get(t);
|
|
1882
|
-
if (n || (n = ha(t), n && An.set(t, n)), !n)
|
|
1883
|
-
return null;
|
|
1884
|
-
const r = n.length;
|
|
1885
|
-
let s = e, a = 0;
|
|
1886
|
-
for (; a < r; ) {
|
|
1887
|
-
const o = n[a];
|
|
1888
|
-
if (gr.includes(o) && se(s))
|
|
1889
|
-
return null;
|
|
1890
|
-
const i = s[o];
|
|
1891
|
-
if (i === void 0 || W(s))
|
|
1892
|
-
return null;
|
|
1893
|
-
s = i, a++;
|
|
1894
|
-
}
|
|
1895
|
-
return s;
|
|
1896
|
-
}
|
|
1897
|
-
const Z = {
|
|
1898
|
-
NOT_FOUND_KEY: 1,
|
|
1899
|
-
FALLBACK_TO_TRANSLATE: 2,
|
|
1900
|
-
CANNOT_FORMAT_NUMBER: 3,
|
|
1901
|
-
FALLBACK_TO_NUMBER_FORMAT: 4,
|
|
1902
|
-
CANNOT_FORMAT_DATE: 5,
|
|
1903
|
-
FALLBACK_TO_DATE_FORMAT: 6,
|
|
1904
|
-
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
|
|
1905
|
-
}, va = 8, Ca = {
|
|
1906
|
-
[Z.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
|
|
1907
|
-
[Z.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
|
|
1908
|
-
[Z.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
|
|
1909
|
-
[Z.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
|
|
1910
|
-
[Z.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
|
|
1911
|
-
[Z.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
|
|
1912
|
-
[Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: "This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."
|
|
1913
|
-
};
|
|
1914
|
-
function Ae(e, ...t) {
|
|
1915
|
-
return it(Ca[e], ...t);
|
|
1916
|
-
}
|
|
1917
|
-
const Aa = "11.2.8", ut = -1, Be = "en-US", at = "", Sn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1918
|
-
function Sa() {
|
|
1919
|
-
return {
|
|
1920
|
-
upper: (e, t) => t === "text" && L(e) ? e.toUpperCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
1921
|
-
lower: (e, t) => t === "text" && L(e) ? e.toLowerCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
|
|
1922
|
-
capitalize: (e, t) => t === "text" && L(e) ? Sn(e) : t === "vnode" && M(e) && "__v_isVNode" in e ? Sn(e.children) : e
|
|
1923
|
-
};
|
|
1924
|
-
}
|
|
1925
|
-
let Tr;
|
|
1926
|
-
function ya(e) {
|
|
1927
|
-
Tr = e;
|
|
1928
|
-
}
|
|
1929
|
-
let br;
|
|
1930
|
-
function Pa(e) {
|
|
1931
|
-
br = e;
|
|
1932
|
-
}
|
|
1933
|
-
let Ir;
|
|
1934
|
-
function Da(e) {
|
|
1935
|
-
Ir = e;
|
|
1936
|
-
}
|
|
1937
|
-
let hr = null;
|
|
1938
|
-
const ka = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
1939
|
-
hr = e;
|
|
1940
|
-
}, Ra = /* @__NO_SIDE_EFFECTS__ */ () => hr;
|
|
1941
|
-
let Lr = null;
|
|
1942
|
-
const yn = (e) => {
|
|
1943
|
-
Lr = e;
|
|
1944
|
-
}, Ma = () => Lr;
|
|
1945
|
-
let Pn = 0;
|
|
1946
|
-
function Fa(e = {}) {
|
|
1947
|
-
const t = W(e.onWarn) ? e.onWarn : ue, n = L(e.version) ? e.version : Aa, r = L(e.locale) || W(e.locale) ? e.locale : Be, s = W(r) ? Be : r, a = H(e.fallbackLocale) || R(e.fallbackLocale) || L(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s, o = R(e.messages) ? e.messages : kt(s), i = R(e.datetimeFormats) ? e.datetimeFormats : kt(s), u = R(e.numberFormats) ? e.numberFormats : kt(s), m = J($(), e.modifiers, Sa()), b = e.pluralRules || $(), T = W(e.missing) ? e.missing : null, N = F(e.missingWarn) || Me(e.missingWarn) ? e.missingWarn : !0, A = F(e.fallbackWarn) || Me(e.fallbackWarn) ? e.fallbackWarn : !0, D = !!e.fallbackFormat, C = !!e.unresolving, S = W(e.postTranslation) ? e.postTranslation : null, f = R(e.processor) ? e.processor : null, d = F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, h = !!e.escapeParameter, E = W(e.messageCompiler) ? e.messageCompiler : Tr;
|
|
1948
|
-
process.env.NODE_ENV !== "production" && W(e.messageCompiler) && en(Ae(Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
1949
|
-
const O = W(e.messageResolver) ? e.messageResolver : br || La, v = W(e.localeFallbacker) ? e.localeFallbacker : Ir || da, p = M(e.fallbackContext) ? e.fallbackContext : void 0, k = e, w = M(k.__datetimeFormatters) ? k.__datetimeFormatters : /* @__PURE__ */ new Map(), X = M(k.__numberFormatters) ? k.__numberFormatters : /* @__PURE__ */ new Map(), ae = M(k.__meta) ? k.__meta : {};
|
|
1950
|
-
Pn++;
|
|
1951
|
-
const Y = {
|
|
1952
|
-
version: n,
|
|
1953
|
-
cid: Pn,
|
|
1954
|
-
locale: r,
|
|
1955
|
-
fallbackLocale: a,
|
|
1956
|
-
messages: o,
|
|
1957
|
-
modifiers: m,
|
|
1958
|
-
pluralRules: b,
|
|
1959
|
-
missing: T,
|
|
1960
|
-
missingWarn: N,
|
|
1961
|
-
fallbackWarn: A,
|
|
1962
|
-
fallbackFormat: D,
|
|
1963
|
-
unresolving: C,
|
|
1964
|
-
postTranslation: S,
|
|
1965
|
-
processor: f,
|
|
1966
|
-
warnHtmlMessage: d,
|
|
1967
|
-
escapeParameter: h,
|
|
1968
|
-
messageCompiler: E,
|
|
1969
|
-
messageResolver: O,
|
|
1970
|
-
localeFallbacker: v,
|
|
1971
|
-
fallbackContext: p,
|
|
1972
|
-
onWarn: t,
|
|
1973
|
-
__meta: ae
|
|
1974
|
-
};
|
|
1975
|
-
return Y.datetimeFormats = i, Y.numberFormats = u, Y.__datetimeFormatters = w, Y.__numberFormatters = X, process.env.NODE_ENV !== "production" && (Y.__v_emitter = k.__v_emitter != null ? k.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && ca(Y, n, ae), Y;
|
|
1976
|
-
}
|
|
1977
|
-
const kt = (e) => ({ [e]: $() });
|
|
1978
|
-
function ft(e, t) {
|
|
1979
|
-
return e instanceof RegExp ? e.test(t) : e;
|
|
1980
|
-
}
|
|
1981
|
-
function Or(e, t) {
|
|
1982
|
-
return e instanceof RegExp ? e.test(t) : e;
|
|
1983
|
-
}
|
|
1984
|
-
function ln(e, t, n, r, s) {
|
|
1985
|
-
const { missing: a, onWarn: o } = e;
|
|
1986
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1987
|
-
const i = e.__v_emitter;
|
|
1988
|
-
i && i.emit("missing", {
|
|
1989
|
-
locale: n,
|
|
1990
|
-
key: t,
|
|
1991
|
-
type: s,
|
|
1992
|
-
groupId: `${s}:${t}`
|
|
1993
|
-
});
|
|
1994
|
-
}
|
|
1995
|
-
if (a !== null) {
|
|
1996
|
-
const i = a(e, n, t, s);
|
|
1997
|
-
return L(i) ? i : t;
|
|
1998
|
-
} else
|
|
1999
|
-
return process.env.NODE_ENV !== "production" && Or(r, t) && o(Ae(Z.NOT_FOUND_KEY, { key: t, locale: n })), t;
|
|
2000
|
-
}
|
|
2001
|
-
function xe(e, t, n) {
|
|
2002
|
-
const r = e;
|
|
2003
|
-
r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
|
|
2004
|
-
}
|
|
2005
|
-
function vr(e, t) {
|
|
2006
|
-
return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
|
|
2007
|
-
}
|
|
2008
|
-
function Ua(e, t) {
|
|
2009
|
-
const n = t.indexOf(e);
|
|
2010
|
-
if (n === -1)
|
|
2011
|
-
return !1;
|
|
2012
|
-
for (let r = n + 1; r < t.length; r++)
|
|
2013
|
-
if (vr(e, t[r]))
|
|
2014
|
-
return !0;
|
|
2015
|
-
return !1;
|
|
2016
|
-
}
|
|
2017
|
-
const Dn = typeof Intl < "u", Cr = {
|
|
2018
|
-
dateTimeFormat: Dn && typeof Intl.DateTimeFormat < "u",
|
|
2019
|
-
numberFormat: Dn && typeof Intl.NumberFormat < "u"
|
|
2020
|
-
};
|
|
2021
|
-
function kn(e, ...t) {
|
|
2022
|
-
const { datetimeFormats: n, unresolving: r, fallbackLocale: s, onWarn: a, localeFallbacker: o } = e, { __datetimeFormatters: i } = e;
|
|
2023
|
-
if (process.env.NODE_ENV !== "production" && !Cr.dateTimeFormat)
|
|
2024
|
-
return a(Ae(Z.CANNOT_FORMAT_DATE)), at;
|
|
2025
|
-
const [u, m, b, T] = wt(...t), N = F(b.missingWarn) ? b.missingWarn : e.missingWarn, A = F(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn, D = !!b.part, C = on(e, b), S = o(
|
|
2026
|
-
e,
|
|
2027
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2028
|
-
s,
|
|
2029
|
-
C
|
|
2030
|
-
);
|
|
2031
|
-
if (!L(u) || u === "")
|
|
2032
|
-
return new Intl.DateTimeFormat(C, T).format(m);
|
|
2033
|
-
let f = {}, d, h = null, E = C, O = null;
|
|
2034
|
-
const v = "datetime format";
|
|
2035
|
-
for (let w = 0; w < S.length; w++) {
|
|
2036
|
-
if (d = O = S[w], process.env.NODE_ENV !== "production" && C !== d && ft(A, u) && a(Ae(Z.FALLBACK_TO_DATE_FORMAT, {
|
|
2037
|
-
key: u,
|
|
2038
|
-
target: d
|
|
2039
|
-
})), process.env.NODE_ENV !== "production" && C !== d) {
|
|
2040
|
-
const X = e.__v_emitter;
|
|
2041
|
-
X && X.emit("fallback", {
|
|
2042
|
-
type: v,
|
|
2043
|
-
key: u,
|
|
2044
|
-
from: E,
|
|
2045
|
-
to: O,
|
|
2046
|
-
groupId: `${v}:${u}`
|
|
2047
|
-
});
|
|
2048
|
-
}
|
|
2049
|
-
if (f = n[d] || {}, h = f[u], R(h))
|
|
2050
|
-
break;
|
|
2051
|
-
ln(e, u, d, N, v), E = O;
|
|
2052
|
-
}
|
|
2053
|
-
if (!R(h) || !L(d))
|
|
2054
|
-
return r ? ut : u;
|
|
2055
|
-
let p = `${d}__${u}`;
|
|
2056
|
-
ct(T) || (p = `${p}__${JSON.stringify(T)}`);
|
|
2057
|
-
let k = i.get(p);
|
|
2058
|
-
return k || (k = new Intl.DateTimeFormat(d, J({}, h, T)), i.set(p, k)), D ? k.formatToParts(m) : k.format(m);
|
|
2059
|
-
}
|
|
2060
|
-
const Ar = [
|
|
2061
|
-
"localeMatcher",
|
|
2062
|
-
"weekday",
|
|
2063
|
-
"era",
|
|
2064
|
-
"year",
|
|
2065
|
-
"month",
|
|
2066
|
-
"day",
|
|
2067
|
-
"hour",
|
|
2068
|
-
"minute",
|
|
2069
|
-
"second",
|
|
2070
|
-
"timeZoneName",
|
|
2071
|
-
"formatMatcher",
|
|
2072
|
-
"hour12",
|
|
2073
|
-
"timeZone",
|
|
2074
|
-
"dateStyle",
|
|
2075
|
-
"timeStyle",
|
|
2076
|
-
"calendar",
|
|
2077
|
-
"dayPeriod",
|
|
2078
|
-
"numberingSystem",
|
|
2079
|
-
"hourCycle",
|
|
2080
|
-
"fractionalSecondDigits"
|
|
2081
|
-
];
|
|
2082
|
-
function wt(...e) {
|
|
2083
|
-
const [t, n, r, s] = e, a = $();
|
|
2084
|
-
let o = $(), i;
|
|
2085
|
-
if (L(t)) {
|
|
2086
|
-
const u = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
2087
|
-
if (!u)
|
|
2088
|
-
throw de(q.INVALID_ISO_DATE_ARGUMENT);
|
|
2089
|
-
const m = u[3] ? u[3].trim().startsWith("T") ? `${u[1].trim()}${u[3].trim()}` : `${u[1].trim()}T${u[3].trim()}` : u[1].trim();
|
|
2090
|
-
i = new Date(m);
|
|
2091
|
-
try {
|
|
2092
|
-
i.toISOString();
|
|
2093
|
-
} catch {
|
|
2094
|
-
throw de(q.INVALID_ISO_DATE_ARGUMENT);
|
|
2095
|
-
}
|
|
2096
|
-
} else if (ms(t)) {
|
|
2097
|
-
if (isNaN(t.getTime()))
|
|
2098
|
-
throw de(q.INVALID_DATE_ARGUMENT);
|
|
2099
|
-
i = t;
|
|
2100
|
-
} else if (j(t))
|
|
2101
|
-
i = t;
|
|
2102
|
-
else
|
|
2103
|
-
throw de(q.INVALID_ARGUMENT);
|
|
2104
|
-
return L(n) ? a.key = n : R(n) && Object.keys(n).forEach((u) => {
|
|
2105
|
-
Ar.includes(u) ? o[u] = n[u] : a[u] = n[u];
|
|
2106
|
-
}), L(r) ? a.locale = r : R(r) && (o = r), R(s) && (o = s), [a.key || "", i, a, o];
|
|
2107
|
-
}
|
|
2108
|
-
function Rn(e, t, n) {
|
|
2109
|
-
const r = e;
|
|
2110
|
-
for (const s in n) {
|
|
2111
|
-
const a = `${t}__${s}`;
|
|
2112
|
-
r.__datetimeFormatters.has(a) && r.__datetimeFormatters.delete(a);
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
2115
|
-
function Mn(e, ...t) {
|
|
2116
|
-
const { numberFormats: n, unresolving: r, fallbackLocale: s, onWarn: a, localeFallbacker: o } = e, { __numberFormatters: i } = e;
|
|
2117
|
-
if (process.env.NODE_ENV !== "production" && !Cr.numberFormat)
|
|
2118
|
-
return a(Ae(Z.CANNOT_FORMAT_NUMBER)), at;
|
|
2119
|
-
const [u, m, b, T] = Vt(...t), N = F(b.missingWarn) ? b.missingWarn : e.missingWarn, A = F(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn, D = !!b.part, C = on(e, b), S = o(
|
|
2120
|
-
e,
|
|
2121
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2122
|
-
s,
|
|
2123
|
-
C
|
|
2124
|
-
);
|
|
2125
|
-
if (!L(u) || u === "")
|
|
2126
|
-
return new Intl.NumberFormat(C, T).format(m);
|
|
2127
|
-
let f = {}, d, h = null, E = C, O = null;
|
|
2128
|
-
const v = "number format";
|
|
2129
|
-
for (let w = 0; w < S.length; w++) {
|
|
2130
|
-
if (d = O = S[w], process.env.NODE_ENV !== "production" && C !== d && ft(A, u) && a(Ae(Z.FALLBACK_TO_NUMBER_FORMAT, {
|
|
2131
|
-
key: u,
|
|
2132
|
-
target: d
|
|
2133
|
-
})), process.env.NODE_ENV !== "production" && C !== d) {
|
|
2134
|
-
const X = e.__v_emitter;
|
|
2135
|
-
X && X.emit("fallback", {
|
|
2136
|
-
type: v,
|
|
2137
|
-
key: u,
|
|
2138
|
-
from: E,
|
|
2139
|
-
to: O,
|
|
2140
|
-
groupId: `${v}:${u}`
|
|
2141
|
-
});
|
|
2142
|
-
}
|
|
2143
|
-
if (f = n[d] || {}, h = f[u], R(h))
|
|
2144
|
-
break;
|
|
2145
|
-
ln(e, u, d, N, v), E = O;
|
|
2146
|
-
}
|
|
2147
|
-
if (!R(h) || !L(d))
|
|
2148
|
-
return r ? ut : u;
|
|
2149
|
-
let p = `${d}__${u}`;
|
|
2150
|
-
ct(T) || (p = `${p}__${JSON.stringify(T)}`);
|
|
2151
|
-
let k = i.get(p);
|
|
2152
|
-
return k || (k = new Intl.NumberFormat(d, J({}, h, T)), i.set(p, k)), D ? k.formatToParts(m) : k.format(m);
|
|
2153
|
-
}
|
|
2154
|
-
const Sr = [
|
|
2155
|
-
"localeMatcher",
|
|
2156
|
-
"style",
|
|
2157
|
-
"currency",
|
|
2158
|
-
"currencyDisplay",
|
|
2159
|
-
"currencySign",
|
|
2160
|
-
"useGrouping",
|
|
2161
|
-
"minimumIntegerDigits",
|
|
2162
|
-
"minimumFractionDigits",
|
|
2163
|
-
"maximumFractionDigits",
|
|
2164
|
-
"minimumSignificantDigits",
|
|
2165
|
-
"maximumSignificantDigits",
|
|
2166
|
-
"compactDisplay",
|
|
2167
|
-
"notation",
|
|
2168
|
-
"signDisplay",
|
|
2169
|
-
"unit",
|
|
2170
|
-
"unitDisplay",
|
|
2171
|
-
"roundingMode",
|
|
2172
|
-
"roundingPriority",
|
|
2173
|
-
"roundingIncrement",
|
|
2174
|
-
"trailingZeroDisplay"
|
|
2175
|
-
];
|
|
2176
|
-
function Vt(...e) {
|
|
2177
|
-
const [t, n, r, s] = e, a = $();
|
|
2178
|
-
let o = $();
|
|
2179
|
-
if (!j(t))
|
|
2180
|
-
throw de(q.INVALID_ARGUMENT);
|
|
2181
|
-
const i = t;
|
|
2182
|
-
return L(n) ? a.key = n : R(n) && Object.keys(n).forEach((u) => {
|
|
2183
|
-
Sr.includes(u) ? o[u] = n[u] : a[u] = n[u];
|
|
2184
|
-
}), L(r) ? a.locale = r : R(r) && (o = r), R(s) && (o = s), [a.key || "", i, a, o];
|
|
2185
|
-
}
|
|
2186
|
-
function Fn(e, t, n) {
|
|
2187
|
-
const r = e;
|
|
2188
|
-
for (const s in n) {
|
|
2189
|
-
const a = `${t}__${s}`;
|
|
2190
|
-
r.__numberFormatters.has(a) && r.__numberFormatters.delete(a);
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
const wa = (e) => e, Va = (e) => "", $a = "text", Wa = (e) => e.length === 0 ? "" : nn(e), Ga = Ns;
|
|
2194
|
-
function Un(e, t) {
|
|
2195
|
-
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
|
|
2196
|
-
}
|
|
2197
|
-
function xa(e) {
|
|
2198
|
-
const t = j(e.pluralIndex) ? e.pluralIndex : -1;
|
|
2199
|
-
return e.named && (j(e.named.count) || j(e.named.n)) ? j(e.named.count) ? e.named.count : j(e.named.n) ? e.named.n : t : t;
|
|
2200
|
-
}
|
|
2201
|
-
function Ha(e, t) {
|
|
2202
|
-
t.count || (t.count = e), t.n || (t.n = e);
|
|
2203
|
-
}
|
|
2204
|
-
function Ya(e = {}) {
|
|
2205
|
-
const t = e.locale, n = xa(e), r = M(e.pluralRules) && L(t) && W(e.pluralRules[t]) ? e.pluralRules[t] : Un, s = M(e.pluralRules) && L(t) && W(e.pluralRules[t]) ? Un : void 0, a = (f) => f[r(n, f.length, s)], o = e.list || [], i = (f) => o[f], u = e.named || $();
|
|
2206
|
-
j(e.pluralIndex) && Ha(n, u);
|
|
2207
|
-
const m = (f) => u[f];
|
|
2208
|
-
function b(f, d) {
|
|
2209
|
-
const h = W(e.messages) ? e.messages(f, !!d) : M(e.messages) ? e.messages[f] : !1;
|
|
2210
|
-
return h || (e.parent ? e.parent.message(f) : Va);
|
|
2211
|
-
}
|
|
2212
|
-
const T = (f) => e.modifiers ? e.modifiers[f] : wa, N = R(e.processor) && W(e.processor.normalize) ? e.processor.normalize : Wa, A = R(e.processor) && W(e.processor.interpolate) ? e.processor.interpolate : Ga, D = R(e.processor) && L(e.processor.type) ? e.processor.type : $a, S = {
|
|
2213
|
-
list: i,
|
|
2214
|
-
named: m,
|
|
2215
|
-
plural: a,
|
|
2216
|
-
linked: (f, ...d) => {
|
|
2217
|
-
const [h, E] = d;
|
|
2218
|
-
let O = "text", v = "";
|
|
2219
|
-
d.length === 1 ? M(h) ? (v = h.modifier || v, O = h.type || O) : L(h) && (v = h || v) : d.length === 2 && (L(h) && (v = h || v), L(E) && (O = E || O));
|
|
2220
|
-
const p = b(f, !0)(S), k = (
|
|
2221
|
-
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
2222
|
-
O === "vnode" && H(p) && v ? p[0] : p
|
|
2223
|
-
);
|
|
2224
|
-
return v ? T(v)(k, O) : k;
|
|
2225
|
-
},
|
|
2226
|
-
message: b,
|
|
2227
|
-
type: D,
|
|
2228
|
-
interpolate: A,
|
|
2229
|
-
normalize: N,
|
|
2230
|
-
values: J($(), o, u)
|
|
2231
|
-
};
|
|
2232
|
-
return S;
|
|
2233
|
-
}
|
|
2234
|
-
const wn = () => "", te = (e) => W(e);
|
|
2235
|
-
function Vn(e, ...t) {
|
|
2236
|
-
const { fallbackFormat: n, postTranslation: r, unresolving: s, messageCompiler: a, fallbackLocale: o, messages: i } = e, [u, m] = $t(...t), b = F(m.missingWarn) ? m.missingWarn : e.missingWarn, T = F(m.fallbackWarn) ? m.fallbackWarn : e.fallbackWarn, N = F(m.escapeParameter) ? m.escapeParameter : e.escapeParameter, A = !!m.resolvedMessage, D = L(m.default) || F(m.default) ? F(m.default) ? a ? u : () => u : m.default : n ? a ? u : () => u : null, C = n || D != null && (L(D) || W(D)), S = on(e, m);
|
|
2237
|
-
N && Ka(m);
|
|
2238
|
-
let [f, d, h] = A ? [
|
|
2239
|
-
u,
|
|
2240
|
-
S,
|
|
2241
|
-
i[S] || $()
|
|
2242
|
-
] : yr(e, u, S, o, T, b), E = f, O = u;
|
|
2243
|
-
if (!A && !(L(E) || se(E) || te(E)) && C && (E = D, O = E), !A && (!(L(E) || se(E) || te(E)) || !L(d)))
|
|
2244
|
-
return s ? ut : u;
|
|
2245
|
-
if (process.env.NODE_ENV !== "production" && L(E) && e.messageCompiler == null)
|
|
2246
|
-
return ue(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`), u;
|
|
2247
|
-
let v = !1;
|
|
2248
|
-
const p = () => {
|
|
2249
|
-
v = !0;
|
|
2250
|
-
}, k = te(E) ? E : Pr(e, u, d, E, O, p);
|
|
2251
|
-
if (v)
|
|
2252
|
-
return E;
|
|
2253
|
-
const w = Ja(e, d, h, m), X = Ya(w), ae = Ba(e, k, X);
|
|
2254
|
-
let Y = r ? r(ae, u) : ae;
|
|
2255
|
-
if (N && L(Y) && (Y = Es(Y)), process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
2256
|
-
const ye = {
|
|
2257
|
-
timestamp: Date.now(),
|
|
2258
|
-
key: L(u) ? u : te(E) ? E.key : "",
|
|
2259
|
-
locale: d || (te(E) ? E.locale : ""),
|
|
2260
|
-
format: L(E) ? E : te(E) ? E.source : "",
|
|
2261
|
-
message: Y
|
|
2262
|
-
};
|
|
2263
|
-
ye.meta = J({}, e.__meta, /* @__PURE__ */ Ra() || {}), ua(ye);
|
|
2264
|
-
}
|
|
2265
|
-
return Y;
|
|
2266
|
-
}
|
|
2267
|
-
function Ka(e) {
|
|
2268
|
-
H(e.list) ? e.list = e.list.map((t) => L(t) ? Nn(t) : t) : M(e.named) && Object.keys(e.named).forEach((t) => {
|
|
2269
|
-
L(e.named[t]) && (e.named[t] = Nn(e.named[t]));
|
|
2270
|
-
});
|
|
2271
|
-
}
|
|
2272
|
-
function yr(e, t, n, r, s, a) {
|
|
2273
|
-
const { messages: o, onWarn: i, messageResolver: u, localeFallbacker: m } = e, b = m(e, r, n);
|
|
2274
|
-
let T = $(), N, A = null, D = n, C = null;
|
|
2275
|
-
const S = "translate";
|
|
2276
|
-
for (let f = 0; f < b.length; f++) {
|
|
2277
|
-
if (N = C = b[f], process.env.NODE_ENV !== "production" && n !== N && !vr(n, N) && ft(s, t) && i(Ae(Z.FALLBACK_TO_TRANSLATE, {
|
|
2278
|
-
key: t,
|
|
2279
|
-
target: N
|
|
2280
|
-
})), process.env.NODE_ENV !== "production" && n !== N) {
|
|
2281
|
-
const O = e.__v_emitter;
|
|
2282
|
-
O && O.emit("fallback", {
|
|
2283
|
-
type: S,
|
|
2284
|
-
key: t,
|
|
2285
|
-
from: D,
|
|
2286
|
-
to: C,
|
|
2287
|
-
groupId: `${S}:${t}`
|
|
2288
|
-
});
|
|
2289
|
-
}
|
|
2290
|
-
T = o[N] || $();
|
|
2291
|
-
let d = null, h, E;
|
|
2292
|
-
if (process.env.NODE_ENV !== "production" && le && (d = window.performance.now(), h = "intlify-message-resolve-start", E = "intlify-message-resolve-end", ee && ee(h)), (A = u(T, t)) === null && (A = T[t]), process.env.NODE_ENV !== "production" && le) {
|
|
2293
|
-
const O = window.performance.now(), v = e.__v_emitter;
|
|
2294
|
-
v && d && A && v.emit("message-resolve", {
|
|
2295
|
-
type: "message-resolve",
|
|
2296
|
-
key: t,
|
|
2297
|
-
message: A,
|
|
2298
|
-
time: O - d,
|
|
2299
|
-
groupId: `${S}:${t}`
|
|
2300
|
-
}), h && E && ee && Ce && (ee(E), Ce("intlify message resolve", h, E));
|
|
2301
|
-
}
|
|
2302
|
-
if (L(A) || se(A) || te(A))
|
|
2303
|
-
break;
|
|
2304
|
-
if (!Ua(N, b)) {
|
|
2305
|
-
const O = ln(
|
|
2306
|
-
e,
|
|
2307
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2308
|
-
t,
|
|
2309
|
-
N,
|
|
2310
|
-
a,
|
|
2311
|
-
S
|
|
2312
|
-
);
|
|
2313
|
-
O !== t && (A = O);
|
|
2314
|
-
}
|
|
2315
|
-
D = C;
|
|
2316
|
-
}
|
|
2317
|
-
return [A, N, T];
|
|
2318
|
-
}
|
|
2319
|
-
function Pr(e, t, n, r, s, a) {
|
|
2320
|
-
const { messageCompiler: o, warnHtmlMessage: i } = e;
|
|
2321
|
-
if (te(r)) {
|
|
2322
|
-
const N = r;
|
|
2323
|
-
return N.locale = N.locale || n, N.key = N.key || t, N;
|
|
2324
|
-
}
|
|
2325
|
-
if (o == null) {
|
|
2326
|
-
const N = (() => r);
|
|
2327
|
-
return N.locale = n, N.key = t, N;
|
|
2328
|
-
}
|
|
2329
|
-
let u = null, m, b;
|
|
2330
|
-
process.env.NODE_ENV !== "production" && le && (u = window.performance.now(), m = "intlify-message-compilation-start", b = "intlify-message-compilation-end", ee && ee(m));
|
|
2331
|
-
const T = o(r, ja(e, n, s, r, i, a));
|
|
2332
|
-
if (process.env.NODE_ENV !== "production" && le) {
|
|
2333
|
-
const N = window.performance.now(), A = e.__v_emitter;
|
|
2334
|
-
A && u && A.emit("message-compilation", {
|
|
2335
|
-
type: "message-compilation",
|
|
2336
|
-
message: r,
|
|
2337
|
-
time: N - u,
|
|
2338
|
-
groupId: `translate:${t}`
|
|
2339
|
-
}), m && b && ee && Ce && (ee(b), Ce("intlify message compilation", m, b));
|
|
2340
|
-
}
|
|
2341
|
-
return T.locale = n, T.key = t, T.source = r, T;
|
|
2342
|
-
}
|
|
2343
|
-
function Ba(e, t, n) {
|
|
2344
|
-
let r = null, s, a;
|
|
2345
|
-
process.env.NODE_ENV !== "production" && le && (r = window.performance.now(), s = "intlify-message-evaluation-start", a = "intlify-message-evaluation-end", ee && ee(s));
|
|
2346
|
-
const o = t(n);
|
|
2347
|
-
if (process.env.NODE_ENV !== "production" && le) {
|
|
2348
|
-
const i = window.performance.now(), u = e.__v_emitter;
|
|
2349
|
-
u && r && u.emit("message-evaluation", {
|
|
2350
|
-
type: "message-evaluation",
|
|
2351
|
-
value: o,
|
|
2352
|
-
time: i - r,
|
|
2353
|
-
groupId: `translate:${t.key}`
|
|
2354
|
-
}), s && a && ee && Ce && (ee(a), Ce("intlify message evaluation", s, a));
|
|
2355
|
-
}
|
|
2356
|
-
return o;
|
|
2357
|
-
}
|
|
2358
|
-
function $t(...e) {
|
|
2359
|
-
const [t, n, r] = e, s = $();
|
|
2360
|
-
if (!L(t) && !j(t) && !te(t) && !se(t))
|
|
2361
|
-
throw de(q.INVALID_ARGUMENT);
|
|
2362
|
-
const a = j(t) ? String(t) : (te(t), t);
|
|
2363
|
-
return j(n) ? s.plural = n : L(n) ? s.default = n : R(n) && !ct(n) ? s.named = n : H(n) && (s.list = n), j(r) ? s.plural = r : L(r) ? s.default = r : R(r) && J(s, r), [a, s];
|
|
2364
|
-
}
|
|
2365
|
-
function ja(e, t, n, r, s, a) {
|
|
2366
|
-
return {
|
|
2367
|
-
locale: t,
|
|
2368
|
-
key: n,
|
|
2369
|
-
warnHtmlMessage: s,
|
|
2370
|
-
onError: (o) => {
|
|
2371
|
-
if (a && a(o), process.env.NODE_ENV !== "production") {
|
|
2372
|
-
const i = Xa(r), u = `Message compilation error: ${o.message}`, m = o.location && i && Ts(i, o.location.start.offset, o.location.end.offset), b = e.__v_emitter;
|
|
2373
|
-
b && i && b.emit("compile-error", {
|
|
2374
|
-
message: i,
|
|
2375
|
-
error: o.message,
|
|
2376
|
-
start: o.location && o.location.start.offset,
|
|
2377
|
-
end: o.location && o.location.end.offset,
|
|
2378
|
-
groupId: `translate:${n}`
|
|
2379
|
-
}), console.error(m ? `${u}
|
|
2380
|
-
${m}` : u);
|
|
2381
|
-
} else
|
|
2382
|
-
throw o;
|
|
2383
|
-
},
|
|
2384
|
-
onCacheKey: (o) => fs(t, n, o)
|
|
2385
|
-
};
|
|
2386
|
-
}
|
|
2387
|
-
function Xa(e) {
|
|
2388
|
-
if (L(e))
|
|
2389
|
-
return e;
|
|
2390
|
-
if (e.loc && e.loc.source)
|
|
2391
|
-
return e.loc.source;
|
|
2392
|
-
}
|
|
2393
|
-
function Ja(e, t, n, r) {
|
|
2394
|
-
const { modifiers: s, pluralRules: a, messageResolver: o, fallbackLocale: i, fallbackWarn: u, missingWarn: m, fallbackContext: b } = e, N = {
|
|
2395
|
-
locale: t,
|
|
2396
|
-
modifiers: s,
|
|
2397
|
-
pluralRules: a,
|
|
2398
|
-
messages: (A, D) => {
|
|
2399
|
-
let C = o(n, A);
|
|
2400
|
-
if (C == null && (b || D)) {
|
|
2401
|
-
const [, , S] = yr(
|
|
2402
|
-
b || e,
|
|
2403
|
-
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
|
2404
|
-
A,
|
|
2405
|
-
t,
|
|
2406
|
-
i,
|
|
2407
|
-
u,
|
|
2408
|
-
m
|
|
2409
|
-
);
|
|
2410
|
-
C = o(S, A);
|
|
2411
|
-
}
|
|
2412
|
-
if (L(C) || se(C)) {
|
|
2413
|
-
let S = !1;
|
|
2414
|
-
const d = Pr(e, A, t, C, A, () => {
|
|
2415
|
-
S = !0;
|
|
2416
|
-
});
|
|
2417
|
-
return S ? wn : d;
|
|
2418
|
-
} else return te(C) ? C : wn;
|
|
2419
|
-
}
|
|
2420
|
-
};
|
|
2421
|
-
return e.processor && (N.processor = e.processor), r.list && (N.list = r.list), r.named && (N.named = r.named), j(r.plural) && (N.pluralIndex = r.plural), N;
|
|
2422
|
-
}
|
|
2423
|
-
Js();
|
|
2424
|
-
function Qa() {
|
|
2425
|
-
return Dr().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
2426
|
-
}
|
|
2427
|
-
function Dr() {
|
|
2428
|
-
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
2429
|
-
}
|
|
2430
|
-
const qa = typeof Proxy == "function", Za = "devtools-plugin:setup", za = "plugin:settings:set";
|
|
2431
|
-
let De, Wt;
|
|
2432
|
-
function eo() {
|
|
2433
|
-
var e;
|
|
2434
|
-
return De !== void 0 || (typeof window < "u" && window.performance ? (De = !0, Wt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (De = !0, Wt = globalThis.perf_hooks.performance) : De = !1), De;
|
|
2435
|
-
}
|
|
2436
|
-
function to() {
|
|
2437
|
-
return eo() ? Wt.now() : Date.now();
|
|
2438
|
-
}
|
|
2439
|
-
class no {
|
|
2440
|
-
constructor(t, n) {
|
|
2441
|
-
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
|
2442
|
-
const r = {};
|
|
2443
|
-
if (t.settings)
|
|
2444
|
-
for (const o in t.settings) {
|
|
2445
|
-
const i = t.settings[o];
|
|
2446
|
-
r[o] = i.defaultValue;
|
|
2447
|
-
}
|
|
2448
|
-
const s = `__vue-devtools-plugin-settings__${t.id}`;
|
|
2449
|
-
let a = Object.assign({}, r);
|
|
2450
|
-
try {
|
|
2451
|
-
const o = localStorage.getItem(s), i = JSON.parse(o);
|
|
2452
|
-
Object.assign(a, i);
|
|
2453
|
-
} catch {
|
|
2454
|
-
}
|
|
2455
|
-
this.fallbacks = {
|
|
2456
|
-
getSettings() {
|
|
2457
|
-
return a;
|
|
2458
|
-
},
|
|
2459
|
-
setSettings(o) {
|
|
2460
|
-
try {
|
|
2461
|
-
localStorage.setItem(s, JSON.stringify(o));
|
|
2462
|
-
} catch {
|
|
2463
|
-
}
|
|
2464
|
-
a = o;
|
|
2465
|
-
},
|
|
2466
|
-
now() {
|
|
2467
|
-
return to();
|
|
2468
|
-
}
|
|
2469
|
-
}, n && n.on(za, (o, i) => {
|
|
2470
|
-
o === this.plugin.id && this.fallbacks.setSettings(i);
|
|
2471
|
-
}), this.proxiedOn = new Proxy({}, {
|
|
2472
|
-
get: (o, i) => this.target ? this.target.on[i] : (...u) => {
|
|
2473
|
-
this.onQueue.push({
|
|
2474
|
-
method: i,
|
|
2475
|
-
args: u
|
|
2476
|
-
});
|
|
2477
|
-
}
|
|
2478
|
-
}), this.proxiedTarget = new Proxy({}, {
|
|
2479
|
-
get: (o, i) => this.target ? this.target[i] : i === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(i) ? (...u) => (this.targetQueue.push({
|
|
2480
|
-
method: i,
|
|
2481
|
-
args: u,
|
|
2482
|
-
resolve: () => {
|
|
2483
|
-
}
|
|
2484
|
-
}), this.fallbacks[i](...u)) : (...u) => new Promise((m) => {
|
|
2485
|
-
this.targetQueue.push({
|
|
2486
|
-
method: i,
|
|
2487
|
-
args: u,
|
|
2488
|
-
resolve: m
|
|
2489
|
-
});
|
|
2490
|
-
})
|
|
2491
|
-
});
|
|
2492
|
-
}
|
|
2493
|
-
async setRealTarget(t) {
|
|
2494
|
-
this.target = t;
|
|
2495
|
-
for (const n of this.onQueue)
|
|
2496
|
-
this.target.on[n.method](...n.args);
|
|
2497
|
-
for (const n of this.targetQueue)
|
|
2498
|
-
n.resolve(await this.target[n.method](...n.args));
|
|
2499
|
-
}
|
|
2500
|
-
}
|
|
2501
|
-
function ro(e, t) {
|
|
2502
|
-
const n = e, r = Dr(), s = Qa(), a = qa && n.enableEarlyProxy;
|
|
2503
|
-
if (s && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
|
|
2504
|
-
s.emit(Za, e, t);
|
|
2505
|
-
else {
|
|
2506
|
-
const o = a ? new no(n, s) : null;
|
|
2507
|
-
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
2508
|
-
pluginDescriptor: n,
|
|
2509
|
-
setupFn: t,
|
|
2510
|
-
proxy: o
|
|
2511
|
-
}), o && t(o.proxiedTarget);
|
|
2512
|
-
}
|
|
2513
|
-
}
|
|
2514
|
-
const so = "11.2.8";
|
|
2515
|
-
function ao() {
|
|
2516
|
-
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (ve().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (ve().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (ve().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (ve().__INTLIFY_PROD_DEVTOOLS__ = !1);
|
|
2517
|
-
}
|
|
2518
|
-
const G = {
|
|
2519
|
-
// composer module errors
|
|
2520
|
-
UNEXPECTED_RETURN_TYPE: _a,
|
|
2521
|
-
// 24
|
|
2522
|
-
// legacy module errors
|
|
2523
|
-
INVALID_ARGUMENT: 25,
|
|
2524
|
-
// i18n module errors
|
|
2525
|
-
MUST_BE_CALL_SETUP_TOP: 26,
|
|
2526
|
-
NOT_INSTALLED: 27,
|
|
2527
|
-
// directive module errors
|
|
2528
|
-
REQUIRED_VALUE: 28,
|
|
2529
|
-
INVALID_VALUE: 29,
|
|
2530
|
-
// vue-devtools errors
|
|
2531
|
-
CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,
|
|
2532
|
-
NOT_INSTALLED_WITH_PROVIDE: 31,
|
|
2533
|
-
// unexpected error
|
|
2534
|
-
UNEXPECTED_ERROR: 32,
|
|
2535
|
-
// not compatible legacy vue-i18n constructor
|
|
2536
|
-
NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,
|
|
2537
|
-
// Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly
|
|
2538
|
-
NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
|
|
2539
|
-
};
|
|
2540
|
-
function z(e, ...t) {
|
|
2541
|
-
return we(e, null, process.env.NODE_ENV !== "production" ? { messages: oo, args: t } : void 0);
|
|
2542
|
-
}
|
|
2543
|
-
const oo = {
|
|
2544
|
-
[G.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
2545
|
-
[G.INVALID_ARGUMENT]: "Invalid argument",
|
|
2546
|
-
[G.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
|
|
2547
|
-
[G.NOT_INSTALLED]: "Need to install with `app.use` function",
|
|
2548
|
-
[G.UNEXPECTED_ERROR]: "Unexpected error",
|
|
2549
|
-
[G.REQUIRED_VALUE]: "Required in value: {0}",
|
|
2550
|
-
[G.INVALID_VALUE]: "Invalid value",
|
|
2551
|
-
[G.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: "Cannot setup vue-devtools plugin",
|
|
2552
|
-
[G.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
2553
|
-
[G.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
2554
|
-
[G.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
2555
|
-
}, Gt = /* @__PURE__ */ fe("__translateVNode"), xt = /* @__PURE__ */ fe("__datetimeParts"), Ht = /* @__PURE__ */ fe("__numberParts"), Se = /* @__PURE__ */ fe("__enableEmitter"), je = /* @__PURE__ */ fe("__disableEmitter"), kr = fe("__setPluralRules"), Rr = /* @__PURE__ */ fe("__injectWithOption"), Yt = /* @__PURE__ */ fe("__dispose"), ne = {
|
|
2556
|
-
FALLBACK_TO_ROOT: va,
|
|
2557
|
-
// 8
|
|
2558
|
-
NOT_FOUND_PARENT_SCOPE: 9,
|
|
2559
|
-
IGNORE_OBJ_FLATTEN: 10,
|
|
2560
|
-
/**
|
|
2561
|
-
* @deprecated will be removed at vue-i18n v12
|
|
2562
|
-
*/
|
|
2563
|
-
DEPRECATE_LEGACY_MODE: 11,
|
|
2564
|
-
/**
|
|
2565
|
-
* @deprecated will be removed at vue-i18n v12
|
|
2566
|
-
*/
|
|
2567
|
-
DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,
|
|
2568
|
-
// duplicate `useI18n` calling
|
|
2569
|
-
DUPLICATE_USE_I18N_CALLING: 13
|
|
2570
|
-
}, lo = {
|
|
2571
|
-
[ne.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
|
|
2572
|
-
[ne.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
|
|
2573
|
-
[ne.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
|
|
2574
|
-
/**
|
|
2575
|
-
* @deprecated will be removed at vue-i18n v12
|
|
2576
|
-
*/
|
|
2577
|
-
[ne.DEPRECATE_LEGACY_MODE]: `Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
2578
|
-
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,
|
|
2579
|
-
/**
|
|
2580
|
-
* @deprecated will be removed at vue-i18n v12
|
|
2581
|
-
*/
|
|
2582
|
-
[ne.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",
|
|
2583
|
-
[ne.DUPLICATE_USE_I18N_CALLING]: "Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."
|
|
2584
|
-
};
|
|
2585
|
-
function Ue(e, ...t) {
|
|
2586
|
-
return it(lo[e], ...t);
|
|
2587
|
-
}
|
|
2588
|
-
function Xe(e) {
|
|
2589
|
-
if (!M(e) || se(e))
|
|
2590
|
-
return e;
|
|
2591
|
-
for (const t in e)
|
|
2592
|
-
if (oe(e, t))
|
|
2593
|
-
if (!t.includes("."))
|
|
2594
|
-
M(e[t]) && Xe(e[t]);
|
|
2595
|
-
else {
|
|
2596
|
-
const n = t.split("."), r = n.length - 1;
|
|
2597
|
-
let s = e, a = !1;
|
|
2598
|
-
for (let o = 0; o < r; o++) {
|
|
2599
|
-
if (n[o] === "__proto__")
|
|
2600
|
-
throw new Error(`unsafe key: ${n[o]}`);
|
|
2601
|
-
if (n[o] in s || (s[n[o]] = $()), !M(s[n[o]])) {
|
|
2602
|
-
process.env.NODE_ENV !== "production" && ue(Ue(ne.IGNORE_OBJ_FLATTEN, {
|
|
2603
|
-
key: n[o]
|
|
2604
|
-
})), a = !0;
|
|
2605
|
-
break;
|
|
2606
|
-
}
|
|
2607
|
-
s = s[n[o]];
|
|
2608
|
-
}
|
|
2609
|
-
if (a || (se(s) ? gr.includes(n[r]) || delete e[t] : (s[n[r]] = e[t], delete e[t])), !se(s)) {
|
|
2610
|
-
const o = s[n[r]];
|
|
2611
|
-
M(o) && Xe(o);
|
|
2612
|
-
}
|
|
2613
|
-
}
|
|
2614
|
-
return e;
|
|
2615
|
-
}
|
|
2616
|
-
function cn(e, t) {
|
|
2617
|
-
const { messages: n, __i18n: r, messageResolver: s, flatJson: a } = t, o = R(n) ? n : H(r) ? $() : { [e]: $() };
|
|
2618
|
-
if (H(r) && r.forEach((i) => {
|
|
2619
|
-
if ("locale" in i && "resource" in i) {
|
|
2620
|
-
const { locale: u, resource: m } = i;
|
|
2621
|
-
u ? (o[u] = o[u] || $(), st(m, o[u])) : st(m, o);
|
|
2622
|
-
} else
|
|
2623
|
-
L(i) && st(JSON.parse(i), o);
|
|
2624
|
-
}), s == null && a)
|
|
2625
|
-
for (const i in o)
|
|
2626
|
-
oe(o, i) && Xe(o[i]);
|
|
2627
|
-
return o;
|
|
2628
|
-
}
|
|
2629
|
-
function Mr(e) {
|
|
2630
|
-
return e.type;
|
|
2631
|
-
}
|
|
2632
|
-
function Fr(e, t, n) {
|
|
2633
|
-
let r = M(t.messages) ? t.messages : $();
|
|
2634
|
-
"__i18nGlobal" in n && (r = cn(e.locale.value, {
|
|
2635
|
-
messages: r,
|
|
2636
|
-
__i18n: n.__i18nGlobal
|
|
2637
|
-
}));
|
|
2638
|
-
const s = Object.keys(r);
|
|
2639
|
-
s.length && s.forEach((a) => {
|
|
2640
|
-
e.mergeLocaleMessage(a, r[a]);
|
|
2641
|
-
});
|
|
2642
|
-
{
|
|
2643
|
-
if (M(t.datetimeFormats)) {
|
|
2644
|
-
const a = Object.keys(t.datetimeFormats);
|
|
2645
|
-
a.length && a.forEach((o) => {
|
|
2646
|
-
e.mergeDateTimeFormat(o, t.datetimeFormats[o]);
|
|
2647
|
-
});
|
|
2648
|
-
}
|
|
2649
|
-
if (M(t.numberFormats)) {
|
|
2650
|
-
const a = Object.keys(t.numberFormats);
|
|
2651
|
-
a.length && a.forEach((o) => {
|
|
2652
|
-
e.mergeNumberFormat(o, t.numberFormats[o]);
|
|
2653
|
-
});
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
}
|
|
2657
|
-
function $n(e) {
|
|
2658
|
-
return rt(Xr, null, e, 0);
|
|
2659
|
-
}
|
|
2660
|
-
function Re() {
|
|
2661
|
-
const e = "currentInstance";
|
|
2662
|
-
return e in St ? St[e] : St.getCurrentInstance();
|
|
2663
|
-
}
|
|
2664
|
-
const Wn = "__INTLIFY_META__", Gn = () => [], io = () => !1;
|
|
2665
|
-
let xn = 0;
|
|
2666
|
-
function Hn(e) {
|
|
2667
|
-
return ((t, n, r, s) => e(n, r, Re() || void 0, s));
|
|
2668
|
-
}
|
|
2669
|
-
const co = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
2670
|
-
const e = Re();
|
|
2671
|
-
let t = null;
|
|
2672
|
-
return e && (t = Mr(e)[Wn]) ? { [Wn]: t } : null;
|
|
2673
|
-
};
|
|
2674
|
-
function un(e = {}) {
|
|
2675
|
-
const { __root: t, __injectWithOption: n } = e, r = t === void 0, s = e.flatJson, a = le ? nt : Kr;
|
|
2676
|
-
let o = F(e.inheritLocale) ? e.inheritLocale : !0;
|
|
2677
|
-
const i = a(
|
|
2678
|
-
// prettier-ignore
|
|
2679
|
-
t && o ? t.locale.value : L(e.locale) ? e.locale : Be
|
|
2680
|
-
), u = a(
|
|
2681
|
-
// prettier-ignore
|
|
2682
|
-
t && o ? t.fallbackLocale.value : L(e.fallbackLocale) || H(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : i.value
|
|
2683
|
-
), m = a(cn(i.value, e)), b = a(R(e.datetimeFormats) ? e.datetimeFormats : { [i.value]: {} }), T = a(R(e.numberFormats) ? e.numberFormats : { [i.value]: {} });
|
|
2684
|
-
let N = t ? t.missingWarn : F(e.missingWarn) || Me(e.missingWarn) ? e.missingWarn : !0, A = t ? t.fallbackWarn : F(e.fallbackWarn) || Me(e.fallbackWarn) ? e.fallbackWarn : !0, D = t ? t.fallbackRoot : F(e.fallbackRoot) ? e.fallbackRoot : !0, C = !!e.fallbackFormat, S = W(e.missing) ? e.missing : null, f = W(e.missing) ? Hn(e.missing) : null, d = W(e.postTranslation) ? e.postTranslation : null, h = t ? t.warnHtmlMessage : F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, E = !!e.escapeParameter;
|
|
2685
|
-
const O = t ? t.modifiers : R(e.modifiers) ? e.modifiers : {};
|
|
2686
|
-
let v = e.pluralRules || t && t.pluralRules, p;
|
|
2687
|
-
p = (() => {
|
|
2688
|
-
r && yn(null);
|
|
2689
|
-
const _ = {
|
|
2690
|
-
version: so,
|
|
2691
|
-
locale: i.value,
|
|
2692
|
-
fallbackLocale: u.value,
|
|
2693
|
-
messages: m.value,
|
|
2694
|
-
modifiers: O,
|
|
2695
|
-
pluralRules: v,
|
|
2696
|
-
missing: f === null ? void 0 : f,
|
|
2697
|
-
missingWarn: N,
|
|
2698
|
-
fallbackWarn: A,
|
|
2699
|
-
fallbackFormat: C,
|
|
2700
|
-
unresolving: !0,
|
|
2701
|
-
postTranslation: d === null ? void 0 : d,
|
|
2702
|
-
warnHtmlMessage: h,
|
|
2703
|
-
escapeParameter: E,
|
|
2704
|
-
messageResolver: e.messageResolver,
|
|
2705
|
-
messageCompiler: e.messageCompiler,
|
|
2706
|
-
__meta: { framework: "vue" }
|
|
2707
|
-
};
|
|
2708
|
-
_.datetimeFormats = b.value, _.numberFormats = T.value, _.__datetimeFormatters = R(p) ? p.__datetimeFormatters : void 0, _.__numberFormatters = R(p) ? p.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (_.__v_emitter = R(p) ? p.__v_emitter : void 0);
|
|
2709
|
-
const I = Fa(_);
|
|
2710
|
-
return r && yn(I), I;
|
|
2711
|
-
})(), xe(p, i.value, u.value);
|
|
2712
|
-
function w() {
|
|
2713
|
-
return [
|
|
2714
|
-
i.value,
|
|
2715
|
-
u.value,
|
|
2716
|
-
m.value,
|
|
2717
|
-
b.value,
|
|
2718
|
-
T.value
|
|
2719
|
-
];
|
|
2720
|
-
}
|
|
2721
|
-
const X = ge({
|
|
2722
|
-
get: () => i.value,
|
|
2723
|
-
set: (_) => {
|
|
2724
|
-
p.locale = _, i.value = _;
|
|
2725
|
-
}
|
|
2726
|
-
}), ae = ge({
|
|
2727
|
-
get: () => u.value,
|
|
2728
|
-
set: (_) => {
|
|
2729
|
-
p.fallbackLocale = _, u.value = _, xe(p, i.value, _);
|
|
2730
|
-
}
|
|
2731
|
-
}), Y = ge(() => m.value), ye = /* @__PURE__ */ ge(() => b.value), mt = /* @__PURE__ */ ge(() => T.value);
|
|
2732
|
-
function dt() {
|
|
2733
|
-
return W(d) ? d : null;
|
|
2734
|
-
}
|
|
2735
|
-
function Et(_) {
|
|
2736
|
-
d = _, p.postTranslation = _;
|
|
2737
|
-
}
|
|
2738
|
-
function pt() {
|
|
2739
|
-
return S;
|
|
2740
|
-
}
|
|
2741
|
-
function gt(_) {
|
|
2742
|
-
_ !== null && (f = Hn(_)), S = _, p.missing = f;
|
|
2743
|
-
}
|
|
2744
|
-
function Nt(_, I) {
|
|
2745
|
-
return _ !== "translate" || !I.resolvedMessage;
|
|
2746
|
-
}
|
|
2747
|
-
const _e = (_, I, V, B, he, Ze) => {
|
|
2748
|
-
w();
|
|
2749
|
-
let Pe;
|
|
2750
|
-
try {
|
|
2751
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = t ? Ma() : void 0), Pe = _(p);
|
|
2752
|
-
} finally {
|
|
2753
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = void 0);
|
|
2754
|
-
}
|
|
2755
|
-
if (V !== "translate exists" && // for not `te` (e.g `t`)
|
|
2756
|
-
j(Pe) && Pe === ut || V === "translate exists" && !Pe) {
|
|
2757
|
-
const [Le, Gr] = I();
|
|
2758
|
-
if (process.env.NODE_ENV !== "production" && t && L(Le) && Nt(V, Gr) && (D && (ft(A, Le) || Or(N, Le)) && ue(Ue(ne.FALLBACK_TO_ROOT, {
|
|
2759
|
-
key: Le,
|
|
2760
|
-
type: V
|
|
2761
|
-
})), process.env.NODE_ENV !== "production")) {
|
|
2762
|
-
const { __v_emitter: En } = p;
|
|
2763
|
-
En && D && En.emit("fallback", {
|
|
2764
|
-
type: V,
|
|
2765
|
-
key: Le,
|
|
2766
|
-
to: "global",
|
|
2767
|
-
groupId: `${V}:${Le}`
|
|
2768
|
-
});
|
|
2769
|
-
}
|
|
2770
|
-
return t && D ? B(t) : he(Le);
|
|
2771
|
-
} else {
|
|
2772
|
-
if (Ze(Pe))
|
|
2773
|
-
return Pe;
|
|
2774
|
-
throw z(G.UNEXPECTED_RETURN_TYPE);
|
|
2775
|
-
}
|
|
2776
|
-
};
|
|
2777
|
-
function Ve(..._) {
|
|
2778
|
-
return _e((I) => Reflect.apply(Vn, null, [I, ..._]), () => $t(..._), "translate", (I) => Reflect.apply(I.t, I, [..._]), (I) => I, (I) => L(I));
|
|
2779
|
-
}
|
|
2780
|
-
function Tt(..._) {
|
|
2781
|
-
const [I, V, B] = _;
|
|
2782
|
-
if (B && !M(B))
|
|
2783
|
-
throw z(G.INVALID_ARGUMENT);
|
|
2784
|
-
return Ve(I, V, J({ resolvedMessage: !0 }, B || {}));
|
|
2785
|
-
}
|
|
2786
|
-
function bt(..._) {
|
|
2787
|
-
return _e((I) => Reflect.apply(kn, null, [I, ..._]), () => wt(..._), "datetime format", (I) => Reflect.apply(I.d, I, [..._]), () => at, (I) => L(I) || H(I));
|
|
2788
|
-
}
|
|
2789
|
-
function It(..._) {
|
|
2790
|
-
return _e((I) => Reflect.apply(Mn, null, [I, ..._]), () => Vt(..._), "number format", (I) => Reflect.apply(I.n, I, [..._]), () => at, (I) => L(I) || H(I));
|
|
2791
|
-
}
|
|
2792
|
-
function ht(_) {
|
|
2793
|
-
return _.map((I) => L(I) || j(I) || F(I) ? $n(String(I)) : I);
|
|
2794
|
-
}
|
|
2795
|
-
const Lt = {
|
|
2796
|
-
normalize: ht,
|
|
2797
|
-
interpolate: (_) => _,
|
|
2798
|
-
type: "vnode"
|
|
2799
|
-
};
|
|
2800
|
-
function Qe(..._) {
|
|
2801
|
-
return _e((I) => {
|
|
2802
|
-
let V;
|
|
2803
|
-
const B = I;
|
|
2804
|
-
try {
|
|
2805
|
-
B.processor = Lt, V = Reflect.apply(Vn, null, [B, ..._]);
|
|
2806
|
-
} finally {
|
|
2807
|
-
B.processor = null;
|
|
2808
|
-
}
|
|
2809
|
-
return V;
|
|
2810
|
-
}, () => $t(..._), "translate", (I) => I[Gt](..._), (I) => [$n(I)], (I) => H(I));
|
|
2811
|
-
}
|
|
2812
|
-
function Ot(..._) {
|
|
2813
|
-
return _e((I) => Reflect.apply(Mn, null, [I, ..._]), () => Vt(..._), "number format", (I) => I[Ht](..._), Gn, (I) => L(I) || H(I));
|
|
2814
|
-
}
|
|
2815
|
-
function qe(..._) {
|
|
2816
|
-
return _e((I) => Reflect.apply(kn, null, [I, ..._]), () => wt(..._), "datetime format", (I) => I[xt](..._), Gn, (I) => L(I) || H(I));
|
|
2817
|
-
}
|
|
2818
|
-
function vt(_) {
|
|
2819
|
-
v = _, p.pluralRules = v;
|
|
2820
|
-
}
|
|
2821
|
-
function Ct(_, I) {
|
|
2822
|
-
return _e(() => {
|
|
2823
|
-
if (!_)
|
|
2824
|
-
return !1;
|
|
2825
|
-
const V = L(I) ? I : i.value, B = Ie(V), he = p.messageResolver(B, _);
|
|
2826
|
-
return se(he) || te(he) || L(he);
|
|
2827
|
-
}, () => [_], "translate exists", (V) => Reflect.apply(V.te, V, [_, I]), io, (V) => F(V));
|
|
2828
|
-
}
|
|
2829
|
-
function $e(_) {
|
|
2830
|
-
let I = null;
|
|
2831
|
-
const V = Nr(p, u.value, i.value);
|
|
2832
|
-
for (let B = 0; B < V.length; B++) {
|
|
2833
|
-
const he = m.value[V[B]] || {}, Ze = p.messageResolver(he, _);
|
|
2834
|
-
if (Ze != null) {
|
|
2835
|
-
I = Ze;
|
|
2836
|
-
break;
|
|
2837
|
-
}
|
|
2838
|
-
}
|
|
2839
|
-
return I;
|
|
2840
|
-
}
|
|
2841
|
-
function We(_) {
|
|
2842
|
-
const I = $e(_);
|
|
2843
|
-
return I ?? (t ? t.tm(_) || {} : {});
|
|
2844
|
-
}
|
|
2845
|
-
function Ie(_) {
|
|
2846
|
-
return m.value[_] || {};
|
|
2847
|
-
}
|
|
2848
|
-
function Ge(_, I) {
|
|
2849
|
-
if (s) {
|
|
2850
|
-
const V = { [_]: I };
|
|
2851
|
-
for (const B in V)
|
|
2852
|
-
oe(V, B) && Xe(V[B]);
|
|
2853
|
-
I = V[_];
|
|
2854
|
-
}
|
|
2855
|
-
m.value[_] = I, p.messages = m.value;
|
|
2856
|
-
}
|
|
2857
|
-
function At(_, I) {
|
|
2858
|
-
m.value[_] = m.value[_] || {};
|
|
2859
|
-
const V = { [_]: I };
|
|
2860
|
-
if (s)
|
|
2861
|
-
for (const B in V)
|
|
2862
|
-
oe(V, B) && Xe(V[B]);
|
|
2863
|
-
I = V[_], st(I, m.value[_]), p.messages = m.value;
|
|
2864
|
-
}
|
|
2865
|
-
function l(_) {
|
|
2866
|
-
return b.value[_] || {};
|
|
2867
|
-
}
|
|
2868
|
-
function c(_, I) {
|
|
2869
|
-
b.value[_] = I, p.datetimeFormats = b.value, Rn(p, _, I);
|
|
2870
|
-
}
|
|
2871
|
-
function g(_, I) {
|
|
2872
|
-
b.value[_] = J(b.value[_] || {}, I), p.datetimeFormats = b.value, Rn(p, _, I);
|
|
2873
|
-
}
|
|
2874
|
-
function y(_) {
|
|
2875
|
-
return T.value[_] || {};
|
|
2876
|
-
}
|
|
2877
|
-
function x(_, I) {
|
|
2878
|
-
T.value[_] = I, p.numberFormats = T.value, Fn(p, _, I);
|
|
2879
|
-
}
|
|
2880
|
-
function K(_, I) {
|
|
2881
|
-
T.value[_] = J(T.value[_] || {}, I), p.numberFormats = T.value, Fn(p, _, I);
|
|
2882
|
-
}
|
|
2883
|
-
xn++, t && le && (Mt(t.locale, (_) => {
|
|
2884
|
-
o && (i.value = _, p.locale = _, xe(p, i.value, u.value));
|
|
2885
|
-
}), Mt(t.fallbackLocale, (_) => {
|
|
2886
|
-
o && (u.value = _, p.fallbackLocale = _, xe(p, i.value, u.value));
|
|
2887
|
-
}));
|
|
2888
|
-
const U = {
|
|
2889
|
-
id: xn,
|
|
2890
|
-
locale: X,
|
|
2891
|
-
fallbackLocale: ae,
|
|
2892
|
-
get inheritLocale() {
|
|
2893
|
-
return o;
|
|
2894
|
-
},
|
|
2895
|
-
set inheritLocale(_) {
|
|
2896
|
-
o = _, _ && t && (i.value = t.locale.value, u.value = t.fallbackLocale.value, xe(p, i.value, u.value));
|
|
2897
|
-
},
|
|
2898
|
-
get availableLocales() {
|
|
2899
|
-
return Object.keys(m.value).sort();
|
|
2900
|
-
},
|
|
2901
|
-
messages: Y,
|
|
2902
|
-
get modifiers() {
|
|
2903
|
-
return O;
|
|
2904
|
-
},
|
|
2905
|
-
get pluralRules() {
|
|
2906
|
-
return v || {};
|
|
2907
|
-
},
|
|
2908
|
-
get isGlobal() {
|
|
2909
|
-
return r;
|
|
2910
|
-
},
|
|
2911
|
-
get missingWarn() {
|
|
2912
|
-
return N;
|
|
2913
|
-
},
|
|
2914
|
-
set missingWarn(_) {
|
|
2915
|
-
N = _, p.missingWarn = N;
|
|
2916
|
-
},
|
|
2917
|
-
get fallbackWarn() {
|
|
2918
|
-
return A;
|
|
2919
|
-
},
|
|
2920
|
-
set fallbackWarn(_) {
|
|
2921
|
-
A = _, p.fallbackWarn = A;
|
|
2922
|
-
},
|
|
2923
|
-
get fallbackRoot() {
|
|
2924
|
-
return D;
|
|
2925
|
-
},
|
|
2926
|
-
set fallbackRoot(_) {
|
|
2927
|
-
D = _;
|
|
2928
|
-
},
|
|
2929
|
-
get fallbackFormat() {
|
|
2930
|
-
return C;
|
|
2931
|
-
},
|
|
2932
|
-
set fallbackFormat(_) {
|
|
2933
|
-
C = _, p.fallbackFormat = C;
|
|
2934
|
-
},
|
|
2935
|
-
get warnHtmlMessage() {
|
|
2936
|
-
return h;
|
|
2937
|
-
},
|
|
2938
|
-
set warnHtmlMessage(_) {
|
|
2939
|
-
h = _, p.warnHtmlMessage = _;
|
|
2940
|
-
},
|
|
2941
|
-
get escapeParameter() {
|
|
2942
|
-
return E;
|
|
2943
|
-
},
|
|
2944
|
-
set escapeParameter(_) {
|
|
2945
|
-
E = _, p.escapeParameter = _;
|
|
2946
|
-
},
|
|
2947
|
-
t: Ve,
|
|
2948
|
-
getLocaleMessage: Ie,
|
|
2949
|
-
setLocaleMessage: Ge,
|
|
2950
|
-
mergeLocaleMessage: At,
|
|
2951
|
-
getPostTranslationHandler: dt,
|
|
2952
|
-
setPostTranslationHandler: Et,
|
|
2953
|
-
getMissingHandler: pt,
|
|
2954
|
-
setMissingHandler: gt,
|
|
2955
|
-
[kr]: vt
|
|
2956
|
-
};
|
|
2957
|
-
return U.datetimeFormats = ye, U.numberFormats = mt, U.rt = Tt, U.te = Ct, U.tm = We, U.d = bt, U.n = It, U.getDateTimeFormat = l, U.setDateTimeFormat = c, U.mergeDateTimeFormat = g, U.getNumberFormat = y, U.setNumberFormat = x, U.mergeNumberFormat = K, U[Rr] = n, U[Gt] = Qe, U[xt] = qe, U[Ht] = Ot, process.env.NODE_ENV !== "production" && (U[Se] = (_) => {
|
|
2958
|
-
p.__v_emitter = _;
|
|
2959
|
-
}, U[je] = () => {
|
|
2960
|
-
p.__v_emitter = void 0;
|
|
2961
|
-
}), U;
|
|
2962
|
-
}
|
|
2963
|
-
const Ur = "vue-i18n: composer properties", Rt = {
|
|
2964
|
-
"vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
|
|
2965
|
-
"vue-i18n-resource-inspector": "Vue I18n DevTools",
|
|
2966
|
-
"vue-i18n-timeline": "Vue I18n"
|
|
2967
|
-
}, uo = {
|
|
2968
|
-
"vue-i18n-resource-inspector": "Search for scopes ..."
|
|
2969
|
-
}, fo = {
|
|
2970
|
-
"vue-i18n-timeline": 16764185
|
|
2971
|
-
};
|
|
2972
|
-
let Kt;
|
|
2973
|
-
async function _o(e, t) {
|
|
2974
|
-
return new Promise((n, r) => {
|
|
2975
|
-
try {
|
|
2976
|
-
ro({
|
|
2977
|
-
id: "vue-devtools-plugin-vue-i18n",
|
|
2978
|
-
label: Rt["vue-devtools-plugin-vue-i18n"],
|
|
2979
|
-
packageName: "vue-i18n",
|
|
2980
|
-
homepage: "https://vue-i18n.intlify.dev",
|
|
2981
|
-
logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
|
|
2982
|
-
componentStateTypes: [Ur],
|
|
2983
|
-
app: e
|
|
2984
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2985
|
-
}, (s) => {
|
|
2986
|
-
Kt = s, s.on.visitComponentTree(({ componentInstance: o, treeNode: i }) => {
|
|
2987
|
-
mo(o, i, t);
|
|
2988
|
-
}), s.on.inspectComponent(({ componentInstance: o, instanceData: i }) => {
|
|
2989
|
-
o.__VUE_I18N__ && i && (t.mode === "legacy" ? o.__VUE_I18N__ !== t.global.__composer && Yn(i, o.__VUE_I18N__) : Yn(i, o.__VUE_I18N__));
|
|
2990
|
-
}), s.addInspector({
|
|
2991
|
-
id: "vue-i18n-resource-inspector",
|
|
2992
|
-
label: Rt["vue-i18n-resource-inspector"],
|
|
2993
|
-
icon: "language",
|
|
2994
|
-
treeFilterPlaceholder: uo["vue-i18n-resource-inspector"]
|
|
2995
|
-
}), s.on.getInspectorTree((o) => {
|
|
2996
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && To(o, t);
|
|
2997
|
-
});
|
|
2998
|
-
const a = /* @__PURE__ */ new Map();
|
|
2999
|
-
s.on.getInspectorState(async (o) => {
|
|
3000
|
-
if (o.app === e && o.inspectorId === "vue-i18n-resource-inspector")
|
|
3001
|
-
if (s.unhighlightElement(), Io(o, t), o.nodeId === "global") {
|
|
3002
|
-
if (!a.has(o.app)) {
|
|
3003
|
-
const [i] = await s.getComponentInstances(o.app);
|
|
3004
|
-
a.set(o.app, i);
|
|
3005
|
-
}
|
|
3006
|
-
s.highlightElement(a.get(o.app));
|
|
3007
|
-
} else {
|
|
3008
|
-
const i = bo(o.nodeId, t);
|
|
3009
|
-
i && s.highlightElement(i);
|
|
3010
|
-
}
|
|
3011
|
-
}), s.on.editInspectorState((o) => {
|
|
3012
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && Lo(o, t);
|
|
3013
|
-
}), s.addTimelineLayer({
|
|
3014
|
-
id: "vue-i18n-timeline",
|
|
3015
|
-
label: Rt["vue-i18n-timeline"],
|
|
3016
|
-
color: fo["vue-i18n-timeline"]
|
|
3017
|
-
}), n(!0);
|
|
3018
|
-
});
|
|
3019
|
-
} catch (s) {
|
|
3020
|
-
console.error(s), r(!1);
|
|
3021
|
-
}
|
|
3022
|
-
});
|
|
3023
|
-
}
|
|
3024
|
-
function wr(e) {
|
|
3025
|
-
return e.type.name || e.type.displayName || e.type.__file || "Anonymous";
|
|
3026
|
-
}
|
|
3027
|
-
function mo(e, t, n) {
|
|
3028
|
-
const r = n.mode === "composition" ? n.global : n.global.__composer;
|
|
3029
|
-
if (e && e.__VUE_I18N__ && e.__VUE_I18N__ !== r) {
|
|
3030
|
-
const s = {
|
|
3031
|
-
label: `i18n (${wr(e)} Scope)`,
|
|
3032
|
-
textColor: 0,
|
|
3033
|
-
backgroundColor: 16764185
|
|
3034
|
-
};
|
|
3035
|
-
t.tags.push(s);
|
|
3036
|
-
}
|
|
3037
|
-
}
|
|
3038
|
-
function Yn(e, t) {
|
|
3039
|
-
const n = Ur;
|
|
3040
|
-
e.state.push({
|
|
3041
|
-
type: n,
|
|
3042
|
-
key: "locale",
|
|
3043
|
-
editable: !0,
|
|
3044
|
-
value: t.locale.value
|
|
3045
|
-
}), e.state.push({
|
|
3046
|
-
type: n,
|
|
3047
|
-
key: "availableLocales",
|
|
3048
|
-
editable: !1,
|
|
3049
|
-
value: t.availableLocales
|
|
3050
|
-
}), e.state.push({
|
|
3051
|
-
type: n,
|
|
3052
|
-
key: "fallbackLocale",
|
|
3053
|
-
editable: !0,
|
|
3054
|
-
value: t.fallbackLocale.value
|
|
3055
|
-
}), e.state.push({
|
|
3056
|
-
type: n,
|
|
3057
|
-
key: "inheritLocale",
|
|
3058
|
-
editable: !0,
|
|
3059
|
-
value: t.inheritLocale
|
|
3060
|
-
}), e.state.push({
|
|
3061
|
-
type: n,
|
|
3062
|
-
key: "messages",
|
|
3063
|
-
editable: !1,
|
|
3064
|
-
value: fn(t.messages.value)
|
|
3065
|
-
}), e.state.push({
|
|
3066
|
-
type: n,
|
|
3067
|
-
key: "datetimeFormats",
|
|
3068
|
-
editable: !1,
|
|
3069
|
-
value: t.datetimeFormats.value
|
|
3070
|
-
}), e.state.push({
|
|
3071
|
-
type: n,
|
|
3072
|
-
key: "numberFormats",
|
|
3073
|
-
editable: !1,
|
|
3074
|
-
value: t.numberFormats.value
|
|
3075
|
-
});
|
|
3076
|
-
}
|
|
3077
|
-
function fn(e) {
|
|
3078
|
-
const t = {};
|
|
3079
|
-
return Object.keys(e).forEach((n) => {
|
|
3080
|
-
const r = e[n];
|
|
3081
|
-
W(r) && "source" in r ? t[n] = No(r) : se(r) && r.loc && r.loc.source ? t[n] = r.loc.source : M(r) ? t[n] = fn(r) : t[n] = r;
|
|
3082
|
-
}), t;
|
|
3083
|
-
}
|
|
3084
|
-
const Eo = {
|
|
3085
|
-
"<": "<",
|
|
3086
|
-
">": ">",
|
|
3087
|
-
'"': """,
|
|
3088
|
-
"&": "&"
|
|
3089
|
-
};
|
|
3090
|
-
function po(e) {
|
|
3091
|
-
return e.replace(/[<>"&]/g, go);
|
|
3092
|
-
}
|
|
3093
|
-
function go(e) {
|
|
3094
|
-
return Eo[e] || e;
|
|
3095
|
-
}
|
|
3096
|
-
function No(e) {
|
|
3097
|
-
return {
|
|
3098
|
-
_custom: {
|
|
3099
|
-
type: "function",
|
|
3100
|
-
display: `<span>ƒ</span> ${e.source ? `("${po(e.source)}")` : "(?)"}`
|
|
3101
|
-
}
|
|
3102
|
-
};
|
|
3103
|
-
}
|
|
3104
|
-
function To(e, t) {
|
|
3105
|
-
e.rootNodes.push({
|
|
3106
|
-
id: "global",
|
|
3107
|
-
label: "Global Scope"
|
|
3108
|
-
});
|
|
3109
|
-
const n = t.mode === "composition" ? t.global : t.global.__composer;
|
|
3110
|
-
for (const [r, s] of t.__instances) {
|
|
3111
|
-
const a = t.mode === "composition" ? s : s.__composer;
|
|
3112
|
-
n !== a && e.rootNodes.push({
|
|
3113
|
-
id: a.id.toString(),
|
|
3114
|
-
label: `${wr(r)} Scope`
|
|
3115
|
-
});
|
|
3116
|
-
}
|
|
3117
|
-
}
|
|
3118
|
-
function bo(e, t) {
|
|
3119
|
-
let n = null;
|
|
3120
|
-
if (e !== "global") {
|
|
3121
|
-
for (const [r, s] of t.__instances.entries())
|
|
3122
|
-
if (s.id.toString() === e) {
|
|
3123
|
-
n = r;
|
|
3124
|
-
break;
|
|
3125
|
-
}
|
|
3126
|
-
}
|
|
3127
|
-
return n;
|
|
3128
|
-
}
|
|
3129
|
-
function Vr(e, t) {
|
|
3130
|
-
if (e === "global")
|
|
3131
|
-
return t.mode === "composition" ? t.global : t.global.__composer;
|
|
3132
|
-
{
|
|
3133
|
-
const n = Array.from(t.__instances.values()).find((r) => r.id.toString() === e);
|
|
3134
|
-
return n ? t.mode === "composition" ? n : n.__composer : null;
|
|
3135
|
-
}
|
|
3136
|
-
}
|
|
3137
|
-
function Io(e, t) {
|
|
3138
|
-
const n = Vr(e.nodeId, t);
|
|
3139
|
-
return n && (e.state = ho(n)), null;
|
|
3140
|
-
}
|
|
3141
|
-
function ho(e) {
|
|
3142
|
-
const t = {}, n = "Locale related info", r = [
|
|
3143
|
-
{
|
|
3144
|
-
type: n,
|
|
3145
|
-
key: "locale",
|
|
3146
|
-
editable: !0,
|
|
3147
|
-
value: e.locale.value
|
|
3148
|
-
},
|
|
3149
|
-
{
|
|
3150
|
-
type: n,
|
|
3151
|
-
key: "fallbackLocale",
|
|
3152
|
-
editable: !0,
|
|
3153
|
-
value: e.fallbackLocale.value
|
|
3154
|
-
},
|
|
3155
|
-
{
|
|
3156
|
-
type: n,
|
|
3157
|
-
key: "availableLocales",
|
|
3158
|
-
editable: !1,
|
|
3159
|
-
value: e.availableLocales
|
|
3160
|
-
},
|
|
3161
|
-
{
|
|
3162
|
-
type: n,
|
|
3163
|
-
key: "inheritLocale",
|
|
3164
|
-
editable: !0,
|
|
3165
|
-
value: e.inheritLocale
|
|
3166
|
-
}
|
|
3167
|
-
];
|
|
3168
|
-
t[n] = r;
|
|
3169
|
-
const s = "Locale messages info", a = [
|
|
3170
|
-
{
|
|
3171
|
-
type: s,
|
|
3172
|
-
key: "messages",
|
|
3173
|
-
editable: !1,
|
|
3174
|
-
value: fn(e.messages.value)
|
|
3175
|
-
}
|
|
3176
|
-
];
|
|
3177
|
-
t[s] = a;
|
|
3178
|
-
{
|
|
3179
|
-
const o = "Datetime formats info", i = [
|
|
3180
|
-
{
|
|
3181
|
-
type: o,
|
|
3182
|
-
key: "datetimeFormats",
|
|
3183
|
-
editable: !1,
|
|
3184
|
-
value: e.datetimeFormats.value
|
|
3185
|
-
}
|
|
3186
|
-
];
|
|
3187
|
-
t[o] = i;
|
|
3188
|
-
const u = "Datetime formats info", m = [
|
|
3189
|
-
{
|
|
3190
|
-
type: u,
|
|
3191
|
-
key: "numberFormats",
|
|
3192
|
-
editable: !1,
|
|
3193
|
-
value: e.numberFormats.value
|
|
3194
|
-
}
|
|
3195
|
-
];
|
|
3196
|
-
t[u] = m;
|
|
3197
|
-
}
|
|
3198
|
-
return t;
|
|
3199
|
-
}
|
|
3200
|
-
function Je(e, t) {
|
|
3201
|
-
if (Kt) {
|
|
3202
|
-
let n;
|
|
3203
|
-
t && "groupId" in t && (n = t.groupId, delete t.groupId), Kt.addTimelineEvent({
|
|
3204
|
-
layerId: "vue-i18n-timeline",
|
|
3205
|
-
event: {
|
|
3206
|
-
title: e,
|
|
3207
|
-
groupId: n,
|
|
3208
|
-
time: Date.now(),
|
|
3209
|
-
meta: {},
|
|
3210
|
-
data: t || {},
|
|
3211
|
-
logType: e === "compile-error" ? "error" : e === "fallback" || e === "missing" ? "warning" : "default"
|
|
3212
|
-
}
|
|
3213
|
-
});
|
|
3214
|
-
}
|
|
3215
|
-
}
|
|
3216
|
-
function Lo(e, t) {
|
|
3217
|
-
const n = Vr(e.nodeId, t);
|
|
3218
|
-
if (n) {
|
|
3219
|
-
const [r] = e.path;
|
|
3220
|
-
r === "locale" && L(e.state.value) ? n.locale.value = e.state.value : r === "fallbackLocale" && (L(e.state.value) || H(e.state.value) || M(e.state.value)) ? n.fallbackLocale.value = e.state.value : r === "inheritLocale" && F(e.state.value) && (n.inheritLocale = e.state.value);
|
|
3221
|
-
}
|
|
3222
|
-
}
|
|
3223
|
-
function Oo(e) {
|
|
3224
|
-
const t = L(e.locale) ? e.locale : Be, n = L(e.fallbackLocale) || H(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, r = W(e.missing) ? e.missing : void 0, s = F(e.silentTranslationWarn) || Me(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, a = F(e.silentFallbackWarn) || Me(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, o = F(e.fallbackRoot) ? e.fallbackRoot : !0, i = !!e.formatFallbackMessages, u = R(e.modifiers) ? e.modifiers : {}, m = e.pluralizationRules, b = W(e.postTranslation) ? e.postTranslation : void 0, T = L(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, N = !!e.escapeParameterHtml, A = F(e.sync) ? e.sync : !0;
|
|
3225
|
-
let D = e.messages;
|
|
3226
|
-
if (R(e.sharedMessages)) {
|
|
3227
|
-
const O = e.sharedMessages;
|
|
3228
|
-
D = Object.keys(O).reduce((p, k) => {
|
|
3229
|
-
const w = p[k] || (p[k] = {});
|
|
3230
|
-
return J(w, O[k]), p;
|
|
3231
|
-
}, D || {});
|
|
3232
|
-
}
|
|
3233
|
-
const { __i18n: C, __root: S, __injectWithOption: f } = e, d = e.datetimeFormats, h = e.numberFormats, E = e.flatJson;
|
|
3234
|
-
return {
|
|
3235
|
-
locale: t,
|
|
3236
|
-
fallbackLocale: n,
|
|
3237
|
-
messages: D,
|
|
3238
|
-
flatJson: E,
|
|
3239
|
-
datetimeFormats: d,
|
|
3240
|
-
numberFormats: h,
|
|
3241
|
-
missing: r,
|
|
3242
|
-
missingWarn: s,
|
|
3243
|
-
fallbackWarn: a,
|
|
3244
|
-
fallbackRoot: o,
|
|
3245
|
-
fallbackFormat: i,
|
|
3246
|
-
modifiers: u,
|
|
3247
|
-
pluralRules: m,
|
|
3248
|
-
postTranslation: b,
|
|
3249
|
-
warnHtmlMessage: T,
|
|
3250
|
-
escapeParameter: N,
|
|
3251
|
-
messageResolver: e.messageResolver,
|
|
3252
|
-
inheritLocale: A,
|
|
3253
|
-
__i18n: C,
|
|
3254
|
-
__root: S,
|
|
3255
|
-
__injectWithOption: f
|
|
3256
|
-
};
|
|
3257
|
-
}
|
|
3258
|
-
function Bt(e = {}) {
|
|
3259
|
-
const t = un(Oo(e)), { __extender: n } = e, r = {
|
|
3260
|
-
// id
|
|
3261
|
-
id: t.id,
|
|
3262
|
-
// locale
|
|
3263
|
-
get locale() {
|
|
3264
|
-
return t.locale.value;
|
|
3265
|
-
},
|
|
3266
|
-
set locale(s) {
|
|
3267
|
-
t.locale.value = s;
|
|
3268
|
-
},
|
|
3269
|
-
// fallbackLocale
|
|
3270
|
-
get fallbackLocale() {
|
|
3271
|
-
return t.fallbackLocale.value;
|
|
3272
|
-
},
|
|
3273
|
-
set fallbackLocale(s) {
|
|
3274
|
-
t.fallbackLocale.value = s;
|
|
3275
|
-
},
|
|
3276
|
-
// messages
|
|
3277
|
-
get messages() {
|
|
3278
|
-
return t.messages.value;
|
|
3279
|
-
},
|
|
3280
|
-
// datetimeFormats
|
|
3281
|
-
get datetimeFormats() {
|
|
3282
|
-
return t.datetimeFormats.value;
|
|
3283
|
-
},
|
|
3284
|
-
// numberFormats
|
|
3285
|
-
get numberFormats() {
|
|
3286
|
-
return t.numberFormats.value;
|
|
3287
|
-
},
|
|
3288
|
-
// availableLocales
|
|
3289
|
-
get availableLocales() {
|
|
3290
|
-
return t.availableLocales;
|
|
3291
|
-
},
|
|
3292
|
-
// missing
|
|
3293
|
-
get missing() {
|
|
3294
|
-
return t.getMissingHandler();
|
|
3295
|
-
},
|
|
3296
|
-
set missing(s) {
|
|
3297
|
-
t.setMissingHandler(s);
|
|
3298
|
-
},
|
|
3299
|
-
// silentTranslationWarn
|
|
3300
|
-
get silentTranslationWarn() {
|
|
3301
|
-
return F(t.missingWarn) ? !t.missingWarn : t.missingWarn;
|
|
3302
|
-
},
|
|
3303
|
-
set silentTranslationWarn(s) {
|
|
3304
|
-
t.missingWarn = F(s) ? !s : s;
|
|
3305
|
-
},
|
|
3306
|
-
// silentFallbackWarn
|
|
3307
|
-
get silentFallbackWarn() {
|
|
3308
|
-
return F(t.fallbackWarn) ? !t.fallbackWarn : t.fallbackWarn;
|
|
3309
|
-
},
|
|
3310
|
-
set silentFallbackWarn(s) {
|
|
3311
|
-
t.fallbackWarn = F(s) ? !s : s;
|
|
3312
|
-
},
|
|
3313
|
-
// modifiers
|
|
3314
|
-
get modifiers() {
|
|
3315
|
-
return t.modifiers;
|
|
3316
|
-
},
|
|
3317
|
-
// formatFallbackMessages
|
|
3318
|
-
get formatFallbackMessages() {
|
|
3319
|
-
return t.fallbackFormat;
|
|
3320
|
-
},
|
|
3321
|
-
set formatFallbackMessages(s) {
|
|
3322
|
-
t.fallbackFormat = s;
|
|
3323
|
-
},
|
|
3324
|
-
// postTranslation
|
|
3325
|
-
get postTranslation() {
|
|
3326
|
-
return t.getPostTranslationHandler();
|
|
3327
|
-
},
|
|
3328
|
-
set postTranslation(s) {
|
|
3329
|
-
t.setPostTranslationHandler(s);
|
|
3330
|
-
},
|
|
3331
|
-
// sync
|
|
3332
|
-
get sync() {
|
|
3333
|
-
return t.inheritLocale;
|
|
3334
|
-
},
|
|
3335
|
-
set sync(s) {
|
|
3336
|
-
t.inheritLocale = s;
|
|
3337
|
-
},
|
|
3338
|
-
// warnInHtmlMessage
|
|
3339
|
-
get warnHtmlInMessage() {
|
|
3340
|
-
return t.warnHtmlMessage ? "warn" : "off";
|
|
3341
|
-
},
|
|
3342
|
-
set warnHtmlInMessage(s) {
|
|
3343
|
-
t.warnHtmlMessage = s !== "off";
|
|
3344
|
-
},
|
|
3345
|
-
// escapeParameterHtml
|
|
3346
|
-
get escapeParameterHtml() {
|
|
3347
|
-
return t.escapeParameter;
|
|
3348
|
-
},
|
|
3349
|
-
set escapeParameterHtml(s) {
|
|
3350
|
-
t.escapeParameter = s;
|
|
3351
|
-
},
|
|
3352
|
-
// pluralizationRules
|
|
3353
|
-
get pluralizationRules() {
|
|
3354
|
-
return t.pluralRules || {};
|
|
3355
|
-
},
|
|
3356
|
-
// for internal
|
|
3357
|
-
__composer: t,
|
|
3358
|
-
// t
|
|
3359
|
-
t(...s) {
|
|
3360
|
-
return Reflect.apply(t.t, t, [...s]);
|
|
3361
|
-
},
|
|
3362
|
-
// rt
|
|
3363
|
-
rt(...s) {
|
|
3364
|
-
return Reflect.apply(t.rt, t, [...s]);
|
|
3365
|
-
},
|
|
3366
|
-
// te
|
|
3367
|
-
te(s, a) {
|
|
3368
|
-
return t.te(s, a);
|
|
3369
|
-
},
|
|
3370
|
-
// tm
|
|
3371
|
-
tm(s) {
|
|
3372
|
-
return t.tm(s);
|
|
3373
|
-
},
|
|
3374
|
-
// getLocaleMessage
|
|
3375
|
-
getLocaleMessage(s) {
|
|
3376
|
-
return t.getLocaleMessage(s);
|
|
3377
|
-
},
|
|
3378
|
-
// setLocaleMessage
|
|
3379
|
-
setLocaleMessage(s, a) {
|
|
3380
|
-
t.setLocaleMessage(s, a);
|
|
3381
|
-
},
|
|
3382
|
-
// mergeLocaleMessage
|
|
3383
|
-
mergeLocaleMessage(s, a) {
|
|
3384
|
-
t.mergeLocaleMessage(s, a);
|
|
3385
|
-
},
|
|
3386
|
-
// d
|
|
3387
|
-
d(...s) {
|
|
3388
|
-
return Reflect.apply(t.d, t, [...s]);
|
|
3389
|
-
},
|
|
3390
|
-
// getDateTimeFormat
|
|
3391
|
-
getDateTimeFormat(s) {
|
|
3392
|
-
return t.getDateTimeFormat(s);
|
|
3393
|
-
},
|
|
3394
|
-
// setDateTimeFormat
|
|
3395
|
-
setDateTimeFormat(s, a) {
|
|
3396
|
-
t.setDateTimeFormat(s, a);
|
|
3397
|
-
},
|
|
3398
|
-
// mergeDateTimeFormat
|
|
3399
|
-
mergeDateTimeFormat(s, a) {
|
|
3400
|
-
t.mergeDateTimeFormat(s, a);
|
|
3401
|
-
},
|
|
3402
|
-
// n
|
|
3403
|
-
n(...s) {
|
|
3404
|
-
return Reflect.apply(t.n, t, [...s]);
|
|
3405
|
-
},
|
|
3406
|
-
// getNumberFormat
|
|
3407
|
-
getNumberFormat(s) {
|
|
3408
|
-
return t.getNumberFormat(s);
|
|
3409
|
-
},
|
|
3410
|
-
// setNumberFormat
|
|
3411
|
-
setNumberFormat(s, a) {
|
|
3412
|
-
t.setNumberFormat(s, a);
|
|
3413
|
-
},
|
|
3414
|
-
// mergeNumberFormat
|
|
3415
|
-
mergeNumberFormat(s, a) {
|
|
3416
|
-
t.mergeNumberFormat(s, a);
|
|
3417
|
-
}
|
|
3418
|
-
};
|
|
3419
|
-
return r.__extender = n, process.env.NODE_ENV !== "production" && (r.__enableEmitter = (s) => {
|
|
3420
|
-
const a = t;
|
|
3421
|
-
a[Se] && a[Se](s);
|
|
3422
|
-
}, r.__disableEmitter = () => {
|
|
3423
|
-
const s = t;
|
|
3424
|
-
s[je] && s[je]();
|
|
3425
|
-
}), r;
|
|
3426
|
-
}
|
|
3427
|
-
function vo(e, t, n) {
|
|
3428
|
-
return {
|
|
3429
|
-
beforeCreate() {
|
|
3430
|
-
const r = Re();
|
|
3431
|
-
if (!r)
|
|
3432
|
-
throw z(G.UNEXPECTED_ERROR);
|
|
3433
|
-
const s = this.$options;
|
|
3434
|
-
if (s.i18n) {
|
|
3435
|
-
const a = s.i18n;
|
|
3436
|
-
if (s.__i18n && (a.__i18n = s.__i18n), a.__root = t, this === this.$root)
|
|
3437
|
-
this.$i18n = Kn(e, a);
|
|
3438
|
-
else {
|
|
3439
|
-
a.__injectWithOption = !0, a.__extender = n.__vueI18nExtend, this.$i18n = Bt(a);
|
|
3440
|
-
const o = this.$i18n;
|
|
3441
|
-
o.__extender && (o.__disposer = o.__extender(this.$i18n));
|
|
3442
|
-
}
|
|
3443
|
-
} else if (s.__i18n)
|
|
3444
|
-
if (this === this.$root)
|
|
3445
|
-
this.$i18n = Kn(e, s);
|
|
3446
|
-
else {
|
|
3447
|
-
this.$i18n = Bt({
|
|
3448
|
-
__i18n: s.__i18n,
|
|
3449
|
-
__injectWithOption: !0,
|
|
3450
|
-
__extender: n.__vueI18nExtend,
|
|
3451
|
-
__root: t
|
|
3452
|
-
});
|
|
3453
|
-
const a = this.$i18n;
|
|
3454
|
-
a.__extender && (a.__disposer = a.__extender(this.$i18n));
|
|
3455
|
-
}
|
|
3456
|
-
else
|
|
3457
|
-
this.$i18n = e;
|
|
3458
|
-
s.__i18nGlobal && Fr(t, s, s), this.$t = (...a) => this.$i18n.t(...a), this.$rt = (...a) => this.$i18n.rt(...a), this.$te = (a, o) => this.$i18n.te(a, o), this.$d = (...a) => this.$i18n.d(...a), this.$n = (...a) => this.$i18n.n(...a), this.$tm = (a) => this.$i18n.tm(a), n.__setInstance(r, this.$i18n);
|
|
3459
|
-
},
|
|
3460
|
-
mounted() {
|
|
3461
|
-
if (process.env.NODE_ENV !== "production" && this.$i18n) {
|
|
3462
|
-
const r = Re();
|
|
3463
|
-
if (!r)
|
|
3464
|
-
return;
|
|
3465
|
-
const s = this.$i18n;
|
|
3466
|
-
r.__VUE_I18N__ = s.__composer;
|
|
3467
|
-
const a = this.__v_emitter = rn();
|
|
3468
|
-
s.__enableEmitter && s.__enableEmitter(a), a.on("*", Je);
|
|
3469
|
-
}
|
|
3470
|
-
},
|
|
3471
|
-
unmounted() {
|
|
3472
|
-
const r = Re();
|
|
3473
|
-
if (!r)
|
|
3474
|
-
throw z(G.UNEXPECTED_ERROR);
|
|
3475
|
-
const s = this.$i18n;
|
|
3476
|
-
process.env.NODE_ENV !== "production" && r.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", Je), delete this.__v_emitter), this.$i18n && (s.__disableEmitter && s.__disableEmitter(), delete r.__VUE_I18N__)), delete this.$t, delete this.$rt, delete this.$te, delete this.$d, delete this.$n, delete this.$tm, s.__disposer && (s.__disposer(), delete s.__disposer, delete s.__extender), n.__deleteInstance(r), delete this.$i18n;
|
|
3477
|
-
}
|
|
3478
|
-
};
|
|
3479
|
-
}
|
|
3480
|
-
function Kn(e, t) {
|
|
3481
|
-
e.locale = t.locale || e.locale, e.fallbackLocale = t.fallbackLocale || e.fallbackLocale, e.missing = t.missing || e.missing, e.silentTranslationWarn = t.silentTranslationWarn || e.silentFallbackWarn, e.silentFallbackWarn = t.silentFallbackWarn || e.silentFallbackWarn, e.formatFallbackMessages = t.formatFallbackMessages || e.formatFallbackMessages, e.postTranslation = t.postTranslation || e.postTranslation, e.warnHtmlInMessage = t.warnHtmlInMessage || e.warnHtmlInMessage, e.escapeParameterHtml = t.escapeParameterHtml || e.escapeParameterHtml, e.sync = t.sync || e.sync, e.__composer[kr](t.pluralizationRules || e.pluralizationRules);
|
|
3482
|
-
const n = cn(e.locale, {
|
|
3483
|
-
messages: t.messages,
|
|
3484
|
-
__i18n: t.__i18n
|
|
3485
|
-
});
|
|
3486
|
-
return Object.keys(n).forEach((r) => e.mergeLocaleMessage(r, n[r])), t.datetimeFormats && Object.keys(t.datetimeFormats).forEach((r) => e.mergeDateTimeFormat(r, t.datetimeFormats[r])), t.numberFormats && Object.keys(t.numberFormats).forEach((r) => e.mergeNumberFormat(r, t.numberFormats[r])), e;
|
|
3487
|
-
}
|
|
3488
|
-
const _n = {
|
|
3489
|
-
tag: {
|
|
3490
|
-
type: [String, Object]
|
|
3491
|
-
},
|
|
3492
|
-
locale: {
|
|
3493
|
-
type: String
|
|
3494
|
-
},
|
|
3495
|
-
scope: {
|
|
3496
|
-
type: String,
|
|
3497
|
-
// NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
|
|
3498
|
-
validator: (e) => e === "parent" || e === "global",
|
|
3499
|
-
default: "parent"
|
|
3500
|
-
/* ComponentI18nScope */
|
|
3501
|
-
},
|
|
3502
|
-
i18n: {
|
|
3503
|
-
type: Object
|
|
3504
|
-
}
|
|
3505
|
-
};
|
|
3506
|
-
function Co({ slots: e }, t) {
|
|
3507
|
-
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, s) => [
|
|
3508
|
-
...r,
|
|
3509
|
-
// prettier-ignore
|
|
3510
|
-
...s.type === Jt ? s.children : [s]
|
|
3511
|
-
], []) : t.reduce((n, r) => {
|
|
3512
|
-
const s = e[r];
|
|
3513
|
-
return s && (n[r] = s()), n;
|
|
3514
|
-
}, $());
|
|
3515
|
-
}
|
|
3516
|
-
function $r() {
|
|
3517
|
-
return Jt;
|
|
3518
|
-
}
|
|
3519
|
-
const Ao = /* @__PURE__ */ pe({
|
|
3520
|
-
/* eslint-disable */
|
|
3521
|
-
name: "i18n-t",
|
|
3522
|
-
props: J({
|
|
3523
|
-
keypath: {
|
|
3524
|
-
type: String,
|
|
3525
|
-
required: !0
|
|
3526
|
-
},
|
|
3527
|
-
plural: {
|
|
3528
|
-
type: [Number, String],
|
|
3529
|
-
validator: (e) => j(e) || !isNaN(e)
|
|
3530
|
-
}
|
|
3531
|
-
}, _n),
|
|
3532
|
-
/* eslint-enable */
|
|
3533
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3534
|
-
setup(e, t) {
|
|
3535
|
-
const { slots: n, attrs: r } = t, s = e.i18n || mn({
|
|
3536
|
-
useScope: e.scope,
|
|
3537
|
-
__useComponent: !0
|
|
3538
|
-
});
|
|
3539
|
-
return () => {
|
|
3540
|
-
const a = Object.keys(n).filter((T) => T[0] !== "_"), o = $();
|
|
3541
|
-
e.locale && (o.locale = e.locale), e.plural !== void 0 && (o.plural = L(e.plural) ? +e.plural : e.plural);
|
|
3542
|
-
const i = Co(t, a), u = s[Gt](e.keypath, i, o), m = J($(), r), b = L(e.tag) || M(e.tag) ? e.tag : $r();
|
|
3543
|
-
return rr(b, m, u);
|
|
3544
|
-
};
|
|
3545
|
-
}
|
|
3546
|
-
}), Bn = Ao;
|
|
3547
|
-
function So(e) {
|
|
3548
|
-
return H(e) && !L(e[0]);
|
|
3549
|
-
}
|
|
3550
|
-
function Wr(e, t, n, r) {
|
|
3551
|
-
const { slots: s, attrs: a } = t;
|
|
3552
|
-
return () => {
|
|
3553
|
-
const o = { part: !0 };
|
|
3554
|
-
let i = $();
|
|
3555
|
-
e.locale && (o.locale = e.locale), L(e.format) ? o.key = e.format : M(e.format) && (L(e.format.key) && (o.key = e.format.key), i = Object.keys(e.format).reduce((N, A) => n.includes(A) ? J($(), N, { [A]: e.format[A] }) : N, $()));
|
|
3556
|
-
const u = r(e.value, o, i);
|
|
3557
|
-
let m = [o.key];
|
|
3558
|
-
H(u) ? m = u.map((N, A) => {
|
|
3559
|
-
const D = s[N.type], C = D ? D({ [N.type]: N.value, index: A, parts: u }) : [N.value];
|
|
3560
|
-
return So(C) && (C[0].key = `${N.type}-${A}`), C;
|
|
3561
|
-
}) : L(u) && (m = [u]);
|
|
3562
|
-
const b = J($(), a), T = L(e.tag) || M(e.tag) ? e.tag : $r();
|
|
3563
|
-
return rr(T, b, m);
|
|
3564
|
-
};
|
|
3565
|
-
}
|
|
3566
|
-
const yo = /* @__PURE__ */ pe({
|
|
3567
|
-
/* eslint-disable */
|
|
3568
|
-
name: "i18n-n",
|
|
3569
|
-
props: J({
|
|
3570
|
-
value: {
|
|
3571
|
-
type: Number,
|
|
3572
|
-
required: !0
|
|
3573
|
-
},
|
|
3574
|
-
format: {
|
|
3575
|
-
type: [String, Object]
|
|
3576
|
-
}
|
|
3577
|
-
}, _n),
|
|
3578
|
-
/* eslint-enable */
|
|
3579
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3580
|
-
setup(e, t) {
|
|
3581
|
-
const n = e.i18n || mn({
|
|
3582
|
-
useScope: e.scope,
|
|
3583
|
-
__useComponent: !0
|
|
3584
|
-
});
|
|
3585
|
-
return Wr(e, t, Sr, (...r) => (
|
|
3586
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3587
|
-
n[Ht](...r)
|
|
3588
|
-
));
|
|
3589
|
-
}
|
|
3590
|
-
}), jn = yo;
|
|
3591
|
-
function Po(e, t) {
|
|
3592
|
-
const n = e;
|
|
3593
|
-
if (e.mode === "composition")
|
|
3594
|
-
return n.__getInstance(t) || e.global;
|
|
3595
|
-
{
|
|
3596
|
-
const r = n.__getInstance(t);
|
|
3597
|
-
return r != null ? r.__composer : e.global.__composer;
|
|
3598
|
-
}
|
|
3599
|
-
}
|
|
3600
|
-
function Do(e) {
|
|
3601
|
-
const t = (o) => {
|
|
3602
|
-
process.env.NODE_ENV !== "production" && en(Ue(ne.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
|
|
3603
|
-
const { instance: i, value: u } = o;
|
|
3604
|
-
if (!i || !i.$)
|
|
3605
|
-
throw z(G.UNEXPECTED_ERROR);
|
|
3606
|
-
const m = Po(e, i.$), b = Xn(u);
|
|
3607
|
-
return [
|
|
3608
|
-
Reflect.apply(m.t, m, [...Jn(b)]),
|
|
3609
|
-
m
|
|
3610
|
-
];
|
|
3611
|
-
};
|
|
3612
|
-
return {
|
|
3613
|
-
created: (o, i) => {
|
|
3614
|
-
const [u, m] = t(i);
|
|
3615
|
-
le && e.global === m && (o.__i18nWatcher = Mt(m.locale, () => {
|
|
3616
|
-
i.instance && i.instance.$forceUpdate();
|
|
3617
|
-
})), o.__composer = m, o.textContent = u;
|
|
3618
|
-
},
|
|
3619
|
-
unmounted: (o) => {
|
|
3620
|
-
le && o.__i18nWatcher && (o.__i18nWatcher(), o.__i18nWatcher = void 0, delete o.__i18nWatcher), o.__composer && (o.__composer = void 0, delete o.__composer);
|
|
3621
|
-
},
|
|
3622
|
-
beforeUpdate: (o, { value: i }) => {
|
|
3623
|
-
if (o.__composer) {
|
|
3624
|
-
const u = o.__composer, m = Xn(i);
|
|
3625
|
-
o.textContent = Reflect.apply(u.t, u, [
|
|
3626
|
-
...Jn(m)
|
|
3627
|
-
]);
|
|
3628
|
-
}
|
|
3629
|
-
},
|
|
3630
|
-
getSSRProps: (o) => {
|
|
3631
|
-
const [i] = t(o);
|
|
3632
|
-
return { textContent: i };
|
|
3633
|
-
}
|
|
3634
|
-
};
|
|
3635
|
-
}
|
|
3636
|
-
function Xn(e) {
|
|
3637
|
-
if (L(e))
|
|
3638
|
-
return { path: e };
|
|
3639
|
-
if (R(e)) {
|
|
3640
|
-
if (!("path" in e))
|
|
3641
|
-
throw z(G.REQUIRED_VALUE, "path");
|
|
3642
|
-
return e;
|
|
3643
|
-
} else
|
|
3644
|
-
throw z(G.INVALID_VALUE);
|
|
3645
|
-
}
|
|
3646
|
-
function Jn(e) {
|
|
3647
|
-
const { path: t, locale: n, args: r, choice: s, plural: a } = e, o = {}, i = r || {};
|
|
3648
|
-
return L(n) && (o.locale = n), j(s) && (o.plural = s), j(a) && (o.plural = a), [t, i, o];
|
|
3649
|
-
}
|
|
3650
|
-
function ko(e, t, ...n) {
|
|
3651
|
-
const r = R(n[0]) ? n[0] : {};
|
|
3652
|
-
(!F(r.globalInstall) || r.globalInstall) && ([Bn.name, "I18nT"].forEach((a) => e.component(a, Bn)), [jn.name, "I18nN"].forEach((a) => e.component(a, jn)), [qn.name, "I18nD"].forEach((a) => e.component(a, qn))), e.directive("t", Do(t));
|
|
3653
|
-
}
|
|
3654
|
-
const Ro = /* @__PURE__ */ fe("global-vue-i18n");
|
|
3655
|
-
function Mo(e = {}) {
|
|
3656
|
-
const t = __VUE_I18N_LEGACY_API__ && F(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__;
|
|
3657
|
-
process.env.NODE_ENV !== "production" && t && en(Ue(ne.DEPRECATE_LEGACY_MODE));
|
|
3658
|
-
const n = F(e.globalInjection) ? e.globalInjection : !0, r = /* @__PURE__ */ new Map(), [s, a] = Fo(e, t), o = /* @__PURE__ */ fe(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
|
|
3659
|
-
function i(T) {
|
|
3660
|
-
return r.get(T) || null;
|
|
3661
|
-
}
|
|
3662
|
-
function u(T, N) {
|
|
3663
|
-
r.set(T, N);
|
|
3664
|
-
}
|
|
3665
|
-
function m(T) {
|
|
3666
|
-
r.delete(T);
|
|
3667
|
-
}
|
|
3668
|
-
const b = {
|
|
3669
|
-
// mode
|
|
3670
|
-
get mode() {
|
|
3671
|
-
return __VUE_I18N_LEGACY_API__ && t ? "legacy" : "composition";
|
|
3672
|
-
},
|
|
3673
|
-
// install plugin
|
|
3674
|
-
async install(T, ...N) {
|
|
3675
|
-
if (process.env.NODE_ENV !== "production" && (T.__VUE_I18N__ = b), T.__VUE_I18N_SYMBOL__ = o, T.provide(T.__VUE_I18N_SYMBOL__, b), R(N[0])) {
|
|
3676
|
-
const C = N[0];
|
|
3677
|
-
b.__composerExtend = C.__composerExtend, b.__vueI18nExtend = C.__vueI18nExtend;
|
|
3678
|
-
}
|
|
3679
|
-
let A = null;
|
|
3680
|
-
!t && n && (A = Ho(T, b.global)), __VUE_I18N_FULL_INSTALL__ && ko(T, b, ...N), __VUE_I18N_LEGACY_API__ && t && T.mixin(vo(a, a.__composer, b));
|
|
3681
|
-
const D = T.unmount;
|
|
3682
|
-
if (T.unmount = () => {
|
|
3683
|
-
A && A(), b.dispose(), D();
|
|
3684
|
-
}, process.env.NODE_ENV !== "production") {
|
|
3685
|
-
if (!await _o(T, b))
|
|
3686
|
-
throw z(G.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
|
|
3687
|
-
const S = rn();
|
|
3688
|
-
if (t) {
|
|
3689
|
-
const f = a;
|
|
3690
|
-
f.__enableEmitter && f.__enableEmitter(S);
|
|
3691
|
-
} else {
|
|
3692
|
-
const f = a;
|
|
3693
|
-
f[Se] && f[Se](S);
|
|
3694
|
-
}
|
|
3695
|
-
S.on("*", Je);
|
|
3696
|
-
}
|
|
3697
|
-
},
|
|
3698
|
-
// global accessor
|
|
3699
|
-
get global() {
|
|
3700
|
-
return a;
|
|
3701
|
-
},
|
|
3702
|
-
dispose() {
|
|
3703
|
-
s.stop();
|
|
3704
|
-
},
|
|
3705
|
-
// @internal
|
|
3706
|
-
__instances: r,
|
|
3707
|
-
// @internal
|
|
3708
|
-
__getInstance: i,
|
|
3709
|
-
// @internal
|
|
3710
|
-
__setInstance: u,
|
|
3711
|
-
// @internal
|
|
3712
|
-
__deleteInstance: m
|
|
3713
|
-
};
|
|
3714
|
-
return b;
|
|
3715
|
-
}
|
|
3716
|
-
function mn(e = {}) {
|
|
3717
|
-
const t = Re();
|
|
3718
|
-
if (t == null)
|
|
3719
|
-
throw z(G.MUST_BE_CALL_SETUP_TOP);
|
|
3720
|
-
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
3721
|
-
throw z(G.NOT_INSTALLED);
|
|
3722
|
-
const n = Uo(t), r = Vo(n), s = Mr(t), a = wo(e, s);
|
|
3723
|
-
if (a === "global")
|
|
3724
|
-
return Fr(r, e, s), r;
|
|
3725
|
-
if (a === "parent") {
|
|
3726
|
-
let u = $o(n, t, e.__useComponent);
|
|
3727
|
-
return u == null && (process.env.NODE_ENV !== "production" && ue(Ue(ne.NOT_FOUND_PARENT_SCOPE)), u = r), u;
|
|
3728
|
-
}
|
|
3729
|
-
const o = n;
|
|
3730
|
-
let i = o.__getInstance(t);
|
|
3731
|
-
if (i == null) {
|
|
3732
|
-
const u = J({}, e);
|
|
3733
|
-
"__i18n" in s && (u.__i18n = s.__i18n), r && (u.__root = r), i = un(u), o.__composerExtend && (i[Yt] = o.__composerExtend(i)), Go(o, t, i), o.__setInstance(t, i);
|
|
3734
|
-
} else
|
|
3735
|
-
process.env.NODE_ENV !== "production" && a === "local" && ue(Ue(ne.DUPLICATE_USE_I18N_CALLING));
|
|
3736
|
-
return i;
|
|
3737
|
-
}
|
|
3738
|
-
function Fo(e, t) {
|
|
3739
|
-
const n = Hr(), r = __VUE_I18N_LEGACY_API__ && t ? n.run(() => Bt(e)) : n.run(() => un(e));
|
|
3740
|
-
if (r == null)
|
|
3741
|
-
throw z(G.UNEXPECTED_ERROR);
|
|
3742
|
-
return [n, r];
|
|
3743
|
-
}
|
|
3744
|
-
function Uo(e) {
|
|
3745
|
-
const t = jt(e.isCE ? Ro : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
3746
|
-
if (!t)
|
|
3747
|
-
throw z(e.isCE ? G.NOT_INSTALLED_WITH_PROVIDE : G.UNEXPECTED_ERROR);
|
|
3748
|
-
return t;
|
|
3749
|
-
}
|
|
3750
|
-
function wo(e, t) {
|
|
3751
|
-
return ct(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
|
|
3752
|
-
}
|
|
3753
|
-
function Vo(e) {
|
|
3754
|
-
return e.mode === "composition" ? e.global : e.global.__composer;
|
|
3755
|
-
}
|
|
3756
|
-
function $o(e, t, n = !1) {
|
|
3757
|
-
let r = null;
|
|
3758
|
-
const s = t.root;
|
|
3759
|
-
let a = Wo(t, n);
|
|
3760
|
-
for (; a != null; ) {
|
|
3761
|
-
const o = e;
|
|
3762
|
-
if (e.mode === "composition")
|
|
3763
|
-
r = o.__getInstance(a);
|
|
3764
|
-
else if (__VUE_I18N_LEGACY_API__) {
|
|
3765
|
-
const i = o.__getInstance(a);
|
|
3766
|
-
i != null && (r = i.__composer, n && r && !r[Rr] && (r = null));
|
|
3767
|
-
}
|
|
3768
|
-
if (r != null || s === a)
|
|
3769
|
-
break;
|
|
3770
|
-
a = a.parent;
|
|
3771
|
-
}
|
|
3772
|
-
return r;
|
|
3773
|
-
}
|
|
3774
|
-
function Wo(e, t = !1) {
|
|
3775
|
-
return e == null ? null : t && e.vnode.ctx || e.parent;
|
|
3776
|
-
}
|
|
3777
|
-
function Go(e, t, n) {
|
|
3778
|
-
let r = null;
|
|
3779
|
-
Br(() => {
|
|
3780
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3781
|
-
t.__VUE_I18N__ = n, r = rn();
|
|
3782
|
-
const s = n;
|
|
3783
|
-
s[Se] && s[Se](r), r.on("*", Je);
|
|
3784
|
-
}
|
|
3785
|
-
}, t), jr(() => {
|
|
3786
|
-
const s = n;
|
|
3787
|
-
process.env.NODE_ENV !== "production" && (r && r.off("*", Je), s[je] && s[je](), delete t.__VUE_I18N__), e.__deleteInstance(t);
|
|
3788
|
-
const a = s[Yt];
|
|
3789
|
-
a && (a(), delete s[Yt]);
|
|
3790
|
-
}, t);
|
|
3791
|
-
}
|
|
3792
|
-
const xo = [
|
|
3793
|
-
"locale",
|
|
3794
|
-
"fallbackLocale",
|
|
3795
|
-
"availableLocales"
|
|
3796
|
-
], Qn = ["t", "rt", "d", "n", "tm", "te"];
|
|
3797
|
-
function Ho(e, t) {
|
|
3798
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
3799
|
-
return xo.forEach((s) => {
|
|
3800
|
-
const a = Object.getOwnPropertyDescriptor(t, s);
|
|
3801
|
-
if (!a)
|
|
3802
|
-
throw z(G.UNEXPECTED_ERROR);
|
|
3803
|
-
const o = Yr(a.value) ? {
|
|
3804
|
-
get() {
|
|
3805
|
-
return a.value.value;
|
|
3806
|
-
},
|
|
3807
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3808
|
-
set(i) {
|
|
3809
|
-
a.value.value = i;
|
|
3810
|
-
}
|
|
3811
|
-
} : {
|
|
3812
|
-
get() {
|
|
3813
|
-
return a.get && a.get();
|
|
3814
|
-
}
|
|
3815
|
-
};
|
|
3816
|
-
Object.defineProperty(n, s, o);
|
|
3817
|
-
}), e.config.globalProperties.$i18n = n, Qn.forEach((s) => {
|
|
3818
|
-
const a = Object.getOwnPropertyDescriptor(t, s);
|
|
3819
|
-
if (!a || !a.value)
|
|
3820
|
-
throw z(G.UNEXPECTED_ERROR);
|
|
3821
|
-
Object.defineProperty(e.config.globalProperties, `$${s}`, a);
|
|
3822
|
-
}), () => {
|
|
3823
|
-
delete e.config.globalProperties.$i18n, Qn.forEach((s) => {
|
|
3824
|
-
delete e.config.globalProperties[`$${s}`];
|
|
3825
|
-
});
|
|
3826
|
-
};
|
|
3827
|
-
}
|
|
3828
|
-
const Yo = /* @__PURE__ */ pe({
|
|
3829
|
-
/* eslint-disable */
|
|
3830
|
-
name: "i18n-d",
|
|
3831
|
-
props: J({
|
|
3832
|
-
value: {
|
|
3833
|
-
type: [Number, Date],
|
|
3834
|
-
required: !0
|
|
3835
|
-
},
|
|
3836
|
-
format: {
|
|
3837
|
-
type: [String, Object]
|
|
3838
|
-
}
|
|
3839
|
-
}, _n),
|
|
3840
|
-
/* eslint-enable */
|
|
3841
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3842
|
-
setup(e, t) {
|
|
3843
|
-
const n = e.i18n || mn({
|
|
3844
|
-
useScope: e.scope,
|
|
3845
|
-
__useComponent: !0
|
|
3846
|
-
});
|
|
3847
|
-
return Wr(e, t, Ar, (...r) => (
|
|
3848
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3849
|
-
n[xt](...r)
|
|
3850
|
-
));
|
|
3851
|
-
}
|
|
3852
|
-
}), qn = Yo;
|
|
3853
|
-
ao();
|
|
3854
|
-
ya(la);
|
|
3855
|
-
Pa(Oa);
|
|
3856
|
-
Da(Nr);
|
|
3857
|
-
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
3858
|
-
const e = ve();
|
|
3859
|
-
e.__INTLIFY__ = !0, ia(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
3860
|
-
}
|
|
3861
|
-
process.env.NODE_ENV;
|
|
3862
|
-
const Ko = "名称", Bo = "供应商", jo = "版本", Xo = "描述", Jo = "类别", Qo = "通用", qo = "I/O映射", Zo = "Modbus从站通道", zo = "状态", el = "以太网", tl = "Modbus TCP服务器", nl = "Modbus TCP客户端", rl = "Modbus TCP从站设备", sl = "成都数字创新科技有限公司", al = { ethernet: "一种在以太网上充当Modbus服务器的设备。", modbusTcpServer: "一种在以太网上充当Modbus TCP服务器的设备。", modbusTcpClient: "一种在以太网上充当Modbus TCP客户端的设备。", modbusTCPSlaveDevice: "一种在以太网上充当Modbus TCP从站设备。" }, ol = "网络接口", ll = "IP地址", il = "子网掩码", cl = "默认网关", ul = "适配操作系统配置", fl = "总线周期任务", _l = "使用父总线循环设置", ml = "响应超时(ms)", dl = "Socket超时(ms)", El = "自动重连", pl = "从站IP地址", gl = "端口", Nl = " 看门狗", Tl = "从站端口", bl = "绑定到适配器", Il = "保持寄存器", hl = "可写入", Ll = "输入寄存器", Ol = "离散位区域", vl = "线圈", Cl = "离散输入", Al = "数据模型", Sl = "起始地址", yl = {
|
|
3863
|
-
name: Ko,
|
|
3864
|
-
supplier: Bo,
|
|
3865
|
-
version: jo,
|
|
3866
|
-
description: Xo,
|
|
3867
|
-
category: Jo,
|
|
3868
|
-
general: Qo,
|
|
3869
|
-
ioMapping: qo,
|
|
3870
|
-
modbusSlaveChannel: Zo,
|
|
3871
|
-
status: zo,
|
|
3872
|
-
ethernet: el,
|
|
3873
|
-
modbusTcpServer: tl,
|
|
3874
|
-
modbusTcpClient: nl,
|
|
3875
|
-
modbusTCPSlaveDevice: rl,
|
|
3876
|
-
company: sl,
|
|
3877
|
-
descriptionMap: al,
|
|
3878
|
-
netInterface: ol,
|
|
3879
|
-
ipAddress: ll,
|
|
3880
|
-
subnetMask: il,
|
|
3881
|
-
defaultGateway: cl,
|
|
3882
|
-
adaptedOSConfiguration: ul,
|
|
3883
|
-
busCycleTask: fl,
|
|
3884
|
-
defaultTask: _l,
|
|
3885
|
-
responseTimeout: ml,
|
|
3886
|
-
socketTimeout: dl,
|
|
3887
|
-
reconnect: El,
|
|
3888
|
-
slaveIpAddress: pl,
|
|
3889
|
-
port: gl,
|
|
3890
|
-
watchDog: Nl,
|
|
3891
|
-
slavePort: Tl,
|
|
3892
|
-
bindToAdapter: bl,
|
|
3893
|
-
holdingRegister: Il,
|
|
3894
|
-
writable: hl,
|
|
3895
|
-
inputRegister: Ll,
|
|
3896
|
-
discreteBitArea: Ol,
|
|
3897
|
-
coil: vl,
|
|
3898
|
-
discreteInput: Cl,
|
|
3899
|
-
dataModel: Al,
|
|
3900
|
-
startAddress: Sl
|
|
3901
|
-
}, Pl = "Name", Dl = "Supplier", kl = "Version", Rl = "Description", Ml = "Category", Fl = "General", Ul = "I/O Mapping", wl = "Modbus Slave Channel", Vl = "Status", $l = "Ethernet", Wl = "Modbus TCP Server", Gl = "Modbus TCP Client", xl = "Modbus TCP Slave Device", Hl = "Chengdu AIOSYS Innovation Technology Co., Ltd.", Yl = { ethernet: "A device that works as a Modbus Server on Ethernet.", modbusTcpServer: "A device that works as a Modbus TCP Server.", modbusTcpClient: "A device that works as a Modbus TCP Client.", modbusTCPSlaveDevice: "A device that works as a Modbus TCP Slave Device." }, Kl = "Network Interface", Bl = "IP Address", jl = "Subnet Mask", Xl = "Default Gateway", Jl = "Adapted OS Configuration", Ql = "Bus Cycle Task", ql = "Use Parent Bus Cycle Setting", Zl = "Response Timeout(ms)", zl = "Socket Timeout(ms)", ei = "Reconnect", ti = "Slave IP Address", ni = "Port", ri = "Watch Dog", si = "Slave Port", ai = "Bind to Adapter", oi = "Holding Register", li = "Writable", ii = "Input Register", ci = "Discrete Bit Area", ui = "Coil", fi = "Discrete Input", _i = "Data Model", mi = "Start Address", di = {
|
|
3902
|
-
name: Pl,
|
|
3903
|
-
supplier: Dl,
|
|
3904
|
-
version: kl,
|
|
3905
|
-
description: Rl,
|
|
3906
|
-
category: Ml,
|
|
3907
|
-
general: Fl,
|
|
3908
|
-
ioMapping: Ul,
|
|
3909
|
-
modbusSlaveChannel: wl,
|
|
3910
|
-
status: Vl,
|
|
3911
|
-
ethernet: $l,
|
|
3912
|
-
modbusTcpServer: Wl,
|
|
3913
|
-
modbusTcpClient: Gl,
|
|
3914
|
-
modbusTCPSlaveDevice: xl,
|
|
3915
|
-
company: Hl,
|
|
3916
|
-
descriptionMap: Yl,
|
|
3917
|
-
netInterface: Kl,
|
|
3918
|
-
ipAddress: Bl,
|
|
3919
|
-
subnetMask: jl,
|
|
3920
|
-
defaultGateway: Xl,
|
|
3921
|
-
adaptedOSConfiguration: Jl,
|
|
3922
|
-
busCycleTask: Ql,
|
|
3923
|
-
defaultTask: ql,
|
|
3924
|
-
responseTimeout: Zl,
|
|
3925
|
-
socketTimeout: zl,
|
|
3926
|
-
reconnect: ei,
|
|
3927
|
-
slaveIpAddress: ti,
|
|
3928
|
-
port: ni,
|
|
3929
|
-
watchDog: ri,
|
|
3930
|
-
slavePort: si,
|
|
3931
|
-
bindToAdapter: ai,
|
|
3932
|
-
holdingRegister: oi,
|
|
3933
|
-
writable: li,
|
|
3934
|
-
inputRegister: ii,
|
|
3935
|
-
discreteBitArea: ci,
|
|
3936
|
-
coil: ui,
|
|
3937
|
-
discreteInput: fi,
|
|
3938
|
-
dataModel: _i,
|
|
3939
|
-
startAddress: mi
|
|
3940
|
-
}, Ei = {
|
|
3941
|
-
zh: yl,
|
|
3942
|
-
en: di
|
|
3943
|
-
}, Oe = Mo({
|
|
3944
|
-
legacy: !1,
|
|
3945
|
-
locale: "zh",
|
|
3946
|
-
fallbackLocale: "en",
|
|
3947
|
-
messages: Ei
|
|
3948
|
-
});
|
|
3949
|
-
typeof window < "u" && (window.$t = Oe.global.t.bind(Oe.global), Object.defineProperty(window, "$locale", {
|
|
3950
|
-
get() {
|
|
3951
|
-
return typeof Oe.global.locale == "string" ? Oe.global.locale : Oe.global.locale.value;
|
|
3952
|
-
},
|
|
3953
|
-
set(e) {
|
|
3954
|
-
Oe.global.locale = e;
|
|
3955
|
-
}
|
|
3956
|
-
}));
|
|
3957
|
-
const _t = Jr(cs).use(Oe);
|
|
3958
|
-
_t.component("Input", Qt);
|
|
3959
|
-
_t.component("InputNumber", lr);
|
|
3960
|
-
_t.component("IpInput", or);
|
|
3961
|
-
_t.mount("#app");
|
|
3962
|
-
const pi = [
|
|
3963
|
-
qr,
|
|
3964
|
-
zr,
|
|
3965
|
-
Qt,
|
|
3966
|
-
lr,
|
|
3967
|
-
or
|
|
3968
|
-
], Ni = {
|
|
3969
|
-
install(e, t) {
|
|
3970
|
-
pi.forEach((n) => {
|
|
3971
|
-
e.component(n.name, n);
|
|
3972
|
-
}), t && e.use(ts, t);
|
|
3973
|
-
}
|
|
3974
262
|
};
|
|
3975
263
|
export {
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
lt as protocolMap
|
|
264
|
+
Q as Button2,
|
|
265
|
+
g as EthernetProtocolItem,
|
|
266
|
+
U as Input,
|
|
267
|
+
$ as InputNumber,
|
|
268
|
+
x as IpInput,
|
|
269
|
+
b as ModbusTCPClientProtocolItem,
|
|
270
|
+
S as ModbusTCPServerProtocolItem,
|
|
271
|
+
h as ModbusTCPSlaveDeviceProtocolItem,
|
|
272
|
+
w as MyButton,
|
|
273
|
+
W as ProtocolCollection,
|
|
274
|
+
r as ProtocolItem,
|
|
275
|
+
i as ProtocolType,
|
|
276
|
+
D as UI_KEY,
|
|
277
|
+
X as default,
|
|
278
|
+
E as protocolMap
|
|
3992
279
|
};
|