@feedmepos/mf-order-setting 0.0.90 → 0.0.91

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 (46) hide show
  1. package/dist/DisplaySystemView-n7Kqdw-h.js +6564 -0
  2. package/dist/{KioskDevicesView-WuOTJ9Fi.js → KioskDevicesView-Bz6seroM.js} +1 -1
  3. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-DdHfATyN.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-I39sE8Pe.js} +3 -3
  4. package/dist/{KioskSettingView-Bsja2OqT.js → KioskSettingView-Cajjh4Zm.js} +3 -3
  5. package/dist/{KioskView-BH5qGTM_.js → KioskView-BPSbsMi5.js} +93 -89
  6. package/dist/{OrderSettingsView-D6V1ztiS.js → OrderSettingsView-jPxZ3JDM.js} +5 -5
  7. package/dist/{app-DsMk7W2h.js → app-DIhv5ssA.js} +266 -254
  8. package/dist/app.js +1 -1
  9. package/dist/frontend/mf-order/src/app.d.ts +18 -6
  10. package/dist/frontend/mf-order/src/main.d.ts +18 -6
  11. package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +6 -3
  12. package/dist/frontend/mf-order/src/modules/kiosk/bindDeviceError.d.ts +20 -0
  13. package/dist/frontend/mf-order/src/views/display-system/CanvasArea.vue.d.ts +48 -0
  14. package/dist/frontend/mf-order/src/views/display-system/DisplayLayoutCanvas.vue.d.ts +17 -14
  15. package/dist/frontend/mf-order/src/views/display-system/DisplayModulePickerDialog.vue.d.ts +2 -0
  16. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  17. package/dist/{index-DGDiI0fr.js → index-Clp_YRJ2.js} +1 -1
  18. package/dist/{index-BUDM0Rqn.js → index-CmqNrkNl.js} +1 -1
  19. package/dist/{index-C2n1MV_1.js → index-vaSLX6r3.js} +2 -2
  20. package/dist/{order.dto-BRDWWgMV.js → order.dto-DV1qL3Q_.js} +21 -1
  21. package/dist/package/entity/alert/investigation.dto.d.ts +26 -0
  22. package/dist/package/entity/alert/lark-callback.dto.d.ts +19 -0
  23. package/dist/package/entity/alert/record-resolution.dto.d.ts +35 -0
  24. package/dist/package/entity/index.d.ts +1 -0
  25. package/dist/package/entity/kiosk/kiosk.do.d.ts +105 -0
  26. package/dist/package/entity/kiosk/kiosk.dto.d.ts +76 -0
  27. package/dist/style.css +1 -1
  28. package/package.json +3 -1
  29. package/src/locales/en-US.json +11 -4
  30. package/src/locales/zh-CN.json +9 -4
  31. package/src/modules/display-system/interface.spec.ts +90 -5
  32. package/src/modules/display-system/interface.ts +31 -21
  33. package/src/modules/kiosk/bindDeviceError.spec.ts +42 -0
  34. package/src/modules/kiosk/bindDeviceError.ts +40 -0
  35. package/src/views/display-system/CanvasArea.vue +355 -0
  36. package/src/views/display-system/DisplayLayoutCanvas.spec.ts +57 -0
  37. package/src/views/display-system/DisplayLayoutCanvas.vue +173 -298
  38. package/src/views/display-system/DisplayModulePickerDialog.spec.ts +71 -0
  39. package/src/views/display-system/DisplayModulePickerDialog.vue +107 -0
  40. package/src/views/display-system/DisplayTemplateEditor.spec.ts +151 -0
  41. package/src/views/display-system/DisplayTemplateEditor.vue +233 -193
  42. package/src/views/kiosk/KioskView.vue +2 -4
  43. package/vitest.config.ts +2 -0
  44. package/dist/DisplaySystemView-tosCa7Ej.js +0 -6485
  45. package/dist/frontend/mf-order/src/views/display-system/DisplayModulePalette.vue.d.ts +0 -13
  46. package/src/views/display-system/DisplayModulePalette.vue +0 -140
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-DdHfATyN.js";
1
+ import { _ as f } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-I39sE8Pe.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,10 +1,10 @@
1
1
  import { ref as C, defineComponent as Q, resolveComponent as x, openBlock as l, createElementBlock as m, createElementVNode as a, toDisplayString as d, unref as s, createVNode as v, computed as _, createBlock as M, withCtx as K, createCommentVNode as D, Fragment as q, renderList as G, watch as he, normalizeClass as $e, createTextVNode as te, renderSlot as Me } from "vue";
2
2
  import { useI18n as ne, useCoreStore as Ve } from "@feedmepos/mf-common";
3
3
  import { defineStore as ge } from "pinia";
4
- import { r as J, g as ue, b as Be, p as Re } from "./order.dto-BRDWWgMV.js";
4
+ import { r as J, g as ue, b as Be, p as Re } from "./order.dto-DV1qL3Q_.js";
5
5
  import { useDialog as Oe, useSnackbar as Le } from "@feedmepos/ui-library";
6
- import { d as ce, s as be } from "./index-DGDiI0fr.js";
7
- import { c as Ne, g as Ke, a as xe } from "./app-DsMk7W2h.js";
6
+ import { d as ce, s as be } from "./index-Clp_YRJ2.js";
7
+ import { c as Ne, g as Ke, a as xe } from "./app-DIhv5ssA.js";
8
8
  async function Ue() {
9
9
  const t = await J().get("/kiosk/otp");
10
10
  return ue(t);
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as fe, computed as x, ref as Y, onMounted as Ee, resolveComponent as V, openBlock as w, createBlock as oe, withCtx as R, createVNode as i, unref as a, createElementVNode as d, withDirectives as F, vShow as N, toDisplayString as v, watch as Ue, createElementBlock as E, createCommentVNode as B, Fragment as te, renderList as ne, normalizeClass as Fe } from "vue";
2
- import { e as me, b as be, s as ge, d as Ne, r as pe, f as ce, h as Oe } from "./app-DsMk7W2h.js";
3
- import { c as f, K as Le, d as Me } from "./order.dto-BRDWWgMV.js";
4
- import { _ as We, u as De, a as $e } from "./index-C2n1MV_1.js";
2
+ import { e as me, b as be, s as ge, d as Ne, r as pe, f as ce, h as Oe } from "./app-DIhv5ssA.js";
3
+ import { c as f, K as Le, d as Me } from "./order.dto-DV1qL3Q_.js";
4
+ import { _ as We, u as De, a as $e } from "./index-vaSLX6r3.js";
5
5
  import { useI18n as he, FeedMeAuth as Ie, useCoreStore as Ye } from "@feedmepos/mf-common";
6
6
  import { useSnackbar as Ge } from "@feedmepos/ui-library";
7
7
  const Ke = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary ml-7" }, je = { class: "ml-7" }, qe = { class: "ml-7" }, Be = { class: "flex flex-row gap-9" }, He = /* @__PURE__ */ fe({
@@ -1,24 +1,28 @@
1
- import { defineComponent as X, openBlock as _, createElementBlock as Q, createElementVNode as y, toDisplayString as A, unref as d, ref as v, defineAsyncComponent as ue, computed as T, onMounted as ce, watch as re, resolveComponent as w, createVNode as U, withCtx as oe, createBlock as K, createCommentVNode as E } from "vue";
2
- import { u as se, a as pe, _ as me } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-DdHfATyN.js";
3
- import { useDialog as de, useSnackbar as ie } from "@feedmepos/ui-library";
4
- import { useI18n as z, useCoreStore as ye } from "@feedmepos/mf-common";
5
- import { F as fe, a as ve, S as N } from "./order.dto-BRDWWgMV.js";
1
+ import { defineComponent as X, openBlock as h, createElementBlock as Q, createElementVNode as f, toDisplayString as A, unref as m, ref as v, defineAsyncComponent as ue, computed as U, onMounted as ce, watch as re, resolveComponent as P, createVNode as L, withCtx as oe, createBlock as E, createCommentVNode as K } from "vue";
2
+ import { u as se, a as pe, _ as de } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-I39sE8Pe.js";
3
+ import { useDialog as me, useSnackbar as ie } from "@feedmepos/ui-library";
4
+ import { useI18n as z, useCoreStore as fe } from "@feedmepos/mf-common";
5
+ import { F as ye, a as ve, S as M } from "./order.dto-DV1qL3Q_.js";
6
6
  import { defineStore as be } from "pinia";
7
- import { O as W } from "./index-BUDM0Rqn.js";
8
- import { u as he } from "./app-DsMk7W2h.js";
9
- const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body-md-400 block" }, Pe = { class: "fm-typo-en-title-md-600" }, we = /* @__PURE__ */ X({
7
+ import { O as W } from "./index-CmqNrkNl.js";
8
+ import { u as _e } from "./app-DIhv5ssA.js";
9
+ const he = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body-md-400 block" }, we = { class: "fm-typo-en-title-md-600" }, Pe = /* @__PURE__ */ X({
10
10
  __name: "KioskOtpDialog",
11
11
  props: {
12
12
  otp: {}
13
13
  },
14
14
  setup(e) {
15
15
  const { t: a } = z();
16
- return (n, c) => (_(), Q("div", _e, [
17
- y("span", Ce, A(d(a)("order.bindDeviceMessage")), 1),
18
- y("div", Pe, A(e.otp), 1)
16
+ return (n, c) => (h(), Q("div", he, [
17
+ f("span", Ce, A(m(a)("order.bindDeviceMessage")), 1),
18
+ f("div", we, A(e.otp), 1)
19
19
  ]));
20
20
  }
21
- }), J = {
21
+ }), Ae = "KIOSK_LICENSE_QUOTA_EXHAUSTED";
22
+ function Ie(e) {
23
+ return e ? e.status === 403 ? "order.bindDevicePermissionDenied" : e.code === Ae || /no quota available/i.test(e.message ?? "") ? "order.bindDeviceNoQuota" : e.status === void 0 ? "order.bindDeviceNetworkError" : "order.bindDeviceFailed" : "order.bindDeviceFailed";
24
+ }
25
+ const J = {
22
26
  enabled: !1,
23
27
  prefix: null,
24
28
  padDigit: 0,
@@ -31,7 +35,7 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
31
35
  payAtCounter: null,
32
36
  paid: null
33
37
  }
34
- }, Ae = {
38
+ }, Re = {
35
39
  enabled: !1,
36
40
  submitOrderInstruction: {
37
41
  payAtCounter: null,
@@ -44,14 +48,14 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
44
48
  paid: null
45
49
  },
46
50
  enablePaxDialog: !1
47
- }, Ie = {
51
+ }, xe = {
48
52
  dineIn: {
49
53
  enabled: !1,
50
54
  pickUp: Y,
51
- sequenceNumber: fe.parse({}),
55
+ sequenceNumber: ye.parse({}),
52
56
  displayStand: J
53
57
  },
54
- takeaway: Ae,
58
+ takeaway: Re,
55
59
  paymentSetting: {
56
60
  paymentTypes: [],
57
61
  offlinePaymentTypes: [],
@@ -84,13 +88,13 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
84
88
  }, F = {
85
89
  payAtCounter: null,
86
90
  paid: null
87
- }, Re = (e) => {
91
+ }, Te = (e) => {
88
92
  var a;
89
93
  return {
90
- kiosk: xe(e.kioskSettings, (a = e.sequenceSettings) == null ? void 0 : a.kioskDineIn)
94
+ kiosk: Ue(e.kioskSettings, (a = e.sequenceSettings) == null ? void 0 : a.kioskDineIn)
91
95
  };
92
- }, xe = (e, a) => {
93
- var n, c, t, l, r, o, p, m, i, C, b, f;
96
+ }, Ue = (e, a) => {
97
+ var n, c, t, l, r, o, p, d, i, C, b, y;
94
98
  return {
95
99
  dineIn: Le(
96
100
  a ?? {
@@ -107,7 +111,7 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
107
111
  } : F
108
112
  },
109
113
  paymentSetting: {
110
- paymentTypes: ((m = e == null ? void 0 : e.paymentSetting) == null ? void 0 : m.paymentTypes) ?? [],
114
+ paymentTypes: ((d = e == null ? void 0 : e.paymentSetting) == null ? void 0 : d.paymentTypes) ?? [],
111
115
  offlinePaymentTypes: ((i = e == null ? void 0 : e.paymentSetting) == null ? void 0 : i.offlinePaymentTypes) ?? [],
112
116
  ePaymentTypes: ((C = e == null ? void 0 : e.paymentSetting) == null ? void 0 : C.ePaymentTypes) ?? ve.parse({
113
117
  card: {
@@ -143,12 +147,12 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
143
147
  allowReject: (e == null ? void 0 : e.allowReject) ?? null,
144
148
  // Stored [] means the same thing as unset ("all languages"), so collapse it
145
149
  // to null here — the form only ever has to reason about null vs a real set.
146
- languages: (f = e == null ? void 0 : e.languages) != null && f.length ? [...e.languages] : null,
150
+ languages: (y = e == null ? void 0 : e.languages) != null && y.length ? [...e.languages] : null,
147
151
  // KDI-5138. Read back so a save of any other kiosk field keeps it.
148
152
  minWeighGrams: (e == null ? void 0 : e.minWeighGrams) ?? null
149
153
  };
150
154
  }, Le = (e, a) => {
151
- var n, c, t, l, r, o, p, m;
155
+ var n, c, t, l, r, o, p, d;
152
156
  return {
153
157
  enabled: !!a,
154
158
  sequenceNumber: e,
@@ -168,11 +172,11 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
168
172
  enablePaxDialog: a.displayStand.enablePaxDialog ?? !1,
169
173
  submitOrderInstruction: a.displayStand.submitOrderInstruction ? {
170
174
  payAtCounter: ((o = (r = a.displayStand.submitOrderInstruction) == null ? void 0 : r.payAtCounter) == null ? void 0 : o.en) ?? null,
171
- paid: ((m = (p = a.displayStand.submitOrderInstruction) == null ? void 0 : p.paid) == null ? void 0 : m.en) ?? null
175
+ paid: ((d = (p = a.displayStand.submitOrderInstruction) == null ? void 0 : p.paid) == null ? void 0 : d.en) ?? null
172
176
  } : F
173
177
  } : J
174
178
  };
175
- }, Te = (e) => {
179
+ }, Ee = (e) => {
176
180
  const a = (t) => {
177
181
  var l, r, o, p;
178
182
  return {
@@ -247,9 +251,9 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
247
251
  kioskSettings: n()
248
252
  };
249
253
  }, j = {
250
- convertOrderSettingDto: Re,
251
- toOrderKioskSettingsDto: Te
252
- }, Ue = be("orderSetting", () => {
254
+ convertOrderSettingDto: Te,
255
+ toOrderKioskSettingsDto: Ee
256
+ }, Ke = be("orderSetting", () => {
253
257
  const e = v({});
254
258
  async function a() {
255
259
  const l = await W.getOrderSetting();
@@ -260,8 +264,8 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
260
264
  const { _id: l, ...r } = e.value.orderSetting, o = j.toOrderKioskSettingsDto(e.value.kiosk), p = {
261
265
  ...r,
262
266
  kioskSettings: o.kioskSettings
263
- }, m = await W.updateOrderSetting(p);
264
- c(m);
267
+ }, d = await W.updateOrderSetting(p);
268
+ c(d);
265
269
  }
266
270
  }
267
271
  function c(l) {
@@ -276,10 +280,10 @@ const _e = { class: "flex flex-col gap-5 pb-6" }, Ce = { class: "fm-typo-en-body
276
280
  updateKioskSetting: n,
277
281
  setKioskOrderSetting: t
278
282
  };
279
- }), Ke = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), Ee = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), Fe = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), De = /[^\p{L}\d]+/giu, G = "$1\0$2", H = "";
283
+ }), Fe = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), De = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), qe = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), Ne = /[^\p{L}\d]+/giu, G = "$1\0$2", H = "";
280
284
  function Z(e) {
281
285
  let a = e.trim();
282
- a = a.replace(Ke, G).replace(Ee, G), a = a.replace(De, "\0");
286
+ a = a.replace(Fe, G).replace(De, G), a = a.replace(Ne, "\0");
283
287
  let n = 0, c = a.length;
284
288
  for (; a.charAt(n) === "\0"; )
285
289
  n++;
@@ -289,10 +293,10 @@ function Z(e) {
289
293
  c--;
290
294
  return a.slice(n, c).split(/\0/g);
291
295
  }
292
- function qe(e) {
296
+ function Be(e) {
293
297
  const a = Z(e);
294
298
  for (let n = 0; n < a.length; n++) {
295
- const c = a[n], t = Fe.exec(c);
299
+ const c = a[n], t = qe.exec(c);
296
300
  if (t) {
297
301
  const l = t.index + (t[1] ?? t[2]).length;
298
302
  a.splice(n, 1, c.slice(0, l), c.slice(l));
@@ -300,21 +304,21 @@ function qe(e) {
300
304
  }
301
305
  return a;
302
306
  }
303
- function Be(e, a) {
304
- const [n, c, t] = Ne(e, a), l = Ve(a == null ? void 0 : a.locale), r = $e(a == null ? void 0 : a.locale);
305
- return n + c.map(Me(l, r)).join(" ") + t;
307
+ function Ve(e, a) {
308
+ const [n, c, t] = je(e, a), l = $e(a == null ? void 0 : a.locale), r = Me(a == null ? void 0 : a.locale);
309
+ return n + c.map(We(l, r)).join(" ") + t;
306
310
  }
307
- function Ve(e) {
311
+ function $e(e) {
308
312
  return (a) => a.toLocaleLowerCase(e);
309
313
  }
310
- function $e(e) {
314
+ function Me(e) {
311
315
  return (a) => a.toLocaleUpperCase(e);
312
316
  }
313
- function Me(e, a) {
317
+ function We(e, a) {
314
318
  return (n) => `${a(n[0])}${e(n.slice(1))}`;
315
319
  }
316
- function Ne(e, a = {}) {
317
- const n = a.split ?? (a.separateNumbers ? qe : Z), c = a.prefixCharacters ?? H, t = a.suffixCharacters ?? H;
320
+ function je(e, a = {}) {
321
+ const n = a.split ?? (a.separateNumbers ? Be : Z), c = a.prefixCharacters ?? H, t = a.suffixCharacters ?? H;
318
322
  let l = 0, r = e.length;
319
323
  for (; l < e.length; ) {
320
324
  const o = e.charAt(l);
@@ -334,13 +338,13 @@ function Ne(e, a = {}) {
334
338
  e.slice(r)
335
339
  ];
336
340
  }
337
- const We = { class: "py-[1.5rem]" }, je = { class: "px-[1.5rem]" }, Ge = { class: "pt-[1.5rem]" }, He = { class: "flex flex-col gap-10" }, Xe = { class: "fm-typo-en-title-sm-600" }, Qe = { class: "fm-typo-en-title-sm-400" }, ea = /* @__PURE__ */ X({
341
+ const Ge = { class: "py-[1.5rem]" }, He = { class: "px-[1.5rem]" }, Xe = { class: "pt-[1.5rem]" }, Qe = { class: "flex flex-col gap-10" }, ze = { class: "fm-typo-en-title-sm-600" }, Je = { class: "fm-typo-en-title-sm-400" }, ta = /* @__PURE__ */ X({
338
342
  __name: "KioskView",
339
343
  setup(e) {
340
- var $, M;
341
- const { t: a } = z(), { canManageOrderSetting: n } = he(), c = ue(
342
- () => import("./KioskSettingView-Bsja2OqT.js")
343
- ), t = v("device"), l = se(), r = Ue(), o = pe(), p = de(), { currentRestaurant: m, restaurants: i, changeRestaurant: C } = ye(), b = ie(), f = v((($ = m.value) == null ? void 0 : $._id) ?? void 0), I = v(null), R = v(""), D = v(null), q = T(() => {
344
+ var V, $;
345
+ const { t: a } = z(), { canManageOrderSetting: n } = _e(), c = ue(
346
+ () => import("./KioskSettingView-Cajjh4Zm.js")
347
+ ), t = v("device"), l = se(), r = Ke(), o = pe(), p = me(), { currentRestaurant: d, restaurants: i, changeRestaurant: C } = fe(), b = ie(), y = v(((V = d.value) == null ? void 0 : V._id) ?? void 0), I = v(null), R = v(""), D = v(null), q = U(() => {
344
348
  const u = R.value.trim().toLowerCase();
345
349
  return i.value.filter(
346
350
  (s) => !u || s.profile.name.toLowerCase().includes(u) || s._id.toLowerCase().includes(u)
@@ -353,19 +357,19 @@ const We = { class: "py-[1.5rem]" }, je = { class: "px-[1.5rem]" }, Ge = { class
353
357
  R.value = u;
354
358
  }
355
359
  function O(u) {
356
- var s, h;
360
+ var s, _;
357
361
  if (!u) {
358
362
  R.value = "";
359
363
  return;
360
364
  }
361
- (h = (s = D.value) == null ? void 0 : s.querySelector("input")) == null || h.select();
365
+ (_ = (s = D.value) == null ? void 0 : s.querySelector("input")) == null || _.select();
362
366
  }
363
- const P = v(((M = m.value) == null ? void 0 : M._id) ?? "");
364
- async function B(u) {
365
- const s = i.value.find((h) => h._id == u);
366
- await C(s), await V(), f.value = u, P.value = u;
367
+ const w = v((($ = d.value) == null ? void 0 : $._id) ?? "");
368
+ async function N(u) {
369
+ const s = i.value.find((_) => _._id == u);
370
+ await C(s), await B(), y.value = u, w.value = u;
367
371
  }
368
- async function V() {
372
+ async function B() {
369
373
  if (n.value)
370
374
  try {
371
375
  await r.getSetting();
@@ -378,26 +382,26 @@ const We = { class: "py-[1.5rem]" }, je = { class: "px-[1.5rem]" }, Ge = { class
378
382
  try {
379
383
  await l.getDevices();
380
384
  } catch (u) {
381
- I.value = u instanceof N && u.status === 403 ? "forbidden" : "error";
385
+ I.value = u instanceof M && u.status === 403 ? "forbidden" : "error";
382
386
  }
383
387
  }
384
- const S = T(() => {
388
+ const S = U(() => {
385
389
  const u = [{ label: a("order.deviceBinding"), value: "device" }];
386
390
  return n.value && u.push({ label: a("order.settings"), value: "setting" }), u;
387
- }), k = T(() => l.state.devices);
391
+ }), k = U(() => l.state.devices);
388
392
  async function ee() {
389
393
  try {
390
394
  await l.requestOtp();
391
395
  } catch (u) {
392
396
  b.open({
393
- title: u instanceof N && u.status === 403 ? a("order.bindDevicePermissionDenied") : a("order.bindDeviceFailed"),
397
+ title: a(Ie(u instanceof M ? u : null)),
394
398
  type: "error"
395
399
  });
396
400
  return;
397
401
  }
398
402
  p.open({
399
- title: Be(a("order.bindDevice")),
400
- contentComponent: we,
403
+ title: Ve(a("order.bindDevice")),
404
+ contentComponent: Pe,
401
405
  contentComponentProps: {
402
406
  otp: l.state.otp
403
407
  }
@@ -420,71 +424,71 @@ const We = { class: "py-[1.5rem]" }, je = { class: "px-[1.5rem]" }, Ge = { class
420
424
  }
421
425
  return ce(async () => {
422
426
  var u;
423
- (u = m.value) != null && u._id && (P.value = m.value._id, await V());
427
+ (u = d.value) != null && u._id && (w.value = d.value._id, await B());
424
428
  }), re(
425
429
  () => i.value.length,
426
430
  async (u) => {
427
- f.value === void 0 && i.value.length > 0 && await B(i.value[0]._id);
431
+ y.value === void 0 && i.value.length > 0 && await N(i.value[0]._id);
428
432
  },
429
433
  { immediate: !0 }
430
434
  ), (u, s) => {
431
- const h = w("FmPageHead"), te = w("FmTabs"), le = w("FmMenuItem"), ne = w("FmSelect");
432
- return _(), Q("div", We, [
433
- U(h, {
434
- title: d(a)("order.kiosk")
435
+ const _ = P("FmPageHead"), te = P("FmTabs"), le = P("FmMenuItem"), ne = P("FmSelect");
436
+ return h(), Q("div", Ge, [
437
+ L(_, {
438
+ title: m(a)("order.kiosk")
435
439
  }, null, 8, ["title"]),
436
- y("div", je, [
437
- U(te, {
440
+ f("div", He, [
441
+ L(te, {
438
442
  "model-value": t.value,
439
- "onUpdate:modelValue": s[0] || (s[0] = (L) => t.value = L),
443
+ "onUpdate:modelValue": s[0] || (s[0] = (T) => t.value = T),
440
444
  items: S.value
441
445
  }, null, 8, ["model-value", "items"]),
442
- y("div", Ge, [
443
- y("div", He, [
444
- y("div", {
446
+ f("div", Xe, [
447
+ f("div", Qe, [
448
+ f("div", {
445
449
  class: "flex flex-col gap-2",
446
450
  ref_key: "restaurantPicker",
447
451
  ref: D
448
452
  }, [
449
- y("span", Xe, A(d(a)("order.activateLocation")), 1),
450
- y("span", Qe, A(d(a)("order.selectRestaurant")) + ": ", 1),
451
- U(ne, {
453
+ f("span", ze, A(m(a)("order.activateLocation")), 1),
454
+ f("span", Je, A(m(a)("order.selectRestaurant")) + ": ", 1),
455
+ L(ne, {
452
456
  class: "w-1/2",
453
- modelValue: f.value,
457
+ modelValue: y.value,
454
458
  "onUpdate:modelValue": [
455
- s[1] || (s[1] = (L) => f.value = L),
456
- B
459
+ s[1] || (s[1] = (T) => y.value = T),
460
+ N
457
461
  ],
458
462
  items: q.value,
459
- placeholder: d(a)("order.searchRestaurant"),
463
+ placeholder: m(a)("order.searchRestaurant"),
460
464
  searchable: "",
461
465
  "search-debounce": 150,
462
466
  "on-search": g,
463
467
  onDropdownChanged: O
464
468
  }, {
465
469
  "append-menu": oe(() => [
466
- q.value.length ? E("", !0) : (_(), K(le, {
470
+ q.value.length ? K("", !0) : (h(), E(le, {
467
471
  key: 0,
468
472
  disabled: "",
469
- label: d(a)("order.noRestaurantFound")
473
+ label: m(a)("order.noRestaurantFound")
470
474
  }, null, 8, ["label"]))
471
475
  ]),
472
476
  _: 1
473
477
  }, 8, ["modelValue", "items", "placeholder"])
474
478
  ], 512),
475
- t.value == "device" ? (_(), K(me, {
479
+ t.value == "device" ? (h(), E(de, {
476
480
  key: 0,
477
481
  devices: k.value,
478
482
  "load-error": I.value,
479
483
  onRequestOtp: ee,
480
484
  onRetry: x
481
- }, null, 8, ["devices", "load-error"])) : E("", !0),
482
- t.value == "setting" && d(n) ? (_(), K(d(c), {
483
- key: `KioskSettingView-${P.value}`,
484
- "restaurant-id": P.value,
485
+ }, null, 8, ["devices", "load-error"])) : K("", !0),
486
+ t.value == "setting" && m(n) ? (h(), E(m(c), {
487
+ key: `KioskSettingView-${w.value}`,
488
+ "restaurant-id": w.value,
485
489
  onUpdateKioskOrderSetting: ae,
486
- form: d(r).state.kiosk ?? d(Ie)
487
- }, null, 8, ["restaurant-id", "form"])) : E("", !0)
490
+ form: m(r).state.kiosk ?? m(xe)
491
+ }, null, 8, ["restaurant-id", "form"])) : K("", !0)
488
492
  ])
489
493
  ])
490
494
  ])
@@ -493,5 +497,5 @@ const We = { class: "py-[1.5rem]" }, je = { class: "px-[1.5rem]" }, Ge = { class
493
497
  }
494
498
  });
495
499
  export {
496
- ea as default
500
+ ta as default
497
501
  };
@@ -4,11 +4,11 @@ var _c = (l, c, p) => SG(l, typeof c != "symbol" ? c + "" : c, p);
4
4
  import { ref as Ue, computed as Ie, defineComponent as mt, onMounted as Dn, onUnmounted as j$, resolveComponent as Oe, openBlock as le, createBlock as st, withCtx as lt, createElementVNode as G, createVNode as oe, toDisplayString as $e, unref as x, createElementBlock as ye, isRef as pk, Fragment as ot, renderList as Et, createCommentVNode as Be, watch as At, renderSlot as Ec, normalizeClass as St, reactive as Vt, createTextVNode as Wn, nextTick as FG, shallowRef as CG, Teleport as IG, withModifiers as mk, withDirectives as Qf, vModelText as Wf, toRaw as cA, normalizeStyle as wG, readonly as Jf, createSlots as AG, h as TG, withKeys as kG, resolveDynamicComponent as OG } from "vue";
5
5
  import { useDialog as Va, useSnackbar as hk } from "@feedmepos/ui-library";
6
6
  import { useI18n as bt, useCoreStore as xt } from "@feedmepos/mf-common";
7
- import { e as yt, i as RG, c as va, j as L$, k as DG, g as fk, l as ri, m as V$, n as PG, o as q$, p as MG, q as _$, t as NG } from "./app-DsMk7W2h.js";
8
- import { e as Ru, f as Zf, h as Sn, g as xc, m as pA, i as Gt, S as xG, T as kc, C as Kn, j as mA, k as Uu, l as UG, n as BG, o as jG, q as LG, s as Hn, t as Yi, u as Fu, O as hA, v as fA, w as $A, x as gA, y as VG, z as Xf, A as qG } from "./order.dto-BRDWWgMV.js";
9
- import { O as ya, s as GG } from "./index-BUDM0Rqn.js";
10
- import { u as fn, r as gt, _ as $k, a as io, b as e$ } from "./index-C2n1MV_1.js";
11
- import { r as KG, d as Ot, s as zG } from "./index-DGDiI0fr.js";
7
+ import { e as yt, i as RG, c as va, j as L$, k as DG, g as fk, l as ri, m as V$, n as PG, o as q$, p as MG, q as _$, t as NG } from "./app-DIhv5ssA.js";
8
+ import { e as Ru, f as Zf, h as Sn, g as xc, m as pA, i as Gt, S as xG, T as kc, C as Kn, j as mA, k as Uu, l as UG, n as BG, o as jG, q as LG, s as Hn, t as Yi, u as Fu, O as hA, v as fA, w as $A, x as gA, y as VG, z as Xf, A as qG } from "./order.dto-DV1qL3Q_.js";
9
+ import { O as ya, s as GG } from "./index-CmqNrkNl.js";
10
+ import { u as fn, r as gt, _ as $k, a as io, b as e$ } from "./index-vaSLX6r3.js";
11
+ import { r as KG, d as Ot, s as zG } from "./index-Clp_YRJ2.js";
12
12
  import { defineStore as gk } from "pinia";
13
13
  import { u as $n } from "./snackbar-DZQ0_reQ.js";
14
14
  import { _ as $i } from "./_plugin-vue_export-helper-CHgC5LLL.js";