@paypay/mini-app-js-sdk 1.55.0 → 1.57.0
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/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +1756 -1310
- package/dist/mini-app-js-sdk.min.css +1 -1
- package/dist/model/makePayment.d.ts +5 -0
- package/dist/utils/jsBridge.d.ts +3 -0
- package/dist/utils/minimumAppVersion.d.ts +1 -0
- package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +0 -11
- package/package.json +5 -5
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key2, value2) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key2] = value2;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
1
|
const jsBridgeNamespace = "_PayPayJsBridge";
|
|
33
2
|
const paypayNamespaces = ["PayPayJsBridge", "pp"];
|
|
34
3
|
function exposeJsBridge(jsBridge2) {
|
|
@@ -41,7 +10,9 @@ function exposeJsBridge(jsBridge2) {
|
|
|
41
10
|
}
|
|
42
11
|
function exposePayPayJsBridge(paypayJsBridge2) {
|
|
43
12
|
const global2 = window;
|
|
44
|
-
if (paypayNamespaces.some(
|
|
13
|
+
if (paypayNamespaces.some(
|
|
14
|
+
(ns) => window.hasOwnProperty(ns) && global2[ns] === paypayJsBridge2
|
|
15
|
+
)) {
|
|
45
16
|
return false;
|
|
46
17
|
}
|
|
47
18
|
for (const ns of paypayNamespaces) {
|
|
@@ -60,12 +31,6 @@ var logger = {
|
|
|
60
31
|
log: log(),
|
|
61
32
|
debug: log()
|
|
62
33
|
};
|
|
63
|
-
var NativeResponseStatus;
|
|
64
|
-
(function(NativeResponseStatus2) {
|
|
65
|
-
NativeResponseStatus2["Succcess"] = "success";
|
|
66
|
-
NativeResponseStatus2["Fail"] = "fail";
|
|
67
|
-
NativeResponseStatus2["Complete"] = "complete";
|
|
68
|
-
})(NativeResponseStatus || (NativeResponseStatus = {}));
|
|
69
34
|
const noop$1 = (...args) => {
|
|
70
35
|
};
|
|
71
36
|
function normalizeNativeResponseData(data2) {
|
|
@@ -73,7 +38,7 @@ function normalizeNativeResponseData(data2) {
|
|
|
73
38
|
return data2;
|
|
74
39
|
}
|
|
75
40
|
return {
|
|
76
|
-
status: [1, 2].includes(data2.status) ?
|
|
41
|
+
status: [1, 2].includes(data2.status) ? "success" : "fail",
|
|
77
42
|
data: (() => {
|
|
78
43
|
try {
|
|
79
44
|
return JSON.parse(data2.msg);
|
|
@@ -85,10 +50,10 @@ function normalizeNativeResponseData(data2) {
|
|
|
85
50
|
}
|
|
86
51
|
class JsBridge {
|
|
87
52
|
constructor(global2) {
|
|
88
|
-
this.version = "1.
|
|
89
|
-
this.revision = "
|
|
90
|
-
this.messageHandlers = new Map();
|
|
91
|
-
this.responseCallbacks = new Map();
|
|
53
|
+
this.version = "1.57.0";
|
|
54
|
+
this.revision = "301ccc9";
|
|
55
|
+
this.messageHandlers = /* @__PURE__ */ new Map();
|
|
56
|
+
this.responseCallbacks = /* @__PURE__ */ new Map();
|
|
92
57
|
this.global = global2;
|
|
93
58
|
}
|
|
94
59
|
generateCallbackId() {
|
|
@@ -106,23 +71,27 @@ class JsBridge {
|
|
|
106
71
|
this.dispatchMessageToNative(handlerName, params, responseCallback || noop$1);
|
|
107
72
|
}
|
|
108
73
|
callNative(methodName, params, options = {}) {
|
|
109
|
-
const
|
|
74
|
+
const { complete, fail, success: success2, ...methodParams } = params || {};
|
|
110
75
|
const { transformResponse = (v) => v } = options;
|
|
111
76
|
try {
|
|
112
|
-
this.dispatchMessageToNative(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
77
|
+
this.dispatchMessageToNative(
|
|
78
|
+
methodName,
|
|
79
|
+
methodParams,
|
|
80
|
+
(data2) => {
|
|
81
|
+
var _a2, _b, _c;
|
|
82
|
+
let returnData = ((_c = (_b = (_a2 = this.global) == null ? void 0 : _a2.webkit) == null ? void 0 : _b.messageHandlers) == null ? void 0 : _c[methodName]) ? JSON.parse(data2 == null ? void 0 : data2.data) : data2 == null ? void 0 : data2.data;
|
|
83
|
+
switch (data2.status) {
|
|
84
|
+
case "complete":
|
|
85
|
+
complete && complete(returnData);
|
|
86
|
+
break;
|
|
87
|
+
case "fail":
|
|
88
|
+
fail && fail(returnData);
|
|
89
|
+
break;
|
|
90
|
+
case "success":
|
|
91
|
+
success2 && success2(transformResponse(returnData));
|
|
92
|
+
}
|
|
124
93
|
}
|
|
125
|
-
|
|
94
|
+
);
|
|
126
95
|
} catch (e) {
|
|
127
96
|
fail && fail(e);
|
|
128
97
|
}
|
|
@@ -148,7 +117,7 @@ class JsBridge {
|
|
|
148
117
|
return;
|
|
149
118
|
}
|
|
150
119
|
responseCallback(normalizeNativeResponseData(message.responseData));
|
|
151
|
-
if (message.responseData.status ===
|
|
120
|
+
if (message.responseData.status === "complete" || typeof message.responseData.status === "number") {
|
|
152
121
|
this.responseCallbacks.delete(message.responseId);
|
|
153
122
|
logger.log({
|
|
154
123
|
log: "DELETED",
|
|
@@ -160,8 +129,8 @@ class JsBridge {
|
|
|
160
129
|
this.handleMessageFromNative(message);
|
|
161
130
|
}
|
|
162
131
|
}
|
|
163
|
-
|
|
164
|
-
(
|
|
132
|
+
const jsBridge$1 = new JsBridge(window);
|
|
133
|
+
var MiniAppErrorType = /* @__PURE__ */ ((MiniAppErrorType2) => {
|
|
165
134
|
MiniAppErrorType2["success"] = "SUCCESS";
|
|
166
135
|
MiniAppErrorType2["invalidUrl"] = "INVALID_URL";
|
|
167
136
|
MiniAppErrorType2["invalidData"] = "INVALID_DATA";
|
|
@@ -215,7 +184,8 @@ var MiniAppErrorType;
|
|
|
215
184
|
MiniAppErrorType2["kycIncompleted"] = "KYC_INCOMPLETED";
|
|
216
185
|
MiniAppErrorType2["noBankAccount"] = "NO_BANK_ACCOUNT";
|
|
217
186
|
MiniAppErrorType2["invalidPaymentIdentifier"] = "INVALID_PAYMENT_IDENTIFIER";
|
|
218
|
-
|
|
187
|
+
return MiniAppErrorType2;
|
|
188
|
+
})(MiniAppErrorType || {});
|
|
219
189
|
class PayPayJsBridgeBase {
|
|
220
190
|
constructor(jsBridge2) {
|
|
221
191
|
this.jsBridge = jsBridge2;
|
|
@@ -244,7 +214,10 @@ const protectedProperties = ["constructor"];
|
|
|
244
214
|
function composePayPayJsBridge(bridgeConstructor, ...moduleConstructors) {
|
|
245
215
|
moduleConstructors.forEach((moduleConstructor) => {
|
|
246
216
|
Object.getOwnPropertyNames(moduleConstructor.prototype).filter((name2) => !protectedProperties.includes(name2)).forEach((name2) => {
|
|
247
|
-
const property2 = Object.getOwnPropertyDescriptor(
|
|
217
|
+
const property2 = Object.getOwnPropertyDescriptor(
|
|
218
|
+
moduleConstructor.prototype,
|
|
219
|
+
name2
|
|
220
|
+
);
|
|
248
221
|
Object.defineProperty(bridgeConstructor.prototype, name2, property2);
|
|
249
222
|
});
|
|
250
223
|
});
|
|
@@ -269,7 +242,10 @@ var defaultConverter = {
|
|
|
269
242
|
return value2.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
270
243
|
},
|
|
271
244
|
write: function(value2) {
|
|
272
|
-
return encodeURIComponent(value2).replace(
|
|
245
|
+
return encodeURIComponent(value2).replace(
|
|
246
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
247
|
+
decodeURIComponent
|
|
248
|
+
);
|
|
273
249
|
}
|
|
274
250
|
};
|
|
275
251
|
function init$1(converter, defaultAttributes) {
|
|
@@ -318,24 +294,31 @@ function init$1(converter, defaultAttributes) {
|
|
|
318
294
|
}
|
|
319
295
|
return key2 ? jar[key2] : jar;
|
|
320
296
|
}
|
|
321
|
-
return Object.create(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
297
|
+
return Object.create(
|
|
298
|
+
{
|
|
299
|
+
set: set2,
|
|
300
|
+
get: get2,
|
|
301
|
+
remove: function(key2, attributes) {
|
|
302
|
+
set2(
|
|
303
|
+
key2,
|
|
304
|
+
"",
|
|
305
|
+
assign$1({}, attributes, {
|
|
306
|
+
expires: -1
|
|
307
|
+
})
|
|
308
|
+
);
|
|
309
|
+
},
|
|
310
|
+
withAttributes: function(attributes) {
|
|
311
|
+
return init$1(this.converter, assign$1({}, this.attributes, attributes));
|
|
312
|
+
},
|
|
313
|
+
withConverter: function(converter2) {
|
|
314
|
+
return init$1(assign$1({}, this.converter, converter2), this.attributes);
|
|
315
|
+
}
|
|
331
316
|
},
|
|
332
|
-
|
|
333
|
-
|
|
317
|
+
{
|
|
318
|
+
attributes: { value: Object.freeze(defaultAttributes) },
|
|
319
|
+
converter: { value: Object.freeze(converter) }
|
|
334
320
|
}
|
|
335
|
-
|
|
336
|
-
attributes: { value: Object.freeze(defaultAttributes) },
|
|
337
|
-
converter: { value: Object.freeze(converter) }
|
|
338
|
-
});
|
|
321
|
+
);
|
|
339
322
|
}
|
|
340
323
|
var api = init$1(defaultConverter, { path: "/" });
|
|
341
324
|
var getRandomValues;
|
|
@@ -379,25 +362,7 @@ function v4(options, buf, offset) {
|
|
|
379
362
|
}
|
|
380
363
|
return stringify(rnds);
|
|
381
364
|
}
|
|
382
|
-
var
|
|
383
|
-
(function(ButtonStyle2) {
|
|
384
|
-
ButtonStyle2["primary"] = "primary";
|
|
385
|
-
ButtonStyle2["secondary"] = "secondary";
|
|
386
|
-
})(ButtonStyle || (ButtonStyle = {}));
|
|
387
|
-
var EndpointType;
|
|
388
|
-
(function(EndpointType2) {
|
|
389
|
-
EndpointType2["BFF"] = "bff";
|
|
390
|
-
EndpointType2["GFF"] = "gff";
|
|
391
|
-
})(EndpointType || (EndpointType = {}));
|
|
392
|
-
var Environment;
|
|
393
|
-
(function(Environment2) {
|
|
394
|
-
Environment2["DEV"] = "dev";
|
|
395
|
-
Environment2["STG"] = "stg";
|
|
396
|
-
Environment2["CANARY"] = "canary";
|
|
397
|
-
Environment2["PRD"] = "prd";
|
|
398
|
-
})(Environment || (Environment = {}));
|
|
399
|
-
var PpLocalStorageKey;
|
|
400
|
-
(function(PpLocalStorageKey2) {
|
|
365
|
+
var PpLocalStorageKey = /* @__PURE__ */ ((PpLocalStorageKey2) => {
|
|
401
366
|
PpLocalStorageKey2["accessToken"] = "ppjssdk.accessToken";
|
|
402
367
|
PpLocalStorageKey2["refreshToken"] = "ppjssdk.refreshToken";
|
|
403
368
|
PpLocalStorageKey2["env"] = "ppjssdk.env";
|
|
@@ -412,18 +377,19 @@ var PpLocalStorageKey;
|
|
|
412
377
|
PpLocalStorageKey2["lastPaymentMethod"] = "ppjssdk.lastPaymentMethod";
|
|
413
378
|
PpLocalStorageKey2["lastTopupPayMethod"] = "ppjssdk.lastTopupPayMethod";
|
|
414
379
|
PpLocalStorageKey2["codeVerifier"] = "ppjssdk.codeVerifier";
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
(
|
|
380
|
+
return PpLocalStorageKey2;
|
|
381
|
+
})(PpLocalStorageKey || {});
|
|
382
|
+
var CookieDuration = /* @__PURE__ */ ((CookieDuration2) => {
|
|
418
383
|
CookieDuration2[CookieDuration2["oneDay"] = 1] = "oneDay";
|
|
419
384
|
CookieDuration2[CookieDuration2["oneMonth"] = 30] = "oneMonth";
|
|
420
385
|
CookieDuration2[CookieDuration2["oneYear"] = 365] = "oneYear";
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
(
|
|
386
|
+
return CookieDuration2;
|
|
387
|
+
})(CookieDuration || {});
|
|
388
|
+
var RenderType = /* @__PURE__ */ ((RenderType2) => {
|
|
424
389
|
RenderType2["COVER"] = "cover";
|
|
425
390
|
RenderType2["CONTAIN"] = "contain";
|
|
426
|
-
|
|
391
|
+
return RenderType2;
|
|
392
|
+
})(RenderType || {});
|
|
427
393
|
const PaymentFeatureTypes = {
|
|
428
394
|
PRE_TRANSACTION_AUTO_CHARGE: "PRE_TRANSACTION_AUTO_CHARGE",
|
|
429
395
|
FALLBACK_PAYMENT_METHOD: "FALLBACK_PAYMENT_METHOD",
|
|
@@ -434,10 +400,10 @@ const ConsultPaymentFeatureTypes = {
|
|
|
434
400
|
FALLBACK_PAYMENT_METHOD: "FALLBACK_PAYMENT_METHOD",
|
|
435
401
|
NONE: "NONE"
|
|
436
402
|
};
|
|
437
|
-
var ChallengeMethod
|
|
438
|
-
(function(ChallengeMethod2) {
|
|
403
|
+
var ChallengeMethod = /* @__PURE__ */ ((ChallengeMethod2) => {
|
|
439
404
|
ChallengeMethod2["S256"] = "S256";
|
|
440
|
-
|
|
405
|
+
return ChallengeMethod2;
|
|
406
|
+
})(ChallengeMethod || {});
|
|
441
407
|
function isLocalIP(hostName) {
|
|
442
408
|
if (hostName === "localhost") {
|
|
443
409
|
return true;
|
|
@@ -860,10 +826,18 @@ function saveLastPayment(payment2) {
|
|
|
860
826
|
saveCookie(PpLocalStorageKey.lastPayment, payment2, CookieDuration.oneDay);
|
|
861
827
|
}
|
|
862
828
|
function saveLastPaymentMethod(methodId) {
|
|
863
|
-
saveCookie(
|
|
829
|
+
saveCookie(
|
|
830
|
+
PpLocalStorageKey.lastPaymentMethod,
|
|
831
|
+
methodId,
|
|
832
|
+
CookieDuration.oneMonth
|
|
833
|
+
);
|
|
864
834
|
}
|
|
865
835
|
function saveLastTopupPayMethod(methodId) {
|
|
866
|
-
saveCookie(
|
|
836
|
+
saveCookie(
|
|
837
|
+
PpLocalStorageKey.lastTopupPayMethod,
|
|
838
|
+
methodId,
|
|
839
|
+
CookieDuration.oneMonth
|
|
840
|
+
);
|
|
867
841
|
}
|
|
868
842
|
function getLastPaymentMethod$1() {
|
|
869
843
|
return api.get(PpLocalStorageKey.lastPaymentMethod);
|
|
@@ -1306,9 +1280,8 @@ var ja$1 = {
|
|
|
1306
1280
|
},
|
|
1307
1281
|
registerPaymentFeatures: registerPaymentFeatures$2
|
|
1308
1282
|
};
|
|
1309
|
-
var ja$2 = /* @__PURE__ */ Object.freeze({
|
|
1283
|
+
var ja$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1310
1284
|
__proto__: null,
|
|
1311
|
-
[Symbol.toStringTag]: "Module",
|
|
1312
1285
|
showUpdateWarning: showUpdateWarning$2,
|
|
1313
1286
|
openApp: openApp$2,
|
|
1314
1287
|
openMap: openMap$2,
|
|
@@ -1339,7 +1312,7 @@ var ja$2 = /* @__PURE__ */ Object.freeze({
|
|
|
1339
1312
|
getBankInfo: getBankInfo$2,
|
|
1340
1313
|
registerPaymentFeatures: registerPaymentFeatures$2,
|
|
1341
1314
|
"default": ja$1
|
|
1342
|
-
});
|
|
1315
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1343
1316
|
function getLanguage() {
|
|
1344
1317
|
return ja$1;
|
|
1345
1318
|
}
|
|
@@ -1352,8 +1325,7 @@ function getPayPayLanguage() {
|
|
|
1352
1325
|
}
|
|
1353
1326
|
return preferredLanguage;
|
|
1354
1327
|
}
|
|
1355
|
-
var PaymentMethodType
|
|
1356
|
-
(function(PaymentMethodType2) {
|
|
1328
|
+
var PaymentMethodType = /* @__PURE__ */ ((PaymentMethodType2) => {
|
|
1357
1329
|
PaymentMethodType2["WALLET"] = "WALLET";
|
|
1358
1330
|
PaymentMethodType2["CREDIT_CARD"] = "CREDIT_CARD";
|
|
1359
1331
|
PaymentMethodType2["BANK"] = "BANK";
|
|
@@ -1361,27 +1333,27 @@ var PaymentMethodType;
|
|
|
1361
1333
|
PaymentMethodType2["SBID_CARRIER_BILLING"] = "SBID_CARRIER_BILLING";
|
|
1362
1334
|
PaymentMethodType2["PAY_LATER"] = "PAY_LATER";
|
|
1363
1335
|
PaymentMethodType2["PAY_LATER_CC"] = "PAY_LATER_CC";
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
(
|
|
1336
|
+
return PaymentMethodType2;
|
|
1337
|
+
})(PaymentMethodType || {});
|
|
1338
|
+
var CreditTypes = /* @__PURE__ */ ((CreditTypes2) => {
|
|
1367
1339
|
CreditTypes2["VISA"] = "VISA";
|
|
1368
1340
|
CreditTypes2["MASTER"] = "MASTER";
|
|
1369
1341
|
CreditTypes2["JCB"] = "JCB";
|
|
1370
1342
|
CreditTypes2["DINERS"] = "D";
|
|
1371
1343
|
CreditTypes2["AMEX"] = "A";
|
|
1372
1344
|
CreditTypes2["OTHER"] = "O";
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
(
|
|
1345
|
+
return CreditTypes2;
|
|
1346
|
+
})(CreditTypes || {});
|
|
1347
|
+
var PaymentMethodStatus = /* @__PURE__ */ ((PaymentMethodStatus2) => {
|
|
1376
1348
|
PaymentMethodStatus2["ACTIVATED"] = "ACTIVATED";
|
|
1377
1349
|
PaymentMethodStatus2["OFF"] = "OFF";
|
|
1378
1350
|
PaymentMethodStatus2["APPLYING"] = "APPLYING";
|
|
1379
1351
|
PaymentMethodStatus2["MAINTENANCE"] = "MAINTENANCE";
|
|
1380
1352
|
PaymentMethodStatus2["BUSY"] = "BUSY";
|
|
1381
1353
|
PaymentMethodStatus2["SUSPENDED"] = "SUSPENDED";
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
(
|
|
1354
|
+
return PaymentMethodStatus2;
|
|
1355
|
+
})(PaymentMethodStatus || {});
|
|
1356
|
+
var bankCode = /* @__PURE__ */ ((bankCode2) => {
|
|
1385
1357
|
bankCode2["MIZUHO_BANK_CODE"] = "0001";
|
|
1386
1358
|
bankCode2["MUFJ_BANK_CODE"] = "0005";
|
|
1387
1359
|
bankCode2["SMBC_BANK_CODE"] = "0009";
|
|
@@ -1392,16 +1364,17 @@ var bankCode;
|
|
|
1392
1364
|
bankCode2["AEON_BANK_CODE"] = "0040";
|
|
1393
1365
|
bankCode2["JIBUN_BANK_CODE"] = "0039";
|
|
1394
1366
|
bankCode2["SBI_BANK_CODE"] = "0038";
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
(
|
|
1367
|
+
return bankCode2;
|
|
1368
|
+
})(bankCode || {});
|
|
1369
|
+
var status = /* @__PURE__ */ ((status2) => {
|
|
1398
1370
|
status2["ACTIVATED"] = "";
|
|
1399
1371
|
status2["OFF"] = "\u7121\u52B9";
|
|
1400
1372
|
status2["APPLYING"] = "\u5229\u7528\u4E0D\u53EF";
|
|
1401
1373
|
status2["MAINTENANCE"] = "\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\u4E2D";
|
|
1402
1374
|
status2["BUSY"] = "\u5229\u7528\u4E0D\u53EF";
|
|
1403
1375
|
status2["SUSPENDED"] = "\u5229\u7528\u4E0D\u53EF";
|
|
1404
|
-
|
|
1376
|
+
return status2;
|
|
1377
|
+
})(status || {});
|
|
1405
1378
|
const getPaymentMethods2 = (params) => {
|
|
1406
1379
|
return ppFetch2({
|
|
1407
1380
|
method: "GET",
|
|
@@ -1419,7 +1392,9 @@ const makePayment$2 = async (queryParams, body2, isAuthorization) => {
|
|
|
1419
1392
|
data: body2
|
|
1420
1393
|
});
|
|
1421
1394
|
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
1422
|
-
return
|
|
1395
|
+
return {
|
|
1396
|
+
...res
|
|
1397
|
+
};
|
|
1423
1398
|
}
|
|
1424
1399
|
const isSuccess = ((_c = (_b = (_a2 = res == null ? void 0 : res.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.resultInfo) == null ? void 0 : _c.code) === "SUCCESS" && ["COMPLETED", "AUTHORIZED"].includes((_f = (_e = (_d = res == null ? void 0 : res.body) == null ? void 0 : _d.unsigned) == null ? void 0 : _e.data) == null ? void 0 : _f.status);
|
|
1425
1400
|
if (isSuccess) {
|
|
@@ -1427,7 +1402,9 @@ const makePayment$2 = async (queryParams, body2, isAuthorization) => {
|
|
|
1427
1402
|
price: (_j = (_i = (_h = (_g = res == null ? void 0 : res.body) == null ? void 0 : _g.unsigned) == null ? void 0 : _h.data) == null ? void 0 : _i.amount) == null ? void 0 : _j.amount
|
|
1428
1403
|
});
|
|
1429
1404
|
}
|
|
1430
|
-
return
|
|
1405
|
+
return {
|
|
1406
|
+
...res
|
|
1407
|
+
};
|
|
1431
1408
|
};
|
|
1432
1409
|
const getConsult = ({
|
|
1433
1410
|
merchant: merchant2,
|
|
@@ -1441,12 +1418,12 @@ const getConsult = ({
|
|
|
1441
1418
|
data: { amount: amount2 }
|
|
1442
1419
|
});
|
|
1443
1420
|
};
|
|
1444
|
-
var CashBackAnimationType
|
|
1445
|
-
(function(CashBackAnimationType2) {
|
|
1421
|
+
var CashBackAnimationType = /* @__PURE__ */ ((CashBackAnimationType2) => {
|
|
1446
1422
|
CashBackAnimationType2["TIER_CAMPAIGN_BOTTOM"] = "TIER_CAMPAIGN_BOTTOM";
|
|
1447
1423
|
CashBackAnimationType2["LOTTERY"] = "LOTTERY";
|
|
1448
1424
|
CashBackAnimationType2["TIER_CAMPAIGN_FULL"] = "TIER_CAMPAIGN_FULL";
|
|
1449
|
-
|
|
1425
|
+
return CashBackAnimationType2;
|
|
1426
|
+
})(CashBackAnimationType || {});
|
|
1450
1427
|
const getCashBackDetails = (paymentId2) => {
|
|
1451
1428
|
return ppFetch2({
|
|
1452
1429
|
method: "GET",
|
|
@@ -1463,17 +1440,17 @@ const sendAge = (payload) => {
|
|
|
1463
1440
|
data: payload
|
|
1464
1441
|
});
|
|
1465
1442
|
};
|
|
1466
|
-
var UIComponentsButtonActionType
|
|
1467
|
-
(function(UIComponentsButtonActionType2) {
|
|
1443
|
+
var UIComponentsButtonActionType = /* @__PURE__ */ ((UIComponentsButtonActionType2) => {
|
|
1468
1444
|
UIComponentsButtonActionType2["DEEPLINK"] = "DEEPLINK";
|
|
1469
1445
|
UIComponentsButtonActionType2["CLOSE"] = "CLOSE";
|
|
1470
1446
|
UIComponentsButtonActionType2["NATIVE"] = "NATIVE";
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
(
|
|
1447
|
+
return UIComponentsButtonActionType2;
|
|
1448
|
+
})(UIComponentsButtonActionType || {});
|
|
1449
|
+
var UIComponentsButtonType = /* @__PURE__ */ ((UIComponentsButtonType2) => {
|
|
1474
1450
|
UIComponentsButtonType2["BLUE"] = "BLUE";
|
|
1475
1451
|
UIComponentsButtonType2["WHITE"] = "WHITE";
|
|
1476
|
-
|
|
1452
|
+
return UIComponentsButtonType2;
|
|
1453
|
+
})(UIComponentsButtonType || {});
|
|
1477
1454
|
async function topup$3(queryParams, body2) {
|
|
1478
1455
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1479
1456
|
const res = await ppFetch2({
|
|
@@ -1587,8 +1564,9 @@ function reconstructParams(params) {
|
|
|
1587
1564
|
if (!params) {
|
|
1588
1565
|
return params;
|
|
1589
1566
|
}
|
|
1590
|
-
const
|
|
1591
|
-
return
|
|
1567
|
+
const { success: success2, complete, fail, ...data2 } = params;
|
|
1568
|
+
return {
|
|
1569
|
+
...data2,
|
|
1592
1570
|
success: (result2) => {
|
|
1593
1571
|
setTimeout(() => {
|
|
1594
1572
|
success2 == null ? void 0 : success2(result2);
|
|
@@ -1605,7 +1583,7 @@ function reconstructParams(params) {
|
|
|
1605
1583
|
complete == null ? void 0 : complete();
|
|
1606
1584
|
}, 0);
|
|
1607
1585
|
}
|
|
1608
|
-
}
|
|
1586
|
+
};
|
|
1609
1587
|
}
|
|
1610
1588
|
function createWrap(fn) {
|
|
1611
1589
|
return (arg) => {
|
|
@@ -1708,9 +1686,10 @@ const debounce = (fn) => {
|
|
|
1708
1686
|
};
|
|
1709
1687
|
function savePayment(lastPayment) {
|
|
1710
1688
|
try {
|
|
1711
|
-
const newLastPayment =
|
|
1689
|
+
const newLastPayment = {
|
|
1690
|
+
...lastPayment,
|
|
1712
1691
|
paymentAt: Date.now()
|
|
1713
|
-
}
|
|
1692
|
+
};
|
|
1714
1693
|
saveLastPayment(JSON.stringify(newLastPayment));
|
|
1715
1694
|
} catch (e) {
|
|
1716
1695
|
console.warn(e);
|
|
@@ -1720,9 +1699,10 @@ function savePayment(lastPayment) {
|
|
|
1720
1699
|
}
|
|
1721
1700
|
function saveTopup(lastTopup) {
|
|
1722
1701
|
try {
|
|
1723
|
-
const newLastTopup =
|
|
1702
|
+
const newLastTopup = {
|
|
1703
|
+
...lastTopup,
|
|
1724
1704
|
topupAt: Date.now()
|
|
1725
|
-
}
|
|
1705
|
+
};
|
|
1726
1706
|
saveLastTopup(JSON.stringify(newLastTopup));
|
|
1727
1707
|
} catch (e) {
|
|
1728
1708
|
console.warn(e);
|
|
@@ -1772,14 +1752,14 @@ function existDuplicatePayment(price2) {
|
|
|
1772
1752
|
}
|
|
1773
1753
|
return false;
|
|
1774
1754
|
}
|
|
1775
|
-
var MiniAppRuntime
|
|
1776
|
-
(function(MiniAppRuntime2) {
|
|
1755
|
+
var MiniAppRuntime = /* @__PURE__ */ ((MiniAppRuntime2) => {
|
|
1777
1756
|
MiniAppRuntime2["android"] = "ANDROID";
|
|
1778
1757
|
MiniAppRuntime2["ios"] = "IOS";
|
|
1779
1758
|
MiniAppRuntime2["web"] = "WEB";
|
|
1780
|
-
|
|
1759
|
+
return MiniAppRuntime2;
|
|
1760
|
+
})(MiniAppRuntime || {});
|
|
1781
1761
|
function getRuntime() {
|
|
1782
|
-
return navigator.userAgent.match(/(iPad|iPhone|iPod)/i) && isPayPayMiniApp() ?
|
|
1762
|
+
return navigator.userAgent.match(/(iPad|iPhone|iPod)/i) && isPayPayMiniApp() ? "IOS" : navigator.userAgent.match(/Android/i) && isPayPayMiniApp() ? "ANDROID" : "WEB";
|
|
1783
1763
|
}
|
|
1784
1764
|
function isPayPayMiniApp() {
|
|
1785
1765
|
return navigator.userAgent.includes("PayPayMiniApp/");
|
|
@@ -1877,7 +1857,7 @@ function getFailErrorCode(ppFetchResult) {
|
|
|
1877
1857
|
}
|
|
1878
1858
|
}
|
|
1879
1859
|
function getStoreUrl() {
|
|
1880
|
-
return getRuntime() ===
|
|
1860
|
+
return getRuntime() === "ANDROID" ? "https://play.google.com/store/apps/details?id=jp.ne.paypay.android.app" : "https://itunes.apple.com/app/id1435783608";
|
|
1881
1861
|
}
|
|
1882
1862
|
function base64UrlEncode(string) {
|
|
1883
1863
|
return btoa(string).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
@@ -1886,9 +1866,11 @@ function generateCodeVerifier(length2) {
|
|
|
1886
1866
|
if (!length2 || length2 < 43) {
|
|
1887
1867
|
length2 = 43;
|
|
1888
1868
|
}
|
|
1889
|
-
return base64UrlEncode(
|
|
1890
|
-
|
|
1891
|
-
|
|
1869
|
+
return base64UrlEncode(
|
|
1870
|
+
Array.prototype.map.call(crypto.getRandomValues(new Uint8Array(length2)), (num2) => {
|
|
1871
|
+
return String.fromCharCode(num2);
|
|
1872
|
+
}).join("")
|
|
1873
|
+
).substring(0, length2);
|
|
1892
1874
|
}
|
|
1893
1875
|
async function generateCodeChallange(codeVerifier) {
|
|
1894
1876
|
const array = new Uint8Array(codeVerifier.length);
|
|
@@ -1943,11 +1925,12 @@ const opaUrl = () => {
|
|
|
1943
1925
|
}
|
|
1944
1926
|
};
|
|
1945
1927
|
const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
|
|
1946
|
-
let headers = new Headers(
|
|
1928
|
+
let headers = new Headers({
|
|
1947
1929
|
"Content-Type": "application/json",
|
|
1948
|
-
"Client-Version": "1.
|
|
1949
|
-
"Client-OS-Type": getRuntime()
|
|
1950
|
-
|
|
1930
|
+
"Client-Version": "1.57.0",
|
|
1931
|
+
"Client-OS-Type": getRuntime(),
|
|
1932
|
+
...customHeaders
|
|
1933
|
+
});
|
|
1951
1934
|
if (urlEndpoint === "web-api/app/v2/payment/methods" || urlEndpoint === "web-api/app/v2/payment/consult" || urlEndpoint === "web-api/app/v1/payment/cashbackDetail" || urlEndpoint === "web-api/app/v1/confirmAgeForCashback" || urlEndpoint === "web-api/app/v1/internal/request" || urlEndpoint === "web-api/app/v1/addressbyzip" || urlEndpoint === "/web-api/app/platform/v1/balance" || urlEndpoint === "web-api/app/v1/users/autoTopupConfiguration" || urlEndpoint === "web-api/app/v1/users/preTransactionAutoTopupConfiguration" || urlEndpoint === "web-api/app/v1/users/consultPaymentFeature") {
|
|
1952
1935
|
headers.set("Client-UUID", getClientUUID());
|
|
1953
1936
|
headers.set("Device-UUID", getDeviceUUID());
|
|
@@ -2017,7 +2000,7 @@ async function ppFetch2(options) {
|
|
|
2017
2000
|
const tokenResponse = res;
|
|
2018
2001
|
if ((tokenResponse == null ? void 0 : tokenResponse.error) === "invalid_token") {
|
|
2019
2002
|
if (!options.suppressRefresh && await refreshToken()) {
|
|
2020
|
-
return ppFetch2(
|
|
2003
|
+
return ppFetch2({ ...options, suppressRefresh: true });
|
|
2021
2004
|
} else {
|
|
2022
2005
|
return {
|
|
2023
2006
|
ppFetchResult: "tokenExpired",
|
|
@@ -2110,15 +2093,17 @@ async function initAppDetail(accessToken) {
|
|
|
2110
2093
|
removeAppDetail();
|
|
2111
2094
|
return false;
|
|
2112
2095
|
}
|
|
2113
|
-
saveAppDetail(
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2096
|
+
saveAppDetail(
|
|
2097
|
+
JSON.stringify({
|
|
2098
|
+
appLogo: (_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.appLogo,
|
|
2099
|
+
appName: (_h = (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.unsigned) == null ? void 0 : _g.data) == null ? void 0 : _h.appName,
|
|
2100
|
+
openUrl: (_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.data) == null ? void 0 : _k.openUrl,
|
|
2101
|
+
whiteListDomains: (_n = (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.unsigned) == null ? void 0 : _m.data) == null ? void 0 : _n.whiteListDomains,
|
|
2102
|
+
isInternal: (_q = (_p = (_o = res == null ? void 0 : res.body) == null ? void 0 : _o.unsigned) == null ? void 0 : _p.data) == null ? void 0 : _q.isInternal,
|
|
2103
|
+
window: (_t = (_s = (_r = res == null ? void 0 : res.body) == null ? void 0 : _r.unsigned) == null ? void 0 : _s.data) == null ? void 0 : _t.window,
|
|
2104
|
+
subdomainCookieSharing: (_w = (_v = (_u = res == null ? void 0 : res.body) == null ? void 0 : _u.unsigned) == null ? void 0 : _v.data) == null ? void 0 : _w.subdomainCookieSharing
|
|
2105
|
+
})
|
|
2106
|
+
);
|
|
2122
2107
|
return true;
|
|
2123
2108
|
}
|
|
2124
2109
|
function getAppDetail() {
|
|
@@ -2139,14 +2124,16 @@ async function initAppConfiguration() {
|
|
|
2139
2124
|
if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !((_a2 = res == null ? void 0 : res.body) == null ? void 0 : _a2.variables)) {
|
|
2140
2125
|
return false;
|
|
2141
2126
|
}
|
|
2142
|
-
saveAppConfig(
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2127
|
+
saveAppConfig(
|
|
2128
|
+
JSON.stringify({
|
|
2129
|
+
topupButtonsAmount: (_c = (_b = res == null ? void 0 : res.body) == null ? void 0 : _b.variables) == null ? void 0 : _c.topupButtonsAmount,
|
|
2130
|
+
topupHalfSheetAmount: (_e = (_d = res == null ? void 0 : res.body) == null ? void 0 : _d.variables) == null ? void 0 : _e.topupHalfSheetAmount,
|
|
2131
|
+
topupHalfSheetRecommendedAmount: (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.variables) == null ? void 0 : _g.topupHalfSheetRecommendedAmount,
|
|
2132
|
+
autoChargeTopupHalfSheetAmount: (_i = (_h = res == null ? void 0 : res.body) == null ? void 0 : _h.variables) == null ? void 0 : _i.autoChargeTopupHalfSheetAmount,
|
|
2133
|
+
autoChargeRecommendedTopupAmount: (_k = (_j = res == null ? void 0 : res.body) == null ? void 0 : _j.variables) == null ? void 0 : _k.autoChargeRecommendedTopupAmount,
|
|
2134
|
+
topupMinAmount: (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.variables) == null ? void 0 : _m.topupMinAmount
|
|
2135
|
+
})
|
|
2136
|
+
);
|
|
2150
2137
|
return true;
|
|
2151
2138
|
}
|
|
2152
2139
|
function getAppConfig() {
|
|
@@ -2156,8 +2143,7 @@ function getAppConfig() {
|
|
|
2156
2143
|
}
|
|
2157
2144
|
return null;
|
|
2158
2145
|
}
|
|
2159
|
-
var MiniAppStatusType
|
|
2160
|
-
(function(MiniAppStatusType2) {
|
|
2146
|
+
var MiniAppStatusType = /* @__PURE__ */ ((MiniAppStatusType2) => {
|
|
2161
2147
|
MiniAppStatusType2["validToken"] = "TOKEN_VALID";
|
|
2162
2148
|
MiniAppStatusType2["initialized"] = "INITIALIZED";
|
|
2163
2149
|
MiniAppStatusType2["emailRegistered"] = "EMAIL_REGISTERED";
|
|
@@ -2165,7 +2151,8 @@ var MiniAppStatusType;
|
|
|
2165
2151
|
MiniAppStatusType2["success"] = "SUCCESS";
|
|
2166
2152
|
MiniAppStatusType2["loggedOut"] = "LOGGED_OUT";
|
|
2167
2153
|
MiniAppStatusType2["connected"] = "CONNECTED";
|
|
2168
|
-
|
|
2154
|
+
return MiniAppStatusType2;
|
|
2155
|
+
})(MiniAppStatusType || {});
|
|
2169
2156
|
function getUAID(params) {
|
|
2170
2157
|
const newParams = reconstructParams(params);
|
|
2171
2158
|
execute$g(newParams).catch(() => {
|
|
@@ -2223,13 +2210,14 @@ async function execute$e(params) {
|
|
|
2223
2210
|
if (res.ppFetchResult !== "success") {
|
|
2224
2211
|
return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
2225
2212
|
}
|
|
2226
|
-
const data2 =
|
|
2213
|
+
const data2 = {
|
|
2214
|
+
...res.body.unsigned.data,
|
|
2227
2215
|
jws: res.body.signed.jws
|
|
2228
|
-
}
|
|
2216
|
+
};
|
|
2229
2217
|
(_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params, data2);
|
|
2230
2218
|
}
|
|
2231
2219
|
function makeMap(str, expectsLowerCase) {
|
|
2232
|
-
const map = Object.create(null);
|
|
2220
|
+
const map = /* @__PURE__ */ Object.create(null);
|
|
2233
2221
|
const list2 = str.split(",");
|
|
2234
2222
|
for (let i2 = 0; i2 < list2.length; i2++) {
|
|
2235
2223
|
map[list2[i2]] = true;
|
|
@@ -2400,9 +2388,11 @@ const toRawType = (value2) => {
|
|
|
2400
2388
|
};
|
|
2401
2389
|
const isPlainObject$1 = (val2) => toTypeString(val2) === "[object Object]";
|
|
2402
2390
|
const isIntegerKey = (key2) => isString(key2) && key2 !== "NaN" && key2[0] !== "-" && "" + parseInt(key2, 10) === key2;
|
|
2403
|
-
const isReservedProp = /* @__PURE__ */ makeMap(
|
|
2391
|
+
const isReservedProp = /* @__PURE__ */ makeMap(
|
|
2392
|
+
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
2393
|
+
);
|
|
2404
2394
|
const cacheStringFunction = (fn) => {
|
|
2405
|
-
const cache = Object.create(null);
|
|
2395
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
2406
2396
|
return (str) => {
|
|
2407
2397
|
const hit = cache[str];
|
|
2408
2398
|
return hit || (cache[str] = fn(str));
|
|
@@ -2530,7 +2520,7 @@ const finalizeDepMarkers = (effect2) => {
|
|
|
2530
2520
|
deps.length = ptr;
|
|
2531
2521
|
}
|
|
2532
2522
|
};
|
|
2533
|
-
const targetMap = new WeakMap();
|
|
2523
|
+
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
2534
2524
|
let effectTrackDepth = 0;
|
|
2535
2525
|
let trackOpBit = 1;
|
|
2536
2526
|
const maxMarkerBits = 30;
|
|
@@ -2617,7 +2607,7 @@ function track(target, type, key2) {
|
|
|
2617
2607
|
if (shouldTrack && activeEffect) {
|
|
2618
2608
|
let depsMap = targetMap.get(target);
|
|
2619
2609
|
if (!depsMap) {
|
|
2620
|
-
targetMap.set(target, depsMap = new Map());
|
|
2610
|
+
targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
|
|
2621
2611
|
}
|
|
2622
2612
|
let dep = depsMap.get(key2);
|
|
2623
2613
|
if (!dep) {
|
|
@@ -2726,7 +2716,9 @@ function triggerEffect(effect2, debuggerEventExtraInfo) {
|
|
|
2726
2716
|
}
|
|
2727
2717
|
}
|
|
2728
2718
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
2729
|
-
const builtInSymbols = new Set(
|
|
2719
|
+
const builtInSymbols = new Set(
|
|
2720
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key2) => key2 !== "arguments" && key2 !== "caller").map((key2) => Symbol[key2]).filter(isSymbol)
|
|
2721
|
+
);
|
|
2730
2722
|
const get = /* @__PURE__ */ createGetter();
|
|
2731
2723
|
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
2732
2724
|
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
@@ -3092,10 +3084,10 @@ const shallowCollectionHandlers = {
|
|
|
3092
3084
|
const readonlyCollectionHandlers = {
|
|
3093
3085
|
get: /* @__PURE__ */ createInstrumentationGetter(true, false)
|
|
3094
3086
|
};
|
|
3095
|
-
const reactiveMap = new WeakMap();
|
|
3096
|
-
const shallowReactiveMap = new WeakMap();
|
|
3097
|
-
const readonlyMap = new WeakMap();
|
|
3098
|
-
const shallowReadonlyMap = new WeakMap();
|
|
3087
|
+
const reactiveMap = /* @__PURE__ */ new WeakMap();
|
|
3088
|
+
const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
|
|
3089
|
+
const readonlyMap = /* @__PURE__ */ new WeakMap();
|
|
3090
|
+
const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
|
|
3099
3091
|
function targetTypeMap(rawType) {
|
|
3100
3092
|
switch (rawType) {
|
|
3101
3093
|
case "Object":
|
|
@@ -3928,7 +3920,7 @@ function traverse(value2, seen) {
|
|
|
3928
3920
|
if (!isObject(value2) || value2["__v_skip"]) {
|
|
3929
3921
|
return value2;
|
|
3930
3922
|
}
|
|
3931
|
-
seen = seen || new Set();
|
|
3923
|
+
seen = seen || /* @__PURE__ */ new Set();
|
|
3932
3924
|
if (seen.has(value2)) {
|
|
3933
3925
|
return value2;
|
|
3934
3926
|
}
|
|
@@ -3955,7 +3947,7 @@ function useTransitionState() {
|
|
|
3955
3947
|
isMounted: false,
|
|
3956
3948
|
isLeaving: false,
|
|
3957
3949
|
isUnmounting: false,
|
|
3958
|
-
leavingVNodes: new Map()
|
|
3950
|
+
leavingVNodes: /* @__PURE__ */ new Map()
|
|
3959
3951
|
};
|
|
3960
3952
|
onMounted(() => {
|
|
3961
3953
|
state.isMounted = true;
|
|
@@ -4059,7 +4051,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
4059
4051
|
const { leavingVNodes } = state;
|
|
4060
4052
|
let leavingVNodesCache = leavingVNodes.get(vnode.type);
|
|
4061
4053
|
if (!leavingVNodesCache) {
|
|
4062
|
-
leavingVNodesCache = Object.create(null);
|
|
4054
|
+
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
|
|
4063
4055
|
leavingVNodes.set(vnode.type, leavingVNodesCache);
|
|
4064
4056
|
}
|
|
4065
4057
|
return leavingVNodesCache;
|
|
@@ -4439,7 +4431,7 @@ const getPublicInstance = (i2) => {
|
|
|
4439
4431
|
return getExposeProxy(i2) || i2.proxy;
|
|
4440
4432
|
return getPublicInstance(i2.parent);
|
|
4441
4433
|
};
|
|
4442
|
-
const publicPropertiesMap = /* @__PURE__ */ extend(Object.create(null), {
|
|
4434
|
+
const publicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
|
4443
4435
|
$: (i2) => i2,
|
|
4444
4436
|
$el: (i2) => i2.vnode.el,
|
|
4445
4437
|
$data: (i2) => i2.data,
|
|
@@ -4827,14 +4819,14 @@ function mergeAsArray(to, from) {
|
|
|
4827
4819
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
4828
4820
|
}
|
|
4829
4821
|
function mergeObjectOptions(to, from) {
|
|
4830
|
-
return to ? extend(extend(Object.create(null), to), from) : from;
|
|
4822
|
+
return to ? extend(extend(/* @__PURE__ */ Object.create(null), to), from) : from;
|
|
4831
4823
|
}
|
|
4832
4824
|
function mergeWatchOptions(to, from) {
|
|
4833
4825
|
if (!to)
|
|
4834
4826
|
return from;
|
|
4835
4827
|
if (!from)
|
|
4836
4828
|
return to;
|
|
4837
|
-
const merged = extend(Object.create(null), to);
|
|
4829
|
+
const merged = extend(/* @__PURE__ */ Object.create(null), to);
|
|
4838
4830
|
for (const key2 in from) {
|
|
4839
4831
|
merged[key2] = mergeAsArray(to[key2], from[key2]);
|
|
4840
4832
|
}
|
|
@@ -4844,7 +4836,7 @@ function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
|
4844
4836
|
const props = {};
|
|
4845
4837
|
const attrs = {};
|
|
4846
4838
|
def(attrs, InternalObjectKey, 1);
|
|
4847
|
-
instance.propsDefaults = Object.create(null);
|
|
4839
|
+
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
4848
4840
|
setFullProps(instance, rawProps, props, attrs);
|
|
4849
4841
|
for (const key2 in instance.propsOptions[0]) {
|
|
4850
4842
|
if (!(key2 in props)) {
|
|
@@ -5167,10 +5159,10 @@ function createAppContext() {
|
|
|
5167
5159
|
mixins: [],
|
|
5168
5160
|
components: {},
|
|
5169
5161
|
directives: {},
|
|
5170
|
-
provides: Object.create(null),
|
|
5171
|
-
optionsCache: new WeakMap(),
|
|
5172
|
-
propsCache: new WeakMap(),
|
|
5173
|
-
emitsCache: new WeakMap()
|
|
5162
|
+
provides: /* @__PURE__ */ Object.create(null),
|
|
5163
|
+
optionsCache: /* @__PURE__ */ new WeakMap(),
|
|
5164
|
+
propsCache: /* @__PURE__ */ new WeakMap(),
|
|
5165
|
+
emitsCache: /* @__PURE__ */ new WeakMap()
|
|
5174
5166
|
};
|
|
5175
5167
|
}
|
|
5176
5168
|
let uid = 0;
|
|
@@ -5183,7 +5175,7 @@ function createAppAPI(render2, hydrate) {
|
|
|
5183
5175
|
rootProps = null;
|
|
5184
5176
|
}
|
|
5185
5177
|
const context = createAppContext();
|
|
5186
|
-
const installedPlugins = new Set();
|
|
5178
|
+
const installedPlugins = /* @__PURE__ */ new Set();
|
|
5187
5179
|
let isMounted = false;
|
|
5188
5180
|
const app = context.app = {
|
|
5189
5181
|
_uid: uid++,
|
|
@@ -5679,7 +5671,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5679
5671
|
hydrateNode(el, instance.subTree, instance, parentSuspense, null);
|
|
5680
5672
|
};
|
|
5681
5673
|
if (isAsyncWrapperVNode) {
|
|
5682
|
-
initialVNode.type.__asyncLoader().then(
|
|
5674
|
+
initialVNode.type.__asyncLoader().then(
|
|
5675
|
+
() => !instance.isUnmounted && hydrateSubTree()
|
|
5676
|
+
);
|
|
5683
5677
|
} else {
|
|
5684
5678
|
hydrateSubTree();
|
|
5685
5679
|
}
|
|
@@ -5721,7 +5715,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5721
5715
|
const nextTree = renderComponentRoot(instance);
|
|
5722
5716
|
const prevTree = instance.subTree;
|
|
5723
5717
|
instance.subTree = nextTree;
|
|
5724
|
-
patch(
|
|
5718
|
+
patch(
|
|
5719
|
+
prevTree,
|
|
5720
|
+
nextTree,
|
|
5721
|
+
hostParentNode(prevTree.el),
|
|
5722
|
+
getNextHostNode(prevTree),
|
|
5723
|
+
instance,
|
|
5724
|
+
parentSuspense,
|
|
5725
|
+
isSVG
|
|
5726
|
+
);
|
|
5725
5727
|
next2.el = nextTree.el;
|
|
5726
5728
|
if (originNext === null) {
|
|
5727
5729
|
updateHOCHostEl(instance, nextTree.el);
|
|
@@ -5734,7 +5736,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5734
5736
|
}
|
|
5735
5737
|
}
|
|
5736
5738
|
};
|
|
5737
|
-
const effect2 = instance.effect = new ReactiveEffect(
|
|
5739
|
+
const effect2 = instance.effect = new ReactiveEffect(
|
|
5740
|
+
componentUpdateFn,
|
|
5741
|
+
() => queueJob(update),
|
|
5742
|
+
instance.scope
|
|
5743
|
+
);
|
|
5738
5744
|
const update = instance.update = () => effect2.run();
|
|
5739
5745
|
update.id = instance.uid;
|
|
5740
5746
|
toggleRecurse(instance, true);
|
|
@@ -5849,7 +5855,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5849
5855
|
} else {
|
|
5850
5856
|
const s1 = i2;
|
|
5851
5857
|
const s2 = i2;
|
|
5852
|
-
const keyToNewIndexMap = new Map();
|
|
5858
|
+
const keyToNewIndexMap = /* @__PURE__ */ new Map();
|
|
5853
5859
|
for (i2 = s2; i2 <= e2; i2++) {
|
|
5854
5860
|
const nextChild = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
|
|
5855
5861
|
if (nextChild.key != null) {
|
|
@@ -6485,7 +6491,11 @@ function normalizeVNode(child) {
|
|
|
6485
6491
|
if (child == null || typeof child === "boolean") {
|
|
6486
6492
|
return createVNode(Comment);
|
|
6487
6493
|
} else if (isArray(child)) {
|
|
6488
|
-
return createVNode(
|
|
6494
|
+
return createVNode(
|
|
6495
|
+
Fragment,
|
|
6496
|
+
null,
|
|
6497
|
+
child.slice()
|
|
6498
|
+
);
|
|
6489
6499
|
} else if (typeof child === "object") {
|
|
6490
6500
|
return cloneIfMounted(child);
|
|
6491
6501
|
} else {
|
|
@@ -6669,7 +6679,7 @@ function setupComponent(instance, isSSR = false) {
|
|
|
6669
6679
|
}
|
|
6670
6680
|
function setupStatefulComponent(instance, isSSR) {
|
|
6671
6681
|
const Component = instance.type;
|
|
6672
|
-
instance.accessCache = Object.create(null);
|
|
6682
|
+
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
6673
6683
|
instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
|
|
6674
6684
|
const { setup } = Component;
|
|
6675
6685
|
if (setup) {
|
|
@@ -7275,7 +7285,7 @@ function NumberOf(val2) {
|
|
|
7275
7285
|
}
|
|
7276
7286
|
function addTransitionClass(el, cls) {
|
|
7277
7287
|
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
7278
|
-
(el._vtc || (el._vtc = new Set())).add(cls);
|
|
7288
|
+
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
7279
7289
|
}
|
|
7280
7290
|
function removeTransitionClass(el, cls) {
|
|
7281
7291
|
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
@@ -7742,7 +7752,9 @@ async function execute$d(params) {
|
|
|
7742
7752
|
return;
|
|
7743
7753
|
}
|
|
7744
7754
|
if (((_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.resultInfo) == null ? void 0 : _d.code) === "SUCCESS") {
|
|
7745
|
-
const appDetailResult = await initAppDetail(
|
|
7755
|
+
const appDetailResult = await initAppDetail(
|
|
7756
|
+
(_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.data) == null ? void 0 : _f.accessToken) != null ? _g : ""
|
|
7757
|
+
);
|
|
7746
7758
|
if (!appDetailResult) {
|
|
7747
7759
|
throw Error();
|
|
7748
7760
|
}
|
|
@@ -7783,10 +7795,12 @@ function failedAuth(params, errorCode) {
|
|
|
7783
7795
|
function saveUserData() {
|
|
7784
7796
|
getUserProfile({
|
|
7785
7797
|
success: (res) => {
|
|
7786
|
-
saveUserInfo(
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7798
|
+
saveUserInfo(
|
|
7799
|
+
JSON.stringify({
|
|
7800
|
+
avatarUrl: res == null ? void 0 : res.avatarUrl,
|
|
7801
|
+
nickName: res == null ? void 0 : res.nickName
|
|
7802
|
+
})
|
|
7803
|
+
);
|
|
7790
7804
|
}
|
|
7791
7805
|
}).catch(() => {
|
|
7792
7806
|
});
|
|
@@ -7999,7 +8013,10 @@ const OverLay = defineComponent({
|
|
|
7999
8013
|
return;
|
|
8000
8014
|
}
|
|
8001
8015
|
beforeAttr.value = elmStyle;
|
|
8002
|
-
document.documentElement.setAttribute(
|
|
8016
|
+
document.documentElement.setAttribute(
|
|
8017
|
+
"style",
|
|
8018
|
+
`${beforeAttr.value};overflow:hidden; overscroll-behavior-y: none;`
|
|
8019
|
+
);
|
|
8003
8020
|
});
|
|
8004
8021
|
onUnmounted(() => {
|
|
8005
8022
|
document.documentElement.setAttribute("style", beforeAttr.value);
|
|
@@ -8236,12 +8253,16 @@ const ActionSheet = defineComponent({
|
|
|
8236
8253
|
paddingBottom: props.noPaddingBottom ? "0px" : bottomHeightProperty
|
|
8237
8254
|
};
|
|
8238
8255
|
if (YState.y > 0 && !props.forbiddenSwipe && YState.initial !== 0) {
|
|
8239
|
-
style =
|
|
8256
|
+
style = {
|
|
8257
|
+
...style,
|
|
8240
8258
|
transform: `translateY(${YState.y}px)`
|
|
8241
|
-
}
|
|
8259
|
+
};
|
|
8242
8260
|
}
|
|
8243
8261
|
if (props.style) {
|
|
8244
|
-
style =
|
|
8262
|
+
style = {
|
|
8263
|
+
...style,
|
|
8264
|
+
...props.style
|
|
8265
|
+
};
|
|
8245
8266
|
}
|
|
8246
8267
|
return style;
|
|
8247
8268
|
});
|
|
@@ -8825,7 +8846,7 @@ const initOpenMap = (initOpenMap2) => {
|
|
|
8825
8846
|
(_a2 = mapParams == null ? void 0 : mapParams.complete) == null ? void 0 : _a2.call(mapParams);
|
|
8826
8847
|
}, 350);
|
|
8827
8848
|
};
|
|
8828
|
-
const app = createApp(
|
|
8849
|
+
const app = createApp({
|
|
8829
8850
|
setup() {
|
|
8830
8851
|
return () => h(AppVue$8, {
|
|
8831
8852
|
show: show2.value,
|
|
@@ -8834,8 +8855,9 @@ const initOpenMap = (initOpenMap2) => {
|
|
|
8834
8855
|
closeSheet();
|
|
8835
8856
|
}
|
|
8836
8857
|
});
|
|
8837
|
-
}
|
|
8838
|
-
|
|
8858
|
+
},
|
|
8859
|
+
...popStateHandler(closeSheet, mapParams)
|
|
8860
|
+
});
|
|
8839
8861
|
const container2 = document.createElement("div");
|
|
8840
8862
|
container2.className = "ppmna-reset-css";
|
|
8841
8863
|
app.mount(container2);
|
|
@@ -8866,11 +8888,13 @@ function openMiniApp(openMiniappParams) {
|
|
|
8866
8888
|
if (!clientId) {
|
|
8867
8889
|
return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.sdkNotInitialized });
|
|
8868
8890
|
}
|
|
8869
|
-
const appUrl = (params == null ? void 0 : params.redirectUrl) ? `paypay://miniapp?appId=${clientId}&redirectUrl=${encodeURIComponent(
|
|
8891
|
+
const appUrl = (params == null ? void 0 : params.redirectUrl) ? `paypay://miniapp?appId=${clientId}&redirectUrl=${encodeURIComponent(
|
|
8892
|
+
params == null ? void 0 : params.redirectUrl
|
|
8893
|
+
)}` : `paypay://miniapp?appId=${clientId}`;
|
|
8870
8894
|
window.location.href = appUrl;
|
|
8871
8895
|
(_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params);
|
|
8872
8896
|
}
|
|
8873
|
-
const errorCodes = new Map();
|
|
8897
|
+
const errorCodes = /* @__PURE__ */ new Map();
|
|
8874
8898
|
errorCodes.set(414, MiniAppErrorType.invalidUrl);
|
|
8875
8899
|
errorCodes.set(413, MiniAppErrorType.invalidData);
|
|
8876
8900
|
errorCodes.set(400, MiniAppErrorType.invalidHeader);
|
|
@@ -8943,11 +8967,11 @@ async function requestInternal(requestInternalParams) {
|
|
|
8943
8967
|
return (_d = params == null ? void 0 : params.fail) == null ? void 0 : _d.call(params, { errorCode: MiniAppErrorType.statusCodeError });
|
|
8944
8968
|
}
|
|
8945
8969
|
}
|
|
8946
|
-
var PermissionStatus
|
|
8947
|
-
(function(PermissionStatus2) {
|
|
8970
|
+
var PermissionStatus = /* @__PURE__ */ ((PermissionStatus2) => {
|
|
8948
8971
|
PermissionStatus2["granted"] = "GRANTED";
|
|
8949
8972
|
PermissionStatus2["denied"] = "DENIED";
|
|
8950
|
-
|
|
8973
|
+
return PermissionStatus2;
|
|
8974
|
+
})(PermissionStatus || {});
|
|
8951
8975
|
const PermissionName = {
|
|
8952
8976
|
mini_app_payment_balance: "mini_app_payment_balance",
|
|
8953
8977
|
mini_app_device_info: "mini_app_device_info",
|
|
@@ -8969,16 +8993,16 @@ const checkPermission = async (permissionNames) => {
|
|
|
8969
8993
|
var _a2;
|
|
8970
8994
|
try {
|
|
8971
8995
|
if ((_a2 = getAppDetail()) == null ? void 0 : _a2.isInternal) {
|
|
8972
|
-
return
|
|
8996
|
+
return "GRANTED";
|
|
8973
8997
|
}
|
|
8974
8998
|
const resPermission = await getUserGrantedPermission();
|
|
8975
8999
|
permissionNames = Array.isArray(permissionNames) ? permissionNames : [permissionNames];
|
|
8976
9000
|
for (const permissionName of permissionNames) {
|
|
8977
9001
|
if (!(resPermission == null ? void 0 : resPermission.find((name2) => name2 === permissionName))) {
|
|
8978
|
-
return
|
|
9002
|
+
return "DENIED";
|
|
8979
9003
|
}
|
|
8980
9004
|
}
|
|
8981
|
-
return
|
|
9005
|
+
return "GRANTED";
|
|
8982
9006
|
} catch {
|
|
8983
9007
|
throw Error(MiniAppErrorType.serverError);
|
|
8984
9008
|
}
|
|
@@ -9006,7 +9030,9 @@ async function getBalance(params) {
|
|
|
9006
9030
|
async function execute$c(params) {
|
|
9007
9031
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
9008
9032
|
try {
|
|
9009
|
-
const grantStatus = await checkPermission(
|
|
9033
|
+
const grantStatus = await checkPermission(
|
|
9034
|
+
PermissionName.mini_app_payment_balance
|
|
9035
|
+
);
|
|
9010
9036
|
if (grantStatus !== PermissionStatus.granted) {
|
|
9011
9037
|
return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.insufficientScope });
|
|
9012
9038
|
}
|
|
@@ -9082,7 +9108,10 @@ async function execute$b(params) {
|
|
|
9082
9108
|
}
|
|
9083
9109
|
}
|
|
9084
9110
|
} catch (e) {
|
|
9085
|
-
return handleFailCallback(
|
|
9111
|
+
return handleFailCallback(
|
|
9112
|
+
params,
|
|
9113
|
+
(e == null ? void 0 : e.message) || MiniAppErrorType.serverError
|
|
9114
|
+
);
|
|
9086
9115
|
}
|
|
9087
9116
|
}
|
|
9088
9117
|
const headerWrapper$1 = "_headerWrapper_1i30m_1";
|
|
@@ -9272,7 +9301,11 @@ function useEventListener(type, listener, options = {}) {
|
|
|
9272
9301
|
const add2 = () => {
|
|
9273
9302
|
const element = unref(target);
|
|
9274
9303
|
if (element && !attached) {
|
|
9275
|
-
element.addEventListener(
|
|
9304
|
+
element.addEventListener(
|
|
9305
|
+
type,
|
|
9306
|
+
listener,
|
|
9307
|
+
capture
|
|
9308
|
+
);
|
|
9276
9309
|
attached = true;
|
|
9277
9310
|
}
|
|
9278
9311
|
};
|
|
@@ -9439,24 +9472,24 @@ function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9439
9472
|
const cssModules$1o = {};
|
|
9440
9473
|
cssModules$1o["$style"] = style0$1o;
|
|
9441
9474
|
var WalletBreakdown = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1z], ["__cssModules", cssModules$1o]]);
|
|
9442
|
-
const wrapperClass$p = "
|
|
9443
|
-
const ppmnaPaymentTypeContainer$4 = "
|
|
9444
|
-
const img$d = "
|
|
9445
|
-
const imgContainer$5 = "
|
|
9446
|
-
const roundStylePaymentType$4 = "
|
|
9447
|
-
const main$5 = "
|
|
9448
|
-
const sub$4 = "
|
|
9449
|
-
const makePayWithAddress$4 = "
|
|
9450
|
-
const makePaymentTypeContainer$4 = "
|
|
9451
|
-
const arrowContainer$6 = "
|
|
9452
|
-
const arrowRight$4 = "
|
|
9453
|
-
const makePaymentArrowContainer$4 = "
|
|
9454
|
-
const walletContainer = "
|
|
9455
|
-
const subTitle$1 = "
|
|
9456
|
-
const chargeContainer = "
|
|
9457
|
-
const greenTick = "
|
|
9458
|
-
const autoCharge = "
|
|
9459
|
-
const makePaymentRightAlign = "
|
|
9475
|
+
const wrapperClass$p = "_wrapperClass_15dit_1";
|
|
9476
|
+
const ppmnaPaymentTypeContainer$4 = "_ppmnaPaymentTypeContainer_15dit_1";
|
|
9477
|
+
const img$d = "_img_15dit_5";
|
|
9478
|
+
const imgContainer$5 = "_imgContainer_15dit_18";
|
|
9479
|
+
const roundStylePaymentType$4 = "_roundStylePaymentType_15dit_26";
|
|
9480
|
+
const main$5 = "_main_15dit_32";
|
|
9481
|
+
const sub$4 = "_sub_15dit_48";
|
|
9482
|
+
const makePayWithAddress$4 = "_makePayWithAddress_15dit_58";
|
|
9483
|
+
const makePaymentTypeContainer$4 = "_makePaymentTypeContainer_15dit_63";
|
|
9484
|
+
const arrowContainer$6 = "_arrowContainer_15dit_68";
|
|
9485
|
+
const arrowRight$4 = "_arrowRight_15dit_71";
|
|
9486
|
+
const makePaymentArrowContainer$4 = "_makePaymentArrowContainer_15dit_81";
|
|
9487
|
+
const walletContainer = "_walletContainer_15dit_86";
|
|
9488
|
+
const subTitle$1 = "_subTitle_15dit_91";
|
|
9489
|
+
const chargeContainer = "_chargeContainer_15dit_96";
|
|
9490
|
+
const greenTick = "_greenTick_15dit_106";
|
|
9491
|
+
const autoCharge = "_autoCharge_15dit_119";
|
|
9492
|
+
const makePaymentRightAlign = "_makePaymentRightAlign_15dit_126";
|
|
9460
9493
|
var style0$1n = {
|
|
9461
9494
|
wrapperClass: wrapperClass$p,
|
|
9462
9495
|
ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$4,
|
|
@@ -9498,10 +9531,14 @@ const _sfc_main$1y = defineComponent({
|
|
|
9498
9531
|
}
|
|
9499
9532
|
},
|
|
9500
9533
|
setup(props) {
|
|
9501
|
-
const formattedBalance = computed(
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9534
|
+
const formattedBalance = computed(
|
|
9535
|
+
() => {
|
|
9536
|
+
var _a2, _b, _c, _d;
|
|
9537
|
+
return formatAmount(
|
|
9538
|
+
(_d = (_c = (_b = (_a2 = props == null ? void 0 : props.wallet) == null ? void 0 : _a2.walletInfo) == null ? void 0 : _b.walletSummary) == null ? void 0 : _c.totalBalanceInfo) == null ? void 0 : _d.balance
|
|
9539
|
+
);
|
|
9540
|
+
}
|
|
9541
|
+
);
|
|
9505
9542
|
const { isDesktop } = useBreakpoints();
|
|
9506
9543
|
const isPreTransactionAutoChargeEnabled = computed(() => {
|
|
9507
9544
|
var _a2, _b;
|
|
@@ -9583,29 +9620,29 @@ function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9583
9620
|
const cssModules$1n = {};
|
|
9584
9621
|
cssModules$1n["$style"] = style0$1n;
|
|
9585
9622
|
var WalletType = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1y], ["__cssModules", cssModules$1n]]);
|
|
9586
|
-
const wrapperClass$o = "
|
|
9587
|
-
const ppmnaPaymentTypeContainer$3 = "
|
|
9588
|
-
const img$c = "
|
|
9589
|
-
const imgContainer$4 = "
|
|
9590
|
-
const roundStylePaymentType$3 = "
|
|
9591
|
-
const main$4 = "
|
|
9592
|
-
const sub$3 = "
|
|
9593
|
-
const makePayWithAddress$3 = "
|
|
9594
|
-
const makePaymentTypeContainer$3 = "
|
|
9595
|
-
const arrowContainer$5 = "
|
|
9596
|
-
const arrowRight$3 = "
|
|
9597
|
-
const makePaymentArrowContainer$3 = "
|
|
9598
|
-
const mainLabel$5 = "
|
|
9599
|
-
const auth = "
|
|
9600
|
-
const authText = "
|
|
9601
|
-
const cardImageContainer = "
|
|
9602
|
-
const cardImg = "
|
|
9603
|
-
const content$h = "
|
|
9604
|
-
const authenticated = "
|
|
9605
|
-
const notAuthenticated = "
|
|
9606
|
-
const authorizedImg$1 = "
|
|
9607
|
-
const unAuthorizedImg$1 = "
|
|
9608
|
-
const creditCard$1 = "
|
|
9623
|
+
const wrapperClass$o = "_wrapperClass_11uh5_1";
|
|
9624
|
+
const ppmnaPaymentTypeContainer$3 = "_ppmnaPaymentTypeContainer_11uh5_1";
|
|
9625
|
+
const img$c = "_img_11uh5_5";
|
|
9626
|
+
const imgContainer$4 = "_imgContainer_11uh5_18";
|
|
9627
|
+
const roundStylePaymentType$3 = "_roundStylePaymentType_11uh5_26";
|
|
9628
|
+
const main$4 = "_main_11uh5_32";
|
|
9629
|
+
const sub$3 = "_sub_11uh5_48";
|
|
9630
|
+
const makePayWithAddress$3 = "_makePayWithAddress_11uh5_58";
|
|
9631
|
+
const makePaymentTypeContainer$3 = "_makePaymentTypeContainer_11uh5_63";
|
|
9632
|
+
const arrowContainer$5 = "_arrowContainer_11uh5_68";
|
|
9633
|
+
const arrowRight$3 = "_arrowRight_11uh5_71";
|
|
9634
|
+
const makePaymentArrowContainer$3 = "_makePaymentArrowContainer_11uh5_81";
|
|
9635
|
+
const mainLabel$5 = "_mainLabel_11uh5_85";
|
|
9636
|
+
const auth = "_auth_11uh5_90";
|
|
9637
|
+
const authText = "_authText_11uh5_100";
|
|
9638
|
+
const cardImageContainer = "_cardImageContainer_11uh5_104";
|
|
9639
|
+
const cardImg = "_cardImg_11uh5_107";
|
|
9640
|
+
const content$h = "_content_11uh5_111";
|
|
9641
|
+
const authenticated = "_authenticated_11uh5_121";
|
|
9642
|
+
const notAuthenticated = "_notAuthenticated_11uh5_124";
|
|
9643
|
+
const authorizedImg$1 = "_authorizedImg_11uh5_127";
|
|
9644
|
+
const unAuthorizedImg$1 = "_unAuthorizedImg_11uh5_136";
|
|
9645
|
+
const creditCard$1 = "_creditCard_11uh5_144";
|
|
9609
9646
|
var style0$1m = {
|
|
9610
9647
|
wrapperClass: wrapperClass$o,
|
|
9611
9648
|
ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$3,
|
|
@@ -9777,24 +9814,24 @@ function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9777
9814
|
const cssModules$1m = {};
|
|
9778
9815
|
cssModules$1m["$style"] = style0$1m;
|
|
9779
9816
|
var CreditCardType = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1x], ["__cssModules", cssModules$1m]]);
|
|
9780
|
-
const wrapperClass$n = "
|
|
9781
|
-
const ppmnaPaymentTypeContainer$2 = "
|
|
9782
|
-
const img$a = "
|
|
9783
|
-
const imgContainer$3 = "
|
|
9784
|
-
const roundStylePaymentType$2 = "
|
|
9785
|
-
const main$3 = "
|
|
9786
|
-
const sub$2 = "
|
|
9787
|
-
const makePayWithAddress$2 = "
|
|
9788
|
-
const makePaymentTypeContainer$2 = "
|
|
9789
|
-
const arrowContainer$4 = "
|
|
9790
|
-
const arrowRight$2 = "
|
|
9791
|
-
const makePaymentArrowContainer$2 = "
|
|
9792
|
-
const bankImg = "
|
|
9793
|
-
const branchCode = "
|
|
9794
|
-
const content$g = "
|
|
9795
|
-
const roundContainer = "
|
|
9796
|
-
const round$2 = "
|
|
9797
|
-
const bankName = "
|
|
9817
|
+
const wrapperClass$n = "_wrapperClass_1lw1h_1";
|
|
9818
|
+
const ppmnaPaymentTypeContainer$2 = "_ppmnaPaymentTypeContainer_1lw1h_1";
|
|
9819
|
+
const img$a = "_img_1lw1h_5";
|
|
9820
|
+
const imgContainer$3 = "_imgContainer_1lw1h_18";
|
|
9821
|
+
const roundStylePaymentType$2 = "_roundStylePaymentType_1lw1h_26";
|
|
9822
|
+
const main$3 = "_main_1lw1h_32";
|
|
9823
|
+
const sub$2 = "_sub_1lw1h_48";
|
|
9824
|
+
const makePayWithAddress$2 = "_makePayWithAddress_1lw1h_58";
|
|
9825
|
+
const makePaymentTypeContainer$2 = "_makePaymentTypeContainer_1lw1h_63";
|
|
9826
|
+
const arrowContainer$4 = "_arrowContainer_1lw1h_68";
|
|
9827
|
+
const arrowRight$2 = "_arrowRight_1lw1h_71";
|
|
9828
|
+
const makePaymentArrowContainer$2 = "_makePaymentArrowContainer_1lw1h_81";
|
|
9829
|
+
const bankImg = "_bankImg_1lw1h_85";
|
|
9830
|
+
const branchCode = "_branchCode_1lw1h_89";
|
|
9831
|
+
const content$g = "_content_1lw1h_92";
|
|
9832
|
+
const roundContainer = "_roundContainer_1lw1h_96";
|
|
9833
|
+
const round$2 = "_round_1lw1h_26";
|
|
9834
|
+
const bankName = "_bankName_1lw1h_102";
|
|
9798
9835
|
var style0$1l = {
|
|
9799
9836
|
wrapperClass: wrapperClass$n,
|
|
9800
9837
|
ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$2,
|
|
@@ -9926,23 +9963,23 @@ function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9926
9963
|
const cssModules$1l = {};
|
|
9927
9964
|
cssModules$1l["$style"] = style0$1l;
|
|
9928
9965
|
var BankType = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1w], ["__cssModules", cssModules$1l]]);
|
|
9929
|
-
const wrapperClass$m = "
|
|
9930
|
-
const ppmnaPaymentTypeContainer$1 = "
|
|
9931
|
-
const img$9 = "
|
|
9932
|
-
const imgContainer$2 = "
|
|
9933
|
-
const roundStylePaymentType$1 = "
|
|
9934
|
-
const main$2 = "
|
|
9935
|
-
const sub$1 = "
|
|
9936
|
-
const makePayWithAddress$1 = "
|
|
9937
|
-
const makePaymentTypeContainer$1 = "
|
|
9938
|
-
const arrowContainer$3 = "
|
|
9939
|
-
const arrowRight$1 = "
|
|
9940
|
-
const makePaymentArrowContainer$1 = "
|
|
9941
|
-
const container$y = "
|
|
9942
|
-
const sbidImg = "
|
|
9943
|
-
const content$f = "
|
|
9944
|
-
const desc1 = "
|
|
9945
|
-
const desc2 = "
|
|
9966
|
+
const wrapperClass$m = "_wrapperClass_sdttg_1";
|
|
9967
|
+
const ppmnaPaymentTypeContainer$1 = "_ppmnaPaymentTypeContainer_sdttg_1";
|
|
9968
|
+
const img$9 = "_img_sdttg_5";
|
|
9969
|
+
const imgContainer$2 = "_imgContainer_sdttg_18";
|
|
9970
|
+
const roundStylePaymentType$1 = "_roundStylePaymentType_sdttg_26";
|
|
9971
|
+
const main$2 = "_main_sdttg_32";
|
|
9972
|
+
const sub$1 = "_sub_sdttg_48";
|
|
9973
|
+
const makePayWithAddress$1 = "_makePayWithAddress_sdttg_58";
|
|
9974
|
+
const makePaymentTypeContainer$1 = "_makePaymentTypeContainer_sdttg_63";
|
|
9975
|
+
const arrowContainer$3 = "_arrowContainer_sdttg_68";
|
|
9976
|
+
const arrowRight$1 = "_arrowRight_sdttg_71";
|
|
9977
|
+
const makePaymentArrowContainer$1 = "_makePaymentArrowContainer_sdttg_81";
|
|
9978
|
+
const container$y = "_container_sdttg_85";
|
|
9979
|
+
const sbidImg = "_sbidImg_sdttg_97";
|
|
9980
|
+
const content$f = "_content_sdttg_105";
|
|
9981
|
+
const desc1 = "_desc1_sdttg_118";
|
|
9982
|
+
const desc2 = "_desc2_sdttg_122";
|
|
9946
9983
|
var style0$1k = {
|
|
9947
9984
|
wrapperClass: wrapperClass$m,
|
|
9948
9985
|
ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$1,
|
|
@@ -9980,10 +10017,12 @@ const _sfc_main$1v = defineComponent({
|
|
|
9980
10017
|
return (_a2 = status[val2]) != null ? _a2 : "";
|
|
9981
10018
|
};
|
|
9982
10019
|
return {
|
|
9983
|
-
paymentMethodStatus: computed(
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
10020
|
+
paymentMethodStatus: computed(
|
|
10021
|
+
() => {
|
|
10022
|
+
var _a2, _b, _c;
|
|
10023
|
+
return getStatus((_c = (_b = (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo) == null ? void 0 : _b.paymentMethodStatus) != null ? _c : "");
|
|
10024
|
+
}
|
|
10025
|
+
),
|
|
9987
10026
|
images: getImages(),
|
|
9988
10027
|
lg: getLanguage()
|
|
9989
10028
|
};
|
|
@@ -10027,21 +10066,21 @@ function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10027
10066
|
const cssModules$1k = {};
|
|
10028
10067
|
cssModules$1k["$style"] = style0$1k;
|
|
10029
10068
|
var SbidType = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1v], ["__cssModules", cssModules$1k]]);
|
|
10030
|
-
const wrapperClass$l = "
|
|
10031
|
-
const ppmnaPaymentTypeContainer = "
|
|
10032
|
-
const img$8 = "
|
|
10033
|
-
const imgContainer$1 = "
|
|
10034
|
-
const roundStylePaymentType = "
|
|
10035
|
-
const main$1 = "
|
|
10036
|
-
const sub = "
|
|
10037
|
-
const makePayWithAddress = "
|
|
10038
|
-
const makePaymentTypeContainer = "
|
|
10039
|
-
const arrowContainer$2 = "
|
|
10040
|
-
const arrowRight = "
|
|
10041
|
-
const makePaymentArrowContainer = "
|
|
10042
|
-
const container$x = "
|
|
10043
|
-
const subTitle = "
|
|
10044
|
-
const imageContainer$5 = "
|
|
10069
|
+
const wrapperClass$l = "_wrapperClass_1cjo2_1";
|
|
10070
|
+
const ppmnaPaymentTypeContainer = "_ppmnaPaymentTypeContainer_1cjo2_1";
|
|
10071
|
+
const img$8 = "_img_1cjo2_5";
|
|
10072
|
+
const imgContainer$1 = "_imgContainer_1cjo2_18";
|
|
10073
|
+
const roundStylePaymentType = "_roundStylePaymentType_1cjo2_26";
|
|
10074
|
+
const main$1 = "_main_1cjo2_32";
|
|
10075
|
+
const sub = "_sub_1cjo2_48";
|
|
10076
|
+
const makePayWithAddress = "_makePayWithAddress_1cjo2_58";
|
|
10077
|
+
const makePaymentTypeContainer = "_makePaymentTypeContainer_1cjo2_63";
|
|
10078
|
+
const arrowContainer$2 = "_arrowContainer_1cjo2_68";
|
|
10079
|
+
const arrowRight = "_arrowRight_1cjo2_71";
|
|
10080
|
+
const makePaymentArrowContainer = "_makePaymentArrowContainer_1cjo2_81";
|
|
10081
|
+
const container$x = "_container_1cjo2_86";
|
|
10082
|
+
const subTitle = "_subTitle_1cjo2_91";
|
|
10083
|
+
const imageContainer$5 = "_imageContainer_1cjo2_96";
|
|
10045
10084
|
var style0$1j = {
|
|
10046
10085
|
wrapperClass: wrapperClass$l,
|
|
10047
10086
|
ppmnaPaymentTypeContainer,
|
|
@@ -10078,10 +10117,12 @@ const _sfc_main$1u = defineComponent({
|
|
|
10078
10117
|
},
|
|
10079
10118
|
setup(props) {
|
|
10080
10119
|
return {
|
|
10081
|
-
formattedBalance: computed(
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10120
|
+
formattedBalance: computed(
|
|
10121
|
+
() => {
|
|
10122
|
+
var _a2, _b;
|
|
10123
|
+
return formatAmount((_b = (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.availableAmount);
|
|
10124
|
+
}
|
|
10125
|
+
),
|
|
10085
10126
|
images: getImages(),
|
|
10086
10127
|
lg: getLanguage()
|
|
10087
10128
|
};
|
|
@@ -17169,10 +17210,10 @@ var lottie_svg = { exports: {} };
|
|
|
17169
17210
|
eff = new MaskIndexEffect(effects[i2], element, this);
|
|
17170
17211
|
break;
|
|
17171
17212
|
case 5:
|
|
17172
|
-
eff = new EffectsManager(effects[i2], element
|
|
17213
|
+
eff = new EffectsManager(effects[i2], element);
|
|
17173
17214
|
break;
|
|
17174
17215
|
default:
|
|
17175
|
-
eff = new NoValueEffect(effects[i2]
|
|
17216
|
+
eff = new NoValueEffect(effects[i2]);
|
|
17176
17217
|
break;
|
|
17177
17218
|
}
|
|
17178
17219
|
if (eff) {
|
|
@@ -19740,7 +19781,7 @@ var lottie_svg = { exports: {} };
|
|
|
19740
19781
|
};
|
|
19741
19782
|
extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
|
|
19742
19783
|
function getTextSelectorProp(elem2, data2, arr) {
|
|
19743
|
-
return new TextSelectorPropFactory(elem2, data2
|
|
19784
|
+
return new TextSelectorPropFactory(elem2, data2);
|
|
19744
19785
|
}
|
|
19745
19786
|
return {
|
|
19746
19787
|
getTextSelectorProp
|
|
@@ -22941,15 +22982,15 @@ const Lottie = defineComponent({
|
|
|
22941
22982
|
}, null);
|
|
22942
22983
|
}
|
|
22943
22984
|
});
|
|
22944
|
-
const wrapperClass$k = "
|
|
22945
|
-
const container$w = "
|
|
22946
|
-
const header$a = "
|
|
22947
|
-
const arrow$2 = "
|
|
22948
|
-
const address$1 = "
|
|
22949
|
-
const arrowContainer$1 = "
|
|
22950
|
-
const text$7 = "
|
|
22985
|
+
const wrapperClass$k = "_wrapperClass_1ilm4_7";
|
|
22986
|
+
const container$w = "_container_1ilm4_7";
|
|
22987
|
+
const header$a = "_header_1ilm4_21";
|
|
22988
|
+
const arrow$2 = "_arrow_1ilm4_28";
|
|
22989
|
+
const address$1 = "_address_1ilm4_37";
|
|
22990
|
+
const arrowContainer$1 = "_arrowContainer_1ilm4_46";
|
|
22991
|
+
const text$7 = "_text_1ilm4_57";
|
|
22951
22992
|
var style0$1i = {
|
|
22952
|
-
"ppmna-default-font": "_ppmna-default-
|
|
22993
|
+
"ppmna-default-font": "_ppmna-default-font_1ilm4_1",
|
|
22953
22994
|
wrapperClass: wrapperClass$k,
|
|
22954
22995
|
container: container$w,
|
|
22955
22996
|
header: header$a,
|
|
@@ -23079,10 +23120,14 @@ const _sfc_main$1s = defineComponent({
|
|
|
23079
23120
|
const toggleBreakDown = () => {
|
|
23080
23121
|
openBreakDown.value = !openBreakDown.value;
|
|
23081
23122
|
};
|
|
23082
|
-
const formattedBalance = computed(
|
|
23083
|
-
|
|
23084
|
-
|
|
23085
|
-
|
|
23123
|
+
const formattedBalance = computed(
|
|
23124
|
+
() => {
|
|
23125
|
+
var _a2, _b, _c;
|
|
23126
|
+
return formatAmount(
|
|
23127
|
+
(_c = (_b = (_a2 = props.wallet.walletInfo) == null ? void 0 : _a2.walletSummary) == null ? void 0 : _b.totalBalanceInfo) == null ? void 0 : _c.balance
|
|
23128
|
+
);
|
|
23129
|
+
}
|
|
23130
|
+
);
|
|
23086
23131
|
const style = useCssModule();
|
|
23087
23132
|
const walletDetail = computed(() => {
|
|
23088
23133
|
var _a2, _b;
|
|
@@ -23229,18 +23274,22 @@ const _sfc_main$1r = defineComponent({
|
|
|
23229
23274
|
var _a2, _b;
|
|
23230
23275
|
return (_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.isYjCard;
|
|
23231
23276
|
});
|
|
23232
|
-
const isPPCard = computed(
|
|
23233
|
-
|
|
23234
|
-
|
|
23235
|
-
|
|
23277
|
+
const isPPCard = computed(
|
|
23278
|
+
() => {
|
|
23279
|
+
var _a2, _b;
|
|
23280
|
+
return ((_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.ccType) === "PP_CARD";
|
|
23281
|
+
}
|
|
23282
|
+
);
|
|
23236
23283
|
const isExpired = computed(() => {
|
|
23237
23284
|
var _a2, _b;
|
|
23238
23285
|
return (_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.isExpired;
|
|
23239
23286
|
});
|
|
23240
|
-
const isDisable = computed(
|
|
23241
|
-
|
|
23242
|
-
|
|
23243
|
-
|
|
23287
|
+
const isDisable = computed(
|
|
23288
|
+
() => {
|
|
23289
|
+
var _a2, _b;
|
|
23290
|
+
return ((_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.paymentMethodStatus) !== "ACTIVATED" || isExpired.value;
|
|
23291
|
+
}
|
|
23292
|
+
);
|
|
23244
23293
|
const authInfo = computed(() => {
|
|
23245
23294
|
var _a2, _b;
|
|
23246
23295
|
const authenticated2 = (_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.isAuthenticated;
|
|
@@ -23283,10 +23332,15 @@ const _sfc_main$1r = defineComponent({
|
|
|
23283
23332
|
style: props.round ? style.round : style.creditCard
|
|
23284
23333
|
};
|
|
23285
23334
|
});
|
|
23286
|
-
const paymentMethodStatusText = computed(
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
|
|
23335
|
+
const paymentMethodStatusText = computed(
|
|
23336
|
+
() => {
|
|
23337
|
+
var _a2, _b;
|
|
23338
|
+
return getPaymentMethodStatus(
|
|
23339
|
+
(_a2 = isExpired.value) != null ? _a2 : false,
|
|
23340
|
+
(_b = props.credit) == null ? void 0 : _b.creditCardInfo
|
|
23341
|
+
);
|
|
23342
|
+
}
|
|
23343
|
+
);
|
|
23290
23344
|
const additionalDescription = computed(() => {
|
|
23291
23345
|
var _a2;
|
|
23292
23346
|
return (_a2 = props.credit.paymentMethodDescriptionInfo) == null ? void 0 : _a2.additionalDescription;
|
|
@@ -23315,13 +23369,15 @@ const _sfc_main$1r = defineComponent({
|
|
|
23315
23369
|
style,
|
|
23316
23370
|
cardInfo: cardInfo2,
|
|
23317
23371
|
additionalDescription,
|
|
23318
|
-
payMethodDescriptionInfo: computed(
|
|
23319
|
-
|
|
23320
|
-
|
|
23321
|
-
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
|
|
23372
|
+
payMethodDescriptionInfo: computed(
|
|
23373
|
+
() => {
|
|
23374
|
+
var _a2, _b, _c, _d;
|
|
23375
|
+
return [
|
|
23376
|
+
(_b = (_a2 = props.credit) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
|
|
23377
|
+
(_d = (_c = props.credit) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
|
|
23378
|
+
].filter((info2) => !!info2);
|
|
23379
|
+
}
|
|
23380
|
+
),
|
|
23325
23381
|
getMaintenanceStyle: computed(() => (info2) => {
|
|
23326
23382
|
return {
|
|
23327
23383
|
color: info2.color
|
|
@@ -23520,10 +23576,12 @@ const _sfc_main$1q = defineComponent({
|
|
|
23520
23576
|
openUrl(info2.linkUrl);
|
|
23521
23577
|
}
|
|
23522
23578
|
};
|
|
23523
|
-
const isDisable = computed(
|
|
23524
|
-
|
|
23525
|
-
|
|
23526
|
-
|
|
23579
|
+
const isDisable = computed(
|
|
23580
|
+
() => {
|
|
23581
|
+
var _a2, _b;
|
|
23582
|
+
return ((_b = (_a2 = props.bank) == null ? void 0 : _a2.bankInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
|
|
23583
|
+
}
|
|
23584
|
+
);
|
|
23527
23585
|
const handleSelect = () => {
|
|
23528
23586
|
if (isDisable == null ? void 0 : isDisable.value) {
|
|
23529
23587
|
return;
|
|
@@ -23533,19 +23591,23 @@ const _sfc_main$1q = defineComponent({
|
|
|
23533
23591
|
return {
|
|
23534
23592
|
bankInfo: bankInfo2,
|
|
23535
23593
|
isDisable,
|
|
23536
|
-
paymentMethodStatusText: computed(
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
|
|
23594
|
+
paymentMethodStatusText: computed(
|
|
23595
|
+
() => {
|
|
23596
|
+
var _a2;
|
|
23597
|
+
return getPaymentMethodStatus(false, (_a2 = props.bank) == null ? void 0 : _a2.bankInfo);
|
|
23598
|
+
}
|
|
23599
|
+
),
|
|
23540
23600
|
getClass: (isDisable == null ? void 0 : isDisable.value) ? style.paymentMethodDisabled : "",
|
|
23541
23601
|
style,
|
|
23542
|
-
payMethodDescriptionInfo: computed(
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
23546
|
-
|
|
23547
|
-
|
|
23548
|
-
|
|
23602
|
+
payMethodDescriptionInfo: computed(
|
|
23603
|
+
() => {
|
|
23604
|
+
var _a2, _b, _c, _d;
|
|
23605
|
+
return [
|
|
23606
|
+
(_b = (_a2 = props.bank) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
|
|
23607
|
+
(_d = (_c = props.bank) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
|
|
23608
|
+
].filter((info2) => !!info2);
|
|
23609
|
+
}
|
|
23610
|
+
),
|
|
23549
23611
|
getMaintenanceStyle: computed(() => (info2) => {
|
|
23550
23612
|
return {
|
|
23551
23613
|
color: info2.color
|
|
@@ -23686,10 +23748,12 @@ const _sfc_main$1p = defineComponent({
|
|
|
23686
23748
|
openUrl(info2.linkUrl);
|
|
23687
23749
|
}
|
|
23688
23750
|
};
|
|
23689
|
-
const isDisable = computed(
|
|
23690
|
-
|
|
23691
|
-
|
|
23692
|
-
|
|
23751
|
+
const isDisable = computed(
|
|
23752
|
+
() => {
|
|
23753
|
+
var _a2, _b;
|
|
23754
|
+
return ((_b = (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
|
|
23755
|
+
}
|
|
23756
|
+
);
|
|
23693
23757
|
const handleSelect = () => {
|
|
23694
23758
|
if (isDisable.value) {
|
|
23695
23759
|
return;
|
|
@@ -23699,20 +23763,24 @@ const _sfc_main$1p = defineComponent({
|
|
|
23699
23763
|
return {
|
|
23700
23764
|
isDisable,
|
|
23701
23765
|
images: getImages(),
|
|
23702
|
-
paymentMethodStatusText: computed(
|
|
23703
|
-
|
|
23704
|
-
|
|
23705
|
-
|
|
23766
|
+
paymentMethodStatusText: computed(
|
|
23767
|
+
() => {
|
|
23768
|
+
var _a2;
|
|
23769
|
+
return getPaymentMethodStatus(false, (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo);
|
|
23770
|
+
}
|
|
23771
|
+
),
|
|
23706
23772
|
getClass: (isDisable == null ? void 0 : isDisable.value) ? style.paymentMethodDisabled : "",
|
|
23707
23773
|
lg: getLanguage(),
|
|
23708
23774
|
style,
|
|
23709
|
-
payMethodDescriptionInfo: computed(
|
|
23710
|
-
|
|
23711
|
-
|
|
23712
|
-
|
|
23713
|
-
|
|
23714
|
-
|
|
23715
|
-
|
|
23775
|
+
payMethodDescriptionInfo: computed(
|
|
23776
|
+
() => {
|
|
23777
|
+
var _a2, _b, _c, _d;
|
|
23778
|
+
return [
|
|
23779
|
+
(_b = (_a2 = props.sbid) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
|
|
23780
|
+
(_d = (_c = props.sbid) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
|
|
23781
|
+
].filter((info2) => !!info2);
|
|
23782
|
+
}
|
|
23783
|
+
),
|
|
23716
23784
|
getMaintenanceStyle: computed(() => (info2) => {
|
|
23717
23785
|
return {
|
|
23718
23786
|
color: info2.color
|
|
@@ -23842,10 +23910,12 @@ const _sfc_main$1o = defineComponent({
|
|
|
23842
23910
|
openUrl(info2.linkUrl);
|
|
23843
23911
|
}
|
|
23844
23912
|
};
|
|
23845
|
-
const isDisable = computed(
|
|
23846
|
-
|
|
23847
|
-
|
|
23848
|
-
|
|
23913
|
+
const isDisable = computed(
|
|
23914
|
+
() => {
|
|
23915
|
+
var _a2, _b;
|
|
23916
|
+
return ((_b = (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
|
|
23917
|
+
}
|
|
23918
|
+
);
|
|
23849
23919
|
const handleSelect = () => {
|
|
23850
23920
|
if (isDisable.value) {
|
|
23851
23921
|
return;
|
|
@@ -23853,24 +23923,30 @@ const _sfc_main$1o = defineComponent({
|
|
|
23853
23923
|
emit("select");
|
|
23854
23924
|
};
|
|
23855
23925
|
return {
|
|
23856
|
-
formattedBalance: computed(
|
|
23857
|
-
|
|
23858
|
-
|
|
23859
|
-
|
|
23926
|
+
formattedBalance: computed(
|
|
23927
|
+
() => {
|
|
23928
|
+
var _a2, _b;
|
|
23929
|
+
return formatAmount((_b = (_a2 = props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.availableAmount);
|
|
23930
|
+
}
|
|
23931
|
+
),
|
|
23860
23932
|
isDisable,
|
|
23861
23933
|
images: getImages(),
|
|
23862
23934
|
lg: getLanguage(),
|
|
23863
|
-
paymentMethodStatusText: computed(
|
|
23864
|
-
|
|
23865
|
-
|
|
23866
|
-
|
|
23867
|
-
|
|
23868
|
-
|
|
23869
|
-
|
|
23870
|
-
|
|
23871
|
-
|
|
23872
|
-
|
|
23873
|
-
|
|
23935
|
+
paymentMethodStatusText: computed(
|
|
23936
|
+
() => {
|
|
23937
|
+
var _a2;
|
|
23938
|
+
return getPaymentMethodStatus(false, (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo);
|
|
23939
|
+
}
|
|
23940
|
+
),
|
|
23941
|
+
payMethodDescriptionInfo: computed(
|
|
23942
|
+
() => {
|
|
23943
|
+
var _a2, _b, _c, _d;
|
|
23944
|
+
return [
|
|
23945
|
+
(_b = (_a2 = props.payLater) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
|
|
23946
|
+
(_d = (_c = props.payLater) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
|
|
23947
|
+
].filter((info2) => !!info2);
|
|
23948
|
+
}
|
|
23949
|
+
),
|
|
23874
23950
|
getMaintenanceStyle: computed(() => (info2) => {
|
|
23875
23951
|
return {
|
|
23876
23952
|
color: info2.color
|
|
@@ -23998,12 +24074,12 @@ const PaymentMethod = defineComponent({
|
|
|
23998
24074
|
return null;
|
|
23999
24075
|
}
|
|
24000
24076
|
});
|
|
24001
|
-
const wrapperClass$e = "
|
|
24002
|
-
const methodItem$1 = "
|
|
24003
|
-
const topupMethodItem = "
|
|
24004
|
-
const iconContainer$2 = "
|
|
24005
|
-
const iconGreenTick$1 = "
|
|
24006
|
-
const iconHidden$1 = "
|
|
24077
|
+
const wrapperClass$e = "_wrapperClass_74p4m_1";
|
|
24078
|
+
const methodItem$1 = "_methodItem_74p4m_1";
|
|
24079
|
+
const topupMethodItem = "_topupMethodItem_74p4m_14";
|
|
24080
|
+
const iconContainer$2 = "_iconContainer_74p4m_18";
|
|
24081
|
+
const iconGreenTick$1 = "_iconGreenTick_74p4m_27";
|
|
24082
|
+
const iconHidden$1 = "_iconHidden_74p4m_37";
|
|
24007
24083
|
var style0$1c = {
|
|
24008
24084
|
wrapperClass: wrapperClass$e,
|
|
24009
24085
|
methodItem: methodItem$1,
|
|
@@ -24107,19 +24183,23 @@ const _sfc_main$1m = defineComponent({
|
|
|
24107
24183
|
openUrl(linkUrl);
|
|
24108
24184
|
}
|
|
24109
24185
|
};
|
|
24110
|
-
const textStyle = computed(
|
|
24111
|
-
|
|
24112
|
-
|
|
24113
|
-
|
|
24114
|
-
|
|
24115
|
-
|
|
24116
|
-
|
|
24117
|
-
|
|
24118
|
-
|
|
24119
|
-
|
|
24120
|
-
|
|
24121
|
-
|
|
24122
|
-
|
|
24186
|
+
const textStyle = computed(
|
|
24187
|
+
() => {
|
|
24188
|
+
var _a2, _b, _c;
|
|
24189
|
+
return {
|
|
24190
|
+
color: (_b = (_a2 = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _a2.color) != null ? _b : "#3895FF",
|
|
24191
|
+
"font-weight": ((_c = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _c.isBold) ? "bold" : "normal"
|
|
24192
|
+
};
|
|
24193
|
+
}
|
|
24194
|
+
);
|
|
24195
|
+
const containerStyle = computed(
|
|
24196
|
+
() => {
|
|
24197
|
+
var _a2, _b;
|
|
24198
|
+
return {
|
|
24199
|
+
backgroundColor: (_b = (_a2 = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _a2.backgroundColor) != null ? _b : "#E5F1FF"
|
|
24200
|
+
};
|
|
24201
|
+
}
|
|
24202
|
+
);
|
|
24123
24203
|
return {
|
|
24124
24204
|
handleClick,
|
|
24125
24205
|
textStyle,
|
|
@@ -24322,7 +24402,10 @@ function initRoot(props, { emit }) {
|
|
|
24322
24402
|
var _a2;
|
|
24323
24403
|
const cancel2 = () => {
|
|
24324
24404
|
var _a3, _b;
|
|
24325
|
-
(_b = (_a3 = props.getUserAddressParams) == null ? void 0 : _a3.fail) == null ? void 0 : _b.call(
|
|
24405
|
+
(_b = (_a3 = props.getUserAddressParams) == null ? void 0 : _a3.fail) == null ? void 0 : _b.call(
|
|
24406
|
+
_a3,
|
|
24407
|
+
createErrorCode(MiniAppErrorType.userCanceled)
|
|
24408
|
+
);
|
|
24326
24409
|
emit("click");
|
|
24327
24410
|
};
|
|
24328
24411
|
const success2 = (address2) => {
|
|
@@ -24358,14 +24441,14 @@ function initRoot(props, { emit }) {
|
|
|
24358
24441
|
function getRoot() {
|
|
24359
24442
|
return inject(KEY$1);
|
|
24360
24443
|
}
|
|
24361
|
-
const root$8 = "
|
|
24362
|
-
const editLink = "
|
|
24363
|
-
const addressContainer$1 = "
|
|
24364
|
-
const header$9 = "
|
|
24365
|
-
const receiver = "
|
|
24366
|
-
const selected$1 = "
|
|
24367
|
-
const selectedContainer = "
|
|
24368
|
-
const text$6 = "
|
|
24444
|
+
const root$8 = "_root_1h4sg_1";
|
|
24445
|
+
const editLink = "_editLink_1h4sg_20";
|
|
24446
|
+
const addressContainer$1 = "_addressContainer_1h4sg_44";
|
|
24447
|
+
const header$9 = "_header_1h4sg_48";
|
|
24448
|
+
const receiver = "_receiver_1h4sg_59";
|
|
24449
|
+
const selected$1 = "_selected_1h4sg_63";
|
|
24450
|
+
const selectedContainer = "_selectedContainer_1h4sg_72";
|
|
24451
|
+
const text$6 = "_text_1h4sg_81";
|
|
24369
24452
|
var style0$19 = {
|
|
24370
24453
|
root: root$8,
|
|
24371
24454
|
editLink,
|
|
@@ -24409,7 +24492,11 @@ const _sfc_main$1k = defineComponent({
|
|
|
24409
24492
|
const edit = () => emit("edit", props.address);
|
|
24410
24493
|
const postalCode = computed(() => {
|
|
24411
24494
|
var _a2, _b, _c, _d;
|
|
24412
|
-
return `\u3012${(_b = (_a2 = props.address.zip) == null ? void 0 : _a2.slice) == null ? void 0 : _b.call(
|
|
24495
|
+
return `\u3012${(_b = (_a2 = props.address.zip) == null ? void 0 : _a2.slice) == null ? void 0 : _b.call(
|
|
24496
|
+
_a2,
|
|
24497
|
+
0,
|
|
24498
|
+
3
|
|
24499
|
+
)}-${(_d = (_c = props.address.zip) == null ? void 0 : _c.slice) == null ? void 0 : _d.call(_c, 3)}`;
|
|
24413
24500
|
});
|
|
24414
24501
|
const addressText = computed(() => {
|
|
24415
24502
|
return `${props.address.state}${props.address.city}${props.address.street1 || ""}`;
|
|
@@ -24485,16 +24572,16 @@ function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
24485
24572
|
const cssModules$19 = {};
|
|
24486
24573
|
cssModules$19["$style"] = style0$19;
|
|
24487
24574
|
var Address = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1k], ["__cssModules", cssModules$19]]);
|
|
24488
|
-
const rootUa = "
|
|
24489
|
-
const button$6 = "
|
|
24490
|
-
const footer$6 = "
|
|
24491
|
-
const addAddressLink = "
|
|
24492
|
-
const arrowContainer = "
|
|
24493
|
-
const root$7 = "
|
|
24494
|
-
const buttonLink$1 = "
|
|
24495
|
-
const arrow$1 = "
|
|
24496
|
-
const content$c = "
|
|
24497
|
-
const addIcon$1 = "
|
|
24575
|
+
const rootUa = "_rootUa_ivx7s_1";
|
|
24576
|
+
const button$6 = "_button_ivx7s_14";
|
|
24577
|
+
const footer$6 = "_footer_ivx7s_18";
|
|
24578
|
+
const addAddressLink = "_addAddressLink_ivx7s_24";
|
|
24579
|
+
const arrowContainer = "_arrowContainer_ivx7s_34";
|
|
24580
|
+
const root$7 = "_root_ivx7s_1";
|
|
24581
|
+
const buttonLink$1 = "_buttonLink_ivx7s_53";
|
|
24582
|
+
const arrow$1 = "_arrow_ivx7s_34";
|
|
24583
|
+
const content$c = "_content_ivx7s_68";
|
|
24584
|
+
const addIcon$1 = "_addIcon_ivx7s_78";
|
|
24498
24585
|
var style0$18 = {
|
|
24499
24586
|
rootUa,
|
|
24500
24587
|
button: button$6,
|
|
@@ -24514,11 +24601,6 @@ const _sfc_main$1j = defineComponent({
|
|
|
24514
24601
|
Button
|
|
24515
24602
|
},
|
|
24516
24603
|
props: {
|
|
24517
|
-
isMakepayment: {
|
|
24518
|
-
type: Boolean,
|
|
24519
|
-
required: false,
|
|
24520
|
-
default: false
|
|
24521
|
-
},
|
|
24522
24604
|
isNoaddress: {
|
|
24523
24605
|
type: Boolean,
|
|
24524
24606
|
required: false,
|
|
@@ -24559,7 +24641,7 @@ function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
24559
24641
|
const _component_Button = resolveComponent("Button");
|
|
24560
24642
|
const _component_Divider = resolveComponent("Divider");
|
|
24561
24643
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
24562
|
-
!_ctx.
|
|
24644
|
+
!_ctx.isDesktop ? (openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
24563
24645
|
createBaseVNode("div", {
|
|
24564
24646
|
class: normalizeClass(_ctx.style.footer),
|
|
24565
24647
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.add && _ctx.add(...args))
|
|
@@ -24593,7 +24675,7 @@ function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
24593
24675
|
}, 8, ["disabled", "class"])
|
|
24594
24676
|
], 2)
|
|
24595
24677
|
])) : createCommentVNode("", true),
|
|
24596
|
-
_ctx.
|
|
24678
|
+
_ctx.isDesktop ? (openBlock(), createElementBlock("div", {
|
|
24597
24679
|
key: 1,
|
|
24598
24680
|
class: normalizeClass(_ctx.style.root),
|
|
24599
24681
|
style: normalizeStyle(_ctx.bottomStyle),
|
|
@@ -25007,27 +25089,25 @@ function useAddressControl() {
|
|
|
25007
25089
|
confirmSelectedAddress
|
|
25008
25090
|
};
|
|
25009
25091
|
}
|
|
25010
|
-
const root$5 = "
|
|
25011
|
-
const
|
|
25012
|
-
const
|
|
25013
|
-
const
|
|
25014
|
-
const
|
|
25015
|
-
const
|
|
25016
|
-
const
|
|
25017
|
-
const
|
|
25018
|
-
const
|
|
25019
|
-
const
|
|
25020
|
-
const
|
|
25021
|
-
const closeBtn = "_closeBtn_1jsx1_89";
|
|
25092
|
+
const root$5 = "_root_1i3em_2";
|
|
25093
|
+
const noAddressRoot = "_noAddressRoot_1i3em_15";
|
|
25094
|
+
const container$s = "_container_1i3em_27";
|
|
25095
|
+
const noAddressMessage = "_noAddressMessage_1i3em_36";
|
|
25096
|
+
const desktopTitle$1 = "_desktopTitle_1i3em_39";
|
|
25097
|
+
const contentContainerMp = "_contentContainerMp_1i3em_49";
|
|
25098
|
+
const contentContainer$2 = "_contentContainer_1i3em_49";
|
|
25099
|
+
const payAddressRoot = "_payAddressRoot_1i3em_62";
|
|
25100
|
+
const footerBtnContainer = "_footerBtnContainer_1i3em_66";
|
|
25101
|
+
const confirmBtn = "_confirmBtn_1i3em_73";
|
|
25102
|
+
const closeBtn = "_closeBtn_1i3em_80";
|
|
25022
25103
|
var style0$13 = {
|
|
25023
25104
|
root: root$5,
|
|
25105
|
+
noAddressRoot,
|
|
25024
25106
|
container: container$s,
|
|
25025
25107
|
noAddressMessage,
|
|
25026
25108
|
desktopTitle: desktopTitle$1,
|
|
25027
25109
|
contentContainerMp,
|
|
25028
25110
|
contentContainer: contentContainer$2,
|
|
25029
|
-
contentContainerMpNoAddress,
|
|
25030
|
-
contentContainerNoAddress,
|
|
25031
25111
|
payAddressRoot,
|
|
25032
25112
|
footerBtnContainer,
|
|
25033
25113
|
confirmBtn,
|
|
@@ -25086,7 +25166,11 @@ const _sfc_main$1e = defineComponent({
|
|
|
25086
25166
|
addressList: props.addresses.slice(),
|
|
25087
25167
|
showAddressList: !(isDesktop == null ? void 0 : isDesktop.value)
|
|
25088
25168
|
});
|
|
25089
|
-
setSelectedAddress$1(
|
|
25169
|
+
setSelectedAddress$1(
|
|
25170
|
+
(props == null ? void 0 : props.savedAddressId) || ((_a2 = props.addresses[0]) == null ? void 0 : _a2.id),
|
|
25171
|
+
state.addressList,
|
|
25172
|
+
props.isMakepayment
|
|
25173
|
+
);
|
|
25090
25174
|
confirmSelectedAddress();
|
|
25091
25175
|
const close2 = () => emit("close");
|
|
25092
25176
|
const back2 = () => {
|
|
@@ -25105,13 +25189,23 @@ const _sfc_main$1e = defineComponent({
|
|
|
25105
25189
|
if (props == null ? void 0 : props.isMakepayment) {
|
|
25106
25190
|
emit("tooglelist");
|
|
25107
25191
|
}
|
|
25108
|
-
if ((confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) && state.addressList.filter(
|
|
25109
|
-
|
|
25110
|
-
|
|
25111
|
-
|
|
25112
|
-
|
|
25192
|
+
if ((confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) && state.addressList.filter(
|
|
25193
|
+
(e) => {
|
|
25194
|
+
var _a4;
|
|
25195
|
+
return e.id === ((_a4 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a4.id);
|
|
25196
|
+
}
|
|
25197
|
+
).length > 0) {
|
|
25198
|
+
setSelectedAddress$1(
|
|
25199
|
+
(_a3 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a3.id,
|
|
25200
|
+
state.addressList,
|
|
25201
|
+
props.isMakepayment
|
|
25202
|
+
);
|
|
25113
25203
|
} else {
|
|
25114
|
-
setSelectedAddress$1(
|
|
25204
|
+
setSelectedAddress$1(
|
|
25205
|
+
(_b = state.addressList[0]) == null ? void 0 : _b.id,
|
|
25206
|
+
state.addressList,
|
|
25207
|
+
props.isMakepayment
|
|
25208
|
+
);
|
|
25115
25209
|
confirmSelectedAddress();
|
|
25116
25210
|
}
|
|
25117
25211
|
};
|
|
@@ -25125,31 +25219,40 @@ const _sfc_main$1e = defineComponent({
|
|
|
25125
25219
|
watch(isDesktop, () => {
|
|
25126
25220
|
state.showAddressList = !(isDesktop == null ? void 0 : isDesktop.value);
|
|
25127
25221
|
});
|
|
25128
|
-
watch(
|
|
25129
|
-
|
|
25130
|
-
|
|
25131
|
-
|
|
25132
|
-
|
|
25133
|
-
|
|
25134
|
-
|
|
25135
|
-
|
|
25136
|
-
|
|
25137
|
-
|
|
25138
|
-
|
|
25139
|
-
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
|
|
25144
|
-
|
|
25222
|
+
watch(
|
|
25223
|
+
() => props.addresses,
|
|
25224
|
+
(newVal, oldval) => {
|
|
25225
|
+
if (oldval.length === 0 && newVal.length === 1 && !props.isMakepayment) {
|
|
25226
|
+
state.showAddressList = true;
|
|
25227
|
+
}
|
|
25228
|
+
state.addressList = newVal.slice();
|
|
25229
|
+
if (selectedAddress.value) {
|
|
25230
|
+
const address2 = state.addressList.find(
|
|
25231
|
+
(a) => {
|
|
25232
|
+
var _a3;
|
|
25233
|
+
return a.id === ((_a3 = selectedAddress == null ? void 0 : selectedAddress.value) == null ? void 0 : _a3.id);
|
|
25234
|
+
}
|
|
25235
|
+
);
|
|
25236
|
+
if (address2) {
|
|
25237
|
+
setSelectedAddress$1(
|
|
25238
|
+
address2 == null ? void 0 : address2.id,
|
|
25239
|
+
state.addressList,
|
|
25240
|
+
props.isMakepayment
|
|
25241
|
+
);
|
|
25242
|
+
if (props.isMakepayment) {
|
|
25243
|
+
emit("updateAddress", {
|
|
25244
|
+
selectedAddress: address2,
|
|
25245
|
+
addresses: state.addressList
|
|
25246
|
+
});
|
|
25247
|
+
}
|
|
25248
|
+
} else {
|
|
25249
|
+
resetSelectedAddress();
|
|
25145
25250
|
}
|
|
25146
25251
|
} else {
|
|
25147
25252
|
resetSelectedAddress();
|
|
25148
25253
|
}
|
|
25149
|
-
} else {
|
|
25150
|
-
resetSelectedAddress();
|
|
25151
25254
|
}
|
|
25152
|
-
|
|
25255
|
+
);
|
|
25153
25256
|
const resetSelectedAddress = () => {
|
|
25154
25257
|
var _a3;
|
|
25155
25258
|
if (((_a3 = state.addressList) == null ? void 0 : _a3.length) >= 1) {
|
|
@@ -25172,10 +25275,8 @@ const _sfc_main$1e = defineComponent({
|
|
|
25172
25275
|
state.selected = true;
|
|
25173
25276
|
setSelectedAddress$1(address2 == null ? void 0 : address2.id, state.addressList, props.isMakepayment);
|
|
25174
25277
|
setTimeout(() => {
|
|
25175
|
-
if (props.isMakepayment
|
|
25176
|
-
|
|
25177
|
-
hideAddresses();
|
|
25178
|
-
}
|
|
25278
|
+
if (props.isMakepayment && (isDesktop == null ? void 0 : isDesktop.value)) {
|
|
25279
|
+
hideAddresses();
|
|
25179
25280
|
if (props.isMakepayment) {
|
|
25180
25281
|
emit("chooseAddress", address2);
|
|
25181
25282
|
}
|
|
@@ -25185,22 +25286,34 @@ const _sfc_main$1e = defineComponent({
|
|
|
25185
25286
|
const confirmSuccess = () => {
|
|
25186
25287
|
var _a3;
|
|
25187
25288
|
(selectedAddress == null ? void 0 : selectedAddress.value) && setSelectedAddress((_a3 = selectedAddress == null ? void 0 : selectedAddress.value) == null ? void 0 : _a3.id);
|
|
25188
|
-
|
|
25289
|
+
if (props.isMakepayment && !(isDesktop == null ? void 0 : isDesktop.value)) {
|
|
25290
|
+
emit("chooseAddress", selectedAddress == null ? void 0 : selectedAddress.value);
|
|
25291
|
+
} else {
|
|
25292
|
+
emit("success", selectedAddress == null ? void 0 : selectedAddress.value);
|
|
25293
|
+
}
|
|
25189
25294
|
};
|
|
25190
25295
|
const confirm = () => {
|
|
25191
25296
|
var _a3;
|
|
25192
25297
|
if (confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) {
|
|
25193
|
-
setSelectedAddress((_a3 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a3.id).catch(
|
|
25194
|
-
|
|
25298
|
+
setSelectedAddress((_a3 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a3.id).catch(
|
|
25299
|
+
() => {
|
|
25300
|
+
}
|
|
25301
|
+
);
|
|
25195
25302
|
if (props.isMakepayment) {
|
|
25196
|
-
setSelectedAddress$1(
|
|
25303
|
+
setSelectedAddress$1(
|
|
25304
|
+
confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value.id,
|
|
25305
|
+
state.addressList,
|
|
25306
|
+
props.isMakepayment
|
|
25307
|
+
);
|
|
25197
25308
|
emit("chooseAddress", confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value);
|
|
25198
25309
|
} else {
|
|
25199
25310
|
emit("success", confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value);
|
|
25200
25311
|
}
|
|
25201
25312
|
}
|
|
25202
25313
|
};
|
|
25203
|
-
const showsNoRegisteredAddressMessage = computed(
|
|
25314
|
+
const showsNoRegisteredAddressMessage = computed(
|
|
25315
|
+
() => props.addresses.length === 0
|
|
25316
|
+
);
|
|
25204
25317
|
const style = useCssModule();
|
|
25205
25318
|
return {
|
|
25206
25319
|
style,
|
|
@@ -25238,7 +25351,7 @@ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25238
25351
|
const _directive_vertical_scroll = resolveDirective("vertical-scroll");
|
|
25239
25352
|
return openBlock(), createElementBlock("div", {
|
|
25240
25353
|
class: normalizeClass([
|
|
25241
|
-
_ctx.style.root,
|
|
25354
|
+
_ctx.addresses.length > 0 ? _ctx.style.root : _ctx.style.noAddressRoot,
|
|
25242
25355
|
_ctx.isMakepayment && _ctx.isDesktop ? _ctx.style.payAddressRoot : ""
|
|
25243
25356
|
])
|
|
25244
25357
|
}, [
|
|
@@ -25261,10 +25374,8 @@ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25261
25374
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
25262
25375
|
class: normalizeClass({
|
|
25263
25376
|
[_ctx.style.container]: true,
|
|
25264
|
-
[_ctx.style.contentContainer]:
|
|
25265
|
-
[_ctx.style.contentContainerMp]: _ctx.isMakepayment
|
|
25266
|
-
[_ctx.style.contentContainerNoAddress]: _ctx.addresses.length === 0 && !_ctx.isMakepayment,
|
|
25267
|
-
[_ctx.style.contentContainerMpNoAddress]: _ctx.isMakepayment && _ctx.addresses.length === 0
|
|
25377
|
+
[_ctx.style.contentContainer]: true,
|
|
25378
|
+
[_ctx.style.contentContainerMp]: _ctx.isMakepayment
|
|
25268
25379
|
})
|
|
25269
25380
|
}, [
|
|
25270
25381
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.addresses, (address2) => {
|
|
@@ -25286,12 +25397,11 @@ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25286
25397
|
[_directive_vertical_scroll]
|
|
25287
25398
|
]),
|
|
25288
25399
|
createVNode(_component_Footer, {
|
|
25289
|
-
"is-makepayment": _ctx.isMakepayment,
|
|
25290
25400
|
"is-noaddress": _ctx.showsNoRegisteredAddressMessage,
|
|
25291
25401
|
onClose: _ctx.close,
|
|
25292
25402
|
onAdd: _ctx.add,
|
|
25293
25403
|
onConfirm: _ctx.confirmSuccess
|
|
25294
|
-
}, null, 8, ["is-
|
|
25404
|
+
}, null, 8, ["is-noaddress", "onClose", "onAdd", "onConfirm"]),
|
|
25295
25405
|
_ctx.isDesktop && !_ctx.isMakepayment ? (openBlock(), createElementBlock("div", {
|
|
25296
25406
|
key: 1,
|
|
25297
25407
|
class: normalizeClass(_ctx.style.footerBtnContainer)
|
|
@@ -25973,18 +26083,21 @@ const _sfc_main$1d = defineComponent({
|
|
|
25973
26083
|
open: props.show
|
|
25974
26084
|
});
|
|
25975
26085
|
const { isMobile, isDesktop } = useBreakpoints();
|
|
25976
|
-
watch(
|
|
25977
|
-
|
|
25978
|
-
|
|
25979
|
-
|
|
25980
|
-
|
|
25981
|
-
|
|
25982
|
-
|
|
25983
|
-
|
|
25984
|
-
|
|
25985
|
-
|
|
26086
|
+
watch(
|
|
26087
|
+
() => props.show,
|
|
26088
|
+
(newShow, oldOpen) => {
|
|
26089
|
+
if (oldOpen === false && newShow === true) {
|
|
26090
|
+
setTimeout(() => {
|
|
26091
|
+
state.open = true;
|
|
26092
|
+
}, 50);
|
|
26093
|
+
}
|
|
26094
|
+
if (oldOpen === true && newShow === false) {
|
|
26095
|
+
setTimeout(() => {
|
|
26096
|
+
state.open = false;
|
|
26097
|
+
}, 300);
|
|
26098
|
+
}
|
|
25986
26099
|
}
|
|
25987
|
-
|
|
26100
|
+
);
|
|
25988
26101
|
const style = useCssModule();
|
|
25989
26102
|
const paddingBottom = computed(() => {
|
|
25990
26103
|
const { bottomHeightProperty } = useGetHeightProperties();
|
|
@@ -26259,7 +26372,9 @@ const initialFormState = {
|
|
|
26259
26372
|
country: "jp",
|
|
26260
26373
|
tags: []
|
|
26261
26374
|
};
|
|
26262
|
-
const formKeys = Object.keys(
|
|
26375
|
+
const formKeys = Object.keys(
|
|
26376
|
+
initialFormState
|
|
26377
|
+
);
|
|
26263
26378
|
function transformToZip(str) {
|
|
26264
26379
|
if ((str == null ? void 0 : str.length) <= 3) {
|
|
26265
26380
|
return str;
|
|
@@ -26270,7 +26385,7 @@ const createInitialState = (address2) => {
|
|
|
26270
26385
|
if (!address2) {
|
|
26271
26386
|
const visibilities2 = {};
|
|
26272
26387
|
formKeys.forEach((keyName) => visibilities2[keyName] = true);
|
|
26273
|
-
return
|
|
26388
|
+
return { ...initialFormState, visibilities: visibilities2 };
|
|
26274
26389
|
}
|
|
26275
26390
|
const formValues = {};
|
|
26276
26391
|
const kyc = address2 == null ? void 0 : address2.kyc;
|
|
@@ -26281,11 +26396,14 @@ const createInitialState = (address2) => {
|
|
|
26281
26396
|
formValues[keyName] = formValue != null ? formValue : "";
|
|
26282
26397
|
visibilities[keyName] = kyc ? !!formValue : true;
|
|
26283
26398
|
});
|
|
26284
|
-
return
|
|
26285
|
-
|
|
26286
|
-
|
|
26399
|
+
return {
|
|
26400
|
+
...initialFormState,
|
|
26401
|
+
...{
|
|
26402
|
+
...formValues,
|
|
26403
|
+
zip: transformToZip(formValues.zip)
|
|
26404
|
+
},
|
|
26287
26405
|
visibilities
|
|
26288
|
-
}
|
|
26406
|
+
};
|
|
26289
26407
|
};
|
|
26290
26408
|
function isEditOk(state) {
|
|
26291
26409
|
const fillOK = ["title", "receiver", "zip", "city", "state", "street1"].every((key2) => state[key2]);
|
|
@@ -26338,9 +26456,10 @@ const _sfc_main$1b = defineComponent({
|
|
|
26338
26456
|
},
|
|
26339
26457
|
setup(props, { emit }) {
|
|
26340
26458
|
const style = useCssModule();
|
|
26341
|
-
const state = reactive(
|
|
26459
|
+
const state = reactive({
|
|
26460
|
+
...createInitialState(props.address),
|
|
26342
26461
|
isEdit: false
|
|
26343
|
-
})
|
|
26462
|
+
});
|
|
26344
26463
|
const lg2 = getLanguage();
|
|
26345
26464
|
const zipAddress = ref(state.zip);
|
|
26346
26465
|
const buttonDisabled = ref(!isEditOk(state));
|
|
@@ -26386,7 +26505,7 @@ const _sfc_main$1b = defineComponent({
|
|
|
26386
26505
|
}
|
|
26387
26506
|
});
|
|
26388
26507
|
const submit = () => {
|
|
26389
|
-
const plainState =
|
|
26508
|
+
const plainState = { ...state };
|
|
26390
26509
|
plainState.zip = plainState.zip.replace(/-/g, "");
|
|
26391
26510
|
delete plainState.visibilities;
|
|
26392
26511
|
emit("submit", plainState);
|
|
@@ -26721,9 +26840,10 @@ const _sfc_main$19 = defineComponent({
|
|
|
26721
26840
|
if (props.heightStyle) {
|
|
26722
26841
|
const isEdit = props.address || isNative ? {} : { position: "fixed" };
|
|
26723
26842
|
return {
|
|
26724
|
-
rootHeight:
|
|
26725
|
-
height: (_a2 = props.heightStyle) == null ? void 0 : _a2.maxHeight
|
|
26726
|
-
|
|
26843
|
+
rootHeight: {
|
|
26844
|
+
height: (_a2 = props.heightStyle) == null ? void 0 : _a2.maxHeight,
|
|
26845
|
+
...isEdit
|
|
26846
|
+
},
|
|
26727
26847
|
contentStyle: {
|
|
26728
26848
|
maxHeight: `calc(${(_b = props.heightStyle) == null ? void 0 : _b.maxHeight} - (${statusHeightNone} + ${bottomHeightProperty} + 64px))`
|
|
26729
26849
|
}
|
|
@@ -27129,42 +27249,42 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27129
27249
|
], 64);
|
|
27130
27250
|
}
|
|
27131
27251
|
var AppVue$7 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$17]]);
|
|
27132
|
-
const container$n = "
|
|
27133
|
-
const addContainer = "
|
|
27134
|
-
const addContainerInsufficient = "
|
|
27135
|
-
const noAddContainer = "
|
|
27136
|
-
const addContainerTopup = "
|
|
27137
|
-
const addAddress = "
|
|
27138
|
-
const label$3 = "
|
|
27139
|
-
const change$2 = "
|
|
27140
|
-
const noaddmsgContainer = "
|
|
27141
|
-
const addressInfoContainer = "
|
|
27142
|
-
const priceContainer$1 = "
|
|
27143
|
-
const priceNumber = "
|
|
27144
|
-
const priceUnit = "
|
|
27145
|
-
const successContainer$1 = "
|
|
27146
|
-
const loadingText$2 = "
|
|
27147
|
-
const payBtn = "
|
|
27148
|
-
const payButton = "
|
|
27149
|
-
const cancel$2 = "
|
|
27150
|
-
const cancelBtn$1 = "
|
|
27151
|
-
const chargeCancel = "
|
|
27152
|
-
const payBtnSticky = "
|
|
27153
|
-
const payWrapper = "
|
|
27154
|
-
const bannerInfo$1 = "
|
|
27155
|
-
const bannerIcon = "
|
|
27156
|
-
const bannerTitle$2 = "
|
|
27157
|
-
const price$3 = "
|
|
27158
|
-
const paymentContainer = "
|
|
27159
|
-
const addressContainer = "
|
|
27160
|
-
const noAddressContainer = "
|
|
27161
|
-
const payment$2 = "
|
|
27162
|
-
const insufficientAmount = "
|
|
27163
|
-
const arrow = "
|
|
27164
|
-
const defaultContainer = "
|
|
27165
|
-
const payContainer = "
|
|
27252
|
+
const container$n = "_container_sui8p_7";
|
|
27253
|
+
const addContainer = "_addContainer_sui8p_16";
|
|
27254
|
+
const addContainerInsufficient = "_addContainerInsufficient_sui8p_25";
|
|
27255
|
+
const noAddContainer = "_noAddContainer_sui8p_29";
|
|
27256
|
+
const addContainerTopup = "_addContainerTopup_sui8p_34";
|
|
27257
|
+
const addAddress = "_addAddress_sui8p_44";
|
|
27258
|
+
const label$3 = "_label_sui8p_54";
|
|
27259
|
+
const change$2 = "_change_sui8p_72";
|
|
27260
|
+
const noaddmsgContainer = "_noaddmsgContainer_sui8p_87";
|
|
27261
|
+
const addressInfoContainer = "_addressInfoContainer_sui8p_96";
|
|
27262
|
+
const priceContainer$1 = "_priceContainer_sui8p_100";
|
|
27263
|
+
const priceNumber = "_priceNumber_sui8p_111";
|
|
27264
|
+
const priceUnit = "_priceUnit_sui8p_130";
|
|
27265
|
+
const successContainer$1 = "_successContainer_sui8p_141";
|
|
27266
|
+
const loadingText$2 = "_loadingText_sui8p_148";
|
|
27267
|
+
const payBtn = "_payBtn_sui8p_166";
|
|
27268
|
+
const payButton = "_payButton_sui8p_185";
|
|
27269
|
+
const cancel$2 = "_cancel_sui8p_189";
|
|
27270
|
+
const cancelBtn$1 = "_cancelBtn_sui8p_198";
|
|
27271
|
+
const chargeCancel = "_chargeCancel_sui8p_206";
|
|
27272
|
+
const payBtnSticky = "_payBtnSticky_sui8p_210";
|
|
27273
|
+
const payWrapper = "_payWrapper_sui8p_223";
|
|
27274
|
+
const bannerInfo$1 = "_bannerInfo_sui8p_228";
|
|
27275
|
+
const bannerIcon = "_bannerIcon_sui8p_242";
|
|
27276
|
+
const bannerTitle$2 = "_bannerTitle_sui8p_246";
|
|
27277
|
+
const price$3 = "_price_sui8p_100";
|
|
27278
|
+
const paymentContainer = "_paymentContainer_sui8p_255";
|
|
27279
|
+
const addressContainer = "_addressContainer_sui8p_278";
|
|
27280
|
+
const noAddressContainer = "_noAddressContainer_sui8p_301";
|
|
27281
|
+
const payment$2 = "_payment_sui8p_255";
|
|
27282
|
+
const insufficientAmount = "_insufficientAmount_sui8p_328";
|
|
27283
|
+
const arrow = "_arrow_sui8p_346";
|
|
27284
|
+
const defaultContainer = "_defaultContainer_sui8p_360";
|
|
27285
|
+
const payContainer = "_payContainer_sui8p_379";
|
|
27166
27286
|
var style0$Y = {
|
|
27167
|
-
"ppmna-default-font": "_ppmna-default-
|
|
27287
|
+
"ppmna-default-font": "_ppmna-default-font_sui8p_1",
|
|
27168
27288
|
container: container$n,
|
|
27169
27289
|
addContainer,
|
|
27170
27290
|
addContainerInsufficient,
|
|
@@ -27203,18 +27323,21 @@ var style0$Y = {
|
|
|
27203
27323
|
function useHandler(context) {
|
|
27204
27324
|
const createAnime = (s) => {
|
|
27205
27325
|
s.play();
|
|
27206
|
-
context.emit(
|
|
27207
|
-
|
|
27208
|
-
|
|
27209
|
-
|
|
27210
|
-
|
|
27211
|
-
|
|
27212
|
-
|
|
27213
|
-
|
|
27214
|
-
|
|
27215
|
-
end
|
|
27216
|
-
|
|
27217
|
-
|
|
27326
|
+
context.emit(
|
|
27327
|
+
"animationEnd",
|
|
27328
|
+
new Promise((resolve2) => {
|
|
27329
|
+
const end = () => {
|
|
27330
|
+
if (s == null ? void 0 : s.renderer) {
|
|
27331
|
+
s.removeEventListener("complete", end);
|
|
27332
|
+
}
|
|
27333
|
+
resolve2(true);
|
|
27334
|
+
};
|
|
27335
|
+
s.addEventListener("complete", end);
|
|
27336
|
+
setTimeout(() => {
|
|
27337
|
+
end();
|
|
27338
|
+
}, 1e3);
|
|
27339
|
+
})
|
|
27340
|
+
);
|
|
27218
27341
|
};
|
|
27219
27342
|
return {
|
|
27220
27343
|
clickPayment: () => context.emit("pay"),
|
|
@@ -27368,18 +27491,29 @@ const _sfc_main$16 = defineComponent({
|
|
|
27368
27491
|
onMounted(() => {
|
|
27369
27492
|
handleHeightChange();
|
|
27370
27493
|
});
|
|
27371
|
-
watch(
|
|
27372
|
-
|
|
27494
|
+
watch(
|
|
27495
|
+
() => props.loading,
|
|
27496
|
+
(newvalue, oldValue) => {
|
|
27497
|
+
if (!newvalue && oldValue) {
|
|
27498
|
+
handleHeightChange();
|
|
27499
|
+
}
|
|
27500
|
+
}
|
|
27501
|
+
);
|
|
27502
|
+
watch(
|
|
27503
|
+
() => windowHeight == null ? void 0 : windowHeight.value,
|
|
27504
|
+
() => {
|
|
27373
27505
|
handleHeightChange();
|
|
27374
27506
|
}
|
|
27375
|
-
|
|
27376
|
-
watch(() => windowHeight == null ? void 0 : windowHeight.value, () => {
|
|
27377
|
-
handleHeightChange();
|
|
27378
|
-
});
|
|
27507
|
+
);
|
|
27379
27508
|
const handleHeightChange = () => {
|
|
27380
27509
|
setTimeout(() => {
|
|
27381
27510
|
if (isDesktop.value && (makePayment2 == null ? void 0 : makePayment2.value)) {
|
|
27382
|
-
state.isScrollable = handleHeightResize(
|
|
27511
|
+
state.isScrollable = handleHeightResize(
|
|
27512
|
+
makePayment2 == null ? void 0 : makePayment2.value,
|
|
27513
|
+
windowHeight == null ? void 0 : windowHeight.value,
|
|
27514
|
+
state.isScrollable,
|
|
27515
|
+
161
|
|
27516
|
+
);
|
|
27383
27517
|
}
|
|
27384
27518
|
}, 0);
|
|
27385
27519
|
};
|
|
@@ -27390,17 +27524,20 @@ const _sfc_main$16 = defineComponent({
|
|
|
27390
27524
|
handleHeightChange();
|
|
27391
27525
|
}
|
|
27392
27526
|
};
|
|
27393
|
-
return
|
|
27527
|
+
return {
|
|
27528
|
+
...handlers,
|
|
27394
27529
|
formattedPrice,
|
|
27395
27530
|
style,
|
|
27396
27531
|
isSufficient,
|
|
27397
27532
|
images: images2,
|
|
27398
27533
|
lg: lg2,
|
|
27399
27534
|
userAddressVisible: (_c = (_b = (_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.additionalUserInfo) == null ? void 0 : _b.userAddress) == null ? void 0 : _c.visible,
|
|
27400
|
-
disablePay: computed(
|
|
27401
|
-
|
|
27402
|
-
|
|
27403
|
-
|
|
27535
|
+
disablePay: computed(
|
|
27536
|
+
() => {
|
|
27537
|
+
var _a3, _b2, _c2, _d, _e, _f, _g;
|
|
27538
|
+
return ((_c2 = (_b2 = (_a3 = props.paymentParams) == null ? void 0 : _a3.additionalUserInfo) == null ? void 0 : _b2.userAddress) == null ? void 0 : _c2.visible) && ((_f = (_e = (_d = props.paymentParams) == null ? void 0 : _d.additionalUserInfo) == null ? void 0 : _e.userAddress) == null ? void 0 : _f.mandatory) && !((_g = props.selectedAddress) == null ? void 0 : _g.id) || props.paymentMethods.length === 0;
|
|
27539
|
+
}
|
|
27540
|
+
),
|
|
27404
27541
|
isMobile,
|
|
27405
27542
|
isDesktop,
|
|
27406
27543
|
select: select2,
|
|
@@ -27410,7 +27547,7 @@ const _sfc_main$16 = defineComponent({
|
|
|
27410
27547
|
isScrollable: computed(() => state.isScrollable),
|
|
27411
27548
|
handleUpdate,
|
|
27412
27549
|
updateAddress
|
|
27413
|
-
}
|
|
27550
|
+
};
|
|
27414
27551
|
}
|
|
27415
27552
|
});
|
|
27416
27553
|
const _hoisted_1$D = ["src"];
|
|
@@ -28495,12 +28632,15 @@ const _sfc_main$11 = defineComponent({
|
|
|
28495
28632
|
countDown.reset();
|
|
28496
28633
|
}
|
|
28497
28634
|
});
|
|
28498
|
-
watch(
|
|
28499
|
-
|
|
28500
|
-
|
|
28501
|
-
|
|
28635
|
+
watch(
|
|
28636
|
+
() => props.hasCashBackAnimation,
|
|
28637
|
+
(newValue, oldValue) => {
|
|
28638
|
+
if (!newValue && oldValue && isDesktop.value) {
|
|
28639
|
+
countDown.start();
|
|
28640
|
+
isCountDown.value = true;
|
|
28641
|
+
}
|
|
28502
28642
|
}
|
|
28503
|
-
|
|
28643
|
+
);
|
|
28504
28644
|
const openCashBackDetailList = () => {
|
|
28505
28645
|
state.showCashBackDetailList = true;
|
|
28506
28646
|
countDown.reset();
|
|
@@ -28542,11 +28682,15 @@ const _sfc_main$11 = defineComponent({
|
|
|
28542
28682
|
createAnime,
|
|
28543
28683
|
merchantName: computed(() => props.paymentResult.merchantName),
|
|
28544
28684
|
paymentId: paymentId2,
|
|
28545
|
-
price: computed(
|
|
28546
|
-
|
|
28547
|
-
|
|
28548
|
-
|
|
28549
|
-
|
|
28685
|
+
price: computed(
|
|
28686
|
+
() => {
|
|
28687
|
+
var _a3, _b;
|
|
28688
|
+
return numberWithCommas((_b = (_a3 = props.paymentResult) == null ? void 0 : _a3.amount) == null ? void 0 : _b.amount);
|
|
28689
|
+
}
|
|
28690
|
+
),
|
|
28691
|
+
statusLabelColor: computed(
|
|
28692
|
+
() => props.paymentResult.statusLabelColor.toLowerCase()
|
|
28693
|
+
),
|
|
28550
28694
|
labelText: computed(() => props.paymentResult.statusLabelString),
|
|
28551
28695
|
click,
|
|
28552
28696
|
copy,
|
|
@@ -28558,9 +28702,15 @@ const _sfc_main$11 = defineComponent({
|
|
|
28558
28702
|
showCashBackDetailRow,
|
|
28559
28703
|
style,
|
|
28560
28704
|
storeImage: storeImage2,
|
|
28561
|
-
preAuthExpDate: computed(
|
|
28562
|
-
|
|
28563
|
-
|
|
28705
|
+
preAuthExpDate: computed(
|
|
28706
|
+
() => getDateStringFromTimeStamp(props.paymentResult.expiresAt)
|
|
28707
|
+
),
|
|
28708
|
+
acceptedAt: computed(
|
|
28709
|
+
() => getDateStringFromTimeStamp(props.paymentResult.acceptedAt)
|
|
28710
|
+
),
|
|
28711
|
+
isCloseButtonDisabled: computed(
|
|
28712
|
+
() => props.hasCashBackAnimation && (!props.hasConfirmAge && isDesktop.value || isMobile.value)
|
|
28713
|
+
),
|
|
28564
28714
|
paymentText,
|
|
28565
28715
|
images: images2,
|
|
28566
28716
|
isDesktop: computed(() => isDesktop.value),
|
|
@@ -29354,10 +29504,12 @@ cssModules$N["$style"] = style0$N;
|
|
|
29354
29504
|
var FloatingButton = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$X], ["__cssModules", cssModules$N]]);
|
|
29355
29505
|
function useData$1(props) {
|
|
29356
29506
|
var _a2, _b;
|
|
29357
|
-
const animation = computed(
|
|
29358
|
-
|
|
29359
|
-
|
|
29360
|
-
|
|
29507
|
+
const animation = computed(
|
|
29508
|
+
() => {
|
|
29509
|
+
var _a3, _b2;
|
|
29510
|
+
return (_b2 = (_a3 = props.cashBackDetail) == null ? void 0 : _a3.animationInfoList) == null ? void 0 : _b2[0];
|
|
29511
|
+
}
|
|
29512
|
+
);
|
|
29361
29513
|
const uiState = reactive({
|
|
29362
29514
|
showFullscreenContent: false,
|
|
29363
29515
|
showContent: false,
|
|
@@ -29456,7 +29608,7 @@ function createPinia() {
|
|
|
29456
29608
|
_p,
|
|
29457
29609
|
_a: null,
|
|
29458
29610
|
_e: scope,
|
|
29459
|
-
_s: new Map(),
|
|
29611
|
+
_s: /* @__PURE__ */ new Map(),
|
|
29460
29612
|
state
|
|
29461
29613
|
});
|
|
29462
29614
|
return pinia;
|
|
@@ -29653,7 +29805,10 @@ function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore)
|
|
|
29653
29805
|
},
|
|
29654
29806
|
$dispose
|
|
29655
29807
|
};
|
|
29656
|
-
const store = reactive(assign(
|
|
29808
|
+
const store = reactive(assign(
|
|
29809
|
+
{},
|
|
29810
|
+
partialStore
|
|
29811
|
+
));
|
|
29657
29812
|
pinia._s.set($id, store);
|
|
29658
29813
|
const setupStore = pinia._e.run(() => {
|
|
29659
29814
|
scope = effectScope();
|
|
@@ -29828,12 +29983,17 @@ function isAvailableTopupMethod(paymentMethod2) {
|
|
|
29828
29983
|
return isActivatedMethod(paymentMethod2);
|
|
29829
29984
|
}
|
|
29830
29985
|
function hasAvailableTopupMethod(paymentMethods) {
|
|
29831
|
-
return paymentMethods.some(
|
|
29986
|
+
return paymentMethods.some(
|
|
29987
|
+
(paymentMethod2) => isAvailableTopupMethod(paymentMethod2)
|
|
29988
|
+
);
|
|
29832
29989
|
}
|
|
29833
29990
|
function findFirstValidMethod(paymentMethods) {
|
|
29834
29991
|
if ((paymentMethods == null ? void 0 : paymentMethods.length) > 0) {
|
|
29835
29992
|
for (let index2 = 0; index2 < paymentMethods.length; index2++) {
|
|
29836
|
-
if (isValidPaymentMethod(
|
|
29993
|
+
if (isValidPaymentMethod(
|
|
29994
|
+
paymentMethods[index2].paymentMethodId,
|
|
29995
|
+
paymentMethods
|
|
29996
|
+
)) {
|
|
29837
29997
|
return index2;
|
|
29838
29998
|
}
|
|
29839
29999
|
}
|
|
@@ -29844,7 +30004,9 @@ function findFirstValidMethod(paymentMethods) {
|
|
|
29844
30004
|
}
|
|
29845
30005
|
function isValidPaymentMethod(savedMethodId, paymentMethods) {
|
|
29846
30006
|
if (savedMethodId) {
|
|
29847
|
-
const payMethod = paymentMethods.find(
|
|
30007
|
+
const payMethod = paymentMethods.find(
|
|
30008
|
+
(method2) => method2.paymentMethodId === savedMethodId
|
|
30009
|
+
);
|
|
29848
30010
|
if (!payMethod) {
|
|
29849
30011
|
return false;
|
|
29850
30012
|
}
|
|
@@ -30021,7 +30183,11 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30021
30183
|
},
|
|
30022
30184
|
async executePayment(props, paymentMethod2, selectedAddress) {
|
|
30023
30185
|
this.uiState.paying = true;
|
|
30024
|
-
const res = await this.private_payment(
|
|
30186
|
+
const res = await this.private_payment(
|
|
30187
|
+
props,
|
|
30188
|
+
paymentMethod2,
|
|
30189
|
+
this.uiState.duplicatePayment
|
|
30190
|
+
);
|
|
30025
30191
|
if (!res) {
|
|
30026
30192
|
return;
|
|
30027
30193
|
}
|
|
@@ -30041,7 +30207,9 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30041
30207
|
}
|
|
30042
30208
|
}
|
|
30043
30209
|
this.paymentMethodState.amountForTopup = beforeTopupAndPayParams.amount;
|
|
30044
|
-
const isDuplicateTopup = checkDuplicateTopup(
|
|
30210
|
+
const isDuplicateTopup = checkDuplicateTopup(
|
|
30211
|
+
this.paymentMethodState.amountForTopup
|
|
30212
|
+
);
|
|
30045
30213
|
if (isDuplicateTopup) {
|
|
30046
30214
|
this.uiState.showDuplicateTopup = true;
|
|
30047
30215
|
this.uiState.duplicateTopup = true;
|
|
@@ -30096,7 +30264,10 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30096
30264
|
this.private_sendComplete();
|
|
30097
30265
|
},
|
|
30098
30266
|
sendComplete() {
|
|
30099
|
-
console.assert(
|
|
30267
|
+
console.assert(
|
|
30268
|
+
this.result.success || this.result.fail,
|
|
30269
|
+
"neither success nor fail is called"
|
|
30270
|
+
);
|
|
30100
30271
|
this.private_sendComplete();
|
|
30101
30272
|
},
|
|
30102
30273
|
confirmCloseConfirmation() {
|
|
@@ -30115,12 +30286,13 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30115
30286
|
const year = parseInt(_date[0]);
|
|
30116
30287
|
const month = parseInt(_date[1]);
|
|
30117
30288
|
const date = parseInt(_date[2]);
|
|
30118
|
-
const req =
|
|
30289
|
+
const req = {
|
|
30290
|
+
...params,
|
|
30119
30291
|
year,
|
|
30120
30292
|
month,
|
|
30121
30293
|
date,
|
|
30122
30294
|
orderType: "ACQUIRING"
|
|
30123
|
-
}
|
|
30295
|
+
};
|
|
30124
30296
|
const res = await sendAge(req);
|
|
30125
30297
|
const errorHappen = this.private_handleError(res, {
|
|
30126
30298
|
api: "ageConfirm",
|
|
@@ -30161,9 +30333,10 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30161
30333
|
paymentMethodType,
|
|
30162
30334
|
paymentMethodId,
|
|
30163
30335
|
merchantTopUpId: merchantPaymentId,
|
|
30164
|
-
amount:
|
|
30336
|
+
amount: {
|
|
30337
|
+
...((_a2 = props.paymentParams) == null ? void 0 : _a2.amount) || {},
|
|
30165
30338
|
amount: amount2 || 0
|
|
30166
|
-
}
|
|
30339
|
+
},
|
|
30167
30340
|
requestedAt,
|
|
30168
30341
|
prepaidOnly
|
|
30169
30342
|
};
|
|
@@ -30181,11 +30354,11 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30181
30354
|
async private_payment(props, paymentMethod2, agreeSimilarTransaction) {
|
|
30182
30355
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
30183
30356
|
this.paymentState.paymentId = void 0;
|
|
30184
|
-
const requestBody =
|
|
30185
|
-
merchantPaymentId: (_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.merchantPaymentId
|
|
30186
|
-
|
|
30187
|
-
|
|
30188
|
-
|
|
30357
|
+
const requestBody = {
|
|
30358
|
+
merchantPaymentId: (_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.merchantPaymentId,
|
|
30359
|
+
...((_b = props == null ? void 0 : props.paymentParams) == null ? void 0 : _b.isAuthorization) && ((_c = props == null ? void 0 : props.paymentParams) == null ? void 0 : _c.expiresAt) && {
|
|
30360
|
+
expiresAt: (_d = props == null ? void 0 : props.paymentParams) == null ? void 0 : _d.expiresAt
|
|
30361
|
+
},
|
|
30189
30362
|
amount: (_e = props == null ? void 0 : props.paymentParams) == null ? void 0 : _e.amount,
|
|
30190
30363
|
paymentMethodId: paymentMethod2.paymentMethodId,
|
|
30191
30364
|
paymentMethodType: paymentMethod2.paymentMethodType,
|
|
@@ -30200,13 +30373,18 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30200
30373
|
metadata: (_n = props == null ? void 0 : props.paymentParams) == null ? void 0 : _n.metadata,
|
|
30201
30374
|
productType: (_o = props == null ? void 0 : props.paymentParams) == null ? void 0 : _o.productType,
|
|
30202
30375
|
storeInfo: (_p = props == null ? void 0 : props.paymentParams) == null ? void 0 : _p.storeInfo
|
|
30203
|
-
}
|
|
30204
|
-
const requestParams =
|
|
30205
|
-
|
|
30206
|
-
|
|
30376
|
+
};
|
|
30377
|
+
const requestParams = {
|
|
30378
|
+
...props.paymentParams.merchantAlias && {
|
|
30379
|
+
merchant: props.paymentParams.merchantAlias
|
|
30380
|
+
},
|
|
30207
30381
|
agreeSimilarTransaction
|
|
30208
|
-
}
|
|
30209
|
-
const res = await makePayment$2(
|
|
30382
|
+
};
|
|
30383
|
+
const res = await makePayment$2(
|
|
30384
|
+
requestParams,
|
|
30385
|
+
requestBody,
|
|
30386
|
+
(_r = (_q = props == null ? void 0 : props.paymentParams) == null ? void 0 : _q.isAuthorization) != null ? _r : false
|
|
30387
|
+
);
|
|
30210
30388
|
saveLastPaymentMethod(paymentMethod2.paymentMethodId);
|
|
30211
30389
|
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
30212
30390
|
this.private_handleError(res, { type: "pay", api: "payment" });
|
|
@@ -30298,7 +30476,10 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30298
30476
|
},
|
|
30299
30477
|
private_handleError(res, options) {
|
|
30300
30478
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
30301
|
-
const errorCodeForFailBack = createErrorCodeForFailCallBack(
|
|
30479
|
+
const errorCodeForFailBack = createErrorCodeForFailCallBack(
|
|
30480
|
+
res,
|
|
30481
|
+
options == null ? void 0 : options.api
|
|
30482
|
+
);
|
|
30302
30483
|
if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && options.api === "consult") {
|
|
30303
30484
|
return true;
|
|
30304
30485
|
}
|
|
@@ -30372,18 +30553,32 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30372
30553
|
result: false
|
|
30373
30554
|
};
|
|
30374
30555
|
}
|
|
30375
|
-
const { paymentMethodList, appealDescription } = ((_c = (_b = (_a2 = res == null ? void 0 : res.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.payload) || {};
|
|
30556
|
+
const { paymentMethodList, appealDescription, paymentMethodPreference } = ((_c = (_b = (_a2 = res == null ? void 0 : res.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.payload) || {};
|
|
30376
30557
|
this.paymentMethodState.paymentMethods = paymentMethodList;
|
|
30377
|
-
const walletPaymentMethod = paymentMethodList ? paymentMethodList.find(
|
|
30558
|
+
const walletPaymentMethod = paymentMethodList ? paymentMethodList.find(
|
|
30559
|
+
(elem2) => elem2.paymentMethodType === PaymentMethodType.WALLET
|
|
30560
|
+
) || null : null;
|
|
30378
30561
|
if (walletPaymentMethod && walletPaymentMethod.descriptionBannerInfo) {
|
|
30379
30562
|
this.paymentMethodState.bannerInfo = walletPaymentMethod.descriptionBannerInfo;
|
|
30380
30563
|
}
|
|
30381
|
-
const
|
|
30564
|
+
const isPaymentMethodPriorityEnabled = paymentMethodPreference.prioritizedPaymentMethodsEnabled;
|
|
30382
30565
|
this.paymentMethodState.paymentMethods = paymentMethodList ? paymentMethodList.filter(function(method2) {
|
|
30383
30566
|
return method2.paymentMethodType !== PaymentMethodType.PAY_LATER;
|
|
30384
30567
|
}) : paymentMethodList;
|
|
30385
30568
|
this.paymentMethodState.appealDescription = appealDescription;
|
|
30386
|
-
|
|
30569
|
+
if (isPaymentMethodPriorityEnabled) {
|
|
30570
|
+
this.paymentMethodState.selectPaymentIndex = findFirstValidMethod(
|
|
30571
|
+
this.paymentMethodState.paymentMethods
|
|
30572
|
+
);
|
|
30573
|
+
} else {
|
|
30574
|
+
const lastSavedMethod = getLastPaymentMethod();
|
|
30575
|
+
this.paymentMethodState.selectPaymentIndex = isValidPaymentMethod(
|
|
30576
|
+
lastSavedMethod,
|
|
30577
|
+
(_d = this.paymentMethodState) == null ? void 0 : _d.paymentMethods
|
|
30578
|
+
) ? this.paymentMethodState.paymentMethods.findIndex(
|
|
30579
|
+
(method2) => method2.paymentMethodId === lastSavedMethod
|
|
30580
|
+
) : findFirstValidMethod(this.paymentMethodState.paymentMethods);
|
|
30581
|
+
}
|
|
30387
30582
|
return {
|
|
30388
30583
|
res,
|
|
30389
30584
|
result: true
|
|
@@ -30446,7 +30641,10 @@ const useMakePaymentStore = defineStore("makePayment", {
|
|
|
30446
30641
|
return retryResult.res;
|
|
30447
30642
|
}
|
|
30448
30643
|
const jws = ((_a2 = retryResult == null ? void 0 : retryResult.res) == null ? void 0 : _a2.ppFetchResult) !== "success" ? null : (_d = (_c = (_b = retryResult == null ? void 0 : retryResult.res) == null ? void 0 : _b.body) == null ? void 0 : _c.signed) == null ? void 0 : _d.jws;
|
|
30449
|
-
this.private_openLogicError(
|
|
30644
|
+
this.private_openLogicError(
|
|
30645
|
+
{ type: "topupSuccessButNotAddToBalance" },
|
|
30646
|
+
jws
|
|
30647
|
+
);
|
|
30450
30648
|
return false;
|
|
30451
30649
|
},
|
|
30452
30650
|
private_sendFail(errorCode, jws) {
|
|
@@ -30540,15 +30738,19 @@ const _sfc_main$W = defineComponent({
|
|
|
30540
30738
|
});
|
|
30541
30739
|
s.addEventListener("complete", uiState.animationListener);
|
|
30542
30740
|
};
|
|
30543
|
-
const showCampaignDetail = computed(
|
|
30741
|
+
const showCampaignDetail = computed(
|
|
30742
|
+
() => false
|
|
30743
|
+
);
|
|
30544
30744
|
const openCampaignDetail = () => {
|
|
30545
30745
|
var _a2;
|
|
30546
30746
|
openWebviewInternal({ url: (_a2 = animation == null ? void 0 : animation.value) == null ? void 0 : _a2.campaignUrl });
|
|
30547
30747
|
};
|
|
30548
|
-
const showCampaignHome = computed(
|
|
30549
|
-
|
|
30550
|
-
|
|
30551
|
-
|
|
30748
|
+
const showCampaignHome = computed(
|
|
30749
|
+
() => {
|
|
30750
|
+
var _a2, _b, _c;
|
|
30751
|
+
return ((_c = (_b = (_a2 = animation == null ? void 0 : animation.value) == null ? void 0 : _a2.campaignHomeUrl) != null ? _b : "") == null ? void 0 : _c.length) > 0 && isPayPayMiniApp();
|
|
30752
|
+
}
|
|
30753
|
+
);
|
|
30552
30754
|
const openCampaignHome = () => {
|
|
30553
30755
|
var _a2, _b;
|
|
30554
30756
|
openWebviewInternal({ url: (_b = (_a2 = animation == null ? void 0 : animation.value) == null ? void 0 : _a2.campaignHomeUrl) != null ? _b : "" });
|
|
@@ -30587,11 +30789,14 @@ const _sfc_main$W = defineComponent({
|
|
|
30587
30789
|
});
|
|
30588
30790
|
const makePaymentStore = useMakePaymentStore();
|
|
30589
30791
|
const post = async (dateValue) => {
|
|
30590
|
-
const res = await makePaymentStore.postAgeConfirm(
|
|
30591
|
-
|
|
30592
|
-
|
|
30593
|
-
|
|
30594
|
-
|
|
30792
|
+
const res = await makePaymentStore.postAgeConfirm(
|
|
30793
|
+
{
|
|
30794
|
+
orderId: props.paymentId,
|
|
30795
|
+
campaignId: animation.value.campaignId,
|
|
30796
|
+
amount: animation.value.amount
|
|
30797
|
+
},
|
|
30798
|
+
dateValue
|
|
30799
|
+
);
|
|
30595
30800
|
uiState.showAgeConfirm = false;
|
|
30596
30801
|
if (!res) {
|
|
30597
30802
|
setTimeout(() => {
|
|
@@ -30620,14 +30825,18 @@ const _sfc_main$W = defineComponent({
|
|
|
30620
30825
|
});
|
|
30621
30826
|
return {
|
|
30622
30827
|
createAnime,
|
|
30623
|
-
animation: computed(
|
|
30624
|
-
|
|
30625
|
-
|
|
30626
|
-
|
|
30627
|
-
|
|
30628
|
-
|
|
30629
|
-
|
|
30630
|
-
|
|
30828
|
+
animation: computed(
|
|
30829
|
+
() => {
|
|
30830
|
+
var _a2;
|
|
30831
|
+
return (_a2 = animation.value) != null ? _a2 : { optionalText: "", url: "" };
|
|
30832
|
+
}
|
|
30833
|
+
),
|
|
30834
|
+
animationUrl: computed(
|
|
30835
|
+
() => {
|
|
30836
|
+
var _a2;
|
|
30837
|
+
return animation.value ? isDesktop.value ? (_a2 = animation.value.largeUrl) != null ? _a2 : animation.value.url : animation.value.url : "";
|
|
30838
|
+
}
|
|
30839
|
+
),
|
|
30631
30840
|
type,
|
|
30632
30841
|
showContent: computed(() => uiState.showContent),
|
|
30633
30842
|
showFullScreenContent: computed(() => uiState.showFullscreenContent),
|
|
@@ -30858,7 +31067,9 @@ const _sfc_main$U = defineComponent({
|
|
|
30858
31067
|
const appLogo2 = props.appDetail.appLogo || images2.merchant;
|
|
30859
31068
|
const formatPrice = computed(() => numberWithCommas(props.price));
|
|
30860
31069
|
const formatBalance = computed(() => numberWithCommas(props.balance));
|
|
30861
|
-
const formatInsufficientAmount = computed(
|
|
31070
|
+
const formatInsufficientAmount = computed(
|
|
31071
|
+
() => numberWithCommas(props.insufficientAmount)
|
|
31072
|
+
);
|
|
30862
31073
|
const { isMobile, isDesktop } = useBreakpoints();
|
|
30863
31074
|
return {
|
|
30864
31075
|
style,
|
|
@@ -31411,18 +31622,21 @@ const _sfc_main$R = defineComponent({
|
|
|
31411
31622
|
const { isMobile, isDesktop } = useBreakpoints();
|
|
31412
31623
|
const createAnime = (s) => {
|
|
31413
31624
|
s.play();
|
|
31414
|
-
emit(
|
|
31415
|
-
|
|
31416
|
-
|
|
31417
|
-
|
|
31418
|
-
|
|
31419
|
-
|
|
31420
|
-
|
|
31421
|
-
|
|
31422
|
-
|
|
31423
|
-
end
|
|
31424
|
-
|
|
31425
|
-
|
|
31625
|
+
emit(
|
|
31626
|
+
"animationEnd",
|
|
31627
|
+
new Promise((resolve2) => {
|
|
31628
|
+
const end = () => {
|
|
31629
|
+
if (s.renderer) {
|
|
31630
|
+
s == null ? void 0 : s.removeEventListener("complete", end);
|
|
31631
|
+
}
|
|
31632
|
+
resolve2(true);
|
|
31633
|
+
};
|
|
31634
|
+
s.addEventListener("complete", end);
|
|
31635
|
+
setTimeout(() => {
|
|
31636
|
+
end();
|
|
31637
|
+
}, 3e3);
|
|
31638
|
+
})
|
|
31639
|
+
);
|
|
31426
31640
|
};
|
|
31427
31641
|
const select2 = (index2) => {
|
|
31428
31642
|
state.showPaymentMethodList = false;
|
|
@@ -31827,7 +32041,12 @@ function useData(props) {
|
|
|
31827
32041
|
const state = reactive({
|
|
31828
32042
|
paymentMethods: (_a2 = props.insufficientBalanceInfo) == null ? void 0 : _a2.paymentMethodList,
|
|
31829
32043
|
appealDescription: (_b = props.insufficientBalanceInfo) == null ? void 0 : _b.appealDescription,
|
|
31830
|
-
index: isValidPaymentMethod(
|
|
32044
|
+
index: isValidPaymentMethod(
|
|
32045
|
+
lastUsedMethod,
|
|
32046
|
+
(_c = props.insufficientBalanceInfo) == null ? void 0 : _c.paymentMethodList
|
|
32047
|
+
) ? (_d = props.insufficientBalanceInfo) == null ? void 0 : _d.paymentMethodList.findIndex(
|
|
32048
|
+
(method2) => method2.paymentMethodId === lastUsedMethod
|
|
32049
|
+
) : findFirstValidMethod((_e = props.insufficientBalanceInfo) == null ? void 0 : _e.paymentMethodList),
|
|
31831
32050
|
topupAmount: (_f = props.insufficientBalanceInfo) == null ? void 0 : _f.recommendedTopupAmount,
|
|
31832
32051
|
mount: false,
|
|
31833
32052
|
unmount: false,
|
|
@@ -31860,7 +32079,9 @@ function useData(props) {
|
|
|
31860
32079
|
state.index = index2;
|
|
31861
32080
|
};
|
|
31862
32081
|
const paymentMethods = computed(() => state.paymentMethods);
|
|
31863
|
-
const available = computed(
|
|
32082
|
+
const available = computed(
|
|
32083
|
+
() => hasAvailableTopupMethod(paymentMethods.value)
|
|
32084
|
+
);
|
|
31864
32085
|
const setScrollState = (data2) => {
|
|
31865
32086
|
state.isScrollable = data2;
|
|
31866
32087
|
};
|
|
@@ -31997,8 +32218,14 @@ const _sfc_main$P = defineComponent({
|
|
|
31997
32218
|
var _a3, _b2, _c, _d, _e, _f;
|
|
31998
32219
|
const config2 = getAppConfig();
|
|
31999
32220
|
return {
|
|
32000
|
-
halfSheet: createHalfSheetAmount(
|
|
32001
|
-
|
|
32221
|
+
halfSheet: createHalfSheetAmount(
|
|
32222
|
+
(_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.recommendedTopupAmount,
|
|
32223
|
+
(_c = (_b2 = config2 == null ? void 0 : config2.topupHalfSheetAmount[0]) == null ? void 0 : _b2.value) != null ? _c : null
|
|
32224
|
+
),
|
|
32225
|
+
buttons: createButtonsAmount(
|
|
32226
|
+
(_d = props.insufficientBalanceInfo) == null ? void 0 : _d.recommendedTopupAmount,
|
|
32227
|
+
(_f = (_e = config2 == null ? void 0 : config2.topupButtonsAmount[0]) == null ? void 0 : _e.value) != null ? _f : null
|
|
32228
|
+
)
|
|
32002
32229
|
};
|
|
32003
32230
|
});
|
|
32004
32231
|
const style = useCssModule();
|
|
@@ -32015,13 +32242,23 @@ const _sfc_main$P = defineComponent({
|
|
|
32015
32242
|
const animationEnd = (val2) => {
|
|
32016
32243
|
emit("animationEnd", val2);
|
|
32017
32244
|
};
|
|
32018
|
-
watch(
|
|
32019
|
-
|
|
32020
|
-
|
|
32245
|
+
watch(
|
|
32246
|
+
() => windowHeight == null ? void 0 : windowHeight.value,
|
|
32247
|
+
() => {
|
|
32248
|
+
handleHeightChange();
|
|
32249
|
+
}
|
|
32250
|
+
);
|
|
32021
32251
|
const handleHeightChange = () => {
|
|
32022
32252
|
setTimeout(() => {
|
|
32023
32253
|
if (isDesktop.value && (topupPay2 == null ? void 0 : topupPay2.value)) {
|
|
32024
|
-
setScrollState(
|
|
32254
|
+
setScrollState(
|
|
32255
|
+
handleHeightResize(
|
|
32256
|
+
topupPay2 == null ? void 0 : topupPay2.value,
|
|
32257
|
+
windowHeight == null ? void 0 : windowHeight.value,
|
|
32258
|
+
isScrollable == null ? void 0 : isScrollable.value,
|
|
32259
|
+
-6
|
|
32260
|
+
)
|
|
32261
|
+
);
|
|
32025
32262
|
}
|
|
32026
32263
|
}, 0);
|
|
32027
32264
|
};
|
|
@@ -32056,14 +32293,18 @@ const _sfc_main$P = defineComponent({
|
|
|
32056
32293
|
}
|
|
32057
32294
|
};
|
|
32058
32295
|
return {
|
|
32059
|
-
balance: computed(
|
|
32060
|
-
|
|
32061
|
-
|
|
32062
|
-
|
|
32063
|
-
|
|
32064
|
-
|
|
32065
|
-
|
|
32066
|
-
|
|
32296
|
+
balance: computed(
|
|
32297
|
+
() => {
|
|
32298
|
+
var _a3, _b2;
|
|
32299
|
+
return (_b2 = (_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.totalBalanceInfo) == null ? void 0 : _b2.balance;
|
|
32300
|
+
}
|
|
32301
|
+
),
|
|
32302
|
+
insufficientAmount: computed(
|
|
32303
|
+
() => {
|
|
32304
|
+
var _a3;
|
|
32305
|
+
return (_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.insufficientAmount;
|
|
32306
|
+
}
|
|
32307
|
+
),
|
|
32067
32308
|
back: back2,
|
|
32068
32309
|
style,
|
|
32069
32310
|
appDetail,
|
|
@@ -32282,7 +32523,9 @@ const _sfc_main$O = defineComponent({
|
|
|
32282
32523
|
return {
|
|
32283
32524
|
images: getImages(),
|
|
32284
32525
|
lg: getLanguage()["3dSecureSheet"],
|
|
32285
|
-
isNormalCard: computed(
|
|
32526
|
+
isNormalCard: computed(
|
|
32527
|
+
() => props.ccType !== "YJ_CARD" && props.ccType !== "PP_CARD"
|
|
32528
|
+
),
|
|
32286
32529
|
navigateToSetting,
|
|
32287
32530
|
navigateToAbout
|
|
32288
32531
|
};
|
|
@@ -32440,12 +32683,15 @@ const _sfc_main$N = defineComponent({
|
|
|
32440
32683
|
onMounted(async () => {
|
|
32441
32684
|
await makePaymentStore.executeConsult(props);
|
|
32442
32685
|
});
|
|
32443
|
-
watch(
|
|
32444
|
-
|
|
32445
|
-
|
|
32446
|
-
|
|
32686
|
+
watch(
|
|
32687
|
+
() => props.show,
|
|
32688
|
+
(_, oldValue) => {
|
|
32689
|
+
if (oldValue && !props.show) {
|
|
32690
|
+
setTimeout(() => {
|
|
32691
|
+
}, 300);
|
|
32692
|
+
}
|
|
32447
32693
|
}
|
|
32448
|
-
|
|
32694
|
+
);
|
|
32449
32695
|
const _pay = async () => {
|
|
32450
32696
|
const selectedAddress = makePaymentStore.addressState.selectedAddress;
|
|
32451
32697
|
if (props.showUserAddress && selectedAddress) {
|
|
@@ -32455,16 +32701,27 @@ const _sfc_main$N = defineComponent({
|
|
|
32455
32701
|
if (!makePaymentStore.paymentMethod) {
|
|
32456
32702
|
return;
|
|
32457
32703
|
}
|
|
32458
|
-
await makePaymentStore.executePayment(
|
|
32704
|
+
await makePaymentStore.executePayment(
|
|
32705
|
+
props,
|
|
32706
|
+
makePaymentStore.paymentMethod,
|
|
32707
|
+
selectedAddress
|
|
32708
|
+
);
|
|
32459
32709
|
};
|
|
32460
|
-
watch(
|
|
32461
|
-
|
|
32462
|
-
|
|
32710
|
+
watch(
|
|
32711
|
+
() => makePaymentStore.uiState.paymentHandler,
|
|
32712
|
+
async (paymentHandler) => {
|
|
32713
|
+
if (!paymentHandler) {
|
|
32714
|
+
return;
|
|
32715
|
+
}
|
|
32716
|
+
await makePaymentStore.afterPaymentSuccess(props);
|
|
32463
32717
|
}
|
|
32464
|
-
|
|
32465
|
-
});
|
|
32718
|
+
);
|
|
32466
32719
|
const beforeTopupAndPay = (beforeTopupAndPayParams) => {
|
|
32467
|
-
makePaymentStore.beforeTopupAndPay(
|
|
32720
|
+
makePaymentStore.beforeTopupAndPay(
|
|
32721
|
+
props,
|
|
32722
|
+
beforeTopupAndPayParams,
|
|
32723
|
+
topAndPay
|
|
32724
|
+
);
|
|
32468
32725
|
};
|
|
32469
32726
|
const { isMobile, isDesktop } = useBreakpoints();
|
|
32470
32727
|
const topAndPay = () => {
|
|
@@ -32480,7 +32737,9 @@ const _sfc_main$N = defineComponent({
|
|
|
32480
32737
|
return {
|
|
32481
32738
|
pay: _pay,
|
|
32482
32739
|
cancelPayment,
|
|
32483
|
-
isCashbackDetailsVisible: computed(
|
|
32740
|
+
isCashbackDetailsVisible: computed(
|
|
32741
|
+
() => makePaymentStore.cashbackState.hasCashBackAnimation && (!makePaymentStore.cashbackState.hasConfirmAge || isMobile.value)
|
|
32742
|
+
),
|
|
32484
32743
|
price: computed(() => {
|
|
32485
32744
|
var _a2, _b;
|
|
32486
32745
|
return (_b = (_a2 = props.paymentParams) == null ? void 0 : _a2.amount) == null ? void 0 : _b.amount;
|
|
@@ -32745,26 +33004,41 @@ const _sfc_main$M = defineComponent({
|
|
|
32745
33004
|
},
|
|
32746
33005
|
setup(props, context) {
|
|
32747
33006
|
const makePaymentStore = useMakePaymentStore();
|
|
32748
|
-
watch(
|
|
32749
|
-
|
|
32750
|
-
|
|
32751
|
-
|
|
32752
|
-
|
|
32753
|
-
|
|
32754
|
-
|
|
33007
|
+
watch(
|
|
33008
|
+
() => makePaymentStore.result.success,
|
|
33009
|
+
(success2) => {
|
|
33010
|
+
var _a2, _b;
|
|
33011
|
+
if (success2) {
|
|
33012
|
+
(_b = (_a2 = props.paymentParams) == null ? void 0 : _a2.success) == null ? void 0 : _b.call(_a2, {
|
|
33013
|
+
jws: success2.jws,
|
|
33014
|
+
address: success2.address ? { ...success2.address } : null
|
|
33015
|
+
});
|
|
33016
|
+
}
|
|
32755
33017
|
}
|
|
32756
|
-
|
|
32757
|
-
watch(
|
|
32758
|
-
|
|
32759
|
-
|
|
32760
|
-
|
|
33018
|
+
);
|
|
33019
|
+
watch(
|
|
33020
|
+
() => makePaymentStore.result.fail,
|
|
33021
|
+
(fail) => {
|
|
33022
|
+
var _a2, _b, _c;
|
|
33023
|
+
if (fail) {
|
|
33024
|
+
(_c = (_a2 = props.paymentParams) == null ? void 0 : _a2.fail) == null ? void 0 : _c.call(
|
|
33025
|
+
_a2,
|
|
33026
|
+
createErrorCode(
|
|
33027
|
+
(_b = fail.errorCode) != null ? _b : MiniAppErrorType.serverError,
|
|
33028
|
+
fail.jws
|
|
33029
|
+
)
|
|
33030
|
+
);
|
|
33031
|
+
}
|
|
32761
33032
|
}
|
|
32762
|
-
|
|
32763
|
-
watch(
|
|
32764
|
-
|
|
32765
|
-
|
|
33033
|
+
);
|
|
33034
|
+
watch(
|
|
33035
|
+
() => makePaymentStore.result.completed,
|
|
33036
|
+
(completed) => {
|
|
33037
|
+
if (completed) {
|
|
33038
|
+
context.emit("click");
|
|
33039
|
+
}
|
|
32766
33040
|
}
|
|
32767
|
-
|
|
33041
|
+
);
|
|
32768
33042
|
return {
|
|
32769
33043
|
makePaymentStore
|
|
32770
33044
|
};
|
|
@@ -32934,7 +33208,7 @@ const initMakePayment = async (initMakePayment2) => {
|
|
|
32934
33208
|
} else {
|
|
32935
33209
|
showUserAddress = false;
|
|
32936
33210
|
}
|
|
32937
|
-
app = createApp(
|
|
33211
|
+
app = createApp({
|
|
32938
33212
|
setup() {
|
|
32939
33213
|
return () => h(AppVue$6, {
|
|
32940
33214
|
show: show2.value,
|
|
@@ -32945,8 +33219,9 @@ const initMakePayment = async (initMakePayment2) => {
|
|
|
32945
33219
|
closeSheet();
|
|
32946
33220
|
}
|
|
32947
33221
|
});
|
|
32948
|
-
}
|
|
32949
|
-
|
|
33222
|
+
},
|
|
33223
|
+
...popStateHandler(closeSheet, initMakePayment2)
|
|
33224
|
+
});
|
|
32950
33225
|
app.use(createPinia());
|
|
32951
33226
|
app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
|
|
32952
33227
|
app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
|
|
@@ -32968,7 +33243,9 @@ const makePayment = async (params) => {
|
|
|
32968
33243
|
}
|
|
32969
33244
|
if ((_d = (_c = params == null ? void 0 : params.additionalUserInfo) == null ? void 0 : _c.userAddress) == null ? void 0 : _d.visible) {
|
|
32970
33245
|
try {
|
|
32971
|
-
const grantStatus = await checkPermission(
|
|
33246
|
+
const grantStatus = await checkPermission(
|
|
33247
|
+
PermissionName.mini_app_user_address
|
|
33248
|
+
);
|
|
32972
33249
|
if (grantStatus !== PermissionStatus.granted) {
|
|
32973
33250
|
(_e = params == null ? void 0 : params.fail) == null ? void 0 : _e.call(params, {
|
|
32974
33251
|
errorCode: MiniAppErrorType.insufficientScope
|
|
@@ -33156,22 +33433,32 @@ const _sfc_main$L = defineComponent({
|
|
|
33156
33433
|
emit("click", item2, index2);
|
|
33157
33434
|
};
|
|
33158
33435
|
return {
|
|
33159
|
-
iconUrl: computed(
|
|
33160
|
-
|
|
33161
|
-
|
|
33162
|
-
|
|
33163
|
-
|
|
33164
|
-
|
|
33165
|
-
|
|
33166
|
-
|
|
33167
|
-
|
|
33168
|
-
|
|
33169
|
-
|
|
33170
|
-
|
|
33171
|
-
|
|
33172
|
-
|
|
33173
|
-
|
|
33174
|
-
|
|
33436
|
+
iconUrl: computed(
|
|
33437
|
+
() => {
|
|
33438
|
+
var _a2, _b, _c;
|
|
33439
|
+
return (_c = (_b = (_a2 = props == null ? void 0 : props.selectedPaymentMethod) == null ? void 0 : _a2.descriptionBannerInfo) == null ? void 0 : _b.displayResponse) == null ? void 0 : _c.iconUrl;
|
|
33440
|
+
}
|
|
33441
|
+
),
|
|
33442
|
+
title: computed(
|
|
33443
|
+
() => {
|
|
33444
|
+
var _a2, _b, _c;
|
|
33445
|
+
return (_c = (_b = (_a2 = props == null ? void 0 : props.selectedPaymentMethod) == null ? void 0 : _a2.descriptionBannerInfo) == null ? void 0 : _b.displayResponse) == null ? void 0 : _c.title;
|
|
33446
|
+
}
|
|
33447
|
+
),
|
|
33448
|
+
description: computed(
|
|
33449
|
+
() => {
|
|
33450
|
+
var _a2, _b, _c;
|
|
33451
|
+
return (_c = (_b = (_a2 = props == null ? void 0 : props.selectedPaymentMethod) == null ? void 0 : _a2.descriptionBannerInfo) == null ? void 0 : _b.displayResponse) == null ? void 0 : _c.description;
|
|
33452
|
+
}
|
|
33453
|
+
),
|
|
33454
|
+
buttonList: computed(
|
|
33455
|
+
() => {
|
|
33456
|
+
var _a2, _b, _c, _d;
|
|
33457
|
+
return filterErrorButtonList(
|
|
33458
|
+
(_d = (_c = (_b = (_a2 = props == null ? void 0 : props.selectedPaymentMethod) == null ? void 0 : _a2.descriptionBannerInfo) == null ? void 0 : _b.displayResponse) == null ? void 0 : _c.buttonList) != null ? _d : []
|
|
33459
|
+
);
|
|
33460
|
+
}
|
|
33461
|
+
),
|
|
33175
33462
|
click,
|
|
33176
33463
|
style
|
|
33177
33464
|
};
|
|
@@ -33262,11 +33549,15 @@ const _sfc_main$K = defineComponent({
|
|
|
33262
33549
|
const lg2 = getLanguage();
|
|
33263
33550
|
const style = useCssModule();
|
|
33264
33551
|
return {
|
|
33265
|
-
availableBalText: computed(
|
|
33266
|
-
|
|
33267
|
-
|
|
33268
|
-
|
|
33269
|
-
|
|
33552
|
+
availableBalText: computed(
|
|
33553
|
+
() => props.isCharging ? lg2.topup.availableBalanceAfter : lg2.topup.availableBalance
|
|
33554
|
+
),
|
|
33555
|
+
isCashbackSave: computed(
|
|
33556
|
+
() => {
|
|
33557
|
+
var _a2;
|
|
33558
|
+
return ((_a2 = props == null ? void 0 : props.cashbackInfo) == null ? void 0 : _a2.cashBackUseStatus) === "SAVE";
|
|
33559
|
+
}
|
|
33560
|
+
),
|
|
33270
33561
|
style,
|
|
33271
33562
|
lg: lg2
|
|
33272
33563
|
};
|
|
@@ -33341,14 +33632,18 @@ const _sfc_main$J = defineComponent({
|
|
|
33341
33632
|
const style = useCssModule();
|
|
33342
33633
|
return {
|
|
33343
33634
|
images: getImages(),
|
|
33344
|
-
amount: computed(
|
|
33345
|
-
|
|
33346
|
-
|
|
33347
|
-
|
|
33348
|
-
|
|
33349
|
-
|
|
33350
|
-
|
|
33351
|
-
|
|
33635
|
+
amount: computed(
|
|
33636
|
+
() => {
|
|
33637
|
+
var _a2, _b;
|
|
33638
|
+
return formatCurrency(Number((_b = (_a2 = props == null ? void 0 : props.data) == null ? void 0 : _a2.amount) == null ? void 0 : _b.amount), 0);
|
|
33639
|
+
}
|
|
33640
|
+
),
|
|
33641
|
+
statusLabelColor: computed(
|
|
33642
|
+
() => {
|
|
33643
|
+
var _a2, _b;
|
|
33644
|
+
return (_b = (_a2 = props == null ? void 0 : props.data) == null ? void 0 : _a2.statusLabelColor) == null ? void 0 : _b.toLowerCase();
|
|
33645
|
+
}
|
|
33646
|
+
),
|
|
33352
33647
|
topUpId: computed(() => {
|
|
33353
33648
|
var _a2, _b;
|
|
33354
33649
|
return (_b = (_a2 = props == null ? void 0 : props.data) == null ? void 0 : _a2.topUpId) != null ? _b : "";
|
|
@@ -33643,7 +33938,11 @@ const _sfc_main$I = defineComponent({
|
|
|
33643
33938
|
return (_b = (_a2 = this.selectedCardMethod) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.ccType;
|
|
33644
33939
|
},
|
|
33645
33940
|
minAMountErrorMessage() {
|
|
33646
|
-
return updateLocalisedString(
|
|
33941
|
+
return updateLocalisedString(
|
|
33942
|
+
this.lg.topup.minAmount,
|
|
33943
|
+
"{amount}",
|
|
33944
|
+
numberWithCommas(this.topupMinAmount)
|
|
33945
|
+
);
|
|
33647
33946
|
}
|
|
33648
33947
|
},
|
|
33649
33948
|
watch: {
|
|
@@ -33662,15 +33961,16 @@ const _sfc_main$I = defineComponent({
|
|
|
33662
33961
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
33663
33962
|
this.loading = true;
|
|
33664
33963
|
this.isFirstLoad = true;
|
|
33665
|
-
const paymentIDParams =
|
|
33666
|
-
|
|
33667
|
-
|
|
33964
|
+
const paymentIDParams = {
|
|
33965
|
+
...((_a2 = this.topupParams) == null ? void 0 : _a2.merchant) && {
|
|
33966
|
+
merchant: this.topupParams.merchant
|
|
33967
|
+
},
|
|
33668
33968
|
type: "TOPUP",
|
|
33669
33969
|
methodType: (_b = this.topupParams) == null ? void 0 : _b.methodType,
|
|
33670
33970
|
bankCode: (_c = this.topupParams) == null ? void 0 : _c.bankCode,
|
|
33671
33971
|
sourceInfoApp: (_d = this.topupParams) == null ? void 0 : _d.sourceInfoApp,
|
|
33672
33972
|
productType: (_e = this.topupParams) == null ? void 0 : _e.productType
|
|
33673
|
-
}
|
|
33973
|
+
};
|
|
33674
33974
|
const paymentIdResponse = await getPaymentMethods2(paymentIDParams);
|
|
33675
33975
|
switch (paymentIdResponse.ppFetchResult) {
|
|
33676
33976
|
case "success":
|
|
@@ -33831,34 +34131,41 @@ const _sfc_main$I = defineComponent({
|
|
|
33831
34131
|
return null;
|
|
33832
34132
|
}
|
|
33833
34133
|
if (!agreeSimilarTransaction) {
|
|
33834
|
-
this.isDuplicate = checkDuplicateTopup(
|
|
34134
|
+
this.isDuplicate = checkDuplicateTopup(
|
|
34135
|
+
Number(String(this.inputMoney).replace(/,/g, ""))
|
|
34136
|
+
);
|
|
33835
34137
|
if (this.isDuplicate) {
|
|
33836
34138
|
return null;
|
|
33837
34139
|
}
|
|
33838
34140
|
}
|
|
33839
34141
|
this.loading = true;
|
|
33840
34142
|
this.isDuplicate = false;
|
|
33841
|
-
|
|
33842
|
-
|
|
33843
|
-
|
|
34143
|
+
({
|
|
34144
|
+
...((_b = this.topupParams) == null ? void 0 : _b.merchant) && {
|
|
34145
|
+
merchant: this.topupParams.merchant
|
|
34146
|
+
},
|
|
33844
34147
|
type: "TOPUP"
|
|
33845
34148
|
});
|
|
33846
34149
|
((_c = this.topupParams) == null ? void 0 : _c.sourceInfoApp) ? this.topupParams.sourceInfoApp : null;
|
|
33847
34150
|
try {
|
|
33848
|
-
const res = await topup$3(
|
|
33849
|
-
|
|
33850
|
-
|
|
33851
|
-
|
|
33852
|
-
|
|
33853
|
-
|
|
33854
|
-
paymentMethodId: this.selectedPaymentMethod.paymentMethodId,
|
|
33855
|
-
merchantTopUpId: (_f = (_e = this.topupParams) == null ? void 0 : _e.merchantTopUpId) != null ? _f : "",
|
|
33856
|
-
amount: {
|
|
33857
|
-
amount: Number(String(this.inputMoney).replace(/,/g, "")),
|
|
33858
|
-
currency: "JPY"
|
|
34151
|
+
const res = await topup$3(
|
|
34152
|
+
{
|
|
34153
|
+
...((_d = this.topupParams) == null ? void 0 : _d.merchant) && {
|
|
34154
|
+
merchant: this.topupParams.merchant
|
|
34155
|
+
},
|
|
34156
|
+
agreeSimilarTransaction
|
|
33859
34157
|
},
|
|
33860
|
-
|
|
33861
|
-
|
|
34158
|
+
{
|
|
34159
|
+
paymentMethodType: this.selectedPaymentMethod.paymentMethodType,
|
|
34160
|
+
paymentMethodId: this.selectedPaymentMethod.paymentMethodId,
|
|
34161
|
+
merchantTopUpId: (_f = (_e = this.topupParams) == null ? void 0 : _e.merchantTopUpId) != null ? _f : "",
|
|
34162
|
+
amount: {
|
|
34163
|
+
amount: Number(String(this.inputMoney).replace(/,/g, "")),
|
|
34164
|
+
currency: "JPY"
|
|
34165
|
+
},
|
|
34166
|
+
requestedAt: (_h = (_g = this.topupParams) == null ? void 0 : _g.requestedAt) != null ? _h : 0
|
|
34167
|
+
}
|
|
34168
|
+
);
|
|
33862
34169
|
if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && ((_i = res == null ? void 0 : res.body) == null ? void 0 : _i.uiComponents)) {
|
|
33863
34170
|
if ((_k = (_j = res == null ? void 0 : res.body) == null ? void 0 : _j.uiComponents) == null ? void 0 : _k.displayErrorResponse) {
|
|
33864
34171
|
this.errorInfo.iconUrl = (_o = (_n = (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.uiComponents) == null ? void 0 : _m.displayErrorResponse) == null ? void 0 : _n.iconUrl) != null ? _o : "";
|
|
@@ -34263,7 +34570,7 @@ const initTopup = (topupParams) => {
|
|
|
34263
34570
|
(_a2 = topupParams == null ? void 0 : topupParams.complete) == null ? void 0 : _a2.call(topupParams);
|
|
34264
34571
|
}, 300);
|
|
34265
34572
|
};
|
|
34266
|
-
const app = createApp(
|
|
34573
|
+
const app = createApp({
|
|
34267
34574
|
setup() {
|
|
34268
34575
|
return () => h(AppVue$5, {
|
|
34269
34576
|
show: show2.value,
|
|
@@ -34272,8 +34579,9 @@ const initTopup = (topupParams) => {
|
|
|
34272
34579
|
closeSheet();
|
|
34273
34580
|
}
|
|
34274
34581
|
});
|
|
34275
|
-
}
|
|
34276
|
-
|
|
34582
|
+
},
|
|
34583
|
+
...popStateHandler(closeSheet, topupProp)
|
|
34584
|
+
});
|
|
34277
34585
|
const container2 = document.createElement("div");
|
|
34278
34586
|
container2.className = "ppmna-reset-css";
|
|
34279
34587
|
app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
|
|
@@ -34358,10 +34666,14 @@ function scanCode(params) {
|
|
|
34358
34666
|
return;
|
|
34359
34667
|
}
|
|
34360
34668
|
const redirectUrlOnCancel = (_b = params == null ? void 0 : params.redirectUrlOnCancel) != null ? _b : window.location.href;
|
|
34361
|
-
const deeplink = `paypay://miniapp?appId=${clientId}&redirectUrl=${encodeURIComponent(
|
|
34669
|
+
const deeplink = `paypay://miniapp?appId=${clientId}&redirectUrl=${encodeURIComponent(
|
|
34670
|
+
redirectUrlOnCancel
|
|
34671
|
+
)}&closeCurrentScreen=true`;
|
|
34362
34672
|
closeApp({
|
|
34363
34673
|
options: {
|
|
34364
|
-
deeplink: `paypay://scan?callbackdeeplink=${encodeURIComponent(
|
|
34674
|
+
deeplink: `paypay://scan?callbackdeeplink=${encodeURIComponent(
|
|
34675
|
+
deeplink
|
|
34676
|
+
)}`
|
|
34365
34677
|
}
|
|
34366
34678
|
});
|
|
34367
34679
|
} else {
|
|
@@ -34491,7 +34803,7 @@ const initAlertSheet = (initAlertSheet2) => {
|
|
|
34491
34803
|
app.unmount();
|
|
34492
34804
|
}, 300);
|
|
34493
34805
|
};
|
|
34494
|
-
const app = createApp(
|
|
34806
|
+
const app = createApp({
|
|
34495
34807
|
setup() {
|
|
34496
34808
|
return () => h(AppVue$4, {
|
|
34497
34809
|
show: show2.value,
|
|
@@ -34502,8 +34814,9 @@ const initAlertSheet = (initAlertSheet2) => {
|
|
|
34502
34814
|
closeSheet();
|
|
34503
34815
|
}
|
|
34504
34816
|
});
|
|
34505
|
-
}
|
|
34506
|
-
|
|
34817
|
+
},
|
|
34818
|
+
...popStateHandler(closeSheet, initAlertSheet2)
|
|
34819
|
+
});
|
|
34507
34820
|
const container2 = document.createElement("div");
|
|
34508
34821
|
container2.className = "ppmna-reset-css";
|
|
34509
34822
|
app.mount(container2);
|
|
@@ -34546,7 +34859,7 @@ const initErrorSheet = (initErrorSheet2) => {
|
|
|
34546
34859
|
});
|
|
34547
34860
|
});
|
|
34548
34861
|
}
|
|
34549
|
-
const app = createApp(
|
|
34862
|
+
const app = createApp({
|
|
34550
34863
|
setup() {
|
|
34551
34864
|
return () => h(ErrorSheet, {
|
|
34552
34865
|
show: show2.value,
|
|
@@ -34557,8 +34870,9 @@ const initErrorSheet = (initErrorSheet2) => {
|
|
|
34557
34870
|
closeSheet();
|
|
34558
34871
|
}
|
|
34559
34872
|
});
|
|
34560
|
-
}
|
|
34561
|
-
|
|
34873
|
+
},
|
|
34874
|
+
...popStateHandler(closeSheet, initErrorSheet2)
|
|
34875
|
+
});
|
|
34562
34876
|
const container2 = document.createElement("div");
|
|
34563
34877
|
container2.className = "ppmna-reset-css";
|
|
34564
34878
|
app.mount(container2);
|
|
@@ -34745,7 +35059,7 @@ const initShowUpdateWarning = (params) => {
|
|
|
34745
35059
|
(_a2 = params == null ? void 0 : params.complete) == null ? void 0 : _a2.call(params);
|
|
34746
35060
|
}, 300);
|
|
34747
35061
|
};
|
|
34748
|
-
const app = createApp(
|
|
35062
|
+
const app = createApp({
|
|
34749
35063
|
setup() {
|
|
34750
35064
|
return () => h(AppVue$3, {
|
|
34751
35065
|
show: show2.value,
|
|
@@ -34754,8 +35068,9 @@ const initShowUpdateWarning = (params) => {
|
|
|
34754
35068
|
closeSheet();
|
|
34755
35069
|
}
|
|
34756
35070
|
});
|
|
34757
|
-
}
|
|
34758
|
-
|
|
35071
|
+
},
|
|
35072
|
+
...popStateHandler(closeSheet, warningParams)
|
|
35073
|
+
});
|
|
34759
35074
|
const container2 = document.createElement("div");
|
|
34760
35075
|
container2.className = "ppmna-reset-css";
|
|
34761
35076
|
app.mount(container2);
|
|
@@ -34787,7 +35102,9 @@ async function execute$9(params) {
|
|
|
34787
35102
|
const appVersion = getAppVersion();
|
|
34788
35103
|
if (appVersion) {
|
|
34789
35104
|
try {
|
|
34790
|
-
const response = await fetch(
|
|
35105
|
+
const response = await fetch(
|
|
35106
|
+
"https://static.paypay.ne.jp/libs/mini-app-js-sdk/versions.json"
|
|
35107
|
+
);
|
|
34791
35108
|
const res = await response.json();
|
|
34792
35109
|
Object.keys(res == null ? void 0 : res.app).forEach(function(key2) {
|
|
34793
35110
|
var _a3;
|
|
@@ -34969,7 +35286,7 @@ const initOpenApp = (initOpenApp2) => {
|
|
|
34969
35286
|
(_a2 = initOpenApp2 == null ? void 0 : initOpenApp2.complete) == null ? void 0 : _a2.call(initOpenApp2);
|
|
34970
35287
|
}, 300);
|
|
34971
35288
|
};
|
|
34972
|
-
const app = createApp(
|
|
35289
|
+
const app = createApp({
|
|
34973
35290
|
setup() {
|
|
34974
35291
|
return () => h(AppVue$2, {
|
|
34975
35292
|
show: show2.value,
|
|
@@ -34978,8 +35295,9 @@ const initOpenApp = (initOpenApp2) => {
|
|
|
34978
35295
|
closeSheet();
|
|
34979
35296
|
}
|
|
34980
35297
|
});
|
|
34981
|
-
}
|
|
34982
|
-
|
|
35298
|
+
},
|
|
35299
|
+
...popStateHandler(closeSheet, appParams)
|
|
35300
|
+
});
|
|
34983
35301
|
const container2 = document.createElement("div");
|
|
34984
35302
|
container2.className = "ppmna-reset-css";
|
|
34985
35303
|
app.mount(container2);
|
|
@@ -35061,7 +35379,9 @@ async function execute$7(params) {
|
|
|
35061
35379
|
const initGetUserAddress = async (params) => {
|
|
35062
35380
|
var _a2, _b, _c, _d, _e, _f;
|
|
35063
35381
|
try {
|
|
35064
|
-
const grantStatus = await checkPermission(
|
|
35382
|
+
const grantStatus = await checkPermission(
|
|
35383
|
+
PermissionName.mini_app_user_address
|
|
35384
|
+
);
|
|
35065
35385
|
if (grantStatus !== PermissionStatus.granted) {
|
|
35066
35386
|
(_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, {
|
|
35067
35387
|
errorCode: MiniAppErrorType.insufficientScope
|
|
@@ -35096,7 +35416,8 @@ const initGetUserAddress = async (params) => {
|
|
|
35096
35416
|
(_a3 = params == null ? void 0 : params.complete) == null ? void 0 : _a3.call(params);
|
|
35097
35417
|
}, 300);
|
|
35098
35418
|
};
|
|
35099
|
-
const app = createApp(
|
|
35419
|
+
const app = createApp({
|
|
35420
|
+
...popStateHandler(closeSheet, params),
|
|
35100
35421
|
render() {
|
|
35101
35422
|
var _a3, _b2, _c2;
|
|
35102
35423
|
return h(AppVue$7, {
|
|
@@ -35106,7 +35427,7 @@ const initGetUserAddress = async (params) => {
|
|
|
35106
35427
|
addresses: (_c2 = (_b2 = (_a3 = res == null ? void 0 : res.body) == null ? void 0 : _a3.unsigned) == null ? void 0 : _b2.data) == null ? void 0 : _c2.addresses
|
|
35107
35428
|
});
|
|
35108
35429
|
}
|
|
35109
|
-
})
|
|
35430
|
+
});
|
|
35110
35431
|
app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
|
|
35111
35432
|
app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
|
|
35112
35433
|
app.mount(container2);
|
|
@@ -35132,7 +35453,10 @@ function useRoot(props, { emit }) {
|
|
|
35132
35453
|
const cancel2 = () => {
|
|
35133
35454
|
var _a2, _b;
|
|
35134
35455
|
emit("click");
|
|
35135
|
-
(_b = (_a2 = props.inputAddressParams) == null ? void 0 : _a2.fail) == null ? void 0 : _b.call(
|
|
35456
|
+
(_b = (_a2 = props.inputAddressParams) == null ? void 0 : _a2.fail) == null ? void 0 : _b.call(
|
|
35457
|
+
_a2,
|
|
35458
|
+
createErrorCode(MiniAppErrorType.userCanceled)
|
|
35459
|
+
);
|
|
35136
35460
|
};
|
|
35137
35461
|
const success2 = () => {
|
|
35138
35462
|
var _a2, _b;
|
|
@@ -35179,7 +35503,7 @@ const initialState = {
|
|
|
35179
35503
|
shallow: false
|
|
35180
35504
|
};
|
|
35181
35505
|
function useApp(params) {
|
|
35182
|
-
const state = reactive(
|
|
35506
|
+
const state = reactive({ ...initialState });
|
|
35183
35507
|
const addAddress2 = async (_address) => {
|
|
35184
35508
|
var _a2;
|
|
35185
35509
|
state.loading = true;
|
|
@@ -35204,7 +35528,7 @@ function useApp(params) {
|
|
|
35204
35528
|
params.success();
|
|
35205
35529
|
};
|
|
35206
35530
|
const reset2 = () => {
|
|
35207
|
-
Object.assign(state,
|
|
35531
|
+
Object.assign(state, { ...initialState });
|
|
35208
35532
|
};
|
|
35209
35533
|
return {
|
|
35210
35534
|
addAddress: addAddress2,
|
|
@@ -35304,7 +35628,8 @@ const initInputAddress = (params) => {
|
|
|
35304
35628
|
(_a2 = params == null ? void 0 : params.complete) == null ? void 0 : _a2.call(params);
|
|
35305
35629
|
}, 300);
|
|
35306
35630
|
};
|
|
35307
|
-
const app = createApp(
|
|
35631
|
+
const app = createApp({
|
|
35632
|
+
...popStateHandler(closeSheet, params),
|
|
35308
35633
|
render() {
|
|
35309
35634
|
return h(AppView, {
|
|
35310
35635
|
show: show2.value,
|
|
@@ -35312,7 +35637,7 @@ const initInputAddress = (params) => {
|
|
|
35312
35637
|
inputAddressParams: params
|
|
35313
35638
|
});
|
|
35314
35639
|
}
|
|
35315
|
-
})
|
|
35640
|
+
});
|
|
35316
35641
|
app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
|
|
35317
35642
|
app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
|
|
35318
35643
|
app.mount(container2);
|
|
@@ -35337,7 +35662,9 @@ async function getUserLocation(getUserLocationParams) {
|
|
|
35337
35662
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
35338
35663
|
const params = reconstructParams(getUserLocationParams);
|
|
35339
35664
|
try {
|
|
35340
|
-
const grantStatus = await checkPermission(
|
|
35665
|
+
const grantStatus = await checkPermission(
|
|
35666
|
+
PermissionName.mini_app_user_location
|
|
35667
|
+
);
|
|
35341
35668
|
if (grantStatus !== PermissionStatus.granted) {
|
|
35342
35669
|
(_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.insufficientScope });
|
|
35343
35670
|
return;
|
|
@@ -35350,7 +35677,9 @@ async function getUserLocation(getUserLocationParams) {
|
|
|
35350
35677
|
const resp = await getUserLocationRequest({ validTimeMinutes });
|
|
35351
35678
|
if ((resp == null ? void 0 : resp.ppFetchResult) === "success" && ((_d = (_c = (_b = resp == null ? void 0 : resp.body) == null ? void 0 : _b.unsigned) == null ? void 0 : _c.data) == null ? void 0 : _d.location)) {
|
|
35352
35679
|
const lat = Number.parseFloat((_h = (_g = (_f = (_e = resp == null ? void 0 : resp.body) == null ? void 0 : _e.unsigned) == null ? void 0 : _f.data) == null ? void 0 : _g.location) == null ? void 0 : _h.lat);
|
|
35353
|
-
const long = Number.parseFloat(
|
|
35680
|
+
const long = Number.parseFloat(
|
|
35681
|
+
(_l = (_k = (_j = (_i = resp == null ? void 0 : resp.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.data) == null ? void 0 : _k.location) == null ? void 0 : _l.lon
|
|
35682
|
+
);
|
|
35354
35683
|
(_m = params == null ? void 0 : params.success) == null ? void 0 : _m.call(params, {
|
|
35355
35684
|
result: {
|
|
35356
35685
|
lat,
|
|
@@ -35363,28 +35692,32 @@ async function getUserLocation(getUserLocationParams) {
|
|
|
35363
35692
|
await new Promise((resolve2, _) => {
|
|
35364
35693
|
var _a3;
|
|
35365
35694
|
if (navigator.geolocation) {
|
|
35366
|
-
navigator.geolocation.getCurrentPosition(
|
|
35367
|
-
|
|
35368
|
-
|
|
35369
|
-
|
|
35370
|
-
|
|
35371
|
-
|
|
35372
|
-
|
|
35373
|
-
|
|
35374
|
-
|
|
35375
|
-
|
|
35376
|
-
|
|
35377
|
-
|
|
35378
|
-
(
|
|
35379
|
-
|
|
35380
|
-
|
|
35381
|
-
|
|
35382
|
-
|
|
35383
|
-
|
|
35384
|
-
|
|
35385
|
-
|
|
35386
|
-
|
|
35387
|
-
|
|
35695
|
+
navigator.geolocation.getCurrentPosition(
|
|
35696
|
+
(res) => {
|
|
35697
|
+
var _a4, _b2, _c2;
|
|
35698
|
+
(_c2 = params == null ? void 0 : params.success) == null ? void 0 : _c2.call(params, {
|
|
35699
|
+
result: {
|
|
35700
|
+
lat: (_a4 = res == null ? void 0 : res.coords) == null ? void 0 : _a4.latitude,
|
|
35701
|
+
long: (_b2 = res == null ? void 0 : res.coords) == null ? void 0 : _b2.longitude
|
|
35702
|
+
}
|
|
35703
|
+
});
|
|
35704
|
+
resolve2(null);
|
|
35705
|
+
return;
|
|
35706
|
+
},
|
|
35707
|
+
() => {
|
|
35708
|
+
var _a4;
|
|
35709
|
+
(_a4 = params == null ? void 0 : params.fail) == null ? void 0 : _a4.call(params, {
|
|
35710
|
+
errorCode: MiniAppErrorType.hostAppLocationDenied
|
|
35711
|
+
});
|
|
35712
|
+
resolve2(null);
|
|
35713
|
+
return;
|
|
35714
|
+
},
|
|
35715
|
+
{
|
|
35716
|
+
enableHighAccuracy: (params == null ? void 0 : params.accuracy) === "high",
|
|
35717
|
+
timeout: 1e4,
|
|
35718
|
+
maximumAge: 0
|
|
35719
|
+
}
|
|
35720
|
+
);
|
|
35388
35721
|
} else {
|
|
35389
35722
|
(_a3 = params == null ? void 0 : params.fail) == null ? void 0 : _a3.call(params, {
|
|
35390
35723
|
errorCode: MiniAppErrorType.hostAppLocationDenied
|
|
@@ -35401,7 +35734,9 @@ async function checkPaymentMethod(checkPayMethodParams) {
|
|
|
35401
35734
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
35402
35735
|
const params = reconstructParams(checkPayMethodParams);
|
|
35403
35736
|
try {
|
|
35404
|
-
const grantStatus = await checkPermission(
|
|
35737
|
+
const grantStatus = await checkPermission(
|
|
35738
|
+
PermissionName.mini_app_check_payment_method
|
|
35739
|
+
);
|
|
35405
35740
|
if (grantStatus !== PermissionStatus.granted) {
|
|
35406
35741
|
return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.insufficientScope });
|
|
35407
35742
|
}
|
|
@@ -35441,7 +35776,7 @@ function debug(params) {
|
|
|
35441
35776
|
function execute$6(params) {
|
|
35442
35777
|
var _a2;
|
|
35443
35778
|
(_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params, {
|
|
35444
|
-
v: "1.
|
|
35779
|
+
v: "1.57.0"
|
|
35445
35780
|
});
|
|
35446
35781
|
}
|
|
35447
35782
|
function useCallBack(props, ctx) {
|
|
@@ -36527,7 +36862,9 @@ var AppVue$1 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$
|
|
|
36527
36862
|
async function initRegisterEmail(initRegisterEmail2, allowsUpdate) {
|
|
36528
36863
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
36529
36864
|
try {
|
|
36530
|
-
const grantStatus = await checkPermission(
|
|
36865
|
+
const grantStatus = await checkPermission(
|
|
36866
|
+
PermissionName.mini_app_user_email_address
|
|
36867
|
+
);
|
|
36531
36868
|
if (grantStatus !== PermissionStatus.granted) {
|
|
36532
36869
|
(_a2 = initRegisterEmail2 == null ? void 0 : initRegisterEmail2.fail) == null ? void 0 : _a2.call(initRegisterEmail2, {
|
|
36533
36870
|
errorCode: MiniAppErrorType.insufficientScope
|
|
@@ -36572,7 +36909,8 @@ async function initRegisterEmail(initRegisterEmail2, allowsUpdate) {
|
|
|
36572
36909
|
}, 350);
|
|
36573
36910
|
};
|
|
36574
36911
|
const resendOption = allowsUpdate && email2 && !emailVerified ? { resend: true, maskedEmail: email2 } : null;
|
|
36575
|
-
const app = createApp(
|
|
36912
|
+
const app = createApp({
|
|
36913
|
+
...popStateHandler(closeSheet, initRegisterEmail2),
|
|
36576
36914
|
render() {
|
|
36577
36915
|
return h(AppVue$1, {
|
|
36578
36916
|
show: show2.value,
|
|
@@ -36581,7 +36919,7 @@ async function initRegisterEmail(initRegisterEmail2, allowsUpdate) {
|
|
|
36581
36919
|
resendOption
|
|
36582
36920
|
});
|
|
36583
36921
|
}
|
|
36584
|
-
})
|
|
36922
|
+
});
|
|
36585
36923
|
const container2 = document.createElement("div");
|
|
36586
36924
|
container2.className = "ppmna-reset-css";
|
|
36587
36925
|
app.mount(container2);
|
|
@@ -36609,16 +36947,19 @@ function registerKyc(params) {
|
|
|
36609
36947
|
}
|
|
36610
36948
|
function execute$5(params) {
|
|
36611
36949
|
var _a2;
|
|
36612
|
-
params =
|
|
36950
|
+
params = {
|
|
36951
|
+
...params,
|
|
36613
36952
|
type: (params == null ? void 0 : params.type) || "EKYC"
|
|
36614
|
-
}
|
|
36953
|
+
};
|
|
36615
36954
|
const appDetail = getAppDetail();
|
|
36616
36955
|
const clientId = getClientId();
|
|
36617
36956
|
if (!clientId) {
|
|
36618
36957
|
(_a2 = params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.sdkNotInitialized });
|
|
36619
36958
|
return;
|
|
36620
36959
|
}
|
|
36621
|
-
let deeplink = `paypay://kyc/top?appId=${clientId}&appName=${encodeURIComponent(
|
|
36960
|
+
let deeplink = `paypay://kyc/top?appId=${clientId}&appName=${encodeURIComponent(
|
|
36961
|
+
(appDetail == null ? void 0 : appDetail.appName) || ""
|
|
36962
|
+
)}`;
|
|
36622
36963
|
Object.entries(params).map(([key2, value2]) => {
|
|
36623
36964
|
if (typeof value2 !== "function") {
|
|
36624
36965
|
let kycData = encodeURIComponent(String(value2));
|
|
@@ -36643,6 +36984,11 @@ function execute$5(params) {
|
|
|
36643
36984
|
});
|
|
36644
36985
|
}
|
|
36645
36986
|
}
|
|
36987
|
+
const MinVersion = {
|
|
36988
|
+
PRE_TRANSACTION_AUTO_CHARGE: "3.43.0",
|
|
36989
|
+
FALLBACK_PAYMENT_METHOD: "3.61.0",
|
|
36990
|
+
START_MULTIFACTOR_AUTH_ANDROID_FIX: "3.67.0"
|
|
36991
|
+
};
|
|
36646
36992
|
async function startMultiFactorAuth(params) {
|
|
36647
36993
|
const newParams = reconstructParams(params);
|
|
36648
36994
|
await execute$4(newParams);
|
|
@@ -36657,6 +37003,17 @@ async function execute$4(params) {
|
|
|
36657
37003
|
return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.invalidType });
|
|
36658
37004
|
}
|
|
36659
37005
|
try {
|
|
37006
|
+
if (getRuntime() === MiniAppRuntime.android && !checkVersion(MinVersion.START_MULTIFACTOR_AUTH_ANDROID_FIX)) {
|
|
37007
|
+
await new Promise((resolve2, reject) => {
|
|
37008
|
+
jsBridge$1.callNative("getUAID", {
|
|
37009
|
+
success: () => resolve2(),
|
|
37010
|
+
fail: reject
|
|
37011
|
+
});
|
|
37012
|
+
setTimeout(() => {
|
|
37013
|
+
resolve2();
|
|
37014
|
+
}, 1e3);
|
|
37015
|
+
});
|
|
37016
|
+
}
|
|
36660
37017
|
const res = await ppFetch2({
|
|
36661
37018
|
method: "GET",
|
|
36662
37019
|
url: "/web-api/app/v1/authentication/sessionId"
|
|
@@ -36666,7 +37023,7 @@ async function execute$4(params) {
|
|
|
36666
37023
|
}
|
|
36667
37024
|
if ((_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.sessionId) {
|
|
36668
37025
|
const sessionId = (_h = (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.unsigned) == null ? void 0 : _g.data) == null ? void 0 : _h.sessionId;
|
|
36669
|
-
const deeplink = `paypay://miniAppMFA?ppSessionId=${sessionId}&type=${params.type}&callbackUrl=${params == null ? void 0 : params.callbackUrl}`;
|
|
37026
|
+
const deeplink = `paypay://miniAppMFA?ppSessionId=${sessionId}&type=${params.type}&callbackUrl=${encodeURIComponent(params == null ? void 0 : params.callbackUrl)}`;
|
|
36670
37027
|
closeApp({
|
|
36671
37028
|
options: {
|
|
36672
37029
|
deeplink
|
|
@@ -36727,7 +37084,9 @@ async function execute$2(params) {
|
|
|
36727
37084
|
throw Error();
|
|
36728
37085
|
}
|
|
36729
37086
|
} else {
|
|
36730
|
-
throw Error(
|
|
37087
|
+
throw Error(
|
|
37088
|
+
((_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.resultInfo) == null ? void 0 : _k.code) || MiniAppErrorType.serverError
|
|
37089
|
+
);
|
|
36731
37090
|
}
|
|
36732
37091
|
} catch (e) {
|
|
36733
37092
|
return (_l = params == null ? void 0 : params.fail) == null ? void 0 : _l.call(params, {
|
|
@@ -37106,9 +37465,8 @@ var en = {
|
|
|
37106
37465
|
},
|
|
37107
37466
|
registerPaymentFeatures: registerPaymentFeatures$1
|
|
37108
37467
|
};
|
|
37109
|
-
var en$1 = /* @__PURE__ */ Object.freeze({
|
|
37468
|
+
var en$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
37110
37469
|
__proto__: null,
|
|
37111
|
-
[Symbol.toStringTag]: "Module",
|
|
37112
37470
|
showUpdateWarning,
|
|
37113
37471
|
openApp,
|
|
37114
37472
|
openMap,
|
|
@@ -37138,7 +37496,7 @@ var en$1 = /* @__PURE__ */ Object.freeze({
|
|
|
37138
37496
|
getBankInfo: getBankInfo$1,
|
|
37139
37497
|
registerPaymentFeatures: registerPaymentFeatures$1,
|
|
37140
37498
|
"default": en
|
|
37141
|
-
});
|
|
37499
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
37142
37500
|
function getRenderLoginInfo(params) {
|
|
37143
37501
|
var _a2;
|
|
37144
37502
|
let preferredLanguage = (params == null ? void 0 : params.locale) || getPayPayLanguage();
|
|
@@ -37151,16 +37509,18 @@ function getRenderLoginInfo(params) {
|
|
|
37151
37509
|
if (loggedinUser == null ? void 0 : loggedinUser.nickName) {
|
|
37152
37510
|
let title2 = loggedinUser == null ? void 0 : loggedinUser.nickName;
|
|
37153
37511
|
if (((_a2 = loggedinUser == null ? void 0 : loggedinUser.avatarUrl) == null ? void 0 : _a2.indexOf("defaultAvatar@3x")) === -1 && (params == null ? void 0 : params.buttonSize) !== "sm") {
|
|
37154
|
-
data2 =
|
|
37512
|
+
data2 = {
|
|
37513
|
+
...data2,
|
|
37155
37514
|
avatarUrl: loggedinUser.avatarUrl
|
|
37156
|
-
}
|
|
37515
|
+
};
|
|
37157
37516
|
}
|
|
37158
37517
|
if (!((params == null ? void 0 : params.isShortText) || (params == null ? void 0 : params.buttonSize) === "sm")) {
|
|
37159
37518
|
title2 = updateLocalisedString(smartLogin2.continueAs, "{user}", title2);
|
|
37160
37519
|
}
|
|
37161
|
-
data2 =
|
|
37520
|
+
data2 = {
|
|
37521
|
+
...data2,
|
|
37162
37522
|
title: title2
|
|
37163
|
-
}
|
|
37523
|
+
};
|
|
37164
37524
|
}
|
|
37165
37525
|
return {
|
|
37166
37526
|
data: data2,
|
|
@@ -37332,20 +37692,21 @@ var AppVue = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$y]
|
|
|
37332
37692
|
const initSmartButton = (params, data2, preferredLanguage, isLoggedIn) => {
|
|
37333
37693
|
const smartButtonParams = reactive(params);
|
|
37334
37694
|
const triggerPayment = () => {
|
|
37335
|
-
makePayment(
|
|
37695
|
+
makePayment({
|
|
37696
|
+
...smartButtonParams == null ? void 0 : smartButtonParams.orderInfo,
|
|
37336
37697
|
success: (res) => {
|
|
37337
37698
|
var _a2;
|
|
37338
|
-
(_a2 = smartButtonParams == null ? void 0 : smartButtonParams.success) == null ? void 0 : _a2.call(smartButtonParams,
|
|
37699
|
+
(_a2 = smartButtonParams == null ? void 0 : smartButtonParams.success) == null ? void 0 : _a2.call(smartButtonParams, { ...res });
|
|
37339
37700
|
},
|
|
37340
37701
|
fail: (err) => {
|
|
37341
37702
|
var _a2;
|
|
37342
|
-
(_a2 = smartButtonParams == null ? void 0 : smartButtonParams.fail) == null ? void 0 : _a2.call(smartButtonParams,
|
|
37703
|
+
(_a2 = smartButtonParams == null ? void 0 : smartButtonParams.fail) == null ? void 0 : _a2.call(smartButtonParams, { ...err });
|
|
37343
37704
|
},
|
|
37344
37705
|
complete: () => {
|
|
37345
37706
|
var _a2;
|
|
37346
37707
|
(_a2 = smartButtonParams == null ? void 0 : smartButtonParams.complete) == null ? void 0 : _a2.call(smartButtonParams);
|
|
37347
37708
|
}
|
|
37348
|
-
})
|
|
37709
|
+
}).catch(() => {
|
|
37349
37710
|
});
|
|
37350
37711
|
};
|
|
37351
37712
|
const app = createApp({
|
|
@@ -37386,9 +37747,10 @@ async function getRenderPayInfo(params) {
|
|
|
37386
37747
|
let preferredLanguage = (params == null ? void 0 : params.locale) || getPayPayLanguage();
|
|
37387
37748
|
const { smartPay: smartPay2 } = preferredLanguage === "en" ? en$1 : ja$2;
|
|
37388
37749
|
const loggedIn = await getIsLoggedIn();
|
|
37389
|
-
const renderParams = loggedIn ?
|
|
37750
|
+
const renderParams = loggedIn ? {
|
|
37751
|
+
...params,
|
|
37390
37752
|
url: void 0
|
|
37391
|
-
}
|
|
37753
|
+
} : params;
|
|
37392
37754
|
if ((params == null ? void 0 : params.orderInfo) && loggedIn) {
|
|
37393
37755
|
const { orderInfo } = params;
|
|
37394
37756
|
const res = await getExpectedCashbackInfo(orderInfo);
|
|
@@ -37439,7 +37801,9 @@ function createCashbackInfo(cashbackResponse) {
|
|
|
37439
37801
|
if ((_a2 = cashbackResponse.unsigned) == null ? void 0 : _a2.data) {
|
|
37440
37802
|
const { normalCashbackPercentage, lotteryCashbackPercentage } = (_b = cashbackResponse.unsigned) == null ? void 0 : _b.data;
|
|
37441
37803
|
if (normalCashbackPercentage || lotteryCashbackPercentage) {
|
|
37442
|
-
let tempCashback = Number(
|
|
37804
|
+
let tempCashback = Number(
|
|
37805
|
+
(parseFloat(normalCashbackPercentage != null ? normalCashbackPercentage : "0") + parseFloat(lotteryCashbackPercentage != null ? lotteryCashbackPercentage : "0")).toFixed(1)
|
|
37806
|
+
);
|
|
37443
37807
|
return tempCashback ? tempCashback.toString() : "";
|
|
37444
37808
|
}
|
|
37445
37809
|
}
|
|
@@ -37464,9 +37828,14 @@ function getRenderPayButtonInfo(params, lg2, cashbackInfo2) {
|
|
|
37464
37828
|
title: (params == null ? void 0 : params.isShortText) ? lg2.paypay : lg2.pay
|
|
37465
37829
|
};
|
|
37466
37830
|
if (cashbackInfo2) {
|
|
37467
|
-
data2 =
|
|
37468
|
-
|
|
37469
|
-
|
|
37831
|
+
data2 = {
|
|
37832
|
+
...data2,
|
|
37833
|
+
cashbackInfo: updateLocalisedString(
|
|
37834
|
+
lg2.cashback,
|
|
37835
|
+
"{cashback}",
|
|
37836
|
+
cashbackInfo2
|
|
37837
|
+
)
|
|
37838
|
+
};
|
|
37470
37839
|
}
|
|
37471
37840
|
return data2;
|
|
37472
37841
|
}
|
|
@@ -37481,13 +37850,22 @@ function render(params) {
|
|
|
37481
37850
|
if ((params == null ? void 0 : params.type) === "login") {
|
|
37482
37851
|
const loginButtonInfo = getRenderLoginInfo(params);
|
|
37483
37852
|
callbackHandler(params, () => {
|
|
37484
|
-
initSmartButton(
|
|
37853
|
+
initSmartButton(
|
|
37854
|
+
params,
|
|
37855
|
+
loginButtonInfo.data,
|
|
37856
|
+
loginButtonInfo.preferredLanguage
|
|
37857
|
+
);
|
|
37485
37858
|
});
|
|
37486
37859
|
} else if ((params == null ? void 0 : params.type) === "pay") {
|
|
37487
37860
|
getRenderPayInfo(params).then((payButtonInfo) => {
|
|
37488
37861
|
callbackHandler(params, () => {
|
|
37489
37862
|
if (payButtonInfo) {
|
|
37490
|
-
initSmartButton(
|
|
37863
|
+
initSmartButton(
|
|
37864
|
+
payButtonInfo.renderParams,
|
|
37865
|
+
payButtonInfo.data,
|
|
37866
|
+
payButtonInfo.preferredLanguage,
|
|
37867
|
+
payButtonInfo.loggedIn
|
|
37868
|
+
);
|
|
37491
37869
|
}
|
|
37492
37870
|
});
|
|
37493
37871
|
}).catch(() => {
|
|
@@ -37781,7 +38159,10 @@ const useRegisterUserInfoStore = defineStore("registerUserInfo", {
|
|
|
37781
38159
|
};
|
|
37782
38160
|
return;
|
|
37783
38161
|
}
|
|
37784
|
-
const formData = transformFormData(
|
|
38162
|
+
const formData = transformFormData(
|
|
38163
|
+
resp.body.unsigned.data,
|
|
38164
|
+
params.fieldInForm
|
|
38165
|
+
);
|
|
37785
38166
|
if (formData.categories.length === 0) {
|
|
37786
38167
|
this.result = {
|
|
37787
38168
|
type: "success"
|
|
@@ -37833,7 +38214,10 @@ const useRegisterUserInfoStore = defineStore("registerUserInfo", {
|
|
|
37833
38214
|
throw new Error();
|
|
37834
38215
|
}
|
|
37835
38216
|
}
|
|
37836
|
-
this.savedValues =
|
|
38217
|
+
this.savedValues = {
|
|
38218
|
+
...this.savedValues,
|
|
38219
|
+
...this.inputValues
|
|
38220
|
+
};
|
|
37837
38221
|
if (this.currentCategoryIndex < this.formData.categories.length - 1) {
|
|
37838
38222
|
this.currentCategoryIndex++;
|
|
37839
38223
|
this.inputValues = {};
|
|
@@ -37930,23 +38314,30 @@ function transformFormData(formData, fieldInForm) {
|
|
|
37930
38314
|
}
|
|
37931
38315
|
return false;
|
|
37932
38316
|
});
|
|
37933
|
-
return
|
|
38317
|
+
return {
|
|
38318
|
+
...formData,
|
|
37934
38319
|
categories: categories2
|
|
37935
|
-
}
|
|
38320
|
+
};
|
|
37936
38321
|
}
|
|
37937
|
-
let categories = formData.categories.filter(
|
|
38322
|
+
let categories = formData.categories.filter(
|
|
38323
|
+
(cat) => !cat.isAllDataPointFilled
|
|
38324
|
+
);
|
|
37938
38325
|
categories = categories.map((cat) => {
|
|
37939
38326
|
const groups = cat.dataPointGroup.filter((group) => {
|
|
37940
|
-
const isAllFilled = group.dataPoints.every(
|
|
38327
|
+
const isAllFilled = group.dataPoints.every(
|
|
38328
|
+
(dp) => !dp.isKycData && dp.isEditable && dp.value
|
|
38329
|
+
);
|
|
37941
38330
|
return !isAllFilled;
|
|
37942
38331
|
});
|
|
37943
|
-
return
|
|
38332
|
+
return {
|
|
38333
|
+
...cat,
|
|
37944
38334
|
dataPointGroup: groups
|
|
37945
|
-
}
|
|
38335
|
+
};
|
|
37946
38336
|
}).filter((cat) => cat.dataPointGroup.some(isEditableDataPointGroup));
|
|
37947
|
-
return
|
|
38337
|
+
return {
|
|
38338
|
+
...formData,
|
|
37948
38339
|
categories
|
|
37949
|
-
}
|
|
38340
|
+
};
|
|
37950
38341
|
}
|
|
37951
38342
|
const _sfc_main$x = defineComponent({
|
|
37952
38343
|
name: "RegisterUserInfoCancelConfirmationSheet",
|
|
@@ -38065,16 +38456,21 @@ const _sfc_main$v = defineComponent({
|
|
|
38065
38456
|
}
|
|
38066
38457
|
});
|
|
38067
38458
|
const state = reactive({
|
|
38068
|
-
value: store.currentValue(
|
|
38459
|
+
value: store.currentValue({
|
|
38460
|
+
...props.dataPoint
|
|
38461
|
+
})
|
|
38069
38462
|
});
|
|
38070
38463
|
const hasError = computed(() => store.hasValidationError(props.dataPoint));
|
|
38071
|
-
watch(
|
|
38072
|
-
|
|
38073
|
-
|
|
38074
|
-
|
|
38075
|
-
|
|
38464
|
+
watch(
|
|
38465
|
+
() => state.value,
|
|
38466
|
+
(value2) => {
|
|
38467
|
+
store.onInputValueChange(props.dataPoint, value2);
|
|
38468
|
+
const result2 = validate(props.dataPoint, value2);
|
|
38469
|
+
if (result2.ok && result2.convertTo) {
|
|
38470
|
+
state.value = result2.convertTo;
|
|
38471
|
+
}
|
|
38076
38472
|
}
|
|
38077
|
-
|
|
38473
|
+
);
|
|
38078
38474
|
const hasFocus = ref(false);
|
|
38079
38475
|
const onFocus = () => {
|
|
38080
38476
|
hasFocus.value = true;
|
|
@@ -38082,7 +38478,9 @@ const _sfc_main$v = defineComponent({
|
|
|
38082
38478
|
const onBlur = () => {
|
|
38083
38479
|
hasFocus.value = false;
|
|
38084
38480
|
};
|
|
38085
|
-
const showsClearButton = computed(
|
|
38481
|
+
const showsClearButton = computed(
|
|
38482
|
+
() => state.value.length > 0 && hasFocus.value
|
|
38483
|
+
);
|
|
38086
38484
|
const onClear = (e) => {
|
|
38087
38485
|
e.preventDefault();
|
|
38088
38486
|
state.value = "";
|
|
@@ -38160,10 +38558,12 @@ const _sfc_main$u = defineComponent({
|
|
|
38160
38558
|
var _a2;
|
|
38161
38559
|
return (_a2 = props.dataPoint.selectionItems) != null ? _a2 : [];
|
|
38162
38560
|
});
|
|
38163
|
-
const selectedValue = computed(
|
|
38164
|
-
|
|
38165
|
-
|
|
38166
|
-
|
|
38561
|
+
const selectedValue = computed(
|
|
38562
|
+
() => {
|
|
38563
|
+
var _a2;
|
|
38564
|
+
return (_a2 = store.inputValues[props.dataPoint.name]) != null ? _a2 : store.currentValue(props.dataPoint);
|
|
38565
|
+
}
|
|
38566
|
+
);
|
|
38167
38567
|
const onClick = (value2) => {
|
|
38168
38568
|
store.onInputValueChange(props.dataPoint, value2);
|
|
38169
38569
|
};
|
|
@@ -38230,8 +38630,12 @@ const _sfc_main$t = defineComponent({
|
|
|
38230
38630
|
store.getEmailStatus();
|
|
38231
38631
|
});
|
|
38232
38632
|
const currentEmail = computed(() => store.email || props.dataPoint.value);
|
|
38233
|
-
const currentEmailLabel = computed(
|
|
38234
|
-
|
|
38633
|
+
const currentEmailLabel = computed(
|
|
38634
|
+
() => store.emailStatus ? currentEmail.value || lg2.registerUserInfo.emailInput : ""
|
|
38635
|
+
);
|
|
38636
|
+
const notVerified2 = computed(
|
|
38637
|
+
() => currentEmail.value && store.emailStatus === "NOT_VERIFIED"
|
|
38638
|
+
);
|
|
38235
38639
|
const isVerified = computed(() => store.emailStatus === "VERIFIED");
|
|
38236
38640
|
let registerEmailIsActive = false;
|
|
38237
38641
|
const startEmailRegistration = () => {
|
|
@@ -38242,17 +38646,20 @@ const _sfc_main$t = defineComponent({
|
|
|
38242
38646
|
store.showMailInfoSheet();
|
|
38243
38647
|
} else if (!registerEmailIsActive) {
|
|
38244
38648
|
registerEmailIsActive = true;
|
|
38245
|
-
registerEmail(
|
|
38246
|
-
|
|
38247
|
-
|
|
38248
|
-
|
|
38249
|
-
|
|
38250
|
-
|
|
38649
|
+
registerEmail(
|
|
38650
|
+
{
|
|
38651
|
+
success: () => {
|
|
38652
|
+
store.getEmailStatus();
|
|
38653
|
+
},
|
|
38654
|
+
fail: () => {
|
|
38655
|
+
store.getEmailStatus();
|
|
38656
|
+
},
|
|
38657
|
+
complete: () => {
|
|
38658
|
+
registerEmailIsActive = false;
|
|
38659
|
+
}
|
|
38251
38660
|
},
|
|
38252
|
-
|
|
38253
|
-
|
|
38254
|
-
}
|
|
38255
|
-
}, true);
|
|
38661
|
+
true
|
|
38662
|
+
);
|
|
38256
38663
|
}
|
|
38257
38664
|
};
|
|
38258
38665
|
return {
|
|
@@ -38422,7 +38829,9 @@ const _sfc_main$r = defineComponent({
|
|
|
38422
38829
|
const val2 = (_a2 = dataPoint.value) != null ? _a2 : "";
|
|
38423
38830
|
switch (dataPoint.type) {
|
|
38424
38831
|
case "MOBILE_NUMBER":
|
|
38425
|
-
return val2 ? `${val2.substring(0, 3)}-${val2.substring(3, 7)}-${val2.substring(
|
|
38832
|
+
return val2 ? `${val2.substring(0, 3)}-${val2.substring(3, 7)}-${val2.substring(
|
|
38833
|
+
7
|
|
38834
|
+
)}` : "";
|
|
38426
38835
|
case "DATE": {
|
|
38427
38836
|
const ymd = val2.split("-").map((s) => Number.parseInt(s, 10));
|
|
38428
38837
|
if (ymd.length === 3) {
|
|
@@ -38590,9 +38999,15 @@ const _sfc_main$p = defineComponent({
|
|
|
38590
38999
|
},
|
|
38591
39000
|
setup(props) {
|
|
38592
39001
|
const store = useRegisterUserInfoStore();
|
|
38593
|
-
const kycDataPointGroups = computed(
|
|
38594
|
-
|
|
38595
|
-
|
|
39002
|
+
const kycDataPointGroups = computed(
|
|
39003
|
+
() => props.category.dataPointGroup.filter(isKycDataPointGroup)
|
|
39004
|
+
);
|
|
39005
|
+
const uneditableDataPointGroups = computed(
|
|
39006
|
+
() => props.category.dataPointGroup.filter(isUneditableDataPointGroup)
|
|
39007
|
+
);
|
|
39008
|
+
const editableDataPointGroups = computed(
|
|
39009
|
+
() => props.category.dataPointGroup.filter(isEditableDataPointGroup)
|
|
39010
|
+
);
|
|
38596
39011
|
const isDefaultMode = computed(() => store.mode === "default");
|
|
38597
39012
|
return {
|
|
38598
39013
|
lg: getLanguage(),
|
|
@@ -38689,7 +39104,9 @@ const _sfc_main$o = defineComponent({
|
|
|
38689
39104
|
const lg2 = getLanguage();
|
|
38690
39105
|
const store = useRegisterUserInfoStore();
|
|
38691
39106
|
const showsBackButton = computed(() => store.currentCategoryIndex > 0);
|
|
38692
|
-
const saveButtonTitle = computed(
|
|
39107
|
+
const saveButtonTitle = computed(
|
|
39108
|
+
() => store.numberOfCategories === 1 ? lg2.registerUserInfo.footer.finishButton : lg2.registerUserInfo.footer.nextButton
|
|
39109
|
+
);
|
|
38693
39110
|
return {
|
|
38694
39111
|
lg: lg2,
|
|
38695
39112
|
store,
|
|
@@ -38753,7 +39170,9 @@ const _sfc_main$n = defineComponent({
|
|
|
38753
39170
|
components: { RegisterUserInfoCategoryView, RegisterUserInfoFooterView },
|
|
38754
39171
|
setup() {
|
|
38755
39172
|
const store = useRegisterUserInfoStore();
|
|
38756
|
-
const category2 = computed(
|
|
39173
|
+
const category2 = computed(
|
|
39174
|
+
() => store.categoryAtIndex(store.currentCategoryIndex)
|
|
39175
|
+
);
|
|
38757
39176
|
const h2 = useGetHeightProperties();
|
|
38758
39177
|
const categoryStyle = {
|
|
38759
39178
|
paddingTop: `${h2.headerHeight}px`
|
|
@@ -38934,21 +39353,24 @@ const _sfc_main$k = defineComponent({
|
|
|
38934
39353
|
emit("complete");
|
|
38935
39354
|
(_b = (_a2 = props.params).complete) == null ? void 0 : _b.call(_a2);
|
|
38936
39355
|
};
|
|
38937
|
-
watch(
|
|
38938
|
-
|
|
38939
|
-
|
|
38940
|
-
|
|
38941
|
-
|
|
38942
|
-
|
|
38943
|
-
|
|
38944
|
-
|
|
38945
|
-
|
|
38946
|
-
|
|
38947
|
-
|
|
38948
|
-
|
|
38949
|
-
|
|
39356
|
+
watch(
|
|
39357
|
+
() => store.result,
|
|
39358
|
+
(result2) => {
|
|
39359
|
+
var _a2, _b, _c, _d;
|
|
39360
|
+
if (!result2) {
|
|
39361
|
+
return;
|
|
39362
|
+
}
|
|
39363
|
+
if (result2.type === "success") {
|
|
39364
|
+
(_b = (_a2 = props.params).success) == null ? void 0 : _b.call(_a2);
|
|
39365
|
+
}
|
|
39366
|
+
if (result2.type === "fail") {
|
|
39367
|
+
(_d = (_c = props.params).fail) == null ? void 0 : _d.call(_c, { errorCode: result2.errorCode });
|
|
39368
|
+
}
|
|
39369
|
+
if (!store.formData) {
|
|
39370
|
+
complete();
|
|
39371
|
+
}
|
|
38950
39372
|
}
|
|
38951
|
-
|
|
39373
|
+
);
|
|
38952
39374
|
return {
|
|
38953
39375
|
store,
|
|
38954
39376
|
complete
|
|
@@ -39352,11 +39774,11 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39352
39774
|
const cssModules$d = {};
|
|
39353
39775
|
cssModules$d["$style"] = style0$d;
|
|
39354
39776
|
var GetBankInfoPopup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__cssModules", cssModules$d]]);
|
|
39355
|
-
var OPAErrorCodes
|
|
39356
|
-
(function(OPAErrorCodes2) {
|
|
39777
|
+
var OPAErrorCodes = /* @__PURE__ */ ((OPAErrorCodes2) => {
|
|
39357
39778
|
OPAErrorCodes2["noKycUser"] = "NO_KYC_USER";
|
|
39358
39779
|
OPAErrorCodes2["noPayoutMethod"] = "PAYMENT_NOT_FOUND";
|
|
39359
|
-
|
|
39780
|
+
return OPAErrorCodes2;
|
|
39781
|
+
})(OPAErrorCodes || {});
|
|
39360
39782
|
const _sfc_main$f = defineComponent({
|
|
39361
39783
|
name: "GetBankInfoWrapper",
|
|
39362
39784
|
components: {
|
|
@@ -39389,7 +39811,9 @@ const _sfc_main$f = defineComponent({
|
|
|
39389
39811
|
onBeforeMount(async () => {
|
|
39390
39812
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
39391
39813
|
try {
|
|
39392
|
-
const grantStatus = await checkPermission(
|
|
39814
|
+
const grantStatus = await checkPermission(
|
|
39815
|
+
PermissionName.mini_app_bank_information
|
|
39816
|
+
);
|
|
39393
39817
|
if (grantStatus !== PermissionStatus.granted) {
|
|
39394
39818
|
handleClose(MiniAppErrorType.insufficientScope);
|
|
39395
39819
|
return;
|
|
@@ -39445,9 +39869,12 @@ const _sfc_main$f = defineComponent({
|
|
|
39445
39869
|
emit("complete");
|
|
39446
39870
|
return;
|
|
39447
39871
|
}
|
|
39448
|
-
watch(
|
|
39449
|
-
|
|
39450
|
-
|
|
39872
|
+
watch(
|
|
39873
|
+
() => state.animationComplete,
|
|
39874
|
+
(val2) => {
|
|
39875
|
+
val2 && emit("complete");
|
|
39876
|
+
}
|
|
39877
|
+
);
|
|
39451
39878
|
}
|
|
39452
39879
|
};
|
|
39453
39880
|
return {
|
|
@@ -39499,7 +39926,7 @@ function execute$1(params) {
|
|
|
39499
39926
|
(_a3 = params == null ? void 0 : params.complete) == null ? void 0 : _a3.call(params);
|
|
39500
39927
|
}, 300);
|
|
39501
39928
|
};
|
|
39502
|
-
const app = createApp(
|
|
39929
|
+
const app = createApp({
|
|
39503
39930
|
setup() {
|
|
39504
39931
|
return () => h(GetBankInfoWrapper, {
|
|
39505
39932
|
show: show2.value,
|
|
@@ -39508,8 +39935,9 @@ function execute$1(params) {
|
|
|
39508
39935
|
closeSheet();
|
|
39509
39936
|
}
|
|
39510
39937
|
});
|
|
39511
|
-
}
|
|
39512
|
-
|
|
39938
|
+
},
|
|
39939
|
+
...popStateHandler(closeSheet, params)
|
|
39940
|
+
});
|
|
39513
39941
|
app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
|
|
39514
39942
|
app.mount(container2);
|
|
39515
39943
|
document.body.appendChild(container2);
|
|
@@ -39570,378 +39998,391 @@ function getAvailableMethod(element) {
|
|
|
39570
39998
|
return element;
|
|
39571
39999
|
}
|
|
39572
40000
|
}
|
|
39573
|
-
const useRegisterPaymentFeaturesStore = defineStore(
|
|
39574
|
-
|
|
39575
|
-
|
|
39576
|
-
|
|
39577
|
-
|
|
39578
|
-
|
|
39579
|
-
|
|
39580
|
-
|
|
39581
|
-
|
|
39582
|
-
|
|
39583
|
-
|
|
39584
|
-
|
|
39585
|
-
|
|
39586
|
-
|
|
39587
|
-
|
|
39588
|
-
|
|
39589
|
-
|
|
39590
|
-
|
|
39591
|
-
|
|
39592
|
-
|
|
39593
|
-
|
|
39594
|
-
|
|
39595
|
-
|
|
39596
|
-
|
|
39597
|
-
|
|
39598
|
-
|
|
39599
|
-
|
|
39600
|
-
|
|
39601
|
-
|
|
40001
|
+
const useRegisterPaymentFeaturesStore = defineStore(
|
|
40002
|
+
"registerPaymentFeatures",
|
|
40003
|
+
{
|
|
40004
|
+
state: () => {
|
|
40005
|
+
return {
|
|
40006
|
+
mode: AutoTopupModeType.UNREGISTERED,
|
|
40007
|
+
minimumTopupAmount: 0,
|
|
40008
|
+
selectedPaymentMethodInfo: void 0,
|
|
40009
|
+
paymentMethodList: void 0,
|
|
40010
|
+
result: void 0,
|
|
40011
|
+
uiIsVisible: false,
|
|
40012
|
+
needUpdate: false,
|
|
40013
|
+
autoChargeTopupHalfSheetAmount: void 0,
|
|
40014
|
+
autoChargeRecommendedTopupAmount: void 0,
|
|
40015
|
+
isFinishSetting: false,
|
|
40016
|
+
renderRoot: false,
|
|
40017
|
+
isLimitAmountErrorOccur: false,
|
|
40018
|
+
ui: {
|
|
40019
|
+
isChooseAmount: false,
|
|
40020
|
+
isChooseTopupMethod: false,
|
|
40021
|
+
isSettingComplete: false,
|
|
40022
|
+
isTopupMethodSetting: false,
|
|
40023
|
+
isTopupAmountSetting: false,
|
|
40024
|
+
isAutoTopupConfirm: false,
|
|
40025
|
+
isAmountError: false,
|
|
40026
|
+
isThreeDSecure: false,
|
|
40027
|
+
amountErrorInfo: {
|
|
40028
|
+
title: "",
|
|
40029
|
+
description: "",
|
|
40030
|
+
buttonList: [],
|
|
40031
|
+
canCloseByOutsideTap: false
|
|
40032
|
+
},
|
|
40033
|
+
threeDSecureCCType: ""
|
|
39602
40034
|
},
|
|
39603
|
-
|
|
40035
|
+
errorSheet: {
|
|
40036
|
+
isVisible: false
|
|
40037
|
+
},
|
|
40038
|
+
isEmoneyOnly: false,
|
|
40039
|
+
showEmoneyOnlyNotice: false,
|
|
40040
|
+
ptacPaymentMethodId: void 0
|
|
40041
|
+
};
|
|
40042
|
+
},
|
|
40043
|
+
getters: {
|
|
40044
|
+
defaultPaymentMethod() {
|
|
40045
|
+
var _a2;
|
|
40046
|
+
if (!this.existActivatedMethod) {
|
|
40047
|
+
return;
|
|
40048
|
+
}
|
|
40049
|
+
const avaliableMethod = (_a2 = this.paymentMethodList) == null ? void 0 : _a2.find(
|
|
40050
|
+
(paymentMethod2) => {
|
|
40051
|
+
return getAvailableMethod(paymentMethod2);
|
|
40052
|
+
}
|
|
40053
|
+
);
|
|
40054
|
+
return avaliableMethod;
|
|
39604
40055
|
},
|
|
39605
|
-
|
|
39606
|
-
|
|
40056
|
+
availablePaymentMethodList() {
|
|
40057
|
+
return this.paymentMethodList;
|
|
39607
40058
|
},
|
|
39608
|
-
|
|
39609
|
-
|
|
39610
|
-
|
|
39611
|
-
|
|
39612
|
-
|
|
39613
|
-
|
|
39614
|
-
|
|
39615
|
-
|
|
39616
|
-
|
|
39617
|
-
|
|
39618
|
-
|
|
39619
|
-
|
|
39620
|
-
|
|
39621
|
-
}
|
|
39622
|
-
|
|
39623
|
-
|
|
39624
|
-
|
|
39625
|
-
|
|
39626
|
-
|
|
39627
|
-
|
|
39628
|
-
|
|
39629
|
-
|
|
39630
|
-
|
|
39631
|
-
|
|
39632
|
-
|
|
39633
|
-
return
|
|
39634
|
-
}
|
|
39635
|
-
|
|
39636
|
-
return
|
|
39637
|
-
}
|
|
40059
|
+
selectedAvailableTopupMethod() {
|
|
40060
|
+
return getAvailableMethod(this.selectedPaymentMethodInfo);
|
|
40061
|
+
},
|
|
40062
|
+
existActivatedMethod() {
|
|
40063
|
+
var _a2;
|
|
40064
|
+
const activatedMethod = (_a2 = this.paymentMethodList) == null ? void 0 : _a2.filter((element) => {
|
|
40065
|
+
return getAvailableMethod(element);
|
|
40066
|
+
});
|
|
40067
|
+
if (activatedMethod) {
|
|
40068
|
+
return activatedMethod.length > 0;
|
|
40069
|
+
} else {
|
|
40070
|
+
return false;
|
|
40071
|
+
}
|
|
40072
|
+
},
|
|
40073
|
+
selectedPaymentMethodIndex() {
|
|
40074
|
+
var _a2;
|
|
40075
|
+
const index2 = (_a2 = this.availablePaymentMethodList) == null ? void 0 : _a2.findIndex(
|
|
40076
|
+
(element) => {
|
|
40077
|
+
var _a3;
|
|
40078
|
+
return element.paymentMethodId === ((_a3 = this.selectedPaymentMethodInfo) == null ? void 0 : _a3.paymentMethodId);
|
|
40079
|
+
}
|
|
40080
|
+
);
|
|
40081
|
+
if (index2) {
|
|
40082
|
+
return index2;
|
|
40083
|
+
}
|
|
40084
|
+
return 0;
|
|
40085
|
+
},
|
|
40086
|
+
displayActivateButton() {
|
|
40087
|
+
return !!this.selectedAvailableTopupMethod;
|
|
40088
|
+
},
|
|
40089
|
+
requireConfirm() {
|
|
40090
|
+
return this.mode === AutoTopupModeType.POST_AUTO_TOPUP && !this.isLimitAmountErrorOccur;
|
|
40091
|
+
},
|
|
40092
|
+
isEmptyPaymentMethodList() {
|
|
40093
|
+
if (!this.paymentMethodList || this.paymentMethodList.length === 0) {
|
|
40094
|
+
return true;
|
|
40095
|
+
}
|
|
39638
40096
|
return false;
|
|
39639
40097
|
}
|
|
39640
40098
|
},
|
|
39641
|
-
|
|
39642
|
-
|
|
39643
|
-
|
|
39644
|
-
|
|
39645
|
-
|
|
39646
|
-
|
|
39647
|
-
|
|
39648
|
-
|
|
39649
|
-
|
|
39650
|
-
|
|
39651
|
-
|
|
39652
|
-
|
|
39653
|
-
|
|
39654
|
-
|
|
39655
|
-
|
|
39656
|
-
|
|
39657
|
-
|
|
39658
|
-
|
|
39659
|
-
|
|
39660
|
-
|
|
39661
|
-
|
|
39662
|
-
|
|
39663
|
-
|
|
39664
|
-
|
|
39665
|
-
|
|
39666
|
-
|
|
39667
|
-
|
|
39668
|
-
|
|
39669
|
-
|
|
39670
|
-
|
|
39671
|
-
|
|
39672
|
-
|
|
39673
|
-
this.
|
|
39674
|
-
|
|
39675
|
-
|
|
39676
|
-
|
|
39677
|
-
|
|
39678
|
-
|
|
39679
|
-
|
|
40099
|
+
actions: {
|
|
40100
|
+
setAmount(payload) {
|
|
40101
|
+
this.minimumTopupAmount = payload.amount;
|
|
40102
|
+
},
|
|
40103
|
+
selectPaymentMethod(payload) {
|
|
40104
|
+
var _a2;
|
|
40105
|
+
this.selectedPaymentMethodInfo = this.availablePaymentMethodList ? this.availablePaymentMethodList[payload.paymentIndex] : void 0;
|
|
40106
|
+
if (((_a2 = this.selectedPaymentMethodInfo) == null ? void 0 : _a2.paymentMethodId) !== this.ptacPaymentMethodId && this.isEmoneyOnly) {
|
|
40107
|
+
this.showEmoneyOnlyNotice = false;
|
|
40108
|
+
}
|
|
40109
|
+
},
|
|
40110
|
+
async initialize(isEmoneyOnly, needUpdate, merchant2, productType) {
|
|
40111
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
40112
|
+
if (needUpdate) {
|
|
40113
|
+
this.needUpdate = true;
|
|
40114
|
+
this.renderRoot = true;
|
|
40115
|
+
this.openSetting();
|
|
40116
|
+
return;
|
|
40117
|
+
}
|
|
40118
|
+
this.isEmoneyOnly = isEmoneyOnly;
|
|
40119
|
+
const topupConfigParams = {
|
|
40120
|
+
includePaymentMethodList: true,
|
|
40121
|
+
merchant: merchant2,
|
|
40122
|
+
productType
|
|
40123
|
+
};
|
|
40124
|
+
const response = await getTopupConfiguration(topupConfigParams);
|
|
40125
|
+
if (response.ppFetchResult !== "success") {
|
|
40126
|
+
this.handleErrorResponse(response);
|
|
40127
|
+
return;
|
|
40128
|
+
}
|
|
40129
|
+
const config2 = (_b = (_a2 = response.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data;
|
|
40130
|
+
this.mode = getTopupSettingMode(config2);
|
|
40131
|
+
if (this.mode === AutoTopupModeType.PRE_AUTO_TOPUP) {
|
|
40132
|
+
this.ptacPaymentMethodId = (_c = config2.preTransactionAutoTopupConfiguration) == null ? void 0 : _c.paymentMethodId;
|
|
40133
|
+
this.paymentMethodList = (_d = config2.paymentMethodList) != null ? _d : [];
|
|
40134
|
+
this.minimumTopupAmount = (_e = config2.preTransactionAutoTopupConfiguration) == null ? void 0 : _e.minimumTopupAmount;
|
|
40135
|
+
if (((_f = this.paymentMethodList) == null ? void 0 : _f.length) > 0 && this.existActivatedMethod) {
|
|
40136
|
+
this.selectedPaymentMethodInfo = config2.preTransactionAutoTopupPaymentMethod;
|
|
40137
|
+
const isMethodAvailableInList = (_g = this.paymentMethodList) == null ? void 0 : _g.find(
|
|
40138
|
+
(element) => element.paymentMethodId === this.ptacPaymentMethodId
|
|
40139
|
+
);
|
|
40140
|
+
if (!isMethodAvailableInList && this.isEmoneyOnly) {
|
|
40141
|
+
this.showEmoneyOnlyNotice = true;
|
|
40142
|
+
}
|
|
40143
|
+
}
|
|
40144
|
+
}
|
|
40145
|
+
const appConfig = await this.initAppConfig();
|
|
40146
|
+
if (!appConfig) {
|
|
40147
|
+
return;
|
|
40148
|
+
}
|
|
40149
|
+
if (this.mode === AutoTopupModeType.POST_AUTO_TOPUP) {
|
|
40150
|
+
this.paymentMethodList = config2.paymentMethodList;
|
|
40151
|
+
this.minimumTopupAmount = (_h = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _h[0].value;
|
|
40152
|
+
this.selectedPaymentMethodInfo = (_i = this.paymentMethodList) == null ? void 0 : _i.find(
|
|
40153
|
+
(element) => {
|
|
40154
|
+
var _a3;
|
|
40155
|
+
return element.paymentMethodId === ((_a3 = config2.postTransactionAutoTopupConfiguration) == null ? void 0 : _a3.paymentMethodId);
|
|
40156
|
+
}
|
|
40157
|
+
);
|
|
40158
|
+
}
|
|
40159
|
+
if (this.mode === AutoTopupModeType.UNREGISTERED) {
|
|
40160
|
+
this.paymentMethodList = config2.paymentMethodList;
|
|
40161
|
+
this.selectedPaymentMethodInfo = this.defaultPaymentMethod;
|
|
40162
|
+
this.minimumTopupAmount = (_j = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _j[0].value;
|
|
40163
|
+
}
|
|
39680
40164
|
this.renderRoot = true;
|
|
39681
40165
|
this.openSetting();
|
|
39682
|
-
|
|
39683
|
-
|
|
39684
|
-
|
|
39685
|
-
|
|
39686
|
-
|
|
39687
|
-
|
|
39688
|
-
|
|
39689
|
-
|
|
39690
|
-
|
|
39691
|
-
|
|
39692
|
-
|
|
39693
|
-
|
|
39694
|
-
|
|
39695
|
-
|
|
39696
|
-
|
|
39697
|
-
|
|
39698
|
-
|
|
39699
|
-
|
|
39700
|
-
|
|
39701
|
-
|
|
39702
|
-
|
|
39703
|
-
const isMethodAvailableInList = (_g = this.paymentMethodList) == null ? void 0 : _g.find((element) => element.paymentMethodId === this.ptacPaymentMethodId);
|
|
39704
|
-
if (!isMethodAvailableInList && this.isEmoneyOnly) {
|
|
39705
|
-
this.showEmoneyOnlyNotice = true;
|
|
40166
|
+
},
|
|
40167
|
+
async showAddBankUI() {
|
|
40168
|
+
var _a2;
|
|
40169
|
+
const appConfig = await this.initAppConfig();
|
|
40170
|
+
if (!appConfig) {
|
|
40171
|
+
return;
|
|
40172
|
+
}
|
|
40173
|
+
this.minimumTopupAmount = (_a2 = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _a2[0].value;
|
|
40174
|
+
this.renderRoot = true;
|
|
40175
|
+
this.openSetting();
|
|
40176
|
+
},
|
|
40177
|
+
async initAppConfig() {
|
|
40178
|
+
let appConfig = getAppConfig();
|
|
40179
|
+
if (!appConfig || !("autoChargeTopupHalfSheetAmount" in appConfig) || !("autoChargeRecommendedTopupAmount" in appConfig)) {
|
|
40180
|
+
const isInit = await initAppConfiguration();
|
|
40181
|
+
if (!isInit) {
|
|
40182
|
+
this.result = {
|
|
40183
|
+
type: "fail",
|
|
40184
|
+
errorCode: MiniAppErrorType.serverError
|
|
40185
|
+
};
|
|
40186
|
+
return false;
|
|
39706
40187
|
}
|
|
40188
|
+
appConfig = getAppConfig();
|
|
39707
40189
|
}
|
|
39708
|
-
|
|
39709
|
-
|
|
39710
|
-
|
|
39711
|
-
|
|
39712
|
-
|
|
39713
|
-
|
|
39714
|
-
|
|
39715
|
-
|
|
39716
|
-
|
|
39717
|
-
|
|
39718
|
-
|
|
39719
|
-
|
|
39720
|
-
|
|
39721
|
-
|
|
39722
|
-
|
|
39723
|
-
|
|
39724
|
-
|
|
39725
|
-
|
|
39726
|
-
this.renderRoot = true;
|
|
39727
|
-
this.openSetting();
|
|
39728
|
-
},
|
|
39729
|
-
async showAddBankUI() {
|
|
39730
|
-
var _a2;
|
|
39731
|
-
const appConfig = await this.initAppConfig();
|
|
39732
|
-
if (!appConfig) {
|
|
39733
|
-
return;
|
|
39734
|
-
}
|
|
39735
|
-
this.minimumTopupAmount = (_a2 = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _a2[0].value;
|
|
39736
|
-
this.renderRoot = true;
|
|
39737
|
-
this.openSetting();
|
|
39738
|
-
},
|
|
39739
|
-
async initAppConfig() {
|
|
39740
|
-
let appConfig = getAppConfig();
|
|
39741
|
-
if (!appConfig || !("autoChargeTopupHalfSheetAmount" in appConfig) || !("autoChargeRecommendedTopupAmount" in appConfig)) {
|
|
39742
|
-
const isInit = await initAppConfiguration();
|
|
39743
|
-
if (!isInit) {
|
|
39744
|
-
this.result = {
|
|
39745
|
-
type: "fail",
|
|
39746
|
-
errorCode: MiniAppErrorType.serverError
|
|
39747
|
-
};
|
|
39748
|
-
return false;
|
|
40190
|
+
this.autoChargeTopupHalfSheetAmount = appConfig == null ? void 0 : appConfig.autoChargeTopupHalfSheetAmount;
|
|
40191
|
+
this.autoChargeRecommendedTopupAmount = appConfig == null ? void 0 : appConfig.autoChargeRecommendedTopupAmount;
|
|
40192
|
+
return true;
|
|
40193
|
+
},
|
|
40194
|
+
handleErrorResponse(response) {
|
|
40195
|
+
switch (response.ppFetchResult) {
|
|
40196
|
+
case "timeout":
|
|
40197
|
+
this.result = {
|
|
40198
|
+
type: "fail",
|
|
40199
|
+
errorCode: MiniAppErrorType.timeOut
|
|
40200
|
+
};
|
|
40201
|
+
return;
|
|
40202
|
+
default:
|
|
40203
|
+
this.result = {
|
|
40204
|
+
type: "fail",
|
|
40205
|
+
errorCode: MiniAppErrorType.serverError
|
|
40206
|
+
};
|
|
40207
|
+
return;
|
|
39749
40208
|
}
|
|
39750
|
-
|
|
39751
|
-
|
|
39752
|
-
|
|
39753
|
-
|
|
39754
|
-
return true;
|
|
39755
|
-
},
|
|
39756
|
-
handleErrorResponse(response) {
|
|
39757
|
-
switch (response.ppFetchResult) {
|
|
39758
|
-
case "timeout":
|
|
39759
|
-
this.result = {
|
|
39760
|
-
type: "fail",
|
|
39761
|
-
errorCode: MiniAppErrorType.timeOut
|
|
39762
|
-
};
|
|
40209
|
+
},
|
|
40210
|
+
async setAutoTopupConfiguration() {
|
|
40211
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
40212
|
+
if (!this.selectedPaymentMethodInfo || !this.minimumTopupAmount) {
|
|
39763
40213
|
return;
|
|
39764
|
-
|
|
40214
|
+
}
|
|
40215
|
+
const requestParams = {
|
|
40216
|
+
isEnabled: true,
|
|
40217
|
+
paymentMethodId: this.selectedPaymentMethodInfo.paymentMethodId,
|
|
40218
|
+
methodType: this.selectedPaymentMethodInfo.paymentMethodType,
|
|
40219
|
+
minimumTopupAmount: this.minimumTopupAmount
|
|
40220
|
+
};
|
|
40221
|
+
if (this.selectedPaymentMethodInfo.creditCardInfo) {
|
|
40222
|
+
const creditCardInfo = this.selectedPaymentMethodInfo.creditCardInfo;
|
|
40223
|
+
requestParams.ccType = creditCardInfo.ccType;
|
|
40224
|
+
requestParams.isAuthenticated = creditCardInfo.isAuthenticated;
|
|
40225
|
+
}
|
|
40226
|
+
const response = await updatePreTransactionAutoTopupConfiguration(
|
|
40227
|
+
requestParams
|
|
40228
|
+
).catch(() => {
|
|
39765
40229
|
this.result = {
|
|
39766
40230
|
type: "fail",
|
|
39767
|
-
errorCode: MiniAppErrorType.
|
|
40231
|
+
errorCode: MiniAppErrorType.unknown
|
|
39768
40232
|
};
|
|
39769
|
-
|
|
39770
|
-
|
|
39771
|
-
|
|
39772
|
-
|
|
39773
|
-
|
|
39774
|
-
|
|
39775
|
-
|
|
39776
|
-
|
|
39777
|
-
|
|
39778
|
-
|
|
39779
|
-
|
|
39780
|
-
|
|
39781
|
-
|
|
39782
|
-
|
|
39783
|
-
|
|
39784
|
-
|
|
39785
|
-
|
|
39786
|
-
|
|
39787
|
-
|
|
39788
|
-
|
|
39789
|
-
|
|
39790
|
-
type: "fail",
|
|
39791
|
-
errorCode: MiniAppErrorType.unknown
|
|
39792
|
-
};
|
|
39793
|
-
this.errorSheet.isVisible = true;
|
|
39794
|
-
});
|
|
39795
|
-
if (response) {
|
|
39796
|
-
switch (response.ppFetchResult) {
|
|
39797
|
-
case "success":
|
|
39798
|
-
this.result = {
|
|
39799
|
-
type: "success"
|
|
39800
|
-
};
|
|
39801
|
-
return true;
|
|
39802
|
-
case "apiError":
|
|
39803
|
-
if ((_c = (_b = (_a2 = response == null ? void 0 : response.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.error) {
|
|
39804
|
-
const error2 = (_f = (_e = (_d = response == null ? void 0 : response.body) == null ? void 0 : _d.unsigned) == null ? void 0 : _e.data) == null ? void 0 : _f.error;
|
|
39805
|
-
if (error2.backendResultCode === "02500044") {
|
|
39806
|
-
const errorResponseData = (_i = (_h = (_g = response == null ? void 0 : response.body) == null ? void 0 : _g.unsigned) == null ? void 0 : _h.data) == null ? void 0 : _i.error;
|
|
39807
|
-
this.openAmountError(errorResponseData.displayErrorResponse);
|
|
39808
|
-
this.isLimitAmountErrorOccur = true;
|
|
39809
|
-
return false;
|
|
40233
|
+
this.errorSheet.isVisible = true;
|
|
40234
|
+
});
|
|
40235
|
+
if (response) {
|
|
40236
|
+
switch (response.ppFetchResult) {
|
|
40237
|
+
case "success":
|
|
40238
|
+
this.result = {
|
|
40239
|
+
type: "success"
|
|
40240
|
+
};
|
|
40241
|
+
return true;
|
|
40242
|
+
case "apiError":
|
|
40243
|
+
if ((_c = (_b = (_a2 = response == null ? void 0 : response.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.error) {
|
|
40244
|
+
const error2 = (_f = (_e = (_d = response == null ? void 0 : response.body) == null ? void 0 : _d.unsigned) == null ? void 0 : _e.data) == null ? void 0 : _f.error;
|
|
40245
|
+
if (error2.backendResultCode === "02500044") {
|
|
40246
|
+
const errorResponseData = (_i = (_h = (_g = response == null ? void 0 : response.body) == null ? void 0 : _g.unsigned) == null ? void 0 : _h.data) == null ? void 0 : _i.error;
|
|
40247
|
+
this.openAmountError(errorResponseData.displayErrorResponse);
|
|
40248
|
+
this.isLimitAmountErrorOccur = true;
|
|
40249
|
+
return false;
|
|
40250
|
+
} else {
|
|
40251
|
+
this.errorSheet.isVisible = true;
|
|
40252
|
+
return false;
|
|
40253
|
+
}
|
|
39810
40254
|
} else {
|
|
40255
|
+
this.result = {
|
|
40256
|
+
type: "fail",
|
|
40257
|
+
errorCode: MiniAppErrorType.serverError
|
|
40258
|
+
};
|
|
39811
40259
|
this.errorSheet.isVisible = true;
|
|
39812
40260
|
return false;
|
|
39813
40261
|
}
|
|
39814
|
-
|
|
40262
|
+
case "timeout":
|
|
40263
|
+
this.result = {
|
|
40264
|
+
type: "fail",
|
|
40265
|
+
errorCode: MiniAppErrorType.timeOut
|
|
40266
|
+
};
|
|
40267
|
+
this.errorSheet.isVisible = true;
|
|
40268
|
+
return false;
|
|
40269
|
+
default:
|
|
39815
40270
|
this.result = {
|
|
39816
40271
|
type: "fail",
|
|
39817
40272
|
errorCode: MiniAppErrorType.serverError
|
|
39818
40273
|
};
|
|
39819
40274
|
this.errorSheet.isVisible = true;
|
|
39820
40275
|
return false;
|
|
39821
|
-
|
|
39822
|
-
case "timeout":
|
|
39823
|
-
this.result = {
|
|
39824
|
-
type: "fail",
|
|
39825
|
-
errorCode: MiniAppErrorType.timeOut
|
|
39826
|
-
};
|
|
39827
|
-
this.errorSheet.isVisible = true;
|
|
39828
|
-
return false;
|
|
39829
|
-
default:
|
|
39830
|
-
this.result = {
|
|
39831
|
-
type: "fail",
|
|
39832
|
-
errorCode: MiniAppErrorType.serverError
|
|
39833
|
-
};
|
|
39834
|
-
this.errorSheet.isVisible = true;
|
|
39835
|
-
return false;
|
|
40276
|
+
}
|
|
39836
40277
|
}
|
|
39837
|
-
}
|
|
39838
|
-
|
|
39839
|
-
|
|
39840
|
-
|
|
39841
|
-
|
|
39842
|
-
|
|
39843
|
-
|
|
39844
|
-
|
|
39845
|
-
|
|
40278
|
+
},
|
|
40279
|
+
async activateAutoTopup() {
|
|
40280
|
+
if (this.requireConfirm) {
|
|
40281
|
+
this.openAutoTopupConfirm();
|
|
40282
|
+
} else {
|
|
40283
|
+
const isSuccess = await this.setAutoTopupConfiguration();
|
|
40284
|
+
if (isSuccess) {
|
|
40285
|
+
this.openSettingCompleteSheet();
|
|
40286
|
+
}
|
|
39846
40287
|
}
|
|
39847
|
-
}
|
|
39848
|
-
|
|
39849
|
-
|
|
39850
|
-
|
|
39851
|
-
|
|
39852
|
-
|
|
39853
|
-
this.openTopupMethodSetting();
|
|
39854
|
-
}
|
|
39855
|
-
},
|
|
39856
|
-
cancelSetting() {
|
|
39857
|
-
this.result = {
|
|
39858
|
-
type: "fail",
|
|
39859
|
-
errorCode: MiniAppErrorType.userCanceled
|
|
39860
|
-
};
|
|
39861
|
-
this.closeSetting();
|
|
39862
|
-
},
|
|
39863
|
-
finishSetting() {
|
|
39864
|
-
this.closeSettingCompleteSheet();
|
|
39865
|
-
this.closeSetting();
|
|
39866
|
-
},
|
|
39867
|
-
openSetting() {
|
|
39868
|
-
this.uiIsVisible = true;
|
|
39869
|
-
},
|
|
39870
|
-
closeSetting() {
|
|
39871
|
-
this.uiIsVisible = false;
|
|
39872
|
-
},
|
|
39873
|
-
openChooseAmountSheet() {
|
|
39874
|
-
this.ui.isChooseAmount = true;
|
|
39875
|
-
},
|
|
39876
|
-
closeChooseAmountSheet() {
|
|
39877
|
-
this.ui.isChooseAmount = false;
|
|
39878
|
-
},
|
|
39879
|
-
openChooseTopupMethodSheet() {
|
|
39880
|
-
this.ui.isChooseTopupMethod = true;
|
|
39881
|
-
},
|
|
39882
|
-
closeChooseTopupMethodSheet() {
|
|
39883
|
-
this.ui.isChooseTopupMethod = false;
|
|
39884
|
-
},
|
|
39885
|
-
openSettingCompleteSheet() {
|
|
39886
|
-
this.ui.isSettingComplete = true;
|
|
39887
|
-
},
|
|
39888
|
-
closeSettingCompleteSheet() {
|
|
39889
|
-
this.ui.isSettingComplete = false;
|
|
39890
|
-
},
|
|
39891
|
-
openTopupMethodSetting() {
|
|
39892
|
-
this.ui.isTopupMethodSetting = true;
|
|
39893
|
-
},
|
|
39894
|
-
closeTopupMethodSetting() {
|
|
39895
|
-
this.ui.isTopupMethodSetting = false;
|
|
39896
|
-
},
|
|
39897
|
-
openAutoTopupConfirm() {
|
|
39898
|
-
this.ui.isAutoTopupConfirm = true;
|
|
39899
|
-
},
|
|
39900
|
-
closeAutoTopupConfirm() {
|
|
39901
|
-
this.ui.isAutoTopupConfirm = false;
|
|
39902
|
-
},
|
|
39903
|
-
openAmountError(payload) {
|
|
39904
|
-
this.ui.amountErrorInfo = payload;
|
|
39905
|
-
this.ui.isAmountError = true;
|
|
39906
|
-
},
|
|
39907
|
-
closeAmountError() {
|
|
39908
|
-
this.ui.isAmountError = false;
|
|
39909
|
-
},
|
|
39910
|
-
openTopupAmountSetting() {
|
|
39911
|
-
this.ui.isTopupAmountSetting = true;
|
|
39912
|
-
},
|
|
39913
|
-
closeTopupAmountSetting() {
|
|
39914
|
-
this.ui.isTopupAmountSetting = false;
|
|
39915
|
-
},
|
|
39916
|
-
closeError() {
|
|
39917
|
-
this.errorSheet.isVisible = false;
|
|
39918
|
-
},
|
|
39919
|
-
show3DSecureSheet(selectedPaymentMethodIndex) {
|
|
39920
|
-
var _a2;
|
|
39921
|
-
const selectPaymentMethod = (_a2 = this.availablePaymentMethodList) == null ? void 0 : _a2[selectedPaymentMethodIndex];
|
|
39922
|
-
if (selectPaymentMethod == null ? void 0 : selectPaymentMethod.creditCardInfo) {
|
|
39923
|
-
const cardInfo2 = selectPaymentMethod.creditCardInfo;
|
|
39924
|
-
if (!cardInfo2.isAuthenticated) {
|
|
39925
|
-
this.ui.threeDSecureCCType = cardInfo2.ccType;
|
|
39926
|
-
this.ui.isThreeDSecure = true;
|
|
39927
|
-
this.ui.isChooseTopupMethod = false;
|
|
39928
|
-
return true;
|
|
40288
|
+
},
|
|
40289
|
+
selectTopupMethodSetting() {
|
|
40290
|
+
if (this.existActivatedMethod) {
|
|
40291
|
+
this.openChooseTopupMethodSheet();
|
|
40292
|
+
} else {
|
|
40293
|
+
this.openTopupMethodSetting();
|
|
39929
40294
|
}
|
|
40295
|
+
},
|
|
40296
|
+
cancelSetting() {
|
|
40297
|
+
this.result = {
|
|
40298
|
+
type: "fail",
|
|
40299
|
+
errorCode: MiniAppErrorType.userCanceled
|
|
40300
|
+
};
|
|
40301
|
+
this.closeSetting();
|
|
40302
|
+
},
|
|
40303
|
+
finishSetting() {
|
|
40304
|
+
this.closeSettingCompleteSheet();
|
|
40305
|
+
this.closeSetting();
|
|
40306
|
+
},
|
|
40307
|
+
openSetting() {
|
|
40308
|
+
this.uiIsVisible = true;
|
|
40309
|
+
},
|
|
40310
|
+
closeSetting() {
|
|
40311
|
+
this.uiIsVisible = false;
|
|
40312
|
+
},
|
|
40313
|
+
openChooseAmountSheet() {
|
|
40314
|
+
this.ui.isChooseAmount = true;
|
|
40315
|
+
},
|
|
40316
|
+
closeChooseAmountSheet() {
|
|
40317
|
+
this.ui.isChooseAmount = false;
|
|
40318
|
+
},
|
|
40319
|
+
openChooseTopupMethodSheet() {
|
|
40320
|
+
this.ui.isChooseTopupMethod = true;
|
|
40321
|
+
},
|
|
40322
|
+
closeChooseTopupMethodSheet() {
|
|
40323
|
+
this.ui.isChooseTopupMethod = false;
|
|
40324
|
+
},
|
|
40325
|
+
openSettingCompleteSheet() {
|
|
40326
|
+
this.ui.isSettingComplete = true;
|
|
40327
|
+
},
|
|
40328
|
+
closeSettingCompleteSheet() {
|
|
40329
|
+
this.ui.isSettingComplete = false;
|
|
40330
|
+
},
|
|
40331
|
+
openTopupMethodSetting() {
|
|
40332
|
+
this.ui.isTopupMethodSetting = true;
|
|
40333
|
+
},
|
|
40334
|
+
closeTopupMethodSetting() {
|
|
40335
|
+
this.ui.isTopupMethodSetting = false;
|
|
40336
|
+
},
|
|
40337
|
+
openAutoTopupConfirm() {
|
|
40338
|
+
this.ui.isAutoTopupConfirm = true;
|
|
40339
|
+
},
|
|
40340
|
+
closeAutoTopupConfirm() {
|
|
40341
|
+
this.ui.isAutoTopupConfirm = false;
|
|
40342
|
+
},
|
|
40343
|
+
openAmountError(payload) {
|
|
40344
|
+
this.ui.amountErrorInfo = payload;
|
|
40345
|
+
this.ui.isAmountError = true;
|
|
40346
|
+
},
|
|
40347
|
+
closeAmountError() {
|
|
40348
|
+
this.ui.isAmountError = false;
|
|
40349
|
+
},
|
|
40350
|
+
openTopupAmountSetting() {
|
|
40351
|
+
this.ui.isTopupAmountSetting = true;
|
|
40352
|
+
},
|
|
40353
|
+
closeTopupAmountSetting() {
|
|
40354
|
+
this.ui.isTopupAmountSetting = false;
|
|
40355
|
+
},
|
|
40356
|
+
closeError() {
|
|
40357
|
+
this.errorSheet.isVisible = false;
|
|
40358
|
+
},
|
|
40359
|
+
show3DSecureSheet(selectedPaymentMethodIndex) {
|
|
40360
|
+
var _a2;
|
|
40361
|
+
const selectPaymentMethod = (_a2 = this.availablePaymentMethodList) == null ? void 0 : _a2[selectedPaymentMethodIndex];
|
|
40362
|
+
if (selectPaymentMethod == null ? void 0 : selectPaymentMethod.creditCardInfo) {
|
|
40363
|
+
const cardInfo2 = selectPaymentMethod.creditCardInfo;
|
|
40364
|
+
if (!cardInfo2.isAuthenticated) {
|
|
40365
|
+
this.ui.threeDSecureCCType = cardInfo2.ccType;
|
|
40366
|
+
this.ui.isThreeDSecure = true;
|
|
40367
|
+
this.ui.isChooseTopupMethod = false;
|
|
40368
|
+
return true;
|
|
40369
|
+
}
|
|
40370
|
+
}
|
|
40371
|
+
return false;
|
|
40372
|
+
},
|
|
40373
|
+
close3dSecureSheet() {
|
|
40374
|
+
this.ui.isThreeDSecure = false;
|
|
40375
|
+
},
|
|
40376
|
+
cancelUpdate() {
|
|
40377
|
+
this.closeSetting();
|
|
40378
|
+
this.result = {
|
|
40379
|
+
type: "fail",
|
|
40380
|
+
errorCode: MiniAppErrorType.userCanceled
|
|
40381
|
+
};
|
|
39930
40382
|
}
|
|
39931
|
-
return false;
|
|
39932
|
-
},
|
|
39933
|
-
close3dSecureSheet() {
|
|
39934
|
-
this.ui.isThreeDSecure = false;
|
|
39935
|
-
},
|
|
39936
|
-
cancelUpdate() {
|
|
39937
|
-
this.closeSetting();
|
|
39938
|
-
this.result = {
|
|
39939
|
-
type: "fail",
|
|
39940
|
-
errorCode: MiniAppErrorType.userCanceled
|
|
39941
|
-
};
|
|
39942
40383
|
}
|
|
39943
40384
|
}
|
|
39944
|
-
|
|
40385
|
+
);
|
|
39945
40386
|
function getTopupSettingMode(config2) {
|
|
39946
40387
|
var _a2, _b;
|
|
39947
40388
|
if ((_a2 = config2.postTransactionAutoTopupConfiguration) == null ? void 0 : _a2.isEnabled) {
|
|
@@ -40390,9 +40831,11 @@ const _sfc_main$a = defineComponent({
|
|
|
40390
40831
|
const containerStyle = {
|
|
40391
40832
|
height: `calc(100vh - ${h2.bottomHeight}px`
|
|
40392
40833
|
};
|
|
40393
|
-
const topupMethod = computed(
|
|
40394
|
-
|
|
40395
|
-
|
|
40834
|
+
const topupMethod = computed(
|
|
40835
|
+
() => {
|
|
40836
|
+
return store.selectedAvailableTopupMethod;
|
|
40837
|
+
}
|
|
40838
|
+
);
|
|
40396
40839
|
const topupAmount2 = computed(() => {
|
|
40397
40840
|
return store.minimumTopupAmount;
|
|
40398
40841
|
});
|
|
@@ -41231,28 +41674,36 @@ const _sfc_main$1 = defineComponent({
|
|
|
41231
41674
|
var _a2, _b;
|
|
41232
41675
|
const lg2 = getLanguage().registerPaymentFeatures.autoTopupRoot;
|
|
41233
41676
|
const store = useRegisterPaymentFeaturesStore();
|
|
41234
|
-
store.initialize(
|
|
41677
|
+
store.initialize(
|
|
41678
|
+
props.isEmoneyOnly,
|
|
41679
|
+
props.needUpdate,
|
|
41680
|
+
(_a2 = props.params) == null ? void 0 : _a2.merchant,
|
|
41681
|
+
(_b = props.params) == null ? void 0 : _b.productType
|
|
41682
|
+
).catch(() => {
|
|
41235
41683
|
});
|
|
41236
41684
|
const complete = () => {
|
|
41237
41685
|
var _a3, _b2;
|
|
41238
41686
|
emit("complete");
|
|
41239
41687
|
(_b2 = (_a3 = props.params).complete) == null ? void 0 : _b2.call(_a3);
|
|
41240
41688
|
};
|
|
41241
|
-
watch(
|
|
41242
|
-
|
|
41243
|
-
|
|
41244
|
-
|
|
41245
|
-
|
|
41246
|
-
|
|
41247
|
-
|
|
41248
|
-
|
|
41249
|
-
|
|
41250
|
-
|
|
41251
|
-
|
|
41252
|
-
|
|
41253
|
-
|
|
41689
|
+
watch(
|
|
41690
|
+
() => store.result,
|
|
41691
|
+
(result2) => {
|
|
41692
|
+
var _a3, _b2, _c, _d;
|
|
41693
|
+
if (!result2) {
|
|
41694
|
+
return;
|
|
41695
|
+
}
|
|
41696
|
+
if (result2.type === "success") {
|
|
41697
|
+
(_b2 = (_a3 = props.params).success) == null ? void 0 : _b2.call(_a3);
|
|
41698
|
+
}
|
|
41699
|
+
if (result2.type === "fail") {
|
|
41700
|
+
(_d = (_c = props.params).fail) == null ? void 0 : _d.call(_c, { errorCode: result2.errorCode });
|
|
41701
|
+
}
|
|
41702
|
+
if (store.isFinishSetting) {
|
|
41703
|
+
complete();
|
|
41704
|
+
}
|
|
41254
41705
|
}
|
|
41255
|
-
|
|
41706
|
+
);
|
|
41256
41707
|
return {
|
|
41257
41708
|
images: getImages(),
|
|
41258
41709
|
complete,
|
|
@@ -41421,10 +41872,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41421
41872
|
const cssModules = {};
|
|
41422
41873
|
cssModules["$style"] = style0;
|
|
41423
41874
|
var FallbackMethodAppUpdateWarning = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__cssModules", cssModules]]);
|
|
41424
|
-
const MinVersion = {
|
|
41425
|
-
PRE_TRANSACTION_AUTO_CHARGE: "3.43.0",
|
|
41426
|
-
FALLBACK_PAYMENT_METHOD: "3.61.0"
|
|
41427
|
-
};
|
|
41428
41875
|
function checkIfValidInput(params) {
|
|
41429
41876
|
if (params.paymentFeatureType === PaymentFeatureTypes.PRE_TRANSACTION_AUTO_CHARGE) {
|
|
41430
41877
|
return true;
|
|
@@ -41459,7 +41906,9 @@ async function consultPaymentFeatureType(params) {
|
|
|
41459
41906
|
(_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params);
|
|
41460
41907
|
(_b = params == null ? void 0 : params.complete) == null ? void 0 : _b.call(params);
|
|
41461
41908
|
} else if (consultResponse.nextAction === ConsultPaymentFeatureTypes.PRE_TRANSACTION_AUTO_CHARGE) {
|
|
41462
|
-
const isMethodSupported = checkVersion(
|
|
41909
|
+
const isMethodSupported = checkVersion(
|
|
41910
|
+
MinVersion.PRE_TRANSACTION_AUTO_CHARGE
|
|
41911
|
+
);
|
|
41463
41912
|
const props = {
|
|
41464
41913
|
isEmoneyOnly: consultResponse.isEmoneyOnly,
|
|
41465
41914
|
needUpdate: !isMethodSupported
|
|
@@ -41479,13 +41928,14 @@ async function consultPaymentFeatureType(params) {
|
|
|
41479
41928
|
function mountUIComponent(params, component, props) {
|
|
41480
41929
|
const container2 = document.createElement("div");
|
|
41481
41930
|
container2.className = "ppmna-reset-css";
|
|
41482
|
-
const app = createApp(component,
|
|
41931
|
+
const app = createApp(component, {
|
|
41483
41932
|
onComplete: () => {
|
|
41484
41933
|
app.unmount();
|
|
41485
41934
|
document.body.removeChild(container2);
|
|
41486
41935
|
},
|
|
41487
|
-
params
|
|
41488
|
-
|
|
41936
|
+
params,
|
|
41937
|
+
...props
|
|
41938
|
+
});
|
|
41489
41939
|
app.use(createPinia());
|
|
41490
41940
|
app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
|
|
41491
41941
|
app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
|
|
@@ -41541,7 +41991,9 @@ async function execute(params) {
|
|
|
41541
41991
|
if (!(params == null ? void 0 : params.merchantPaymentId)) {
|
|
41542
41992
|
return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.badRequest });
|
|
41543
41993
|
}
|
|
41544
|
-
const grantStatus = await checkPermission(
|
|
41994
|
+
const grantStatus = await checkPermission(
|
|
41995
|
+
PermissionName.mini_app_cashback_information
|
|
41996
|
+
);
|
|
41545
41997
|
if (grantStatus !== PermissionStatus.granted) {
|
|
41546
41998
|
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, {
|
|
41547
41999
|
errorCode: MiniAppErrorType.insufficientScope
|
|
@@ -41567,18 +42019,13 @@ async function execute(params) {
|
|
|
41567
42019
|
return (_k = params == null ? void 0 : params.fail) == null ? void 0 : _k.call(params, { errorCode: MiniAppErrorType.serverError });
|
|
41568
42020
|
}
|
|
41569
42021
|
}
|
|
41570
|
-
var RuntimeEnv;
|
|
41571
|
-
(function(RuntimeEnv2) {
|
|
41572
|
-
RuntimeEnv2["JS"] = "JS";
|
|
41573
|
-
RuntimeEnv2["Native"] = "NATIVE";
|
|
41574
|
-
})(RuntimeEnv || (RuntimeEnv = {}));
|
|
41575
42022
|
class MiniAppModule extends JsBridgeModule {
|
|
41576
42023
|
constructor(jsBridge2) {
|
|
41577
42024
|
super();
|
|
41578
42025
|
this.jsBridge = jsBridge2;
|
|
41579
42026
|
}
|
|
41580
42027
|
detectMode() {
|
|
41581
|
-
return getRuntime() === MiniAppRuntime.android ?
|
|
42028
|
+
return getRuntime() === MiniAppRuntime.android ? "NATIVE" : "JS";
|
|
41582
42029
|
}
|
|
41583
42030
|
init(params) {
|
|
41584
42031
|
init(params).catch(() => {
|
|
@@ -41595,7 +42042,7 @@ class MiniAppModule extends JsBridgeModule {
|
|
|
41595
42042
|
openWebview(params);
|
|
41596
42043
|
}
|
|
41597
42044
|
openMap(params) {
|
|
41598
|
-
if (this.detectMode() ===
|
|
42045
|
+
if (this.detectMode() === "JS") {
|
|
41599
42046
|
if (!this.isExecutableService(params)) {
|
|
41600
42047
|
return;
|
|
41601
42048
|
}
|
|
@@ -41676,7 +42123,7 @@ class MiniAppModule extends JsBridgeModule {
|
|
|
41676
42123
|
scanCode(params);
|
|
41677
42124
|
}
|
|
41678
42125
|
showAlert(params) {
|
|
41679
|
-
this.detectMode() ===
|
|
42126
|
+
this.detectMode() === "JS" ? showAlert(params) : this.jsBridge.callNative("showAlert", params);
|
|
41680
42127
|
}
|
|
41681
42128
|
showErrorSheet(params) {
|
|
41682
42129
|
showErrorSheet(params);
|
|
@@ -41688,7 +42135,7 @@ class MiniAppModule extends JsBridgeModule {
|
|
|
41688
42135
|
setTitle(params);
|
|
41689
42136
|
}
|
|
41690
42137
|
showUpdateWarning(params) {
|
|
41691
|
-
this.detectMode() ===
|
|
42138
|
+
this.detectMode() === "JS" ? showUpdateWarning$1(params) : this.jsBridge.callNative("showUpdateWarning", params);
|
|
41692
42139
|
}
|
|
41693
42140
|
getPlatformInformation(params) {
|
|
41694
42141
|
getPlatformInformation(params).catch(() => {
|
|
@@ -41698,10 +42145,10 @@ class MiniAppModule extends JsBridgeModule {
|
|
|
41698
42145
|
getDeviceInformation(params);
|
|
41699
42146
|
}
|
|
41700
42147
|
openApp(params) {
|
|
41701
|
-
this.detectMode() ===
|
|
42148
|
+
this.detectMode() === "JS" ? openApp$1(params) : this.jsBridge.callNative("openApp", params);
|
|
41702
42149
|
}
|
|
41703
42150
|
share(params) {
|
|
41704
|
-
this.detectMode() ===
|
|
42151
|
+
this.detectMode() === "JS" ? share(params).catch(() => {
|
|
41705
42152
|
}) : this.jsBridge.callNative("share", params);
|
|
41706
42153
|
}
|
|
41707
42154
|
getKycInformation(params) {
|
|
@@ -41770,10 +42217,9 @@ class MiniAppModule extends JsBridgeModule {
|
|
|
41770
42217
|
class PayPayJsBridge extends PayPayJsBridgeBase {
|
|
41771
42218
|
}
|
|
41772
42219
|
composePayPayJsBridge(PayPayJsBridge, MiniAppModule);
|
|
41773
|
-
const jsBridge$1 = new JsBridge(window);
|
|
41774
|
-
new PayPayJsBridge(jsBridge$1);
|
|
41775
42220
|
const jsBridge = new JsBridge(window);
|
|
41776
|
-
|
|
41777
|
-
|
|
42221
|
+
new PayPayJsBridge(jsBridge);
|
|
42222
|
+
const paypayJsBridge = new PayPayJsBridge(jsBridge$1);
|
|
42223
|
+
exposeJsBridge(jsBridge$1);
|
|
41778
42224
|
exposePayPayJsBridge(paypayJsBridge);
|
|
41779
42225
|
export { paypayJsBridge as default };
|