@feedmepos/mf-payment 1.7.8-dev → 1.7.11-dev

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 (82) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-D_rXg9Fw.js → Actions.vue_vue_type_script_setup_true_lang-BK7eBqg8.js} +1 -1
  2. package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CIaldv4s.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CJRHud1Y.js} +3 -3
  3. package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-CHRvN9A2.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-kDEZmxJj.js} +2 -2
  4. package/dist/{Chargeback-D5qW-mVx.js → Chargeback-B24AygKB.js} +5 -5
  5. package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DXV5KKN2.js → DocumentViewer.vue_vue_type_script_setup_true_lang-ZTBItxH4.js} +1 -1
  6. package/dist/{OnboardForm-W0k0TLHo.js → OnboardForm-BoMXyBfu.js} +5 -5
  7. package/dist/{OnboardForm-CGQE0m9f.js → OnboardForm-DDtgBR70.js} +5 -5
  8. package/dist/{OnboardSubmission-B3s4qhTG.js → OnboardSubmission-FVa7wqyw.js} +189 -188
  9. package/dist/{OnboardSubmission-DFH5vwUa.js → OnboardSubmission-NbKQg29f.js} +35 -39
  10. package/dist/{PayoutAccount-BtB8BhWG.js → PayoutAccount-B7uNxA-y.js} +5 -5
  11. package/dist/{PayoutAccount-Ch-QtROT.js → PayoutAccount-CbHUueB5.js} +42 -42
  12. package/dist/{PayoutAccountSetting-De2-ICCG.js → PayoutAccountSetting-Bi8us59u.js} +6 -6
  13. package/dist/{Restaurant-DTCzqBKj.js → Restaurant-ZKH4-27k.js} +4 -4
  14. package/dist/{RestaurantSetting-RYEI1ino.js → RestaurantSetting-5Ucv0fuX.js} +3 -3
  15. package/dist/{Settlement-CHRgvDyo.js → Settlement-Cs3498YL.js} +3 -3
  16. package/dist/{Settlement-DGYbwQ3e.js → Settlement-D8Yoyler.js} +4 -4
  17. package/dist/{SettlementTransactions-BACa5wVG.js → SettlementTransactions-CsLXxKAk.js} +11 -10
  18. package/dist/{SettlementTransactions-BqUAx9fY.js → SettlementTransactions-Lsb17Lxv.js} +11 -10
  19. package/dist/{Status.vue_vue_type_script_setup_true_lang-oKuE83KP.js → Status.vue_vue_type_script_setup_true_lang-eL7XwWJ3.js} +4 -4
  20. package/dist/{Terminal-4MpJyqma.js → Terminal-BPh2BCua.js} +5 -5
  21. package/dist/{TerminalSetting-CzpvtIyS.js → TerminalSetting-B79qs4mL.js} +958 -821
  22. package/dist/{Transaction-CDjn1yop.js → Transaction-DR2gQCKA.js} +10 -10
  23. package/dist/{Transaction-ByT89ppn.js → Transaction-DjLL4UN4.js} +37 -36
  24. package/dist/{TransactionOld-0U8W_P6p.js → TransactionOld-B5s1qngv.js} +7 -7
  25. package/dist/TransactionStatus.vue_vue_type_script_setup_true_lang-B8mW53hn.js +89 -0
  26. package/dist/{app-DIN7H6rk.js → app-D3wofEOS.js} +23 -23
  27. package/dist/app.js +1 -1
  28. package/dist/assets-_mNJ5BSj.js +92 -0
  29. package/dist/{grafana-BcpOE56P.js → grafana-DG-OOrc6.js} +1 -1
  30. package/dist/{index-DOUdnPtc.js → index-BkLu8qJc.js} +1 -1
  31. package/dist/{index-BxdFscFc.js → index-Bnlv9uae.js} +11502 -11016
  32. package/dist/{index-BxsmB_C3.js → index-BqgiQOtT.js} +1 -1
  33. package/dist/{index-Ce5HOW0V.js → index-C1BlMUKC.js} +1 -1
  34. package/dist/{index-Cdp_1070.js → index-COfZw5dL.js} +1 -1
  35. package/dist/{index-D_qtpNXT.js → index-NX5RT8X0.js} +1 -1
  36. package/dist/{index-BMNPErIg.js → index-k8hRO-Tp.js} +1 -1
  37. package/dist/{index-CAeTd4VM.js → index-zND3az_w.js} +2 -2
  38. package/dist/{index-GawC_j2y.js → index-zQrKAzs3.js} +1 -1
  39. package/dist/{index.vue_vue_type_script_setup_true_lang-MX7Mb9Db.js → index.vue_vue_type_script_setup_true_lang-B6UiGJ2f.js} +1 -1
  40. package/dist/model/onboard-submission.d.ts +19 -0
  41. package/dist/onboard-submission-CCpAeH6U.js +23 -0
  42. package/dist/package.json +2 -2
  43. package/dist/{payout-account-CKdySLcf.js → payout-account-ae78i0IG.js} +3 -3
  44. package/dist/stores/payoutAccount.d.ts +22 -22
  45. package/dist/tsconfig.app.tsbuildinfo +1 -1
  46. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +22 -22
  47. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +26 -26
  48. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +26 -26
  49. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +22 -22
  50. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +22 -22
  51. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +26 -26
  52. package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
  53. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  54. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
  55. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +30 -4
  56. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +30 -4
  57. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +30 -4
  58. package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +166 -0
  59. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +30 -4
  60. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +30 -4
  61. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +30 -4
  62. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +30 -4
  63. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +30 -4
  64. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +30 -4
  65. package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +30 -4
  66. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +30 -4
  67. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +30 -4
  68. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +30 -4
  69. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +30 -4
  70. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +30 -4
  71. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +30 -4
  72. package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +30 -4
  73. package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +30 -4
  74. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +30 -4
  75. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +30 -4
  76. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +30 -4
  77. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +44 -44
  78. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +12 -12
  79. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +6 -6
  80. package/dist/views/settlement/SettlementTable.vue.d.ts +4 -4
  81. package/package.json +2 -2
  82. package/dist/assets-BPLQQR2t.js +0 -177
@@ -1,16 +1,18 @@
1
- import { defineComponent as R, openBlock as y, createElementBlock as S, Fragment as P, createElementVNode as I, createTextVNode as j, toDisplayString as W, ref as b, resolveComponent as g, createVNode as v, createCommentVNode as V, unref as M, computed as k, isRef as Z, createBlock as F, resolveDynamicComponent as ee, normalizeProps as ae, mergeProps as te, watch as q, onBeforeUnmount as ve, toRef as A, onMounted as G, withCtx as O, renderList as B } from "vue";
2
- import { u as le, p as ye, e as U } from "./index-BxdFscFc.js";
1
+ import { defineComponent as S, openBlock as f, createElementBlock as C, Fragment as P, createElementVNode as _, createTextVNode as H, toDisplayString as j, ref as T, resolveComponent as g, createVNode as m, createCommentVNode as k, unref as M, computed as U, isRef as Z, createBlock as F, resolveDynamicComponent as ee, normalizeProps as ae, mergeProps as te, watch as q, onBeforeUnmount as ve, toRef as A, onMounted as G, withCtx as O, renderList as B } from "vue";
2
+ import { u as le, p as ye, e as h } from "./index-Bnlv9uae.js";
3
3
  import { useRouter as fe } from "vue-router";
4
- import { t as K } from "./index-Ce5HOW0V.js";
4
+ import { t as K } from "./index-C1BlMUKC.js";
5
5
  import { _ as ge } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
- import { u as ne } from "./index-BxsmB_C3.js";
7
- import { useSnackbar as se } from "@feedmepos/ui-library";
6
+ import { u as ne } from "./index-BqgiQOtT.js";
7
+ import { useSnackbar as se, useDialog as be } from "@feedmepos/ui-library";
8
8
  import { u as X } from "./error-K1CakhA9.js";
9
- import { useI18n as be, useCoreStore as oe } from "@feedmepos/mf-common";
10
- import { o as Te } from "./index-CAeTd4VM.js";
11
- import { c as _e } from "./index-MdV54cWO.js";
9
+ import { useI18n as _e, useCoreStore as oe } from "@feedmepos/mf-common";
10
+ import { o as Te } from "./index-zND3az_w.js";
11
+ import { c as Ie } from "./index-MdV54cWO.js";
12
12
  import { z as ue, a as ce } from "./validator-CTlVogBQ.js";
13
- const Ie = /* @__PURE__ */ R({
13
+ import { g as Fe } from "./assets-_mNJ5BSj.js";
14
+ import { w as we } from "./Modal-DB8M9o1T.js";
15
+ const xe = /* @__PURE__ */ S({
14
16
  __name: "Information",
15
17
  props: {
16
18
  terminal: {
@@ -18,23 +20,23 @@ const Ie = /* @__PURE__ */ R({
18
20
  required: !0
19
21
  }
20
22
  },
21
- setup(_) {
22
- return (p, a) => (y(), S(P, null, [
23
- a[0] || (a[0] = I("b", null, "Name", -1)),
24
- j(": " + W(_.terminal.name), 1),
25
- a[1] || (a[1] = I("br", null, null, -1)),
26
- a[2] || (a[2] = I("b", null, "Status", -1)),
27
- j(": " + W(_.terminal.status), 1),
28
- a[3] || (a[3] = I("br", null, null, -1)),
29
- a[4] || (a[4] = I("b", null, "Device ID", -1)),
30
- j(": " + W(_.terminal.deviceId ?? "-"), 1),
31
- a[5] || (a[5] = I("br", null, null, -1)),
32
- a[6] || (a[6] = I("b", null, "Device Type", -1)),
33
- j(": " + W(_.terminal.deviceType ?? "-"), 1),
34
- a[7] || (a[7] = I("br", null, null, -1))
23
+ setup(I) {
24
+ return (d, a) => (f(), C(P, null, [
25
+ a[0] || (a[0] = _("b", null, "Name", -1)),
26
+ H(": " + j(I.terminal.name), 1),
27
+ a[1] || (a[1] = _("br", null, null, -1)),
28
+ a[2] || (a[2] = _("b", null, "Status", -1)),
29
+ H(": " + j(I.terminal.status), 1),
30
+ a[3] || (a[3] = _("br", null, null, -1)),
31
+ a[4] || (a[4] = _("b", null, "Device ID", -1)),
32
+ H(": " + j(I.terminal.deviceId ?? "-"), 1),
33
+ a[5] || (a[5] = _("br", null, null, -1)),
34
+ a[6] || (a[6] = _("b", null, "Device Type", -1)),
35
+ H(": " + j(I.terminal.deviceType ?? "-"), 1),
36
+ a[7] || (a[7] = _("br", null, null, -1))
35
37
  ], 64));
36
38
  }
37
- }), Fe = { key: 0 }, we = { class: "mt-6 space-x-6" }, xe = /* @__PURE__ */ R({
39
+ }), Ce = { key: 0 }, Ne = { class: "mt-6 space-x-6" }, ke = /* @__PURE__ */ S({
38
40
  __name: "KioskMode",
39
41
  props: {
40
42
  terminal: {
@@ -42,58 +44,58 @@ const Ie = /* @__PURE__ */ R({
42
44
  required: !0
43
45
  }
44
46
  },
45
- setup(_) {
46
- const { isLoading: p, startAsyncCall: a } = le(!1), T = se(), l = b({
47
+ setup(I) {
48
+ const { isLoading: d, startAsyncCall: a } = le(!1), b = se(), l = T({
47
49
  enable: !1,
48
50
  password: []
49
- }), r = _;
51
+ }), r = I;
50
52
  function e() {
51
- return l.value.enable && l.value.password.filter((m) => !!m).length !== 6 ? T.open({
53
+ return l.value.enable && l.value.password.filter((v) => !!v).length !== 6 ? b.open({
52
54
  type: "error",
53
55
  message: "Unlock PIN is required when setting up kiosk mode for terminal."
54
56
  }) : a(async () => {
55
- const m = { enable: l.value.enable };
56
- m.enable && Object.assign(m, {
57
+ const v = { enable: l.value.enable };
58
+ v.enable && Object.assign(v, {
57
59
  password: l.value.password.join("")
58
60
  });
59
- const c = await K.kioskModeRequest(r.terminal._id, m);
60
- if (c === "OK")
61
- return T.open({ type: "info", message: "Kiosk mode applied successfully." });
62
- let f = c;
63
- return c === "client_not_connected" && (f = "Terminal not connected to the websocket server."), c.startsWith("terminal: ") && (f = c.replaceAll("terminal: ", "")), T.open({
61
+ const p = await K.kioskModeRequest(r.terminal._id, v);
62
+ if (p === "OK")
63
+ return b.open({ type: "info", message: "Kiosk mode applied successfully." });
64
+ let y = p;
65
+ return p === "client_not_connected" && (y = "Terminal not connected to the websocket server."), p.startsWith("terminal: ") && (y = p.replaceAll("terminal: ", "")), b.open({
64
66
  type: "error",
65
- message: f
67
+ message: y
66
68
  });
67
69
  });
68
70
  }
69
- return (m, c) => {
70
- const f = g("FmSwitch"), u = g("FmPinField"), s = g("FmButton");
71
- return y(), S(P, null, [
72
- v(f, {
71
+ return (v, p) => {
72
+ const y = g("FmSwitch"), c = g("FmPinField"), s = g("FmButton");
73
+ return f(), C(P, null, [
74
+ m(y, {
73
75
  modelValue: l.value.enable,
74
- "onUpdate:modelValue": c[0] || (c[0] = (t) => l.value.enable = t),
76
+ "onUpdate:modelValue": p[0] || (p[0] = (t) => l.value.enable = t),
75
77
  label: "Enable Kiosk Mode?"
76
78
  }, null, 8, ["modelValue"]),
77
- l.value.enable ? (y(), S("div", Fe, [
78
- c[2] || (c[2] = I("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
79
- v(u, {
79
+ l.value.enable ? (f(), C("div", Ce, [
80
+ p[2] || (p[2] = _("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
81
+ m(c, {
80
82
  modelValue: l.value.password,
81
- "onUpdate:modelValue": c[1] || (c[1] = (t) => l.value.password = t)
83
+ "onUpdate:modelValue": p[1] || (p[1] = (t) => l.value.password = t)
82
84
  }, null, 8, ["modelValue"])
83
- ])) : V("", !0),
84
- I("div", we, [
85
- v(s, {
85
+ ])) : k("", !0),
86
+ _("div", Ne, [
87
+ m(s, {
86
88
  variant: "primary",
87
89
  label: "Send",
88
90
  icon: "send",
89
- loading: M(p),
91
+ loading: M(d),
90
92
  onclick: e
91
93
  }, null, 8, ["loading"])
92
94
  ])
93
95
  ], 64);
94
96
  };
95
97
  }
96
- }), Ne = /* @__PURE__ */ R({
98
+ }), Ve = /* @__PURE__ */ S({
97
99
  __name: "SettingRequest",
98
100
  props: {
99
101
  terminal: {
@@ -101,105 +103,105 @@ const Ie = /* @__PURE__ */ R({
101
103
  required: !0
102
104
  }
103
105
  },
104
- setup(_) {
105
- const { settingTab: p } = ne({
106
+ setup(I) {
107
+ const { settingTab: d } = ne({
106
108
  settingTab: "kiosk_mode"
107
109
  }), a = [
108
110
  {
109
111
  label: "Kiosk Mode",
110
112
  value: "kiosk_mode",
111
- render: xe
113
+ render: ke
112
114
  }
113
- ], T = _, l = k(() => a.find((r) => r.value === p.value));
115
+ ], b = I, l = U(() => a.find((r) => r.value === d.value));
114
116
  return (r, e) => {
115
- var c;
116
- const m = g("FmTabs");
117
- return y(), S(P, null, [
118
- e[1] || (e[1] = I("p", { className: "mt-1 my-6 text-gray-600" }, [
119
- I("b", null, "Note: "),
120
- j(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
117
+ var p;
118
+ const v = g("FmTabs");
119
+ return f(), C(P, null, [
120
+ e[1] || (e[1] = _("p", { className: "mt-1 my-6 text-gray-600" }, [
121
+ _("b", null, "Note: "),
122
+ H(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
121
123
  ], -1)),
122
- v(m, {
123
- "model-value": M(p),
124
- "onUpdate:modelValue": e[0] || (e[0] = (f) => Z(p) ? p.value = f : null),
124
+ m(v, {
125
+ "model-value": M(d),
126
+ "onUpdate:modelValue": e[0] || (e[0] = (y) => Z(d) ? d.value = y : null),
125
127
  class: "mb-6",
126
128
  items: a
127
129
  }, null, 8, ["model-value"]),
128
- M(p) ? (y(), F(ee((c = l.value) == null ? void 0 : c.render), ae(te({ key: 0 }, { terminal: T.terminal })), null, 16)) : V("", !0)
130
+ M(d) ? (f(), F(ee((p = l.value) == null ? void 0 : p.render), ae(te({ key: 0 }, { terminal: b.terminal })), null, 16)) : k("", !0)
129
131
  ], 64);
130
132
  };
131
133
  }
132
- }), Ce = 2e3, ke = 12e4, Ve = "Timed out waiting for the Tyro reader to sync. Please try again.";
133
- function Ue(_) {
134
- const { isLoading: p, startLoading: a, stopLoading: T } = le(!1), { t: l } = be(), r = se(), e = b(null), m = k(() => {
134
+ }), Ue = 2e3, Se = 12e4, he = "Timed out waiting for the Tyro reader to sync. Please try again.";
135
+ function Re(I) {
136
+ const { isLoading: d, startLoading: a, stopLoading: b } = le(!1), { t: l } = _e(), r = se(), e = T(null), v = U(() => {
135
137
  var $, E;
136
- const C = ($ = _.value.gateways) == null ? void 0 : $.find(
138
+ const V = ($ = I.value.gateways) == null ? void 0 : $.find(
137
139
  (D) => D.gateway === "Tyro"
138
140
  );
139
- return ((E = C == null ? void 0 : C.config) == null ? void 0 : E.uniqueId) || "";
140
- }), c = k(() => !!m.value), f = k(() => {
141
- var C;
142
- return ((C = e.value) == null ? void 0 : C.status) === "ready";
143
- }), u = k(() => {
144
- var C, $;
145
- return f.value && !!(($ = (C = e.value) == null ? void 0 : C.fields) != null && $.tyroLocationId) && !!_.value.deviceId && !c.value;
146
- }), s = k(() => !f.value && !c.value), t = k(
141
+ return ((E = V == null ? void 0 : V.config) == null ? void 0 : E.uniqueId) || "";
142
+ }), p = U(() => !!v.value), y = U(() => {
143
+ var V;
144
+ return ((V = e.value) == null ? void 0 : V.status) === "ready";
145
+ }), c = U(() => {
146
+ var V, $;
147
+ return y.value && !!(($ = (V = e.value) == null ? void 0 : V.fields) != null && $.tyroLocationId) && !!I.value.deviceId && !p.value;
148
+ }), s = U(() => !y.value && !p.value), t = U(
147
149
  () => l("payment.onboard-submission.tyro.syncDisabledHint")
148
- ), o = k(() => c.value ? "Synced" : "Sync");
150
+ ), n = U(() => p.value ? "Synced" : "Sync");
149
151
  async function i() {
150
- if (!_.value.referenceId) {
152
+ if (!I.value.referenceId) {
151
153
  e.value = null;
152
154
  return;
153
155
  }
154
156
  try {
155
- const C = await Te.getByRestaurant(
156
- _.value.referenceId
157
+ const V = await Te.getByRestaurant(
158
+ I.value.referenceId
157
159
  );
158
- e.value = C.find(
160
+ e.value = V.find(
159
161
  ($) => $.type === ye.FdoOnboardType.enum.tyro
160
162
  ) ?? null;
161
- } catch (C) {
163
+ } catch (V) {
162
164
  e.value = null, r.open({
163
165
  type: "error",
164
- message: X(C)
166
+ message: X(V)
165
167
  });
166
168
  }
167
169
  }
168
- const d = _e({
169
- intervalMs: Ce,
170
- timeoutMs: ke,
171
- onTick: async ({ isCurrentRun: C, stop: $ }) => {
172
- var H, z;
173
- const E = await K.readById(_.value._id);
174
- if (!C())
170
+ const u = Ie({
171
+ intervalMs: Ue,
172
+ timeoutMs: Se,
173
+ onTick: async ({ isCurrentRun: V, stop: $ }) => {
174
+ var z, Q;
175
+ const E = await K.readById(I.value._id);
176
+ if (!V())
175
177
  return;
176
- const D = (H = E.gateways) == null ? void 0 : H.find((Q) => Q.gateway === "Tyro");
177
- (D == null ? void 0 : D.gateway) === "Tyro" && ((z = D == null ? void 0 : D.config) != null && z.uniqueId) && ($({ invalidate: !1 }), T(), Object.assign(_.value, E), r.open({
178
+ const D = (z = E.gateways) == null ? void 0 : z.find((J) => J.gateway === "Tyro");
179
+ (D == null ? void 0 : D.gateway) === "Tyro" && ((Q = D == null ? void 0 : D.config) != null && Q.uniqueId) && ($({ invalidate: !1 }), b(), Object.assign(I.value, E), r.open({
178
180
  type: "success",
179
181
  message: "Tyro reader created successfully"
180
182
  }));
181
183
  },
182
184
  onTimeout: () => {
183
- T(), r.open({
185
+ b(), r.open({
184
186
  type: "error",
185
- message: Ve
187
+ message: he
186
188
  });
187
189
  },
188
- onError: (C) => {
189
- T(), r.open({
190
+ onError: (V) => {
191
+ b(), r.open({
190
192
  type: "error",
191
- message: X(C)
193
+ message: X(V)
192
194
  });
193
195
  }
194
- }), x = d.isPolling;
195
- function n() {
196
- d.stop(), T();
196
+ }), w = u.isPolling;
197
+ function o() {
198
+ u.stop(), b();
197
199
  }
198
- function w() {
199
- n(), a(), d.start();
200
+ function x() {
201
+ o(), a(), u.start();
200
202
  }
201
203
  async function L() {
202
- if (!u.value) {
204
+ if (!c.value) {
203
205
  r.open({
204
206
  type: "error",
205
207
  message: "Tyro reader sync is not available"
@@ -207,37 +209,37 @@ function Ue(_) {
207
209
  return;
208
210
  }
209
211
  try {
210
- a(), await K.syncTyroReader(_.value._id), w();
211
- } catch (C) {
212
- n(), r.open({
212
+ a(), await K.syncTyroReader(I.value._id), x();
213
+ } catch (V) {
214
+ o(), r.open({
213
215
  type: "error",
214
- message: X(C)
216
+ message: X(V)
215
217
  });
216
218
  }
217
219
  }
218
220
  return q(
219
- () => _.value.referenceId,
221
+ () => I.value.referenceId,
220
222
  async () => {
221
223
  await i();
222
224
  },
223
225
  { immediate: !0 }
224
226
  ), ve(() => {
225
- n();
227
+ o();
226
228
  }), {
227
- isLoading: p,
228
- isPollingTyroReader: x,
229
- uniqueId: m,
230
- canSyncTyroReader: u,
229
+ isLoading: d,
230
+ isPollingTyroReader: w,
231
+ uniqueId: v,
232
+ canSyncTyroReader: c,
231
233
  showTyroSyncPopover: s,
232
234
  tyroSyncPopoverMessage: t,
233
- tyroSyncButtonLabel: o,
235
+ tyroSyncButtonLabel: n,
234
236
  syncTyroReader: L
235
237
  };
236
238
  }
237
- const Se = {
239
+ const Me = {
238
240
  key: 0,
239
241
  class: "text-sm text-gray-500"
240
- }, Re = { class: "flex mt-6 space-x-6" }, he = { class: "flex-1" }, Me = /* @__PURE__ */ R({
242
+ }, Oe = { class: "flex mt-6 space-x-6" }, Pe = { class: "flex-1" }, qe = /* @__PURE__ */ S({
241
243
  __name: "SoftposGateway",
242
244
  props: {
243
245
  terminal: {
@@ -249,12 +251,12 @@ const Se = {
249
251
  required: !0
250
252
  }
251
253
  },
252
- setup(_) {
253
- const p = _, a = oe().currentCountry, T = [
254
+ setup(I) {
255
+ const d = I, a = oe().currentCountry, b = [
254
256
  {
255
257
  label: "Fiuu Malaysia",
256
258
  value: "cc.feedme.payment.rms",
257
- region: U.F_COUNTRY.enum.MY,
259
+ region: h.F_COUNTRY.enum.MY,
258
260
  gateway: "Fiuu",
259
261
  isLegacy: !0,
260
262
  isOutdated: !0
@@ -262,14 +264,14 @@ const Se = {
262
264
  {
263
265
  label: "Fiuu Malaysia V2",
264
266
  value: "cc.feedme.payment.fiuu_my",
265
- region: U.F_COUNTRY.enum.MY,
267
+ region: h.F_COUNTRY.enum.MY,
266
268
  gateway: "Fiuu",
267
269
  isLegacy: !0
268
270
  },
269
271
  {
270
272
  label: "Fiuu Singapore",
271
273
  value: "cc.feedme.payment.fiuu_sg",
272
- region: U.F_COUNTRY.enum.SG,
274
+ region: h.F_COUNTRY.enum.SG,
273
275
  gateway: "Fiuu",
274
276
  isLegacy: !0
275
277
  },
@@ -277,49 +279,49 @@ const Se = {
277
279
  label: "Softspace Malaysia",
278
280
  value: "cc.feedme.payment.softspace_my",
279
281
  gateway: "Softspace",
280
- region: U.F_COUNTRY.enum.MY
282
+ region: h.F_COUNTRY.enum.MY
281
283
  },
282
284
  {
283
285
  label: "Digio Thailand",
284
286
  value: "cc.feedme.payment.digio_th",
285
287
  gateway: "Digio",
286
- region: U.F_COUNTRY.enum.TH
288
+ region: h.F_COUNTRY.enum.TH
287
289
  },
288
290
  {
289
291
  label: "Tyro Australia",
290
292
  value: "cc.feedme.payment.tyro_au",
291
293
  gateway: "Tyro",
292
- region: U.F_COUNTRY.enum.AU
294
+ region: h.F_COUNTRY.enum.AU
293
295
  }
294
- ], l = A(() => p.terminal), r = b(), e = b({
296
+ ], l = A(() => d.terminal), r = T(), e = T({
295
297
  packageId: "",
296
298
  uniqueId: "",
297
299
  developerId: "",
298
300
  isUat: !1
299
- }), m = () => {
301
+ }), v = () => {
300
302
  e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "", e.value.isUat = !1;
301
- }, c = k(() => T.filter((N) => N.region === a.value)), f = k(() => c.value.find(
303
+ }, p = U(() => b.filter((N) => N.region === a.value)), y = U(() => p.value.find(
302
304
  (N) => N.value === e.value.packageId
303
- )), u = k(
305
+ )), c = U(
304
306
  () => {
305
307
  var N;
306
- return ((N = f.value) == null ? void 0 : N.gateway) === "Tyro";
308
+ return ((N = y.value) == null ? void 0 : N.gateway) === "Tyro";
307
309
  }
308
310
  ), {
309
311
  isLoading: s,
310
312
  isPollingTyroReader: t,
311
- uniqueId: o,
313
+ uniqueId: n,
312
314
  canSyncTyroReader: i,
313
- showTyroSyncPopover: d,
314
- tyroSyncPopoverMessage: x,
315
- tyroSyncButtonLabel: n,
316
- syncTyroReader: w
317
- } = Ue(l), L = k(() => u.value ? "button" : "submit"), C = k(() => u.value ? n.value : "Save"), $ = k(() => u.value ? s.value : !1), E = k(() => u.value ? !i.value || t.value : !1), D = () => {
315
+ showTyroSyncPopover: u,
316
+ tyroSyncPopoverMessage: w,
317
+ tyroSyncButtonLabel: o,
318
+ syncTyroReader: x
319
+ } = Re(l), L = U(() => c.value ? "button" : "submit"), V = U(() => c.value ? o.value : "Save"), $ = U(() => c.value ? s.value : !1), E = U(() => c.value ? !i.value || t.value : !1), D = () => {
318
320
  if (!l.value.gateways || l.value.gateways.length === 0)
319
- return m();
321
+ return v();
320
322
  const N = l.value.gateways[0];
321
323
  if (!N.config)
322
- return m();
324
+ return v();
323
325
  if (N.gateway === "Tyro") {
324
326
  e.value = {
325
327
  packageId: N.config.packageId,
@@ -340,23 +342,23 @@ const Se = {
340
342
  break;
341
343
  case "Softspace":
342
344
  case "Digio":
343
- const h = JSON.parse(N.config.uniqueId);
345
+ const R = JSON.parse(N.config.uniqueId);
344
346
  e.value = {
345
347
  packageId: N.config.packageId,
346
- uniqueId: h.uniqueId,
347
- developerId: h.developerId,
348
- isUat: h.isUat
348
+ uniqueId: R.uniqueId,
349
+ developerId: R.developerId,
350
+ isUat: R.isUat
349
351
  };
350
352
  return;
351
353
  }
352
354
  };
353
355
  q(l, D), G(D);
354
- async function H() {
355
- const N = f.value;
356
+ async function z() {
357
+ const N = y.value;
356
358
  if (!N)
357
359
  return;
358
- let h = e.value.uniqueId;
359
- N.isLegacy || (h = JSON.stringify({
360
+ let R = e.value.uniqueId;
361
+ N.isLegacy || (R = JSON.stringify({
360
362
  uniqueId: e.value.uniqueId,
361
363
  developerId: e.value.developerId,
362
364
  isUat: e.value.isUat
@@ -365,113 +367,113 @@ const Se = {
365
367
  gateway: N.gateway,
366
368
  config: {
367
369
  packageId: N.value,
368
- uniqueId: h
370
+ uniqueId: R
369
371
  }
370
372
  };
371
- (!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = re, await p.onUpdate(l.value);
373
+ (!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = re, await d.onUpdate(l.value);
372
374
  }
373
- async function z(N) {
374
- var h;
375
- (h = l.value.gateways) == null || h.splice(N, 1), p.onUpdate(l.value);
375
+ async function Q(N) {
376
+ var R;
377
+ (R = l.value.gateways) == null || R.splice(N, 1), d.onUpdate(l.value);
376
378
  }
377
- function Q() {
378
- u.value && w();
379
+ function J() {
380
+ c.value && x();
379
381
  }
380
- return (N, h) => {
381
- const re = g("FmSelect"), J = g("FmTextField"), de = g("FmCheckbox"), ie = g("FmButton"), pe = g("FmTooltip"), me = g("FmForm");
382
- return y(), F(me, {
382
+ return (N, R) => {
383
+ const re = g("FmSelect"), W = g("FmTextField"), de = g("FmCheckbox"), ie = g("FmButton"), pe = g("FmTooltip"), me = g("FmForm");
384
+ return f(), F(me, {
383
385
  ref: r.value,
384
386
  class: "flex flex-col gap-16 w-[500px]",
385
- onValidationSuccess: H
387
+ onValidationSuccess: z
386
388
  }, {
387
389
  default: O(() => [
388
- v(re, {
390
+ m(re, {
389
391
  modelValue: e.value.packageId,
390
- "onUpdate:modelValue": h[0] || (h[0] = (Y) => e.value.packageId = Y),
392
+ "onUpdate:modelValue": R[0] || (R[0] = (Y) => e.value.packageId = Y),
391
393
  label: "Package ID",
392
- items: c.value
394
+ items: p.value
393
395
  }, null, 8, ["modelValue", "items"]),
394
- f.value ? (y(), S(P, { key: 0 }, [
395
- u.value ? (y(), F(J, {
396
+ y.value ? (f(), C(P, { key: 0 }, [
397
+ c.value ? (f(), F(W, {
396
398
  key: 0,
397
- "model-value": M(o),
399
+ "model-value": M(n),
398
400
  label: "Unique ID (Reader ID)",
399
401
  disabled: ""
400
- }, null, 8, ["model-value"])) : f.value && f.value.isLegacy ? (y(), S(P, { key: 1 }, [
401
- v(J, {
402
+ }, null, 8, ["model-value"])) : y.value && y.value.isLegacy ? (f(), C(P, { key: 1 }, [
403
+ m(W, {
402
404
  modelValue: e.value.uniqueId,
403
- "onUpdate:modelValue": h[1] || (h[1] = (Y) => e.value.uniqueId = Y),
405
+ "onUpdate:modelValue": R[1] || (R[1] = (Y) => e.value.uniqueId = Y),
404
406
  label: "Unique ID (TID)"
405
407
  }, null, 8, ["modelValue"]),
406
- f.value.isOutdated ? (y(), S("span", Se, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : V("", !0)
407
- ], 64)) : (y(), S(P, { key: 2 }, [
408
- v(J, {
408
+ y.value.isOutdated ? (f(), C("span", Me, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : k("", !0)
409
+ ], 64)) : (f(), C(P, { key: 2 }, [
410
+ m(W, {
409
411
  modelValue: e.value.developerId,
410
- "onUpdate:modelValue": h[2] || (h[2] = (Y) => e.value.developerId = Y),
412
+ "onUpdate:modelValue": R[2] || (R[2] = (Y) => e.value.developerId = Y),
411
413
  label: "Developer ID (MID)"
412
414
  }, null, 8, ["modelValue"]),
413
- v(J, {
415
+ m(W, {
414
416
  modelValue: e.value.uniqueId,
415
- "onUpdate:modelValue": h[3] || (h[3] = (Y) => e.value.uniqueId = Y),
417
+ "onUpdate:modelValue": R[3] || (R[3] = (Y) => e.value.uniqueId = Y),
416
418
  label: "Unique ID (TID)"
417
419
  }, null, 8, ["modelValue"]),
418
- v(de, {
420
+ m(de, {
419
421
  modelValue: e.value.isUat,
420
- "onUpdate:modelValue": h[4] || (h[4] = (Y) => e.value.isUat = Y),
422
+ "onUpdate:modelValue": R[4] || (R[4] = (Y) => e.value.isUat = Y),
421
423
  label: "Is UAT (Test)",
422
424
  value: "1"
423
425
  }, null, 8, ["modelValue"])
424
426
  ], 64)),
425
- I("div", Re, [
426
- l.value.gateways && l.value.gateways.length > 0 ? (y(), F(ie, {
427
+ _("div", Oe, [
428
+ l.value.gateways && l.value.gateways.length > 0 ? (f(), F(ie, {
427
429
  key: 0,
428
430
  class: "flex-1",
429
431
  variant: "secondary",
430
432
  label: "Delete",
431
- onclick: () => z(0)
432
- }, null, 8, ["onclick"])) : V("", !0),
433
- u.value && M(d) && E.value ? (y(), F(pe, {
433
+ onclick: () => Q(0)
434
+ }, null, 8, ["onclick"])) : k("", !0),
435
+ c.value && M(u) && E.value ? (f(), F(pe, {
434
436
  key: 1,
435
437
  class: "flex-1",
436
438
  variant: "plain",
437
439
  placement: "top",
438
- content: M(x)
440
+ content: M(w)
439
441
  }, {
440
442
  default: O(() => [
441
- I("div", he, [
442
- v(ie, {
443
+ _("div", Pe, [
444
+ m(ie, {
443
445
  type: L.value,
444
446
  class: "w-full",
445
447
  variant: "primary",
446
448
  loading: $.value,
447
449
  disabled: E.value,
448
- label: C.value,
449
- onClick: Q
450
+ label: V.value,
451
+ onClick: J
450
452
  }, null, 8, ["type", "loading", "disabled", "label"])
451
453
  ])
452
454
  ]),
453
455
  _: 1
454
- }, 8, ["content"])) : (y(), F(ie, {
456
+ }, 8, ["content"])) : (f(), F(ie, {
455
457
  key: 2,
456
458
  type: L.value,
457
459
  class: "flex-1",
458
460
  variant: "primary",
459
461
  loading: $.value,
460
462
  disabled: E.value,
461
- label: C.value,
462
- onClick: Q
463
+ label: V.value,
464
+ onClick: J
463
465
  }, null, 8, ["type", "loading", "disabled", "label"]))
464
466
  ])
465
- ], 64)) : V("", !0)
467
+ ], 64)) : k("", !0)
466
468
  ]),
467
469
  _: 1
468
470
  }, 512);
469
471
  };
470
472
  }
471
- }), Oe = {
473
+ }), Ge = {
472
474
  key: 0,
473
475
  class: "flex items-center justify-center min-h-[80vh]"
474
- }, Pe = { class: "flex mt-6 space-x-6" }, qe = /* @__PURE__ */ R({
476
+ }, Ae = { class: "flex mt-6 space-x-6" }, $e = /* @__PURE__ */ S({
475
477
  __name: "TerminalGateway",
476
478
  props: {
477
479
  terminal: {
@@ -483,63 +485,63 @@ const Se = {
483
485
  required: !0
484
486
  }
485
487
  },
486
- setup(_) {
487
- const { isLoading: p, startAsyncCall: a } = le(), T = _, l = A(() => T.terminal), r = b(), e = b(), m = b(-1), c = b({
488
+ setup(I) {
489
+ const { isLoading: d, startAsyncCall: a } = le(), b = I, l = A(() => b.terminal), r = T(), e = T(), v = T(-1), p = T({
488
490
  terminalId: ""
489
- }), f = () => {
490
- c.value.terminalId = "", m.value = -1;
491
- }, u = () => {
491
+ }), y = () => {
492
+ p.value.terminalId = "", v.value = -1;
493
+ }, c = () => {
492
494
  if (a(async () => {
493
- r.value = await K.getRestaurantTerminals(T.terminal.referenceId);
494
- }), !T.terminal.ecrs)
495
- return f();
496
- const o = T.terminal.ecrs.findIndex((d) => d && d.gateway && d.gateway === "FeedMe");
497
- if (o === -1)
498
- return f();
499
- m.value = o;
500
- const i = T.terminal.ecrs.at(o);
501
- i.gateway === "FeedMe" && i.config && (c.value = {
495
+ r.value = await K.getRestaurantTerminals(b.terminal.referenceId);
496
+ }), !b.terminal.ecrs)
497
+ return y();
498
+ const n = b.terminal.ecrs.findIndex((u) => u && u.gateway && u.gateway === "FeedMe");
499
+ if (n === -1)
500
+ return y();
501
+ v.value = n;
502
+ const i = b.terminal.ecrs.at(n);
503
+ i.gateway === "FeedMe" && i.config && (p.value = {
502
504
  terminalId: i.config.terminalId
503
505
  });
504
506
  };
505
- q(l, u), G(u);
506
- const s = k(() => (r.value ?? []).map((o) => ({
507
- label: o.name ?? o._id,
508
- value: o._id
507
+ q(l, c), G(c);
508
+ const s = U(() => (r.value ?? []).map((n) => ({
509
+ label: n.name ?? n._id,
510
+ value: n._id
509
511
  })));
510
- async function t(o) {
512
+ async function t(n) {
511
513
  var i;
512
- (i = T.terminal.ecrs) == null || i.splice(o, 1), T.onUpdate(T.terminal);
514
+ (i = b.terminal.ecrs) == null || i.splice(n, 1), b.onUpdate(b.terminal);
513
515
  }
514
- return (o, i) => {
515
- const d = g("FmCircularProgress"), x = g("FmSelect"), n = g("FmButton"), w = g("FmForm");
516
- return M(p) ? (y(), S("div", Oe, [
517
- v(d, { size: "xxl" })
518
- ])) : (y(), F(w, {
516
+ return (n, i) => {
517
+ const u = g("FmCircularProgress"), w = g("FmSelect"), o = g("FmButton"), x = g("FmForm");
518
+ return M(d) ? (f(), C("div", Ge, [
519
+ m(u, { size: "xxl" })
520
+ ])) : (f(), F(x, {
519
521
  key: 1,
520
522
  ref: e.value,
521
523
  class: "flex flex-col gap-16 w-[500px]",
522
524
  onValidationSuccess: i[1] || (i[1] = () => {
523
- m.value > -1 ? l.value.ecrs[m.value] = { gateway: "FeedMe", config: c.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "FeedMe", config: c.value })), T.onUpdate(l.value);
525
+ v.value > -1 ? l.value.ecrs[v.value] = { gateway: "FeedMe", config: p.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "FeedMe", config: p.value })), b.onUpdate(l.value);
524
526
  })
525
527
  }, {
526
528
  default: O(() => [
527
- v(x, {
528
- modelValue: c.value.terminalId,
529
- "onUpdate:modelValue": i[0] || (i[0] = (L) => c.value.terminalId = L),
529
+ m(w, {
530
+ modelValue: p.value.terminalId,
531
+ "onUpdate:modelValue": i[0] || (i[0] = (L) => p.value.terminalId = L),
530
532
  label: "Terminal ID",
531
533
  items: s.value,
532
534
  rules: M(ue)(M(ce).string())
533
535
  }, null, 8, ["modelValue", "items", "rules"]),
534
- I("div", Pe, [
535
- m.value > -1 ? (y(), F(n, {
536
+ _("div", Ae, [
537
+ v.value > -1 ? (f(), F(o, {
536
538
  key: 0,
537
539
  class: "flex-1",
538
540
  variant: "secondary",
539
541
  label: "Delete",
540
- onclick: () => t(m.value)
541
- }, null, 8, ["onclick"])) : V("", !0),
542
- v(n, {
542
+ onclick: () => t(v.value)
543
+ }, null, 8, ["onclick"])) : k("", !0),
544
+ m(o, {
543
545
  type: "submit",
544
546
  class: "flex-1",
545
547
  variant: "primary",
@@ -551,7 +553,7 @@ const Se = {
551
553
  }, 512));
552
554
  };
553
555
  }
554
- }), Ge = { class: "flex mt-6 space-x-6" }, Ae = /* @__PURE__ */ R({
556
+ }), De = { class: "flex mt-6 space-x-6" }, Be = /* @__PURE__ */ S({
555
557
  __name: "GhlGateway",
556
558
  props: {
557
559
  terminal: {
@@ -563,68 +565,68 @@ const Se = {
563
565
  required: !0
564
566
  }
565
567
  },
566
- setup(_) {
567
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b({
568
+ setup(I) {
569
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T({
568
570
  merchantId: "",
569
571
  terminalId: "",
570
572
  privateKey: ""
571
573
  }), e = () => {
572
574
  r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", l.value = -1;
573
- }, m = () => {
575
+ }, v = () => {
574
576
  if (!a.value.ecrs)
575
577
  return e();
576
- const f = a.value.ecrs.findIndex((s) => s && s.gateway && s.gateway === "Ghl");
577
- if (f === -1)
578
+ const y = a.value.ecrs.findIndex((s) => s && s.gateway && s.gateway === "Ghl");
579
+ if (y === -1)
578
580
  return e();
579
- l.value = f;
580
- const u = a.value.ecrs.at(f);
581
- u.gateway === "Ghl" && u.config && (r.value = {
582
- merchantId: u.config.merchantId,
583
- terminalId: u.config.terminalId,
584
- privateKey: u.config.privateKey || ""
581
+ l.value = y;
582
+ const c = a.value.ecrs.at(y);
583
+ c.gateway === "Ghl" && c.config && (r.value = {
584
+ merchantId: c.config.merchantId,
585
+ terminalId: c.config.terminalId,
586
+ privateKey: c.config.privateKey || ""
585
587
  });
586
588
  };
587
- q(a, m), G(m);
588
- async function c(f) {
589
- var u;
590
- (u = a.value.ecrs) == null || u.splice(f, 1), p.onUpdate(a.value);
589
+ q(a, v), G(v);
590
+ async function p(y) {
591
+ var c;
592
+ (c = a.value.ecrs) == null || c.splice(y, 1), d.onUpdate(a.value);
591
593
  }
592
- return (f, u) => {
593
- const s = g("FmTextField"), t = g("FmTextarea"), o = g("FmButton"), i = g("FmForm");
594
- return y(), F(i, {
595
- ref: T.value,
594
+ return (y, c) => {
595
+ const s = g("FmTextField"), t = g("FmTextarea"), n = g("FmButton"), i = g("FmForm");
596
+ return f(), F(i, {
597
+ ref: b.value,
596
598
  class: "flex flex-col gap-16 w-[500px]",
597
- onValidationSuccess: u[3] || (u[3] = () => {
598
- l.value > -1 ? a.value.ecrs[l.value] = { gateway: "Ghl", config: r.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: r.value })), p.onUpdate(a.value);
599
+ onValidationSuccess: c[3] || (c[3] = () => {
600
+ l.value > -1 ? a.value.ecrs[l.value] = { gateway: "Ghl", config: r.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: r.value })), d.onUpdate(a.value);
599
601
  })
600
602
  }, {
601
603
  default: O(() => [
602
- v(s, {
604
+ m(s, {
603
605
  modelValue: r.value.merchantId,
604
- "onUpdate:modelValue": u[0] || (u[0] = (d) => r.value.merchantId = d),
606
+ "onUpdate:modelValue": c[0] || (c[0] = (u) => r.value.merchantId = u),
605
607
  label: "Merchant ID"
606
608
  }, null, 8, ["modelValue"]),
607
- v(s, {
609
+ m(s, {
608
610
  modelValue: r.value.terminalId,
609
- "onUpdate:modelValue": u[1] || (u[1] = (d) => r.value.terminalId = d),
611
+ "onUpdate:modelValue": c[1] || (c[1] = (u) => r.value.terminalId = u),
610
612
  label: "Terminal ID"
611
613
  }, null, 8, ["modelValue"]),
612
- v(t, {
614
+ m(t, {
613
615
  modelValue: r.value.privateKey,
614
- "onUpdate:modelValue": u[2] || (u[2] = (d) => r.value.privateKey = d),
616
+ "onUpdate:modelValue": c[2] || (c[2] = (u) => r.value.privateKey = u),
615
617
  label: "Private Key",
616
618
  "label-mark": "optional",
617
619
  "label-info": "Default will use FeedMe Private Key"
618
620
  }, null, 8, ["modelValue"]),
619
- I("div", Ge, [
620
- l.value > -1 ? (y(), F(o, {
621
+ _("div", De, [
622
+ l.value > -1 ? (f(), F(n, {
621
623
  key: 0,
622
624
  class: "flex-1",
623
625
  variant: "secondary",
624
626
  label: "Delete",
625
- onclick: () => c(l.value)
626
- }, null, 8, ["onclick"])) : V("", !0),
627
- v(o, {
627
+ onclick: () => p(l.value)
628
+ }, null, 8, ["onclick"])) : k("", !0),
629
+ m(n, {
628
630
  type: "submit",
629
631
  class: "flex-1",
630
632
  variant: "primary",
@@ -636,7 +638,7 @@ const Se = {
636
638
  }, 512);
637
639
  };
638
640
  }
639
- }), $e = { class: "flex items-end" }, De = { class: "flex flex-wrap gap-8 items-center mt-4" }, Be = { class: "flex mt-6 space-x-6" }, Le = /* @__PURE__ */ R({
641
+ }), Le = { class: "flex items-end" }, Ee = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ye = { class: "flex mt-6 space-x-6" }, Ke = /* @__PURE__ */ S({
640
642
  __name: "MaybankGateway",
641
643
  props: {
642
644
  terminal: {
@@ -648,49 +650,49 @@ const Se = {
648
650
  required: !0
649
651
  }
650
652
  },
651
- setup(_) {
652
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
653
+ setup(I) {
654
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
653
655
  ip: "",
654
656
  receiptName: "",
655
657
  cardTypes: []
656
- }), m = () => {
658
+ }), v = () => {
657
659
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
658
- }, c = () => {
660
+ }, p = () => {
659
661
  var i;
660
662
  if (!a.value.ecrIntegrations)
661
- return m();
662
- const s = a.value.ecrIntegrations, t = s.findIndex((d) => d && d.gateway && d.gateway === "Maybank");
663
+ return v();
664
+ const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Maybank");
663
665
  if (t === -1)
664
- return m();
666
+ return v();
665
667
  l.value = t;
666
- const o = s.at(t);
667
- o.gateway === "Maybank" && o.config && (e.value = {
668
- ip: o.config.ip ?? "",
669
- receiptName: o.receiptName ?? "",
670
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
668
+ const n = s.at(t);
669
+ n.gateway === "Maybank" && n.config && (e.value = {
670
+ ip: n.config.ip ?? "",
671
+ receiptName: n.receiptName ?? "",
672
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
671
673
  });
672
674
  };
673
- q(a, c), G(c);
674
- async function f(s) {
675
+ q(a, p), G(p);
676
+ async function y(s) {
675
677
  var t;
676
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
678
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
677
679
  }
678
- async function u() {
680
+ async function c() {
679
681
  e.value.cardTypes.push(r.value), r.value = "";
680
682
  }
681
683
  return (s, t) => {
682
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
683
- return y(), F(x, {
684
- ref: T.value,
684
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
685
+ return f(), F(w, {
686
+ ref: b.value,
685
687
  class: "flex flex-col gap-16 w-[500px]",
686
688
  onValidationSuccess: t[3] || (t[3] = () => {
687
- var n, w;
689
+ var o, x;
688
690
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
689
691
  gateway: "Maybank",
690
692
  config: { ip: e.value.ip },
691
693
  receiptName: e.value.receiptName,
692
694
  dialogConfig: {
693
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
695
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
694
696
  cardTypes: e.value.cardTypes
695
697
  }
696
698
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -700,51 +702,51 @@ const Se = {
700
702
  dialogConfig: {
701
703
  cardTypes: e.value.cardTypes
702
704
  }
703
- })), p.onUpdate(a.value);
705
+ })), d.onUpdate(a.value);
704
706
  })
705
707
  }, {
706
708
  default: O(() => [
707
- v(o, {
709
+ m(n, {
708
710
  modelValue: e.value.ip,
709
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
711
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
710
712
  label: "IP Address"
711
713
  }, null, 8, ["modelValue"]),
712
- v(o, {
714
+ m(n, {
713
715
  modelValue: e.value.receiptName,
714
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
716
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
715
717
  label: "Receipt Payment Name",
716
718
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
717
719
  }, null, 8, ["modelValue"]),
718
- I("div", $e, [
719
- v(o, {
720
+ _("div", Le, [
721
+ m(n, {
720
722
  modelValue: r.value,
721
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
723
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
722
724
  label: "Fallback Card Types",
723
725
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
724
726
  }, null, 8, ["modelValue"]),
725
- v(i, {
727
+ m(i, {
726
728
  class: "ml-4",
727
729
  icon: "add",
728
- onClick: u
730
+ onClick: c
729
731
  })
730
732
  ]),
731
- I("div", De, [
732
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
733
- key: n,
734
- label: n,
733
+ _("div", Ee, [
734
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
735
+ key: o,
736
+ label: o,
735
737
  removable: !0,
736
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
738
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
737
739
  }, null, 8, ["label", "onChipClosed"]))), 128))
738
740
  ]),
739
- I("div", Be, [
740
- l.value > -1 ? (y(), F(i, {
741
+ _("div", Ye, [
742
+ l.value > -1 ? (f(), F(i, {
741
743
  key: 0,
742
744
  class: "flex-1",
743
745
  variant: "secondary",
744
746
  label: "Delete",
745
- onclick: () => f(l.value)
746
- }, null, 8, ["onclick"])) : V("", !0),
747
- v(i, {
747
+ onclick: () => y(l.value)
748
+ }, null, 8, ["onclick"])) : k("", !0),
749
+ m(i, {
748
750
  type: "submit",
749
751
  class: "flex-1",
750
752
  variant: "primary",
@@ -756,7 +758,7 @@ const Se = {
756
758
  }, 512);
757
759
  };
758
760
  }
759
- }), Ee = { class: "flex items-end" }, Ye = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ke = { class: "flex mt-6 space-x-6" }, je = /* @__PURE__ */ R({
761
+ }), je = { class: "flex items-end" }, He = { class: "flex flex-wrap gap-8 items-center mt-4" }, ze = { class: "flex mt-6 space-x-6" }, Qe = /* @__PURE__ */ S({
760
762
  __name: "Maybank2Gateway",
761
763
  props: {
762
764
  terminal: {
@@ -768,49 +770,49 @@ const Se = {
768
770
  required: !0
769
771
  }
770
772
  },
771
- setup(_) {
772
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
773
+ setup(I) {
774
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
773
775
  ip: "",
774
776
  receiptName: "",
775
777
  cardTypes: []
776
- }), m = () => {
778
+ }), v = () => {
777
779
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
778
- }, c = () => {
780
+ }, p = () => {
779
781
  var i;
780
782
  if (!a.value.ecrIntegrations)
781
- return m();
782
- const s = a.value.ecrIntegrations, t = s.findIndex((d) => d && d.gateway && d.gateway === "Maybank2");
783
+ return v();
784
+ const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Maybank2");
783
785
  if (t === -1)
784
- return m();
786
+ return v();
785
787
  l.value = t;
786
- const o = s.at(t);
787
- o.gateway === "Maybank2" && o.config && (e.value = {
788
- ip: o.config.ip ?? "",
789
- receiptName: o.receiptName ?? "",
790
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
788
+ const n = s.at(t);
789
+ n.gateway === "Maybank2" && n.config && (e.value = {
790
+ ip: n.config.ip ?? "",
791
+ receiptName: n.receiptName ?? "",
792
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
791
793
  });
792
794
  };
793
- q(a, c), G(c);
794
- async function f(s) {
795
+ q(a, p), G(p);
796
+ async function y(s) {
795
797
  var t;
796
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
798
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
797
799
  }
798
- async function u() {
800
+ async function c() {
799
801
  e.value.cardTypes.push(r.value), r.value = "";
800
802
  }
801
803
  return (s, t) => {
802
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
803
- return y(), F(x, {
804
- ref: T.value,
804
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
805
+ return f(), F(w, {
806
+ ref: b.value,
805
807
  class: "flex flex-col gap-16 w-[500px]",
806
808
  onValidationSuccess: t[3] || (t[3] = () => {
807
- var n, w;
809
+ var o, x;
808
810
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
809
811
  gateway: "Maybank2",
810
812
  config: { ip: e.value.ip },
811
813
  receiptName: e.value.receiptName,
812
814
  dialogConfig: {
813
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
815
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
814
816
  cardTypes: e.value.cardTypes
815
817
  }
816
818
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -820,51 +822,51 @@ const Se = {
820
822
  dialogConfig: {
821
823
  cardTypes: e.value.cardTypes
822
824
  }
823
- })), p.onUpdate(a.value);
825
+ })), d.onUpdate(a.value);
824
826
  })
825
827
  }, {
826
828
  default: O(() => [
827
- v(o, {
829
+ m(n, {
828
830
  modelValue: e.value.ip,
829
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
831
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
830
832
  label: "IP Address"
831
833
  }, null, 8, ["modelValue"]),
832
- v(o, {
834
+ m(n, {
833
835
  modelValue: e.value.receiptName,
834
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
836
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
835
837
  label: "Receipt Payment Name",
836
838
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
837
839
  }, null, 8, ["modelValue"]),
838
- I("div", Ee, [
839
- v(o, {
840
+ _("div", je, [
841
+ m(n, {
840
842
  modelValue: r.value,
841
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
843
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
842
844
  label: "Fallback Card Types",
843
845
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
844
846
  }, null, 8, ["modelValue"]),
845
- v(i, {
847
+ m(i, {
846
848
  class: "ml-4",
847
849
  icon: "add",
848
- onClick: u
850
+ onClick: c
849
851
  })
850
852
  ]),
851
- I("div", Ye, [
852
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
853
- key: n,
854
- label: n,
853
+ _("div", He, [
854
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
855
+ key: o,
856
+ label: o,
855
857
  removable: !0,
856
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
858
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
857
859
  }, null, 8, ["label", "onChipClosed"]))), 128))
858
860
  ]),
859
- I("div", Ke, [
860
- l.value > -1 ? (y(), F(i, {
861
+ _("div", ze, [
862
+ l.value > -1 ? (f(), F(i, {
861
863
  key: 0,
862
864
  class: "flex-1",
863
865
  variant: "secondary",
864
866
  label: "Delete",
865
- onclick: () => f(l.value)
866
- }, null, 8, ["onclick"])) : V("", !0),
867
- v(i, {
867
+ onclick: () => y(l.value)
868
+ }, null, 8, ["onclick"])) : k("", !0),
869
+ m(i, {
868
870
  type: "submit",
869
871
  class: "flex-1",
870
872
  variant: "primary",
@@ -876,7 +878,7 @@ const Se = {
876
878
  }, 512);
877
879
  };
878
880
  }
879
- }), He = { class: "flex items-end" }, ze = { class: "flex flex-wrap gap-8 items-center mt-4" }, Qe = { class: "flex mt-6 space-x-6" }, Je = /* @__PURE__ */ R({
881
+ }), Je = { class: "flex items-end" }, We = { class: "flex flex-wrap gap-8 items-center mt-4" }, Xe = { class: "flex mt-6 space-x-6" }, Ze = /* @__PURE__ */ S({
880
882
  __name: "Maybank3Gateway",
881
883
  props: {
882
884
  terminal: {
@@ -888,49 +890,49 @@ const Se = {
888
890
  required: !0
889
891
  }
890
892
  },
891
- setup(_) {
892
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
893
+ setup(I) {
894
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
893
895
  receiptName: "",
894
896
  config: {},
895
897
  cardTypes: []
896
- }), m = () => {
898
+ }), v = () => {
897
899
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
898
- }, c = () => {
900
+ }, p = () => {
899
901
  var i;
900
902
  if (!a.value.ecrIntegrations)
901
- return m();
902
- const s = a.value.ecrIntegrations, t = s.findIndex((d) => d && d.gateway && d.gateway === "Maybank3");
903
+ return v();
904
+ const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Maybank3");
903
905
  if (t === -1)
904
- return m();
906
+ return v();
905
907
  l.value = t;
906
- const o = s.at(t);
907
- o.gateway === "Maybank3" && o.config && (e.value = {
908
- config: o.config,
909
- receiptName: o.receiptName ?? "",
910
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
908
+ const n = s.at(t);
909
+ n.gateway === "Maybank3" && n.config && (e.value = {
910
+ config: n.config,
911
+ receiptName: n.receiptName ?? "",
912
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
911
913
  });
912
914
  };
913
- q(a, c), G(c);
914
- async function f(s) {
915
+ q(a, p), G(p);
916
+ async function y(s) {
915
917
  var t;
916
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
918
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
917
919
  }
918
- async function u() {
920
+ async function c() {
919
921
  e.value.cardTypes.push(r.value), r.value = "";
920
922
  }
921
923
  return (s, t) => {
922
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
923
- return y(), F(x, {
924
- ref: T.value,
924
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
925
+ return f(), F(w, {
926
+ ref: b.value,
925
927
  class: "flex flex-col gap-16 w-[500px]",
926
928
  onValidationSuccess: t[2] || (t[2] = () => {
927
- var n, w;
929
+ var o, x;
928
930
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
929
931
  gateway: "Maybank3",
930
932
  config: e.value.config,
931
933
  receiptName: e.value.receiptName,
932
934
  dialogConfig: {
933
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
935
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
934
936
  cardTypes: e.value.cardTypes
935
937
  }
936
938
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -940,46 +942,46 @@ const Se = {
940
942
  dialogConfig: {
941
943
  cardTypes: e.value.cardTypes
942
944
  }
943
- })), p.onUpdate(a.value);
945
+ })), d.onUpdate(a.value);
944
946
  })
945
947
  }, {
946
948
  default: O(() => [
947
- v(o, {
949
+ m(n, {
948
950
  modelValue: e.value.receiptName,
949
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
951
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
950
952
  label: "Receipt Payment Name",
951
953
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
952
954
  }, null, 8, ["modelValue"]),
953
- I("div", He, [
954
- v(o, {
955
+ _("div", Je, [
956
+ m(n, {
955
957
  modelValue: r.value,
956
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
958
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
957
959
  label: "Fallback Card Types",
958
960
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
959
961
  }, null, 8, ["modelValue"]),
960
- v(i, {
962
+ m(i, {
961
963
  class: "ml-4",
962
964
  icon: "add",
963
- onClick: u
965
+ onClick: c
964
966
  })
965
967
  ]),
966
- I("div", ze, [
967
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
968
- key: n,
969
- label: n,
968
+ _("div", We, [
969
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
970
+ key: o,
971
+ label: o,
970
972
  removable: !0,
971
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
973
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
972
974
  }, null, 8, ["label", "onChipClosed"]))), 128))
973
975
  ]),
974
- I("div", Qe, [
975
- l.value > -1 ? (y(), F(i, {
976
+ _("div", Xe, [
977
+ l.value > -1 ? (f(), F(i, {
976
978
  key: 0,
977
979
  class: "flex-1",
978
980
  variant: "secondary",
979
981
  label: "Delete",
980
- onclick: () => f(l.value)
981
- }, null, 8, ["onclick"])) : V("", !0),
982
- v(i, {
982
+ onclick: () => y(l.value)
983
+ }, null, 8, ["onclick"])) : k("", !0),
984
+ m(i, {
983
985
  type: "submit",
984
986
  class: "flex-1",
985
987
  variant: "primary",
@@ -991,7 +993,7 @@ const Se = {
991
993
  }, 512);
992
994
  };
993
995
  }
994
- }), We = { class: "flex items-end" }, Xe = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ze = { class: "flex mt-6 space-x-6" }, ea = /* @__PURE__ */ R({
996
+ }), ea = { class: "flex items-end" }, aa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ta = { class: "flex mt-6 space-x-6" }, la = /* @__PURE__ */ S({
995
997
  __name: "NetsGateway",
996
998
  props: {
997
999
  terminal: {
@@ -1003,49 +1005,49 @@ const Se = {
1003
1005
  required: !0
1004
1006
  }
1005
1007
  },
1006
- setup(_) {
1007
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
1008
+ setup(I) {
1009
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
1008
1010
  ip: "",
1009
1011
  receiptName: "",
1010
1012
  cardTypes: []
1011
- }), m = () => {
1013
+ }), v = () => {
1012
1014
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1013
- }, c = () => {
1015
+ }, p = () => {
1014
1016
  var i;
1015
1017
  if (!a.value.ecrIntegrations)
1016
- return m();
1017
- const s = a.value.ecrIntegrations, t = s.findIndex((d) => d && d.gateway && d.gateway === "Nets");
1018
+ return v();
1019
+ const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Nets");
1018
1020
  if (t === -1)
1019
- return m();
1021
+ return v();
1020
1022
  l.value = t;
1021
- const o = s.at(t);
1022
- o.gateway === "Nets" && o.config && (e.value = {
1023
- ip: o.config.ip ?? "",
1024
- receiptName: o.receiptName ?? "",
1025
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1023
+ const n = s.at(t);
1024
+ n.gateway === "Nets" && n.config && (e.value = {
1025
+ ip: n.config.ip ?? "",
1026
+ receiptName: n.receiptName ?? "",
1027
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1026
1028
  });
1027
1029
  };
1028
- q(a, c), G(c);
1029
- async function f(s) {
1030
+ q(a, p), G(p);
1031
+ async function y(s) {
1030
1032
  var t;
1031
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
1033
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1032
1034
  }
1033
- async function u() {
1035
+ async function c() {
1034
1036
  e.value.cardTypes.push(r.value), r.value = "";
1035
1037
  }
1036
1038
  return (s, t) => {
1037
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
1038
- return y(), F(x, {
1039
- ref: T.value,
1039
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
1040
+ return f(), F(w, {
1041
+ ref: b.value,
1040
1042
  class: "flex flex-col gap-16 w-[500px]",
1041
1043
  onValidationSuccess: t[3] || (t[3] = () => {
1042
- var n, w;
1044
+ var o, x;
1043
1045
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1044
1046
  gateway: "Nets",
1045
1047
  config: { ip: e.value.ip },
1046
1048
  receiptName: e.value.receiptName,
1047
1049
  dialogConfig: {
1048
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
1050
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
1049
1051
  cardTypes: e.value.cardTypes
1050
1052
  }
1051
1053
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1055,51 +1057,51 @@ const Se = {
1055
1057
  dialogConfig: {
1056
1058
  cardTypes: e.value.cardTypes
1057
1059
  }
1058
- })), p.onUpdate(a.value);
1060
+ })), d.onUpdate(a.value);
1059
1061
  })
1060
1062
  }, {
1061
1063
  default: O(() => [
1062
- v(o, {
1064
+ m(n, {
1063
1065
  modelValue: e.value.ip,
1064
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
1066
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
1065
1067
  label: "IP Address"
1066
1068
  }, null, 8, ["modelValue"]),
1067
- v(o, {
1069
+ m(n, {
1068
1070
  modelValue: e.value.receiptName,
1069
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
1071
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
1070
1072
  label: "Receipt Payment Name",
1071
1073
  "label-info": "Default receipt display will be 'TERMINAL_NETS'"
1072
1074
  }, null, 8, ["modelValue"]),
1073
- I("div", We, [
1074
- v(o, {
1075
+ _("div", ea, [
1076
+ m(n, {
1075
1077
  modelValue: r.value,
1076
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
1078
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
1077
1079
  label: "Fallback Card Types",
1078
1080
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1079
1081
  }, null, 8, ["modelValue"]),
1080
- v(i, {
1082
+ m(i, {
1081
1083
  class: "ml-4",
1082
1084
  icon: "add",
1083
- onClick: u
1085
+ onClick: c
1084
1086
  })
1085
1087
  ]),
1086
- I("div", Xe, [
1087
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
1088
- key: n,
1089
- label: n,
1088
+ _("div", aa, [
1089
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
1090
+ key: o,
1091
+ label: o,
1090
1092
  removable: !0,
1091
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1093
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1092
1094
  }, null, 8, ["label", "onChipClosed"]))), 128))
1093
1095
  ]),
1094
- I("div", Ze, [
1095
- l.value > -1 ? (y(), F(i, {
1096
+ _("div", ta, [
1097
+ l.value > -1 ? (f(), F(i, {
1096
1098
  key: 0,
1097
1099
  class: "flex-1",
1098
1100
  variant: "secondary",
1099
1101
  label: "Delete",
1100
- onclick: () => f(l.value)
1101
- }, null, 8, ["onclick"])) : V("", !0),
1102
- v(i, {
1102
+ onclick: () => y(l.value)
1103
+ }, null, 8, ["onclick"])) : k("", !0),
1104
+ m(i, {
1103
1105
  type: "submit",
1104
1106
  class: "flex-1",
1105
1107
  variant: "primary",
@@ -1111,7 +1113,7 @@ const Se = {
1111
1113
  }, 512);
1112
1114
  };
1113
1115
  }
1114
- }), aa = { class: "flex items-end" }, ta = { class: "flex flex-wrap gap-8 items-center mt-4" }, la = { class: "flex mt-6 space-x-6" }, na = /* @__PURE__ */ R({
1116
+ }), na = { class: "flex items-end" }, oa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ra = { class: "flex mt-6 space-x-6" }, ia = /* @__PURE__ */ S({
1115
1117
  __name: "KBankGateway",
1116
1118
  props: {
1117
1119
  terminal: {
@@ -1123,47 +1125,47 @@ const Se = {
1123
1125
  required: !0
1124
1126
  }
1125
1127
  },
1126
- setup(_) {
1127
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
1128
+ setup(I) {
1129
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
1128
1130
  receiptName: "",
1129
1131
  cardTypes: []
1130
- }), m = () => {
1132
+ }), v = () => {
1131
1133
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1132
- }, c = () => {
1134
+ }, p = () => {
1133
1135
  var i;
1134
1136
  if (!a.value.ecrIntegrations)
1135
- return m();
1136
- const s = a.value.ecrIntegrations, t = s.findIndex((d) => d && d.gateway && d.gateway === "Kbank");
1137
+ return v();
1138
+ const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Kbank");
1137
1139
  if (t === -1)
1138
- return m();
1140
+ return v();
1139
1141
  l.value = t;
1140
- const o = s.at(t);
1141
- o.gateway === "Kbank" && o.config && (e.value = {
1142
- receiptName: o.receiptName ?? "",
1143
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1142
+ const n = s.at(t);
1143
+ n.gateway === "Kbank" && n.config && (e.value = {
1144
+ receiptName: n.receiptName ?? "",
1145
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1144
1146
  });
1145
1147
  };
1146
- q(a, c), G(c);
1147
- async function f(s) {
1148
+ q(a, p), G(p);
1149
+ async function y(s) {
1148
1150
  var t;
1149
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
1151
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1150
1152
  }
1151
- async function u() {
1153
+ async function c() {
1152
1154
  e.value.cardTypes.push(r.value), r.value = "";
1153
1155
  }
1154
1156
  return (s, t) => {
1155
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
1156
- return y(), F(x, {
1157
- ref: T.value,
1157
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
1158
+ return f(), F(w, {
1159
+ ref: b.value,
1158
1160
  class: "flex flex-col gap-16 w-[500px]",
1159
1161
  onValidationSuccess: t[2] || (t[2] = () => {
1160
- var n, w;
1162
+ var o, x;
1161
1163
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1162
1164
  gateway: "Kbank",
1163
1165
  config: {},
1164
1166
  receiptName: e.value.receiptName,
1165
1167
  dialogConfig: {
1166
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
1168
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
1167
1169
  cardTypes: e.value.cardTypes
1168
1170
  }
1169
1171
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1173,46 +1175,46 @@ const Se = {
1173
1175
  dialogConfig: {
1174
1176
  cardTypes: e.value.cardTypes
1175
1177
  }
1176
- })), p.onUpdate(a.value);
1178
+ })), d.onUpdate(a.value);
1177
1179
  })
1178
1180
  }, {
1179
1181
  default: O(() => [
1180
- v(o, {
1182
+ m(n, {
1181
1183
  modelValue: e.value.receiptName,
1182
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
1184
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1183
1185
  label: "Receipt Payment Name",
1184
1186
  "label-info": "Default receipt display will be 'TERMINAL_KBANK'"
1185
1187
  }, null, 8, ["modelValue"]),
1186
- I("div", aa, [
1187
- v(o, {
1188
+ _("div", na, [
1189
+ m(n, {
1188
1190
  modelValue: r.value,
1189
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
1191
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1190
1192
  label: "Fallback Card Types",
1191
1193
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1192
1194
  }, null, 8, ["modelValue"]),
1193
- v(i, {
1195
+ m(i, {
1194
1196
  class: "ml-4",
1195
1197
  icon: "add",
1196
- onClick: u
1198
+ onClick: c
1197
1199
  })
1198
1200
  ]),
1199
- I("div", ta, [
1200
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
1201
- key: n,
1202
- label: n,
1201
+ _("div", oa, [
1202
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
1203
+ key: o,
1204
+ label: o,
1203
1205
  removable: !0,
1204
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1206
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1205
1207
  }, null, 8, ["label", "onChipClosed"]))), 128))
1206
1208
  ]),
1207
- I("div", la, [
1208
- l.value > -1 ? (y(), F(i, {
1209
+ _("div", ra, [
1210
+ l.value > -1 ? (f(), F(i, {
1209
1211
  key: 0,
1210
1212
  class: "flex-1",
1211
1213
  variant: "secondary",
1212
1214
  label: "Delete",
1213
- onclick: () => f(l.value)
1214
- }, null, 8, ["onclick"])) : V("", !0),
1215
- v(i, {
1215
+ onclick: () => y(l.value)
1216
+ }, null, 8, ["onclick"])) : k("", !0),
1217
+ m(i, {
1216
1218
  type: "submit",
1217
1219
  class: "flex-1",
1218
1220
  variant: "primary",
@@ -1224,7 +1226,7 @@ const Se = {
1224
1226
  }, 512);
1225
1227
  };
1226
1228
  }
1227
- }), oa = { class: "flex mt-6 space-x-6" }, ra = /* @__PURE__ */ R({
1229
+ }), sa = { class: "flex mt-6 space-x-6" }, ua = /* @__PURE__ */ S({
1228
1230
  __name: "Ghl2Gateway",
1229
1231
  props: {
1230
1232
  terminal: {
@@ -1236,36 +1238,36 @@ const Se = {
1236
1238
  required: !0
1237
1239
  }
1238
1240
  },
1239
- setup(_) {
1240
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b({
1241
+ setup(I) {
1242
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T({
1241
1243
  ip: "",
1242
1244
  receiptName: ""
1243
1245
  }), e = () => {
1244
1246
  r.value.ip = "", r.value.receiptName = "", l.value = -1;
1245
- }, m = () => {
1247
+ }, v = () => {
1246
1248
  if (!a.value.ecrIntegrations)
1247
1249
  return e();
1248
- const f = a.value.ecrIntegrations, u = f.findIndex((t) => t && t.gateway && t.gateway === "Ghl2");
1249
- if (u === -1)
1250
+ const y = a.value.ecrIntegrations, c = y.findIndex((t) => t && t.gateway && t.gateway === "Ghl2");
1251
+ if (c === -1)
1250
1252
  return e();
1251
- l.value = u;
1252
- const s = f.at(u);
1253
+ l.value = c;
1254
+ const s = y.at(c);
1253
1255
  s.gateway === "Ghl2" && s.config && (r.value = {
1254
1256
  ip: s.config.ip ?? "",
1255
1257
  receiptName: s.receiptName ?? ""
1256
1258
  });
1257
1259
  };
1258
- q(a, m), G(m);
1259
- async function c(f) {
1260
- var u;
1261
- (u = a.value.ecrIntegrations) == null || u.splice(f, 1), p.onUpdate(a.value);
1260
+ q(a, v), G(v);
1261
+ async function p(y) {
1262
+ var c;
1263
+ (c = a.value.ecrIntegrations) == null || c.splice(y, 1), d.onUpdate(a.value);
1262
1264
  }
1263
- return (f, u) => {
1264
- const s = g("FmTextField"), t = g("FmButton"), o = g("FmForm");
1265
- return y(), F(o, {
1266
- ref: T.value,
1265
+ return (y, c) => {
1266
+ const s = g("FmTextField"), t = g("FmButton"), n = g("FmForm");
1267
+ return f(), F(n, {
1268
+ ref: b.value,
1267
1269
  class: "flex flex-col gap-16 w-[500px]",
1268
- onValidationSuccess: u[2] || (u[2] = () => {
1270
+ onValidationSuccess: c[2] || (c[2] = () => {
1269
1271
  a.value.ecrIntegrations || (a.value.ecrIntegrations = []), l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1270
1272
  gateway: "Ghl2",
1271
1273
  config: { ip: r.value.ip },
@@ -1274,30 +1276,30 @@ const Se = {
1274
1276
  gateway: "Ghl2",
1275
1277
  config: { ip: r.value.ip },
1276
1278
  receiptName: r.value.receiptName
1277
- }), p.onUpdate(a.value);
1279
+ }), d.onUpdate(a.value);
1278
1280
  })
1279
1281
  }, {
1280
1282
  default: O(() => [
1281
- v(s, {
1283
+ m(s, {
1282
1284
  modelValue: r.value.ip,
1283
- "onUpdate:modelValue": u[0] || (u[0] = (i) => r.value.ip = i),
1285
+ "onUpdate:modelValue": c[0] || (c[0] = (i) => r.value.ip = i),
1284
1286
  label: "IP Address"
1285
1287
  }, null, 8, ["modelValue"]),
1286
- v(s, {
1288
+ m(s, {
1287
1289
  modelValue: r.value.receiptName,
1288
- "onUpdate:modelValue": u[1] || (u[1] = (i) => r.value.receiptName = i),
1290
+ "onUpdate:modelValue": c[1] || (c[1] = (i) => r.value.receiptName = i),
1289
1291
  label: "Receipt Payment Name",
1290
1292
  "label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
1291
1293
  }, null, 8, ["modelValue"]),
1292
- I("div", oa, [
1293
- l.value > -1 ? (y(), F(t, {
1294
+ _("div", sa, [
1295
+ l.value > -1 ? (f(), F(t, {
1294
1296
  key: 0,
1295
1297
  class: "flex-1",
1296
1298
  variant: "secondary",
1297
1299
  label: "Delete",
1298
- onclick: () => c(l.value)
1299
- }, null, 8, ["onclick"])) : V("", !0),
1300
- v(t, {
1300
+ onclick: () => p(l.value)
1301
+ }, null, 8, ["onclick"])) : k("", !0),
1302
+ m(t, {
1301
1303
  type: "submit",
1302
1304
  class: "flex-1",
1303
1305
  variant: "primary",
@@ -1309,7 +1311,7 @@ const Se = {
1309
1311
  }, 512);
1310
1312
  };
1311
1313
  }
1312
- }), ia = { class: "flex items-end" }, sa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ua = { class: "flex mt-6 space-x-6" }, ca = /* @__PURE__ */ R({
1314
+ }), ca = { class: "flex items-end" }, da = { class: "flex flex-wrap gap-8 items-center mt-4" }, pa = { class: "flex mt-6 space-x-6" }, ma = /* @__PURE__ */ S({
1313
1315
  __name: "Ghl3Gateway",
1314
1316
  props: {
1315
1317
  terminal: {
@@ -1321,51 +1323,51 @@ const Se = {
1321
1323
  required: !0
1322
1324
  }
1323
1325
  },
1324
- setup(_) {
1325
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
1326
+ setup(I) {
1327
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
1326
1328
  receiptName: "",
1327
1329
  config: {},
1328
1330
  cardTypes: []
1329
- }), m = () => {
1331
+ }), v = () => {
1330
1332
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1331
- }, c = () => {
1333
+ }, p = () => {
1332
1334
  var i;
1333
1335
  if (!a.value.ecrIntegrations)
1334
- return m();
1336
+ return v();
1335
1337
  const s = a.value.ecrIntegrations, t = s.findIndex(
1336
- (d) => d && d.gateway && d.gateway === "Ghl3"
1338
+ (u) => u && u.gateway && u.gateway === "Ghl3"
1337
1339
  );
1338
1340
  if (t === -1)
1339
- return m();
1341
+ return v();
1340
1342
  l.value = t;
1341
- const o = s.at(t);
1342
- o.gateway === "Ghl3" && o.config && (e.value = {
1343
- config: o.config,
1344
- receiptName: o.receiptName ?? "",
1345
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1343
+ const n = s.at(t);
1344
+ n.gateway === "Ghl3" && n.config && (e.value = {
1345
+ config: n.config,
1346
+ receiptName: n.receiptName ?? "",
1347
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1346
1348
  });
1347
1349
  };
1348
- q(a, c), G(c);
1349
- async function f(s) {
1350
+ q(a, p), G(p);
1351
+ async function y(s) {
1350
1352
  var t;
1351
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
1353
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1352
1354
  }
1353
- async function u() {
1355
+ async function c() {
1354
1356
  e.value.cardTypes.push(r.value), r.value = "";
1355
1357
  }
1356
1358
  return (s, t) => {
1357
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
1358
- return y(), F(x, {
1359
- ref: T.value,
1359
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
1360
+ return f(), F(w, {
1361
+ ref: b.value,
1360
1362
  class: "flex flex-col gap-16 w-[500px]",
1361
1363
  onValidationSuccess: t[2] || (t[2] = () => {
1362
- var n, w;
1364
+ var o, x;
1363
1365
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1364
1366
  gateway: "Ghl3",
1365
1367
  config: e.value.config,
1366
1368
  receiptName: e.value.receiptName,
1367
1369
  dialogConfig: {
1368
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
1370
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
1369
1371
  cardTypes: e.value.cardTypes
1370
1372
  }
1371
1373
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1375,46 +1377,46 @@ const Se = {
1375
1377
  dialogConfig: {
1376
1378
  cardTypes: e.value.cardTypes
1377
1379
  }
1378
- })), p.onUpdate(a.value);
1380
+ })), d.onUpdate(a.value);
1379
1381
  })
1380
1382
  }, {
1381
1383
  default: O(() => [
1382
- v(o, {
1384
+ m(n, {
1383
1385
  modelValue: e.value.receiptName,
1384
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
1386
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1385
1387
  label: "Receipt Payment Name",
1386
1388
  "label-info": "Default receipt display will be 'TERMINAL_GHL'"
1387
1389
  }, null, 8, ["modelValue"]),
1388
- I("div", ia, [
1389
- v(o, {
1390
+ _("div", ca, [
1391
+ m(n, {
1390
1392
  modelValue: r.value,
1391
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
1393
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1392
1394
  label: "Fallback Card Types",
1393
1395
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1394
1396
  }, null, 8, ["modelValue"]),
1395
- v(i, {
1397
+ m(i, {
1396
1398
  class: "ml-4",
1397
1399
  icon: "add",
1398
- onClick: u
1400
+ onClick: c
1399
1401
  })
1400
1402
  ]),
1401
- I("div", sa, [
1402
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
1403
- key: n,
1404
- label: n,
1403
+ _("div", da, [
1404
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
1405
+ key: o,
1406
+ label: o,
1405
1407
  removable: !0,
1406
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1408
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1407
1409
  }, null, 8, ["label", "onChipClosed"]))), 128))
1408
1410
  ]),
1409
- I("div", ua, [
1410
- l.value > -1 ? (y(), F(i, {
1411
+ _("div", pa, [
1412
+ l.value > -1 ? (f(), F(i, {
1411
1413
  key: 0,
1412
1414
  class: "flex-1",
1413
1415
  variant: "secondary",
1414
1416
  label: "Delete",
1415
- onclick: () => f(l.value)
1416
- }, null, 8, ["onclick"])) : V("", !0),
1417
- v(i, {
1417
+ onclick: () => y(l.value)
1418
+ }, null, 8, ["onclick"])) : k("", !0),
1419
+ m(i, {
1418
1420
  type: "submit",
1419
1421
  class: "flex-1",
1420
1422
  variant: "primary",
@@ -1426,7 +1428,7 @@ const Se = {
1426
1428
  }, 512);
1427
1429
  };
1428
1430
  }
1429
- }), da = { class: "flex items-end" }, pa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ma = { class: "flex mt-6 space-x-6" }, va = /* @__PURE__ */ R({
1431
+ }), va = { class: "flex items-end" }, ya = { class: "flex flex-wrap gap-8 items-center mt-4" }, fa = { class: "flex mt-6 space-x-6" }, ga = /* @__PURE__ */ S({
1430
1432
  __name: "HlbbGateway",
1431
1433
  props: {
1432
1434
  terminal: {
@@ -1438,51 +1440,51 @@ const Se = {
1438
1440
  required: !0
1439
1441
  }
1440
1442
  },
1441
- setup(_) {
1442
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
1443
+ setup(I) {
1444
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
1443
1445
  receiptName: "",
1444
1446
  config: {},
1445
1447
  cardTypes: []
1446
- }), m = () => {
1448
+ }), v = () => {
1447
1449
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1448
- }, c = () => {
1450
+ }, p = () => {
1449
1451
  var i;
1450
1452
  if (!a.value.ecrIntegrations)
1451
- return m();
1453
+ return v();
1452
1454
  const s = a.value.ecrIntegrations, t = s.findIndex(
1453
- (d) => d && d.gateway && d.gateway === "Hlbb"
1455
+ (u) => u && u.gateway && u.gateway === "Hlbb"
1454
1456
  );
1455
1457
  if (t === -1)
1456
- return m();
1458
+ return v();
1457
1459
  l.value = t;
1458
- const o = s.at(t);
1459
- o.gateway === "Hlbb" && o.config && (e.value = {
1460
- config: o.config,
1461
- receiptName: o.receiptName ?? "",
1462
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1460
+ const n = s.at(t);
1461
+ n.gateway === "Hlbb" && n.config && (e.value = {
1462
+ config: n.config,
1463
+ receiptName: n.receiptName ?? "",
1464
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1463
1465
  });
1464
1466
  };
1465
- q(a, c), G(c);
1466
- async function f(s) {
1467
+ q(a, p), G(p);
1468
+ async function y(s) {
1467
1469
  var t;
1468
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
1470
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1469
1471
  }
1470
- async function u() {
1472
+ async function c() {
1471
1473
  e.value.cardTypes.push(r.value), r.value = "";
1472
1474
  }
1473
1475
  return (s, t) => {
1474
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
1475
- return y(), F(x, {
1476
- ref: T.value,
1476
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
1477
+ return f(), F(w, {
1478
+ ref: b.value,
1477
1479
  class: "flex flex-col gap-16 w-[500px]",
1478
1480
  onValidationSuccess: t[2] || (t[2] = () => {
1479
- var n, w;
1481
+ var o, x;
1480
1482
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1481
1483
  gateway: "Hlbb",
1482
1484
  config: e.value.config,
1483
1485
  receiptName: e.value.receiptName,
1484
1486
  dialogConfig: {
1485
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
1487
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
1486
1488
  cardTypes: e.value.cardTypes
1487
1489
  }
1488
1490
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1492,46 +1494,46 @@ const Se = {
1492
1494
  dialogConfig: {
1493
1495
  cardTypes: e.value.cardTypes
1494
1496
  }
1495
- })), p.onUpdate(a.value);
1497
+ })), d.onUpdate(a.value);
1496
1498
  })
1497
1499
  }, {
1498
1500
  default: O(() => [
1499
- v(o, {
1501
+ m(n, {
1500
1502
  modelValue: e.value.receiptName,
1501
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
1503
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1502
1504
  label: "Receipt Payment Name",
1503
1505
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
1504
1506
  }, null, 8, ["modelValue"]),
1505
- I("div", da, [
1506
- v(o, {
1507
+ _("div", va, [
1508
+ m(n, {
1507
1509
  modelValue: r.value,
1508
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
1510
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1509
1511
  label: "Fallback Card Types",
1510
1512
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1511
1513
  }, null, 8, ["modelValue"]),
1512
- v(i, {
1514
+ m(i, {
1513
1515
  class: "ml-4",
1514
1516
  icon: "add",
1515
- onClick: u
1517
+ onClick: c
1516
1518
  })
1517
1519
  ]),
1518
- I("div", pa, [
1519
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
1520
- key: n,
1521
- label: n,
1520
+ _("div", ya, [
1521
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
1522
+ key: o,
1523
+ label: o,
1522
1524
  removable: !0,
1523
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1525
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1524
1526
  }, null, 8, ["label", "onChipClosed"]))), 128))
1525
1527
  ]),
1526
- I("div", ma, [
1527
- l.value > -1 ? (y(), F(i, {
1528
+ _("div", fa, [
1529
+ l.value > -1 ? (f(), F(i, {
1528
1530
  key: 0,
1529
1531
  class: "flex-1",
1530
1532
  variant: "secondary",
1531
1533
  label: "Delete",
1532
- onclick: () => f(l.value)
1533
- }, null, 8, ["onclick"])) : V("", !0),
1534
- v(i, {
1534
+ onclick: () => y(l.value)
1535
+ }, null, 8, ["onclick"])) : k("", !0),
1536
+ m(i, {
1535
1537
  type: "submit",
1536
1538
  class: "flex-1",
1537
1539
  variant: "primary",
@@ -1543,7 +1545,7 @@ const Se = {
1543
1545
  }, 512);
1544
1546
  };
1545
1547
  }
1546
- }), ya = { class: "flex items-end" }, fa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ga = { class: "flex mt-6 space-x-6" }, ba = /* @__PURE__ */ R({
1548
+ }), ba = { class: "flex items-end" }, _a = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ta = { class: "flex mt-6 space-x-6" }, Ia = /* @__PURE__ */ S({
1547
1549
  __name: "GlobalPaymentsGateway",
1548
1550
  props: {
1549
1551
  terminal: {
@@ -1555,51 +1557,51 @@ const Se = {
1555
1557
  required: !0
1556
1558
  }
1557
1559
  },
1558
- setup(_) {
1559
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
1560
+ setup(I) {
1561
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
1560
1562
  ip: "",
1561
1563
  receiptName: "",
1562
1564
  cardTypes: []
1563
- }), m = () => {
1565
+ }), v = () => {
1564
1566
  e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1565
- }, c = () => {
1567
+ }, p = () => {
1566
1568
  var i;
1567
1569
  if (!a.value.ecrIntegrations)
1568
- return m();
1570
+ return v();
1569
1571
  const s = a.value.ecrIntegrations, t = s.findIndex(
1570
- (d) => d && d.gateway && d.gateway === "GlobalPayments"
1572
+ (u) => u && u.gateway && u.gateway === "GlobalPayments"
1571
1573
  );
1572
1574
  if (t === -1)
1573
- return m();
1575
+ return v();
1574
1576
  l.value = t;
1575
- const o = s.at(t);
1576
- o.gateway === "GlobalPayments" && o.config && (e.value = {
1577
- ip: o.config.ip ?? "",
1578
- receiptName: o.receiptName ?? "",
1579
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1577
+ const n = s.at(t);
1578
+ n.gateway === "GlobalPayments" && n.config && (e.value = {
1579
+ ip: n.config.ip ?? "",
1580
+ receiptName: n.receiptName ?? "",
1581
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1580
1582
  });
1581
1583
  };
1582
- q(a, c), G(c);
1583
- async function f(s) {
1584
+ q(a, p), G(p);
1585
+ async function y(s) {
1584
1586
  var t;
1585
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
1587
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1586
1588
  }
1587
- async function u() {
1589
+ async function c() {
1588
1590
  e.value.cardTypes.push(r.value), r.value = "";
1589
1591
  }
1590
1592
  return (s, t) => {
1591
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
1592
- return y(), F(x, {
1593
- ref: T.value,
1593
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
1594
+ return f(), F(w, {
1595
+ ref: b.value,
1594
1596
  class: "flex flex-col gap-16 w-[500px]",
1595
1597
  onValidationSuccess: t[3] || (t[3] = () => {
1596
- var n, w;
1598
+ var o, x;
1597
1599
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1598
1600
  gateway: "GlobalPayments",
1599
1601
  config: { ip: e.value.ip },
1600
1602
  receiptName: e.value.receiptName,
1601
1603
  dialogConfig: {
1602
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
1604
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
1603
1605
  cardTypes: e.value.cardTypes
1604
1606
  }
1605
1607
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1609,51 +1611,51 @@ const Se = {
1609
1611
  dialogConfig: {
1610
1612
  cardTypes: e.value.cardTypes
1611
1613
  }
1612
- })), p.onUpdate(a.value);
1614
+ })), d.onUpdate(a.value);
1613
1615
  })
1614
1616
  }, {
1615
1617
  default: O(() => [
1616
- v(o, {
1618
+ m(n, {
1617
1619
  modelValue: e.value.ip,
1618
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
1620
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
1619
1621
  label: "IP Address"
1620
1622
  }, null, 8, ["modelValue"]),
1621
- v(o, {
1623
+ m(n, {
1622
1624
  modelValue: e.value.receiptName,
1623
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
1625
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
1624
1626
  label: "Receipt Payment Name",
1625
1627
  "label-info": "Default receipt display will be 'TERMINAL_GP'"
1626
1628
  }, null, 8, ["modelValue"]),
1627
- I("div", ya, [
1628
- v(o, {
1629
+ _("div", ba, [
1630
+ m(n, {
1629
1631
  modelValue: r.value,
1630
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
1632
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
1631
1633
  label: "Fallback Card Types",
1632
1634
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1633
1635
  }, null, 8, ["modelValue"]),
1634
- v(i, {
1636
+ m(i, {
1635
1637
  class: "ml-4",
1636
1638
  icon: "add",
1637
- onClick: u
1639
+ onClick: c
1638
1640
  })
1639
1641
  ]),
1640
- I("div", fa, [
1641
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
1642
- key: n,
1643
- label: n,
1642
+ _("div", _a, [
1643
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
1644
+ key: o,
1645
+ label: o,
1644
1646
  removable: !0,
1645
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1647
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1646
1648
  }, null, 8, ["label", "onChipClosed"]))), 128))
1647
1649
  ]),
1648
- I("div", ga, [
1649
- l.value > -1 ? (y(), F(i, {
1650
+ _("div", Ta, [
1651
+ l.value > -1 ? (f(), F(i, {
1650
1652
  key: 0,
1651
1653
  class: "flex-1",
1652
1654
  variant: "secondary",
1653
1655
  label: "Delete",
1654
- onclick: () => f(l.value)
1655
- }, null, 8, ["onclick"])) : V("", !0),
1656
- v(i, {
1656
+ onclick: () => y(l.value)
1657
+ }, null, 8, ["onclick"])) : k("", !0),
1658
+ m(i, {
1657
1659
  type: "submit",
1658
1660
  class: "flex-1",
1659
1661
  variant: "primary",
@@ -1665,7 +1667,7 @@ const Se = {
1665
1667
  }, 512);
1666
1668
  };
1667
1669
  }
1668
- }), Ta = { class: "flex items-end" }, _a = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ia = { class: "flex mt-6 space-x-6" }, Fa = /* @__PURE__ */ R({
1670
+ }), Fa = { class: "flex items-end" }, wa = { class: "flex flex-wrap gap-8 items-center mt-4" }, xa = { class: "flex mt-6 space-x-6" }, Ca = /* @__PURE__ */ S({
1669
1671
  __name: "OmaGateway",
1670
1672
  props: {
1671
1673
  terminal: {
@@ -1677,49 +1679,49 @@ const Se = {
1677
1679
  required: !0
1678
1680
  }
1679
1681
  },
1680
- setup(_) {
1681
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
1682
+ setup(I) {
1683
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
1682
1684
  receiptName: "",
1683
1685
  cardTypes: []
1684
- }), m = () => {
1686
+ }), v = () => {
1685
1687
  e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1686
- }, c = () => {
1688
+ }, p = () => {
1687
1689
  var i;
1688
1690
  if (!a.value.ecrIntegrations)
1689
- return m();
1691
+ return v();
1690
1692
  const s = a.value.ecrIntegrations, t = s.findIndex(
1691
- (d) => d && d.gateway && d.gateway === "Oma"
1693
+ (u) => u && u.gateway && u.gateway === "Oma"
1692
1694
  );
1693
1695
  if (t === -1)
1694
- return m();
1696
+ return v();
1695
1697
  l.value = t;
1696
- const o = s.at(t);
1697
- o.gateway === "Oma" && o.config && (e.value = {
1698
- receiptName: o.receiptName ?? "",
1699
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1698
+ const n = s.at(t);
1699
+ n.gateway === "Oma" && n.config && (e.value = {
1700
+ receiptName: n.receiptName ?? "",
1701
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1700
1702
  });
1701
1703
  };
1702
- q(a, c), G(c);
1703
- async function f(s) {
1704
+ q(a, p), G(p);
1705
+ async function y(s) {
1704
1706
  var t;
1705
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
1707
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1706
1708
  }
1707
- async function u() {
1709
+ async function c() {
1708
1710
  e.value.cardTypes.push(r.value), r.value = "";
1709
1711
  }
1710
1712
  return (s, t) => {
1711
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
1712
- return y(), F(x, {
1713
- ref: T.value,
1713
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
1714
+ return f(), F(w, {
1715
+ ref: b.value,
1714
1716
  class: "flex flex-col gap-16 w-[500px]",
1715
1717
  onValidationSuccess: t[2] || (t[2] = () => {
1716
- var n, w;
1718
+ var o, x;
1717
1719
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1718
1720
  gateway: "Oma",
1719
1721
  config: {},
1720
1722
  receiptName: e.value.receiptName,
1721
1723
  dialogConfig: {
1722
- ...(w = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : w.dialogConfig,
1724
+ ...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
1723
1725
  cardTypes: e.value.cardTypes
1724
1726
  }
1725
1727
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1729,46 +1731,46 @@ const Se = {
1729
1731
  dialogConfig: {
1730
1732
  cardTypes: e.value.cardTypes
1731
1733
  }
1732
- })), p.onUpdate(a.value);
1734
+ })), d.onUpdate(a.value);
1733
1735
  })
1734
1736
  }, {
1735
1737
  default: O(() => [
1736
- v(o, {
1738
+ m(n, {
1737
1739
  modelValue: e.value.receiptName,
1738
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
1740
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1739
1741
  label: "Receipt Payment Name",
1740
1742
  "label-info": "Default receipt display will be 'TERMINAL_OMA'"
1741
1743
  }, null, 8, ["modelValue"]),
1742
- I("div", Ta, [
1743
- v(o, {
1744
+ _("div", Fa, [
1745
+ m(n, {
1744
1746
  modelValue: r.value,
1745
- "onUpdate:modelValue": t[1] || (t[1] = (n) => r.value = n),
1747
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1746
1748
  label: "Fallback Card Types",
1747
1749
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1748
1750
  }, null, 8, ["modelValue"]),
1749
- v(i, {
1751
+ m(i, {
1750
1752
  class: "ml-4",
1751
1753
  icon: "add",
1752
- onClick: u
1754
+ onClick: c
1753
1755
  })
1754
1756
  ]),
1755
- I("div", _a, [
1756
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
1757
- key: n,
1758
- label: n,
1757
+ _("div", wa, [
1758
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
1759
+ key: o,
1760
+ label: o,
1759
1761
  removable: !0,
1760
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1762
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1761
1763
  }, null, 8, ["label", "onChipClosed"]))), 128))
1762
1764
  ]),
1763
- I("div", Ia, [
1764
- l.value > -1 ? (y(), F(i, {
1765
+ _("div", xa, [
1766
+ l.value > -1 ? (f(), F(i, {
1765
1767
  key: 0,
1766
1768
  class: "flex-1",
1767
1769
  variant: "secondary",
1768
1770
  label: "Delete",
1769
- onclick: () => f(l.value)
1770
- }, null, 8, ["onclick"])) : V("", !0),
1771
- v(i, {
1771
+ onclick: () => y(l.value)
1772
+ }, null, 8, ["onclick"])) : k("", !0),
1773
+ m(i, {
1772
1774
  type: "submit",
1773
1775
  class: "flex-1",
1774
1776
  variant: "primary",
@@ -1780,7 +1782,7 @@ const Se = {
1780
1782
  }, 512);
1781
1783
  };
1782
1784
  }
1783
- }), wa = { class: "flex items-end" }, xa = { class: "flex flex-wrap gap-8 items-center mt-4" }, Na = { class: "flex mt-6 space-x-6" }, Ca = /* @__PURE__ */ R({
1785
+ }), Na = { class: "flex items-end" }, ka = { class: "flex flex-wrap gap-8 items-center mt-4" }, Va = { class: "flex mt-6 space-x-6" }, Ua = /* @__PURE__ */ S({
1784
1786
  __name: "RevenueGateway",
1785
1787
  props: {
1786
1788
  terminal: {
@@ -1792,111 +1794,111 @@ const Se = {
1792
1794
  required: !0
1793
1795
  }
1794
1796
  },
1795
- setup(_) {
1796
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b(), e = b({
1797
+ setup(I) {
1798
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
1797
1799
  receiptName: "",
1798
1800
  ip: "",
1799
1801
  cardTypes: []
1800
- }), m = () => {
1802
+ }), v = () => {
1801
1803
  e.value.receiptName = "", e.value.ip = "", e.value.cardTypes = [], l.value = -1;
1802
- }, c = () => {
1804
+ }, p = () => {
1803
1805
  var i;
1804
1806
  if (!a.value.ecrIntegrations)
1805
- return m();
1807
+ return v();
1806
1808
  const s = a.value.ecrIntegrations, t = s.findIndex(
1807
- (d) => d && d.gateway && d.gateway === "Revenue"
1809
+ (u) => u && u.gateway && u.gateway === "Revenue"
1808
1810
  );
1809
1811
  if (t === -1)
1810
- return m();
1812
+ return v();
1811
1813
  l.value = t;
1812
- const o = s.at(t);
1813
- o.gateway === "Revenue" && o.config && (e.value = {
1814
- receiptName: o.receiptName ?? "",
1815
- ip: o.config.ip ?? "",
1816
- cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1814
+ const n = s.at(t);
1815
+ n.gateway === "Revenue" && n.config && (e.value = {
1816
+ receiptName: n.receiptName ?? "",
1817
+ ip: n.config.ip ?? "",
1818
+ cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1817
1819
  });
1818
1820
  };
1819
- q(a, c), G(c);
1820
- async function f(s) {
1821
+ q(a, p), G(p);
1822
+ async function y(s) {
1821
1823
  var t;
1822
- (t = a.value.ecrIntegrations) == null || t.splice(s, 1), p.onUpdate(a.value);
1824
+ (t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
1823
1825
  }
1824
- async function u() {
1826
+ async function c() {
1825
1827
  e.value.cardTypes.push(r.value), r.value = "";
1826
1828
  }
1827
1829
  return (s, t) => {
1828
- const o = g("FmTextField"), i = g("FmButton"), d = g("FmChip"), x = g("FmForm");
1829
- return y(), F(x, {
1830
- ref: T.value,
1830
+ const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
1831
+ return f(), F(w, {
1832
+ ref: b.value,
1831
1833
  class: "flex flex-col gap-16 w-[500px]",
1832
1834
  onValidationSuccess: t[3] || (t[3] = () => {
1833
- var w, L;
1834
- const n = {
1835
+ var x, L;
1836
+ const o = {
1835
1837
  type: "tcp",
1836
1838
  ip: e.value.ip
1837
1839
  };
1838
1840
  l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1839
1841
  gateway: "Revenue",
1840
- config: n,
1842
+ config: o,
1841
1843
  receiptName: e.value.receiptName,
1842
1844
  dialogConfig: {
1843
- ...(L = (w = a.value.ecrIntegrations) == null ? void 0 : w[l.value]) == null ? void 0 : L.dialogConfig,
1845
+ ...(L = (x = a.value.ecrIntegrations) == null ? void 0 : x[l.value]) == null ? void 0 : L.dialogConfig,
1844
1846
  cardTypes: e.value.cardTypes
1845
1847
  }
1846
1848
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
1847
1849
  gateway: "Revenue",
1848
- config: n,
1850
+ config: o,
1849
1851
  receiptName: e.value.receiptName,
1850
1852
  dialogConfig: {
1851
1853
  cardTypes: e.value.cardTypes
1852
1854
  }
1853
- })), p.onUpdate(a.value);
1855
+ })), d.onUpdate(a.value);
1854
1856
  })
1855
1857
  }, {
1856
1858
  default: O(() => [
1857
- v(o, {
1859
+ m(n, {
1858
1860
  modelValue: e.value.ip,
1859
- "onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
1861
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
1860
1862
  label: "Terminal IP Address",
1861
1863
  "label-info": "Terminal WiFi IP with optional port, e.g. 192.168.1.50:8080 (defaults to port 8080)",
1862
1864
  rules: M(ue)(M(ce).string().min(1))
1863
1865
  }, null, 8, ["modelValue", "rules"]),
1864
- v(o, {
1866
+ m(n, {
1865
1867
  modelValue: e.value.receiptName,
1866
- "onUpdate:modelValue": t[1] || (t[1] = (n) => e.value.receiptName = n),
1868
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
1867
1869
  label: "Receipt Payment Name",
1868
1870
  "label-info": "Default receipt display will be 'TERMINAL_REVENUE'"
1869
1871
  }, null, 8, ["modelValue"]),
1870
- I("div", wa, [
1871
- v(o, {
1872
+ _("div", Na, [
1873
+ m(n, {
1872
1874
  modelValue: r.value,
1873
- "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
1875
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
1874
1876
  label: "Fallback Card Types",
1875
1877
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1876
1878
  }, null, 8, ["modelValue"]),
1877
- v(i, {
1879
+ m(i, {
1878
1880
  class: "ml-4",
1879
1881
  icon: "add",
1880
- onClick: u
1882
+ onClick: c
1881
1883
  })
1882
1884
  ]),
1883
- I("div", xa, [
1884
- (y(!0), S(P, null, B(e.value.cardTypes, (n) => (y(), F(d, {
1885
- key: n,
1886
- label: n,
1885
+ _("div", ka, [
1886
+ (f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
1887
+ key: o,
1888
+ label: o,
1887
1889
  removable: !0,
1888
- onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
1890
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1889
1891
  }, null, 8, ["label", "onChipClosed"]))), 128))
1890
1892
  ]),
1891
- I("div", Na, [
1892
- l.value > -1 ? (y(), F(i, {
1893
+ _("div", Va, [
1894
+ l.value > -1 ? (f(), F(i, {
1893
1895
  key: 0,
1894
1896
  class: "flex-1",
1895
1897
  variant: "secondary",
1896
1898
  label: "Delete",
1897
- onclick: () => f(l.value)
1898
- }, null, 8, ["onclick"])) : V("", !0),
1899
- v(i, {
1899
+ onclick: () => y(l.value)
1900
+ }, null, 8, ["onclick"])) : k("", !0),
1901
+ m(i, {
1900
1902
  type: "submit",
1901
1903
  class: "flex-1",
1902
1904
  variant: "primary",
@@ -1908,7 +1910,7 @@ const Se = {
1908
1910
  }, 512);
1909
1911
  };
1910
1912
  }
1911
- }), ka = { class: "flex items-center" }, Va = { class: "w-[260px] self-start" }, Ua = { class: "flex-1" }, Sa = /* @__PURE__ */ R({
1913
+ }), Sa = { class: "flex items-center" }, ha = { class: "w-[260px] self-start" }, Ra = { class: "flex-1" }, Ma = /* @__PURE__ */ S({
1912
1914
  __name: "EcrGateway",
1913
1915
  props: {
1914
1916
  terminal: {
@@ -1920,115 +1922,115 @@ const Se = {
1920
1922
  required: !0
1921
1923
  }
1922
1924
  },
1923
- setup(_) {
1924
- var m;
1925
- const p = _, a = [
1925
+ setup(I) {
1926
+ var v;
1927
+ const d = I, a = [
1926
1928
  {
1927
1929
  label: "FeedMe Terminal",
1928
1930
  value: "terminal",
1929
- render: qe
1931
+ render: $e
1930
1932
  },
1931
1933
  {
1932
1934
  label: "GHL Terminal",
1933
1935
  value: "ghl",
1934
- render: Ae,
1935
- region: [U.F_COUNTRY.enum.MY]
1936
+ render: Be,
1937
+ region: [h.F_COUNTRY.enum.MY]
1936
1938
  },
1937
1939
  {
1938
1940
  label: "GHL2 Terminal",
1939
1941
  value: "ghl2",
1940
- render: ra,
1941
- region: [U.F_COUNTRY.enum.MY]
1942
+ render: ua,
1943
+ region: [h.F_COUNTRY.enum.MY]
1942
1944
  },
1943
1945
  {
1944
1946
  label: "ITB Maybank Terminal",
1945
1947
  value: "mb-itb",
1946
- render: Le,
1947
- region: [U.F_COUNTRY.enum.MY]
1948
+ render: Ke,
1949
+ region: [h.F_COUNTRY.enum.MY]
1948
1950
  },
1949
1951
  {
1950
1952
  label: "PMA Maybank Terminal",
1951
1953
  value: "mb-pma",
1952
- render: je,
1953
- region: [U.F_COUNTRY.enum.MY]
1954
+ render: Qe,
1955
+ region: [h.F_COUNTRY.enum.MY]
1954
1956
  },
1955
1957
  {
1956
1958
  label: "Paysys Maybank Terminal",
1957
1959
  value: "mb-paysys",
1958
- render: Je,
1959
- region: [U.F_COUNTRY.enum.MY]
1960
+ render: Ze,
1961
+ region: [h.F_COUNTRY.enum.MY]
1960
1962
  },
1961
1963
  {
1962
1964
  label: "Nets Terminal",
1963
1965
  value: "nets",
1964
- render: ea,
1965
- region: [U.F_COUNTRY.enum.SG]
1966
+ render: la,
1967
+ region: [h.F_COUNTRY.enum.SG]
1966
1968
  },
1967
1969
  {
1968
1970
  label: "KBank Terminal",
1969
1971
  value: "kbank",
1970
- render: na,
1971
- region: [U.F_COUNTRY.enum.TH]
1972
+ render: ia,
1973
+ region: [h.F_COUNTRY.enum.TH]
1972
1974
  },
1973
1975
  {
1974
1976
  label: "GHL Terminal",
1975
1977
  value: "ghl3",
1976
- render: ca,
1977
- region: [U.F_COUNTRY.enum.TH]
1978
+ render: ma,
1979
+ region: [h.F_COUNTRY.enum.TH]
1978
1980
  },
1979
1981
  {
1980
1982
  label: "Paysys HLBB Terminal",
1981
1983
  value: "hlbb",
1982
- render: va,
1983
- region: [U.F_COUNTRY.enum.MY]
1984
+ render: ga,
1985
+ region: [h.F_COUNTRY.enum.MY]
1984
1986
  },
1985
1987
  {
1986
1988
  label: "GPAP Terminal",
1987
1989
  value: "globalpayments",
1988
- render: ba,
1989
- region: [U.F_COUNTRY.enum.SG]
1990
+ render: Ia,
1991
+ region: [h.F_COUNTRY.enum.SG]
1990
1992
  },
1991
1993
  {
1992
1994
  label: "OMA Terminal",
1993
1995
  value: "oma",
1994
- render: Fa,
1995
- region: [U.F_COUNTRY.enum.PK]
1996
+ render: Ca,
1997
+ region: [h.F_COUNTRY.enum.PK]
1996
1998
  },
1997
1999
  {
1998
2000
  label: "Revenue PBB Terminal",
1999
2001
  value: "revenue",
2000
- render: Ca,
2001
- region: [U.F_COUNTRY.enum.MY]
2002
+ render: Ua,
2003
+ region: [h.F_COUNTRY.enum.MY]
2002
2004
  }
2003
- ], T = k(() => a.find((c) => c.value === e.value)), l = oe().currentCountry, r = k(() => a.filter(
2004
- (c) => !c.region || c.region.includes(l.value ?? U.F_COUNTRY.enum.MY)
2005
+ ], b = U(() => a.find((p) => p.value === e.value)), l = oe().currentCountry, r = U(() => a.filter(
2006
+ (p) => !p.region || p.region.includes(l.value ?? h.F_COUNTRY.enum.MY)
2005
2007
  )), { gatewayTab: e } = ne({
2006
- gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
2008
+ gatewayTab: (v = r.value[0]) == null ? void 0 : v.value
2007
2009
  });
2008
- return (c, f) => {
2010
+ return (p, y) => {
2009
2011
  var s;
2010
- const u = g("FmTabs");
2011
- return y(), S("div", ka, [
2012
- I("div", Va, [
2013
- v(u, {
2012
+ const c = g("FmTabs");
2013
+ return f(), C("div", Sa, [
2014
+ _("div", ha, [
2015
+ m(c, {
2014
2016
  "model-value": M(e),
2015
- "onUpdate:modelValue": f[0] || (f[0] = (t) => Z(e) ? e.value = t : null),
2017
+ "onUpdate:modelValue": y[0] || (y[0] = (t) => Z(e) ? e.value = t : null),
2016
2018
  class: "mb-6",
2017
2019
  vertical: !0,
2018
2020
  items: r.value,
2019
2021
  "show-more-at": Number.POSITIVE_INFINITY
2020
2022
  }, null, 8, ["model-value", "items", "show-more-at"])
2021
2023
  ]),
2022
- I("div", Ua, [
2023
- M(e) ? (y(), F(ee((s = T.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
2024
- terminal: p.terminal,
2025
- onUpdate: p.onUpdate
2026
- })), null, 16)) : V("", !0)
2024
+ _("div", Ra, [
2025
+ M(e) ? (f(), F(ee((s = b.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
2026
+ terminal: d.terminal,
2027
+ onUpdate: d.onUpdate
2028
+ })), null, 16)) : k("", !0)
2027
2029
  ])
2028
2030
  ]);
2029
2031
  };
2030
2032
  }
2031
- }), Ra = { class: "flex mt-6 space-x-6" }, ha = /* @__PURE__ */ R({
2033
+ }), Oa = { class: "flex mt-6 space-x-6" }, Pa = /* @__PURE__ */ S({
2032
2034
  __name: "PromptPayGateway",
2033
2035
  props: {
2034
2036
  terminal: {
@@ -2040,61 +2042,61 @@ const Se = {
2040
2042
  required: !0
2041
2043
  }
2042
2044
  },
2043
- setup(_) {
2044
- const p = _, a = A(() => p.terminal), T = b(), l = b(-1), r = b({
2045
+ setup(I) {
2046
+ const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T({
2045
2047
  account: "",
2046
2048
  receiptName: ""
2047
2049
  }), e = () => {
2048
2050
  r.value.account = "", r.value.receiptName = "", l.value = -1;
2049
- }, m = () => {
2051
+ }, v = () => {
2050
2052
  if (!a.value.qrIntegrations)
2051
2053
  return e();
2052
- const f = a.value.qrIntegrations, u = f.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
2053
- if (u === -1)
2054
+ const y = a.value.qrIntegrations, c = y.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
2055
+ if (c === -1)
2054
2056
  return e();
2055
- l.value = u;
2056
- const s = f.at(u);
2057
+ l.value = c;
2058
+ const s = y.at(c);
2057
2059
  s.gateway === "PROMPTPAY" && s.config && (r.value = {
2058
2060
  account: s.config.account ?? "",
2059
2061
  receiptName: s.receiptName ?? ""
2060
2062
  });
2061
2063
  };
2062
- q(a, m), G(m);
2063
- async function c(f) {
2064
- var u;
2065
- (u = a.value.qrIntegrations) == null || u.splice(f, 1), p.onUpdate(a.value);
2064
+ q(a, v), G(v);
2065
+ async function p(y) {
2066
+ var c;
2067
+ (c = a.value.qrIntegrations) == null || c.splice(y, 1), d.onUpdate(a.value);
2066
2068
  }
2067
- return (f, u) => {
2068
- const s = g("FmTextField"), t = g("FmButton"), o = g("FmForm");
2069
- return y(), F(o, {
2070
- ref: T.value,
2069
+ return (y, c) => {
2070
+ const s = g("FmTextField"), t = g("FmButton"), n = g("FmForm");
2071
+ return f(), F(n, {
2072
+ ref: b.value,
2071
2073
  class: "flex flex-col gap-16 w-[500px]",
2072
- onValidationSuccess: u[2] || (u[2] = () => {
2073
- l.value > -1 ? a.value.qrIntegrations[l.value] = { gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName } : (a.value.qrIntegrations || (a.value.qrIntegrations = []), a.value.qrIntegrations.push({ gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName })), p.onUpdate(a.value);
2074
+ onValidationSuccess: c[2] || (c[2] = () => {
2075
+ l.value > -1 ? a.value.qrIntegrations[l.value] = { gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName } : (a.value.qrIntegrations || (a.value.qrIntegrations = []), a.value.qrIntegrations.push({ gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName })), d.onUpdate(a.value);
2074
2076
  })
2075
2077
  }, {
2076
2078
  default: O(() => [
2077
- v(s, {
2079
+ m(s, {
2078
2080
  modelValue: r.value.account,
2079
- "onUpdate:modelValue": u[0] || (u[0] = (i) => r.value.account = i),
2081
+ "onUpdate:modelValue": c[0] || (c[0] = (i) => r.value.account = i),
2080
2082
  label: "Thai Phone Number / Thai Naitonal ID",
2081
2083
  "label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
2082
2084
  }, null, 8, ["modelValue"]),
2083
- v(s, {
2085
+ m(s, {
2084
2086
  modelValue: r.value.receiptName,
2085
- "onUpdate:modelValue": u[1] || (u[1] = (i) => r.value.receiptName = i),
2087
+ "onUpdate:modelValue": c[1] || (c[1] = (i) => r.value.receiptName = i),
2086
2088
  label: "Receipt Payment Name",
2087
2089
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
2088
2090
  }, null, 8, ["modelValue"]),
2089
- I("div", Ra, [
2090
- l.value > -1 ? (y(), F(t, {
2091
+ _("div", Oa, [
2092
+ l.value > -1 ? (f(), F(t, {
2091
2093
  key: 0,
2092
2094
  class: "flex-1",
2093
2095
  variant: "secondary",
2094
2096
  label: "Delete",
2095
- onclick: () => c(l.value)
2096
- }, null, 8, ["onclick"])) : V("", !0),
2097
- v(t, {
2097
+ onclick: () => p(l.value)
2098
+ }, null, 8, ["onclick"])) : k("", !0),
2099
+ m(t, {
2098
2100
  type: "submit",
2099
2101
  class: "flex-1",
2100
2102
  variant: "primary",
@@ -2106,7 +2108,7 @@ const Se = {
2106
2108
  }, 512);
2107
2109
  };
2108
2110
  }
2109
- }), Ma = { class: "flex items-center" }, Oa = { class: "w-[260px] self-start" }, Pa = { class: "flex-1" }, qa = /* @__PURE__ */ R({
2111
+ }), qa = { class: "flex items-center" }, Ga = { class: "w-[260px] self-start" }, Aa = { class: "flex-1" }, $a = /* @__PURE__ */ S({
2110
2112
  __name: "QrGateway",
2111
2113
  props: {
2112
2114
  terminal: {
@@ -2118,41 +2120,168 @@ const Se = {
2118
2120
  required: !0
2119
2121
  }
2120
2122
  },
2121
- setup(_) {
2122
- var m;
2123
- const p = _, a = [
2123
+ setup(I) {
2124
+ var v;
2125
+ const d = I, a = [
2124
2126
  {
2125
2127
  label: "PromptPay",
2126
2128
  value: "promptpay",
2127
- render: ha,
2128
- region: [U.F_COUNTRY.enum.TH]
2129
+ render: Pa,
2130
+ region: [h.F_COUNTRY.enum.TH]
2129
2131
  }
2130
- ], T = k(() => a.find((c) => c.value === e.value)), l = oe().currentCountry, r = k(() => a.filter((c) => !c.region || c.region.includes(l.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = ne({
2131
- gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
2132
+ ], b = U(() => a.find((p) => p.value === e.value)), l = oe().currentCountry, r = U(() => a.filter((p) => !p.region || p.region.includes(l.value ?? h.F_COUNTRY.enum.MY))), { gatewayTab: e } = ne({
2133
+ gatewayTab: (v = r.value[0]) == null ? void 0 : v.value
2132
2134
  });
2133
- return (c, f) => {
2135
+ return (p, y) => {
2134
2136
  var s;
2135
- const u = g("FmTabs");
2136
- return y(), S("div", Ma, [
2137
- I("div", Oa, [
2138
- v(u, {
2137
+ const c = g("FmTabs");
2138
+ return f(), C("div", qa, [
2139
+ _("div", Ga, [
2140
+ m(c, {
2139
2141
  "model-value": M(e),
2140
- "onUpdate:modelValue": f[0] || (f[0] = (t) => Z(e) ? e.value = t : null),
2142
+ "onUpdate:modelValue": y[0] || (y[0] = (t) => Z(e) ? e.value = t : null),
2141
2143
  class: "mb-6",
2142
2144
  vertical: !0,
2143
2145
  items: r.value
2144
2146
  }, null, 8, ["model-value", "items"])
2145
2147
  ]),
2146
- I("div", Pa, [
2147
- M(e) ? (y(), F(ee((s = T.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
2148
- terminal: p.terminal,
2149
- onUpdate: p.onUpdate
2150
- })), null, 16)) : V("", !0)
2148
+ _("div", Aa, [
2149
+ M(e) ? (f(), F(ee((s = b.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
2150
+ terminal: d.terminal,
2151
+ onUpdate: d.onUpdate
2152
+ })), null, 16)) : k("", !0)
2151
2153
  ])
2152
2154
  ]);
2153
2155
  };
2154
2156
  }
2155
- }), Qa = /* @__PURE__ */ R({
2157
+ }), Da = { class: "flex flex-col gap-6" }, Ba = { class: "flex items-center justify-between" }, La = { class: "flex items-center gap-3" }, Ea = ["src"], Ya = { class: "text-xs font-semibold uppercase bg-gray-100 rounded px-2 py-1" }, Ka = { class: "font-medium" }, ja = { class: "grid grid-cols-2 gap-4" }, Ha = {
2158
+ key: 0,
2159
+ class: "text-gray-500"
2160
+ }, za = { class: "mt-2 flex gap-3" }, Qa = /* @__PURE__ */ S({
2161
+ __name: "PaymentCheckout",
2162
+ props: {
2163
+ terminal: {
2164
+ type: Object,
2165
+ required: !0
2166
+ },
2167
+ onUpdate: {
2168
+ type: Function,
2169
+ required: !0
2170
+ }
2171
+ },
2172
+ setup(I) {
2173
+ const d = I, a = () => (d.terminal.paymentCheckouts ?? []).map((y) => ({ ...y })), b = T(a());
2174
+ q(
2175
+ () => d.terminal.paymentCheckouts,
2176
+ () => {
2177
+ b.value = a();
2178
+ }
2179
+ );
2180
+ const l = {
2181
+ card: "Card",
2182
+ ecr: "ECR",
2183
+ ecr_qr: "ECR QR",
2184
+ qr: "QR",
2185
+ scanpay: "Scan Pay"
2186
+ }, r = (y) => y.action ? `${y.gateway} (${y.action})` : y.gateway;
2187
+ async function e() {
2188
+ await d.onUpdate({
2189
+ ...d.terminal,
2190
+ paymentCheckouts: b.value
2191
+ });
2192
+ }
2193
+ const v = be();
2194
+ function p() {
2195
+ we(
2196
+ v,
2197
+ "Reset Payment Checkout",
2198
+ "This will clear all customizations (display name, icon, tagline, sort order, enabled state) for every payment method on this terminal and restore the defaults. This action cannot be undone.",
2199
+ async () => {
2200
+ await d.onUpdate({
2201
+ ...d.terminal,
2202
+ paymentCheckouts: []
2203
+ });
2204
+ }
2205
+ );
2206
+ }
2207
+ return (y, c) => {
2208
+ const s = g("FmTooltip"), t = g("FmSwitch"), n = g("FmTextField"), i = g("FmButton");
2209
+ return f(), C("div", Da, [
2210
+ (f(!0), C(P, null, B(b.value, (u) => (f(), C("div", {
2211
+ key: u.id,
2212
+ class: "border rounded-lg p-6 flex flex-col gap-4"
2213
+ }, [
2214
+ _("div", Ba, [
2215
+ _("div", La, [
2216
+ m(s, {
2217
+ variant: "plain",
2218
+ placement: "top",
2219
+ content: u.gateway,
2220
+ "hide-arrow": !0
2221
+ }, {
2222
+ default: O(() => [
2223
+ _("img", {
2224
+ class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
2225
+ src: M(Fe)(u.gateway.toUpperCase())
2226
+ }, null, 8, Ea)
2227
+ ]),
2228
+ _: 2
2229
+ }, 1032, ["content"]),
2230
+ _("span", Ya, j(l[u.type] ?? u.type), 1),
2231
+ _("span", Ka, j(r(u)), 1)
2232
+ ]),
2233
+ m(t, {
2234
+ modelValue: u.enabled,
2235
+ "onUpdate:modelValue": (w) => u.enabled = w,
2236
+ label: "Enabled"
2237
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
2238
+ ]),
2239
+ _("div", ja, [
2240
+ m(n, {
2241
+ modelValue: u.displayName,
2242
+ "onUpdate:modelValue": (w) => u.displayName = w,
2243
+ label: "Display Name"
2244
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2245
+ m(n, {
2246
+ modelValue: u.icon,
2247
+ "onUpdate:modelValue": (w) => u.icon = w,
2248
+ label: "Icon URL",
2249
+ "label-mark": "optional"
2250
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2251
+ m(n, {
2252
+ modelValue: u.tagline,
2253
+ "onUpdate:modelValue": (w) => u.tagline = w,
2254
+ label: "Tagline",
2255
+ "label-mark": "optional"
2256
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2257
+ m(n, {
2258
+ modelValue: u.sortOrder,
2259
+ "onUpdate:modelValue": (w) => u.sortOrder = w,
2260
+ modelModifiers: { number: !0 },
2261
+ label: "Sort Order",
2262
+ type: "number"
2263
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
2264
+ ])
2265
+ ]))), 128)),
2266
+ b.value.length === 0 ? (f(), C("div", Ha, " No payment methods configured for this terminal. ")) : k("", !0),
2267
+ _("div", za, [
2268
+ m(i, {
2269
+ variant: "secondary",
2270
+ label: "Reset",
2271
+ icon: "restart_alt",
2272
+ onclick: p
2273
+ }),
2274
+ m(i, {
2275
+ variant: "primary",
2276
+ label: "Save",
2277
+ icon: "save",
2278
+ onclick: e
2279
+ })
2280
+ ])
2281
+ ]);
2282
+ };
2283
+ }
2284
+ }), ct = /* @__PURE__ */ S({
2156
2285
  __name: "TerminalSetting",
2157
2286
  props: {
2158
2287
  terminalId: {
@@ -2160,24 +2289,25 @@ const Se = {
2160
2289
  required: !0
2161
2290
  }
2162
2291
  },
2163
- setup(_) {
2164
- const p = _, { tab: a } = ne({
2292
+ setup(I) {
2293
+ const d = I, { tab: a } = ne({
2165
2294
  tab: "information"
2166
- }), { isLoading: T, startAsyncCall: l } = le(!0), r = fe(), e = se(), m = b();
2167
- async function c(o) {
2295
+ }), { isLoading: b, startAsyncCall: l } = le(!0), r = fe(), e = se(), v = T();
2296
+ async function p(n) {
2168
2297
  l(async () => {
2169
2298
  try {
2170
2299
  await K.updateById(
2171
- p.terminalId,
2300
+ d.terminalId,
2172
2301
  {
2173
- name: o.name,
2174
- status: o.status,
2175
- ecrs: o.ecrs ?? [],
2176
- gateways: o.gateways ?? [],
2177
- ecrIntegrations: o.ecrIntegrations ?? [],
2178
- qrIntegrations: o.qrIntegrations ?? []
2302
+ name: n.name,
2303
+ status: n.status,
2304
+ ecrs: n.ecrs ?? [],
2305
+ gateways: n.gateways ?? [],
2306
+ ecrIntegrations: n.ecrIntegrations ?? [],
2307
+ qrIntegrations: n.qrIntegrations ?? [],
2308
+ paymentCheckouts: n.paymentCheckouts ?? []
2179
2309
  }
2180
- ), m.value = await K.readById(p.terminalId), e.open({
2310
+ ), v.value = await K.readById(d.terminalId), e.open({
2181
2311
  type: "success",
2182
2312
  message: "Terminal updated successfully"
2183
2313
  });
@@ -2190,74 +2320,81 @@ const Se = {
2190
2320
  }
2191
2321
  });
2192
2322
  }
2193
- const f = [
2323
+ const y = [
2194
2324
  {
2195
2325
  label: "Information",
2196
2326
  value: "information",
2197
2327
  icon: "overview",
2198
- render: Ie
2328
+ render: xe
2199
2329
  },
2200
2330
  {
2201
2331
  label: "Setting Request",
2202
2332
  value: "settings",
2203
2333
  icon: "settings",
2204
- render: Ne,
2334
+ render: Ve,
2205
2335
  onlyFor: ["TERMINAL"]
2206
2336
  },
2207
2337
  {
2208
2338
  label: "SoftPos Gateway",
2209
2339
  value: "softpos",
2210
2340
  icon: "payment",
2211
- render: Me
2341
+ render: qe
2212
2342
  },
2213
2343
  {
2214
2344
  label: "ECR Gateway",
2215
2345
  value: "ecr",
2216
2346
  icon: "point_of_sale",
2217
- render: Sa,
2347
+ render: Ma,
2218
2348
  onlyFor: ["POS", "KIOSK"]
2219
2349
  },
2220
2350
  {
2221
2351
  label: "QR Gateway",
2222
2352
  value: "qr",
2223
2353
  icon: "qr_code",
2224
- render: qa,
2354
+ render: $a,
2225
2355
  onlyFor: ["POS", "KIOSK"]
2356
+ },
2357
+ {
2358
+ label: "Payment Checkout",
2359
+ value: "payment-checkout",
2360
+ icon: "tune",
2361
+ render: Qa,
2362
+ onlyFor: ["KIOSK", "POS", "TERMINAL"]
2226
2363
  }
2227
2364
  ];
2228
2365
  oe().currentCountry;
2229
- const u = k(() => {
2230
- var o;
2231
- return (o = f.find((i) => i.value === a.value)) == null ? void 0 : o.render;
2366
+ const c = U(() => {
2367
+ var n;
2368
+ return (n = y.find((i) => i.value === a.value)) == null ? void 0 : n.render;
2232
2369
  });
2233
2370
  async function s() {
2234
2371
  l(async () => {
2235
- m.value = await K.readById(p.terminalId);
2372
+ v.value = await K.readById(d.terminalId);
2236
2373
  });
2237
2374
  }
2238
- const t = k(() => f.filter((o) => {
2375
+ const t = U(() => y.filter((n) => {
2239
2376
  var i;
2240
- return !o.onlyFor || o.onlyFor.includes(((i = m.value) == null ? void 0 : i.deviceType) ?? "");
2377
+ return !n.onlyFor || n.onlyFor.includes(((i = v.value) == null ? void 0 : i.deviceType) ?? "");
2241
2378
  }));
2242
- return G(s), (o, i) => {
2243
- var x, n;
2244
- const d = g("FmTabs");
2245
- return y(), F(ge, {
2246
- title: `${(x = m.value) == null ? void 0 : x.deviceType} (${(n = m.value) == null ? void 0 : n._id})`,
2247
- loading: M(T),
2379
+ return G(s), (n, i) => {
2380
+ var w, o;
2381
+ const u = g("FmTabs");
2382
+ return f(), F(ge, {
2383
+ title: `${(w = v.value) == null ? void 0 : w.deviceType} (${(o = v.value) == null ? void 0 : o._id})`,
2384
+ loading: M(b),
2248
2385
  onBack: M(r).back
2249
2386
  }, {
2250
2387
  default: O(() => [
2251
- v(d, {
2388
+ m(u, {
2252
2389
  "model-value": M(a),
2253
- "onUpdate:modelValue": i[0] || (i[0] = (w) => Z(a) ? a.value = w : null),
2390
+ "onUpdate:modelValue": i[0] || (i[0] = (x) => Z(a) ? a.value = x : null),
2254
2391
  class: "mb-6",
2255
2392
  items: t.value
2256
2393
  }, null, 8, ["model-value", "items"]),
2257
- M(a) ? (y(), F(ee(u.value), ae(te({ key: 0 }, {
2258
- terminal: m.value,
2259
- onUpdate: c
2260
- })), null, 16)) : V("", !0)
2394
+ M(a) ? (f(), F(ee(c.value), ae(te({ key: 0 }, {
2395
+ terminal: v.value,
2396
+ onUpdate: p
2397
+ })), null, 16)) : k("", !0)
2261
2398
  ]),
2262
2399
  _: 1
2263
2400
  }, 8, ["title", "loading", "onBack"]);
@@ -2265,5 +2402,5 @@ const Se = {
2265
2402
  }
2266
2403
  });
2267
2404
  export {
2268
- Qa as default
2405
+ ct as default
2269
2406
  };