Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
76 lines
3.3 KiB
TypeScript
76 lines
3.3 KiB
TypeScript
// Module ID: 14749
|
|
// Function ID: 14750
|
|
// Name: PasskeyUpsellManager
|
|
// Dependencies: [502, 1371, 14743, 1074, 7221, 7052, 4457, 1943, 4494, 6698, 14750, 2]
|
|
|
|
// Module 14749 (PasskeyUpsellManager)
|
|
import dismissible_content from "dismissible_content" /* 1943 */;
|
|
import DismissibleContentUnsafeUtils from "DismissibleContentUnsafeUtils" /* 4457 */;
|
|
import MFAUtils from "MFAUtils" /* 7052 */;
|
|
import PasskeyUpsellActionCreatorsDefault from "PasskeyUpsellActionCreators" /* 14750 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
import UserStore from "UserStore" /* 1371 */;
|
|
import WebAuthnStore from "WebAuthnStore" /* 14743 */;
|
|
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7221 */;
|
|
|
|
require = fn;
|
|
const LoginStates = fn(1074).LoginStates;
|
|
let c7 = false;
|
|
let c8 = false;
|
|
class PasskeyUpsellManager extends tmp2 {
|
|
constructor() {
|
|
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
applyArgumentsResult.actions = { POST_CONNECTION_OPEN: applyArgumentsResult.handlePasskeyUpsellShow, LOGIN_RESET: applyArgumentsResult.handleLogout, LOGIN_SUCCESS: applyArgumentsResult.handleLoginSuccess, LOGOUT: applyArgumentsResult.handleLogout };
|
|
map = new Map();
|
|
result = map.set(closure_3, applyArgumentsResult.handlePasskeyUpsellShow);
|
|
result1 = result.set(closure_4, applyArgumentsResult.handlePasskeyUpsellShow);
|
|
applyArgumentsResult.stores = result1.set(closure_5, applyArgumentsResult.handlePasskeyUpsellShow);
|
|
return applyArgumentsResult;
|
|
}
|
|
}
|
|
const prototype = PasskeyUpsellManager.prototype;
|
|
prototype["handlePasskeyUpsellShow"] = function handlePasskeyUpsellShow() {
|
|
if (c8) {
|
|
if (MFAUtils.hasWebAuthn) {
|
|
if (AuthenticationStore.getLoginStatus() === LoginStates.NONE) {
|
|
if (obj.attemptedPasswordLogin()) {
|
|
if (!tmpResult.UNSAFE_isDismissibleContentDismissed(tmp(1943).DismissibleContent.PASSWORDLESS_UPSELL)) {
|
|
if (!WebAuthnStore.hasFetchedCredentials()) {
|
|
if (!tmpResult3.isModalOpen()) {
|
|
const currentUser = UserStore.getCurrentUser();
|
|
if (tmp6) {
|
|
if (obj3.hasFetchedCredentials()) {
|
|
PasskeyUpsellActionCreatorsDefault.openPasskeyUpsell();
|
|
} else if (!c7) {
|
|
c7 = true;
|
|
const webAuthnCredentials = tmp(6698).fetchWebAuthnCredentials();
|
|
const tmpResult4 = tmp(6698);
|
|
}
|
|
}
|
|
tmp6 = undefined !== currentUser && currentUser.verified;
|
|
}
|
|
tmpResult3 = tmp(4494);
|
|
}
|
|
}
|
|
tmpResult = tmp(4457);
|
|
}
|
|
}
|
|
obj = AuthenticationStore;
|
|
}
|
|
}
|
|
};
|
|
prototype["handleLoginSuccess"] = function handleLoginSuccess() {
|
|
c8 = true;
|
|
};
|
|
prototype["handleLogout"] = function handleLogout() {
|
|
c7 = false;
|
|
c8 = false;
|
|
};
|
|
prototype["markDismissed"] = function markDismissed(USER_DISMISS) {
|
|
return DismissibleContentUnsafeUtils.UNSAFE_markDismissibleContentAsDismissed(dismissible_content.DismissibleContent.PASSWORDLESS_UPSELL, { dismissAction: USER_DISMISS, forceTrack: true });
|
|
};
|
|
const passkeyUpsellManager = new PasskeyUpsellManager();
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/webauthn/native/PasskeyUpsellManager.tsx");
|
|
|
|
export default passkeyUpsellManager;
|