@feedmepos/mf-payment 1.7.16-dev → 1.7.17-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.
- package/dist/{Actions.vue_vue_type_script_setup_true_lang-CNZ3Cung.js → Actions.vue_vue_type_script_setup_true_lang-DIrUizfF.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DjF32gFs.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DFcXw-n7.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BedGUyG-.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-q9Rm97CM.js} +2 -2
- package/dist/{Chargeback-D6uTpxhh.js → Chargeback-DMrEalpv.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-CiyTU-we.js → DocumentViewer.vue_vue_type_script_setup_true_lang-jjpu4Otu.js} +1 -1
- package/dist/{OnboardForm-NJ7ZCYlH.js → OnboardForm-D0k7j3CT.js} +5 -5
- package/dist/{OnboardForm-R_XZImjZ.js → OnboardForm-DD8E-WPw.js} +5 -5
- package/dist/{OnboardSubmission-SPqJBDq4.js → OnboardSubmission-7OHfz_cp.js} +6 -6
- package/dist/{OnboardSubmission-DeiO2YNR.js → OnboardSubmission-hm9c1n2P.js} +3 -3
- package/dist/{PayoutAccount-C1VcXaeA.js → PayoutAccount-CsEC4rn3.js} +5 -5
- package/dist/{PayoutAccount-DSiObCqr.js → PayoutAccount-D4JjmVdy.js} +7 -7
- package/dist/{PayoutAccountSetting-D1jkfjXh.js → PayoutAccountSetting-D3svpOrJ.js} +6 -6
- package/dist/{Restaurant-DNQCzdoR.js → Restaurant-VYOlF6IL.js} +4 -4
- package/dist/{RestaurantSetting-CY3S28Ij.js → RestaurantSetting-BEwA_Q9h.js} +3 -3
- package/dist/{Settlement-BD0mKSsM.js → Settlement-D4HuCA7-.js} +4 -4
- package/dist/{Settlement-XoOp_P0A.js → Settlement-Dhbf2H2a.js} +3 -3
- package/dist/{SettlementTransactions-C1NdSE0k.js → SettlementTransactions-BDqjh7KK.js} +5 -5
- package/dist/{SettlementTransactions-DXAYoMNu.js → SettlementTransactions-Bwo_3bjR.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-B9A-d-Xk.js → Status.vue_vue_type_script_setup_true_lang-DcsSeoeS.js} +1 -1
- package/dist/{Terminal-96xbA5Wm.js → Terminal-CAbVgJD0.js} +5 -5
- package/dist/{TerminalSetting-Ceybn4gK.js → TerminalSetting-B5SLjCZU.js} +1196 -1180
- package/dist/{Transaction-Bc4tB4Qw.js → Transaction-B7P4-xeV.js} +10 -10
- package/dist/{Transaction-CakGu7Cd.js → Transaction-BDEjkFXY.js} +11 -11
- package/dist/{TransactionOld-BEIV9U1d.js → TransactionOld-pBQ_2Gp2.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-CND5w31I.js → TransactionStatus.vue_vue_type_script_setup_true_lang-CfvcsMGY.js} +1 -1
- package/dist/{app-Oc6EKkzF.js → app-DXAaqPU6.js} +23 -23
- package/dist/app.js +1 -1
- package/dist/{assets-iuTXCM_n.js → assets-vT1skt0y.js} +1 -1
- package/dist/{grafana-Dvc4mOH0.js → grafana-B1zU21oh.js} +1 -1
- package/dist/{index-CkZ-W5I3.js → index-BH6jVPOg.js} +1 -1
- package/dist/{index-CBS6Prmn.js → index-BXNk9Y8v.js} +4842 -4834
- package/dist/{index--7RleePc.js → index-BXeeTyxO.js} +1 -1
- package/dist/{index-BMHJrHxr.js → index-C3i1nQZx.js} +1 -1
- package/dist/{index-BiD_R2iP.js → index-C4RhUdnf.js} +2 -2
- package/dist/{index-Bjw5dV5o.js → index-Ck1In7WT.js} +1 -1
- package/dist/{index-8HrjqKum.js → index-D6Zex0v1.js} +1 -1
- package/dist/{index-C2V8cLGK.js → index-DYULrB7h.js} +1 -1
- package/dist/{index-BpIljTs8.js → index-Dqjt4cUz.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-lpDJGwdw.js → index.vue_vue_type_script_setup_true_lang-BI6-Nc1j.js} +1 -1
- package/dist/{onboard-submission-aSwF0vvQ.js → onboard-submission-B83FDe7o.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-Clrb2P0b.js → payout-account-Bb5kikfi.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as ht, p as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { t as Ue } from "./index-
|
|
5
|
-
import { _ as
|
|
6
|
-
import { u as bt } from "./index
|
|
7
|
-
import { useSnackbar as qt, useDialog as
|
|
1
|
+
import { defineComponent as K, openBlock as b, createElementBlock as R, Fragment as ae, createElementVNode as x, createTextVNode as Ve, toDisplayString as Re, ref as I, resolveComponent as w, createVNode as y, createCommentVNode as B, unref as M, computed as H, isRef as Oe, createBlock as S, resolveDynamicComponent as vt, normalizeProps as gt, mergeProps as yt, watch as le, onBeforeUnmount as ka, toRef as de, onMounted as re, withCtx as ne, renderList as ye, toRefs as Da, reactive as Ea, h as Va, getCurrentInstance as Rt, nextTick as ra, onUnmounted as Oa, normalizeClass as Ua, withModifiers as Ma, withKeys as Pa } from "vue";
|
|
2
|
+
import { u as ht, p as Aa, e as J } from "./index-BXNk9Y8v.js";
|
|
3
|
+
import { useRouter as Ra } from "vue-router";
|
|
4
|
+
import { t as Ue } from "./index-Dqjt4cUz.js";
|
|
5
|
+
import { _ as qa } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
+
import { u as bt } from "./index-BXeeTyxO.js";
|
|
7
|
+
import { useSnackbar as qt, useDialog as Ga } from "@feedmepos/ui-library";
|
|
8
8
|
import { u as nt } from "./error-K1CakhA9.js";
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { o as
|
|
11
|
-
import { c as
|
|
9
|
+
import { useI18n as Ba, useCoreStore as _t } from "@feedmepos/mf-common";
|
|
10
|
+
import { o as Ya } from "./index-C4RhUdnf.js";
|
|
11
|
+
import { c as La } from "./index-MdV54cWO.js";
|
|
12
12
|
import { z as ia, a as sa } from "./validator-CTlVogBQ.js";
|
|
13
|
-
import { g as
|
|
14
|
-
import { w as
|
|
15
|
-
import { _ as
|
|
16
|
-
const
|
|
13
|
+
import { g as $a } from "./assets-vT1skt0y.js";
|
|
14
|
+
import { w as ja } from "./Modal-DB8M9o1T.js";
|
|
15
|
+
import { _ as Ha } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
const Xa = /* @__PURE__ */ K({
|
|
17
17
|
__name: "Information",
|
|
18
18
|
props: {
|
|
19
19
|
terminal: {
|
|
@@ -22,22 +22,22 @@ const ja = /* @__PURE__ */ X({
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
setup(e) {
|
|
25
|
-
return (a, t) => (b(),
|
|
26
|
-
t[0] || (t[0] =
|
|
25
|
+
return (a, t) => (b(), R(ae, null, [
|
|
26
|
+
t[0] || (t[0] = x("b", null, "Name", -1)),
|
|
27
27
|
Ve(": " + Re(e.terminal.name), 1),
|
|
28
|
-
t[1] || (t[1] =
|
|
29
|
-
t[2] || (t[2] =
|
|
28
|
+
t[1] || (t[1] = x("br", null, null, -1)),
|
|
29
|
+
t[2] || (t[2] = x("b", null, "Status", -1)),
|
|
30
30
|
Ve(": " + Re(e.terminal.status), 1),
|
|
31
|
-
t[3] || (t[3] =
|
|
32
|
-
t[4] || (t[4] =
|
|
31
|
+
t[3] || (t[3] = x("br", null, null, -1)),
|
|
32
|
+
t[4] || (t[4] = x("b", null, "Device ID", -1)),
|
|
33
33
|
Ve(": " + Re(e.terminal.deviceId ?? "-"), 1),
|
|
34
|
-
t[5] || (t[5] =
|
|
35
|
-
t[6] || (t[6] =
|
|
34
|
+
t[5] || (t[5] = x("br", null, null, -1)),
|
|
35
|
+
t[6] || (t[6] = x("b", null, "Device Type", -1)),
|
|
36
36
|
Ve(": " + Re(e.terminal.deviceType ?? "-"), 1),
|
|
37
|
-
t[7] || (t[7] =
|
|
37
|
+
t[7] || (t[7] = x("br", null, null, -1))
|
|
38
38
|
], 64));
|
|
39
39
|
}
|
|
40
|
-
}),
|
|
40
|
+
}), Ka = { key: 0 }, za = { class: "mt-6 space-x-6" }, Wa = /* @__PURE__ */ K({
|
|
41
41
|
__name: "KioskMode",
|
|
42
42
|
props: {
|
|
43
43
|
terminal: {
|
|
@@ -46,57 +46,57 @@ const ja = /* @__PURE__ */ X({
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
setup(e) {
|
|
49
|
-
const { isLoading: a, startAsyncCall: t } = ht(!1), l = qt(), o =
|
|
49
|
+
const { isLoading: a, startAsyncCall: t } = ht(!1), l = qt(), o = I({
|
|
50
50
|
enable: !1,
|
|
51
51
|
password: []
|
|
52
52
|
}), r = e;
|
|
53
53
|
function n() {
|
|
54
|
-
return o.value.enable && o.value.password.filter((
|
|
54
|
+
return o.value.enable && o.value.password.filter((d) => !!d).length !== 6 ? l.open({
|
|
55
55
|
type: "error",
|
|
56
56
|
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
|
57
57
|
}) : t(async () => {
|
|
58
|
-
const
|
|
59
|
-
|
|
58
|
+
const d = { enable: o.value.enable };
|
|
59
|
+
d.enable && Object.assign(d, {
|
|
60
60
|
password: o.value.password.join("")
|
|
61
61
|
});
|
|
62
|
-
const s = await Ue.kioskModeRequest(r.terminal._id,
|
|
62
|
+
const s = await Ue.kioskModeRequest(r.terminal._id, d);
|
|
63
63
|
if (s === "OK")
|
|
64
64
|
return l.open({ type: "info", message: "Kiosk mode applied successfully." });
|
|
65
|
-
let
|
|
66
|
-
return s === "client_not_connected" && (
|
|
65
|
+
let f = s;
|
|
66
|
+
return s === "client_not_connected" && (f = "Terminal not connected to the websocket server."), s.startsWith("terminal: ") && (f = s.replaceAll("terminal: ", "")), l.open({
|
|
67
67
|
type: "error",
|
|
68
|
-
message:
|
|
68
|
+
message: f
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
return (
|
|
73
|
-
const
|
|
74
|
-
return b(),
|
|
75
|
-
y(
|
|
72
|
+
return (d, s) => {
|
|
73
|
+
const f = w("FmSwitch"), p = w("FmPinField"), m = w("FmButton");
|
|
74
|
+
return b(), R(ae, null, [
|
|
75
|
+
y(f, {
|
|
76
76
|
modelValue: o.value.enable,
|
|
77
77
|
"onUpdate:modelValue": s[0] || (s[0] = (i) => o.value.enable = i),
|
|
78
78
|
label: "Enable Kiosk Mode?"
|
|
79
79
|
}, null, 8, ["modelValue"]),
|
|
80
|
-
o.value.enable ? (b(),
|
|
81
|
-
s[2] || (s[2] =
|
|
82
|
-
y(
|
|
80
|
+
o.value.enable ? (b(), R("div", Ka, [
|
|
81
|
+
s[2] || (s[2] = x("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
|
82
|
+
y(p, {
|
|
83
83
|
modelValue: o.value.password,
|
|
84
84
|
"onUpdate:modelValue": s[1] || (s[1] = (i) => o.value.password = i)
|
|
85
85
|
}, null, 8, ["modelValue"])
|
|
86
|
-
])) :
|
|
87
|
-
|
|
86
|
+
])) : B("", !0),
|
|
87
|
+
x("div", za, [
|
|
88
88
|
y(m, {
|
|
89
89
|
variant: "primary",
|
|
90
90
|
label: "Send",
|
|
91
91
|
icon: "send",
|
|
92
|
-
loading:
|
|
92
|
+
loading: M(a),
|
|
93
93
|
onclick: n
|
|
94
94
|
}, null, 8, ["loading"])
|
|
95
95
|
])
|
|
96
96
|
], 64);
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
}),
|
|
99
|
+
}), Qa = /* @__PURE__ */ K({
|
|
100
100
|
__name: "SettingRequest",
|
|
101
101
|
props: {
|
|
102
102
|
terminal: {
|
|
@@ -111,73 +111,73 @@ const ja = /* @__PURE__ */ X({
|
|
|
111
111
|
{
|
|
112
112
|
label: "Kiosk Mode",
|
|
113
113
|
value: "kiosk_mode",
|
|
114
|
-
render:
|
|
114
|
+
render: Wa
|
|
115
115
|
}
|
|
116
|
-
], l = e, o =
|
|
116
|
+
], l = e, o = H(() => t.find((r) => r.value === a.value));
|
|
117
117
|
return (r, n) => {
|
|
118
118
|
var s;
|
|
119
|
-
const
|
|
120
|
-
return b(),
|
|
121
|
-
n[1] || (n[1] =
|
|
122
|
-
|
|
119
|
+
const d = w("FmTabs");
|
|
120
|
+
return b(), R(ae, null, [
|
|
121
|
+
n[1] || (n[1] = x("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
122
|
+
x("b", null, "Note: "),
|
|
123
123
|
Ve(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
|
124
124
|
], -1)),
|
|
125
|
-
y(
|
|
126
|
-
"model-value":
|
|
127
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
125
|
+
y(d, {
|
|
126
|
+
"model-value": M(a),
|
|
127
|
+
"onUpdate:modelValue": n[0] || (n[0] = (f) => Oe(a) ? a.value = f : null),
|
|
128
128
|
class: "mb-6",
|
|
129
129
|
items: t
|
|
130
130
|
}, null, 8, ["model-value"]),
|
|
131
|
-
|
|
131
|
+
M(a) ? (b(), S(vt((s = o.value) == null ? void 0 : s.render), gt(yt({ key: 0 }, { terminal: l.terminal })), null, 16)) : B("", !0)
|
|
132
132
|
], 64);
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
}),
|
|
136
|
-
function
|
|
137
|
-
const { isLoading: a, startLoading: t, stopLoading: l } = ht(!1), { t: o } =
|
|
138
|
-
var
|
|
139
|
-
const
|
|
140
|
-
(
|
|
135
|
+
}), Ja = 2e3, Za = 12e4, en = "Timed out waiting for the Tyro reader to sync. Please try again.";
|
|
136
|
+
function tn(e) {
|
|
137
|
+
const { isLoading: a, startLoading: t, stopLoading: l } = ht(!1), { t: o } = Ba(), r = qt(), n = I(null), d = H(() => {
|
|
138
|
+
var Y, L;
|
|
139
|
+
const U = (Y = e.value.gateways) == null ? void 0 : Y.find(
|
|
140
|
+
(G) => G.gateway === "Tyro"
|
|
141
141
|
);
|
|
142
|
-
return ((
|
|
143
|
-
}), s =
|
|
144
|
-
var
|
|
145
|
-
return ((
|
|
146
|
-
}),
|
|
147
|
-
var
|
|
148
|
-
return
|
|
149
|
-
}), m =
|
|
142
|
+
return ((L = U == null ? void 0 : U.config) == null ? void 0 : L.uniqueId) || "";
|
|
143
|
+
}), s = H(() => !!d.value), f = H(() => {
|
|
144
|
+
var U;
|
|
145
|
+
return ((U = n.value) == null ? void 0 : U.status) === "ready";
|
|
146
|
+
}), p = H(() => {
|
|
147
|
+
var U, Y;
|
|
148
|
+
return f.value && !!((Y = (U = n.value) == null ? void 0 : U.fields) != null && Y.tyroLocationId) && !!e.value.deviceId && !s.value;
|
|
149
|
+
}), m = H(() => !f.value && !s.value), i = H(
|
|
150
150
|
() => o("payment.onboard-submission.tyro.syncDisabledHint")
|
|
151
|
-
), u =
|
|
152
|
-
async function
|
|
151
|
+
), u = H(() => s.value ? "Synced" : "Sync");
|
|
152
|
+
async function v() {
|
|
153
153
|
if (!e.value.referenceId) {
|
|
154
154
|
n.value = null;
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
157
|
try {
|
|
158
|
-
const
|
|
158
|
+
const U = await Ya.getByRestaurant(
|
|
159
159
|
e.value.referenceId
|
|
160
160
|
);
|
|
161
|
-
n.value =
|
|
162
|
-
(
|
|
161
|
+
n.value = U.find(
|
|
162
|
+
(Y) => Y.type === Aa.FdoOnboardType.enum.tyro
|
|
163
163
|
) ?? null;
|
|
164
|
-
} catch (
|
|
164
|
+
} catch (U) {
|
|
165
165
|
n.value = null, r.open({
|
|
166
166
|
type: "error",
|
|
167
|
-
message: nt(
|
|
167
|
+
message: nt(U)
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
const g =
|
|
172
|
-
intervalMs:
|
|
173
|
-
timeoutMs:
|
|
174
|
-
onTick: async ({ isCurrentRun:
|
|
175
|
-
var
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
171
|
+
const g = La({
|
|
172
|
+
intervalMs: Ja,
|
|
173
|
+
timeoutMs: Za,
|
|
174
|
+
onTick: async ({ isCurrentRun: U, stop: Y }) => {
|
|
175
|
+
var ue, C;
|
|
176
|
+
const L = await Ue.readById(e.value._id);
|
|
177
|
+
if (!U())
|
|
178
178
|
return;
|
|
179
|
-
const
|
|
180
|
-
(
|
|
179
|
+
const G = (ue = L.gateways) == null ? void 0 : ue.find((T) => T.gateway === "Tyro");
|
|
180
|
+
(G == null ? void 0 : G.gateway) === "Tyro" && ((C = G == null ? void 0 : G.config) != null && C.uniqueId) && (Y({ invalidate: !1 }), l(), Object.assign(e.value, L), r.open({
|
|
181
181
|
type: "success",
|
|
182
182
|
message: "Tyro reader created successfully"
|
|
183
183
|
}));
|
|
@@ -185,24 +185,24 @@ function Za(e) {
|
|
|
185
185
|
onTimeout: () => {
|
|
186
186
|
l(), r.open({
|
|
187
187
|
type: "error",
|
|
188
|
-
message:
|
|
188
|
+
message: en
|
|
189
189
|
});
|
|
190
190
|
},
|
|
191
|
-
onError: (
|
|
191
|
+
onError: (U) => {
|
|
192
192
|
l(), r.open({
|
|
193
193
|
type: "error",
|
|
194
|
-
message: nt(
|
|
194
|
+
message: nt(U)
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
}),
|
|
198
|
-
function
|
|
197
|
+
}), D = g.isPolling;
|
|
198
|
+
function c() {
|
|
199
199
|
g.stop(), l();
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
|
|
201
|
+
function _() {
|
|
202
|
+
c(), t(), g.start();
|
|
203
203
|
}
|
|
204
|
-
async function
|
|
205
|
-
if (!
|
|
204
|
+
async function O() {
|
|
205
|
+
if (!p.value) {
|
|
206
206
|
r.open({
|
|
207
207
|
type: "error",
|
|
208
208
|
message: "Tyro reader sync is not available"
|
|
@@ -210,37 +210,37 @@ function Za(e) {
|
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
212
|
try {
|
|
213
|
-
t(), await Ue.syncTyroReader(e.value._id),
|
|
214
|
-
} catch (
|
|
215
|
-
|
|
213
|
+
t(), await Ue.syncTyroReader(e.value._id), _();
|
|
214
|
+
} catch (U) {
|
|
215
|
+
c(), r.open({
|
|
216
216
|
type: "error",
|
|
217
|
-
message: nt(
|
|
217
|
+
message: nt(U)
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
return le(
|
|
222
222
|
() => e.value.referenceId,
|
|
223
223
|
async () => {
|
|
224
|
-
await
|
|
224
|
+
await v();
|
|
225
225
|
},
|
|
226
226
|
{ immediate: !0 }
|
|
227
227
|
), ka(() => {
|
|
228
|
-
|
|
228
|
+
c();
|
|
229
229
|
}), {
|
|
230
230
|
isLoading: a,
|
|
231
|
-
isPollingTyroReader:
|
|
232
|
-
uniqueId:
|
|
233
|
-
canSyncTyroReader:
|
|
231
|
+
isPollingTyroReader: D,
|
|
232
|
+
uniqueId: d,
|
|
233
|
+
canSyncTyroReader: p,
|
|
234
234
|
showTyroSyncPopover: m,
|
|
235
235
|
tyroSyncPopoverMessage: i,
|
|
236
236
|
tyroSyncButtonLabel: u,
|
|
237
|
-
syncTyroReader:
|
|
237
|
+
syncTyroReader: O
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const an = {
|
|
241
241
|
key: 0,
|
|
242
242
|
class: "text-sm text-gray-500"
|
|
243
|
-
},
|
|
243
|
+
}, nn = { class: "flex mt-6 space-x-6" }, ln = { class: "flex-1" }, on = /* @__PURE__ */ K({
|
|
244
244
|
__name: "SoftposGateway",
|
|
245
245
|
props: {
|
|
246
246
|
terminal: {
|
|
@@ -257,7 +257,7 @@ const en = {
|
|
|
257
257
|
{
|
|
258
258
|
label: "Fiuu Malaysia",
|
|
259
259
|
value: "cc.feedme.payment.rms",
|
|
260
|
-
region:
|
|
260
|
+
region: J.F_COUNTRY.enum.MY,
|
|
261
261
|
gateway: "Fiuu",
|
|
262
262
|
isLegacy: !0,
|
|
263
263
|
isOutdated: !0
|
|
@@ -265,14 +265,14 @@ const en = {
|
|
|
265
265
|
{
|
|
266
266
|
label: "Fiuu Malaysia V2",
|
|
267
267
|
value: "cc.feedme.payment.fiuu_my",
|
|
268
|
-
region:
|
|
268
|
+
region: J.F_COUNTRY.enum.MY,
|
|
269
269
|
gateway: "Fiuu",
|
|
270
270
|
isLegacy: !0
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
label: "Fiuu Singapore",
|
|
274
274
|
value: "cc.feedme.payment.fiuu_sg",
|
|
275
|
-
region:
|
|
275
|
+
region: J.F_COUNTRY.enum.SG,
|
|
276
276
|
gateway: "Fiuu",
|
|
277
277
|
isLegacy: !0
|
|
278
278
|
},
|
|
@@ -280,201 +280,201 @@ const en = {
|
|
|
280
280
|
label: "Softspace Malaysia",
|
|
281
281
|
value: "cc.feedme.payment.softspace_my",
|
|
282
282
|
gateway: "Softspace",
|
|
283
|
-
region:
|
|
283
|
+
region: J.F_COUNTRY.enum.MY
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
286
|
label: "Digio Thailand",
|
|
287
287
|
value: "cc.feedme.payment.digio_th",
|
|
288
288
|
gateway: "Digio",
|
|
289
|
-
region:
|
|
289
|
+
region: J.F_COUNTRY.enum.TH
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
292
|
label: "Tyro Australia",
|
|
293
293
|
value: "cc.feedme.payment.tyro_au",
|
|
294
294
|
gateway: "Tyro",
|
|
295
|
-
region:
|
|
295
|
+
region: J.F_COUNTRY.enum.AU
|
|
296
296
|
}
|
|
297
|
-
], o =
|
|
297
|
+
], o = de(() => a.terminal), r = I(), n = I({
|
|
298
298
|
packageId: "",
|
|
299
299
|
uniqueId: "",
|
|
300
300
|
developerId: "",
|
|
301
301
|
isUat: !1
|
|
302
|
-
}),
|
|
302
|
+
}), d = () => {
|
|
303
303
|
n.value.uniqueId = "", n.value.packageId = "", n.value.developerId = "", n.value.isUat = !1;
|
|
304
|
-
}, s =
|
|
305
|
-
(
|
|
306
|
-
)),
|
|
304
|
+
}, s = H(() => l.filter((F) => F.region === t.value)), f = H(() => s.value.find(
|
|
305
|
+
(F) => F.value === n.value.packageId
|
|
306
|
+
)), p = H(
|
|
307
307
|
() => {
|
|
308
|
-
var
|
|
309
|
-
return ((
|
|
308
|
+
var F;
|
|
309
|
+
return ((F = f.value) == null ? void 0 : F.gateway) === "Tyro";
|
|
310
310
|
}
|
|
311
311
|
), {
|
|
312
312
|
isLoading: m,
|
|
313
313
|
isPollingTyroReader: i,
|
|
314
314
|
uniqueId: u,
|
|
315
|
-
canSyncTyroReader:
|
|
315
|
+
canSyncTyroReader: v,
|
|
316
316
|
showTyroSyncPopover: g,
|
|
317
|
-
tyroSyncPopoverMessage:
|
|
318
|
-
tyroSyncButtonLabel:
|
|
319
|
-
syncTyroReader:
|
|
320
|
-
} =
|
|
317
|
+
tyroSyncPopoverMessage: D,
|
|
318
|
+
tyroSyncButtonLabel: c,
|
|
319
|
+
syncTyroReader: _
|
|
320
|
+
} = tn(o), O = H(() => p.value ? "button" : "submit"), U = H(() => p.value ? c.value : "Save"), Y = H(() => p.value ? m.value : !1), L = H(() => p.value ? !v.value || i.value : !1), G = () => {
|
|
321
321
|
if (!o.value.gateways || o.value.gateways.length === 0)
|
|
322
|
-
return
|
|
323
|
-
const
|
|
324
|
-
if (!
|
|
325
|
-
return
|
|
326
|
-
if (
|
|
322
|
+
return d();
|
|
323
|
+
const F = o.value.gateways[0];
|
|
324
|
+
if (!F.config)
|
|
325
|
+
return d();
|
|
326
|
+
if (F.gateway === "Tyro") {
|
|
327
327
|
n.value = {
|
|
328
|
-
packageId:
|
|
329
|
-
uniqueId:
|
|
328
|
+
packageId: F.config.packageId,
|
|
329
|
+
uniqueId: F.config.uniqueId,
|
|
330
330
|
developerId: "",
|
|
331
331
|
isUat: !1
|
|
332
332
|
};
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
switch (
|
|
335
|
+
switch (F.gateway) {
|
|
336
336
|
case "Fiuu":
|
|
337
337
|
n.value = {
|
|
338
|
-
packageId:
|
|
339
|
-
uniqueId:
|
|
338
|
+
packageId: F.config.packageId,
|
|
339
|
+
uniqueId: F.config.uniqueId,
|
|
340
340
|
developerId: "",
|
|
341
341
|
isUat: !1
|
|
342
342
|
};
|
|
343
343
|
break;
|
|
344
344
|
case "Softspace":
|
|
345
345
|
case "Digio":
|
|
346
|
-
const
|
|
346
|
+
const V = JSON.parse(F.config.uniqueId);
|
|
347
347
|
n.value = {
|
|
348
|
-
packageId:
|
|
349
|
-
uniqueId:
|
|
350
|
-
developerId:
|
|
351
|
-
isUat:
|
|
348
|
+
packageId: F.config.packageId,
|
|
349
|
+
uniqueId: V.uniqueId,
|
|
350
|
+
developerId: V.developerId,
|
|
351
|
+
isUat: V.isUat
|
|
352
352
|
};
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
|
-
le(o,
|
|
357
|
-
async function
|
|
358
|
-
const
|
|
359
|
-
if (!
|
|
356
|
+
le(o, G), re(G);
|
|
357
|
+
async function ue() {
|
|
358
|
+
const F = f.value;
|
|
359
|
+
if (!F)
|
|
360
360
|
return;
|
|
361
|
-
let
|
|
362
|
-
|
|
361
|
+
let V = n.value.uniqueId;
|
|
362
|
+
F.isLegacy || (V = JSON.stringify({
|
|
363
363
|
uniqueId: n.value.uniqueId,
|
|
364
364
|
developerId: n.value.developerId,
|
|
365
365
|
isUat: n.value.isUat
|
|
366
366
|
}));
|
|
367
367
|
const Z = {
|
|
368
|
-
gateway:
|
|
368
|
+
gateway: F.gateway,
|
|
369
369
|
config: {
|
|
370
|
-
packageId:
|
|
371
|
-
uniqueId:
|
|
370
|
+
packageId: F.value,
|
|
371
|
+
uniqueId: V
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
(!o.value.gateways || o.value.gateways.length > 1) && (o.value.gateways = []), o.value.gateways[0] = Z, await a.onUpdate(o.value);
|
|
375
375
|
}
|
|
376
|
-
async function
|
|
377
|
-
var
|
|
378
|
-
(
|
|
376
|
+
async function C(F) {
|
|
377
|
+
var V;
|
|
378
|
+
(V = o.value.gateways) == null || V.splice(F, 1), a.onUpdate(o.value);
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
|
|
380
|
+
function T() {
|
|
381
|
+
p.value && _();
|
|
382
382
|
}
|
|
383
|
-
return (
|
|
384
|
-
const Z =
|
|
383
|
+
return (F, V) => {
|
|
384
|
+
const Z = w("FmSelect"), q = w("FmTextField"), $ = w("FmCheckbox"), z = w("FmButton"), Q = w("FmTooltip"), Ce = w("FmForm");
|
|
385
385
|
return b(), S(Ce, {
|
|
386
386
|
ref: r.value,
|
|
387
387
|
class: "flex flex-col gap-16 w-[500px]",
|
|
388
|
-
onValidationSuccess:
|
|
388
|
+
onValidationSuccess: ue
|
|
389
389
|
}, {
|
|
390
|
-
default:
|
|
390
|
+
default: ne(() => [
|
|
391
391
|
y(Z, {
|
|
392
392
|
modelValue: n.value.packageId,
|
|
393
|
-
"onUpdate:modelValue":
|
|
393
|
+
"onUpdate:modelValue": V[0] || (V[0] = (ie) => n.value.packageId = ie),
|
|
394
394
|
label: "Package ID",
|
|
395
395
|
items: s.value
|
|
396
396
|
}, null, 8, ["modelValue", "items"]),
|
|
397
|
-
|
|
398
|
-
|
|
397
|
+
f.value ? (b(), R(ae, { key: 0 }, [
|
|
398
|
+
p.value ? (b(), S(q, {
|
|
399
399
|
key: 0,
|
|
400
|
-
"model-value":
|
|
400
|
+
"model-value": M(u),
|
|
401
401
|
label: "Unique ID (Reader ID)",
|
|
402
402
|
disabled: ""
|
|
403
|
-
}, null, 8, ["model-value"])) :
|
|
403
|
+
}, null, 8, ["model-value"])) : f.value && f.value.isLegacy ? (b(), R(ae, { key: 1 }, [
|
|
404
404
|
y(q, {
|
|
405
405
|
modelValue: n.value.uniqueId,
|
|
406
|
-
"onUpdate:modelValue":
|
|
406
|
+
"onUpdate:modelValue": V[1] || (V[1] = (ie) => n.value.uniqueId = ie),
|
|
407
407
|
label: "Unique ID (TID)"
|
|
408
408
|
}, null, 8, ["modelValue"]),
|
|
409
|
-
|
|
410
|
-
], 64)) : (b(),
|
|
409
|
+
f.value.isOutdated ? (b(), R("span", an, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : B("", !0)
|
|
410
|
+
], 64)) : (b(), R(ae, { key: 2 }, [
|
|
411
411
|
y(q, {
|
|
412
412
|
modelValue: n.value.developerId,
|
|
413
|
-
"onUpdate:modelValue":
|
|
413
|
+
"onUpdate:modelValue": V[2] || (V[2] = (ie) => n.value.developerId = ie),
|
|
414
414
|
label: "Developer ID (MID)"
|
|
415
415
|
}, null, 8, ["modelValue"]),
|
|
416
416
|
y(q, {
|
|
417
417
|
modelValue: n.value.uniqueId,
|
|
418
|
-
"onUpdate:modelValue":
|
|
418
|
+
"onUpdate:modelValue": V[3] || (V[3] = (ie) => n.value.uniqueId = ie),
|
|
419
419
|
label: "Unique ID (TID)"
|
|
420
420
|
}, null, 8, ["modelValue"]),
|
|
421
|
-
y(
|
|
421
|
+
y($, {
|
|
422
422
|
modelValue: n.value.isUat,
|
|
423
|
-
"onUpdate:modelValue":
|
|
423
|
+
"onUpdate:modelValue": V[4] || (V[4] = (ie) => n.value.isUat = ie),
|
|
424
424
|
label: "Is UAT (Test)",
|
|
425
425
|
value: "1"
|
|
426
426
|
}, null, 8, ["modelValue"])
|
|
427
427
|
], 64)),
|
|
428
|
-
|
|
429
|
-
o.value.gateways && o.value.gateways.length > 0 ? (b(), S(
|
|
428
|
+
x("div", nn, [
|
|
429
|
+
o.value.gateways && o.value.gateways.length > 0 ? (b(), S(z, {
|
|
430
430
|
key: 0,
|
|
431
431
|
class: "flex-1",
|
|
432
432
|
variant: "secondary",
|
|
433
433
|
label: "Delete",
|
|
434
|
-
onclick: () =>
|
|
435
|
-
}, null, 8, ["onclick"])) :
|
|
436
|
-
|
|
434
|
+
onclick: () => C(0)
|
|
435
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
436
|
+
p.value && M(g) && L.value ? (b(), S(Q, {
|
|
437
437
|
key: 1,
|
|
438
438
|
class: "flex-1",
|
|
439
439
|
variant: "plain",
|
|
440
440
|
placement: "top",
|
|
441
|
-
content:
|
|
441
|
+
content: M(D)
|
|
442
442
|
}, {
|
|
443
|
-
default:
|
|
444
|
-
|
|
445
|
-
y(
|
|
446
|
-
type:
|
|
443
|
+
default: ne(() => [
|
|
444
|
+
x("div", ln, [
|
|
445
|
+
y(z, {
|
|
446
|
+
type: O.value,
|
|
447
447
|
class: "w-full",
|
|
448
448
|
variant: "primary",
|
|
449
|
-
loading:
|
|
450
|
-
disabled:
|
|
451
|
-
label:
|
|
452
|
-
onClick:
|
|
449
|
+
loading: Y.value,
|
|
450
|
+
disabled: L.value,
|
|
451
|
+
label: U.value,
|
|
452
|
+
onClick: T
|
|
453
453
|
}, null, 8, ["type", "loading", "disabled", "label"])
|
|
454
454
|
])
|
|
455
455
|
]),
|
|
456
456
|
_: 1
|
|
457
|
-
}, 8, ["content"])) : (b(), S(
|
|
457
|
+
}, 8, ["content"])) : (b(), S(z, {
|
|
458
458
|
key: 2,
|
|
459
|
-
type:
|
|
459
|
+
type: O.value,
|
|
460
460
|
class: "flex-1",
|
|
461
461
|
variant: "primary",
|
|
462
|
-
loading:
|
|
463
|
-
disabled:
|
|
464
|
-
label:
|
|
465
|
-
onClick:
|
|
462
|
+
loading: Y.value,
|
|
463
|
+
disabled: L.value,
|
|
464
|
+
label: U.value,
|
|
465
|
+
onClick: T
|
|
466
466
|
}, null, 8, ["type", "loading", "disabled", "label"]))
|
|
467
467
|
])
|
|
468
|
-
], 64)) :
|
|
468
|
+
], 64)) : B("", !0)
|
|
469
469
|
]),
|
|
470
470
|
_: 1
|
|
471
471
|
}, 512);
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
}),
|
|
474
|
+
}), rn = {
|
|
475
475
|
key: 0,
|
|
476
476
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
477
|
-
},
|
|
477
|
+
}, sn = { class: "flex mt-6 space-x-6" }, un = /* @__PURE__ */ K({
|
|
478
478
|
__name: "TerminalGateway",
|
|
479
479
|
props: {
|
|
480
480
|
terminal: {
|
|
@@ -487,62 +487,62 @@ const en = {
|
|
|
487
487
|
}
|
|
488
488
|
},
|
|
489
489
|
setup(e) {
|
|
490
|
-
const { isLoading: a, startAsyncCall: t } = ht(), l = e, o =
|
|
490
|
+
const { isLoading: a, startAsyncCall: t } = ht(), l = e, o = de(() => l.terminal), r = I(), n = I(), d = I(-1), s = I({
|
|
491
491
|
terminalId: ""
|
|
492
|
-
}),
|
|
493
|
-
s.value.terminalId = "",
|
|
494
|
-
},
|
|
492
|
+
}), f = () => {
|
|
493
|
+
s.value.terminalId = "", d.value = -1;
|
|
494
|
+
}, p = () => {
|
|
495
495
|
if (t(async () => {
|
|
496
496
|
r.value = await Ue.getRestaurantTerminals(l.terminal.referenceId);
|
|
497
497
|
}), !l.terminal.ecrs)
|
|
498
|
-
return
|
|
498
|
+
return f();
|
|
499
499
|
const u = l.terminal.ecrs.findIndex((g) => g && g.gateway && g.gateway === "FeedMe");
|
|
500
500
|
if (u === -1)
|
|
501
|
-
return
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
terminalId:
|
|
501
|
+
return f();
|
|
502
|
+
d.value = u;
|
|
503
|
+
const v = l.terminal.ecrs.at(u);
|
|
504
|
+
v.gateway === "FeedMe" && v.config && (s.value = {
|
|
505
|
+
terminalId: v.config.terminalId
|
|
506
506
|
});
|
|
507
507
|
};
|
|
508
|
-
le(o,
|
|
509
|
-
const m =
|
|
508
|
+
le(o, p), re(p);
|
|
509
|
+
const m = H(() => (r.value ?? []).map((u) => ({
|
|
510
510
|
label: u.name ?? u._id,
|
|
511
511
|
value: u._id
|
|
512
512
|
})));
|
|
513
513
|
async function i(u) {
|
|
514
|
-
var
|
|
515
|
-
(
|
|
514
|
+
var v;
|
|
515
|
+
(v = l.terminal.ecrs) == null || v.splice(u, 1), l.onUpdate(l.terminal);
|
|
516
516
|
}
|
|
517
|
-
return (u,
|
|
518
|
-
const g =
|
|
519
|
-
return
|
|
517
|
+
return (u, v) => {
|
|
518
|
+
const g = w("FmCircularProgress"), D = w("FmSelect"), c = w("FmButton"), _ = w("FmForm");
|
|
519
|
+
return M(a) ? (b(), R("div", rn, [
|
|
520
520
|
y(g, { size: "xxl" })
|
|
521
|
-
])) : (b(), S(
|
|
521
|
+
])) : (b(), S(_, {
|
|
522
522
|
key: 1,
|
|
523
523
|
ref: n.value,
|
|
524
524
|
class: "flex flex-col gap-16 w-[500px]",
|
|
525
|
-
onValidationSuccess:
|
|
526
|
-
|
|
525
|
+
onValidationSuccess: v[1] || (v[1] = () => {
|
|
526
|
+
d.value > -1 ? o.value.ecrs[d.value] = { gateway: "FeedMe", config: s.value } : (o.value.ecrs || (o.value.ecrs = []), o.value.ecrs.push({ gateway: "FeedMe", config: s.value })), l.onUpdate(o.value);
|
|
527
527
|
})
|
|
528
528
|
}, {
|
|
529
|
-
default:
|
|
530
|
-
y(
|
|
529
|
+
default: ne(() => [
|
|
530
|
+
y(D, {
|
|
531
531
|
modelValue: s.value.terminalId,
|
|
532
|
-
"onUpdate:modelValue":
|
|
532
|
+
"onUpdate:modelValue": v[0] || (v[0] = (O) => s.value.terminalId = O),
|
|
533
533
|
label: "Terminal ID",
|
|
534
534
|
items: m.value,
|
|
535
|
-
rules:
|
|
535
|
+
rules: M(ia)(M(sa).string())
|
|
536
536
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
537
|
-
|
|
538
|
-
|
|
537
|
+
x("div", sn, [
|
|
538
|
+
d.value > -1 ? (b(), S(c, {
|
|
539
539
|
key: 0,
|
|
540
540
|
class: "flex-1",
|
|
541
541
|
variant: "secondary",
|
|
542
542
|
label: "Delete",
|
|
543
|
-
onclick: () => i(
|
|
544
|
-
}, null, 8, ["onclick"])) :
|
|
545
|
-
y(
|
|
543
|
+
onclick: () => i(d.value)
|
|
544
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
545
|
+
y(c, {
|
|
546
546
|
type: "submit",
|
|
547
547
|
class: "flex-1",
|
|
548
548
|
variant: "primary",
|
|
@@ -554,7 +554,7 @@ const en = {
|
|
|
554
554
|
}, 512));
|
|
555
555
|
};
|
|
556
556
|
}
|
|
557
|
-
}),
|
|
557
|
+
}), cn = { class: "flex mt-6 space-x-6" }, dn = /* @__PURE__ */ K({
|
|
558
558
|
__name: "GhlGateway",
|
|
559
559
|
props: {
|
|
560
560
|
terminal: {
|
|
@@ -567,66 +567,66 @@ const en = {
|
|
|
567
567
|
}
|
|
568
568
|
},
|
|
569
569
|
setup(e) {
|
|
570
|
-
const a = e, t =
|
|
570
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I({
|
|
571
571
|
merchantId: "",
|
|
572
572
|
terminalId: "",
|
|
573
573
|
privateKey: ""
|
|
574
574
|
}), n = () => {
|
|
575
575
|
r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", o.value = -1;
|
|
576
|
-
},
|
|
576
|
+
}, d = () => {
|
|
577
577
|
if (!t.value.ecrs)
|
|
578
578
|
return n();
|
|
579
|
-
const
|
|
580
|
-
if (
|
|
579
|
+
const f = t.value.ecrs.findIndex((m) => m && m.gateway && m.gateway === "Ghl");
|
|
580
|
+
if (f === -1)
|
|
581
581
|
return n();
|
|
582
|
-
o.value =
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
merchantId:
|
|
586
|
-
terminalId:
|
|
587
|
-
privateKey:
|
|
582
|
+
o.value = f;
|
|
583
|
+
const p = t.value.ecrs.at(f);
|
|
584
|
+
p.gateway === "Ghl" && p.config && (r.value = {
|
|
585
|
+
merchantId: p.config.merchantId,
|
|
586
|
+
terminalId: p.config.terminalId,
|
|
587
|
+
privateKey: p.config.privateKey || ""
|
|
588
588
|
});
|
|
589
589
|
};
|
|
590
|
-
le(t,
|
|
591
|
-
async function s(
|
|
592
|
-
var
|
|
593
|
-
(
|
|
594
|
-
}
|
|
595
|
-
return (
|
|
596
|
-
const m =
|
|
597
|
-
return b(), S(
|
|
590
|
+
le(t, d), re(d);
|
|
591
|
+
async function s(f) {
|
|
592
|
+
var p;
|
|
593
|
+
(p = t.value.ecrs) == null || p.splice(f, 1), a.onUpdate(t.value);
|
|
594
|
+
}
|
|
595
|
+
return (f, p) => {
|
|
596
|
+
const m = w("FmTextField"), i = w("FmTextarea"), u = w("FmButton"), v = w("FmForm");
|
|
597
|
+
return b(), S(v, {
|
|
598
598
|
ref: l.value,
|
|
599
599
|
class: "flex flex-col gap-16 w-[500px]",
|
|
600
|
-
onValidationSuccess:
|
|
600
|
+
onValidationSuccess: p[3] || (p[3] = () => {
|
|
601
601
|
o.value > -1 ? t.value.ecrs[o.value] = { gateway: "Ghl", config: r.value } : (t.value.ecrs || (t.value.ecrs = []), t.value.ecrs.push({ gateway: "Ghl", config: r.value })), a.onUpdate(t.value);
|
|
602
602
|
})
|
|
603
603
|
}, {
|
|
604
|
-
default:
|
|
604
|
+
default: ne(() => [
|
|
605
605
|
y(m, {
|
|
606
606
|
modelValue: r.value.merchantId,
|
|
607
|
-
"onUpdate:modelValue":
|
|
607
|
+
"onUpdate:modelValue": p[0] || (p[0] = (g) => r.value.merchantId = g),
|
|
608
608
|
label: "Merchant ID"
|
|
609
609
|
}, null, 8, ["modelValue"]),
|
|
610
610
|
y(m, {
|
|
611
611
|
modelValue: r.value.terminalId,
|
|
612
|
-
"onUpdate:modelValue":
|
|
612
|
+
"onUpdate:modelValue": p[1] || (p[1] = (g) => r.value.terminalId = g),
|
|
613
613
|
label: "Terminal ID"
|
|
614
614
|
}, null, 8, ["modelValue"]),
|
|
615
615
|
y(i, {
|
|
616
616
|
modelValue: r.value.privateKey,
|
|
617
|
-
"onUpdate:modelValue":
|
|
617
|
+
"onUpdate:modelValue": p[2] || (p[2] = (g) => r.value.privateKey = g),
|
|
618
618
|
label: "Private Key",
|
|
619
619
|
"label-mark": "optional",
|
|
620
620
|
"label-info": "Default will use FeedMe Private Key"
|
|
621
621
|
}, null, 8, ["modelValue"]),
|
|
622
|
-
|
|
622
|
+
x("div", cn, [
|
|
623
623
|
o.value > -1 ? (b(), S(u, {
|
|
624
624
|
key: 0,
|
|
625
625
|
class: "flex-1",
|
|
626
626
|
variant: "secondary",
|
|
627
627
|
label: "Delete",
|
|
628
628
|
onclick: () => s(o.value)
|
|
629
|
-
}, null, 8, ["onclick"])) :
|
|
629
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
630
630
|
y(u, {
|
|
631
631
|
type: "submit",
|
|
632
632
|
class: "flex-1",
|
|
@@ -639,7 +639,7 @@ const en = {
|
|
|
639
639
|
}, 512);
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
|
-
}),
|
|
642
|
+
}), pn = { class: "flex items-end" }, mn = { class: "flex flex-wrap gap-8 items-center mt-4" }, fn = { class: "flex mt-6 space-x-6" }, vn = /* @__PURE__ */ K({
|
|
643
643
|
__name: "MaybankGateway",
|
|
644
644
|
props: {
|
|
645
645
|
terminal: {
|
|
@@ -652,48 +652,48 @@ const en = {
|
|
|
652
652
|
}
|
|
653
653
|
},
|
|
654
654
|
setup(e) {
|
|
655
|
-
const a = e, t =
|
|
655
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
656
656
|
ip: "",
|
|
657
657
|
receiptName: "",
|
|
658
658
|
cardTypes: []
|
|
659
|
-
}),
|
|
659
|
+
}), d = () => {
|
|
660
660
|
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
661
661
|
}, s = () => {
|
|
662
|
-
var
|
|
662
|
+
var v;
|
|
663
663
|
if (!t.value.ecrIntegrations)
|
|
664
|
-
return
|
|
664
|
+
return d();
|
|
665
665
|
const m = t.value.ecrIntegrations, i = m.findIndex((g) => g && g.gateway && g.gateway === "Maybank");
|
|
666
666
|
if (i === -1)
|
|
667
|
-
return
|
|
667
|
+
return d();
|
|
668
668
|
o.value = i;
|
|
669
669
|
const u = m.at(i);
|
|
670
670
|
u.gateway === "Maybank" && u.config && (n.value = {
|
|
671
671
|
ip: u.config.ip ?? "",
|
|
672
672
|
receiptName: u.receiptName ?? "",
|
|
673
|
-
cardTypes: ((
|
|
673
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
674
674
|
});
|
|
675
675
|
};
|
|
676
676
|
le(t, s), re(s);
|
|
677
|
-
async function
|
|
677
|
+
async function f(m) {
|
|
678
678
|
var i;
|
|
679
679
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
680
680
|
}
|
|
681
|
-
async function
|
|
681
|
+
async function p() {
|
|
682
682
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
683
683
|
}
|
|
684
684
|
return (m, i) => {
|
|
685
|
-
const u =
|
|
686
|
-
return b(), S(
|
|
685
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
686
|
+
return b(), S(D, {
|
|
687
687
|
ref: l.value,
|
|
688
688
|
class: "flex flex-col gap-16 w-[500px]",
|
|
689
689
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
690
|
-
var
|
|
690
|
+
var c, _;
|
|
691
691
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
692
692
|
gateway: "Maybank",
|
|
693
693
|
config: { ip: n.value.ip },
|
|
694
694
|
receiptName: n.value.receiptName,
|
|
695
695
|
dialogConfig: {
|
|
696
|
-
...(
|
|
696
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
697
697
|
cardTypes: n.value.cardTypes
|
|
698
698
|
}
|
|
699
699
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -706,48 +706,48 @@ const en = {
|
|
|
706
706
|
})), a.onUpdate(t.value);
|
|
707
707
|
})
|
|
708
708
|
}, {
|
|
709
|
-
default:
|
|
709
|
+
default: ne(() => [
|
|
710
710
|
y(u, {
|
|
711
711
|
modelValue: n.value.ip,
|
|
712
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
712
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.ip = c),
|
|
713
713
|
label: "IP Address"
|
|
714
714
|
}, null, 8, ["modelValue"]),
|
|
715
715
|
y(u, {
|
|
716
716
|
modelValue: n.value.receiptName,
|
|
717
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
717
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => n.value.receiptName = c),
|
|
718
718
|
label: "Receipt Payment Name",
|
|
719
719
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
720
720
|
}, null, 8, ["modelValue"]),
|
|
721
|
-
|
|
721
|
+
x("div", pn, [
|
|
722
722
|
y(u, {
|
|
723
723
|
modelValue: r.value,
|
|
724
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
724
|
+
"onUpdate:modelValue": i[2] || (i[2] = (c) => r.value = c),
|
|
725
725
|
label: "Fallback Card Types",
|
|
726
726
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
727
727
|
}, null, 8, ["modelValue"]),
|
|
728
|
-
y(
|
|
728
|
+
y(v, {
|
|
729
729
|
class: "ml-4",
|
|
730
730
|
icon: "add",
|
|
731
|
-
onClick:
|
|
731
|
+
onClick: p
|
|
732
732
|
})
|
|
733
733
|
]),
|
|
734
|
-
|
|
735
|
-
(b(!0),
|
|
736
|
-
key:
|
|
737
|
-
label:
|
|
734
|
+
x("div", mn, [
|
|
735
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
736
|
+
key: c,
|
|
737
|
+
label: c,
|
|
738
738
|
removable: !0,
|
|
739
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
739
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
740
740
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
741
741
|
]),
|
|
742
|
-
|
|
743
|
-
o.value > -1 ? (b(), S(
|
|
742
|
+
x("div", fn, [
|
|
743
|
+
o.value > -1 ? (b(), S(v, {
|
|
744
744
|
key: 0,
|
|
745
745
|
class: "flex-1",
|
|
746
746
|
variant: "secondary",
|
|
747
747
|
label: "Delete",
|
|
748
|
-
onclick: () =>
|
|
749
|
-
}, null, 8, ["onclick"])) :
|
|
750
|
-
y(
|
|
748
|
+
onclick: () => f(o.value)
|
|
749
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
750
|
+
y(v, {
|
|
751
751
|
type: "submit",
|
|
752
752
|
class: "flex-1",
|
|
753
753
|
variant: "primary",
|
|
@@ -759,7 +759,7 @@ const en = {
|
|
|
759
759
|
}, 512);
|
|
760
760
|
};
|
|
761
761
|
}
|
|
762
|
-
}),
|
|
762
|
+
}), gn = { class: "flex items-end" }, yn = { class: "flex flex-wrap gap-8 items-center mt-4" }, hn = { class: "flex mt-6 space-x-6" }, bn = /* @__PURE__ */ K({
|
|
763
763
|
__name: "Maybank2Gateway",
|
|
764
764
|
props: {
|
|
765
765
|
terminal: {
|
|
@@ -772,48 +772,48 @@ const en = {
|
|
|
772
772
|
}
|
|
773
773
|
},
|
|
774
774
|
setup(e) {
|
|
775
|
-
const a = e, t =
|
|
775
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
776
776
|
ip: "",
|
|
777
777
|
receiptName: "",
|
|
778
778
|
cardTypes: []
|
|
779
|
-
}),
|
|
779
|
+
}), d = () => {
|
|
780
780
|
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
781
781
|
}, s = () => {
|
|
782
|
-
var
|
|
782
|
+
var v;
|
|
783
783
|
if (!t.value.ecrIntegrations)
|
|
784
|
-
return
|
|
784
|
+
return d();
|
|
785
785
|
const m = t.value.ecrIntegrations, i = m.findIndex((g) => g && g.gateway && g.gateway === "Maybank2");
|
|
786
786
|
if (i === -1)
|
|
787
|
-
return
|
|
787
|
+
return d();
|
|
788
788
|
o.value = i;
|
|
789
789
|
const u = m.at(i);
|
|
790
790
|
u.gateway === "Maybank2" && u.config && (n.value = {
|
|
791
791
|
ip: u.config.ip ?? "",
|
|
792
792
|
receiptName: u.receiptName ?? "",
|
|
793
|
-
cardTypes: ((
|
|
793
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
794
794
|
});
|
|
795
795
|
};
|
|
796
796
|
le(t, s), re(s);
|
|
797
|
-
async function
|
|
797
|
+
async function f(m) {
|
|
798
798
|
var i;
|
|
799
799
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
800
800
|
}
|
|
801
|
-
async function
|
|
801
|
+
async function p() {
|
|
802
802
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
803
803
|
}
|
|
804
804
|
return (m, i) => {
|
|
805
|
-
const u =
|
|
806
|
-
return b(), S(
|
|
805
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
806
|
+
return b(), S(D, {
|
|
807
807
|
ref: l.value,
|
|
808
808
|
class: "flex flex-col gap-16 w-[500px]",
|
|
809
809
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
810
|
-
var
|
|
810
|
+
var c, _;
|
|
811
811
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
812
812
|
gateway: "Maybank2",
|
|
813
813
|
config: { ip: n.value.ip },
|
|
814
814
|
receiptName: n.value.receiptName,
|
|
815
815
|
dialogConfig: {
|
|
816
|
-
...(
|
|
816
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
817
817
|
cardTypes: n.value.cardTypes
|
|
818
818
|
}
|
|
819
819
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -826,48 +826,48 @@ const en = {
|
|
|
826
826
|
})), a.onUpdate(t.value);
|
|
827
827
|
})
|
|
828
828
|
}, {
|
|
829
|
-
default:
|
|
829
|
+
default: ne(() => [
|
|
830
830
|
y(u, {
|
|
831
831
|
modelValue: n.value.ip,
|
|
832
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
832
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.ip = c),
|
|
833
833
|
label: "IP Address"
|
|
834
834
|
}, null, 8, ["modelValue"]),
|
|
835
835
|
y(u, {
|
|
836
836
|
modelValue: n.value.receiptName,
|
|
837
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
837
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => n.value.receiptName = c),
|
|
838
838
|
label: "Receipt Payment Name",
|
|
839
839
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
840
840
|
}, null, 8, ["modelValue"]),
|
|
841
|
-
|
|
841
|
+
x("div", gn, [
|
|
842
842
|
y(u, {
|
|
843
843
|
modelValue: r.value,
|
|
844
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
844
|
+
"onUpdate:modelValue": i[2] || (i[2] = (c) => r.value = c),
|
|
845
845
|
label: "Fallback Card Types",
|
|
846
846
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
847
847
|
}, null, 8, ["modelValue"]),
|
|
848
|
-
y(
|
|
848
|
+
y(v, {
|
|
849
849
|
class: "ml-4",
|
|
850
850
|
icon: "add",
|
|
851
|
-
onClick:
|
|
851
|
+
onClick: p
|
|
852
852
|
})
|
|
853
853
|
]),
|
|
854
|
-
|
|
855
|
-
(b(!0),
|
|
856
|
-
key:
|
|
857
|
-
label:
|
|
854
|
+
x("div", yn, [
|
|
855
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
856
|
+
key: c,
|
|
857
|
+
label: c,
|
|
858
858
|
removable: !0,
|
|
859
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
859
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
860
860
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
861
861
|
]),
|
|
862
|
-
|
|
863
|
-
o.value > -1 ? (b(), S(
|
|
862
|
+
x("div", hn, [
|
|
863
|
+
o.value > -1 ? (b(), S(v, {
|
|
864
864
|
key: 0,
|
|
865
865
|
class: "flex-1",
|
|
866
866
|
variant: "secondary",
|
|
867
867
|
label: "Delete",
|
|
868
|
-
onclick: () =>
|
|
869
|
-
}, null, 8, ["onclick"])) :
|
|
870
|
-
y(
|
|
868
|
+
onclick: () => f(o.value)
|
|
869
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
870
|
+
y(v, {
|
|
871
871
|
type: "submit",
|
|
872
872
|
class: "flex-1",
|
|
873
873
|
variant: "primary",
|
|
@@ -879,7 +879,7 @@ const en = {
|
|
|
879
879
|
}, 512);
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
}),
|
|
882
|
+
}), _n = { class: "flex items-end" }, wn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Tn = { class: "flex mt-6 space-x-6" }, In = /* @__PURE__ */ K({
|
|
883
883
|
__name: "Maybank3Gateway",
|
|
884
884
|
props: {
|
|
885
885
|
terminal: {
|
|
@@ -892,48 +892,48 @@ const en = {
|
|
|
892
892
|
}
|
|
893
893
|
},
|
|
894
894
|
setup(e) {
|
|
895
|
-
const a = e, t =
|
|
895
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
896
896
|
receiptName: "",
|
|
897
897
|
config: {},
|
|
898
898
|
cardTypes: []
|
|
899
|
-
}),
|
|
899
|
+
}), d = () => {
|
|
900
900
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
901
901
|
}, s = () => {
|
|
902
|
-
var
|
|
902
|
+
var v;
|
|
903
903
|
if (!t.value.ecrIntegrations)
|
|
904
|
-
return
|
|
904
|
+
return d();
|
|
905
905
|
const m = t.value.ecrIntegrations, i = m.findIndex((g) => g && g.gateway && g.gateway === "Maybank3");
|
|
906
906
|
if (i === -1)
|
|
907
|
-
return
|
|
907
|
+
return d();
|
|
908
908
|
o.value = i;
|
|
909
909
|
const u = m.at(i);
|
|
910
910
|
u.gateway === "Maybank3" && u.config && (n.value = {
|
|
911
911
|
config: u.config,
|
|
912
912
|
receiptName: u.receiptName ?? "",
|
|
913
|
-
cardTypes: ((
|
|
913
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
914
914
|
});
|
|
915
915
|
};
|
|
916
916
|
le(t, s), re(s);
|
|
917
|
-
async function
|
|
917
|
+
async function f(m) {
|
|
918
918
|
var i;
|
|
919
919
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
920
920
|
}
|
|
921
|
-
async function
|
|
921
|
+
async function p() {
|
|
922
922
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
923
923
|
}
|
|
924
924
|
return (m, i) => {
|
|
925
|
-
const u =
|
|
926
|
-
return b(), S(
|
|
925
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
926
|
+
return b(), S(D, {
|
|
927
927
|
ref: l.value,
|
|
928
928
|
class: "flex flex-col gap-16 w-[500px]",
|
|
929
929
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
930
|
-
var
|
|
930
|
+
var c, _;
|
|
931
931
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
932
932
|
gateway: "Maybank3",
|
|
933
933
|
config: n.value.config,
|
|
934
934
|
receiptName: n.value.receiptName,
|
|
935
935
|
dialogConfig: {
|
|
936
|
-
...(
|
|
936
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
937
937
|
cardTypes: n.value.cardTypes
|
|
938
938
|
}
|
|
939
939
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -946,43 +946,43 @@ const en = {
|
|
|
946
946
|
})), a.onUpdate(t.value);
|
|
947
947
|
})
|
|
948
948
|
}, {
|
|
949
|
-
default:
|
|
949
|
+
default: ne(() => [
|
|
950
950
|
y(u, {
|
|
951
951
|
modelValue: n.value.receiptName,
|
|
952
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
952
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.receiptName = c),
|
|
953
953
|
label: "Receipt Payment Name",
|
|
954
954
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
955
955
|
}, null, 8, ["modelValue"]),
|
|
956
|
-
|
|
956
|
+
x("div", _n, [
|
|
957
957
|
y(u, {
|
|
958
958
|
modelValue: r.value,
|
|
959
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
959
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => r.value = c),
|
|
960
960
|
label: "Fallback Card Types",
|
|
961
961
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
962
962
|
}, null, 8, ["modelValue"]),
|
|
963
|
-
y(
|
|
963
|
+
y(v, {
|
|
964
964
|
class: "ml-4",
|
|
965
965
|
icon: "add",
|
|
966
|
-
onClick:
|
|
966
|
+
onClick: p
|
|
967
967
|
})
|
|
968
968
|
]),
|
|
969
|
-
|
|
970
|
-
(b(!0),
|
|
971
|
-
key:
|
|
972
|
-
label:
|
|
969
|
+
x("div", wn, [
|
|
970
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
971
|
+
key: c,
|
|
972
|
+
label: c,
|
|
973
973
|
removable: !0,
|
|
974
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
974
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
975
975
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
976
976
|
]),
|
|
977
|
-
|
|
978
|
-
o.value > -1 ? (b(), S(
|
|
977
|
+
x("div", Tn, [
|
|
978
|
+
o.value > -1 ? (b(), S(v, {
|
|
979
979
|
key: 0,
|
|
980
980
|
class: "flex-1",
|
|
981
981
|
variant: "secondary",
|
|
982
982
|
label: "Delete",
|
|
983
|
-
onclick: () =>
|
|
984
|
-
}, null, 8, ["onclick"])) :
|
|
985
|
-
y(
|
|
983
|
+
onclick: () => f(o.value)
|
|
984
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
985
|
+
y(v, {
|
|
986
986
|
type: "submit",
|
|
987
987
|
class: "flex-1",
|
|
988
988
|
variant: "primary",
|
|
@@ -994,7 +994,7 @@ const en = {
|
|
|
994
994
|
}, 512);
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
|
-
}),
|
|
997
|
+
}), xn = { class: "flex items-end" }, Cn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Fn = { class: "flex mt-6 space-x-6" }, Sn = /* @__PURE__ */ K({
|
|
998
998
|
__name: "NetsGateway",
|
|
999
999
|
props: {
|
|
1000
1000
|
terminal: {
|
|
@@ -1007,48 +1007,48 @@ const en = {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
},
|
|
1009
1009
|
setup(e) {
|
|
1010
|
-
const a = e, t =
|
|
1010
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
1011
1011
|
ip: "",
|
|
1012
1012
|
receiptName: "",
|
|
1013
1013
|
cardTypes: []
|
|
1014
|
-
}),
|
|
1014
|
+
}), d = () => {
|
|
1015
1015
|
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1016
1016
|
}, s = () => {
|
|
1017
|
-
var
|
|
1017
|
+
var v;
|
|
1018
1018
|
if (!t.value.ecrIntegrations)
|
|
1019
|
-
return
|
|
1019
|
+
return d();
|
|
1020
1020
|
const m = t.value.ecrIntegrations, i = m.findIndex((g) => g && g.gateway && g.gateway === "Nets");
|
|
1021
1021
|
if (i === -1)
|
|
1022
|
-
return
|
|
1022
|
+
return d();
|
|
1023
1023
|
o.value = i;
|
|
1024
1024
|
const u = m.at(i);
|
|
1025
1025
|
u.gateway === "Nets" && u.config && (n.value = {
|
|
1026
1026
|
ip: u.config.ip ?? "",
|
|
1027
1027
|
receiptName: u.receiptName ?? "",
|
|
1028
|
-
cardTypes: ((
|
|
1028
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
1029
1029
|
});
|
|
1030
1030
|
};
|
|
1031
1031
|
le(t, s), re(s);
|
|
1032
|
-
async function
|
|
1032
|
+
async function f(m) {
|
|
1033
1033
|
var i;
|
|
1034
1034
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
1035
1035
|
}
|
|
1036
|
-
async function
|
|
1036
|
+
async function p() {
|
|
1037
1037
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1038
1038
|
}
|
|
1039
1039
|
return (m, i) => {
|
|
1040
|
-
const u =
|
|
1041
|
-
return b(), S(
|
|
1040
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
1041
|
+
return b(), S(D, {
|
|
1042
1042
|
ref: l.value,
|
|
1043
1043
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1044
1044
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
1045
|
-
var
|
|
1045
|
+
var c, _;
|
|
1046
1046
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1047
1047
|
gateway: "Nets",
|
|
1048
1048
|
config: { ip: n.value.ip },
|
|
1049
1049
|
receiptName: n.value.receiptName,
|
|
1050
1050
|
dialogConfig: {
|
|
1051
|
-
...(
|
|
1051
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
1052
1052
|
cardTypes: n.value.cardTypes
|
|
1053
1053
|
}
|
|
1054
1054
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1061,48 +1061,48 @@ const en = {
|
|
|
1061
1061
|
})), a.onUpdate(t.value);
|
|
1062
1062
|
})
|
|
1063
1063
|
}, {
|
|
1064
|
-
default:
|
|
1064
|
+
default: ne(() => [
|
|
1065
1065
|
y(u, {
|
|
1066
1066
|
modelValue: n.value.ip,
|
|
1067
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1067
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.ip = c),
|
|
1068
1068
|
label: "IP Address"
|
|
1069
1069
|
}, null, 8, ["modelValue"]),
|
|
1070
1070
|
y(u, {
|
|
1071
1071
|
modelValue: n.value.receiptName,
|
|
1072
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1072
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => n.value.receiptName = c),
|
|
1073
1073
|
label: "Receipt Payment Name",
|
|
1074
1074
|
"label-info": "Default receipt display will be 'TERMINAL_NETS'"
|
|
1075
1075
|
}, null, 8, ["modelValue"]),
|
|
1076
|
-
|
|
1076
|
+
x("div", xn, [
|
|
1077
1077
|
y(u, {
|
|
1078
1078
|
modelValue: r.value,
|
|
1079
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
1079
|
+
"onUpdate:modelValue": i[2] || (i[2] = (c) => r.value = c),
|
|
1080
1080
|
label: "Fallback Card Types",
|
|
1081
1081
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1082
1082
|
}, null, 8, ["modelValue"]),
|
|
1083
|
-
y(
|
|
1083
|
+
y(v, {
|
|
1084
1084
|
class: "ml-4",
|
|
1085
1085
|
icon: "add",
|
|
1086
|
-
onClick:
|
|
1086
|
+
onClick: p
|
|
1087
1087
|
})
|
|
1088
1088
|
]),
|
|
1089
|
-
|
|
1090
|
-
(b(!0),
|
|
1091
|
-
key:
|
|
1092
|
-
label:
|
|
1089
|
+
x("div", Cn, [
|
|
1090
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
1091
|
+
key: c,
|
|
1092
|
+
label: c,
|
|
1093
1093
|
removable: !0,
|
|
1094
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1094
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
1095
1095
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1096
1096
|
]),
|
|
1097
|
-
|
|
1098
|
-
o.value > -1 ? (b(), S(
|
|
1097
|
+
x("div", Fn, [
|
|
1098
|
+
o.value > -1 ? (b(), S(v, {
|
|
1099
1099
|
key: 0,
|
|
1100
1100
|
class: "flex-1",
|
|
1101
1101
|
variant: "secondary",
|
|
1102
1102
|
label: "Delete",
|
|
1103
|
-
onclick: () =>
|
|
1104
|
-
}, null, 8, ["onclick"])) :
|
|
1105
|
-
y(
|
|
1103
|
+
onclick: () => f(o.value)
|
|
1104
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
1105
|
+
y(v, {
|
|
1106
1106
|
type: "submit",
|
|
1107
1107
|
class: "flex-1",
|
|
1108
1108
|
variant: "primary",
|
|
@@ -1114,7 +1114,7 @@ const en = {
|
|
|
1114
1114
|
}, 512);
|
|
1115
1115
|
};
|
|
1116
1116
|
}
|
|
1117
|
-
}),
|
|
1117
|
+
}), Nn = { class: "flex items-end" }, kn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Dn = { class: "flex mt-6 space-x-6" }, En = /* @__PURE__ */ K({
|
|
1118
1118
|
__name: "KBankGateway",
|
|
1119
1119
|
props: {
|
|
1120
1120
|
terminal: {
|
|
@@ -1127,46 +1127,46 @@ const en = {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
},
|
|
1129
1129
|
setup(e) {
|
|
1130
|
-
const a = e, t =
|
|
1130
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
1131
1131
|
receiptName: "",
|
|
1132
1132
|
cardTypes: []
|
|
1133
|
-
}),
|
|
1133
|
+
}), d = () => {
|
|
1134
1134
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1135
1135
|
}, s = () => {
|
|
1136
|
-
var
|
|
1136
|
+
var v;
|
|
1137
1137
|
if (!t.value.ecrIntegrations)
|
|
1138
|
-
return
|
|
1138
|
+
return d();
|
|
1139
1139
|
const m = t.value.ecrIntegrations, i = m.findIndex((g) => g && g.gateway && g.gateway === "Kbank");
|
|
1140
1140
|
if (i === -1)
|
|
1141
|
-
return
|
|
1141
|
+
return d();
|
|
1142
1142
|
o.value = i;
|
|
1143
1143
|
const u = m.at(i);
|
|
1144
1144
|
u.gateway === "Kbank" && u.config && (n.value = {
|
|
1145
1145
|
receiptName: u.receiptName ?? "",
|
|
1146
|
-
cardTypes: ((
|
|
1146
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
1147
1147
|
});
|
|
1148
1148
|
};
|
|
1149
1149
|
le(t, s), re(s);
|
|
1150
|
-
async function
|
|
1150
|
+
async function f(m) {
|
|
1151
1151
|
var i;
|
|
1152
1152
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
1153
1153
|
}
|
|
1154
|
-
async function
|
|
1154
|
+
async function p() {
|
|
1155
1155
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1156
1156
|
}
|
|
1157
1157
|
return (m, i) => {
|
|
1158
|
-
const u =
|
|
1159
|
-
return b(), S(
|
|
1158
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
1159
|
+
return b(), S(D, {
|
|
1160
1160
|
ref: l.value,
|
|
1161
1161
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1162
1162
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
1163
|
-
var
|
|
1163
|
+
var c, _;
|
|
1164
1164
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1165
1165
|
gateway: "Kbank",
|
|
1166
1166
|
config: {},
|
|
1167
1167
|
receiptName: n.value.receiptName,
|
|
1168
1168
|
dialogConfig: {
|
|
1169
|
-
...(
|
|
1169
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
1170
1170
|
cardTypes: n.value.cardTypes
|
|
1171
1171
|
}
|
|
1172
1172
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1179,43 +1179,43 @@ const en = {
|
|
|
1179
1179
|
})), a.onUpdate(t.value);
|
|
1180
1180
|
})
|
|
1181
1181
|
}, {
|
|
1182
|
-
default:
|
|
1182
|
+
default: ne(() => [
|
|
1183
1183
|
y(u, {
|
|
1184
1184
|
modelValue: n.value.receiptName,
|
|
1185
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1185
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.receiptName = c),
|
|
1186
1186
|
label: "Receipt Payment Name",
|
|
1187
1187
|
"label-info": "Default receipt display will be 'TERMINAL_KBANK'"
|
|
1188
1188
|
}, null, 8, ["modelValue"]),
|
|
1189
|
-
|
|
1189
|
+
x("div", Nn, [
|
|
1190
1190
|
y(u, {
|
|
1191
1191
|
modelValue: r.value,
|
|
1192
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1192
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => r.value = c),
|
|
1193
1193
|
label: "Fallback Card Types",
|
|
1194
1194
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1195
1195
|
}, null, 8, ["modelValue"]),
|
|
1196
|
-
y(
|
|
1196
|
+
y(v, {
|
|
1197
1197
|
class: "ml-4",
|
|
1198
1198
|
icon: "add",
|
|
1199
|
-
onClick:
|
|
1199
|
+
onClick: p
|
|
1200
1200
|
})
|
|
1201
1201
|
]),
|
|
1202
|
-
|
|
1203
|
-
(b(!0),
|
|
1204
|
-
key:
|
|
1205
|
-
label:
|
|
1202
|
+
x("div", kn, [
|
|
1203
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
1204
|
+
key: c,
|
|
1205
|
+
label: c,
|
|
1206
1206
|
removable: !0,
|
|
1207
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1207
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
1208
1208
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1209
1209
|
]),
|
|
1210
|
-
|
|
1211
|
-
o.value > -1 ? (b(), S(
|
|
1210
|
+
x("div", Dn, [
|
|
1211
|
+
o.value > -1 ? (b(), S(v, {
|
|
1212
1212
|
key: 0,
|
|
1213
1213
|
class: "flex-1",
|
|
1214
1214
|
variant: "secondary",
|
|
1215
1215
|
label: "Delete",
|
|
1216
|
-
onclick: () =>
|
|
1217
|
-
}, null, 8, ["onclick"])) :
|
|
1218
|
-
y(
|
|
1216
|
+
onclick: () => f(o.value)
|
|
1217
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
1218
|
+
y(v, {
|
|
1219
1219
|
type: "submit",
|
|
1220
1220
|
class: "flex-1",
|
|
1221
1221
|
variant: "primary",
|
|
@@ -1227,7 +1227,7 @@ const en = {
|
|
|
1227
1227
|
}, 512);
|
|
1228
1228
|
};
|
|
1229
1229
|
}
|
|
1230
|
-
}),
|
|
1230
|
+
}), Vn = { class: "flex mt-6 space-x-6" }, On = /* @__PURE__ */ K({
|
|
1231
1231
|
__name: "Ghl2Gateway",
|
|
1232
1232
|
props: {
|
|
1233
1233
|
terminal: {
|
|
@@ -1240,35 +1240,35 @@ const en = {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
},
|
|
1242
1242
|
setup(e) {
|
|
1243
|
-
const a = e, t =
|
|
1243
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I({
|
|
1244
1244
|
ip: "",
|
|
1245
1245
|
receiptName: ""
|
|
1246
1246
|
}), n = () => {
|
|
1247
1247
|
r.value.ip = "", r.value.receiptName = "", o.value = -1;
|
|
1248
|
-
},
|
|
1248
|
+
}, d = () => {
|
|
1249
1249
|
if (!t.value.ecrIntegrations)
|
|
1250
1250
|
return n();
|
|
1251
|
-
const
|
|
1252
|
-
if (
|
|
1251
|
+
const f = t.value.ecrIntegrations, p = f.findIndex((i) => i && i.gateway && i.gateway === "Ghl2");
|
|
1252
|
+
if (p === -1)
|
|
1253
1253
|
return n();
|
|
1254
|
-
o.value =
|
|
1255
|
-
const m =
|
|
1254
|
+
o.value = p;
|
|
1255
|
+
const m = f.at(p);
|
|
1256
1256
|
m.gateway === "Ghl2" && m.config && (r.value = {
|
|
1257
1257
|
ip: m.config.ip ?? "",
|
|
1258
1258
|
receiptName: m.receiptName ?? ""
|
|
1259
1259
|
});
|
|
1260
1260
|
};
|
|
1261
|
-
le(t,
|
|
1262
|
-
async function s(
|
|
1263
|
-
var
|
|
1264
|
-
(
|
|
1261
|
+
le(t, d), re(d);
|
|
1262
|
+
async function s(f) {
|
|
1263
|
+
var p;
|
|
1264
|
+
(p = t.value.ecrIntegrations) == null || p.splice(f, 1), a.onUpdate(t.value);
|
|
1265
1265
|
}
|
|
1266
|
-
return (
|
|
1267
|
-
const m =
|
|
1266
|
+
return (f, p) => {
|
|
1267
|
+
const m = w("FmTextField"), i = w("FmButton"), u = w("FmForm");
|
|
1268
1268
|
return b(), S(u, {
|
|
1269
1269
|
ref: l.value,
|
|
1270
1270
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1271
|
-
onValidationSuccess:
|
|
1271
|
+
onValidationSuccess: p[2] || (p[2] = () => {
|
|
1272
1272
|
t.value.ecrIntegrations || (t.value.ecrIntegrations = []), o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1273
1273
|
gateway: "Ghl2",
|
|
1274
1274
|
config: { ip: r.value.ip },
|
|
@@ -1280,26 +1280,26 @@ const en = {
|
|
|
1280
1280
|
}), a.onUpdate(t.value);
|
|
1281
1281
|
})
|
|
1282
1282
|
}, {
|
|
1283
|
-
default:
|
|
1283
|
+
default: ne(() => [
|
|
1284
1284
|
y(m, {
|
|
1285
1285
|
modelValue: r.value.ip,
|
|
1286
|
-
"onUpdate:modelValue":
|
|
1286
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => r.value.ip = v),
|
|
1287
1287
|
label: "IP Address"
|
|
1288
1288
|
}, null, 8, ["modelValue"]),
|
|
1289
1289
|
y(m, {
|
|
1290
1290
|
modelValue: r.value.receiptName,
|
|
1291
|
-
"onUpdate:modelValue":
|
|
1291
|
+
"onUpdate:modelValue": p[1] || (p[1] = (v) => r.value.receiptName = v),
|
|
1292
1292
|
label: "Receipt Payment Name",
|
|
1293
1293
|
"label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
|
|
1294
1294
|
}, null, 8, ["modelValue"]),
|
|
1295
|
-
|
|
1295
|
+
x("div", Vn, [
|
|
1296
1296
|
o.value > -1 ? (b(), S(i, {
|
|
1297
1297
|
key: 0,
|
|
1298
1298
|
class: "flex-1",
|
|
1299
1299
|
variant: "secondary",
|
|
1300
1300
|
label: "Delete",
|
|
1301
1301
|
onclick: () => s(o.value)
|
|
1302
|
-
}, null, 8, ["onclick"])) :
|
|
1302
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
1303
1303
|
y(i, {
|
|
1304
1304
|
type: "submit",
|
|
1305
1305
|
class: "flex-1",
|
|
@@ -1312,7 +1312,7 @@ const en = {
|
|
|
1312
1312
|
}, 512);
|
|
1313
1313
|
};
|
|
1314
1314
|
}
|
|
1315
|
-
}),
|
|
1315
|
+
}), Un = { class: "flex items-end" }, Mn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Pn = { class: "flex mt-6 space-x-6" }, An = /* @__PURE__ */ K({
|
|
1316
1316
|
__name: "Ghl3Gateway",
|
|
1317
1317
|
props: {
|
|
1318
1318
|
terminal: {
|
|
@@ -1325,50 +1325,50 @@ const en = {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
},
|
|
1327
1327
|
setup(e) {
|
|
1328
|
-
const a = e, t =
|
|
1328
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
1329
1329
|
receiptName: "",
|
|
1330
1330
|
config: {},
|
|
1331
1331
|
cardTypes: []
|
|
1332
|
-
}),
|
|
1332
|
+
}), d = () => {
|
|
1333
1333
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1334
1334
|
}, s = () => {
|
|
1335
|
-
var
|
|
1335
|
+
var v;
|
|
1336
1336
|
if (!t.value.ecrIntegrations)
|
|
1337
|
-
return
|
|
1337
|
+
return d();
|
|
1338
1338
|
const m = t.value.ecrIntegrations, i = m.findIndex(
|
|
1339
1339
|
(g) => g && g.gateway && g.gateway === "Ghl3"
|
|
1340
1340
|
);
|
|
1341
1341
|
if (i === -1)
|
|
1342
|
-
return
|
|
1342
|
+
return d();
|
|
1343
1343
|
o.value = i;
|
|
1344
1344
|
const u = m.at(i);
|
|
1345
1345
|
u.gateway === "Ghl3" && u.config && (n.value = {
|
|
1346
1346
|
config: u.config,
|
|
1347
1347
|
receiptName: u.receiptName ?? "",
|
|
1348
|
-
cardTypes: ((
|
|
1348
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
1349
1349
|
});
|
|
1350
1350
|
};
|
|
1351
1351
|
le(t, s), re(s);
|
|
1352
|
-
async function
|
|
1352
|
+
async function f(m) {
|
|
1353
1353
|
var i;
|
|
1354
1354
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
1355
1355
|
}
|
|
1356
|
-
async function
|
|
1356
|
+
async function p() {
|
|
1357
1357
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1358
1358
|
}
|
|
1359
1359
|
return (m, i) => {
|
|
1360
|
-
const u =
|
|
1361
|
-
return b(), S(
|
|
1360
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
1361
|
+
return b(), S(D, {
|
|
1362
1362
|
ref: l.value,
|
|
1363
1363
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1364
1364
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
1365
|
-
var
|
|
1365
|
+
var c, _;
|
|
1366
1366
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1367
1367
|
gateway: "Ghl3",
|
|
1368
1368
|
config: n.value.config,
|
|
1369
1369
|
receiptName: n.value.receiptName,
|
|
1370
1370
|
dialogConfig: {
|
|
1371
|
-
...(
|
|
1371
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
1372
1372
|
cardTypes: n.value.cardTypes
|
|
1373
1373
|
}
|
|
1374
1374
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1381,43 +1381,43 @@ const en = {
|
|
|
1381
1381
|
})), a.onUpdate(t.value);
|
|
1382
1382
|
})
|
|
1383
1383
|
}, {
|
|
1384
|
-
default:
|
|
1384
|
+
default: ne(() => [
|
|
1385
1385
|
y(u, {
|
|
1386
1386
|
modelValue: n.value.receiptName,
|
|
1387
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1387
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.receiptName = c),
|
|
1388
1388
|
label: "Receipt Payment Name",
|
|
1389
1389
|
"label-info": "Default receipt display will be 'TERMINAL_GHL'"
|
|
1390
1390
|
}, null, 8, ["modelValue"]),
|
|
1391
|
-
|
|
1391
|
+
x("div", Un, [
|
|
1392
1392
|
y(u, {
|
|
1393
1393
|
modelValue: r.value,
|
|
1394
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1394
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => r.value = c),
|
|
1395
1395
|
label: "Fallback Card Types",
|
|
1396
1396
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1397
1397
|
}, null, 8, ["modelValue"]),
|
|
1398
|
-
y(
|
|
1398
|
+
y(v, {
|
|
1399
1399
|
class: "ml-4",
|
|
1400
1400
|
icon: "add",
|
|
1401
|
-
onClick:
|
|
1401
|
+
onClick: p
|
|
1402
1402
|
})
|
|
1403
1403
|
]),
|
|
1404
|
-
|
|
1405
|
-
(b(!0),
|
|
1406
|
-
key:
|
|
1407
|
-
label:
|
|
1404
|
+
x("div", Mn, [
|
|
1405
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
1406
|
+
key: c,
|
|
1407
|
+
label: c,
|
|
1408
1408
|
removable: !0,
|
|
1409
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1409
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
1410
1410
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1411
1411
|
]),
|
|
1412
|
-
|
|
1413
|
-
o.value > -1 ? (b(), S(
|
|
1412
|
+
x("div", Pn, [
|
|
1413
|
+
o.value > -1 ? (b(), S(v, {
|
|
1414
1414
|
key: 0,
|
|
1415
1415
|
class: "flex-1",
|
|
1416
1416
|
variant: "secondary",
|
|
1417
1417
|
label: "Delete",
|
|
1418
|
-
onclick: () =>
|
|
1419
|
-
}, null, 8, ["onclick"])) :
|
|
1420
|
-
y(
|
|
1418
|
+
onclick: () => f(o.value)
|
|
1419
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
1420
|
+
y(v, {
|
|
1421
1421
|
type: "submit",
|
|
1422
1422
|
class: "flex-1",
|
|
1423
1423
|
variant: "primary",
|
|
@@ -1429,7 +1429,7 @@ const en = {
|
|
|
1429
1429
|
}, 512);
|
|
1430
1430
|
};
|
|
1431
1431
|
}
|
|
1432
|
-
}),
|
|
1432
|
+
}), Rn = { class: "flex items-end" }, qn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Gn = { class: "flex mt-6 space-x-6" }, Bn = /* @__PURE__ */ K({
|
|
1433
1433
|
__name: "HlbbGateway",
|
|
1434
1434
|
props: {
|
|
1435
1435
|
terminal: {
|
|
@@ -1442,50 +1442,50 @@ const en = {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
},
|
|
1444
1444
|
setup(e) {
|
|
1445
|
-
const a = e, t =
|
|
1445
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
1446
1446
|
receiptName: "",
|
|
1447
1447
|
config: {},
|
|
1448
1448
|
cardTypes: []
|
|
1449
|
-
}),
|
|
1449
|
+
}), d = () => {
|
|
1450
1450
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1451
1451
|
}, s = () => {
|
|
1452
|
-
var
|
|
1452
|
+
var v;
|
|
1453
1453
|
if (!t.value.ecrIntegrations)
|
|
1454
|
-
return
|
|
1454
|
+
return d();
|
|
1455
1455
|
const m = t.value.ecrIntegrations, i = m.findIndex(
|
|
1456
1456
|
(g) => g && g.gateway && g.gateway === "Hlbb"
|
|
1457
1457
|
);
|
|
1458
1458
|
if (i === -1)
|
|
1459
|
-
return
|
|
1459
|
+
return d();
|
|
1460
1460
|
o.value = i;
|
|
1461
1461
|
const u = m.at(i);
|
|
1462
1462
|
u.gateway === "Hlbb" && u.config && (n.value = {
|
|
1463
1463
|
config: u.config,
|
|
1464
1464
|
receiptName: u.receiptName ?? "",
|
|
1465
|
-
cardTypes: ((
|
|
1465
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
1466
1466
|
});
|
|
1467
1467
|
};
|
|
1468
1468
|
le(t, s), re(s);
|
|
1469
|
-
async function
|
|
1469
|
+
async function f(m) {
|
|
1470
1470
|
var i;
|
|
1471
1471
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
1472
1472
|
}
|
|
1473
|
-
async function
|
|
1473
|
+
async function p() {
|
|
1474
1474
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1475
1475
|
}
|
|
1476
1476
|
return (m, i) => {
|
|
1477
|
-
const u =
|
|
1478
|
-
return b(), S(
|
|
1477
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
1478
|
+
return b(), S(D, {
|
|
1479
1479
|
ref: l.value,
|
|
1480
1480
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1481
1481
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
1482
|
-
var
|
|
1482
|
+
var c, _;
|
|
1483
1483
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1484
1484
|
gateway: "Hlbb",
|
|
1485
1485
|
config: n.value.config,
|
|
1486
1486
|
receiptName: n.value.receiptName,
|
|
1487
1487
|
dialogConfig: {
|
|
1488
|
-
...(
|
|
1488
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
1489
1489
|
cardTypes: n.value.cardTypes
|
|
1490
1490
|
}
|
|
1491
1491
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1498,43 +1498,43 @@ const en = {
|
|
|
1498
1498
|
})), a.onUpdate(t.value);
|
|
1499
1499
|
})
|
|
1500
1500
|
}, {
|
|
1501
|
-
default:
|
|
1501
|
+
default: ne(() => [
|
|
1502
1502
|
y(u, {
|
|
1503
1503
|
modelValue: n.value.receiptName,
|
|
1504
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1504
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.receiptName = c),
|
|
1505
1505
|
label: "Receipt Payment Name",
|
|
1506
1506
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
1507
1507
|
}, null, 8, ["modelValue"]),
|
|
1508
|
-
|
|
1508
|
+
x("div", Rn, [
|
|
1509
1509
|
y(u, {
|
|
1510
1510
|
modelValue: r.value,
|
|
1511
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1511
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => r.value = c),
|
|
1512
1512
|
label: "Fallback Card Types",
|
|
1513
1513
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1514
1514
|
}, null, 8, ["modelValue"]),
|
|
1515
|
-
y(
|
|
1515
|
+
y(v, {
|
|
1516
1516
|
class: "ml-4",
|
|
1517
1517
|
icon: "add",
|
|
1518
|
-
onClick:
|
|
1518
|
+
onClick: p
|
|
1519
1519
|
})
|
|
1520
1520
|
]),
|
|
1521
|
-
|
|
1522
|
-
(b(!0),
|
|
1523
|
-
key:
|
|
1524
|
-
label:
|
|
1521
|
+
x("div", qn, [
|
|
1522
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
1523
|
+
key: c,
|
|
1524
|
+
label: c,
|
|
1525
1525
|
removable: !0,
|
|
1526
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1526
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
1527
1527
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1528
1528
|
]),
|
|
1529
|
-
|
|
1530
|
-
o.value > -1 ? (b(), S(
|
|
1529
|
+
x("div", Gn, [
|
|
1530
|
+
o.value > -1 ? (b(), S(v, {
|
|
1531
1531
|
key: 0,
|
|
1532
1532
|
class: "flex-1",
|
|
1533
1533
|
variant: "secondary",
|
|
1534
1534
|
label: "Delete",
|
|
1535
|
-
onclick: () =>
|
|
1536
|
-
}, null, 8, ["onclick"])) :
|
|
1537
|
-
y(
|
|
1535
|
+
onclick: () => f(o.value)
|
|
1536
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
1537
|
+
y(v, {
|
|
1538
1538
|
type: "submit",
|
|
1539
1539
|
class: "flex-1",
|
|
1540
1540
|
variant: "primary",
|
|
@@ -1546,7 +1546,7 @@ const en = {
|
|
|
1546
1546
|
}, 512);
|
|
1547
1547
|
};
|
|
1548
1548
|
}
|
|
1549
|
-
}),
|
|
1549
|
+
}), Yn = { class: "flex items-end" }, Ln = { class: "flex flex-wrap gap-8 items-center mt-4" }, $n = { class: "flex mt-6 space-x-6" }, jn = /* @__PURE__ */ K({
|
|
1550
1550
|
__name: "GlobalPaymentsGateway",
|
|
1551
1551
|
props: {
|
|
1552
1552
|
terminal: {
|
|
@@ -1559,50 +1559,50 @@ const en = {
|
|
|
1559
1559
|
}
|
|
1560
1560
|
},
|
|
1561
1561
|
setup(e) {
|
|
1562
|
-
const a = e, t =
|
|
1562
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
1563
1563
|
ip: "",
|
|
1564
1564
|
receiptName: "",
|
|
1565
1565
|
cardTypes: []
|
|
1566
|
-
}),
|
|
1566
|
+
}), d = () => {
|
|
1567
1567
|
n.value.ip = "", n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1568
1568
|
}, s = () => {
|
|
1569
|
-
var
|
|
1569
|
+
var v;
|
|
1570
1570
|
if (!t.value.ecrIntegrations)
|
|
1571
|
-
return
|
|
1571
|
+
return d();
|
|
1572
1572
|
const m = t.value.ecrIntegrations, i = m.findIndex(
|
|
1573
1573
|
(g) => g && g.gateway && g.gateway === "GlobalPayments"
|
|
1574
1574
|
);
|
|
1575
1575
|
if (i === -1)
|
|
1576
|
-
return
|
|
1576
|
+
return d();
|
|
1577
1577
|
o.value = i;
|
|
1578
1578
|
const u = m.at(i);
|
|
1579
1579
|
u.gateway === "GlobalPayments" && u.config && (n.value = {
|
|
1580
1580
|
ip: u.config.ip ?? "",
|
|
1581
1581
|
receiptName: u.receiptName ?? "",
|
|
1582
|
-
cardTypes: ((
|
|
1582
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
1583
1583
|
});
|
|
1584
1584
|
};
|
|
1585
1585
|
le(t, s), re(s);
|
|
1586
|
-
async function
|
|
1586
|
+
async function f(m) {
|
|
1587
1587
|
var i;
|
|
1588
1588
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
1589
1589
|
}
|
|
1590
|
-
async function
|
|
1590
|
+
async function p() {
|
|
1591
1591
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1592
1592
|
}
|
|
1593
1593
|
return (m, i) => {
|
|
1594
|
-
const u =
|
|
1595
|
-
return b(), S(
|
|
1594
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
1595
|
+
return b(), S(D, {
|
|
1596
1596
|
ref: l.value,
|
|
1597
1597
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1598
1598
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
1599
|
-
var
|
|
1599
|
+
var c, _;
|
|
1600
1600
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1601
1601
|
gateway: "GlobalPayments",
|
|
1602
1602
|
config: { ip: n.value.ip },
|
|
1603
1603
|
receiptName: n.value.receiptName,
|
|
1604
1604
|
dialogConfig: {
|
|
1605
|
-
...(
|
|
1605
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
1606
1606
|
cardTypes: n.value.cardTypes
|
|
1607
1607
|
}
|
|
1608
1608
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1615,48 +1615,48 @@ const en = {
|
|
|
1615
1615
|
})), a.onUpdate(t.value);
|
|
1616
1616
|
})
|
|
1617
1617
|
}, {
|
|
1618
|
-
default:
|
|
1618
|
+
default: ne(() => [
|
|
1619
1619
|
y(u, {
|
|
1620
1620
|
modelValue: n.value.ip,
|
|
1621
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1621
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.ip = c),
|
|
1622
1622
|
label: "IP Address"
|
|
1623
1623
|
}, null, 8, ["modelValue"]),
|
|
1624
1624
|
y(u, {
|
|
1625
1625
|
modelValue: n.value.receiptName,
|
|
1626
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1626
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => n.value.receiptName = c),
|
|
1627
1627
|
label: "Receipt Payment Name",
|
|
1628
1628
|
"label-info": "Default receipt display will be 'TERMINAL_GP'"
|
|
1629
1629
|
}, null, 8, ["modelValue"]),
|
|
1630
|
-
|
|
1630
|
+
x("div", Yn, [
|
|
1631
1631
|
y(u, {
|
|
1632
1632
|
modelValue: r.value,
|
|
1633
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
1633
|
+
"onUpdate:modelValue": i[2] || (i[2] = (c) => r.value = c),
|
|
1634
1634
|
label: "Fallback Card Types",
|
|
1635
1635
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1636
1636
|
}, null, 8, ["modelValue"]),
|
|
1637
|
-
y(
|
|
1637
|
+
y(v, {
|
|
1638
1638
|
class: "ml-4",
|
|
1639
1639
|
icon: "add",
|
|
1640
|
-
onClick:
|
|
1640
|
+
onClick: p
|
|
1641
1641
|
})
|
|
1642
1642
|
]),
|
|
1643
|
-
|
|
1644
|
-
(b(!0),
|
|
1645
|
-
key:
|
|
1646
|
-
label:
|
|
1643
|
+
x("div", Ln, [
|
|
1644
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
1645
|
+
key: c,
|
|
1646
|
+
label: c,
|
|
1647
1647
|
removable: !0,
|
|
1648
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1648
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
1649
1649
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1650
1650
|
]),
|
|
1651
|
-
|
|
1652
|
-
o.value > -1 ? (b(), S(
|
|
1651
|
+
x("div", $n, [
|
|
1652
|
+
o.value > -1 ? (b(), S(v, {
|
|
1653
1653
|
key: 0,
|
|
1654
1654
|
class: "flex-1",
|
|
1655
1655
|
variant: "secondary",
|
|
1656
1656
|
label: "Delete",
|
|
1657
|
-
onclick: () =>
|
|
1658
|
-
}, null, 8, ["onclick"])) :
|
|
1659
|
-
y(
|
|
1657
|
+
onclick: () => f(o.value)
|
|
1658
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
1659
|
+
y(v, {
|
|
1660
1660
|
type: "submit",
|
|
1661
1661
|
class: "flex-1",
|
|
1662
1662
|
variant: "primary",
|
|
@@ -1668,7 +1668,7 @@ const en = {
|
|
|
1668
1668
|
}, 512);
|
|
1669
1669
|
};
|
|
1670
1670
|
}
|
|
1671
|
-
}),
|
|
1671
|
+
}), Hn = { class: "flex items-end" }, Xn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Kn = { class: "flex mt-6 space-x-6" }, zn = /* @__PURE__ */ K({
|
|
1672
1672
|
__name: "OmaGateway",
|
|
1673
1673
|
props: {
|
|
1674
1674
|
terminal: {
|
|
@@ -1681,48 +1681,48 @@ const en = {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
},
|
|
1683
1683
|
setup(e) {
|
|
1684
|
-
const a = e, t =
|
|
1684
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
1685
1685
|
receiptName: "",
|
|
1686
1686
|
cardTypes: []
|
|
1687
|
-
}),
|
|
1687
|
+
}), d = () => {
|
|
1688
1688
|
n.value.receiptName = "", n.value.cardTypes = [], o.value = -1;
|
|
1689
1689
|
}, s = () => {
|
|
1690
|
-
var
|
|
1690
|
+
var v;
|
|
1691
1691
|
if (!t.value.ecrIntegrations)
|
|
1692
|
-
return
|
|
1692
|
+
return d();
|
|
1693
1693
|
const m = t.value.ecrIntegrations, i = m.findIndex(
|
|
1694
1694
|
(g) => g && g.gateway && g.gateway === "Oma"
|
|
1695
1695
|
);
|
|
1696
1696
|
if (i === -1)
|
|
1697
|
-
return
|
|
1697
|
+
return d();
|
|
1698
1698
|
o.value = i;
|
|
1699
1699
|
const u = m.at(i);
|
|
1700
1700
|
u.gateway === "Oma" && u.config && (n.value = {
|
|
1701
1701
|
receiptName: u.receiptName ?? "",
|
|
1702
|
-
cardTypes: ((
|
|
1702
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
1703
1703
|
});
|
|
1704
1704
|
};
|
|
1705
1705
|
le(t, s), re(s);
|
|
1706
|
-
async function
|
|
1706
|
+
async function f(m) {
|
|
1707
1707
|
var i;
|
|
1708
1708
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
1709
1709
|
}
|
|
1710
|
-
async function
|
|
1710
|
+
async function p() {
|
|
1711
1711
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1712
1712
|
}
|
|
1713
1713
|
return (m, i) => {
|
|
1714
|
-
const u =
|
|
1715
|
-
return b(), S(
|
|
1714
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
1715
|
+
return b(), S(D, {
|
|
1716
1716
|
ref: l.value,
|
|
1717
1717
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1718
1718
|
onValidationSuccess: i[2] || (i[2] = () => {
|
|
1719
|
-
var
|
|
1719
|
+
var c, _;
|
|
1720
1720
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1721
1721
|
gateway: "Oma",
|
|
1722
1722
|
config: {},
|
|
1723
1723
|
receiptName: n.value.receiptName,
|
|
1724
1724
|
dialogConfig: {
|
|
1725
|
-
...(
|
|
1725
|
+
...(_ = (c = t.value.ecrIntegrations) == null ? void 0 : c[o.value]) == null ? void 0 : _.dialogConfig,
|
|
1726
1726
|
cardTypes: n.value.cardTypes
|
|
1727
1727
|
}
|
|
1728
1728
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
@@ -1735,43 +1735,43 @@ const en = {
|
|
|
1735
1735
|
})), a.onUpdate(t.value);
|
|
1736
1736
|
})
|
|
1737
1737
|
}, {
|
|
1738
|
-
default:
|
|
1738
|
+
default: ne(() => [
|
|
1739
1739
|
y(u, {
|
|
1740
1740
|
modelValue: n.value.receiptName,
|
|
1741
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1741
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.receiptName = c),
|
|
1742
1742
|
label: "Receipt Payment Name",
|
|
1743
1743
|
"label-info": "Default receipt display will be 'TERMINAL_OMA'"
|
|
1744
1744
|
}, null, 8, ["modelValue"]),
|
|
1745
|
-
|
|
1745
|
+
x("div", Hn, [
|
|
1746
1746
|
y(u, {
|
|
1747
1747
|
modelValue: r.value,
|
|
1748
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1748
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => r.value = c),
|
|
1749
1749
|
label: "Fallback Card Types",
|
|
1750
1750
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1751
1751
|
}, null, 8, ["modelValue"]),
|
|
1752
|
-
y(
|
|
1752
|
+
y(v, {
|
|
1753
1753
|
class: "ml-4",
|
|
1754
1754
|
icon: "add",
|
|
1755
|
-
onClick:
|
|
1755
|
+
onClick: p
|
|
1756
1756
|
})
|
|
1757
1757
|
]),
|
|
1758
|
-
|
|
1759
|
-
(b(!0),
|
|
1760
|
-
key:
|
|
1761
|
-
label:
|
|
1758
|
+
x("div", Xn, [
|
|
1759
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
1760
|
+
key: c,
|
|
1761
|
+
label: c,
|
|
1762
1762
|
removable: !0,
|
|
1763
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1763
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
1764
1764
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1765
1765
|
]),
|
|
1766
|
-
|
|
1767
|
-
o.value > -1 ? (b(), S(
|
|
1766
|
+
x("div", Kn, [
|
|
1767
|
+
o.value > -1 ? (b(), S(v, {
|
|
1768
1768
|
key: 0,
|
|
1769
1769
|
class: "flex-1",
|
|
1770
1770
|
variant: "secondary",
|
|
1771
1771
|
label: "Delete",
|
|
1772
|
-
onclick: () =>
|
|
1773
|
-
}, null, 8, ["onclick"])) :
|
|
1774
|
-
y(
|
|
1772
|
+
onclick: () => f(o.value)
|
|
1773
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
1774
|
+
y(v, {
|
|
1775
1775
|
type: "submit",
|
|
1776
1776
|
class: "flex-1",
|
|
1777
1777
|
variant: "primary",
|
|
@@ -1783,7 +1783,7 @@ const en = {
|
|
|
1783
1783
|
}, 512);
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
|
-
}),
|
|
1786
|
+
}), Wn = { class: "flex items-end" }, Qn = { class: "flex flex-wrap gap-8 items-center mt-4" }, Jn = { class: "flex mt-6 space-x-6" }, Zn = /* @__PURE__ */ K({
|
|
1787
1787
|
__name: "RevenueGateway",
|
|
1788
1788
|
props: {
|
|
1789
1789
|
terminal: {
|
|
@@ -1796,59 +1796,59 @@ const en = {
|
|
|
1796
1796
|
}
|
|
1797
1797
|
},
|
|
1798
1798
|
setup(e) {
|
|
1799
|
-
const a = e, t =
|
|
1799
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I(), n = I({
|
|
1800
1800
|
receiptName: "",
|
|
1801
1801
|
ip: "",
|
|
1802
1802
|
cardTypes: []
|
|
1803
|
-
}),
|
|
1803
|
+
}), d = () => {
|
|
1804
1804
|
n.value.receiptName = "", n.value.ip = "", n.value.cardTypes = [], o.value = -1;
|
|
1805
1805
|
}, s = () => {
|
|
1806
|
-
var
|
|
1806
|
+
var v;
|
|
1807
1807
|
if (!t.value.ecrIntegrations)
|
|
1808
|
-
return
|
|
1808
|
+
return d();
|
|
1809
1809
|
const m = t.value.ecrIntegrations, i = m.findIndex(
|
|
1810
1810
|
(g) => g && g.gateway && g.gateway === "Revenue"
|
|
1811
1811
|
);
|
|
1812
1812
|
if (i === -1)
|
|
1813
|
-
return
|
|
1813
|
+
return d();
|
|
1814
1814
|
o.value = i;
|
|
1815
1815
|
const u = m.at(i);
|
|
1816
1816
|
u.gateway === "Revenue" && u.config && (n.value = {
|
|
1817
1817
|
receiptName: u.receiptName ?? "",
|
|
1818
1818
|
ip: u.config.ip ?? "",
|
|
1819
|
-
cardTypes: ((
|
|
1819
|
+
cardTypes: ((v = u.dialogConfig) == null ? void 0 : v.cardTypes) ?? []
|
|
1820
1820
|
});
|
|
1821
1821
|
};
|
|
1822
1822
|
le(t, s), re(s);
|
|
1823
|
-
async function
|
|
1823
|
+
async function f(m) {
|
|
1824
1824
|
var i;
|
|
1825
1825
|
(i = t.value.ecrIntegrations) == null || i.splice(m, 1), a.onUpdate(t.value);
|
|
1826
1826
|
}
|
|
1827
|
-
async function
|
|
1827
|
+
async function p() {
|
|
1828
1828
|
n.value.cardTypes.push(r.value), r.value = "";
|
|
1829
1829
|
}
|
|
1830
1830
|
return (m, i) => {
|
|
1831
|
-
const u =
|
|
1832
|
-
return b(), S(
|
|
1831
|
+
const u = w("FmTextField"), v = w("FmButton"), g = w("FmChip"), D = w("FmForm");
|
|
1832
|
+
return b(), S(D, {
|
|
1833
1833
|
ref: l.value,
|
|
1834
1834
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1835
1835
|
onValidationSuccess: i[3] || (i[3] = () => {
|
|
1836
|
-
var
|
|
1837
|
-
const
|
|
1836
|
+
var _, O;
|
|
1837
|
+
const c = {
|
|
1838
1838
|
type: "tcp",
|
|
1839
1839
|
ip: n.value.ip
|
|
1840
1840
|
};
|
|
1841
1841
|
o.value > -1 ? t.value.ecrIntegrations[o.value] = {
|
|
1842
1842
|
gateway: "Revenue",
|
|
1843
|
-
config:
|
|
1843
|
+
config: c,
|
|
1844
1844
|
receiptName: n.value.receiptName,
|
|
1845
1845
|
dialogConfig: {
|
|
1846
|
-
...(
|
|
1846
|
+
...(O = (_ = t.value.ecrIntegrations) == null ? void 0 : _[o.value]) == null ? void 0 : O.dialogConfig,
|
|
1847
1847
|
cardTypes: n.value.cardTypes
|
|
1848
1848
|
}
|
|
1849
1849
|
} : (t.value.ecrIntegrations || (t.value.ecrIntegrations = []), t.value.ecrIntegrations.push({
|
|
1850
1850
|
gateway: "Revenue",
|
|
1851
|
-
config:
|
|
1851
|
+
config: c,
|
|
1852
1852
|
receiptName: n.value.receiptName,
|
|
1853
1853
|
dialogConfig: {
|
|
1854
1854
|
cardTypes: n.value.cardTypes
|
|
@@ -1856,50 +1856,50 @@ const en = {
|
|
|
1856
1856
|
})), a.onUpdate(t.value);
|
|
1857
1857
|
})
|
|
1858
1858
|
}, {
|
|
1859
|
-
default:
|
|
1859
|
+
default: ne(() => [
|
|
1860
1860
|
y(u, {
|
|
1861
1861
|
modelValue: n.value.ip,
|
|
1862
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1862
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => n.value.ip = c),
|
|
1863
1863
|
label: "Terminal IP Address",
|
|
1864
1864
|
"label-info": "Terminal WiFi IP with optional port, e.g. 192.168.1.50:8080 (defaults to port 8080)",
|
|
1865
|
-
rules:
|
|
1865
|
+
rules: M(ia)(M(sa).string().min(1))
|
|
1866
1866
|
}, null, 8, ["modelValue", "rules"]),
|
|
1867
1867
|
y(u, {
|
|
1868
1868
|
modelValue: n.value.receiptName,
|
|
1869
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1869
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => n.value.receiptName = c),
|
|
1870
1870
|
label: "Receipt Payment Name",
|
|
1871
1871
|
"label-info": "Default receipt display will be 'TERMINAL_REVENUE'"
|
|
1872
1872
|
}, null, 8, ["modelValue"]),
|
|
1873
|
-
|
|
1873
|
+
x("div", Wn, [
|
|
1874
1874
|
y(u, {
|
|
1875
1875
|
modelValue: r.value,
|
|
1876
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
1876
|
+
"onUpdate:modelValue": i[2] || (i[2] = (c) => r.value = c),
|
|
1877
1877
|
label: "Fallback Card Types",
|
|
1878
1878
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1879
1879
|
}, null, 8, ["modelValue"]),
|
|
1880
|
-
y(
|
|
1880
|
+
y(v, {
|
|
1881
1881
|
class: "ml-4",
|
|
1882
1882
|
icon: "add",
|
|
1883
|
-
onClick:
|
|
1883
|
+
onClick: p
|
|
1884
1884
|
})
|
|
1885
1885
|
]),
|
|
1886
|
-
|
|
1887
|
-
(b(!0),
|
|
1888
|
-
key:
|
|
1889
|
-
label:
|
|
1886
|
+
x("div", Qn, [
|
|
1887
|
+
(b(!0), R(ae, null, ye(n.value.cardTypes, (c) => (b(), S(g, {
|
|
1888
|
+
key: c,
|
|
1889
|
+
label: c,
|
|
1890
1890
|
removable: !0,
|
|
1891
|
-
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(
|
|
1891
|
+
onChipClosed: () => n.value.cardTypes.splice(n.value.cardTypes.indexOf(c), 1)
|
|
1892
1892
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1893
1893
|
]),
|
|
1894
|
-
|
|
1895
|
-
o.value > -1 ? (b(), S(
|
|
1894
|
+
x("div", Jn, [
|
|
1895
|
+
o.value > -1 ? (b(), S(v, {
|
|
1896
1896
|
key: 0,
|
|
1897
1897
|
class: "flex-1",
|
|
1898
1898
|
variant: "secondary",
|
|
1899
1899
|
label: "Delete",
|
|
1900
|
-
onclick: () =>
|
|
1901
|
-
}, null, 8, ["onclick"])) :
|
|
1902
|
-
y(
|
|
1900
|
+
onclick: () => f(o.value)
|
|
1901
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
1902
|
+
y(v, {
|
|
1903
1903
|
type: "submit",
|
|
1904
1904
|
class: "flex-1",
|
|
1905
1905
|
variant: "primary",
|
|
@@ -1911,7 +1911,7 @@ const en = {
|
|
|
1911
1911
|
}, 512);
|
|
1912
1912
|
};
|
|
1913
1913
|
}
|
|
1914
|
-
}),
|
|
1914
|
+
}), el = { class: "flex items-center" }, tl = { class: "w-[260px] self-start" }, al = { class: "flex-1" }, nl = /* @__PURE__ */ K({
|
|
1915
1915
|
__name: "EcrGateway",
|
|
1916
1916
|
props: {
|
|
1917
1917
|
terminal: {
|
|
@@ -1924,114 +1924,114 @@ const en = {
|
|
|
1924
1924
|
}
|
|
1925
1925
|
},
|
|
1926
1926
|
setup(e) {
|
|
1927
|
-
var
|
|
1927
|
+
var d;
|
|
1928
1928
|
const a = e, t = [
|
|
1929
1929
|
{
|
|
1930
1930
|
label: "FeedMe Terminal",
|
|
1931
1931
|
value: "terminal",
|
|
1932
|
-
render:
|
|
1932
|
+
render: un
|
|
1933
1933
|
},
|
|
1934
1934
|
{
|
|
1935
1935
|
label: "GHL Terminal",
|
|
1936
1936
|
value: "ghl",
|
|
1937
|
-
render:
|
|
1938
|
-
region: [
|
|
1937
|
+
render: dn,
|
|
1938
|
+
region: [J.F_COUNTRY.enum.MY]
|
|
1939
1939
|
},
|
|
1940
1940
|
{
|
|
1941
1941
|
label: "GHL2 Terminal",
|
|
1942
1942
|
value: "ghl2",
|
|
1943
|
-
render:
|
|
1944
|
-
region: [
|
|
1943
|
+
render: On,
|
|
1944
|
+
region: [J.F_COUNTRY.enum.MY]
|
|
1945
1945
|
},
|
|
1946
1946
|
{
|
|
1947
1947
|
label: "ITB Maybank Terminal",
|
|
1948
1948
|
value: "mb-itb",
|
|
1949
|
-
render:
|
|
1950
|
-
region: [
|
|
1949
|
+
render: vn,
|
|
1950
|
+
region: [J.F_COUNTRY.enum.MY]
|
|
1951
1951
|
},
|
|
1952
1952
|
{
|
|
1953
1953
|
label: "PMA Maybank Terminal",
|
|
1954
1954
|
value: "mb-pma",
|
|
1955
|
-
render:
|
|
1956
|
-
region: [
|
|
1955
|
+
render: bn,
|
|
1956
|
+
region: [J.F_COUNTRY.enum.MY]
|
|
1957
1957
|
},
|
|
1958
1958
|
{
|
|
1959
1959
|
label: "Paysys Maybank Terminal",
|
|
1960
1960
|
value: "mb-paysys",
|
|
1961
|
-
render:
|
|
1962
|
-
region: [
|
|
1961
|
+
render: In,
|
|
1962
|
+
region: [J.F_COUNTRY.enum.MY]
|
|
1963
1963
|
},
|
|
1964
1964
|
{
|
|
1965
1965
|
label: "Nets Terminal",
|
|
1966
1966
|
value: "nets",
|
|
1967
|
-
render:
|
|
1968
|
-
region: [
|
|
1967
|
+
render: Sn,
|
|
1968
|
+
region: [J.F_COUNTRY.enum.SG]
|
|
1969
1969
|
},
|
|
1970
1970
|
{
|
|
1971
1971
|
label: "KBank Terminal",
|
|
1972
1972
|
value: "kbank",
|
|
1973
|
-
render:
|
|
1974
|
-
region: [
|
|
1973
|
+
render: En,
|
|
1974
|
+
region: [J.F_COUNTRY.enum.TH]
|
|
1975
1975
|
},
|
|
1976
1976
|
{
|
|
1977
1977
|
label: "GHL Terminal",
|
|
1978
1978
|
value: "ghl3",
|
|
1979
|
-
render:
|
|
1980
|
-
region: [
|
|
1979
|
+
render: An,
|
|
1980
|
+
region: [J.F_COUNTRY.enum.TH]
|
|
1981
1981
|
},
|
|
1982
1982
|
{
|
|
1983
1983
|
label: "Paysys HLBB Terminal",
|
|
1984
1984
|
value: "hlbb",
|
|
1985
|
-
render:
|
|
1986
|
-
region: [
|
|
1985
|
+
render: Bn,
|
|
1986
|
+
region: [J.F_COUNTRY.enum.MY]
|
|
1987
1987
|
},
|
|
1988
1988
|
{
|
|
1989
1989
|
label: "GPAP Terminal",
|
|
1990
1990
|
value: "globalpayments",
|
|
1991
|
-
render:
|
|
1992
|
-
region: [
|
|
1991
|
+
render: jn,
|
|
1992
|
+
region: [J.F_COUNTRY.enum.SG]
|
|
1993
1993
|
},
|
|
1994
1994
|
{
|
|
1995
1995
|
label: "OMA Terminal",
|
|
1996
1996
|
value: "oma",
|
|
1997
|
-
render:
|
|
1998
|
-
region: [
|
|
1997
|
+
render: zn,
|
|
1998
|
+
region: [J.F_COUNTRY.enum.PK]
|
|
1999
1999
|
},
|
|
2000
2000
|
{
|
|
2001
2001
|
label: "Revenue PBB Terminal",
|
|
2002
2002
|
value: "revenue",
|
|
2003
|
-
render:
|
|
2004
|
-
region: [
|
|
2003
|
+
render: Zn,
|
|
2004
|
+
region: [J.F_COUNTRY.enum.MY]
|
|
2005
2005
|
}
|
|
2006
|
-
], l =
|
|
2007
|
-
(s) => !s.region || s.region.includes(o.value ??
|
|
2006
|
+
], l = H(() => t.find((s) => s.value === n.value)), o = _t().currentCountry, r = H(() => t.filter(
|
|
2007
|
+
(s) => !s.region || s.region.includes(o.value ?? J.F_COUNTRY.enum.MY)
|
|
2008
2008
|
)), { gatewayTab: n } = bt({
|
|
2009
|
-
gatewayTab: (
|
|
2009
|
+
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
|
2010
2010
|
});
|
|
2011
|
-
return (s,
|
|
2011
|
+
return (s, f) => {
|
|
2012
2012
|
var m;
|
|
2013
|
-
const
|
|
2014
|
-
return b(),
|
|
2015
|
-
|
|
2016
|
-
y(
|
|
2017
|
-
"model-value":
|
|
2018
|
-
"onUpdate:modelValue":
|
|
2013
|
+
const p = w("FmTabs");
|
|
2014
|
+
return b(), R("div", el, [
|
|
2015
|
+
x("div", tl, [
|
|
2016
|
+
y(p, {
|
|
2017
|
+
"model-value": M(n),
|
|
2018
|
+
"onUpdate:modelValue": f[0] || (f[0] = (i) => Oe(n) ? n.value = i : null),
|
|
2019
2019
|
class: "mb-6",
|
|
2020
2020
|
vertical: !0,
|
|
2021
2021
|
items: r.value,
|
|
2022
2022
|
"show-more-at": Number.POSITIVE_INFINITY
|
|
2023
2023
|
}, null, 8, ["model-value", "items", "show-more-at"])
|
|
2024
2024
|
]),
|
|
2025
|
-
|
|
2026
|
-
|
|
2025
|
+
x("div", al, [
|
|
2026
|
+
M(n) ? (b(), S(vt((m = l.value) == null ? void 0 : m.render), gt(yt({ key: 0 }, {
|
|
2027
2027
|
terminal: a.terminal,
|
|
2028
2028
|
onUpdate: a.onUpdate
|
|
2029
|
-
})), null, 16)) :
|
|
2029
|
+
})), null, 16)) : B("", !0)
|
|
2030
2030
|
])
|
|
2031
2031
|
]);
|
|
2032
2032
|
};
|
|
2033
2033
|
}
|
|
2034
|
-
}),
|
|
2034
|
+
}), ll = { class: "flex mt-6 space-x-6" }, ol = /* @__PURE__ */ K({
|
|
2035
2035
|
__name: "PromptPayGateway",
|
|
2036
2036
|
props: {
|
|
2037
2037
|
terminal: {
|
|
@@ -2044,59 +2044,59 @@ const en = {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
},
|
|
2046
2046
|
setup(e) {
|
|
2047
|
-
const a = e, t =
|
|
2047
|
+
const a = e, t = de(() => a.terminal), l = I(), o = I(-1), r = I({
|
|
2048
2048
|
account: "",
|
|
2049
2049
|
receiptName: ""
|
|
2050
2050
|
}), n = () => {
|
|
2051
2051
|
r.value.account = "", r.value.receiptName = "", o.value = -1;
|
|
2052
|
-
},
|
|
2052
|
+
}, d = () => {
|
|
2053
2053
|
if (!t.value.qrIntegrations)
|
|
2054
2054
|
return n();
|
|
2055
|
-
const
|
|
2056
|
-
if (
|
|
2055
|
+
const f = t.value.qrIntegrations, p = f.findIndex((i) => i && i.gateway && i.gateway === "PROMPTPAY");
|
|
2056
|
+
if (p === -1)
|
|
2057
2057
|
return n();
|
|
2058
|
-
o.value =
|
|
2059
|
-
const m =
|
|
2058
|
+
o.value = p;
|
|
2059
|
+
const m = f.at(p);
|
|
2060
2060
|
m.gateway === "PROMPTPAY" && m.config && (r.value = {
|
|
2061
2061
|
account: m.config.account ?? "",
|
|
2062
2062
|
receiptName: m.receiptName ?? ""
|
|
2063
2063
|
});
|
|
2064
2064
|
};
|
|
2065
|
-
le(t,
|
|
2066
|
-
async function s(
|
|
2067
|
-
var
|
|
2068
|
-
(
|
|
2065
|
+
le(t, d), re(d);
|
|
2066
|
+
async function s(f) {
|
|
2067
|
+
var p;
|
|
2068
|
+
(p = t.value.qrIntegrations) == null || p.splice(f, 1), a.onUpdate(t.value);
|
|
2069
2069
|
}
|
|
2070
|
-
return (
|
|
2071
|
-
const m =
|
|
2070
|
+
return (f, p) => {
|
|
2071
|
+
const m = w("FmTextField"), i = w("FmButton"), u = w("FmForm");
|
|
2072
2072
|
return b(), S(u, {
|
|
2073
2073
|
ref: l.value,
|
|
2074
2074
|
class: "flex flex-col gap-16 w-[500px]",
|
|
2075
|
-
onValidationSuccess:
|
|
2075
|
+
onValidationSuccess: p[2] || (p[2] = () => {
|
|
2076
2076
|
o.value > -1 ? t.value.qrIntegrations[o.value] = { gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName } : (t.value.qrIntegrations || (t.value.qrIntegrations = []), t.value.qrIntegrations.push({ gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName })), a.onUpdate(t.value);
|
|
2077
2077
|
})
|
|
2078
2078
|
}, {
|
|
2079
|
-
default:
|
|
2079
|
+
default: ne(() => [
|
|
2080
2080
|
y(m, {
|
|
2081
2081
|
modelValue: r.value.account,
|
|
2082
|
-
"onUpdate:modelValue":
|
|
2082
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => r.value.account = v),
|
|
2083
2083
|
label: "Thai Phone Number / Thai Naitonal ID",
|
|
2084
2084
|
"label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
|
|
2085
2085
|
}, null, 8, ["modelValue"]),
|
|
2086
2086
|
y(m, {
|
|
2087
2087
|
modelValue: r.value.receiptName,
|
|
2088
|
-
"onUpdate:modelValue":
|
|
2088
|
+
"onUpdate:modelValue": p[1] || (p[1] = (v) => r.value.receiptName = v),
|
|
2089
2089
|
label: "Receipt Payment Name",
|
|
2090
2090
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
2091
2091
|
}, null, 8, ["modelValue"]),
|
|
2092
|
-
|
|
2092
|
+
x("div", ll, [
|
|
2093
2093
|
o.value > -1 ? (b(), S(i, {
|
|
2094
2094
|
key: 0,
|
|
2095
2095
|
class: "flex-1",
|
|
2096
2096
|
variant: "secondary",
|
|
2097
2097
|
label: "Delete",
|
|
2098
2098
|
onclick: () => s(o.value)
|
|
2099
|
-
}, null, 8, ["onclick"])) :
|
|
2099
|
+
}, null, 8, ["onclick"])) : B("", !0),
|
|
2100
2100
|
y(i, {
|
|
2101
2101
|
type: "submit",
|
|
2102
2102
|
class: "flex-1",
|
|
@@ -2109,7 +2109,7 @@ const en = {
|
|
|
2109
2109
|
}, 512);
|
|
2110
2110
|
};
|
|
2111
2111
|
}
|
|
2112
|
-
}),
|
|
2112
|
+
}), rl = { class: "flex items-center" }, il = { class: "w-[260px] self-start" }, sl = { class: "flex-1" }, ul = /* @__PURE__ */ K({
|
|
2113
2113
|
__name: "QrGateway",
|
|
2114
2114
|
props: {
|
|
2115
2115
|
terminal: {
|
|
@@ -2122,41 +2122,41 @@ const en = {
|
|
|
2122
2122
|
}
|
|
2123
2123
|
},
|
|
2124
2124
|
setup(e) {
|
|
2125
|
-
var
|
|
2125
|
+
var d;
|
|
2126
2126
|
const a = e, t = [
|
|
2127
2127
|
{
|
|
2128
2128
|
label: "PromptPay",
|
|
2129
2129
|
value: "promptpay",
|
|
2130
|
-
render:
|
|
2131
|
-
region: [
|
|
2130
|
+
render: ol,
|
|
2131
|
+
region: [J.F_COUNTRY.enum.TH]
|
|
2132
2132
|
}
|
|
2133
|
-
], l =
|
|
2134
|
-
gatewayTab: (
|
|
2133
|
+
], l = H(() => t.find((s) => s.value === n.value)), o = _t().currentCountry, r = H(() => t.filter((s) => !s.region || s.region.includes(o.value ?? J.F_COUNTRY.enum.MY))), { gatewayTab: n } = bt({
|
|
2134
|
+
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
|
2135
2135
|
});
|
|
2136
|
-
return (s,
|
|
2136
|
+
return (s, f) => {
|
|
2137
2137
|
var m;
|
|
2138
|
-
const
|
|
2139
|
-
return b(),
|
|
2140
|
-
|
|
2141
|
-
y(
|
|
2142
|
-
"model-value":
|
|
2143
|
-
"onUpdate:modelValue":
|
|
2138
|
+
const p = w("FmTabs");
|
|
2139
|
+
return b(), R("div", rl, [
|
|
2140
|
+
x("div", il, [
|
|
2141
|
+
y(p, {
|
|
2142
|
+
"model-value": M(n),
|
|
2143
|
+
"onUpdate:modelValue": f[0] || (f[0] = (i) => Oe(n) ? n.value = i : null),
|
|
2144
2144
|
class: "mb-6",
|
|
2145
2145
|
vertical: !0,
|
|
2146
2146
|
items: r.value
|
|
2147
2147
|
}, null, 8, ["model-value", "items"])
|
|
2148
2148
|
]),
|
|
2149
|
-
|
|
2150
|
-
|
|
2149
|
+
x("div", sl, [
|
|
2150
|
+
M(n) ? (b(), S(vt((m = l.value) == null ? void 0 : m.render), gt(yt({ key: 0 }, {
|
|
2151
2151
|
terminal: a.terminal,
|
|
2152
2152
|
onUpdate: a.onUpdate
|
|
2153
|
-
})), null, 16)) :
|
|
2153
|
+
})), null, 16)) : B("", !0)
|
|
2154
2154
|
])
|
|
2155
2155
|
]);
|
|
2156
2156
|
};
|
|
2157
2157
|
}
|
|
2158
2158
|
});
|
|
2159
|
-
var
|
|
2159
|
+
var cl = Object.defineProperty, ut = Object.getOwnPropertySymbols, ua = Object.prototype.hasOwnProperty, ca = Object.prototype.propertyIsEnumerable, Lt = (e, a, t) => a in e ? cl(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, qe = (e, a) => {
|
|
2160
2160
|
for (var t in a || (a = {}))
|
|
2161
2161
|
ua.call(a, t) && Lt(e, t, a[t]);
|
|
2162
2162
|
if (ut)
|
|
@@ -2173,20 +2173,20 @@ var sl = Object.defineProperty, ut = Object.getOwnPropertySymbols, ua = Object.p
|
|
|
2173
2173
|
return t;
|
|
2174
2174
|
};
|
|
2175
2175
|
const pa = "[vue-draggable-plus]: ";
|
|
2176
|
-
function
|
|
2176
|
+
function dl(e) {
|
|
2177
2177
|
console.warn(pa + e);
|
|
2178
2178
|
}
|
|
2179
|
-
function
|
|
2179
|
+
function pl(e) {
|
|
2180
2180
|
console.error(pa + e);
|
|
2181
2181
|
}
|
|
2182
2182
|
function $t(e, a, t) {
|
|
2183
2183
|
return t >= 0 && t < e.length && e.splice(t, 0, e.splice(a, 1)[0]), e;
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function ml(e) {
|
|
2186
2186
|
return e.replace(/-(\w)/g, (a, t) => t ? t.toUpperCase() : "");
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2189
|
-
return Object.keys(e).reduce((a, t) => (typeof e[t] < "u" && (a[
|
|
2188
|
+
function fl(e) {
|
|
2189
|
+
return Object.keys(e).reduce((a, t) => (typeof e[t] < "u" && (a[ml(t)] = e[t]), a), {});
|
|
2190
2190
|
}
|
|
2191
2191
|
function jt(e, a) {
|
|
2192
2192
|
return Array.isArray(e) && e.splice(a, 1), e;
|
|
@@ -2194,10 +2194,10 @@ function jt(e, a) {
|
|
|
2194
2194
|
function Ht(e, a, t) {
|
|
2195
2195
|
return Array.isArray(e) && e.splice(a, 0, t), e;
|
|
2196
2196
|
}
|
|
2197
|
-
function
|
|
2197
|
+
function vl(e) {
|
|
2198
2198
|
return typeof e > "u";
|
|
2199
2199
|
}
|
|
2200
|
-
function
|
|
2200
|
+
function gl(e) {
|
|
2201
2201
|
return typeof e == "string";
|
|
2202
2202
|
}
|
|
2203
2203
|
function Xt(e, a, t) {
|
|
@@ -2207,23 +2207,23 @@ function Xt(e, a, t) {
|
|
|
2207
2207
|
function It(e) {
|
|
2208
2208
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2209
2209
|
}
|
|
2210
|
-
function
|
|
2210
|
+
function yl(e, a = document) {
|
|
2211
2211
|
var t;
|
|
2212
2212
|
let l = null;
|
|
2213
|
-
return typeof (a == null ? void 0 : a.querySelector) == "function" ? l = (t = a == null ? void 0 : a.querySelector) == null ? void 0 : t.call(a, e) : l = document.querySelector(e), l ||
|
|
2213
|
+
return typeof (a == null ? void 0 : a.querySelector) == "function" ? l = (t = a == null ? void 0 : a.querySelector) == null ? void 0 : t.call(a, e) : l = document.querySelector(e), l || dl(`Element not found: ${e}`), l;
|
|
2214
2214
|
}
|
|
2215
|
-
function
|
|
2215
|
+
function hl(e, a, t = null) {
|
|
2216
2216
|
return function(...l) {
|
|
2217
2217
|
return e.apply(t, l), a.apply(t, l);
|
|
2218
2218
|
};
|
|
2219
2219
|
}
|
|
2220
|
-
function
|
|
2220
|
+
function bl(e, a) {
|
|
2221
2221
|
const t = qe({}, e);
|
|
2222
2222
|
return Object.keys(a).forEach((l) => {
|
|
2223
|
-
t[l] ? t[l] =
|
|
2223
|
+
t[l] ? t[l] = hl(e[l], a[l]) : t[l] = a[l];
|
|
2224
2224
|
}), t;
|
|
2225
2225
|
}
|
|
2226
|
-
function
|
|
2226
|
+
function _l(e) {
|
|
2227
2227
|
return e instanceof HTMLElement;
|
|
2228
2228
|
}
|
|
2229
2229
|
function Kt(e, a) {
|
|
@@ -2231,17 +2231,17 @@ function Kt(e, a) {
|
|
|
2231
2231
|
a(t, e[t]);
|
|
2232
2232
|
});
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2234
|
+
function wl(e) {
|
|
2235
2235
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2236
2236
|
}
|
|
2237
|
-
const
|
|
2237
|
+
const Tl = Object.assign;
|
|
2238
2238
|
/**!
|
|
2239
2239
|
* Sortable 1.15.2
|
|
2240
2240
|
* @author RubaXa <trash@rubaxa.org>
|
|
2241
2241
|
* @author owenm <owen23355@gmail.com>
|
|
2242
2242
|
* @license MIT
|
|
2243
2243
|
*/
|
|
2244
|
-
function
|
|
2244
|
+
function zt(e, a) {
|
|
2245
2245
|
var t = Object.keys(e);
|
|
2246
2246
|
if (Object.getOwnPropertySymbols) {
|
|
2247
2247
|
var l = Object.getOwnPropertySymbols(e);
|
|
@@ -2254,9 +2254,9 @@ function Wt(e, a) {
|
|
|
2254
2254
|
function we(e) {
|
|
2255
2255
|
for (var a = 1; a < arguments.length; a++) {
|
|
2256
2256
|
var t = arguments[a] != null ? arguments[a] : {};
|
|
2257
|
-
a % 2 ?
|
|
2258
|
-
|
|
2259
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) :
|
|
2257
|
+
a % 2 ? zt(Object(t), !0).forEach(function(l) {
|
|
2258
|
+
Il(e, l, t[l]);
|
|
2259
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : zt(Object(t)).forEach(function(l) {
|
|
2260
2260
|
Object.defineProperty(e, l, Object.getOwnPropertyDescriptor(t, l));
|
|
2261
2261
|
});
|
|
2262
2262
|
}
|
|
@@ -2270,7 +2270,7 @@ function lt(e) {
|
|
|
2270
2270
|
return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
|
|
2271
2271
|
}, lt(e);
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2273
|
+
function Il(e, a, t) {
|
|
2274
2274
|
return a in e ? Object.defineProperty(e, a, {
|
|
2275
2275
|
value: t,
|
|
2276
2276
|
enumerable: !0,
|
|
@@ -2288,7 +2288,7 @@ function Ie() {
|
|
|
2288
2288
|
return e;
|
|
2289
2289
|
}, Ie.apply(this, arguments);
|
|
2290
2290
|
}
|
|
2291
|
-
function
|
|
2291
|
+
function xl(e, a) {
|
|
2292
2292
|
if (e == null)
|
|
2293
2293
|
return {};
|
|
2294
2294
|
var t = {}, l = Object.keys(e), o, r;
|
|
@@ -2296,10 +2296,10 @@ function Tl(e, a) {
|
|
|
2296
2296
|
o = l[r], !(a.indexOf(o) >= 0) && (t[o] = e[o]);
|
|
2297
2297
|
return t;
|
|
2298
2298
|
}
|
|
2299
|
-
function
|
|
2299
|
+
function Cl(e, a) {
|
|
2300
2300
|
if (e == null)
|
|
2301
2301
|
return {};
|
|
2302
|
-
var t =
|
|
2302
|
+
var t = xl(e, a), l, o;
|
|
2303
2303
|
if (Object.getOwnPropertySymbols) {
|
|
2304
2304
|
var r = Object.getOwnPropertySymbols(e);
|
|
2305
2305
|
for (o = 0; o < r.length; o++)
|
|
@@ -2307,19 +2307,19 @@ function Il(e, a) {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
return t;
|
|
2309
2309
|
}
|
|
2310
|
-
var
|
|
2310
|
+
var Fl = "1.15.2";
|
|
2311
2311
|
function Te(e) {
|
|
2312
2312
|
if (typeof window < "u" && window.navigator)
|
|
2313
2313
|
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2314
2314
|
}
|
|
2315
|
-
var xe = Te(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Qe = Te(/Edge/i),
|
|
2315
|
+
var xe = Te(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Qe = Te(/Edge/i), Wt = Te(/firefox/i), He = Te(/safari/i) && !Te(/chrome/i) && !Te(/android/i), ma = Te(/iP(ad|od|hone)/i), fa = Te(/chrome/i) && Te(/android/i), va = {
|
|
2316
2316
|
capture: !1,
|
|
2317
2317
|
passive: !1
|
|
2318
2318
|
};
|
|
2319
|
-
function
|
|
2319
|
+
function A(e, a, t) {
|
|
2320
2320
|
e.addEventListener(a, t, !xe && va);
|
|
2321
2321
|
}
|
|
2322
|
-
function
|
|
2322
|
+
function P(e, a, t) {
|
|
2323
2323
|
e.removeEventListener(a, t, !xe && va);
|
|
2324
2324
|
}
|
|
2325
2325
|
function ct(e, a) {
|
|
@@ -2338,7 +2338,7 @@ function ct(e, a) {
|
|
|
2338
2338
|
return !1;
|
|
2339
2339
|
}
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2341
|
+
function Sl(e) {
|
|
2342
2342
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2343
2343
|
}
|
|
2344
2344
|
function be(e, a, t, l) {
|
|
@@ -2349,7 +2349,7 @@ function be(e, a, t, l) {
|
|
|
2349
2349
|
return e;
|
|
2350
2350
|
if (e === t)
|
|
2351
2351
|
break;
|
|
2352
|
-
} while (e =
|
|
2352
|
+
} while (e = Sl(e));
|
|
2353
2353
|
}
|
|
2354
2354
|
return null;
|
|
2355
2355
|
}
|
|
@@ -2363,7 +2363,7 @@ function me(e, a, t) {
|
|
|
2363
2363
|
e.className = (l + (t ? " " + a : "")).replace(Qt, " ");
|
|
2364
2364
|
}
|
|
2365
2365
|
}
|
|
2366
|
-
function
|
|
2366
|
+
function N(e, a, t) {
|
|
2367
2367
|
var l = e && e.style;
|
|
2368
2368
|
if (l) {
|
|
2369
2369
|
if (t === void 0)
|
|
@@ -2377,7 +2377,7 @@ function Be(e, a) {
|
|
|
2377
2377
|
t = e;
|
|
2378
2378
|
else
|
|
2379
2379
|
do {
|
|
2380
|
-
var l =
|
|
2380
|
+
var l = N(e, "transform");
|
|
2381
2381
|
l && l !== "none" && (t = l + " " + t);
|
|
2382
2382
|
} while (!a && (e = e.parentNode));
|
|
2383
2383
|
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
@@ -2399,26 +2399,26 @@ function _e() {
|
|
|
2399
2399
|
}
|
|
2400
2400
|
function te(e, a, t, l, o) {
|
|
2401
2401
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2402
|
-
var r, n,
|
|
2403
|
-
if (e !== window && e.parentNode && e !== _e() ? (r = e.getBoundingClientRect(), n = r.top,
|
|
2402
|
+
var r, n, d, s, f, p, m;
|
|
2403
|
+
if (e !== window && e.parentNode && e !== _e() ? (r = e.getBoundingClientRect(), n = r.top, d = r.left, s = r.bottom, f = r.right, p = r.height, m = r.width) : (n = 0, d = 0, s = window.innerHeight, f = window.innerWidth, p = window.innerHeight, m = window.innerWidth), (a || t) && e !== window && (o = o || e.parentNode, !xe))
|
|
2404
2404
|
do
|
|
2405
|
-
if (o && o.getBoundingClientRect && (
|
|
2405
|
+
if (o && o.getBoundingClientRect && (N(o, "transform") !== "none" || t && N(o, "position") !== "static")) {
|
|
2406
2406
|
var i = o.getBoundingClientRect();
|
|
2407
|
-
n -= i.top + parseInt(
|
|
2407
|
+
n -= i.top + parseInt(N(o, "border-top-width")), d -= i.left + parseInt(N(o, "border-left-width")), s = n + r.height, f = d + r.width;
|
|
2408
2408
|
break;
|
|
2409
2409
|
}
|
|
2410
2410
|
while (o = o.parentNode);
|
|
2411
2411
|
if (l && e !== window) {
|
|
2412
|
-
var u = Be(o || e),
|
|
2413
|
-
u && (n /= g,
|
|
2412
|
+
var u = Be(o || e), v = u && u.a, g = u && u.d;
|
|
2413
|
+
u && (n /= g, d /= v, m /= v, p /= g, s = n + p, f = d + m);
|
|
2414
2414
|
}
|
|
2415
2415
|
return {
|
|
2416
2416
|
top: n,
|
|
2417
|
-
left:
|
|
2417
|
+
left: d,
|
|
2418
2418
|
bottom: s,
|
|
2419
|
-
right:
|
|
2419
|
+
right: f,
|
|
2420
2420
|
width: m,
|
|
2421
|
-
height:
|
|
2421
|
+
height: p
|
|
2422
2422
|
};
|
|
2423
2423
|
}
|
|
2424
2424
|
}
|
|
@@ -2435,7 +2435,7 @@ function Jt(e, a, t) {
|
|
|
2435
2435
|
}
|
|
2436
2436
|
function Ye(e, a, t, l) {
|
|
2437
2437
|
for (var o = 0, r = 0, n = e.children; r < n.length; ) {
|
|
2438
|
-
if (n[r].style.display !== "none" && n[r] !==
|
|
2438
|
+
if (n[r].style.display !== "none" && n[r] !== k.ghost && (l || n[r] !== k.dragged) && be(n[r], t.draggable, e, !1)) {
|
|
2439
2439
|
if (o === a)
|
|
2440
2440
|
return n[r];
|
|
2441
2441
|
o++;
|
|
@@ -2445,7 +2445,7 @@ function Ye(e, a, t, l) {
|
|
|
2445
2445
|
return null;
|
|
2446
2446
|
}
|
|
2447
2447
|
function Gt(e, a) {
|
|
2448
|
-
for (var t = e.lastElementChild; t && (t ===
|
|
2448
|
+
for (var t = e.lastElementChild; t && (t === k.ghost || N(t, "display") === "none" || a && !ct(t, a)); )
|
|
2449
2449
|
t = t.previousElementSibling;
|
|
2450
2450
|
return t || null;
|
|
2451
2451
|
}
|
|
@@ -2454,7 +2454,7 @@ function ge(e, a) {
|
|
|
2454
2454
|
if (!e || !e.parentNode)
|
|
2455
2455
|
return -1;
|
|
2456
2456
|
for (; e = e.previousElementSibling; )
|
|
2457
|
-
e.nodeName.toUpperCase() !== "TEMPLATE" && e !==
|
|
2457
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== k.clone && (!a || ct(e, a)) && t++;
|
|
2458
2458
|
return t;
|
|
2459
2459
|
}
|
|
2460
2460
|
function Zt(e) {
|
|
@@ -2466,7 +2466,7 @@ function Zt(e) {
|
|
|
2466
2466
|
} while (e !== l && (e = e.parentNode));
|
|
2467
2467
|
return [a, t];
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2469
|
+
function Nl(e, a) {
|
|
2470
2470
|
for (var t in e)
|
|
2471
2471
|
if (e.hasOwnProperty(t)) {
|
|
2472
2472
|
for (var l in a)
|
|
@@ -2481,7 +2481,7 @@ function Ne(e, a) {
|
|
|
2481
2481
|
var t = e, l = !1;
|
|
2482
2482
|
do
|
|
2483
2483
|
if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
|
|
2484
|
-
var o =
|
|
2484
|
+
var o = N(t);
|
|
2485
2485
|
if (t.clientWidth < t.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
|
|
2486
2486
|
if (!t.getBoundingClientRect || t === document.body)
|
|
2487
2487
|
return _e();
|
|
@@ -2493,7 +2493,7 @@ function Ne(e, a) {
|
|
|
2493
2493
|
while (t = t.parentNode);
|
|
2494
2494
|
return _e();
|
|
2495
2495
|
}
|
|
2496
|
-
function
|
|
2496
|
+
function kl(e, a) {
|
|
2497
2497
|
if (e && a)
|
|
2498
2498
|
for (var t in a)
|
|
2499
2499
|
a.hasOwnProperty(t) && (e[t] = a[t]);
|
|
@@ -2513,7 +2513,7 @@ function ya(e, a) {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
};
|
|
2515
2515
|
}
|
|
2516
|
-
function
|
|
2516
|
+
function Dl() {
|
|
2517
2517
|
clearTimeout(Xe), Xe = void 0;
|
|
2518
2518
|
}
|
|
2519
2519
|
function ha(e, a, t) {
|
|
@@ -2526,22 +2526,22 @@ function ba(e) {
|
|
|
2526
2526
|
function _a(e, a, t) {
|
|
2527
2527
|
var l = {};
|
|
2528
2528
|
return Array.from(e.children).forEach(function(o) {
|
|
2529
|
-
var r, n,
|
|
2529
|
+
var r, n, d, s;
|
|
2530
2530
|
if (!(!be(o, a.draggable, e, !1) || o.animated || o === t)) {
|
|
2531
|
-
var
|
|
2532
|
-
l.left = Math.min((r = l.left) !== null && r !== void 0 ? r : 1 / 0,
|
|
2531
|
+
var f = te(o);
|
|
2532
|
+
l.left = Math.min((r = l.left) !== null && r !== void 0 ? r : 1 / 0, f.left), l.top = Math.min((n = l.top) !== null && n !== void 0 ? n : 1 / 0, f.top), l.right = Math.max((d = l.right) !== null && d !== void 0 ? d : -1 / 0, f.right), l.bottom = Math.max((s = l.bottom) !== null && s !== void 0 ? s : -1 / 0, f.bottom);
|
|
2533
2533
|
}
|
|
2534
2534
|
}), l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
|
|
2535
2535
|
}
|
|
2536
2536
|
var ve = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2537
|
-
function
|
|
2537
|
+
function El() {
|
|
2538
2538
|
var e = [], a;
|
|
2539
2539
|
return {
|
|
2540
2540
|
captureAnimationState: function() {
|
|
2541
2541
|
if (e = [], !!this.options.animation) {
|
|
2542
2542
|
var t = [].slice.call(this.el.children);
|
|
2543
2543
|
t.forEach(function(l) {
|
|
2544
|
-
if (!(
|
|
2544
|
+
if (!(N(l, "display") === "none" || l === k.ghost)) {
|
|
2545
2545
|
e.push({
|
|
2546
2546
|
target: l,
|
|
2547
2547
|
rect: te(l)
|
|
@@ -2560,7 +2560,7 @@ function kl() {
|
|
|
2560
2560
|
e.push(t);
|
|
2561
2561
|
},
|
|
2562
2562
|
removeAnimationState: function(t) {
|
|
2563
|
-
e.splice(
|
|
2563
|
+
e.splice(Nl(e, {
|
|
2564
2564
|
target: t
|
|
2565
2565
|
}), 1);
|
|
2566
2566
|
},
|
|
@@ -2572,30 +2572,30 @@ function kl() {
|
|
|
2572
2572
|
}
|
|
2573
2573
|
var o = !1, r = 0;
|
|
2574
2574
|
e.forEach(function(n) {
|
|
2575
|
-
var
|
|
2576
|
-
|
|
2577
|
-
(u.top -
|
|
2575
|
+
var d = 0, s = n.target, f = s.fromRect, p = te(s), m = s.prevFromRect, i = s.prevToRect, u = n.rect, v = Be(s, !0);
|
|
2576
|
+
v && (p.top -= v.f, p.left -= v.e), s.toRect = p, s.thisAnimationDuration && xt(m, p) && !xt(f, p) && // Make sure animatingRect is on line between toRect & fromRect
|
|
2577
|
+
(u.top - p.top) / (u.left - p.left) === (f.top - p.top) / (f.left - p.left) && (d = Ol(u, m, i, l.options)), xt(p, f) || (s.prevFromRect = f, s.prevToRect = p, d || (d = l.options.animation), l.animate(s, u, p, d)), d && (o = !0, r = Math.max(r, d), clearTimeout(s.animationResetTimer), s.animationResetTimer = setTimeout(function() {
|
|
2578
2578
|
s.animationTime = 0, s.prevFromRect = null, s.fromRect = null, s.prevToRect = null, s.thisAnimationDuration = null;
|
|
2579
|
-
},
|
|
2579
|
+
}, d), s.thisAnimationDuration = d);
|
|
2580
2580
|
}), clearTimeout(a), o ? a = setTimeout(function() {
|
|
2581
2581
|
typeof t == "function" && t();
|
|
2582
2582
|
}, r) : typeof t == "function" && t(), e = [];
|
|
2583
2583
|
},
|
|
2584
2584
|
animate: function(t, l, o, r) {
|
|
2585
2585
|
if (r) {
|
|
2586
|
-
|
|
2587
|
-
var n = Be(this.el),
|
|
2588
|
-
t.animatingX = !!
|
|
2589
|
-
|
|
2586
|
+
N(t, "transition", ""), N(t, "transform", "");
|
|
2587
|
+
var n = Be(this.el), d = n && n.a, s = n && n.d, f = (l.left - o.left) / (d || 1), p = (l.top - o.top) / (s || 1);
|
|
2588
|
+
t.animatingX = !!f, t.animatingY = !!p, N(t, "transform", "translate3d(" + f + "px," + p + "px,0)"), this.forRepaintDummy = Vl(t), N(t, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), N(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
2589
|
+
N(t, "transition", ""), N(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
2590
2590
|
}, r);
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
2593
|
};
|
|
2594
2594
|
}
|
|
2595
|
-
function
|
|
2595
|
+
function Vl(e) {
|
|
2596
2596
|
return e.offsetWidth;
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function Ol(e, a, t, l) {
|
|
2599
2599
|
return Math.sqrt(Math.pow(a.top - e.top, 2) + Math.pow(a.left - e.left, 2)) / Math.sqrt(Math.pow(a.top - t.top, 2) + Math.pow(a.left - t.left, 2)) * l.animation;
|
|
2600
2600
|
}
|
|
2601
2601
|
var Me = [], Ct = {
|
|
@@ -2625,10 +2625,10 @@ var Me = [], Ct = {
|
|
|
2625
2625
|
},
|
|
2626
2626
|
initializePlugins: function(e, a, t, l) {
|
|
2627
2627
|
Me.forEach(function(n) {
|
|
2628
|
-
var
|
|
2629
|
-
if (!(!e.options[
|
|
2628
|
+
var d = n.pluginName;
|
|
2629
|
+
if (!(!e.options[d] && !n.initializeByDefault)) {
|
|
2630
2630
|
var s = new n(e, a, e.options);
|
|
2631
|
-
s.sortable = e, s.options = e.options, e[
|
|
2631
|
+
s.sortable = e, s.options = e.options, e[d] = s, Ie(t, s.defaults);
|
|
2632
2632
|
}
|
|
2633
2633
|
});
|
|
2634
2634
|
for (var o in e.options)
|
|
@@ -2650,34 +2650,34 @@ var Me = [], Ct = {
|
|
|
2650
2650
|
}), l;
|
|
2651
2651
|
}
|
|
2652
2652
|
};
|
|
2653
|
-
function
|
|
2654
|
-
var a = e.sortable, t = e.rootEl, l = e.name, o = e.targetEl, r = e.cloneEl, n = e.toEl,
|
|
2653
|
+
function Ul(e) {
|
|
2654
|
+
var a = e.sortable, t = e.rootEl, l = e.name, o = e.targetEl, r = e.cloneEl, n = e.toEl, d = e.fromEl, s = e.oldIndex, f = e.newIndex, p = e.oldDraggableIndex, m = e.newDraggableIndex, i = e.originalEvent, u = e.putSortable, v = e.extraEventProperties;
|
|
2655
2655
|
if (a = a || t && t[ve], !!a) {
|
|
2656
|
-
var g,
|
|
2656
|
+
var g, D = a.options, c = "on" + l.charAt(0).toUpperCase() + l.substr(1);
|
|
2657
2657
|
window.CustomEvent && !xe && !Qe ? g = new CustomEvent(l, {
|
|
2658
2658
|
bubbles: !0,
|
|
2659
2659
|
cancelable: !0
|
|
2660
|
-
}) : (g = document.createEvent("Event"), g.initEvent(l, !0, !0)), g.to = n || t, g.from =
|
|
2661
|
-
var
|
|
2662
|
-
for (var
|
|
2663
|
-
g[
|
|
2664
|
-
t && t.dispatchEvent(g),
|
|
2660
|
+
}) : (g = document.createEvent("Event"), g.initEvent(l, !0, !0)), g.to = n || t, g.from = d || t, g.item = o || t, g.clone = r, g.oldIndex = s, g.newIndex = f, g.oldDraggableIndex = p, g.newDraggableIndex = m, g.originalEvent = i, g.pullMode = u ? u.lastPutMode : void 0;
|
|
2661
|
+
var _ = we(we({}, v), Je.getEventProperties(l, a));
|
|
2662
|
+
for (var O in _)
|
|
2663
|
+
g[O] = _[O];
|
|
2664
|
+
t && t.dispatchEvent(g), D[c] && D[c].call(a, g);
|
|
2665
2665
|
}
|
|
2666
2666
|
}
|
|
2667
|
-
var
|
|
2668
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = t.evt, o =
|
|
2669
|
-
Je.pluginEvent.bind(
|
|
2667
|
+
var Ml = ["evt"], pe = function(e, a) {
|
|
2668
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = t.evt, o = Cl(t, Ml);
|
|
2669
|
+
Je.pluginEvent.bind(k)(e, a, we({
|
|
2670
2670
|
dragEl: h,
|
|
2671
2671
|
parentEl: W,
|
|
2672
|
-
ghostEl:
|
|
2673
|
-
rootEl:
|
|
2672
|
+
ghostEl: E,
|
|
2673
|
+
rootEl: j,
|
|
2674
2674
|
nextEl: Ee,
|
|
2675
2675
|
lastDownEl: ot,
|
|
2676
|
-
cloneEl:
|
|
2676
|
+
cloneEl: X,
|
|
2677
2677
|
cloneHidden: Se,
|
|
2678
2678
|
dragStarted: Le,
|
|
2679
2679
|
putSortable: oe,
|
|
2680
|
-
activeSortable:
|
|
2680
|
+
activeSortable: k.active,
|
|
2681
2681
|
originalEvent: l,
|
|
2682
2682
|
oldIndex: Ge,
|
|
2683
2683
|
oldDraggableIndex: Ke,
|
|
@@ -2692,7 +2692,7 @@ var Ol = ["evt"], de = function(e, a) {
|
|
|
2692
2692
|
Se = !1;
|
|
2693
2693
|
},
|
|
2694
2694
|
dispatchSortableEvent: function(r) {
|
|
2695
|
-
|
|
2695
|
+
ce({
|
|
2696
2696
|
sortable: a,
|
|
2697
2697
|
name: r,
|
|
2698
2698
|
originalEvent: l
|
|
@@ -2700,19 +2700,19 @@ var Ol = ["evt"], de = function(e, a) {
|
|
|
2700
2700
|
}
|
|
2701
2701
|
}, o));
|
|
2702
2702
|
};
|
|
2703
|
-
function
|
|
2704
|
-
|
|
2703
|
+
function ce(e) {
|
|
2704
|
+
Ul(we({
|
|
2705
2705
|
putSortable: oe,
|
|
2706
|
-
cloneEl:
|
|
2706
|
+
cloneEl: X,
|
|
2707
2707
|
targetEl: h,
|
|
2708
|
-
rootEl:
|
|
2708
|
+
rootEl: j,
|
|
2709
2709
|
oldIndex: Ge,
|
|
2710
2710
|
oldDraggableIndex: Ke,
|
|
2711
2711
|
newIndex: fe,
|
|
2712
2712
|
newDraggableIndex: Fe
|
|
2713
2713
|
}, e));
|
|
2714
2714
|
}
|
|
2715
|
-
var h, W,
|
|
2715
|
+
var h, W, E, j, Ee, ot, X, Se, Ge, fe, Ke, Fe, Ze, oe, Ae = !1, dt = !1, pt = [], ke, he, Ft, St, ea, ta, Le, Pe, ze, We = !1, et = !1, rt, se, Nt = [], Ot = !1, mt = [], wt = typeof document < "u", tt = ma, aa = Qe || xe ? "cssFloat" : "float", Pl = wt && !fa && !ma && "draggable" in document.createElement("div"), wa = function() {
|
|
2716
2716
|
if (wt) {
|
|
2717
2717
|
if (xe)
|
|
2718
2718
|
return !1;
|
|
@@ -2720,42 +2720,42 @@ var h, W, V, $, Ee, ot, H, Se, Ge, fe, Ke, Fe, Ze, oe, Ae = !1, dt = !1, pt = []
|
|
|
2720
2720
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2721
2721
|
}
|
|
2722
2722
|
}(), Ta = function(e, a) {
|
|
2723
|
-
var t =
|
|
2723
|
+
var t = N(e), l = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), o = Ye(e, 0, a), r = Ye(e, 1, a), n = o && N(o), d = r && N(r), s = n && parseInt(n.marginLeft) + parseInt(n.marginRight) + te(o).width, f = d && parseInt(d.marginLeft) + parseInt(d.marginRight) + te(r).width;
|
|
2724
2724
|
if (t.display === "flex")
|
|
2725
2725
|
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2726
2726
|
if (t.display === "grid")
|
|
2727
2727
|
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2728
2728
|
if (o && n.float && n.float !== "none") {
|
|
2729
|
-
var
|
|
2730
|
-
return r && (
|
|
2729
|
+
var p = n.float === "left" ? "left" : "right";
|
|
2730
|
+
return r && (d.clear === "both" || d.clear === p) ? "vertical" : "horizontal";
|
|
2731
2731
|
}
|
|
2732
|
-
return o && (n.display === "block" || n.display === "flex" || n.display === "table" || n.display === "grid" || s >= l && t[aa] === "none" || r && t[aa] === "none" && s +
|
|
2733
|
-
},
|
|
2734
|
-
var l = t ? e.left : e.top, o = t ? e.right : e.bottom, r = t ? e.width : e.height, n = t ? a.left : a.top,
|
|
2735
|
-
return l === n || o ===
|
|
2736
|
-
},
|
|
2732
|
+
return o && (n.display === "block" || n.display === "flex" || n.display === "table" || n.display === "grid" || s >= l && t[aa] === "none" || r && t[aa] === "none" && s + f > l) ? "vertical" : "horizontal";
|
|
2733
|
+
}, Al = function(e, a, t) {
|
|
2734
|
+
var l = t ? e.left : e.top, o = t ? e.right : e.bottom, r = t ? e.width : e.height, n = t ? a.left : a.top, d = t ? a.right : a.bottom, s = t ? a.width : a.height;
|
|
2735
|
+
return l === n || o === d || l + r / 2 === n + s / 2;
|
|
2736
|
+
}, Rl = function(e, a) {
|
|
2737
2737
|
var t;
|
|
2738
2738
|
return pt.some(function(l) {
|
|
2739
2739
|
var o = l[ve].options.emptyInsertThreshold;
|
|
2740
2740
|
if (!(!o || Gt(l))) {
|
|
2741
|
-
var r = te(l), n = e >= r.left - o && e <= r.right + o,
|
|
2742
|
-
if (n &&
|
|
2741
|
+
var r = te(l), n = e >= r.left - o && e <= r.right + o, d = a >= r.top - o && a <= r.bottom + o;
|
|
2742
|
+
if (n && d)
|
|
2743
2743
|
return t = l;
|
|
2744
2744
|
}
|
|
2745
2745
|
}), t;
|
|
2746
2746
|
}, Ia = function(e) {
|
|
2747
2747
|
function a(o, r) {
|
|
2748
|
-
return function(n,
|
|
2749
|
-
var
|
|
2750
|
-
if (o == null && (r ||
|
|
2748
|
+
return function(n, d, s, f) {
|
|
2749
|
+
var p = n.options.group.name && d.options.group.name && n.options.group.name === d.options.group.name;
|
|
2750
|
+
if (o == null && (r || p))
|
|
2751
2751
|
return !0;
|
|
2752
2752
|
if (o == null || o === !1)
|
|
2753
2753
|
return !1;
|
|
2754
2754
|
if (r && o === "clone")
|
|
2755
2755
|
return o;
|
|
2756
2756
|
if (typeof o == "function")
|
|
2757
|
-
return a(o(n,
|
|
2758
|
-
var m = (r ? n :
|
|
2757
|
+
return a(o(n, d, s, f), r)(n, d, s, f);
|
|
2758
|
+
var m = (r ? n : d).options.group.name;
|
|
2759
2759
|
return o === !0 || typeof o == "string" && o === m || o.join && o.indexOf(m) > -1;
|
|
2760
2760
|
};
|
|
2761
2761
|
}
|
|
@@ -2764,9 +2764,9 @@ var h, W, V, $, Ee, ot, H, Se, Ge, fe, Ke, Fe, Ze, oe, Ae = !1, dt = !1, pt = []
|
|
|
2764
2764
|
name: l
|
|
2765
2765
|
}), t.name = l.name, t.checkPull = a(l.pull, !0), t.checkPut = a(l.put), t.revertClone = l.revertClone, e.group = t;
|
|
2766
2766
|
}, xa = function() {
|
|
2767
|
-
!wa &&
|
|
2767
|
+
!wa && E && N(E, "display", "none");
|
|
2768
2768
|
}, Ca = function() {
|
|
2769
|
-
!wa &&
|
|
2769
|
+
!wa && E && N(E, "display", "");
|
|
2770
2770
|
};
|
|
2771
2771
|
wt && !fa && document.addEventListener("click", function(e) {
|
|
2772
2772
|
if (dt)
|
|
@@ -2775,7 +2775,7 @@ wt && !fa && document.addEventListener("click", function(e) {
|
|
|
2775
2775
|
var De = function(e) {
|
|
2776
2776
|
if (h) {
|
|
2777
2777
|
e = e.touches ? e.touches[0] : e;
|
|
2778
|
-
var a =
|
|
2778
|
+
var a = Rl(e.clientX, e.clientY);
|
|
2779
2779
|
if (a) {
|
|
2780
2780
|
var t = {};
|
|
2781
2781
|
for (var l in e)
|
|
@@ -2783,10 +2783,10 @@ var De = function(e) {
|
|
|
2783
2783
|
t.target = t.rootEl = a, t.preventDefault = void 0, t.stopPropagation = void 0, a[ve]._onDragOver(t);
|
|
2784
2784
|
}
|
|
2785
2785
|
}
|
|
2786
|
-
},
|
|
2786
|
+
}, ql = function(e) {
|
|
2787
2787
|
h && h.parentNode[ve]._isOutsideThisEl(e.target);
|
|
2788
2788
|
};
|
|
2789
|
-
function
|
|
2789
|
+
function k(e, a) {
|
|
2790
2790
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
2791
2791
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
2792
2792
|
this.el = e, this.options = a = Ie({}, a), e[ve] = this;
|
|
@@ -2832,7 +2832,7 @@ function D(e, a) {
|
|
|
2832
2832
|
x: 0,
|
|
2833
2833
|
y: 0
|
|
2834
2834
|
},
|
|
2835
|
-
supportPointer:
|
|
2835
|
+
supportPointer: k.supportPointer !== !1 && "PointerEvent" in window && !He,
|
|
2836
2836
|
emptyInsertThreshold: 5
|
|
2837
2837
|
};
|
|
2838
2838
|
Je.initializePlugins(this, e, t);
|
|
@@ -2841,11 +2841,11 @@ function D(e, a) {
|
|
|
2841
2841
|
Ia(a);
|
|
2842
2842
|
for (var o in this)
|
|
2843
2843
|
o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
|
|
2844
|
-
this.nativeDraggable = a.forceFallback ? !1 :
|
|
2844
|
+
this.nativeDraggable = a.forceFallback ? !1 : Pl, this.nativeDraggable && (this.options.touchStartThreshold = 1), a.supportPointer ? A(e, "pointerdown", this._onTapStart) : (A(e, "mousedown", this._onTapStart), A(e, "touchstart", this._onTapStart)), this.nativeDraggable && (A(e, "dragover", this), A(e, "dragenter", this)), pt.push(this.el), a.store && a.store.get && this.sort(a.store.get(this) || []), Ie(this, El());
|
|
2845
2845
|
}
|
|
2846
|
-
|
|
2846
|
+
k.prototype = /** @lends Sortable.prototype */
|
|
2847
2847
|
{
|
|
2848
|
-
constructor:
|
|
2848
|
+
constructor: k,
|
|
2849
2849
|
_isOutsideThisEl: function(e) {
|
|
2850
2850
|
!this.el.contains(e) && e !== this.el && (Pe = null);
|
|
2851
2851
|
},
|
|
@@ -2854,74 +2854,74 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
2854
2854
|
},
|
|
2855
2855
|
_onTapStart: function(e) {
|
|
2856
2856
|
if (e.cancelable) {
|
|
2857
|
-
var a = this, t = this.el, l = this.options, o = l.preventOnFilter, r = e.type, n = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e,
|
|
2858
|
-
if (
|
|
2859
|
-
if (Ge = ge(
|
|
2860
|
-
if (
|
|
2861
|
-
|
|
2857
|
+
var a = this, t = this.el, l = this.options, o = l.preventOnFilter, r = e.type, n = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, d = (n || e).target, s = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || d, f = l.filter;
|
|
2858
|
+
if (Xl(t), !h && !(/mousedown|pointerdown/.test(r) && e.button !== 0 || l.disabled) && !s.isContentEditable && !(!this.nativeDraggable && He && d && d.tagName.toUpperCase() === "SELECT") && (d = be(d, l.draggable, t, !1), !(d && d.animated) && ot !== d)) {
|
|
2859
|
+
if (Ge = ge(d), Ke = ge(d, l.draggable), typeof f == "function") {
|
|
2860
|
+
if (f.call(this, e, d, this)) {
|
|
2861
|
+
ce({
|
|
2862
2862
|
sortable: a,
|
|
2863
2863
|
rootEl: s,
|
|
2864
2864
|
name: "filter",
|
|
2865
|
-
targetEl:
|
|
2865
|
+
targetEl: d,
|
|
2866
2866
|
toEl: t,
|
|
2867
2867
|
fromEl: t
|
|
2868
|
-
}),
|
|
2868
|
+
}), pe("filter", a, {
|
|
2869
2869
|
evt: e
|
|
2870
2870
|
}), o && e.cancelable && e.preventDefault();
|
|
2871
2871
|
return;
|
|
2872
2872
|
}
|
|
2873
|
-
} else if (
|
|
2874
|
-
if (
|
|
2875
|
-
return
|
|
2873
|
+
} else if (f && (f = f.split(",").some(function(p) {
|
|
2874
|
+
if (p = be(s, p.trim(), t, !1), p)
|
|
2875
|
+
return ce({
|
|
2876
2876
|
sortable: a,
|
|
2877
|
-
rootEl:
|
|
2877
|
+
rootEl: p,
|
|
2878
2878
|
name: "filter",
|
|
2879
|
-
targetEl:
|
|
2879
|
+
targetEl: d,
|
|
2880
2880
|
fromEl: t,
|
|
2881
2881
|
toEl: t
|
|
2882
|
-
}),
|
|
2882
|
+
}), pe("filter", a, {
|
|
2883
2883
|
evt: e
|
|
2884
2884
|
}), !0;
|
|
2885
|
-
}),
|
|
2885
|
+
}), f)) {
|
|
2886
2886
|
o && e.cancelable && e.preventDefault();
|
|
2887
2887
|
return;
|
|
2888
2888
|
}
|
|
2889
|
-
l.handle && !be(s, l.handle, t, !1) || this._prepareDragStart(e, n,
|
|
2889
|
+
l.handle && !be(s, l.handle, t, !1) || this._prepareDragStart(e, n, d);
|
|
2890
2890
|
}
|
|
2891
2891
|
}
|
|
2892
2892
|
},
|
|
2893
2893
|
_prepareDragStart: function(e, a, t) {
|
|
2894
|
-
var l = this, o = l.el, r = l.options, n = o.ownerDocument,
|
|
2894
|
+
var l = this, o = l.el, r = l.options, n = o.ownerDocument, d;
|
|
2895
2895
|
if (t && !h && t.parentNode === o) {
|
|
2896
2896
|
var s = te(t);
|
|
2897
|
-
if (
|
|
2897
|
+
if (j = o, h = t, W = h.parentNode, Ee = h.nextSibling, ot = t, Ze = r.group, k.dragged = h, ke = {
|
|
2898
2898
|
target: h,
|
|
2899
2899
|
clientX: (a || e).clientX,
|
|
2900
2900
|
clientY: (a || e).clientY
|
|
2901
|
-
}, ea = ke.clientX - s.left, ta = ke.clientY - s.top, this._lastX = (a || e).clientX, this._lastY = (a || e).clientY, h.style["will-change"] = "all",
|
|
2902
|
-
if (
|
|
2901
|
+
}, ea = ke.clientX - s.left, ta = ke.clientY - s.top, this._lastX = (a || e).clientX, this._lastY = (a || e).clientY, h.style["will-change"] = "all", d = function() {
|
|
2902
|
+
if (pe("delayEnded", l, {
|
|
2903
2903
|
evt: e
|
|
2904
|
-
}),
|
|
2904
|
+
}), k.eventCanceled) {
|
|
2905
2905
|
l._onDrop();
|
|
2906
2906
|
return;
|
|
2907
2907
|
}
|
|
2908
|
-
l._disableDelayedDragEvents(), !
|
|
2908
|
+
l._disableDelayedDragEvents(), !Wt && l.nativeDraggable && (h.draggable = !0), l._triggerDragStart(e, a), ce({
|
|
2909
2909
|
sortable: l,
|
|
2910
2910
|
name: "choose",
|
|
2911
2911
|
originalEvent: e
|
|
2912
2912
|
}), me(h, r.chosenClass, !0);
|
|
2913
|
-
}, r.ignore.split(",").forEach(function(
|
|
2914
|
-
ga(h,
|
|
2915
|
-
}),
|
|
2913
|
+
}, r.ignore.split(",").forEach(function(f) {
|
|
2914
|
+
ga(h, f.trim(), kt);
|
|
2915
|
+
}), A(n, "dragover", De), A(n, "mousemove", De), A(n, "touchmove", De), A(n, "mouseup", l._onDrop), A(n, "touchend", l._onDrop), A(n, "touchcancel", l._onDrop), Wt && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), pe("delayStart", this, {
|
|
2916
2916
|
evt: e
|
|
2917
2917
|
}), r.delay && (!r.delayOnTouchOnly || a) && (!this.nativeDraggable || !(Qe || xe))) {
|
|
2918
|
-
if (
|
|
2918
|
+
if (k.eventCanceled) {
|
|
2919
2919
|
this._onDrop();
|
|
2920
2920
|
return;
|
|
2921
2921
|
}
|
|
2922
|
-
|
|
2922
|
+
A(n, "mouseup", l._disableDelayedDrag), A(n, "touchend", l._disableDelayedDrag), A(n, "touchcancel", l._disableDelayedDrag), A(n, "mousemove", l._delayedDragTouchMoveHandler), A(n, "touchmove", l._delayedDragTouchMoveHandler), r.supportPointer && A(n, "pointermove", l._delayedDragTouchMoveHandler), l._dragStartTimer = setTimeout(d, r.delay);
|
|
2923
2923
|
} else
|
|
2924
|
-
|
|
2924
|
+
d();
|
|
2925
2925
|
}
|
|
2926
2926
|
},
|
|
2927
2927
|
_delayedDragTouchMoveHandler: function(e) {
|
|
@@ -2933,10 +2933,10 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
2933
2933
|
},
|
|
2934
2934
|
_disableDelayedDragEvents: function() {
|
|
2935
2935
|
var e = this.el.ownerDocument;
|
|
2936
|
-
|
|
2936
|
+
P(e, "mouseup", this._disableDelayedDrag), P(e, "touchend", this._disableDelayedDrag), P(e, "touchcancel", this._disableDelayedDrag), P(e, "mousemove", this._delayedDragTouchMoveHandler), P(e, "touchmove", this._delayedDragTouchMoveHandler), P(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2937
2937
|
},
|
|
2938
2938
|
_triggerDragStart: function(e, a) {
|
|
2939
|
-
a = a || e.pointerType == "touch" && e, !this.nativeDraggable || a ? this.options.supportPointer ?
|
|
2939
|
+
a = a || e.pointerType == "touch" && e, !this.nativeDraggable || a ? this.options.supportPointer ? A(document, "pointermove", this._onTouchMove) : a ? A(document, "touchmove", this._onTouchMove) : A(document, "mousemove", this._onTouchMove) : (A(h, "dragend", this), A(j, "dragstart", this._onDragStart));
|
|
2940
2940
|
try {
|
|
2941
2941
|
document.selection ? it(function() {
|
|
2942
2942
|
document.selection.empty();
|
|
@@ -2945,12 +2945,12 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
2945
2945
|
}
|
|
2946
2946
|
},
|
|
2947
2947
|
_dragStarted: function(e, a) {
|
|
2948
|
-
if (Ae = !1,
|
|
2949
|
-
|
|
2948
|
+
if (Ae = !1, j && h) {
|
|
2949
|
+
pe("dragStarted", this, {
|
|
2950
2950
|
evt: a
|
|
2951
|
-
}), this.nativeDraggable &&
|
|
2951
|
+
}), this.nativeDraggable && A(document, "dragover", ql);
|
|
2952
2952
|
var t = this.options;
|
|
2953
|
-
!e && me(h, t.dragClass, !1), me(h, t.ghostClass, !0),
|
|
2953
|
+
!e && me(h, t.dragClass, !1), me(h, t.ghostClass, !0), k.active = this, e && this._appendGhost(), ce({
|
|
2954
2954
|
sortable: this,
|
|
2955
2955
|
name: "start",
|
|
2956
2956
|
originalEvent: a
|
|
@@ -2982,88 +2982,88 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
2982
2982
|
},
|
|
2983
2983
|
_onTouchMove: function(e) {
|
|
2984
2984
|
if (ke) {
|
|
2985
|
-
var a = this.options, t = a.fallbackTolerance, l = a.fallbackOffset, o = e.touches ? e.touches[0] : e, r =
|
|
2986
|
-
if (!
|
|
2985
|
+
var a = this.options, t = a.fallbackTolerance, l = a.fallbackOffset, o = e.touches ? e.touches[0] : e, r = E && Be(E, !0), n = E && r && r.a, d = E && r && r.d, s = tt && se && Zt(se), f = (o.clientX - ke.clientX + l.x) / (n || 1) + (s ? s[0] - Nt[0] : 0) / (n || 1), p = (o.clientY - ke.clientY + l.y) / (d || 1) + (s ? s[1] - Nt[1] : 0) / (d || 1);
|
|
2986
|
+
if (!k.active && !Ae) {
|
|
2987
2987
|
if (t && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < t)
|
|
2988
2988
|
return;
|
|
2989
2989
|
this._onDragStart(e, !0);
|
|
2990
2990
|
}
|
|
2991
|
-
if (
|
|
2992
|
-
r ? (r.e +=
|
|
2991
|
+
if (E) {
|
|
2992
|
+
r ? (r.e += f - (Ft || 0), r.f += p - (St || 0)) : r = {
|
|
2993
2993
|
a: 1,
|
|
2994
2994
|
b: 0,
|
|
2995
2995
|
c: 0,
|
|
2996
2996
|
d: 1,
|
|
2997
|
-
e:
|
|
2998
|
-
f:
|
|
2997
|
+
e: f,
|
|
2998
|
+
f: p
|
|
2999
2999
|
};
|
|
3000
3000
|
var m = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
|
|
3001
|
-
|
|
3001
|
+
N(E, "webkitTransform", m), N(E, "mozTransform", m), N(E, "msTransform", m), N(E, "transform", m), Ft = f, St = p, he = o;
|
|
3002
3002
|
}
|
|
3003
3003
|
e.cancelable && e.preventDefault();
|
|
3004
3004
|
}
|
|
3005
3005
|
},
|
|
3006
3006
|
_appendGhost: function() {
|
|
3007
|
-
if (!
|
|
3008
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
3007
|
+
if (!E) {
|
|
3008
|
+
var e = this.options.fallbackOnBody ? document.body : j, a = te(h, !0, tt, !0, e), t = this.options;
|
|
3009
3009
|
if (tt) {
|
|
3010
|
-
for (se = e;
|
|
3010
|
+
for (se = e; N(se, "position") === "static" && N(se, "transform") === "none" && se !== document; )
|
|
3011
3011
|
se = se.parentNode;
|
|
3012
3012
|
se !== document.body && se !== document.documentElement ? (se === document && (se = _e()), a.top += se.scrollTop, a.left += se.scrollLeft) : se = _e(), Nt = Zt(se);
|
|
3013
3013
|
}
|
|
3014
|
-
|
|
3014
|
+
E = h.cloneNode(!0), me(E, t.ghostClass, !1), me(E, t.fallbackClass, !0), me(E, t.dragClass, !0), N(E, "transition", ""), N(E, "transform", ""), N(E, "box-sizing", "border-box"), N(E, "margin", 0), N(E, "top", a.top), N(E, "left", a.left), N(E, "width", a.width), N(E, "height", a.height), N(E, "opacity", "0.8"), N(E, "position", tt ? "absolute" : "fixed"), N(E, "zIndex", "100000"), N(E, "pointerEvents", "none"), k.ghost = E, e.appendChild(E), N(E, "transform-origin", ea / parseInt(E.style.width) * 100 + "% " + ta / parseInt(E.style.height) * 100 + "%");
|
|
3015
3015
|
}
|
|
3016
3016
|
},
|
|
3017
3017
|
_onDragStart: function(e, a) {
|
|
3018
3018
|
var t = this, l = e.dataTransfer, o = t.options;
|
|
3019
|
-
if (
|
|
3019
|
+
if (pe("dragStart", this, {
|
|
3020
3020
|
evt: e
|
|
3021
|
-
}),
|
|
3021
|
+
}), k.eventCanceled) {
|
|
3022
3022
|
this._onDrop();
|
|
3023
3023
|
return;
|
|
3024
3024
|
}
|
|
3025
|
-
|
|
3026
|
-
|
|
3025
|
+
pe("setupClone", this), k.eventCanceled || (X = ba(h), X.removeAttribute("id"), X.draggable = !1, X.style["will-change"] = "", this._hideClone(), me(X, this.options.chosenClass, !1), k.clone = X), t.cloneId = it(function() {
|
|
3026
|
+
pe("clone", t), !k.eventCanceled && (t.options.removeCloneOnHide || j.insertBefore(X, h), t._hideClone(), ce({
|
|
3027
3027
|
sortable: t,
|
|
3028
3028
|
name: "clone"
|
|
3029
3029
|
}));
|
|
3030
|
-
}), !a && me(h, o.dragClass, !0), a ? (dt = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (
|
|
3030
|
+
}), !a && me(h, o.dragClass, !0), a ? (dt = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (P(document, "mouseup", t._onDrop), P(document, "touchend", t._onDrop), P(document, "touchcancel", t._onDrop), l && (l.effectAllowed = "move", o.setData && o.setData.call(t, l, h)), A(document, "drop", t), N(h, "transform", "translateZ(0)")), Ae = !0, t._dragStartId = it(t._dragStarted.bind(t, a, e)), A(document, "selectstart", t), Le = !0, He && N(document.body, "user-select", "none");
|
|
3031
3031
|
},
|
|
3032
3032
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
3033
3033
|
_onDragOver: function(e) {
|
|
3034
|
-
var a = this.el, t = e.target, l, o, r, n = this.options,
|
|
3034
|
+
var a = this.el, t = e.target, l, o, r, n = this.options, d = n.group, s = k.active, f = Ze === d, p = n.sort, m = oe || s, i, u = this, v = !1;
|
|
3035
3035
|
if (Ot)
|
|
3036
3036
|
return;
|
|
3037
|
-
function g(
|
|
3038
|
-
|
|
3037
|
+
function g(Q, Ce) {
|
|
3038
|
+
pe(Q, u, we({
|
|
3039
3039
|
evt: e,
|
|
3040
|
-
isOwner:
|
|
3040
|
+
isOwner: f,
|
|
3041
3041
|
axis: i ? "vertical" : "horizontal",
|
|
3042
3042
|
revert: r,
|
|
3043
3043
|
dragRect: l,
|
|
3044
3044
|
targetRect: o,
|
|
3045
|
-
canSort:
|
|
3045
|
+
canSort: p,
|
|
3046
3046
|
fromSortable: m,
|
|
3047
3047
|
target: t,
|
|
3048
|
-
completed:
|
|
3048
|
+
completed: c,
|
|
3049
3049
|
onMove: function(ie, Tt) {
|
|
3050
|
-
return at(
|
|
3050
|
+
return at(j, a, h, l, ie, te(ie), e, Tt);
|
|
3051
3051
|
},
|
|
3052
|
-
changed:
|
|
3052
|
+
changed: _
|
|
3053
3053
|
}, Ce));
|
|
3054
3054
|
}
|
|
3055
|
-
function
|
|
3055
|
+
function D() {
|
|
3056
3056
|
g("dragOverAnimationCapture"), u.captureAnimationState(), u !== m && m.captureAnimationState();
|
|
3057
3057
|
}
|
|
3058
|
-
function
|
|
3058
|
+
function c(Q) {
|
|
3059
3059
|
return g("dragOverCompleted", {
|
|
3060
|
-
insertion:
|
|
3061
|
-
}),
|
|
3060
|
+
insertion: Q
|
|
3061
|
+
}), Q && (f ? s._hideClone() : s._showClone(u), u !== m && (me(h, oe ? oe.options.ghostClass : s.options.ghostClass, !1), me(h, n.ghostClass, !0)), oe !== u && u !== k.active ? oe = u : u === k.active && oe && (oe = null), m === u && (u._ignoreWhileAnimating = t), u.animateAll(function() {
|
|
3062
3062
|
g("dragOverAnimationComplete"), u._ignoreWhileAnimating = null;
|
|
3063
|
-
}), u !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (t === h && !h.animated || t === a && !t.animated) && (Pe = null), !n.dragoverBubble && !e.rootEl && t !== document && (h.parentNode[ve]._isOutsideThisEl(e.target), !
|
|
3063
|
+
}), u !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (t === h && !h.animated || t === a && !t.animated) && (Pe = null), !n.dragoverBubble && !e.rootEl && t !== document && (h.parentNode[ve]._isOutsideThisEl(e.target), !Q && De(e)), !n.dragoverBubble && e.stopPropagation && e.stopPropagation(), v = !0;
|
|
3064
3064
|
}
|
|
3065
|
-
function
|
|
3066
|
-
fe = ge(h), Fe = ge(h, n.draggable),
|
|
3065
|
+
function _() {
|
|
3066
|
+
fe = ge(h), Fe = ge(h, n.draggable), ce({
|
|
3067
3067
|
sortable: u,
|
|
3068
3068
|
name: "change",
|
|
3069
3069
|
toEl: a,
|
|
@@ -3072,108 +3072,108 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3072
3072
|
originalEvent: e
|
|
3073
3073
|
});
|
|
3074
3074
|
}
|
|
3075
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = be(t, n.draggable, a, !0), g("dragOver"),
|
|
3076
|
-
return
|
|
3075
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = be(t, n.draggable, a, !0), g("dragOver"), k.eventCanceled)
|
|
3076
|
+
return v;
|
|
3077
3077
|
if (h.contains(e.target) || t.animated && t.animatingX && t.animatingY || u._ignoreWhileAnimating === t)
|
|
3078
|
-
return
|
|
3079
|
-
if (dt = !1, s && !n.disabled && (
|
|
3080
|
-
if (i = this._getDirection(e, t) === "vertical", l = te(h), g("dragOverValid"),
|
|
3081
|
-
return
|
|
3078
|
+
return c(!1);
|
|
3079
|
+
if (dt = !1, s && !n.disabled && (f ? p || (r = W !== j) : oe === this || (this.lastPutMode = Ze.checkPull(this, s, h, e)) && d.checkPut(this, s, h, e))) {
|
|
3080
|
+
if (i = this._getDirection(e, t) === "vertical", l = te(h), g("dragOverValid"), k.eventCanceled)
|
|
3081
|
+
return v;
|
|
3082
3082
|
if (r)
|
|
3083
|
-
return W =
|
|
3084
|
-
var
|
|
3085
|
-
if (!
|
|
3083
|
+
return W = j, D(), this._hideClone(), g("revert"), k.eventCanceled || (Ee ? j.insertBefore(h, Ee) : j.appendChild(h)), c(!0);
|
|
3084
|
+
var O = Gt(a, n.draggable);
|
|
3085
|
+
if (!O || Ll(e, i, this) && !O.animated) {
|
|
3086
|
+
if (O === h)
|
|
3087
|
+
return c(!1);
|
|
3088
|
+
if (O && a === e.target && (t = O), t && (o = te(t)), at(j, a, h, l, t, o, e, !!t) !== !1)
|
|
3089
|
+
return D(), O && O.nextSibling ? a.insertBefore(h, O.nextSibling) : a.appendChild(h), W = a, _(), c(!0);
|
|
3090
|
+
} else if (O && Yl(e, i, this)) {
|
|
3091
|
+
var U = Ye(a, 0, n, !0);
|
|
3086
3092
|
if (U === h)
|
|
3087
|
-
return
|
|
3088
|
-
if (
|
|
3089
|
-
return
|
|
3090
|
-
} else if (U && Gl(e, i, this)) {
|
|
3091
|
-
var M = Ye(a, 0, n, !0);
|
|
3092
|
-
if (M === h)
|
|
3093
|
-
return p(!1);
|
|
3094
|
-
if (t = M, o = te(t), at($, a, h, l, t, o, e, !1) !== !1)
|
|
3095
|
-
return C(), a.insertBefore(h, M), W = a, F(), p(!0);
|
|
3093
|
+
return c(!1);
|
|
3094
|
+
if (t = U, o = te(t), at(j, a, h, l, t, o, e, !1) !== !1)
|
|
3095
|
+
return D(), a.insertBefore(h, U), W = a, _(), c(!0);
|
|
3096
3096
|
} else if (t.parentNode === a) {
|
|
3097
3097
|
o = te(t);
|
|
3098
|
-
var
|
|
3099
|
-
Pe !== t && (
|
|
3100
|
-
var
|
|
3101
|
-
if (
|
|
3098
|
+
var Y = 0, L, G = h.parentNode !== a, ue = !Al(h.animated && h.toRect || l, t.animated && t.toRect || o, i), C = i ? "top" : "left", T = Jt(t, "top", "top") || Jt(h, "top", "top"), F = T ? T.scrollTop : void 0;
|
|
3099
|
+
Pe !== t && (L = o[C], We = !1, et = !ue && n.invertSwap || G), Y = $l(e, t, o, i, ue ? 1 : n.swapThreshold, n.invertedSwapThreshold == null ? n.swapThreshold : n.invertedSwapThreshold, et, Pe === t);
|
|
3100
|
+
var V;
|
|
3101
|
+
if (Y !== 0) {
|
|
3102
3102
|
var Z = ge(h);
|
|
3103
3103
|
do
|
|
3104
|
-
Z -=
|
|
3105
|
-
while (
|
|
3104
|
+
Z -= Y, V = W.children[Z];
|
|
3105
|
+
while (V && (N(V, "display") === "none" || V === E));
|
|
3106
3106
|
}
|
|
3107
|
-
if (
|
|
3108
|
-
return
|
|
3109
|
-
Pe = t,
|
|
3110
|
-
var q = t.nextElementSibling,
|
|
3111
|
-
|
|
3112
|
-
var
|
|
3113
|
-
if (
|
|
3114
|
-
return (
|
|
3107
|
+
if (Y === 0 || V === t)
|
|
3108
|
+
return c(!1);
|
|
3109
|
+
Pe = t, ze = Y;
|
|
3110
|
+
var q = t.nextElementSibling, $ = !1;
|
|
3111
|
+
$ = Y === 1;
|
|
3112
|
+
var z = at(j, a, h, l, t, o, e, $);
|
|
3113
|
+
if (z !== !1)
|
|
3114
|
+
return (z === 1 || z === -1) && ($ = z === 1), Ot = !0, setTimeout(Bl, 30), D(), $ && !q ? a.appendChild(h) : t.parentNode.insertBefore(h, $ ? q : t), T && ha(T, 0, F - T.scrollTop), W = h.parentNode, L !== void 0 && !et && (rt = Math.abs(L - te(t)[C])), _(), c(!0);
|
|
3115
3115
|
}
|
|
3116
3116
|
if (a.contains(h))
|
|
3117
|
-
return
|
|
3117
|
+
return c(!1);
|
|
3118
3118
|
}
|
|
3119
3119
|
return !1;
|
|
3120
3120
|
},
|
|
3121
3121
|
_ignoreWhileAnimating: null,
|
|
3122
3122
|
_offMoveEvents: function() {
|
|
3123
|
-
|
|
3123
|
+
P(document, "mousemove", this._onTouchMove), P(document, "touchmove", this._onTouchMove), P(document, "pointermove", this._onTouchMove), P(document, "dragover", De), P(document, "mousemove", De), P(document, "touchmove", De);
|
|
3124
3124
|
},
|
|
3125
3125
|
_offUpEvents: function() {
|
|
3126
3126
|
var e = this.el.ownerDocument;
|
|
3127
|
-
|
|
3127
|
+
P(e, "mouseup", this._onDrop), P(e, "touchend", this._onDrop), P(e, "pointerup", this._onDrop), P(e, "touchcancel", this._onDrop), P(document, "selectstart", this);
|
|
3128
3128
|
},
|
|
3129
3129
|
_onDrop: function(e) {
|
|
3130
3130
|
var a = this.el, t = this.options;
|
|
3131
|
-
if (fe = ge(h), Fe = ge(h, t.draggable),
|
|
3131
|
+
if (fe = ge(h), Fe = ge(h, t.draggable), pe("drop", this, {
|
|
3132
3132
|
evt: e
|
|
3133
|
-
}), W = h && h.parentNode, fe = ge(h), Fe = ge(h, t.draggable),
|
|
3133
|
+
}), W = h && h.parentNode, fe = ge(h), Fe = ge(h, t.draggable), k.eventCanceled) {
|
|
3134
3134
|
this._nulling();
|
|
3135
3135
|
return;
|
|
3136
3136
|
}
|
|
3137
|
-
Ae = !1, et = !1,
|
|
3137
|
+
Ae = !1, et = !1, We = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ut(this.cloneId), Ut(this._dragStartId), this.nativeDraggable && (P(document, "drop", this), P(a, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), He && N(document.body, "user-select", ""), N(h, "transform", ""), e && (Le && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), E && E.parentNode && E.parentNode.removeChild(E), (j === W || oe && oe.lastPutMode !== "clone") && X && X.parentNode && X.parentNode.removeChild(X), h && (this.nativeDraggable && P(h, "dragend", this), kt(h), h.style["will-change"] = "", Le && !Ae && me(h, oe ? oe.options.ghostClass : this.options.ghostClass, !1), me(h, this.options.chosenClass, !1), ce({
|
|
3138
3138
|
sortable: this,
|
|
3139
3139
|
name: "unchoose",
|
|
3140
3140
|
toEl: W,
|
|
3141
3141
|
newIndex: null,
|
|
3142
3142
|
newDraggableIndex: null,
|
|
3143
3143
|
originalEvent: e
|
|
3144
|
-
}),
|
|
3144
|
+
}), j !== W ? (fe >= 0 && (ce({
|
|
3145
3145
|
rootEl: W,
|
|
3146
3146
|
name: "add",
|
|
3147
3147
|
toEl: W,
|
|
3148
|
-
fromEl:
|
|
3148
|
+
fromEl: j,
|
|
3149
3149
|
originalEvent: e
|
|
3150
|
-
}),
|
|
3150
|
+
}), ce({
|
|
3151
3151
|
sortable: this,
|
|
3152
3152
|
name: "remove",
|
|
3153
3153
|
toEl: W,
|
|
3154
3154
|
originalEvent: e
|
|
3155
|
-
}),
|
|
3155
|
+
}), ce({
|
|
3156
3156
|
rootEl: W,
|
|
3157
3157
|
name: "sort",
|
|
3158
3158
|
toEl: W,
|
|
3159
|
-
fromEl:
|
|
3159
|
+
fromEl: j,
|
|
3160
3160
|
originalEvent: e
|
|
3161
|
-
}),
|
|
3161
|
+
}), ce({
|
|
3162
3162
|
sortable: this,
|
|
3163
3163
|
name: "sort",
|
|
3164
3164
|
toEl: W,
|
|
3165
3165
|
originalEvent: e
|
|
3166
|
-
})), oe && oe.save()) : fe !== Ge && fe >= 0 && (
|
|
3166
|
+
})), oe && oe.save()) : fe !== Ge && fe >= 0 && (ce({
|
|
3167
3167
|
sortable: this,
|
|
3168
3168
|
name: "update",
|
|
3169
3169
|
toEl: W,
|
|
3170
3170
|
originalEvent: e
|
|
3171
|
-
}),
|
|
3171
|
+
}), ce({
|
|
3172
3172
|
sortable: this,
|
|
3173
3173
|
name: "sort",
|
|
3174
3174
|
toEl: W,
|
|
3175
3175
|
originalEvent: e
|
|
3176
|
-
})),
|
|
3176
|
+
})), k.active && ((fe == null || fe === -1) && (fe = Ge, Fe = Ke), ce({
|
|
3177
3177
|
sortable: this,
|
|
3178
3178
|
name: "end",
|
|
3179
3179
|
toEl: W,
|
|
@@ -3181,7 +3181,7 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3181
3181
|
}), this.save()))), this._nulling();
|
|
3182
3182
|
},
|
|
3183
3183
|
_nulling: function() {
|
|
3184
|
-
|
|
3184
|
+
pe("nulling", this), j = h = W = E = Ee = X = ot = Se = ke = he = Le = fe = Fe = Ge = Ke = Pe = ze = oe = Ze = k.dragged = k.ghost = k.clone = k.active = null, mt.forEach(function(e) {
|
|
3185
3185
|
e.checked = !0;
|
|
3186
3186
|
}), mt.length = Ft = St = 0;
|
|
3187
3187
|
},
|
|
@@ -3193,7 +3193,7 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3193
3193
|
break;
|
|
3194
3194
|
case "dragenter":
|
|
3195
3195
|
case "dragover":
|
|
3196
|
-
h && (this._onDragOver(e),
|
|
3196
|
+
h && (this._onDragOver(e), Gl(e));
|
|
3197
3197
|
break;
|
|
3198
3198
|
case "selectstart":
|
|
3199
3199
|
e.preventDefault();
|
|
@@ -3206,7 +3206,7 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3206
3206
|
*/
|
|
3207
3207
|
toArray: function() {
|
|
3208
3208
|
for (var e = [], a, t = this.el.children, l = 0, o = t.length, r = this.options; l < o; l++)
|
|
3209
|
-
a = t[l], be(a, r.draggable, this.el, !1) && e.push(a.getAttribute(r.dataIdAttr) ||
|
|
3209
|
+
a = t[l], be(a, r.draggable, this.el, !1) && e.push(a.getAttribute(r.dataIdAttr) || Hl(a));
|
|
3210
3210
|
return e;
|
|
3211
3211
|
},
|
|
3212
3212
|
/**
|
|
@@ -3255,17 +3255,17 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3255
3255
|
* Destroy
|
|
3256
3256
|
*/
|
|
3257
3257
|
destroy: function() {
|
|
3258
|
-
|
|
3258
|
+
pe("destroy", this);
|
|
3259
3259
|
var e = this.el;
|
|
3260
|
-
e[ve] = null,
|
|
3260
|
+
e[ve] = null, P(e, "mousedown", this._onTapStart), P(e, "touchstart", this._onTapStart), P(e, "pointerdown", this._onTapStart), this.nativeDraggable && (P(e, "dragover", this), P(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(a) {
|
|
3261
3261
|
a.removeAttribute("draggable");
|
|
3262
3262
|
}), this._onDrop(), this._disableDelayedDragEvents(), pt.splice(pt.indexOf(this.el), 1), this.el = e = null;
|
|
3263
3263
|
},
|
|
3264
3264
|
_hideClone: function() {
|
|
3265
3265
|
if (!Se) {
|
|
3266
|
-
if (
|
|
3266
|
+
if (pe("hideClone", this), k.eventCanceled)
|
|
3267
3267
|
return;
|
|
3268
|
-
|
|
3268
|
+
N(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X), Se = !0;
|
|
3269
3269
|
}
|
|
3270
3270
|
},
|
|
3271
3271
|
_showClone: function(e) {
|
|
@@ -3274,58 +3274,58 @@ D.prototype = /** @lends Sortable.prototype */
|
|
|
3274
3274
|
return;
|
|
3275
3275
|
}
|
|
3276
3276
|
if (Se) {
|
|
3277
|
-
if (
|
|
3277
|
+
if (pe("showClone", this), k.eventCanceled)
|
|
3278
3278
|
return;
|
|
3279
|
-
h.parentNode ==
|
|
3279
|
+
h.parentNode == j && !this.options.group.revertClone ? j.insertBefore(X, h) : Ee ? j.insertBefore(X, Ee) : j.appendChild(X), this.options.group.revertClone && this.animate(h, X), N(X, "display", ""), Se = !1;
|
|
3280
3280
|
}
|
|
3281
3281
|
}
|
|
3282
3282
|
};
|
|
3283
|
-
function
|
|
3283
|
+
function Gl(e) {
|
|
3284
3284
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3285
3285
|
}
|
|
3286
|
-
function at(e, a, t, l, o, r, n,
|
|
3287
|
-
var s,
|
|
3286
|
+
function at(e, a, t, l, o, r, n, d) {
|
|
3287
|
+
var s, f = e[ve], p = f.options.onMove, m;
|
|
3288
3288
|
return window.CustomEvent && !xe && !Qe ? s = new CustomEvent("move", {
|
|
3289
3289
|
bubbles: !0,
|
|
3290
3290
|
cancelable: !0
|
|
3291
|
-
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = a, s.from = e, s.dragged = t, s.draggedRect = l, s.related = o || a, s.relatedRect = r || te(a), s.willInsertAfter =
|
|
3291
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = a, s.from = e, s.dragged = t, s.draggedRect = l, s.related = o || a, s.relatedRect = r || te(a), s.willInsertAfter = d, s.originalEvent = n, e.dispatchEvent(s), p && (m = p.call(f, s, n)), m;
|
|
3292
3292
|
}
|
|
3293
3293
|
function kt(e) {
|
|
3294
3294
|
e.draggable = !1;
|
|
3295
3295
|
}
|
|
3296
|
-
function
|
|
3296
|
+
function Bl() {
|
|
3297
3297
|
Ot = !1;
|
|
3298
3298
|
}
|
|
3299
|
-
function
|
|
3300
|
-
var l = te(Ye(t.el, 0, t.options, !0)), o = _a(t.el, t.options,
|
|
3299
|
+
function Yl(e, a, t) {
|
|
3300
|
+
var l = te(Ye(t.el, 0, t.options, !0)), o = _a(t.el, t.options, E), r = 10;
|
|
3301
3301
|
return a ? e.clientX < o.left - r || e.clientY < l.top && e.clientX < l.right : e.clientY < o.top - r || e.clientY < l.bottom && e.clientX < l.left;
|
|
3302
3302
|
}
|
|
3303
|
-
function
|
|
3304
|
-
var l = te(Gt(t.el, t.options.draggable)), o = _a(t.el, t.options,
|
|
3303
|
+
function Ll(e, a, t) {
|
|
3304
|
+
var l = te(Gt(t.el, t.options.draggable)), o = _a(t.el, t.options, E), r = 10;
|
|
3305
3305
|
return a ? e.clientX > o.right + r || e.clientY > l.bottom && e.clientX > l.left : e.clientY > o.bottom + r || e.clientX > l.right && e.clientY > l.top;
|
|
3306
3306
|
}
|
|
3307
|
-
function
|
|
3308
|
-
var s = l ? e.clientY : e.clientX,
|
|
3307
|
+
function $l(e, a, t, l, o, r, n, d) {
|
|
3308
|
+
var s = l ? e.clientY : e.clientX, f = l ? t.height : t.width, p = l ? t.top : t.left, m = l ? t.bottom : t.right, i = !1;
|
|
3309
3309
|
if (!n) {
|
|
3310
|
-
if (
|
|
3311
|
-
if (!
|
|
3310
|
+
if (d && rt < f * o) {
|
|
3311
|
+
if (!We && (ze === 1 ? s > p + f * r / 2 : s < m - f * r / 2) && (We = !0), We)
|
|
3312
3312
|
i = !0;
|
|
3313
|
-
else if (
|
|
3314
|
-
return -
|
|
3315
|
-
} else if (s >
|
|
3316
|
-
return
|
|
3313
|
+
else if (ze === 1 ? s < p + rt : s > m - rt)
|
|
3314
|
+
return -ze;
|
|
3315
|
+
} else if (s > p + f * (1 - o) / 2 && s < m - f * (1 - o) / 2)
|
|
3316
|
+
return jl(a);
|
|
3317
3317
|
}
|
|
3318
|
-
return i = i || n, i && (s <
|
|
3318
|
+
return i = i || n, i && (s < p + f * r / 2 || s > m - f * r / 2) ? s > p + f / 2 ? 1 : -1 : 0;
|
|
3319
3319
|
}
|
|
3320
|
-
function
|
|
3320
|
+
function jl(e) {
|
|
3321
3321
|
return ge(h) < ge(e) ? 1 : -1;
|
|
3322
3322
|
}
|
|
3323
|
-
function
|
|
3323
|
+
function Hl(e) {
|
|
3324
3324
|
for (var a = e.tagName + e.className + e.src + e.href + e.textContent, t = a.length, l = 0; t--; )
|
|
3325
3325
|
l += a.charCodeAt(t);
|
|
3326
3326
|
return l.toString(36);
|
|
3327
3327
|
}
|
|
3328
|
-
function
|
|
3328
|
+
function Xl(e) {
|
|
3329
3329
|
mt.length = 0;
|
|
3330
3330
|
for (var a = e.getElementsByTagName("input"), t = a.length; t--; ) {
|
|
3331
3331
|
var l = a[t];
|
|
@@ -3338,18 +3338,18 @@ function it(e) {
|
|
|
3338
3338
|
function Ut(e) {
|
|
3339
3339
|
return clearTimeout(e);
|
|
3340
3340
|
}
|
|
3341
|
-
wt &&
|
|
3342
|
-
(
|
|
3341
|
+
wt && A(document, "touchmove", function(e) {
|
|
3342
|
+
(k.active || Ae) && e.cancelable && e.preventDefault();
|
|
3343
3343
|
});
|
|
3344
|
-
|
|
3345
|
-
on:
|
|
3346
|
-
off:
|
|
3347
|
-
css:
|
|
3344
|
+
k.utils = {
|
|
3345
|
+
on: A,
|
|
3346
|
+
off: P,
|
|
3347
|
+
css: N,
|
|
3348
3348
|
find: ga,
|
|
3349
3349
|
is: function(e, a) {
|
|
3350
3350
|
return !!be(e, a, e, !1);
|
|
3351
3351
|
},
|
|
3352
|
-
extend:
|
|
3352
|
+
extend: kl,
|
|
3353
3353
|
throttle: ya,
|
|
3354
3354
|
closest: be,
|
|
3355
3355
|
toggleClass: me,
|
|
@@ -3360,24 +3360,24 @@ D.utils = {
|
|
|
3360
3360
|
detectDirection: Ta,
|
|
3361
3361
|
getChild: Ye
|
|
3362
3362
|
};
|
|
3363
|
-
|
|
3363
|
+
k.get = function(e) {
|
|
3364
3364
|
return e[ve];
|
|
3365
3365
|
};
|
|
3366
|
-
|
|
3366
|
+
k.mount = function() {
|
|
3367
3367
|
for (var e = arguments.length, a = new Array(e), t = 0; t < e; t++)
|
|
3368
3368
|
a[t] = arguments[t];
|
|
3369
3369
|
a[0].constructor === Array && (a = a[0]), a.forEach(function(l) {
|
|
3370
3370
|
if (!l.prototype || !l.prototype.constructor)
|
|
3371
3371
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(l));
|
|
3372
|
-
l.utils && (
|
|
3372
|
+
l.utils && (k.utils = we(we({}, k.utils), l.utils)), Je.mount(l);
|
|
3373
3373
|
});
|
|
3374
3374
|
};
|
|
3375
|
-
|
|
3376
|
-
return new
|
|
3375
|
+
k.create = function(e, a) {
|
|
3376
|
+
return new k(e, a);
|
|
3377
3377
|
};
|
|
3378
|
-
|
|
3378
|
+
k.version = Fl;
|
|
3379
3379
|
var ee = [], $e, Mt, Pt = !1, Dt, Et, ft, je;
|
|
3380
|
-
function
|
|
3380
|
+
function Kl() {
|
|
3381
3381
|
function e() {
|
|
3382
3382
|
this.defaults = {
|
|
3383
3383
|
scroll: !0,
|
|
@@ -3392,14 +3392,14 @@ function Hl() {
|
|
|
3392
3392
|
return e.prototype = {
|
|
3393
3393
|
dragStarted: function(a) {
|
|
3394
3394
|
var t = a.originalEvent;
|
|
3395
|
-
this.sortable.nativeDraggable ?
|
|
3395
|
+
this.sortable.nativeDraggable ? A(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? A(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? A(document, "touchmove", this._handleFallbackAutoScroll) : A(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3396
3396
|
},
|
|
3397
3397
|
dragOverCompleted: function(a) {
|
|
3398
3398
|
var t = a.originalEvent;
|
|
3399
3399
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3400
3400
|
},
|
|
3401
3401
|
drop: function() {
|
|
3402
|
-
this.sortable.nativeDraggable ?
|
|
3402
|
+
this.sortable.nativeDraggable ? P(document, "dragover", this._handleAutoScroll) : (P(document, "pointermove", this._handleFallbackAutoScroll), P(document, "touchmove", this._handleFallbackAutoScroll), P(document, "mousemove", this._handleFallbackAutoScroll)), na(), st(), Dl();
|
|
3403
3403
|
},
|
|
3404
3404
|
nulling: function() {
|
|
3405
3405
|
ft = Mt = $e = Pt = je = Dt = Et = null, ee.length = 0;
|
|
@@ -3411,10 +3411,10 @@ function Hl() {
|
|
|
3411
3411
|
var l = this, o = (a.touches ? a.touches[0] : a).clientX, r = (a.touches ? a.touches[0] : a).clientY, n = document.elementFromPoint(o, r);
|
|
3412
3412
|
if (ft = a, t || this.options.forceAutoScrollFallback || Qe || xe || He) {
|
|
3413
3413
|
Vt(a, this.options, n, t);
|
|
3414
|
-
var
|
|
3414
|
+
var d = Ne(n, !0);
|
|
3415
3415
|
Pt && (!je || o !== Dt || r !== Et) && (je && na(), je = setInterval(function() {
|
|
3416
3416
|
var s = Ne(document.elementFromPoint(o, r), !0);
|
|
3417
|
-
s !==
|
|
3417
|
+
s !== d && (d = s, st()), Vt(a, l.options, s, t);
|
|
3418
3418
|
}, 10), Dt = o, Et = r);
|
|
3419
3419
|
} else {
|
|
3420
3420
|
if (!this.options.bubbleScroll || Ne(n, !0) === _e()) {
|
|
@@ -3439,33 +3439,33 @@ function na() {
|
|
|
3439
3439
|
}
|
|
3440
3440
|
var Vt = ya(function(e, a, t, l) {
|
|
3441
3441
|
if (a.scroll) {
|
|
3442
|
-
var o = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, n = a.scrollSensitivity,
|
|
3443
|
-
Mt !== t && (Mt = t, st(), $e = a.scroll,
|
|
3442
|
+
var o = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, n = a.scrollSensitivity, d = a.scrollSpeed, s = _e(), f = !1, p;
|
|
3443
|
+
Mt !== t && (Mt = t, st(), $e = a.scroll, p = a.scrollFn, $e === !0 && ($e = Ne(t, !0)));
|
|
3444
3444
|
var m = 0, i = $e;
|
|
3445
3445
|
do {
|
|
3446
|
-
var u = i,
|
|
3447
|
-
u === s ? (
|
|
3448
|
-
var
|
|
3446
|
+
var u = i, v = te(u), g = v.top, D = v.bottom, c = v.left, _ = v.right, O = v.width, U = v.height, Y = void 0, L = void 0, G = u.scrollWidth, ue = u.scrollHeight, C = N(u), T = u.scrollLeft, F = u.scrollTop;
|
|
3447
|
+
u === s ? (Y = O < G && (C.overflowX === "auto" || C.overflowX === "scroll" || C.overflowX === "visible"), L = U < ue && (C.overflowY === "auto" || C.overflowY === "scroll" || C.overflowY === "visible")) : (Y = O < G && (C.overflowX === "auto" || C.overflowX === "scroll"), L = U < ue && (C.overflowY === "auto" || C.overflowY === "scroll"));
|
|
3448
|
+
var V = Y && (Math.abs(_ - o) <= n && T + O < G) - (Math.abs(c - o) <= n && !!T), Z = L && (Math.abs(D - r) <= n && F + U < ue) - (Math.abs(g - r) <= n && !!F);
|
|
3449
3449
|
if (!ee[m])
|
|
3450
3450
|
for (var q = 0; q <= m; q++)
|
|
3451
3451
|
ee[q] || (ee[q] = {});
|
|
3452
|
-
(ee[m].vx !=
|
|
3453
|
-
l && this.layer === 0 &&
|
|
3454
|
-
var
|
|
3455
|
-
typeof
|
|
3452
|
+
(ee[m].vx != V || ee[m].vy != Z || ee[m].el !== u) && (ee[m].el = u, ee[m].vx = V, ee[m].vy = Z, clearInterval(ee[m].pid), (V != 0 || Z != 0) && (f = !0, ee[m].pid = setInterval((function() {
|
|
3453
|
+
l && this.layer === 0 && k.active._onTouchMove(ft);
|
|
3454
|
+
var $ = ee[this.layer].vy ? ee[this.layer].vy * d : 0, z = ee[this.layer].vx ? ee[this.layer].vx * d : 0;
|
|
3455
|
+
typeof p == "function" && p.call(k.dragged.parentNode[ve], z, $, e, ft, ee[this.layer].el) !== "continue" || ha(ee[this.layer].el, z, $);
|
|
3456
3456
|
}).bind({
|
|
3457
3457
|
layer: m
|
|
3458
3458
|
}), 24))), m++;
|
|
3459
3459
|
} while (a.bubbleScroll && i !== s && (i = Ne(i, !1)));
|
|
3460
|
-
Pt =
|
|
3460
|
+
Pt = f;
|
|
3461
3461
|
}
|
|
3462
3462
|
}, 30), Fa = function(e) {
|
|
3463
|
-
var a = e.originalEvent, t = e.putSortable, l = e.dragEl, o = e.activeSortable, r = e.dispatchSortableEvent, n = e.hideGhostForTarget,
|
|
3463
|
+
var a = e.originalEvent, t = e.putSortable, l = e.dragEl, o = e.activeSortable, r = e.dispatchSortableEvent, n = e.hideGhostForTarget, d = e.unhideGhostForTarget;
|
|
3464
3464
|
if (a) {
|
|
3465
3465
|
var s = t || o;
|
|
3466
3466
|
n();
|
|
3467
|
-
var
|
|
3468
|
-
|
|
3467
|
+
var f = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a, p = document.elementFromPoint(f.clientX, f.clientY);
|
|
3468
|
+
d(), s && !s.el.contains(p) && (r("spill"), this.onSpill({
|
|
3469
3469
|
dragEl: l,
|
|
3470
3470
|
putSortable: t
|
|
3471
3471
|
}));
|
|
@@ -3502,163 +3502,163 @@ Yt.prototype = {
|
|
|
3502
3502
|
Ie(Yt, {
|
|
3503
3503
|
pluginName: "removeOnSpill"
|
|
3504
3504
|
});
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
function
|
|
3505
|
+
k.mount(new Kl());
|
|
3506
|
+
k.mount(Yt, Bt);
|
|
3507
|
+
function zl(e) {
|
|
3508
3508
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3509
3509
|
}
|
|
3510
|
-
function
|
|
3510
|
+
function Wl(e) {
|
|
3511
3511
|
Rt() && Oa(e);
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3513
|
+
function Ql(e) {
|
|
3514
3514
|
Rt() ? re(e) : ra(e);
|
|
3515
3515
|
}
|
|
3516
3516
|
let Sa = null, Na = null;
|
|
3517
3517
|
function la(e = null, a = null) {
|
|
3518
3518
|
Sa = e, Na = a;
|
|
3519
3519
|
}
|
|
3520
|
-
function
|
|
3520
|
+
function Jl() {
|
|
3521
3521
|
return {
|
|
3522
3522
|
data: Sa,
|
|
3523
3523
|
clonedData: Na
|
|
3524
3524
|
};
|
|
3525
3525
|
}
|
|
3526
3526
|
const oa = Symbol("cloneElement");
|
|
3527
|
-
function
|
|
3527
|
+
function Zl(...e) {
|
|
3528
3528
|
var a, t;
|
|
3529
3529
|
const l = (a = Rt()) == null ? void 0 : a.proxy;
|
|
3530
3530
|
let o = null;
|
|
3531
3531
|
const r = e[0];
|
|
3532
|
-
let [, n,
|
|
3533
|
-
Array.isArray(
|
|
3532
|
+
let [, n, d] = e;
|
|
3533
|
+
Array.isArray(M(n)) || (d = n, n = null);
|
|
3534
3534
|
let s = null;
|
|
3535
3535
|
const {
|
|
3536
|
-
immediate:
|
|
3537
|
-
clone:
|
|
3536
|
+
immediate: f = !0,
|
|
3537
|
+
clone: p = zl,
|
|
3538
3538
|
forceFallback: m,
|
|
3539
3539
|
fallbackOnBody: i,
|
|
3540
3540
|
customUpdate: u
|
|
3541
|
-
} = (t =
|
|
3542
|
-
function
|
|
3543
|
-
var
|
|
3544
|
-
const { from:
|
|
3545
|
-
o = m && !i ?
|
|
3546
|
-
const
|
|
3547
|
-
la(
|
|
3541
|
+
} = (t = M(d)) != null ? t : {};
|
|
3542
|
+
function v(T) {
|
|
3543
|
+
var F;
|
|
3544
|
+
const { from: V, oldIndex: Z, item: q } = T, $ = Array.from(V.childNodes);
|
|
3545
|
+
o = m && !i ? $.slice(0, -1) : $;
|
|
3546
|
+
const z = M((F = M(n)) == null ? void 0 : F[Z]), Q = p(z);
|
|
3547
|
+
la(z, Q), q[oa] = Q;
|
|
3548
3548
|
}
|
|
3549
|
-
function g(
|
|
3550
|
-
const
|
|
3551
|
-
if (!
|
|
3552
|
-
if (It(
|
|
3553
|
-
const
|
|
3554
|
-
n.value = Ht(
|
|
3549
|
+
function g(T) {
|
|
3550
|
+
const F = T.item[oa];
|
|
3551
|
+
if (!vl(F)) {
|
|
3552
|
+
if (It(T.item), Oe(n)) {
|
|
3553
|
+
const V = [...M(n)];
|
|
3554
|
+
n.value = Ht(V, T.newDraggableIndex, F);
|
|
3555
3555
|
return;
|
|
3556
3556
|
}
|
|
3557
|
-
Ht(
|
|
3557
|
+
Ht(M(n), T.newDraggableIndex, F);
|
|
3558
3558
|
}
|
|
3559
3559
|
}
|
|
3560
|
-
function
|
|
3561
|
-
const { from:
|
|
3562
|
-
if (Xt(
|
|
3563
|
-
It(
|
|
3560
|
+
function D(T) {
|
|
3561
|
+
const { from: F, item: V, oldIndex: Z, oldDraggableIndex: q, pullMode: $, clone: z } = T;
|
|
3562
|
+
if (Xt(F, V, Z), $ === "clone") {
|
|
3563
|
+
It(z);
|
|
3564
3564
|
return;
|
|
3565
3565
|
}
|
|
3566
3566
|
if (Oe(n)) {
|
|
3567
|
-
const
|
|
3568
|
-
n.value = jt(
|
|
3567
|
+
const Q = [...M(n)];
|
|
3568
|
+
n.value = jt(Q, q);
|
|
3569
3569
|
return;
|
|
3570
3570
|
}
|
|
3571
|
-
jt(
|
|
3571
|
+
jt(M(n), q);
|
|
3572
3572
|
}
|
|
3573
|
-
function
|
|
3573
|
+
function c(T) {
|
|
3574
3574
|
if (u) {
|
|
3575
|
-
u(
|
|
3575
|
+
u(T);
|
|
3576
3576
|
return;
|
|
3577
3577
|
}
|
|
3578
|
-
const { from:
|
|
3579
|
-
if (It(
|
|
3580
|
-
const
|
|
3578
|
+
const { from: F, item: V, oldIndex: Z, oldDraggableIndex: q, newDraggableIndex: $ } = T;
|
|
3579
|
+
if (It(V), Xt(F, V, Z), Oe(n)) {
|
|
3580
|
+
const z = [...M(n)];
|
|
3581
3581
|
n.value = $t(
|
|
3582
|
-
|
|
3582
|
+
z,
|
|
3583
3583
|
q,
|
|
3584
|
-
|
|
3584
|
+
$
|
|
3585
3585
|
);
|
|
3586
3586
|
return;
|
|
3587
3587
|
}
|
|
3588
|
-
$t(
|
|
3588
|
+
$t(M(n), q, $);
|
|
3589
3589
|
}
|
|
3590
|
-
function
|
|
3591
|
-
const { newIndex:
|
|
3592
|
-
let
|
|
3593
|
-
const
|
|
3590
|
+
function _(T) {
|
|
3591
|
+
const { newIndex: F, oldIndex: V, from: Z, to: q } = T;
|
|
3592
|
+
let $ = null;
|
|
3593
|
+
const z = F === V && Z === q;
|
|
3594
3594
|
try {
|
|
3595
|
-
if (
|
|
3596
|
-
let
|
|
3595
|
+
if (z) {
|
|
3596
|
+
let Q = null;
|
|
3597
3597
|
o == null || o.some((Ce, ie) => {
|
|
3598
|
-
if (
|
|
3599
|
-
return Z.insertBefore(
|
|
3598
|
+
if (Q && (o == null ? void 0 : o.length) !== q.childNodes.length)
|
|
3599
|
+
return Z.insertBefore(Q, Ce.nextSibling), !0;
|
|
3600
3600
|
const Tt = q.childNodes[ie];
|
|
3601
|
-
|
|
3601
|
+
Q = q == null ? void 0 : q.replaceChild(Ce, Tt);
|
|
3602
3602
|
});
|
|
3603
3603
|
}
|
|
3604
|
-
} catch (
|
|
3605
|
-
|
|
3604
|
+
} catch (Q) {
|
|
3605
|
+
$ = Q;
|
|
3606
3606
|
} finally {
|
|
3607
3607
|
o = null;
|
|
3608
3608
|
}
|
|
3609
3609
|
ra(() => {
|
|
3610
|
-
if (la(),
|
|
3611
|
-
throw
|
|
3610
|
+
if (la(), $)
|
|
3611
|
+
throw $;
|
|
3612
3612
|
});
|
|
3613
3613
|
}
|
|
3614
|
-
const
|
|
3615
|
-
onUpdate:
|
|
3616
|
-
onStart:
|
|
3614
|
+
const O = {
|
|
3615
|
+
onUpdate: c,
|
|
3616
|
+
onStart: v,
|
|
3617
3617
|
onAdd: g,
|
|
3618
|
-
onRemove:
|
|
3619
|
-
onEnd:
|
|
3618
|
+
onRemove: D,
|
|
3619
|
+
onEnd: _
|
|
3620
3620
|
};
|
|
3621
|
-
function
|
|
3622
|
-
const
|
|
3623
|
-
return
|
|
3621
|
+
function U(T) {
|
|
3622
|
+
const F = M(r);
|
|
3623
|
+
return T || (T = gl(F) ? yl(F, l == null ? void 0 : l.$el) : F), T && !_l(T) && (T = T.$el), T || pl("Root element not found"), T;
|
|
3624
3624
|
}
|
|
3625
|
-
function
|
|
3626
|
-
var
|
|
3627
|
-
const
|
|
3628
|
-
return Kt(q, (
|
|
3629
|
-
|
|
3630
|
-
const ie =
|
|
3631
|
-
return
|
|
3625
|
+
function Y() {
|
|
3626
|
+
var T;
|
|
3627
|
+
const F = (T = M(d)) != null ? T : {}, { immediate: V, clone: Z } = F, q = da(F, ["immediate", "clone"]);
|
|
3628
|
+
return Kt(q, ($, z) => {
|
|
3629
|
+
wl($) && (q[$] = (Q, ...Ce) => {
|
|
3630
|
+
const ie = Jl();
|
|
3631
|
+
return Tl(Q, ie), z(Q, ...Ce);
|
|
3632
3632
|
});
|
|
3633
|
-
}),
|
|
3634
|
-
n === null ? {} :
|
|
3633
|
+
}), bl(
|
|
3634
|
+
n === null ? {} : O,
|
|
3635
3635
|
q
|
|
3636
3636
|
);
|
|
3637
3637
|
}
|
|
3638
|
-
const
|
|
3639
|
-
|
|
3638
|
+
const L = (T) => {
|
|
3639
|
+
T = U(T), s && G.destroy(), s = new k(T, Y());
|
|
3640
3640
|
};
|
|
3641
3641
|
le(
|
|
3642
|
-
() =>
|
|
3642
|
+
() => d,
|
|
3643
3643
|
() => {
|
|
3644
|
-
s && Kt(
|
|
3645
|
-
s == null || s.option(
|
|
3644
|
+
s && Kt(Y(), (T, F) => {
|
|
3645
|
+
s == null || s.option(T, F);
|
|
3646
3646
|
});
|
|
3647
3647
|
},
|
|
3648
3648
|
{ deep: !0 }
|
|
3649
3649
|
);
|
|
3650
|
-
const
|
|
3651
|
-
option: (
|
|
3650
|
+
const G = {
|
|
3651
|
+
option: (T, F) => s == null ? void 0 : s.option(T, F),
|
|
3652
3652
|
destroy: () => {
|
|
3653
3653
|
s == null || s.destroy(), s = null;
|
|
3654
3654
|
},
|
|
3655
3655
|
save: () => s == null ? void 0 : s.save(),
|
|
3656
3656
|
toArray: () => s == null ? void 0 : s.toArray(),
|
|
3657
|
-
closest: (...
|
|
3658
|
-
},
|
|
3659
|
-
return
|
|
3660
|
-
|
|
3661
|
-
}),
|
|
3657
|
+
closest: (...T) => s == null ? void 0 : s.closest(...T)
|
|
3658
|
+
}, ue = () => G == null ? void 0 : G.option("disabled", !0), C = () => G == null ? void 0 : G.option("disabled", !1);
|
|
3659
|
+
return Ql(() => {
|
|
3660
|
+
f && L();
|
|
3661
|
+
}), Wl(G.destroy), qe({ start: L, pause: ue, resume: C }, G);
|
|
3662
3662
|
}
|
|
3663
3663
|
const At = [
|
|
3664
3664
|
"update",
|
|
@@ -3673,7 +3673,7 @@ const At = [
|
|
|
3673
3673
|
"clone",
|
|
3674
3674
|
"move",
|
|
3675
3675
|
"change"
|
|
3676
|
-
],
|
|
3676
|
+
], eo = [
|
|
3677
3677
|
"clone",
|
|
3678
3678
|
"animation",
|
|
3679
3679
|
"ghostClass",
|
|
@@ -3718,51 +3718,51 @@ const At = [
|
|
|
3718
3718
|
"target",
|
|
3719
3719
|
"customUpdate",
|
|
3720
3720
|
...At.map((e) => `on${e.replace(/^\S/, (a) => a.toUpperCase())}`)
|
|
3721
|
-
],
|
|
3721
|
+
], to = K({
|
|
3722
3722
|
name: "VueDraggable",
|
|
3723
3723
|
model: {
|
|
3724
3724
|
prop: "modelValue",
|
|
3725
3725
|
event: "update:modelValue"
|
|
3726
3726
|
},
|
|
3727
|
-
props:
|
|
3727
|
+
props: eo,
|
|
3728
3728
|
emits: ["update:modelValue", ...At],
|
|
3729
3729
|
setup(e, { slots: a, emit: t, expose: l, attrs: o }) {
|
|
3730
|
-
const r = At.reduce((
|
|
3730
|
+
const r = At.reduce((p, m) => {
|
|
3731
3731
|
const i = `on${m.replace(/^\S/, (u) => u.toUpperCase())}`;
|
|
3732
|
-
return
|
|
3733
|
-
}, {}), n =
|
|
3734
|
-
const
|
|
3735
|
-
const
|
|
3736
|
-
return
|
|
3732
|
+
return p[i] = (...u) => t(m, ...u), p;
|
|
3733
|
+
}, {}), n = H(() => {
|
|
3734
|
+
const p = Da(e), { modelValue: m } = p, i = da(p, ["modelValue"]), u = Object.entries(i).reduce((v, [g, D]) => {
|
|
3735
|
+
const c = M(D);
|
|
3736
|
+
return c !== void 0 && (v[g] = c), v;
|
|
3737
3737
|
}, {});
|
|
3738
|
-
return qe(qe({}, r),
|
|
3739
|
-
}),
|
|
3738
|
+
return qe(qe({}, r), fl(qe(qe({}, o), u)));
|
|
3739
|
+
}), d = H({
|
|
3740
3740
|
get: () => e.modelValue,
|
|
3741
|
-
set: (
|
|
3742
|
-
}), s =
|
|
3743
|
-
|
|
3741
|
+
set: (p) => t("update:modelValue", p)
|
|
3742
|
+
}), s = I(), f = Ea(
|
|
3743
|
+
Zl(e.target || s, d, n)
|
|
3744
3744
|
);
|
|
3745
|
-
return l(
|
|
3746
|
-
var
|
|
3747
|
-
return Va(e.tag || "div", { ref: s }, (
|
|
3745
|
+
return l(f), () => {
|
|
3746
|
+
var p;
|
|
3747
|
+
return Va(e.tag || "div", { ref: s }, (p = a == null ? void 0 : a.default) == null ? void 0 : p.call(a, f));
|
|
3748
3748
|
};
|
|
3749
3749
|
}
|
|
3750
|
-
}),
|
|
3750
|
+
}), ao = { class: "flex flex-col gap-6" }, no = {
|
|
3751
3751
|
key: 0,
|
|
3752
3752
|
class: "text-sm text-gray-500 flex items-center gap-1.5 -mb-2"
|
|
3753
|
-
},
|
|
3753
|
+
}, lo = { class: "flex items-center justify-between" }, oo = ["onClick"], ro = ["src"], io = { class: "text-xs font-semibold uppercase bg-gray-100 rounded px-2 py-1" }, so = { class: "font-medium" }, uo = { class: "grid grid-cols-3 gap-4" }, co = {
|
|
3754
3754
|
key: 0,
|
|
3755
3755
|
class: "flex flex-col gap-2"
|
|
3756
|
-
},
|
|
3756
|
+
}, po = { class: "flex items-end gap-3" }, mo = {
|
|
3757
3757
|
key: 0,
|
|
3758
3758
|
class: "flex flex-wrap gap-2"
|
|
3759
|
-
},
|
|
3759
|
+
}, fo = {
|
|
3760
3760
|
key: 1,
|
|
3761
3761
|
class: "text-gray-500"
|
|
3762
|
-
},
|
|
3762
|
+
}, vo = {
|
|
3763
3763
|
key: 2,
|
|
3764
3764
|
class: "mt-2 flex gap-3"
|
|
3765
|
-
},
|
|
3765
|
+
}, go = /* @__PURE__ */ K({
|
|
3766
3766
|
__name: "PaymentCheckout",
|
|
3767
3767
|
props: {
|
|
3768
3768
|
terminal: {
|
|
@@ -3775,46 +3775,51 @@ const At = [
|
|
|
3775
3775
|
}
|
|
3776
3776
|
},
|
|
3777
3777
|
setup(e) {
|
|
3778
|
-
const a = e, t = () => (a.terminal.paymentCheckouts ?? []).map((
|
|
3778
|
+
const a = e, t = () => (a.terminal.paymentCheckouts ?? []).map((c) => ({ ...c })).sort((c, _) => (c.sortOrder ?? 0) - (_.sortOrder ?? 0)), l = I(t());
|
|
3779
3779
|
le(
|
|
3780
3780
|
() => a.terminal.paymentCheckouts,
|
|
3781
3781
|
() => {
|
|
3782
|
-
l.value = t();
|
|
3782
|
+
l.value = t(), n.value = /* @__PURE__ */ new Set();
|
|
3783
3783
|
}
|
|
3784
3784
|
);
|
|
3785
3785
|
function o() {
|
|
3786
|
-
l.value.forEach((
|
|
3787
|
-
|
|
3786
|
+
l.value.forEach((c, _) => {
|
|
3787
|
+
c.sortOrder = _;
|
|
3788
3788
|
});
|
|
3789
3789
|
}
|
|
3790
|
-
const r = (
|
|
3791
|
-
function c
|
|
3792
|
-
const
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3790
|
+
const r = (c) => c.type === "ecr" || c.type === "ecr_qr", n = I(/* @__PURE__ */ new Set()), d = (c) => n.value.has(c.id);
|
|
3791
|
+
function s(c) {
|
|
3792
|
+
const _ = new Set(n.value);
|
|
3793
|
+
_.has(c.id) ? _.delete(c.id) : _.add(c.id), n.value = _;
|
|
3794
|
+
}
|
|
3795
|
+
const f = I({});
|
|
3796
|
+
function p(c) {
|
|
3797
|
+
const _ = (f.value[c.id] ?? "").trim().toUpperCase();
|
|
3798
|
+
if (!_) return;
|
|
3799
|
+
const O = c.fallbackCardTypes ?? [];
|
|
3800
|
+
O.includes(_) || (c.fallbackCardTypes = [...O, _]), f.value[c.id] = "";
|
|
3796
3801
|
}
|
|
3797
|
-
function
|
|
3798
|
-
const
|
|
3799
|
-
|
|
3802
|
+
function m(c, _) {
|
|
3803
|
+
const O = (c.fallbackCardTypes ?? []).filter((U) => U !== _);
|
|
3804
|
+
c.fallbackCardTypes = O.length > 0 ? O : null;
|
|
3800
3805
|
}
|
|
3801
|
-
const
|
|
3806
|
+
const i = {
|
|
3802
3807
|
card: "Card",
|
|
3803
3808
|
ecr: "ECR",
|
|
3804
3809
|
ecr_qr: "ECR QR",
|
|
3805
3810
|
qr: "QR",
|
|
3806
3811
|
scanpay: "Scan Pay"
|
|
3807
|
-
},
|
|
3808
|
-
async function
|
|
3812
|
+
}, u = (c) => c.action ? `${c.gateway} (${c.action})` : c.gateway;
|
|
3813
|
+
async function v() {
|
|
3809
3814
|
await a.onUpdate({
|
|
3810
3815
|
...a.terminal,
|
|
3811
3816
|
paymentCheckouts: l.value
|
|
3812
3817
|
});
|
|
3813
3818
|
}
|
|
3814
|
-
const
|
|
3815
|
-
function
|
|
3816
|
-
|
|
3817
|
-
|
|
3819
|
+
const g = Ga();
|
|
3820
|
+
function D() {
|
|
3821
|
+
ja(
|
|
3822
|
+
g,
|
|
3818
3823
|
"Reset Payment Checkout",
|
|
3819
3824
|
"This will clear all customizations (display name, subtitle, icon, payment description, payment tagline, sort order, enabled state) for every payment method on this terminal and restore the defaults. This action cannot be undone.",
|
|
3820
3825
|
async () => {
|
|
@@ -3825,147 +3830,158 @@ const At = [
|
|
|
3825
3830
|
}
|
|
3826
3831
|
);
|
|
3827
3832
|
}
|
|
3828
|
-
return (
|
|
3829
|
-
const
|
|
3830
|
-
return b(),
|
|
3831
|
-
l.value.length > 0 ? (b(),
|
|
3832
|
-
|
|
3833
|
-
y(
|
|
3833
|
+
return (c, _) => {
|
|
3834
|
+
const O = w("FmIcon"), U = w("FmTooltip"), Y = w("FmSwitch"), L = w("FmTextField"), G = w("FmButton"), ue = w("FmChip");
|
|
3835
|
+
return b(), R("div", ao, [
|
|
3836
|
+
l.value.length > 0 ? (b(), R("p", no, [
|
|
3837
|
+
_[2] || (_[2] = Ve(" Drag the ", -1)),
|
|
3838
|
+
y(O, {
|
|
3834
3839
|
class: "text-gray-400 mx-0.5",
|
|
3835
3840
|
name: "drag_indicator"
|
|
3836
3841
|
}),
|
|
3837
|
-
|
|
3838
|
-
])) :
|
|
3839
|
-
y(
|
|
3842
|
+
_[3] || (_[3] = Ve(" handle to reorder payment checkouts ", -1))
|
|
3843
|
+
])) : B("", !0),
|
|
3844
|
+
y(M(to), {
|
|
3840
3845
|
modelValue: l.value,
|
|
3841
|
-
"onUpdate:modelValue":
|
|
3846
|
+
"onUpdate:modelValue": _[1] || (_[1] = (C) => l.value = C),
|
|
3842
3847
|
handle: ".checkout-drag-handle",
|
|
3843
3848
|
class: "flex flex-col gap-6",
|
|
3844
3849
|
"drag-class": "dragging-card",
|
|
3845
3850
|
"ghost-class": "sortable-ghost-card",
|
|
3846
3851
|
onEnd: o
|
|
3847
3852
|
}, {
|
|
3848
|
-
default:
|
|
3849
|
-
(b(!0),
|
|
3850
|
-
key:
|
|
3851
|
-
class: "border rounded-lg
|
|
3853
|
+
default: ne(() => [
|
|
3854
|
+
(b(!0), R(ae, null, ye(l.value, (C) => (b(), R("div", {
|
|
3855
|
+
key: C.id,
|
|
3856
|
+
class: Ua(["border rounded-lg px-6 flex flex-col gap-4", d(C) ? "py-6" : "py-3"])
|
|
3852
3857
|
}, [
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3858
|
+
x("div", lo, [
|
|
3859
|
+
x("div", {
|
|
3860
|
+
class: "flex items-center gap-3 flex-1 cursor-pointer select-none",
|
|
3861
|
+
onClick: (T) => s(C)
|
|
3862
|
+
}, [
|
|
3863
|
+
y(O, {
|
|
3856
3864
|
class: "checkout-drag-handle cursor-grab text-gray-400",
|
|
3857
|
-
name: "drag_indicator"
|
|
3865
|
+
name: "drag_indicator",
|
|
3866
|
+
onClick: _[0] || (_[0] = Ma(() => {
|
|
3867
|
+
}, ["stop"]))
|
|
3858
3868
|
}),
|
|
3859
|
-
y(
|
|
3869
|
+
y(O, {
|
|
3870
|
+
class: "text-gray-400",
|
|
3871
|
+
name: d(C) ? "expand_less" : "expand_more"
|
|
3872
|
+
}, null, 8, ["name"]),
|
|
3873
|
+
y(U, {
|
|
3860
3874
|
variant: "plain",
|
|
3861
3875
|
placement: "top",
|
|
3862
|
-
content:
|
|
3876
|
+
content: C.gateway,
|
|
3863
3877
|
"hide-arrow": !0
|
|
3864
3878
|
}, {
|
|
3865
|
-
default:
|
|
3866
|
-
|
|
3879
|
+
default: ne(() => [
|
|
3880
|
+
x("img", {
|
|
3867
3881
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
3868
|
-
src:
|
|
3869
|
-
}, null, 8,
|
|
3882
|
+
src: M($a)(C.gateway.toUpperCase())
|
|
3883
|
+
}, null, 8, ro)
|
|
3870
3884
|
]),
|
|
3871
3885
|
_: 2
|
|
3872
3886
|
}, 1032, ["content"]),
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
]),
|
|
3876
|
-
y(
|
|
3877
|
-
modelValue:
|
|
3878
|
-
"onUpdate:modelValue": (
|
|
3887
|
+
x("span", io, Re(i[C.type] ?? C.type), 1),
|
|
3888
|
+
x("span", so, Re(u(C)), 1)
|
|
3889
|
+
], 8, oo),
|
|
3890
|
+
y(Y, {
|
|
3891
|
+
modelValue: C.enabled,
|
|
3892
|
+
"onUpdate:modelValue": (T) => C.enabled = T,
|
|
3879
3893
|
label: "Enabled"
|
|
3880
3894
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3881
3895
|
]),
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
r(x) ? (b(), G("div", so, [
|
|
3922
|
-
T("div", uo, [
|
|
3923
|
-
y(U, {
|
|
3924
|
-
modelValue: n.value[x.id],
|
|
3925
|
-
"onUpdate:modelValue": (E) => n.value[x.id] = E,
|
|
3926
|
-
class: "flex-1",
|
|
3927
|
-
label: "Fallback Card Types",
|
|
3928
|
-
"label-info": "Cards offered when a transaction falls back to the reconcile dialog. Default VISA, MASTERCARD.",
|
|
3929
|
-
"label-mark": "optional",
|
|
3930
|
-
onKeyup: Ua((E) => c(x), ["enter"])
|
|
3931
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]),
|
|
3932
|
-
y(M, {
|
|
3933
|
-
icon: "add",
|
|
3934
|
-
onClick: (E) => c(x)
|
|
3935
|
-
}, null, 8, ["onClick"])
|
|
3896
|
+
d(C) ? (b(), R(ae, { key: 0 }, [
|
|
3897
|
+
x("div", uo, [
|
|
3898
|
+
y(L, {
|
|
3899
|
+
modelValue: C.displayName,
|
|
3900
|
+
"onUpdate:modelValue": (T) => C.displayName = T,
|
|
3901
|
+
label: "Display Name"
|
|
3902
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
3903
|
+
y(L, {
|
|
3904
|
+
modelValue: C.subtitle,
|
|
3905
|
+
"onUpdate:modelValue": (T) => C.subtitle = T,
|
|
3906
|
+
label: "Subtitle",
|
|
3907
|
+
"label-mark": "optional"
|
|
3908
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
3909
|
+
y(L, {
|
|
3910
|
+
modelValue: C.icon,
|
|
3911
|
+
"onUpdate:modelValue": (T) => C.icon = T,
|
|
3912
|
+
label: "Icon URL",
|
|
3913
|
+
"label-mark": "optional"
|
|
3914
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
3915
|
+
y(L, {
|
|
3916
|
+
modelValue: C.paymentDescription,
|
|
3917
|
+
"onUpdate:modelValue": (T) => C.paymentDescription = T,
|
|
3918
|
+
label: "Payment Description",
|
|
3919
|
+
"label-mark": "optional"
|
|
3920
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
3921
|
+
y(L, {
|
|
3922
|
+
modelValue: C.paymentTagline,
|
|
3923
|
+
"onUpdate:modelValue": (T) => C.paymentTagline = T,
|
|
3924
|
+
label: "Payment Tagline",
|
|
3925
|
+
"label-mark": "optional"
|
|
3926
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
3927
|
+
r(C) ? (b(), S(L, {
|
|
3928
|
+
key: 0,
|
|
3929
|
+
modelValue: C.receiptPaymentName,
|
|
3930
|
+
"onUpdate:modelValue": (T) => C.receiptPaymentName = T,
|
|
3931
|
+
label: "Receipt Payment Name",
|
|
3932
|
+
"label-info": "Name printed on the receipt. Defaults to TERMINAL_<GATEWAY>.",
|
|
3933
|
+
"label-mark": "optional"
|
|
3934
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : B("", !0)
|
|
3936
3935
|
]),
|
|
3937
|
-
(
|
|
3938
|
-
(
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3936
|
+
r(C) ? (b(), R("div", co, [
|
|
3937
|
+
x("div", po, [
|
|
3938
|
+
y(L, {
|
|
3939
|
+
modelValue: f.value[C.id],
|
|
3940
|
+
"onUpdate:modelValue": (T) => f.value[C.id] = T,
|
|
3941
|
+
class: "flex-1",
|
|
3942
|
+
label: "Fallback Card Types",
|
|
3943
|
+
"label-info": "Cards offered when a transaction falls back to the reconcile dialog. Default VISA, MASTERCARD.",
|
|
3944
|
+
"label-mark": "optional",
|
|
3945
|
+
onKeyup: Pa((T) => p(C), ["enter"])
|
|
3946
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]),
|
|
3947
|
+
y(G, {
|
|
3948
|
+
icon: "add",
|
|
3949
|
+
onClick: (T) => p(C)
|
|
3950
|
+
}, null, 8, ["onClick"])
|
|
3951
|
+
]),
|
|
3952
|
+
(C.fallbackCardTypes ?? []).length > 0 ? (b(), R("div", mo, [
|
|
3953
|
+
(b(!0), R(ae, null, ye(C.fallbackCardTypes ?? [], (T) => (b(), S(ue, {
|
|
3954
|
+
key: T,
|
|
3955
|
+
label: T,
|
|
3956
|
+
removable: !0,
|
|
3957
|
+
onChipClosed: () => m(C, T)
|
|
3958
|
+
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
3959
|
+
])) : B("", !0)
|
|
3960
|
+
])) : B("", !0)
|
|
3961
|
+
], 64)) : B("", !0)
|
|
3962
|
+
], 2))), 128))
|
|
3947
3963
|
]),
|
|
3948
3964
|
_: 1
|
|
3949
3965
|
}, 8, ["modelValue"]),
|
|
3950
|
-
l.value.length === 0 ? (b(),
|
|
3951
|
-
l.value.length > 0 ? (b(),
|
|
3952
|
-
y(
|
|
3966
|
+
l.value.length === 0 ? (b(), R("div", fo, " No payment methods configured for this terminal. ")) : B("", !0),
|
|
3967
|
+
l.value.length > 0 ? (b(), R("div", vo, [
|
|
3968
|
+
y(G, {
|
|
3953
3969
|
variant: "secondary",
|
|
3954
3970
|
label: "Reset",
|
|
3955
3971
|
icon: "restart_alt",
|
|
3956
|
-
onclick:
|
|
3972
|
+
onclick: D
|
|
3957
3973
|
}),
|
|
3958
|
-
y(
|
|
3974
|
+
y(G, {
|
|
3959
3975
|
variant: "primary",
|
|
3960
3976
|
label: "Save",
|
|
3961
3977
|
icon: "save",
|
|
3962
|
-
onclick:
|
|
3978
|
+
onclick: v
|
|
3963
3979
|
})
|
|
3964
|
-
])) :
|
|
3980
|
+
])) : B("", !0)
|
|
3965
3981
|
]);
|
|
3966
3982
|
};
|
|
3967
3983
|
}
|
|
3968
|
-
}),
|
|
3984
|
+
}), yo = /* @__PURE__ */ Ha(go, [["__scopeId", "data-v-12be5a96"]]), Oo = /* @__PURE__ */ K({
|
|
3969
3985
|
__name: "TerminalSetting",
|
|
3970
3986
|
props: {
|
|
3971
3987
|
terminalId: {
|
|
@@ -3976,7 +3992,7 @@ const At = [
|
|
|
3976
3992
|
setup(e) {
|
|
3977
3993
|
const a = e, { tab: t } = bt({
|
|
3978
3994
|
tab: "information"
|
|
3979
|
-
}), { isLoading: l, startAsyncCall: o } = ht(!0), r =
|
|
3995
|
+
}), { isLoading: l, startAsyncCall: o } = ht(!0), r = Ra(), n = qt(), d = I();
|
|
3980
3996
|
async function s(u) {
|
|
3981
3997
|
o(async () => {
|
|
3982
3998
|
try {
|
|
@@ -3991,94 +4007,94 @@ const At = [
|
|
|
3991
4007
|
qrIntegrations: u.qrIntegrations ?? [],
|
|
3992
4008
|
paymentCheckouts: u.paymentCheckouts ?? []
|
|
3993
4009
|
}
|
|
3994
|
-
),
|
|
4010
|
+
), d.value = await Ue.readById(a.terminalId), n.open({
|
|
3995
4011
|
type: "success",
|
|
3996
4012
|
message: "Terminal updated successfully"
|
|
3997
4013
|
});
|
|
3998
|
-
} catch (
|
|
4014
|
+
} catch (v) {
|
|
3999
4015
|
n.open({
|
|
4000
4016
|
type: "error",
|
|
4001
4017
|
title: "Error occurs when update terminal",
|
|
4002
|
-
message: nt(
|
|
4018
|
+
message: nt(v)
|
|
4003
4019
|
});
|
|
4004
4020
|
}
|
|
4005
4021
|
});
|
|
4006
4022
|
}
|
|
4007
|
-
const
|
|
4023
|
+
const f = [
|
|
4008
4024
|
{
|
|
4009
4025
|
label: "Information",
|
|
4010
4026
|
value: "information",
|
|
4011
4027
|
icon: "overview",
|
|
4012
|
-
render:
|
|
4028
|
+
render: Xa
|
|
4013
4029
|
},
|
|
4014
4030
|
{
|
|
4015
4031
|
label: "Setting Request",
|
|
4016
4032
|
value: "settings",
|
|
4017
4033
|
icon: "settings",
|
|
4018
|
-
render:
|
|
4034
|
+
render: Qa,
|
|
4019
4035
|
onlyFor: ["TERMINAL"]
|
|
4020
4036
|
},
|
|
4021
4037
|
{
|
|
4022
4038
|
label: "SoftPos Gateway",
|
|
4023
4039
|
value: "softpos",
|
|
4024
4040
|
icon: "payment",
|
|
4025
|
-
render:
|
|
4041
|
+
render: on
|
|
4026
4042
|
},
|
|
4027
4043
|
{
|
|
4028
4044
|
label: "ECR Gateway",
|
|
4029
4045
|
value: "ecr",
|
|
4030
4046
|
icon: "point_of_sale",
|
|
4031
|
-
render:
|
|
4047
|
+
render: nl,
|
|
4032
4048
|
onlyFor: ["POS", "KIOSK"]
|
|
4033
4049
|
},
|
|
4034
4050
|
{
|
|
4035
4051
|
label: "QR Gateway",
|
|
4036
4052
|
value: "qr",
|
|
4037
4053
|
icon: "qr_code",
|
|
4038
|
-
render:
|
|
4054
|
+
render: ul,
|
|
4039
4055
|
onlyFor: ["POS", "KIOSK"]
|
|
4040
4056
|
},
|
|
4041
4057
|
{
|
|
4042
4058
|
label: "Payment Checkout",
|
|
4043
4059
|
value: "payment-checkout",
|
|
4044
4060
|
icon: "tune",
|
|
4045
|
-
render:
|
|
4061
|
+
render: yo,
|
|
4046
4062
|
onlyFor: ["KIOSK", "POS", "TERMINAL"]
|
|
4047
4063
|
}
|
|
4048
4064
|
];
|
|
4049
4065
|
_t().currentCountry;
|
|
4050
|
-
const
|
|
4066
|
+
const p = H(() => {
|
|
4051
4067
|
var u;
|
|
4052
|
-
return (u =
|
|
4068
|
+
return (u = f.find((v) => v.value === t.value)) == null ? void 0 : u.render;
|
|
4053
4069
|
});
|
|
4054
4070
|
async function m() {
|
|
4055
4071
|
o(async () => {
|
|
4056
|
-
|
|
4072
|
+
d.value = await Ue.readById(a.terminalId);
|
|
4057
4073
|
});
|
|
4058
4074
|
}
|
|
4059
|
-
const i =
|
|
4060
|
-
var
|
|
4061
|
-
return !u.onlyFor || u.onlyFor.includes(((
|
|
4075
|
+
const i = H(() => f.filter((u) => {
|
|
4076
|
+
var v;
|
|
4077
|
+
return !u.onlyFor || u.onlyFor.includes(((v = d.value) == null ? void 0 : v.deviceType) ?? "");
|
|
4062
4078
|
}));
|
|
4063
|
-
return re(m), (u,
|
|
4064
|
-
var
|
|
4065
|
-
const g =
|
|
4066
|
-
return b(), S(
|
|
4067
|
-
title: `${(
|
|
4068
|
-
loading:
|
|
4069
|
-
onBack:
|
|
4079
|
+
return re(m), (u, v) => {
|
|
4080
|
+
var D, c;
|
|
4081
|
+
const g = w("FmTabs");
|
|
4082
|
+
return b(), S(qa, {
|
|
4083
|
+
title: `${(D = d.value) == null ? void 0 : D.deviceType} (${(c = d.value) == null ? void 0 : c._id})`,
|
|
4084
|
+
loading: M(l),
|
|
4085
|
+
onBack: M(r).back
|
|
4070
4086
|
}, {
|
|
4071
|
-
default:
|
|
4087
|
+
default: ne(() => [
|
|
4072
4088
|
y(g, {
|
|
4073
|
-
"model-value":
|
|
4074
|
-
"onUpdate:modelValue":
|
|
4089
|
+
"model-value": M(t),
|
|
4090
|
+
"onUpdate:modelValue": v[0] || (v[0] = (_) => Oe(t) ? t.value = _ : null),
|
|
4075
4091
|
class: "mb-6",
|
|
4076
4092
|
items: i.value
|
|
4077
4093
|
}, null, 8, ["model-value", "items"]),
|
|
4078
|
-
|
|
4079
|
-
terminal:
|
|
4094
|
+
M(t) ? (b(), S(vt(p.value), gt(yt({ key: 0 }, {
|
|
4095
|
+
terminal: d.value,
|
|
4080
4096
|
onUpdate: s
|
|
4081
|
-
})), null, 16)) :
|
|
4097
|
+
})), null, 16)) : B("", !0)
|
|
4082
4098
|
]),
|
|
4083
4099
|
_: 1
|
|
4084
4100
|
}, 8, ["title", "loading", "onBack"]);
|
|
@@ -4086,5 +4102,5 @@ const At = [
|
|
|
4086
4102
|
}
|
|
4087
4103
|
});
|
|
4088
4104
|
export {
|
|
4089
|
-
|
|
4105
|
+
Oo as default
|
|
4090
4106
|
};
|