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