@paypay/mini-app-js-sdk 1.30.0 → 1.33.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.
Files changed (56) hide show
  1. package/dist/composition-api/dom/index.d.ts +1 -0
  2. package/dist/composition-api/dom/useOTTLoginState.d.ts +4 -0
  3. package/dist/mini-app-js-sdk.browser.js +1 -1
  4. package/dist/mini-app-js-sdk.es.js +700 -630
  5. package/dist/mini-app-js-sdk.min.css +1 -1
  6. package/dist/model/makePayment.d.ts +1 -0
  7. package/dist/package/payment-method/PayLaterCC.vue.d.ts +2 -0
  8. package/dist/package/payment-method/SbidBank.vue.d.ts +2 -0
  9. package/dist/package/payment-method/Wallet.vue.d.ts +2 -0
  10. package/dist/package/payment-type/PayLaterCC.vue.d.ts +2 -0
  11. package/dist/package/payment-type/Sbid.vue.d.ts +2 -0
  12. package/dist/package/payment-type/Wallet.vue.d.ts +3 -0
  13. package/dist/package/wallet-breakdown/WalletBreakdown.vue.d.ts +2 -0
  14. package/dist/types.d.ts +20 -2
  15. package/dist/utils/getImages.d.ts +1 -0
  16. package/dist/utils/getLanguage.d.ts +1 -0
  17. package/dist/views/email-registration/App.vue.d.ts +1 -0
  18. package/dist/views/error-sheet/Index.vue.d.ts +2 -0
  19. package/dist/views/get-user-address/Sheet/AddSheet/Contents.vue.d.ts +1 -0
  20. package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +2 -0
  21. package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +1 -0
  22. package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +1 -0
  23. package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +1 -0
  24. package/dist/views/get-user-address/Sheet/DisplaySheet/Address.vue.d.ts +1 -0
  25. package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +1 -0
  26. package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +1 -0
  27. package/dist/views/get-user-address/Sheet/SelectedAddress/NoRegisteredAddressMessage.vue.d.ts +1 -0
  28. package/dist/views/get-user-address/Sheet/SelectedAddress/SelectedAddress.vue.d.ts +1 -0
  29. package/dist/views/get-user-address/Sheet/SelectedAddress/components/AddressInfo.vue.d.ts +1 -0
  30. package/dist/views/get-user-address/Sheet/SelectedAddress/components/Footer.vue.d.ts +1 -0
  31. package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +1 -0
  32. package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +1 -0
  33. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +2 -0
  34. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +2 -0
  35. package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +4 -0
  36. package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +1 -0
  37. package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +2 -0
  38. package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +2 -0
  39. package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +3 -0
  40. package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +1 -0
  41. package/dist/views/make-payment/Sheets/CloseConfirmation.vue.d.ts +2 -0
  42. package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +1 -0
  43. package/dist/views/make-payment/Sheets/PayMethod.vue.d.ts +2 -0
  44. package/dist/views/make-payment/Sheets/Payment.vue.d.ts +2 -0
  45. package/dist/views/make-payment/Sheets/PaymentCompletion/CashBackDetailRow.vue.d.ts +1 -0
  46. package/dist/views/make-payment/Sheets/PaymentCompletion/index.vue.d.ts +2 -0
  47. package/dist/views/make-payment/hooks/app-hooks.d.ts +1 -0
  48. package/dist/views/open-app/App.vue.d.ts +2 -0
  49. package/dist/views/open-map/App.vue.d.ts +1 -0
  50. package/dist/views/show-update-warning/App.vue.d.ts +2 -0
  51. package/dist/views/smart-button/App.vue.d.ts +6 -10
  52. package/dist/views/take-photo/App.vue.d.ts +1 -0
  53. package/dist/views/topup/App.vue.d.ts +2 -0
  54. package/dist/views/topup/CashbackInfo.vue.d.ts +1 -0
  55. package/dist/views/topup/TopupCompletion.vue.d.ts +2 -0
  56. package/package.json +1 -1
@@ -65,8 +65,8 @@ function normalizeNativeResponseData(data2) {
65
65
  }
66
66
  class JsBridge {
67
67
  constructor(global2) {
68
- this.version = "1.30.0";
69
- this.revision = "f13dc1f";
68
+ this.version = "1.33.0";
69
+ this.revision = "9441111";
70
70
  this.messageHandlers = new Map();
71
71
  this.responseCallbacks = new Map();
72
72
  this.global = global2;
@@ -1070,8 +1070,9 @@ const wallet$1 = {
1070
1070
  eMoney: "PayPay\u30DE\u30CD\u30FC",
1071
1071
  nonUsable: "PayPay\u30DE\u30CD\u30FC\u30E9\u30A4\u30C8",
1072
1072
  cashBackUsable: "PayPay\u30DD\u30A4\u30F3\u30C8",
1073
- cashBackExpirable: "PayPay\u30DD\u30A4\u30F3\u30C8\u30E9\u30A4\u30C8",
1074
- balance: "\u5229\u7528\u53EF\u80FD\u984D\uFF1A"
1073
+ cashBackExpirable: "PayPay\u30DC\u30FC\u30CA\u30B9\u30E9\u30A4\u30C8",
1074
+ balance: "\u5229\u7528\u53EF\u80FD\u984D\uFF1A",
1075
+ autoCharge: "\u30AA\u30FC\u30C8\u30C1\u30E3\u30FC\u30B8"
1075
1076
  };
1076
1077
  const payLater$2 = {
1077
1078
  title: "PayPay\u3042\u3068\u6255\u3044",
@@ -1656,7 +1657,7 @@ const opaUrl = () => {
1656
1657
  const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
1657
1658
  let headers = new Headers(__spreadValues({
1658
1659
  "Content-Type": "application/json",
1659
- "Client-Version": "1.30.0",
1660
+ "Client-Version": "1.33.0",
1660
1661
  "Client-OS-Type": getRuntime()
1661
1662
  }, customHeaders));
1662
1663
  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") {
@@ -1975,344 +1976,6 @@ async function execute$c(params) {
1975
1976
  (_f = params == null ? void 0 : params.fail) == null ? void 0 : _f.call(params, { errorCode: MiniAppErrorType.serverError });
1976
1977
  }
1977
1978
  }
1978
- async function init(params) {
1979
- reconstructParams(params);
1980
- await execute$b(params);
1981
- }
1982
- async function execute$b(params) {
1983
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
1984
- try {
1985
- saveEnv((_a = params == null ? void 0 : params.env) != null ? _a : "");
1986
- saveClientId((_b = params == null ? void 0 : params.clientId) != null ? _b : "");
1987
- const appVersion = getAppVersion();
1988
- if (appVersion) {
1989
- if (semVerCompare("2.69.0", appVersion)) {
1990
- setTimeout(fixDeprecatedCloseApp, 1e4);
1991
- const jsBridge2 = new JsBridge(window);
1992
- return jsBridge2.callNative("showUpdateWarning", {
1993
- isMandatory: true
1994
- });
1995
- }
1996
- }
1997
- const urlParams = new URLSearchParams(window.location.search);
1998
- let token = urlParams == null ? void 0 : urlParams.get("token");
1999
- if (!token || token.length < 1) {
2000
- token = urlParams == null ? void 0 : urlParams.get("one_time_token");
2001
- if (!token || token.length < 1) {
2002
- return checkAccessToken({
2003
- success: params.success,
2004
- fail: params.fail
2005
- });
2006
- }
2007
- }
2008
- urlParams.delete("token");
2009
- urlParams.delete("one_time_token");
2010
- const newUrlParams = urlParams.toString().length ? "?" + urlParams.toString() : "";
2011
- const newUrl = location.pathname + newUrlParams + location.hash;
2012
- history.replaceState(null, "", newUrl);
2013
- const res = await ppFetch({
2014
- method: "POST",
2015
- url: "web-api/app/token/v1/issue",
2016
- data: { ott: token, opaClientId: params == null ? void 0 : params.clientId }
2017
- });
2018
- if (!res || "error" in res) {
2019
- throw Error();
2020
- }
2021
- if (((_c = res == null ? void 0 : res.resultInfo) == null ? void 0 : _c.code) === "SUCCESS") {
2022
- const appDetailResult = await initAppDetail((_e = (_d = res == null ? void 0 : res.data) == null ? void 0 : _d.accessToken) != null ? _e : "");
2023
- if (!appDetailResult) {
2024
- throw Error();
2025
- }
2026
- saveEnv((_f = params == null ? void 0 : params.env) != null ? _f : "");
2027
- saveAccessToken((_h = (_g = res == null ? void 0 : res.data) == null ? void 0 : _g.accessToken) != null ? _h : "");
2028
- saveRefreshToken((_j = (_i = res == null ? void 0 : res.data) == null ? void 0 : _i.refreshToken) != null ? _j : "");
2029
- saveUserData();
2030
- saveClientId((_k = params == null ? void 0 : params.clientId) != null ? _k : "");
2031
- const configResult = await initAppConfiguration();
2032
- if (!configResult) {
2033
- throw Error();
2034
- }
2035
- } else {
2036
- throw Error();
2037
- }
2038
- } catch (_) {
2039
- failedAuth(params, MiniAppErrorType.serverError);
2040
- return;
2041
- }
2042
- (_l = params == null ? void 0 : params.success) == null ? void 0 : _l.call(params, {
2043
- statusCode: MiniAppStatusType.initialized
2044
- });
2045
- }
2046
- function fixDeprecatedCloseApp() {
2047
- const jsBridge2 = new JsBridge(window);
2048
- jsBridge2.callNative("closeApp", {});
2049
- setTimeout(fixDeprecatedCloseApp, 500);
2050
- }
2051
- function failedAuth(params, errorCode) {
2052
- var _a;
2053
- (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode });
2054
- }
2055
- function saveUserData() {
2056
- getUserProfile({
2057
- success: (res) => {
2058
- saveUserInfo(JSON.stringify({
2059
- avatarUrl: res == null ? void 0 : res.avatarUrl,
2060
- nickName: res == null ? void 0 : res.nickName
2061
- }));
2062
- }
2063
- }).catch(() => {
2064
- });
2065
- }
2066
- function copyToClipboard(params) {
2067
- var _a, _b;
2068
- reconstructParams(params);
2069
- let textarea = document.createElement("textarea");
2070
- textarea.setAttribute("readonly", "true");
2071
- textarea.setAttribute("contenteditable", "true");
2072
- textarea.value = params.value;
2073
- document.body.appendChild(textarea);
2074
- textarea.select();
2075
- textarea.setSelectionRange(0, textarea.value.length);
2076
- const result2 = document.execCommand("copy");
2077
- document.body.removeChild(textarea);
2078
- result2 ? (_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params) : (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: MiniAppErrorType.other });
2079
- }
2080
- var PermissionStatus;
2081
- (function(PermissionStatus2) {
2082
- PermissionStatus2["granted"] = "GRANTED";
2083
- PermissionStatus2["denied"] = "DENIED";
2084
- })(PermissionStatus || (PermissionStatus = {}));
2085
- const PermissionName = {
2086
- mini_app_payment_balance: "mini_app_payment_balance",
2087
- mini_app_device_info: "mini_app_device_info",
2088
- mini_app_user_contacts: "mini_app_user_contacts",
2089
- mini_app_device_battery: "mini_app_device_battery",
2090
- mini_app_kyc: "mini_app_kyc",
2091
- mini_app_user_location: "mini_app_user_location",
2092
- mini_app_check_payment_method: "mini_app_check_payment_method",
2093
- cashback: "cashback",
2094
- bank_registration: "bank_registration",
2095
- mini_app_user_email_address: "mini_app_user_email_address",
2096
- mini_app_user_address: "mini_app_user_address",
2097
- mini_app_user_phone_camera: "mini_app_user_phone_camera",
2098
- mini_app_user_phone_album: "mini_app_user_phone_album"
2099
- };
2100
- const checkPermission = async (permissionNames) => {
2101
- var _a;
2102
- if ((_a = getAppDetail()) == null ? void 0 : _a.isInternal) {
2103
- return PermissionStatus.granted;
2104
- }
2105
- const resPermission = await getUserGrantedPermission();
2106
- permissionNames = Array.isArray(permissionNames) ? permissionNames : [permissionNames];
2107
- for (const permissionName of permissionNames) {
2108
- if (!(resPermission == null ? void 0 : resPermission.find((name) => name === permissionName))) {
2109
- return PermissionStatus.denied;
2110
- }
2111
- }
2112
- return PermissionStatus.granted;
2113
- };
2114
- async function getUserGrantedPermission() {
2115
- var _a, _b, _c;
2116
- const response = await ppFetch({
2117
- method: "GET",
2118
- url: "web-api/app/v1/users/permissions/granted"
2119
- });
2120
- return (_c = (_b = (_a = response == null ? void 0 : response.unsigned) == null ? void 0 : _a.data) == null ? void 0 : _b.scopes) != null ? _c : [];
2121
- }
2122
- async function getBalance(params) {
2123
- reconstructParams(params);
2124
- await execute$a(params);
2125
- }
2126
- async function execute$a(params) {
2127
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
2128
- try {
2129
- const grantStatus = await checkPermission(PermissionName.mini_app_payment_balance);
2130
- if (grantStatus !== PermissionStatus.granted) {
2131
- return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.insufficientScope });
2132
- }
2133
- const payload = { currency: "JPY" };
2134
- payload.merchant = params.merchant;
2135
- payload.productType = params.productType;
2136
- payload.sourceInfoApp = params.sourceInfoApp;
2137
- const res = await ppFetch({
2138
- method: "GET",
2139
- url: "web-api/app/v1/payment/balance",
2140
- params: payload
2141
- });
2142
- if (!res || "error" in res) {
2143
- return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: MiniAppErrorType.serverError });
2144
- }
2145
- if (((_d = (_c = res == null ? void 0 : res.unsigned) == null ? void 0 : _c.resultInfo) == null ? void 0 : _d.code) === "SUCCESS") {
2146
- const newBalance = (_g = (_f = (_e = res == null ? void 0 : res.unsigned) == null ? void 0 : _e.data) == null ? void 0 : _f.totalBalance) == null ? void 0 : _g.amount;
2147
- return (_h = params == null ? void 0 : params.success) == null ? void 0 : _h.call(params, { balance: newBalance });
2148
- }
2149
- } finally {
2150
- }
2151
- return (_i = params == null ? void 0 : params.fail) == null ? void 0 : _i.call(params, { errorCode: MiniAppErrorType.serverError });
2152
- }
2153
- async function getKycInformation(params) {
2154
- reconstructParams(params);
2155
- await execute$9(params);
2156
- }
2157
- async function execute$9(params) {
2158
- var _a, _b, _c, _d, _e, _f, _g, _h;
2159
- try {
2160
- const grantStatus = await checkPermission(PermissionName.mini_app_kyc);
2161
- if (grantStatus !== PermissionStatus.granted) {
2162
- return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.insufficientScope });
2163
- }
2164
- const res = await ppFetch2({
2165
- method: "GET",
2166
- url: "web-api/app/v2/users/kyc",
2167
- params: {
2168
- type: params.type,
2169
- eKycDocuments: (_b = params.eKycDocuments) == null ? void 0 : _b.toString()
2170
- }
2171
- });
2172
- if (res.ppFetchResult !== "success") {
2173
- return (_c = params == null ? void 0 : params.fail) == null ? void 0 : _c.call(params, { errorCode: MiniAppErrorType.serverError });
2174
- }
2175
- if ((_d = res.body.unsigned) == null ? void 0 : _d.data) {
2176
- let response = res.body.unsigned.data;
2177
- response.jws = (_e = res.body.signed) == null ? void 0 : _e.jws;
2178
- return (_f = params == null ? void 0 : params.success) == null ? void 0 : _f.call(params, response);
2179
- } else {
2180
- return (_g = params == null ? void 0 : params.fail) == null ? void 0 : _g.call(params, { errorCode: MiniAppErrorType.serverError });
2181
- }
2182
- } catch {
2183
- return (_h = params == null ? void 0 : params.fail) == null ? void 0 : _h.call(params, { errorCode: MiniAppErrorType.serverError });
2184
- }
2185
- }
2186
- async function getPermissionStatus(params) {
2187
- reconstructParams(params);
2188
- await execute$8(params);
2189
- }
2190
- async function execute$8(params) {
2191
- var _a, _b, _c, _d;
2192
- try {
2193
- const permissionList = await getUserGrantedPermission();
2194
- if (!permissionList) {
2195
- return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.serverError });
2196
- }
2197
- if (!(params == null ? void 0 : params.name)) {
2198
- return (_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params, {
2199
- granted_permissions: permissionList
2200
- });
2201
- } else {
2202
- const thePermission = permissionList == null ? void 0 : permissionList.find((name) => {
2203
- return name === (params == null ? void 0 : params.name);
2204
- });
2205
- const status2 = thePermission ? PermissionStatus.granted : PermissionStatus.denied;
2206
- return (_c = params == null ? void 0 : params.success) == null ? void 0 : _c.call(params, { status: status2 });
2207
- }
2208
- } catch (_) {
2209
- return (_d = params == null ? void 0 : params.fail) == null ? void 0 : _d.call(params, { errorCode: MiniAppErrorType.serverError });
2210
- }
2211
- }
2212
- function useGetHeights() {
2213
- const agents = navigator.userAgent;
2214
- const heights = {
2215
- statusBarHeight: 0,
2216
- navBarHeight: 0,
2217
- bottomHeight: 0,
2218
- isNative: false
2219
- };
2220
- agents.split(" ").forEach((property2) => {
2221
- if (/Offset.*/.test(property2)) {
2222
- const offsetString = property2 == null ? void 0 : property2.split("/")[1];
2223
- const offsets = offsetString == null ? void 0 : offsetString.split(";");
2224
- heights.isNative = true;
2225
- if (offsets.length !== 3)
2226
- return;
2227
- heights.statusBarHeight = parseInt(offsets[0], 10);
2228
- heights.navBarHeight = parseInt(offsets[1], 10);
2229
- heights.bottomHeight = parseInt(offsets[2], 10);
2230
- }
2231
- });
2232
- return heights;
2233
- }
2234
- function useGetHeightProperties() {
2235
- var _a;
2236
- const { navBarHeight, statusBarHeight, bottomHeight, isNative } = useGetHeights();
2237
- const detail = getAppDetail();
2238
- const navigationStyle = (_a = detail == null ? void 0 : detail.window) == null ? void 0 : _a.navigationStyle;
2239
- const isDefault = navigationStyle === "default";
2240
- const isNone = navigationStyle === "none";
2241
- const isCustom = navigationStyle === "custom";
2242
- const bottomHeightProperty = `${bottomHeight}px`;
2243
- let innerHeightProperty = `calc(100vh - ${bottomHeight}px)`;
2244
- let fullFillHeightProperty = innerHeightProperty;
2245
- let headerHeight = 0;
2246
- if (navigationStyle === "custom") {
2247
- headerHeight = statusBarHeight + navBarHeight;
2248
- innerHeightProperty = `calc(100vh - ${bottomHeight}px - ${headerHeight}px)`;
2249
- fullFillHeightProperty = `calc(100vh - ${bottomHeight}px - ${headerHeight}px)`;
2250
- } else if (navigationStyle === "none") {
2251
- headerHeight = statusBarHeight;
2252
- innerHeightProperty = `calc(100vh - ${bottomHeight}px - ${headerHeight}px)`;
2253
- }
2254
- return {
2255
- innerHeightProperty,
2256
- bottomHeightProperty,
2257
- fullFillHeightProperty,
2258
- headerHeight,
2259
- navBarHeight,
2260
- statusBarHeight,
2261
- bottomHeight,
2262
- isNone,
2263
- isCustom,
2264
- isDefault,
2265
- isNative
2266
- };
2267
- }
2268
- function getTopBarHeight(params) {
2269
- var _a;
2270
- reconstructParams(params);
2271
- const { headerHeight } = useGetHeightProperties();
2272
- (_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, { height: headerHeight });
2273
- }
2274
- async function getPlatformInformation(params) {
2275
- reconstructParams(params);
2276
- await execute$7(params);
2277
- }
2278
- async function execute$7(params) {
2279
- var _a, _b;
2280
- let sdkVersion = null;
2281
- let preferredLanguage = getPayPayLanguage();
2282
- const appVersion = getAppVersion();
2283
- if (appVersion) {
2284
- try {
2285
- const response = await fetch("https://static.paypay.ne.jp/libs/mini-app-js-sdk/versions.json");
2286
- const res = await response.json();
2287
- Object.keys(res == null ? void 0 : res.app).forEach(function(key) {
2288
- var _a2;
2289
- if (!semVerCompare(key, appVersion)) {
2290
- sdkVersion = (_a2 = res == null ? void 0 : res.app[key]) == null ? void 0 : _a2.jsSdkSupport;
2291
- } else {
2292
- return;
2293
- }
2294
- });
2295
- } catch (_) {
2296
- return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.serverError });
2297
- }
2298
- }
2299
- (_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params, {
2300
- appVersion,
2301
- sdkVersion,
2302
- preferredLanguage
2303
- });
2304
- }
2305
- function getDeviceInformation(params) {
2306
- reconstructParams(params);
2307
- execute$6(params);
2308
- }
2309
- function execute$6(params) {
2310
- var _a;
2311
- const runtime = getRuntime();
2312
- (_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, {
2313
- os: runtime === MiniAppRuntime.web ? navigator.platform : runtime.toLowerCase()
2314
- });
2315
- }
2316
1979
  function makeMap(str, expectsLowerCase) {
2317
1980
  const map = Object.create(null);
2318
1981
  const list2 = str.split(",");
@@ -7434,6 +7097,579 @@ function normalizeContainer(container2) {
7434
7097
  }
7435
7098
  return container2;
7436
7099
  }
7100
+ function onMountedOrActivated(hook) {
7101
+ let mounted;
7102
+ onMounted(() => {
7103
+ hook();
7104
+ nextTick(() => {
7105
+ mounted = true;
7106
+ }).catch(() => {
7107
+ });
7108
+ });
7109
+ onActivated(() => {
7110
+ if (mounted) {
7111
+ hook();
7112
+ }
7113
+ });
7114
+ }
7115
+ function useEventListener(type, listener, options = {}) {
7116
+ const { target = window, passive = false, capture = false } = options;
7117
+ let attached;
7118
+ const add2 = () => {
7119
+ const element = unref(target);
7120
+ if (element && !attached) {
7121
+ element.addEventListener(type, listener, capture);
7122
+ attached = true;
7123
+ }
7124
+ };
7125
+ const remove2 = () => {
7126
+ const element = unref(target);
7127
+ if (element && attached) {
7128
+ element.removeEventListener(type, listener, capture);
7129
+ attached = false;
7130
+ }
7131
+ };
7132
+ onUnmounted(remove2);
7133
+ onDeactivated(remove2);
7134
+ onMountedOrActivated(add2);
7135
+ }
7136
+ const HORIZONTAL_SCROLL_KEY = "horizontal-scroll";
7137
+ class StopPropagation$1 {
7138
+ constructor(el) {
7139
+ this.el = el;
7140
+ this.executer = (e) => {
7141
+ const el2 = this.el;
7142
+ if (el2.scrollLeft === 0) {
7143
+ el2.scrollTo(1, 0);
7144
+ } else if (this.prevent) {
7145
+ el2.scrollTo(el2.scrollLeft - 1, 0);
7146
+ }
7147
+ e.stopPropagation();
7148
+ };
7149
+ this.move = (e) => {
7150
+ if (this.prevent && e.cancelable)
7151
+ e.preventDefault();
7152
+ e.stopPropagation();
7153
+ };
7154
+ }
7155
+ get prevent() {
7156
+ const el = this.el;
7157
+ const prevent = el.scrollWidth - el.scrollLeft === el.clientWidth;
7158
+ return prevent;
7159
+ }
7160
+ }
7161
+ const useHorizontalScrollDirective = {
7162
+ mounted: function(el) {
7163
+ const stopInstance = new StopPropagation$1(el);
7164
+ el.addEventListener("touchstart", stopInstance.executer, { passive: true });
7165
+ el.addEventListener("touchend", stopInstance.executer, { passive: true });
7166
+ el.addEventListener("touchmove", stopInstance.move);
7167
+ }
7168
+ };
7169
+ const VERTICAL_SCROLL_KEY = "vertical-scroll";
7170
+ class StopPropagation {
7171
+ constructor(el) {
7172
+ this.el = el;
7173
+ this.executer = (e) => {
7174
+ const el2 = this.el;
7175
+ if (el2.scrollTop === 0) {
7176
+ el2.scrollTo(0, 1);
7177
+ } else if (this.prevent) {
7178
+ el2.scrollTo(0, el2.scrollTop - 1);
7179
+ }
7180
+ e.stopPropagation();
7181
+ };
7182
+ this.move = (e) => {
7183
+ if (this.prevent)
7184
+ e.preventDefault();
7185
+ e.stopPropagation();
7186
+ };
7187
+ }
7188
+ get prevent() {
7189
+ const el = this.el;
7190
+ const scrollHeight = el.scrollHeight - el.scrollTop;
7191
+ const clientHeight = el.clientHeight;
7192
+ const prevent = clientHeight - 1 < scrollHeight && scrollHeight < clientHeight + 1;
7193
+ return prevent;
7194
+ }
7195
+ }
7196
+ const useVerticalScrollDirective = {
7197
+ mounted: function(el) {
7198
+ const stopInstance = new StopPropagation(el);
7199
+ el.addEventListener("touchstart", stopInstance.executer, { passive: true });
7200
+ el.addEventListener("touchend", stopInstance.executer, { passive: true });
7201
+ el.addEventListener("touchmove", stopInstance.move);
7202
+ }
7203
+ };
7204
+ let prev = Date.now();
7205
+ function rafPolyfill(fn) {
7206
+ const curr = Date.now();
7207
+ const ms = Math.max(0, 16 - (curr - prev));
7208
+ const id = setTimeout(fn, ms);
7209
+ prev = curr + ms;
7210
+ return id;
7211
+ }
7212
+ function raf(fn) {
7213
+ const requestAnimationFrame2 = window.requestAnimationFrame || rafPolyfill;
7214
+ return requestAnimationFrame2.call(window, fn);
7215
+ }
7216
+ function cancelRaf(id) {
7217
+ const cancelAnimationFrame2 = window.cancelAnimationFrame || window.clearTimeout;
7218
+ cancelAnimationFrame2.call(window, id);
7219
+ }
7220
+ const SECOND = 1e3;
7221
+ const MINUTE = 60 * SECOND;
7222
+ const HOUR = 60 * MINUTE;
7223
+ const DAY = 24 * HOUR;
7224
+ function parseTime(time2) {
7225
+ const days = Math.floor(time2 / DAY);
7226
+ const hours = Math.floor(time2 % DAY / HOUR);
7227
+ const minutes = Math.floor(time2 % HOUR / MINUTE);
7228
+ const seconds = Math.floor(time2 % MINUTE / SECOND);
7229
+ const milliseconds = Math.floor(time2 % SECOND);
7230
+ return {
7231
+ total: time2,
7232
+ days,
7233
+ hours,
7234
+ minutes,
7235
+ seconds,
7236
+ milliseconds
7237
+ };
7238
+ }
7239
+ function isSameSecond(time1, time2) {
7240
+ return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3);
7241
+ }
7242
+ function useCountDown(options) {
7243
+ let rafId;
7244
+ let endTime;
7245
+ let counting;
7246
+ let deactivated;
7247
+ const remain = ref(options.time);
7248
+ const current = computed(() => parseTime(remain.value));
7249
+ const pause = () => {
7250
+ counting = false;
7251
+ cancelRaf(rafId);
7252
+ };
7253
+ const getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
7254
+ const setRemain = (value2) => {
7255
+ var _a, _b;
7256
+ remain.value = value2;
7257
+ (_a = options.onChange) == null ? void 0 : _a.call(options, current.value);
7258
+ if (value2 === 0) {
7259
+ pause();
7260
+ (_b = options.onFinish) == null ? void 0 : _b.call(options);
7261
+ }
7262
+ };
7263
+ const microTick = () => {
7264
+ rafId = raf(() => {
7265
+ if (counting) {
7266
+ setRemain(getCurrentRemain());
7267
+ if (remain.value > 0) {
7268
+ microTick();
7269
+ }
7270
+ }
7271
+ });
7272
+ };
7273
+ const macroTick = () => {
7274
+ rafId = raf(() => {
7275
+ if (counting) {
7276
+ const remainRemain = getCurrentRemain();
7277
+ if (!isSameSecond(remainRemain, remain.value) || remainRemain === 0) {
7278
+ setRemain(remainRemain);
7279
+ }
7280
+ if (remain.value > 0) {
7281
+ macroTick();
7282
+ }
7283
+ }
7284
+ });
7285
+ };
7286
+ const tick = () => {
7287
+ if (options.millisecond) {
7288
+ microTick();
7289
+ } else {
7290
+ macroTick();
7291
+ }
7292
+ };
7293
+ const start = () => {
7294
+ if (!counting) {
7295
+ endTime = Date.now() + remain.value;
7296
+ counting = true;
7297
+ tick();
7298
+ }
7299
+ };
7300
+ const reset2 = (totalTime = options.time) => {
7301
+ pause();
7302
+ remain.value = totalTime;
7303
+ };
7304
+ onBeforeUnmount(pause);
7305
+ onActivated(() => {
7306
+ if (deactivated) {
7307
+ counting = true;
7308
+ deactivated = false;
7309
+ tick();
7310
+ }
7311
+ });
7312
+ onDeactivated(() => {
7313
+ if (counting) {
7314
+ pause();
7315
+ deactivated = true;
7316
+ }
7317
+ });
7318
+ return {
7319
+ start,
7320
+ pause,
7321
+ reset: reset2,
7322
+ current
7323
+ };
7324
+ }
7325
+ const OTTLoginState = reactive({
7326
+ isJustLoggedIn: false,
7327
+ setLoginState(value2) {
7328
+ this.isJustLoggedIn = value2;
7329
+ }
7330
+ });
7331
+ async function init(params) {
7332
+ reconstructParams(params);
7333
+ await execute$b(params);
7334
+ }
7335
+ async function execute$b(params) {
7336
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
7337
+ try {
7338
+ saveEnv((_a = params == null ? void 0 : params.env) != null ? _a : "");
7339
+ saveClientId((_b = params == null ? void 0 : params.clientId) != null ? _b : "");
7340
+ const appVersion = getAppVersion();
7341
+ if (appVersion) {
7342
+ if (semVerCompare("2.69.0", appVersion)) {
7343
+ setTimeout(fixDeprecatedCloseApp, 1e4);
7344
+ const jsBridge2 = new JsBridge(window);
7345
+ return jsBridge2.callNative("showUpdateWarning", {
7346
+ isMandatory: true
7347
+ });
7348
+ }
7349
+ }
7350
+ const urlParams = new URLSearchParams(window.location.search);
7351
+ let token = urlParams == null ? void 0 : urlParams.get("token");
7352
+ if (!token || token.length < 1) {
7353
+ token = urlParams == null ? void 0 : urlParams.get("one_time_token");
7354
+ if (!token || token.length < 1) {
7355
+ return checkAccessToken({
7356
+ success: params.success,
7357
+ fail: params.fail
7358
+ });
7359
+ }
7360
+ }
7361
+ urlParams.delete("token");
7362
+ urlParams.delete("one_time_token");
7363
+ const newUrlParams = urlParams.toString().length ? "?" + urlParams.toString() : "";
7364
+ const newUrl = location.pathname + newUrlParams + location.hash;
7365
+ history.replaceState(null, "", newUrl);
7366
+ const res = await ppFetch({
7367
+ method: "POST",
7368
+ url: "web-api/app/token/v1/issue",
7369
+ data: { ott: token, opaClientId: params == null ? void 0 : params.clientId }
7370
+ });
7371
+ if (!res || "error" in res) {
7372
+ throw Error();
7373
+ }
7374
+ if (((_c = res == null ? void 0 : res.resultInfo) == null ? void 0 : _c.code) === "SUCCESS") {
7375
+ const appDetailResult = await initAppDetail((_e = (_d = res == null ? void 0 : res.data) == null ? void 0 : _d.accessToken) != null ? _e : "");
7376
+ if (!appDetailResult) {
7377
+ throw Error();
7378
+ }
7379
+ saveEnv((_f = params == null ? void 0 : params.env) != null ? _f : "");
7380
+ saveAccessToken((_h = (_g = res == null ? void 0 : res.data) == null ? void 0 : _g.accessToken) != null ? _h : "");
7381
+ saveRefreshToken((_j = (_i = res == null ? void 0 : res.data) == null ? void 0 : _i.refreshToken) != null ? _j : "");
7382
+ OTTLoginState.setLoginState(true);
7383
+ setTimeout(() => {
7384
+ OTTLoginState.setLoginState(false);
7385
+ }, 5e3);
7386
+ saveUserData();
7387
+ saveClientId((_k = params == null ? void 0 : params.clientId) != null ? _k : "");
7388
+ const configResult = await initAppConfiguration();
7389
+ if (!configResult) {
7390
+ throw Error();
7391
+ }
7392
+ } else {
7393
+ throw Error();
7394
+ }
7395
+ } catch (_) {
7396
+ failedAuth(params, MiniAppErrorType.serverError);
7397
+ return;
7398
+ }
7399
+ (_l = params == null ? void 0 : params.success) == null ? void 0 : _l.call(params, {
7400
+ statusCode: MiniAppStatusType.initialized
7401
+ });
7402
+ }
7403
+ function fixDeprecatedCloseApp() {
7404
+ const jsBridge2 = new JsBridge(window);
7405
+ jsBridge2.callNative("closeApp", {});
7406
+ setTimeout(fixDeprecatedCloseApp, 500);
7407
+ }
7408
+ function failedAuth(params, errorCode) {
7409
+ var _a;
7410
+ (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode });
7411
+ }
7412
+ function saveUserData() {
7413
+ getUserProfile({
7414
+ success: (res) => {
7415
+ saveUserInfo(JSON.stringify({
7416
+ avatarUrl: res == null ? void 0 : res.avatarUrl,
7417
+ nickName: res == null ? void 0 : res.nickName
7418
+ }));
7419
+ }
7420
+ }).catch(() => {
7421
+ });
7422
+ }
7423
+ function copyToClipboard(params) {
7424
+ var _a, _b;
7425
+ reconstructParams(params);
7426
+ let textarea = document.createElement("textarea");
7427
+ textarea.setAttribute("readonly", "true");
7428
+ textarea.setAttribute("contenteditable", "true");
7429
+ textarea.value = params.value;
7430
+ document.body.appendChild(textarea);
7431
+ textarea.select();
7432
+ textarea.setSelectionRange(0, textarea.value.length);
7433
+ const result2 = document.execCommand("copy");
7434
+ document.body.removeChild(textarea);
7435
+ result2 ? (_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params) : (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: MiniAppErrorType.other });
7436
+ }
7437
+ var PermissionStatus;
7438
+ (function(PermissionStatus2) {
7439
+ PermissionStatus2["granted"] = "GRANTED";
7440
+ PermissionStatus2["denied"] = "DENIED";
7441
+ })(PermissionStatus || (PermissionStatus = {}));
7442
+ const PermissionName = {
7443
+ mini_app_payment_balance: "mini_app_payment_balance",
7444
+ mini_app_device_info: "mini_app_device_info",
7445
+ mini_app_user_contacts: "mini_app_user_contacts",
7446
+ mini_app_device_battery: "mini_app_device_battery",
7447
+ mini_app_kyc: "mini_app_kyc",
7448
+ mini_app_user_location: "mini_app_user_location",
7449
+ mini_app_check_payment_method: "mini_app_check_payment_method",
7450
+ cashback: "cashback",
7451
+ bank_registration: "bank_registration",
7452
+ mini_app_user_email_address: "mini_app_user_email_address",
7453
+ mini_app_user_address: "mini_app_user_address",
7454
+ mini_app_user_phone_camera: "mini_app_user_phone_camera",
7455
+ mini_app_user_phone_album: "mini_app_user_phone_album"
7456
+ };
7457
+ const checkPermission = async (permissionNames) => {
7458
+ var _a;
7459
+ if ((_a = getAppDetail()) == null ? void 0 : _a.isInternal) {
7460
+ return PermissionStatus.granted;
7461
+ }
7462
+ const resPermission = await getUserGrantedPermission();
7463
+ permissionNames = Array.isArray(permissionNames) ? permissionNames : [permissionNames];
7464
+ for (const permissionName of permissionNames) {
7465
+ if (!(resPermission == null ? void 0 : resPermission.find((name) => name === permissionName))) {
7466
+ return PermissionStatus.denied;
7467
+ }
7468
+ }
7469
+ return PermissionStatus.granted;
7470
+ };
7471
+ async function getUserGrantedPermission() {
7472
+ var _a, _b, _c;
7473
+ const response = await ppFetch({
7474
+ method: "GET",
7475
+ url: "web-api/app/v1/users/permissions/granted"
7476
+ });
7477
+ return (_c = (_b = (_a = response == null ? void 0 : response.unsigned) == null ? void 0 : _a.data) == null ? void 0 : _b.scopes) != null ? _c : [];
7478
+ }
7479
+ async function getBalance(params) {
7480
+ reconstructParams(params);
7481
+ await execute$a(params);
7482
+ }
7483
+ async function execute$a(params) {
7484
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
7485
+ try {
7486
+ const grantStatus = await checkPermission(PermissionName.mini_app_payment_balance);
7487
+ if (grantStatus !== PermissionStatus.granted) {
7488
+ return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.insufficientScope });
7489
+ }
7490
+ const payload = { currency: "JPY" };
7491
+ payload.merchant = params.merchant;
7492
+ payload.productType = params.productType;
7493
+ payload.sourceInfoApp = params.sourceInfoApp;
7494
+ const res = await ppFetch({
7495
+ method: "GET",
7496
+ url: "web-api/app/v1/payment/balance",
7497
+ params: payload
7498
+ });
7499
+ if (!res || "error" in res) {
7500
+ return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: MiniAppErrorType.serverError });
7501
+ }
7502
+ if (((_d = (_c = res == null ? void 0 : res.unsigned) == null ? void 0 : _c.resultInfo) == null ? void 0 : _d.code) === "SUCCESS") {
7503
+ const newBalance = (_g = (_f = (_e = res == null ? void 0 : res.unsigned) == null ? void 0 : _e.data) == null ? void 0 : _f.totalBalance) == null ? void 0 : _g.amount;
7504
+ return (_h = params == null ? void 0 : params.success) == null ? void 0 : _h.call(params, { balance: newBalance });
7505
+ }
7506
+ } finally {
7507
+ }
7508
+ return (_i = params == null ? void 0 : params.fail) == null ? void 0 : _i.call(params, { errorCode: MiniAppErrorType.serverError });
7509
+ }
7510
+ async function getKycInformation(params) {
7511
+ reconstructParams(params);
7512
+ await execute$9(params);
7513
+ }
7514
+ async function execute$9(params) {
7515
+ var _a, _b, _c, _d, _e, _f, _g, _h;
7516
+ try {
7517
+ const grantStatus = await checkPermission(PermissionName.mini_app_kyc);
7518
+ if (grantStatus !== PermissionStatus.granted) {
7519
+ return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.insufficientScope });
7520
+ }
7521
+ const res = await ppFetch2({
7522
+ method: "GET",
7523
+ url: "web-api/app/v2/users/kyc",
7524
+ params: {
7525
+ type: params.type,
7526
+ eKycDocuments: (_b = params.eKycDocuments) == null ? void 0 : _b.toString()
7527
+ }
7528
+ });
7529
+ if (res.ppFetchResult !== "success") {
7530
+ return (_c = params == null ? void 0 : params.fail) == null ? void 0 : _c.call(params, { errorCode: MiniAppErrorType.serverError });
7531
+ }
7532
+ if ((_d = res.body.unsigned) == null ? void 0 : _d.data) {
7533
+ let response = res.body.unsigned.data;
7534
+ response.jws = (_e = res.body.signed) == null ? void 0 : _e.jws;
7535
+ return (_f = params == null ? void 0 : params.success) == null ? void 0 : _f.call(params, response);
7536
+ } else {
7537
+ return (_g = params == null ? void 0 : params.fail) == null ? void 0 : _g.call(params, { errorCode: MiniAppErrorType.serverError });
7538
+ }
7539
+ } catch {
7540
+ return (_h = params == null ? void 0 : params.fail) == null ? void 0 : _h.call(params, { errorCode: MiniAppErrorType.serverError });
7541
+ }
7542
+ }
7543
+ async function getPermissionStatus(params) {
7544
+ reconstructParams(params);
7545
+ await execute$8(params);
7546
+ }
7547
+ async function execute$8(params) {
7548
+ var _a, _b, _c, _d;
7549
+ try {
7550
+ const permissionList = await getUserGrantedPermission();
7551
+ if (!permissionList) {
7552
+ return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.serverError });
7553
+ }
7554
+ if (!(params == null ? void 0 : params.name)) {
7555
+ return (_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params, {
7556
+ granted_permissions: permissionList
7557
+ });
7558
+ } else {
7559
+ const thePermission = permissionList == null ? void 0 : permissionList.find((name) => {
7560
+ return name === (params == null ? void 0 : params.name);
7561
+ });
7562
+ const status2 = thePermission ? PermissionStatus.granted : PermissionStatus.denied;
7563
+ return (_c = params == null ? void 0 : params.success) == null ? void 0 : _c.call(params, { status: status2 });
7564
+ }
7565
+ } catch (_) {
7566
+ return (_d = params == null ? void 0 : params.fail) == null ? void 0 : _d.call(params, { errorCode: MiniAppErrorType.serverError });
7567
+ }
7568
+ }
7569
+ function useGetHeights() {
7570
+ const agents = navigator.userAgent;
7571
+ const heights = {
7572
+ statusBarHeight: 0,
7573
+ navBarHeight: 0,
7574
+ bottomHeight: 0,
7575
+ isNative: false
7576
+ };
7577
+ agents.split(" ").forEach((property2) => {
7578
+ if (/Offset.*/.test(property2)) {
7579
+ const offsetString = property2 == null ? void 0 : property2.split("/")[1];
7580
+ const offsets = offsetString == null ? void 0 : offsetString.split(";");
7581
+ heights.isNative = true;
7582
+ if (offsets.length !== 3)
7583
+ return;
7584
+ heights.statusBarHeight = parseInt(offsets[0], 10);
7585
+ heights.navBarHeight = parseInt(offsets[1], 10);
7586
+ heights.bottomHeight = parseInt(offsets[2], 10);
7587
+ }
7588
+ });
7589
+ return heights;
7590
+ }
7591
+ function useGetHeightProperties() {
7592
+ var _a;
7593
+ const { navBarHeight, statusBarHeight, bottomHeight, isNative } = useGetHeights();
7594
+ const detail = getAppDetail();
7595
+ const navigationStyle = (_a = detail == null ? void 0 : detail.window) == null ? void 0 : _a.navigationStyle;
7596
+ const isDefault = navigationStyle === "default";
7597
+ const isNone = navigationStyle === "none";
7598
+ const isCustom = navigationStyle === "custom";
7599
+ const bottomHeightProperty = `${bottomHeight}px`;
7600
+ let innerHeightProperty = `calc(100vh - ${bottomHeight}px)`;
7601
+ let fullFillHeightProperty = innerHeightProperty;
7602
+ let headerHeight = 0;
7603
+ if (navigationStyle === "custom") {
7604
+ headerHeight = statusBarHeight + navBarHeight;
7605
+ innerHeightProperty = `calc(100vh - ${bottomHeight}px - ${headerHeight}px)`;
7606
+ fullFillHeightProperty = `calc(100vh - ${bottomHeight}px - ${headerHeight}px)`;
7607
+ } else if (navigationStyle === "none") {
7608
+ headerHeight = statusBarHeight;
7609
+ innerHeightProperty = `calc(100vh - ${bottomHeight}px - ${headerHeight}px)`;
7610
+ }
7611
+ return {
7612
+ innerHeightProperty,
7613
+ bottomHeightProperty,
7614
+ fullFillHeightProperty,
7615
+ headerHeight,
7616
+ navBarHeight,
7617
+ statusBarHeight,
7618
+ bottomHeight,
7619
+ isNone,
7620
+ isCustom,
7621
+ isDefault,
7622
+ isNative
7623
+ };
7624
+ }
7625
+ function getTopBarHeight(params) {
7626
+ var _a;
7627
+ reconstructParams(params);
7628
+ const { headerHeight } = useGetHeightProperties();
7629
+ (_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, { height: headerHeight });
7630
+ }
7631
+ async function getPlatformInformation(params) {
7632
+ reconstructParams(params);
7633
+ await execute$7(params);
7634
+ }
7635
+ async function execute$7(params) {
7636
+ var _a, _b;
7637
+ let sdkVersion = null;
7638
+ let preferredLanguage = getPayPayLanguage();
7639
+ const appVersion = getAppVersion();
7640
+ if (appVersion) {
7641
+ try {
7642
+ const response = await fetch("https://static.paypay.ne.jp/libs/mini-app-js-sdk/versions.json");
7643
+ const res = await response.json();
7644
+ Object.keys(res == null ? void 0 : res.app).forEach(function(key) {
7645
+ var _a2;
7646
+ if (!semVerCompare(key, appVersion)) {
7647
+ sdkVersion = (_a2 = res == null ? void 0 : res.app[key]) == null ? void 0 : _a2.jsSdkSupport;
7648
+ } else {
7649
+ return;
7650
+ }
7651
+ });
7652
+ } catch (_) {
7653
+ return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.serverError });
7654
+ }
7655
+ }
7656
+ (_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params, {
7657
+ appVersion,
7658
+ sdkVersion,
7659
+ preferredLanguage
7660
+ });
7661
+ }
7662
+ function getDeviceInformation(params) {
7663
+ reconstructParams(params);
7664
+ execute$6(params);
7665
+ }
7666
+ function execute$6(params) {
7667
+ var _a;
7668
+ const runtime = getRuntime();
7669
+ (_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, {
7670
+ os: runtime === MiniAppRuntime.web ? navigator.platform : runtime.toLowerCase()
7671
+ });
7672
+ }
7437
7673
  function gen(name, mods) {
7438
7674
  if (!mods) {
7439
7675
  return "";
@@ -20098,6 +20334,7 @@ const softbank$1 = "https://image.paypay.ne.jp/miniapps/mini-app-sdk/payment/sof
20098
20334
  const iconBirthday = "https://image.paypay.ne.jp/miniapps/mini-app-sdk/icon-birthday.svg";
20099
20335
  const iconMinorAge = "https://image.paypay.ne.jp/miniapps/mini-app-sdk/icon-minor-age.svg";
20100
20336
  const iconClose = "https://image.paypay.ne.jp/miniapps/mini-app-sdk/icon-close.svg";
20337
+ const whiteIconClose = "https://image.paypay.ne.jp/miniapps/mini-app-sdk/icon-close-white.svg";
20101
20338
  const myOffer = "https://image.paypay.ne.jp/miniapps/mini-app-sdk/icon-myoffer-multi.svg";
20102
20339
  const lightBlue = "https://image.paypay.ne.jp/miniapps/mini-app-sdk/icon-more-lightblue.svg";
20103
20340
  const iconBalanceIcon = "https://image.paypay.ne.jp/miniapps/mini-app-sdk/icon-balance-icon.svg";
@@ -20134,6 +20371,7 @@ var images = {
20134
20371
  iconBirthday,
20135
20372
  iconMinorAge,
20136
20373
  iconClose,
20374
+ whiteIconClose,
20137
20375
  myOffer,
20138
20376
  lightBlue,
20139
20377
  iconBalanceIcon,
@@ -20325,9 +20563,9 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
20325
20563
  }, 8, ["name"])
20326
20564
  ]);
20327
20565
  }
20328
- const cssModules$O = {};
20329
- cssModules$O["$style"] = style0$N;
20330
- var WalletBreakdown = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$11], ["__cssModules", cssModules$O]]);
20566
+ const cssModules$P = {};
20567
+ cssModules$P["$style"] = style0$N;
20568
+ var WalletBreakdown = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$11], ["__cssModules", cssModules$P]]);
20331
20569
  const img$b = "_img_373i3_1";
20332
20570
  var style0$M = {
20333
20571
  img: img$b
@@ -20388,7 +20626,7 @@ const _hoisted_2$q = { class: "payment-method--content-container--image-containe
20388
20626
  const _hoisted_3$l = ["src"];
20389
20627
  const _hoisted_4$h = { class: "payment-method--content-container--label" };
20390
20628
  const _hoisted_5$d = { class: "payment-method--content-container--label--main" };
20391
- const _hoisted_6$6 = { class: "payment-method--content-container--label--sub" };
20629
+ const _hoisted_6$7 = { class: "payment-method--content-container--label--sub" };
20392
20630
  function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
20393
20631
  const _component_WalletBreakdown = resolveComponent("WalletBreakdown");
20394
20632
  return openBlock(), createElementBlock("div", _hoisted_1$H, [
@@ -20400,14 +20638,14 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
20400
20638
  ]),
20401
20639
  createBaseVNode("div", _hoisted_4$h, [
20402
20640
  createBaseVNode("span", _hoisted_5$d, toDisplayString(_ctx.lg.wallet.title), 1),
20403
- createBaseVNode("span", _hoisted_6$6, toDisplayString(_ctx.formattedBalance) + "\u5186 ", 1),
20641
+ createBaseVNode("span", _hoisted_6$7, toDisplayString(_ctx.formattedBalance) + "\u5186 ", 1),
20404
20642
  createVNode(_component_WalletBreakdown, { wallet: _ctx.wallet }, null, 8, ["wallet"])
20405
20643
  ])
20406
20644
  ]);
20407
20645
  }
20408
- const cssModules$N = {};
20409
- cssModules$N["$style"] = style0$M;
20410
- var Wallet = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$10], ["__cssModules", cssModules$N], ["__scopeId", "data-v-e0654490"]]);
20646
+ const cssModules$O = {};
20647
+ cssModules$O["$style"] = style0$M;
20648
+ var Wallet = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$10], ["__cssModules", cssModules$O], ["__scopeId", "data-v-e0654490"]]);
20411
20649
  const img$a = "_img_p3zha_1";
20412
20650
  const round$2 = "_round_p3zha_5";
20413
20651
  const nonVisible$1 = "_nonVisible_p3zha_8";
@@ -20608,9 +20846,9 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
20608
20846
  ], 2)
20609
20847
  ], 2);
20610
20848
  }
20611
- const cssModules$M = {};
20612
- cssModules$M["$style"] = style0$L;
20613
- var CreditCard = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$$], ["__cssModules", cssModules$M], ["__scopeId", "data-v-4589c43a"]]);
20849
+ const cssModules$N = {};
20850
+ cssModules$N["$style"] = style0$L;
20851
+ var CreditCard = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$$], ["__cssModules", cssModules$N], ["__scopeId", "data-v-4589c43a"]]);
20614
20852
  const img$8 = "_img_11k9z_1";
20615
20853
  const round$1 = "_round_11k9z_5";
20616
20854
  const branchNumber = "_branchNumber_11k9z_8";
@@ -20751,9 +20989,9 @@ function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
20751
20989
  ], 2)
20752
20990
  ], 2);
20753
20991
  }
20754
- const cssModules$L = {};
20755
- cssModules$L["$style"] = style0$K;
20756
- var Bank = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$_], ["__cssModules", cssModules$L]]);
20992
+ const cssModules$M = {};
20993
+ cssModules$M["$style"] = style0$K;
20994
+ var Bank = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$_], ["__cssModules", cssModules$M]]);
20757
20995
  const container$k = "_container_82o6p_1";
20758
20996
  const imageContainer$1 = "_imageContainer_82o6p_7";
20759
20997
  const img$7 = "_img_82o6p_11";
@@ -20869,9 +21107,9 @@ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
20869
21107
  ], 2)
20870
21108
  ], 2);
20871
21109
  }
20872
- const cssModules$K = {};
20873
- cssModules$K["$style"] = style0$J;
20874
- var Sbid = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Z], ["__cssModules", cssModules$K]]);
21110
+ const cssModules$L = {};
21111
+ cssModules$L["$style"] = style0$J;
21112
+ var Sbid = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Z], ["__cssModules", cssModules$L]]);
20875
21113
  const img$6 = "_img_m6p0b_1";
20876
21114
  const container$j = "_container_m6p0b_5";
20877
21115
  const imgContainer$2 = "_imgContainer_m6p0b_10";
@@ -20964,9 +21202,9 @@ function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
20964
21202
  ], 2)
20965
21203
  ], 2);
20966
21204
  }
20967
- const cssModules$J = {};
20968
- cssModules$J["$style"] = style0$I;
20969
- var PayLaterCC = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$Y], ["__cssModules", cssModules$J]]);
21205
+ const cssModules$K = {};
21206
+ cssModules$K["$style"] = style0$I;
21207
+ var PayLaterCC = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$Y], ["__cssModules", cssModules$K]]);
20970
21208
  const PaymentMethod = defineComponent({
20971
21209
  props: {
20972
21210
  paymentMethod: {
@@ -21007,42 +21245,6 @@ const PaymentMethod = defineComponent({
21007
21245
  return null;
21008
21246
  }
21009
21247
  });
21010
- function onMountedOrActivated(hook) {
21011
- let mounted;
21012
- onMounted(() => {
21013
- hook();
21014
- nextTick(() => {
21015
- mounted = true;
21016
- }).catch(() => {
21017
- });
21018
- });
21019
- onActivated(() => {
21020
- if (mounted) {
21021
- hook();
21022
- }
21023
- });
21024
- }
21025
- function useEventListener(type, listener, options = {}) {
21026
- const { target = window, passive = false, capture = false } = options;
21027
- let attached;
21028
- const add2 = () => {
21029
- const element = unref(target);
21030
- if (element && !attached) {
21031
- element.addEventListener(type, listener, capture);
21032
- attached = true;
21033
- }
21034
- };
21035
- const remove2 = () => {
21036
- const element = unref(target);
21037
- if (element && attached) {
21038
- element.removeEventListener(type, listener, capture);
21039
- attached = false;
21040
- }
21041
- };
21042
- onUnmounted(remove2);
21043
- onDeactivated(remove2);
21044
- onMountedOrActivated(add2);
21045
- }
21046
21248
  const UI_BREAKPOINT = 767;
21047
21249
  function useBreakpoints() {
21048
21250
  let windowWidth = ref(window.innerWidth);
@@ -21067,6 +21269,14 @@ function useBreakpoints() {
21067
21269
  };
21068
21270
  }
21069
21271
  var Wallet_vue_vue_type_style_index_0_scoped_true_lang = "";
21272
+ const chargeContainer = "_chargeContainer_1teaz_1";
21273
+ const greenTick = "_greenTick_1teaz_6";
21274
+ const autoCharge = "_autoCharge_1teaz_10";
21275
+ var style1$1 = {
21276
+ chargeContainer,
21277
+ greenTick,
21278
+ autoCharge
21279
+ };
21070
21280
  const _sfc_main$X = defineComponent({
21071
21281
  components: {
21072
21282
  WalletBreakdown
@@ -21083,20 +21293,26 @@ const _sfc_main$X = defineComponent({
21083
21293
  return formatAmount((_d = (_c = (_b = (_a = props == null ? void 0 : props.wallet) == null ? void 0 : _a.walletInfo) == null ? void 0 : _b.walletSummary) == null ? void 0 : _c.totalBalanceInfo) == null ? void 0 : _d.balance);
21084
21294
  });
21085
21295
  const { isDesktop } = useBreakpoints();
21296
+ const isPreTransactionAutoChargeEnabled = computed(() => {
21297
+ var _a, _b;
21298
+ return (_b = (_a = props == null ? void 0 : props.wallet) == null ? void 0 : _a.walletInfo) == null ? void 0 : _b.isPreTransactionAutoChargeEnabled;
21299
+ });
21086
21300
  return {
21087
21301
  formattedBalance,
21088
21302
  images: getImages(),
21089
21303
  lg: getLanguage(),
21090
- isDesktop
21304
+ isDesktop,
21305
+ isPreTransactionAutoChargeEnabled
21091
21306
  };
21092
21307
  }
21093
21308
  });
21094
- const _withScopeId$3 = (n) => (pushScopeId("data-v-1405076b"), n = n(), popScopeId(), n);
21309
+ const _withScopeId$3 = (n) => (pushScopeId("data-v-aa178176"), n = n(), popScopeId(), n);
21095
21310
  const _hoisted_1$C = { class: "ppmna-payment-type--container bank-method--right-align" };
21096
21311
  const _hoisted_2$n = ["src"];
21097
21312
  const _hoisted_3$i = { class: "ppmna-payment-type--container--main" };
21098
21313
  const _hoisted_4$e = { class: "ppmna-payment-type--container--sub" };
21099
- const _hoisted_5$a = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createBaseVNode("div", { class: "payment-type--arrow-right-container" }, [
21314
+ const _hoisted_5$a = ["src"];
21315
+ const _hoisted_6$6 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createBaseVNode("div", { class: "payment-type--arrow-right-container" }, [
21100
21316
  /* @__PURE__ */ createBaseVNode("i", { class: "ppmna-payment-type--arrow-right" })
21101
21317
  ], -1));
21102
21318
  function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
@@ -21111,15 +21327,30 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
21111
21327
  createBaseVNode("div", null, [
21112
21328
  createBaseVNode("div", _hoisted_3$i, toDisplayString(_ctx.lg.wallet.title), 1),
21113
21329
  createBaseVNode("div", _hoisted_4$e, toDisplayString(_ctx.lg.wallet.balance) + toDisplayString(_ctx.formattedBalance) + "\u5186 ", 1),
21114
- _ctx.isDesktop ? (openBlock(), createBlock(_component_WalletBreakdown, {
21330
+ _ctx.isPreTransactionAutoChargeEnabled ? (openBlock(), createElementBlock("div", {
21115
21331
  key: 0,
21332
+ class: normalizeClass(_ctx.$style.chargeContainer)
21333
+ }, [
21334
+ createBaseVNode("img", {
21335
+ class: normalizeClass(_ctx.$style.greenTick),
21336
+ src: _ctx.images.checkGreen,
21337
+ alt: "green-tick"
21338
+ }, null, 10, _hoisted_5$a),
21339
+ createBaseVNode("span", {
21340
+ class: normalizeClass(_ctx.$style.autoCharge)
21341
+ }, toDisplayString(_ctx.lg.wallet.autoCharge), 3)
21342
+ ], 2)) : createCommentVNode("", true),
21343
+ _ctx.isDesktop ? (openBlock(), createBlock(_component_WalletBreakdown, {
21344
+ key: 1,
21116
21345
  wallet: _ctx.wallet
21117
21346
  }, null, 8, ["wallet"])) : createCommentVNode("", true)
21118
21347
  ]),
21119
- _hoisted_5$a
21348
+ _hoisted_6$6
21120
21349
  ]);
21121
21350
  }
21122
- var WalletType = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$X], ["__scopeId", "data-v-1405076b"]]);
21351
+ const cssModules$J = {};
21352
+ cssModules$J["$style"] = style1$1;
21353
+ var WalletType = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$X], ["__cssModules", cssModules$J], ["__scopeId", "data-v-aa178176"]]);
21123
21354
  const main = "_main_1rgsx_1";
21124
21355
  const auth = "_auth_1rgsx_6";
21125
21356
  const authImage = "_authImage_1rgsx_11";
@@ -25960,195 +26191,6 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
25960
26191
  const cssModules$g = {};
25961
26192
  cssModules$g["$style"] = style0$f;
25962
26193
  var CashBackDetailRow = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$s], ["__cssModules", cssModules$g]]);
25963
- const HORIZONTAL_SCROLL_KEY = "horizontal-scroll";
25964
- class StopPropagation$1 {
25965
- constructor(el) {
25966
- this.el = el;
25967
- this.executer = (e) => {
25968
- const el2 = this.el;
25969
- if (el2.scrollLeft === 0) {
25970
- el2.scrollTo(1, 0);
25971
- } else if (this.prevent) {
25972
- el2.scrollTo(el2.scrollLeft - 1, 0);
25973
- }
25974
- e.stopPropagation();
25975
- };
25976
- this.move = (e) => {
25977
- if (this.prevent && e.cancelable)
25978
- e.preventDefault();
25979
- e.stopPropagation();
25980
- };
25981
- }
25982
- get prevent() {
25983
- const el = this.el;
25984
- const prevent = el.scrollWidth - el.scrollLeft === el.clientWidth;
25985
- return prevent;
25986
- }
25987
- }
25988
- const useHorizontalScrollDirective = {
25989
- mounted: function(el) {
25990
- const stopInstance = new StopPropagation$1(el);
25991
- el.addEventListener("touchstart", stopInstance.executer, { passive: true });
25992
- el.addEventListener("touchend", stopInstance.executer, { passive: true });
25993
- el.addEventListener("touchmove", stopInstance.move);
25994
- }
25995
- };
25996
- const VERTICAL_SCROLL_KEY = "vertical-scroll";
25997
- class StopPropagation {
25998
- constructor(el) {
25999
- this.el = el;
26000
- this.executer = (e) => {
26001
- const el2 = this.el;
26002
- if (el2.scrollTop === 0) {
26003
- el2.scrollTo(0, 1);
26004
- } else if (this.prevent) {
26005
- el2.scrollTo(0, el2.scrollTop - 1);
26006
- }
26007
- e.stopPropagation();
26008
- };
26009
- this.move = (e) => {
26010
- if (this.prevent)
26011
- e.preventDefault();
26012
- e.stopPropagation();
26013
- };
26014
- }
26015
- get prevent() {
26016
- const el = this.el;
26017
- const scrollHeight = el.scrollHeight - el.scrollTop;
26018
- const clientHeight = el.clientHeight;
26019
- const prevent = clientHeight - 1 < scrollHeight && scrollHeight < clientHeight + 1;
26020
- return prevent;
26021
- }
26022
- }
26023
- const useVerticalScrollDirective = {
26024
- mounted: function(el) {
26025
- const stopInstance = new StopPropagation(el);
26026
- el.addEventListener("touchstart", stopInstance.executer, { passive: true });
26027
- el.addEventListener("touchend", stopInstance.executer, { passive: true });
26028
- el.addEventListener("touchmove", stopInstance.move);
26029
- }
26030
- };
26031
- let prev = Date.now();
26032
- function rafPolyfill(fn) {
26033
- const curr = Date.now();
26034
- const ms = Math.max(0, 16 - (curr - prev));
26035
- const id = setTimeout(fn, ms);
26036
- prev = curr + ms;
26037
- return id;
26038
- }
26039
- function raf(fn) {
26040
- const requestAnimationFrame2 = window.requestAnimationFrame || rafPolyfill;
26041
- return requestAnimationFrame2.call(window, fn);
26042
- }
26043
- function cancelRaf(id) {
26044
- const cancelAnimationFrame2 = window.cancelAnimationFrame || window.clearTimeout;
26045
- cancelAnimationFrame2.call(window, id);
26046
- }
26047
- const SECOND = 1e3;
26048
- const MINUTE = 60 * SECOND;
26049
- const HOUR = 60 * MINUTE;
26050
- const DAY = 24 * HOUR;
26051
- function parseTime(time2) {
26052
- const days = Math.floor(time2 / DAY);
26053
- const hours = Math.floor(time2 % DAY / HOUR);
26054
- const minutes = Math.floor(time2 % HOUR / MINUTE);
26055
- const seconds = Math.floor(time2 % MINUTE / SECOND);
26056
- const milliseconds = Math.floor(time2 % SECOND);
26057
- return {
26058
- total: time2,
26059
- days,
26060
- hours,
26061
- minutes,
26062
- seconds,
26063
- milliseconds
26064
- };
26065
- }
26066
- function isSameSecond(time1, time2) {
26067
- return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3);
26068
- }
26069
- function useCountDown(options) {
26070
- let rafId;
26071
- let endTime;
26072
- let counting;
26073
- let deactivated;
26074
- const remain = ref(options.time);
26075
- const current = computed(() => parseTime(remain.value));
26076
- const pause = () => {
26077
- counting = false;
26078
- cancelRaf(rafId);
26079
- };
26080
- const getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
26081
- const setRemain = (value2) => {
26082
- var _a, _b;
26083
- remain.value = value2;
26084
- (_a = options.onChange) == null ? void 0 : _a.call(options, current.value);
26085
- if (value2 === 0) {
26086
- pause();
26087
- (_b = options.onFinish) == null ? void 0 : _b.call(options);
26088
- }
26089
- };
26090
- const microTick = () => {
26091
- rafId = raf(() => {
26092
- if (counting) {
26093
- setRemain(getCurrentRemain());
26094
- if (remain.value > 0) {
26095
- microTick();
26096
- }
26097
- }
26098
- });
26099
- };
26100
- const macroTick = () => {
26101
- rafId = raf(() => {
26102
- if (counting) {
26103
- const remainRemain = getCurrentRemain();
26104
- if (!isSameSecond(remainRemain, remain.value) || remainRemain === 0) {
26105
- setRemain(remainRemain);
26106
- }
26107
- if (remain.value > 0) {
26108
- macroTick();
26109
- }
26110
- }
26111
- });
26112
- };
26113
- const tick = () => {
26114
- if (options.millisecond) {
26115
- microTick();
26116
- } else {
26117
- macroTick();
26118
- }
26119
- };
26120
- const start = () => {
26121
- if (!counting) {
26122
- endTime = Date.now() + remain.value;
26123
- counting = true;
26124
- tick();
26125
- }
26126
- };
26127
- const reset2 = (totalTime = options.time) => {
26128
- pause();
26129
- remain.value = totalTime;
26130
- };
26131
- onBeforeUnmount(pause);
26132
- onActivated(() => {
26133
- if (deactivated) {
26134
- counting = true;
26135
- deactivated = false;
26136
- tick();
26137
- }
26138
- });
26139
- onDeactivated(() => {
26140
- if (counting) {
26141
- pause();
26142
- deactivated = true;
26143
- }
26144
- });
26145
- return {
26146
- start,
26147
- pause,
26148
- reset: reset2,
26149
- current
26150
- };
26151
- }
26152
26194
  const root$3 = "_root_12nmp_7";
26153
26195
  const container$4 = "_container_12nmp_21";
26154
26196
  const subContainer = "_subContainer_12nmp_37";
@@ -27116,11 +27158,12 @@ const _sfc_main$l = defineComponent({
27116
27158
  },
27117
27159
  emits: ["close"],
27118
27160
  setup(props, { emit }) {
27161
+ const cashback2 = ref();
27119
27162
  const { animation, uiState, type } = useData$1(props);
27120
27163
  const { postAgeConfirm } = getAgeConfirm();
27121
27164
  const lg2 = getLanguage();
27122
27165
  const images2 = getImages();
27123
- const { isDesktop } = useBreakpoints();
27166
+ const { isDesktop, isMobile } = useBreakpoints();
27124
27167
  const isCountDown = ref(false);
27125
27168
  const countDown = useCountDown({
27126
27169
  time: 5e3,
@@ -27222,10 +27265,10 @@ const _sfc_main$l = defineComponent({
27222
27265
  };
27223
27266
  const style = useCssModule();
27224
27267
  const headerFix = computed(() => {
27225
- var _a;
27226
- const { headerHeight } = useGetHeightProperties();
27268
+ var _a, _b, _c;
27269
+ const offsetTop = (_b = (_a = cashback2 == null ? void 0 : cashback2.value) == null ? void 0 : _a.offsetTop) != null ? _b : 0;
27227
27270
  return {
27228
- top: `${16 + (((_a = type.value) == null ? void 0 : _a.tierCampaignBottom) ? 0 : headerHeight)}px`
27271
+ top: `${16 + (((_c = type.value) == null ? void 0 : _c.tierCampaignBottom) ? 0 : Math.abs(offsetTop))}px`
27229
27272
  };
27230
27273
  });
27231
27274
  return {
@@ -27256,8 +27299,10 @@ const _sfc_main$l = defineComponent({
27256
27299
  close: close2,
27257
27300
  loaded: computed(() => uiState.animationLoaded),
27258
27301
  headerFix,
27302
+ isMobile: isMobile.value,
27259
27303
  images: images2,
27260
- lg: lg2
27304
+ lg: lg2,
27305
+ cashback: cashback2
27261
27306
  };
27262
27307
  }
27263
27308
  });
@@ -27268,7 +27313,8 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
27268
27313
  const _component_BirthdayConfirm = resolveComponent("BirthdayConfirm");
27269
27314
  const _component_BirthdayConfirmError = resolveComponent("BirthdayConfirmError");
27270
27315
  return withDirectives((openBlock(), createElementBlock("div", {
27271
- class: normalizeClass(["ppmna-default-font", {
27316
+ ref: "cashback",
27317
+ class: normalizeClass(["pp-cashback-lottie-container", {
27272
27318
  [_ctx.style.cashBackAnimationLottie]: _ctx.type.lottie,
27273
27319
  [_ctx.style.cashBackAnimationBottom]: _ctx.type.tierCampaignBottom,
27274
27320
  [_ctx.style.cashBackAnimationFull]: _ctx.type.tierCampaignFull,
@@ -27287,8 +27333,8 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
27287
27333
  _ctx.showContent && !_ctx.showAgeConfirm ? (openBlock(), createElementBlock("img", {
27288
27334
  key: 0,
27289
27335
  class: normalizeClass(_ctx.style.closeImage),
27290
- src: _ctx.images.iconClose,
27291
- style: normalizeStyle(_ctx.headerFix),
27336
+ src: _ctx.images.whiteIconClose,
27337
+ style: normalizeStyle([_ctx.isMobile ? _ctx.headerFix : {}]),
27292
27338
  "data-test": "cash-back-detail-close-button",
27293
27339
  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.close && _ctx.close(...args))
27294
27340
  }, null, 14, _hoisted_1$f)) : createCommentVNode("", true),
@@ -27896,13 +27942,13 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
27896
27942
  const cssModules$b = {};
27897
27943
  cssModules$b["$style"] = style0$a;
27898
27944
  var TopContent = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__cssModules", cssModules$b]]);
27899
- const container$2 = "_container_4e8q4_7";
27900
- const payment$1 = "_payment_4e8q4_10";
27901
- const paymentList = "_paymentList_4e8q4_13";
27902
- const bottomContainer = "_bottomContainer_4e8q4_28";
27903
- const bottomText = "_bottomText_4e8q4_47";
27945
+ const container$2 = "_container_j3wik_7";
27946
+ const payment$1 = "_payment_j3wik_10";
27947
+ const paymentList = "_paymentList_j3wik_13";
27948
+ const bottomContainer = "_bottomContainer_j3wik_29";
27949
+ const bottomText = "_bottomText_j3wik_48";
27904
27950
  var style0$9 = {
27905
- "ppmna-default-font": "_ppmna-default-font_4e8q4_1",
27951
+ "ppmna-default-font": "_ppmna-default-font_j3wik_1",
27906
27952
  container: container$2,
27907
27953
  payment: payment$1,
27908
27954
  paymentList,
@@ -30093,11 +30139,11 @@ function showAlert(params) {
30093
30139
  (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.unknown });
30094
30140
  }
30095
30141
  }
30096
- const bannerInfoContainer = "_bannerInfoContainer_1l754_1";
30097
- const bannerInfoIcon = "_bannerInfoIcon_1l754_9";
30098
- const bannerDesc = "_bannerDesc_1l754_14";
30099
- const updateIcon = "_updateIcon_1l754_20";
30100
- const bannerTitle = "_bannerTitle_1l754_23";
30142
+ const bannerInfoContainer = "_bannerInfoContainer_17644_1";
30143
+ const bannerInfoIcon = "_bannerInfoIcon_17644_9";
30144
+ const bannerDesc = "_bannerDesc_17644_14";
30145
+ const updateIcon = "_updateIcon_17644_20";
30146
+ const bannerTitle = "_bannerTitle_17644_23";
30101
30147
  var style0$6 = {
30102
30148
  bannerInfoContainer,
30103
30149
  bannerInfoIcon,
@@ -32275,7 +32321,7 @@ function debug(params) {
32275
32321
  function execute$5(params) {
32276
32322
  var _a;
32277
32323
  (_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, {
32278
- v: "1.30.0"
32324
+ v: "1.33.0"
32279
32325
  });
32280
32326
  }
32281
32327
  function useCallBack(props, ctx) {
@@ -33397,29 +33443,27 @@ const _sfc_main = defineComponent({
33397
33443
  url: {
33398
33444
  type: String,
33399
33445
  default: void 0
33400
- },
33401
- success: {
33402
- type: Function,
33403
- default: () => {
33404
- },
33405
- required: false
33406
33446
  }
33407
33447
  },
33408
- emits: ["click"],
33448
+ emits: {
33449
+ click: () => true,
33450
+ mount: () => true
33451
+ },
33409
33452
  setup(props, { emit }) {
33410
- var _a;
33411
33453
  const onClick = () => emit("click");
33412
33454
  const onError = (e) => {
33413
- var _a2;
33455
+ var _a;
33414
33456
  const el = e.target;
33415
- (_a2 = el == null ? void 0 : el.parentNode) == null ? void 0 : _a2.removeChild(el);
33457
+ (_a = el == null ? void 0 : el.parentNode) == null ? void 0 : _a.removeChild(el);
33416
33458
  };
33417
33459
  let iconUrl = images.paypayRec;
33418
33460
  if (props.theme === "red") {
33419
33461
  iconUrl = images.paypayRecWhite;
33420
33462
  }
33421
33463
  let smallBtn = props.buttonSize === "sm";
33422
- (_a = props == null ? void 0 : props.success) == null ? void 0 : _a.call(props);
33464
+ onMounted(() => {
33465
+ emit("mount");
33466
+ });
33423
33467
  return {
33424
33468
  onClick,
33425
33469
  onError,
@@ -33479,9 +33523,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
33479
33523
  ], 10, _hoisted_2)
33480
33524
  ]);
33481
33525
  }
33482
- var AppVue = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-04b9ac25"]]);
33526
+ var AppVue = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-fb345984"]]);
33483
33527
  const initSmartButton = (params, data2, preferredLanguage, isLoggedIn) => {
33484
33528
  const smartButtonParams = reactive(params);
33529
+ const triggerPayment = () => {
33530
+ makePayment(__spreadProps(__spreadValues({}, smartButtonParams == null ? void 0 : smartButtonParams.orderInfo), {
33531
+ success: (res) => {
33532
+ var _a;
33533
+ (_a = smartButtonParams == null ? void 0 : smartButtonParams.success) == null ? void 0 : _a.call(smartButtonParams, __spreadValues({}, res));
33534
+ },
33535
+ fail: (err) => {
33536
+ var _a;
33537
+ (_a = smartButtonParams == null ? void 0 : smartButtonParams.fail) == null ? void 0 : _a.call(smartButtonParams, __spreadValues({}, err));
33538
+ },
33539
+ complete: () => {
33540
+ var _a;
33541
+ (_a = smartButtonParams == null ? void 0 : smartButtonParams.complete) == null ? void 0 : _a.call(smartButtonParams);
33542
+ }
33543
+ })).catch(() => {
33544
+ });
33545
+ };
33485
33546
  const app = createApp({
33486
33547
  setup() {
33487
33548
  return () => h(AppVue, {
@@ -33494,11 +33555,19 @@ const initSmartButton = (params, data2, preferredLanguage, isLoggedIn) => {
33494
33555
  isShortText: smartButtonParams.isShortText,
33495
33556
  preferredLanguage: preferredLanguage === "ja" ? "ja" : "en",
33496
33557
  url: (smartButtonParams == null ? void 0 : smartButtonParams.url) || void 0,
33497
- success: smartButtonParams == null ? void 0 : smartButtonParams.success,
33498
33558
  onClick: () => {
33499
33559
  var _a;
33500
33560
  if (smartButtonParams.type === "pay" && isLoggedIn) {
33501
- (_a = params == null ? void 0 : params.callback) == null ? void 0 : _a.call(params);
33561
+ if (smartButtonParams == null ? void 0 : smartButtonParams.callback) {
33562
+ (_a = smartButtonParams == null ? void 0 : smartButtonParams.callback) == null ? void 0 : _a.call(smartButtonParams);
33563
+ } else if (smartButtonParams == null ? void 0 : smartButtonParams.orderInfo) {
33564
+ triggerPayment();
33565
+ }
33566
+ }
33567
+ },
33568
+ onMount: () => {
33569
+ if (smartButtonParams.type === "pay" && isLoggedIn && (smartButtonParams == null ? void 0 : smartButtonParams.autoInvoke) && OTTLoginState.isJustLoggedIn) {
33570
+ triggerPayment();
33502
33571
  }
33503
33572
  }
33504
33573
  });
@@ -33738,8 +33807,9 @@ const wallet = {
33738
33807
  eMoney: "PayPay Money",
33739
33808
  nonUsable: "PayPay Money Lite",
33740
33809
  cashBackUsable: "PayPay Point",
33741
- cashBackExpirable: "PayPay Point Light",
33742
- balance: "Available amount:"
33810
+ cashBackExpirable: "PayPay Bonus Light",
33811
+ balance: "Available amount:",
33812
+ autoCharge: "Auto charge"
33743
33813
  };
33744
33814
  const payLater = {
33745
33815
  title: "PayPay deferred payment",