@paypay/mini-app-js-sdk 1.56.0 → 1.58.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.
@@ -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((ns) => window.hasOwnProperty(ns) && global2[ns] === paypayJsBridge2)) {
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) ? NativeResponseStatus.Succcess : NativeResponseStatus.Fail,
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.56.0";
89
- this.revision = "071e234";
90
- this.messageHandlers = new Map();
91
- this.responseCallbacks = new Map();
53
+ this.version = "1.58.0";
54
+ this.revision = "93e6f72";
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 _a2 = params || {}, { complete, fail, success: success2 } = _a2, methodParams = __objRest(_a2, ["complete", "fail", "success"]);
74
+ const { complete, fail, success: success2, ...methodParams } = params || {};
110
75
  const { transformResponse = (v) => v } = options;
111
76
  try {
112
- this.dispatchMessageToNative(methodName, methodParams, (data2) => {
113
- var _a3, _b, _c;
114
- let returnData = ((_c = (_b = (_a3 = this.global) == null ? void 0 : _a3.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;
115
- switch (data2.status) {
116
- case NativeResponseStatus.Complete:
117
- complete && complete(returnData);
118
- break;
119
- case NativeResponseStatus.Fail:
120
- fail && fail(returnData);
121
- break;
122
- case NativeResponseStatus.Succcess:
123
- success2 && success2(transformResponse(returnData));
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 === NativeResponseStatus.Complete || typeof message.responseData.status === "number") {
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
- var MiniAppErrorType;
164
- (function(MiniAppErrorType2) {
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
- })(MiniAppErrorType || (MiniAppErrorType = {}));
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(moduleConstructor.prototype, name2);
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(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
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
- set: set2,
323
- get: get2,
324
- remove: function(key2, attributes) {
325
- set2(key2, "", assign$1({}, attributes, {
326
- expires: -1
327
- }));
328
- },
329
- withAttributes: function(attributes) {
330
- return init$1(this.converter, assign$1({}, this.attributes, attributes));
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
- withConverter: function(converter2) {
333
- return init$1(assign$1({}, this.converter, converter2), this.attributes);
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 ButtonStyle;
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
- })(PpLocalStorageKey || (PpLocalStorageKey = {}));
416
- var CookieDuration;
417
- (function(CookieDuration2) {
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
- })(CookieDuration || (CookieDuration = {}));
422
- var RenderType;
423
- (function(RenderType2) {
386
+ return CookieDuration2;
387
+ })(CookieDuration || {});
388
+ var RenderType = /* @__PURE__ */ ((RenderType2) => {
424
389
  RenderType2["COVER"] = "cover";
425
390
  RenderType2["CONTAIN"] = "contain";
426
- })(RenderType || (RenderType = {}));
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
- })(ChallengeMethod || (ChallengeMethod = {}));
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(PpLocalStorageKey.lastPaymentMethod, methodId, CookieDuration.oneMonth);
829
+ saveCookie(
830
+ PpLocalStorageKey.lastPaymentMethod,
831
+ methodId,
832
+ CookieDuration.oneMonth
833
+ );
864
834
  }
865
835
  function saveLastTopupPayMethod(methodId) {
866
- saveCookie(PpLocalStorageKey.lastTopupPayMethod, methodId, CookieDuration.oneMonth);
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
- })(PaymentMethodType || (PaymentMethodType = {}));
1365
- var CreditTypes;
1366
- (function(CreditTypes2) {
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
- })(CreditTypes || (CreditTypes = {}));
1374
- var PaymentMethodStatus;
1375
- (function(PaymentMethodStatus2) {
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
- })(PaymentMethodStatus || (PaymentMethodStatus = {}));
1383
- var bankCode;
1384
- (function(bankCode2) {
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
- })(bankCode || (bankCode = {}));
1396
- var status;
1397
- (function(status2) {
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
- })(status || (status = {}));
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 __spreadValues({}, res);
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 __spreadValues({}, res);
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
- })(CashBackAnimationType || (CashBackAnimationType = {}));
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
- })(UIComponentsButtonActionType || (UIComponentsButtonActionType = {}));
1472
- var UIComponentsButtonType;
1473
- (function(UIComponentsButtonType2) {
1447
+ return UIComponentsButtonActionType2;
1448
+ })(UIComponentsButtonActionType || {});
1449
+ var UIComponentsButtonType = /* @__PURE__ */ ((UIComponentsButtonType2) => {
1474
1450
  UIComponentsButtonType2["BLUE"] = "BLUE";
1475
1451
  UIComponentsButtonType2["WHITE"] = "WHITE";
1476
- })(UIComponentsButtonType || (UIComponentsButtonType = {}));
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 _a2 = params, { success: success2, complete, fail } = _a2, data2 = __objRest(_a2, ["success", "complete", "fail"]);
1591
- return __spreadProps(__spreadValues({}, data2), {
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 = __spreadProps(__spreadValues({}, lastPayment), {
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 = __spreadProps(__spreadValues({}, lastTopup), {
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
- })(MiniAppRuntime || (MiniAppRuntime = {}));
1759
+ return MiniAppRuntime2;
1760
+ })(MiniAppRuntime || {});
1781
1761
  function getRuntime() {
1782
- return navigator.userAgent.match(/(iPad|iPhone|iPod)/i) && isPayPayMiniApp() ? MiniAppRuntime.ios : navigator.userAgent.match(/Android/i) && isPayPayMiniApp() ? MiniAppRuntime.android : MiniAppRuntime.web;
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() === MiniAppRuntime.android ? "https://play.google.com/store/apps/details?id=jp.ne.paypay.android.app" : "https://itunes.apple.com/app/id1435783608";
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(Array.prototype.map.call(crypto.getRandomValues(new Uint8Array(length2)), (num2) => {
1890
- return String.fromCharCode(num2);
1891
- }).join("")).substring(0, length2);
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(__spreadValues({
1928
+ let headers = new Headers({
1947
1929
  "Content-Type": "application/json",
1948
- "Client-Version": "1.56.0",
1949
- "Client-OS-Type": getRuntime()
1950
- }, customHeaders));
1930
+ "Client-Version": "1.58.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(__spreadProps(__spreadValues({}, options), { suppressRefresh: true }));
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(JSON.stringify({
2114
- 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,
2115
- 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,
2116
- 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,
2117
- 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,
2118
- 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,
2119
- 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,
2120
- 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
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(JSON.stringify({
2143
- topupButtonsAmount: (_c = (_b = res == null ? void 0 : res.body) == null ? void 0 : _b.variables) == null ? void 0 : _c.topupButtonsAmount,
2144
- topupHalfSheetAmount: (_e = (_d = res == null ? void 0 : res.body) == null ? void 0 : _d.variables) == null ? void 0 : _e.topupHalfSheetAmount,
2145
- topupHalfSheetRecommendedAmount: (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.variables) == null ? void 0 : _g.topupHalfSheetRecommendedAmount,
2146
- autoChargeTopupHalfSheetAmount: (_i = (_h = res == null ? void 0 : res.body) == null ? void 0 : _h.variables) == null ? void 0 : _i.autoChargeTopupHalfSheetAmount,
2147
- autoChargeRecommendedTopupAmount: (_k = (_j = res == null ? void 0 : res.body) == null ? void 0 : _j.variables) == null ? void 0 : _k.autoChargeRecommendedTopupAmount,
2148
- topupMinAmount: (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.variables) == null ? void 0 : _m.topupMinAmount
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
- })(MiniAppStatusType || (MiniAppStatusType = {}));
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 = __spreadProps(__spreadValues({}, res.body.unsigned.data), {
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(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
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(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key2) => key2 !== "arguments" && key2 !== "caller").map((key2) => Symbol[key2]).filter(isSymbol));
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(() => !instance.isUnmounted && hydrateSubTree());
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(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, isSVG);
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(componentUpdateFn, () => queueJob(update), instance.scope);
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(Fragment, null, child.slice());
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((_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.data) == null ? void 0 : _f.accessToken) != null ? _g : "");
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(JSON.stringify({
7787
- avatarUrl: res == null ? void 0 : res.avatarUrl,
7788
- nickName: res == null ? void 0 : res.nickName
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("style", `${beforeAttr.value};overflow:hidden; overscroll-behavior-y: none;`);
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 = __spreadProps(__spreadValues({}, style), {
8256
+ style = {
8257
+ ...style,
8240
8258
  transform: `translateY(${YState.y}px)`
8241
- });
8259
+ };
8242
8260
  }
8243
8261
  if (props.style) {
8244
- style = __spreadValues(__spreadValues({}, style), props.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(__spreadValues({
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
- }, popStateHandler(closeSheet, mapParams)));
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(params == null ? void 0 : params.redirectUrl)}` : `paypay://miniapp?appId=${clientId}`;
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
- })(PermissionStatus || (PermissionStatus = {}));
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 PermissionStatus.granted;
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 PermissionStatus.denied;
9002
+ return "DENIED";
8979
9003
  }
8980
9004
  }
8981
- return PermissionStatus.granted;
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(PermissionName.mini_app_payment_balance);
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(params, (e == null ? void 0 : e.message) || MiniAppErrorType.serverError);
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(type, listener, capture);
9304
+ element.addEventListener(
9305
+ type,
9306
+ listener,
9307
+ capture
9308
+ );
9276
9309
  attached = true;
9277
9310
  }
9278
9311
  };
@@ -9310,16 +9343,16 @@ function useBreakpoints() {
9310
9343
  windowHeight: computed(() => windowHeight.value)
9311
9344
  };
9312
9345
  }
9313
- const wrapperClass$q = "_wrapperClass_1k2lr_1";
9314
- const breakDownList = "_breakDownList_1k2lr_1";
9315
- const nonUsable = "_nonUsable_1k2lr_17";
9316
- const breakDownEnter = "_breakDownEnter_1k2lr_35";
9317
- const breakDownIcon = "_breakDownIcon_1k2lr_40";
9318
- const breakDownIconReverse = "_breakDownIconReverse_1k2lr_52";
9319
- const enterActive = "_enterActive_1k2lr_55";
9320
- const leaveActive = "_leaveActive_1k2lr_60";
9321
- const enterTo = "_enterTo_1k2lr_65";
9322
- const leaveTo = "_leaveTo_1k2lr_69";
9346
+ const wrapperClass$q = "_wrapperClass_t590f_1";
9347
+ const breakDownList = "_breakDownList_t590f_1";
9348
+ const nonUsable = "_nonUsable_t590f_17";
9349
+ const breakDownEnter = "_breakDownEnter_t590f_35";
9350
+ const breakDownIcon = "_breakDownIcon_t590f_40";
9351
+ const breakDownIconReverse = "_breakDownIconReverse_t590f_52";
9352
+ const enterActive = "_enterActive_t590f_55";
9353
+ const leaveActive = "_leaveActive_t590f_60";
9354
+ const enterTo = "_enterTo_t590f_65";
9355
+ const leaveTo = "_leaveTo_t590f_69";
9323
9356
  var style0$1o = {
9324
9357
  wrapperClass: wrapperClass$q,
9325
9358
  breakDownList,
@@ -9439,24 +9472,25 @@ 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 = "_wrapperClass_15dit_1";
9443
- const ppmnaPaymentTypeContainer$4 = "_ppmnaPaymentTypeContainer_15dit_1";
9444
- const img$d = "_img_15dit_5";
9445
- const imgContainer$5 = "_imgContainer_15dit_18";
9446
- const roundStylePaymentType$4 = "_roundStylePaymentType_15dit_26";
9447
- const main$5 = "_main_15dit_32";
9448
- const sub$4 = "_sub_15dit_48";
9449
- const makePayWithAddress$4 = "_makePayWithAddress_15dit_58";
9450
- const makePaymentTypeContainer$4 = "_makePaymentTypeContainer_15dit_63";
9451
- const arrowContainer$6 = "_arrowContainer_15dit_68";
9452
- const arrowRight$4 = "_arrowRight_15dit_71";
9453
- const makePaymentArrowContainer$4 = "_makePaymentArrowContainer_15dit_81";
9454
- const walletContainer = "_walletContainer_15dit_86";
9455
- const subTitle$1 = "_subTitle_15dit_91";
9456
- const chargeContainer = "_chargeContainer_15dit_96";
9457
- const greenTick = "_greenTick_15dit_106";
9458
- const autoCharge = "_autoCharge_15dit_119";
9459
- const makePaymentRightAlign = "_makePaymentRightAlign_15dit_126";
9475
+ const wrapperClass$p = "_wrapperClass_l2nf1_1";
9476
+ const ppmnaPaymentTypeContainer$4 = "_ppmnaPaymentTypeContainer_l2nf1_1";
9477
+ const img$d = "_img_l2nf1_4";
9478
+ const imgContainer$5 = "_imgContainer_l2nf1_19";
9479
+ const roundStylePaymentType$4 = "_roundStylePaymentType_l2nf1_27";
9480
+ const main$5 = "_main_l2nf1_33";
9481
+ const sub$4 = "_sub_l2nf1_49";
9482
+ const makePayWithAddress$4 = "_makePayWithAddress_l2nf1_59";
9483
+ const makePaymentTypeContainer$4 = "_makePaymentTypeContainer_l2nf1_64";
9484
+ const arrowContainer$6 = "_arrowContainer_l2nf1_69";
9485
+ const arrowRight$4 = "_arrowRight_l2nf1_72";
9486
+ const makePaymentArrowContainer$4 = "_makePaymentArrowContainer_l2nf1_82";
9487
+ const balanceIconContainer = "_balanceIconContainer_l2nf1_92";
9488
+ const walletContainer = "_walletContainer_l2nf1_98";
9489
+ const subTitle$1 = "_subTitle_l2nf1_103";
9490
+ const chargeContainer = "_chargeContainer_l2nf1_108";
9491
+ const greenTick = "_greenTick_l2nf1_118";
9492
+ const autoCharge = "_autoCharge_l2nf1_131";
9493
+ const makePaymentRightAlign = "_makePaymentRightAlign_l2nf1_138";
9460
9494
  var style0$1n = {
9461
9495
  wrapperClass: wrapperClass$p,
9462
9496
  ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$4,
@@ -9470,6 +9504,7 @@ var style0$1n = {
9470
9504
  arrowContainer: arrowContainer$6,
9471
9505
  arrowRight: arrowRight$4,
9472
9506
  makePaymentArrowContainer: makePaymentArrowContainer$4,
9507
+ balanceIconContainer,
9473
9508
  walletContainer,
9474
9509
  subTitle: subTitle$1,
9475
9510
  chargeContainer,
@@ -9498,10 +9533,14 @@ const _sfc_main$1y = defineComponent({
9498
9533
  }
9499
9534
  },
9500
9535
  setup(props) {
9501
- const formattedBalance = computed(() => {
9502
- var _a2, _b, _c, _d;
9503
- return formatAmount((_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);
9504
- });
9536
+ const formattedBalance = computed(
9537
+ () => {
9538
+ var _a2, _b, _c, _d;
9539
+ return formatAmount(
9540
+ (_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
9541
+ );
9542
+ }
9543
+ );
9505
9544
  const { isDesktop } = useBreakpoints();
9506
9545
  const isPreTransactionAutoChargeEnabled = computed(() => {
9507
9546
  var _a2, _b;
@@ -9532,12 +9571,14 @@ function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
9532
9571
  ]),
9533
9572
  "data-testid": "wallet-method"
9534
9573
  }, [
9535
- createBaseVNode("div", null, [
9574
+ createBaseVNode("div", {
9575
+ class: normalizeClass(_ctx.$style.balanceIconContainer)
9576
+ }, [
9536
9577
  createBaseVNode("img", {
9537
9578
  src: _ctx.images.iconBalanceIcon,
9538
9579
  class: normalizeClass(_ctx.$style.img)
9539
9580
  }, null, 10, _hoisted_1$T)
9540
- ]),
9581
+ ], 2),
9541
9582
  createBaseVNode("div", {
9542
9583
  class: normalizeClass(_ctx.$style.walletContainer)
9543
9584
  }, [
@@ -9583,29 +9624,29 @@ function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
9583
9624
  const cssModules$1n = {};
9584
9625
  cssModules$1n["$style"] = style0$1n;
9585
9626
  var WalletType = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1y], ["__cssModules", cssModules$1n]]);
9586
- const wrapperClass$o = "_wrapperClass_11uh5_1";
9587
- const ppmnaPaymentTypeContainer$3 = "_ppmnaPaymentTypeContainer_11uh5_1";
9588
- const img$c = "_img_11uh5_5";
9589
- const imgContainer$4 = "_imgContainer_11uh5_18";
9590
- const roundStylePaymentType$3 = "_roundStylePaymentType_11uh5_26";
9591
- const main$4 = "_main_11uh5_32";
9592
- const sub$3 = "_sub_11uh5_48";
9593
- const makePayWithAddress$3 = "_makePayWithAddress_11uh5_58";
9594
- const makePaymentTypeContainer$3 = "_makePaymentTypeContainer_11uh5_63";
9595
- const arrowContainer$5 = "_arrowContainer_11uh5_68";
9596
- const arrowRight$3 = "_arrowRight_11uh5_71";
9597
- const makePaymentArrowContainer$3 = "_makePaymentArrowContainer_11uh5_81";
9598
- const mainLabel$5 = "_mainLabel_11uh5_85";
9599
- const auth = "_auth_11uh5_90";
9600
- const authText = "_authText_11uh5_100";
9601
- const cardImageContainer = "_cardImageContainer_11uh5_104";
9602
- const cardImg = "_cardImg_11uh5_107";
9603
- const content$h = "_content_11uh5_111";
9604
- const authenticated = "_authenticated_11uh5_121";
9605
- const notAuthenticated = "_notAuthenticated_11uh5_124";
9606
- const authorizedImg$1 = "_authorizedImg_11uh5_127";
9607
- const unAuthorizedImg$1 = "_unAuthorizedImg_11uh5_136";
9608
- const creditCard$1 = "_creditCard_11uh5_144";
9627
+ const wrapperClass$o = "_wrapperClass_d9bg9_1";
9628
+ const ppmnaPaymentTypeContainer$3 = "_ppmnaPaymentTypeContainer_d9bg9_1";
9629
+ const img$c = "_img_d9bg9_4";
9630
+ const imgContainer$4 = "_imgContainer_d9bg9_19";
9631
+ const roundStylePaymentType$3 = "_roundStylePaymentType_d9bg9_27";
9632
+ const main$4 = "_main_d9bg9_33";
9633
+ const sub$3 = "_sub_d9bg9_49";
9634
+ const makePayWithAddress$3 = "_makePayWithAddress_d9bg9_59";
9635
+ const makePaymentTypeContainer$3 = "_makePaymentTypeContainer_d9bg9_64";
9636
+ const arrowContainer$5 = "_arrowContainer_d9bg9_69";
9637
+ const arrowRight$3 = "_arrowRight_d9bg9_72";
9638
+ const makePaymentArrowContainer$3 = "_makePaymentArrowContainer_d9bg9_82";
9639
+ const mainLabel$5 = "_mainLabel_d9bg9_91";
9640
+ const auth = "_auth_d9bg9_96";
9641
+ const authText = "_authText_d9bg9_106";
9642
+ const cardImageContainer = "_cardImageContainer_d9bg9_110";
9643
+ const cardImg = "_cardImg_d9bg9_113";
9644
+ const content$h = "_content_d9bg9_117";
9645
+ const authenticated = "_authenticated_d9bg9_127";
9646
+ const notAuthenticated = "_notAuthenticated_d9bg9_130";
9647
+ const authorizedImg$1 = "_authorizedImg_d9bg9_133";
9648
+ const unAuthorizedImg$1 = "_unAuthorizedImg_d9bg9_142";
9649
+ const creditCard$1 = "_creditCard_d9bg9_150";
9609
9650
  var style0$1m = {
9610
9651
  wrapperClass: wrapperClass$o,
9611
9652
  ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$3,
@@ -9777,24 +9818,24 @@ function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
9777
9818
  const cssModules$1m = {};
9778
9819
  cssModules$1m["$style"] = style0$1m;
9779
9820
  var CreditCardType = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1x], ["__cssModules", cssModules$1m]]);
9780
- const wrapperClass$n = "_wrapperClass_1lw1h_1";
9781
- const ppmnaPaymentTypeContainer$2 = "_ppmnaPaymentTypeContainer_1lw1h_1";
9782
- const img$a = "_img_1lw1h_5";
9783
- const imgContainer$3 = "_imgContainer_1lw1h_18";
9784
- const roundStylePaymentType$2 = "_roundStylePaymentType_1lw1h_26";
9785
- const main$3 = "_main_1lw1h_32";
9786
- const sub$2 = "_sub_1lw1h_48";
9787
- const makePayWithAddress$2 = "_makePayWithAddress_1lw1h_58";
9788
- const makePaymentTypeContainer$2 = "_makePaymentTypeContainer_1lw1h_63";
9789
- const arrowContainer$4 = "_arrowContainer_1lw1h_68";
9790
- const arrowRight$2 = "_arrowRight_1lw1h_71";
9791
- const makePaymentArrowContainer$2 = "_makePaymentArrowContainer_1lw1h_81";
9792
- const bankImg = "_bankImg_1lw1h_85";
9793
- const branchCode = "_branchCode_1lw1h_89";
9794
- const content$g = "_content_1lw1h_92";
9795
- const roundContainer = "_roundContainer_1lw1h_96";
9796
- const round$2 = "_round_1lw1h_26";
9797
- const bankName = "_bankName_1lw1h_102";
9821
+ const wrapperClass$n = "_wrapperClass_14b0z_1";
9822
+ const ppmnaPaymentTypeContainer$2 = "_ppmnaPaymentTypeContainer_14b0z_1";
9823
+ const img$a = "_img_14b0z_4";
9824
+ const imgContainer$3 = "_imgContainer_14b0z_19";
9825
+ const roundStylePaymentType$2 = "_roundStylePaymentType_14b0z_27";
9826
+ const main$3 = "_main_14b0z_33";
9827
+ const sub$2 = "_sub_14b0z_49";
9828
+ const makePayWithAddress$2 = "_makePayWithAddress_14b0z_59";
9829
+ const makePaymentTypeContainer$2 = "_makePaymentTypeContainer_14b0z_64";
9830
+ const arrowContainer$4 = "_arrowContainer_14b0z_69";
9831
+ const arrowRight$2 = "_arrowRight_14b0z_72";
9832
+ const makePaymentArrowContainer$2 = "_makePaymentArrowContainer_14b0z_82";
9833
+ const bankImg = "_bankImg_14b0z_91";
9834
+ const branchCode = "_branchCode_14b0z_95";
9835
+ const content$g = "_content_14b0z_103";
9836
+ const roundContainer = "_roundContainer_14b0z_107";
9837
+ const round$2 = "_round_14b0z_27";
9838
+ const bankName = "_bankName_14b0z_113";
9798
9839
  var style0$1l = {
9799
9840
  wrapperClass: wrapperClass$n,
9800
9841
  ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$2,
@@ -9926,23 +9967,23 @@ function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
9926
9967
  const cssModules$1l = {};
9927
9968
  cssModules$1l["$style"] = style0$1l;
9928
9969
  var BankType = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1w], ["__cssModules", cssModules$1l]]);
9929
- const wrapperClass$m = "_wrapperClass_sdttg_1";
9930
- const ppmnaPaymentTypeContainer$1 = "_ppmnaPaymentTypeContainer_sdttg_1";
9931
- const img$9 = "_img_sdttg_5";
9932
- const imgContainer$2 = "_imgContainer_sdttg_18";
9933
- const roundStylePaymentType$1 = "_roundStylePaymentType_sdttg_26";
9934
- const main$2 = "_main_sdttg_32";
9935
- const sub$1 = "_sub_sdttg_48";
9936
- const makePayWithAddress$1 = "_makePayWithAddress_sdttg_58";
9937
- const makePaymentTypeContainer$1 = "_makePaymentTypeContainer_sdttg_63";
9938
- const arrowContainer$3 = "_arrowContainer_sdttg_68";
9939
- const arrowRight$1 = "_arrowRight_sdttg_71";
9940
- const makePaymentArrowContainer$1 = "_makePaymentArrowContainer_sdttg_81";
9941
- const container$y = "_container_sdttg_85";
9942
- const sbidImg = "_sbidImg_sdttg_97";
9943
- const content$f = "_content_sdttg_105";
9944
- const desc1 = "_desc1_sdttg_118";
9945
- const desc2 = "_desc2_sdttg_122";
9970
+ const wrapperClass$m = "_wrapperClass_1o9cz_1";
9971
+ const ppmnaPaymentTypeContainer$1 = "_ppmnaPaymentTypeContainer_1o9cz_1";
9972
+ const img$9 = "_img_1o9cz_4";
9973
+ const imgContainer$2 = "_imgContainer_1o9cz_19";
9974
+ const roundStylePaymentType$1 = "_roundStylePaymentType_1o9cz_27";
9975
+ const main$2 = "_main_1o9cz_33";
9976
+ const sub$1 = "_sub_1o9cz_49";
9977
+ const makePayWithAddress$1 = "_makePayWithAddress_1o9cz_59";
9978
+ const makePaymentTypeContainer$1 = "_makePaymentTypeContainer_1o9cz_64";
9979
+ const arrowContainer$3 = "_arrowContainer_1o9cz_69";
9980
+ const arrowRight$1 = "_arrowRight_1o9cz_72";
9981
+ const makePaymentArrowContainer$1 = "_makePaymentArrowContainer_1o9cz_82";
9982
+ const container$y = "_container_1o9cz_91";
9983
+ const sbidImg = "_sbidImg_1o9cz_103";
9984
+ const content$f = "_content_1o9cz_111";
9985
+ const desc1 = "_desc1_1o9cz_124";
9986
+ const desc2 = "_desc2_1o9cz_128";
9946
9987
  var style0$1k = {
9947
9988
  wrapperClass: wrapperClass$m,
9948
9989
  ppmnaPaymentTypeContainer: ppmnaPaymentTypeContainer$1,
@@ -9980,10 +10021,12 @@ const _sfc_main$1v = defineComponent({
9980
10021
  return (_a2 = status[val2]) != null ? _a2 : "";
9981
10022
  };
9982
10023
  return {
9983
- paymentMethodStatus: computed(() => {
9984
- var _a2, _b, _c;
9985
- return getStatus((_c = (_b = (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo) == null ? void 0 : _b.paymentMethodStatus) != null ? _c : "");
9986
- }),
10024
+ paymentMethodStatus: computed(
10025
+ () => {
10026
+ var _a2, _b, _c;
10027
+ return getStatus((_c = (_b = (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo) == null ? void 0 : _b.paymentMethodStatus) != null ? _c : "");
10028
+ }
10029
+ ),
9987
10030
  images: getImages(),
9988
10031
  lg: getLanguage()
9989
10032
  };
@@ -10027,21 +10070,21 @@ function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
10027
10070
  const cssModules$1k = {};
10028
10071
  cssModules$1k["$style"] = style0$1k;
10029
10072
  var SbidType = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1v], ["__cssModules", cssModules$1k]]);
10030
- const wrapperClass$l = "_wrapperClass_1cjo2_1";
10031
- const ppmnaPaymentTypeContainer = "_ppmnaPaymentTypeContainer_1cjo2_1";
10032
- const img$8 = "_img_1cjo2_5";
10033
- const imgContainer$1 = "_imgContainer_1cjo2_18";
10034
- const roundStylePaymentType = "_roundStylePaymentType_1cjo2_26";
10035
- const main$1 = "_main_1cjo2_32";
10036
- const sub = "_sub_1cjo2_48";
10037
- const makePayWithAddress = "_makePayWithAddress_1cjo2_58";
10038
- const makePaymentTypeContainer = "_makePaymentTypeContainer_1cjo2_63";
10039
- const arrowContainer$2 = "_arrowContainer_1cjo2_68";
10040
- const arrowRight = "_arrowRight_1cjo2_71";
10041
- const makePaymentArrowContainer = "_makePaymentArrowContainer_1cjo2_81";
10042
- const container$x = "_container_1cjo2_86";
10043
- const subTitle = "_subTitle_1cjo2_91";
10044
- const imageContainer$5 = "_imageContainer_1cjo2_96";
10073
+ const wrapperClass$l = "_wrapperClass_antyh_1";
10074
+ const ppmnaPaymentTypeContainer = "_ppmnaPaymentTypeContainer_antyh_1";
10075
+ const img$8 = "_img_antyh_4";
10076
+ const imgContainer$1 = "_imgContainer_antyh_19";
10077
+ const roundStylePaymentType = "_roundStylePaymentType_antyh_27";
10078
+ const main$1 = "_main_antyh_33";
10079
+ const sub = "_sub_antyh_49";
10080
+ const makePayWithAddress = "_makePayWithAddress_antyh_59";
10081
+ const makePaymentTypeContainer = "_makePaymentTypeContainer_antyh_64";
10082
+ const arrowContainer$2 = "_arrowContainer_antyh_69";
10083
+ const arrowRight = "_arrowRight_antyh_72";
10084
+ const makePaymentArrowContainer = "_makePaymentArrowContainer_antyh_82";
10085
+ const container$x = "_container_antyh_92";
10086
+ const subTitle = "_subTitle_antyh_97";
10087
+ const imageContainer$5 = "_imageContainer_antyh_102";
10045
10088
  var style0$1j = {
10046
10089
  wrapperClass: wrapperClass$l,
10047
10090
  ppmnaPaymentTypeContainer,
@@ -10078,10 +10121,12 @@ const _sfc_main$1u = defineComponent({
10078
10121
  },
10079
10122
  setup(props) {
10080
10123
  return {
10081
- formattedBalance: computed(() => {
10082
- var _a2, _b;
10083
- return formatAmount((_b = (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.availableAmount);
10084
- }),
10124
+ formattedBalance: computed(
10125
+ () => {
10126
+ var _a2, _b;
10127
+ return formatAmount((_b = (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.availableAmount);
10128
+ }
10129
+ ),
10085
10130
  images: getImages(),
10086
10131
  lg: getLanguage()
10087
10132
  };
@@ -17169,10 +17214,10 @@ var lottie_svg = { exports: {} };
17169
17214
  eff = new MaskIndexEffect(effects[i2], element, this);
17170
17215
  break;
17171
17216
  case 5:
17172
- eff = new EffectsManager(effects[i2], element, this);
17217
+ eff = new EffectsManager(effects[i2], element);
17173
17218
  break;
17174
17219
  default:
17175
- eff = new NoValueEffect(effects[i2], element, this);
17220
+ eff = new NoValueEffect(effects[i2]);
17176
17221
  break;
17177
17222
  }
17178
17223
  if (eff) {
@@ -19740,7 +19785,7 @@ var lottie_svg = { exports: {} };
19740
19785
  };
19741
19786
  extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);
19742
19787
  function getTextSelectorProp(elem2, data2, arr) {
19743
- return new TextSelectorPropFactory(elem2, data2, arr);
19788
+ return new TextSelectorPropFactory(elem2, data2);
19744
19789
  }
19745
19790
  return {
19746
19791
  getTextSelectorProp
@@ -23079,10 +23124,14 @@ const _sfc_main$1s = defineComponent({
23079
23124
  const toggleBreakDown = () => {
23080
23125
  openBreakDown.value = !openBreakDown.value;
23081
23126
  };
23082
- const formattedBalance = computed(() => {
23083
- var _a2, _b, _c;
23084
- return formatAmount((_c = (_b = (_a2 = props.wallet.walletInfo) == null ? void 0 : _a2.walletSummary) == null ? void 0 : _b.totalBalanceInfo) == null ? void 0 : _c.balance);
23085
- });
23127
+ const formattedBalance = computed(
23128
+ () => {
23129
+ var _a2, _b, _c;
23130
+ return formatAmount(
23131
+ (_c = (_b = (_a2 = props.wallet.walletInfo) == null ? void 0 : _a2.walletSummary) == null ? void 0 : _b.totalBalanceInfo) == null ? void 0 : _c.balance
23132
+ );
23133
+ }
23134
+ );
23086
23135
  const style = useCssModule();
23087
23136
  const walletDetail = computed(() => {
23088
23137
  var _a2, _b;
@@ -23229,18 +23278,22 @@ const _sfc_main$1r = defineComponent({
23229
23278
  var _a2, _b;
23230
23279
  return (_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.isYjCard;
23231
23280
  });
23232
- const isPPCard = computed(() => {
23233
- var _a2, _b;
23234
- return ((_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.ccType) === "PP_CARD";
23235
- });
23281
+ const isPPCard = computed(
23282
+ () => {
23283
+ var _a2, _b;
23284
+ return ((_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.ccType) === "PP_CARD";
23285
+ }
23286
+ );
23236
23287
  const isExpired = computed(() => {
23237
23288
  var _a2, _b;
23238
23289
  return (_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.isExpired;
23239
23290
  });
23240
- const isDisable = computed(() => {
23241
- var _a2, _b;
23242
- return ((_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.paymentMethodStatus) !== "ACTIVATED" || isExpired.value;
23243
- });
23291
+ const isDisable = computed(
23292
+ () => {
23293
+ var _a2, _b;
23294
+ return ((_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.paymentMethodStatus) !== "ACTIVATED" || isExpired.value;
23295
+ }
23296
+ );
23244
23297
  const authInfo = computed(() => {
23245
23298
  var _a2, _b;
23246
23299
  const authenticated2 = (_b = (_a2 = props.credit) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.isAuthenticated;
@@ -23283,10 +23336,15 @@ const _sfc_main$1r = defineComponent({
23283
23336
  style: props.round ? style.round : style.creditCard
23284
23337
  };
23285
23338
  });
23286
- const paymentMethodStatusText = computed(() => {
23287
- var _a2, _b;
23288
- return getPaymentMethodStatus((_a2 = isExpired.value) != null ? _a2 : false, (_b = props.credit) == null ? void 0 : _b.creditCardInfo);
23289
- });
23339
+ const paymentMethodStatusText = computed(
23340
+ () => {
23341
+ var _a2, _b;
23342
+ return getPaymentMethodStatus(
23343
+ (_a2 = isExpired.value) != null ? _a2 : false,
23344
+ (_b = props.credit) == null ? void 0 : _b.creditCardInfo
23345
+ );
23346
+ }
23347
+ );
23290
23348
  const additionalDescription = computed(() => {
23291
23349
  var _a2;
23292
23350
  return (_a2 = props.credit.paymentMethodDescriptionInfo) == null ? void 0 : _a2.additionalDescription;
@@ -23315,13 +23373,15 @@ const _sfc_main$1r = defineComponent({
23315
23373
  style,
23316
23374
  cardInfo: cardInfo2,
23317
23375
  additionalDescription,
23318
- payMethodDescriptionInfo: computed(() => {
23319
- var _a2, _b, _c, _d;
23320
- return [
23321
- (_b = (_a2 = props.credit) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
23322
- (_d = (_c = props.credit) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
23323
- ].filter((info2) => !!info2);
23324
- }),
23376
+ payMethodDescriptionInfo: computed(
23377
+ () => {
23378
+ var _a2, _b, _c, _d;
23379
+ return [
23380
+ (_b = (_a2 = props.credit) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
23381
+ (_d = (_c = props.credit) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
23382
+ ].filter((info2) => !!info2);
23383
+ }
23384
+ ),
23325
23385
  getMaintenanceStyle: computed(() => (info2) => {
23326
23386
  return {
23327
23387
  color: info2.color
@@ -23520,10 +23580,12 @@ const _sfc_main$1q = defineComponent({
23520
23580
  openUrl(info2.linkUrl);
23521
23581
  }
23522
23582
  };
23523
- const isDisable = computed(() => {
23524
- var _a2, _b;
23525
- return ((_b = (_a2 = props.bank) == null ? void 0 : _a2.bankInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
23526
- });
23583
+ const isDisable = computed(
23584
+ () => {
23585
+ var _a2, _b;
23586
+ return ((_b = (_a2 = props.bank) == null ? void 0 : _a2.bankInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
23587
+ }
23588
+ );
23527
23589
  const handleSelect = () => {
23528
23590
  if (isDisable == null ? void 0 : isDisable.value) {
23529
23591
  return;
@@ -23533,19 +23595,23 @@ const _sfc_main$1q = defineComponent({
23533
23595
  return {
23534
23596
  bankInfo: bankInfo2,
23535
23597
  isDisable,
23536
- paymentMethodStatusText: computed(() => {
23537
- var _a2;
23538
- return getPaymentMethodStatus(false, (_a2 = props.bank) == null ? void 0 : _a2.bankInfo);
23539
- }),
23598
+ paymentMethodStatusText: computed(
23599
+ () => {
23600
+ var _a2;
23601
+ return getPaymentMethodStatus(false, (_a2 = props.bank) == null ? void 0 : _a2.bankInfo);
23602
+ }
23603
+ ),
23540
23604
  getClass: (isDisable == null ? void 0 : isDisable.value) ? style.paymentMethodDisabled : "",
23541
23605
  style,
23542
- payMethodDescriptionInfo: computed(() => {
23543
- var _a2, _b, _c, _d;
23544
- return [
23545
- (_b = (_a2 = props.bank) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
23546
- (_d = (_c = props.bank) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
23547
- ].filter((info2) => !!info2);
23548
- }),
23606
+ payMethodDescriptionInfo: computed(
23607
+ () => {
23608
+ var _a2, _b, _c, _d;
23609
+ return [
23610
+ (_b = (_a2 = props.bank) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
23611
+ (_d = (_c = props.bank) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
23612
+ ].filter((info2) => !!info2);
23613
+ }
23614
+ ),
23549
23615
  getMaintenanceStyle: computed(() => (info2) => {
23550
23616
  return {
23551
23617
  color: info2.color
@@ -23686,10 +23752,12 @@ const _sfc_main$1p = defineComponent({
23686
23752
  openUrl(info2.linkUrl);
23687
23753
  }
23688
23754
  };
23689
- const isDisable = computed(() => {
23690
- var _a2, _b;
23691
- return ((_b = (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
23692
- });
23755
+ const isDisable = computed(
23756
+ () => {
23757
+ var _a2, _b;
23758
+ return ((_b = (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
23759
+ }
23760
+ );
23693
23761
  const handleSelect = () => {
23694
23762
  if (isDisable.value) {
23695
23763
  return;
@@ -23699,20 +23767,24 @@ const _sfc_main$1p = defineComponent({
23699
23767
  return {
23700
23768
  isDisable,
23701
23769
  images: getImages(),
23702
- paymentMethodStatusText: computed(() => {
23703
- var _a2;
23704
- return getPaymentMethodStatus(false, (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo);
23705
- }),
23770
+ paymentMethodStatusText: computed(
23771
+ () => {
23772
+ var _a2;
23773
+ return getPaymentMethodStatus(false, (_a2 = props.sbid) == null ? void 0 : _a2.sbidCarrierBillingInfo);
23774
+ }
23775
+ ),
23706
23776
  getClass: (isDisable == null ? void 0 : isDisable.value) ? style.paymentMethodDisabled : "",
23707
23777
  lg: getLanguage(),
23708
23778
  style,
23709
- payMethodDescriptionInfo: computed(() => {
23710
- var _a2, _b, _c, _d;
23711
- return [
23712
- (_b = (_a2 = props.sbid) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
23713
- (_d = (_c = props.sbid) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
23714
- ].filter((info2) => !!info2);
23715
- }),
23779
+ payMethodDescriptionInfo: computed(
23780
+ () => {
23781
+ var _a2, _b, _c, _d;
23782
+ return [
23783
+ (_b = (_a2 = props.sbid) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
23784
+ (_d = (_c = props.sbid) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
23785
+ ].filter((info2) => !!info2);
23786
+ }
23787
+ ),
23716
23788
  getMaintenanceStyle: computed(() => (info2) => {
23717
23789
  return {
23718
23790
  color: info2.color
@@ -23842,10 +23914,12 @@ const _sfc_main$1o = defineComponent({
23842
23914
  openUrl(info2.linkUrl);
23843
23915
  }
23844
23916
  };
23845
- const isDisable = computed(() => {
23846
- var _a2, _b;
23847
- return ((_b = (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
23848
- });
23917
+ const isDisable = computed(
23918
+ () => {
23919
+ var _a2, _b;
23920
+ return ((_b = (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.paymentMethodStatus) !== PaymentMethodStatus.ACTIVATED;
23921
+ }
23922
+ );
23849
23923
  const handleSelect = () => {
23850
23924
  if (isDisable.value) {
23851
23925
  return;
@@ -23853,24 +23927,30 @@ const _sfc_main$1o = defineComponent({
23853
23927
  emit("select");
23854
23928
  };
23855
23929
  return {
23856
- formattedBalance: computed(() => {
23857
- var _a2, _b;
23858
- return formatAmount((_b = (_a2 = props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.availableAmount);
23859
- }),
23930
+ formattedBalance: computed(
23931
+ () => {
23932
+ var _a2, _b;
23933
+ return formatAmount((_b = (_a2 = props.payLater) == null ? void 0 : _a2.payLaterCcInfo) == null ? void 0 : _b.availableAmount);
23934
+ }
23935
+ ),
23860
23936
  isDisable,
23861
23937
  images: getImages(),
23862
23938
  lg: getLanguage(),
23863
- paymentMethodStatusText: computed(() => {
23864
- var _a2;
23865
- return getPaymentMethodStatus(false, (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo);
23866
- }),
23867
- payMethodDescriptionInfo: computed(() => {
23868
- var _a2, _b, _c, _d;
23869
- return [
23870
- (_b = (_a2 = props.payLater) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
23871
- (_d = (_c = props.payLater) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
23872
- ].filter((info2) => !!info2);
23873
- }),
23939
+ paymentMethodStatusText: computed(
23940
+ () => {
23941
+ var _a2;
23942
+ return getPaymentMethodStatus(false, (_a2 = props == null ? void 0 : props.payLater) == null ? void 0 : _a2.payLaterCcInfo);
23943
+ }
23944
+ ),
23945
+ payMethodDescriptionInfo: computed(
23946
+ () => {
23947
+ var _a2, _b, _c, _d;
23948
+ return [
23949
+ (_b = (_a2 = props.payLater) == null ? void 0 : _a2.paymentMethodDescriptionInfo) == null ? void 0 : _b.statusDescription,
23950
+ (_d = (_c = props.payLater) == null ? void 0 : _c.paymentMethodDescriptionInfo) == null ? void 0 : _d.detailDescription
23951
+ ].filter((info2) => !!info2);
23952
+ }
23953
+ ),
23874
23954
  getMaintenanceStyle: computed(() => (info2) => {
23875
23955
  return {
23876
23956
  color: info2.color
@@ -24107,19 +24187,23 @@ const _sfc_main$1m = defineComponent({
24107
24187
  openUrl(linkUrl);
24108
24188
  }
24109
24189
  };
24110
- const textStyle = computed(() => {
24111
- var _a2, _b, _c;
24112
- return {
24113
- color: (_b = (_a2 = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _a2.color) != null ? _b : "#3895FF",
24114
- "font-weight": ((_c = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _c.isBold) ? "bold" : "normal"
24115
- };
24116
- });
24117
- const containerStyle = computed(() => {
24118
- var _a2, _b;
24119
- return {
24120
- backgroundColor: (_b = (_a2 = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _a2.backgroundColor) != null ? _b : "#E5F1FF"
24121
- };
24122
- });
24190
+ const textStyle = computed(
24191
+ () => {
24192
+ var _a2, _b, _c;
24193
+ return {
24194
+ color: (_b = (_a2 = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _a2.color) != null ? _b : "#3895FF",
24195
+ "font-weight": ((_c = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _c.isBold) ? "bold" : "normal"
24196
+ };
24197
+ }
24198
+ );
24199
+ const containerStyle = computed(
24200
+ () => {
24201
+ var _a2, _b;
24202
+ return {
24203
+ backgroundColor: (_b = (_a2 = props == null ? void 0 : props.maintenanceInfo) == null ? void 0 : _a2.backgroundColor) != null ? _b : "#E5F1FF"
24204
+ };
24205
+ }
24206
+ );
24123
24207
  return {
24124
24208
  handleClick,
24125
24209
  textStyle,
@@ -24322,7 +24406,10 @@ function initRoot(props, { emit }) {
24322
24406
  var _a2;
24323
24407
  const cancel2 = () => {
24324
24408
  var _a3, _b;
24325
- (_b = (_a3 = props.getUserAddressParams) == null ? void 0 : _a3.fail) == null ? void 0 : _b.call(_a3, createErrorCode(MiniAppErrorType.userCanceled));
24409
+ (_b = (_a3 = props.getUserAddressParams) == null ? void 0 : _a3.fail) == null ? void 0 : _b.call(
24410
+ _a3,
24411
+ createErrorCode(MiniAppErrorType.userCanceled)
24412
+ );
24326
24413
  emit("click");
24327
24414
  };
24328
24415
  const success2 = (address2) => {
@@ -24409,7 +24496,11 @@ const _sfc_main$1k = defineComponent({
24409
24496
  const edit = () => emit("edit", props.address);
24410
24497
  const postalCode = computed(() => {
24411
24498
  var _a2, _b, _c, _d;
24412
- return `\u3012${(_b = (_a2 = props.address.zip) == null ? void 0 : _a2.slice) == null ? void 0 : _b.call(_a2, 0, 3)}-${(_d = (_c = props.address.zip) == null ? void 0 : _c.slice) == null ? void 0 : _d.call(_c, 3)}`;
24499
+ return `\u3012${(_b = (_a2 = props.address.zip) == null ? void 0 : _a2.slice) == null ? void 0 : _b.call(
24500
+ _a2,
24501
+ 0,
24502
+ 3
24503
+ )}-${(_d = (_c = props.address.zip) == null ? void 0 : _c.slice) == null ? void 0 : _d.call(_c, 3)}`;
24413
24504
  });
24414
24505
  const addressText = computed(() => {
24415
24506
  return `${props.address.state}${props.address.city}${props.address.street1 || ""}`;
@@ -24485,16 +24576,16 @@ function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
24485
24576
  const cssModules$19 = {};
24486
24577
  cssModules$19["$style"] = style0$19;
24487
24578
  var Address = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1k], ["__cssModules", cssModules$19]]);
24488
- const rootUa = "_rootUa_natt4_1";
24489
- const button$6 = "_button_natt4_10";
24490
- const footer$6 = "_footer_natt4_14";
24491
- const addAddressLink = "_addAddressLink_natt4_20";
24492
- const arrowContainer = "_arrowContainer_natt4_30";
24493
- const root$7 = "_root_natt4_1";
24494
- const buttonLink$1 = "_buttonLink_natt4_49";
24495
- const arrow$1 = "_arrow_natt4_30";
24496
- const content$c = "_content_natt4_64";
24497
- const addIcon$1 = "_addIcon_natt4_74";
24579
+ const rootUa = "_rootUa_ivx7s_1";
24580
+ const button$6 = "_button_ivx7s_14";
24581
+ const footer$6 = "_footer_ivx7s_18";
24582
+ const addAddressLink = "_addAddressLink_ivx7s_24";
24583
+ const arrowContainer = "_arrowContainer_ivx7s_34";
24584
+ const root$7 = "_root_ivx7s_1";
24585
+ const buttonLink$1 = "_buttonLink_ivx7s_53";
24586
+ const arrow$1 = "_arrow_ivx7s_34";
24587
+ const content$c = "_content_ivx7s_68";
24588
+ const addIcon$1 = "_addIcon_ivx7s_78";
24498
24589
  var style0$18 = {
24499
24590
  rootUa,
24500
24591
  button: button$6,
@@ -24514,11 +24605,6 @@ const _sfc_main$1j = defineComponent({
24514
24605
  Button
24515
24606
  },
24516
24607
  props: {
24517
- isMakepayment: {
24518
- type: Boolean,
24519
- required: false,
24520
- default: false
24521
- },
24522
24608
  isNoaddress: {
24523
24609
  type: Boolean,
24524
24610
  required: false,
@@ -24559,7 +24645,7 @@ function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
24559
24645
  const _component_Button = resolveComponent("Button");
24560
24646
  const _component_Divider = resolveComponent("Divider");
24561
24647
  return openBlock(), createElementBlock(Fragment, null, [
24562
- !_ctx.isMakepayment && !_ctx.isDesktop ? (openBlock(), createElementBlock("div", _hoisted_1$H, [
24648
+ !_ctx.isDesktop ? (openBlock(), createElementBlock("div", _hoisted_1$H, [
24563
24649
  createBaseVNode("div", {
24564
24650
  class: normalizeClass(_ctx.style.footer),
24565
24651
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.add && _ctx.add(...args))
@@ -24593,7 +24679,7 @@ function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
24593
24679
  }, 8, ["disabled", "class"])
24594
24680
  ], 2)
24595
24681
  ])) : createCommentVNode("", true),
24596
- _ctx.isMakepayment || _ctx.isDesktop ? (openBlock(), createElementBlock("div", {
24682
+ _ctx.isDesktop ? (openBlock(), createElementBlock("div", {
24597
24683
  key: 1,
24598
24684
  class: normalizeClass(_ctx.style.root),
24599
24685
  style: normalizeStyle(_ctx.bottomStyle),
@@ -25007,27 +25093,25 @@ function useAddressControl() {
25007
25093
  confirmSelectedAddress
25008
25094
  };
25009
25095
  }
25010
- const root$5 = "_root_1jsx1_2";
25011
- const container$s = "_container_1jsx1_6";
25012
- const noAddressMessage = "_noAddressMessage_1jsx1_15";
25013
- const desktopTitle$1 = "_desktopTitle_1jsx1_18";
25014
- const contentContainerMp = "_contentContainerMp_1jsx1_28";
25015
- const contentContainer$2 = "_contentContainer_1jsx1_28";
25016
- const contentContainerMpNoAddress = "_contentContainerMpNoAddress_1jsx1_49";
25017
- const contentContainerNoAddress = "_contentContainerNoAddress_1jsx1_62";
25018
- const payAddressRoot = "_payAddressRoot_1jsx1_71";
25019
- const footerBtnContainer = "_footerBtnContainer_1jsx1_75";
25020
- const confirmBtn = "_confirmBtn_1jsx1_82";
25021
- const closeBtn = "_closeBtn_1jsx1_89";
25096
+ const root$5 = "_root_1i3em_2";
25097
+ const noAddressRoot = "_noAddressRoot_1i3em_15";
25098
+ const container$s = "_container_1i3em_27";
25099
+ const noAddressMessage = "_noAddressMessage_1i3em_36";
25100
+ const desktopTitle$1 = "_desktopTitle_1i3em_39";
25101
+ const contentContainerMp = "_contentContainerMp_1i3em_49";
25102
+ const contentContainer$2 = "_contentContainer_1i3em_49";
25103
+ const payAddressRoot = "_payAddressRoot_1i3em_62";
25104
+ const footerBtnContainer = "_footerBtnContainer_1i3em_66";
25105
+ const confirmBtn = "_confirmBtn_1i3em_73";
25106
+ const closeBtn = "_closeBtn_1i3em_80";
25022
25107
  var style0$13 = {
25023
25108
  root: root$5,
25109
+ noAddressRoot,
25024
25110
  container: container$s,
25025
25111
  noAddressMessage,
25026
25112
  desktopTitle: desktopTitle$1,
25027
25113
  contentContainerMp,
25028
25114
  contentContainer: contentContainer$2,
25029
- contentContainerMpNoAddress,
25030
- contentContainerNoAddress,
25031
25115
  payAddressRoot,
25032
25116
  footerBtnContainer,
25033
25117
  confirmBtn,
@@ -25086,7 +25170,11 @@ const _sfc_main$1e = defineComponent({
25086
25170
  addressList: props.addresses.slice(),
25087
25171
  showAddressList: !(isDesktop == null ? void 0 : isDesktop.value)
25088
25172
  });
25089
- setSelectedAddress$1((props == null ? void 0 : props.savedAddressId) || ((_a2 = props.addresses[0]) == null ? void 0 : _a2.id), state.addressList, props.isMakepayment);
25173
+ setSelectedAddress$1(
25174
+ (props == null ? void 0 : props.savedAddressId) || ((_a2 = props.addresses[0]) == null ? void 0 : _a2.id),
25175
+ state.addressList,
25176
+ props.isMakepayment
25177
+ );
25090
25178
  confirmSelectedAddress();
25091
25179
  const close2 = () => emit("close");
25092
25180
  const back2 = () => {
@@ -25105,13 +25193,23 @@ const _sfc_main$1e = defineComponent({
25105
25193
  if (props == null ? void 0 : props.isMakepayment) {
25106
25194
  emit("tooglelist");
25107
25195
  }
25108
- if ((confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) && state.addressList.filter((e) => {
25109
- var _a4;
25110
- return e.id === ((_a4 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a4.id);
25111
- }).length > 0) {
25112
- setSelectedAddress$1((_a3 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a3.id, state.addressList, props.isMakepayment);
25196
+ if ((confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) && state.addressList.filter(
25197
+ (e) => {
25198
+ var _a4;
25199
+ return e.id === ((_a4 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a4.id);
25200
+ }
25201
+ ).length > 0) {
25202
+ setSelectedAddress$1(
25203
+ (_a3 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a3.id,
25204
+ state.addressList,
25205
+ props.isMakepayment
25206
+ );
25113
25207
  } else {
25114
- setSelectedAddress$1((_b = state.addressList[0]) == null ? void 0 : _b.id, state.addressList, props.isMakepayment);
25208
+ setSelectedAddress$1(
25209
+ (_b = state.addressList[0]) == null ? void 0 : _b.id,
25210
+ state.addressList,
25211
+ props.isMakepayment
25212
+ );
25115
25213
  confirmSelectedAddress();
25116
25214
  }
25117
25215
  };
@@ -25125,31 +25223,40 @@ const _sfc_main$1e = defineComponent({
25125
25223
  watch(isDesktop, () => {
25126
25224
  state.showAddressList = !(isDesktop == null ? void 0 : isDesktop.value);
25127
25225
  });
25128
- watch(() => props.addresses, (newVal, oldval) => {
25129
- if (oldval.length === 0 && newVal.length === 1 && !props.isMakepayment) {
25130
- state.showAddressList = true;
25131
- }
25132
- state.addressList = newVal.slice();
25133
- if (selectedAddress.value) {
25134
- const address2 = state.addressList.find((a) => {
25135
- var _a3;
25136
- return a.id === ((_a3 = selectedAddress == null ? void 0 : selectedAddress.value) == null ? void 0 : _a3.id);
25137
- });
25138
- if (address2) {
25139
- setSelectedAddress$1(address2 == null ? void 0 : address2.id, state.addressList, props.isMakepayment);
25140
- if (props.isMakepayment) {
25141
- emit("updateAddress", {
25142
- selectedAddress: address2,
25143
- addresses: state.addressList
25144
- });
25226
+ watch(
25227
+ () => props.addresses,
25228
+ (newVal, oldval) => {
25229
+ if (oldval.length === 0 && newVal.length === 1 && !props.isMakepayment) {
25230
+ state.showAddressList = true;
25231
+ }
25232
+ state.addressList = newVal.slice();
25233
+ if (selectedAddress.value) {
25234
+ const address2 = state.addressList.find(
25235
+ (a) => {
25236
+ var _a3;
25237
+ return a.id === ((_a3 = selectedAddress == null ? void 0 : selectedAddress.value) == null ? void 0 : _a3.id);
25238
+ }
25239
+ );
25240
+ if (address2) {
25241
+ setSelectedAddress$1(
25242
+ address2 == null ? void 0 : address2.id,
25243
+ state.addressList,
25244
+ props.isMakepayment
25245
+ );
25246
+ if (props.isMakepayment) {
25247
+ emit("updateAddress", {
25248
+ selectedAddress: address2,
25249
+ addresses: state.addressList
25250
+ });
25251
+ }
25252
+ } else {
25253
+ resetSelectedAddress();
25145
25254
  }
25146
25255
  } else {
25147
25256
  resetSelectedAddress();
25148
25257
  }
25149
- } else {
25150
- resetSelectedAddress();
25151
25258
  }
25152
- });
25259
+ );
25153
25260
  const resetSelectedAddress = () => {
25154
25261
  var _a3;
25155
25262
  if (((_a3 = state.addressList) == null ? void 0 : _a3.length) >= 1) {
@@ -25172,10 +25279,8 @@ const _sfc_main$1e = defineComponent({
25172
25279
  state.selected = true;
25173
25280
  setSelectedAddress$1(address2 == null ? void 0 : address2.id, state.addressList, props.isMakepayment);
25174
25281
  setTimeout(() => {
25175
- if (props.isMakepayment || !(isDesktop == null ? void 0 : isDesktop.value)) {
25176
- if (isDesktop == null ? void 0 : isDesktop.value) {
25177
- hideAddresses();
25178
- }
25282
+ if (props.isMakepayment && (isDesktop == null ? void 0 : isDesktop.value)) {
25283
+ hideAddresses();
25179
25284
  if (props.isMakepayment) {
25180
25285
  emit("chooseAddress", address2);
25181
25286
  }
@@ -25185,22 +25290,34 @@ const _sfc_main$1e = defineComponent({
25185
25290
  const confirmSuccess = () => {
25186
25291
  var _a3;
25187
25292
  (selectedAddress == null ? void 0 : selectedAddress.value) && setSelectedAddress((_a3 = selectedAddress == null ? void 0 : selectedAddress.value) == null ? void 0 : _a3.id);
25188
- emit("success", selectedAddress == null ? void 0 : selectedAddress.value);
25293
+ if (props.isMakepayment && !(isDesktop == null ? void 0 : isDesktop.value)) {
25294
+ emit("chooseAddress", selectedAddress == null ? void 0 : selectedAddress.value);
25295
+ } else {
25296
+ emit("success", selectedAddress == null ? void 0 : selectedAddress.value);
25297
+ }
25189
25298
  };
25190
25299
  const confirm = () => {
25191
25300
  var _a3;
25192
25301
  if (confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) {
25193
- setSelectedAddress((_a3 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a3.id).catch(() => {
25194
- });
25302
+ setSelectedAddress((_a3 = confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value) == null ? void 0 : _a3.id).catch(
25303
+ () => {
25304
+ }
25305
+ );
25195
25306
  if (props.isMakepayment) {
25196
- setSelectedAddress$1(confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value.id, state.addressList, props.isMakepayment);
25307
+ setSelectedAddress$1(
25308
+ confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value.id,
25309
+ state.addressList,
25310
+ props.isMakepayment
25311
+ );
25197
25312
  emit("chooseAddress", confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value);
25198
25313
  } else {
25199
25314
  emit("success", confirmedSelectedAddress == null ? void 0 : confirmedSelectedAddress.value);
25200
25315
  }
25201
25316
  }
25202
25317
  };
25203
- const showsNoRegisteredAddressMessage = computed(() => props.addresses.length === 0);
25318
+ const showsNoRegisteredAddressMessage = computed(
25319
+ () => props.addresses.length === 0
25320
+ );
25204
25321
  const style = useCssModule();
25205
25322
  return {
25206
25323
  style,
@@ -25238,7 +25355,7 @@ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
25238
25355
  const _directive_vertical_scroll = resolveDirective("vertical-scroll");
25239
25356
  return openBlock(), createElementBlock("div", {
25240
25357
  class: normalizeClass([
25241
- _ctx.style.root,
25358
+ _ctx.addresses.length > 0 ? _ctx.style.root : _ctx.style.noAddressRoot,
25242
25359
  _ctx.isMakepayment && _ctx.isDesktop ? _ctx.style.payAddressRoot : ""
25243
25360
  ])
25244
25361
  }, [
@@ -25261,10 +25378,8 @@ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
25261
25378
  withDirectives((openBlock(), createElementBlock("div", {
25262
25379
  class: normalizeClass({
25263
25380
  [_ctx.style.container]: true,
25264
- [_ctx.style.contentContainer]: _ctx.addresses.length > 0 && !_ctx.isMakepayment,
25265
- [_ctx.style.contentContainerMp]: _ctx.isMakepayment && _ctx.addresses.length > 0,
25266
- [_ctx.style.contentContainerNoAddress]: _ctx.addresses.length === 0 && !_ctx.isMakepayment,
25267
- [_ctx.style.contentContainerMpNoAddress]: _ctx.isMakepayment && _ctx.addresses.length === 0
25381
+ [_ctx.style.contentContainer]: true,
25382
+ [_ctx.style.contentContainerMp]: _ctx.isMakepayment
25268
25383
  })
25269
25384
  }, [
25270
25385
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.addresses, (address2) => {
@@ -25286,12 +25401,11 @@ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
25286
25401
  [_directive_vertical_scroll]
25287
25402
  ]),
25288
25403
  createVNode(_component_Footer, {
25289
- "is-makepayment": _ctx.isMakepayment,
25290
25404
  "is-noaddress": _ctx.showsNoRegisteredAddressMessage,
25291
25405
  onClose: _ctx.close,
25292
25406
  onAdd: _ctx.add,
25293
25407
  onConfirm: _ctx.confirmSuccess
25294
- }, null, 8, ["is-makepayment", "is-noaddress", "onClose", "onAdd", "onConfirm"]),
25408
+ }, null, 8, ["is-noaddress", "onClose", "onAdd", "onConfirm"]),
25295
25409
  _ctx.isDesktop && !_ctx.isMakepayment ? (openBlock(), createElementBlock("div", {
25296
25410
  key: 1,
25297
25411
  class: normalizeClass(_ctx.style.footerBtnContainer)
@@ -25973,18 +26087,21 @@ const _sfc_main$1d = defineComponent({
25973
26087
  open: props.show
25974
26088
  });
25975
26089
  const { isMobile, isDesktop } = useBreakpoints();
25976
- watch(() => props.show, (newShow, oldOpen) => {
25977
- if (oldOpen === false && newShow === true) {
25978
- setTimeout(() => {
25979
- state.open = true;
25980
- }, 50);
25981
- }
25982
- if (oldOpen === true && newShow === false) {
25983
- setTimeout(() => {
25984
- state.open = false;
25985
- }, 300);
26090
+ watch(
26091
+ () => props.show,
26092
+ (newShow, oldOpen) => {
26093
+ if (oldOpen === false && newShow === true) {
26094
+ setTimeout(() => {
26095
+ state.open = true;
26096
+ }, 50);
26097
+ }
26098
+ if (oldOpen === true && newShow === false) {
26099
+ setTimeout(() => {
26100
+ state.open = false;
26101
+ }, 300);
26102
+ }
25986
26103
  }
25987
- });
26104
+ );
25988
26105
  const style = useCssModule();
25989
26106
  const paddingBottom = computed(() => {
25990
26107
  const { bottomHeightProperty } = useGetHeightProperties();
@@ -26259,7 +26376,9 @@ const initialFormState = {
26259
26376
  country: "jp",
26260
26377
  tags: []
26261
26378
  };
26262
- const formKeys = Object.keys(initialFormState);
26379
+ const formKeys = Object.keys(
26380
+ initialFormState
26381
+ );
26263
26382
  function transformToZip(str) {
26264
26383
  if ((str == null ? void 0 : str.length) <= 3) {
26265
26384
  return str;
@@ -26270,7 +26389,7 @@ const createInitialState = (address2) => {
26270
26389
  if (!address2) {
26271
26390
  const visibilities2 = {};
26272
26391
  formKeys.forEach((keyName) => visibilities2[keyName] = true);
26273
- return __spreadProps(__spreadValues({}, initialFormState), { visibilities: visibilities2 });
26392
+ return { ...initialFormState, visibilities: visibilities2 };
26274
26393
  }
26275
26394
  const formValues = {};
26276
26395
  const kyc = address2 == null ? void 0 : address2.kyc;
@@ -26281,11 +26400,14 @@ const createInitialState = (address2) => {
26281
26400
  formValues[keyName] = formValue != null ? formValue : "";
26282
26401
  visibilities[keyName] = kyc ? !!formValue : true;
26283
26402
  });
26284
- return __spreadProps(__spreadValues(__spreadValues({}, initialFormState), __spreadProps(__spreadValues({}, formValues), {
26285
- zip: transformToZip(formValues.zip)
26286
- })), {
26403
+ return {
26404
+ ...initialFormState,
26405
+ ...{
26406
+ ...formValues,
26407
+ zip: transformToZip(formValues.zip)
26408
+ },
26287
26409
  visibilities
26288
- });
26410
+ };
26289
26411
  };
26290
26412
  function isEditOk(state) {
26291
26413
  const fillOK = ["title", "receiver", "zip", "city", "state", "street1"].every((key2) => state[key2]);
@@ -26338,9 +26460,10 @@ const _sfc_main$1b = defineComponent({
26338
26460
  },
26339
26461
  setup(props, { emit }) {
26340
26462
  const style = useCssModule();
26341
- const state = reactive(__spreadProps(__spreadValues({}, createInitialState(props.address)), {
26463
+ const state = reactive({
26464
+ ...createInitialState(props.address),
26342
26465
  isEdit: false
26343
- }));
26466
+ });
26344
26467
  const lg2 = getLanguage();
26345
26468
  const zipAddress = ref(state.zip);
26346
26469
  const buttonDisabled = ref(!isEditOk(state));
@@ -26386,7 +26509,7 @@ const _sfc_main$1b = defineComponent({
26386
26509
  }
26387
26510
  });
26388
26511
  const submit = () => {
26389
- const plainState = __spreadValues({}, state);
26512
+ const plainState = { ...state };
26390
26513
  plainState.zip = plainState.zip.replace(/-/g, "");
26391
26514
  delete plainState.visibilities;
26392
26515
  emit("submit", plainState);
@@ -26721,9 +26844,10 @@ const _sfc_main$19 = defineComponent({
26721
26844
  if (props.heightStyle) {
26722
26845
  const isEdit = props.address || isNative ? {} : { position: "fixed" };
26723
26846
  return {
26724
- rootHeight: __spreadValues({
26725
- height: (_a2 = props.heightStyle) == null ? void 0 : _a2.maxHeight
26726
- }, isEdit),
26847
+ rootHeight: {
26848
+ height: (_a2 = props.heightStyle) == null ? void 0 : _a2.maxHeight,
26849
+ ...isEdit
26850
+ },
26727
26851
  contentStyle: {
26728
26852
  maxHeight: `calc(${(_b = props.heightStyle) == null ? void 0 : _b.maxHeight} - (${statusHeightNone} + ${bottomHeightProperty} + 64px))`
26729
26853
  }
@@ -26804,8 +26928,7 @@ function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
26804
26928
  type: "secondary",
26805
26929
  "forbidden-swipe": "",
26806
26930
  style: normalizeStyle(_ctx.heightStyles.rootHeight),
26807
- class: normalizeClass([_ctx.style.wrapperClass, _ctx.style.container]),
26808
- "data-testid": "add-address-sheet"
26931
+ class: normalizeClass([_ctx.style.wrapperClass, _ctx.style.container])
26809
26932
  }, {
26810
26933
  default: withCtx(() => [
26811
26934
  _ctx.isDesktop ? (openBlock(), createBlock(_component_DesktopHeader, {
@@ -26821,6 +26944,7 @@ function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
26821
26944
  "right-icon": _ctx.kycAddress,
26822
26945
  "title-class-name": _ctx.style.header,
26823
26946
  "full-fill": "",
26947
+ "data-testid": "add-address-sheet-header",
26824
26948
  onClick: _ctx.close,
26825
26949
  onRightClick: _ctx.openDeleteSheet
26826
26950
  }, null, 8, ["class", "title", "right-icon", "title-class-name", "onClick", "onRightClick"]),
@@ -26887,18 +27011,22 @@ function initErrorHandling() {
26887
27011
  function getErrorHandling() {
26888
27012
  return inject(KEY);
26889
27013
  }
26890
- const wrapperClass$9 = "_wrapperClass_1s0yt_7";
26891
- const container$o = "_container_1s0yt_7";
26892
- const payAddressCotainer = "_payAddressCotainer_1s0yt_19";
26893
- const maxHeightNoAddress = "_maxHeightNoAddress_1s0yt_25";
26894
- const addressSheet = "_addressSheet_1s0yt_29";
26895
- const actionSheet$2 = "_actionSheet_1s0yt_35";
27014
+ const wrapperClass$9 = "_wrapperClass_1dkog_7";
27015
+ const container$o = "_container_1dkog_7";
27016
+ const payAddressCotainer = "_payAddressCotainer_1dkog_19";
27017
+ const maxHeightNoAddress = "_maxHeightNoAddress_1dkog_25";
27018
+ const maxHeightNoAddressMakePaymentBeforeOpen = "_maxHeightNoAddressMakePaymentBeforeOpen_1dkog_30";
27019
+ const maxHeightNoAddressMakePaymentBeforeClose = "_maxHeightNoAddressMakePaymentBeforeClose_1dkog_35";
27020
+ const addressSheet = "_addressSheet_1dkog_39";
27021
+ const actionSheet$2 = "_actionSheet_1dkog_45";
26896
27022
  var style0$Z = {
26897
- "ppmna-default-font": "_ppmna-default-font_1s0yt_1",
27023
+ "ppmna-default-font": "_ppmna-default-font_1dkog_1",
26898
27024
  wrapperClass: wrapperClass$9,
26899
27025
  container: container$o,
26900
27026
  payAddressCotainer,
26901
27027
  maxHeightNoAddress,
27028
+ maxHeightNoAddressMakePaymentBeforeOpen,
27029
+ maxHeightNoAddressMakePaymentBeforeClose,
26902
27030
  addressSheet,
26903
27031
  actionSheet: actionSheet$2
26904
27032
  };
@@ -26930,12 +27058,25 @@ const _sfc_main$18 = defineComponent({
26930
27058
  setup(props) {
26931
27059
  const { handleError: handleError2 } = getErrorHandling();
26932
27060
  const { pageTransition, headerHeight } = useUIControl();
26933
- const { isDesktop } = useBreakpoints();
27061
+ const { isDesktop, isMobile } = useBreakpoints();
26934
27062
  const state = reactive({
26935
27063
  addSheetLoading: false,
26936
27064
  addressList: props.addresses.slice(),
26937
- addSheetState: pageTransition.showAddSheet.value
27065
+ addSheetState: pageTransition.showAddSheet.value,
27066
+ fullScreenDisplaySheet: false
26938
27067
  });
27068
+ const showAddSheetFirst = computed(
27069
+ () => isMobile.value && props.isMakepayment && state.addressList.length === 0
27070
+ );
27071
+ watch(
27072
+ () => props.show,
27073
+ (newVal, _oldVal) => {
27074
+ if (newVal && showAddSheetFirst.value) {
27075
+ pageTransition.openAddSheet();
27076
+ state.addSheetState = true;
27077
+ }
27078
+ }
27079
+ );
26939
27080
  const root2 = getRoot();
26940
27081
  const addAddress2 = async (formValue) => {
26941
27082
  var _a2, _b, _c;
@@ -26950,7 +27091,15 @@ const _sfc_main$18 = defineComponent({
26950
27091
  close2();
26951
27092
  state.addSheetLoading = false;
26952
27093
  if ((addressListResponse == null ? void 0 : addressListResponse.ppFetchResult) === "success" && res.ppFetchResult === "success") {
26953
- state.addressList = (_c = (_b = (_a2 = addressListResponse == null ? void 0 : addressListResponse.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.addresses;
27094
+ const addressList = (_c = (_b = (_a2 = addressListResponse == null ? void 0 : addressListResponse.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.addresses;
27095
+ let timeout = 0;
27096
+ if (showAddSheetFirst.value) {
27097
+ timeout = 300;
27098
+ root2.chooseAddress(addressList[0]);
27099
+ }
27100
+ setTimeout(() => {
27101
+ state.addressList = addressList;
27102
+ }, timeout);
26954
27103
  } else {
26955
27104
  return handleError2();
26956
27105
  }
@@ -26972,8 +27121,13 @@ const _sfc_main$18 = defineComponent({
26972
27121
  triggerLayoutUpdate(true);
26973
27122
  };
26974
27123
  const close2 = () => {
27124
+ if (showAddSheetFirst.value) {
27125
+ state.fullScreenDisplaySheet = true;
27126
+ root2.back();
27127
+ }
26975
27128
  pageTransition.closeAddSheet();
26976
27129
  setTimeout(() => {
27130
+ state.fullScreenDisplaySheet = false;
26977
27131
  state.addSheetState = false;
26978
27132
  }, 300);
26979
27133
  triggerLayoutUpdate();
@@ -26995,7 +27149,9 @@ const _sfc_main$18 = defineComponent({
26995
27149
  addOrEdit,
26996
27150
  triggerLayoutUpdate,
26997
27151
  close: close2,
26998
- addSheetState: computed(() => state.addSheetState)
27152
+ addSheetState: computed(() => state.addSheetState),
27153
+ fullScreenDisplaySheet: computed(() => state.fullScreenDisplaySheet),
27154
+ showAddSheetFirst
26999
27155
  };
27000
27156
  }
27001
27157
  });
@@ -27006,13 +27162,14 @@ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
27006
27162
  return openBlock(), createBlock(_component_ActionSheet, {
27007
27163
  show: _ctx.show,
27008
27164
  style: normalizeStyle([
27009
- _ctx.pageTransition.showAddSheet.value ? { borderRadius: "0px!important" } : {}
27165
+ _ctx.pageTransition.showAddSheet.value && !_ctx.showAddSheetFirst ? { borderRadius: "0px!important" } : {}
27010
27166
  ]),
27011
27167
  class: normalizeClass([
27012
27168
  _ctx.$style.wrapperClass,
27013
27169
  _ctx.$style.addressSheet,
27014
27170
  { [_ctx.$style.actionSheet]: _ctx.isDesktopPay }
27015
27171
  ]),
27172
+ type: _ctx.showAddSheetFirst ? "secondary" : "primary",
27016
27173
  "no-overlay": _ctx.isDesktopPay,
27017
27174
  appear: !_ctx.isDesktopPay,
27018
27175
  onClose: _ctx.root.cancel
@@ -27022,7 +27179,9 @@ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
27022
27179
  class: normalizeClass({
27023
27180
  [_ctx.$style.container]: true,
27024
27181
  [_ctx.$style.payAddressCotainer]: _ctx.isDesktopPay,
27025
- [_ctx.$style.maxHeightNoAddress]: !_ctx.pageTransition.showAddSheet.value && _ctx.addressList.length === 0
27182
+ [_ctx.$style.maxHeightNoAddress]: !_ctx.pageTransition.showAddSheet.value && _ctx.addressList.length === 0,
27183
+ [_ctx.$style.maxHeightNoAddressMakePaymentBeforeOpen]: _ctx.showAddSheetFirst,
27184
+ [_ctx.$style.maxHeightNoAddressMakePaymentBeforeClose]: _ctx.fullScreenDisplaySheet
27026
27185
  }),
27027
27186
  style: normalizeStyle(_ctx.headerHeight)
27028
27187
  }, [
@@ -27053,7 +27212,7 @@ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
27053
27212
  ], 6)
27054
27213
  ]),
27055
27214
  _: 1
27056
- }, 8, ["show", "style", "class", "no-overlay", "appear", "onClose"]);
27215
+ }, 8, ["show", "style", "class", "type", "no-overlay", "appear", "onClose"]);
27057
27216
  }
27058
27217
  const cssModules$Z = {};
27059
27218
  cssModules$Z["$style"] = style0$Z;
@@ -27203,18 +27362,21 @@ var style0$Y = {
27203
27362
  function useHandler(context) {
27204
27363
  const createAnime = (s) => {
27205
27364
  s.play();
27206
- context.emit("animationEnd", new Promise((resolve2) => {
27207
- const end = () => {
27208
- if (s == null ? void 0 : s.renderer) {
27209
- s.removeEventListener("complete", end);
27210
- }
27211
- resolve2(true);
27212
- };
27213
- s.addEventListener("complete", end);
27214
- setTimeout(() => {
27215
- end();
27216
- }, 1e3);
27217
- }));
27365
+ context.emit(
27366
+ "animationEnd",
27367
+ new Promise((resolve2) => {
27368
+ const end = () => {
27369
+ if (s == null ? void 0 : s.renderer) {
27370
+ s.removeEventListener("complete", end);
27371
+ }
27372
+ resolve2(true);
27373
+ };
27374
+ s.addEventListener("complete", end);
27375
+ setTimeout(() => {
27376
+ end();
27377
+ }, 1e3);
27378
+ })
27379
+ );
27218
27380
  };
27219
27381
  return {
27220
27382
  clickPayment: () => context.emit("pay"),
@@ -27368,18 +27530,29 @@ const _sfc_main$16 = defineComponent({
27368
27530
  onMounted(() => {
27369
27531
  handleHeightChange();
27370
27532
  });
27371
- watch(() => props.loading, (newvalue, oldValue) => {
27372
- if (!newvalue && oldValue) {
27533
+ watch(
27534
+ () => props.loading,
27535
+ (newvalue, oldValue) => {
27536
+ if (!newvalue && oldValue) {
27537
+ handleHeightChange();
27538
+ }
27539
+ }
27540
+ );
27541
+ watch(
27542
+ () => windowHeight == null ? void 0 : windowHeight.value,
27543
+ () => {
27373
27544
  handleHeightChange();
27374
27545
  }
27375
- });
27376
- watch(() => windowHeight == null ? void 0 : windowHeight.value, () => {
27377
- handleHeightChange();
27378
- });
27546
+ );
27379
27547
  const handleHeightChange = () => {
27380
27548
  setTimeout(() => {
27381
27549
  if (isDesktop.value && (makePayment2 == null ? void 0 : makePayment2.value)) {
27382
- state.isScrollable = handleHeightResize(makePayment2 == null ? void 0 : makePayment2.value, windowHeight == null ? void 0 : windowHeight.value, state.isScrollable, 161);
27550
+ state.isScrollable = handleHeightResize(
27551
+ makePayment2 == null ? void 0 : makePayment2.value,
27552
+ windowHeight == null ? void 0 : windowHeight.value,
27553
+ state.isScrollable,
27554
+ 161
27555
+ );
27383
27556
  }
27384
27557
  }, 0);
27385
27558
  };
@@ -27390,17 +27563,20 @@ const _sfc_main$16 = defineComponent({
27390
27563
  handleHeightChange();
27391
27564
  }
27392
27565
  };
27393
- return __spreadProps(__spreadValues({}, handlers), {
27566
+ return {
27567
+ ...handlers,
27394
27568
  formattedPrice,
27395
27569
  style,
27396
27570
  isSufficient,
27397
27571
  images: images2,
27398
27572
  lg: lg2,
27399
27573
  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
- var _a3, _b2, _c2, _d, _e, _f, _g;
27402
- 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;
27403
- }),
27574
+ disablePay: computed(
27575
+ () => {
27576
+ var _a3, _b2, _c2, _d, _e, _f, _g;
27577
+ 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;
27578
+ }
27579
+ ),
27404
27580
  isMobile,
27405
27581
  isDesktop,
27406
27582
  select: select2,
@@ -27410,7 +27586,7 @@ const _sfc_main$16 = defineComponent({
27410
27586
  isScrollable: computed(() => state.isScrollable),
27411
27587
  handleUpdate,
27412
27588
  updateAddress
27413
- });
27589
+ };
27414
27590
  }
27415
27591
  });
27416
27592
  const _hoisted_1$D = ["src"];
@@ -28495,12 +28671,15 @@ const _sfc_main$11 = defineComponent({
28495
28671
  countDown.reset();
28496
28672
  }
28497
28673
  });
28498
- watch(() => props.hasCashBackAnimation, (newValue, oldValue) => {
28499
- if (!newValue && oldValue && isDesktop.value) {
28500
- countDown.start();
28501
- isCountDown.value = true;
28674
+ watch(
28675
+ () => props.hasCashBackAnimation,
28676
+ (newValue, oldValue) => {
28677
+ if (!newValue && oldValue && isDesktop.value) {
28678
+ countDown.start();
28679
+ isCountDown.value = true;
28680
+ }
28502
28681
  }
28503
- });
28682
+ );
28504
28683
  const openCashBackDetailList = () => {
28505
28684
  state.showCashBackDetailList = true;
28506
28685
  countDown.reset();
@@ -28542,11 +28721,15 @@ const _sfc_main$11 = defineComponent({
28542
28721
  createAnime,
28543
28722
  merchantName: computed(() => props.paymentResult.merchantName),
28544
28723
  paymentId: paymentId2,
28545
- price: computed(() => {
28546
- var _a3, _b;
28547
- return numberWithCommas((_b = (_a3 = props.paymentResult) == null ? void 0 : _a3.amount) == null ? void 0 : _b.amount);
28548
- }),
28549
- statusLabelColor: computed(() => props.paymentResult.statusLabelColor.toLowerCase()),
28724
+ price: computed(
28725
+ () => {
28726
+ var _a3, _b;
28727
+ return numberWithCommas((_b = (_a3 = props.paymentResult) == null ? void 0 : _a3.amount) == null ? void 0 : _b.amount);
28728
+ }
28729
+ ),
28730
+ statusLabelColor: computed(
28731
+ () => props.paymentResult.statusLabelColor.toLowerCase()
28732
+ ),
28550
28733
  labelText: computed(() => props.paymentResult.statusLabelString),
28551
28734
  click,
28552
28735
  copy,
@@ -28558,9 +28741,15 @@ const _sfc_main$11 = defineComponent({
28558
28741
  showCashBackDetailRow,
28559
28742
  style,
28560
28743
  storeImage: storeImage2,
28561
- preAuthExpDate: computed(() => getDateStringFromTimeStamp(props.paymentResult.expiresAt)),
28562
- acceptedAt: computed(() => getDateStringFromTimeStamp(props.paymentResult.acceptedAt)),
28563
- isCloseButtonDisabled: computed(() => props.hasCashBackAnimation && (!props.hasConfirmAge && isDesktop.value || isMobile.value)),
28744
+ preAuthExpDate: computed(
28745
+ () => getDateStringFromTimeStamp(props.paymentResult.expiresAt)
28746
+ ),
28747
+ acceptedAt: computed(
28748
+ () => getDateStringFromTimeStamp(props.paymentResult.acceptedAt)
28749
+ ),
28750
+ isCloseButtonDisabled: computed(
28751
+ () => props.hasCashBackAnimation && (!props.hasConfirmAge && isDesktop.value || isMobile.value)
28752
+ ),
28564
28753
  paymentText,
28565
28754
  images: images2,
28566
28755
  isDesktop: computed(() => isDesktop.value),
@@ -29354,10 +29543,12 @@ cssModules$N["$style"] = style0$N;
29354
29543
  var FloatingButton = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$X], ["__cssModules", cssModules$N]]);
29355
29544
  function useData$1(props) {
29356
29545
  var _a2, _b;
29357
- const animation = computed(() => {
29358
- var _a3, _b2;
29359
- return (_b2 = (_a3 = props.cashBackDetail) == null ? void 0 : _a3.animationInfoList) == null ? void 0 : _b2[0];
29360
- });
29546
+ const animation = computed(
29547
+ () => {
29548
+ var _a3, _b2;
29549
+ return (_b2 = (_a3 = props.cashBackDetail) == null ? void 0 : _a3.animationInfoList) == null ? void 0 : _b2[0];
29550
+ }
29551
+ );
29361
29552
  const uiState = reactive({
29362
29553
  showFullscreenContent: false,
29363
29554
  showContent: false,
@@ -29456,7 +29647,7 @@ function createPinia() {
29456
29647
  _p,
29457
29648
  _a: null,
29458
29649
  _e: scope,
29459
- _s: new Map(),
29650
+ _s: /* @__PURE__ */ new Map(),
29460
29651
  state
29461
29652
  });
29462
29653
  return pinia;
@@ -29653,7 +29844,10 @@ function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore)
29653
29844
  },
29654
29845
  $dispose
29655
29846
  };
29656
- const store = reactive(assign({}, partialStore));
29847
+ const store = reactive(assign(
29848
+ {},
29849
+ partialStore
29850
+ ));
29657
29851
  pinia._s.set($id, store);
29658
29852
  const setupStore = pinia._e.run(() => {
29659
29853
  scope = effectScope();
@@ -29828,12 +30022,17 @@ function isAvailableTopupMethod(paymentMethod2) {
29828
30022
  return isActivatedMethod(paymentMethod2);
29829
30023
  }
29830
30024
  function hasAvailableTopupMethod(paymentMethods) {
29831
- return paymentMethods.some((paymentMethod2) => isAvailableTopupMethod(paymentMethod2));
30025
+ return paymentMethods.some(
30026
+ (paymentMethod2) => isAvailableTopupMethod(paymentMethod2)
30027
+ );
29832
30028
  }
29833
30029
  function findFirstValidMethod(paymentMethods) {
29834
30030
  if ((paymentMethods == null ? void 0 : paymentMethods.length) > 0) {
29835
30031
  for (let index2 = 0; index2 < paymentMethods.length; index2++) {
29836
- if (isValidPaymentMethod(paymentMethods[index2].paymentMethodId, paymentMethods)) {
30032
+ if (isValidPaymentMethod(
30033
+ paymentMethods[index2].paymentMethodId,
30034
+ paymentMethods
30035
+ )) {
29837
30036
  return index2;
29838
30037
  }
29839
30038
  }
@@ -29844,7 +30043,9 @@ function findFirstValidMethod(paymentMethods) {
29844
30043
  }
29845
30044
  function isValidPaymentMethod(savedMethodId, paymentMethods) {
29846
30045
  if (savedMethodId) {
29847
- const payMethod = paymentMethods.find((method2) => method2.paymentMethodId === savedMethodId);
30046
+ const payMethod = paymentMethods.find(
30047
+ (method2) => method2.paymentMethodId === savedMethodId
30048
+ );
29848
30049
  if (!payMethod) {
29849
30050
  return false;
29850
30051
  }
@@ -30021,7 +30222,11 @@ const useMakePaymentStore = defineStore("makePayment", {
30021
30222
  },
30022
30223
  async executePayment(props, paymentMethod2, selectedAddress) {
30023
30224
  this.uiState.paying = true;
30024
- const res = await this.private_payment(props, paymentMethod2, this.uiState.duplicatePayment);
30225
+ const res = await this.private_payment(
30226
+ props,
30227
+ paymentMethod2,
30228
+ this.uiState.duplicatePayment
30229
+ );
30025
30230
  if (!res) {
30026
30231
  return;
30027
30232
  }
@@ -30041,7 +30246,9 @@ const useMakePaymentStore = defineStore("makePayment", {
30041
30246
  }
30042
30247
  }
30043
30248
  this.paymentMethodState.amountForTopup = beforeTopupAndPayParams.amount;
30044
- const isDuplicateTopup = checkDuplicateTopup(this.paymentMethodState.amountForTopup);
30249
+ const isDuplicateTopup = checkDuplicateTopup(
30250
+ this.paymentMethodState.amountForTopup
30251
+ );
30045
30252
  if (isDuplicateTopup) {
30046
30253
  this.uiState.showDuplicateTopup = true;
30047
30254
  this.uiState.duplicateTopup = true;
@@ -30096,7 +30303,10 @@ const useMakePaymentStore = defineStore("makePayment", {
30096
30303
  this.private_sendComplete();
30097
30304
  },
30098
30305
  sendComplete() {
30099
- console.assert(this.result.success || this.result.fail, "neither success nor fail is called");
30306
+ console.assert(
30307
+ this.result.success || this.result.fail,
30308
+ "neither success nor fail is called"
30309
+ );
30100
30310
  this.private_sendComplete();
30101
30311
  },
30102
30312
  confirmCloseConfirmation() {
@@ -30115,12 +30325,13 @@ const useMakePaymentStore = defineStore("makePayment", {
30115
30325
  const year = parseInt(_date[0]);
30116
30326
  const month = parseInt(_date[1]);
30117
30327
  const date = parseInt(_date[2]);
30118
- const req = __spreadProps(__spreadValues({}, params), {
30328
+ const req = {
30329
+ ...params,
30119
30330
  year,
30120
30331
  month,
30121
30332
  date,
30122
30333
  orderType: "ACQUIRING"
30123
- });
30334
+ };
30124
30335
  const res = await sendAge(req);
30125
30336
  const errorHappen = this.private_handleError(res, {
30126
30337
  api: "ageConfirm",
@@ -30161,9 +30372,10 @@ const useMakePaymentStore = defineStore("makePayment", {
30161
30372
  paymentMethodType,
30162
30373
  paymentMethodId,
30163
30374
  merchantTopUpId: merchantPaymentId,
30164
- amount: __spreadProps(__spreadValues({}, ((_a2 = props.paymentParams) == null ? void 0 : _a2.amount) || {}), {
30375
+ amount: {
30376
+ ...((_a2 = props.paymentParams) == null ? void 0 : _a2.amount) || {},
30165
30377
  amount: amount2 || 0
30166
- }),
30378
+ },
30167
30379
  requestedAt,
30168
30380
  prepaidOnly
30169
30381
  };
@@ -30181,11 +30393,11 @@ const useMakePaymentStore = defineStore("makePayment", {
30181
30393
  async private_payment(props, paymentMethod2, agreeSimilarTransaction) {
30182
30394
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
30183
30395
  this.paymentState.paymentId = void 0;
30184
- const requestBody = __spreadProps(__spreadValues({
30185
- merchantPaymentId: (_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.merchantPaymentId
30186
- }, ((_b = props == null ? void 0 : props.paymentParams) == null ? void 0 : _b.isAuthorization) && ((_c = props == null ? void 0 : props.paymentParams) == null ? void 0 : _c.expiresAt) && {
30187
- expiresAt: (_d = props == null ? void 0 : props.paymentParams) == null ? void 0 : _d.expiresAt
30188
- }), {
30396
+ const requestBody = {
30397
+ merchantPaymentId: (_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.merchantPaymentId,
30398
+ ...((_b = props == null ? void 0 : props.paymentParams) == null ? void 0 : _b.isAuthorization) && ((_c = props == null ? void 0 : props.paymentParams) == null ? void 0 : _c.expiresAt) && {
30399
+ expiresAt: (_d = props == null ? void 0 : props.paymentParams) == null ? void 0 : _d.expiresAt
30400
+ },
30189
30401
  amount: (_e = props == null ? void 0 : props.paymentParams) == null ? void 0 : _e.amount,
30190
30402
  paymentMethodId: paymentMethod2.paymentMethodId,
30191
30403
  paymentMethodType: paymentMethod2.paymentMethodType,
@@ -30200,13 +30412,18 @@ const useMakePaymentStore = defineStore("makePayment", {
30200
30412
  metadata: (_n = props == null ? void 0 : props.paymentParams) == null ? void 0 : _n.metadata,
30201
30413
  productType: (_o = props == null ? void 0 : props.paymentParams) == null ? void 0 : _o.productType,
30202
30414
  storeInfo: (_p = props == null ? void 0 : props.paymentParams) == null ? void 0 : _p.storeInfo
30203
- });
30204
- const requestParams = __spreadProps(__spreadValues({}, props.paymentParams.merchantAlias && {
30205
- merchant: props.paymentParams.merchantAlias
30206
- }), {
30415
+ };
30416
+ const requestParams = {
30417
+ ...props.paymentParams.merchantAlias && {
30418
+ merchant: props.paymentParams.merchantAlias
30419
+ },
30207
30420
  agreeSimilarTransaction
30208
- });
30209
- const res = await makePayment$2(requestParams, requestBody, (_r = (_q = props == null ? void 0 : props.paymentParams) == null ? void 0 : _q.isAuthorization) != null ? _r : false);
30421
+ };
30422
+ const res = await makePayment$2(
30423
+ requestParams,
30424
+ requestBody,
30425
+ (_r = (_q = props == null ? void 0 : props.paymentParams) == null ? void 0 : _q.isAuthorization) != null ? _r : false
30426
+ );
30210
30427
  saveLastPaymentMethod(paymentMethod2.paymentMethodId);
30211
30428
  if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
30212
30429
  this.private_handleError(res, { type: "pay", api: "payment" });
@@ -30298,7 +30515,10 @@ const useMakePaymentStore = defineStore("makePayment", {
30298
30515
  },
30299
30516
  private_handleError(res, options) {
30300
30517
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
30301
- const errorCodeForFailBack = createErrorCodeForFailCallBack(res, options == null ? void 0 : options.api);
30518
+ const errorCodeForFailBack = createErrorCodeForFailCallBack(
30519
+ res,
30520
+ options == null ? void 0 : options.api
30521
+ );
30302
30522
  if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && options.api === "consult") {
30303
30523
  return true;
30304
30524
  }
@@ -30374,7 +30594,9 @@ const useMakePaymentStore = defineStore("makePayment", {
30374
30594
  }
30375
30595
  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
30596
  this.paymentMethodState.paymentMethods = paymentMethodList;
30377
- const walletPaymentMethod = paymentMethodList ? paymentMethodList.find((elem2) => elem2.paymentMethodType === PaymentMethodType.WALLET) || null : null;
30597
+ const walletPaymentMethod = paymentMethodList ? paymentMethodList.find(
30598
+ (elem2) => elem2.paymentMethodType === PaymentMethodType.WALLET
30599
+ ) || null : null;
30378
30600
  if (walletPaymentMethod && walletPaymentMethod.descriptionBannerInfo) {
30379
30601
  this.paymentMethodState.bannerInfo = walletPaymentMethod.descriptionBannerInfo;
30380
30602
  }
@@ -30384,10 +30606,17 @@ const useMakePaymentStore = defineStore("makePayment", {
30384
30606
  }) : paymentMethodList;
30385
30607
  this.paymentMethodState.appealDescription = appealDescription;
30386
30608
  if (isPaymentMethodPriorityEnabled) {
30387
- this.paymentMethodState.selectPaymentIndex = findFirstValidMethod(this.paymentMethodState.paymentMethods);
30609
+ this.paymentMethodState.selectPaymentIndex = findFirstValidMethod(
30610
+ this.paymentMethodState.paymentMethods
30611
+ );
30388
30612
  } else {
30389
30613
  const lastSavedMethod = getLastPaymentMethod();
30390
- this.paymentMethodState.selectPaymentIndex = isValidPaymentMethod(lastSavedMethod, (_d = this.paymentMethodState) == null ? void 0 : _d.paymentMethods) ? this.paymentMethodState.paymentMethods.findIndex((method2) => method2.paymentMethodId === lastSavedMethod) : findFirstValidMethod(this.paymentMethodState.paymentMethods);
30614
+ this.paymentMethodState.selectPaymentIndex = isValidPaymentMethod(
30615
+ lastSavedMethod,
30616
+ (_d = this.paymentMethodState) == null ? void 0 : _d.paymentMethods
30617
+ ) ? this.paymentMethodState.paymentMethods.findIndex(
30618
+ (method2) => method2.paymentMethodId === lastSavedMethod
30619
+ ) : findFirstValidMethod(this.paymentMethodState.paymentMethods);
30391
30620
  }
30392
30621
  return {
30393
30622
  res,
@@ -30451,7 +30680,10 @@ const useMakePaymentStore = defineStore("makePayment", {
30451
30680
  return retryResult.res;
30452
30681
  }
30453
30682
  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;
30454
- this.private_openLogicError({ type: "topupSuccessButNotAddToBalance" }, jws);
30683
+ this.private_openLogicError(
30684
+ { type: "topupSuccessButNotAddToBalance" },
30685
+ jws
30686
+ );
30455
30687
  return false;
30456
30688
  },
30457
30689
  private_sendFail(errorCode, jws) {
@@ -30545,15 +30777,19 @@ const _sfc_main$W = defineComponent({
30545
30777
  });
30546
30778
  s.addEventListener("complete", uiState.animationListener);
30547
30779
  };
30548
- const showCampaignDetail = computed(() => false);
30780
+ const showCampaignDetail = computed(
30781
+ () => false
30782
+ );
30549
30783
  const openCampaignDetail = () => {
30550
30784
  var _a2;
30551
30785
  openWebviewInternal({ url: (_a2 = animation == null ? void 0 : animation.value) == null ? void 0 : _a2.campaignUrl });
30552
30786
  };
30553
- const showCampaignHome = computed(() => {
30554
- var _a2, _b, _c;
30555
- return ((_c = (_b = (_a2 = animation == null ? void 0 : animation.value) == null ? void 0 : _a2.campaignHomeUrl) != null ? _b : "") == null ? void 0 : _c.length) > 0 && isPayPayMiniApp();
30556
- });
30787
+ const showCampaignHome = computed(
30788
+ () => {
30789
+ var _a2, _b, _c;
30790
+ return ((_c = (_b = (_a2 = animation == null ? void 0 : animation.value) == null ? void 0 : _a2.campaignHomeUrl) != null ? _b : "") == null ? void 0 : _c.length) > 0 && isPayPayMiniApp();
30791
+ }
30792
+ );
30557
30793
  const openCampaignHome = () => {
30558
30794
  var _a2, _b;
30559
30795
  openWebviewInternal({ url: (_b = (_a2 = animation == null ? void 0 : animation.value) == null ? void 0 : _a2.campaignHomeUrl) != null ? _b : "" });
@@ -30592,11 +30828,14 @@ const _sfc_main$W = defineComponent({
30592
30828
  });
30593
30829
  const makePaymentStore = useMakePaymentStore();
30594
30830
  const post = async (dateValue) => {
30595
- const res = await makePaymentStore.postAgeConfirm({
30596
- orderId: props.paymentId,
30597
- campaignId: animation.value.campaignId,
30598
- amount: animation.value.amount
30599
- }, dateValue);
30831
+ const res = await makePaymentStore.postAgeConfirm(
30832
+ {
30833
+ orderId: props.paymentId,
30834
+ campaignId: animation.value.campaignId,
30835
+ amount: animation.value.amount
30836
+ },
30837
+ dateValue
30838
+ );
30600
30839
  uiState.showAgeConfirm = false;
30601
30840
  if (!res) {
30602
30841
  setTimeout(() => {
@@ -30625,14 +30864,18 @@ const _sfc_main$W = defineComponent({
30625
30864
  });
30626
30865
  return {
30627
30866
  createAnime,
30628
- animation: computed(() => {
30629
- var _a2;
30630
- return (_a2 = animation.value) != null ? _a2 : { optionalText: "", url: "" };
30631
- }),
30632
- animationUrl: computed(() => {
30633
- var _a2;
30634
- return animation.value ? isDesktop.value ? (_a2 = animation.value.largeUrl) != null ? _a2 : animation.value.url : animation.value.url : "";
30635
- }),
30867
+ animation: computed(
30868
+ () => {
30869
+ var _a2;
30870
+ return (_a2 = animation.value) != null ? _a2 : { optionalText: "", url: "" };
30871
+ }
30872
+ ),
30873
+ animationUrl: computed(
30874
+ () => {
30875
+ var _a2;
30876
+ return animation.value ? isDesktop.value ? (_a2 = animation.value.largeUrl) != null ? _a2 : animation.value.url : animation.value.url : "";
30877
+ }
30878
+ ),
30636
30879
  type,
30637
30880
  showContent: computed(() => uiState.showContent),
30638
30881
  showFullScreenContent: computed(() => uiState.showFullscreenContent),
@@ -30863,7 +31106,9 @@ const _sfc_main$U = defineComponent({
30863
31106
  const appLogo2 = props.appDetail.appLogo || images2.merchant;
30864
31107
  const formatPrice = computed(() => numberWithCommas(props.price));
30865
31108
  const formatBalance = computed(() => numberWithCommas(props.balance));
30866
- const formatInsufficientAmount = computed(() => numberWithCommas(props.insufficientAmount));
31109
+ const formatInsufficientAmount = computed(
31110
+ () => numberWithCommas(props.insufficientAmount)
31111
+ );
30867
31112
  const { isMobile, isDesktop } = useBreakpoints();
30868
31113
  return {
30869
31114
  style,
@@ -31416,18 +31661,21 @@ const _sfc_main$R = defineComponent({
31416
31661
  const { isMobile, isDesktop } = useBreakpoints();
31417
31662
  const createAnime = (s) => {
31418
31663
  s.play();
31419
- emit("animationEnd", new Promise((resolve2) => {
31420
- const end = () => {
31421
- if (s.renderer) {
31422
- s == null ? void 0 : s.removeEventListener("complete", end);
31423
- }
31424
- resolve2(true);
31425
- };
31426
- s.addEventListener("complete", end);
31427
- setTimeout(() => {
31428
- end();
31429
- }, 3e3);
31430
- }));
31664
+ emit(
31665
+ "animationEnd",
31666
+ new Promise((resolve2) => {
31667
+ const end = () => {
31668
+ if (s.renderer) {
31669
+ s == null ? void 0 : s.removeEventListener("complete", end);
31670
+ }
31671
+ resolve2(true);
31672
+ };
31673
+ s.addEventListener("complete", end);
31674
+ setTimeout(() => {
31675
+ end();
31676
+ }, 3e3);
31677
+ })
31678
+ );
31431
31679
  };
31432
31680
  const select2 = (index2) => {
31433
31681
  state.showPaymentMethodList = false;
@@ -31832,7 +32080,12 @@ function useData(props) {
31832
32080
  const state = reactive({
31833
32081
  paymentMethods: (_a2 = props.insufficientBalanceInfo) == null ? void 0 : _a2.paymentMethodList,
31834
32082
  appealDescription: (_b = props.insufficientBalanceInfo) == null ? void 0 : _b.appealDescription,
31835
- index: isValidPaymentMethod(lastUsedMethod, (_c = props.insufficientBalanceInfo) == null ? void 0 : _c.paymentMethodList) ? (_d = props.insufficientBalanceInfo) == null ? void 0 : _d.paymentMethodList.findIndex((method2) => method2.paymentMethodId === lastUsedMethod) : findFirstValidMethod((_e = props.insufficientBalanceInfo) == null ? void 0 : _e.paymentMethodList),
32083
+ index: isValidPaymentMethod(
32084
+ lastUsedMethod,
32085
+ (_c = props.insufficientBalanceInfo) == null ? void 0 : _c.paymentMethodList
32086
+ ) ? (_d = props.insufficientBalanceInfo) == null ? void 0 : _d.paymentMethodList.findIndex(
32087
+ (method2) => method2.paymentMethodId === lastUsedMethod
32088
+ ) : findFirstValidMethod((_e = props.insufficientBalanceInfo) == null ? void 0 : _e.paymentMethodList),
31836
32089
  topupAmount: (_f = props.insufficientBalanceInfo) == null ? void 0 : _f.recommendedTopupAmount,
31837
32090
  mount: false,
31838
32091
  unmount: false,
@@ -31865,7 +32118,9 @@ function useData(props) {
31865
32118
  state.index = index2;
31866
32119
  };
31867
32120
  const paymentMethods = computed(() => state.paymentMethods);
31868
- const available = computed(() => hasAvailableTopupMethod(paymentMethods.value));
32121
+ const available = computed(
32122
+ () => hasAvailableTopupMethod(paymentMethods.value)
32123
+ );
31869
32124
  const setScrollState = (data2) => {
31870
32125
  state.isScrollable = data2;
31871
32126
  };
@@ -32002,8 +32257,14 @@ const _sfc_main$P = defineComponent({
32002
32257
  var _a3, _b2, _c, _d, _e, _f;
32003
32258
  const config2 = getAppConfig();
32004
32259
  return {
32005
- halfSheet: createHalfSheetAmount((_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.recommendedTopupAmount, (_c = (_b2 = config2 == null ? void 0 : config2.topupHalfSheetAmount[0]) == null ? void 0 : _b2.value) != null ? _c : null),
32006
- buttons: createButtonsAmount((_d = props.insufficientBalanceInfo) == null ? void 0 : _d.recommendedTopupAmount, (_f = (_e = config2 == null ? void 0 : config2.topupButtonsAmount[0]) == null ? void 0 : _e.value) != null ? _f : null)
32260
+ halfSheet: createHalfSheetAmount(
32261
+ (_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.recommendedTopupAmount,
32262
+ (_c = (_b2 = config2 == null ? void 0 : config2.topupHalfSheetAmount[0]) == null ? void 0 : _b2.value) != null ? _c : null
32263
+ ),
32264
+ buttons: createButtonsAmount(
32265
+ (_d = props.insufficientBalanceInfo) == null ? void 0 : _d.recommendedTopupAmount,
32266
+ (_f = (_e = config2 == null ? void 0 : config2.topupButtonsAmount[0]) == null ? void 0 : _e.value) != null ? _f : null
32267
+ )
32007
32268
  };
32008
32269
  });
32009
32270
  const style = useCssModule();
@@ -32020,13 +32281,23 @@ const _sfc_main$P = defineComponent({
32020
32281
  const animationEnd = (val2) => {
32021
32282
  emit("animationEnd", val2);
32022
32283
  };
32023
- watch(() => windowHeight == null ? void 0 : windowHeight.value, () => {
32024
- handleHeightChange();
32025
- });
32284
+ watch(
32285
+ () => windowHeight == null ? void 0 : windowHeight.value,
32286
+ () => {
32287
+ handleHeightChange();
32288
+ }
32289
+ );
32026
32290
  const handleHeightChange = () => {
32027
32291
  setTimeout(() => {
32028
32292
  if (isDesktop.value && (topupPay2 == null ? void 0 : topupPay2.value)) {
32029
- setScrollState(handleHeightResize(topupPay2 == null ? void 0 : topupPay2.value, windowHeight == null ? void 0 : windowHeight.value, isScrollable == null ? void 0 : isScrollable.value, -6));
32293
+ setScrollState(
32294
+ handleHeightResize(
32295
+ topupPay2 == null ? void 0 : topupPay2.value,
32296
+ windowHeight == null ? void 0 : windowHeight.value,
32297
+ isScrollable == null ? void 0 : isScrollable.value,
32298
+ -6
32299
+ )
32300
+ );
32030
32301
  }
32031
32302
  }, 0);
32032
32303
  };
@@ -32061,14 +32332,18 @@ const _sfc_main$P = defineComponent({
32061
32332
  }
32062
32333
  };
32063
32334
  return {
32064
- balance: computed(() => {
32065
- var _a3, _b2;
32066
- return (_b2 = (_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.totalBalanceInfo) == null ? void 0 : _b2.balance;
32067
- }),
32068
- insufficientAmount: computed(() => {
32069
- var _a3;
32070
- return (_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.insufficientAmount;
32071
- }),
32335
+ balance: computed(
32336
+ () => {
32337
+ var _a3, _b2;
32338
+ return (_b2 = (_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.totalBalanceInfo) == null ? void 0 : _b2.balance;
32339
+ }
32340
+ ),
32341
+ insufficientAmount: computed(
32342
+ () => {
32343
+ var _a3;
32344
+ return (_a3 = props.insufficientBalanceInfo) == null ? void 0 : _a3.insufficientAmount;
32345
+ }
32346
+ ),
32072
32347
  back: back2,
32073
32348
  style,
32074
32349
  appDetail,
@@ -32287,7 +32562,9 @@ const _sfc_main$O = defineComponent({
32287
32562
  return {
32288
32563
  images: getImages(),
32289
32564
  lg: getLanguage()["3dSecureSheet"],
32290
- isNormalCard: computed(() => props.ccType !== "YJ_CARD" && props.ccType !== "PP_CARD"),
32565
+ isNormalCard: computed(
32566
+ () => props.ccType !== "YJ_CARD" && props.ccType !== "PP_CARD"
32567
+ ),
32291
32568
  navigateToSetting,
32292
32569
  navigateToAbout
32293
32570
  };
@@ -32445,12 +32722,15 @@ const _sfc_main$N = defineComponent({
32445
32722
  onMounted(async () => {
32446
32723
  await makePaymentStore.executeConsult(props);
32447
32724
  });
32448
- watch(() => props.show, (_, oldValue) => {
32449
- if (oldValue && !props.show) {
32450
- setTimeout(() => {
32451
- }, 300);
32725
+ watch(
32726
+ () => props.show,
32727
+ (_, oldValue) => {
32728
+ if (oldValue && !props.show) {
32729
+ setTimeout(() => {
32730
+ }, 300);
32731
+ }
32452
32732
  }
32453
- });
32733
+ );
32454
32734
  const _pay = async () => {
32455
32735
  const selectedAddress = makePaymentStore.addressState.selectedAddress;
32456
32736
  if (props.showUserAddress && selectedAddress) {
@@ -32460,16 +32740,27 @@ const _sfc_main$N = defineComponent({
32460
32740
  if (!makePaymentStore.paymentMethod) {
32461
32741
  return;
32462
32742
  }
32463
- await makePaymentStore.executePayment(props, makePaymentStore.paymentMethod, selectedAddress);
32743
+ await makePaymentStore.executePayment(
32744
+ props,
32745
+ makePaymentStore.paymentMethod,
32746
+ selectedAddress
32747
+ );
32464
32748
  };
32465
- watch(() => makePaymentStore.uiState.paymentHandler, async (paymentHandler) => {
32466
- if (!paymentHandler) {
32467
- return;
32749
+ watch(
32750
+ () => makePaymentStore.uiState.paymentHandler,
32751
+ async (paymentHandler) => {
32752
+ if (!paymentHandler) {
32753
+ return;
32754
+ }
32755
+ await makePaymentStore.afterPaymentSuccess(props);
32468
32756
  }
32469
- await makePaymentStore.afterPaymentSuccess(props);
32470
- });
32757
+ );
32471
32758
  const beforeTopupAndPay = (beforeTopupAndPayParams) => {
32472
- makePaymentStore.beforeTopupAndPay(props, beforeTopupAndPayParams, topAndPay);
32759
+ makePaymentStore.beforeTopupAndPay(
32760
+ props,
32761
+ beforeTopupAndPayParams,
32762
+ topAndPay
32763
+ );
32473
32764
  };
32474
32765
  const { isMobile, isDesktop } = useBreakpoints();
32475
32766
  const topAndPay = () => {
@@ -32485,7 +32776,9 @@ const _sfc_main$N = defineComponent({
32485
32776
  return {
32486
32777
  pay: _pay,
32487
32778
  cancelPayment,
32488
- isCashbackDetailsVisible: computed(() => makePaymentStore.cashbackState.hasCashBackAnimation && (!makePaymentStore.cashbackState.hasConfirmAge || isMobile.value)),
32779
+ isCashbackDetailsVisible: computed(
32780
+ () => makePaymentStore.cashbackState.hasCashBackAnimation && (!makePaymentStore.cashbackState.hasConfirmAge || isMobile.value)
32781
+ ),
32489
32782
  price: computed(() => {
32490
32783
  var _a2, _b;
32491
32784
  return (_b = (_a2 = props.paymentParams) == null ? void 0 : _a2.amount) == null ? void 0 : _b.amount;
@@ -32750,26 +33043,41 @@ const _sfc_main$M = defineComponent({
32750
33043
  },
32751
33044
  setup(props, context) {
32752
33045
  const makePaymentStore = useMakePaymentStore();
32753
- watch(() => makePaymentStore.result.success, (success2) => {
32754
- var _a2, _b;
32755
- if (success2) {
32756
- (_b = (_a2 = props.paymentParams) == null ? void 0 : _a2.success) == null ? void 0 : _b.call(_a2, {
32757
- jws: success2.jws,
32758
- address: success2.address ? __spreadValues({}, success2.address) : null
32759
- });
33046
+ watch(
33047
+ () => makePaymentStore.result.success,
33048
+ (success2) => {
33049
+ var _a2, _b;
33050
+ if (success2) {
33051
+ (_b = (_a2 = props.paymentParams) == null ? void 0 : _a2.success) == null ? void 0 : _b.call(_a2, {
33052
+ jws: success2.jws,
33053
+ address: success2.address ? { ...success2.address } : null
33054
+ });
33055
+ }
32760
33056
  }
32761
- });
32762
- watch(() => makePaymentStore.result.fail, (fail) => {
32763
- var _a2, _b, _c;
32764
- if (fail) {
32765
- (_c = (_a2 = props.paymentParams) == null ? void 0 : _a2.fail) == null ? void 0 : _c.call(_a2, createErrorCode((_b = fail.errorCode) != null ? _b : MiniAppErrorType.serverError, fail.jws));
33057
+ );
33058
+ watch(
33059
+ () => makePaymentStore.result.fail,
33060
+ (fail) => {
33061
+ var _a2, _b, _c;
33062
+ if (fail) {
33063
+ (_c = (_a2 = props.paymentParams) == null ? void 0 : _a2.fail) == null ? void 0 : _c.call(
33064
+ _a2,
33065
+ createErrorCode(
33066
+ (_b = fail.errorCode) != null ? _b : MiniAppErrorType.serverError,
33067
+ fail.jws
33068
+ )
33069
+ );
33070
+ }
32766
33071
  }
32767
- });
32768
- watch(() => makePaymentStore.result.completed, (completed) => {
32769
- if (completed) {
32770
- context.emit("click");
33072
+ );
33073
+ watch(
33074
+ () => makePaymentStore.result.completed,
33075
+ (completed) => {
33076
+ if (completed) {
33077
+ context.emit("click");
33078
+ }
32771
33079
  }
32772
- });
33080
+ );
32773
33081
  return {
32774
33082
  makePaymentStore
32775
33083
  };
@@ -32939,7 +33247,7 @@ const initMakePayment = async (initMakePayment2) => {
32939
33247
  } else {
32940
33248
  showUserAddress = false;
32941
33249
  }
32942
- app = createApp(__spreadValues({
33250
+ app = createApp({
32943
33251
  setup() {
32944
33252
  return () => h(AppVue$6, {
32945
33253
  show: show2.value,
@@ -32950,8 +33258,9 @@ const initMakePayment = async (initMakePayment2) => {
32950
33258
  closeSheet();
32951
33259
  }
32952
33260
  });
32953
- }
32954
- }, popStateHandler(closeSheet, initMakePayment2)));
33261
+ },
33262
+ ...popStateHandler(closeSheet, initMakePayment2)
33263
+ });
32955
33264
  app.use(createPinia());
32956
33265
  app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
32957
33266
  app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
@@ -32973,7 +33282,9 @@ const makePayment = async (params) => {
32973
33282
  }
32974
33283
  if ((_d = (_c = params == null ? void 0 : params.additionalUserInfo) == null ? void 0 : _c.userAddress) == null ? void 0 : _d.visible) {
32975
33284
  try {
32976
- const grantStatus = await checkPermission(PermissionName.mini_app_user_address);
33285
+ const grantStatus = await checkPermission(
33286
+ PermissionName.mini_app_user_address
33287
+ );
32977
33288
  if (grantStatus !== PermissionStatus.granted) {
32978
33289
  (_e = params == null ? void 0 : params.fail) == null ? void 0 : _e.call(params, {
32979
33290
  errorCode: MiniAppErrorType.insufficientScope
@@ -33161,22 +33472,32 @@ const _sfc_main$L = defineComponent({
33161
33472
  emit("click", item2, index2);
33162
33473
  };
33163
33474
  return {
33164
- iconUrl: computed(() => {
33165
- var _a2, _b, _c;
33166
- 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;
33167
- }),
33168
- title: computed(() => {
33169
- var _a2, _b, _c;
33170
- 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;
33171
- }),
33172
- description: computed(() => {
33173
- var _a2, _b, _c;
33174
- 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;
33175
- }),
33176
- buttonList: computed(() => {
33177
- var _a2, _b, _c, _d;
33178
- return filterErrorButtonList((_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 : []);
33179
- }),
33475
+ iconUrl: computed(
33476
+ () => {
33477
+ var _a2, _b, _c;
33478
+ 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;
33479
+ }
33480
+ ),
33481
+ title: computed(
33482
+ () => {
33483
+ var _a2, _b, _c;
33484
+ 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;
33485
+ }
33486
+ ),
33487
+ description: computed(
33488
+ () => {
33489
+ var _a2, _b, _c;
33490
+ 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;
33491
+ }
33492
+ ),
33493
+ buttonList: computed(
33494
+ () => {
33495
+ var _a2, _b, _c, _d;
33496
+ return filterErrorButtonList(
33497
+ (_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 : []
33498
+ );
33499
+ }
33500
+ ),
33180
33501
  click,
33181
33502
  style
33182
33503
  };
@@ -33267,11 +33588,15 @@ const _sfc_main$K = defineComponent({
33267
33588
  const lg2 = getLanguage();
33268
33589
  const style = useCssModule();
33269
33590
  return {
33270
- availableBalText: computed(() => props.isCharging ? lg2.topup.availableBalanceAfter : lg2.topup.availableBalance),
33271
- isCashbackSave: computed(() => {
33272
- var _a2;
33273
- return ((_a2 = props == null ? void 0 : props.cashbackInfo) == null ? void 0 : _a2.cashBackUseStatus) === "SAVE";
33274
- }),
33591
+ availableBalText: computed(
33592
+ () => props.isCharging ? lg2.topup.availableBalanceAfter : lg2.topup.availableBalance
33593
+ ),
33594
+ isCashbackSave: computed(
33595
+ () => {
33596
+ var _a2;
33597
+ return ((_a2 = props == null ? void 0 : props.cashbackInfo) == null ? void 0 : _a2.cashBackUseStatus) === "SAVE";
33598
+ }
33599
+ ),
33275
33600
  style,
33276
33601
  lg: lg2
33277
33602
  };
@@ -33346,14 +33671,18 @@ const _sfc_main$J = defineComponent({
33346
33671
  const style = useCssModule();
33347
33672
  return {
33348
33673
  images: getImages(),
33349
- amount: computed(() => {
33350
- var _a2, _b;
33351
- return formatCurrency(Number((_b = (_a2 = props == null ? void 0 : props.data) == null ? void 0 : _a2.amount) == null ? void 0 : _b.amount), 0);
33352
- }),
33353
- statusLabelColor: computed(() => {
33354
- var _a2, _b;
33355
- return (_b = (_a2 = props == null ? void 0 : props.data) == null ? void 0 : _a2.statusLabelColor) == null ? void 0 : _b.toLowerCase();
33356
- }),
33674
+ amount: computed(
33675
+ () => {
33676
+ var _a2, _b;
33677
+ return formatCurrency(Number((_b = (_a2 = props == null ? void 0 : props.data) == null ? void 0 : _a2.amount) == null ? void 0 : _b.amount), 0);
33678
+ }
33679
+ ),
33680
+ statusLabelColor: computed(
33681
+ () => {
33682
+ var _a2, _b;
33683
+ return (_b = (_a2 = props == null ? void 0 : props.data) == null ? void 0 : _a2.statusLabelColor) == null ? void 0 : _b.toLowerCase();
33684
+ }
33685
+ ),
33357
33686
  topUpId: computed(() => {
33358
33687
  var _a2, _b;
33359
33688
  return (_b = (_a2 = props == null ? void 0 : props.data) == null ? void 0 : _a2.topUpId) != null ? _b : "";
@@ -33648,7 +33977,11 @@ const _sfc_main$I = defineComponent({
33648
33977
  return (_b = (_a2 = this.selectedCardMethod) == null ? void 0 : _a2.creditCardInfo) == null ? void 0 : _b.ccType;
33649
33978
  },
33650
33979
  minAMountErrorMessage() {
33651
- return updateLocalisedString(this.lg.topup.minAmount, "{amount}", numberWithCommas(this.topupMinAmount));
33980
+ return updateLocalisedString(
33981
+ this.lg.topup.minAmount,
33982
+ "{amount}",
33983
+ numberWithCommas(this.topupMinAmount)
33984
+ );
33652
33985
  }
33653
33986
  },
33654
33987
  watch: {
@@ -33667,15 +34000,16 @@ const _sfc_main$I = defineComponent({
33667
34000
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
33668
34001
  this.loading = true;
33669
34002
  this.isFirstLoad = true;
33670
- const paymentIDParams = __spreadProps(__spreadValues({}, ((_a2 = this.topupParams) == null ? void 0 : _a2.merchant) && {
33671
- merchant: this.topupParams.merchant
33672
- }), {
34003
+ const paymentIDParams = {
34004
+ ...((_a2 = this.topupParams) == null ? void 0 : _a2.merchant) && {
34005
+ merchant: this.topupParams.merchant
34006
+ },
33673
34007
  type: "TOPUP",
33674
34008
  methodType: (_b = this.topupParams) == null ? void 0 : _b.methodType,
33675
34009
  bankCode: (_c = this.topupParams) == null ? void 0 : _c.bankCode,
33676
34010
  sourceInfoApp: (_d = this.topupParams) == null ? void 0 : _d.sourceInfoApp,
33677
34011
  productType: (_e = this.topupParams) == null ? void 0 : _e.productType
33678
- });
34012
+ };
33679
34013
  const paymentIdResponse = await getPaymentMethods2(paymentIDParams);
33680
34014
  switch (paymentIdResponse.ppFetchResult) {
33681
34015
  case "success":
@@ -33836,34 +34170,41 @@ const _sfc_main$I = defineComponent({
33836
34170
  return null;
33837
34171
  }
33838
34172
  if (!agreeSimilarTransaction) {
33839
- this.isDuplicate = checkDuplicateTopup(Number(String(this.inputMoney).replace(/,/g, "")));
34173
+ this.isDuplicate = checkDuplicateTopup(
34174
+ Number(String(this.inputMoney).replace(/,/g, ""))
34175
+ );
33840
34176
  if (this.isDuplicate) {
33841
34177
  return null;
33842
34178
  }
33843
34179
  }
33844
34180
  this.loading = true;
33845
34181
  this.isDuplicate = false;
33846
- __spreadProps(__spreadValues({}, ((_b = this.topupParams) == null ? void 0 : _b.merchant) && {
33847
- merchant: this.topupParams.merchant
33848
- }), {
34182
+ ({
34183
+ ...((_b = this.topupParams) == null ? void 0 : _b.merchant) && {
34184
+ merchant: this.topupParams.merchant
34185
+ },
33849
34186
  type: "TOPUP"
33850
34187
  });
33851
34188
  ((_c = this.topupParams) == null ? void 0 : _c.sourceInfoApp) ? this.topupParams.sourceInfoApp : null;
33852
34189
  try {
33853
- const res = await topup$3(__spreadProps(__spreadValues({}, ((_d = this.topupParams) == null ? void 0 : _d.merchant) && {
33854
- merchant: this.topupParams.merchant
33855
- }), {
33856
- agreeSimilarTransaction
33857
- }), {
33858
- paymentMethodType: this.selectedPaymentMethod.paymentMethodType,
33859
- paymentMethodId: this.selectedPaymentMethod.paymentMethodId,
33860
- merchantTopUpId: (_f = (_e = this.topupParams) == null ? void 0 : _e.merchantTopUpId) != null ? _f : "",
33861
- amount: {
33862
- amount: Number(String(this.inputMoney).replace(/,/g, "")),
33863
- currency: "JPY"
34190
+ const res = await topup$3(
34191
+ {
34192
+ ...((_d = this.topupParams) == null ? void 0 : _d.merchant) && {
34193
+ merchant: this.topupParams.merchant
34194
+ },
34195
+ agreeSimilarTransaction
33864
34196
  },
33865
- requestedAt: (_h = (_g = this.topupParams) == null ? void 0 : _g.requestedAt) != null ? _h : 0
33866
- });
34197
+ {
34198
+ paymentMethodType: this.selectedPaymentMethod.paymentMethodType,
34199
+ paymentMethodId: this.selectedPaymentMethod.paymentMethodId,
34200
+ merchantTopUpId: (_f = (_e = this.topupParams) == null ? void 0 : _e.merchantTopUpId) != null ? _f : "",
34201
+ amount: {
34202
+ amount: Number(String(this.inputMoney).replace(/,/g, "")),
34203
+ currency: "JPY"
34204
+ },
34205
+ requestedAt: (_h = (_g = this.topupParams) == null ? void 0 : _g.requestedAt) != null ? _h : 0
34206
+ }
34207
+ );
33867
34208
  if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && ((_i = res == null ? void 0 : res.body) == null ? void 0 : _i.uiComponents)) {
33868
34209
  if ((_k = (_j = res == null ? void 0 : res.body) == null ? void 0 : _j.uiComponents) == null ? void 0 : _k.displayErrorResponse) {
33869
34210
  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 : "";
@@ -34268,7 +34609,7 @@ const initTopup = (topupParams) => {
34268
34609
  (_a2 = topupParams == null ? void 0 : topupParams.complete) == null ? void 0 : _a2.call(topupParams);
34269
34610
  }, 300);
34270
34611
  };
34271
- const app = createApp(__spreadValues({
34612
+ const app = createApp({
34272
34613
  setup() {
34273
34614
  return () => h(AppVue$5, {
34274
34615
  show: show2.value,
@@ -34277,8 +34618,9 @@ const initTopup = (topupParams) => {
34277
34618
  closeSheet();
34278
34619
  }
34279
34620
  });
34280
- }
34281
- }, popStateHandler(closeSheet, topupProp)));
34621
+ },
34622
+ ...popStateHandler(closeSheet, topupProp)
34623
+ });
34282
34624
  const container2 = document.createElement("div");
34283
34625
  container2.className = "ppmna-reset-css";
34284
34626
  app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
@@ -34363,10 +34705,14 @@ function scanCode(params) {
34363
34705
  return;
34364
34706
  }
34365
34707
  const redirectUrlOnCancel = (_b = params == null ? void 0 : params.redirectUrlOnCancel) != null ? _b : window.location.href;
34366
- const deeplink = `paypay://miniapp?appId=${clientId}&redirectUrl=${encodeURIComponent(redirectUrlOnCancel)}&closeCurrentScreen=true`;
34708
+ const deeplink = `paypay://miniapp?appId=${clientId}&redirectUrl=${encodeURIComponent(
34709
+ redirectUrlOnCancel
34710
+ )}&closeCurrentScreen=true`;
34367
34711
  closeApp({
34368
34712
  options: {
34369
- deeplink: `paypay://scan?callbackdeeplink=${encodeURIComponent(deeplink)}`
34713
+ deeplink: `paypay://scan?callbackdeeplink=${encodeURIComponent(
34714
+ deeplink
34715
+ )}`
34370
34716
  }
34371
34717
  });
34372
34718
  } else {
@@ -34496,7 +34842,7 @@ const initAlertSheet = (initAlertSheet2) => {
34496
34842
  app.unmount();
34497
34843
  }, 300);
34498
34844
  };
34499
- const app = createApp(__spreadValues({
34845
+ const app = createApp({
34500
34846
  setup() {
34501
34847
  return () => h(AppVue$4, {
34502
34848
  show: show2.value,
@@ -34507,8 +34853,9 @@ const initAlertSheet = (initAlertSheet2) => {
34507
34853
  closeSheet();
34508
34854
  }
34509
34855
  });
34510
- }
34511
- }, popStateHandler(closeSheet, initAlertSheet2)));
34856
+ },
34857
+ ...popStateHandler(closeSheet, initAlertSheet2)
34858
+ });
34512
34859
  const container2 = document.createElement("div");
34513
34860
  container2.className = "ppmna-reset-css";
34514
34861
  app.mount(container2);
@@ -34551,7 +34898,7 @@ const initErrorSheet = (initErrorSheet2) => {
34551
34898
  });
34552
34899
  });
34553
34900
  }
34554
- const app = createApp(__spreadValues({
34901
+ const app = createApp({
34555
34902
  setup() {
34556
34903
  return () => h(ErrorSheet, {
34557
34904
  show: show2.value,
@@ -34562,8 +34909,9 @@ const initErrorSheet = (initErrorSheet2) => {
34562
34909
  closeSheet();
34563
34910
  }
34564
34911
  });
34565
- }
34566
- }, popStateHandler(closeSheet, initErrorSheet2)));
34912
+ },
34913
+ ...popStateHandler(closeSheet, initErrorSheet2)
34914
+ });
34567
34915
  const container2 = document.createElement("div");
34568
34916
  container2.className = "ppmna-reset-css";
34569
34917
  app.mount(container2);
@@ -34750,7 +35098,7 @@ const initShowUpdateWarning = (params) => {
34750
35098
  (_a2 = params == null ? void 0 : params.complete) == null ? void 0 : _a2.call(params);
34751
35099
  }, 300);
34752
35100
  };
34753
- const app = createApp(__spreadValues({
35101
+ const app = createApp({
34754
35102
  setup() {
34755
35103
  return () => h(AppVue$3, {
34756
35104
  show: show2.value,
@@ -34759,8 +35107,9 @@ const initShowUpdateWarning = (params) => {
34759
35107
  closeSheet();
34760
35108
  }
34761
35109
  });
34762
- }
34763
- }, popStateHandler(closeSheet, warningParams)));
35110
+ },
35111
+ ...popStateHandler(closeSheet, warningParams)
35112
+ });
34764
35113
  const container2 = document.createElement("div");
34765
35114
  container2.className = "ppmna-reset-css";
34766
35115
  app.mount(container2);
@@ -34792,7 +35141,9 @@ async function execute$9(params) {
34792
35141
  const appVersion = getAppVersion();
34793
35142
  if (appVersion) {
34794
35143
  try {
34795
- const response = await fetch("https://static.paypay.ne.jp/libs/mini-app-js-sdk/versions.json");
35144
+ const response = await fetch(
35145
+ "https://static.paypay.ne.jp/libs/mini-app-js-sdk/versions.json"
35146
+ );
34796
35147
  const res = await response.json();
34797
35148
  Object.keys(res == null ? void 0 : res.app).forEach(function(key2) {
34798
35149
  var _a3;
@@ -34974,7 +35325,7 @@ const initOpenApp = (initOpenApp2) => {
34974
35325
  (_a2 = initOpenApp2 == null ? void 0 : initOpenApp2.complete) == null ? void 0 : _a2.call(initOpenApp2);
34975
35326
  }, 300);
34976
35327
  };
34977
- const app = createApp(__spreadValues({
35328
+ const app = createApp({
34978
35329
  setup() {
34979
35330
  return () => h(AppVue$2, {
34980
35331
  show: show2.value,
@@ -34983,8 +35334,9 @@ const initOpenApp = (initOpenApp2) => {
34983
35334
  closeSheet();
34984
35335
  }
34985
35336
  });
34986
- }
34987
- }, popStateHandler(closeSheet, appParams)));
35337
+ },
35338
+ ...popStateHandler(closeSheet, appParams)
35339
+ });
34988
35340
  const container2 = document.createElement("div");
34989
35341
  container2.className = "ppmna-reset-css";
34990
35342
  app.mount(container2);
@@ -35066,7 +35418,9 @@ async function execute$7(params) {
35066
35418
  const initGetUserAddress = async (params) => {
35067
35419
  var _a2, _b, _c, _d, _e, _f;
35068
35420
  try {
35069
- const grantStatus = await checkPermission(PermissionName.mini_app_user_address);
35421
+ const grantStatus = await checkPermission(
35422
+ PermissionName.mini_app_user_address
35423
+ );
35070
35424
  if (grantStatus !== PermissionStatus.granted) {
35071
35425
  (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, {
35072
35426
  errorCode: MiniAppErrorType.insufficientScope
@@ -35101,7 +35455,8 @@ const initGetUserAddress = async (params) => {
35101
35455
  (_a3 = params == null ? void 0 : params.complete) == null ? void 0 : _a3.call(params);
35102
35456
  }, 300);
35103
35457
  };
35104
- const app = createApp(__spreadProps(__spreadValues({}, popStateHandler(closeSheet, params)), {
35458
+ const app = createApp({
35459
+ ...popStateHandler(closeSheet, params),
35105
35460
  render() {
35106
35461
  var _a3, _b2, _c2;
35107
35462
  return h(AppVue$7, {
@@ -35111,7 +35466,7 @@ const initGetUserAddress = async (params) => {
35111
35466
  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
35112
35467
  });
35113
35468
  }
35114
- }));
35469
+ });
35115
35470
  app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
35116
35471
  app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
35117
35472
  app.mount(container2);
@@ -35137,7 +35492,10 @@ function useRoot(props, { emit }) {
35137
35492
  const cancel2 = () => {
35138
35493
  var _a2, _b;
35139
35494
  emit("click");
35140
- (_b = (_a2 = props.inputAddressParams) == null ? void 0 : _a2.fail) == null ? void 0 : _b.call(_a2, createErrorCode(MiniAppErrorType.userCanceled));
35495
+ (_b = (_a2 = props.inputAddressParams) == null ? void 0 : _a2.fail) == null ? void 0 : _b.call(
35496
+ _a2,
35497
+ createErrorCode(MiniAppErrorType.userCanceled)
35498
+ );
35141
35499
  };
35142
35500
  const success2 = () => {
35143
35501
  var _a2, _b;
@@ -35184,7 +35542,7 @@ const initialState = {
35184
35542
  shallow: false
35185
35543
  };
35186
35544
  function useApp(params) {
35187
- const state = reactive(__spreadValues({}, initialState));
35545
+ const state = reactive({ ...initialState });
35188
35546
  const addAddress2 = async (_address) => {
35189
35547
  var _a2;
35190
35548
  state.loading = true;
@@ -35209,7 +35567,7 @@ function useApp(params) {
35209
35567
  params.success();
35210
35568
  };
35211
35569
  const reset2 = () => {
35212
- Object.assign(state, __spreadValues({}, initialState));
35570
+ Object.assign(state, { ...initialState });
35213
35571
  };
35214
35572
  return {
35215
35573
  addAddress: addAddress2,
@@ -35309,7 +35667,8 @@ const initInputAddress = (params) => {
35309
35667
  (_a2 = params == null ? void 0 : params.complete) == null ? void 0 : _a2.call(params);
35310
35668
  }, 300);
35311
35669
  };
35312
- const app = createApp(__spreadProps(__spreadValues({}, popStateHandler(closeSheet, params)), {
35670
+ const app = createApp({
35671
+ ...popStateHandler(closeSheet, params),
35313
35672
  render() {
35314
35673
  return h(AppView, {
35315
35674
  show: show2.value,
@@ -35317,7 +35676,7 @@ const initInputAddress = (params) => {
35317
35676
  inputAddressParams: params
35318
35677
  });
35319
35678
  }
35320
- }));
35679
+ });
35321
35680
  app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
35322
35681
  app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
35323
35682
  app.mount(container2);
@@ -35342,7 +35701,9 @@ async function getUserLocation(getUserLocationParams) {
35342
35701
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
35343
35702
  const params = reconstructParams(getUserLocationParams);
35344
35703
  try {
35345
- const grantStatus = await checkPermission(PermissionName.mini_app_user_location);
35704
+ const grantStatus = await checkPermission(
35705
+ PermissionName.mini_app_user_location
35706
+ );
35346
35707
  if (grantStatus !== PermissionStatus.granted) {
35347
35708
  (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.insufficientScope });
35348
35709
  return;
@@ -35355,7 +35716,9 @@ async function getUserLocation(getUserLocationParams) {
35355
35716
  const resp = await getUserLocationRequest({ validTimeMinutes });
35356
35717
  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)) {
35357
35718
  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);
35358
- const long = Number.parseFloat((_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);
35719
+ const long = Number.parseFloat(
35720
+ (_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
35721
+ );
35359
35722
  (_m = params == null ? void 0 : params.success) == null ? void 0 : _m.call(params, {
35360
35723
  result: {
35361
35724
  lat,
@@ -35368,28 +35731,32 @@ async function getUserLocation(getUserLocationParams) {
35368
35731
  await new Promise((resolve2, _) => {
35369
35732
  var _a3;
35370
35733
  if (navigator.geolocation) {
35371
- navigator.geolocation.getCurrentPosition((res) => {
35372
- var _a4, _b2, _c2;
35373
- (_c2 = params == null ? void 0 : params.success) == null ? void 0 : _c2.call(params, {
35374
- result: {
35375
- lat: (_a4 = res == null ? void 0 : res.coords) == null ? void 0 : _a4.latitude,
35376
- long: (_b2 = res == null ? void 0 : res.coords) == null ? void 0 : _b2.longitude
35377
- }
35378
- });
35379
- resolve2(null);
35380
- return;
35381
- }, () => {
35382
- var _a4;
35383
- (_a4 = params == null ? void 0 : params.fail) == null ? void 0 : _a4.call(params, {
35384
- errorCode: MiniAppErrorType.hostAppLocationDenied
35385
- });
35386
- resolve2(null);
35387
- return;
35388
- }, {
35389
- enableHighAccuracy: (params == null ? void 0 : params.accuracy) === "high",
35390
- timeout: 1e4,
35391
- maximumAge: 0
35392
- });
35734
+ navigator.geolocation.getCurrentPosition(
35735
+ (res) => {
35736
+ var _a4, _b2, _c2;
35737
+ (_c2 = params == null ? void 0 : params.success) == null ? void 0 : _c2.call(params, {
35738
+ result: {
35739
+ lat: (_a4 = res == null ? void 0 : res.coords) == null ? void 0 : _a4.latitude,
35740
+ long: (_b2 = res == null ? void 0 : res.coords) == null ? void 0 : _b2.longitude
35741
+ }
35742
+ });
35743
+ resolve2(null);
35744
+ return;
35745
+ },
35746
+ () => {
35747
+ var _a4;
35748
+ (_a4 = params == null ? void 0 : params.fail) == null ? void 0 : _a4.call(params, {
35749
+ errorCode: MiniAppErrorType.hostAppLocationDenied
35750
+ });
35751
+ resolve2(null);
35752
+ return;
35753
+ },
35754
+ {
35755
+ enableHighAccuracy: (params == null ? void 0 : params.accuracy) === "high",
35756
+ timeout: 1e4,
35757
+ maximumAge: 0
35758
+ }
35759
+ );
35393
35760
  } else {
35394
35761
  (_a3 = params == null ? void 0 : params.fail) == null ? void 0 : _a3.call(params, {
35395
35762
  errorCode: MiniAppErrorType.hostAppLocationDenied
@@ -35406,7 +35773,9 @@ async function checkPaymentMethod(checkPayMethodParams) {
35406
35773
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
35407
35774
  const params = reconstructParams(checkPayMethodParams);
35408
35775
  try {
35409
- const grantStatus = await checkPermission(PermissionName.mini_app_check_payment_method);
35776
+ const grantStatus = await checkPermission(
35777
+ PermissionName.mini_app_check_payment_method
35778
+ );
35410
35779
  if (grantStatus !== PermissionStatus.granted) {
35411
35780
  return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.insufficientScope });
35412
35781
  }
@@ -35446,7 +35815,7 @@ function debug(params) {
35446
35815
  function execute$6(params) {
35447
35816
  var _a2;
35448
35817
  (_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params, {
35449
- v: "1.56.0"
35818
+ v: "1.58.0"
35450
35819
  });
35451
35820
  }
35452
35821
  function useCallBack(props, ctx) {
@@ -36532,7 +36901,9 @@ var AppVue$1 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$
36532
36901
  async function initRegisterEmail(initRegisterEmail2, allowsUpdate) {
36533
36902
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
36534
36903
  try {
36535
- const grantStatus = await checkPermission(PermissionName.mini_app_user_email_address);
36904
+ const grantStatus = await checkPermission(
36905
+ PermissionName.mini_app_user_email_address
36906
+ );
36536
36907
  if (grantStatus !== PermissionStatus.granted) {
36537
36908
  (_a2 = initRegisterEmail2 == null ? void 0 : initRegisterEmail2.fail) == null ? void 0 : _a2.call(initRegisterEmail2, {
36538
36909
  errorCode: MiniAppErrorType.insufficientScope
@@ -36577,7 +36948,8 @@ async function initRegisterEmail(initRegisterEmail2, allowsUpdate) {
36577
36948
  }, 350);
36578
36949
  };
36579
36950
  const resendOption = allowsUpdate && email2 && !emailVerified ? { resend: true, maskedEmail: email2 } : null;
36580
- const app = createApp(__spreadProps(__spreadValues({}, popStateHandler(closeSheet, initRegisterEmail2)), {
36951
+ const app = createApp({
36952
+ ...popStateHandler(closeSheet, initRegisterEmail2),
36581
36953
  render() {
36582
36954
  return h(AppVue$1, {
36583
36955
  show: show2.value,
@@ -36586,7 +36958,7 @@ async function initRegisterEmail(initRegisterEmail2, allowsUpdate) {
36586
36958
  resendOption
36587
36959
  });
36588
36960
  }
36589
- }));
36961
+ });
36590
36962
  const container2 = document.createElement("div");
36591
36963
  container2.className = "ppmna-reset-css";
36592
36964
  app.mount(container2);
@@ -36614,16 +36986,19 @@ function registerKyc(params) {
36614
36986
  }
36615
36987
  function execute$5(params) {
36616
36988
  var _a2;
36617
- params = __spreadProps(__spreadValues({}, params), {
36989
+ params = {
36990
+ ...params,
36618
36991
  type: (params == null ? void 0 : params.type) || "EKYC"
36619
- });
36992
+ };
36620
36993
  const appDetail = getAppDetail();
36621
36994
  const clientId = getClientId();
36622
36995
  if (!clientId) {
36623
36996
  (_a2 = params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.sdkNotInitialized });
36624
36997
  return;
36625
36998
  }
36626
- let deeplink = `paypay://kyc/top?appId=${clientId}&appName=${encodeURIComponent((appDetail == null ? void 0 : appDetail.appName) || "")}`;
36999
+ let deeplink = `paypay://kyc/top?appId=${clientId}&appName=${encodeURIComponent(
37000
+ (appDetail == null ? void 0 : appDetail.appName) || ""
37001
+ )}`;
36627
37002
  Object.entries(params).map(([key2, value2]) => {
36628
37003
  if (typeof value2 !== "function") {
36629
37004
  let kycData = encodeURIComponent(String(value2));
@@ -36648,6 +37023,11 @@ function execute$5(params) {
36648
37023
  });
36649
37024
  }
36650
37025
  }
37026
+ const MinVersion = {
37027
+ PRE_TRANSACTION_AUTO_CHARGE: "3.43.0",
37028
+ FALLBACK_PAYMENT_METHOD: "3.61.0",
37029
+ START_MULTIFACTOR_AUTH_ANDROID_FIX: "3.67.0"
37030
+ };
36651
37031
  async function startMultiFactorAuth(params) {
36652
37032
  const newParams = reconstructParams(params);
36653
37033
  await execute$4(newParams);
@@ -36662,6 +37042,17 @@ async function execute$4(params) {
36662
37042
  return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.invalidType });
36663
37043
  }
36664
37044
  try {
37045
+ if (getRuntime() === MiniAppRuntime.android && !checkVersion(MinVersion.START_MULTIFACTOR_AUTH_ANDROID_FIX)) {
37046
+ await new Promise((resolve2, reject) => {
37047
+ jsBridge$1.callNative("getUAID", {
37048
+ success: () => resolve2(),
37049
+ fail: reject
37050
+ });
37051
+ setTimeout(() => {
37052
+ resolve2();
37053
+ }, 1e3);
37054
+ });
37055
+ }
36665
37056
  const res = await ppFetch2({
36666
37057
  method: "GET",
36667
37058
  url: "/web-api/app/v1/authentication/sessionId"
@@ -36671,7 +37062,7 @@ async function execute$4(params) {
36671
37062
  }
36672
37063
  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) {
36673
37064
  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;
36674
- const deeplink = `paypay://miniAppMFA?ppSessionId=${sessionId}&type=${params.type}&callbackUrl=${params == null ? void 0 : params.callbackUrl}`;
37065
+ const deeplink = `paypay://miniAppMFA?ppSessionId=${sessionId}&type=${params.type}&callbackUrl=${encodeURIComponent(params == null ? void 0 : params.callbackUrl)}`;
36675
37066
  closeApp({
36676
37067
  options: {
36677
37068
  deeplink
@@ -36732,7 +37123,9 @@ async function execute$2(params) {
36732
37123
  throw Error();
36733
37124
  }
36734
37125
  } else {
36735
- throw Error(((_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);
37126
+ throw Error(
37127
+ ((_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
37128
+ );
36736
37129
  }
36737
37130
  } catch (e) {
36738
37131
  return (_l = params == null ? void 0 : params.fail) == null ? void 0 : _l.call(params, {
@@ -37111,9 +37504,8 @@ var en = {
37111
37504
  },
37112
37505
  registerPaymentFeatures: registerPaymentFeatures$1
37113
37506
  };
37114
- var en$1 = /* @__PURE__ */ Object.freeze({
37507
+ var en$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
37115
37508
  __proto__: null,
37116
- [Symbol.toStringTag]: "Module",
37117
37509
  showUpdateWarning,
37118
37510
  openApp,
37119
37511
  openMap,
@@ -37143,7 +37535,7 @@ var en$1 = /* @__PURE__ */ Object.freeze({
37143
37535
  getBankInfo: getBankInfo$1,
37144
37536
  registerPaymentFeatures: registerPaymentFeatures$1,
37145
37537
  "default": en
37146
- });
37538
+ }, Symbol.toStringTag, { value: "Module" }));
37147
37539
  function getRenderLoginInfo(params) {
37148
37540
  var _a2;
37149
37541
  let preferredLanguage = (params == null ? void 0 : params.locale) || getPayPayLanguage();
@@ -37156,16 +37548,18 @@ function getRenderLoginInfo(params) {
37156
37548
  if (loggedinUser == null ? void 0 : loggedinUser.nickName) {
37157
37549
  let title2 = loggedinUser == null ? void 0 : loggedinUser.nickName;
37158
37550
  if (((_a2 = loggedinUser == null ? void 0 : loggedinUser.avatarUrl) == null ? void 0 : _a2.indexOf("defaultAvatar@3x")) === -1 && (params == null ? void 0 : params.buttonSize) !== "sm") {
37159
- data2 = __spreadProps(__spreadValues({}, data2), {
37551
+ data2 = {
37552
+ ...data2,
37160
37553
  avatarUrl: loggedinUser.avatarUrl
37161
- });
37554
+ };
37162
37555
  }
37163
37556
  if (!((params == null ? void 0 : params.isShortText) || (params == null ? void 0 : params.buttonSize) === "sm")) {
37164
37557
  title2 = updateLocalisedString(smartLogin2.continueAs, "{user}", title2);
37165
37558
  }
37166
- data2 = __spreadProps(__spreadValues({}, data2), {
37559
+ data2 = {
37560
+ ...data2,
37167
37561
  title: title2
37168
- });
37562
+ };
37169
37563
  }
37170
37564
  return {
37171
37565
  data: data2,
@@ -37337,20 +37731,21 @@ var AppVue = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$y]
37337
37731
  const initSmartButton = (params, data2, preferredLanguage, isLoggedIn) => {
37338
37732
  const smartButtonParams = reactive(params);
37339
37733
  const triggerPayment = () => {
37340
- makePayment(__spreadProps(__spreadValues({}, smartButtonParams == null ? void 0 : smartButtonParams.orderInfo), {
37734
+ makePayment({
37735
+ ...smartButtonParams == null ? void 0 : smartButtonParams.orderInfo,
37341
37736
  success: (res) => {
37342
37737
  var _a2;
37343
- (_a2 = smartButtonParams == null ? void 0 : smartButtonParams.success) == null ? void 0 : _a2.call(smartButtonParams, __spreadValues({}, res));
37738
+ (_a2 = smartButtonParams == null ? void 0 : smartButtonParams.success) == null ? void 0 : _a2.call(smartButtonParams, { ...res });
37344
37739
  },
37345
37740
  fail: (err) => {
37346
37741
  var _a2;
37347
- (_a2 = smartButtonParams == null ? void 0 : smartButtonParams.fail) == null ? void 0 : _a2.call(smartButtonParams, __spreadValues({}, err));
37742
+ (_a2 = smartButtonParams == null ? void 0 : smartButtonParams.fail) == null ? void 0 : _a2.call(smartButtonParams, { ...err });
37348
37743
  },
37349
37744
  complete: () => {
37350
37745
  var _a2;
37351
37746
  (_a2 = smartButtonParams == null ? void 0 : smartButtonParams.complete) == null ? void 0 : _a2.call(smartButtonParams);
37352
37747
  }
37353
- })).catch(() => {
37748
+ }).catch(() => {
37354
37749
  });
37355
37750
  };
37356
37751
  const app = createApp({
@@ -37391,9 +37786,10 @@ async function getRenderPayInfo(params) {
37391
37786
  let preferredLanguage = (params == null ? void 0 : params.locale) || getPayPayLanguage();
37392
37787
  const { smartPay: smartPay2 } = preferredLanguage === "en" ? en$1 : ja$2;
37393
37788
  const loggedIn = await getIsLoggedIn();
37394
- const renderParams = loggedIn ? __spreadProps(__spreadValues({}, params), {
37789
+ const renderParams = loggedIn ? {
37790
+ ...params,
37395
37791
  url: void 0
37396
- }) : params;
37792
+ } : params;
37397
37793
  if ((params == null ? void 0 : params.orderInfo) && loggedIn) {
37398
37794
  const { orderInfo } = params;
37399
37795
  const res = await getExpectedCashbackInfo(orderInfo);
@@ -37444,7 +37840,9 @@ function createCashbackInfo(cashbackResponse) {
37444
37840
  if ((_a2 = cashbackResponse.unsigned) == null ? void 0 : _a2.data) {
37445
37841
  const { normalCashbackPercentage, lotteryCashbackPercentage } = (_b = cashbackResponse.unsigned) == null ? void 0 : _b.data;
37446
37842
  if (normalCashbackPercentage || lotteryCashbackPercentage) {
37447
- let tempCashback = Number((parseFloat(normalCashbackPercentage != null ? normalCashbackPercentage : "0") + parseFloat(lotteryCashbackPercentage != null ? lotteryCashbackPercentage : "0")).toFixed(1));
37843
+ let tempCashback = Number(
37844
+ (parseFloat(normalCashbackPercentage != null ? normalCashbackPercentage : "0") + parseFloat(lotteryCashbackPercentage != null ? lotteryCashbackPercentage : "0")).toFixed(1)
37845
+ );
37448
37846
  return tempCashback ? tempCashback.toString() : "";
37449
37847
  }
37450
37848
  }
@@ -37469,9 +37867,14 @@ function getRenderPayButtonInfo(params, lg2, cashbackInfo2) {
37469
37867
  title: (params == null ? void 0 : params.isShortText) ? lg2.paypay : lg2.pay
37470
37868
  };
37471
37869
  if (cashbackInfo2) {
37472
- data2 = __spreadProps(__spreadValues({}, data2), {
37473
- cashbackInfo: updateLocalisedString(lg2.cashback, "{cashback}", cashbackInfo2)
37474
- });
37870
+ data2 = {
37871
+ ...data2,
37872
+ cashbackInfo: updateLocalisedString(
37873
+ lg2.cashback,
37874
+ "{cashback}",
37875
+ cashbackInfo2
37876
+ )
37877
+ };
37475
37878
  }
37476
37879
  return data2;
37477
37880
  }
@@ -37486,13 +37889,22 @@ function render(params) {
37486
37889
  if ((params == null ? void 0 : params.type) === "login") {
37487
37890
  const loginButtonInfo = getRenderLoginInfo(params);
37488
37891
  callbackHandler(params, () => {
37489
- initSmartButton(params, loginButtonInfo.data, loginButtonInfo.preferredLanguage);
37892
+ initSmartButton(
37893
+ params,
37894
+ loginButtonInfo.data,
37895
+ loginButtonInfo.preferredLanguage
37896
+ );
37490
37897
  });
37491
37898
  } else if ((params == null ? void 0 : params.type) === "pay") {
37492
37899
  getRenderPayInfo(params).then((payButtonInfo) => {
37493
37900
  callbackHandler(params, () => {
37494
37901
  if (payButtonInfo) {
37495
- initSmartButton(payButtonInfo.renderParams, payButtonInfo.data, payButtonInfo.preferredLanguage, payButtonInfo.loggedIn);
37902
+ initSmartButton(
37903
+ payButtonInfo.renderParams,
37904
+ payButtonInfo.data,
37905
+ payButtonInfo.preferredLanguage,
37906
+ payButtonInfo.loggedIn
37907
+ );
37496
37908
  }
37497
37909
  });
37498
37910
  }).catch(() => {
@@ -37786,7 +38198,10 @@ const useRegisterUserInfoStore = defineStore("registerUserInfo", {
37786
38198
  };
37787
38199
  return;
37788
38200
  }
37789
- const formData = transformFormData(resp.body.unsigned.data, params.fieldInForm);
38201
+ const formData = transformFormData(
38202
+ resp.body.unsigned.data,
38203
+ params.fieldInForm
38204
+ );
37790
38205
  if (formData.categories.length === 0) {
37791
38206
  this.result = {
37792
38207
  type: "success"
@@ -37838,7 +38253,10 @@ const useRegisterUserInfoStore = defineStore("registerUserInfo", {
37838
38253
  throw new Error();
37839
38254
  }
37840
38255
  }
37841
- this.savedValues = __spreadValues(__spreadValues({}, this.savedValues), this.inputValues);
38256
+ this.savedValues = {
38257
+ ...this.savedValues,
38258
+ ...this.inputValues
38259
+ };
37842
38260
  if (this.currentCategoryIndex < this.formData.categories.length - 1) {
37843
38261
  this.currentCategoryIndex++;
37844
38262
  this.inputValues = {};
@@ -37935,23 +38353,30 @@ function transformFormData(formData, fieldInForm) {
37935
38353
  }
37936
38354
  return false;
37937
38355
  });
37938
- return __spreadProps(__spreadValues({}, formData), {
38356
+ return {
38357
+ ...formData,
37939
38358
  categories: categories2
37940
- });
38359
+ };
37941
38360
  }
37942
- let categories = formData.categories.filter((cat) => !cat.isAllDataPointFilled);
38361
+ let categories = formData.categories.filter(
38362
+ (cat) => !cat.isAllDataPointFilled
38363
+ );
37943
38364
  categories = categories.map((cat) => {
37944
38365
  const groups = cat.dataPointGroup.filter((group) => {
37945
- const isAllFilled = group.dataPoints.every((dp) => !dp.isKycData && dp.isEditable && dp.value);
38366
+ const isAllFilled = group.dataPoints.every(
38367
+ (dp) => !dp.isKycData && dp.isEditable && dp.value
38368
+ );
37946
38369
  return !isAllFilled;
37947
38370
  });
37948
- return __spreadProps(__spreadValues({}, cat), {
38371
+ return {
38372
+ ...cat,
37949
38373
  dataPointGroup: groups
37950
- });
38374
+ };
37951
38375
  }).filter((cat) => cat.dataPointGroup.some(isEditableDataPointGroup));
37952
- return __spreadProps(__spreadValues({}, formData), {
38376
+ return {
38377
+ ...formData,
37953
38378
  categories
37954
- });
38379
+ };
37955
38380
  }
37956
38381
  const _sfc_main$x = defineComponent({
37957
38382
  name: "RegisterUserInfoCancelConfirmationSheet",
@@ -38070,16 +38495,21 @@ const _sfc_main$v = defineComponent({
38070
38495
  }
38071
38496
  });
38072
38497
  const state = reactive({
38073
- value: store.currentValue(__spreadValues({}, props.dataPoint))
38498
+ value: store.currentValue({
38499
+ ...props.dataPoint
38500
+ })
38074
38501
  });
38075
38502
  const hasError = computed(() => store.hasValidationError(props.dataPoint));
38076
- watch(() => state.value, (value2) => {
38077
- store.onInputValueChange(props.dataPoint, value2);
38078
- const result2 = validate(props.dataPoint, value2);
38079
- if (result2.ok && result2.convertTo) {
38080
- state.value = result2.convertTo;
38503
+ watch(
38504
+ () => state.value,
38505
+ (value2) => {
38506
+ store.onInputValueChange(props.dataPoint, value2);
38507
+ const result2 = validate(props.dataPoint, value2);
38508
+ if (result2.ok && result2.convertTo) {
38509
+ state.value = result2.convertTo;
38510
+ }
38081
38511
  }
38082
- });
38512
+ );
38083
38513
  const hasFocus = ref(false);
38084
38514
  const onFocus = () => {
38085
38515
  hasFocus.value = true;
@@ -38087,7 +38517,9 @@ const _sfc_main$v = defineComponent({
38087
38517
  const onBlur = () => {
38088
38518
  hasFocus.value = false;
38089
38519
  };
38090
- const showsClearButton = computed(() => state.value.length > 0 && hasFocus.value);
38520
+ const showsClearButton = computed(
38521
+ () => state.value.length > 0 && hasFocus.value
38522
+ );
38091
38523
  const onClear = (e) => {
38092
38524
  e.preventDefault();
38093
38525
  state.value = "";
@@ -38165,10 +38597,12 @@ const _sfc_main$u = defineComponent({
38165
38597
  var _a2;
38166
38598
  return (_a2 = props.dataPoint.selectionItems) != null ? _a2 : [];
38167
38599
  });
38168
- const selectedValue = computed(() => {
38169
- var _a2;
38170
- return (_a2 = store.inputValues[props.dataPoint.name]) != null ? _a2 : store.currentValue(props.dataPoint);
38171
- });
38600
+ const selectedValue = computed(
38601
+ () => {
38602
+ var _a2;
38603
+ return (_a2 = store.inputValues[props.dataPoint.name]) != null ? _a2 : store.currentValue(props.dataPoint);
38604
+ }
38605
+ );
38172
38606
  const onClick = (value2) => {
38173
38607
  store.onInputValueChange(props.dataPoint, value2);
38174
38608
  };
@@ -38235,8 +38669,12 @@ const _sfc_main$t = defineComponent({
38235
38669
  store.getEmailStatus();
38236
38670
  });
38237
38671
  const currentEmail = computed(() => store.email || props.dataPoint.value);
38238
- const currentEmailLabel = computed(() => store.emailStatus ? currentEmail.value || lg2.registerUserInfo.emailInput : "");
38239
- const notVerified2 = computed(() => currentEmail.value && store.emailStatus === "NOT_VERIFIED");
38672
+ const currentEmailLabel = computed(
38673
+ () => store.emailStatus ? currentEmail.value || lg2.registerUserInfo.emailInput : ""
38674
+ );
38675
+ const notVerified2 = computed(
38676
+ () => currentEmail.value && store.emailStatus === "NOT_VERIFIED"
38677
+ );
38240
38678
  const isVerified = computed(() => store.emailStatus === "VERIFIED");
38241
38679
  let registerEmailIsActive = false;
38242
38680
  const startEmailRegistration = () => {
@@ -38247,17 +38685,20 @@ const _sfc_main$t = defineComponent({
38247
38685
  store.showMailInfoSheet();
38248
38686
  } else if (!registerEmailIsActive) {
38249
38687
  registerEmailIsActive = true;
38250
- registerEmail({
38251
- success: () => {
38252
- store.getEmailStatus();
38253
- },
38254
- fail: () => {
38255
- store.getEmailStatus();
38688
+ registerEmail(
38689
+ {
38690
+ success: () => {
38691
+ store.getEmailStatus();
38692
+ },
38693
+ fail: () => {
38694
+ store.getEmailStatus();
38695
+ },
38696
+ complete: () => {
38697
+ registerEmailIsActive = false;
38698
+ }
38256
38699
  },
38257
- complete: () => {
38258
- registerEmailIsActive = false;
38259
- }
38260
- }, true);
38700
+ true
38701
+ );
38261
38702
  }
38262
38703
  };
38263
38704
  return {
@@ -38427,7 +38868,9 @@ const _sfc_main$r = defineComponent({
38427
38868
  const val2 = (_a2 = dataPoint.value) != null ? _a2 : "";
38428
38869
  switch (dataPoint.type) {
38429
38870
  case "MOBILE_NUMBER":
38430
- return val2 ? `${val2.substring(0, 3)}-${val2.substring(3, 7)}-${val2.substring(7)}` : "";
38871
+ return val2 ? `${val2.substring(0, 3)}-${val2.substring(3, 7)}-${val2.substring(
38872
+ 7
38873
+ )}` : "";
38431
38874
  case "DATE": {
38432
38875
  const ymd = val2.split("-").map((s) => Number.parseInt(s, 10));
38433
38876
  if (ymd.length === 3) {
@@ -38595,9 +39038,15 @@ const _sfc_main$p = defineComponent({
38595
39038
  },
38596
39039
  setup(props) {
38597
39040
  const store = useRegisterUserInfoStore();
38598
- const kycDataPointGroups = computed(() => props.category.dataPointGroup.filter(isKycDataPointGroup));
38599
- const uneditableDataPointGroups = computed(() => props.category.dataPointGroup.filter(isUneditableDataPointGroup));
38600
- const editableDataPointGroups = computed(() => props.category.dataPointGroup.filter(isEditableDataPointGroup));
39041
+ const kycDataPointGroups = computed(
39042
+ () => props.category.dataPointGroup.filter(isKycDataPointGroup)
39043
+ );
39044
+ const uneditableDataPointGroups = computed(
39045
+ () => props.category.dataPointGroup.filter(isUneditableDataPointGroup)
39046
+ );
39047
+ const editableDataPointGroups = computed(
39048
+ () => props.category.dataPointGroup.filter(isEditableDataPointGroup)
39049
+ );
38601
39050
  const isDefaultMode = computed(() => store.mode === "default");
38602
39051
  return {
38603
39052
  lg: getLanguage(),
@@ -38694,7 +39143,9 @@ const _sfc_main$o = defineComponent({
38694
39143
  const lg2 = getLanguage();
38695
39144
  const store = useRegisterUserInfoStore();
38696
39145
  const showsBackButton = computed(() => store.currentCategoryIndex > 0);
38697
- const saveButtonTitle = computed(() => store.numberOfCategories === 1 ? lg2.registerUserInfo.footer.finishButton : lg2.registerUserInfo.footer.nextButton);
39146
+ const saveButtonTitle = computed(
39147
+ () => store.numberOfCategories === 1 ? lg2.registerUserInfo.footer.finishButton : lg2.registerUserInfo.footer.nextButton
39148
+ );
38698
39149
  return {
38699
39150
  lg: lg2,
38700
39151
  store,
@@ -38758,7 +39209,9 @@ const _sfc_main$n = defineComponent({
38758
39209
  components: { RegisterUserInfoCategoryView, RegisterUserInfoFooterView },
38759
39210
  setup() {
38760
39211
  const store = useRegisterUserInfoStore();
38761
- const category2 = computed(() => store.categoryAtIndex(store.currentCategoryIndex));
39212
+ const category2 = computed(
39213
+ () => store.categoryAtIndex(store.currentCategoryIndex)
39214
+ );
38762
39215
  const h2 = useGetHeightProperties();
38763
39216
  const categoryStyle = {
38764
39217
  paddingTop: `${h2.headerHeight}px`
@@ -38939,21 +39392,24 @@ const _sfc_main$k = defineComponent({
38939
39392
  emit("complete");
38940
39393
  (_b = (_a2 = props.params).complete) == null ? void 0 : _b.call(_a2);
38941
39394
  };
38942
- watch(() => store.result, (result2) => {
38943
- var _a2, _b, _c, _d;
38944
- if (!result2) {
38945
- return;
38946
- }
38947
- if (result2.type === "success") {
38948
- (_b = (_a2 = props.params).success) == null ? void 0 : _b.call(_a2);
38949
- }
38950
- if (result2.type === "fail") {
38951
- (_d = (_c = props.params).fail) == null ? void 0 : _d.call(_c, { errorCode: result2.errorCode });
38952
- }
38953
- if (!store.formData) {
38954
- complete();
39395
+ watch(
39396
+ () => store.result,
39397
+ (result2) => {
39398
+ var _a2, _b, _c, _d;
39399
+ if (!result2) {
39400
+ return;
39401
+ }
39402
+ if (result2.type === "success") {
39403
+ (_b = (_a2 = props.params).success) == null ? void 0 : _b.call(_a2);
39404
+ }
39405
+ if (result2.type === "fail") {
39406
+ (_d = (_c = props.params).fail) == null ? void 0 : _d.call(_c, { errorCode: result2.errorCode });
39407
+ }
39408
+ if (!store.formData) {
39409
+ complete();
39410
+ }
38955
39411
  }
38956
- });
39412
+ );
38957
39413
  return {
38958
39414
  store,
38959
39415
  complete
@@ -39357,11 +39813,11 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
39357
39813
  const cssModules$d = {};
39358
39814
  cssModules$d["$style"] = style0$d;
39359
39815
  var GetBankInfoPopup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__cssModules", cssModules$d]]);
39360
- var OPAErrorCodes;
39361
- (function(OPAErrorCodes2) {
39816
+ var OPAErrorCodes = /* @__PURE__ */ ((OPAErrorCodes2) => {
39362
39817
  OPAErrorCodes2["noKycUser"] = "NO_KYC_USER";
39363
39818
  OPAErrorCodes2["noPayoutMethod"] = "PAYMENT_NOT_FOUND";
39364
- })(OPAErrorCodes || (OPAErrorCodes = {}));
39819
+ return OPAErrorCodes2;
39820
+ })(OPAErrorCodes || {});
39365
39821
  const _sfc_main$f = defineComponent({
39366
39822
  name: "GetBankInfoWrapper",
39367
39823
  components: {
@@ -39394,7 +39850,9 @@ const _sfc_main$f = defineComponent({
39394
39850
  onBeforeMount(async () => {
39395
39851
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
39396
39852
  try {
39397
- const grantStatus = await checkPermission(PermissionName.mini_app_bank_information);
39853
+ const grantStatus = await checkPermission(
39854
+ PermissionName.mini_app_bank_information
39855
+ );
39398
39856
  if (grantStatus !== PermissionStatus.granted) {
39399
39857
  handleClose(MiniAppErrorType.insufficientScope);
39400
39858
  return;
@@ -39450,9 +39908,12 @@ const _sfc_main$f = defineComponent({
39450
39908
  emit("complete");
39451
39909
  return;
39452
39910
  }
39453
- watch(() => state.animationComplete, (val2) => {
39454
- val2 && emit("complete");
39455
- });
39911
+ watch(
39912
+ () => state.animationComplete,
39913
+ (val2) => {
39914
+ val2 && emit("complete");
39915
+ }
39916
+ );
39456
39917
  }
39457
39918
  };
39458
39919
  return {
@@ -39504,7 +39965,7 @@ function execute$1(params) {
39504
39965
  (_a3 = params == null ? void 0 : params.complete) == null ? void 0 : _a3.call(params);
39505
39966
  }, 300);
39506
39967
  };
39507
- const app = createApp(__spreadValues({
39968
+ const app = createApp({
39508
39969
  setup() {
39509
39970
  return () => h(GetBankInfoWrapper, {
39510
39971
  show: show2.value,
@@ -39513,8 +39974,9 @@ function execute$1(params) {
39513
39974
  closeSheet();
39514
39975
  }
39515
39976
  });
39516
- }
39517
- }, popStateHandler(closeSheet, params)));
39977
+ },
39978
+ ...popStateHandler(closeSheet, params)
39979
+ });
39518
39980
  app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
39519
39981
  app.mount(container2);
39520
39982
  document.body.appendChild(container2);
@@ -39575,378 +40037,391 @@ function getAvailableMethod(element) {
39575
40037
  return element;
39576
40038
  }
39577
40039
  }
39578
- const useRegisterPaymentFeaturesStore = defineStore("registerPaymentFeatures", {
39579
- state: () => {
39580
- return {
39581
- mode: AutoTopupModeType.UNREGISTERED,
39582
- minimumTopupAmount: 0,
39583
- selectedPaymentMethodInfo: void 0,
39584
- paymentMethodList: void 0,
39585
- result: void 0,
39586
- uiIsVisible: false,
39587
- needUpdate: false,
39588
- autoChargeTopupHalfSheetAmount: void 0,
39589
- autoChargeRecommendedTopupAmount: void 0,
39590
- isFinishSetting: false,
39591
- renderRoot: false,
39592
- isLimitAmountErrorOccur: false,
39593
- ui: {
39594
- isChooseAmount: false,
39595
- isChooseTopupMethod: false,
39596
- isSettingComplete: false,
39597
- isTopupMethodSetting: false,
39598
- isTopupAmountSetting: false,
39599
- isAutoTopupConfirm: false,
39600
- isAmountError: false,
39601
- isThreeDSecure: false,
39602
- amountErrorInfo: {
39603
- title: "",
39604
- description: "",
39605
- buttonList: [],
39606
- canCloseByOutsideTap: false
40040
+ const useRegisterPaymentFeaturesStore = defineStore(
40041
+ "registerPaymentFeatures",
40042
+ {
40043
+ state: () => {
40044
+ return {
40045
+ mode: AutoTopupModeType.UNREGISTERED,
40046
+ minimumTopupAmount: 0,
40047
+ selectedPaymentMethodInfo: void 0,
40048
+ paymentMethodList: void 0,
40049
+ result: void 0,
40050
+ uiIsVisible: false,
40051
+ needUpdate: false,
40052
+ autoChargeTopupHalfSheetAmount: void 0,
40053
+ autoChargeRecommendedTopupAmount: void 0,
40054
+ isFinishSetting: false,
40055
+ renderRoot: false,
40056
+ isLimitAmountErrorOccur: false,
40057
+ ui: {
40058
+ isChooseAmount: false,
40059
+ isChooseTopupMethod: false,
40060
+ isSettingComplete: false,
40061
+ isTopupMethodSetting: false,
40062
+ isTopupAmountSetting: false,
40063
+ isAutoTopupConfirm: false,
40064
+ isAmountError: false,
40065
+ isThreeDSecure: false,
40066
+ amountErrorInfo: {
40067
+ title: "",
40068
+ description: "",
40069
+ buttonList: [],
40070
+ canCloseByOutsideTap: false
40071
+ },
40072
+ threeDSecureCCType: ""
39607
40073
  },
39608
- threeDSecureCCType: ""
40074
+ errorSheet: {
40075
+ isVisible: false
40076
+ },
40077
+ isEmoneyOnly: false,
40078
+ showEmoneyOnlyNotice: false,
40079
+ ptacPaymentMethodId: void 0
40080
+ };
40081
+ },
40082
+ getters: {
40083
+ defaultPaymentMethod() {
40084
+ var _a2;
40085
+ if (!this.existActivatedMethod) {
40086
+ return;
40087
+ }
40088
+ const avaliableMethod = (_a2 = this.paymentMethodList) == null ? void 0 : _a2.find(
40089
+ (paymentMethod2) => {
40090
+ return getAvailableMethod(paymentMethod2);
40091
+ }
40092
+ );
40093
+ return avaliableMethod;
39609
40094
  },
39610
- errorSheet: {
39611
- isVisible: false
40095
+ availablePaymentMethodList() {
40096
+ return this.paymentMethodList;
39612
40097
  },
39613
- isEmoneyOnly: false,
39614
- showEmoneyOnlyNotice: false,
39615
- ptacPaymentMethodId: void 0
39616
- };
39617
- },
39618
- getters: {
39619
- defaultPaymentMethod() {
39620
- var _a2;
39621
- if (!this.existActivatedMethod) {
39622
- return;
39623
- }
39624
- const avaliableMethod = (_a2 = this.paymentMethodList) == null ? void 0 : _a2.find((paymentMethod2) => {
39625
- return getAvailableMethod(paymentMethod2);
39626
- });
39627
- return avaliableMethod;
39628
- },
39629
- availablePaymentMethodList() {
39630
- return this.paymentMethodList;
39631
- },
39632
- selectedAvailableTopupMethod() {
39633
- return getAvailableMethod(this.selectedPaymentMethodInfo);
39634
- },
39635
- existActivatedMethod() {
39636
- var _a2;
39637
- const activatedMethod = (_a2 = this.paymentMethodList) == null ? void 0 : _a2.filter((element) => {
39638
- return getAvailableMethod(element);
39639
- });
39640
- if (activatedMethod) {
39641
- return activatedMethod.length > 0;
39642
- } else {
40098
+ selectedAvailableTopupMethod() {
40099
+ return getAvailableMethod(this.selectedPaymentMethodInfo);
40100
+ },
40101
+ existActivatedMethod() {
40102
+ var _a2;
40103
+ const activatedMethod = (_a2 = this.paymentMethodList) == null ? void 0 : _a2.filter((element) => {
40104
+ return getAvailableMethod(element);
40105
+ });
40106
+ if (activatedMethod) {
40107
+ return activatedMethod.length > 0;
40108
+ } else {
40109
+ return false;
40110
+ }
40111
+ },
40112
+ selectedPaymentMethodIndex() {
40113
+ var _a2;
40114
+ const index2 = (_a2 = this.availablePaymentMethodList) == null ? void 0 : _a2.findIndex(
40115
+ (element) => {
40116
+ var _a3;
40117
+ return element.paymentMethodId === ((_a3 = this.selectedPaymentMethodInfo) == null ? void 0 : _a3.paymentMethodId);
40118
+ }
40119
+ );
40120
+ if (index2) {
40121
+ return index2;
40122
+ }
40123
+ return 0;
40124
+ },
40125
+ displayActivateButton() {
40126
+ return !!this.selectedAvailableTopupMethod;
40127
+ },
40128
+ requireConfirm() {
40129
+ return this.mode === AutoTopupModeType.POST_AUTO_TOPUP && !this.isLimitAmountErrorOccur;
40130
+ },
40131
+ isEmptyPaymentMethodList() {
40132
+ if (!this.paymentMethodList || this.paymentMethodList.length === 0) {
40133
+ return true;
40134
+ }
39643
40135
  return false;
39644
40136
  }
39645
40137
  },
39646
- selectedPaymentMethodIndex() {
39647
- var _a2;
39648
- const index2 = (_a2 = this.availablePaymentMethodList) == null ? void 0 : _a2.findIndex((element) => {
39649
- var _a3;
39650
- return element.paymentMethodId === ((_a3 = this.selectedPaymentMethodInfo) == null ? void 0 : _a3.paymentMethodId);
39651
- });
39652
- if (index2) {
39653
- return index2;
39654
- }
39655
- return 0;
39656
- },
39657
- displayActivateButton() {
39658
- return !!this.selectedAvailableTopupMethod;
39659
- },
39660
- requireConfirm() {
39661
- return this.mode === AutoTopupModeType.POST_AUTO_TOPUP && !this.isLimitAmountErrorOccur;
39662
- },
39663
- isEmptyPaymentMethodList() {
39664
- if (!this.paymentMethodList || this.paymentMethodList.length === 0) {
39665
- return true;
39666
- }
39667
- return false;
39668
- }
39669
- },
39670
- actions: {
39671
- setAmount(payload) {
39672
- this.minimumTopupAmount = payload.amount;
39673
- },
39674
- selectPaymentMethod(payload) {
39675
- var _a2;
39676
- this.selectedPaymentMethodInfo = this.availablePaymentMethodList ? this.availablePaymentMethodList[payload.paymentIndex] : void 0;
39677
- if (((_a2 = this.selectedPaymentMethodInfo) == null ? void 0 : _a2.paymentMethodId) !== this.ptacPaymentMethodId && this.isEmoneyOnly) {
39678
- this.showEmoneyOnlyNotice = false;
39679
- }
39680
- },
39681
- async initialize(isEmoneyOnly, needUpdate, merchant2, productType) {
39682
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
39683
- if (needUpdate) {
39684
- this.needUpdate = true;
40138
+ actions: {
40139
+ setAmount(payload) {
40140
+ this.minimumTopupAmount = payload.amount;
40141
+ },
40142
+ selectPaymentMethod(payload) {
40143
+ var _a2;
40144
+ this.selectedPaymentMethodInfo = this.availablePaymentMethodList ? this.availablePaymentMethodList[payload.paymentIndex] : void 0;
40145
+ if (((_a2 = this.selectedPaymentMethodInfo) == null ? void 0 : _a2.paymentMethodId) !== this.ptacPaymentMethodId && this.isEmoneyOnly) {
40146
+ this.showEmoneyOnlyNotice = false;
40147
+ }
40148
+ },
40149
+ async initialize(isEmoneyOnly, needUpdate, merchant2, productType) {
40150
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
40151
+ if (needUpdate) {
40152
+ this.needUpdate = true;
40153
+ this.renderRoot = true;
40154
+ this.openSetting();
40155
+ return;
40156
+ }
40157
+ this.isEmoneyOnly = isEmoneyOnly;
40158
+ const topupConfigParams = {
40159
+ includePaymentMethodList: true,
40160
+ merchant: merchant2,
40161
+ productType
40162
+ };
40163
+ const response = await getTopupConfiguration(topupConfigParams);
40164
+ if (response.ppFetchResult !== "success") {
40165
+ this.handleErrorResponse(response);
40166
+ return;
40167
+ }
40168
+ const config2 = (_b = (_a2 = response.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data;
40169
+ this.mode = getTopupSettingMode(config2);
40170
+ if (this.mode === AutoTopupModeType.PRE_AUTO_TOPUP) {
40171
+ this.ptacPaymentMethodId = (_c = config2.preTransactionAutoTopupConfiguration) == null ? void 0 : _c.paymentMethodId;
40172
+ this.paymentMethodList = (_d = config2.paymentMethodList) != null ? _d : [];
40173
+ this.minimumTopupAmount = (_e = config2.preTransactionAutoTopupConfiguration) == null ? void 0 : _e.minimumTopupAmount;
40174
+ if (((_f = this.paymentMethodList) == null ? void 0 : _f.length) > 0 && this.existActivatedMethod) {
40175
+ this.selectedPaymentMethodInfo = config2.preTransactionAutoTopupPaymentMethod;
40176
+ const isMethodAvailableInList = (_g = this.paymentMethodList) == null ? void 0 : _g.find(
40177
+ (element) => element.paymentMethodId === this.ptacPaymentMethodId
40178
+ );
40179
+ if (!isMethodAvailableInList && this.isEmoneyOnly) {
40180
+ this.showEmoneyOnlyNotice = true;
40181
+ }
40182
+ }
40183
+ }
40184
+ const appConfig = await this.initAppConfig();
40185
+ if (!appConfig) {
40186
+ return;
40187
+ }
40188
+ if (this.mode === AutoTopupModeType.POST_AUTO_TOPUP) {
40189
+ this.paymentMethodList = config2.paymentMethodList;
40190
+ this.minimumTopupAmount = (_h = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _h[0].value;
40191
+ this.selectedPaymentMethodInfo = (_i = this.paymentMethodList) == null ? void 0 : _i.find(
40192
+ (element) => {
40193
+ var _a3;
40194
+ return element.paymentMethodId === ((_a3 = config2.postTransactionAutoTopupConfiguration) == null ? void 0 : _a3.paymentMethodId);
40195
+ }
40196
+ );
40197
+ }
40198
+ if (this.mode === AutoTopupModeType.UNREGISTERED) {
40199
+ this.paymentMethodList = config2.paymentMethodList;
40200
+ this.selectedPaymentMethodInfo = this.defaultPaymentMethod;
40201
+ this.minimumTopupAmount = (_j = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _j[0].value;
40202
+ }
39685
40203
  this.renderRoot = true;
39686
40204
  this.openSetting();
39687
- return;
39688
- }
39689
- this.isEmoneyOnly = isEmoneyOnly;
39690
- const topupConfigParams = {
39691
- includePaymentMethodList: true,
39692
- merchant: merchant2,
39693
- productType
39694
- };
39695
- const response = await getTopupConfiguration(topupConfigParams);
39696
- if (response.ppFetchResult !== "success") {
39697
- this.handleErrorResponse(response);
39698
- return;
39699
- }
39700
- const config2 = (_b = (_a2 = response.body) == null ? void 0 : _a2.unsigned) == null ? void 0 : _b.data;
39701
- this.mode = getTopupSettingMode(config2);
39702
- if (this.mode === AutoTopupModeType.PRE_AUTO_TOPUP) {
39703
- this.ptacPaymentMethodId = (_c = config2.preTransactionAutoTopupConfiguration) == null ? void 0 : _c.paymentMethodId;
39704
- this.paymentMethodList = (_d = config2.paymentMethodList) != null ? _d : [];
39705
- this.minimumTopupAmount = (_e = config2.preTransactionAutoTopupConfiguration) == null ? void 0 : _e.minimumTopupAmount;
39706
- if (((_f = this.paymentMethodList) == null ? void 0 : _f.length) > 0 && this.existActivatedMethod) {
39707
- this.selectedPaymentMethodInfo = config2.preTransactionAutoTopupPaymentMethod;
39708
- const isMethodAvailableInList = (_g = this.paymentMethodList) == null ? void 0 : _g.find((element) => element.paymentMethodId === this.ptacPaymentMethodId);
39709
- if (!isMethodAvailableInList && this.isEmoneyOnly) {
39710
- this.showEmoneyOnlyNotice = true;
40205
+ },
40206
+ async showAddBankUI() {
40207
+ var _a2;
40208
+ const appConfig = await this.initAppConfig();
40209
+ if (!appConfig) {
40210
+ return;
40211
+ }
40212
+ this.minimumTopupAmount = (_a2 = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _a2[0].value;
40213
+ this.renderRoot = true;
40214
+ this.openSetting();
40215
+ },
40216
+ async initAppConfig() {
40217
+ let appConfig = getAppConfig();
40218
+ if (!appConfig || !("autoChargeTopupHalfSheetAmount" in appConfig) || !("autoChargeRecommendedTopupAmount" in appConfig)) {
40219
+ const isInit = await initAppConfiguration();
40220
+ if (!isInit) {
40221
+ this.result = {
40222
+ type: "fail",
40223
+ errorCode: MiniAppErrorType.serverError
40224
+ };
40225
+ return false;
39711
40226
  }
40227
+ appConfig = getAppConfig();
39712
40228
  }
39713
- }
39714
- const appConfig = await this.initAppConfig();
39715
- if (!appConfig) {
39716
- return;
39717
- }
39718
- if (this.mode === AutoTopupModeType.POST_AUTO_TOPUP) {
39719
- this.paymentMethodList = config2.paymentMethodList;
39720
- this.minimumTopupAmount = (_h = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _h[0].value;
39721
- this.selectedPaymentMethodInfo = (_i = this.paymentMethodList) == null ? void 0 : _i.find((element) => {
39722
- var _a3;
39723
- return element.paymentMethodId === ((_a3 = config2.postTransactionAutoTopupConfiguration) == null ? void 0 : _a3.paymentMethodId);
39724
- });
39725
- }
39726
- if (this.mode === AutoTopupModeType.UNREGISTERED) {
39727
- this.paymentMethodList = config2.paymentMethodList;
39728
- this.selectedPaymentMethodInfo = this.defaultPaymentMethod;
39729
- this.minimumTopupAmount = (_j = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _j[0].value;
39730
- }
39731
- this.renderRoot = true;
39732
- this.openSetting();
39733
- },
39734
- async showAddBankUI() {
39735
- var _a2;
39736
- const appConfig = await this.initAppConfig();
39737
- if (!appConfig) {
39738
- return;
39739
- }
39740
- this.minimumTopupAmount = (_a2 = this.autoChargeRecommendedTopupAmount) == null ? void 0 : _a2[0].value;
39741
- this.renderRoot = true;
39742
- this.openSetting();
39743
- },
39744
- async initAppConfig() {
39745
- let appConfig = getAppConfig();
39746
- if (!appConfig || !("autoChargeTopupHalfSheetAmount" in appConfig) || !("autoChargeRecommendedTopupAmount" in appConfig)) {
39747
- const isInit = await initAppConfiguration();
39748
- if (!isInit) {
39749
- this.result = {
39750
- type: "fail",
39751
- errorCode: MiniAppErrorType.serverError
39752
- };
39753
- return false;
40229
+ this.autoChargeTopupHalfSheetAmount = appConfig == null ? void 0 : appConfig.autoChargeTopupHalfSheetAmount;
40230
+ this.autoChargeRecommendedTopupAmount = appConfig == null ? void 0 : appConfig.autoChargeRecommendedTopupAmount;
40231
+ return true;
40232
+ },
40233
+ handleErrorResponse(response) {
40234
+ switch (response.ppFetchResult) {
40235
+ case "timeout":
40236
+ this.result = {
40237
+ type: "fail",
40238
+ errorCode: MiniAppErrorType.timeOut
40239
+ };
40240
+ return;
40241
+ default:
40242
+ this.result = {
40243
+ type: "fail",
40244
+ errorCode: MiniAppErrorType.serverError
40245
+ };
40246
+ return;
39754
40247
  }
39755
- appConfig = getAppConfig();
39756
- }
39757
- this.autoChargeTopupHalfSheetAmount = appConfig == null ? void 0 : appConfig.autoChargeTopupHalfSheetAmount;
39758
- this.autoChargeRecommendedTopupAmount = appConfig == null ? void 0 : appConfig.autoChargeRecommendedTopupAmount;
39759
- return true;
39760
- },
39761
- handleErrorResponse(response) {
39762
- switch (response.ppFetchResult) {
39763
- case "timeout":
39764
- this.result = {
39765
- type: "fail",
39766
- errorCode: MiniAppErrorType.timeOut
39767
- };
40248
+ },
40249
+ async setAutoTopupConfiguration() {
40250
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
40251
+ if (!this.selectedPaymentMethodInfo || !this.minimumTopupAmount) {
39768
40252
  return;
39769
- default:
40253
+ }
40254
+ const requestParams = {
40255
+ isEnabled: true,
40256
+ paymentMethodId: this.selectedPaymentMethodInfo.paymentMethodId,
40257
+ methodType: this.selectedPaymentMethodInfo.paymentMethodType,
40258
+ minimumTopupAmount: this.minimumTopupAmount
40259
+ };
40260
+ if (this.selectedPaymentMethodInfo.creditCardInfo) {
40261
+ const creditCardInfo = this.selectedPaymentMethodInfo.creditCardInfo;
40262
+ requestParams.ccType = creditCardInfo.ccType;
40263
+ requestParams.isAuthenticated = creditCardInfo.isAuthenticated;
40264
+ }
40265
+ const response = await updatePreTransactionAutoTopupConfiguration(
40266
+ requestParams
40267
+ ).catch(() => {
39770
40268
  this.result = {
39771
40269
  type: "fail",
39772
- errorCode: MiniAppErrorType.serverError
40270
+ errorCode: MiniAppErrorType.unknown
39773
40271
  };
39774
- return;
39775
- }
39776
- },
39777
- async setAutoTopupConfiguration() {
39778
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
39779
- if (!this.selectedPaymentMethodInfo || !this.minimumTopupAmount) {
39780
- return;
39781
- }
39782
- const requestParams = {
39783
- isEnabled: true,
39784
- paymentMethodId: this.selectedPaymentMethodInfo.paymentMethodId,
39785
- methodType: this.selectedPaymentMethodInfo.paymentMethodType,
39786
- minimumTopupAmount: this.minimumTopupAmount
39787
- };
39788
- if (this.selectedPaymentMethodInfo.creditCardInfo) {
39789
- const creditCardInfo = this.selectedPaymentMethodInfo.creditCardInfo;
39790
- requestParams.ccType = creditCardInfo.ccType;
39791
- requestParams.isAuthenticated = creditCardInfo.isAuthenticated;
39792
- }
39793
- const response = await updatePreTransactionAutoTopupConfiguration(requestParams).catch(() => {
39794
- this.result = {
39795
- type: "fail",
39796
- errorCode: MiniAppErrorType.unknown
39797
- };
39798
- this.errorSheet.isVisible = true;
39799
- });
39800
- if (response) {
39801
- switch (response.ppFetchResult) {
39802
- case "success":
39803
- this.result = {
39804
- type: "success"
39805
- };
39806
- return true;
39807
- case "apiError":
39808
- 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) {
39809
- 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;
39810
- if (error2.backendResultCode === "02500044") {
39811
- 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;
39812
- this.openAmountError(errorResponseData.displayErrorResponse);
39813
- this.isLimitAmountErrorOccur = true;
39814
- return false;
40272
+ this.errorSheet.isVisible = true;
40273
+ });
40274
+ if (response) {
40275
+ switch (response.ppFetchResult) {
40276
+ case "success":
40277
+ this.result = {
40278
+ type: "success"
40279
+ };
40280
+ return true;
40281
+ case "apiError":
40282
+ 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) {
40283
+ 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;
40284
+ if (error2.backendResultCode === "02500044") {
40285
+ 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;
40286
+ this.openAmountError(errorResponseData.displayErrorResponse);
40287
+ this.isLimitAmountErrorOccur = true;
40288
+ return false;
40289
+ } else {
40290
+ this.errorSheet.isVisible = true;
40291
+ return false;
40292
+ }
39815
40293
  } else {
40294
+ this.result = {
40295
+ type: "fail",
40296
+ errorCode: MiniAppErrorType.serverError
40297
+ };
39816
40298
  this.errorSheet.isVisible = true;
39817
40299
  return false;
39818
40300
  }
39819
- } else {
40301
+ case "timeout":
40302
+ this.result = {
40303
+ type: "fail",
40304
+ errorCode: MiniAppErrorType.timeOut
40305
+ };
40306
+ this.errorSheet.isVisible = true;
40307
+ return false;
40308
+ default:
39820
40309
  this.result = {
39821
40310
  type: "fail",
39822
40311
  errorCode: MiniAppErrorType.serverError
39823
40312
  };
39824
40313
  this.errorSheet.isVisible = true;
39825
40314
  return false;
39826
- }
39827
- case "timeout":
39828
- this.result = {
39829
- type: "fail",
39830
- errorCode: MiniAppErrorType.timeOut
39831
- };
39832
- this.errorSheet.isVisible = true;
39833
- return false;
39834
- default:
39835
- this.result = {
39836
- type: "fail",
39837
- errorCode: MiniAppErrorType.serverError
39838
- };
39839
- this.errorSheet.isVisible = true;
39840
- return false;
40315
+ }
39841
40316
  }
39842
- }
39843
- },
39844
- async activateAutoTopup() {
39845
- if (this.requireConfirm) {
39846
- this.openAutoTopupConfirm();
39847
- } else {
39848
- const isSuccess = await this.setAutoTopupConfiguration();
39849
- if (isSuccess) {
39850
- this.openSettingCompleteSheet();
40317
+ },
40318
+ async activateAutoTopup() {
40319
+ if (this.requireConfirm) {
40320
+ this.openAutoTopupConfirm();
40321
+ } else {
40322
+ const isSuccess = await this.setAutoTopupConfiguration();
40323
+ if (isSuccess) {
40324
+ this.openSettingCompleteSheet();
40325
+ }
39851
40326
  }
39852
- }
39853
- },
39854
- selectTopupMethodSetting() {
39855
- if (this.existActivatedMethod) {
39856
- this.openChooseTopupMethodSheet();
39857
- } else {
39858
- this.openTopupMethodSetting();
39859
- }
39860
- },
39861
- cancelSetting() {
39862
- this.result = {
39863
- type: "fail",
39864
- errorCode: MiniAppErrorType.userCanceled
39865
- };
39866
- this.closeSetting();
39867
- },
39868
- finishSetting() {
39869
- this.closeSettingCompleteSheet();
39870
- this.closeSetting();
39871
- },
39872
- openSetting() {
39873
- this.uiIsVisible = true;
39874
- },
39875
- closeSetting() {
39876
- this.uiIsVisible = false;
39877
- },
39878
- openChooseAmountSheet() {
39879
- this.ui.isChooseAmount = true;
39880
- },
39881
- closeChooseAmountSheet() {
39882
- this.ui.isChooseAmount = false;
39883
- },
39884
- openChooseTopupMethodSheet() {
39885
- this.ui.isChooseTopupMethod = true;
39886
- },
39887
- closeChooseTopupMethodSheet() {
39888
- this.ui.isChooseTopupMethod = false;
39889
- },
39890
- openSettingCompleteSheet() {
39891
- this.ui.isSettingComplete = true;
39892
- },
39893
- closeSettingCompleteSheet() {
39894
- this.ui.isSettingComplete = false;
39895
- },
39896
- openTopupMethodSetting() {
39897
- this.ui.isTopupMethodSetting = true;
39898
- },
39899
- closeTopupMethodSetting() {
39900
- this.ui.isTopupMethodSetting = false;
39901
- },
39902
- openAutoTopupConfirm() {
39903
- this.ui.isAutoTopupConfirm = true;
39904
- },
39905
- closeAutoTopupConfirm() {
39906
- this.ui.isAutoTopupConfirm = false;
39907
- },
39908
- openAmountError(payload) {
39909
- this.ui.amountErrorInfo = payload;
39910
- this.ui.isAmountError = true;
39911
- },
39912
- closeAmountError() {
39913
- this.ui.isAmountError = false;
39914
- },
39915
- openTopupAmountSetting() {
39916
- this.ui.isTopupAmountSetting = true;
39917
- },
39918
- closeTopupAmountSetting() {
39919
- this.ui.isTopupAmountSetting = false;
39920
- },
39921
- closeError() {
39922
- this.errorSheet.isVisible = false;
39923
- },
39924
- show3DSecureSheet(selectedPaymentMethodIndex) {
39925
- var _a2;
39926
- const selectPaymentMethod = (_a2 = this.availablePaymentMethodList) == null ? void 0 : _a2[selectedPaymentMethodIndex];
39927
- if (selectPaymentMethod == null ? void 0 : selectPaymentMethod.creditCardInfo) {
39928
- const cardInfo2 = selectPaymentMethod.creditCardInfo;
39929
- if (!cardInfo2.isAuthenticated) {
39930
- this.ui.threeDSecureCCType = cardInfo2.ccType;
39931
- this.ui.isThreeDSecure = true;
39932
- this.ui.isChooseTopupMethod = false;
39933
- return true;
40327
+ },
40328
+ selectTopupMethodSetting() {
40329
+ if (this.existActivatedMethod) {
40330
+ this.openChooseTopupMethodSheet();
40331
+ } else {
40332
+ this.openTopupMethodSetting();
39934
40333
  }
40334
+ },
40335
+ cancelSetting() {
40336
+ this.result = {
40337
+ type: "fail",
40338
+ errorCode: MiniAppErrorType.userCanceled
40339
+ };
40340
+ this.closeSetting();
40341
+ },
40342
+ finishSetting() {
40343
+ this.closeSettingCompleteSheet();
40344
+ this.closeSetting();
40345
+ },
40346
+ openSetting() {
40347
+ this.uiIsVisible = true;
40348
+ },
40349
+ closeSetting() {
40350
+ this.uiIsVisible = false;
40351
+ },
40352
+ openChooseAmountSheet() {
40353
+ this.ui.isChooseAmount = true;
40354
+ },
40355
+ closeChooseAmountSheet() {
40356
+ this.ui.isChooseAmount = false;
40357
+ },
40358
+ openChooseTopupMethodSheet() {
40359
+ this.ui.isChooseTopupMethod = true;
40360
+ },
40361
+ closeChooseTopupMethodSheet() {
40362
+ this.ui.isChooseTopupMethod = false;
40363
+ },
40364
+ openSettingCompleteSheet() {
40365
+ this.ui.isSettingComplete = true;
40366
+ },
40367
+ closeSettingCompleteSheet() {
40368
+ this.ui.isSettingComplete = false;
40369
+ },
40370
+ openTopupMethodSetting() {
40371
+ this.ui.isTopupMethodSetting = true;
40372
+ },
40373
+ closeTopupMethodSetting() {
40374
+ this.ui.isTopupMethodSetting = false;
40375
+ },
40376
+ openAutoTopupConfirm() {
40377
+ this.ui.isAutoTopupConfirm = true;
40378
+ },
40379
+ closeAutoTopupConfirm() {
40380
+ this.ui.isAutoTopupConfirm = false;
40381
+ },
40382
+ openAmountError(payload) {
40383
+ this.ui.amountErrorInfo = payload;
40384
+ this.ui.isAmountError = true;
40385
+ },
40386
+ closeAmountError() {
40387
+ this.ui.isAmountError = false;
40388
+ },
40389
+ openTopupAmountSetting() {
40390
+ this.ui.isTopupAmountSetting = true;
40391
+ },
40392
+ closeTopupAmountSetting() {
40393
+ this.ui.isTopupAmountSetting = false;
40394
+ },
40395
+ closeError() {
40396
+ this.errorSheet.isVisible = false;
40397
+ },
40398
+ show3DSecureSheet(selectedPaymentMethodIndex) {
40399
+ var _a2;
40400
+ const selectPaymentMethod = (_a2 = this.availablePaymentMethodList) == null ? void 0 : _a2[selectedPaymentMethodIndex];
40401
+ if (selectPaymentMethod == null ? void 0 : selectPaymentMethod.creditCardInfo) {
40402
+ const cardInfo2 = selectPaymentMethod.creditCardInfo;
40403
+ if (!cardInfo2.isAuthenticated) {
40404
+ this.ui.threeDSecureCCType = cardInfo2.ccType;
40405
+ this.ui.isThreeDSecure = true;
40406
+ this.ui.isChooseTopupMethod = false;
40407
+ return true;
40408
+ }
40409
+ }
40410
+ return false;
40411
+ },
40412
+ close3dSecureSheet() {
40413
+ this.ui.isThreeDSecure = false;
40414
+ },
40415
+ cancelUpdate() {
40416
+ this.closeSetting();
40417
+ this.result = {
40418
+ type: "fail",
40419
+ errorCode: MiniAppErrorType.userCanceled
40420
+ };
39935
40421
  }
39936
- return false;
39937
- },
39938
- close3dSecureSheet() {
39939
- this.ui.isThreeDSecure = false;
39940
- },
39941
- cancelUpdate() {
39942
- this.closeSetting();
39943
- this.result = {
39944
- type: "fail",
39945
- errorCode: MiniAppErrorType.userCanceled
39946
- };
39947
40422
  }
39948
40423
  }
39949
- });
40424
+ );
39950
40425
  function getTopupSettingMode(config2) {
39951
40426
  var _a2, _b;
39952
40427
  if ((_a2 = config2.postTransactionAutoTopupConfiguration) == null ? void 0 : _a2.isEnabled) {
@@ -40395,9 +40870,11 @@ const _sfc_main$a = defineComponent({
40395
40870
  const containerStyle = {
40396
40871
  height: `calc(100vh - ${h2.bottomHeight}px`
40397
40872
  };
40398
- const topupMethod = computed(() => {
40399
- return store.selectedAvailableTopupMethod;
40400
- });
40873
+ const topupMethod = computed(
40874
+ () => {
40875
+ return store.selectedAvailableTopupMethod;
40876
+ }
40877
+ );
40401
40878
  const topupAmount2 = computed(() => {
40402
40879
  return store.minimumTopupAmount;
40403
40880
  });
@@ -41236,28 +41713,36 @@ const _sfc_main$1 = defineComponent({
41236
41713
  var _a2, _b;
41237
41714
  const lg2 = getLanguage().registerPaymentFeatures.autoTopupRoot;
41238
41715
  const store = useRegisterPaymentFeaturesStore();
41239
- store.initialize(props.isEmoneyOnly, props.needUpdate, (_a2 = props.params) == null ? void 0 : _a2.merchant, (_b = props.params) == null ? void 0 : _b.productType).catch(() => {
41716
+ store.initialize(
41717
+ props.isEmoneyOnly,
41718
+ props.needUpdate,
41719
+ (_a2 = props.params) == null ? void 0 : _a2.merchant,
41720
+ (_b = props.params) == null ? void 0 : _b.productType
41721
+ ).catch(() => {
41240
41722
  });
41241
41723
  const complete = () => {
41242
41724
  var _a3, _b2;
41243
41725
  emit("complete");
41244
41726
  (_b2 = (_a3 = props.params).complete) == null ? void 0 : _b2.call(_a3);
41245
41727
  };
41246
- watch(() => store.result, (result2) => {
41247
- var _a3, _b2, _c, _d;
41248
- if (!result2) {
41249
- return;
41250
- }
41251
- if (result2.type === "success") {
41252
- (_b2 = (_a3 = props.params).success) == null ? void 0 : _b2.call(_a3);
41253
- }
41254
- if (result2.type === "fail") {
41255
- (_d = (_c = props.params).fail) == null ? void 0 : _d.call(_c, { errorCode: result2.errorCode });
41256
- }
41257
- if (store.isFinishSetting) {
41258
- complete();
41728
+ watch(
41729
+ () => store.result,
41730
+ (result2) => {
41731
+ var _a3, _b2, _c, _d;
41732
+ if (!result2) {
41733
+ return;
41734
+ }
41735
+ if (result2.type === "success") {
41736
+ (_b2 = (_a3 = props.params).success) == null ? void 0 : _b2.call(_a3);
41737
+ }
41738
+ if (result2.type === "fail") {
41739
+ (_d = (_c = props.params).fail) == null ? void 0 : _d.call(_c, { errorCode: result2.errorCode });
41740
+ }
41741
+ if (store.isFinishSetting) {
41742
+ complete();
41743
+ }
41259
41744
  }
41260
- });
41745
+ );
41261
41746
  return {
41262
41747
  images: getImages(),
41263
41748
  complete,
@@ -41426,10 +41911,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
41426
41911
  const cssModules = {};
41427
41912
  cssModules["$style"] = style0;
41428
41913
  var FallbackMethodAppUpdateWarning = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__cssModules", cssModules]]);
41429
- const MinVersion = {
41430
- PRE_TRANSACTION_AUTO_CHARGE: "3.43.0",
41431
- FALLBACK_PAYMENT_METHOD: "3.61.0"
41432
- };
41433
41914
  function checkIfValidInput(params) {
41434
41915
  if (params.paymentFeatureType === PaymentFeatureTypes.PRE_TRANSACTION_AUTO_CHARGE) {
41435
41916
  return true;
@@ -41464,7 +41945,9 @@ async function consultPaymentFeatureType(params) {
41464
41945
  (_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params);
41465
41946
  (_b = params == null ? void 0 : params.complete) == null ? void 0 : _b.call(params);
41466
41947
  } else if (consultResponse.nextAction === ConsultPaymentFeatureTypes.PRE_TRANSACTION_AUTO_CHARGE) {
41467
- const isMethodSupported = checkVersion(MinVersion.PRE_TRANSACTION_AUTO_CHARGE);
41948
+ const isMethodSupported = checkVersion(
41949
+ MinVersion.PRE_TRANSACTION_AUTO_CHARGE
41950
+ );
41468
41951
  const props = {
41469
41952
  isEmoneyOnly: consultResponse.isEmoneyOnly,
41470
41953
  needUpdate: !isMethodSupported
@@ -41484,13 +41967,14 @@ async function consultPaymentFeatureType(params) {
41484
41967
  function mountUIComponent(params, component, props) {
41485
41968
  const container2 = document.createElement("div");
41486
41969
  container2.className = "ppmna-reset-css";
41487
- const app = createApp(component, __spreadValues({
41970
+ const app = createApp(component, {
41488
41971
  onComplete: () => {
41489
41972
  app.unmount();
41490
41973
  document.body.removeChild(container2);
41491
41974
  },
41492
- params
41493
- }, props));
41975
+ params,
41976
+ ...props
41977
+ });
41494
41978
  app.use(createPinia());
41495
41979
  app.directive(HORIZONTAL_SCROLL_KEY, useHorizontalScrollDirective);
41496
41980
  app.directive(VERTICAL_SCROLL_KEY, useVerticalScrollDirective);
@@ -41546,7 +42030,9 @@ async function execute(params) {
41546
42030
  if (!(params == null ? void 0 : params.merchantPaymentId)) {
41547
42031
  return (_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.badRequest });
41548
42032
  }
41549
- const grantStatus = await checkPermission(PermissionName.mini_app_cashback_information);
42033
+ const grantStatus = await checkPermission(
42034
+ PermissionName.mini_app_cashback_information
42035
+ );
41550
42036
  if (grantStatus !== PermissionStatus.granted) {
41551
42037
  return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, {
41552
42038
  errorCode: MiniAppErrorType.insufficientScope
@@ -41572,18 +42058,13 @@ async function execute(params) {
41572
42058
  return (_k = params == null ? void 0 : params.fail) == null ? void 0 : _k.call(params, { errorCode: MiniAppErrorType.serverError });
41573
42059
  }
41574
42060
  }
41575
- var RuntimeEnv;
41576
- (function(RuntimeEnv2) {
41577
- RuntimeEnv2["JS"] = "JS";
41578
- RuntimeEnv2["Native"] = "NATIVE";
41579
- })(RuntimeEnv || (RuntimeEnv = {}));
41580
42061
  class MiniAppModule extends JsBridgeModule {
41581
42062
  constructor(jsBridge2) {
41582
42063
  super();
41583
42064
  this.jsBridge = jsBridge2;
41584
42065
  }
41585
42066
  detectMode() {
41586
- return getRuntime() === MiniAppRuntime.android ? RuntimeEnv.Native : RuntimeEnv.JS;
42067
+ return getRuntime() === MiniAppRuntime.android ? "NATIVE" : "JS";
41587
42068
  }
41588
42069
  init(params) {
41589
42070
  init(params).catch(() => {
@@ -41600,7 +42081,7 @@ class MiniAppModule extends JsBridgeModule {
41600
42081
  openWebview(params);
41601
42082
  }
41602
42083
  openMap(params) {
41603
- if (this.detectMode() === RuntimeEnv.JS) {
42084
+ if (this.detectMode() === "JS") {
41604
42085
  if (!this.isExecutableService(params)) {
41605
42086
  return;
41606
42087
  }
@@ -41681,7 +42162,7 @@ class MiniAppModule extends JsBridgeModule {
41681
42162
  scanCode(params);
41682
42163
  }
41683
42164
  showAlert(params) {
41684
- this.detectMode() === RuntimeEnv.JS ? showAlert(params) : this.jsBridge.callNative("showAlert", params);
42165
+ this.detectMode() === "JS" ? showAlert(params) : this.jsBridge.callNative("showAlert", params);
41685
42166
  }
41686
42167
  showErrorSheet(params) {
41687
42168
  showErrorSheet(params);
@@ -41693,7 +42174,7 @@ class MiniAppModule extends JsBridgeModule {
41693
42174
  setTitle(params);
41694
42175
  }
41695
42176
  showUpdateWarning(params) {
41696
- this.detectMode() === RuntimeEnv.JS ? showUpdateWarning$1(params) : this.jsBridge.callNative("showUpdateWarning", params);
42177
+ this.detectMode() === "JS" ? showUpdateWarning$1(params) : this.jsBridge.callNative("showUpdateWarning", params);
41697
42178
  }
41698
42179
  getPlatformInformation(params) {
41699
42180
  getPlatformInformation(params).catch(() => {
@@ -41703,10 +42184,10 @@ class MiniAppModule extends JsBridgeModule {
41703
42184
  getDeviceInformation(params);
41704
42185
  }
41705
42186
  openApp(params) {
41706
- this.detectMode() === RuntimeEnv.JS ? openApp$1(params) : this.jsBridge.callNative("openApp", params);
42187
+ this.detectMode() === "JS" ? openApp$1(params) : this.jsBridge.callNative("openApp", params);
41707
42188
  }
41708
42189
  share(params) {
41709
- this.detectMode() === RuntimeEnv.JS ? share(params).catch(() => {
42190
+ this.detectMode() === "JS" ? share(params).catch(() => {
41710
42191
  }) : this.jsBridge.callNative("share", params);
41711
42192
  }
41712
42193
  getKycInformation(params) {
@@ -41775,10 +42256,9 @@ class MiniAppModule extends JsBridgeModule {
41775
42256
  class PayPayJsBridge extends PayPayJsBridgeBase {
41776
42257
  }
41777
42258
  composePayPayJsBridge(PayPayJsBridge, MiniAppModule);
41778
- const jsBridge$1 = new JsBridge(window);
41779
- new PayPayJsBridge(jsBridge$1);
41780
42259
  const jsBridge = new JsBridge(window);
41781
- const paypayJsBridge = new PayPayJsBridge(jsBridge);
41782
- exposeJsBridge(jsBridge);
42260
+ new PayPayJsBridge(jsBridge);
42261
+ const paypayJsBridge = new PayPayJsBridge(jsBridge$1);
42262
+ exposeJsBridge(jsBridge$1);
41783
42263
  exposePayPayJsBridge(paypayJsBridge);
41784
42264
  export { paypayJsBridge as default };