@feedmepos/mf-menu 0.32.55 → 0.32.56

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 (79) hide show
  1. package/dist/{App-D9i97kPC.js → App-BUePFRjb.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BxhzKypm.js → ApplyProduct.vue_vue_type_script_setup_true_lang-oPq3AcV2.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-kPOpOatz.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-r2W9cuVe.js} +2 -2
  4. package/dist/{Catalog-DFJXgNsO.js → Catalog-uo0vO8uy.js} +6 -6
  5. package/dist/{Category-FaheENIM.js → Category-BvetZzck.js} +4 -4
  6. package/dist/{Category-DcN5huA8.js → Category-CHN6aSPS.js} +4 -4
  7. package/dist/{CookingGuide-w9A6JMSR.js → CookingGuide-DU8D0T0w.js} +5 -5
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BGCVlZ7J.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DIxKLpe8.js} +1 -1
  9. package/dist/{Group-Dy8HcG_Y.js → Group-BFGFyGhC.js} +3 -3
  10. package/dist/{Group-DdqHR86E.js → Group-Cd1OoALN.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-Dvq7j79a.js → Group.vue_vue_type_script_setup_true_lang-Dyb9On55.js} +8 -8
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BBcE09pP.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-XcNt0ZBv.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DbIKyjW3.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Dw3IXPUL.js} +7 -7
  14. package/dist/{Ingredient-gj1v3spC.js → Ingredient-CXU04qIu.js} +3 -3
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DV-RjIZv.js → InventoryBinding.vue_vue_type_script_setup_true_lang-q9DVgfMD.js} +2 -2
  16. package/dist/LinkProductSideSheet-CaFKMMSd.js +721 -0
  17. package/dist/MenuSetting-EeJdFNfx.js +685 -0
  18. package/dist/{OrderPacing-D0FFFm3T.js → OrderPacing-Db4P-2ea.js} +6 -6
  19. package/dist/{PrintRoute-Cgcxblv_.js → PrintRoute-CSScKjFa.js} +4 -4
  20. package/dist/{Product-Nti0T9iE.js → Product-tvbYvK5u.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-DyWLMrUC.js → Product.vue_vue_type_script_setup_true_lang-BQ_PgMDP.js} +12 -12
  22. package/dist/{ProductInternalTools-oOMZV7kK.js → ProductInternalTools-D2rmgEby.js} +6 -6
  23. package/dist/{Products-9elHDYp6.js → Products-WPvLY_wr.js} +43 -43
  24. package/dist/{Publish-Bi33tD6L.js → Publish-BJ9rz75C.js} +3 -3
  25. package/dist/{Recipe-BSysXC_H.js → Recipe-BMRTd58L.js} +4 -4
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BqsEM8Kj.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BefgcG34.js} +1 -1
  27. package/dist/RuleView.vue_vue_type_script_setup_true_lang-DlzIboPc.js +3305 -0
  28. package/dist/{Scheduler-CmXIA0tH.js → Scheduler-CHQ5YcBq.js} +3 -3
  29. package/dist/{ServingSequence-CPVOcSSM.js → ServingSequence-BtXSEzfn.js} +3 -3
  30. package/dist/{Setting-BQPHY7B-.js → Setting-BnXj1uTa.js} +5 -5
  31. package/dist/{Subcategory-DQAT58lU.js → Subcategory-miGPIoku.js} +5 -5
  32. package/dist/{Takeaway-DOi4Xogf.js → Takeaway-DtVvfRQy.js} +1 -1
  33. package/dist/{Takeaway-DtyEbDDB.js → Takeaway-zaChLDgt.js} +4 -4
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CNccXS8u.js → Takeaway.vue_vue_type_script_setup_true_lang-BFnbiGsG.js} +5 -5
  35. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-D9VV1s1E.js → Thumbnail.vue_vue_type_script_setup_true_lang-CNYxe969.js} +4 -4
  36. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-Cpg0cCuJ.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-D4fWF46n.js} +1 -1
  37. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-CGXXpcYQ.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-DLqeQRkH.js} +2 -2
  38. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DUxEgL0r.js +5974 -0
  39. package/dist/{Unit-BVGd9vOo.js → Unit-BaLVANd9.js} +2 -2
  40. package/dist/{Variant-wgsEnYNH.js → Variant-Bnb4SllS.js} +3 -3
  41. package/dist/{_id_-XLbzesLX.js → _id_-btH88hnV.js} +9 -9
  42. package/dist/{app-DBDi3v7O.js → app-BO16t-ps.js} +32 -32
  43. package/dist/{app-DXZuPEOd.js → app-D1a9CqKF.js} +1 -1
  44. package/dist/app.js +1 -1
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/thumbnailUpload.d.ts +6 -0
  46. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadForm.vue.d.ts +35 -29
  47. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ProductDetail.vue.d.ts +3 -0
  48. package/dist/apps/mf-menu/src/components/rule_group/CatalogLinkItemRuleView.vue.d.ts +2 -0
  49. package/dist/apps/mf-menu/src/components/rule_group/RuleView.vue.d.ts +2 -0
  50. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  51. package/dist/assets/{override-menu-BiwqdooM.js → linked-status-zxrRiX3x.js} +3 -3
  52. package/dist/assets/{menu-export-BemM1bWH.js → menu-export-DXB8Py6r.js} +2 -2
  53. package/dist/assets/{linked-status-BELOy4Ju.js → override-menu-CEIJGR_x.js} +3 -3
  54. package/dist/assets/{validate-menu-mNalZZpy.js → validate-menu-DN3P-OR7.js} +2 -2
  55. package/dist/{catalog-Beh91hfF.js → catalog-COu1SO_p.js} +1 -1
  56. package/dist/{catalogSetting-CvotY0sm.js → catalogSetting-D34fLwdB.js} +1 -1
  57. package/dist/{currency-DWU0Lz6M.js → currency-DlfcFoj5.js} +1 -1
  58. package/dist/{dayjs.min-b9_NYDqQ.js → dayjs.min-xM9KAjrx.js} +2 -2
  59. package/dist/{index-ZpjMtEkL.js → index-B5d_uvVc.js} +5 -5
  60. package/dist/{index-B2zWt4Ih.js → index-ByEp1JD0.js} +5 -5
  61. package/dist/{index.vue_vue_type_script_setup_true_lang-CSSSNBt8.js → index.vue_vue_type_script_setup_true_lang-DAJSG8i1.js} +6 -6
  62. package/dist/{item-DtR73Afo.js → item-CtfWra_w.js} +19 -19
  63. package/dist/{jszip.min-DgMmizjt.js → jszip.min-CNLaYb3p.js} +175 -175
  64. package/dist/{memberPricing-RVw5I6LL.js → memberPricing-DSqwOAgM.js} +1 -1
  65. package/dist/{menu-CaFnkDPh.js → menu-DUsES-YM.js} +1 -1
  66. package/dist/{menuV2-CphaxHaj.js → menuV2-BaY8Z_1c.js} +39 -39
  67. package/dist/mf-menu.css +1 -1
  68. package/dist/{order_pacing-CUyiMmGB.js → order_pacing-B5a8Fch-.js} +5 -5
  69. package/dist/{priceTier-CGLpjMw4.js → priceTier-bxvu4c84.js} +1 -1
  70. package/dist/{rules-3d19nDAK.js → rules-CTd3QZhN.js} +3 -3
  71. package/dist/{scheduler-CyPQu2Jd.js → scheduler-DIl9SPsA.js} +4 -4
  72. package/dist/{toExcel-Dbqi_aWn.js → toExcel-CUAEPhEv.js} +2 -2
  73. package/dist/{unit-CidyefuC.js → unit-DThoovpF.js} +3 -3
  74. package/package.json +1 -1
  75. package/dist/LinkProductSideSheet-Bwt2W9XG.js +0 -687
  76. package/dist/MenuSetting-CRCDO92S.js +0 -648
  77. package/dist/RuleView.vue_vue_type_script_setup_true_lang-Cxl5Mvc1.js +0 -3285
  78. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dl-6UT3T.js +0 -5940
  79. /package/dist/{vuedraggable-CK8z7qA8.js → RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js} +0 -0
@@ -1,3285 +0,0 @@
1
- import { defineComponent as ie, createElementBlock as Y, openBlock as x, normalizeClass as bn, renderSlot as Qe, createCommentVNode as we, createVNode as Q, createElementVNode as V, toDisplayString as Z, withCtx as oe, getCurrentInstance as Pt, inject as Hn, ref as se, shallowRef as Gn, computed as W, watch as Ze, onMounted as vn, onUnmounted as Wn, h as hn, Text as Bn, Fragment as de, resolveComponent as pe, unref as j, withModifiers as ae, renderList as Me, createBlock as Wt } from "vue";
2
- import { x as xn, N as Kn } from "./app-5fxKLAzS.js";
3
- import { useCoreStore as Dt, useI18n as Ge, useCustomAttributes as Bt, EMPTY_RULE as Yn, isEmptyMongoQuery as jn, isEmptyRule as Xn } from "@feedmepos/mf-common";
4
- import "@vue/devtools-api";
5
- import { u as Tn, H as xt, U as bt } from "./index.vue_vue_type_script_setup_true_lang-CSSSNBt8.js";
6
- import { FmButtonVariant as Fe, components as qn } from "@feedmepos/ui-library";
7
- const Jn = /* @__PURE__ */ ie({
8
- __name: "FormColumn",
9
- props: {
10
- shrinkable: { type: Boolean }
11
- },
12
- setup(e) {
13
- return (t, n) => (x(), Y("div", {
14
- class: bn(["flex-1 flex flex-col space-y-24", { "min-h-0": t.shrinkable }])
15
- }, [
16
- Qe(t.$slots, "default")
17
- ], 2));
18
- }
19
- }), Qn = {
20
- key: 0,
21
- class: "flex flex-row justify-between items-center"
22
- }, Zn = { class: "space-y-4" }, zn = { class: "fm-typo-en-title-sm-600" }, er = {
23
- key: 0,
24
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
25
- }, xa = /* @__PURE__ */ ie({
26
- __name: "FormSection",
27
- props: {
28
- title: {},
29
- subTitle: {},
30
- shrinkable: { type: Boolean }
31
- },
32
- setup(e) {
33
- return (t, n) => (x(), Y("div", {
34
- class: bn(["flex flex-col space-y-16", { "min-h-0": t.shrinkable }])
35
- }, [
36
- t.title ? (x(), Y("div", Qn, [
37
- V("div", Zn, [
38
- V("p", zn, Z(t.title), 1),
39
- t.subTitle ? (x(), Y("p", er, Z(t.subTitle), 1)) : we("", !0)
40
- ]),
41
- Qe(t.$slots, "append-title")
42
- ])) : we("", !0),
43
- Q(Jn, { shrinkable: t.shrinkable }, {
44
- default: oe(() => [
45
- Qe(t.$slots, "default")
46
- ]),
47
- _: 3
48
- }, 8, ["shrinkable"])
49
- ], 2));
50
- }
51
- });
52
- /*!
53
- * shared v10.0.5
54
- * (c) 2024 kazuya kawaguchi
55
- * Released under the MIT License.
56
- */
57
- const Kt = typeof window < "u", Te = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), tr = (e, t, n) => nr({ l: e, k: t, s: n }), nr = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), ee = (e) => typeof e == "number" && isFinite(e), rr = (e) => wt(e) === "[object Date]", ze = (e) => wt(e) === "[object RegExp]", tt = (e) => M(e) && Object.keys(e).length === 0, te = Object.assign, or = Object.create, H = (e = null) => or(e);
58
- let Yt;
59
- const he = () => Yt || (Yt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : H());
60
- function jt(e) {
61
- return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
62
- }
63
- const ar = Object.prototype.hasOwnProperty;
64
- function le(e, t) {
65
- return ar.call(e, t);
66
- }
67
- const z = Array.isArray, K = (e) => typeof e == "function", C = (e) => typeof e == "string", J = (e) => typeof e == "boolean", U = (e) => e !== null && typeof e == "object", sr = (e) => U(e) && K(e.then) && K(e.catch), In = Object.prototype.toString, wt = (e) => In.call(e), M = (e) => wt(e) === "[object Object]", lr = (e) => e == null ? "" : z(e) || M(e) && e.toString === In ? JSON.stringify(e, null, 2) : String(e);
68
- function Ft(e, t = "") {
69
- return e.reduce((n, r, o) => o === 0 ? n + r : n + t + r, "");
70
- }
71
- function ur(e, t) {
72
- typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
73
- }
74
- const je = (e) => !U(e) || z(e);
75
- function Je(e, t) {
76
- if (je(e) || je(t))
77
- throw new Error("Invalid value");
78
- const n = [{ src: e, des: t }];
79
- for (; n.length; ) {
80
- const { src: r, des: o } = n.pop();
81
- Object.keys(r).forEach((a) => {
82
- a !== "__proto__" && (U(r[a]) && !U(o[a]) && (o[a] = Array.isArray(r[a]) ? [] : H()), je(o[a]) || je(r[a]) ? o[a] = r[a] : n.push({ src: r[a], des: o[a] }));
83
- });
84
- }
85
- }
86
- function ir(e, t, n) {
87
- return { line: e, column: t, offset: n };
88
- }
89
- function It(e, t, n) {
90
- return { start: e, end: t };
91
- }
92
- const $ = {
93
- // tokenizer error codes
94
- EXPECTED_TOKEN: 1,
95
- INVALID_TOKEN_IN_PLACEHOLDER: 2,
96
- UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
97
- UNKNOWN_ESCAPE_SEQUENCE: 4,
98
- INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
99
- UNBALANCED_CLOSING_BRACE: 6,
100
- UNTERMINATED_CLOSING_BRACE: 7,
101
- EMPTY_PLACEHOLDER: 8,
102
- NOT_ALLOW_NEST_PLACEHOLDER: 9,
103
- INVALID_LINKED_FORMAT: 10,
104
- // parser error codes
105
- MUST_HAVE_MESSAGES_IN_PLURAL: 11,
106
- UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
107
- UNEXPECTED_EMPTY_LINKED_KEY: 13,
108
- UNEXPECTED_LEXICAL_ANALYSIS: 14
109
- }, cr = 17;
110
- function nt(e, t, n = {}) {
111
- const { domain: r, messages: o, args: a } = n, u = e, m = new SyntaxError(String(u));
112
- return m.code = e, t && (m.location = t), m.domain = r, m;
113
- }
114
- function mr(e) {
115
- throw e;
116
- }
117
- const me = " ", fr = "\r", ne = `
118
- `, _r = "\u2028", dr = "\u2029";
119
- function pr(e) {
120
- const t = e;
121
- let n = 0, r = 1, o = 1, a = 0;
122
- const u = (f) => t[f] === fr && t[f + 1] === ne, m = (f) => t[f] === ne, c = (f) => t[f] === dr, g = (f) => t[f] === _r, T = (f) => u(f) || m(f) || c(f) || g(f), A = () => n, E = () => r, _ = () => o, O = () => a, I = (f) => u(f) || c(f) || g(f) ? ne : t[f], b = () => I(n), i = () => I(n + a);
123
- function v() {
124
- return a = 0, T(n) && (r++, o = 0), u(n) && n++, n++, o++, t[n];
125
- }
126
- function R() {
127
- return u(n + a) && a++, a++, t[n + a];
128
- }
129
- function p() {
130
- n = 0, r = 1, o = 1, a = 0;
131
- }
132
- function L(f = 0) {
133
- a = f;
134
- }
135
- function y() {
136
- const f = n + a;
137
- for (; f !== n; )
138
- v();
139
- a = 0;
140
- }
141
- return {
142
- index: A,
143
- line: E,
144
- column: _,
145
- peekOffset: O,
146
- charAt: I,
147
- currentChar: b,
148
- currentPeek: i,
149
- next: v,
150
- peek: R,
151
- reset: p,
152
- resetPeek: L,
153
- skipToPeek: y
154
- };
155
- }
156
- const ge = void 0, Er = ".", Xt = "'", gr = "tokenizer";
157
- function yr(e, t = {}) {
158
- const n = t.location !== !1, r = pr(e), o = () => r.index(), a = () => ir(r.line(), r.column(), r.index()), u = a(), m = o(), c = {
159
- currentType: 13,
160
- offset: m,
161
- startLoc: u,
162
- endLoc: u,
163
- lastType: 13,
164
- lastOffset: m,
165
- lastStartLoc: u,
166
- lastEndLoc: u,
167
- braceNest: 0,
168
- inLinked: !1,
169
- text: ""
170
- }, g = () => c, { onError: T } = t;
171
- function A(s, l, h, ...k) {
172
- const X = g();
173
- if (l.column += h, l.offset += h, T) {
174
- const F = n ? It(X.startLoc, l) : null, d = nt(s, F, {
175
- domain: gr,
176
- args: k
177
- });
178
- T(d);
179
- }
180
- }
181
- function E(s, l, h) {
182
- s.endLoc = a(), s.currentType = l;
183
- const k = { type: l };
184
- return n && (k.loc = It(s.startLoc, s.endLoc)), h != null && (k.value = h), k;
185
- }
186
- const _ = (s) => E(
187
- s,
188
- 13
189
- /* TokenTypes.EOF */
190
- );
191
- function O(s, l) {
192
- return s.currentChar() === l ? (s.next(), l) : (A($.EXPECTED_TOKEN, a(), 0, l), "");
193
- }
194
- function I(s) {
195
- let l = "";
196
- for (; s.currentPeek() === me || s.currentPeek() === ne; )
197
- l += s.currentPeek(), s.peek();
198
- return l;
199
- }
200
- function b(s) {
201
- const l = I(s);
202
- return s.skipToPeek(), l;
203
- }
204
- function i(s) {
205
- if (s === ge)
206
- return !1;
207
- const l = s.charCodeAt(0);
208
- return l >= 97 && l <= 122 || // a-z
209
- l >= 65 && l <= 90 || // A-Z
210
- l === 95;
211
- }
212
- function v(s) {
213
- if (s === ge)
214
- return !1;
215
- const l = s.charCodeAt(0);
216
- return l >= 48 && l <= 57;
217
- }
218
- function R(s, l) {
219
- const { currentType: h } = l;
220
- if (h !== 2)
221
- return !1;
222
- I(s);
223
- const k = i(s.currentPeek());
224
- return s.resetPeek(), k;
225
- }
226
- function p(s, l) {
227
- const { currentType: h } = l;
228
- if (h !== 2)
229
- return !1;
230
- I(s);
231
- const k = s.currentPeek() === "-" ? s.peek() : s.currentPeek(), X = v(k);
232
- return s.resetPeek(), X;
233
- }
234
- function L(s, l) {
235
- const { currentType: h } = l;
236
- if (h !== 2)
237
- return !1;
238
- I(s);
239
- const k = s.currentPeek() === Xt;
240
- return s.resetPeek(), k;
241
- }
242
- function y(s, l) {
243
- const { currentType: h } = l;
244
- if (h !== 7)
245
- return !1;
246
- I(s);
247
- const k = s.currentPeek() === ".";
248
- return s.resetPeek(), k;
249
- }
250
- function f(s, l) {
251
- const { currentType: h } = l;
252
- if (h !== 8)
253
- return !1;
254
- I(s);
255
- const k = i(s.currentPeek());
256
- return s.resetPeek(), k;
257
- }
258
- function S(s, l) {
259
- const { currentType: h } = l;
260
- if (!(h === 7 || h === 11))
261
- return !1;
262
- I(s);
263
- const k = s.currentPeek() === ":";
264
- return s.resetPeek(), k;
265
- }
266
- function P(s, l) {
267
- const { currentType: h } = l;
268
- if (h !== 9)
269
- return !1;
270
- const k = () => {
271
- const F = s.currentPeek();
272
- return F === "{" ? i(s.peek()) : F === "@" || F === "|" || F === ":" || F === "." || F === me || !F ? !1 : F === ne ? (s.peek(), k()) : w(s, !1);
273
- }, X = k();
274
- return s.resetPeek(), X;
275
- }
276
- function B(s) {
277
- I(s);
278
- const l = s.currentPeek() === "|";
279
- return s.resetPeek(), l;
280
- }
281
- function w(s, l = !0) {
282
- const h = (X = !1, F = "") => {
283
- const d = s.currentPeek();
284
- return d === "{" || d === "@" || !d ? X : d === "|" ? !(F === me || F === ne) : d === me ? (s.peek(), h(!0, me)) : d === ne ? (s.peek(), h(!0, ne)) : !0;
285
- }, k = h();
286
- return l && s.resetPeek(), k;
287
- }
288
- function D(s, l) {
289
- const h = s.currentChar();
290
- return h === ge ? ge : l(h) ? (s.next(), h) : null;
291
- }
292
- function Ie(s) {
293
- const l = s.charCodeAt(0);
294
- return l >= 97 && l <= 122 || // a-z
295
- l >= 65 && l <= 90 || // A-Z
296
- l >= 48 && l <= 57 || // 0-9
297
- l === 95 || // _
298
- l === 36;
299
- }
300
- function ot(s) {
301
- return D(s, Ie);
302
- }
303
- function at(s) {
304
- const l = s.charCodeAt(0);
305
- return l >= 97 && l <= 122 || // a-z
306
- l >= 65 && l <= 90 || // A-Z
307
- l >= 48 && l <= 57 || // 0-9
308
- l === 95 || // _
309
- l === 36 || // $
310
- l === 45;
311
- }
312
- function st(s) {
313
- return D(s, at);
314
- }
315
- function lt(s) {
316
- const l = s.charCodeAt(0);
317
- return l >= 48 && l <= 57;
318
- }
319
- function ut(s) {
320
- return D(s, lt);
321
- }
322
- function ce(s) {
323
- const l = s.charCodeAt(0);
324
- return l >= 48 && l <= 57 || // 0-9
325
- l >= 65 && l <= 70 || // A-F
326
- l >= 97 && l <= 102;
327
- }
328
- function Be(s) {
329
- return D(s, ce);
330
- }
331
- function xe(s) {
332
- let l = "", h = "";
333
- for (; l = ut(s); )
334
- h += l;
335
- return h;
336
- }
337
- function it(s) {
338
- let l = "";
339
- for (; ; ) {
340
- const h = s.currentChar();
341
- if (h === "{" || h === "}" || h === "@" || h === "|" || !h)
342
- break;
343
- if (h === me || h === ne)
344
- if (w(s))
345
- l += h, s.next();
346
- else {
347
- if (B(s))
348
- break;
349
- l += h, s.next();
350
- }
351
- else
352
- l += h, s.next();
353
- }
354
- return l;
355
- }
356
- function ct(s) {
357
- b(s);
358
- let l = "", h = "";
359
- for (; l = st(s); )
360
- h += l;
361
- return s.currentChar() === ge && A($.UNTERMINATED_CLOSING_BRACE, a(), 0), h;
362
- }
363
- function mt(s) {
364
- b(s);
365
- let l = "";
366
- return s.currentChar() === "-" ? (s.next(), l += `-${xe(s)}`) : l += xe(s), s.currentChar() === ge && A($.UNTERMINATED_CLOSING_BRACE, a(), 0), l;
367
- }
368
- function Gt(s) {
369
- return s !== Xt && s !== ne;
370
- }
371
- function ft(s) {
372
- b(s), O(s, "'");
373
- let l = "", h = "";
374
- for (; l = D(s, Gt); )
375
- l === "\\" ? h += _t(s) : h += l;
376
- const k = s.currentChar();
377
- return k === ne || k === ge ? (A($.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), k === ne && (s.next(), O(s, "'")), h) : (O(s, "'"), h);
378
- }
379
- function _t(s) {
380
- const l = s.currentChar();
381
- switch (l) {
382
- case "\\":
383
- case "'":
384
- return s.next(), `\\${l}`;
385
- case "u":
386
- return Ke(s, l, 4);
387
- case "U":
388
- return Ke(s, l, 6);
389
- default:
390
- return A($.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, l), "";
391
- }
392
- }
393
- function Ke(s, l, h) {
394
- O(s, l);
395
- let k = "";
396
- for (let X = 0; X < h; X++) {
397
- const F = Be(s);
398
- if (!F) {
399
- A($.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${l}${k}${s.currentChar()}`);
400
- break;
401
- }
402
- k += F;
403
- }
404
- return `\\${l}${k}`;
405
- }
406
- function dt(s) {
407
- return s !== "{" && s !== "}" && s !== me && s !== ne;
408
- }
409
- function pt(s) {
410
- b(s);
411
- let l = "", h = "";
412
- for (; l = D(s, dt); )
413
- h += l;
414
- return h;
415
- }
416
- function Et(s) {
417
- let l = "", h = "";
418
- for (; l = ot(s); )
419
- h += l;
420
- return h;
421
- }
422
- function gt(s) {
423
- const l = (h) => {
424
- const k = s.currentChar();
425
- return k === "{" || k === "@" || k === "|" || k === "(" || k === ")" || !k || k === me ? h : (h += k, s.next(), l(h));
426
- };
427
- return l("");
428
- }
429
- function ke(s) {
430
- b(s);
431
- const l = O(
432
- s,
433
- "|"
434
- /* TokenChars.Pipe */
435
- );
436
- return b(s), l;
437
- }
438
- function Ne(s, l) {
439
- let h = null;
440
- switch (s.currentChar()) {
441
- case "{":
442
- return l.braceNest >= 1 && A($.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), s.next(), h = E(
443
- l,
444
- 2,
445
- "{"
446
- /* TokenChars.BraceLeft */
447
- ), b(s), l.braceNest++, h;
448
- case "}":
449
- return l.braceNest > 0 && l.currentType === 2 && A($.EMPTY_PLACEHOLDER, a(), 0), s.next(), h = E(
450
- l,
451
- 3,
452
- "}"
453
- /* TokenChars.BraceRight */
454
- ), l.braceNest--, l.braceNest > 0 && b(s), l.inLinked && l.braceNest === 0 && (l.inLinked = !1), h;
455
- case "@":
456
- return l.braceNest > 0 && A($.UNTERMINATED_CLOSING_BRACE, a(), 0), h = Re(s, l) || _(l), l.braceNest = 0, h;
457
- default: {
458
- let X = !0, F = !0, d = !0;
459
- if (B(s))
460
- return l.braceNest > 0 && A($.UNTERMINATED_CLOSING_BRACE, a(), 0), h = E(l, 1, ke(s)), l.braceNest = 0, l.inLinked = !1, h;
461
- if (l.braceNest > 0 && (l.currentType === 4 || l.currentType === 5 || l.currentType === 6))
462
- return A($.UNTERMINATED_CLOSING_BRACE, a(), 0), l.braceNest = 0, Pe(s, l);
463
- if (X = R(s, l))
464
- return h = E(l, 4, ct(s)), b(s), h;
465
- if (F = p(s, l))
466
- return h = E(l, 5, mt(s)), b(s), h;
467
- if (d = L(s, l))
468
- return h = E(l, 6, ft(s)), b(s), h;
469
- if (!X && !F && !d)
470
- return h = E(l, 12, pt(s)), A($.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, h.value), b(s), h;
471
- break;
472
- }
473
- }
474
- return h;
475
- }
476
- function Re(s, l) {
477
- const { currentType: h } = l;
478
- let k = null;
479
- const X = s.currentChar();
480
- switch ((h === 7 || h === 8 || h === 11 || h === 9) && (X === ne || X === me) && A($.INVALID_LINKED_FORMAT, a(), 0), X) {
481
- case "@":
482
- return s.next(), k = E(
483
- l,
484
- 7,
485
- "@"
486
- /* TokenChars.LinkedAlias */
487
- ), l.inLinked = !0, k;
488
- case ".":
489
- return b(s), s.next(), E(
490
- l,
491
- 8,
492
- "."
493
- /* TokenChars.LinkedDot */
494
- );
495
- case ":":
496
- return b(s), s.next(), E(
497
- l,
498
- 9,
499
- ":"
500
- /* TokenChars.LinkedDelimiter */
501
- );
502
- default:
503
- return B(s) ? (k = E(l, 1, ke(s)), l.braceNest = 0, l.inLinked = !1, k) : y(s, l) || S(s, l) ? (b(s), Re(s, l)) : f(s, l) ? (b(s), E(l, 11, Et(s))) : P(s, l) ? (b(s), X === "{" ? Ne(s, l) || k : E(l, 10, gt(s))) : (h === 7 && A($.INVALID_LINKED_FORMAT, a(), 0), l.braceNest = 0, l.inLinked = !1, Pe(s, l));
504
- }
505
- }
506
- function Pe(s, l) {
507
- let h = {
508
- type: 13
509
- /* TokenTypes.EOF */
510
- };
511
- if (l.braceNest > 0)
512
- return Ne(s, l) || _(l);
513
- if (l.inLinked)
514
- return Re(s, l) || _(l);
515
- switch (s.currentChar()) {
516
- case "{":
517
- return Ne(s, l) || _(l);
518
- case "}":
519
- return A($.UNBALANCED_CLOSING_BRACE, a(), 0), s.next(), E(
520
- l,
521
- 3,
522
- "}"
523
- /* TokenChars.BraceRight */
524
- );
525
- case "@":
526
- return Re(s, l) || _(l);
527
- default: {
528
- if (B(s))
529
- return h = E(l, 1, ke(s)), l.braceNest = 0, l.inLinked = !1, h;
530
- if (w(s))
531
- return E(l, 0, it(s));
532
- break;
533
- }
534
- }
535
- return h;
536
- }
537
- function yt() {
538
- const { currentType: s, offset: l, startLoc: h, endLoc: k } = c;
539
- return c.lastType = s, c.lastOffset = l, c.lastStartLoc = h, c.lastEndLoc = k, c.offset = o(), c.startLoc = a(), r.currentChar() === ge ? E(
540
- c,
541
- 13
542
- /* TokenTypes.EOF */
543
- ) : Pe(r, c);
544
- }
545
- return {
546
- nextToken: yt,
547
- currentOffset: o,
548
- currentPosition: a,
549
- context: g
550
- };
551
- }
552
- const br = "parser", vr = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
553
- function hr(e, t, n) {
554
- switch (e) {
555
- case "\\\\":
556
- return "\\";
557
- // eslint-disable-next-line no-useless-escape
558
- case "\\'":
559
- return "'";
560
- default: {
561
- const r = parseInt(t || n, 16);
562
- return r <= 55295 || r >= 57344 ? String.fromCodePoint(r) : "�";
563
- }
564
- }
565
- }
566
- function Tr(e = {}) {
567
- const t = e.location !== !1, { onError: n } = e;
568
- function r(i, v, R, p, ...L) {
569
- const y = i.currentPosition();
570
- if (y.offset += p, y.column += p, n) {
571
- const f = t ? It(R, y) : null, S = nt(v, f, {
572
- domain: br,
573
- args: L
574
- });
575
- n(S);
576
- }
577
- }
578
- function o(i, v, R) {
579
- const p = { type: i };
580
- return t && (p.start = v, p.end = v, p.loc = { start: R, end: R }), p;
581
- }
582
- function a(i, v, R, p) {
583
- t && (i.end = v, i.loc && (i.loc.end = R));
584
- }
585
- function u(i, v) {
586
- const R = i.context(), p = o(3, R.offset, R.startLoc);
587
- return p.value = v, a(p, i.currentOffset(), i.currentPosition()), p;
588
- }
589
- function m(i, v) {
590
- const R = i.context(), { lastOffset: p, lastStartLoc: L } = R, y = o(5, p, L);
591
- return y.index = parseInt(v, 10), i.nextToken(), a(y, i.currentOffset(), i.currentPosition()), y;
592
- }
593
- function c(i, v) {
594
- const R = i.context(), { lastOffset: p, lastStartLoc: L } = R, y = o(4, p, L);
595
- return y.key = v, i.nextToken(), a(y, i.currentOffset(), i.currentPosition()), y;
596
- }
597
- function g(i, v) {
598
- const R = i.context(), { lastOffset: p, lastStartLoc: L } = R, y = o(9, p, L);
599
- return y.value = v.replace(vr, hr), i.nextToken(), a(y, i.currentOffset(), i.currentPosition()), y;
600
- }
601
- function T(i) {
602
- const v = i.nextToken(), R = i.context(), { lastOffset: p, lastStartLoc: L } = R, y = o(8, p, L);
603
- return v.type !== 11 ? (r(i, $.UNEXPECTED_EMPTY_LINKED_MODIFIER, R.lastStartLoc, 0), y.value = "", a(y, p, L), {
604
- nextConsumeToken: v,
605
- node: y
606
- }) : (v.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, R.lastStartLoc, 0, ue(v)), y.value = v.value || "", a(y, i.currentOffset(), i.currentPosition()), {
607
- node: y
608
- });
609
- }
610
- function A(i, v) {
611
- const R = i.context(), p = o(7, R.offset, R.startLoc);
612
- return p.value = v, a(p, i.currentOffset(), i.currentPosition()), p;
613
- }
614
- function E(i) {
615
- const v = i.context(), R = o(6, v.offset, v.startLoc);
616
- let p = i.nextToken();
617
- if (p.type === 8) {
618
- const L = T(i);
619
- R.modifier = L.node, p = L.nextConsumeToken || i.nextToken();
620
- }
621
- switch (p.type !== 9 && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(p)), p = i.nextToken(), p.type === 2 && (p = i.nextToken()), p.type) {
622
- case 10:
623
- p.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(p)), R.key = A(i, p.value || "");
624
- break;
625
- case 4:
626
- p.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(p)), R.key = c(i, p.value || "");
627
- break;
628
- case 5:
629
- p.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(p)), R.key = m(i, p.value || "");
630
- break;
631
- case 6:
632
- p.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(p)), R.key = g(i, p.value || "");
633
- break;
634
- default: {
635
- r(i, $.UNEXPECTED_EMPTY_LINKED_KEY, v.lastStartLoc, 0);
636
- const L = i.context(), y = o(7, L.offset, L.startLoc);
637
- return y.value = "", a(y, L.offset, L.startLoc), R.key = y, a(R, L.offset, L.startLoc), {
638
- nextConsumeToken: p,
639
- node: R
640
- };
641
- }
642
- }
643
- return a(R, i.currentOffset(), i.currentPosition()), {
644
- node: R
645
- };
646
- }
647
- function _(i) {
648
- const v = i.context(), R = v.currentType === 1 ? i.currentOffset() : v.offset, p = v.currentType === 1 ? v.endLoc : v.startLoc, L = o(2, R, p);
649
- L.items = [];
650
- let y = null;
651
- do {
652
- const P = y || i.nextToken();
653
- switch (y = null, P.type) {
654
- case 0:
655
- P.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(P)), L.items.push(u(i, P.value || ""));
656
- break;
657
- case 5:
658
- P.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(P)), L.items.push(m(i, P.value || ""));
659
- break;
660
- case 4:
661
- P.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(P)), L.items.push(c(i, P.value || ""));
662
- break;
663
- case 6:
664
- P.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, v.lastStartLoc, 0, ue(P)), L.items.push(g(i, P.value || ""));
665
- break;
666
- case 7: {
667
- const B = E(i);
668
- L.items.push(B.node), y = B.nextConsumeToken || null;
669
- break;
670
- }
671
- }
672
- } while (v.currentType !== 13 && v.currentType !== 1);
673
- const f = v.currentType === 1 ? v.lastOffset : i.currentOffset(), S = v.currentType === 1 ? v.lastEndLoc : i.currentPosition();
674
- return a(L, f, S), L;
675
- }
676
- function O(i, v, R, p) {
677
- const L = i.context();
678
- let y = p.items.length === 0;
679
- const f = o(1, v, R);
680
- f.cases = [], f.cases.push(p);
681
- do {
682
- const S = _(i);
683
- y || (y = S.items.length === 0), f.cases.push(S);
684
- } while (L.currentType !== 13);
685
- return y && r(i, $.MUST_HAVE_MESSAGES_IN_PLURAL, R, 0), a(f, i.currentOffset(), i.currentPosition()), f;
686
- }
687
- function I(i) {
688
- const v = i.context(), { offset: R, startLoc: p } = v, L = _(i);
689
- return v.currentType === 13 ? L : O(i, R, p, L);
690
- }
691
- function b(i) {
692
- const v = yr(i, te({}, e)), R = v.context(), p = o(0, R.offset, R.startLoc);
693
- return t && p.loc && (p.loc.source = i), p.body = I(v), e.onCacheKey && (p.cacheKey = e.onCacheKey(i)), R.currentType !== 13 && r(v, $.UNEXPECTED_LEXICAL_ANALYSIS, R.lastStartLoc, 0, i[R.offset] || ""), a(p, v.currentOffset(), v.currentPosition()), p;
694
- }
695
- return { parse: b };
696
- }
697
- function ue(e) {
698
- if (e.type === 13)
699
- return "EOF";
700
- const t = (e.value || "").replace(/\r?\n/gu, "\\n");
701
- return t.length > 10 ? t.slice(0, 9) + "…" : t;
702
- }
703
- function Ir(e, t = {}) {
704
- const n = {
705
- ast: e,
706
- helpers: /* @__PURE__ */ new Set()
707
- };
708
- return { context: () => n, helper: (a) => (n.helpers.add(a), a) };
709
- }
710
- function qt(e, t) {
711
- for (let n = 0; n < e.length; n++)
712
- Mt(e[n], t);
713
- }
714
- function Mt(e, t) {
715
- switch (e.type) {
716
- case 1:
717
- qt(e.cases, t), t.helper(
718
- "plural"
719
- /* HelperNameMap.PLURAL */
720
- );
721
- break;
722
- case 2:
723
- qt(e.items, t);
724
- break;
725
- case 6: {
726
- Mt(e.key, t), t.helper(
727
- "linked"
728
- /* HelperNameMap.LINKED */
729
- ), t.helper(
730
- "type"
731
- /* HelperNameMap.TYPE */
732
- );
733
- break;
734
- }
735
- case 5:
736
- t.helper(
737
- "interpolate"
738
- /* HelperNameMap.INTERPOLATE */
739
- ), t.helper(
740
- "list"
741
- /* HelperNameMap.LIST */
742
- );
743
- break;
744
- case 4:
745
- t.helper(
746
- "interpolate"
747
- /* HelperNameMap.INTERPOLATE */
748
- ), t.helper(
749
- "named"
750
- /* HelperNameMap.NAMED */
751
- );
752
- break;
753
- }
754
- }
755
- function Nr(e, t = {}) {
756
- const n = Ir(e);
757
- n.helper(
758
- "normalize"
759
- /* HelperNameMap.NORMALIZE */
760
- ), e.body && Mt(e.body, n);
761
- const r = n.context();
762
- e.helpers = Array.from(r.helpers);
763
- }
764
- function Rr(e) {
765
- const t = e.body;
766
- return t.type === 2 ? Jt(t) : t.cases.forEach((n) => Jt(n)), e;
767
- }
768
- function Jt(e) {
769
- if (e.items.length === 1) {
770
- const t = e.items[0];
771
- (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
772
- } else {
773
- const t = [];
774
- for (let n = 0; n < e.items.length; n++) {
775
- const r = e.items[n];
776
- if (!(r.type === 3 || r.type === 9) || r.value == null)
777
- break;
778
- t.push(r.value);
779
- }
780
- if (t.length === e.items.length) {
781
- e.static = Ft(t);
782
- for (let n = 0; n < e.items.length; n++) {
783
- const r = e.items[n];
784
- (r.type === 3 || r.type === 9) && delete r.value;
785
- }
786
- }
787
- }
788
- }
789
- function Le(e) {
790
- switch (e.t = e.type, e.type) {
791
- case 0: {
792
- const t = e;
793
- Le(t.body), t.b = t.body, delete t.body;
794
- break;
795
- }
796
- case 1: {
797
- const t = e, n = t.cases;
798
- for (let r = 0; r < n.length; r++)
799
- Le(n[r]);
800
- t.c = n, delete t.cases;
801
- break;
802
- }
803
- case 2: {
804
- const t = e, n = t.items;
805
- for (let r = 0; r < n.length; r++)
806
- Le(n[r]);
807
- t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
808
- break;
809
- }
810
- case 3:
811
- case 9:
812
- case 8:
813
- case 7: {
814
- const t = e;
815
- t.value && (t.v = t.value, delete t.value);
816
- break;
817
- }
818
- case 6: {
819
- const t = e;
820
- Le(t.key), t.k = t.key, delete t.key, t.modifier && (Le(t.modifier), t.m = t.modifier, delete t.modifier);
821
- break;
822
- }
823
- case 5: {
824
- const t = e;
825
- t.i = t.index, delete t.index;
826
- break;
827
- }
828
- case 4: {
829
- const t = e;
830
- t.k = t.key, delete t.key;
831
- break;
832
- }
833
- }
834
- delete e.type;
835
- }
836
- function Ar(e, t) {
837
- const { filename: n, breakLineCode: r, needIndent: o } = t, a = t.location !== !1, u = {
838
- filename: n,
839
- code: "",
840
- column: 1,
841
- line: 1,
842
- offset: 0,
843
- map: void 0,
844
- breakLineCode: r,
845
- needIndent: o,
846
- indentLevel: 0
847
- };
848
- a && e.loc && (u.source = e.loc.source);
849
- const m = () => u;
850
- function c(I, b) {
851
- u.code += I;
852
- }
853
- function g(I, b = !0) {
854
- const i = b ? r : "";
855
- c(o ? i + " ".repeat(I) : i);
856
- }
857
- function T(I = !0) {
858
- const b = ++u.indentLevel;
859
- I && g(b);
860
- }
861
- function A(I = !0) {
862
- const b = --u.indentLevel;
863
- I && g(b);
864
- }
865
- function E() {
866
- g(u.indentLevel);
867
- }
868
- return {
869
- context: m,
870
- push: c,
871
- indent: T,
872
- deindent: A,
873
- newline: E,
874
- helper: (I) => `_${I}`,
875
- needIndent: () => u.needIndent
876
- };
877
- }
878
- function Lr(e, t) {
879
- const { helper: n } = e;
880
- e.push(`${n(
881
- "linked"
882
- /* HelperNameMap.LINKED */
883
- )}(`), Oe(e, t.key), t.modifier ? (e.push(", "), Oe(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
884
- }
885
- function Or(e, t) {
886
- const { helper: n, needIndent: r } = e;
887
- e.push(`${n(
888
- "normalize"
889
- /* HelperNameMap.NORMALIZE */
890
- )}([`), e.indent(r());
891
- const o = t.items.length;
892
- for (let a = 0; a < o && (Oe(e, t.items[a]), a !== o - 1); a++)
893
- e.push(", ");
894
- e.deindent(r()), e.push("])");
895
- }
896
- function Cr(e, t) {
897
- const { helper: n, needIndent: r } = e;
898
- if (t.cases.length > 1) {
899
- e.push(`${n(
900
- "plural"
901
- /* HelperNameMap.PLURAL */
902
- )}([`), e.indent(r());
903
- const o = t.cases.length;
904
- for (let a = 0; a < o && (Oe(e, t.cases[a]), a !== o - 1); a++)
905
- e.push(", ");
906
- e.deindent(r()), e.push("])");
907
- }
908
- }
909
- function Sr(e, t) {
910
- t.body ? Oe(e, t.body) : e.push("null");
911
- }
912
- function Oe(e, t) {
913
- const { helper: n } = e;
914
- switch (t.type) {
915
- case 0:
916
- Sr(e, t);
917
- break;
918
- case 1:
919
- Cr(e, t);
920
- break;
921
- case 2:
922
- Or(e, t);
923
- break;
924
- case 6:
925
- Lr(e, t);
926
- break;
927
- case 8:
928
- e.push(JSON.stringify(t.value), t);
929
- break;
930
- case 7:
931
- e.push(JSON.stringify(t.value), t);
932
- break;
933
- case 5:
934
- e.push(`${n(
935
- "interpolate"
936
- /* HelperNameMap.INTERPOLATE */
937
- )}(${n(
938
- "list"
939
- /* HelperNameMap.LIST */
940
- )}(${t.index}))`, t);
941
- break;
942
- case 4:
943
- e.push(`${n(
944
- "interpolate"
945
- /* HelperNameMap.INTERPOLATE */
946
- )}(${n(
947
- "named"
948
- /* HelperNameMap.NAMED */
949
- )}(${JSON.stringify(t.key)}))`, t);
950
- break;
951
- case 9:
952
- e.push(JSON.stringify(t.value), t);
953
- break;
954
- case 3:
955
- e.push(JSON.stringify(t.value), t);
956
- break;
957
- }
958
- }
959
- const kr = (e, t = {}) => {
960
- const n = C(t.mode) ? t.mode : "normal", r = C(t.filename) ? t.filename : "message.intl";
961
- t.sourceMap;
962
- const o = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
963
- `, a = t.needIndent ? t.needIndent : n !== "arrow", u = e.helpers || [], m = Ar(e, {
964
- filename: r,
965
- breakLineCode: o,
966
- needIndent: a
967
- });
968
- m.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), m.indent(a), u.length > 0 && (m.push(`const { ${Ft(u.map((T) => `${T}: _${T}`), ", ")} } = ctx`), m.newline()), m.push("return "), Oe(m, e), m.deindent(a), m.push("}"), delete e.helpers;
969
- const { code: c, map: g } = m.context();
970
- return {
971
- ast: e,
972
- code: c,
973
- map: g ? g.toJSON() : void 0
974
- // eslint-disable-line @typescript-eslint/no-explicit-any
975
- };
976
- };
977
- function Pr(e, t = {}) {
978
- const n = te({}, t), r = !!n.jit, o = !!n.minify, a = n.optimize == null ? !0 : n.optimize, m = Tr(n).parse(e);
979
- return r ? (a && Rr(m), o && Le(m), { ast: m, code: "" }) : (Nr(m, n), kr(m, n));
980
- }
981
- var Dr = { env: { NODE_ENV: "production" } };
982
- function wr() {
983
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (he().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (he().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
984
- }
985
- function vt(e) {
986
- return (n) => Fr(n, e);
987
- }
988
- function Fr(e, t) {
989
- const n = Ur(t);
990
- if (n == null)
991
- throw Ue(
992
- 0
993
- /* NodeTypes.Resource */
994
- );
995
- if (Ut(n) === 1) {
996
- const a = $r(n);
997
- return e.plural(a.reduce((u, m) => [
998
- ...u,
999
- Qt(e, m)
1000
- ], []));
1001
- } else
1002
- return Qt(e, n);
1003
- }
1004
- const Mr = ["b", "body"];
1005
- function Ur(e) {
1006
- return ye(e, Mr);
1007
- }
1008
- const Vr = ["c", "cases"];
1009
- function $r(e) {
1010
- return ye(e, Vr, []);
1011
- }
1012
- function Qt(e, t) {
1013
- const n = Gr(t);
1014
- if (n != null)
1015
- return e.type === "text" ? n : e.normalize([n]);
1016
- {
1017
- const r = Br(t).reduce((o, a) => [...o, Nt(e, a)], []);
1018
- return e.normalize(r);
1019
- }
1020
- }
1021
- const Hr = ["s", "static"];
1022
- function Gr(e) {
1023
- return ye(e, Hr);
1024
- }
1025
- const Wr = ["i", "items"];
1026
- function Br(e) {
1027
- return ye(e, Wr, []);
1028
- }
1029
- function Nt(e, t) {
1030
- const n = Ut(t);
1031
- switch (n) {
1032
- case 3:
1033
- return Xe(t, n);
1034
- case 9:
1035
- return Xe(t, n);
1036
- case 4: {
1037
- const r = t;
1038
- if (le(r, "k") && r.k)
1039
- return e.interpolate(e.named(r.k));
1040
- if (le(r, "key") && r.key)
1041
- return e.interpolate(e.named(r.key));
1042
- throw Ue(n);
1043
- }
1044
- case 5: {
1045
- const r = t;
1046
- if (le(r, "i") && ee(r.i))
1047
- return e.interpolate(e.list(r.i));
1048
- if (le(r, "index") && ee(r.index))
1049
- return e.interpolate(e.list(r.index));
1050
- throw Ue(n);
1051
- }
1052
- case 6: {
1053
- const r = t, o = jr(r), a = qr(r);
1054
- return e.linked(Nt(e, a), o ? Nt(e, o) : void 0, e.type);
1055
- }
1056
- case 7:
1057
- return Xe(t, n);
1058
- case 8:
1059
- return Xe(t, n);
1060
- default:
1061
- throw new Error(`unhandled node on format message part: ${n}`);
1062
- }
1063
- }
1064
- const xr = ["t", "type"];
1065
- function Ut(e) {
1066
- return ye(e, xr);
1067
- }
1068
- const Kr = ["v", "value"];
1069
- function Xe(e, t) {
1070
- const n = ye(e, Kr);
1071
- if (n)
1072
- return n;
1073
- throw Ue(t);
1074
- }
1075
- const Yr = ["m", "modifier"];
1076
- function jr(e) {
1077
- return ye(e, Yr);
1078
- }
1079
- const Xr = ["k", "key"];
1080
- function qr(e) {
1081
- const t = ye(e, Xr);
1082
- if (t)
1083
- return t;
1084
- throw Ue(
1085
- 6
1086
- /* NodeTypes.Linked */
1087
- );
1088
- }
1089
- function ye(e, t, n) {
1090
- for (let r = 0; r < t.length; r++) {
1091
- const o = t[r];
1092
- if (le(e, o) && e[o] != null)
1093
- return e[o];
1094
- }
1095
- return n;
1096
- }
1097
- function Ue(e) {
1098
- return new Error(`unhandled node type: ${e}`);
1099
- }
1100
- const Jr = (e) => e;
1101
- let qe = H();
1102
- function Ce(e) {
1103
- return U(e) && Ut(e) === 0 && (le(e, "b") || le(e, "body"));
1104
- }
1105
- function Qr(e, t = {}) {
1106
- let n = !1;
1107
- const r = t.onError || mr;
1108
- return t.onError = (o) => {
1109
- n = !0, r(o);
1110
- }, { ...Pr(e, t), detectError: n };
1111
- }
1112
- // @__NO_SIDE_EFFECTS__
1113
- function Zr(e, t) {
1114
- if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && C(e)) {
1115
- J(t.warnHtmlMessage) && t.warnHtmlMessage;
1116
- const r = (t.onCacheKey || Jr)(e), o = qe[r];
1117
- if (o)
1118
- return o;
1119
- const { ast: a, detectError: u } = Qr(e, {
1120
- ...t,
1121
- location: Dr.env.NODE_ENV !== "production",
1122
- jit: !0
1123
- }), m = vt(a);
1124
- return u ? m : qe[r] = m;
1125
- } else {
1126
- const n = e.cacheKey;
1127
- if (n) {
1128
- const r = qe[n];
1129
- return r || (qe[n] = vt(e));
1130
- } else
1131
- return vt(e);
1132
- }
1133
- }
1134
- let Ve = null;
1135
- function zr(e) {
1136
- Ve = e;
1137
- }
1138
- function eo(e, t, n) {
1139
- Ve && Ve.emit("i18n:init", {
1140
- timestamp: Date.now(),
1141
- i18n: e,
1142
- version: t,
1143
- meta: n
1144
- });
1145
- }
1146
- const to = /* @__PURE__ */ no("function:translate");
1147
- function no(e) {
1148
- return (t) => Ve && Ve.emit(e, t);
1149
- }
1150
- const fe = {
1151
- INVALID_ARGUMENT: cr,
1152
- // 17
1153
- INVALID_DATE_ARGUMENT: 18,
1154
- INVALID_ISO_DATE_ARGUMENT: 19,
1155
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1156
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1157
- NOT_SUPPORT_LOCALE_TYPE: 23
1158
- }, ro = 24;
1159
- function _e(e) {
1160
- return nt(e, null, void 0);
1161
- }
1162
- function Vt(e, t) {
1163
- return t.locale != null ? Zt(t.locale) : Zt(e.locale);
1164
- }
1165
- let ht;
1166
- function Zt(e) {
1167
- if (C(e))
1168
- return e;
1169
- if (K(e)) {
1170
- if (e.resolvedOnce && ht != null)
1171
- return ht;
1172
- if (e.constructor.name === "Function") {
1173
- const t = e();
1174
- if (sr(t))
1175
- throw _e(fe.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1176
- return ht = t;
1177
- } else
1178
- throw _e(fe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1179
- } else
1180
- throw _e(fe.NOT_SUPPORT_LOCALE_TYPE);
1181
- }
1182
- function oo(e, t, n) {
1183
- return [.../* @__PURE__ */ new Set([
1184
- n,
1185
- ...z(t) ? t : U(t) ? Object.keys(t) : C(t) ? [t] : [n]
1186
- ])];
1187
- }
1188
- function Nn(e, t, n) {
1189
- const r = C(n) ? n : et, o = e;
1190
- o.__localeChainCache || (o.__localeChainCache = /* @__PURE__ */ new Map());
1191
- let a = o.__localeChainCache.get(r);
1192
- if (!a) {
1193
- a = [];
1194
- let u = [n];
1195
- for (; z(u); )
1196
- u = zt(a, u, t);
1197
- const m = z(t) || !M(t) ? t : t.default ? t.default : null;
1198
- u = C(m) ? [m] : m, z(u) && zt(a, u, !1), o.__localeChainCache.set(r, a);
1199
- }
1200
- return a;
1201
- }
1202
- function zt(e, t, n) {
1203
- let r = !0;
1204
- for (let o = 0; o < t.length && J(r); o++) {
1205
- const a = t[o];
1206
- C(a) && (r = ao(e, t[o], n));
1207
- }
1208
- return r;
1209
- }
1210
- function ao(e, t, n) {
1211
- let r;
1212
- const o = t.split("-");
1213
- do {
1214
- const a = o.join("-");
1215
- r = so(e, a, n), o.splice(-1, 1);
1216
- } while (o.length && r === !0);
1217
- return r;
1218
- }
1219
- function so(e, t, n) {
1220
- let r = !1;
1221
- if (!e.includes(t) && (r = !0, t)) {
1222
- r = t[t.length - 1] !== "!";
1223
- const o = t.replace(/!/g, "");
1224
- e.push(o), (z(n) || M(n)) && n[o] && (r = n[o]);
1225
- }
1226
- return r;
1227
- }
1228
- const be = [];
1229
- be[
1230
- 0
1231
- /* States.BEFORE_PATH */
1232
- ] = {
1233
- w: [
1234
- 0
1235
- /* States.BEFORE_PATH */
1236
- ],
1237
- i: [
1238
- 3,
1239
- 0
1240
- /* Actions.APPEND */
1241
- ],
1242
- "[": [
1243
- 4
1244
- /* States.IN_SUB_PATH */
1245
- ],
1246
- o: [
1247
- 7
1248
- /* States.AFTER_PATH */
1249
- ]
1250
- };
1251
- be[
1252
- 1
1253
- /* States.IN_PATH */
1254
- ] = {
1255
- w: [
1256
- 1
1257
- /* States.IN_PATH */
1258
- ],
1259
- ".": [
1260
- 2
1261
- /* States.BEFORE_IDENT */
1262
- ],
1263
- "[": [
1264
- 4
1265
- /* States.IN_SUB_PATH */
1266
- ],
1267
- o: [
1268
- 7
1269
- /* States.AFTER_PATH */
1270
- ]
1271
- };
1272
- be[
1273
- 2
1274
- /* States.BEFORE_IDENT */
1275
- ] = {
1276
- w: [
1277
- 2
1278
- /* States.BEFORE_IDENT */
1279
- ],
1280
- i: [
1281
- 3,
1282
- 0
1283
- /* Actions.APPEND */
1284
- ],
1285
- 0: [
1286
- 3,
1287
- 0
1288
- /* Actions.APPEND */
1289
- ]
1290
- };
1291
- be[
1292
- 3
1293
- /* States.IN_IDENT */
1294
- ] = {
1295
- i: [
1296
- 3,
1297
- 0
1298
- /* Actions.APPEND */
1299
- ],
1300
- 0: [
1301
- 3,
1302
- 0
1303
- /* Actions.APPEND */
1304
- ],
1305
- w: [
1306
- 1,
1307
- 1
1308
- /* Actions.PUSH */
1309
- ],
1310
- ".": [
1311
- 2,
1312
- 1
1313
- /* Actions.PUSH */
1314
- ],
1315
- "[": [
1316
- 4,
1317
- 1
1318
- /* Actions.PUSH */
1319
- ],
1320
- o: [
1321
- 7,
1322
- 1
1323
- /* Actions.PUSH */
1324
- ]
1325
- };
1326
- be[
1327
- 4
1328
- /* States.IN_SUB_PATH */
1329
- ] = {
1330
- "'": [
1331
- 5,
1332
- 0
1333
- /* Actions.APPEND */
1334
- ],
1335
- '"': [
1336
- 6,
1337
- 0
1338
- /* Actions.APPEND */
1339
- ],
1340
- "[": [
1341
- 4,
1342
- 2
1343
- /* Actions.INC_SUB_PATH_DEPTH */
1344
- ],
1345
- "]": [
1346
- 1,
1347
- 3
1348
- /* Actions.PUSH_SUB_PATH */
1349
- ],
1350
- o: 8,
1351
- l: [
1352
- 4,
1353
- 0
1354
- /* Actions.APPEND */
1355
- ]
1356
- };
1357
- be[
1358
- 5
1359
- /* States.IN_SINGLE_QUOTE */
1360
- ] = {
1361
- "'": [
1362
- 4,
1363
- 0
1364
- /* Actions.APPEND */
1365
- ],
1366
- o: 8,
1367
- l: [
1368
- 5,
1369
- 0
1370
- /* Actions.APPEND */
1371
- ]
1372
- };
1373
- be[
1374
- 6
1375
- /* States.IN_DOUBLE_QUOTE */
1376
- ] = {
1377
- '"': [
1378
- 4,
1379
- 0
1380
- /* Actions.APPEND */
1381
- ],
1382
- o: 8,
1383
- l: [
1384
- 6,
1385
- 0
1386
- /* Actions.APPEND */
1387
- ]
1388
- };
1389
- const lo = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1390
- function uo(e) {
1391
- return lo.test(e);
1392
- }
1393
- function io(e) {
1394
- const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1395
- return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1396
- }
1397
- function co(e) {
1398
- if (e == null)
1399
- return "o";
1400
- switch (e.charCodeAt(0)) {
1401
- case 91:
1402
- // [
1403
- case 93:
1404
- // ]
1405
- case 46:
1406
- // .
1407
- case 34:
1408
- // "
1409
- case 39:
1410
- return e;
1411
- case 95:
1412
- // _
1413
- case 36:
1414
- // $
1415
- case 45:
1416
- return "i";
1417
- case 9:
1418
- // Tab (HT)
1419
- case 10:
1420
- // Newline (LF)
1421
- case 13:
1422
- // Return (CR)
1423
- case 160:
1424
- // No-break space (NBSP)
1425
- case 65279:
1426
- // Byte Order Mark (BOM)
1427
- case 8232:
1428
- // Line Separator (LS)
1429
- case 8233:
1430
- return "w";
1431
- }
1432
- return "i";
1433
- }
1434
- function mo(e) {
1435
- const t = e.trim();
1436
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : uo(t) ? io(t) : "*" + t;
1437
- }
1438
- function fo(e) {
1439
- const t = [];
1440
- let n = -1, r = 0, o = 0, a, u, m, c, g, T, A;
1441
- const E = [];
1442
- E[
1443
- 0
1444
- /* Actions.APPEND */
1445
- ] = () => {
1446
- u === void 0 ? u = m : u += m;
1447
- }, E[
1448
- 1
1449
- /* Actions.PUSH */
1450
- ] = () => {
1451
- u !== void 0 && (t.push(u), u = void 0);
1452
- }, E[
1453
- 2
1454
- /* Actions.INC_SUB_PATH_DEPTH */
1455
- ] = () => {
1456
- E[
1457
- 0
1458
- /* Actions.APPEND */
1459
- ](), o++;
1460
- }, E[
1461
- 3
1462
- /* Actions.PUSH_SUB_PATH */
1463
- ] = () => {
1464
- if (o > 0)
1465
- o--, r = 4, E[
1466
- 0
1467
- /* Actions.APPEND */
1468
- ]();
1469
- else {
1470
- if (o = 0, u === void 0 || (u = mo(u), u === !1))
1471
- return !1;
1472
- E[
1473
- 1
1474
- /* Actions.PUSH */
1475
- ]();
1476
- }
1477
- };
1478
- function _() {
1479
- const O = e[n + 1];
1480
- if (r === 5 && O === "'" || r === 6 && O === '"')
1481
- return n++, m = "\\" + O, E[
1482
- 0
1483
- /* Actions.APPEND */
1484
- ](), !0;
1485
- }
1486
- for (; r !== null; )
1487
- if (n++, a = e[n], !(a === "\\" && _())) {
1488
- if (c = co(a), A = be[r], g = A[c] || A.l || 8, g === 8 || (r = g[0], g[1] !== void 0 && (T = E[g[1]], T && (m = a, T() === !1))))
1489
- return;
1490
- if (r === 7)
1491
- return t;
1492
- }
1493
- }
1494
- const en = /* @__PURE__ */ new Map();
1495
- function _o(e, t) {
1496
- return U(e) ? e[t] : null;
1497
- }
1498
- function po(e, t) {
1499
- if (!U(e))
1500
- return null;
1501
- let n = en.get(t);
1502
- if (n || (n = fo(t), n && en.set(t, n)), !n)
1503
- return null;
1504
- const r = n.length;
1505
- let o = e, a = 0;
1506
- for (; a < r; ) {
1507
- const u = o[n[a]];
1508
- if (u === void 0 || K(o))
1509
- return null;
1510
- o = u, a++;
1511
- }
1512
- return o;
1513
- }
1514
- const Eo = "10.0.5", rt = -1, et = "en-US", tn = "", nn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1515
- function go() {
1516
- return {
1517
- upper: (e, t) => t === "text" && C(e) ? e.toUpperCase() : t === "vnode" && U(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1518
- lower: (e, t) => t === "text" && C(e) ? e.toLowerCase() : t === "vnode" && U(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1519
- capitalize: (e, t) => t === "text" && C(e) ? nn(e) : t === "vnode" && U(e) && "__v_isVNode" in e ? nn(e.children) : e
1520
- };
1521
- }
1522
- let Rn;
1523
- function yo(e) {
1524
- Rn = e;
1525
- }
1526
- let An;
1527
- function bo(e) {
1528
- An = e;
1529
- }
1530
- let Ln;
1531
- function vo(e) {
1532
- Ln = e;
1533
- }
1534
- let On = null;
1535
- const ho = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1536
- On = e;
1537
- }, To = /* @__NO_SIDE_EFFECTS__ */ () => On;
1538
- let Cn = null;
1539
- const rn = (e) => {
1540
- Cn = e;
1541
- }, Io = () => Cn;
1542
- let on = 0;
1543
- function No(e = {}) {
1544
- const t = K(e.onWarn) ? e.onWarn : ur, n = C(e.version) ? e.version : Eo, r = C(e.locale) || K(e.locale) ? e.locale : et, o = K(r) ? et : r, a = z(e.fallbackLocale) || M(e.fallbackLocale) || C(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : o, u = M(e.messages) ? e.messages : Tt(o), m = M(e.datetimeFormats) ? e.datetimeFormats : Tt(o), c = M(e.numberFormats) ? e.numberFormats : Tt(o), g = te(H(), e.modifiers, go()), T = e.pluralRules || H(), A = K(e.missing) ? e.missing : null, E = J(e.missingWarn) || ze(e.missingWarn) ? e.missingWarn : !0, _ = J(e.fallbackWarn) || ze(e.fallbackWarn) ? e.fallbackWarn : !0, O = !!e.fallbackFormat, I = !!e.unresolving, b = K(e.postTranslation) ? e.postTranslation : null, i = M(e.processor) ? e.processor : null, v = J(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, R = !!e.escapeParameter, p = K(e.messageCompiler) ? e.messageCompiler : Rn, L = K(e.messageResolver) ? e.messageResolver : An || _o, y = K(e.localeFallbacker) ? e.localeFallbacker : Ln || oo, f = U(e.fallbackContext) ? e.fallbackContext : void 0, S = e, P = U(S.__datetimeFormatters) ? S.__datetimeFormatters : /* @__PURE__ */ new Map(), B = U(S.__numberFormatters) ? S.__numberFormatters : /* @__PURE__ */ new Map(), w = U(S.__meta) ? S.__meta : {};
1545
- on++;
1546
- const D = {
1547
- version: n,
1548
- cid: on,
1549
- locale: r,
1550
- fallbackLocale: a,
1551
- messages: u,
1552
- modifiers: g,
1553
- pluralRules: T,
1554
- missing: A,
1555
- missingWarn: E,
1556
- fallbackWarn: _,
1557
- fallbackFormat: O,
1558
- unresolving: I,
1559
- postTranslation: b,
1560
- processor: i,
1561
- warnHtmlMessage: v,
1562
- escapeParameter: R,
1563
- messageCompiler: p,
1564
- messageResolver: L,
1565
- localeFallbacker: y,
1566
- fallbackContext: f,
1567
- onWarn: t,
1568
- __meta: w
1569
- };
1570
- return D.datetimeFormats = m, D.numberFormats = c, D.__datetimeFormatters = P, D.__numberFormatters = B, __INTLIFY_PROD_DEVTOOLS__ && eo(D, n, w), D;
1571
- }
1572
- const Tt = (e) => ({ [e]: H() });
1573
- function $t(e, t, n, r, o) {
1574
- const { missing: a, onWarn: u } = e;
1575
- if (a !== null) {
1576
- const m = a(e, n, t, o);
1577
- return C(m) ? m : t;
1578
- } else
1579
- return t;
1580
- }
1581
- function De(e, t, n) {
1582
- const r = e;
1583
- r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1584
- }
1585
- function Ro(e, t) {
1586
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1587
- }
1588
- function Ao(e, t) {
1589
- const n = t.indexOf(e);
1590
- if (n === -1)
1591
- return !1;
1592
- for (let r = n + 1; r < t.length; r++)
1593
- if (Ro(e, t[r]))
1594
- return !0;
1595
- return !1;
1596
- }
1597
- function an(e, ...t) {
1598
- const { datetimeFormats: n, unresolving: r, fallbackLocale: o, onWarn: a, localeFallbacker: u } = e, { __datetimeFormatters: m } = e, [c, g, T, A] = Rt(...t), E = J(T.missingWarn) ? T.missingWarn : e.missingWarn;
1599
- J(T.fallbackWarn) ? T.fallbackWarn : e.fallbackWarn;
1600
- const _ = !!T.part, O = Vt(e, T), I = u(
1601
- e,
1602
- // eslint-disable-line @typescript-eslint/no-explicit-any
1603
- o,
1604
- O
1605
- );
1606
- if (!C(c) || c === "")
1607
- return new Intl.DateTimeFormat(O, A).format(g);
1608
- let b = {}, i, v = null;
1609
- const R = "datetime format";
1610
- for (let y = 0; y < I.length && (i = I[y], b = n[i] || {}, v = b[c], !M(v)); y++)
1611
- $t(e, c, i, E, R);
1612
- if (!M(v) || !C(i))
1613
- return r ? rt : c;
1614
- let p = `${i}__${c}`;
1615
- tt(A) || (p = `${p}__${JSON.stringify(A)}`);
1616
- let L = m.get(p);
1617
- return L || (L = new Intl.DateTimeFormat(i, te({}, v, A)), m.set(p, L)), _ ? L.formatToParts(g) : L.format(g);
1618
- }
1619
- const Sn = [
1620
- "localeMatcher",
1621
- "weekday",
1622
- "era",
1623
- "year",
1624
- "month",
1625
- "day",
1626
- "hour",
1627
- "minute",
1628
- "second",
1629
- "timeZoneName",
1630
- "formatMatcher",
1631
- "hour12",
1632
- "timeZone",
1633
- "dateStyle",
1634
- "timeStyle",
1635
- "calendar",
1636
- "dayPeriod",
1637
- "numberingSystem",
1638
- "hourCycle",
1639
- "fractionalSecondDigits"
1640
- ];
1641
- function Rt(...e) {
1642
- const [t, n, r, o] = e, a = H();
1643
- let u = H(), m;
1644
- if (C(t)) {
1645
- const c = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1646
- if (!c)
1647
- throw _e(fe.INVALID_ISO_DATE_ARGUMENT);
1648
- const g = c[3] ? c[3].trim().startsWith("T") ? `${c[1].trim()}${c[3].trim()}` : `${c[1].trim()}T${c[3].trim()}` : c[1].trim();
1649
- m = new Date(g);
1650
- try {
1651
- m.toISOString();
1652
- } catch {
1653
- throw _e(fe.INVALID_ISO_DATE_ARGUMENT);
1654
- }
1655
- } else if (rr(t)) {
1656
- if (isNaN(t.getTime()))
1657
- throw _e(fe.INVALID_DATE_ARGUMENT);
1658
- m = t;
1659
- } else if (ee(t))
1660
- m = t;
1661
- else
1662
- throw _e(fe.INVALID_ARGUMENT);
1663
- return C(n) ? a.key = n : M(n) && Object.keys(n).forEach((c) => {
1664
- Sn.includes(c) ? u[c] = n[c] : a[c] = n[c];
1665
- }), C(r) ? a.locale = r : M(r) && (u = r), M(o) && (u = o), [a.key || "", m, a, u];
1666
- }
1667
- function sn(e, t, n) {
1668
- const r = e;
1669
- for (const o in n) {
1670
- const a = `${t}__${o}`;
1671
- r.__datetimeFormatters.has(a) && r.__datetimeFormatters.delete(a);
1672
- }
1673
- }
1674
- function ln(e, ...t) {
1675
- const { numberFormats: n, unresolving: r, fallbackLocale: o, onWarn: a, localeFallbacker: u } = e, { __numberFormatters: m } = e, [c, g, T, A] = At(...t), E = J(T.missingWarn) ? T.missingWarn : e.missingWarn;
1676
- J(T.fallbackWarn) ? T.fallbackWarn : e.fallbackWarn;
1677
- const _ = !!T.part, O = Vt(e, T), I = u(
1678
- e,
1679
- // eslint-disable-line @typescript-eslint/no-explicit-any
1680
- o,
1681
- O
1682
- );
1683
- if (!C(c) || c === "")
1684
- return new Intl.NumberFormat(O, A).format(g);
1685
- let b = {}, i, v = null;
1686
- const R = "number format";
1687
- for (let y = 0; y < I.length && (i = I[y], b = n[i] || {}, v = b[c], !M(v)); y++)
1688
- $t(e, c, i, E, R);
1689
- if (!M(v) || !C(i))
1690
- return r ? rt : c;
1691
- let p = `${i}__${c}`;
1692
- tt(A) || (p = `${p}__${JSON.stringify(A)}`);
1693
- let L = m.get(p);
1694
- return L || (L = new Intl.NumberFormat(i, te({}, v, A)), m.set(p, L)), _ ? L.formatToParts(g) : L.format(g);
1695
- }
1696
- const kn = [
1697
- "localeMatcher",
1698
- "style",
1699
- "currency",
1700
- "currencyDisplay",
1701
- "currencySign",
1702
- "useGrouping",
1703
- "minimumIntegerDigits",
1704
- "minimumFractionDigits",
1705
- "maximumFractionDigits",
1706
- "minimumSignificantDigits",
1707
- "maximumSignificantDigits",
1708
- "compactDisplay",
1709
- "notation",
1710
- "signDisplay",
1711
- "unit",
1712
- "unitDisplay",
1713
- "roundingMode",
1714
- "roundingPriority",
1715
- "roundingIncrement",
1716
- "trailingZeroDisplay"
1717
- ];
1718
- function At(...e) {
1719
- const [t, n, r, o] = e, a = H();
1720
- let u = H();
1721
- if (!ee(t))
1722
- throw _e(fe.INVALID_ARGUMENT);
1723
- const m = t;
1724
- return C(n) ? a.key = n : M(n) && Object.keys(n).forEach((c) => {
1725
- kn.includes(c) ? u[c] = n[c] : a[c] = n[c];
1726
- }), C(r) ? a.locale = r : M(r) && (u = r), M(o) && (u = o), [a.key || "", m, a, u];
1727
- }
1728
- function un(e, t, n) {
1729
- const r = e;
1730
- for (const o in n) {
1731
- const a = `${t}__${o}`;
1732
- r.__numberFormatters.has(a) && r.__numberFormatters.delete(a);
1733
- }
1734
- }
1735
- const Lo = (e) => e, Oo = (e) => "", Co = "text", So = (e) => e.length === 0 ? "" : Ft(e), ko = lr;
1736
- function cn(e, t) {
1737
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1738
- }
1739
- function Po(e) {
1740
- const t = ee(e.pluralIndex) ? e.pluralIndex : -1;
1741
- return e.named && (ee(e.named.count) || ee(e.named.n)) ? ee(e.named.count) ? e.named.count : ee(e.named.n) ? e.named.n : t : t;
1742
- }
1743
- function Do(e, t) {
1744
- t.count || (t.count = e), t.n || (t.n = e);
1745
- }
1746
- function wo(e = {}) {
1747
- const t = e.locale, n = Po(e), r = U(e.pluralRules) && C(t) && K(e.pluralRules[t]) ? e.pluralRules[t] : cn, o = U(e.pluralRules) && C(t) && K(e.pluralRules[t]) ? cn : void 0, a = (i) => i[r(n, i.length, o)], u = e.list || [], m = (i) => u[i], c = e.named || H();
1748
- ee(e.pluralIndex) && Do(n, c);
1749
- const g = (i) => c[i];
1750
- function T(i, v) {
1751
- const R = K(e.messages) ? e.messages(i, !!v) : U(e.messages) ? e.messages[i] : !1;
1752
- return R || (e.parent ? e.parent.message(i) : Oo);
1753
- }
1754
- const A = (i) => e.modifiers ? e.modifiers[i] : Lo, E = M(e.processor) && K(e.processor.normalize) ? e.processor.normalize : So, _ = M(e.processor) && K(e.processor.interpolate) ? e.processor.interpolate : ko, O = M(e.processor) && C(e.processor.type) ? e.processor.type : Co, b = {
1755
- list: m,
1756
- named: g,
1757
- plural: a,
1758
- linked: (i, ...v) => {
1759
- const [R, p] = v;
1760
- let L = "text", y = "";
1761
- v.length === 1 ? U(R) ? (y = R.modifier || y, L = R.type || L) : C(R) && (y = R || y) : v.length === 2 && (C(R) && (y = R || y), C(p) && (L = p || L));
1762
- const f = T(i, !0)(b), S = (
1763
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
1764
- L === "vnode" && z(f) && y ? f[0] : f
1765
- );
1766
- return y ? A(y)(S, L) : S;
1767
- },
1768
- message: T,
1769
- type: O,
1770
- interpolate: _,
1771
- normalize: E,
1772
- values: te(H(), u, c)
1773
- };
1774
- return b;
1775
- }
1776
- const mn = () => "", re = (e) => K(e);
1777
- function fn(e, ...t) {
1778
- const { fallbackFormat: n, postTranslation: r, unresolving: o, messageCompiler: a, fallbackLocale: u, messages: m } = e, [c, g] = Lt(...t), T = J(g.missingWarn) ? g.missingWarn : e.missingWarn, A = J(g.fallbackWarn) ? g.fallbackWarn : e.fallbackWarn, E = J(g.escapeParameter) ? g.escapeParameter : e.escapeParameter, _ = !!g.resolvedMessage, O = C(g.default) || J(g.default) ? J(g.default) ? a ? c : () => c : g.default : n ? a ? c : () => c : null, I = n || O != null && (C(O) || K(O)), b = Vt(e, g);
1779
- E && Fo(g);
1780
- let [i, v, R] = _ ? [
1781
- c,
1782
- b,
1783
- m[b] || H()
1784
- ] : Pn(e, c, b, u, A, T), p = i, L = c;
1785
- if (!_ && !(C(p) || Ce(p) || re(p)) && I && (p = O, L = p), !_ && (!(C(p) || Ce(p) || re(p)) || !C(v)))
1786
- return o ? rt : c;
1787
- let y = !1;
1788
- const f = () => {
1789
- y = !0;
1790
- }, S = re(p) ? p : Dn(e, c, v, p, L, f);
1791
- if (y)
1792
- return p;
1793
- const P = Vo(e, v, R, g), B = wo(P), w = Mo(e, S, B), D = r ? r(w, c) : w;
1794
- if (__INTLIFY_PROD_DEVTOOLS__) {
1795
- const Ie = {
1796
- timestamp: Date.now(),
1797
- key: C(c) ? c : re(p) ? p.key : "",
1798
- locale: v || (re(p) ? p.locale : ""),
1799
- format: C(p) ? p : re(p) ? p.source : "",
1800
- message: D
1801
- };
1802
- Ie.meta = te({}, e.__meta, /* @__PURE__ */ To() || {}), to(Ie);
1803
- }
1804
- return D;
1805
- }
1806
- function Fo(e) {
1807
- z(e.list) ? e.list = e.list.map((t) => C(t) ? jt(t) : t) : U(e.named) && Object.keys(e.named).forEach((t) => {
1808
- C(e.named[t]) && (e.named[t] = jt(e.named[t]));
1809
- });
1810
- }
1811
- function Pn(e, t, n, r, o, a) {
1812
- const { messages: u, onWarn: m, messageResolver: c, localeFallbacker: g } = e, T = g(e, r, n);
1813
- let A = H(), E, _ = null;
1814
- const O = "translate";
1815
- for (let I = 0; I < T.length && (E = T[I], A = u[E] || H(), (_ = c(A, t)) === null && (_ = A[t]), !(C(_) || Ce(_) || re(_))); I++)
1816
- if (!Ao(E, T)) {
1817
- const b = $t(
1818
- e,
1819
- // eslint-disable-line @typescript-eslint/no-explicit-any
1820
- t,
1821
- E,
1822
- a,
1823
- O
1824
- );
1825
- b !== t && (_ = b);
1826
- }
1827
- return [_, E, A];
1828
- }
1829
- function Dn(e, t, n, r, o, a) {
1830
- const { messageCompiler: u, warnHtmlMessage: m } = e;
1831
- if (re(r)) {
1832
- const g = r;
1833
- return g.locale = g.locale || n, g.key = g.key || t, g;
1834
- }
1835
- if (u == null) {
1836
- const g = () => r;
1837
- return g.locale = n, g.key = t, g;
1838
- }
1839
- const c = u(r, Uo(e, n, o, r, m, a));
1840
- return c.locale = n, c.key = t, c.source = r, c;
1841
- }
1842
- function Mo(e, t, n) {
1843
- return t(n);
1844
- }
1845
- function Lt(...e) {
1846
- const [t, n, r] = e, o = H();
1847
- if (!C(t) && !ee(t) && !re(t) && !Ce(t))
1848
- throw _e(fe.INVALID_ARGUMENT);
1849
- const a = ee(t) ? String(t) : (re(t), t);
1850
- return ee(n) ? o.plural = n : C(n) ? o.default = n : M(n) && !tt(n) ? o.named = n : z(n) && (o.list = n), ee(r) ? o.plural = r : C(r) ? o.default = r : M(r) && te(o, r), [a, o];
1851
- }
1852
- function Uo(e, t, n, r, o, a) {
1853
- return {
1854
- locale: t,
1855
- key: n,
1856
- warnHtmlMessage: o,
1857
- onError: (u) => {
1858
- throw a && a(u), u;
1859
- },
1860
- onCacheKey: (u) => tr(t, n, u)
1861
- };
1862
- }
1863
- function Vo(e, t, n, r) {
1864
- const { modifiers: o, pluralRules: a, messageResolver: u, fallbackLocale: m, fallbackWarn: c, missingWarn: g, fallbackContext: T } = e, E = {
1865
- locale: t,
1866
- modifiers: o,
1867
- pluralRules: a,
1868
- messages: (_, O) => {
1869
- let I = u(n, _);
1870
- if (I == null && (T || O)) {
1871
- const [, , b] = Pn(
1872
- T || e,
1873
- // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1874
- _,
1875
- t,
1876
- m,
1877
- c,
1878
- g
1879
- );
1880
- I = u(b, _);
1881
- }
1882
- if (C(I) || Ce(I)) {
1883
- let b = !1;
1884
- const v = Dn(e, _, t, I, _, () => {
1885
- b = !0;
1886
- });
1887
- return b ? mn : v;
1888
- } else return re(I) ? I : mn;
1889
- }
1890
- };
1891
- return e.processor && (E.processor = e.processor), r.list && (E.list = r.list), r.named && (E.named = r.named), ee(r.plural) && (E.pluralIndex = r.plural), E;
1892
- }
1893
- wr();
1894
- var $o = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_43051151-a48d-4810-872b-dc39a6b34576", DOTNET_NOLOGO: "1", USER: "runner", npm_config_user_agent: "pnpm/10.8.0 npm/? node/v18.20.8 linux x64", CI: "true", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_43051151-a48d-4810-872b-dc39a6b34576", PIPX_HOME: "/opt/pipx", FIREBASE_DATABASE_URL: "https://feedme-253402.firebaseio.com", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.8/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", HCA_CLOUD_PROVIDER: "azure", GTM_ID: "GTM-WR8XHXLH", FIREBASE_MESSAGING_SENDER_ID: "128512026847", HOME: "/home/runner", VITE_FEED_ME_NAMESPACE: "production", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", NODE_OPTIONS: "--max-old-space-size=10240", GRADLE_HOME: "/usr/share/gradle-9.6.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", GTM_SERVER_URL: "https://server-side-tagging-zzez732dna-as.a.run.app", VITE_FEATURE_FLAG_API_KEY: "6GhcttsJ9Rj9cTevcdrpin", SYSTEMD_EXEC_PID: "1848", ACTIONS_ORCHESTRATION_ID: "eadab9a1-d5df-4d70-aba2-34492f148e19.publish.deploy.__default", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260628.225.1", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", SWIFT_PATH: "/usr/share/swift/usr/bin", PORTAL_BACKEND_URL: "https://portal-v2.feedmeapi.com", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "9:13449", GITHUB_WORKFLOW: "Publish mf-menu prod", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", REMY_URL: "https://remy.feedmeapi.com/v1", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.11/x64", GITHUB_RUN_ID: "28774941541", VITE_REMY_BACKEND_URL: "https://remy-agent-api.feedmeapi.com", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "7bbc9c1d6acbd578cf917ff71c6e8f21642875db", GOROOT_1_26_X64: "/opt/hostedtoolcache/go/1.26.4/x64", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", GTM_ENV: "production", FIREBASE_STORAGE_BUCKET: "image.feedme.cc", FIREBASE_MEASUREMENT_ID: "G-LTKS7N2HQS", GITHUB_WORKFLOW_REF: "feedmepos/portal/.github/workflows/publish-mf-menu-prod.yml@refs/heads/main", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", FIREBASE_AUTH_DOMAIN: "feedme-253402.firebaseapp.com", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/portal/portal/apps/mf-menu/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/portal/portal/node_modules/.bin:/home/runner/work/portal/portal/apps/mf-menu/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/portal/portal/node_modules/.bin:/home/runner/work/portal/portal/apps/mf-menu/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/portal/portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/18.20.8/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_438e0425-ae5a-46a8-8e16-f4e42102711c", INVOCATION_ID: "a8f4a972c9dc46329dcbbefe5c1a4396", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/18.20.8/x64/bin/node", npm_package_name: "@feedmepos/mf-menu", GITHUB_ACTION: "__run_4", GITHUB_RUN_NUMBER: "173", GITHUB_TRIGGERING_ACTOR: "victorchai", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", GTM_SERVER_MEASUREMENT_ID: "G-2MP52PC24R", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", VITE_LICENSE_API_URL: "https://license-v2.feedmeapi.com", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000084738", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "feedmepos/portal", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "705534668", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/portal/portal/node_modules/.pnpm/vite@6.3.5_@types+node@18.19.110_jiti@1.21.7_sass@1.69.5_terser@5.40.0_yaml@2.8.0/node_modules/vite/bin/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/vite@6.3.5_@types+node@18.19.110_jiti@1.21.7_sass@1.69.5_terser@5.40.0_yaml@2.8.0/node_modules/vite/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/vite@6.3.5_@types+node@18.19.110_jiti@1.21.7_sass@1.69.5_terser@5.40.0_yaml@2.8.0/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/dotenv-cli@7.4.4/node_modules/dotenv-cli/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/dotenv-cli@7.4.4/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.32.55", npm_config_verify_deps_before_run: "false", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "true", GTM_DEBUG: "false", FIREBASE_PROJECT_ID: "feedme-253402", GITHUB_WORKSPACE: "/home/runner/work/portal/portal", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", GITHUB_SHA: "7bbc9c1d6acbd578cf917ff71c6e8f21642875db", GITHUB_RUN_ATTEMPT: "1", FIREBASE_APP_ID: "1:128512026847:web:7c5c8ab7e8b90502dc616a", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/heads/main", GITHUB_ACTOR: "victorchai", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_43051151-a48d-4810-872b-dc39a6b34576", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/portal/portal/apps/mf-menu", GITHUB_ACTOR_ID: "49786844", RUNNER_WORKSPACE: "/home/runner/work/portal", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_43051151-a48d-4810-872b-dc39a6b34576", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/portal/portal/apps/mf-menu", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_15.6.1", CHROME_BIN: "/usr/bin/google-chrome", VITE_FEED_ME_CLIENT_ID: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", FIREBASE_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_43051151-a48d-4810-872b-dc39a6b34576", INIT_CWD: "/home/runner/work/portal/portal/apps/mf-menu", NODE_ENV: "production" } };
1895
- const Ho = "10.0.5";
1896
- function Go() {
1897
- typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (he().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (he().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (he().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (he().__INTLIFY_PROD_DEVTOOLS__ = !1);
1898
- }
1899
- const Se = {
1900
- // composer module errors
1901
- UNEXPECTED_RETURN_TYPE: ro,
1902
- // 24
1903
- // legacy module errors
1904
- INVALID_ARGUMENT: 25,
1905
- // i18n module errors
1906
- MUST_BE_CALL_SETUP_TOP: 26,
1907
- NOT_INSTALLED: 27,
1908
- NOT_INSTALLED_WITH_PROVIDE: 31,
1909
- // unexpected error
1910
- UNEXPECTED_ERROR: 32
1911
- };
1912
- function $e(e, ...t) {
1913
- return nt(e, null, void 0);
1914
- }
1915
- const Ot = /* @__PURE__ */ Te("__translateVNode"), Ct = /* @__PURE__ */ Te("__datetimeParts"), St = /* @__PURE__ */ Te("__numberParts"), Wo = Te("__setPluralRules"), wn = /* @__PURE__ */ Te("__injectWithOption"), kt = /* @__PURE__ */ Te("__dispose");
1916
- function He(e) {
1917
- if (!U(e))
1918
- return e;
1919
- for (const t in e)
1920
- if (le(e, t))
1921
- if (!t.includes("."))
1922
- U(e[t]) && He(e[t]);
1923
- else {
1924
- const n = t.split("."), r = n.length - 1;
1925
- let o = e, a = !1;
1926
- for (let u = 0; u < r; u++) {
1927
- if (n[u] in o || (o[n[u]] = H()), !U(o[n[u]])) {
1928
- a = !0;
1929
- break;
1930
- }
1931
- o = o[n[u]];
1932
- }
1933
- a || (o[n[r]] = e[t], delete e[t]), U(o[n[r]]) && He(o[n[r]]);
1934
- }
1935
- return e;
1936
- }
1937
- function Fn(e, t) {
1938
- const { messages: n, __i18n: r, messageResolver: o, flatJson: a } = t, u = M(n) ? n : z(r) ? H() : { [e]: H() };
1939
- if (z(r) && r.forEach((m) => {
1940
- if ("locale" in m && "resource" in m) {
1941
- const { locale: c, resource: g } = m;
1942
- c ? (u[c] = u[c] || H(), Je(g, u[c])) : Je(g, u);
1943
- } else
1944
- C(m) && Je(JSON.parse(m), u);
1945
- }), o == null && a)
1946
- for (const m in u)
1947
- le(u, m) && He(u[m]);
1948
- return u;
1949
- }
1950
- function Mn(e) {
1951
- return e.type;
1952
- }
1953
- function Bo(e, t, n) {
1954
- let r = U(t.messages) ? t.messages : H();
1955
- "__i18nGlobal" in n && (r = Fn(e.locale.value, {
1956
- messages: r,
1957
- __i18n: n.__i18nGlobal
1958
- }));
1959
- const o = Object.keys(r);
1960
- o.length && o.forEach((a) => {
1961
- e.mergeLocaleMessage(a, r[a]);
1962
- });
1963
- {
1964
- if (U(t.datetimeFormats)) {
1965
- const a = Object.keys(t.datetimeFormats);
1966
- a.length && a.forEach((u) => {
1967
- e.mergeDateTimeFormat(u, t.datetimeFormats[u]);
1968
- });
1969
- }
1970
- if (U(t.numberFormats)) {
1971
- const a = Object.keys(t.numberFormats);
1972
- a.length && a.forEach((u) => {
1973
- e.mergeNumberFormat(u, t.numberFormats[u]);
1974
- });
1975
- }
1976
- }
1977
- }
1978
- function _n(e) {
1979
- return Q(Bn, null, e, 0);
1980
- }
1981
- const dn = "__INTLIFY_META__", pn = () => [], xo = () => !1;
1982
- let En = 0;
1983
- function gn(e) {
1984
- return (t, n, r, o) => e(n, r, Pt() || void 0, o);
1985
- }
1986
- const Ko = /* @__NO_SIDE_EFFECTS__ */ () => {
1987
- const e = Pt();
1988
- let t = null;
1989
- return e && (t = Mn(e)[dn]) ? { [dn]: t } : null;
1990
- };
1991
- function Yo(e = {}) {
1992
- const { __root: t, __injectWithOption: n } = e, r = t === void 0, o = e.flatJson, a = Kt ? se : Gn;
1993
- let u = J(e.inheritLocale) ? e.inheritLocale : !0;
1994
- const m = a(
1995
- // prettier-ignore
1996
- t && u ? t.locale.value : C(e.locale) ? e.locale : et
1997
- ), c = a(
1998
- // prettier-ignore
1999
- t && u ? t.fallbackLocale.value : C(e.fallbackLocale) || z(e.fallbackLocale) || M(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : m.value
2000
- ), g = a(Fn(m.value, e)), T = a(M(e.datetimeFormats) ? e.datetimeFormats : { [m.value]: {} }), A = a(M(e.numberFormats) ? e.numberFormats : { [m.value]: {} });
2001
- let E = t ? t.missingWarn : J(e.missingWarn) || ze(e.missingWarn) ? e.missingWarn : !0, _ = t ? t.fallbackWarn : J(e.fallbackWarn) || ze(e.fallbackWarn) ? e.fallbackWarn : !0, O = t ? t.fallbackRoot : J(e.fallbackRoot) ? e.fallbackRoot : !0, I = !!e.fallbackFormat, b = K(e.missing) ? e.missing : null, i = K(e.missing) ? gn(e.missing) : null, v = K(e.postTranslation) ? e.postTranslation : null, R = t ? t.warnHtmlMessage : J(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, p = !!e.escapeParameter;
2002
- const L = t ? t.modifiers : M(e.modifiers) ? e.modifiers : {};
2003
- let y = e.pluralRules || t && t.pluralRules, f;
2004
- f = (() => {
2005
- r && rn(null);
2006
- const d = {
2007
- version: Ho,
2008
- locale: m.value,
2009
- fallbackLocale: c.value,
2010
- messages: g.value,
2011
- modifiers: L,
2012
- pluralRules: y,
2013
- missing: i === null ? void 0 : i,
2014
- missingWarn: E,
2015
- fallbackWarn: _,
2016
- fallbackFormat: I,
2017
- unresolving: !0,
2018
- postTranslation: v === null ? void 0 : v,
2019
- warnHtmlMessage: R,
2020
- escapeParameter: p,
2021
- messageResolver: e.messageResolver,
2022
- messageCompiler: e.messageCompiler,
2023
- __meta: { framework: "vue" }
2024
- };
2025
- d.datetimeFormats = T.value, d.numberFormats = A.value, d.__datetimeFormatters = M(f) ? f.__datetimeFormatters : void 0, d.__numberFormatters = M(f) ? f.__numberFormatters : void 0;
2026
- const N = No(d);
2027
- return r && rn(N), N;
2028
- })(), De(f, m.value, c.value);
2029
- function P() {
2030
- return [
2031
- m.value,
2032
- c.value,
2033
- g.value,
2034
- T.value,
2035
- A.value
2036
- ];
2037
- }
2038
- const B = W({
2039
- get: () => m.value,
2040
- set: (d) => {
2041
- m.value = d, f.locale = m.value;
2042
- }
2043
- }), w = W({
2044
- get: () => c.value,
2045
- set: (d) => {
2046
- c.value = d, f.fallbackLocale = c.value, De(f, m.value, d);
2047
- }
2048
- }), D = W(() => g.value), Ie = /* @__PURE__ */ W(() => T.value), ot = /* @__PURE__ */ W(() => A.value);
2049
- function at() {
2050
- return K(v) ? v : null;
2051
- }
2052
- function st(d) {
2053
- v = d, f.postTranslation = d;
2054
- }
2055
- function lt() {
2056
- return b;
2057
- }
2058
- function ut(d) {
2059
- d !== null && (i = gn(d)), b = d, f.missing = i;
2060
- }
2061
- const ce = (d, N, G, q, ve, Ye) => {
2062
- P();
2063
- let Ae;
2064
- try {
2065
- $o.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (f.fallbackContext = t ? Io() : void 0), Ae = d(f);
2066
- } finally {
2067
- __INTLIFY_PROD_DEVTOOLS__, r || (f.fallbackContext = void 0);
2068
- }
2069
- if (G !== "translate exists" && // for not `te` (e.g `t`)
2070
- ee(Ae) && Ae === rt || G === "translate exists" && !Ae) {
2071
- const [$n, Ua] = N();
2072
- return t && O ? q(t) : ve($n);
2073
- } else {
2074
- if (Ye(Ae))
2075
- return Ae;
2076
- throw $e(Se.UNEXPECTED_RETURN_TYPE);
2077
- }
2078
- };
2079
- function Be(...d) {
2080
- return ce((N) => Reflect.apply(fn, null, [N, ...d]), () => Lt(...d), "translate", (N) => Reflect.apply(N.t, N, [...d]), (N) => N, (N) => C(N));
2081
- }
2082
- function xe(...d) {
2083
- const [N, G, q] = d;
2084
- if (q && !U(q))
2085
- throw $e(Se.INVALID_ARGUMENT);
2086
- return Be(N, G, te({ resolvedMessage: !0 }, q || {}));
2087
- }
2088
- function it(...d) {
2089
- return ce((N) => Reflect.apply(an, null, [N, ...d]), () => Rt(...d), "datetime format", (N) => Reflect.apply(N.d, N, [...d]), () => tn, (N) => C(N));
2090
- }
2091
- function ct(...d) {
2092
- return ce((N) => Reflect.apply(ln, null, [N, ...d]), () => At(...d), "number format", (N) => Reflect.apply(N.n, N, [...d]), () => tn, (N) => C(N));
2093
- }
2094
- function mt(d) {
2095
- return d.map((N) => C(N) || ee(N) || J(N) ? _n(String(N)) : N);
2096
- }
2097
- const ft = {
2098
- normalize: mt,
2099
- interpolate: (d) => d,
2100
- type: "vnode"
2101
- };
2102
- function _t(...d) {
2103
- return ce((N) => {
2104
- let G;
2105
- const q = N;
2106
- try {
2107
- q.processor = ft, G = Reflect.apply(fn, null, [q, ...d]);
2108
- } finally {
2109
- q.processor = null;
2110
- }
2111
- return G;
2112
- }, () => Lt(...d), "translate", (N) => N[Ot](...d), (N) => [_n(N)], (N) => z(N));
2113
- }
2114
- function Ke(...d) {
2115
- return ce((N) => Reflect.apply(ln, null, [N, ...d]), () => At(...d), "number format", (N) => N[St](...d), pn, (N) => C(N) || z(N));
2116
- }
2117
- function dt(...d) {
2118
- return ce((N) => Reflect.apply(an, null, [N, ...d]), () => Rt(...d), "datetime format", (N) => N[Ct](...d), pn, (N) => C(N) || z(N));
2119
- }
2120
- function pt(d) {
2121
- y = d, f.pluralRules = y;
2122
- }
2123
- function Et(d, N) {
2124
- return ce(() => {
2125
- if (!d)
2126
- return !1;
2127
- const G = C(N) ? N : m.value, q = Ne(G), ve = f.messageResolver(q, d);
2128
- return Ce(ve) || re(ve) || C(ve);
2129
- }, () => [d], "translate exists", (G) => Reflect.apply(G.te, G, [d, N]), xo, (G) => J(G));
2130
- }
2131
- function gt(d) {
2132
- let N = null;
2133
- const G = Nn(f, c.value, m.value);
2134
- for (let q = 0; q < G.length; q++) {
2135
- const ve = g.value[G[q]] || {}, Ye = f.messageResolver(ve, d);
2136
- if (Ye != null) {
2137
- N = Ye;
2138
- break;
2139
- }
2140
- }
2141
- return N;
2142
- }
2143
- function ke(d) {
2144
- const N = gt(d);
2145
- return N ?? (t ? t.tm(d) || {} : {});
2146
- }
2147
- function Ne(d) {
2148
- return g.value[d] || {};
2149
- }
2150
- function Re(d, N) {
2151
- if (o) {
2152
- const G = { [d]: N };
2153
- for (const q in G)
2154
- le(G, q) && He(G[q]);
2155
- N = G[d];
2156
- }
2157
- g.value[d] = N, f.messages = g.value;
2158
- }
2159
- function Pe(d, N) {
2160
- g.value[d] = g.value[d] || {};
2161
- const G = { [d]: N };
2162
- if (o)
2163
- for (const q in G)
2164
- le(G, q) && He(G[q]);
2165
- N = G[d], Je(N, g.value[d]), f.messages = g.value;
2166
- }
2167
- function yt(d) {
2168
- return T.value[d] || {};
2169
- }
2170
- function s(d, N) {
2171
- T.value[d] = N, f.datetimeFormats = T.value, sn(f, d, N);
2172
- }
2173
- function l(d, N) {
2174
- T.value[d] = te(T.value[d] || {}, N), f.datetimeFormats = T.value, sn(f, d, N);
2175
- }
2176
- function h(d) {
2177
- return A.value[d] || {};
2178
- }
2179
- function k(d, N) {
2180
- A.value[d] = N, f.numberFormats = A.value, un(f, d, N);
2181
- }
2182
- function X(d, N) {
2183
- A.value[d] = te(A.value[d] || {}, N), f.numberFormats = A.value, un(f, d, N);
2184
- }
2185
- En++, t && Kt && (Ze(t.locale, (d) => {
2186
- u && (m.value = d, f.locale = d, De(f, m.value, c.value));
2187
- }), Ze(t.fallbackLocale, (d) => {
2188
- u && (c.value = d, f.fallbackLocale = d, De(f, m.value, c.value));
2189
- }));
2190
- const F = {
2191
- id: En,
2192
- locale: B,
2193
- fallbackLocale: w,
2194
- get inheritLocale() {
2195
- return u;
2196
- },
2197
- set inheritLocale(d) {
2198
- u = d, d && t && (m.value = t.locale.value, c.value = t.fallbackLocale.value, De(f, m.value, c.value));
2199
- },
2200
- get availableLocales() {
2201
- return Object.keys(g.value).sort();
2202
- },
2203
- messages: D,
2204
- get modifiers() {
2205
- return L;
2206
- },
2207
- get pluralRules() {
2208
- return y || {};
2209
- },
2210
- get isGlobal() {
2211
- return r;
2212
- },
2213
- get missingWarn() {
2214
- return E;
2215
- },
2216
- set missingWarn(d) {
2217
- E = d, f.missingWarn = E;
2218
- },
2219
- get fallbackWarn() {
2220
- return _;
2221
- },
2222
- set fallbackWarn(d) {
2223
- _ = d, f.fallbackWarn = _;
2224
- },
2225
- get fallbackRoot() {
2226
- return O;
2227
- },
2228
- set fallbackRoot(d) {
2229
- O = d;
2230
- },
2231
- get fallbackFormat() {
2232
- return I;
2233
- },
2234
- set fallbackFormat(d) {
2235
- I = d, f.fallbackFormat = I;
2236
- },
2237
- get warnHtmlMessage() {
2238
- return R;
2239
- },
2240
- set warnHtmlMessage(d) {
2241
- R = d, f.warnHtmlMessage = d;
2242
- },
2243
- get escapeParameter() {
2244
- return p;
2245
- },
2246
- set escapeParameter(d) {
2247
- p = d, f.escapeParameter = d;
2248
- },
2249
- t: Be,
2250
- getLocaleMessage: Ne,
2251
- setLocaleMessage: Re,
2252
- mergeLocaleMessage: Pe,
2253
- getPostTranslationHandler: at,
2254
- setPostTranslationHandler: st,
2255
- getMissingHandler: lt,
2256
- setMissingHandler: ut,
2257
- [Wo]: pt
2258
- };
2259
- return F.datetimeFormats = Ie, F.numberFormats = ot, F.rt = xe, F.te = Et, F.tm = ke, F.d = it, F.n = ct, F.getDateTimeFormat = yt, F.setDateTimeFormat = s, F.mergeDateTimeFormat = l, F.getNumberFormat = h, F.setNumberFormat = k, F.mergeNumberFormat = X, F[wn] = n, F[Ot] = _t, F[Ct] = dt, F[St] = Ke, F;
2260
- }
2261
- const Ht = {
2262
- tag: {
2263
- type: [String, Object]
2264
- },
2265
- locale: {
2266
- type: String
2267
- },
2268
- scope: {
2269
- type: String,
2270
- // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2271
- validator: (e) => e === "parent" || e === "global",
2272
- default: "parent"
2273
- /* ComponentI18nScope */
2274
- },
2275
- i18n: {
2276
- type: Object
2277
- }
2278
- };
2279
- function jo({ slots: e }, t) {
2280
- return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, o) => [
2281
- ...r,
2282
- // prettier-ignore
2283
- ...o.type === de ? o.children : [o]
2284
- ], []) : t.reduce((n, r) => {
2285
- const o = e[r];
2286
- return o && (n[r] = o()), n;
2287
- }, H());
2288
- }
2289
- function Un() {
2290
- return de;
2291
- }
2292
- te({
2293
- keypath: {
2294
- type: String,
2295
- required: !0
2296
- },
2297
- plural: {
2298
- type: [Number, String],
2299
- validator: (e) => ee(e) || !isNaN(e)
2300
- }
2301
- }, Ht);
2302
- function Xo(e) {
2303
- return z(e) && !C(e[0]);
2304
- }
2305
- function Vn(e, t, n, r) {
2306
- const { slots: o, attrs: a } = t;
2307
- return () => {
2308
- const u = { part: !0 };
2309
- let m = H();
2310
- e.locale && (u.locale = e.locale), C(e.format) ? u.key = e.format : U(e.format) && (C(e.format.key) && (u.key = e.format.key), m = Object.keys(e.format).reduce((E, _) => n.includes(_) ? te(H(), E, { [_]: e.format[_] }) : E, H()));
2311
- const c = r(e.value, u, m);
2312
- let g = [u.key];
2313
- z(c) ? g = c.map((E, _) => {
2314
- const O = o[E.type], I = O ? O({ [E.type]: E.value, index: _, parts: c }) : [E.value];
2315
- return Xo(I) && (I[0].key = `${E.type}-${_}`), I;
2316
- }) : C(c) && (g = [c]);
2317
- const T = te(H(), a), A = C(e.tag) || U(e.tag) ? e.tag : Un();
2318
- return hn(A, T, g);
2319
- };
2320
- }
2321
- te({
2322
- value: {
2323
- type: Number,
2324
- required: !0
2325
- },
2326
- format: {
2327
- type: [String, Object]
2328
- }
2329
- }, Ht);
2330
- te({
2331
- value: {
2332
- type: [Number, Date],
2333
- required: !0
2334
- },
2335
- format: {
2336
- type: [String, Object]
2337
- }
2338
- }, Ht);
2339
- const qo = /* @__PURE__ */ Te("global-vue-i18n");
2340
- function We(e = {}) {
2341
- const t = Pt();
2342
- if (t == null)
2343
- throw $e(Se.MUST_BE_CALL_SETUP_TOP);
2344
- if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2345
- throw $e(Se.NOT_INSTALLED);
2346
- const n = Jo(t), r = Zo(n), o = Mn(t), a = Qo(e, o);
2347
- if (a === "global")
2348
- return Bo(r, e, o), r;
2349
- if (a === "parent") {
2350
- let c = zo(n, t, e.__useComponent);
2351
- return c == null && (c = r), c;
2352
- }
2353
- const u = n;
2354
- let m = u.__getInstance(t);
2355
- if (m == null) {
2356
- const c = te({}, e);
2357
- "__i18n" in o && (c.__i18n = o.__i18n), r && (c.__root = r), m = Yo(c), u.__composerExtend && (m[kt] = u.__composerExtend(m)), ta(u, t, m), u.__setInstance(t, m);
2358
- }
2359
- return m;
2360
- }
2361
- function Jo(e) {
2362
- const t = Hn(e.isCE ? qo : e.appContext.app.__VUE_I18N_SYMBOL__);
2363
- if (!t)
2364
- throw $e(e.isCE ? Se.NOT_INSTALLED_WITH_PROVIDE : Se.UNEXPECTED_ERROR);
2365
- return t;
2366
- }
2367
- function Qo(e, t) {
2368
- return tt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2369
- }
2370
- function Zo(e) {
2371
- return e.mode === "composition" ? e.global : e.global.__composer;
2372
- }
2373
- function zo(e, t, n = !1) {
2374
- let r = null;
2375
- const o = t.root;
2376
- let a = ea(t, n);
2377
- for (; a != null; ) {
2378
- const u = e;
2379
- if (e.mode === "composition")
2380
- r = u.__getInstance(a);
2381
- else if (__VUE_I18N_LEGACY_API__) {
2382
- const m = u.__getInstance(a);
2383
- m != null && (r = m.__composer, n && r && !r[wn] && (r = null));
2384
- }
2385
- if (r != null || o === a)
2386
- break;
2387
- a = a.parent;
2388
- }
2389
- return r;
2390
- }
2391
- function ea(e, t = !1) {
2392
- return e == null ? null : t && e.vnode.ctx || e.parent;
2393
- }
2394
- function ta(e, t, n) {
2395
- vn(() => {
2396
- }, t), Wn(() => {
2397
- const r = n;
2398
- e.__deleteInstance(t);
2399
- const o = r[kt];
2400
- o && (o(), delete r[kt]);
2401
- }, t);
2402
- }
2403
- Go();
2404
- yo(Zr);
2405
- bo(po);
2406
- vo(Nn);
2407
- if (__INTLIFY_PROD_DEVTOOLS__) {
2408
- const e = he();
2409
- e.__INTLIFY__ = !0, zr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2410
- }
2411
- function Ee(e) {
2412
- return Array.from(new Set(e));
2413
- }
2414
- function Ka() {
2415
- const e = Dt();
2416
- return {
2417
- restaurantAttributes: W(() => [
2418
- {
2419
- type: "string",
2420
- key: "name",
2421
- entity: "restaurant",
2422
- values: Ee(
2423
- e.restaurants.value.filter((n) => {
2424
- var r;
2425
- return !!((r = n.profile) != null && r.name);
2426
- }).map((n) => n.profile.name)
2427
- )
2428
- },
2429
- {
2430
- type: "string",
2431
- key: "code",
2432
- entity: "restaurant",
2433
- values: Ee(
2434
- e.restaurants.value.filter((n) => {
2435
- var r;
2436
- return !!((r = n.profile) != null && r.code);
2437
- }).map((n) => n.profile.code)
2438
- )
2439
- }
2440
- ])
2441
- };
2442
- }
2443
- function na(e, t) {
2444
- return t.split(".").reduce((n, r) => n == null ? void 0 : n[r], e);
2445
- }
2446
- function ra(e, t) {
2447
- return Ee(
2448
- e.map((n) => na(n.profile, t)).filter(Boolean)
2449
- ).map((n) => ({
2450
- label: n,
2451
- value: n
2452
- }));
2453
- }
2454
- function oa() {
2455
- const e = Dt(), { t } = Ge(), n = e.restaurants.value;
2456
- return [
2457
- "name",
2458
- "code",
2459
- "address.city",
2460
- "address.postcode",
2461
- "address.state"
2462
- ].map((o) => ({
2463
- label: t(
2464
- `menu.rule_groups.condition_view.attribute.restaurant_${o.replace("address.", "")}`
2465
- ),
2466
- value: o,
2467
- options: ra(n, o)
2468
- }));
2469
- }
2470
- function aa() {
2471
- const e = Tn(), { t } = Ge(), n = e.state.menu.modules.item, r = e.categories;
2472
- return [
2473
- {
2474
- label: t("menu.rule_groups.condition_view.attribute.product_name"),
2475
- value: "name",
2476
- options: Ee(n.filter((o) => !!o.name).map((o) => o.name)).map(
2477
- (o) => ({ label: o, value: o })
2478
- )
2479
- },
2480
- {
2481
- label: t("menu.rule_groups.condition_view.attribute.product_code"),
2482
- value: "code",
2483
- options: Ee(n.filter((o) => !!o.code).map((o) => o.code)).map(
2484
- (o) => ({ label: o, value: o })
2485
- )
2486
- },
2487
- {
2488
- label: t("menu.rule_groups.condition_view.attribute.product_category"),
2489
- value: "category",
2490
- options: Ee(r.filter((o) => !!o.name).map((o) => o.name)).map(
2491
- (o) => ({ label: o, value: o })
2492
- )
2493
- }
2494
- ];
2495
- }
2496
- function Ya(e = {}) {
2497
- const t = W(() => {
2498
- var c, g;
2499
- const u = ((c = e.menuItems) == null ? void 0 : c.value) || [], m = ((g = e.categories) == null ? void 0 : g.value) || [];
2500
- return [
2501
- {
2502
- type: "string",
2503
- key: "name",
2504
- entity: "item",
2505
- values: Ee(u.filter((T) => !!T.name).map((T) => T.name))
2506
- },
2507
- {
2508
- type: "string",
2509
- key: "code",
2510
- entity: "item",
2511
- values: Ee(u.filter((T) => !!T.code).map((T) => T.code))
2512
- },
2513
- {
2514
- type: "string",
2515
- key: "category",
2516
- entity: "item",
2517
- values: Ee(m.filter((T) => !!T.name).map((T) => T.name))
2518
- }
2519
- ];
2520
- }), n = W(() => {
2521
- var m;
2522
- const u = {};
2523
- return (m = e.categories) == null || m.value.forEach((c) => {
2524
- u[c.name] = c._id;
2525
- }), u;
2526
- }), r = W(() => {
2527
- var m;
2528
- const u = {};
2529
- return (m = e.categories) == null || m.value.forEach((c) => {
2530
- u[c._id] = c.name;
2531
- }), u;
2532
- });
2533
- function o(u) {
2534
- const m = xt.cloneDeep(u);
2535
- return m != null && m.rules && (m.rules = m.rules.map((c) => {
2536
- if ("property" in c && c.property === "category" && Array.isArray(c.value)) {
2537
- const g = c.value.map((T) => r.value[T]);
2538
- return { ...c, value: g };
2539
- }
2540
- return c;
2541
- })), m;
2542
- }
2543
- function a(u) {
2544
- const m = xt.cloneDeep(u);
2545
- return m != null && m.rules && (m.rules = m.rules.map((c) => {
2546
- if ("property" in c && c.property === "category" && Array.isArray(c.value)) {
2547
- const g = c.value.map((T) => n.value[T]);
2548
- return { ...c, value: g };
2549
- }
2550
- return c;
2551
- })), m;
2552
- }
2553
- return {
2554
- itemAttributes: t,
2555
- convertCategoryIdToName: o,
2556
- convertCategoryNameToId: a
2557
- };
2558
- }
2559
- const sa = {
2560
- class: "flex justify-between gap-8"
2561
- }, la = {
2562
- class: "flex w-full justify-between gap-16"
2563
- }, ua = {
2564
- class: "break-all fm-typo-en-body-lg-400 line-clamp-1"
2565
- }, yn = /* @__PURE__ */ ie({
2566
- __name: "RuleConditionSelector",
2567
- props: {
2568
- ruleKey: {
2569
- type: String,
2570
- required: !0
2571
- },
2572
- operator: {
2573
- type: String,
2574
- required: !0
2575
- },
2576
- values: {
2577
- type: Array,
2578
- required: !0
2579
- },
2580
- uniqueKey: {
2581
- type: String,
2582
- required: !0
2583
- },
2584
- selectedKeys: {
2585
- type: Array,
2586
- default: () => []
2587
- }
2588
- },
2589
- emits: ["update:modelValue"],
2590
- setup(e, {
2591
- emit: t
2592
- }) {
2593
- const {
2594
- t: n
2595
- } = Ge(), r = e, o = t, a = Tn(), {
2596
- attributes: u
2597
- } = Bt({
2598
- valueSource: Dt().restaurants,
2599
- entity: "restaurant"
2600
- }), {
2601
- attributes: m
2602
- } = Bt({
2603
- valueSource: W(() => a.state.menu.modules.item || []),
2604
- entity: "item"
2605
- }), c = oa(), g = aa(), T = se(r.ruleKey), A = W(() => [...c.map((y) => ({
2606
- label: y.label,
2607
- value: `restaurant_attr_${y.value}`
2608
- })), ...u.value.map((y) => ({
2609
- label: `Restaurant ${y.key}`,
2610
- value: `restaurant_custom_${y.key}`
2611
- })), ...g.map((y) => ({
2612
- label: y.label,
2613
- value: `item_attr_${y.value}`
2614
- })), ...m.value.map((y) => ({
2615
- label: `Product ${y.key}`,
2616
- value: `item_custom_${y.key}`
2617
- }))]), E = se(r.values), _ = W(() => {
2618
- const y = T.value;
2619
- if (!y) return [];
2620
- if (y.startsWith("restaurant_attr_")) {
2621
- const f = y.replace("restaurant_attr_", ""), S = c.find((P) => P.value === f);
2622
- if (S && Array.isArray(S.options))
2623
- return S.options;
2624
- } else if (y.startsWith("restaurant_custom_")) {
2625
- const f = y.replace("restaurant_custom_", ""), S = u.value.find((P) => P.key === f);
2626
- if (S && Array.isArray(S.values))
2627
- return S.values.map((P) => ({
2628
- label: P,
2629
- value: P
2630
- }));
2631
- } else if (y.startsWith("item_attr_")) {
2632
- const f = y.replace("item_attr_", ""), S = g.find((P) => P.value === f);
2633
- if (S && Array.isArray(S.options))
2634
- return S.options;
2635
- } else if (y.startsWith("item_custom_")) {
2636
- const f = y.replace("item_custom_", ""), S = m.value.find((P) => P.key === f);
2637
- if (S && Array.isArray(S.values))
2638
- return S.values.map((P) => ({
2639
- label: P,
2640
- value: P
2641
- }));
2642
- }
2643
- return [];
2644
- }), O = se(r.operator), I = [{
2645
- label: n("menu.rule_groups.condition_view.operator.in"),
2646
- value: "$in"
2647
- }, {
2648
- label: n("menu.rule_groups.condition_view.operator.not_in"),
2649
- value: "$nin"
2650
- }, {
2651
- label: n("menu.rule_groups.condition_view.operator.contains"),
2652
- value: "$contains"
2653
- }, {
2654
- label: n("menu.rule_groups.condition_view.operator.starts_with"),
2655
- value: "$startsWith"
2656
- }], b = se(""), i = W(() => {
2657
- const y = _.value, f = Array.isArray(E.value) ? E.value : [], S = f.map((B) => y.find((w) => w.value === B)).filter(Boolean);
2658
- let P = [];
2659
- return b.value ? (P = y.filter((B) => B.label.toLowerCase().includes(b.value.toLowerCase()) && !f.includes(B.value)), [...S, ...P]) : (P = y.filter((B) => !f.includes(B.value)), [...S, ...P]);
2660
- }), v = W(() => {
2661
- let y = A.value;
2662
- return y = y.filter((f) => !r.selectedKeys.includes(f.value) || f.value === T.value), b.value ? y.filter((f) => f.label.toLowerCase().includes(b.value.toLowerCase())) : y;
2663
- });
2664
- Ze(() => T.value, (y) => {
2665
- E.value = [];
2666
- });
2667
- function R(y) {
2668
- if (y.startsWith("restaurant_custom_")) {
2669
- const f = y.replace("restaurant_custom_", ""), S = u.value.find((P) => P.key === f);
2670
- return (S == null ? void 0 : S.type) || "string";
2671
- } else if (y.startsWith("item_custom_")) {
2672
- const f = y.replace("item_custom_", ""), S = m.value.find((P) => P.key === f);
2673
- return (S == null ? void 0 : S.type) || "string";
2674
- }
2675
- return "string";
2676
- }
2677
- function p(y, f) {
2678
- const S = R(y === "ruleKey" ? f : T.value);
2679
- switch (y) {
2680
- case "ruleKey":
2681
- o("update:modelValue", {
2682
- ruleKey: f,
2683
- operator: O.value,
2684
- values: E.value,
2685
- uniqueKey: r.uniqueKey,
2686
- type: S,
2687
- action: "update"
2688
- });
2689
- break;
2690
- case "operator":
2691
- o("update:modelValue", {
2692
- ruleKey: T.value,
2693
- operator: f,
2694
- values: E.value,
2695
- uniqueKey: r.uniqueKey,
2696
- type: S,
2697
- action: "update"
2698
- });
2699
- break;
2700
- case "ruleValues":
2701
- o("update:modelValue", {
2702
- ruleKey: T.value,
2703
- operator: O.value,
2704
- values: f,
2705
- uniqueKey: r.uniqueKey,
2706
- type: S,
2707
- action: "update"
2708
- });
2709
- break;
2710
- }
2711
- }
2712
- function L() {
2713
- o("update:modelValue", {
2714
- ruleKey: null,
2715
- operator: null,
2716
- values: null,
2717
- uniqueKey: r.uniqueKey,
2718
- action: "delete"
2719
- });
2720
- }
2721
- return (y, f) => {
2722
- const S = pe("FmSearch"), P = pe("FmSelect"), B = pe("FmButton");
2723
- return x(), Y("div", sa, [V("div", la, [Q(P, {
2724
- class: "flex w-full",
2725
- modelValue: T.value,
2726
- "onUpdate:modelValue": [f[2] || (f[2] = (w) => T.value = w), f[3] || (f[3] = (w) => p("ruleKey", w))],
2727
- items: v.value,
2728
- placeholder: j(n)("menu.rule_groups.condition_view.select_item")
2729
- }, {
2730
- "prepend-menu": oe(() => [V("div", {
2731
- onClick: f[1] || (f[1] = ae(() => {
2732
- }, ["stop"]))
2733
- }, [Q(S, {
2734
- class: "px-8",
2735
- modelValue: b.value,
2736
- "onUpdate:modelValue": f[0] || (f[0] = (w) => b.value = w),
2737
- placeholder: "Filter"
2738
- }, null, 8, ["modelValue"])])]),
2739
- _: 1
2740
- }, 8, ["modelValue", "items", "placeholder"]), Q(P, {
2741
- class: "flex w-full",
2742
- modelValue: O.value,
2743
- "onUpdate:modelValue": [f[4] || (f[4] = (w) => O.value = w), f[5] || (f[5] = (w) => p("operator", w))],
2744
- placeholder: j(n)("menu.rule_groups.condition_view.select_item"),
2745
- items: I,
2746
- rules: [(w) => T.value && !w ? j(n)("menu.rule_groups.condition_view.required") : !0]
2747
- }, null, 8, ["modelValue", "placeholder", "rules"]), Q(P, {
2748
- class: "flex w-full",
2749
- modelValue: E.value,
2750
- "onUpdate:modelValue": [f[7] || (f[7] = (w) => E.value = w), f[8] || (f[8] = (w) => p("ruleValues", w))],
2751
- items: i.value,
2752
- placeholder: j(n)("menu.rule_groups.condition_view.select_item"),
2753
- multiselect: "",
2754
- "hide-chips": "",
2755
- rules: [(w) => T.value && (!w || w.length === 0) ? j(n)("menu.rule_groups.condition_view.required") : !0]
2756
- }, {
2757
- default: oe(() => [V("div", ua, Z(E.value.join(", ")), 1)]),
2758
- "prepend-menu": oe(() => [Q(S, {
2759
- class: "px-8",
2760
- modelValue: b.value,
2761
- "onUpdate:modelValue": f[6] || (f[6] = (w) => b.value = w),
2762
- placeholder: j(n)("common.filter")
2763
- }, null, 8, ["modelValue", "placeholder"])]),
2764
- _: 1
2765
- }, 8, ["modelValue", "items", "placeholder", "rules"])]), Q(B, {
2766
- variant: "tertiary",
2767
- "prepend-icon": "close",
2768
- onClick: f[9] || (f[9] = ae((w) => L(), ["stop"]))
2769
- })]);
2770
- };
2771
- }
2772
- }), ia = {
2773
- class: "flex flex-col gap-16"
2774
- }, ca = {
2775
- class: "fm-typo-en-body-lg-600"
2776
- }, ma = {
2777
- class: "flex flex-col gap-16"
2778
- }, fa = /* @__PURE__ */ ie({
2779
- __name: "RuleCondition",
2780
- props: {
2781
- modelValue: {}
2782
- },
2783
- emits: ["update:modelValue"],
2784
- setup(e, {
2785
- emit: t
2786
- }) {
2787
- const {
2788
- t: n
2789
- } = Ge(), r = e, o = t, a = W(() => {
2790
- var _;
2791
- return ((_ = r.modelValue.restaurantRule) == null ? void 0 : _.restaurantAttributes) ?? {};
2792
- }), u = W(() => {
2793
- var _;
2794
- return ((_ = r.modelValue.restaurantRule) == null ? void 0 : _.restaurantCustomAttributes) ?? {};
2795
- }), m = W(() => {
2796
- var _;
2797
- return ((_ = r.modelValue.itemRule) == null ? void 0 : _.itemAttributes) ?? {};
2798
- }), c = W(() => {
2799
- var _;
2800
- return ((_ = r.modelValue.itemRule) == null ? void 0 : _.itemCustomAttributes) ?? {};
2801
- }), g = se([...(a.value.rules ?? []).map((_) => ({
2802
- ..._,
2803
- id: crypto.randomUUID(),
2804
- property: `restaurant_attr_${_.property}`
2805
- })), ...(u.value.rules ?? []).map((_) => ({
2806
- ..._,
2807
- id: crypto.randomUUID(),
2808
- property: `restaurant_custom_${_.property}`
2809
- })), ...(m.value.rules ?? []).map((_) => ({
2810
- ..._,
2811
- id: crypto.randomUUID(),
2812
- property: `item_attr_${_.property}`
2813
- })), ...(c.value.rules ?? []).map((_) => ({
2814
- ..._,
2815
- id: crypto.randomUUID(),
2816
- property: `item_custom_${_.property}`
2817
- }))]);
2818
- vn(() => {
2819
- g.value.length === 0 && E();
2820
- });
2821
- const T = se([]);
2822
- function A(_) {
2823
- const O = _.uniqueKey.split("_"), I = O[0] === "newCondition";
2824
- if (_.action === "delete")
2825
- if (I)
2826
- T.value = T.value.filter((b) => b.key !== _.uniqueKey);
2827
- else {
2828
- const b = O.slice(1).join("_");
2829
- g.value = g.value.filter((i) => i.id !== b);
2830
- }
2831
- else if (_.action === "update")
2832
- if (I)
2833
- T.value = T.value.filter((b) => b.key !== _.uniqueKey), g.value.push({
2834
- id: crypto.randomUUID(),
2835
- property: _.ruleKey,
2836
- operator: _.operator,
2837
- value: _.values,
2838
- type: _.type
2839
- });
2840
- else {
2841
- const b = O.slice(1).join("_"), i = g.value.findIndex((v) => v.id === b);
2842
- i !== -1 && (g.value[i] = {
2843
- id: b,
2844
- // Keep the same ID
2845
- property: _.ruleKey,
2846
- operator: _.operator,
2847
- value: _.values,
2848
- type: _.type
2849
- });
2850
- }
2851
- o("update:modelValue", g.value);
2852
- }
2853
- function E() {
2854
- T.value.push({
2855
- key: `newCondition_${T.value.length}`
2856
- });
2857
- }
2858
- return Ze(() => g.value.length + T.value.length, (_) => {
2859
- _ === 0 && E();
2860
- }), (_, O) => {
2861
- const I = pe("FmButton");
2862
- return x(), Y("div", ia, [V("p", ca, Z(j(n)("menu.rule_groups.condition_view.condition")), 1), V("div", ma, [(x(!0), Y(de, null, Me(g.value, (b) => (x(), Y("div", {
2863
- key: b.id
2864
- }, [Q(yn, {
2865
- ruleKey: b.property,
2866
- operator: b.operator,
2867
- values: b.value,
2868
- "unique-key": `condition_${b.id}`,
2869
- "selected-keys": g.value.map((i) => i.property),
2870
- "onUpdate:modelValue": O[0] || (O[0] = (i) => {
2871
- A(i);
2872
- })
2873
- }, null, 8, ["ruleKey", "operator", "values", "unique-key", "selected-keys"])]))), 128)), (x(!0), Y(de, null, Me(T.value, (b) => (x(), Y("div", {
2874
- key: b.key
2875
- }, [Q(yn, {
2876
- ruleKey: "",
2877
- operator: "",
2878
- "unique-key": b.key,
2879
- values: [],
2880
- "selected-keys": g.value.map((i) => i.property),
2881
- "onUpdate:modelValue": O[1] || (O[1] = (i) => {
2882
- A(i);
2883
- })
2884
- }, null, 8, ["unique-key", "selected-keys"])]))), 128)), Q(I, {
2885
- variant: j(Fe).Plain,
2886
- "prepend-icon": "add",
2887
- label: j(n)("menu.rule_groups.condition_view.add_condition"),
2888
- onClick: O[2] || (O[2] = ae((b) => E(), ["stop"]))
2889
- }, null, 8, ["variant", "label"])])]);
2890
- };
2891
- }
2892
- }), _a = { class: "flex w-full items-center space-x-8" }, da = { class: "w-24" }, pa = { class: "flex w-full fm-typo-en-body-lg-400 space-x-8 overflow-hidden" }, Ea = { class: "whitespace-nowrap" }, ga = { class: "fm-typo-en-body-lg-600 whitespace-nowrap" }, ya = /* @__PURE__ */ ie({
2893
- __name: "RuleConditionListView",
2894
- props: {
2895
- number: {
2896
- type: Number,
2897
- required: !0
2898
- },
2899
- property: {
2900
- type: String,
2901
- required: !0
2902
- },
2903
- operator: {
2904
- type: String,
2905
- required: !0
2906
- },
2907
- value: {
2908
- type: Array,
2909
- required: !0
2910
- },
2911
- isCatalogLinkItemRuleView: {
2912
- type: Boolean,
2913
- required: !1,
2914
- default: !1
2915
- }
2916
- },
2917
- emits: ["open-catalog-link-item-rule-form", "open-rule-condition-form"],
2918
- setup(e, { emit: t }) {
2919
- const { t: n } = We(), r = {
2920
- $eq: n("menu.rule_groups.condition_view.operator.equals_to"),
2921
- $ne: n("menu.rule_groups.condition_view.operator.not_equals_to"),
2922
- $in: n("menu.rule_groups.condition_view.operator.in"),
2923
- $nin: n("menu.rule_groups.condition_view.operator.not_in"),
2924
- $regex: n("menu.rule_groups.condition_view.operator.matches_regex"),
2925
- $contains: n("menu.rule_groups.condition_view.operator.contains"),
2926
- $startsWith: n("menu.rule_groups.condition_view.operator.starts_with"),
2927
- $endsWith: n("menu.rule_groups.condition_view.operator.ends_with"),
2928
- $gt: n("menu.rule_groups.condition_view.operator.greater_than"),
2929
- $gte: n("menu.rule_groups.condition_view.operator.greater_than_or_equals_to"),
2930
- $lt: n("menu.rule_groups.condition_view.operator.less_than"),
2931
- $lte: n("menu.rule_groups.condition_view.operator.less_than_or_equals_to"),
2932
- $between: n("menu.rule_groups.condition_view.operator.between")
2933
- };
2934
- return (o, a) => {
2935
- const u = pe("FmMenu");
2936
- return x(), Y("div", _a, [
2937
- V("p", da, Z(e.number) + ".", 1),
2938
- V("div", pa, [
2939
- V("p", Ea, Z(e.property), 1),
2940
- V("p", ga, Z(r[e.operator]), 1),
2941
- Q(u, {
2942
- trigger: "hover",
2943
- closeOnMouseLeave: ""
2944
- }, {
2945
- "menu-button": oe(() => [
2946
- V("p", {
2947
- ref: "valueTextRef",
2948
- onClick: a[0] || (a[0] = ae((m) => e.isCatalogLinkItemRuleView ? o.$emit("open-catalog-link-item-rule-form") : o.$emit("open-rule-condition-form"), ["stop"])),
2949
- class: "text-fm-color-primary underline underline-offset-2 cursor-pointer truncate"
2950
- }, Z(e.value.join(", ")), 513)
2951
- ]),
2952
- default: oe(() => [
2953
- (x(!0), Y(de, null, Me(e.value, (m) => (x(), Y("div", {
2954
- key: m,
2955
- class: "flex flex-col px-8 space-y-8"
2956
- }, [
2957
- V("p", null, Z(m), 1)
2958
- ]))), 128))
2959
- ]),
2960
- _: 1
2961
- })
2962
- ])
2963
- ]);
2964
- };
2965
- }
2966
- });
2967
- function ja(e) {
2968
- return jn(e) ? Yn : xn.build(e);
2969
- }
2970
- function Xa(e) {
2971
- return Xn(e) ? null : Kn.build(e);
2972
- }
2973
- const ba = {
2974
- class: "flex items-center gap-24"
2975
- }, va = {
2976
- key: 0,
2977
- class: "fm-typo-en-headline-lg-600"
2978
- }, ha = {
2979
- key: 1,
2980
- class: "fm-typo-en-headline-lg-600"
2981
- }, Ta = {
2982
- class: "flex gap-16 items-center"
2983
- }, Ia = /* @__PURE__ */ ie({
2984
- __name: "RuleForm",
2985
- props: {
2986
- modelValue: {},
2987
- isEditMode: {
2988
- type: Boolean
2989
- }
2990
- },
2991
- emits: ["update:modelValue"],
2992
- setup(e, {
2993
- expose: t,
2994
- emit: n
2995
- }) {
2996
- const {
2997
- t: r
2998
- } = Ge(), o = se(!1), a = (I) => {
2999
- typeof I == "boolean" ? o.value = I : o.value = !o.value;
3000
- }, u = e, m = n;
3001
- t({
3002
- show: o,
3003
- trigger: a
3004
- });
3005
- const c = W(() => {
3006
- var I;
3007
- return ((I = u.modelValue.restaurantRule) == null ? void 0 : I.restaurantAttributes) ?? {};
3008
- }), g = W(() => {
3009
- var I;
3010
- return ((I = u.modelValue.restaurantRule) == null ? void 0 : I.restaurantCustomAttributes) ?? {};
3011
- }), T = W(() => {
3012
- var I;
3013
- return ((I = u.modelValue.itemRule) == null ? void 0 : I.itemAttributes) ?? {};
3014
- }), A = W(() => {
3015
- var I;
3016
- return ((I = u.modelValue.itemRule) == null ? void 0 : I.itemCustomAttributes) ?? {};
3017
- }), E = se([...c.value.rules ?? [], ...g.value.rules ?? [], ...T.value.rules ?? [], ...A.value.rules ?? []]), _ = se([]);
3018
- function O() {
3019
- var p, L, y, f, S, P, B, w;
3020
- const I = u.modelValue, b = [], i = [], v = [], R = [];
3021
- if (_.value.length === 0) {
3022
- a(!1);
3023
- return;
3024
- }
3025
- _.value.forEach((D) => {
3026
- D.property.startsWith("restaurant_attr") ? b.push({
3027
- property: D.property.replace("restaurant_attr_", ""),
3028
- operator: D.operator,
3029
- value: D.value,
3030
- type: D.type
3031
- }) : D.property.startsWith("restaurant_custom") ? i.push({
3032
- property: D.property.replace("restaurant_custom_", ""),
3033
- operator: D.operator,
3034
- value: D.value,
3035
- type: D.type
3036
- }) : D.property.startsWith("item_attr") ? v.push({
3037
- property: D.property.replace("item_attr_", ""),
3038
- operator: D.operator,
3039
- value: D.value,
3040
- type: D.type
3041
- }) : D.property.startsWith("item_custom") && R.push({
3042
- property: D.property.replace("item_custom_", ""),
3043
- operator: D.operator,
3044
- value: D.value,
3045
- type: D.type
3046
- });
3047
- }), I.restaurantRule = {
3048
- restaurantAttributes: {
3049
- logic: ((L = (p = I.restaurantRule) == null ? void 0 : p.restaurantAttributes) == null ? void 0 : L.logic) ?? "AND",
3050
- rules: b
3051
- },
3052
- restaurantCustomAttributes: {
3053
- logic: ((f = (y = I.restaurantRule) == null ? void 0 : y.restaurantCustomAttributes) == null ? void 0 : f.logic) ?? "AND",
3054
- rules: i
3055
- }
3056
- }, I.itemRule = {
3057
- itemAttributes: {
3058
- logic: ((P = (S = I.itemRule) == null ? void 0 : S.itemAttributes) == null ? void 0 : P.logic) ?? "AND",
3059
- rules: v
3060
- },
3061
- itemCustomAttributes: {
3062
- logic: ((w = (B = I.itemRule) == null ? void 0 : B.itemCustomAttributes) == null ? void 0 : w.logic) ?? "AND",
3063
- rules: R
3064
- }
3065
- }, a(!1), m("update:modelValue", {
3066
- menuRule: I
3067
- });
3068
- }
3069
- return (I, b) => {
3070
- const i = pe("FmButton"), v = pe("FmSideSheet");
3071
- return x(), Y(de, null, [Qe(I.$slots, "default", {
3072
- trigger: a
3073
- }), Q(v, {
3074
- modelValue: o.value,
3075
- "onUpdate:modelValue": b[3] || (b[3] = (R) => o.value = R),
3076
- "max-width": 760,
3077
- "close-button": !1,
3078
- "is-container": j(qn).FmForm,
3079
- "is-container-props": {
3080
- onValidationSuccess: O,
3081
- blameFormChildOnValidationFailed: !0
3082
- }
3083
- }, {
3084
- "side-sheet-header": oe(() => [V("div", ba, [Q(i, {
3085
- variant: j(Fe).Tertiary,
3086
- "prepend-icon": "arrow_back",
3087
- onClick: b[0] || (b[0] = ae((R) => a(), ["stop"]))
3088
- }, null, 8, ["variant"]), I.isEditMode && E.value.length > 0 ? (x(), Y("div", va, Z(j(r)("menu.rule_groups.condition_view.edit_condition")), 1)) : (x(), Y("div", ha, Z(j(r)("menu.rule_groups.condition_view.add_condition")), 1))])]),
3089
- "side-sheet-footer": oe(() => [V("div", Ta, [Q(i, {
3090
- variant: "primary",
3091
- label: j(r)("common.save"),
3092
- type: "submit"
3093
- }, null, 8, ["label"]), Q(i, {
3094
- variant: "secondary",
3095
- label: j(r)("common.cancel"),
3096
- onClick: b[2] || (b[2] = ae((R) => a(!1), ["stop"]))
3097
- }, null, 8, ["label"])])]),
3098
- default: oe(() => [Q(fa, {
3099
- class: "p-16",
3100
- "model-value": I.modelValue,
3101
- "onUpdate:modelValue": b[1] || (b[1] = (R) => {
3102
- _.value = R;
3103
- })
3104
- }, null, 8, ["model-value"])]),
3105
- _: 1
3106
- }, 8, ["modelValue", "is-container", "is-container-props"])], 64);
3107
- };
3108
- }
3109
- }), Na = {
3110
- class: "flex items-center justify-between pb-8"
3111
- }, Ra = {
3112
- key: 0,
3113
- class: "text-fm-color-neutral-gray-300"
3114
- }, Aa = {
3115
- class: "flex gap-8"
3116
- }, La = {
3117
- class: "flex flex-col space-y-8"
3118
- }, Oa = {
3119
- class: "fm-typo-en-body-lg-600"
3120
- }, Ca = {
3121
- class: "flex items-center space-x-8"
3122
- }, Sa = {
3123
- class: "w-24"
3124
- }, ka = {
3125
- class: "flex break-all fm-typo-en-body-lg-400 line-clamp-1 space-x-8"
3126
- }, Pa = {
3127
- class: "px-8"
3128
- }, Da = {
3129
- key: 0,
3130
- class: "flex flex-col space-y-8"
3131
- }, wa = {
3132
- class: "fm-typo-en-body-lg-600"
3133
- }, Fa = {
3134
- class: "flex w-full fm-typo-en-body-lg-400 space-x-8 overflow-hidden"
3135
- }, Ma = {
3136
- class: "whitespace-nowrap"
3137
- }, qa = /* @__PURE__ */ ie({
3138
- __name: "RuleView",
3139
- props: {
3140
- modelValue: {
3141
- type: Object,
3142
- required: !0
3143
- },
3144
- title: {
3145
- type: String,
3146
- required: !1
3147
- },
3148
- isCatalogLinkItemRuleView: {
3149
- type: Boolean,
3150
- required: !1,
3151
- default: !1
3152
- },
3153
- ruleGroupNames: {
3154
- type: Array,
3155
- required: !1
3156
- },
3157
- orderFrom: {
3158
- type: String,
3159
- required: !1
3160
- }
3161
- },
3162
- emits: ["update:model-value", "delete-rule", "open-catalog-link-item-rule-form"],
3163
- setup(e, {
3164
- emit: t
3165
- }) {
3166
- const {
3167
- t: n
3168
- } = We(), r = e, o = {
3169
- [bt.enum.ALL]: "ALL",
3170
- [bt.enum.POS_ONLY]: "POS ONLY",
3171
- [bt.enum.NONE]: "NONE"
3172
- }, a = t, u = se(), m = W(() => {
3173
- var E, _;
3174
- return ((_ = (E = r.modelValue.restaurantRule) == null ? void 0 : E.restaurantAttributes) == null ? void 0 : _.rules) ?? [];
3175
- }), c = W(() => {
3176
- var E, _;
3177
- return ((_ = (E = r.modelValue.restaurantRule) == null ? void 0 : E.restaurantCustomAttributes) == null ? void 0 : _.rules) ?? [];
3178
- }), g = W(() => {
3179
- var E, _;
3180
- return ((_ = (E = r.modelValue.itemRule) == null ? void 0 : E.itemAttributes) == null ? void 0 : _.rules) ?? [];
3181
- }), T = W(() => {
3182
- var E, _;
3183
- return ((_ = (E = r.modelValue.itemRule) == null ? void 0 : E.itemCustomAttributes) == null ? void 0 : _.rules) ?? [];
3184
- }), A = W(() => [...m.value.map((E) => ({
3185
- ...E,
3186
- property: `${n("menu.catalog.usage.restaurant")} ${E.property}`
3187
- })), ...c.value.map((E) => ({
3188
- ...E,
3189
- property: `${n("menu.catalog.usage.restaurant")} ${E.property}`
3190
- })), ...g.value.map((E) => ({
3191
- ...E,
3192
- property: `${n("menu.product.title")} ${E.property}`
3193
- })), ...T.value.map((E) => ({
3194
- ...E,
3195
- property: `${n("menu.product.title")} ${E.property}`
3196
- }))]);
3197
- return (E, _) => {
3198
- const O = pe("FmButton"), I = pe("FmMenu");
3199
- return x(), Y(de, null, [V("div", Na, [e.title ? (x(), Y("p", Ra, Z(e.title), 1)) : we("", !0), V("div", Aa, [e.isCatalogLinkItemRuleView ? (x(), Wt(O, {
3200
- key: 1,
3201
- variant: j(Fe).Tertiary,
3202
- class: "cursor-pointer",
3203
- "prepend-icon": "edit",
3204
- "text-color": " text-fm-color-primary",
3205
- onClick: _[1] || (_[1] = ae((b) => e.isCatalogLinkItemRuleView ? E.$emit("open-catalog-link-item-rule-form") : null, ["stop"]))
3206
- }, null, 8, ["variant"])) : (x(), Wt(Ia, {
3207
- key: 0,
3208
- ref_key: "ruleFormRef",
3209
- ref: u,
3210
- "model-value": r.modelValue,
3211
- "is-edit-mode": !0,
3212
- "onUpdate:modelValue": _[0] || (_[0] = (b) => {
3213
- a("update:model-value", b);
3214
- })
3215
- }, {
3216
- default: oe(({
3217
- trigger: b
3218
- }) => [Q(O, {
3219
- variant: j(Fe).Tertiary,
3220
- class: "cursor-pointer",
3221
- "prepend-icon": "edit",
3222
- "text-color": " text-fm-color-primary",
3223
- onClick: ae((i) => b(), ["stop"])
3224
- }, null, 8, ["variant", "onClick"])]),
3225
- _: 1
3226
- }, 8, ["model-value"])), Q(O, {
3227
- variant: j(Fe).Tertiary,
3228
- class: "cursor-pointer",
3229
- "prepend-icon": "delete",
3230
- "text-color": " text-fm-color-typo-error",
3231
- onClick: _[2] || (_[2] = ae(() => a("delete-rule", r.modelValue._id), ["stop"]))
3232
- }, null, 8, ["variant"])])]), V("div", La, [V("p", Oa, Z(j(n)("menu.rule_groups.condition_view.when")), 1), e.ruleGroupNames ? (x(!0), Y(de, {
3233
- key: 0
3234
- }, Me(e.ruleGroupNames, (b, i) => (x(), Y("div", {
3235
- key: b
3236
- }, [V("div", Ca, [V("p", Sa, Z(i + 1) + ".", 1), V("div", ka, [V("p", null, Z(j(n)("menu.rule_groups.condition_view.in_rule_group")), 1), Q(I, {
3237
- trigger: "hover",
3238
- closeOnMouseLeave: ""
3239
- }, {
3240
- "menu-button": oe(() => [V("p", {
3241
- ref_for: !0,
3242
- ref: "valueTextRef",
3243
- onClick: _[3] || (_[3] = ae((v) => e.isCatalogLinkItemRuleView ? E.$emit("open-catalog-link-item-rule-form") : null, ["stop"])),
3244
- class: "text-fm-color-primary underline underline-offset-2 cursor-pointer truncate"
3245
- }, Z(b), 513)]),
3246
- default: oe(() => [V("p", Pa, Z(b), 1)]),
3247
- _: 2
3248
- }, 1024)])])]))), 128)) : we("", !0), (x(!0), Y(de, null, Me(A.value, (b, i) => {
3249
- var v;
3250
- return x(), Y("div", {
3251
- key: b.property
3252
- }, [Q(ya, {
3253
- number: i + (((v = e.ruleGroupNames) == null ? void 0 : v.length) ?? 0) + 1,
3254
- property: b.property,
3255
- operator: b.operator,
3256
- value: b.value,
3257
- isCatalogLinkItemRuleView: e.isCatalogLinkItemRuleView,
3258
- onOpenCatalogLinkItemRuleForm: _[4] || (_[4] = (R) => E.$emit("open-catalog-link-item-rule-form")),
3259
- onOpenRuleConditionForm: _[5] || (_[5] = (R) => {
3260
- var p;
3261
- return (p = u.value) == null ? void 0 : p.trigger();
3262
- })
3263
- }, null, 8, ["number", "property", "operator", "value", "isCatalogLinkItemRuleView"])]);
3264
- }), 128))]), e.orderFrom ? (x(), Y("div", Da, [V("p", wa, Z(j(n)("menu.rule_groups.condition_view.then")), 1), V("div", Fa, [V("p", Ma, Z(j(n)("menu.rule_groups.condition_view.product_availability")), 1), _[7] || (_[7] = V("p", {
3265
- class: "fm-typo-en-body-lg-600 text-fm-color-neutral-gray-300"
3266
- }, "is", -1)), V("p", {
3267
- class: "text-fm-color-primary underline underline-offset-2 cursor-pointer truncate",
3268
- onClick: _[6] || (_[6] = ae((b) => e.isCatalogLinkItemRuleView ? E.$emit("open-catalog-link-item-rule-form") : null, ["stop"]))
3269
- }, Z(o[e.orderFrom]), 1)])])) : we("", !0)], 64);
3270
- };
3271
- }
3272
- });
3273
- export {
3274
- xa as _,
3275
- Jn as a,
3276
- Ya as b,
3277
- qa as c,
3278
- Ia as d,
3279
- Ka as e,
3280
- Xa as f,
3281
- ya as g,
3282
- fa as h,
3283
- ja as m,
3284
- We as u
3285
- };