@qy_better_lib/pc 0.1.1 → 0.1.2

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.
Files changed (150) hide show
  1. package/dist/@qy_better_lib/pc.min.js +1 -42
  2. package/lib/contextMenu/index.js +7 -0
  3. package/lib/index.js +24 -0
  4. package/lib/tableExtend/index.js +7 -0
  5. package/lib/tableExtend/props.js +50 -0
  6. package/lib/tableExtend/type.js +4 -0
  7. package/lib/tableExtend/useTable.js +72 -0
  8. package/lib/textButton/index.js +7 -0
  9. package/lib/utils/index.js +79 -0
  10. package/package.json +7 -7
  11. package/lib/node_modules/@ctrl/tinycolor/dist/module/conversion.js +0 -115
  12. package/lib/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +0 -153
  13. package/lib/node_modules/@ctrl/tinycolor/dist/module/format-input.js +0 -68
  14. package/lib/node_modules/@ctrl/tinycolor/dist/module/index.js +0 -183
  15. package/lib/node_modules/@ctrl/tinycolor/dist/module/util.js +0 -32
  16. package/lib/node_modules/@element-plus/icons-vue/dist/index.js +0 -167
  17. package/lib/node_modules/@intlify/core-base/dist/core-base.js +0 -1104
  18. package/lib/node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js +0 -1004
  19. package/lib/node_modules/@intlify/shared/dist/shared.js +0 -142
  20. package/lib/node_modules/@qy_better_lib/core/lib/directives/click-outside.js +0 -40
  21. package/lib/node_modules/@qy_better_lib/core/lib/utils/is.js +0 -8
  22. package/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -22
  23. package/lib/node_modules/@vueuse/core/index.js +0 -112
  24. package/lib/node_modules/@vueuse/shared/index.js +0 -68
  25. package/lib/node_modules/element-plus/es/_virtual/plugin-vue_export-helper.js +0 -9
  26. package/lib/node_modules/element-plus/es/components/badge/index.js +0 -7
  27. package/lib/node_modules/element-plus/es/components/button/index.js +0 -11
  28. package/lib/node_modules/element-plus/es/components/icon/index.js +0 -7
  29. package/lib/node_modules/element-plus/es/components/input/index.js +0 -7
  30. package/lib/node_modules/element-plus/es/components/message/index.js +0 -7
  31. package/lib/node_modules/element-plus/es/components/message-box/index.js +0 -10
  32. package/lib/node_modules/element-plus/es/components/notification/index.js +0 -7
  33. package/lib/node_modules/element-plus/es/components/overlay/index.js +0 -9
  34. package/lib/node_modules/element-plus/es/constants/aria.js +0 -20
  35. package/lib/node_modules/element-plus/es/constants/event.js +0 -4
  36. package/lib/node_modules/element-plus/es/constants/size.js +0 -4
  37. package/lib/node_modules/element-plus/es/directives/trap-focus/index.js +0 -36
  38. package/lib/node_modules/element-plus/es/hooks/use-aria/index.js +0 -14
  39. package/lib/node_modules/element-plus/es/hooks/use-attrs/index.js +0 -13
  40. package/lib/node_modules/element-plus/es/hooks/use-composition/index.js +0 -29
  41. package/lib/node_modules/element-plus/es/hooks/use-cursor/index.js +0 -39
  42. package/lib/node_modules/element-plus/es/hooks/use-deprecated/index.js +0 -14
  43. package/lib/node_modules/element-plus/es/hooks/use-draggable/index.js +0 -41
  44. package/lib/node_modules/element-plus/es/hooks/use-empty-values/index.js +0 -15
  45. package/lib/node_modules/element-plus/es/hooks/use-escape-keydown/index.js +0 -16
  46. package/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +0 -34
  47. package/lib/node_modules/element-plus/es/hooks/use-id/index.js +0 -22
  48. package/lib/node_modules/element-plus/es/hooks/use-locale/index.js +0 -24
  49. package/lib/node_modules/element-plus/es/hooks/use-lockscreen/index.js +0 -30
  50. package/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +0 -44
  51. package/lib/node_modules/element-plus/es/hooks/use-prop/index.js +0 -11
  52. package/lib/node_modules/element-plus/es/hooks/use-same-target/index.js +0 -16
  53. package/lib/node_modules/element-plus/es/hooks/use-size/index.js +0 -16
  54. package/lib/node_modules/element-plus/es/hooks/use-z-index/index.js +0 -24
  55. package/lib/node_modules/element-plus/es/locale/lang/en.js +0 -182
  56. package/lib/node_modules/element-plus/es/utils/browser.js +0 -6
  57. package/lib/node_modules/element-plus/es/utils/dom/aria.js +0 -23
  58. package/lib/node_modules/element-plus/es/utils/dom/scroll.js +0 -20
  59. package/lib/node_modules/element-plus/es/utils/dom/style.js +0 -47
  60. package/lib/node_modules/element-plus/es/utils/error.js +0 -19
  61. package/lib/node_modules/element-plus/es/utils/i18n.js +0 -4
  62. package/lib/node_modules/element-plus/es/utils/objects.js +0 -4
  63. package/lib/node_modules/element-plus/es/utils/types.js +0 -13
  64. package/lib/node_modules/element-plus/es/utils/typescript.js +0 -4
  65. package/lib/node_modules/element-plus/es/utils/vue/icon.js +0 -31
  66. package/lib/node_modules/element-plus/es/utils/vue/install.js +0 -17
  67. package/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +0 -31
  68. package/lib/node_modules/element-plus/es/utils/vue/validator.js +0 -5
  69. package/lib/node_modules/element-plus/es/utils/vue/vnode.js +0 -5
  70. package/lib/node_modules/lodash-es/_Hash.js +0 -20
  71. package/lib/node_modules/lodash-es/_ListCache.js +0 -20
  72. package/lib/node_modules/lodash-es/_Map.js +0 -6
  73. package/lib/node_modules/lodash-es/_MapCache.js +0 -20
  74. package/lib/node_modules/lodash-es/_Symbol.js +0 -5
  75. package/lib/node_modules/lodash-es/_apply.js +0 -16
  76. package/lib/node_modules/lodash-es/_arrayMap.js +0 -8
  77. package/lib/node_modules/lodash-es/_arrayPush.js +0 -8
  78. package/lib/node_modules/lodash-es/_assignValue.js +0 -10
  79. package/lib/node_modules/lodash-es/_assocIndexOf.js +0 -10
  80. package/lib/node_modules/lodash-es/_baseAssignValue.js +0 -12
  81. package/lib/node_modules/lodash-es/_baseFlatten.js +0 -13
  82. package/lib/node_modules/lodash-es/_baseGet.js +0 -11
  83. package/lib/node_modules/lodash-es/_baseGetTag.js +0 -10
  84. package/lib/node_modules/lodash-es/_baseHasIn.js +0 -6
  85. package/lib/node_modules/lodash-es/_baseIsArguments.js +0 -9
  86. package/lib/node_modules/lodash-es/_baseIsNative.js +0 -16
  87. package/lib/node_modules/lodash-es/_basePick.js +0 -10
  88. package/lib/node_modules/lodash-es/_basePickBy.js +0 -13
  89. package/lib/node_modules/lodash-es/_baseSet.js +0 -24
  90. package/lib/node_modules/lodash-es/_baseSetToString.js +0 -14
  91. package/lib/node_modules/lodash-es/_baseToString.js +0 -18
  92. package/lib/node_modules/lodash-es/_castPath.js +0 -10
  93. package/lib/node_modules/lodash-es/_coreJsData.js +0 -5
  94. package/lib/node_modules/lodash-es/_defineProperty.js +0 -11
  95. package/lib/node_modules/lodash-es/_flatRest.js +0 -9
  96. package/lib/node_modules/lodash-es/_freeGlobal.js +0 -4
  97. package/lib/node_modules/lodash-es/_getMapData.js +0 -8
  98. package/lib/node_modules/lodash-es/_getNative.js +0 -9
  99. package/lib/node_modules/lodash-es/_getRawTag.js +0 -15
  100. package/lib/node_modules/lodash-es/_getValue.js +0 -6
  101. package/lib/node_modules/lodash-es/_hasPath.js +0 -19
  102. package/lib/node_modules/lodash-es/_hashClear.js +0 -7
  103. package/lib/node_modules/lodash-es/_hashDelete.js +0 -7
  104. package/lib/node_modules/lodash-es/_hashGet.js +0 -13
  105. package/lib/node_modules/lodash-es/_hashHas.js +0 -9
  106. package/lib/node_modules/lodash-es/_hashSet.js +0 -9
  107. package/lib/node_modules/lodash-es/_isFlattenable.js +0 -10
  108. package/lib/node_modules/lodash-es/_isIndex.js +0 -8
  109. package/lib/node_modules/lodash-es/_isKey.js +0 -12
  110. package/lib/node_modules/lodash-es/_isKeyable.js +0 -7
  111. package/lib/node_modules/lodash-es/_isMasked.js +0 -11
  112. package/lib/node_modules/lodash-es/_listCacheClear.js +0 -6
  113. package/lib/node_modules/lodash-es/_listCacheDelete.js +0 -12
  114. package/lib/node_modules/lodash-es/_listCacheGet.js +0 -8
  115. package/lib/node_modules/lodash-es/_listCacheHas.js +0 -7
  116. package/lib/node_modules/lodash-es/_listCacheSet.js +0 -8
  117. package/lib/node_modules/lodash-es/_mapCacheClear.js +0 -13
  118. package/lib/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  119. package/lib/node_modules/lodash-es/_mapCacheGet.js +0 -7
  120. package/lib/node_modules/lodash-es/_mapCacheHas.js +0 -7
  121. package/lib/node_modules/lodash-es/_mapCacheSet.js +0 -8
  122. package/lib/node_modules/lodash-es/_memoizeCapped.js +0 -11
  123. package/lib/node_modules/lodash-es/_nativeCreate.js +0 -5
  124. package/lib/node_modules/lodash-es/_objectToString.js +0 -7
  125. package/lib/node_modules/lodash-es/_overRest.js +0 -15
  126. package/lib/node_modules/lodash-es/_root.js +0 -5
  127. package/lib/node_modules/lodash-es/_setToString.js +0 -6
  128. package/lib/node_modules/lodash-es/_shortOut.js +0 -16
  129. package/lib/node_modules/lodash-es/_stringToPath.js +0 -10
  130. package/lib/node_modules/lodash-es/_toKey.js +0 -10
  131. package/lib/node_modules/lodash-es/_toSource.js +0 -17
  132. package/lib/node_modules/lodash-es/constant.js +0 -8
  133. package/lib/node_modules/lodash-es/eq.js +0 -6
  134. package/lib/node_modules/lodash-es/flatten.js +0 -8
  135. package/lib/node_modules/lodash-es/fromPairs.js +0 -10
  136. package/lib/node_modules/lodash-es/get.js +0 -8
  137. package/lib/node_modules/lodash-es/hasIn.js +0 -8
  138. package/lib/node_modules/lodash-es/identity.js +0 -6
  139. package/lib/node_modules/lodash-es/isArguments.js +0 -10
  140. package/lib/node_modules/lodash-es/isArray.js +0 -4
  141. package/lib/node_modules/lodash-es/isFunction.js +0 -12
  142. package/lib/node_modules/lodash-es/isLength.js +0 -7
  143. package/lib/node_modules/lodash-es/isNil.js +0 -6
  144. package/lib/node_modules/lodash-es/isObject.js +0 -7
  145. package/lib/node_modules/lodash-es/isObjectLike.js +0 -6
  146. package/lib/node_modules/lodash-es/isSymbol.js +0 -9
  147. package/lib/node_modules/lodash-es/memoize.js +0 -18
  148. package/lib/node_modules/lodash-es/pick.js +0 -8
  149. package/lib/node_modules/lodash-es/toString.js +0 -7
  150. package/lib/node_modules/vue-i18n/dist/vue-i18n.js +0 -864
@@ -1,1104 +0,0 @@
1
- import { getGlobalThis as Q, incrementer as pe, isFunction as D, warn as Z, isString as m, isArray as W, isPlainObject as C, assign as X, isBoolean as b, isRegExp as ce, warnOnce as We, isObject as v, format as Ae, escapeHtml as ue, inBrowser as H, mark as w, measure as j, isNumber as S, isEmptyObject as re, generateCodeFrame as $e, generateFormatCacheKey as Ge, isDate as Ke, isPromise as Ye, join as Be, toDisplayString as He } from "../../shared/dist/shared.js";
2
- import { CompileWarnCodes as Me, CompileErrorCodes as je, createCompileError as ze, detectHtmlTag as Xe, defaultOnError as xe, baseCompile as Je } from "../../message-compiler/dist/message-compiler.esm-browser.js";
3
- /*!
4
- * core-base v9.13.1
5
- * (c) 2024 kazuya kawaguchi
6
- * Released under the MIT License.
7
- */
8
- function Ze() {
9
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Q().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_JIT_COMPILATION__ != "boolean" && (Q().__INTLIFY_JIT_COMPILATION__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Q().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
10
- }
11
- const $ = [];
12
- $[
13
- 0
14
- /* States.BEFORE_PATH */
15
- ] = {
16
- w: [
17
- 0
18
- /* States.BEFORE_PATH */
19
- ],
20
- i: [
21
- 3,
22
- 0
23
- /* Actions.APPEND */
24
- ],
25
- "[": [
26
- 4
27
- /* States.IN_SUB_PATH */
28
- ],
29
- o: [
30
- 7
31
- /* States.AFTER_PATH */
32
- ]
33
- };
34
- $[
35
- 1
36
- /* States.IN_PATH */
37
- ] = {
38
- w: [
39
- 1
40
- /* States.IN_PATH */
41
- ],
42
- ".": [
43
- 2
44
- /* States.BEFORE_IDENT */
45
- ],
46
- "[": [
47
- 4
48
- /* States.IN_SUB_PATH */
49
- ],
50
- o: [
51
- 7
52
- /* States.AFTER_PATH */
53
- ]
54
- };
55
- $[
56
- 2
57
- /* States.BEFORE_IDENT */
58
- ] = {
59
- w: [
60
- 2
61
- /* States.BEFORE_IDENT */
62
- ],
63
- i: [
64
- 3,
65
- 0
66
- /* Actions.APPEND */
67
- ],
68
- 0: [
69
- 3,
70
- 0
71
- /* Actions.APPEND */
72
- ]
73
- };
74
- $[
75
- 3
76
- /* States.IN_IDENT */
77
- ] = {
78
- i: [
79
- 3,
80
- 0
81
- /* Actions.APPEND */
82
- ],
83
- 0: [
84
- 3,
85
- 0
86
- /* Actions.APPEND */
87
- ],
88
- w: [
89
- 1,
90
- 1
91
- /* Actions.PUSH */
92
- ],
93
- ".": [
94
- 2,
95
- 1
96
- /* Actions.PUSH */
97
- ],
98
- "[": [
99
- 4,
100
- 1
101
- /* Actions.PUSH */
102
- ],
103
- o: [
104
- 7,
105
- 1
106
- /* Actions.PUSH */
107
- ]
108
- };
109
- $[
110
- 4
111
- /* States.IN_SUB_PATH */
112
- ] = {
113
- "'": [
114
- 5,
115
- 0
116
- /* Actions.APPEND */
117
- ],
118
- '"': [
119
- 6,
120
- 0
121
- /* Actions.APPEND */
122
- ],
123
- "[": [
124
- 4,
125
- 2
126
- /* Actions.INC_SUB_PATH_DEPTH */
127
- ],
128
- "]": [
129
- 1,
130
- 3
131
- /* Actions.PUSH_SUB_PATH */
132
- ],
133
- o: 8,
134
- l: [
135
- 4,
136
- 0
137
- /* Actions.APPEND */
138
- ]
139
- };
140
- $[
141
- 5
142
- /* States.IN_SINGLE_QUOTE */
143
- ] = {
144
- "'": [
145
- 4,
146
- 0
147
- /* Actions.APPEND */
148
- ],
149
- o: 8,
150
- l: [
151
- 5,
152
- 0
153
- /* Actions.APPEND */
154
- ]
155
- };
156
- $[
157
- 6
158
- /* States.IN_DOUBLE_QUOTE */
159
- ] = {
160
- '"': [
161
- 4,
162
- 0
163
- /* Actions.APPEND */
164
- ],
165
- o: 8,
166
- l: [
167
- 6,
168
- 0
169
- /* Actions.APPEND */
170
- ]
171
- };
172
- const Qe = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
173
- function qe(e) {
174
- return Qe.test(e);
175
- }
176
- function et(e) {
177
- const t = e.charCodeAt(0), r = e.charCodeAt(e.length - 1);
178
- return t === r && (t === 34 || t === 39) ? e.slice(1, -1) : e;
179
- }
180
- function tt(e) {
181
- if (e == null)
182
- return "o";
183
- switch (e.charCodeAt(0)) {
184
- case 91:
185
- // [
186
- case 93:
187
- // ]
188
- case 46:
189
- // .
190
- case 34:
191
- // "
192
- case 39:
193
- return e;
194
- case 95:
195
- // _
196
- case 36:
197
- // $
198
- case 45:
199
- return "i";
200
- case 9:
201
- // Tab (HT)
202
- case 10:
203
- // Newline (LF)
204
- case 13:
205
- // Return (CR)
206
- case 160:
207
- // No-break space (NBSP)
208
- case 65279:
209
- // Byte Order Mark (BOM)
210
- case 8232:
211
- // Line Separator (LS)
212
- case 8233:
213
- return "w";
214
- }
215
- return "i";
216
- }
217
- function nt(e) {
218
- const t = e.trim();
219
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : qe(t) ? et(t) : "*" + t;
220
- }
221
- function rt(e) {
222
- const t = [];
223
- let r = -1, n = 0, a = 0, o, i, l, s, u, f, E;
224
- const c = [];
225
- c[
226
- 0
227
- /* Actions.APPEND */
228
- ] = () => {
229
- i === void 0 ? i = l : i += l;
230
- }, c[
231
- 1
232
- /* Actions.PUSH */
233
- ] = () => {
234
- i !== void 0 && (t.push(i), i = void 0);
235
- }, c[
236
- 2
237
- /* Actions.INC_SUB_PATH_DEPTH */
238
- ] = () => {
239
- c[
240
- 0
241
- /* Actions.APPEND */
242
- ](), a++;
243
- }, c[
244
- 3
245
- /* Actions.PUSH_SUB_PATH */
246
- ] = () => {
247
- if (a > 0)
248
- a--, n = 4, c[
249
- 0
250
- /* Actions.APPEND */
251
- ]();
252
- else {
253
- if (a = 0, i === void 0 || (i = nt(i), i === !1))
254
- return !1;
255
- c[
256
- 1
257
- /* Actions.PUSH */
258
- ]();
259
- }
260
- };
261
- function g() {
262
- const p = e[r + 1];
263
- if (n === 5 && p === "'" || n === 6 && p === '"')
264
- return r++, l = "\\" + p, c[
265
- 0
266
- /* Actions.APPEND */
267
- ](), !0;
268
- }
269
- for (; n !== null; )
270
- if (r++, o = e[r], !(o === "\\" && g())) {
271
- if (s = tt(o), E = $[n], u = E[s] || E.l || 8, u === 8 || (n = u[0], u[1] !== void 0 && (f = c[u[1]], f && (l = o, f() === !1))))
272
- return;
273
- if (n === 7)
274
- return t;
275
- }
276
- }
277
- const me = /* @__PURE__ */ new Map();
278
- function at(e, t) {
279
- return v(e) ? e[t] : null;
280
- }
281
- function $t(e, t) {
282
- if (!v(e))
283
- return null;
284
- let r = me.get(t);
285
- if (r || (r = rt(t), r && me.set(t, r)), !r)
286
- return null;
287
- const n = r.length;
288
- let a = e, o = 0;
289
- for (; o < n; ) {
290
- const i = a[r[o]];
291
- if (i === void 0 || D(a))
292
- return null;
293
- a = i, o++;
294
- }
295
- return a;
296
- }
297
- const st = (e) => e, ot = (e) => "", it = "text", lt = (e) => e.length === 0 ? "" : Be(e), ct = He;
298
- function fe(e, t) {
299
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
300
- }
301
- function ut(e) {
302
- const t = S(e.pluralIndex) ? e.pluralIndex : -1;
303
- return e.named && (S(e.named.count) || S(e.named.n)) ? S(e.named.count) ? e.named.count : S(e.named.n) ? e.named.n : t : t;
304
- }
305
- function mt(e, t) {
306
- t.count || (t.count = e), t.n || (t.n = e);
307
- }
308
- function ft(e = {}) {
309
- const t = e.locale, r = ut(e), n = v(e.pluralRules) && m(t) && D(e.pluralRules[t]) ? e.pluralRules[t] : fe, a = v(e.pluralRules) && m(t) && D(e.pluralRules[t]) ? fe : void 0, o = (N) => N[n(r, N.length, a)], i = e.list || [], l = (N) => i[N], s = e.named || {};
310
- S(e.pluralIndex) && mt(r, s);
311
- const u = (N) => s[N];
312
- function f(N) {
313
- const _ = D(e.messages) ? e.messages(N) : v(e.messages) ? e.messages[N] : !1;
314
- return _ || (e.parent ? e.parent.message(N) : ot);
315
- }
316
- const E = (N) => e.modifiers ? e.modifiers[N] : st, c = C(e.processor) && D(e.processor.normalize) ? e.processor.normalize : lt, g = C(e.processor) && D(e.processor.interpolate) ? e.processor.interpolate : ct, p = C(e.processor) && m(e.processor.type) ? e.processor.type : it, F = {
317
- list: l,
318
- named: u,
319
- plural: o,
320
- linked: (N, ..._) => {
321
- const [O, d] = _;
322
- let T = "text", M = "";
323
- _.length === 1 ? v(O) ? (M = O.modifier || M, T = O.type || T) : m(O) && (M = O || M) : _.length === 2 && (m(O) && (M = O || M), m(d) && (T = d || T));
324
- const L = f(N)(F), I = (
325
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
326
- T === "vnode" && W(L) && M ? L[0] : L
327
- );
328
- return M ? E(M)(I, T) : I;
329
- },
330
- message: f,
331
- type: p,
332
- interpolate: g,
333
- normalize: c,
334
- values: X({}, i, s)
335
- };
336
- return F;
337
- }
338
- let J = null;
339
- function Gt(e) {
340
- J = e;
341
- }
342
- function _t(e, t, r) {
343
- J && J.emit("i18n:init", {
344
- timestamp: Date.now(),
345
- i18n: e,
346
- version: t,
347
- meta: r
348
- });
349
- }
350
- const dt = /* @__PURE__ */ gt(
351
- "function:translate"
352
- /* IntlifyDevToolsHooks.FunctionTranslate */
353
- );
354
- function gt(e) {
355
- return (t) => J && J.emit(e, t);
356
- }
357
- const Ie = Me.__EXTEND_POINT__, G = pe(Ie), R = {
358
- NOT_FOUND_KEY: Ie,
359
- // 2
360
- FALLBACK_TO_TRANSLATE: G(),
361
- // 3
362
- CANNOT_FORMAT_NUMBER: G(),
363
- // 4
364
- FALLBACK_TO_NUMBER_FORMAT: G(),
365
- // 5
366
- CANNOT_FORMAT_DATE: G(),
367
- // 6
368
- FALLBACK_TO_DATE_FORMAT: G(),
369
- // 7
370
- EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: G(),
371
- // 8
372
- __EXTEND_POINT__: G()
373
- // 9
374
- }, Et = {
375
- [R.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
376
- [R.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
377
- [R.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
378
- [R.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
379
- [R.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
380
- [R.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
381
- [R.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."
382
- };
383
- function Y(e, ...t) {
384
- return Ae(Et[e], ...t);
385
- }
386
- const Ce = je.__EXTEND_POINT__, K = pe(Ce), h = {
387
- INVALID_ARGUMENT: Ce,
388
- // 17
389
- INVALID_DATE_ARGUMENT: K(),
390
- // 18
391
- INVALID_ISO_DATE_ARGUMENT: K(),
392
- // 19
393
- NOT_SUPPORT_NON_STRING_MESSAGE: K(),
394
- // 20
395
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: K(),
396
- // 21
397
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: K(),
398
- // 22
399
- NOT_SUPPORT_LOCALE_TYPE: K(),
400
- // 23
401
- __EXTEND_POINT__: K()
402
- // 24
403
- };
404
- function V(e) {
405
- return ze(e, null, process.env.NODE_ENV !== "production" ? { messages: Nt } : void 0);
406
- }
407
- const Nt = {
408
- [h.INVALID_ARGUMENT]: "Invalid arguments",
409
- [h.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
410
- [h.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
411
- [h.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
412
- [h.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
413
- [h.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
414
- [h.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
415
- };
416
- function ae(e, t) {
417
- return t.locale != null ? _e(t.locale) : _e(e.locale);
418
- }
419
- let q;
420
- function _e(e) {
421
- if (m(e))
422
- return e;
423
- if (D(e)) {
424
- if (e.resolvedOnce && q != null)
425
- return q;
426
- if (e.constructor.name === "Function") {
427
- const t = e();
428
- if (Ye(t))
429
- throw V(h.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
430
- return q = t;
431
- } else
432
- throw V(h.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
433
- } else
434
- throw V(h.NOT_SUPPORT_LOCALE_TYPE);
435
- }
436
- function Tt(e, t, r) {
437
- return [.../* @__PURE__ */ new Set([
438
- r,
439
- ...W(t) ? t : v(t) ? Object.keys(t) : m(t) ? [t] : [r]
440
- ])];
441
- }
442
- function Kt(e, t, r) {
443
- const n = m(r) ? r : te, a = e;
444
- a.__localeChainCache || (a.__localeChainCache = /* @__PURE__ */ new Map());
445
- let o = a.__localeChainCache.get(n);
446
- if (!o) {
447
- o = [];
448
- let i = [r];
449
- for (; W(i); )
450
- i = de(o, i, t);
451
- const l = W(t) || !C(t) ? t : t.default ? t.default : null;
452
- i = m(l) ? [l] : l, W(i) && de(o, i, !1), a.__localeChainCache.set(n, o);
453
- }
454
- return o;
455
- }
456
- function de(e, t, r) {
457
- let n = !0;
458
- for (let a = 0; a < t.length && b(n); a++) {
459
- const o = t[a];
460
- m(o) && (n = Ot(e, t[a], r));
461
- }
462
- return n;
463
- }
464
- function Ot(e, t, r) {
465
- let n;
466
- const a = t.split("-");
467
- do {
468
- const o = a.join("-");
469
- n = pt(e, o, r), a.splice(-1, 1);
470
- } while (a.length && n === !0);
471
- return n;
472
- }
473
- function pt(e, t, r) {
474
- let n = !1;
475
- if (!e.includes(t) && (n = !0, t)) {
476
- n = t[t.length - 1] !== "!";
477
- const a = t.replace(/!/g, "");
478
- e.push(a), (W(r) || C(r)) && r[a] && (n = r[a]);
479
- }
480
- return n;
481
- }
482
- const At = "9.13.1", se = -1, te = "en-US", Fe = "", ge = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
483
- function Mt() {
484
- return {
485
- upper: (e, t) => t === "text" && m(e) ? e.toUpperCase() : t === "vnode" && v(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
486
- lower: (e, t) => t === "text" && m(e) ? e.toLowerCase() : t === "vnode" && v(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
487
- capitalize: (e, t) => t === "text" && m(e) ? ge(e) : t === "vnode" && v(e) && "__v_isVNode" in e ? ge(e.children) : e
488
- };
489
- }
490
- let Le;
491
- function Yt(e) {
492
- Le = e;
493
- }
494
- let De;
495
- function Bt(e) {
496
- De = e;
497
- }
498
- let he;
499
- function Ht(e) {
500
- he = e;
501
- }
502
- let ve = null;
503
- const jt = /* @__NO_SIDE_EFFECTS__ */ (e) => {
504
- ve = e;
505
- }, It = /* @__NO_SIDE_EFFECTS__ */ () => ve;
506
- let be = null;
507
- const zt = (e) => {
508
- be = e;
509
- }, Xt = () => be;
510
- let Ee = 0;
511
- function xt(e = {}) {
512
- const t = D(e.onWarn) ? e.onWarn : Z, r = m(e.version) ? e.version : At, n = m(e.locale) || D(e.locale) ? e.locale : te, a = D(n) ? te : n, o = W(e.fallbackLocale) || C(e.fallbackLocale) || m(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : a, i = C(e.messages) ? e.messages : { [a]: {} }, l = C(e.datetimeFormats) ? e.datetimeFormats : { [a]: {} }, s = C(e.numberFormats) ? e.numberFormats : { [a]: {} }, u = X({}, e.modifiers || {}, Mt()), f = e.pluralRules || {}, E = D(e.missing) ? e.missing : null, c = b(e.missingWarn) || ce(e.missingWarn) ? e.missingWarn : !0, g = b(e.fallbackWarn) || ce(e.fallbackWarn) ? e.fallbackWarn : !0, p = !!e.fallbackFormat, A = !!e.unresolving, F = D(e.postTranslation) ? e.postTranslation : null, N = C(e.processor) ? e.processor : null, _ = b(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, O = !!e.escapeParameter, d = D(e.messageCompiler) ? e.messageCompiler : Le;
513
- process.env.NODE_ENV !== "production" && D(e.messageCompiler) && We(Y(R.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
514
- const T = D(e.messageResolver) ? e.messageResolver : De || at, M = D(e.localeFallbacker) ? e.localeFallbacker : he || Tt, L = v(e.fallbackContext) ? e.fallbackContext : void 0, I = e, y = v(I.__datetimeFormatters) ? I.__datetimeFormatters : /* @__PURE__ */ new Map(), U = v(I.__numberFormatters) ? I.__numberFormatters : /* @__PURE__ */ new Map(), x = v(I.__meta) ? I.__meta : {};
515
- Ee++;
516
- const k = {
517
- version: r,
518
- cid: Ee,
519
- locale: n,
520
- fallbackLocale: o,
521
- messages: i,
522
- modifiers: u,
523
- pluralRules: f,
524
- missing: E,
525
- missingWarn: c,
526
- fallbackWarn: g,
527
- fallbackFormat: p,
528
- unresolving: A,
529
- postTranslation: F,
530
- processor: N,
531
- warnHtmlMessage: _,
532
- escapeParameter: O,
533
- messageCompiler: d,
534
- messageResolver: T,
535
- localeFallbacker: M,
536
- fallbackContext: L,
537
- onWarn: t,
538
- __meta: x
539
- };
540
- return k.datetimeFormats = l, k.numberFormats = s, k.__datetimeFormatters = y, k.__numberFormatters = U, process.env.NODE_ENV !== "production" && (k.__v_emitter = I.__v_emitter != null ? I.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && _t(k, r, x), k;
541
- }
542
- function oe(e, t) {
543
- return e instanceof RegExp ? e.test(t) : e;
544
- }
545
- function Ct(e, t) {
546
- return e instanceof RegExp ? e.test(t) : e;
547
- }
548
- function ie(e, t, r, n, a) {
549
- const { missing: o, onWarn: i } = e;
550
- if (process.env.NODE_ENV !== "production") {
551
- const l = e.__v_emitter;
552
- l && l.emit("missing", {
553
- locale: r,
554
- key: t,
555
- type: a,
556
- groupId: `${a}:${t}`
557
- });
558
- }
559
- if (o !== null) {
560
- const l = o(e, r, t, a);
561
- return m(l) ? l : t;
562
- } else
563
- return process.env.NODE_ENV !== "production" && Ct(n, t) && i(Y(R.NOT_FOUND_KEY, { key: t, locale: r })), t;
564
- }
565
- function Jt(e, t, r) {
566
- const n = e;
567
- n.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, r, t);
568
- }
569
- function Re(e, t) {
570
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
571
- }
572
- function Ft(e, t) {
573
- const r = t.indexOf(e);
574
- if (r === -1)
575
- return !1;
576
- for (let n = r + 1; n < t.length; n++)
577
- if (Re(e, t[n]))
578
- return !0;
579
- return !1;
580
- }
581
- function ee(e) {
582
- return (r) => Lt(r, e);
583
- }
584
- function Lt(e, t) {
585
- const r = t.b || t.body;
586
- if ((r.t || r.type) === 1) {
587
- const n = r, a = n.c || n.cases;
588
- return e.plural(a.reduce((o, i) => [
589
- ...o,
590
- Ne(e, i)
591
- ], []));
592
- } else
593
- return Ne(e, r);
594
- }
595
- function Ne(e, t) {
596
- const r = t.s || t.static;
597
- if (r)
598
- return e.type === "text" ? r : e.normalize([r]);
599
- {
600
- const n = (t.i || t.items).reduce((a, o) => [...a, ne(e, o)], []);
601
- return e.normalize(n);
602
- }
603
- }
604
- function ne(e, t) {
605
- const r = t.t || t.type;
606
- switch (r) {
607
- case 3: {
608
- const n = t;
609
- return n.v || n.value;
610
- }
611
- case 9: {
612
- const n = t;
613
- return n.v || n.value;
614
- }
615
- case 4: {
616
- const n = t;
617
- return e.interpolate(e.named(n.k || n.key));
618
- }
619
- case 5: {
620
- const n = t;
621
- return e.interpolate(e.list(n.i != null ? n.i : n.index));
622
- }
623
- case 6: {
624
- const n = t, a = n.m || n.modifier;
625
- return e.linked(ne(e, n.k || n.key), a ? ne(e, a) : void 0, e.type);
626
- }
627
- case 7: {
628
- const n = t;
629
- return n.v || n.value;
630
- }
631
- case 8: {
632
- const n = t;
633
- return n.v || n.value;
634
- }
635
- default:
636
- throw new Error(`unhandled node type on format message part: ${r}`);
637
- }
638
- }
639
- const Dt = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
640
- function Se(e, t) {
641
- t && Xe(e) && Z(Ae(Dt, { source: e }));
642
- }
643
- const we = (e) => e;
644
- let B = /* @__PURE__ */ Object.create(null);
645
- function ye(e) {
646
- e.code === Me.USE_MODULO_SYNTAX && Z(`The use of named interpolation with modulo syntax is deprecated. It will be removed in v10.
647
- reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format
648
- (message compiler warning message: ${e.message})`);
649
- }
650
- const z = (e) => v(e) && (e.t === 0 || e.type === 0) && ("b" in e || "body" in e);
651
- function Pe(e, t = {}) {
652
- let r = !1;
653
- const n = t.onError || xe;
654
- return t.onError = (a) => {
655
- r = !0, n(a);
656
- }, { ...Je(e, t), detectError: r };
657
- }
658
- const Zt = /* @__NO_SIDE_EFFECTS__ */ (e, t) => {
659
- if (!m(e))
660
- throw V(h.NOT_SUPPORT_NON_STRING_MESSAGE);
661
- process.env.NODE_ENV !== "production" && (t.onWarn = ye);
662
- {
663
- const r = b(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
664
- process.env.NODE_ENV !== "production" && Se(e, r);
665
- const a = (t.onCacheKey || we)(e), o = B[a];
666
- if (o)
667
- return o;
668
- const { code: i, detectError: l } = Pe(e, t), s = new Function(`return ${i}`)();
669
- return l ? s : B[a] = s;
670
- }
671
- };
672
- function Qt(e, t) {
673
- if (process.env.NODE_ENV !== "production" && (t.onWarn = ye), __INTLIFY_JIT_COMPILATION__ && !__INTLIFY_DROP_MESSAGE_COMPILER__ && m(e)) {
674
- const r = b(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
675
- process.env.NODE_ENV !== "production" && Se(e, r);
676
- const a = (t.onCacheKey || we)(e), o = B[a];
677
- if (o)
678
- return o;
679
- const { ast: i, detectError: l } = Pe(e, {
680
- ...t,
681
- location: process.env.NODE_ENV !== "production",
682
- jit: !0
683
- }), s = ee(i);
684
- return l ? s : B[a] = s;
685
- } else {
686
- if (process.env.NODE_ENV !== "production" && !z(e))
687
- return Z(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), () => e;
688
- const r = e.cacheKey;
689
- if (r) {
690
- const n = B[r];
691
- return n || (B[r] = ee(e));
692
- } else
693
- return ee(e);
694
- }
695
- }
696
- const Te = () => "", P = (e) => D(e);
697
- function qt(e, ...t) {
698
- const { fallbackFormat: r, postTranslation: n, unresolving: a, messageCompiler: o, fallbackLocale: i, messages: l } = e, [s, u] = bt(...t), f = b(u.missingWarn) ? u.missingWarn : e.missingWarn, E = b(u.fallbackWarn) ? u.fallbackWarn : e.fallbackWarn, c = b(u.escapeParameter) ? u.escapeParameter : e.escapeParameter, g = !!u.resolvedMessage, p = m(u.default) || b(u.default) ? b(u.default) ? o ? s : () => s : u.default : r ? o ? s : () => s : "", A = r || p !== "", F = ae(e, u);
699
- c && ht(u);
700
- let [N, _, O] = g ? [
701
- s,
702
- F,
703
- l[F] || {}
704
- ] : ke(e, s, F, i, E, f), d = N, T = s;
705
- if (!g && !(m(d) || z(d) || P(d)) && A && (d = p, T = d), !g && (!(m(d) || z(d) || P(d)) || !m(_)))
706
- return a ? se : s;
707
- if (process.env.NODE_ENV !== "production" && m(d) && e.messageCompiler == null)
708
- return Z(`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 '${s}'.`), s;
709
- let M = !1;
710
- const L = () => {
711
- M = !0;
712
- }, I = P(d) ? d : Ve(e, s, _, d, T, L);
713
- if (M)
714
- return d;
715
- const y = wt(e, _, O, u), U = ft(y), x = vt(e, I, U), k = n ? n(x, s) : x;
716
- if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
717
- const le = {
718
- timestamp: Date.now(),
719
- key: m(s) ? s : P(d) ? d.key : "",
720
- locale: _ || (P(d) ? d.locale : ""),
721
- format: m(d) ? d : P(d) ? d.source : "",
722
- message: k
723
- };
724
- le.meta = X({}, e.__meta, /* @__PURE__ */ It() || {}), dt(le);
725
- }
726
- return k;
727
- }
728
- function ht(e) {
729
- W(e.list) ? e.list = e.list.map((t) => m(t) ? ue(t) : t) : v(e.named) && Object.keys(e.named).forEach((t) => {
730
- m(e.named[t]) && (e.named[t] = ue(e.named[t]));
731
- });
732
- }
733
- function ke(e, t, r, n, a, o) {
734
- const { messages: i, onWarn: l, messageResolver: s, localeFallbacker: u } = e, f = u(e, n, r);
735
- let E = {}, c, g = null, p = r, A = null;
736
- const F = "translate";
737
- for (let N = 0; N < f.length; N++) {
738
- if (c = A = f[N], process.env.NODE_ENV !== "production" && r !== c && !Re(r, c) && oe(a, t) && l(Y(R.FALLBACK_TO_TRANSLATE, {
739
- key: t,
740
- target: c
741
- })), process.env.NODE_ENV !== "production" && r !== c) {
742
- const T = e.__v_emitter;
743
- T && T.emit("fallback", {
744
- type: F,
745
- key: t,
746
- from: p,
747
- to: A,
748
- groupId: `${F}:${t}`
749
- });
750
- }
751
- E = i[c] || {};
752
- let _ = null, O, d;
753
- if (process.env.NODE_ENV !== "production" && H && (_ = window.performance.now(), O = "intlify-message-resolve-start", d = "intlify-message-resolve-end", w && w(O)), (g = s(E, t)) === null && (g = E[t]), process.env.NODE_ENV !== "production" && H) {
754
- const T = window.performance.now(), M = e.__v_emitter;
755
- M && _ && g && M.emit("message-resolve", {
756
- type: "message-resolve",
757
- key: t,
758
- message: g,
759
- time: T - _,
760
- groupId: `${F}:${t}`
761
- }), O && d && w && j && (w(d), j("intlify message resolve", O, d));
762
- }
763
- if (m(g) || z(g) || P(g))
764
- break;
765
- if (!Ft(c, f)) {
766
- const T = ie(
767
- e,
768
- // eslint-disable-line @typescript-eslint/no-explicit-any
769
- t,
770
- c,
771
- o,
772
- F
773
- );
774
- T !== t && (g = T);
775
- }
776
- p = A;
777
- }
778
- return [g, c, E];
779
- }
780
- function Ve(e, t, r, n, a, o) {
781
- const { messageCompiler: i, warnHtmlMessage: l } = e;
782
- if (P(n)) {
783
- const c = n;
784
- return c.locale = c.locale || r, c.key = c.key || t, c;
785
- }
786
- if (i == null) {
787
- const c = () => n;
788
- return c.locale = r, c.key = t, c;
789
- }
790
- let s = null, u, f;
791
- process.env.NODE_ENV !== "production" && H && (s = window.performance.now(), u = "intlify-message-compilation-start", f = "intlify-message-compilation-end", w && w(u));
792
- const E = i(n, Rt(e, r, a, n, l, o));
793
- if (process.env.NODE_ENV !== "production" && H) {
794
- const c = window.performance.now(), g = e.__v_emitter;
795
- g && s && g.emit("message-compilation", {
796
- type: "message-compilation",
797
- message: n,
798
- time: c - s,
799
- groupId: `translate:${t}`
800
- }), u && f && w && j && (w(f), j("intlify message compilation", u, f));
801
- }
802
- return E.locale = r, E.key = t, E.source = n, E;
803
- }
804
- function vt(e, t, r) {
805
- let n = null, a, o;
806
- process.env.NODE_ENV !== "production" && H && (n = window.performance.now(), a = "intlify-message-evaluation-start", o = "intlify-message-evaluation-end", w && w(a));
807
- const i = t(r);
808
- if (process.env.NODE_ENV !== "production" && H) {
809
- const l = window.performance.now(), s = e.__v_emitter;
810
- s && n && s.emit("message-evaluation", {
811
- type: "message-evaluation",
812
- value: i,
813
- time: l - n,
814
- groupId: `translate:${t.key}`
815
- }), a && o && w && j && (w(o), j("intlify message evaluation", a, o));
816
- }
817
- return i;
818
- }
819
- function bt(...e) {
820
- const [t, r, n] = e, a = {};
821
- if (!m(t) && !S(t) && !P(t) && !z(t))
822
- throw V(h.INVALID_ARGUMENT);
823
- const o = S(t) ? String(t) : (P(t), t);
824
- return S(r) ? a.plural = r : m(r) ? a.default = r : C(r) && !re(r) ? a.named = r : W(r) && (a.list = r), S(n) ? a.plural = n : m(n) ? a.default = n : C(n) && X(a, n), [o, a];
825
- }
826
- function Rt(e, t, r, n, a, o) {
827
- return {
828
- locale: t,
829
- key: r,
830
- warnHtmlMessage: a,
831
- onError: (i) => {
832
- if (o && o(i), process.env.NODE_ENV !== "production") {
833
- const l = St(n), s = `Message compilation error: ${i.message}`, u = i.location && l && $e(l, i.location.start.offset, i.location.end.offset), f = e.__v_emitter;
834
- f && l && f.emit("compile-error", {
835
- message: l,
836
- error: i.message,
837
- start: i.location && i.location.start.offset,
838
- end: i.location && i.location.end.offset,
839
- groupId: `translate:${r}`
840
- }), console.error(u ? `${s}
841
- ${u}` : s);
842
- } else
843
- throw i;
844
- },
845
- onCacheKey: (i) => Ge(t, r, i)
846
- };
847
- }
848
- function St(e) {
849
- if (m(e))
850
- return e;
851
- if (e.loc && e.loc.source)
852
- return e.loc.source;
853
- }
854
- function wt(e, t, r, n) {
855
- const { modifiers: a, pluralRules: o, messageResolver: i, fallbackLocale: l, fallbackWarn: s, missingWarn: u, fallbackContext: f } = e, c = {
856
- locale: t,
857
- modifiers: a,
858
- pluralRules: o,
859
- messages: (g) => {
860
- let p = i(r, g);
861
- if (p == null && f) {
862
- const [, , A] = ke(f, g, t, l, s, u);
863
- p = i(A, g);
864
- }
865
- if (m(p) || z(p)) {
866
- let A = !1;
867
- const N = Ve(e, g, t, p, g, () => {
868
- A = !0;
869
- });
870
- return A ? Te : N;
871
- } else return P(p) ? p : Te;
872
- }
873
- };
874
- return e.processor && (c.processor = e.processor), n.list && (c.list = n.list), n.named && (c.named = n.named), S(n.plural) && (c.pluralIndex = n.plural), c;
875
- }
876
- const Oe = typeof Intl < "u", Ue = {
877
- dateTimeFormat: Oe && typeof Intl.DateTimeFormat < "u",
878
- numberFormat: Oe && typeof Intl.NumberFormat < "u"
879
- };
880
- function en(e, ...t) {
881
- const { datetimeFormats: r, unresolving: n, fallbackLocale: a, onWarn: o, localeFallbacker: i } = e, { __datetimeFormatters: l } = e;
882
- if (process.env.NODE_ENV !== "production" && !Ue.dateTimeFormat)
883
- return o(Y(R.CANNOT_FORMAT_DATE)), Fe;
884
- const [s, u, f, E] = Pt(...t), c = b(f.missingWarn) ? f.missingWarn : e.missingWarn, g = b(f.fallbackWarn) ? f.fallbackWarn : e.fallbackWarn, p = !!f.part, A = ae(e, f), F = i(
885
- e,
886
- // eslint-disable-line @typescript-eslint/no-explicit-any
887
- a,
888
- A
889
- );
890
- if (!m(s) || s === "")
891
- return new Intl.DateTimeFormat(A, E).format(u);
892
- let N = {}, _, O = null, d = A, T = null;
893
- const M = "datetime format";
894
- for (let y = 0; y < F.length; y++) {
895
- if (_ = T = F[y], process.env.NODE_ENV !== "production" && A !== _ && oe(g, s) && o(Y(R.FALLBACK_TO_DATE_FORMAT, {
896
- key: s,
897
- target: _
898
- })), process.env.NODE_ENV !== "production" && A !== _) {
899
- const U = e.__v_emitter;
900
- U && U.emit("fallback", {
901
- type: M,
902
- key: s,
903
- from: d,
904
- to: T,
905
- groupId: `${M}:${s}`
906
- });
907
- }
908
- if (N = r[_] || {}, O = N[s], C(O))
909
- break;
910
- ie(e, s, _, c, M), d = T;
911
- }
912
- if (!C(O) || !m(_))
913
- return n ? se : s;
914
- let L = `${_}__${s}`;
915
- re(E) || (L = `${L}__${JSON.stringify(E)}`);
916
- let I = l.get(L);
917
- return I || (I = new Intl.DateTimeFormat(_, X({}, O, E)), l.set(L, I)), p ? I.formatToParts(u) : I.format(u);
918
- }
919
- const yt = [
920
- "localeMatcher",
921
- "weekday",
922
- "era",
923
- "year",
924
- "month",
925
- "day",
926
- "hour",
927
- "minute",
928
- "second",
929
- "timeZoneName",
930
- "formatMatcher",
931
- "hour12",
932
- "timeZone",
933
- "dateStyle",
934
- "timeStyle",
935
- "calendar",
936
- "dayPeriod",
937
- "numberingSystem",
938
- "hourCycle",
939
- "fractionalSecondDigits"
940
- ];
941
- function Pt(...e) {
942
- const [t, r, n, a] = e, o = {};
943
- let i = {}, l;
944
- if (m(t)) {
945
- const s = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
946
- if (!s)
947
- throw V(h.INVALID_ISO_DATE_ARGUMENT);
948
- const u = s[3] ? s[3].trim().startsWith("T") ? `${s[1].trim()}${s[3].trim()}` : `${s[1].trim()}T${s[3].trim()}` : s[1].trim();
949
- l = new Date(u);
950
- try {
951
- l.toISOString();
952
- } catch {
953
- throw V(h.INVALID_ISO_DATE_ARGUMENT);
954
- }
955
- } else if (Ke(t)) {
956
- if (isNaN(t.getTime()))
957
- throw V(h.INVALID_DATE_ARGUMENT);
958
- l = t;
959
- } else if (S(t))
960
- l = t;
961
- else
962
- throw V(h.INVALID_ARGUMENT);
963
- return m(r) ? o.key = r : C(r) && Object.keys(r).forEach((s) => {
964
- yt.includes(s) ? i[s] = r[s] : o[s] = r[s];
965
- }), m(n) ? o.locale = n : C(n) && (i = n), C(a) && (i = a), [o.key || "", l, o, i];
966
- }
967
- function tn(e, t, r) {
968
- const n = e;
969
- for (const a in r) {
970
- const o = `${t}__${a}`;
971
- n.__datetimeFormatters.has(o) && n.__datetimeFormatters.delete(o);
972
- }
973
- }
974
- function nn(e, ...t) {
975
- const { numberFormats: r, unresolving: n, fallbackLocale: a, onWarn: o, localeFallbacker: i } = e, { __numberFormatters: l } = e;
976
- if (process.env.NODE_ENV !== "production" && !Ue.numberFormat)
977
- return o(Y(R.CANNOT_FORMAT_NUMBER)), Fe;
978
- const [s, u, f, E] = Vt(...t), c = b(f.missingWarn) ? f.missingWarn : e.missingWarn, g = b(f.fallbackWarn) ? f.fallbackWarn : e.fallbackWarn, p = !!f.part, A = ae(e, f), F = i(
979
- e,
980
- // eslint-disable-line @typescript-eslint/no-explicit-any
981
- a,
982
- A
983
- );
984
- if (!m(s) || s === "")
985
- return new Intl.NumberFormat(A, E).format(u);
986
- let N = {}, _, O = null, d = A, T = null;
987
- const M = "number format";
988
- for (let y = 0; y < F.length; y++) {
989
- if (_ = T = F[y], process.env.NODE_ENV !== "production" && A !== _ && oe(g, s) && o(Y(R.FALLBACK_TO_NUMBER_FORMAT, {
990
- key: s,
991
- target: _
992
- })), process.env.NODE_ENV !== "production" && A !== _) {
993
- const U = e.__v_emitter;
994
- U && U.emit("fallback", {
995
- type: M,
996
- key: s,
997
- from: d,
998
- to: T,
999
- groupId: `${M}:${s}`
1000
- });
1001
- }
1002
- if (N = r[_] || {}, O = N[s], C(O))
1003
- break;
1004
- ie(e, s, _, c, M), d = T;
1005
- }
1006
- if (!C(O) || !m(_))
1007
- return n ? se : s;
1008
- let L = `${_}__${s}`;
1009
- re(E) || (L = `${L}__${JSON.stringify(E)}`);
1010
- let I = l.get(L);
1011
- return I || (I = new Intl.NumberFormat(_, X({}, O, E)), l.set(L, I)), p ? I.formatToParts(u) : I.format(u);
1012
- }
1013
- const kt = [
1014
- "localeMatcher",
1015
- "style",
1016
- "currency",
1017
- "currencyDisplay",
1018
- "currencySign",
1019
- "useGrouping",
1020
- "minimumIntegerDigits",
1021
- "minimumFractionDigits",
1022
- "maximumFractionDigits",
1023
- "minimumSignificantDigits",
1024
- "maximumSignificantDigits",
1025
- "compactDisplay",
1026
- "notation",
1027
- "signDisplay",
1028
- "unit",
1029
- "unitDisplay",
1030
- "roundingMode",
1031
- "roundingPriority",
1032
- "roundingIncrement",
1033
- "trailingZeroDisplay"
1034
- ];
1035
- function Vt(...e) {
1036
- const [t, r, n, a] = e, o = {};
1037
- let i = {};
1038
- if (!S(t))
1039
- throw V(h.INVALID_ARGUMENT);
1040
- const l = t;
1041
- return m(r) ? o.key = r : C(r) && Object.keys(r).forEach((s) => {
1042
- kt.includes(s) ? i[s] = r[s] : o[s] = r[s];
1043
- }), m(n) ? o.locale = n : C(n) && (i = n), C(a) && (i = a), [o.key || "", l, o, i];
1044
- }
1045
- function rn(e, t, r) {
1046
- const n = e;
1047
- for (const a in r) {
1048
- const o = `${t}__${a}`;
1049
- n.__numberFormatters.has(o) && n.__numberFormatters.delete(o);
1050
- }
1051
- }
1052
- Ze();
1053
- export {
1054
- je as CompileErrorCodes,
1055
- h as CoreErrorCodes,
1056
- R as CoreWarnCodes,
1057
- yt as DATETIME_FORMAT_OPTIONS_KEYS,
1058
- te as DEFAULT_LOCALE,
1059
- it as DEFAULT_MESSAGE_DATA_TYPE,
1060
- Fe as MISSING_RESOLVE_VALUE,
1061
- se as NOT_REOSLVED,
1062
- kt as NUMBER_FORMAT_OPTIONS_KEYS,
1063
- At as VERSION,
1064
- tn as clearDateTimeFormat,
1065
- rn as clearNumberFormat,
1066
- Qt as compile,
1067
- Zt as compileToFunction,
1068
- ze as createCompileError,
1069
- xt as createCoreContext,
1070
- V as createCoreError,
1071
- ft as createMessageContext,
1072
- en as datetime,
1073
- Kt as fallbackWithLocaleChain,
1074
- Tt as fallbackWithSimple,
1075
- It as getAdditionalMeta,
1076
- Xt as getFallbackContext,
1077
- ae as getLocale,
1078
- Y as getWarnMessage,
1079
- ie as handleMissing,
1080
- _t as initI18nDevTools,
1081
- Re as isAlmostSameLocale,
1082
- Ft as isImplicitFallback,
1083
- z as isMessageAST,
1084
- P as isMessageFunction,
1085
- oe as isTranslateFallbackWarn,
1086
- Ct as isTranslateMissingWarn,
1087
- nn as number,
1088
- rt as parse,
1089
- Pt as parseDateTimeArgs,
1090
- Vt as parseNumberArgs,
1091
- bt as parseTranslateArgs,
1092
- Ht as registerLocaleFallbacker,
1093
- Yt as registerMessageCompiler,
1094
- Bt as registerMessageResolver,
1095
- _e as resolveLocale,
1096
- $t as resolveValue,
1097
- at as resolveWithKeyValue,
1098
- jt as setAdditionalMeta,
1099
- Gt as setDevToolsHook,
1100
- zt as setFallbackContext,
1101
- qt as translate,
1102
- dt as translateDevTools,
1103
- Jt as updateFallbackLocale
1104
- };