@feedmepos/mf-menu 0.32.64 → 0.32.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-W8bH6kiT.js → App-rjcnTQzq.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DvHmwIP2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BlX-ygeo.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-2nFIpZv4.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-DTEZouRz.js} +3 -3
- package/dist/{Catalog-pywklogh.js → Catalog-nWzKN1u3.js} +6 -6
- package/dist/{Category-UMDcymDA.js → Category-DoUtDyuB.js} +14 -14
- package/dist/{Category-CLs58F_F.js → Category-Q42BO86t.js} +8 -8
- package/dist/{CookingGuide-Cefv83hr.js → CookingGuide-DGVhn_Yb.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-C9CvjWEO.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Dc_Ec9Pf.js} +1 -1
- package/dist/{Group-Ujeo9noG.js → Group-B9vMDg2m.js} +3 -3
- package/dist/{Group-CfxNpgp7.js → Group-D8st1q0o.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-C-eZ5PGS.js → Group.vue_vue_type_script_setup_true_lang-CV_w5c7T.js} +48 -48
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-qTEz4XWJ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-36kp3qi8.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Kf10i_T2.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-ZbhwNALE.js} +6282 -6280
- package/dist/{Ingredient-CsHbFizZ.js → Ingredient-DWN4vTKf.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-NKoRT-LI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DJrz0wWm.js} +2 -2
- package/dist/{LinkProductSideSheet-B-Trz4a6.js → LinkProductSideSheet-DXmxJs-1.js} +4 -4
- package/dist/{MenuSetting-BNWjJAp4.js → MenuSetting-BSlQXo8m.js} +7 -7
- package/dist/{OrderPacing-DhKmymC7.js → OrderPacing-B8pgEMjf.js} +5 -5
- package/dist/{PrintRoute-DaIY94Ts.js → PrintRoute-agfebph4.js} +5 -5
- package/dist/{Product-SBeMVZBU.js → Product-CaA1CdTN.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CDoJwAFZ.js → Product.vue_vue_type_script_setup_true_lang-Bsx6JceZ.js} +108 -108
- package/dist/{ProductInternalTools-BAHMukHo.js → ProductInternalTools-DHQz_Z8o.js} +25 -25
- package/dist/{Products-CvUK4ngP.js → Products-CeVnRRFO.js} +63 -63
- package/dist/{Publish-BqI8LP_Y.js → Publish-rN34cEkS.js} +4 -4
- package/dist/{Recipe--LCvPofA.js → Recipe-C_qTZ_E1.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DaqG3ZEC.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-C6lkwlc5.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DsCNLIVd.js → RuleView.vue_vue_type_script_setup_true_lang-LbagGtcn.js} +595 -595
- package/dist/{Scheduler-BkXNha9_.js → Scheduler-DeixLUzk.js} +3 -3
- package/dist/{ServingSequence-DvF8yZTp.js → ServingSequence-CAmQBzaK.js} +3 -3
- package/dist/{Setting-dfdQhacG.js → Setting-C_Dl4MiB.js} +5 -5
- package/dist/{Subcategory-DoiEnCY-.js → Subcategory-C8DHzzkd.js} +6 -6
- package/dist/{Takeaway-CfTKoZgq.js → Takeaway-CIRpXPFx.js} +1 -1
- package/dist/{Takeaway-Pyol2JIm.js → Takeaway-CxYihXC0.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-A2Uz3Vx5.js → Takeaway.vue_vue_type_script_setup_true_lang-CcSjxPY4.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BAMLQtFW.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-D-ojP61R.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-Bx6Dfb9q.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BztGh7n9.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Bex1NCnU.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Cv4iVhML.js} +341 -340
- package/dist/{Unit-ODy76xeS.js → Unit-Cd0y2m5k.js} +2 -2
- package/dist/{Variant-BFUqQyub.js → Variant-B2CKhSOl.js} +3 -3
- package/dist/{_id_-DQO6Zi8b.js → _id_-DZiXY0H3.js} +10 -10
- package/dist/{app-BNF3d7ks.js → app-T7VNSy7v.js} +1 -1
- package/dist/{app-BNqI06Lw.js → app-T8AXgSEa.js} +32 -32
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +18 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{override-menu-BCrsilnp.js → linked-status-CCYZRm4Q.js} +3 -3
- package/dist/assets/{menu-export-oSHHIKfH.js → menu-export-CAHQqTea.js} +34 -34
- package/dist/assets/{linked-status-OJYsf1K1.js → override-menu-CHSXJZzL.js} +3 -3
- package/dist/assets/{validate-menu-CoDW8e4r.js → validate-menu-B4fZvuxj.js} +2 -2
- package/dist/{catalog-BiUOGVhu.js → catalog-JKO0yOoK.js} +1 -1
- package/dist/{catalogSetting-Dt03eB79.js → catalogSetting-88ecNK3c.js} +1 -1
- package/dist/{currency-I2Plgz6g.js → currency-FtZ1Kndg.js} +1 -1
- package/dist/{dayjs.min-CVgq1MI5.js → dayjs.min-4vLGgFCE.js} +2 -2
- package/dist/{discardConfirm-CU5H7XLz.js → discardConfirm-CM6g-V_v.js} +1 -1
- package/dist/{index-OUaL4kl7.js → index-BRKz6YXB.js} +5 -5
- package/dist/{index-D79td5bo.js → index-DJLvriHh.js} +6 -6
- package/dist/index-wiJWDZ8Q.js +310 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js → index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js} +895 -895
- package/dist/{item-BPryyFAB.js → item-DZ7QwbXg.js} +1262 -1338
- package/dist/{jszip.min-D3CS7h7J.js → jszip.min-CMMOVzck.js} +167 -167
- package/dist/{linkProducts-ClCfYWFx.js → linkProducts-H4GRfufL.js} +4 -4
- package/dist/{memberPricing-CLr-Y_7e.js → memberPricing-DHWy5fqz.js} +1 -1
- package/dist/{menu-gBc-za7C.js → menu-CIm-Royr.js} +1 -1
- package/dist/{menuV2-D7O1K9Ej.js → menuV2-BAdmIxrF.js} +52 -52
- package/dist/{order_pacing-DVn2Kb9a.js → order_pacing-D58D3fak.js} +5 -5
- package/dist/{priceTier-33L1xIZW.js → priceTier-BQ8NefKy.js} +1 -1
- package/dist/{rules-C7ujXDzl.js → rules-CCMx9A-T.js} +3 -3
- package/dist/{scheduler-Dzj2Ed1a.js → scheduler-CV0r5tCc.js} +5 -5
- package/dist/{toExcel-CGOr53pl.js → toExcel-D4fh3tgH.js} +2 -2
- package/dist/{unit-CfREeFuX.js → unit-p_16wmg2.js} +3 -3
- package/package.json +1 -1
- package/dist/index-CD_omf3p.js +0 -222
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed as m } from "vue";
|
|
2
|
-
import { F, g as h, h as S, b as v, i as C, k as N, T, u as P, c as z } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { u as R } from "./menuV2-
|
|
4
|
-
import { C as w, h as E } from "./catalog-
|
|
2
|
+
import { F, g as h, h as S, b as v, i as C, k as N, T, u as P, c as z } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
3
|
+
import { u as R } from "./menuV2-BAdmIxrF.js";
|
|
4
|
+
import { C as w, h as E } from "./catalog-JKO0yOoK.js";
|
|
5
5
|
import { useSnackbar as O, useDialog as A } from "@feedmepos/ui-library";
|
|
6
|
-
import { a as b } from "./LinkProductSideSheet-
|
|
6
|
+
import { a as b } from "./LinkProductSideSheet-DXmxJs-1.js";
|
|
7
7
|
function D() {
|
|
8
8
|
const e = R(), p = m(() => e.categorizedRawMenuItems.filter((o) => o.items.length > 0)), l = m(() => {
|
|
9
9
|
const o = e.currentCatalog;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as d, ref as _, watch as S, resolveComponent as b, createBlock as f, openBlock as y, unref as M, computed as T } from "vue";
|
|
2
|
-
import { u as h, b as w } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as h, b as w } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
3
3
|
import { useI18n as l } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as x, useDialog as C, useSnackbar as P } from "@feedmepos/ui-library";
|
|
5
5
|
const k = /* @__PURE__ */ d({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as n, onMounted as d, onBeforeUnmount as m } from "vue";
|
|
2
|
-
import { u as c } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as c } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
3
3
|
import "@feedmepos/mf-common";
|
|
4
4
|
import "@feedmepos/ui-library";
|
|
5
5
|
function p() {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ne = (e, t, n) =>
|
|
4
|
-
import { l as ae } from "./discardConfirm-
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { shallowRef as N, ref as
|
|
7
|
-
import { d as
|
|
1
|
+
var Le = Object.defineProperty;
|
|
2
|
+
var We = (e, t, n) => t in e ? Le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ne = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { l as ae } from "./discardConfirm-CM6g-V_v.js";
|
|
5
|
+
import { defineStore as ze } from "pinia";
|
|
6
|
+
import { shallowRef as N, ref as H, computed as S, shallowReactive as qe, effectScope as He, watch as Be } from "vue";
|
|
7
|
+
import { d as A, f as ue, m as T, k as ie, ak as re, g as B, O as x, c as W, s as V, X as oe, al as Ge, am as Je, a as Ye, Q as Qe, an as Xe, ao as Ze, M as et } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
8
8
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
9
9
|
import { useSnackbar as tt } from "@feedmepos/ui-library";
|
|
10
10
|
function nt(e) {
|
|
11
11
|
var s, r, u;
|
|
12
|
-
const t =
|
|
12
|
+
const t = A(e), n = (s = t.variant) == null ? void 0 : s.variantCombinations;
|
|
13
13
|
if (t.images !== void 0) {
|
|
14
14
|
const c = ((r = t.images) == null ? void 0 : r.find((a) => a.isDefault)) ?? ((u = t.images) == null ? void 0 : u[0]);
|
|
15
15
|
t.image = (c == null ? void 0 : c._id) ?? null;
|
|
16
16
|
}
|
|
17
17
|
return delete t.variant, delete t.thumbnail, delete t.images, [t, ...n || []];
|
|
18
18
|
}
|
|
19
|
-
const rt = "/assets/linked-status-
|
|
19
|
+
const rt = "/assets/linked-status-CCYZRm4Q.js", ot = "/assets/override-menu-CHSXJZzL.js";
|
|
20
20
|
function st(e, t, n, s) {
|
|
21
|
-
const r =
|
|
21
|
+
const r = A(t), u = n ? r.modules.catalog.find((f) => f._id === n) : null, c = s ? r.modules.scheduler.find((f) => f._id === s) : null, a = u ? A(u) : void 0, d = n ? r.modules.catalog.filter((f) => f._id !== n) : [], l = c ? A(c) : void 0, g = e.reduce((f, v) => (f[v._id] = nt(v), f), {});
|
|
22
22
|
function y(f = []) {
|
|
23
23
|
const v = e.map((p) => p._id);
|
|
24
24
|
return [
|
|
@@ -158,7 +158,7 @@ function ut(e, t) {
|
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
async function Vt(e, t, n, s, r, u = !0) {
|
|
161
|
-
const c =
|
|
161
|
+
const c = A(n), a = u ? st(t, c, s, r) : c, d = t.reduce((y, f) => (y[f._id] = a.modules.item.find((v) => v._id === f._id), y), {}), l = t.reduce((y, f) => {
|
|
162
162
|
const v = f._id;
|
|
163
163
|
return y[v] = at(d[v], e), y;
|
|
164
164
|
}, {}), g = T.getFallbackPrices({
|
|
@@ -188,11 +188,11 @@ function Tt(e, t) {
|
|
|
188
188
|
return r;
|
|
189
189
|
}, [])) || []).join(" / ");
|
|
190
190
|
}
|
|
191
|
-
const
|
|
191
|
+
const z = /* @__PURE__ */ new Map();
|
|
192
192
|
async function Kt(e, t) {
|
|
193
193
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
194
|
-
if (
|
|
195
|
-
return
|
|
194
|
+
if (z.has(n))
|
|
195
|
+
return z.get(n);
|
|
196
196
|
const s = await ue(
|
|
197
197
|
rt,
|
|
198
198
|
JSON.stringify({
|
|
@@ -200,7 +200,7 @@ async function Kt(e, t) {
|
|
|
200
200
|
itemId: t
|
|
201
201
|
})
|
|
202
202
|
);
|
|
203
|
-
return
|
|
203
|
+
return z.set(n, s), s;
|
|
204
204
|
}
|
|
205
205
|
async function ce(e, t, n) {
|
|
206
206
|
return await ue(ot, {
|
|
@@ -209,18 +209,18 @@ async function ce(e, t, n) {
|
|
|
209
209
|
schedulerId: n
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
|
-
const
|
|
212
|
+
const q = /* @__PURE__ */ new Map();
|
|
213
213
|
async function it(e, t, n) {
|
|
214
214
|
const s = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
|
|
215
|
-
if (
|
|
216
|
-
return
|
|
215
|
+
if (q.has(s))
|
|
216
|
+
return q.get(s);
|
|
217
217
|
const r = await ce(e, t, n);
|
|
218
|
-
return
|
|
218
|
+
return q.set(s, r), r;
|
|
219
219
|
}
|
|
220
220
|
async function Pt(e, t, n) {
|
|
221
221
|
var c, a;
|
|
222
222
|
const s = await it(e, t, null), r = [], u = (d, l) => {
|
|
223
|
-
const g =
|
|
223
|
+
const g = A(d);
|
|
224
224
|
for (const y in l)
|
|
225
225
|
l[y] && (g[y] = l[y]);
|
|
226
226
|
return g;
|
|
@@ -541,22 +541,22 @@ function bt({
|
|
|
541
541
|
includeValueOnMove: !1
|
|
542
542
|
},
|
|
543
543
|
cloneDiffValues: !1
|
|
544
|
-
}), n = N(null), s = N([]), r =
|
|
544
|
+
}), n = N(null), s = N([]), r = H(-1), u = N(null), c = S(() => r.value > 0), a = S(() => r.value < s.value.length - 1);
|
|
545
545
|
function d(v) {
|
|
546
546
|
if (n.value === null) {
|
|
547
|
-
n.value =
|
|
547
|
+
n.value = A(v), u.value = A(v), s.value = [{ delta: null }], r.value = 0;
|
|
548
548
|
return;
|
|
549
549
|
}
|
|
550
550
|
const p = t.diff(u.value, v);
|
|
551
|
-
if (r.value < s.value.length - 1 && (s.value = s.value.slice(0, r.value + 1)), s.value.push({ delta: p }), r.value++, u.value =
|
|
551
|
+
if (r.value < s.value.length - 1 && (s.value = s.value.slice(0, r.value + 1)), s.value.push({ delta: p }), r.value++, u.value = A(v), s.value.length > e) {
|
|
552
552
|
const b = s.value[1].delta;
|
|
553
|
-
b && n.value && (n.value = t.patch(
|
|
553
|
+
b && n.value && (n.value = t.patch(A(n.value), b)), s.value.shift(), r.value--;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
function l(v) {
|
|
557
557
|
if (!n.value || v < 0 || v >= s.value.length)
|
|
558
558
|
return;
|
|
559
|
-
let p =
|
|
559
|
+
let p = A(n.value);
|
|
560
560
|
for (let b = 1; b <= v; b++) {
|
|
561
561
|
const M = s.value[b];
|
|
562
562
|
M.delta && (p = t.patch(p, M.delta));
|
|
@@ -567,14 +567,14 @@ function bt({
|
|
|
567
567
|
if (c.value) {
|
|
568
568
|
r.value--;
|
|
569
569
|
const v = l(r.value);
|
|
570
|
-
return v && (u.value =
|
|
570
|
+
return v && (u.value = A(v)), v;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
function y() {
|
|
574
574
|
if (a.value) {
|
|
575
575
|
r.value++;
|
|
576
576
|
const v = l(r.value);
|
|
577
|
-
return v && (u.value =
|
|
577
|
+
return v && (u.value = A(v)), v;
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
function f() {
|
|
@@ -591,7 +591,7 @@ function bt({
|
|
|
591
591
|
}
|
|
592
592
|
const Mt = {
|
|
593
593
|
async updateMenuModule(e, t) {
|
|
594
|
-
const n =
|
|
594
|
+
const n = B.RequestRunner.operation(t, e.modules);
|
|
595
595
|
if (n.validateError.length > 0)
|
|
596
596
|
throw new Error(n.validateError.join(`
|
|
597
597
|
`));
|
|
@@ -639,15 +639,15 @@ function wt() {
|
|
|
639
639
|
}
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
|
-
const $t =
|
|
642
|
+
const $t = ze(
|
|
643
643
|
"mf-menu-store-v2",
|
|
644
644
|
() => {
|
|
645
|
-
const e =
|
|
645
|
+
const e = qe(wt()), t = se(), n = tt(), s = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
|
|
646
646
|
selector: "position"
|
|
647
647
|
}) : []), r = S(() => {
|
|
648
648
|
var o;
|
|
649
|
-
return ((o = t.currentBusiness.value) == null ? void 0 : o.menuVersion) ||
|
|
650
|
-
}), u = S(() => r.value ===
|
|
649
|
+
return ((o = t.currentBusiness.value) == null ? void 0 : o.menuVersion) || W.F_MENU_VERSION.v3;
|
|
650
|
+
}), u = S(() => r.value === W.F_MENU_VERSION.v4), c = S(() => {
|
|
651
651
|
const o = e.menu.modules.catalog;
|
|
652
652
|
return x(o, { selector: "name" });
|
|
653
653
|
}), a = S(() => {
|
|
@@ -667,7 +667,7 @@ const $t = qe(
|
|
|
667
667
|
function g(o, i = !0) {
|
|
668
668
|
e.menu = { ...o, _rev: e.menu._rev }, i && D.push(e.menu);
|
|
669
669
|
}
|
|
670
|
-
const y = N(me()), f =
|
|
670
|
+
const y = N(me()), f = H(!1), v = H(1);
|
|
671
671
|
async function p() {
|
|
672
672
|
var m;
|
|
673
673
|
f.value = !0;
|
|
@@ -697,15 +697,15 @@ const $t = qe(
|
|
|
697
697
|
(R) => R._id === e.currentCatalogId
|
|
698
698
|
), _ = h ? h.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
|
|
699
699
|
(R) => R._id === e.currentSchedulerId
|
|
700
|
-
),
|
|
701
|
-
i.modules.item = i.modules.item.filter((R) =>
|
|
700
|
+
), C = new Set(((_ == null ? void 0 : _.items) || []).map((R) => R._id));
|
|
701
|
+
i.modules.item = i.modules.item.filter((R) => C.has(R._id));
|
|
702
702
|
}
|
|
703
703
|
return y.value = i, f.value = !1, v.value = v.value + 1, i;
|
|
704
704
|
}
|
|
705
705
|
const M = ae.debounce(p, 200);
|
|
706
706
|
let I = null, k = null;
|
|
707
707
|
function X() {
|
|
708
|
-
k && (k(), k = null), I && I.stop(), I =
|
|
708
|
+
k && (k(), k = null), I && I.stop(), I = He(!0), k = I.run(() => Be(
|
|
709
709
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
710
710
|
() => {
|
|
711
711
|
f.value || M();
|
|
@@ -743,8 +743,8 @@ const $t = qe(
|
|
|
743
743
|
if (a.value) {
|
|
744
744
|
const m = (i = a.value) == null ? void 0 : i.override.items;
|
|
745
745
|
o = o.filter((h) => {
|
|
746
|
-
var
|
|
747
|
-
const _ = (
|
|
746
|
+
var C;
|
|
747
|
+
const _ = (C = m == null ? void 0 : m[h._id]) == null ? void 0 : C.find(
|
|
748
748
|
(R) => !R.combinationKey
|
|
749
749
|
);
|
|
750
750
|
return (_ == null ? void 0 : _.orderFrom) !== ie.enum.NONE;
|
|
@@ -753,13 +753,13 @@ const $t = qe(
|
|
|
753
753
|
return V(o, (m) => m.code || m.name);
|
|
754
754
|
}), ye = S(() => {
|
|
755
755
|
const o = e.menu.modules.category, i = V(o, (h) => h.name).reduce(
|
|
756
|
-
(h, _,
|
|
756
|
+
(h, _, C) => (h[_._id] = C, h),
|
|
757
757
|
{ "": 0 }
|
|
758
758
|
), m = e.menu.modules.item;
|
|
759
759
|
return V(
|
|
760
760
|
m,
|
|
761
761
|
(h) => h.code || h.name
|
|
762
|
-
).reduce((h, _,
|
|
762
|
+
).reduce((h, _, C) => (h[_._id] = C + i[_.category || ""], h), {});
|
|
763
763
|
}), ge = S(() => oe(j.value, Z.value, ee.value)), pe = S(() => {
|
|
764
764
|
const o = U.value.item.addon ? [
|
|
765
765
|
{
|
|
@@ -786,7 +786,7 @@ const $t = qe(
|
|
|
786
786
|
selector: "name"
|
|
787
787
|
})), Me = S(() => x(e.menu.modules.unit, { selector: "name" })), we = S(() => x(Ge(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
788
788
|
selector: "name"
|
|
789
|
-
})),
|
|
789
|
+
})), Ce = S(() => e.menu.modules.cookingGuide), Ae = S(() => {
|
|
790
790
|
const o = Je(e.menu.modules.sku);
|
|
791
791
|
return x(o, { selector: "code" });
|
|
792
792
|
}), Ie = S(() => {
|
|
@@ -798,7 +798,7 @@ const $t = qe(
|
|
|
798
798
|
});
|
|
799
799
|
}), o;
|
|
800
800
|
}), U = S(() => {
|
|
801
|
-
const o = !e.currentCatalogId, i = r.value ===
|
|
801
|
+
const o = !e.currentCatalogId, i = r.value === W.F_MENU_VERSION.v4, m = !e.currentSchedulerId, h = {
|
|
802
802
|
create: o && m,
|
|
803
803
|
edit: o && m,
|
|
804
804
|
delete: o && m
|
|
@@ -871,7 +871,7 @@ const $t = qe(
|
|
|
871
871
|
}
|
|
872
872
|
};
|
|
873
873
|
});
|
|
874
|
-
function
|
|
874
|
+
function L(o) {
|
|
875
875
|
return `${o.systemCode}/${o.taxCode}`;
|
|
876
876
|
}
|
|
877
877
|
function ke(o) {
|
|
@@ -879,7 +879,7 @@ const $t = qe(
|
|
|
879
879
|
return { systemCode: i, taxCode: m };
|
|
880
880
|
}
|
|
881
881
|
function Ee(o, i, m) {
|
|
882
|
-
return (o ?? i ?? []).map((h) =>
|
|
882
|
+
return (o ?? i ?? []).map((h) => L(h)).find((h) => m.some((_) => _.value === h));
|
|
883
883
|
}
|
|
884
884
|
const Re = S(() => {
|
|
885
885
|
var h;
|
|
@@ -887,12 +887,12 @@ const $t = qe(
|
|
|
887
887
|
se().currentCountry.value
|
|
888
888
|
), m = i.filter((_) => u.value || !o.includes(_.taxCode)).map((_) => ({
|
|
889
889
|
label: `${_.name} (${Qe(_.rate)}%)`,
|
|
890
|
-
value:
|
|
890
|
+
value: L(_),
|
|
891
891
|
meta: {
|
|
892
892
|
rate: _.rate
|
|
893
893
|
}
|
|
894
894
|
}));
|
|
895
|
-
return m.sort((_,
|
|
895
|
+
return m.sort((_, C) => _.label.localeCompare(C.label, void 0, { numeric: !0 })), {
|
|
896
896
|
systemCode: (h = i[0]) == null ? void 0 : h.systemCode,
|
|
897
897
|
countryTaxOptions: m
|
|
898
898
|
};
|
|
@@ -928,10 +928,10 @@ const $t = qe(
|
|
|
928
928
|
}));
|
|
929
929
|
try {
|
|
930
930
|
if (i || h.some(
|
|
931
|
-
(
|
|
931
|
+
(C) => [B.F_OPERATION_TYPE.delete, B.F_OPERATION_TYPE.deleteMany].includes(C.operation)
|
|
932
932
|
)) {
|
|
933
|
-
const
|
|
934
|
-
if (
|
|
933
|
+
const C = await Xe(h, e.menu.modules);
|
|
934
|
+
if (C !== !0) throw new Error(C);
|
|
935
935
|
}
|
|
936
936
|
const _ = await Mt.updateMenuModule(e.menu, h);
|
|
937
937
|
return g(_.menu), _;
|
|
@@ -988,8 +988,8 @@ const $t = qe(
|
|
|
988
988
|
printDepartments: be,
|
|
989
989
|
units: Me,
|
|
990
990
|
recipes: we,
|
|
991
|
-
cookingGuide:
|
|
992
|
-
skus:
|
|
991
|
+
cookingGuide: Ce,
|
|
992
|
+
skus: Ae,
|
|
993
993
|
rules: U,
|
|
994
994
|
taxSetting: Re,
|
|
995
995
|
// Action
|
|
@@ -1004,7 +1004,7 @@ const $t = qe(
|
|
|
1004
1004
|
updateMenuSetting: Pe,
|
|
1005
1005
|
computeMergedMenu: p,
|
|
1006
1006
|
// helper
|
|
1007
|
-
encodeTax:
|
|
1007
|
+
encodeTax: L,
|
|
1008
1008
|
decodeTax: ke,
|
|
1009
1009
|
getSelectedTax: Ee,
|
|
1010
1010
|
mapVariant: he,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as q, ref as V, h as S, computed as N, resolveComponent as I, createBlock as X, openBlock as w, unref as l, withCtx as x, createElementVNode as k, createVNode as v, watch as Z, createElementBlock as L, Fragment as M, renderSlot as ee, renderList as H, toDisplayString as $, createCommentVNode as ae, getCurrentInstance as te, render as ne } from "vue";
|
|
2
|
-
import { u as Y, i as oe, b as le, g as B, h as K } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as Y, i as oe, b as le, g as B, h as K } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
3
3
|
import { useI18n as R } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as A, FmButtonVariant as re, FmButtonColorThemeVariant as j, useSnackbar as ie } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as J, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as J, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-LbagGtcn.js";
|
|
6
6
|
import { c as de } from "./object-DVUNCr7w.js";
|
|
7
|
-
import { _ as ue } from "./app-
|
|
8
|
-
import { L as ce } from "./LinkProductSideSheet-
|
|
7
|
+
import { _ as ue } from "./app-T8AXgSEa.js";
|
|
8
|
+
import { L as ce } from "./LinkProductSideSheet-DXmxJs-1.js";
|
|
9
9
|
import { u as me } from "./search-BAPEUu1R.js";
|
|
10
|
-
import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BztGh7n9.js";
|
|
11
11
|
import { c as ge } from "./check-C9mY6LiX.js";
|
|
12
12
|
import { g as G } from "./translation-fNx6yEpy.js";
|
|
13
13
|
import { c as _e } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
|
|
2
2
|
import { useI18n as m } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as k, b as M } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as k, b as M } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
5
5
|
const b = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as I, watch as P, ref as E, computed as w, resolveComponent as _, createElementBlock as h, openBlock as F, Fragment as M, createVNode as f, unref as g, withCtx as b, createElementVNode as O, renderList as q, toDisplayString as S } from "vue";
|
|
2
|
-
import { g as v, h as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { g as v, h as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
3
3
|
import { useI18n as D } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as k } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as R } from "./menuV2-
|
|
6
|
-
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as R } from "./menuV2-BAdmIxrF.js";
|
|
6
|
+
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BztGh7n9.js";
|
|
7
7
|
import { g as N } from "./translation-fNx6yEpy.js";
|
|
8
8
|
const B = { class: "py-12 px-16 space-y-4" }, U = /* @__PURE__ */ I({
|
|
9
9
|
__name: "AddSubcategoryDialogContentComponent",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as re, computed as N, resolveComponent as v, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as V, unref as n, toDisplayString as O, createElementVNode as _, withCtx as p, Fragment as R, renderList as I, createBlock as q, ref as B, Transition as de, createTextVNode as fe } from "vue";
|
|
2
|
-
import { u as ye, l as _e } from "./discardConfirm-
|
|
3
|
-
import { d as w, z as $, u as he, F as ge, A as L, g as se, h as ie, P as ce } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as ye, l as _e } from "./discardConfirm-CM6g-V_v.js";
|
|
3
|
+
import { d as w, z as $, u as he, F as ge, A as L, g as se, h as ie, P as ce } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
4
4
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
5
5
|
import { components as Ve } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as ke } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
|
-
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as Fe } from "./menu-
|
|
9
|
-
import { L as be } from "./LinkProductSideSheet-
|
|
7
|
+
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-LbagGtcn.js";
|
|
8
|
+
import { u as Fe } from "./menu-CIm-Royr.js";
|
|
9
|
+
import { L as be } from "./LinkProductSideSheet-DXmxJs-1.js";
|
|
10
10
|
const xe = { class: "space-y-8" }, Ce = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "space-y-16"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./discardConfirm-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-ZbhwNALE.js";
|
|
2
|
+
import "./discardConfirm-CM6g-V_v.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineStore as H } from "pinia";
|
|
2
2
|
import { defineComponent as M, computed as x, ref as A, watch as S, resolveComponent as V, createBlock as J, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as C, toDisplayString as k, unref as l, Fragment as N, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { D as O, E as te, B as P, d as E, i as $, b as j, m as h, C as ne, g as T, h as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { D as O, E as te, B as P, d as E, i as $, b as j, m as h, C as ne, g as T, h as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
|
|
4
4
|
import { useI18n as q } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as I, components as ae, useDialog as le, FmButtonVariant as ue } from "@feedmepos/ui-library";
|
|
6
|
-
import { u as ie, l as se } from "./discardConfirm-
|
|
6
|
+
import { u as ie, l as se } from "./discardConfirm-CM6g-V_v.js";
|
|
7
7
|
import { c as re } from "./check-C9mY6LiX.js";
|
|
8
8
|
import "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
9
|
-
import "./menuV2-
|
|
9
|
+
import "./menuV2-BAdmIxrF.js";
|
|
10
10
|
import "./app-5fxKLAzS.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
package/package.json
CHANGED
package/dist/index-CD_omf3p.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { defineComponent as v, resolveComponent as p, createBlock as m, openBlock as i, Teleport as k, createVNode as y, Transition as A, withCtx as g, createCommentVNode as b, withKeys as I, normalizeStyle as P, normalizeClass as f, createElementVNode as h, renderSlot as S, createElementBlock as x, toDisplayString as $, Fragment as z, renderList as N, computed as d, unref as U, ref as C } from "vue";
|
|
2
|
-
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
import { useI18n as F } from "@feedmepos/mf-common";
|
|
4
|
-
const V = {
|
|
5
|
-
class: /* @__PURE__ */ f([
|
|
6
|
-
"flex items-center",
|
|
7
|
-
"px-24 pt-16 pb-8",
|
|
8
|
-
"border-b border-fm-color-neutral-gray-100",
|
|
9
|
-
"space-x-4"
|
|
10
|
-
])
|
|
11
|
-
}, j = { class: "fm-typo-en-title-sm-600 mr-auto" }, D = {
|
|
12
|
-
class: /* @__PURE__ */ f(["flex flex-col", "flex-1 overflow-scroll", "w-full", "px-24"])
|
|
13
|
-
}, X = /* @__PURE__ */ v({
|
|
14
|
-
__name: "FullScreenForm",
|
|
15
|
-
props: {
|
|
16
|
-
show: { type: Boolean },
|
|
17
|
-
title: {},
|
|
18
|
-
primaryAction: {},
|
|
19
|
-
secondaryActions: {},
|
|
20
|
-
zIndex: { default: 50 }
|
|
21
|
-
},
|
|
22
|
-
emits: ["onPrimary", "onCancel"],
|
|
23
|
-
setup(r, { emit: e }) {
|
|
24
|
-
const n = e, l = () => {
|
|
25
|
-
n("onPrimary");
|
|
26
|
-
}, s = () => {
|
|
27
|
-
n("onCancel");
|
|
28
|
-
};
|
|
29
|
-
return (t, a) => {
|
|
30
|
-
const c = p("fm-button"), o = p("fm-form");
|
|
31
|
-
return i(), m(k, { to: "body" }, [
|
|
32
|
-
y(A, { name: "fade" }, {
|
|
33
|
-
default: g(() => [
|
|
34
|
-
t.show ? (i(), m(o, {
|
|
35
|
-
key: 0,
|
|
36
|
-
"blame-form-child-on-validation-failed": "",
|
|
37
|
-
class: f(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
|
|
38
|
-
style: P({ zIndex: t.zIndex }),
|
|
39
|
-
tabindex: "-1",
|
|
40
|
-
onValidationSuccess: l,
|
|
41
|
-
onKeyup: I(s, ["esc"])
|
|
42
|
-
}, {
|
|
43
|
-
default: g(() => [
|
|
44
|
-
h("div", V, [
|
|
45
|
-
h("p", j, $(t.title), 1),
|
|
46
|
-
S(t.$slots, "append-title", {}, void 0, !0),
|
|
47
|
-
(i(!0), x(z, null, N(t.secondaryActions, (u) => (i(), m(c, {
|
|
48
|
-
label: u.label,
|
|
49
|
-
variant: "tertiary",
|
|
50
|
-
onClick: u.click
|
|
51
|
-
}, null, 8, ["label", "onClick"]))), 256)),
|
|
52
|
-
y(c, {
|
|
53
|
-
label: t.primaryAction.label,
|
|
54
|
-
type: "submit",
|
|
55
|
-
variant: "primary"
|
|
56
|
-
}, null, 8, ["label"])
|
|
57
|
-
]),
|
|
58
|
-
h("div", D, [
|
|
59
|
-
S(t.$slots, "default", {}, void 0, !0)
|
|
60
|
-
])
|
|
61
|
-
]),
|
|
62
|
-
_: 3
|
|
63
|
-
}, 8, ["style"])) : b("", !0)
|
|
64
|
-
]),
|
|
65
|
-
_: 3
|
|
66
|
-
})
|
|
67
|
-
]);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}), ne = /* @__PURE__ */ B(X, [["__scopeId", "data-v-5b5c7179"]]), le = /* @__PURE__ */ v({
|
|
71
|
-
__name: "PriceTierNotice",
|
|
72
|
-
props: {
|
|
73
|
-
menuStore: {}
|
|
74
|
-
},
|
|
75
|
-
setup(r) {
|
|
76
|
-
const e = r, n = d(() => {
|
|
77
|
-
var t, a;
|
|
78
|
-
return ((t = e.menuStore.currentCatalog) == null ? void 0 : t.priceTierRules) ?? ((a = e.menuStore.currentCatalog) == null ? void 0 : a.usePriceTiers) ?? [];
|
|
79
|
-
}), l = d(() => {
|
|
80
|
-
var t;
|
|
81
|
-
return e.menuStore.isV4 && e.menuStore.currentCatalog && !e.menuStore.currentScheduler && ((t = n.value) == null ? void 0 : t.length) > 0;
|
|
82
|
-
}), { t: s } = F();
|
|
83
|
-
return (t, a) => {
|
|
84
|
-
var o;
|
|
85
|
-
const c = p("FmSnackbar");
|
|
86
|
-
return l.value ? (i(), m(c, {
|
|
87
|
-
key: 0,
|
|
88
|
-
"z-index": 0,
|
|
89
|
-
class: "!max-w-full",
|
|
90
|
-
title: U(s)("menu.price_tier.price_group_description", { group: (o = n.value) == null ? void 0 : o.join(", ") })
|
|
91
|
-
}, null, 8, ["title"])) : b("", !0);
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}), K = ["alt", "src", "crossorigin"], se = /* @__PURE__ */ v({
|
|
95
|
-
__name: "Thumbnail",
|
|
96
|
-
props: {
|
|
97
|
-
src: {},
|
|
98
|
-
alt: {},
|
|
99
|
-
className: {},
|
|
100
|
-
size: {},
|
|
101
|
-
crossorigin: { type: Boolean, default: !0 }
|
|
102
|
-
},
|
|
103
|
-
setup(r) {
|
|
104
|
-
const e = r, { t: n } = F(), l = C(!1), s = C(!e.src), t = () => {
|
|
105
|
-
l.value = !1, s.value = !0;
|
|
106
|
-
}, a = () => {
|
|
107
|
-
l.value = !0, s.value = !0;
|
|
108
|
-
}, c = d(() => e.alt ? n("menu.thumbnail.alt.with_name", { name: e.alt }) : n("menu.thumbnail.alt.default")), o = d(() => typeof e.size == "number" ? {
|
|
109
|
-
width: e.size,
|
|
110
|
-
height: e.size
|
|
111
|
-
} : {
|
|
112
|
-
width: e.size.width,
|
|
113
|
-
height: e.size.height
|
|
114
|
-
}), u = d(() => {
|
|
115
|
-
if (!e.src) return null;
|
|
116
|
-
if (e.crossorigin) {
|
|
117
|
-
const _ = e.src.includes("?") ? "&" : "?";
|
|
118
|
-
return `${e.src}${_}_cors=${Date.now()}`;
|
|
119
|
-
}
|
|
120
|
-
return e.src;
|
|
121
|
-
});
|
|
122
|
-
return (_, Z) => {
|
|
123
|
-
const w = p("fm-icon"), R = p("fm-card");
|
|
124
|
-
return i(), x("div", {
|
|
125
|
-
class: f([_.className, "flex items-center justify-center"])
|
|
126
|
-
}, [
|
|
127
|
-
y(R, {
|
|
128
|
-
class: f(["flex items-center justify-center", "rounded-md"]),
|
|
129
|
-
style: P({ width: `${o.value.width}px`, height: `${o.value.height}px` }),
|
|
130
|
-
variant: "outlined"
|
|
131
|
-
}, {
|
|
132
|
-
default: g(() => [
|
|
133
|
-
u.value && !l.value ? (i(), x("img", {
|
|
134
|
-
key: u.value,
|
|
135
|
-
alt: c.value,
|
|
136
|
-
class: f(["w-full h-full", "object-cover", s.value ? "" : "hidden"]),
|
|
137
|
-
src: u.value,
|
|
138
|
-
crossorigin: e.crossorigin ? "anonymous" : void 0,
|
|
139
|
-
onError: a,
|
|
140
|
-
onLoad: t
|
|
141
|
-
}, null, 42, K)) : (i(), m(w, {
|
|
142
|
-
key: 1,
|
|
143
|
-
color: "neutral-gray-300",
|
|
144
|
-
name: "image",
|
|
145
|
-
outline: ""
|
|
146
|
-
})),
|
|
147
|
-
s.value ? b("", !0) : (i(), m(w, {
|
|
148
|
-
key: 2,
|
|
149
|
-
class: "animate-spin",
|
|
150
|
-
name: "progress_activity",
|
|
151
|
-
spin: ""
|
|
152
|
-
}))
|
|
153
|
-
]),
|
|
154
|
-
_: 1
|
|
155
|
-
}, 8, ["style"])
|
|
156
|
-
], 2);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
}), G = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), H = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), M = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), O = /[^\p{L}\d]+/giu, L = "$1\0$2", E = "";
|
|
160
|
-
function T(r) {
|
|
161
|
-
let e = r.trim();
|
|
162
|
-
e = e.replace(G, L).replace(H, L), e = e.replace(O, "\0");
|
|
163
|
-
let n = 0, l = e.length;
|
|
164
|
-
for (; e.charAt(n) === "\0"; )
|
|
165
|
-
n++;
|
|
166
|
-
if (n === l)
|
|
167
|
-
return [];
|
|
168
|
-
for (; e.charAt(l - 1) === "\0"; )
|
|
169
|
-
l--;
|
|
170
|
-
return e.slice(n, l).split(/\0/g);
|
|
171
|
-
}
|
|
172
|
-
function W(r) {
|
|
173
|
-
const e = T(r);
|
|
174
|
-
for (let n = 0; n < e.length; n++) {
|
|
175
|
-
const l = e[n], s = M.exec(l);
|
|
176
|
-
if (s) {
|
|
177
|
-
const t = s.index + (s[1] ?? s[2]).length;
|
|
178
|
-
e.splice(n, 1, l.slice(0, t), l.slice(t));
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return e;
|
|
182
|
-
}
|
|
183
|
-
function ae(r, e) {
|
|
184
|
-
const [n, l, s] = Y(r, e), t = q(e == null ? void 0 : e.locale), a = J(e == null ? void 0 : e.locale), c = Q(t, a);
|
|
185
|
-
return n + l.map((o, u) => u === 0 ? c(o) : t(o)).join((e == null ? void 0 : e.delimiter) ?? " ") + s;
|
|
186
|
-
}
|
|
187
|
-
function q(r) {
|
|
188
|
-
return r === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(r);
|
|
189
|
-
}
|
|
190
|
-
function J(r) {
|
|
191
|
-
return r === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(r);
|
|
192
|
-
}
|
|
193
|
-
function Q(r, e) {
|
|
194
|
-
return (n) => `${e(n[0])}${r(n.slice(1))}`;
|
|
195
|
-
}
|
|
196
|
-
function Y(r, e = {}) {
|
|
197
|
-
const n = e.split ?? (e.separateNumbers ? W : T), l = e.prefixCharacters ?? E, s = e.suffixCharacters ?? E;
|
|
198
|
-
let t = 0, a = r.length;
|
|
199
|
-
for (; t < r.length; ) {
|
|
200
|
-
const c = r.charAt(t);
|
|
201
|
-
if (!l.includes(c))
|
|
202
|
-
break;
|
|
203
|
-
t++;
|
|
204
|
-
}
|
|
205
|
-
for (; a > t; ) {
|
|
206
|
-
const c = a - 1, o = r.charAt(c);
|
|
207
|
-
if (!s.includes(o))
|
|
208
|
-
break;
|
|
209
|
-
a = c;
|
|
210
|
-
}
|
|
211
|
-
return [
|
|
212
|
-
r.slice(0, t),
|
|
213
|
-
n(r.slice(t, a)),
|
|
214
|
-
r.slice(a)
|
|
215
|
-
];
|
|
216
|
-
}
|
|
217
|
-
export {
|
|
218
|
-
ne as F,
|
|
219
|
-
le as _,
|
|
220
|
-
se as a,
|
|
221
|
-
ae as s
|
|
222
|
-
};
|