@feedmepos/mf-payment 1.5.12-dev → 1.5.13-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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as k, openBlock as g, createElementBlock as V, Fragment as q, createElementVNode as I, createTextVNode as $, toDisplayString as D, ref as b, resolveComponent as y, createVNode as v, createCommentVNode as N, unref as S, computed as R, isRef as B, createBlock as T, resolveDynamicComponent as Y, normalizeProps as L, mergeProps as K, toRef as G, watch as O, onMounted as M, withCtx as h, renderList as P } from "vue";
1
+ import { defineComponent as k, openBlock as y, createElementBlock as V, Fragment as h, createElementVNode as I, createTextVNode as $, toDisplayString as D, ref as b, resolveComponent as f, createVNode as v, createCommentVNode as N, unref as S, computed as O, isRef as B, createBlock as T, resolveDynamicComponent as Y, normalizeProps as L, mergeProps as K, toRef as q, watch as P, onMounted as M, withCtx as G, renderList as R } from "vue";
2
2
  import { u as H, e as C } from "./index-7Tof5vdq.js";
3
3
  import { useRouter as W } from "vue-router";
4
4
  import { t as A } from "./index-CxOPkwlX.js";
@@ -8,7 +8,7 @@ import { useSnackbar as Q } from "@feedmepos/ui-library";
8
8
  import { u as Z } from "./error-K1CakhA9.js";
9
9
  import { useCoreStore as j } from "@feedmepos/mf-common";
10
10
  import { z as ee, a as ae } from "./validator-DzjyJnvv.js";
11
- const te = /* @__PURE__ */ k({
11
+ const le = /* @__PURE__ */ k({
12
12
  __name: "Information",
13
13
  props: {
14
14
  terminal: {
@@ -17,7 +17,7 @@ const te = /* @__PURE__ */ k({
17
17
  }
18
18
  },
19
19
  setup(F) {
20
- return (d, a) => (g(), V(q, null, [
20
+ return (d, a) => (y(), V(h, null, [
21
21
  a[0] || (a[0] = I("b", null, "Name", -1)),
22
22
  $(": " + D(F.terminal.name), 1),
23
23
  a[1] || (a[1] = I("br", null, null, -1)),
@@ -32,7 +32,7 @@ const te = /* @__PURE__ */ k({
32
32
  a[7] || (a[7] = I("br", null, null, -1))
33
33
  ], 64));
34
34
  }
35
- }), le = { key: 0 }, ne = { class: "mt-6 space-x-6" }, oe = /* @__PURE__ */ k({
35
+ }), te = { key: 0 }, ne = { class: "mt-6 space-x-6" }, oe = /* @__PURE__ */ k({
36
36
  __name: "KioskMode",
37
37
  props: {
38
38
  terminal: {
@@ -41,42 +41,42 @@ const te = /* @__PURE__ */ k({
41
41
  }
42
42
  },
43
43
  setup(F) {
44
- const { isLoading: d, startAsyncCall: a } = H(!1), _ = Q(), l = b({
44
+ const { isLoading: d, startAsyncCall: a } = H(!1), _ = Q(), n = b({
45
45
  enable: !1,
46
46
  password: []
47
47
  }), r = F;
48
48
  function e() {
49
- return l.value.enable && l.value.password.filter((m) => !!m).length !== 6 ? _.open({
49
+ return n.value.enable && n.value.password.filter((p) => !!p).length !== 6 ? _.open({
50
50
  type: "error",
51
51
  message: "Unlock PIN is required when setting up kiosk mode for terminal."
52
52
  }) : a(async () => {
53
- const m = { enable: l.value.enable };
54
- m.enable && Object.assign(m, {
55
- password: l.value.password.join("")
53
+ const p = { enable: n.value.enable };
54
+ p.enable && Object.assign(p, {
55
+ password: n.value.password.join("")
56
56
  });
57
- const c = await A.kioskModeRequest(r.terminal._id, m);
57
+ const c = await A.kioskModeRequest(r.terminal._id, p);
58
58
  if (c === "OK")
59
59
  return _.open({ type: "info", message: "Kiosk mode applied successfully." });
60
- let f = c;
61
- return c === "client_not_connected" && (f = "Terminal not connected to the websocket server."), c.startsWith("terminal: ") && (f = c.replaceAll("terminal: ", "")), _.open({
60
+ let g = c;
61
+ return c === "client_not_connected" && (g = "Terminal not connected to the websocket server."), c.startsWith("terminal: ") && (g = c.replaceAll("terminal: ", "")), _.open({
62
62
  type: "error",
63
- message: f
63
+ message: g
64
64
  });
65
65
  });
66
66
  }
67
- return (m, c) => {
68
- const f = y("FmSwitch"), s = y("FmPinField"), u = y("FmButton");
69
- return g(), V(q, null, [
70
- v(f, {
71
- modelValue: l.value.enable,
72
- "onUpdate:modelValue": c[0] || (c[0] = (t) => l.value.enable = t),
67
+ return (p, c) => {
68
+ const g = f("FmSwitch"), s = f("FmPinField"), u = f("FmButton");
69
+ return y(), V(h, null, [
70
+ v(g, {
71
+ modelValue: n.value.enable,
72
+ "onUpdate:modelValue": c[0] || (c[0] = (l) => n.value.enable = l),
73
73
  label: "Enable Kiosk Mode?"
74
74
  }, null, 8, ["modelValue"]),
75
- l.value.enable ? (g(), V("div", le, [
75
+ n.value.enable ? (y(), V("div", te, [
76
76
  c[2] || (c[2] = I("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
77
77
  v(s, {
78
- modelValue: l.value.password,
79
- "onUpdate:modelValue": c[1] || (c[1] = (t) => l.value.password = t)
78
+ modelValue: n.value.password,
79
+ "onUpdate:modelValue": c[1] || (c[1] = (l) => n.value.password = l)
80
80
  }, null, 8, ["modelValue"])
81
81
  ])) : N("", !0),
82
82
  I("div", ne, [
@@ -108,22 +108,22 @@ const te = /* @__PURE__ */ k({
108
108
  value: "kiosk_mode",
109
109
  render: oe
110
110
  }
111
- ], _ = F, l = R(() => a.find((r) => r.value === d.value));
111
+ ], _ = F, n = O(() => a.find((r) => r.value === d.value));
112
112
  return (r, e) => {
113
113
  var c;
114
- const m = y("FmTabs");
115
- return g(), V(q, null, [
114
+ const p = f("FmTabs");
115
+ return y(), V(h, null, [
116
116
  e[1] || (e[1] = I("p", { className: "mt-1 my-6 text-gray-600" }, [
117
117
  I("b", null, "Note: "),
118
118
  $(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
119
119
  ], -1)),
120
- v(m, {
120
+ v(p, {
121
121
  "model-value": S(d),
122
- "onUpdate:modelValue": e[0] || (e[0] = (f) => B(d) ? d.value = f : null),
122
+ "onUpdate:modelValue": e[0] || (e[0] = (g) => B(d) ? d.value = g : null),
123
123
  class: "mb-6",
124
124
  items: a
125
125
  }, null, 8, ["model-value"]),
126
- S(d) ? (g(), T(Y((c = l.value) == null ? void 0 : c.render), L(K({ key: 0 }, { terminal: _.terminal })), null, 16)) : N("", !0)
126
+ S(d) ? (y(), T(Y((c = n.value) == null ? void 0 : c.render), L(K({ key: 0 }, { terminal: _.terminal })), null, 16)) : N("", !0)
127
127
  ], 64);
128
128
  };
129
129
  }
@@ -178,52 +178,52 @@ const te = /* @__PURE__ */ k({
178
178
  gateway: "Digio",
179
179
  region: C.F_COUNTRY.enum.TH
180
180
  }
181
- ], l = G(() => d.terminal), r = b(), e = b({
181
+ ], n = q(() => d.terminal), r = b(), e = b({
182
182
  packageId: "",
183
183
  uniqueId: "",
184
184
  developerId: "",
185
185
  isUat: !1
186
- }), m = () => {
186
+ }), p = () => {
187
187
  e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "";
188
188
  }, c = () => {
189
- if (!l.value.gateways || l.value.gateways.length === 0)
190
- return m();
191
- const t = l.value.gateways[0];
192
- if (!t.config)
193
- return m();
194
- switch (t.gateway) {
189
+ if (!n.value.gateways || n.value.gateways.length === 0)
190
+ return p();
191
+ const l = n.value.gateways[0];
192
+ if (!l.config)
193
+ return p();
194
+ switch (l.gateway) {
195
195
  case "Fiuu":
196
196
  e.value = {
197
- packageId: t.config.packageId,
198
- uniqueId: t.config.uniqueId,
197
+ packageId: l.config.packageId,
198
+ uniqueId: l.config.uniqueId,
199
199
  developerId: "",
200
200
  isUat: !1
201
201
  };
202
202
  break;
203
203
  case "Softspace":
204
204
  case "Digio":
205
- const n = JSON.parse(t.config.uniqueId);
205
+ const t = JSON.parse(l.config.uniqueId);
206
206
  e.value = {
207
- packageId: t.config.packageId,
208
- uniqueId: n.uniqueId,
209
- developerId: n.developerId,
210
- isUat: n.isUat
207
+ packageId: l.config.packageId,
208
+ uniqueId: t.uniqueId,
209
+ developerId: t.developerId,
210
+ isUat: t.isUat
211
211
  };
212
212
  return;
213
213
  }
214
214
  };
215
- O(l, c), M(c);
216
- async function f(t) {
217
- var n;
218
- (n = l.value.gateways) == null || n.splice(t, 1), d.onUpdate(l.value);
215
+ P(n, c), M(c);
216
+ async function g(l) {
217
+ var t;
218
+ (t = n.value.gateways) == null || t.splice(l, 1), d.onUpdate(n.value);
219
219
  }
220
- const s = R(() => _.filter((t) => t.region === a.value)), u = R(() => s.value.find((t) => t.value === e.value.packageId));
221
- return (t, n) => {
222
- const i = y("FmSelect"), p = y("FmTextField"), x = y("FmCheckbox"), o = y("FmButton"), w = y("FmForm");
223
- return g(), T(w, {
220
+ const s = O(() => _.filter((l) => l.region === a.value)), u = O(() => s.value.find((l) => l.value === e.value.packageId));
221
+ return (l, t) => {
222
+ const i = f("FmSelect"), m = f("FmTextField"), x = f("FmCheckbox"), o = f("FmButton"), w = f("FmForm");
223
+ return y(), T(w, {
224
224
  ref: r.value,
225
225
  class: "flex flex-col gap-16 w-[500px]",
226
- onValidationSuccess: n[5] || (n[5] = () => {
226
+ onValidationSuccess: t[5] || (t[5] = () => {
227
227
  const U = u.value;
228
228
  if (!U)
229
229
  return;
@@ -236,48 +236,48 @@ const te = /* @__PURE__ */ k({
236
236
  uniqueId: z
237
237
  }
238
238
  };
239
- (!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = J, d.onUpdate(l.value);
239
+ (!n.value.gateways || n.value.gateways.length > 1) && (n.value.gateways = []), n.value.gateways[0] = J, d.onUpdate(n.value);
240
240
  })
241
241
  }, {
242
- default: h(() => [
242
+ default: G(() => [
243
243
  v(i, {
244
244
  modelValue: e.value.packageId,
245
- "onUpdate:modelValue": n[0] || (n[0] = (U) => e.value.packageId = U),
245
+ "onUpdate:modelValue": t[0] || (t[0] = (U) => e.value.packageId = U),
246
246
  label: "Package ID",
247
247
  items: s.value
248
248
  }, null, 8, ["modelValue", "items"]),
249
- u.value && u.value.isLegacy ? (g(), V(q, { key: 0 }, [
250
- v(p, {
249
+ u.value && u.value.isLegacy ? (y(), V(h, { key: 0 }, [
250
+ v(m, {
251
251
  modelValue: e.value.uniqueId,
252
- "onUpdate:modelValue": n[1] || (n[1] = (U) => e.value.uniqueId = U),
252
+ "onUpdate:modelValue": t[1] || (t[1] = (U) => e.value.uniqueId = U),
253
253
  label: "Unique ID (TID)"
254
254
  }, null, 8, ["modelValue"]),
255
- u.value.isOutdated ? (g(), V("span", ie, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : N("", !0)
256
- ], 64)) : (g(), V(q, { key: 1 }, [
257
- v(p, {
255
+ u.value.isOutdated ? (y(), V("span", ie, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : N("", !0)
256
+ ], 64)) : (y(), V(h, { key: 1 }, [
257
+ v(m, {
258
258
  modelValue: e.value.developerId,
259
- "onUpdate:modelValue": n[2] || (n[2] = (U) => e.value.developerId = U),
259
+ "onUpdate:modelValue": t[2] || (t[2] = (U) => e.value.developerId = U),
260
260
  label: "Developer ID (MID)"
261
261
  }, null, 8, ["modelValue"]),
262
- v(p, {
262
+ v(m, {
263
263
  modelValue: e.value.uniqueId,
264
- "onUpdate:modelValue": n[3] || (n[3] = (U) => e.value.uniqueId = U),
264
+ "onUpdate:modelValue": t[3] || (t[3] = (U) => e.value.uniqueId = U),
265
265
  label: "Unique ID (TID)"
266
266
  }, null, 8, ["modelValue"]),
267
267
  v(x, {
268
268
  modelValue: e.value.isUat,
269
- "onUpdate:modelValue": n[4] || (n[4] = (U) => e.value.isUat = U),
269
+ "onUpdate:modelValue": t[4] || (t[4] = (U) => e.value.isUat = U),
270
270
  label: "Is UAT (Test)",
271
271
  value: "1"
272
272
  }, null, 8, ["modelValue"])
273
273
  ], 64)),
274
274
  I("div", ue, [
275
- l.value.gateways && l.value.gateways.length > 0 ? (g(), T(o, {
275
+ n.value.gateways && n.value.gateways.length > 0 ? (y(), T(o, {
276
276
  key: 0,
277
277
  class: "flex-1",
278
278
  variant: "secondary",
279
279
  label: "Delete",
280
- onclick: () => f(0)
280
+ onclick: () => g(0)
281
281
  }, null, 8, ["onclick"])) : N("", !0),
282
282
  v(o, {
283
283
  type: "submit",
@@ -294,7 +294,7 @@ const te = /* @__PURE__ */ k({
294
294
  }), ce = {
295
295
  key: 0,
296
296
  class: "flex items-center justify-center min-h-[80vh]"
297
- }, de = { class: "flex mt-6 space-x-6" }, me = /* @__PURE__ */ k({
297
+ }, de = { class: "flex mt-6 space-x-6" }, pe = /* @__PURE__ */ k({
298
298
  __name: "TerminalGateway",
299
299
  props: {
300
300
  terminal: {
@@ -307,46 +307,46 @@ const te = /* @__PURE__ */ k({
307
307
  }
308
308
  },
309
309
  setup(F) {
310
- const { isLoading: d, startAsyncCall: a } = H(), _ = F, l = G(() => _.terminal), r = b(), e = b(), m = b(-1), c = b({
310
+ const { isLoading: d, startAsyncCall: a } = H(), _ = F, n = q(() => _.terminal), r = b(), e = b(), p = b(-1), c = b({
311
311
  terminalId: ""
312
- }), f = () => {
313
- c.value.terminalId = "", m.value = -1;
312
+ }), g = () => {
313
+ c.value.terminalId = "", p.value = -1;
314
314
  }, s = () => {
315
315
  if (a(async () => {
316
316
  r.value = await A.getRestaurantTerminals(_.terminal.referenceId);
317
317
  }), !_.terminal.ecrs)
318
- return f();
319
- const n = _.terminal.ecrs.findIndex((p) => p && p.gateway && p.gateway === "FeedMe");
320
- if (n === -1)
321
- return f();
322
- m.value = n;
323
- const i = _.terminal.ecrs.at(n);
318
+ return g();
319
+ const t = _.terminal.ecrs.findIndex((m) => m && m.gateway && m.gateway === "FeedMe");
320
+ if (t === -1)
321
+ return g();
322
+ p.value = t;
323
+ const i = _.terminal.ecrs.at(t);
324
324
  i.gateway === "FeedMe" && i.config && (c.value = {
325
325
  terminalId: i.config.terminalId
326
326
  });
327
327
  };
328
- O(l, s), M(s);
329
- const u = R(() => (r.value ?? []).map((n) => ({
330
- label: n.name ?? n._id,
331
- value: n._id
328
+ P(n, s), M(s);
329
+ const u = O(() => (r.value ?? []).map((t) => ({
330
+ label: t.name ?? t._id,
331
+ value: t._id
332
332
  })));
333
- async function t(n) {
333
+ async function l(t) {
334
334
  var i;
335
- (i = _.terminal.ecrs) == null || i.splice(n, 1), _.onUpdate(_.terminal);
335
+ (i = _.terminal.ecrs) == null || i.splice(t, 1), _.onUpdate(_.terminal);
336
336
  }
337
- return (n, i) => {
338
- const p = y("FmCircularProgress"), x = y("FmSelect"), o = y("FmButton"), w = y("FmForm");
339
- return S(d) ? (g(), V("div", ce, [
340
- v(p, { size: "xxl" })
341
- ])) : (g(), T(w, {
337
+ return (t, i) => {
338
+ const m = f("FmCircularProgress"), x = f("FmSelect"), o = f("FmButton"), w = f("FmForm");
339
+ return S(d) ? (y(), V("div", ce, [
340
+ v(m, { size: "xxl" })
341
+ ])) : (y(), T(w, {
342
342
  key: 1,
343
343
  ref: e.value,
344
344
  class: "flex flex-col gap-16 w-[500px]",
345
345
  onValidationSuccess: i[1] || (i[1] = () => {
346
- 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 })), _.onUpdate(l.value);
346
+ p.value > -1 ? n.value.ecrs[p.value] = { gateway: "FeedMe", config: c.value } : (n.value.ecrs || (n.value.ecrs = []), n.value.ecrs.push({ gateway: "FeedMe", config: c.value })), _.onUpdate(n.value);
347
347
  })
348
348
  }, {
349
- default: h(() => [
349
+ default: G(() => [
350
350
  v(x, {
351
351
  modelValue: c.value.terminalId,
352
352
  "onUpdate:modelValue": i[0] || (i[0] = (U) => c.value.terminalId = U),
@@ -355,12 +355,12 @@ const te = /* @__PURE__ */ k({
355
355
  rules: S(ee)(S(ae).string())
356
356
  }, null, 8, ["modelValue", "items", "rules"]),
357
357
  I("div", de, [
358
- m.value > -1 ? (g(), T(o, {
358
+ p.value > -1 ? (y(), T(o, {
359
359
  key: 0,
360
360
  class: "flex-1",
361
361
  variant: "secondary",
362
362
  label: "Delete",
363
- onclick: () => t(m.value)
363
+ onclick: () => l(p.value)
364
364
  }, null, 8, ["onclick"])) : N("", !0),
365
365
  v(o, {
366
366
  type: "submit",
@@ -374,7 +374,7 @@ const te = /* @__PURE__ */ k({
374
374
  }, 512));
375
375
  };
376
376
  }
377
- }), pe = { class: "flex mt-6 space-x-6" }, ve = /* @__PURE__ */ k({
377
+ }), me = { class: "flex mt-6 space-x-6" }, ve = /* @__PURE__ */ k({
378
378
  __name: "GhlGateway",
379
379
  props: {
380
380
  terminal: {
@@ -387,67 +387,67 @@ const te = /* @__PURE__ */ k({
387
387
  }
388
388
  },
389
389
  setup(F) {
390
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b({
390
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b({
391
391
  merchantId: "",
392
392
  terminalId: "",
393
393
  privateKey: ""
394
394
  }), e = () => {
395
- r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", l.value = -1;
396
- }, m = () => {
395
+ r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", n.value = -1;
396
+ }, p = () => {
397
397
  if (!a.value.ecrs)
398
398
  return e();
399
- const f = a.value.ecrs.findIndex((u) => u && u.gateway && u.gateway === "Ghl");
400
- if (f === -1)
399
+ const g = a.value.ecrs.findIndex((u) => u && u.gateway && u.gateway === "Ghl");
400
+ if (g === -1)
401
401
  return e();
402
- l.value = f;
403
- const s = a.value.ecrs.at(f);
402
+ n.value = g;
403
+ const s = a.value.ecrs.at(g);
404
404
  s.gateway === "Ghl" && s.config && (r.value = {
405
405
  merchantId: s.config.merchantId,
406
406
  terminalId: s.config.terminalId,
407
407
  privateKey: s.config.privateKey || ""
408
408
  });
409
409
  };
410
- O(a, m), M(m);
411
- async function c(f) {
410
+ P(a, p), M(p);
411
+ async function c(g) {
412
412
  var s;
413
- (s = a.value.ecrs) == null || s.splice(f, 1), d.onUpdate(a.value);
413
+ (s = a.value.ecrs) == null || s.splice(g, 1), d.onUpdate(a.value);
414
414
  }
415
- return (f, s) => {
416
- const u = y("FmTextField"), t = y("FmTextarea"), n = y("FmButton"), i = y("FmForm");
417
- return g(), T(i, {
415
+ return (g, s) => {
416
+ const u = f("FmTextField"), l = f("FmTextarea"), t = f("FmButton"), i = f("FmForm");
417
+ return y(), T(i, {
418
418
  ref: _.value,
419
419
  class: "flex flex-col gap-16 w-[500px]",
420
420
  onValidationSuccess: s[3] || (s[3] = () => {
421
- 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);
421
+ n.value > -1 ? a.value.ecrs[n.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);
422
422
  })
423
423
  }, {
424
- default: h(() => [
424
+ default: G(() => [
425
425
  v(u, {
426
426
  modelValue: r.value.merchantId,
427
- "onUpdate:modelValue": s[0] || (s[0] = (p) => r.value.merchantId = p),
427
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => r.value.merchantId = m),
428
428
  label: "Merchant ID"
429
429
  }, null, 8, ["modelValue"]),
430
430
  v(u, {
431
431
  modelValue: r.value.terminalId,
432
- "onUpdate:modelValue": s[1] || (s[1] = (p) => r.value.terminalId = p),
432
+ "onUpdate:modelValue": s[1] || (s[1] = (m) => r.value.terminalId = m),
433
433
  label: "Terminal ID"
434
434
  }, null, 8, ["modelValue"]),
435
- v(t, {
435
+ v(l, {
436
436
  modelValue: r.value.privateKey,
437
- "onUpdate:modelValue": s[2] || (s[2] = (p) => r.value.privateKey = p),
437
+ "onUpdate:modelValue": s[2] || (s[2] = (m) => r.value.privateKey = m),
438
438
  label: "Private Key",
439
439
  "label-mark": "optional",
440
440
  "label-info": "Default will use FeedMe Private Key"
441
441
  }, null, 8, ["modelValue"]),
442
- I("div", pe, [
443
- l.value > -1 ? (g(), T(n, {
442
+ I("div", me, [
443
+ n.value > -1 ? (y(), T(t, {
444
444
  key: 0,
445
445
  class: "flex-1",
446
446
  variant: "secondary",
447
447
  label: "Delete",
448
- onclick: () => c(l.value)
448
+ onclick: () => c(n.value)
449
449
  }, null, 8, ["onclick"])) : N("", !0),
450
- v(n, {
450
+ v(t, {
451
451
  type: "submit",
452
452
  class: "flex-1",
453
453
  variant: "primary",
@@ -472,48 +472,48 @@ const te = /* @__PURE__ */ k({
472
472
  }
473
473
  },
474
474
  setup(F) {
475
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b(), e = b({
475
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b(), e = b({
476
476
  ip: "",
477
477
  receiptName: "",
478
478
  cardTypes: []
479
- }), m = () => {
480
- e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
479
+ }), p = () => {
480
+ e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
481
481
  }, c = () => {
482
482
  var i;
483
483
  if (!a.value.ecrIntegrations)
484
- return m();
485
- const u = a.value.ecrIntegrations, t = u.findIndex((p) => p && p.gateway && p.gateway === "Maybank");
486
- if (t === -1)
487
- return m();
488
- l.value = t;
489
- const n = u.at(t);
490
- n.gateway === "Maybank" && n.config && (e.value = {
491
- ip: n.config.ip ?? "",
492
- receiptName: n.receiptName ?? "",
493
- cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
484
+ return p();
485
+ const u = a.value.ecrIntegrations, l = u.findIndex((m) => m && m.gateway && m.gateway === "Maybank");
486
+ if (l === -1)
487
+ return p();
488
+ n.value = l;
489
+ const t = u.at(l);
490
+ t.gateway === "Maybank" && t.config && (e.value = {
491
+ ip: t.config.ip ?? "",
492
+ receiptName: t.receiptName ?? "",
493
+ cardTypes: ((i = t.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
494
494
  });
495
495
  };
496
- O(a, c), M(c);
497
- async function f(u) {
498
- var t;
499
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
496
+ P(a, c), M(c);
497
+ async function g(u) {
498
+ var l;
499
+ (l = a.value.ecrIntegrations) == null || l.splice(u, 1), d.onUpdate(a.value);
500
500
  }
501
501
  async function s() {
502
502
  e.value.cardTypes.push(r.value), r.value = "";
503
503
  }
504
- return (u, t) => {
505
- const n = y("FmTextField"), i = y("FmButton"), p = y("FmChip"), x = y("FmForm");
506
- return g(), T(x, {
504
+ return (u, l) => {
505
+ const t = f("FmTextField"), i = f("FmButton"), m = f("FmChip"), x = f("FmForm");
506
+ return y(), T(x, {
507
507
  ref: _.value,
508
508
  class: "flex flex-col gap-16 w-[500px]",
509
- onValidationSuccess: t[3] || (t[3] = () => {
509
+ onValidationSuccess: l[3] || (l[3] = () => {
510
510
  var o, w;
511
- l.value > -1 ? a.value.ecrIntegrations[l.value] = {
511
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
512
512
  gateway: "Maybank",
513
513
  config: { ip: e.value.ip },
514
514
  receiptName: e.value.receiptName,
515
515
  dialogConfig: {
516
- ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
516
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : w.dialogConfig,
517
517
  cardTypes: e.value.cardTypes
518
518
  }
519
519
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -526,22 +526,22 @@ const te = /* @__PURE__ */ k({
526
526
  })), d.onUpdate(a.value);
527
527
  })
528
528
  }, {
529
- default: h(() => [
530
- v(n, {
529
+ default: G(() => [
530
+ v(t, {
531
531
  modelValue: e.value.ip,
532
- "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
532
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.ip = o),
533
533
  label: "IP Address"
534
534
  }, null, 8, ["modelValue"]),
535
- v(n, {
535
+ v(t, {
536
536
  modelValue: e.value.receiptName,
537
- "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
537
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => e.value.receiptName = o),
538
538
  label: "Receipt Payment Name",
539
539
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
540
540
  }, null, 8, ["modelValue"]),
541
541
  I("div", fe, [
542
- v(n, {
542
+ v(t, {
543
543
  modelValue: r.value,
544
- "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
544
+ "onUpdate:modelValue": l[2] || (l[2] = (o) => r.value = o),
545
545
  label: "Fallback Card Types",
546
546
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
547
547
  }, null, 8, ["modelValue"]),
@@ -552,7 +552,7 @@ const te = /* @__PURE__ */ k({
552
552
  })
553
553
  ]),
554
554
  I("div", ye, [
555
- (g(!0), V(q, null, P(e.value.cardTypes, (o) => (g(), T(p, {
555
+ (y(!0), V(h, null, R(e.value.cardTypes, (o) => (y(), T(m, {
556
556
  key: o,
557
557
  label: o,
558
558
  removable: !0,
@@ -560,12 +560,12 @@ const te = /* @__PURE__ */ k({
560
560
  }, null, 8, ["label", "onChipClosed"]))), 128))
561
561
  ]),
562
562
  I("div", ge, [
563
- l.value > -1 ? (g(), T(i, {
563
+ n.value > -1 ? (y(), T(i, {
564
564
  key: 0,
565
565
  class: "flex-1",
566
566
  variant: "secondary",
567
567
  label: "Delete",
568
- onclick: () => f(l.value)
568
+ onclick: () => g(n.value)
569
569
  }, null, 8, ["onclick"])) : N("", !0),
570
570
  v(i, {
571
571
  type: "submit",
@@ -592,48 +592,48 @@ const te = /* @__PURE__ */ k({
592
592
  }
593
593
  },
594
594
  setup(F) {
595
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b(), e = b({
595
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b(), e = b({
596
596
  ip: "",
597
597
  receiptName: "",
598
598
  cardTypes: []
599
- }), m = () => {
600
- e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
599
+ }), p = () => {
600
+ e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
601
601
  }, c = () => {
602
602
  var i;
603
603
  if (!a.value.ecrIntegrations)
604
- return m();
605
- const u = a.value.ecrIntegrations, t = u.findIndex((p) => p && p.gateway && p.gateway === "Maybank2");
606
- if (t === -1)
607
- return m();
608
- l.value = t;
609
- const n = u.at(t);
610
- n.gateway === "Maybank2" && n.config && (e.value = {
611
- ip: n.config.ip ?? "",
612
- receiptName: n.receiptName ?? "",
613
- cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
604
+ return p();
605
+ const u = a.value.ecrIntegrations, l = u.findIndex((m) => m && m.gateway && m.gateway === "Maybank2");
606
+ if (l === -1)
607
+ return p();
608
+ n.value = l;
609
+ const t = u.at(l);
610
+ t.gateway === "Maybank2" && t.config && (e.value = {
611
+ ip: t.config.ip ?? "",
612
+ receiptName: t.receiptName ?? "",
613
+ cardTypes: ((i = t.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
614
614
  });
615
615
  };
616
- O(a, c), M(c);
617
- async function f(u) {
618
- var t;
619
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
616
+ P(a, c), M(c);
617
+ async function g(u) {
618
+ var l;
619
+ (l = a.value.ecrIntegrations) == null || l.splice(u, 1), d.onUpdate(a.value);
620
620
  }
621
621
  async function s() {
622
622
  e.value.cardTypes.push(r.value), r.value = "";
623
623
  }
624
- return (u, t) => {
625
- const n = y("FmTextField"), i = y("FmButton"), p = y("FmChip"), x = y("FmForm");
626
- return g(), T(x, {
624
+ return (u, l) => {
625
+ const t = f("FmTextField"), i = f("FmButton"), m = f("FmChip"), x = f("FmForm");
626
+ return y(), T(x, {
627
627
  ref: _.value,
628
628
  class: "flex flex-col gap-16 w-[500px]",
629
- onValidationSuccess: t[3] || (t[3] = () => {
629
+ onValidationSuccess: l[3] || (l[3] = () => {
630
630
  var o, w;
631
- l.value > -1 ? a.value.ecrIntegrations[l.value] = {
631
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
632
632
  gateway: "Maybank2",
633
633
  config: { ip: e.value.ip },
634
634
  receiptName: e.value.receiptName,
635
635
  dialogConfig: {
636
- ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
636
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : w.dialogConfig,
637
637
  cardTypes: e.value.cardTypes
638
638
  }
639
639
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -646,22 +646,22 @@ const te = /* @__PURE__ */ k({
646
646
  })), d.onUpdate(a.value);
647
647
  })
648
648
  }, {
649
- default: h(() => [
650
- v(n, {
649
+ default: G(() => [
650
+ v(t, {
651
651
  modelValue: e.value.ip,
652
- "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
652
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.ip = o),
653
653
  label: "IP Address"
654
654
  }, null, 8, ["modelValue"]),
655
- v(n, {
655
+ v(t, {
656
656
  modelValue: e.value.receiptName,
657
- "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
657
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => e.value.receiptName = o),
658
658
  label: "Receipt Payment Name",
659
659
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
660
660
  }, null, 8, ["modelValue"]),
661
661
  I("div", _e, [
662
- v(n, {
662
+ v(t, {
663
663
  modelValue: r.value,
664
- "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
664
+ "onUpdate:modelValue": l[2] || (l[2] = (o) => r.value = o),
665
665
  label: "Fallback Card Types",
666
666
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
667
667
  }, null, 8, ["modelValue"]),
@@ -672,7 +672,7 @@ const te = /* @__PURE__ */ k({
672
672
  })
673
673
  ]),
674
674
  I("div", Ie, [
675
- (g(!0), V(q, null, P(e.value.cardTypes, (o) => (g(), T(p, {
675
+ (y(!0), V(h, null, R(e.value.cardTypes, (o) => (y(), T(m, {
676
676
  key: o,
677
677
  label: o,
678
678
  removable: !0,
@@ -680,12 +680,12 @@ const te = /* @__PURE__ */ k({
680
680
  }, null, 8, ["label", "onChipClosed"]))), 128))
681
681
  ]),
682
682
  I("div", Fe, [
683
- l.value > -1 ? (g(), T(i, {
683
+ n.value > -1 ? (y(), T(i, {
684
684
  key: 0,
685
685
  class: "flex-1",
686
686
  variant: "secondary",
687
687
  label: "Delete",
688
- onclick: () => f(l.value)
688
+ onclick: () => g(n.value)
689
689
  }, null, 8, ["onclick"])) : N("", !0),
690
690
  v(i, {
691
691
  type: "submit",
@@ -712,48 +712,48 @@ const te = /* @__PURE__ */ k({
712
712
  }
713
713
  },
714
714
  setup(F) {
715
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b(), e = b({
715
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b(), e = b({
716
716
  receiptName: "",
717
717
  config: {},
718
718
  cardTypes: []
719
- }), m = () => {
720
- e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
719
+ }), p = () => {
720
+ e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
721
721
  }, c = () => {
722
722
  var i;
723
723
  if (!a.value.ecrIntegrations)
724
- return m();
725
- const u = a.value.ecrIntegrations, t = u.findIndex((p) => p && p.gateway && p.gateway === "Maybank3");
726
- if (t === -1)
727
- return m();
728
- l.value = t;
729
- const n = u.at(t);
730
- n.gateway === "Maybank3" && n.config && (e.value = {
731
- config: n.config,
732
- receiptName: n.receiptName ?? "",
733
- cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
724
+ return p();
725
+ const u = a.value.ecrIntegrations, l = u.findIndex((m) => m && m.gateway && m.gateway === "Maybank3");
726
+ if (l === -1)
727
+ return p();
728
+ n.value = l;
729
+ const t = u.at(l);
730
+ t.gateway === "Maybank3" && t.config && (e.value = {
731
+ config: t.config,
732
+ receiptName: t.receiptName ?? "",
733
+ cardTypes: ((i = t.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
734
734
  });
735
735
  };
736
- O(a, c), M(c);
737
- async function f(u) {
738
- var t;
739
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
736
+ P(a, c), M(c);
737
+ async function g(u) {
738
+ var l;
739
+ (l = a.value.ecrIntegrations) == null || l.splice(u, 1), d.onUpdate(a.value);
740
740
  }
741
741
  async function s() {
742
742
  e.value.cardTypes.push(r.value), r.value = "";
743
743
  }
744
- return (u, t) => {
745
- const n = y("FmTextField"), i = y("FmButton"), p = y("FmChip"), x = y("FmForm");
746
- return g(), T(x, {
744
+ return (u, l) => {
745
+ const t = f("FmTextField"), i = f("FmButton"), m = f("FmChip"), x = f("FmForm");
746
+ return y(), T(x, {
747
747
  ref: _.value,
748
748
  class: "flex flex-col gap-16 w-[500px]",
749
- onValidationSuccess: t[2] || (t[2] = () => {
749
+ onValidationSuccess: l[2] || (l[2] = () => {
750
750
  var o, w;
751
- l.value > -1 ? a.value.ecrIntegrations[l.value] = {
751
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
752
752
  gateway: "Maybank3",
753
753
  config: e.value.config,
754
754
  receiptName: e.value.receiptName,
755
755
  dialogConfig: {
756
- ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
756
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : w.dialogConfig,
757
757
  cardTypes: e.value.cardTypes
758
758
  }
759
759
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -766,17 +766,17 @@ const te = /* @__PURE__ */ k({
766
766
  })), d.onUpdate(a.value);
767
767
  })
768
768
  }, {
769
- default: h(() => [
770
- v(n, {
769
+ default: G(() => [
770
+ v(t, {
771
771
  modelValue: e.value.receiptName,
772
- "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
772
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.receiptName = o),
773
773
  label: "Receipt Payment Name",
774
774
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
775
775
  }, null, 8, ["modelValue"]),
776
776
  I("div", we, [
777
- v(n, {
777
+ v(t, {
778
778
  modelValue: r.value,
779
- "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
779
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => r.value = o),
780
780
  label: "Fallback Card Types",
781
781
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
782
782
  }, null, 8, ["modelValue"]),
@@ -787,7 +787,7 @@ const te = /* @__PURE__ */ k({
787
787
  })
788
788
  ]),
789
789
  I("div", xe, [
790
- (g(!0), V(q, null, P(e.value.cardTypes, (o) => (g(), T(p, {
790
+ (y(!0), V(h, null, R(e.value.cardTypes, (o) => (y(), T(m, {
791
791
  key: o,
792
792
  label: o,
793
793
  removable: !0,
@@ -795,12 +795,12 @@ const te = /* @__PURE__ */ k({
795
795
  }, null, 8, ["label", "onChipClosed"]))), 128))
796
796
  ]),
797
797
  I("div", Ne, [
798
- l.value > -1 ? (g(), T(i, {
798
+ n.value > -1 ? (y(), T(i, {
799
799
  key: 0,
800
800
  class: "flex-1",
801
801
  variant: "secondary",
802
802
  label: "Delete",
803
- onclick: () => f(l.value)
803
+ onclick: () => g(n.value)
804
804
  }, null, 8, ["onclick"])) : N("", !0),
805
805
  v(i, {
806
806
  type: "submit",
@@ -827,48 +827,48 @@ const te = /* @__PURE__ */ k({
827
827
  }
828
828
  },
829
829
  setup(F) {
830
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b(), e = b({
830
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b(), e = b({
831
831
  ip: "",
832
832
  receiptName: "",
833
833
  cardTypes: []
834
- }), m = () => {
835
- e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
834
+ }), p = () => {
835
+ e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
836
836
  }, c = () => {
837
837
  var i;
838
838
  if (!a.value.ecrIntegrations)
839
- return m();
840
- const u = a.value.ecrIntegrations, t = u.findIndex((p) => p && p.gateway && p.gateway === "Nets");
841
- if (t === -1)
842
- return m();
843
- l.value = t;
844
- const n = u.at(t);
845
- n.gateway === "Nets" && n.config && (e.value = {
846
- ip: n.config.ip ?? "",
847
- receiptName: n.receiptName ?? "",
848
- cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
839
+ return p();
840
+ const u = a.value.ecrIntegrations, l = u.findIndex((m) => m && m.gateway && m.gateway === "Nets");
841
+ if (l === -1)
842
+ return p();
843
+ n.value = l;
844
+ const t = u.at(l);
845
+ t.gateway === "Nets" && t.config && (e.value = {
846
+ ip: t.config.ip ?? "",
847
+ receiptName: t.receiptName ?? "",
848
+ cardTypes: ((i = t.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
849
849
  });
850
850
  };
851
- O(a, c), M(c);
852
- async function f(u) {
853
- var t;
854
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
851
+ P(a, c), M(c);
852
+ async function g(u) {
853
+ var l;
854
+ (l = a.value.ecrIntegrations) == null || l.splice(u, 1), d.onUpdate(a.value);
855
855
  }
856
856
  async function s() {
857
857
  e.value.cardTypes.push(r.value), r.value = "";
858
858
  }
859
- return (u, t) => {
860
- const n = y("FmTextField"), i = y("FmButton"), p = y("FmChip"), x = y("FmForm");
861
- return g(), T(x, {
859
+ return (u, l) => {
860
+ const t = f("FmTextField"), i = f("FmButton"), m = f("FmChip"), x = f("FmForm");
861
+ return y(), T(x, {
862
862
  ref: _.value,
863
863
  class: "flex flex-col gap-16 w-[500px]",
864
- onValidationSuccess: t[3] || (t[3] = () => {
864
+ onValidationSuccess: l[3] || (l[3] = () => {
865
865
  var o, w;
866
- l.value > -1 ? a.value.ecrIntegrations[l.value] = {
866
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
867
867
  gateway: "Nets",
868
868
  config: { ip: e.value.ip },
869
869
  receiptName: e.value.receiptName,
870
870
  dialogConfig: {
871
- ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
871
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : w.dialogConfig,
872
872
  cardTypes: e.value.cardTypes
873
873
  }
874
874
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -881,22 +881,22 @@ const te = /* @__PURE__ */ k({
881
881
  })), d.onUpdate(a.value);
882
882
  })
883
883
  }, {
884
- default: h(() => [
885
- v(n, {
884
+ default: G(() => [
885
+ v(t, {
886
886
  modelValue: e.value.ip,
887
- "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
887
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.ip = o),
888
888
  label: "IP Address"
889
889
  }, null, 8, ["modelValue"]),
890
- v(n, {
890
+ v(t, {
891
891
  modelValue: e.value.receiptName,
892
- "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
892
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => e.value.receiptName = o),
893
893
  label: "Receipt Payment Name",
894
894
  "label-info": "Default receipt display will be 'TERMINAL_NETS'"
895
895
  }, null, 8, ["modelValue"]),
896
896
  I("div", Ce, [
897
- v(n, {
897
+ v(t, {
898
898
  modelValue: r.value,
899
- "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
899
+ "onUpdate:modelValue": l[2] || (l[2] = (o) => r.value = o),
900
900
  label: "Fallback Card Types",
901
901
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
902
902
  }, null, 8, ["modelValue"]),
@@ -907,7 +907,7 @@ const te = /* @__PURE__ */ k({
907
907
  })
908
908
  ]),
909
909
  I("div", Ve, [
910
- (g(!0), V(q, null, P(e.value.cardTypes, (o) => (g(), T(p, {
910
+ (y(!0), V(h, null, R(e.value.cardTypes, (o) => (y(), T(m, {
911
911
  key: o,
912
912
  label: o,
913
913
  removable: !0,
@@ -915,12 +915,12 @@ const te = /* @__PURE__ */ k({
915
915
  }, null, 8, ["label", "onChipClosed"]))), 128))
916
916
  ]),
917
917
  I("div", Ue, [
918
- l.value > -1 ? (g(), T(i, {
918
+ n.value > -1 ? (y(), T(i, {
919
919
  key: 0,
920
920
  class: "flex-1",
921
921
  variant: "secondary",
922
922
  label: "Delete",
923
- onclick: () => f(l.value)
923
+ onclick: () => g(n.value)
924
924
  }, null, 8, ["onclick"])) : N("", !0),
925
925
  v(i, {
926
926
  type: "submit",
@@ -934,7 +934,7 @@ const te = /* @__PURE__ */ k({
934
934
  }, 512);
935
935
  };
936
936
  }
937
- }), Me = { class: "flex items-end" }, he = { class: "flex flex-wrap gap-8 items-center mt-4" }, qe = { class: "flex mt-6 space-x-6" }, Ge = /* @__PURE__ */ k({
937
+ }), Me = { class: "flex items-end" }, Ge = { class: "flex flex-wrap gap-8 items-center mt-4" }, he = { class: "flex mt-6 space-x-6" }, qe = /* @__PURE__ */ k({
938
938
  __name: "KBankGateway",
939
939
  props: {
940
940
  terminal: {
@@ -947,46 +947,46 @@ const te = /* @__PURE__ */ k({
947
947
  }
948
948
  },
949
949
  setup(F) {
950
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b(), e = b({
950
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b(), e = b({
951
951
  receiptName: "",
952
952
  cardTypes: []
953
- }), m = () => {
954
- e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
953
+ }), p = () => {
954
+ e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
955
955
  }, c = () => {
956
956
  var i;
957
957
  if (!a.value.ecrIntegrations)
958
- return m();
959
- const u = a.value.ecrIntegrations, t = u.findIndex((p) => p && p.gateway && p.gateway === "Kbank");
960
- if (t === -1)
961
- return m();
962
- l.value = t;
963
- const n = u.at(t);
964
- n.gateway === "Kbank" && n.config && (e.value = {
965
- receiptName: n.receiptName ?? "",
966
- cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
958
+ return p();
959
+ const u = a.value.ecrIntegrations, l = u.findIndex((m) => m && m.gateway && m.gateway === "Kbank");
960
+ if (l === -1)
961
+ return p();
962
+ n.value = l;
963
+ const t = u.at(l);
964
+ t.gateway === "Kbank" && t.config && (e.value = {
965
+ receiptName: t.receiptName ?? "",
966
+ cardTypes: ((i = t.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
967
967
  });
968
968
  };
969
- O(a, c), M(c);
970
- async function f(u) {
971
- var t;
972
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
969
+ P(a, c), M(c);
970
+ async function g(u) {
971
+ var l;
972
+ (l = a.value.ecrIntegrations) == null || l.splice(u, 1), d.onUpdate(a.value);
973
973
  }
974
974
  async function s() {
975
975
  e.value.cardTypes.push(r.value), r.value = "";
976
976
  }
977
- return (u, t) => {
978
- const n = y("FmTextField"), i = y("FmButton"), p = y("FmChip"), x = y("FmForm");
979
- return g(), T(x, {
977
+ return (u, l) => {
978
+ const t = f("FmTextField"), i = f("FmButton"), m = f("FmChip"), x = f("FmForm");
979
+ return y(), T(x, {
980
980
  ref: _.value,
981
981
  class: "flex flex-col gap-16 w-[500px]",
982
- onValidationSuccess: t[2] || (t[2] = () => {
982
+ onValidationSuccess: l[2] || (l[2] = () => {
983
983
  var o, w;
984
- l.value > -1 ? a.value.ecrIntegrations[l.value] = {
984
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
985
985
  gateway: "Kbank",
986
986
  config: {},
987
987
  receiptName: e.value.receiptName,
988
988
  dialogConfig: {
989
- ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
989
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : w.dialogConfig,
990
990
  cardTypes: e.value.cardTypes
991
991
  }
992
992
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -999,17 +999,17 @@ const te = /* @__PURE__ */ k({
999
999
  })), d.onUpdate(a.value);
1000
1000
  })
1001
1001
  }, {
1002
- default: h(() => [
1003
- v(n, {
1002
+ default: G(() => [
1003
+ v(t, {
1004
1004
  modelValue: e.value.receiptName,
1005
- "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1005
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.receiptName = o),
1006
1006
  label: "Receipt Payment Name",
1007
1007
  "label-info": "Default receipt display will be 'TERMINAL_KBANK'"
1008
1008
  }, null, 8, ["modelValue"]),
1009
1009
  I("div", Me, [
1010
- v(n, {
1010
+ v(t, {
1011
1011
  modelValue: r.value,
1012
- "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1012
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => r.value = o),
1013
1013
  label: "Fallback Card Types",
1014
1014
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1015
1015
  }, null, 8, ["modelValue"]),
@@ -1019,21 +1019,21 @@ const te = /* @__PURE__ */ k({
1019
1019
  onClick: s
1020
1020
  })
1021
1021
  ]),
1022
- I("div", he, [
1023
- (g(!0), V(q, null, P(e.value.cardTypes, (o) => (g(), T(p, {
1022
+ I("div", Ge, [
1023
+ (y(!0), V(h, null, R(e.value.cardTypes, (o) => (y(), T(m, {
1024
1024
  key: o,
1025
1025
  label: o,
1026
1026
  removable: !0,
1027
1027
  onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1028
1028
  }, null, 8, ["label", "onChipClosed"]))), 128))
1029
1029
  ]),
1030
- I("div", qe, [
1031
- l.value > -1 ? (g(), T(i, {
1030
+ I("div", he, [
1031
+ n.value > -1 ? (y(), T(i, {
1032
1032
  key: 0,
1033
1033
  class: "flex-1",
1034
1034
  variant: "secondary",
1035
1035
  label: "Delete",
1036
- onclick: () => f(l.value)
1036
+ onclick: () => g(n.value)
1037
1037
  }, null, 8, ["onclick"])) : N("", !0),
1038
1038
  v(i, {
1039
1039
  type: "submit",
@@ -1047,7 +1047,7 @@ const te = /* @__PURE__ */ k({
1047
1047
  }, 512);
1048
1048
  };
1049
1049
  }
1050
- }), Oe = { class: "flex mt-6 space-x-6" }, Re = /* @__PURE__ */ k({
1050
+ }), Pe = { class: "flex mt-6 space-x-6" }, Oe = /* @__PURE__ */ k({
1051
1051
  __name: "Ghl2Gateway",
1052
1052
  props: {
1053
1053
  terminal: {
@@ -1060,36 +1060,36 @@ const te = /* @__PURE__ */ k({
1060
1060
  }
1061
1061
  },
1062
1062
  setup(F) {
1063
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b({
1063
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b({
1064
1064
  ip: "",
1065
1065
  receiptName: ""
1066
1066
  }), e = () => {
1067
- r.value.ip = "", r.value.receiptName = "", l.value = -1;
1068
- }, m = () => {
1067
+ r.value.ip = "", r.value.receiptName = "", n.value = -1;
1068
+ }, p = () => {
1069
1069
  if (!a.value.ecrIntegrations)
1070
1070
  return e();
1071
- const f = a.value.ecrIntegrations, s = f.findIndex((t) => t && t.gateway && t.gateway === "Ghl2");
1071
+ const g = a.value.ecrIntegrations, s = g.findIndex((l) => l && l.gateway && l.gateway === "Ghl2");
1072
1072
  if (s === -1)
1073
1073
  return e();
1074
- l.value = s;
1075
- const u = f.at(s);
1074
+ n.value = s;
1075
+ const u = g.at(s);
1076
1076
  u.gateway === "Ghl2" && u.config && (r.value = {
1077
1077
  ip: u.config.ip ?? "",
1078
1078
  receiptName: u.receiptName ?? ""
1079
1079
  });
1080
1080
  };
1081
- O(a, m), M(m);
1082
- async function c(f) {
1081
+ P(a, p), M(p);
1082
+ async function c(g) {
1083
1083
  var s;
1084
- (s = a.value.ecrIntegrations) == null || s.splice(f, 1), d.onUpdate(a.value);
1084
+ (s = a.value.ecrIntegrations) == null || s.splice(g, 1), d.onUpdate(a.value);
1085
1085
  }
1086
- return (f, s) => {
1087
- const u = y("FmTextField"), t = y("FmButton"), n = y("FmForm");
1088
- return g(), T(n, {
1086
+ return (g, s) => {
1087
+ const u = f("FmTextField"), l = f("FmButton"), t = f("FmForm");
1088
+ return y(), T(t, {
1089
1089
  ref: _.value,
1090
1090
  class: "flex flex-col gap-16 w-[500px]",
1091
1091
  onValidationSuccess: s[2] || (s[2] = () => {
1092
- a.value.ecrIntegrations || (a.value.ecrIntegrations = []), l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1092
+ a.value.ecrIntegrations || (a.value.ecrIntegrations = []), n.value > -1 ? a.value.ecrIntegrations[n.value] = {
1093
1093
  gateway: "Ghl2",
1094
1094
  config: { ip: r.value.ip },
1095
1095
  receiptName: r.value.receiptName
@@ -1100,7 +1100,7 @@ const te = /* @__PURE__ */ k({
1100
1100
  }), d.onUpdate(a.value);
1101
1101
  })
1102
1102
  }, {
1103
- default: h(() => [
1103
+ default: G(() => [
1104
1104
  v(u, {
1105
1105
  modelValue: r.value.ip,
1106
1106
  "onUpdate:modelValue": s[0] || (s[0] = (i) => r.value.ip = i),
@@ -1112,15 +1112,15 @@ const te = /* @__PURE__ */ k({
1112
1112
  label: "Receipt Payment Name",
1113
1113
  "label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
1114
1114
  }, null, 8, ["modelValue"]),
1115
- I("div", Oe, [
1116
- l.value > -1 ? (g(), T(t, {
1115
+ I("div", Pe, [
1116
+ n.value > -1 ? (y(), T(l, {
1117
1117
  key: 0,
1118
1118
  class: "flex-1",
1119
1119
  variant: "secondary",
1120
1120
  label: "Delete",
1121
- onclick: () => c(l.value)
1121
+ onclick: () => c(n.value)
1122
1122
  }, null, 8, ["onclick"])) : N("", !0),
1123
- v(t, {
1123
+ v(l, {
1124
1124
  type: "submit",
1125
1125
  class: "flex-1",
1126
1126
  variant: "primary",
@@ -1132,7 +1132,7 @@ const te = /* @__PURE__ */ k({
1132
1132
  }, 512);
1133
1133
  };
1134
1134
  }
1135
- }), Pe = { class: "flex items-end" }, $e = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ae = { class: "flex mt-6 space-x-6" }, De = /* @__PURE__ */ k({
1135
+ }), Re = { class: "flex items-end" }, $e = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ae = { class: "flex mt-6 space-x-6" }, De = /* @__PURE__ */ k({
1136
1136
  __name: "Ghl3Gateway",
1137
1137
  props: {
1138
1138
  terminal: {
@@ -1145,50 +1145,50 @@ const te = /* @__PURE__ */ k({
1145
1145
  }
1146
1146
  },
1147
1147
  setup(F) {
1148
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b(), e = b({
1148
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b(), e = b({
1149
1149
  receiptName: "",
1150
1150
  config: {},
1151
1151
  cardTypes: []
1152
- }), m = () => {
1153
- e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1152
+ }), p = () => {
1153
+ e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
1154
1154
  }, c = () => {
1155
1155
  var i;
1156
1156
  if (!a.value.ecrIntegrations)
1157
- return m();
1158
- const u = a.value.ecrIntegrations, t = u.findIndex(
1159
- (p) => p && p.gateway && p.gateway === "Ghl3"
1157
+ return p();
1158
+ const u = a.value.ecrIntegrations, l = u.findIndex(
1159
+ (m) => m && m.gateway && m.gateway === "Ghl3"
1160
1160
  );
1161
- if (t === -1)
1162
- return m();
1163
- l.value = t;
1164
- const n = u.at(t);
1165
- n.gateway === "Ghl3" && n.config && (e.value = {
1166
- config: n.config,
1167
- receiptName: n.receiptName ?? "",
1168
- cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1161
+ if (l === -1)
1162
+ return p();
1163
+ n.value = l;
1164
+ const t = u.at(l);
1165
+ t.gateway === "Ghl3" && t.config && (e.value = {
1166
+ config: t.config,
1167
+ receiptName: t.receiptName ?? "",
1168
+ cardTypes: ((i = t.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1169
1169
  });
1170
1170
  };
1171
- O(a, c), M(c);
1172
- async function f(u) {
1173
- var t;
1174
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
1171
+ P(a, c), M(c);
1172
+ async function g(u) {
1173
+ var l;
1174
+ (l = a.value.ecrIntegrations) == null || l.splice(u, 1), d.onUpdate(a.value);
1175
1175
  }
1176
1176
  async function s() {
1177
1177
  e.value.cardTypes.push(r.value), r.value = "";
1178
1178
  }
1179
- return (u, t) => {
1180
- const n = y("FmTextField"), i = y("FmButton"), p = y("FmChip"), x = y("FmForm");
1181
- return g(), T(x, {
1179
+ return (u, l) => {
1180
+ const t = f("FmTextField"), i = f("FmButton"), m = f("FmChip"), x = f("FmForm");
1181
+ return y(), T(x, {
1182
1182
  ref: _.value,
1183
1183
  class: "flex flex-col gap-16 w-[500px]",
1184
- onValidationSuccess: t[2] || (t[2] = () => {
1184
+ onValidationSuccess: l[2] || (l[2] = () => {
1185
1185
  var o, w;
1186
- l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1186
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
1187
1187
  gateway: "Ghl3",
1188
1188
  config: e.value.config,
1189
1189
  receiptName: e.value.receiptName,
1190
1190
  dialogConfig: {
1191
- ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
1191
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : w.dialogConfig,
1192
1192
  cardTypes: e.value.cardTypes
1193
1193
  }
1194
1194
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1201,17 +1201,17 @@ const te = /* @__PURE__ */ k({
1201
1201
  })), d.onUpdate(a.value);
1202
1202
  })
1203
1203
  }, {
1204
- default: h(() => [
1205
- v(n, {
1204
+ default: G(() => [
1205
+ v(t, {
1206
1206
  modelValue: e.value.receiptName,
1207
- "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1207
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.receiptName = o),
1208
1208
  label: "Receipt Payment Name",
1209
1209
  "label-info": "Default receipt display will be 'TERMINAL_GHL'"
1210
1210
  }, null, 8, ["modelValue"]),
1211
- I("div", Pe, [
1212
- v(n, {
1211
+ I("div", Re, [
1212
+ v(t, {
1213
1213
  modelValue: r.value,
1214
- "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1214
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => r.value = o),
1215
1215
  label: "Fallback Card Types",
1216
1216
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1217
1217
  }, null, 8, ["modelValue"]),
@@ -1222,7 +1222,7 @@ const te = /* @__PURE__ */ k({
1222
1222
  })
1223
1223
  ]),
1224
1224
  I("div", $e, [
1225
- (g(!0), V(q, null, P(e.value.cardTypes, (o) => (g(), T(p, {
1225
+ (y(!0), V(h, null, R(e.value.cardTypes, (o) => (y(), T(m, {
1226
1226
  key: o,
1227
1227
  label: o,
1228
1228
  removable: !0,
@@ -1230,12 +1230,12 @@ const te = /* @__PURE__ */ k({
1230
1230
  }, null, 8, ["label", "onChipClosed"]))), 128))
1231
1231
  ]),
1232
1232
  I("div", Ae, [
1233
- l.value > -1 ? (g(), T(i, {
1233
+ n.value > -1 ? (y(), T(i, {
1234
1234
  key: 0,
1235
1235
  class: "flex-1",
1236
1236
  variant: "secondary",
1237
1237
  label: "Delete",
1238
- onclick: () => f(l.value)
1238
+ onclick: () => g(n.value)
1239
1239
  }, null, 8, ["onclick"])) : N("", !0),
1240
1240
  v(i, {
1241
1241
  type: "submit",
@@ -1262,50 +1262,50 @@ const te = /* @__PURE__ */ k({
1262
1262
  }
1263
1263
  },
1264
1264
  setup(F) {
1265
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b(), e = b({
1265
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b(), e = b({
1266
1266
  receiptName: "",
1267
1267
  config: {},
1268
1268
  cardTypes: []
1269
- }), m = () => {
1270
- e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
1269
+ }), p = () => {
1270
+ e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
1271
1271
  }, c = () => {
1272
1272
  var i;
1273
1273
  if (!a.value.ecrIntegrations)
1274
- return m();
1275
- const u = a.value.ecrIntegrations, t = u.findIndex(
1276
- (p) => p && p.gateway && p.gateway === "Hlbb"
1274
+ return p();
1275
+ const u = a.value.ecrIntegrations, l = u.findIndex(
1276
+ (m) => m && m.gateway && m.gateway === "Hlbb"
1277
1277
  );
1278
- if (t === -1)
1279
- return m();
1280
- l.value = t;
1281
- const n = u.at(t);
1282
- n.gateway === "Hlbb" && n.config && (e.value = {
1283
- config: n.config,
1284
- receiptName: n.receiptName ?? "",
1285
- cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1278
+ if (l === -1)
1279
+ return p();
1280
+ n.value = l;
1281
+ const t = u.at(l);
1282
+ t.gateway === "Hlbb" && t.config && (e.value = {
1283
+ config: t.config,
1284
+ receiptName: t.receiptName ?? "",
1285
+ cardTypes: ((i = t.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1286
1286
  });
1287
1287
  };
1288
- O(a, c), M(c);
1289
- async function f(u) {
1290
- var t;
1291
- (t = a.value.ecrIntegrations) == null || t.splice(u, 1), d.onUpdate(a.value);
1288
+ P(a, c), M(c);
1289
+ async function g(u) {
1290
+ var l;
1291
+ (l = a.value.ecrIntegrations) == null || l.splice(u, 1), d.onUpdate(a.value);
1292
1292
  }
1293
1293
  async function s() {
1294
1294
  e.value.cardTypes.push(r.value), r.value = "";
1295
1295
  }
1296
- return (u, t) => {
1297
- const n = y("FmTextField"), i = y("FmButton"), p = y("FmChip"), x = y("FmForm");
1298
- return g(), T(x, {
1296
+ return (u, l) => {
1297
+ const t = f("FmTextField"), i = f("FmButton"), m = f("FmChip"), x = f("FmForm");
1298
+ return y(), T(x, {
1299
1299
  ref: _.value,
1300
1300
  class: "flex flex-col gap-16 w-[500px]",
1301
- onValidationSuccess: t[2] || (t[2] = () => {
1301
+ onValidationSuccess: l[2] || (l[2] = () => {
1302
1302
  var o, w;
1303
- l.value > -1 ? a.value.ecrIntegrations[l.value] = {
1303
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
1304
1304
  gateway: "Hlbb",
1305
1305
  config: e.value.config,
1306
1306
  receiptName: e.value.receiptName,
1307
1307
  dialogConfig: {
1308
- ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
1308
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : w.dialogConfig,
1309
1309
  cardTypes: e.value.cardTypes
1310
1310
  }
1311
1311
  } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
@@ -1318,17 +1318,17 @@ const te = /* @__PURE__ */ k({
1318
1318
  })), d.onUpdate(a.value);
1319
1319
  })
1320
1320
  }, {
1321
- default: h(() => [
1322
- v(n, {
1321
+ default: G(() => [
1322
+ v(t, {
1323
1323
  modelValue: e.value.receiptName,
1324
- "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
1324
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.receiptName = o),
1325
1325
  label: "Receipt Payment Name",
1326
1326
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
1327
1327
  }, null, 8, ["modelValue"]),
1328
1328
  I("div", Be, [
1329
- v(n, {
1329
+ v(t, {
1330
1330
  modelValue: r.value,
1331
- "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
1331
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => r.value = o),
1332
1332
  label: "Fallback Card Types",
1333
1333
  "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1334
1334
  }, null, 8, ["modelValue"]),
@@ -1339,7 +1339,7 @@ const te = /* @__PURE__ */ k({
1339
1339
  })
1340
1340
  ]),
1341
1341
  I("div", Ye, [
1342
- (g(!0), V(q, null, P(e.value.cardTypes, (o) => (g(), T(p, {
1342
+ (y(!0), V(h, null, R(e.value.cardTypes, (o) => (y(), T(m, {
1343
1343
  key: o,
1344
1344
  label: o,
1345
1345
  removable: !0,
@@ -1347,12 +1347,134 @@ const te = /* @__PURE__ */ k({
1347
1347
  }, null, 8, ["label", "onChipClosed"]))), 128))
1348
1348
  ]),
1349
1349
  I("div", Le, [
1350
- l.value > -1 ? (g(), T(i, {
1350
+ n.value > -1 ? (y(), T(i, {
1351
+ key: 0,
1352
+ class: "flex-1",
1353
+ variant: "secondary",
1354
+ label: "Delete",
1355
+ onclick: () => g(n.value)
1356
+ }, null, 8, ["onclick"])) : N("", !0),
1357
+ v(i, {
1358
+ type: "submit",
1359
+ class: "flex-1",
1360
+ variant: "primary",
1361
+ label: "Save"
1362
+ })
1363
+ ])
1364
+ ]),
1365
+ _: 1
1366
+ }, 512);
1367
+ };
1368
+ }
1369
+ }), Ee = { class: "flex items-end" }, je = { class: "flex flex-wrap gap-8 items-center mt-4" }, He = { class: "flex mt-6 space-x-6" }, ze = /* @__PURE__ */ k({
1370
+ __name: "GlobalPaymentsGateway",
1371
+ props: {
1372
+ terminal: {
1373
+ type: Object,
1374
+ required: !0
1375
+ },
1376
+ onUpdate: {
1377
+ type: Function,
1378
+ required: !0
1379
+ }
1380
+ },
1381
+ setup(F) {
1382
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b(), e = b({
1383
+ ip: "",
1384
+ receiptName: "",
1385
+ cardTypes: []
1386
+ }), p = () => {
1387
+ e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
1388
+ }, c = () => {
1389
+ var i;
1390
+ if (!a.value.ecrIntegrations)
1391
+ return p();
1392
+ const u = a.value.ecrIntegrations, l = u.findIndex(
1393
+ (m) => m && m.gateway && m.gateway === "GlobalPayments"
1394
+ );
1395
+ if (l === -1)
1396
+ return p();
1397
+ n.value = l;
1398
+ const t = u.at(l);
1399
+ t.gateway === "GlobalPayments" && t.config && (e.value = {
1400
+ ip: t.config.ip ?? "",
1401
+ receiptName: t.receiptName ?? "",
1402
+ cardTypes: ((i = t.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
1403
+ });
1404
+ };
1405
+ P(a, c), M(c);
1406
+ async function g(u) {
1407
+ var l;
1408
+ (l = a.value.ecrIntegrations) == null || l.splice(u, 1), d.onUpdate(a.value);
1409
+ }
1410
+ async function s() {
1411
+ e.value.cardTypes.push(r.value), r.value = "";
1412
+ }
1413
+ return (u, l) => {
1414
+ const t = f("FmTextField"), i = f("FmButton"), m = f("FmChip"), x = f("FmForm");
1415
+ return y(), T(x, {
1416
+ ref: _.value,
1417
+ class: "flex flex-col gap-16 w-[500px]",
1418
+ onValidationSuccess: l[3] || (l[3] = () => {
1419
+ var o, w;
1420
+ n.value > -1 ? a.value.ecrIntegrations[n.value] = {
1421
+ gateway: "GlobalPayments",
1422
+ config: { ip: e.value.ip },
1423
+ receiptName: e.value.receiptName,
1424
+ dialogConfig: {
1425
+ ...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : w.dialogConfig,
1426
+ cardTypes: e.value.cardTypes
1427
+ }
1428
+ } : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
1429
+ gateway: "GlobalPayments",
1430
+ config: { ip: e.value.ip },
1431
+ receiptName: e.value.receiptName,
1432
+ dialogConfig: {
1433
+ cardTypes: e.value.cardTypes
1434
+ }
1435
+ })), d.onUpdate(a.value);
1436
+ })
1437
+ }, {
1438
+ default: G(() => [
1439
+ v(t, {
1440
+ modelValue: e.value.ip,
1441
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value.ip = o),
1442
+ label: "IP Address"
1443
+ }, null, 8, ["modelValue"]),
1444
+ v(t, {
1445
+ modelValue: e.value.receiptName,
1446
+ "onUpdate:modelValue": l[1] || (l[1] = (o) => e.value.receiptName = o),
1447
+ label: "Receipt Payment Name",
1448
+ "label-info": "Default receipt display will be 'TERMINAL_GP'"
1449
+ }, null, 8, ["modelValue"]),
1450
+ I("div", Ee, [
1451
+ v(t, {
1452
+ modelValue: r.value,
1453
+ "onUpdate:modelValue": l[2] || (l[2] = (o) => r.value = o),
1454
+ label: "Fallback Card Types",
1455
+ "label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
1456
+ }, null, 8, ["modelValue"]),
1457
+ v(i, {
1458
+ class: "ml-4",
1459
+ icon: "add",
1460
+ onClick: s
1461
+ })
1462
+ ]),
1463
+ I("div", je, [
1464
+ (y(!0), V(h, null, R(e.value.cardTypes, (o) => (y(), T(m, {
1465
+ key: o,
1466
+ label: o,
1467
+ removable: !0,
1468
+ onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
1469
+ }, null, 8, ["label", "onChipClosed"]))), 128))
1470
+ ]),
1471
+ I("div", He, [
1472
+ n.value > -1 ? (y(), T(i, {
1351
1473
  key: 0,
1352
1474
  class: "flex-1",
1353
1475
  variant: "secondary",
1354
1476
  label: "Delete",
1355
- onclick: () => f(l.value)
1477
+ onclick: () => g(n.value)
1356
1478
  }, null, 8, ["onclick"])) : N("", !0),
1357
1479
  v(i, {
1358
1480
  type: "submit",
@@ -1366,7 +1488,7 @@ const te = /* @__PURE__ */ k({
1366
1488
  }, 512);
1367
1489
  };
1368
1490
  }
1369
- }), Ee = { class: "flex items-center" }, je = { class: "w-[260px] self-start" }, He = { class: "flex-1" }, ze = /* @__PURE__ */ k({
1491
+ }), Qe = { class: "flex items-center" }, Je = { class: "w-[260px] self-start" }, We = { class: "flex-1" }, Xe = /* @__PURE__ */ k({
1370
1492
  __name: "EcrGateway",
1371
1493
  props: {
1372
1494
  terminal: {
@@ -1379,12 +1501,12 @@ const te = /* @__PURE__ */ k({
1379
1501
  }
1380
1502
  },
1381
1503
  setup(F) {
1382
- var m;
1504
+ var p;
1383
1505
  const d = F, a = [
1384
1506
  {
1385
1507
  label: "FeedMe Terminal",
1386
1508
  value: "terminal",
1387
- render: me
1509
+ render: pe
1388
1510
  },
1389
1511
  {
1390
1512
  label: "GHL Terminal (V2)",
@@ -1395,7 +1517,7 @@ const te = /* @__PURE__ */ k({
1395
1517
  {
1396
1518
  label: "GHL 2 Terminal",
1397
1519
  value: "ghl2",
1398
- render: Re,
1520
+ render: Oe,
1399
1521
  region: [C.F_COUNTRY.enum.MY]
1400
1522
  },
1401
1523
  {
@@ -1425,7 +1547,7 @@ const te = /* @__PURE__ */ k({
1425
1547
  {
1426
1548
  label: "KBank Terminal",
1427
1549
  value: "kbank",
1428
- render: Ge,
1550
+ render: qe,
1429
1551
  region: [C.F_COUNTRY.enum.TH]
1430
1552
  },
1431
1553
  {
@@ -1439,28 +1561,34 @@ const te = /* @__PURE__ */ k({
1439
1561
  value: "hlbb",
1440
1562
  render: Ke,
1441
1563
  region: [C.F_COUNTRY.enum.MY]
1564
+ },
1565
+ {
1566
+ label: "GlobalPayments Terminal",
1567
+ value: "globalpayments",
1568
+ render: ze,
1569
+ region: [C.F_COUNTRY.enum.SG]
1442
1570
  }
1443
- ], _ = R(() => a.find((c) => c.value === e.value)), l = j().currentCountry, r = R(() => a.filter(
1444
- (c) => !c.region || c.region.includes(l.value ?? C.F_COUNTRY.enum.MY)
1571
+ ], _ = O(() => a.find((c) => c.value === e.value)), n = j().currentCountry, r = O(() => a.filter(
1572
+ (c) => !c.region || c.region.includes(n.value ?? C.F_COUNTRY.enum.MY)
1445
1573
  )), { gatewayTab: e } = E({
1446
- gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
1574
+ gatewayTab: (p = r.value[0]) == null ? void 0 : p.value
1447
1575
  });
1448
- return (c, f) => {
1576
+ return (c, g) => {
1449
1577
  var u;
1450
- const s = y("FmTabs");
1451
- return g(), V("div", Ee, [
1452
- I("div", je, [
1578
+ const s = f("FmTabs");
1579
+ return y(), V("div", Qe, [
1580
+ I("div", Je, [
1453
1581
  v(s, {
1454
1582
  "model-value": S(e),
1455
- "onUpdate:modelValue": f[0] || (f[0] = (t) => B(e) ? e.value = t : null),
1583
+ "onUpdate:modelValue": g[0] || (g[0] = (l) => B(e) ? e.value = l : null),
1456
1584
  class: "mb-6",
1457
1585
  vertical: !0,
1458
1586
  items: r.value,
1459
1587
  "show-more-at": Number.POSITIVE_INFINITY
1460
1588
  }, null, 8, ["model-value", "items", "show-more-at"])
1461
1589
  ]),
1462
- I("div", He, [
1463
- S(e) ? (g(), T(Y((u = _.value) == null ? void 0 : u.render), L(K({ key: 0 }, {
1590
+ I("div", We, [
1591
+ S(e) ? (y(), T(Y((u = _.value) == null ? void 0 : u.render), L(K({ key: 0 }, {
1464
1592
  terminal: d.terminal,
1465
1593
  onUpdate: d.onUpdate
1466
1594
  })), null, 16)) : N("", !0)
@@ -1468,7 +1596,7 @@ const te = /* @__PURE__ */ k({
1468
1596
  ]);
1469
1597
  };
1470
1598
  }
1471
- }), Qe = { class: "flex mt-6 space-x-6" }, Je = /* @__PURE__ */ k({
1599
+ }), Ze = { class: "flex mt-6 space-x-6" }, ea = /* @__PURE__ */ k({
1472
1600
  __name: "PromptPayGateway",
1473
1601
  props: {
1474
1602
  terminal: {
@@ -1481,39 +1609,39 @@ const te = /* @__PURE__ */ k({
1481
1609
  }
1482
1610
  },
1483
1611
  setup(F) {
1484
- const d = F, a = G(() => d.terminal), _ = b(), l = b(-1), r = b({
1612
+ const d = F, a = q(() => d.terminal), _ = b(), n = b(-1), r = b({
1485
1613
  account: "",
1486
1614
  receiptName: ""
1487
1615
  }), e = () => {
1488
- r.value.account = "", r.value.receiptName = "", l.value = -1;
1489
- }, m = () => {
1616
+ r.value.account = "", r.value.receiptName = "", n.value = -1;
1617
+ }, p = () => {
1490
1618
  if (!a.value.qrIntegrations)
1491
1619
  return e();
1492
- const f = a.value.qrIntegrations, s = f.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
1620
+ const g = a.value.qrIntegrations, s = g.findIndex((l) => l && l.gateway && l.gateway === "PROMPTPAY");
1493
1621
  if (s === -1)
1494
1622
  return e();
1495
- l.value = s;
1496
- const u = f.at(s);
1623
+ n.value = s;
1624
+ const u = g.at(s);
1497
1625
  u.gateway === "PROMPTPAY" && u.config && (r.value = {
1498
1626
  account: u.config.account ?? "",
1499
1627
  receiptName: u.receiptName ?? ""
1500
1628
  });
1501
1629
  };
1502
- O(a, m), M(m);
1503
- async function c(f) {
1630
+ P(a, p), M(p);
1631
+ async function c(g) {
1504
1632
  var s;
1505
- (s = a.value.qrIntegrations) == null || s.splice(f, 1), d.onUpdate(a.value);
1633
+ (s = a.value.qrIntegrations) == null || s.splice(g, 1), d.onUpdate(a.value);
1506
1634
  }
1507
- return (f, s) => {
1508
- const u = y("FmTextField"), t = y("FmButton"), n = y("FmForm");
1509
- return g(), T(n, {
1635
+ return (g, s) => {
1636
+ const u = f("FmTextField"), l = f("FmButton"), t = f("FmForm");
1637
+ return y(), T(t, {
1510
1638
  ref: _.value,
1511
1639
  class: "flex flex-col gap-16 w-[500px]",
1512
1640
  onValidationSuccess: s[2] || (s[2] = () => {
1513
- 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);
1641
+ n.value > -1 ? a.value.qrIntegrations[n.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);
1514
1642
  })
1515
1643
  }, {
1516
- default: h(() => [
1644
+ default: G(() => [
1517
1645
  v(u, {
1518
1646
  modelValue: r.value.account,
1519
1647
  "onUpdate:modelValue": s[0] || (s[0] = (i) => r.value.account = i),
@@ -1526,15 +1654,15 @@ const te = /* @__PURE__ */ k({
1526
1654
  label: "Receipt Payment Name",
1527
1655
  "label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
1528
1656
  }, null, 8, ["modelValue"]),
1529
- I("div", Qe, [
1530
- l.value > -1 ? (g(), T(t, {
1657
+ I("div", Ze, [
1658
+ n.value > -1 ? (y(), T(l, {
1531
1659
  key: 0,
1532
1660
  class: "flex-1",
1533
1661
  variant: "secondary",
1534
1662
  label: "Delete",
1535
- onclick: () => c(l.value)
1663
+ onclick: () => c(n.value)
1536
1664
  }, null, 8, ["onclick"])) : N("", !0),
1537
- v(t, {
1665
+ v(l, {
1538
1666
  type: "submit",
1539
1667
  class: "flex-1",
1540
1668
  variant: "primary",
@@ -1546,7 +1674,7 @@ const te = /* @__PURE__ */ k({
1546
1674
  }, 512);
1547
1675
  };
1548
1676
  }
1549
- }), We = { class: "flex items-center" }, Xe = { class: "w-[260px] self-start" }, Ze = { class: "flex-1" }, ea = /* @__PURE__ */ k({
1677
+ }), aa = { class: "flex items-center" }, la = { class: "w-[260px] self-start" }, ta = { class: "flex-1" }, na = /* @__PURE__ */ k({
1550
1678
  __name: "QrGateway",
1551
1679
  props: {
1552
1680
  terminal: {
@@ -1559,32 +1687,32 @@ const te = /* @__PURE__ */ k({
1559
1687
  }
1560
1688
  },
1561
1689
  setup(F) {
1562
- var m;
1690
+ var p;
1563
1691
  const d = F, a = [
1564
1692
  {
1565
1693
  label: "PromptPay",
1566
1694
  value: "promptpay",
1567
- render: Je,
1695
+ render: ea,
1568
1696
  region: [C.F_COUNTRY.enum.TH]
1569
1697
  }
1570
- ], _ = R(() => a.find((c) => c.value === e.value)), l = j().currentCountry, r = R(() => a.filter((c) => !c.region || c.region.includes(l.value ?? C.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
1571
- gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
1698
+ ], _ = O(() => a.find((c) => c.value === e.value)), n = j().currentCountry, r = O(() => a.filter((c) => !c.region || c.region.includes(n.value ?? C.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
1699
+ gatewayTab: (p = r.value[0]) == null ? void 0 : p.value
1572
1700
  });
1573
- return (c, f) => {
1701
+ return (c, g) => {
1574
1702
  var u;
1575
- const s = y("FmTabs");
1576
- return g(), V("div", We, [
1577
- I("div", Xe, [
1703
+ const s = f("FmTabs");
1704
+ return y(), V("div", aa, [
1705
+ I("div", la, [
1578
1706
  v(s, {
1579
1707
  "model-value": S(e),
1580
- "onUpdate:modelValue": f[0] || (f[0] = (t) => B(e) ? e.value = t : null),
1708
+ "onUpdate:modelValue": g[0] || (g[0] = (l) => B(e) ? e.value = l : null),
1581
1709
  class: "mb-6",
1582
1710
  vertical: !0,
1583
1711
  items: r.value
1584
1712
  }, null, 8, ["model-value", "items"])
1585
1713
  ]),
1586
- I("div", Ze, [
1587
- S(e) ? (g(), T(Y((u = _.value) == null ? void 0 : u.render), L(K({ key: 0 }, {
1714
+ I("div", ta, [
1715
+ S(e) ? (y(), T(Y((u = _.value) == null ? void 0 : u.render), L(K({ key: 0 }, {
1588
1716
  terminal: d.terminal,
1589
1717
  onUpdate: d.onUpdate
1590
1718
  })), null, 16)) : N("", !0)
@@ -1592,7 +1720,7 @@ const te = /* @__PURE__ */ k({
1592
1720
  ]);
1593
1721
  };
1594
1722
  }
1595
- }), da = /* @__PURE__ */ k({
1723
+ }), fa = /* @__PURE__ */ k({
1596
1724
  __name: "TerminalSetting",
1597
1725
  props: {
1598
1726
  terminalId: {
@@ -1603,21 +1731,21 @@ const te = /* @__PURE__ */ k({
1603
1731
  setup(F) {
1604
1732
  const d = F, { tab: a } = E({
1605
1733
  tab: "information"
1606
- }), { isLoading: _, startAsyncCall: l } = H(!0), r = W(), e = Q(), m = b();
1607
- async function c(n) {
1608
- l(async () => {
1734
+ }), { isLoading: _, startAsyncCall: n } = H(!0), r = W(), e = Q(), p = b();
1735
+ async function c(t) {
1736
+ n(async () => {
1609
1737
  try {
1610
1738
  await A.updateById(
1611
1739
  d.terminalId,
1612
1740
  {
1613
- name: n.name,
1614
- status: n.status,
1615
- ecrs: n.ecrs ?? [],
1616
- gateways: n.gateways ?? [],
1617
- ecrIntegrations: n.ecrIntegrations ?? [],
1618
- qrIntegrations: n.qrIntegrations ?? []
1741
+ name: t.name,
1742
+ status: t.status,
1743
+ ecrs: t.ecrs ?? [],
1744
+ gateways: t.gateways ?? [],
1745
+ ecrIntegrations: t.ecrIntegrations ?? [],
1746
+ qrIntegrations: t.qrIntegrations ?? []
1619
1747
  }
1620
- ), m.value = await A.readById(d.terminalId), e.open({
1748
+ ), p.value = await A.readById(d.terminalId), e.open({
1621
1749
  type: "success",
1622
1750
  message: "Terminal updated successfully"
1623
1751
  });
@@ -1630,12 +1758,12 @@ const te = /* @__PURE__ */ k({
1630
1758
  }
1631
1759
  });
1632
1760
  }
1633
- const f = [
1761
+ const g = [
1634
1762
  {
1635
1763
  label: "Information",
1636
1764
  value: "information",
1637
1765
  icon: "overview",
1638
- render: te
1766
+ render: le
1639
1767
  },
1640
1768
  {
1641
1769
  label: "Setting Request",
@@ -1654,48 +1782,48 @@ const te = /* @__PURE__ */ k({
1654
1782
  label: "ECR Gateway",
1655
1783
  value: "ecr",
1656
1784
  icon: "point_of_sale",
1657
- render: ze,
1785
+ render: Xe,
1658
1786
  onlyFor: ["POS", "KIOSK"]
1659
1787
  },
1660
1788
  {
1661
1789
  label: "QR Gateway",
1662
1790
  value: "qr",
1663
1791
  icon: "qr_code",
1664
- render: ea,
1792
+ render: na,
1665
1793
  onlyFor: ["POS", "KIOSK"]
1666
1794
  }
1667
1795
  ];
1668
1796
  j().currentCountry;
1669
- const s = R(() => {
1670
- var n;
1671
- return (n = f.find((i) => i.value === a.value)) == null ? void 0 : n.render;
1797
+ const s = O(() => {
1798
+ var t;
1799
+ return (t = g.find((i) => i.value === a.value)) == null ? void 0 : t.render;
1672
1800
  });
1673
1801
  async function u() {
1674
- l(async () => {
1675
- m.value = await A.readById(d.terminalId);
1802
+ n(async () => {
1803
+ p.value = await A.readById(d.terminalId);
1676
1804
  });
1677
1805
  }
1678
- const t = R(() => f.filter((n) => {
1806
+ const l = O(() => g.filter((t) => {
1679
1807
  var i;
1680
- return !n.onlyFor || n.onlyFor.includes(((i = m.value) == null ? void 0 : i.deviceType) ?? "");
1808
+ return !t.onlyFor || t.onlyFor.includes(((i = p.value) == null ? void 0 : i.deviceType) ?? "");
1681
1809
  }));
1682
- return M(u), (n, i) => {
1810
+ return M(u), (t, i) => {
1683
1811
  var x, o;
1684
- const p = y("FmTabs");
1685
- return g(), T(X, {
1686
- title: `${(x = m.value) == null ? void 0 : x.deviceType} (${(o = m.value) == null ? void 0 : o._id})`,
1812
+ const m = f("FmTabs");
1813
+ return y(), T(X, {
1814
+ title: `${(x = p.value) == null ? void 0 : x.deviceType} (${(o = p.value) == null ? void 0 : o._id})`,
1687
1815
  loading: S(_),
1688
1816
  onBack: S(r).back
1689
1817
  }, {
1690
- default: h(() => [
1691
- v(p, {
1818
+ default: G(() => [
1819
+ v(m, {
1692
1820
  "model-value": S(a),
1693
1821
  "onUpdate:modelValue": i[0] || (i[0] = (w) => B(a) ? a.value = w : null),
1694
1822
  class: "mb-6",
1695
- items: t.value
1823
+ items: l.value
1696
1824
  }, null, 8, ["model-value", "items"]),
1697
- S(a) ? (g(), T(Y(s.value), L(K({ key: 0 }, {
1698
- terminal: m.value,
1825
+ S(a) ? (y(), T(Y(s.value), L(K({ key: 0 }, {
1826
+ terminal: p.value,
1699
1827
  onUpdate: c
1700
1828
  })), null, 16)) : N("", !0)
1701
1829
  ]),
@@ -1705,5 +1833,5 @@ const te = /* @__PURE__ */ k({
1705
1833
  }
1706
1834
  });
1707
1835
  export {
1708
- da as default
1836
+ fa as default
1709
1837
  };