@paypay/mini-app-js-sdk 2.8.0 → 2.11.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 (49) hide show
  1. package/dist/client/clientUtils.d.ts +9 -4
  2. package/dist/client/coreIframe.d.ts +2 -1
  3. package/dist/client/index.d.ts +10 -1
  4. package/dist/client/supportedFunctionsList.d.ts +2 -2
  5. package/dist/core/coreFunctions/claimCoupon.d.ts +6 -0
  6. package/dist/core/coreFunctions/fetchCoupons.d.ts +8 -0
  7. package/dist/core/coreFunctions/index.d.ts +4 -0
  8. package/dist/core/coreFunctions/logEvent.d.ts +12 -0
  9. package/dist/core/coreFunctions/logout.d.ts +1 -0
  10. package/dist/core/coreUtils.d.ts +10 -3
  11. package/dist/core/coupon/couponFunctions/index.d.ts +1 -0
  12. package/dist/core/coupon/couponFunctions/renderCoupons.d.ts +9 -0
  13. package/dist/core/coupon/index.d.ts +3 -0
  14. package/dist/core/index.d.ts +5 -0
  15. package/dist/environment-variables.d.ts +4 -0
  16. package/dist/index.d.ts +3 -0
  17. package/dist/jsbridge-core/lib/browser.d.ts +3 -0
  18. package/dist/jsbridge-core/paypay-jsbridge.d.ts +16 -0
  19. package/dist/mini-app-js-sdk.browser.js +1 -1
  20. package/dist/mini-app-js-sdk.d.ts +10 -0
  21. package/dist/mini-app-js-sdk.es.js +937 -176
  22. package/dist/model/bridge/getConfigure.d.ts +2 -2
  23. package/dist/model/bridge/getLoginUrl.d.ts +9 -0
  24. package/dist/model/bridge/index.d.ts +47 -0
  25. package/dist/model/bridge/render.d.ts +0 -12
  26. package/dist/model/bridge/renderLoginButton.d.ts +2 -2
  27. package/dist/model/makePayment.d.ts +7 -0
  28. package/dist/package/button/index.d.ts +1 -1
  29. package/dist/package/lottie/index.d.ts +73 -0
  30. package/dist/package/lottie/lottie.d.ts +77 -0
  31. package/dist/resources/en.d.ts +1 -0
  32. package/dist/resources/images.d.ts +2 -0
  33. package/dist/resources/ja.d.ts +1 -0
  34. package/dist/types.d.ts +34 -8
  35. package/dist/utils/analytics.d.ts +3 -1
  36. package/dist/utils/api.d.ts +32 -25
  37. package/dist/utils/browsers.d.ts +3 -0
  38. package/dist/utils/fetch.d.ts +2 -1
  39. package/dist/utils/getLanguage.d.ts +1 -0
  40. package/dist/utils/helper.d.ts +3 -3
  41. package/dist/utils/storage.d.ts +8 -0
  42. package/dist/utils/windowBridge.d.ts +24 -0
  43. package/dist/views/coupon/components/Arrow/index.d.ts +17 -0
  44. package/dist/views/coupon/components/CouponAction/index.d.ts +39 -0
  45. package/dist/views/coupon/components/CouponContainer/index.d.ts +14 -0
  46. package/dist/views/coupon/index.d.ts +38 -0
  47. package/dist/views/coupon/types.d.ts +34 -0
  48. package/dist/views/registerPaymentFeatures/types.d.ts +9 -0
  49. package/package.json +15 -11
@@ -1,7 +1,7 @@
1
- import { ClientJsBridge } from '../types';
2
- export declare function checkIFrameOrigin(origin: string, env: string | undefined, coreVersion?: string): boolean;
3
- export declare function getIframeOrigin(env: string | undefined, coreVersion?: string): string;
4
- export declare function getIframeUrl(env: string | undefined, coreVersion?: string): string;
1
+ import { ClientJsBridge, MiniAppErrorResultType } from '../types';
2
+ import { NativeParams } from '../jsbridge-core/jsbridge';
3
+ import { CoreFunctions } from '../core';
4
+ export declare function checkIFrameOrigin(origin: string): boolean;
5
5
  export declare function getIconUrl(theme?: string): string;
6
6
  export declare function convertToString(str?: string): string;
7
7
  export declare function removeCookie(key: string, domain: string): void;
@@ -16,3 +16,8 @@ export declare function isSupportedSmartpayment(functionName: string): boolean;
16
16
  export declare function isFunctionRunning(): boolean;
17
17
  export declare function functionEnd(messageId: string): void;
18
18
  export declare function functionStart(): string;
19
+ export declare class ClientError<T extends MiniAppErrorResultType = MiniAppErrorResultType> extends Error {
20
+ payload: T;
21
+ constructor(message: string, payload: T);
22
+ }
23
+ export declare function promiseToCallback<S, E extends MiniAppErrorResultType = MiniAppErrorResultType, P extends NativeParams<S, E> = NativeParams<S, E>>(functionName: string, target: (params: P) => Promise<S>, getCore: () => CoreFunctions, getLoggingParams?: (params: P) => Partial<Parameters<CoreFunctions['logEvent']>[0]>): (params: P) => void;
@@ -1,6 +1,7 @@
1
1
  export declare const IFRAME_NAME = "ppmna-iframe";
2
2
  export declare const IFRAME_CONTAINER_NAME = "ppsdk-container";
3
- export declare function initCoreIframe(env?: string, coreVersion?: string, zIndex?: string): void;
3
+ export declare function initCoreIframe(): void;
4
4
  export declare function showCoreIframe(visible: boolean): void;
5
5
  export declare function getCoreIframe(): Promise<HTMLIFrameElement | undefined>;
6
+ export declare function getCoreIframeWindow(): Promise<Window | null | undefined>;
6
7
  export declare function removeCoreIframe(): void;
@@ -1,6 +1,7 @@
1
1
  import { NativeParams } from '../jsbridge-core/jsbridge';
2
2
  import { MiniAppModule } from '../mini-app-api';
3
- import { CopyToClipBoardParams, GetAuthStatusClientParams, GetDataParams, InitClientParams, MiniAppResult, RemoveDataParams, RenderSmartButtonParams, ScanCodeClientParams, SetDataParams, SetTitleParams, ShareParams } from '../types';
3
+ import { CopyToClipBoardParams, GetAuthStatusClientParams, GetDataParams, InitClientParams, MiniAppResult, RemoveDataParams, RenderCouponsParams, RenderSmartButtonParams, ScanCodeClientParams, SetDataParams, SetTitleParams, ShareParams } from '../types';
4
+ import { MiniAppStatusType } from '../model/miniAppStatus';
4
5
  declare function init(params: InitClientParams): void;
5
6
  declare function getAuthStatus(params: GetAuthStatusClientParams): void;
6
7
  declare function verifyMultiFactorAuthResult(params: NativeParams<MiniAppResult>): void;
@@ -8,6 +9,10 @@ declare function getKycPassportInfo(params: NativeParams<MiniAppResult>): void;
8
9
  declare function share(params: ShareParams): void;
9
10
  declare function setTitle(params: SetTitleParams): void;
10
11
  declare function render(params: RenderSmartButtonParams): void;
12
+ export interface UpdateCouponIframeHeightMessage {
13
+ eventName: 'update-iframe-height';
14
+ height: number;
15
+ }
11
16
  declare function scanCode(params: ScanCodeClientParams): void;
12
17
  declare function getSessionData(params: GetDataParams): void;
13
18
  declare function setSessionData(params: SetDataParams): void;
@@ -21,6 +26,7 @@ declare const clientFunctions: {
21
26
  share: typeof share;
22
27
  setTitle: typeof setTitle;
23
28
  render: typeof render;
29
+ renderCoupons: (params: RenderCouponsParams) => void;
24
30
  scanCode: typeof scanCode;
25
31
  copyToClipboard: typeof copyToClipboard;
26
32
  getSessionData: typeof getSessionData;
@@ -30,6 +36,9 @@ declare const clientFunctions: {
30
36
  removeStorageData: typeof removeStorageData;
31
37
  getKycPassportInfo: typeof getKycPassportInfo;
32
38
  getAuthStatus: typeof getAuthStatus;
39
+ logout: (params: NativeParams<{
40
+ statusCode: MiniAppStatusType;
41
+ }, import('../types').MiniAppErrorResultType>) => void;
33
42
  };
34
43
  declare type ClientSDKType = Omit<MiniAppModule, keyof typeof clientFunctions> & typeof clientFunctions;
35
44
  declare const _default: ClientSDKType;
@@ -1,2 +1,2 @@
1
- export declare const miniAppSupportedFunctions: readonly ["init", "openWebview", "openMap", "closeApp", "makePayment", "topup", "setSessionData", "getSessionData", "setStorageData", "getStorageData", "removeStorageData", "getPermissionStatus", "scanCode", "showAlert", "showErrorSheet", "getTopBarHeight", "setTitle", "showUpdateWarning", "getPlatformInformation", "openApp", "share", "getKycInformation", "getUserLocation", "checkPaymentMethod", "registerKyc", "startMultiFactorAuth", "verifyMultiFactorAuthResult", "getBankInfo", "logout", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "copyToClipboard", "registerUserInfo", "setEnablePullDownRefresh", "registerEmail", "checkAccessToken", "debug", "inputAddress", "getDeviceInformation", "openMiniApp", "request", "requestInternal", "registerPaymentFeatures", "initKycPassport", "getKycPassportInfo", "shortcutExists", "addShortcut", "logAppsFlyerEvent", "getAllUserAddresses"];
2
- export declare const smartPaymentSupportedFunctions: readonly ["init", "createOrder", "makePayment", "render", "logout", "getAuthStatus", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "getCashbackInformation"];
1
+ export declare const miniAppSupportedFunctions: readonly ["init", "openWebview", "openMap", "closeApp", "makePayment", "topup", "setSessionData", "getSessionData", "setStorageData", "getStorageData", "removeStorageData", "getPermissionStatus", "scanCode", "showAlert", "showErrorSheet", "getTopBarHeight", "setTitle", "showUpdateWarning", "getPlatformInformation", "openApp", "share", "getKycInformation", "getUserLocation", "checkPaymentMethod", "registerKyc", "startMultiFactorAuth", "verifyMultiFactorAuthResult", "getBankInfo", "logout", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "copyToClipboard", "registerUserInfo", "setEnablePullDownRefresh", "registerEmail", "checkAccessToken", "debug", "inputAddress", "getDeviceInformation", "openMiniApp", "request", "requestInternal", "registerPaymentFeatures", "initKycPassport", "getKycPassportInfo", "shortcutExists", "addShortcut", "logAppsFlyerEvent", "getAllUserAddresses", "getUserPaymentFeatureSettings"];
2
+ export declare const smartPaymentSupportedFunctions: readonly ["init", "createOrder", "makePayment", "render", "logout", "getAuthStatus", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "getCashbackInformation", "renderCoupons"];
@@ -0,0 +1,6 @@
1
+ interface ClaimCouponParams {
2
+ merchantId: string;
3
+ couponId: string;
4
+ }
5
+ export declare function claimCoupon({ merchantId, couponId }: ClaimCouponParams): Promise<boolean>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import { PostLogInRedirectParams } from '../../types';
2
+ import { Coupon } from '../../views/coupon/types';
3
+ interface FetchCouponsParams extends PostLogInRedirectParams {
4
+ merchantId: string;
5
+ couponId: string;
6
+ }
7
+ export declare function fetchCoupons({ merchantId, couponId, ...postLoginRedirectParams }: FetchCouponsParams): Promise<Array<Coupon>>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ export { fetchCoupons } from './fetchCoupons';
2
+ export { claimCoupon } from './claimCoupon';
3
+ export { logEvent } from './logEvent';
4
+ export { logout } from './logout';
@@ -0,0 +1,12 @@
1
+ interface LogEventParams {
2
+ eventName?: string;
3
+ clientId?: string;
4
+ event_category?: string;
5
+ event_label_suffix?: string;
6
+ screen_name?: string;
7
+ event_action?: string;
8
+ error_value?: string;
9
+ event_label2?: unknown;
10
+ }
11
+ export declare function logEvent({ eventName, clientId, event_category, event_label_suffix, screen_name, ...params }: LogEventParams): void;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare function logout(): boolean;
@@ -1,7 +1,14 @@
1
- import { ConsoleDebugInfoParams } from '../types';
1
+ import { NativeParams } from '../jsbridge-core/jsbridge';
2
+ import { Address, ConsoleDebugInfoParams, MiniAppResult, ChallengeMethod } from '../types';
2
3
  export declare function initCoreUtil(targetOrigin: string): void;
3
4
  export declare function linkOpen(url: string, target?: string, isFocus?: boolean): void;
5
+ export declare function getDomain(subdomainCookieSharing: boolean, hostname: string): string;
6
+ export declare function checkClientOrigin(origin: string | undefined): boolean;
4
7
  export declare function sendRefreshTokenToClient(refreshToken: string, subdomainCookieSharing?: boolean): void;
5
- export declare function sendCodeVerifierToClient(codeVerifier: string, url: string): void;
6
- export declare function sendMakeIframeVisible(): void;
8
+ export declare function getPkceCodeChallenge(): Promise<{
9
+ challenge: string;
10
+ challengeMethod: ChallengeMethod;
11
+ }>;
12
+ export declare function sendMakeIframeVisible(params: NativeParams<void> | NativeParams<MiniAppResult> | NativeParams<Address>): void;
13
+ export declare function checkMakeIframeVisible(): void;
7
14
  export declare function sendDebugInfoToClient(data: ConsoleDebugInfoParams, env?: string | null, debugMode?: boolean): void;
@@ -0,0 +1 @@
1
+ export { renderCoupons } from './renderCoupons';
@@ -0,0 +1,9 @@
1
+ import { Coupon } from '../../../views/coupon/types';
2
+ import { Locale } from '../../../types';
3
+ interface RenderCouponsParams {
4
+ coupons: Array<Coupon>;
5
+ merchantId: string;
6
+ locale?: Locale;
7
+ }
8
+ export declare function renderCoupons({ coupons, merchantId, locale, }: RenderCouponsParams): void;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ import { WindowBridgeFunctions } from '../../utils/windowBridge';
2
+ import * as couponFunctions from '../../core/coupon/couponFunctions';
3
+ export declare type CouponFunctions = WindowBridgeFunctions<typeof couponFunctions>;
@@ -0,0 +1,5 @@
1
+ export * from '../index';
2
+ import { WindowBridgeFunctions } from '../utils/windowBridge';
3
+ import * as coreFunctions from '../core/coreFunctions';
4
+ export declare type CoreFunctions = WindowBridgeFunctions<typeof coreFunctions>;
5
+ export declare function initCore(): void;
@@ -0,0 +1,4 @@
1
+ export declare const JS_SDK_VERSION: string;
2
+ export declare const CORE_IFRAME_ORIGIN: string;
3
+ export declare const CORE_IFRAME_URL: string;
4
+ export declare const COUPON_IFRAME_URL: string;
@@ -0,0 +1,3 @@
1
+ import { PayPayJsBridge } from './mini-app-js-sdk';
2
+ declare const paypayJsBridge: PayPayJsBridge;
3
+ export default paypayJsBridge;
@@ -0,0 +1,3 @@
1
+ import { JsBridge } from '../jsbridge';
2
+ export declare function exposeJsBridge(jsBridge: JsBridge): boolean;
3
+ export declare function exposePayPayJsBridge(paypayJsBridge: unknown): boolean;
@@ -0,0 +1,16 @@
1
+ import { JsBridge, NativeParams } from './jsbridge';
2
+ import { JsBridgeModule, JsBridgeModuleConstructor } from './module';
3
+ export declare class PayPayJsBridgeBase {
4
+ jsBridge: JsBridge;
5
+ instances: Record<string, JsBridgeModule>;
6
+ state: {
7
+ executing: boolean;
8
+ };
9
+ constructor(jsBridge: JsBridge);
10
+ isExecutableService(params: NativeParams<never>): boolean;
11
+ }
12
+ export interface PayPayJsBridgeBaseConstructor {
13
+ new (jsBridge: JsBridge): PayPayJsBridgeBase;
14
+ readonly prototype: PayPayJsBridgeBase;
15
+ }
16
+ export declare function composePayPayJsBridge(bridgeConstructor: PayPayJsBridgeBaseConstructor, ...moduleConstructors: JsBridgeModuleConstructor[]): void;
@@ -1,2 +1,2 @@
1
1
  (function(){"use strict";try{if(typeof document!="undefined"){var p=document.createElement("style");p.appendChild(document.createTextNode(".ppmna-reset-css{all:initial}.ppmna-reset-css *{text-align:unset;color:unset;background:initial;background-color:transparent;margin:revert;padding:revert;font-weight:revert;font-style:unset;font-size:unset;user-select:none;border:unset;border-radius:revert;vertical-align:unset;word-break:unset;outline:none;box-sizing:content-box}.ppmna-reset-css * img{display:inline-block}.ppmna-reset-css * input,.ppmna-reset-css * select{user-select:auto}.ppmna-reset-css * li{list-style:none}.ppmna-reset-css * :where(*:not(svg,svg *)){all:revert}.pp-smartButtonWrapper .pp-smartBtn{display:flex;align-items:center;border-radius:8px;border:none;font-size:14px;font-weight:600;line-height:22px;color:#fff;padding:0;width:100%;height:44px;margin:auto;-webkit-tap-highlight-color:transparent;text-decoration:none;box-sizing:border-box}.pp-smartButtonWrapper .pp-smartBtn.pp-sm .pp-leftSection .pp-btnContent{flex-direction:column}.pp-smartButtonWrapper .pp-smartBtn.pp-light{background:#fff;color:#242323}.pp-smartButtonWrapper .pp-smartBtn.pp-dark{background:#000}.pp-smartButtonWrapper .pp-smartBtn.pp-red{background:#ff0033}.pp-smartButtonWrapper .pp-smartBtn.pp-login{min-width:180px}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-sm{width:180px!important}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-light{border:1px solid #e4e4e8}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-light .pp-userProfile{margin-right:4px}.pp-smartButtonWrapper .pp-smartBtn.pp-login .pp-leftSection .pp-btnContent{display:grid}.pp-smartButtonWrapper .pp-smartBtn.pp-pay{min-width:160px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-light{border:1px solid #dddddd}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-light .pp-cashbackInfo{color:#ff954c;background:#fff0e5}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-red .pp-cashbackInfo{color:#f03}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-ja .pp-cashbackInfo{padding:2px 16px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm{width:160px!important}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm.pp-cashback{height:66px;flex-direction:column;justify-content:center}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm .pp-cashbackInfo{margin:8px 0 0}.pp-smartButtonWrapper .pp-smartBtn.pp-pay .pp-leftSection .pp-img{width:24px;height:24px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-shortText{font-size:16px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm .pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-cashback .pp-leftSection .pp-btnContent,.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-shortText .pp-leftSection .pp-btnContent{margin-left:4px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection{display:flex;justify-content:center;align-items:center;width:100%;box-sizing:border-box;padding:0 8px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-img{width:20px;height:20px;display:inline-block}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-btnContent{margin-left:8px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-btnContent .pp-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-smartButtonWrapper .pp-smartBtn .pp-cashbackInfo{font-size:12px;color:#242323;background:#fff;line-height:14px;padding:2px 8px;border-radius:9px;margin-left:8px}.pp-smartButtonWrapper .pp-smartBtn .pp-userProfile{width:34px;height:34px;border-radius:50%;margin-right:5px}.pp-smartButtonWrapper.pp-button{padding:0;margin:0;background:none;border:none;width:100%;border-radius:8px;-webkit-tap-highlight-color:transparent;font-family:revert!important}.pp-smartButtonWrapper.pp-button *{font-family:revert!important}")),document.head.appendChild(p)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- var pp=function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)e[a]=n[a]}return e}var t=function t(n,a){function o(t,o,i){if("undefined"!=typeof document){"number"==typeof(i=e({},a,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var r in i)i[r]&&(l+="; "+r,!0!==i[r]&&(l+="="+i[r].split(";")[0]));return document.cookie=t+"="+n.write(o,t)+l}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],a={},o=0;o<t.length;o++){var i=t[o].split("="),l=i.slice(1).join("=");try{var r=decodeURIComponent(i[0]);if(a[r]=n.read(l,r),e===r)break}catch(s){}}return e?a[e]:a}},remove:function(t,n){o(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),n=(e=>(e.accessToken="ppjssdk.accessToken",e.refreshToken="ppjssdk.refreshToken",e.env="ppjssdk.env",e.deviceUUID="ppjssdk.deviceUUID",e.clientUUID="ppjssdk.clientUUID",e.lastPayment="ppjssdk.lastPayment",e.lastTopup="ppjssdk.lastTopup",e.appDetail="ppjssdk.appDetail",e.appConfig="ppjssdk.appConfig",e.userInfo="ppjssdk.userInfo",e.lastPaymentMethod="ppjssdk.lastPaymentMethod",e.lastTopupPayMethod="ppjssdk.lastTopupPayMethod",e.codeVerifier="ppjssdk.codeVerifier",e.clientOrigin="ppjssdk.clientOrigin",e.clientVersion="ppjssdk.clientVersion",e.debugMode="ppjssdk.debugMode",e.merchant="ppjssdk.merchant",e))(n||{});const a="success",o="fail",i="complete",l="init",r="render",s="makePayment",c="verifyMultiFactorAuthResult",d="share",u="scanCode",p="getAuthStatus",m="handleMessageFromNative",v="getKycPassportInfo",f="reload",I="link",E="saveRefreshToken",g="saveCodeVerifier",A="makeVisible",_="consoleDebugInfo",h="_PayPayJsBridge",T=["init","openWebview","openMap","closeApp","makePayment","topup","setSessionData","getSessionData","setStorageData","getStorageData","removeStorageData","getPermissionStatus","scanCode","showAlert","showErrorSheet","getTopBarHeight","setTitle","showUpdateWarning","getPlatformInformation","openApp","share","getKycInformation","getUserLocation","checkPaymentMethod","registerKyc","startMultiFactorAuth","verifyMultiFactorAuthResult","getBankInfo","logout","getUserProfile","getBalance","getUserAddress","getUAID","copyToClipboard","registerUserInfo","setEnablePullDownRefresh","registerEmail","checkAccessToken","debug","inputAddress","getDeviceInformation","openMiniApp","request","requestInternal","registerPaymentFeatures","initKycPassport","getKycPassportInfo","shortcutExists","addShortcut","logAppsFlyerEvent","getAllUserAddresses"];function N(e){return"https://image.paypay.ne.jp/miniapps/mini-app-sdk/"+e}const S=N("icon-paypay-rec.svg"),y=N("icon-paypay-rec-white.svg");function P(e,t,n){return e===D(t,n)}function D(e,t){return new URL(O(e,t)).origin}function O(e,t){return`${function(){switch(e){case"staging":case"sandbox":case"canary":case"qa":return"staging"===t?"https://mini-app-sdk-core.paypay.ne.jp/dev/stg/iframe.html":"https://mini-app-sdk-core.paypay.ne.jp/iframe.html";default:return"https://mini-app-sdk-core.paypay.ne.jp/iframe.html"}}()}?v=2.8.0`}function C(e){return e?String(e):""}function k(e,n){t.remove(e),t.remove(e,{domain:n})}let R=[];function U(e){R=R.filter((t=>t!==e))}function L(){const e=Math.random().toString(36).substring(7);return R.push(e),e}var b=(e=>(e.success="SUCCESS",e.invalidUrl="INVALID_URL",e.invalidData="INVALID_DATA",e.invalidHeader="INVALID_HEADER",e.invalidMethod="INVALID_METHOD",e.invalidPath="INVALID_PATH",e.notReachable="NOT_REACHABLE",e.notAvailable="NOT_AVAILABLE",e.timeOut="TIME_OUT",e.whiteListError="NONE_WHITELIST_DOMAIN",e.statusCodeError="STATUS_CODE_ERROR",e.invalidResponse="INVALID_RESPONSE",e.noLocationPermission="NO_USER_LOCATION_PERMISSION",e.noPermissionListAvailable="NO_PERMISSION_LIST_AVAILABLE",e.other="other",e.serverError="SERVER_ERROR",e.noCameraPermission="HOST_APP_CAMERA_DENIED",e.noAlbumPermission="HOST_APP_ALBUM_DENIED",e.insufficientScope="INSUFFICIENT_SCOPE",e.userCanceled="USER_CANCELED",e.invalidJSAPIParams="INVALID_JS_API_PARAMS",e.hostAppLocationDenied="HOST_APP_LOCATION_DENIED",e.hostAppContactsDenied="HOST_APP_READING_CONTACT_DENIED",e.badRequestInsufficientParameter="BAD_REQUEST_INSUFFICIENT_PARAMETER",e.badRequest="BAD_REQUEST",e.paymentFail="PAYMENT_FAIL",e.topupFail="TOPUP_FAIL",e.topupSuccessButNotAddToBalance="TOPUP_SUCCESS_BUT_NOT_ADD_TO_BALANCE",e.userCanceledSimilarTxn="USER_CANCELED_SIMILAR_TRANSACTION",e.mapAppNotFound="MAP_APP_NOT_FOUND",e.invalidAppSchemeURL="INVALID_APP_SCHEME_URL",e.noValueFound="NO_VALUE_FOUND",e.securityNotSetup="SECURITY_NOT_SETUP",e.userDenied="USER_DENIED",e.securityTemporaryLocked="SECURITY_TEMPORARY_LOCKED",e.couldNotGenerateBarcode="COULD_NOT_GENERATE_BARCODE",e.cannotDetectAvailability="CAN_NOT_DETECT_AVAILABILITY",e.suspectedDuplicatePayment="SUSPECTED_DUPLICATE_PAYMENT",e.noSufficientFund="NO_SUFFICIENT_FUND",e.unknown="UNKNOWN",e.sdkNotInitialized="SDK_NOT_INITIALIZED",e.tokenNotFound="TOKEN_NOT_FOUND",e.tokenExpired="TOKEN_EXPIRED",e.activeRequestExists="ACTIVE_REQUEST_EXISTS",e.invalidType="INVALID_TYPE",e.sessionNotFound="SESSION_NOT_FOUND",e.cookieError="COOKIE_ERROR",e.notAuthorized="NOT_AUTHORIZED",e.permissionRequired="PERMISSION_REQUIRED",e.deeplinkUnavailable="DEEPLINK_UNAVAILABLE",e.kycIncompleted="KYC_INCOMPLETED",e.noBankAccount="NO_BANK_ACCOUNT",e.invalidPaymentIdentifier="INVALID_PAYMENT_IDENTIFIER",e.otpSendTooShort="OTP_SEND_TOO_SHORT",e.otpSendOverLimit="OTP_SEND_OVER_LIMIT",e.userVerificationFailure="USER_VERIFICATION_FAILURE",e.unacceptableOp="UNACCEPTABLE_OP",e.kycUpdateRequired="KYC_UPDATE_REQUIRED",e.notCompleted="NOT_COMPLETED",e.kycValidationInProcess="KYC_VALIDATION_IN_PROCESS",e.noLocationData="NO_LOCATION_DATA",e))(b||{});const w="ppmna-iframe",M="ppsdk-container";let F,V,B,j,x,K;function H(){return j||(j=function(){const e=document.createElement("div");return document.createElement("div"),e.setAttribute("id",M),e.setAttribute("class",M),e.style.all="initial",e.style.display="none",e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.top="0",e.style.left="0",e.style.zIndex=B||"2147483637",document.body.appendChild(e),e}()),j}function J(e){H().style.display=e?"initial":"none"}function Y(){return x||(x=new Promise(((e,t)=>{const n=document.createElement("iframe");n.setAttribute("src",O(F,V)),n.setAttribute("name",w),n.setAttribute("id",w),n.setAttribute("class",w),n.setAttribute("allow","geolocation"),n.onload=()=>{e(n)},n.onerror=t,n.style.all="initial",n.style.width="100%",n.style.height="100%",n.style.border="none";const a=H();a.innerHTML="",a.append(n)}))),x}let q=!1,$="";function z(e,t,n){var l,r,s;e.result===o&&(null==(l=null==t?void 0:t.fail)||l.call(t,e.data)),e.result===a&&(null==(r=null==t?void 0:t.success)||r.call(t,null==e?void 0:e.data)),e.result===i&&(null==(s=null==t?void 0:t.complete)||s.call(t),removeEventListener("message",n),U(e.messageId),R.length>0||J(!1))}async function W(e){var t;const n=await Y().catch((()=>{}));null==(t=null==n?void 0:n.contentWindow)||t.postMessage(JSON.parse(JSON.stringify(e)),D(K))}function Q(e,t,n,a){const o=L();J(t);const i=t=>{P(t.origin,K,$)&&t.data.name===e&&t.data.messageId===o&&z(t.data,n,i)};addEventListener("message",i),W({name:e,params:a,messageId:o})}addEventListener("message",(e=>{if(P(e.origin,K,$))if(e.data.name===f&&window.location.reload(),e.data.name!==A){if(e.data.name===I){const t=e.data.data;"_blank"===t.target?window.open(t.url,"_blank"):window.location.href=t.url}if(e.data.name===E){const{refreshToken:a,domain:o,isSecure:i}=e.data.data;!function(e,a,o){k(n.refreshToken,a),t.set(n.refreshToken,e,{domain:a,expires:90,secure:o})}(a,o,i)}if(e.data.name===g){const{codeVerifier:a,domain:o,isSecure:i}=e.data.data;!function(e,a,o){k(n.codeVerifier,a),t.set(n.codeVerifier,e,{domain:a,secure:o})}(a,o,i)}if(e.data.name===_){const{params:t}=e.data.data;!function(e){console.debug(...e)}(t)}}else J(!0)}));!function(e){const t=window;(!t.hasOwnProperty(h)||t._PayPayJsBridge!==e)&&(t._PayPayJsBridge=e)}({_handleMessageFromNative:async e=>{var t;const n=await Y();null==(t=null==n?void 0:n.contentWindow)||t.postMessage(JSON.parse(JSON.stringify({name:m,params:{json:e}})),D(K))}});const G=new Proxy({init:function(e){$=e.coreVersion;const a=new URL(window.location.href),o=a.searchParams.get("token"),i=a.searchParams.get("one_time_token"),r=t.get(n.refreshToken)||"",s=t.get(n.codeVerifier)||"";q=!!e.useAllFunctions,(o||i)&&function(e){e.searchParams.delete("token"),e.searchParams.delete("one_time_token"),e.search=e.searchParams.toString(),history.replaceState(null,"",e)}(a),K=e.env;const c={env:e.env,mode:e.mode,debugMode:e.debugMode,clientId:e.clientId,token:o,ott:i,refreshToken:r,clientVersion:"2.8.0",codeVerifier:s};var d,u,p;d=K,u=$,p=e.zIndex,F=d,V=u,B=p,Y(),Q(l,!1,e,c)},verifyMultiFactorAuthResult:function(e){const t=new URL(window.location.href);Q(c,!1,e,{...e,sessionId:t.searchParams.get("ppSessionId")})},share:function(e){if(!(null==navigator?void 0:navigator.share))return void Q(d,!1,e,e);const t={text:null==e?void 0:e.text};navigator.share(t).then((()=>{var t,n;null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)})).catch((()=>{var t,n;null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:b.unknown}),null==(n=null==e?void 0:e.complete)||n.call(e)}))},setTitle:function(e){var t,n;document.title=(null==e?void 0:e.title)||"",null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},render:function(e){var t;if(!(null==e?void 0:e.containerId)||!document.getElementById(null==e?void 0:e.containerId))return null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:b.badRequestInsufficientParameter}),console.error("Invalid container Id");const n=L(),o=t=>{var l,c;if(!P(t.origin,K,$)||t.data.name!==r||t.data.messageId!==n)return;const d=null==(l=t.data)?void 0:l.data,u=null==(c=t.data)?void 0:c.data;t.data.result===a&&(!function(e,t){var n,a,o,i,l,r,c;const d=document.getElementById(t.containerId),u=document.createElement("button");u.className="ppmna-reset-css pp-smartButtonWrapper pp-button";const p=function(e){return"red"===e?y:S}(null==t?void 0:t.theme),m=(null==(a=null==(n=null==e?void 0:e.data)?void 0:n.cashbackInfo)?void 0:a.length)?"pp-cashback":"",v=t.isShortText?"pp-shortText":"",f=null!=(o=null==t?void 0:t.buttonSize)?o:"lg",I=null!=(i=null==t?void 0:t.theme)?i:"light",E=document.createElement("a");E.className=`pp-smartBtn pp-${I} pp-${f} pp-${C(t.type)} pp-${e.preferredLanguage} ${m} ${v}`,E.href=C(t.url);const g=document.createElement("span");g.className="pp-leftSection";const A=document.createElement("img");A.className="pp-img",A.src=p,A.alt="",g.appendChild(A);const _=document.createElement("span");_.className="pp-btnContent";const h=document.createElement("span");h.className="pp-title",h.innerText=null==(l=null==e?void 0:e.data)?void 0:l.title,_.appendChild(h),g.appendChild(_),E.append(g);const T=document.createElement("span");(null==(r=null==e?void 0:e.data)?void 0:r.cashbackInfo)&&(T.className="pp-cashbackInfo",T.innerText=null==(c=null==e?void 0:e.data)?void 0:c.cashbackInfo,_.append(T));if(e.data.avatarUrl){const t=document.createElement("img");t.className="pp-userProfile",t.src=e.data.avatarUrl,t.addEventListener("error",(function(e){var t;const n=e.target;null==(t=null==n?void 0:n.parentNode)||t.removeChild(n)})),E.append(t)}u.append(E),d&&(d.innerHTML="",d.appendChild(u),"pay"===t.type&&(null==e?void 0:e.isLoggedIn)&&u.addEventListener("click",(e=>{var n;e.preventDefault(),(null==t?void 0:t.callback)?null==(n=null==t?void 0:t.callback)||n.call(t):t.orderInfo&&Q(s,!0,t,{...t.orderInfo})})))}(u,e),"pay"===d.type&&(null==u?void 0:u.isJustLoggedIn)&&e.autoInvoke&&(null==u?void 0:u.isLoggedIn)&&Q(s,!0,e,{...e.orderInfo})),t.data.result===i&&(U(t.data.messageId),removeEventListener("message",o))};addEventListener("message",o),W({name:r,params:e,messageId:n})},scanCode:function(e){var t;const n={...e,redirectUrlOnCancel:null!=(t=null==e?void 0:e.redirectUrlOnCancel)?t:window.location.href};Q(u,!1,e,n)},copyToClipboard:function(e){var t,n,a;const o=document.createElement("textarea");o.setAttribute("readonly","true"),o.setAttribute("contenteditable","true"),o.value=e.value,document.body.appendChild(o),o.select(),o.setSelectionRange(0,o.value.length);const i=document.execCommand("copy");document.body.removeChild(o),i?null==(t=null==e?void 0:e.success)||t.call(e):null==(n=null==e?void 0:e.fail)||n.call(e,{errorCode:b.other}),null==(a=e.complete)||a.call(e)},getSessionData:function(e){var t,n;const a=sessionStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=a?a:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setSessionData:function(e){var t,n,a;sessionStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(a=null==e?void 0:e.complete)||a.call(e)},getStorageData:function(e){var t,n;const a=localStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=a?a:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setStorageData:function(e){var t,n,a;localStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(a=null==e?void 0:e.complete)||a.call(e)},removeStorageData:function(e){var t,n;localStorage.removeItem(null==e?void 0:e.key),null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},getKycPassportInfo:function(e){const t=new URL(window.location.href);Q(v,!1,e,{...e,url:t})},getAuthStatus:function(e){const t=window.location.href;Q(p,!1,e,{...e,url:t})}},{get(e,t){const n=t;if(!q&&!function(e){return T.includes(e)}(n))throw new Error(`${n} is not supported by Mini Apps JS SDK`);return Object.prototype.hasOwnProperty.call(e,t)?e[t]:e=>{Q(t,!1,e,e)}}});return async function(){const e=window._ppcs;if(e){window._ppcs=void 0;for(const[t,n]of e)"init"===t?await new Promise((e=>{G[t]({...n,complete:()=>{var t;e(!0),null==(t=n.complete)||t.call(n)}})})).catch((()=>!1)):G[t](n)}}(),G}();
2
+ var pp=function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var t=function t(n,o){function r(t,r,a){if("undefined"!=typeof document){"number"==typeof(a=e({},o,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var s in a)a[s]&&(i+="; "+s,!0!==a[s]&&(i+="="+a[s].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+i}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var a=t[r].split("="),i=a.slice(1).join("=");try{var s=decodeURIComponent(a[0]);if(o[s]=n.read(i,s),e===s)break}catch(c){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),n=(e=>(e.accessToken="ppjssdk.accessToken",e.refreshToken="ppjssdk.refreshToken",e.env="ppjssdk.env",e.deviceUUID="ppjssdk.deviceUUID",e.clientUUID="ppjssdk.clientUUID",e.lastPayment="ppjssdk.lastPayment",e.lastTopup="ppjssdk.lastTopup",e.appDetail="ppjssdk.appDetail",e.appConfig="ppjssdk.appConfig",e.userInfo="ppjssdk.userInfo",e.lastPaymentMethod="ppjssdk.lastPaymentMethod",e.lastTopupPayMethod="ppjssdk.lastTopupPayMethod",e.codeVerifier="ppjssdk.codeVerifier",e.clientOrigin="ppjssdk.clientOrigin",e.clientVersion="ppjssdk.clientVersion",e.debugMode="ppjssdk.debugMode",e.claimCouponImmediately="ppjssdk.claimCouponImmediately",e.merchant="ppjssdk.merchant",e.consumedOTT="ppjssdk.consumedOTT",e))(n||{});const o={success:"success",fail:"fail",complete:"complete"},r={init:"init",getBankInfo:"getBankInfo",showAlert:"showAlert",render:"render",makePayment:"makePayment",getUAID:"getUAID",logout:"logout",startMultiFactorAuth:"startMultiFactorAuth",verifyMultiFactorAuthResult:"verifyMultiFactorAuthResult",getPermissionStatus:"getPermissionStatus",registerKyc:"registerKyc",getKycInformation:"getKycInformation",getUserAddress:"getUserAddress",getUserLocation:"getUserLocation",getUserProfile:"getUserProfile",registerEmail:"registerEmail",showUpdateWarning:"showUpdateWarning",showErrorSheet:"showErrorSheet",getPlatformInformation:"getPlatformInformation",share:"share",setTitle:"setTitle",getTopBarHeight:"getTopBarHeight",openWebview:"openWebview",openMap:"openMap",closeApp:"closeApp",openApp:"openApp",checkPaymentMethod:"checkPaymentMethod",getBalance:"getBalance",topup:"topup",registerPaymentFeatures:"registerPaymentFeatures",registerUserInfo:"registerUserInfo",requestInternal:"requestInternal",scanCode:"scanCode",getAuthStatus:"getAuthStatus",openMiniApp:"openMiniApp",inputAddress:"inputAddress",checkAccessToken:"checkAccessToken",getCashbackInformation:"getCashbackInformation",request:"request",getDeviceInformation:"getDeviceInformation",debug:"debug",copyToClipboard:"copyToClipboard",createOrder:"createOrder",handleMessageFromNative:"handleMessageFromNative",initKycPassport:"initKycPassport",smsAuth:"smsAuth",getKycPassportInfo:"getKycPassportInfo",renderCoupons:"renderCoupons"},a="reload",i="link",s="saveRefreshToken",c="saveCodeVerifier",l="makeVisible",d="consoleDebugInfo",u="_PayPayJsBridge",p=["init","openWebview","openMap","closeApp","makePayment","topup","setSessionData","getSessionData","setStorageData","getStorageData","removeStorageData","getPermissionStatus","scanCode","showAlert","showErrorSheet","getTopBarHeight","setTitle","showUpdateWarning","getPlatformInformation","openApp","share","getKycInformation","getUserLocation","checkPaymentMethod","registerKyc","startMultiFactorAuth","verifyMultiFactorAuthResult","getBankInfo","logout","getUserProfile","getBalance","getUserAddress","getUAID","copyToClipboard","registerUserInfo","setEnablePullDownRefresh","registerEmail","checkAccessToken","debug","inputAddress","getDeviceInformation","openMiniApp","request","requestInternal","registerPaymentFeatures","initKycPassport","getKycPassportInfo","shortcutExists","addShortcut","logAppsFlyerEvent","getAllUserAddresses","getUserPaymentFeatureSettings"];function m(e){return"https://image.paypay.ne.jp/miniapps/mini-app-sdk/"+e}const g=m("icon-paypay-rec.svg"),f=m("icon-paypay-rec-white.svg");!function(){try{return localStorage.getItem("ppjssdk.canWriteToLocalStorage"),!0}catch(e){return console.log(e),!1}}();var h=(e=>(e.success="SUCCESS",e.invalidUrl="INVALID_URL",e.invalidData="INVALID_DATA",e.invalidHeader="INVALID_HEADER",e.invalidMethod="INVALID_METHOD",e.invalidPath="INVALID_PATH",e.notReachable="NOT_REACHABLE",e.notAvailable="NOT_AVAILABLE",e.timeOut="TIME_OUT",e.whiteListError="NONE_WHITELIST_DOMAIN",e.statusCodeError="STATUS_CODE_ERROR",e.invalidResponse="INVALID_RESPONSE",e.noLocationPermission="NO_USER_LOCATION_PERMISSION",e.noPermissionListAvailable="NO_PERMISSION_LIST_AVAILABLE",e.other="other",e.serverError="SERVER_ERROR",e.noCameraPermission="HOST_APP_CAMERA_DENIED",e.noAlbumPermission="HOST_APP_ALBUM_DENIED",e.insufficientScope="INSUFFICIENT_SCOPE",e.userCanceled="USER_CANCELED",e.invalidJSAPIParams="INVALID_JS_API_PARAMS",e.hostAppLocationDenied="HOST_APP_LOCATION_DENIED",e.hostAppContactsDenied="HOST_APP_READING_CONTACT_DENIED",e.badRequestInsufficientParameter="BAD_REQUEST_INSUFFICIENT_PARAMETER",e.badRequest="BAD_REQUEST",e.paymentFail="PAYMENT_FAIL",e.topupFail="TOPUP_FAIL",e.topupSuccessButNotAddToBalance="TOPUP_SUCCESS_BUT_NOT_ADD_TO_BALANCE",e.userCanceledSimilarTxn="USER_CANCELED_SIMILAR_TRANSACTION",e.mapAppNotFound="MAP_APP_NOT_FOUND",e.invalidAppSchemeURL="INVALID_APP_SCHEME_URL",e.noValueFound="NO_VALUE_FOUND",e.securityNotSetup="SECURITY_NOT_SETUP",e.userDenied="USER_DENIED",e.securityTemporaryLocked="SECURITY_TEMPORARY_LOCKED",e.couldNotGenerateBarcode="COULD_NOT_GENERATE_BARCODE",e.cannotDetectAvailability="CAN_NOT_DETECT_AVAILABILITY",e.suspectedDuplicatePayment="SUSPECTED_DUPLICATE_PAYMENT",e.noSufficientFund="NO_SUFFICIENT_FUND",e.unknown="UNKNOWN",e.sdkNotInitialized="SDK_NOT_INITIALIZED",e.tokenNotFound="TOKEN_NOT_FOUND",e.tokenExpired="TOKEN_EXPIRED",e.activeRequestExists="ACTIVE_REQUEST_EXISTS",e.invalidType="INVALID_TYPE",e.sessionNotFound="SESSION_NOT_FOUND",e.cookieError="COOKIE_ERROR",e.notAuthorized="NOT_AUTHORIZED",e.permissionRequired="PERMISSION_REQUIRED",e.deeplinkUnavailable="DEEPLINK_UNAVAILABLE",e.kycIncompleted="KYC_INCOMPLETED",e.noBankAccount="NO_BANK_ACCOUNT",e.invalidPaymentIdentifier="INVALID_PAYMENT_IDENTIFIER",e.otpSendTooShort="OTP_SEND_TOO_SHORT",e.otpSendOverLimit="OTP_SEND_OVER_LIMIT",e.userVerificationFailure="USER_VERIFICATION_FAILURE",e.unacceptableOp="UNACCEPTABLE_OP",e.kycUpdateRequired="KYC_UPDATE_REQUIRED",e.notCompleted="NOT_COMPLETED",e.kycValidationInProcess="KYC_VALIDATION_IN_PROCESS",e.noLocationData="NO_LOCATION_DATA",e))(h||{});const v=["ab.ca","ac.ac","ac.ae","ac.at","ac.be","ac.cn","ac.il","ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.sg","ad.jp","adm.br","adv.br","ah.cn","am.br","arq.br","art.br","arts.ro","asn.au","asso.fr","asso.mc","bc.ca","bio.br","biz.pl","biz.tr","bj.cn","bel.tr","br.com","cn.com","cng.br","cnt.br","co.ac","co.at","co.de","co.gl","co.hk","co.id","co.il","co.in","co.jp","co.kr","co.mg","co.ms","co.nz","co.th","cp.tz","co.uk","co.ve","co.vi","co.za","com.ag","com.ai","com.ar","com.au","com.br","com.co","com.cn","com.cy","com.de","com.do","com.ec","com.es","com.fj","com.fr","com.gl","com.gt","com.hk","com.hr","com.hu","com.kg","com.ki","com.lc","com.mg","com.mm","com.ms","com.mt","com.mu","com.mx","com.my","com.na","com.nf","com.ng","com.ni","com.pa","com.ph","com.pl","com.pt","com.qa","com.ro","com.ru","com.sb","com.sc","com.sg","com.sv","com.tr","com.tw","com.ua","com.uy","com.ve","com.vn","cq.cn","de.com","de.org","ecn.br","ed.jp","edu.au","edu.cn","edu.hk","edu.mm","edu.my","edu.pl","edu.pt","edu.qa","edu.sg","edu.tr","edu.tw","eng.br","ernet.in","esp.br","etc.br","eti.br","eu.com","eu.int","eu.lv","firm.in","firm.ro","fm.br","fot.br","fst.br","g12.br","gb.com","gb.net","gd.cn","gen.in","go.jp","go.kr","go.th","gov.au","gov.az","gov.br","gov.cn","gov.il","gov.in","gov.mm","gov.my","gov.qa","gov.sg","gov.tr","gov.tw","gov.uk","govt.nz","gr.jp","gs.cn","gv.ac","gv.at","gx.cn","gz.cn","he.cn","hi.cn","hk.cn","hl.cn","hu.com","id.au","idv.tw","in.ua","in.th","ind.br","ind.in","inf.br","info.pl","info.ro","info.tr","info.ve","iwi.nz","jl.cn","jor.br","js.cn","jus.br","k12.il","k12.tr","kr.com","lel.br","lg.jp","ln.cn","ltd.uk","mb.ca","me.uk","med.br","mi.th","mil.br","mil.uk","mo.cn","mod.uk","muni.il","nb.ca","ne.jp","ne.kr","net.ag","net.ai","net.au","net.br","net.cn","net.do","net.gl","net.hk","net.il","net.in","net.kg","net.ki","net.lc","net.mg","net.mm","net.mu","net.ni","net.nz","net.pl","net.ru","net.sb","net.sc","net.sg","net.th","net.tr","net.tw","net.uk","net.ve","nf.ca","nhs.uk","nm.cn","nm.kr","no.com","nom.br","nom.ni","nom.ro","ns.ca","nt.ca","nt.ro","ntr.br","nx.cn","odo.br","off.ai","on.ca","or.ac","or.at","or.jp","or.kr","or.th","org.ag","org.ai","org.au","org.br","org.cn","org.do","org.es","org.gl","org.hk","org.in","org.kg","org.ki","org.lc","org.mg","org.mm","org.ms","org.nf","org.ng","org.ni","org.nz","org.pl","org.ro","org.ru","org.sb","org.sc","org.sg","org.tr","org.tw","org.uk","org.ve","pe.ca","plc.uk","ppg.br","pro.br","psc.br","psi.br","qc.ca","qc.com","qh.cn","rec.br","rec.ro","res.in","sa.com","sc.cn","sch.uk","se.com","se.net","sh.cn","sk.ca","slg.br","sn.cn","store.ro","tj.cn","tm.fr","tm.mc","tm.ro","tmp.br","tur.br","tv.br","tv.tr","tw.cn","uk.com","uk.net","us.com","uy.com","vet.br","waw.pl","web.ve","www.ro","xj.cn","xz.cn","yk.ca","yn.cn","zj.cn","zlg.br"];function I(e,t){return e?function(e){const t=e.split(".");if(function(e){return/(^\s*(((\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]))\s*$)/.test(e)}(n=e)||function(e){return/(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$)/.test(e)}(n)||t.length<=2)return e;var n;const o=t.slice(t.length-2).join(".");return v.includes(o)&&t.length>=3?t.slice(t.length-3).join("."):t.slice(t.length-2).join(".")}(t):t}function E(){return Math.random().toString(36).substring(7)}const A="2.11.0",y=new URL("https://mini-app-sdk-core.paypay.ne.jp/"),w=y.origin,k=new URL(`./iframe.html?v=${A}`,y).href,T=new URL(`./coupon/iframe.html?v=${A}`,y).href;function b(e){return e===w}function _(e){return e?String(e):""}function S(e,n){t.remove(e),t.remove(e,{domain:n})}let C=[];function N(e){C=C.filter((t=>t!==e))}function D(){const e=E();return C.push(e),e}class P extends Error{constructor(e,t){super(e),this.payload=t}}function O(e,t,n,o){return function(r={}){const a=n(),i=null==o?void 0:o(r);a.logEvent({event_action:`pp_${e}_called`,...i}),t(r).then((t=>{var n;a.logEvent({event_action:`pp_${e}_success`,...i}),null==(n=r.success)||n.call(r,t)})).catch((t=>{var n;console.error(t.message),a.logEvent({event_action:`pp_${e}_fail`,error_value:t.payload.errorCode,...i}),null==(n=r.fail)||n.call(r,t.payload)})).finally((()=>{var e;null==(e=r.complete)||e.call(r)}))}}class R{constructor(e,t){this.deferredCallbacks={},this.functions=e,this.allowedOrigins=t,this.subscribeToMessageEvent()}subscribeToMessageEvent(){window.addEventListener("message",(e=>{var t;if(null==(t=e.data)?void 0:t.forWindowBridge)return this.allowedOrigins&&!this.allowedOrigins.includes(e.origin)?this.sendErrorResponse(e,"originNotAllowed",`${e.origin} is not allowed to make requests`):void("request"===e.data.type?this.handleRequest(e):"response"===e.data.type&&this.handleResponse(e))}))}async handleRequest(e){const t=this.functions[e.data.functionName];t||this.sendErrorResponse(e,"functionNotFound");try{this.sendSuccessResponse(e,await t(...e.data.params))}catch(n){this.sendErrorResponse(e,"runTimeError",n.message)}}handleResponse(e){if(!this.deferredCallbacks[e.data.key])return void console.warn(`Callback for ${e.data.functionName} not found`);const[t,n]=this.deferredCallbacks[e.data.key];delete this.deferredCallbacks[e.data.key],"success"===e.data.status?t(e.data.result):n({code:e.data.code,message:e.data.message})}sendErrorResponse(e,t,n){this.sendResponse(e,{status:"failure",code:t,message:n})}sendSuccessResponse(e,t){this.sendResponse(e,{status:"success",result:t})}sendResponse(e,t){var n;null==(n=e.source)||n.postMessage({forWindowBridge:!0,type:"response",key:e.data.key,functionName:e.data.functionName,...t},e.origin)}static init(e,t){if(this._instance)throw new Error("WindowBridge already initialized, you can't call WindowBridge.init twice");return this._instance=new this(e,t),this._instance}static getBridge(){if(!this._instance)throw new Error("WindowBridge not initialized, please call WindowBridge.init before calling WindowBridge.getBridge");return this._instance}static getTargetWindowFunctionProxy(e,t){return R.getBridge().getTargetWindowFunctionProxy(e,t)}getTargetWindowFunctionProxy(e,t){return new Proxy(this,{get:(n,o)=>(...r)=>new Promise((async(a,i)=>{const s=o.toString(),c=`${s}--${E()}`;try{const o=await e();if(!o)throw new Error("Target window is undefined");o.postMessage({forWindowBridge:!0,type:"request",functionName:s,key:c,params:r},t),n.deferredCallbacks[c]=[a,i]}catch(l){i({code:"messageSendingFailed",message:l.message})}}))})}}var U=(e=>(e.validToken="TOKEN_VALID",e.initialized="INITIALIZED",e.emailRegistered="EMAIL_REGISTERED",e.emailNotVerified="EMAIL_NOT_VERIFIED",e.success="SUCCESS",e.loggedOut="LOGGED_OUT",e.connected="CONNECTED",e))(U||{});const L="ppmna-iframe",F="ppsdk-container";let M,j;function B(){return M||(M=function(){const e=document.createElement("div");return document.createElement("div"),e.setAttribute("id",F),e.setAttribute("class",F),e.style.all="initial",e.style.display="none",e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.top="0",e.style.left="0",e.style.zIndex="2147483637",document.body.appendChild(e),e}()),M}function x(e){B().style.display=e?"initial":"none"}function V(){return j||(j=new Promise(((e,t)=>{const n=document.createElement("iframe");n.setAttribute("src",k),n.setAttribute("name",L),n.setAttribute("id",L),n.setAttribute("class",L),n.setAttribute("allow","geolocation"),n.onload=()=>{e(n)},n.onerror=t,n.style.all="initial",n.style.width="100%",n.style.height="100%",n.style.border="none";const o=B();o.innerHTML="",o.append(n)}))),j}const W=R.init({});let $,K=!1;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{V()})):V();const q=W.getTargetWindowFunctionProxy((function(){return V().then((e=>null==e?void 0:e.contentWindow)).catch((()=>null))}),w);function z(){return q}function H(e){const o=new URL(window.location.href),a=o.searchParams.get("token"),i=o.searchParams.get("one_time_token"),s=t.get(n.refreshToken)||"",c=t.get(n.codeVerifier)||"";K=!!e.useAllFunctions,(a||i)&&function(e){e.searchParams.delete("token"),e.searchParams.delete("one_time_token"),e.search=e.searchParams.toString();const t=e.toString().replace(e.origin,"");history.replaceState(null,"",t)}(o);const l={env:e.env,mode:e.mode,debugMode:e.debugMode,clientId:e.clientId,token:a,ott:i,refreshToken:s,clientVersion:"2.11.0",codeVerifier:c};let d;$=new Promise((e=>d=e));const u=()=>{var t;d(!0),null==(t=e.complete)||t.call(e)};V().then((()=>{Z(r.init,!1,{...e,complete:u},l)})).catch((()=>{var t;null==(t=e.fail)||t.call(e,{errorCode:h.sdkNotInitialized}),u()}))}addEventListener("message",(e=>{var o;if(!(null==(o=e.data)?void 0:o.forWindowBridge)&&b(e.origin))if(e.data.name===a&&window.location.reload(),e.data.name!==l){if(e.data.name===i){const t=e.data.data;"_blank"===t.target?window.open(t.url,"_blank"):window.location.href=t.url}if(e.data.name===s){const{refreshToken:o,domain:r,isSecure:a}=e.data.data;!function(e,o,r){S(n.refreshToken,o),t.set(n.refreshToken,e,{domain:o,expires:90,secure:r})}(o,r,a)}if(e.data.name===c){const{codeVerifier:o,domain:r,isSecure:a}=e.data.data;!function(e,o,r){S(n.codeVerifier,o),t.set(n.codeVerifier,e,{domain:o,secure:r})}(o,r,a)}if(e.data.name===d){const{params:t}=e.data.data;!function(e){console.debug(...e)}(t)}}else x(!0)}));const Y=O("renderCoupons",(async e=>{const{merchant:t,couponId:n,containerId:o,postLoginRedirectUrl:r=window.location.href,postLoginRedirectType:a,locale:i}=e,s=document.getElementById(o);if(!s)throw new P("Invalid coupon container Id",{errorCode:h.badRequestInsufficientParameter});const c=await q.fetchCoupons({merchantId:t,couponId:n,postLoginRedirectUrl:r,postLoginRedirectType:a}).catch((()=>{throw new P(`An error occurred while fetching coupons, merchantId=${t} and couponId=${n}`,{errorCode:h.unknown})}));if(0===c.length)throw new P(`No coupon found for merchantId=${t} and couponId=${n}`,{errorCode:h.notAvailable});const l=c[0],d=(new Date).getTime();if(new Date(l.liveStartDate).getTime()>d)throw new P("Coupon is not live yet",{errorCode:h.invalidData});if(new Date(l.liveEndDate).getTime()<d)throw new P("Coupon has expired",{errorCode:h.invalidData});if("SCHEDULED"!==l.status)throw new P(`Coupon status is ${l.status} that is not valid`,{errorCode:h.invalidData});try{const e=document.createElement("iframe");e.src=T,e.style.cssText="width:100%;height: 0;border: none;transition: height 300ms ease-in;display: block;",await new Promise(((t,n)=>{e.onload=()=>t(!0),e.onerror=()=>n(!1),s.innerHTML="",s.append(e)})),e.onload=null,e.onerror=null,window.addEventListener("message",(({data:t,source:n})=>{"update-iframe-height"===(null==t?void 0:t.eventName)&&e.contentWindow===n&&(e.style.height=`${t.height}px`)}));const n=W.getTargetWindowFunctionProxy((()=>e.contentWindow),w);await n.renderCoupons({coupons:c,merchantId:t,locale:i})}catch(u){throw new P(`An error ocurred while displaying coupons, merchantId=${t}, couponId=${n}, error=${u}`,{errorCode:h.unknown})}}),z,(e=>({event_label_suffix:e.merchant,event_label2:e.couponId})));const J=O("logout",(async()=>{try{const e=I(await q.logout(),window.location.hostname);return S(n.refreshToken,e),S(n.codeVerifier,e),{statusCode:U.loggedOut}}catch(e){throw new P(`An error ocurred while trying to logout the user, error=${e}`,{errorCode:h.unknown})}}),z);function G(e,t,n){var r,a,i;e.result===o.fail&&(null==(r=null==t?void 0:t.fail)||r.call(t,e.data)),e.result===o.success&&(null==(a=null==t?void 0:t.success)||a.call(t,null==e?void 0:e.data)),e.result===o.complete&&(null==(i=null==t?void 0:t.complete)||i.call(t),removeEventListener("message",n),N(e.messageId),C.length>0||x(!1))}async function Q(e){var t;const n=await V().catch((()=>{}));null==(t=null==n?void 0:n.contentWindow)||t.postMessage(JSON.parse(JSON.stringify(e)),w)}function Z(e,t,n,o){const r=D();t&&x(!0);const a=t=>{b(t.origin)&&t.data.name===e&&t.data.messageId===r&&G(t.data,n,a)};addEventListener("message",a),Q({name:e,params:o,messageId:r})}!function(e){const t=window;(!t.hasOwnProperty(u)||t[u]!==e)&&(t[u]=e)}({_handleMessageFromNative:e=>{V().then((t=>{var n;null==(n=null==t?void 0:t.contentWindow)||n.postMessage(JSON.parse(JSON.stringify({name:r.handleMessageFromNative,params:{json:e}})),w)}))}});const X=["init","setTitle","copyToClipboard","getSessionData","setSessionData","getStorageData","setStorageData","removeStorageData"],ee=["renderCoupons"],te=new Proxy({init:H,verifyMultiFactorAuthResult:function(e){const t=new URL(window.location.href);Z(r.verifyMultiFactorAuthResult,!1,e,{...e,sessionId:t.searchParams.get("ppSessionId")})},share:function(e){if(!(null==navigator?void 0:navigator.share))return void Z(r.share,!1,e,e);const t={text:null==e?void 0:e.text};navigator.share(t).then((()=>{var t,n;null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)})).catch((()=>{var t,n;null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:h.unknown}),null==(n=null==e?void 0:e.complete)||n.call(e)}))},setTitle:function(e){var t,n;document.title=(null==e?void 0:e.title)||"",null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},render:function(e){var t;if(!(null==e?void 0:e.containerId)||!document.getElementById(null==e?void 0:e.containerId))return null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:h.badRequestInsufficientParameter}),console.error("Invalid container Id");const n=D(),a=t=>{var i,s;if(!b(t.origin)||t.data.name!==r.render||t.data.messageId!==n)return;const c=null==(i=t.data)?void 0:i.data,l=null==(s=t.data)?void 0:s.data;t.data.result===o.success&&(!function(e,t){var n,o,a,i,s;const c=document.getElementById(t.containerId),l=document.createElement("button");l.className="ppmna-reset-css pp-smartButtonWrapper pp-button";const d=function(e){return"red"===e?f:g}(null==t?void 0:t.theme),u=(null==(o=null==(n=null==e?void 0:e.data)?void 0:n.cashbackInfo)?void 0:o.length)?"pp-cashback":"",p=t.isShortText?"pp-shortText":"",m=(null==t?void 0:t.buttonSize)??"lg",h=(null==t?void 0:t.theme)??"light",v=document.createElement("a");v.className=`pp-smartBtn pp-${h} pp-${m} pp-${_(t.type)} pp-${e.preferredLanguage} ${u} ${p}`,v.href=_(e.data.loginUrl);const I=document.createElement("span");I.className="pp-leftSection";const E=document.createElement("img");E.className="pp-img",E.src=d,E.alt="",I.appendChild(E);const A=document.createElement("span");A.className="pp-btnContent";const y=document.createElement("span");y.className="pp-title",y.innerText=null==(a=null==e?void 0:e.data)?void 0:a.title,A.appendChild(y),I.appendChild(A),v.append(I);const w=document.createElement("span");(null==(i=null==e?void 0:e.data)?void 0:i.cashbackInfo)&&(w.className="pp-cashbackInfo",w.innerText=null==(s=null==e?void 0:e.data)?void 0:s.cashbackInfo,A.append(w));if(e.data.avatarUrl){const t=document.createElement("img");t.className="pp-userProfile",t.src=e.data.avatarUrl,t.addEventListener("error",(function(e){var t;const n=e.target;null==(t=null==n?void 0:n.parentNode)||t.removeChild(n)})),v.append(t)}l.append(v),c&&(c.innerHTML="",c.appendChild(l),"pay"===t.type&&(null==e?void 0:e.isLoggedIn)&&l.addEventListener("click",(e=>{var n;e.preventDefault(),(null==t?void 0:t.callback)?null==(n=null==t?void 0:t.callback)||n.call(t):t.orderInfo&&Z(r.makePayment,!0,t,{...t.orderInfo})})))}(l,e),"pay"===c.type&&(null==l?void 0:l.isJustLoggedIn)&&e.autoInvoke&&(null==l?void 0:l.isLoggedIn)&&Z(r.makePayment,!0,e,{...e.orderInfo})),t.data.result===o.complete&&(N(t.data.messageId),removeEventListener("message",a))};addEventListener("message",a),Q({name:r.render,params:{...e,redirectUrl:e.redirectUrl||window.location.href},messageId:n})},renderCoupons:Y,scanCode:function(e){const t={...e,redirectUrlOnCancel:(null==e?void 0:e.redirectUrlOnCancel)??window.location.href};Z(r.scanCode,!1,e,t)},copyToClipboard:function(e){var t,n,o;const r=document.createElement("textarea");r.setAttribute("readonly","true"),r.setAttribute("contenteditable","true"),r.value=e.value,document.body.appendChild(r),r.select(),r.setSelectionRange(0,r.value.length);const a=document.execCommand("copy");document.body.removeChild(r),a?null==(t=null==e?void 0:e.success)||t.call(e):null==(n=null==e?void 0:e.fail)||n.call(e,{errorCode:h.other}),null==(o=e.complete)||o.call(e)},getSessionData:function(e){var t,n;const o=sessionStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:o??""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setSessionData:function(e){var t,n;sessionStorage.setItem(null==e?void 0:e.key,(null==e?void 0:e.value)??""),null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},getStorageData:function(e){var t,n;const o=localStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:o??""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setStorageData:function(e){var t,n;localStorage.setItem(null==e?void 0:e.key,(null==e?void 0:e.value)??""),null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},removeStorageData:function(e){var t,n;localStorage.removeItem(null==e?void 0:e.key),null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},getKycPassportInfo:function(e){const t=new URL(window.location.href);Z(r.getKycPassportInfo,!1,e,{...e,url:t})},getAuthStatus:function(e){const t=window.location.href;Z(r.getAuthStatus,!1,e,{...e,url:t})},logout:J},{get(e,t){const n=t;if(!K&&!function(e){return p.includes(e)}(n))throw new Error(`${n} is not supported by Mini Apps JS SDK`);return async o=>{var r,a;if(!X.includes(n)&&!(await $)){if(!ee.includes(n)||!o.clientId)return null==(r=o.fail)||r.call(o,{errorCode:h.sdkNotInitialized}),void(null==(a=o.complete)||a.call(o));H({clientId:o.clientId,env:o.env}),await $}if(Object.prototype.hasOwnProperty.call(e,n))return e[n](o);Z(t,!1,o,o)}}});return function(){const e=window._ppcs;if(e){window._ppcs=void 0;for(const[t,n]of e)te[t](n)}}(),te}();
@@ -0,0 +1,10 @@
1
+ import { PayPayJsBridgeBase } from './jsbridge-core/paypay-jsbridge';
2
+ import { JsBridge } from './jsbridge-core/jsbridge';
3
+ import { MiniAppModule } from './mini-app-api';
4
+ export declare class PayPayJsBridge extends PayPayJsBridgeBase {
5
+ }
6
+ export interface PayPayJsBridge extends MiniAppModule {
7
+ }
8
+ export declare const jsBridge: JsBridge;
9
+ export declare const pp: PayPayJsBridge;
10
+ export default pp;