@authing/react-ui-components 4.0.7 → 4.0.8-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +0,0 @@
1
- (this["webpackJsonp@authing/react-ui-components"]=this["webpackJsonp@authing/react-ui-components"]||[]).push([[0],{157:function(e,t,n){},237:function(e){e.exports=JSON.parse('{"addressLabel":"Location:","administrator":"Administrator","agreeAgreement":"I have read and accept ","alreadyHasAcc":"","appNotFound":"The application does not exist, please check if the application link is correct","appPanel":"Application panel","authApp":"Authorized application","authAppSomePermisson":"{{name}} apply to access your account information and authorize {{name}} the following permissions","authingBackendSystem":"Authing background management system","authoriztion":"Authorization","baseInfo":"Basic Information","bind":"Bind","yes":"Yes","no":"No","usernameFormatError":"Enter a valid user name","checkUserName":"The username already exists","pleaseInputOrSelectCountry":"Please input or select country","pleaseSelectDate":"Please select date","quesitons":"Help","bindEmail":"Bind Email","bindPhone":"Bind your phone number","birthdayLabel":"Birthday:","blogLabel":"Blog:","cancel":"Cancel","chooseRole":"Choose role","companyLabel":"Company:","confirm":"Confirm","unlock":"unlock","confirmLogout":"Are you sure to log out?","currentEmail":"Current Email","currentEmailVerifyCode":"Current Email Verification Code","currentPhoneNumber":"Current Phone Number","dashboard":"Console","editPic":"Edit picture","email":"Email","emailFormatError":"Enter a valid Email address ","emailLabel":"Email","enterprisePanel":"Enterprise Panel","enterprisePanelInfo":"Your enterprise applications and personally configured applications will be displayed here. Click the application icon to login.","female":"Female","genderLabel":"Gender:","guidance":{"loginApp":"Sign in to the app","loginAppStep1":"Now to experience it.","registerAcc":"Register an account","registerAccStep1":"First of all, let\'s register a new account.","registerAccStep2":"We have filled in the information for you, click register!"},"hasForgotPwd":"Forgot password?","hasLooseSaftyCode":"Lost the security code?","image":"Image","inputFourVerifyCode":"{{length}}-digit code","inputNewPhone":"Enter a new phone number","jumpAfterCount":"{{number}}s automatically redirect to login","login":"Log In","loginImmediate":"Sign In Instead","loginSuccessWelcome":"Successful login, welcome: {{name}}","logout":"Logout","logoutSuccess":"Exit successfully","man":"Male","modify":"Modify","modifyEmail":"Modify Email","modifyPhoneNumber":"Modify Mobile Phone Number","nameLabel":"Name:","newMailbox":"New Email","newMailboxVerifyCode":"New Email Verification Code","newPhone":"New Phone Number","newPhoneVerify":"New Phone Verification Code","nicknameLabel":"Display Name:","noAccYet":"","noOpenedApp":"No Available App","oldPhoneVerfiyCode":"Old Phone Verification Code","operateSuccess":"Successful operation","perfectUserInfo":"Improve user information","personalCenter":"Authing Account","phoneFormateError":"Please verify your phone number first","phoneLabel":"Phone","phoneNumber":"Phone number","picExtError":"Picture format error","picSizeLimit":"The picture cannot be larger than 5 megabytes","pleaseInputCorrectMailbox":"Enter your vaild email","pwdModifySuccess":"Password reset complete","register":"Sign Up","registerDateLabel":"Registration date:","registerImmediate":"Sign Up","registerInfoFill":"Registration information completion","resetPwd":"Reset password","retryAfterTime":"{{time}} seconds","sendVerifyCode":"Get code","submit":"Submit","sure":"Confirm","unknown":"Unknown","updateSuccess":"Update Completed","uploadFail":"{{name}} failed to upload","useRecoverCode":"Use recovery code","username":"Username","usernameLabel":"Username:","verifyCode":"Verification Code","visitPersonalAccData":"Access your personal user data","welcomeJoin":"Join {{name}}","welcomeJoinAndPerfect":"Welcome to join {{name}}, in order to have a better experience, please improve your information first","start":"Start ","problem":{"title":"Tell us your problem","noProblem":"No more questions,","goLogin":" Log in","verifyTip":"Contact information is required!","noVerify":"Unable to receive the verification code","noLogin":"Unable to log in","noRegister":"Unable to register","noAccount":"Lost Account","noResetPass":"Unable to reset password","locked":"Account is locked","other":"Other","noVerifyTip":{"tip":"If you cannot receive the mobile phone verification code, I suggest you do the following:","type1":"1. Check if your mobile phone is turned off or offline.","type2":"2. Check if your phone number has been entered correctly.","type3":"3. Check if your SMS with the verification code is blocked."},"noLoginTip":{"tip":"If you cannot receive the mobile phone verification code, I suggest you do the following:","type1":"1. Check if your username and password have been entered correctly.","type2":"2. Check if your mobile phone is turned off or offline."},"noRegisterTip":{"tip":"If you cannot register, please do the following steps to solve this issue:","type1":"1. Check if your account has been registered.","type2":"2. Check if your phone number has been entered correctly.","type3":"3. Check if your SMS with the verification code is blocked."},"noAccountTip":{"tip":"If your account is lost, please do the following steps to solve this issue:","type1":"1. Check if your username and password have been entered correctly.","type2":"2. Check if your mobile phone is turned off or offline."},"noResetPassTip":{"tip":"If your password cannot be reset, please do the following steps to solve this issue:","type1":"1. Check if your mobile phone is turned off or offline.","type2":"2. Check if your password has been entered correctly."},"otherTip":{"tip":"Other:","type1":"Please describe your problem in the following column."},"successTip":"Submitted successfully","successTipMsg":"Your information has been submitted to the application administrator. Your feedback will be processed as soon as possible. Please wait patiently.","form":{"phone":"Contact","phonePlaceholder":"Ennter your email or phone number (required)","question":"Problem","questionDescript":"Problem description","questionClip":"Problem screenshot","upload":"Upload pictures","submit":"Submit","inputConcatWays":"Please enter contact information"},"noLoginTips":"If you cannot log in, we suggest you do the following:","lockedTips":"If your account is locked, please contact the administrator to unlock it and try to log in again"},"high":"High","low":"Low","middle":"Middle","strong":"Strong","weak":"Weak","and":"and","pleaseCheckReaded":"Please check \\"I have read\\"","backLoginPage":"Back","LoginSuccess":"Login Success","unAppId":"Please pass in the App ID","welcomeDoc":"Welcome to join {{name}}, in order to have a better experience, please improve your information first","copied":"Copied","bindEmailDoc":"please enter the mailbox to bind","copy":"Copy","emailNotNull":"Email is missing","setPassword":"Set password","passwordNotNull":"Enter your password","LDAPAccountNotNull":"LDAP account cannot be empty","captchaCodeNotNull":"Enter your code","recoverCodeNotNull":"Recovery code cannot be empty","accNotNull":"Enter your account","phoneOrEmailNotNull":"Mobile phone number or email cannot be empty","inputVerifyCode":"Enter your code","SMS":"SMS Verification","EmailVerification":"Email Verification","OTPVerification":"OTP Verification","faceVerification":"Face Verification","retrievePassword":"Retrieve password","registrationSuccess":"Registration Success","repeatPasswordDoc":"The passwords you entered do not match","saveSuccess":"Save successfully","copyFailed":"Copy Failed","repeatPassword":"Please repeat the password","phoneNotNull":"Enter your phone number","networkError":"Network error, please retry","downloadTotpAppAndroid":"Android download","downloadTotpAppDocs":"Please use your mobile phone to scan the code to download the verifier","downloadTotpAppIOS":"IOS download","unBindEmaileDoc":"{{email}} has been bound to another account","bindTotp":"Bind OTP","checkEmail":"The email already exists","checkPhone":"The phone number already exists","loginFailCheck":"Reminder: Your password is wrong, you can try {{number}} times","otpText1":"To ensure access security, please go to the OTP binding page","faceText1":"Bind facial recognition","faceText2":"Hold your camera properly","faceText3":"Start","faceText4":"Try again","checkPasswordHasSpace":"No spaces","backToVerify":"Back","autoJumpToLogin":"Then it will automatically jump to the login page","backToMFA":"Return to MFA binding","bindSuccess":"Complete binding","clickTodownload":"click to download","goToLogin":"Back","mfaText1":"Scan the code to add MFA, check it on your mobile phone and enter the 6-digit security code.","noQuestions":"","noValidator":"No validator please","pleaseRecordKey":"Please record the key","timeoutLDAP":"Request timed out, LDAP configuration error","totpText1":"Please keep the recovery code properly","totpText2":"If your MFA is lost, you will need a recovery code","usePhoneOpen":"Please open Google Authenticator or Microsoft Authenticator on your phone","useRecoveryCodetips":"After successful login, we will generate a new recovery code.","passwordAgain":"Confirm password","isMissing":"{{name}} is missing","password":"Password","captchaCode":"Digit code","account":"Account","phone":"Phone number","pToLogin":"seconds later back","resetSuccess":"Reset successfully","resetSuccessMessage":"The password is reset successfully, you can continue to log in with the new password","totpCode":"Security code","welcome":"Welcome","initPasswordText":"To ensure account security, please set your new password.","unsafePasswordChangeText":"Your password does not meet the current password strength requirements. Please set a new password.","updatePsswordSuccess":"Change the password successfully, please log in again","protocolTips":"Please check the required agreement first","fullCaptchaCode":"Please fill in the complete","error4network":"Network error, please try later","removeFile":"Remove file","feedback":"Need help \uff1f","laterBackFeedbck":"Return question feedback in seconds","backFeedback":"Back to problem feedback","loginProtocolTips":"Please check the login protocol","registerProtocolTips":"Please check the registration agreement","accountLock":"The account is locked, please click the question mark below to give feedback","corsErrorMessage":"The current domain name is not in the list of allowed domain names","unknownError":"unknown mistake","corsErrorMessage2":"If you have any questions, you can <a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">refer to the document</a>","checkfail":"Recognition failure","totpGenerateCode":"Generate a new recovery code for you, please record this key safely","verifyCodeLogin":"Verify Code","phoneVerifyCode":"Phone Code","emailVerifyCode":"Email Code","phoneOrEmail":"Phone / Email","skip":"Skip","back":"Back","identityBindingAskTitle":"Choose how to connect","identityBindingAskDesc":"If you are bound to an existing account, you can directly log in to the existing account by this method next time.","identityBindingCreate":"Create a new account","identityBindingBinding":"Bind to an existing account","identityBindingTitle":"Bind existing account","identityBindingDesc":"After binding, you can log in to this account directly by this method next time","internationPhoneMessage":"Please enter a valid mobile phone number","areaCodePhone":"Area code Mobile number","timeoutAD":"Request timed out, AD misconfigured","timeout":"Request timed out, please try again later","userNameIsExists":"This username already exists!","fetchError":"Network connection failed, please try again later","i18nCheckErrorMessage":"Please enter a valid mobile phone number or valid email","verifyCodeRegister":"Verify Code","PasswordRegister":"Password","noFindEmail":"Can\'t find the email account","noFindPhone":"Can\'t find the phone account","noFindUsername":"Can\'t find the username account"}')},238:function(e){e.exports=JSON.parse('{"inputAccount":"Enter {{text}}","inputAdUsername":"Enter AD username","accBind":"Account Binding","accPwdLoginVerify":"Account login verification","autoRegister":"Enter account and password to login. If you do not have an account, we will create it automatically.","captchaCode":"Captcha","confirmSavedCode":"Please make sure you have saved the key","confirmUnbinPhont":"Are you sure to unbind the mobile phone number?","confirmUnbindEmail":"Are you sure to unbind the mailbox?","emailSent":"Mail sent successfully","findedSafetyCode":"Find the security code and verify directly","fourVerifyCode":"{{length}}-digit verification code","getBackPwd":"Reset password","inputAdPwd":"Enter AD password","inputCaptchaCode":"Digit code","inputConfirmPwd":"Enter confirm password","inputCorrectPhone":"Enter correct phone number or email address","inputEmail":"Email","inputEmailUsernamePhone":"Enter email/username/phone number","inputFourMsgVerifyCode":"Enter {{length}} digit SMS verification code","inputFourVerifyCode":"Enter {{length}}-digit verification code","inputFullMfaCode":"Enter verification code","inputLdapPwd":"LDAP Password","inputLdapUsername":"LDAP Username","inputLoginPwd":"Enter Password","inputPhone":"Phone number","inputPhoneOrEmail":"Enter Phone number or Email","inputPwdAgain":"Enter password again","inputPwdLimit":"Enter 6-20 digit password","inputRecoverCode":"Enter recovery code","inputSixCode":"Enter 6-digit security code","loginBy":"Sign in with {{name}}","mfaAfterReset":"If you do not have a recovery code, please contact the administrator","mustEqualToPwd":"Must match the password","newGenered":"A new recovery code has been generated for you","newPwdLimit":"6-20 digits new password","noEmpty":"can not be empty","otherAccLogin":"Switch Account","phoneAutoRegister":"Enter mobile phone number verification code to login. If you do not have an account, we will create it automatically.","pwdLimie":"Password length is 6-20 digits","releaseBind":"Unbind","rememberedSecret":"This key has been safely recorded","resetEmailSent":"The password reset email has been sent to the mailbox {{email}}","resetPwd":"Reset password","selfUnlock":"self unlock","selfUnlockText":"Your account has been locked, please enter the verification code and password to unlock it by yourself.","resetPwdEmail":"Resend password reset email","setPwdLimit":"Set 6-20 digit password","thridAccLogin":"Or sign in with","twoPwdNeedSame":"The two passwords must be the same","pwdLogin":"Password","verifyCodeLogin":"Phone","appScanLogin":"Mobile APP QR Code","scanLogin":"QR Code","ldapLogin":"LDAP","adLogin":"AD","emailRegister":"Email","phoneRegister":"Phone","fillPhoneEmail":"Please contact the administrator to complete the phone or email information","inputEmailCode":"Enter email verification code","inputSmsCode":"Please enter the SMS verification code","otherVerifyWay":"Other verification methods","otherLoginWay":"OR","sendingVerifyCode":"Verification code sending","verifyCodeSended":"Verification code has been sent to","clickSent":"Click send","bindEmailInfo":"You have not bound the mailbox, please enter the binding","bindPhoneInfo":"Please enter the phone number to bind","dontBindPhone":"You have not bound your phone number, please enter your phone number to bind","dontbindEmail":"You have not bound the mailbox, please enter the mailbox binding","emailError":"Email format error","inputPhoneCode":"Please enter the phone verification code","mailBinded":"The mailbox has been bound","phoneBinded":"The phone number has been bound","phoneError":"Malformed phone number","feedback":"Encounter problems","forgetPwd":"Forgot Password","inputContactWayCheap":"To facilitate the solution of your problems, please provide your contact information (required)","inputContactWayPlease":"Please fill in the contact information","problemDetail":"Please describe the specific problem you encountered and related pictures","selectYourProblem":"Please select the problem you encountered","subAccLogin":"Sub-account login","submitFailRetry":"Submission failed, please try again","inputPwd":"Password","login":{"setPwdLimit2":"At least six digits, must contain two of English, numbers and symbols","setPwdLimit3":"At least six digits, including English, numbers and symbols"},"setPwdLimit1":"Set a password of at least 6 characters","setPwdLimitMsg1":"Passwords must be at least 6 characters long","setPwdLimitMsg2":"The password must be at least 6 characters long and must contain two of English, numbers and symbols","setPwdLimitMsg3":"The password must be at least 6 digits long and must contain English, numbers and symbols at the same time","wechatmpQrcode":"WechatMp QRcode\\t","inputEmailUsername":"Please enter email or account","inputUsername":"Username","moreWays":"More Login","inputCorrectPhoneOrEmail":"Enter a valid Email or Phone number","sendCodeTimeout":"Sending failed, please try later","mediaDevicesSupport":"The current device does not support face recognition","AuthorizationCamera":"Please enable authorization first","requireError":"Unable to meet the request error","hardwareSupport":"Hardware does not support","checkPreferences":"Please check preferences","qrcodeExpired":"Click to refresh","noLoginMethodsDesc":"No login method configured","inputNewPwd":"Please enter a new password","socialConnectionMessage":"Login with {{provider}} is not supported, please choose another way to log in, or try again in another browser","landrayKKScan":"Landray scan code login"}')},239:function(e){e.exports=JSON.parse('{"accPwd":"Account Password","addMfa":"Add MFA","bindFail":"Binding failed","bindFinish":"Binding completed","bindInfoFetchFail":"Binding information request failed","bindSuccess":"Bind successfully","bindedMfa":"You have successfully bound MFA","confirmModify":"Confirm","confirmUnbindMfa":"Are you sure to unbind MFA?","confrimPwd":"Confirm Password","currentPwd":"Current Password","inputCurrPwd":"Enter current password","inputNewPwd":"Enter a new Password","inputOldPwd":"Enter a old Password","inputSafteyCode":"Enter Security Code","mfaBind":"MFA Binding","modifyPwd":"Change Password","needSameWithNewPwd":"Need to be consistent with the new password","newPwd":"New Password","nextStep":"Next","numberSafteyCode":"Digital Security Code","personalInfo":"Personal Information","prevStep":"Previous","resetCodeDoWhat":"When your MFA is lost, you need to reset the code to restore account access.","saveRecoverCode":"Save recovery code","saveSecret":"Please keep the key properly","scanQrcode":"Scan QR Code","unbindFail":"Unbinding failed","unbindMfa":"Unbind MFA","unbindSuccess":"Unbind successfully","viewInputSixCode":"Check and enter 6-digit security code on your mobile phone, and proceed to the next step after completion","authenticationInfo":"Authentication Info","choosePrincipalAuthenticationType":"Choose Principal Authentication Type","choosePrincipalAuthenticationDescription":"Real name authentication will affect the ownership of account, please carry out real name authentication according to the actual situation","personalAuthentication":"Personal Authentication","personalAuthenticationDescription":"Applicable to individual users","enterpriseAuthentication":"Enterprise Authentication","enterpriseAuthenticationDescription":"It is applicable to enterprises, governments, institutions, schools, organizations","principalAuthenticationType":"Authentication type","realName":"Real Name","enterpriseName":"Enterprise Name","idCard":"Identification Number ","authenticationTime":"Authentication time","alreadyCompletedPersonalAuthentication":"Congratulations! You have completed personal real name authentication","alreadyCompletedEnterpriseAuthentication":"Congratulations! You have completed the enterprise real name certification","personal":"Personal","enterprise":"Enterprise","changeToEnterpriseAuthentication":"Change to enterprise authentication","idNumberLabel":"ID Number\uff1a","bankCardLabel":"Bank Card\uff1a","inputName":"Please enter your name","inputIdNumber":"Please enter your ID card number","inputBankCard":"Please input bank card number","enterpriseCode":"Unified Social Credit Code / Registration Number / Organization Code","legalPersonName":"Name of Enterprise Legal Person","inputEnterpriseCode":"Please input unified social credit code / registration number / organization code","inputLegalPersonName":"Please enter the corporate name","inputEnterpriseName":"Please enter the name of the enterprise","authenticationSuccess":"Authentication success","bindEmailTips":"For your account security, please bind your email.","bindImmediate":"Bind Now","binded":"Bound","configImmediate":"Set up now","currSecurityLevel":"Your current account security level:","emailBind":"Email Binding","longTimeNoModifyPwd":"Your password has not been changed for a long time, there is a security risk, it is recommended that you change it immediately","modifyImmidate":"Edit Now","noPwdDanger":"There is a hidden danger in your account, please set a password immediately.","personalMfa":"Personal MFA","personalMfaTips":"After binding your personal MFA, a second verification is required when you log in to secure your account.","phoneBind":"Phone Binding","phoneBindTips":"Bind the mobile phone number, and enable real-time notification of account security issues","pwdSecurityInfo":"A high-security password can make the account more secure. \\nIt is recommended that you change your password regularly.","pwdStrang":"Password Strength","securityLevel":"Security Level:","securityRank":"Security Level","setted":"Has been set","unBind":"Unbound","unSet":"Not set","error":"Error\uff5e","contactAdministrator":"Unknown error ~ please contact the administrator for processing","resetpasswordText1":"Enter your registered phone number/email, enter the verification code received, and we will reset your password.","pleaseDownloadAuthenticator":"Open Google Authenticator or Microsoft Authenticator on your phone and scan below QR code","modifyPwdText":"Your password has been used continuously for more than {{number}} months, which may be risky. Please reset your password.","modifyNoticePwdText":"Your password has been used continuously for more than {{number}} months, It will expire soon, in order not to affect your use, please set a new password","unlockTip":"If you encounter problems with unlocking, please click"}')},240:function(e){e.exports=JSON.parse('{"\u6ce8\u518c":"Register","\u767b\u5f55":"Login"}')},241:function(e){e.exports=JSON.parse('{"guidance":{"registerAcc":"\u6ce8\u518c\u8d26\u53f7","registerAccStep1":"\u9996\u5148\uff0c\u6211\u4eec\u6765\u6ce8\u518c\u4e00\u4e2a\u81ea\u5df1\u7684\u8d26\u53f7\u5427\uff01","registerAccStep2":"\u6211\u4eec\u5df2\u7ecf\u5e2e\u4f60\u628a\u4fe1\u606f\u586b\u597d\u4e86\uff0c\u70b9\u51fb\u6ce8\u518c\u5c31\u521b\u5efa\u6210\u529f\u4e86\uff01","loginApp":"\u767b\u5f55\u5e94\u7528","loginAppStep1":"\u73b0\u5728\u70b9\u51fb\u767b\u5f55\u4f53\u9a8c\u5427"},"uploadFail":"{{name}} \u4e0a\u4f20\u5931\u8d25","confirm":"\u786e\u8ba4","cancel":"\u53d6\u6d88","editPic":"\u7f16\u8f91\u56fe\u7247","picExtError":"\u56fe\u7247\u683c\u5f0f\u9519\u8bef","picSizeLimit":"\u56fe\u7247\u4e0d\u80fd\u5927\u4e8e 5 \u5146","modify":"\u4fee\u6539","image":"\u56fe\u7247","logoutSuccess":"\u9000\u51fa\u6210\u529f","confirmLogout":"\u786e\u5b9a\u9000\u51fa\u767b\u5f55\uff1f","dashboard":"\u63a7\u5236\u53f0","personalCenter":"\u4e2a\u4eba\u4e2d\u5fc3","appPanel":"\u5e94\u7528\u9762\u677f","logout":"\u9000\u51fa","updateSuccess":"\u66f4\u65b0\u6210\u529f","agreeAgreement":"\u6211\u5df2\u9605\u8bfb\u5e76\u63a5\u53d7","retryAfterTime":"{{time}} \u79d2","sendVerifyCode":"\u53d1\u9001\u9a8c\u8bc1\u7801","emailFormatError":"\u8f93\u5165\u6709\u6548\u7684\u90ae\u7bb1","usernameFormatError":"\u8f93\u5165\u6709\u6548\u7684\u7528\u6237\u540d","phoneFormateError":"\u8f93\u5165\u6709\u6548\u7684\u624b\u673a\u53f7","authoriztion":"\u6388\u6743","authApp":"\u6388\u6743\u5e94\u7528","authAppSomePermisson":"{{name}} \u7533\u8bf7\u8bbf\u95ee\u4f60\u7684\u8d26\u6237\u4fe1\u606f\uff0c\u6388\u6743 {{name}} \u4ee5\u4e0b\u6743\u9650","visitPersonalAccData":"\u8bbf\u95ee\u4f60\u7684\u4e2a\u4eba\u7528\u6237\u6570\u636e","chooseRole":"\u9009\u62e9\u89d2\u8272","administrator":"\u7ba1\u7406\u5458","authingBackendSystem":"Authing \u540e\u53f0\u7ba1\u7406\u7cfb\u7edf","username":"\u7528\u6237\u540d","appNotFound":"\u5e94\u7528\u4e0d\u5b58\u5728\uff0c\u8bf7\u68c0\u67e5\u5e94\u7528\u94fe\u63a5\u662f\u5426\u6b63\u786e","enterprisePanel":"\u4f01\u4e1a\u9762\u677f","enterprisePanelInfo":"\u4f60\u7684\u4f01\u4e1a\u5e94\u7528\u548c\u4e2a\u4eba\u914d\u7f6e\u7684\u5e94\u7528\u5c06\u5728\u6b64\u5c55\u793a\uff0c\u70b9\u51fb\u5e94\u7528\u56fe\u6807\u5373\u53ef\u81ea\u52a8\u767b\u5f55\u3002","noOpenedApp":"\u6ca1\u6709\u5df2\u5f00\u542f\u7684\u5e94\u7528","login":"\u767b\u5f55","loginSuccessWelcome":"\u767b\u5f55\u6210\u529f\uff0c\u6b22\u8fce\u4f60\uff1a{{name}}","hasForgotPwd":"\u5fd8\u8bb0\u5bc6\u7801\uff1f","noAccYet":"\u8fd8\u6ca1\u6709\u8d26\u53f7\uff0c","registerImmediate":"\u7acb\u5373\u6ce8\u518c","sure":"\u786e\u5b9a","hasLooseSaftyCode":"\u5b89\u5168\u7801\u4e22\u5931\uff1f","useRecoverCode":"\u4f7f\u7528\u6062\u590d\u4ee3\u7801","register":"\u6ce8\u518c","unlock":"\u89e3\u9501","welcomeJoin":"\u6b22\u8fce\u52a0\u5165 {{name}}","alreadyHasAcc":"\u5df2\u6709\u8d26\u53f7\uff0c","loginImmediate":"\u7acb\u5373\u767b\u5f55","registerInfoFill":"\u6ce8\u518c\u4fe1\u606f\u8865\u5168","operateSuccess":"\u64cd\u4f5c\u6210\u529f","perfectUserInfo":"\u5b8c\u5584\u7528\u6237\u4fe1\u606f","welcomeJoinAndPerfect":"\u6b22\u8fce\u52a0\u5165 {{name}} \uff0c\u4e3a\u4e86\u66f4\u597d\u7684\u4f7f\u7528\u4f53\u9a8c\uff0c\u8bf7\u5148\u5b8c\u5584\u4f60\u7684\u4e2a\u4eba\u4fe1\u606f","submit":"\u63d0\u4ea4","resetPwd":"\u91cd\u7f6e\u5bc6\u7801","jumpAfterCount":"{{number}}s \u540e\u81ea\u52a8\u8df3\u8f6c\u767b\u5f55","pwdModifySuccess":"\u5bc6\u7801\u4fee\u6539\u6210\u529f","man":"\u7537","female":"\u5973","unknown":"\u672a\u77e5","usernameLabel":"\u7528\u6237\u540d\uff1a","emailLabel":"\u90ae\u7bb1","phoneLabel":"\u624b\u673a\u53f7","nicknameLabel":"\u6635\u79f0\uff1a","nameLabel":"\u59d3\u540d\uff1a","genderLabel":"\u6027\u522b\uff1a","addressLabel":"\u6240\u5728\u5730\uff1a","companyLabel":"\u516c\u53f8\uff1a","birthdayLabel":"\u751f\u65e5\uff1a","registerDateLabel":"\u6ce8\u518c\u65e5\u671f\uff1a","pleaseSelectDate":"\u8bf7\u9009\u62e9\u65e5\u671f","blogLabel":"\u4e2a\u4eba\u535a\u5ba2\uff1a","baseInfo":"\u57fa\u672c\u4fe1\u606f","bindEmail":"\u7ed1\u5b9a\u90ae\u7bb1","email":"\u90ae\u7bb1","verifyCode":"\u9a8c\u8bc1\u7801","inputFourVerifyCode":"\u8bf7\u8f93\u5165 {{length}} \u4f4d\u9a8c\u8bc1\u7801","bindPhone":"\u7ed1\u5b9a\u624b\u673a\u53f7","phoneNumber":"\u624b\u673a\u53f7","modifyEmail":"\u4fee\u6539\u90ae\u7bb1","currentEmail":"\u5f53\u524d\u90ae\u7bb1","currentEmailVerifyCode":"\u5f53\u524d\u90ae\u7bb1\u9a8c\u8bc1\u7801","newMailbox":"\u65b0\u90ae\u7bb1","pleaseInputCorrectMailbox":"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u90ae\u7bb1","newMailboxVerifyCode":"\u65b0\u90ae\u7bb1\u9a8c\u8bc1\u7801","modifyPhoneNumber":"\u4fee\u6539\u624b\u673a\u53f7","currentPhoneNumber":"\u5f53\u524d\u624b\u673a\u53f7","oldPhoneVerfiyCode":"\u65e7\u624b\u673a\u53f7\u9a8c\u8bc1\u7801","newPhone":"\u65b0\u624b\u673a\u53f7","inputNewPhone":"\u8bf7\u8f93\u5165\u65b0\u624b\u673a\u53f7","newPhoneVerify":"\u65b0\u624b\u673a\u53f7\u9a8c\u8bc1\u7801","bind":"\u7ed1\u5b9a","quesitons":"\u9047\u5230\u95ee\u9898\uff1f","start":"\u5f00\u59cb","yes":"\u662f","no":"\u5426","pleaseInputOrSelectCountry":"\u8bf7\u8f93\u5165\u6216\u9009\u62e9\u56fd\u5bb6","problem":{"title":"\u95ee\u9898\u53cd\u9988","noProblem":"\u6ca1\u6709\u95ee\u9898\u4e86\uff0c","goLogin":"\u53bb\u767b\u5f55","verifyTip":"\u8054\u7cfb\u65b9\u5f0f\u662f\u5fc5\u586b\u9879\uff01","noVerify":"\u65e0\u6cd5\u6536\u5230\u9a8c\u8bc1\u7801","noLogin":"\u65e0\u6cd5\u767b\u5f55","noRegister":"\u65e0\u6cd5\u6ce8\u518c","noAccount":"\u5e10\u53f7\u4e22\u5931","noResetPass":"\u65e0\u6cd5\u91cd\u7f6e\u5bc6\u7801","locked":"\u8d26\u53f7\u88ab\u9501\u5b9a","other":"\u5176\u4ed6","noVerifyTip":{"tip":"\u5982\u679c\u65e0\u6cd5\u6536\u5230\u624b\u673a\u9a8c\u8bc1\u7801\uff0c\u5efa\u8bae\u4f60\u8fdb\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a","type1":"1. \u68c0\u67e5\u4f60\u7684\u624b\u673a\u662f\u5426\u505c\u673a/\u65e0\u7f51\u7edc","type2":"2. \u68c0\u67e5\u4f60\u7684\u624b\u673a\u53f7\u662f\u5426\u8f93\u5165\u6b63\u786e","type3":"3. \u68c0\u67e5\u4f60\u7684\u9a8c\u8bc1\u7801\u77ed\u4fe1\u662f\u5426\u88ab\u5c4f\u853d"},"noLoginTip":{"tip":"\u5982\u679c\u65e0\u6cd5\u6536\u5230\u624b\u673a\u9a8c\u8bc1\u7801\uff0c\u5efa\u8bae\u4f60\u8fdb\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a","type1":"1. \u68c0\u67e5\u4f60\u7684\u7528\u6237\u540d\u4e0e\u5bc6\u7801\u8f93\u5165\u662f\u5426\u6b63\u786e","type2":"2. \u68c0\u67e5\u4f60\u7684\u624b\u673a\u662f\u5426\u505c\u673a/\u65e0\u7f51\u7edc"},"noRegisterTip":{"tip":"\u5982\u679c\u65e0\u6cd5\u6ce8\u518c\uff0c\u5efa\u8bae\u4f60\u8fdb\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a","type1":"1. \u68c0\u67e5\u4f60\u7684\u5e10\u53f7\u662f\u5426\u5df2\u6ce8\u518c","type2":"2. \u68c0\u67e5\u4f60\u7684\u6ce8\u518c\u624b\u673a\u53f7\u662f\u5426\u8f93\u5165\u6b63\u786e","type3":"3. \u68c0\u67e5\u4f60\u7684\u9a8c\u8bc1\u7801\u77ed\u4fe1\u662f\u5426\u88ab\u5c4f\u853d"},"noAccountTip":{"tip":"\u5982\u679c\u5e10\u53f7\u4e22\u5931\uff0c\u5efa\u8bae\u4f60\u8fdb\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a","type1":"1. \u68c0\u67e5\u4f60\u7684\u7528\u6237\u540d\u4e0e\u5bc6\u7801\u8f93\u5165\u662f\u5426\u6b63\u786e","type2":"2. \u68c0\u67e5\u4f60\u7684\u624b\u673a\u662f\u5426\u505c\u673a/\u65e0\u7f51\u7edc"},"noResetPassTip":{"tip":"\u5982\u679c\u65e0\u6cd5\u91cd\u7f6e\u5bc6\u7801\uff0c\u5efa\u8bae\u4f60\u8fdb\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a","type1":"1. \u68c0\u67e5\u4f60\u7684\u624b\u673a\u662f\u5426\u505c\u673a/\u65e0\u7f51\u7edc","type2":"2. \u68c0\u67e5\u4f60\u7684\u8bbe\u7f6e\u7684\u5bc6\u7801\u662f\u5426\u6b63\u786e"},"otherTip":{"tip":"\u5176\u4ed6\uff1a","type1":"\u8bf7\u5728\u4e0b\u680f\u63cf\u8ff0\u4f60\u9047\u5230\u7684\u95ee\u9898"},"successTip":"\u63d0\u4ea4\u6210\u529f","successTipMsg":"\u4f60\u7684\u4fe1\u606f\u5df2\u7ecf\u63d0\u4ea4\u7ed9\u5e94\u7528\u7ba1\u7406\u5458\uff0c\u4f1a\u5c3d\u5feb\u5904\u7406\u4f60\u7684\u53cd\u9988\uff0c\u8bf7\u4f60\u8010\u5fc3\u7b49\u5f85\u3002","form":{"phone":"\u8054\u7cfb\u65b9\u5f0f","inputConcatWays":"\u8bf7\u8f93\u5165\u8054\u7cfb\u65b9\u5f0f","phonePlaceholder":"\u8bf7\u8f93\u5165\u4f60\u7684\u90ae\u7bb1\u6216\u624b\u673a\u53f7\uff08\u5fc5\u586b\uff09","question":"\u76f8\u5173\u95ee\u9898","questionDescript":"\u95ee\u9898\u63cf\u8ff0","questionClip":"\u95ee\u9898\u622a\u56fe","upload":"\u4e0a\u4f20\u56fe\u7247","submit":"\u63d0\u4ea4"},"lockedTips":"\u5982\u679c\u4f60\u7684\u8d26\u53f7\u88ab\u9501\u5b9a\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u89e3\u9501\u540e\u518d\u5c1d\u8bd5\u767b\u5f55","noLoginTips":"\u5982\u679c\u65e0\u6cd5\u767b\u5f55\uff0c\u5efa\u8bae\u4f60\u8fdb\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a"},"low":"\u4f4e","middle":"\u4e2d","high":"\u9ad8","weak":"\u5f31","strong":"\u5f3a","and":"\u548c","pleaseCheckReaded":"\u8bf7\u52fe\u9009\u201c\u6211\u5df2\u9605\u8bfb\u201d","backLoginPage":"\u8fd4\u56de\u767b\u5f55","LoginSuccess":"\u767b\u5f55\u6210\u529f","unAppId":"\u8bf7\u4f20\u5165\u5e94\u7528 ID","welcomeDoc":"\u6b22\u8fce\u52a0\u5165 {{name}} \uff0c\u4e3a\u4e86\u66f4\u597d\u7684\u4f7f\u7528\u4f53\u9a8c\uff0c\u8bf7\u5148\u5b8c\u5584\u4f60\u7684\u4e2a\u4eba\u4fe1\u606f","bindEmailDoc":"\u8bf7\u8f93\u5165\u90ae\u7bb1\u8fdb\u884c\u7ed1\u5b9a","unBindEmaileDoc":"{{email}} \u5df2\u88ab\u5176\u4ed6\u8d26\u53f7\u7ed1\u5b9a","copied":"\u5df2\u590d\u5236","copy":"\u590d\u5236","emailNotNull":"\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a","setPassword":"\u8bbe\u7f6e\u5bc6\u7801","passwordNotNull":"\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","repeatPassword":"\u8bf7\u91cd\u590d\u5bc6\u7801","repeatPasswordDoc":"\u8f93\u5165\u7684\u5bc6\u7801\u4e0d\u5339\u914d","LDAPAccountNotNull":"LDAP \u8d26\u53f7\u4e0d\u80fd\u4e3a\u7a7a","captchaCodeNotNull":"\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","recoverCodeNotNull":"\u6062\u590d\u4ee3\u7801\u4e0d\u80fd\u4e3a\u7a7a","accNotNull":"\u8d26\u53f7\u4e0d\u80fd\u4e3a\u7a7a","phoneNotNull":"\u624b\u673a\u53f7\u4e0d\u80fd\u4e3a\u7a7a","phoneOrEmailNotNull":"\u624b\u673a\u53f7\u6216\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a","inputVerifyCode":"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801","SMS":"\u77ed\u4fe1\u9a8c\u8bc1\u7801\u9a8c\u8bc1","EmailVerification":"\u7535\u5b50\u90ae\u7bb1\u9a8c\u8bc1","OTPVerification":"OTP \u53e3\u4ee4\u9a8c\u8bc1","faceVerification":"\u4eba\u8138\u8bc6\u522b\u9a8c\u8bc1","saveSuccess":"\u4fdd\u5b58\u6210\u529f","retrievePassword":"\u627e\u56de\u5bc6\u7801","registrationSuccess":"\u6ce8\u518c\u6210\u529f","copyFailed":"\u590d\u5236\u5931\u8d25","networkError":"\u7f51\u7edc\u9519\u8bef\uff0c\u8bf7\u91cd\u8bd5","downloadTotpAppIOS":"IOS \u4e0b\u8f7d","downloadTotpAppAndroid":"Android \u4e0b\u8f7d","downloadTotpAppDocs":"\u8bf7\u4f7f\u7528\u624b\u673a\u626b\u7801\u4e0b\u8f7d\u9a8c\u8bc1\u5668","bindTotp":"\u7ed1\u5b9a OTP","checkEmail":"\u8be5\u90ae\u7bb1\u5df2\u5b58\u5728","checkUserName":"\u8be5\u7528\u6237\u540d\u5df2\u5b58\u5728","checkPhone":"\u8be5\u624b\u673a\u53f7\u5df2\u5b58\u5728","loginFailCheck":"\u6e29\u99a8\u63d0\u793a\uff1a\u4f60\u7684\u5bc6\u7801\u9519\u8bef\uff0c\u8fd8\u53ef\u4ee5\u5c1d\u8bd5 {{number}} \u6b21","useRecoveryCodetips":"\u767b\u5f55\u6210\u529f\u540e\uff0c\u6211\u4eec\u5c06\u751f\u6210\u4e00\u4e2a\u65b0\u7684\u6062\u590d\u4ee3\u7801\u3002","bindSuccess":"\u5b8c\u6210\u7ed1\u5b9a","pleaseRecordKey":"\u8bf7\u8bb0\u5f55\u5bc6\u94a5","totpText1":"\u8bf7\u59a5\u5584\u4fdd\u5b58\u6062\u590d\u4ee3\u7801","totpText2":"\u5982\u679c\u4f60\u7684 MFA \u4e22\u5931\u65f6\uff0c\u4f60\u5c06\u9700\u8981\u4e00\u4e2a\u6062\u590d\u4ee3\u7801","otpText1":"\u4e3a\u4e86\u4fdd\u969c\u8bbf\u95ee\u5b89\u5168\uff0c\u8bf7\u524d\u5f80 OTP \u7ed1\u5b9a\u9875\u9762","faceText1":"\u7ed1\u5b9a\u4eba\u8138\u8bc6\u522b","faceText2":"\u8bf7\u4fdd\u6301\u6444\u50cf\u5934\u5df2\u6253\u5f00\u5e76\u65e0\u906e\u6321","faceText3":"\u5f00\u59cb\u9a8c\u8bc1","faceText4":"\u91cd\u8bd5\u4e00\u6b21","checkPasswordHasSpace":"\u4e0d\u80fd\u5305\u542b\u7a7a\u683c","backToVerify":"\u8fd4\u56de\u9a8c\u8bc1\u9875","usePhoneOpen":"\u8bf7\u5728\u624b\u673a\u6253\u5f00 Google Authenticator \u6216 Microsoft Authenticator","noValidator":"\u6ca1\u6709\u9a8c\u8bc1\u5668\u8bf7","clickTodownload":"\u70b9\u51fb\u4e0b\u8f7d","mfaText1":"\u626b\u7801\u6dfb\u52a0 OTP\uff0c\u5728\u624b\u673a\u67e5\u770b\u5e76\u8f93\u5165 6 \u4f4d\u6570\u5b57\u5b89\u5168\u7801\u3002","backToMFA":"\u8fd4\u56de MFA \u7ed1\u5b9a","timeoutLDAP":"\u8bf7\u6c42\u8d85\u65f6\uff0cLDAP \u914d\u7f6e\u9519\u8bef","noQuestions":"\u6ca1\u6709\u95ee\u9898\uff0c","goToLogin":"\u76f4\u63a5\u767b\u5f55","autoJumpToLogin":"\u540e\u5c06\u81ea\u52a8\u8df3\u8f6c\u767b\u5f55\u9875","passwordAgain":"\u8bf7\u786e\u8ba4\u5bc6\u7801","isMissing":"{{name}}\u672a\u586b\u5199","password":"\u5bc6\u7801","captchaCode":"\u9a8c\u8bc1\u7801","account":"\u8d26\u53f7","phone":"\u624b\u673a\u53f7","pToLogin":"\u79d2\u540e\u8fd4\u56de\u767b\u5f55","resetSuccess":"\u91cd\u7f6e\u6210\u529f","resetSuccessMessage":"\u5bc6\u7801\u91cd\u7f6e\u6210\u529f\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u65b0\u5bc6\u7801\u7ee7\u7eed\u767b\u5f55","totpCode":"\u5b89\u5168\u7801","welcome":"\u6b22\u8fce\u8bbf\u95ee","initPasswordText":"\u4e3a\u4e86\u4fdd\u969c\u8d26\u53f7\u5b89\u5168\uff0c\u8bf7\u8bbe\u7f6e\u4f60\u7684\u65b0\u5bc6\u7801\u3002","unsafePasswordChangeText":"\u4f60\u7684\u5bc6\u7801\u4e0d\u7b26\u5408\u5f53\u524d\u5bc6\u7801\u5f3a\u5ea6\u8981\u6c42\uff0c\u8bf7\u8bbe\u7f6e\u65b0\u5bc6\u7801\u3002","updatePsswordSuccess":"\u4fee\u6539\u5bc6\u7801\u6210\u529f\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55","protocolTips":"\u8bf7\u5148\u52fe\u9009\u6240\u9700\u534f\u8bae","fullCaptchaCode":"\u8bf7\u586b\u5199\u5b8c\u6574\u7684{{name}}","error4network":"\u7f51\u7edc\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u5c1d\u8bd5","removeFile":"\u79fb\u9664\u6587\u4ef6","feedback":"\u95ee\u9898\u53cd\u9988","backFeedback":"\u8fd4\u56de\u95ee\u9898\u53cd\u9988","laterBackFeedbck":"\u79d2\u540e\u8fd4\u56de\u95ee\u9898\u53cd\u9988","loginProtocolTips":"\u8bf7\u52fe\u9009\u767b\u5f55\u534f\u8bae","registerProtocolTips":"\u8bf7\u52fe\u9009\u6ce8\u518c\u534f\u8bae","accountLock":"\u8d26\u53f7\u88ab\u9501\u5b9a\uff0c\u8bf7\u70b9\u51fb\u4e0b\u65b9\u95ee\u53f7\u8fdb\u884c\u53cd\u9988","corsErrorMessage":"\u5f53\u524d\u57df\u540d\u4e0d\u5728\u5141\u8bb8\u8bbf\u95ee\u7684\u57df\u540d\u5217\u8868\u4e2d\u3002","corsErrorMessage2":"\u5982\u679c\u6709\u7591\u95ee\u53ef\u4ee5<a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">\u53c2\u8003\u6587\u6863</a>","unknownError":"\u672a\u77e5\u9519\u8bef","checkfail":"\u8bc6\u522b\u5931\u8d25","totpGenerateCode":"\u4e3a\u4f60\u751f\u6210\u4e00\u4e32\u65b0\u7684\u6062\u590d\u4ee3\u7801\uff0c\u8bf7\u5b89\u5168\u5730\u8bb0\u5f55\u8fd9\u6bb5\u5bc6\u94a5","verifyCodeLogin":"\u9a8c\u8bc1\u7801\u767b\u5f55","phoneVerifyCode":"\u77ed\u4fe1\u9a8c\u8bc1\u7801","emailVerifyCode":"\u90ae\u7bb1\u9a8c\u8bc1\u7801","phoneOrEmail":"\u624b\u673a\u53f7 / \u90ae\u7bb1","skip":"\u8df3\u8fc7","back":"\u8fd4\u56de","identityBindingAskTitle":"\u9009\u62e9\u5173\u8054\u65b9\u5f0f","identityBindingAskDesc":"\u5982\u679c\u7ed1\u5b9a\u5230\u5df2\u6709\u8d26\u53f7\uff0c\u4e0b\u6b21\u53ef\u4ee5\u901a\u8fc7\u672c\u6b21\u7684\u65b9\u5f0f\u76f4\u63a5\u767b\u5f55\u5df2\u6709\u8d26\u53f7","identityBindingCreate":"\u6211\u60f3\u521b\u5efa\u4e00\u4e2a\u65b0\u8d26\u53f7","identityBindingBinding":"\u6211\u60f3\u7ed1\u5b9a\u5230\u5df2\u6709\u8d26\u53f7","identityBindingTitle":"\u7ed1\u5b9a\u5df2\u6709\u8d26\u53f7","identityBindingDesc":"\u7ed1\u5b9a\u540e\uff0c\u4e0b\u6b21\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u8fd9\u6b21\u7684\u65b9\u5f0f\u767b\u5f55\u5230\u6b64\u8d26\u53f7","internationPhoneMessage":"\u8bf7\u8f93\u5165\u6240\u5728\u533a\u53f7\u5408\u6cd5\u7684\u624b\u673a\u53f7","areaCodePhone":"+\u533a\u53f7 \u624b\u673a\u53f7","timeoutAD":"\u8bf7\u6c42\u8d85\u65f6\uff0cAD \u914d\u7f6e\u9519\u8bef","timeout":"\u8bf7\u6c42\u8d85\u65f6\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5","userNameIsExists":"\u8be5\u7528\u6237\u540d\u5df2\u5b58\u5728!","fetchError":"\u7f51\u7edc\u8fde\u63a5\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5","passwordUnsafeTip":"\u5bc6\u7801\u5f3a\u5ea6\u5df2\u66f4\u65b0\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u540e\u91cd\u8bd5","i18nCheckErrorMessage":"\u8bf7\u8f93\u5165\u6240\u5728\u533a\u53f7\u5408\u6cd5\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1","verifyCodeRegister":"\u9a8c\u8bc1\u7801\u6ce8\u518c","PasswordRegister":"\u5bc6\u7801\u6ce8\u518c","noFindEmail":"\u627e\u4e0d\u5230\u8be5\u90ae\u7bb1\u8d26\u53f7","noFindPhone":"\u627e\u4e0d\u5230\u8be5\u624b\u673a\u8d26\u53f7","noFindUsername":"\u627e\u4e0d\u5230\u8be5\u7528\u6237\u540d\u8d26\u53f7"}')},242:function(e){e.exports=JSON.parse('{"inputAccount":"\u8bf7\u8f93\u5165{{text}}","inputAdUsername":"\u8bf7\u8f93\u5165 AD \u7528\u6237\u540d","inputAdPwd":"\u8bf7\u8f93\u5165 AD \u5bc6\u7801","inputLdapUsername":"\u8bf7\u8f93\u5165 LDAP \u7528\u6237\u540d","inputLdapPwd":"\u8bf7\u8f93\u5165 LDAP \u5bc6\u7801","inputCaptchaCode":"\u8bf7\u8f93\u5165\u56fe\u5f62\u9a8c\u8bc1\u7801","captchaCode":"\u56fe\u5f62\u9a8c\u8bc1\u7801","inputFullMfaCode":"\u8bf7\u8f93\u5165\u5b8c\u6574\u5b89\u5168\u7801","accPwdLoginVerify":"\u8d26\u53f7\u767b\u5f55\u9a8c\u8bc1","inputSixCode":"\u8bf7\u8f93\u5165\u83b7\u53d6\u7684 6 \u4f4d\u6570\u5b57\u5b89\u5168\u7801\u9a8c\u8bc1\u767b\u5f55","autoRegister":"\u767b\u5f55\u65f6\uff0c\u5982\u679c\u5e10\u53f7\u4e0d\u5b58\u5728\u4f1a\u81ea\u52a8\u521b\u5efa\u3002","inputEmailUsernamePhone":"\u8bf7\u8f93\u5165\u90ae\u7bb1\u3001\u7528\u6237\u540d\u6216\u624b\u673a\u53f7","inputLoginPwd":"\u8bf7\u8f93\u5165\u767b\u5f55\u5bc6\u7801","phoneAutoRegister":"\u767b\u5f55\u65f6\uff0c\u5982\u679c\u5e10\u53f7\u4e0d\u5b58\u5728\u4f1a\u81ea\u52a8\u521b\u5efa\u3002","inputPhone":"\u8bf7\u8f93\u5165\u624b\u673a\u53f7","inputFourVerifyCode":"\u8bf7\u8f93\u5165 {{length}} \u4f4d\u9a8c\u8bc1\u7801","inputEmail":"\u8bf7\u8f93\u5165\u90ae\u7bb1","inputPwdLimit":"\u8bf7\u8f93\u5165 6-20 \u4f4d\u5bc6\u7801","setPwdLimit":"\u8bbe\u7f6e 6-20 \u4f4d\u5bc6\u7801","inputConfirmPwd":"\u8bf7\u8f93\u5165\u786e\u8ba4\u5bc6\u7801","mustEqualToPwd":"\u5fc5\u987b\u548c\u5bc6\u7801\u4e00\u81f4","inputPwdAgain":"\u518d\u8f93\u5165\u4e00\u6b21\u5bc6\u7801","inputFourMsgVerifyCode":"\u8bf7\u8f93\u5165 {{length}} \u4f4d\u77ed\u4fe1\u9a8c\u8bc1\u7801","loginBy":"\u4f7f\u7528 {{name}} \u767b\u5f55","thridAccLogin":"\u7b2c\u4e09\u65b9\u8d26\u53f7\u767b\u5f55","inputRecoverCode":"\u8bf7\u8f93\u5165\u6062\u590d\u4ee3\u7801","confirmSavedCode":"\u8bf7\u786e\u4fdd\u4f60\u5df2\u4fdd\u5b58\u5bc6\u94a5","rememberedSecret":"\u5df2\u7ecf\u5b89\u5168\u5730\u8bb0\u5f55\u4e86\u8fd9\u6bb5\u5bc6\u94a5","newGenered":"\u5df2\u4e3a\u4f60\u751f\u6210\u65b0\u7684\u6062\u590d\u4ee3\u7801","mfaAfterReset":"\u5982\u679c\u4f60\u6ca1\u6709\u6062\u590d\u4ee3\u7801\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5904\u7406","findedSafetyCode":"\u627e\u5230\u5b89\u5168\u7801\u76f4\u63a5\u9a8c\u8bc1","getBackPwd":"\\b\u627e\u56de\u5bc6\u7801","noEmpty":"\u4e0d\u80fd\u4e3a\u7a7a","inputCorrectPhone":"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1","inputPhoneOrEmail":"\u8bf7\u8f93\u5165\u624b\u673a\u53f7\u6216\u90ae\u7bb1","resetPwd":"\u91cd\u7f6e\u5bc6\u7801","selfUnlock":"\u81ea\u52a9\u89e3\u9501","selfUnlockText":"\u4f60\u7684\u8d26\u53f7\u5df2\u88ab\u9501\u5b9a\uff0c\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801\u53ca\u5bc6\u7801\u81ea\u52a9\u89e3\u9501\u3002","otherAccLogin":"\u8fd4\u56de\u767b\u5f55","fourVerifyCode":"{{length}} \u4f4d\u9a8c\u8bc1\u7801","pwdLimie":"\u5bc6\u7801\u957f\u5ea6\u5728 6-20 \u4f4d","newPwdLimit":"6-20 \u4f4d\u65b0\u5bc6\u7801","twoPwdNeedSame":"\u8f93\u5165\u7684\u5bc6\u7801\u4e0d\u5339\u914d","resetEmailSent":"\u91cd\u7f6e\u5bc6\u7801\u90ae\u4ef6\u5df2\u53d1\u9001\u81f3\u90ae\u7bb1 {{email}}","emailSent":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f","resetPwdEmail":"\u91cd\u53d1\u5bc6\u7801\u91cd\u7f6e\u90ae\u4ef6","confirmUnbindEmail":"\u786e\u5b9a\u89e3\u9664\u7ed1\u5b9a\u90ae\u7bb1\uff1f","confirmUnbinPhont":"\u786e\u5b9a\u89e3\u9664\u7ed1\u5b9a\u624b\u673a\u53f7\uff1f","accBind":"\u8d26\u53f7\u7ed1\u5b9a","releaseBind":"\u89e3\u9664\u7ed1\u5b9a","pwdLogin":"\u5bc6\u7801\u767b\u5f55","verifyCodeLogin":"\u624b\u673a\u53f7\u767b\u5f55","appScanLogin":"\u79fb\u52a8\u7aef APP \u626b\u7801\u767b\u5f55","scanLogin":"\u626b\u7801\u767b\u5f55","ldapLogin":"LDAP \u767b\u5f55","adLogin":"AD \u767b\u5f55","emailRegister":"\u90ae\u7bb1\u6ce8\u518c","phoneRegister":"\u624b\u673a\u53f7\u6ce8\u518c","sendingVerifyCode":"\u9a8c\u8bc1\u7801\u53d1\u9001\u4e2d","verifyCodeSended":"\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\u81f3","inputEmailCode":"\u8bf7\u8f93\u5165\u90ae\u7bb1\u9a8c\u8bc1\u7801","inputSmsCode":"\u8bf7\u8f93\u5165\u77ed\u4fe1\u9a8c\u8bc1\u7801","otherVerifyWay":"\u5176\u4ed6\u9a8c\u8bc1\u65b9\u5f0f","otherLoginWay":"\u5176\u4ed6\u767b\u5f55\u65b9\u5f0f","fillPhoneEmail":"\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5b8c\u5584\u624b\u673a\u6216\u90ae\u7bb1\u4fe1\u606f","clickSent":"\u70b9\u51fb\u53d1\u9001\u9a8c\u8bc1\u7801","bindPhoneInfo":"\u8bf7\u8f93\u5165\u624b\u673a\u53f7\u8fdb\u884c\u7ed1\u5b9a","phoneError":"\u624b\u673a\u53f7\u683c\u5f0f\u9519\u8bef","bindEmailInfo":"\u4f60\u6682\u672a\u7ed1\u5b9a\u90ae\u7bb1\uff0c\u8bf7\u8f93\u5165\u7ed1\u5b9a","emailError":"\u90ae\u7bb1\u683c\u5f0f\u9519\u8bef","mailBinded":"\u8be5\u90ae\u7bb1\u5df2\u88ab\u7ed1\u5b9a","phoneBinded":"\u8be5\u624b\u673a\u53f7\u5df2\u88ab\u7ed1\u5b9a","dontBindPhone":"\u4f60\u672a\u7ed1\u5b9a\u624b\u673a\u53f7\uff0c\u8bf7\u8f93\u5165\u624b\u673a\u53f7\u7ed1\u5b9a","inputPhoneCode":"\u8bf7\u8f93\u5165\u624b\u673a\u9a8c\u8bc1\u7801","dontbindEmail":"\u4f60\u672a\u7ed1\u5b9a\u90ae\u7bb1\uff0c\u8bf7\u8f93\u5165\u90ae\u7bb1\u7ed1\u5b9a","feedback":"\u9047\u5230\u95ee\u9898","forgetPwd":"\u5fd8\u8bb0\u5bc6\u7801","subAccLogin":"\u5b50\u8d26\u53f7\u767b\u5f55","inputContactWayPlease":"\u8bf7\u586b\u5199\u8054\u7cfb\u65b9\u5f0f","submitFailRetry":"\u63d0\u4ea4\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5","selectYourProblem":"\u8bf7\u9009\u62e9\u4f60\u9047\u5230\u7684\u95ee\u9898","problemDetail":"\u8bf7\u63cf\u8ff0\u4e0b\u4f60\u9047\u5230\u7684\u5177\u4f53\u95ee\u9898\u53ca\u76f8\u5173\u56fe\u7247","inputContactWayCheap":"\u65b9\u4fbf\u89e3\u51b3\u4f60\u9047\u5230\u95ee\u9898\uff0c\u8bf7\u63d0\u4f9b\u4f60\u7684\u8054\u7cfb\u65b9\u5f0f\uff08\u5fc5\u586b\uff09","inputPwd":"\u8bf7\u8f93\u5165\u5bc6\u7801","setPwdLimit1":"\u8bbe\u7f6e\u81f3\u5c11 6 \u4f4d\u5b57\u7b26\u5bc6\u7801","login":{"setPwdLimit2":"\u81f3\u5c11\u516d\u4f4d\uff0c\u9700\u5305\u542b\u82f1\u6587\u3001\u6570\u5b57\u4e0e\u7b26\u53f7\u4e2d\u7684\u4e24\u79cd","setPwdLimit3":"\u81f3\u5c11\u516d\u4f4d\uff0c\u9700\u5305\u542b\u82f1\u6587\u3001\u6570\u5b57\u4e0e\u7b26\u53f7"},"setPwdLimitMsg1":"\u5bc6\u7801\u957f\u5ea6\u81f3\u5c11\u4e3a 6 \u4f4d","setPwdLimitMsg2":"\u5bc6\u7801\u957f\u5ea6\u81f3\u5c11\u4e3a 6 \u4f4d\uff0c\u4e14\u8981\u5305\u542b\u82f1\u6587\u3001\u6570\u5b57\u4e0e\u7b26\u53f7\u4e2d\u7684\u4e24\u79cd","setPwdLimitMsg3":"\u5bc6\u7801\u957f\u5ea6\u81f3\u5c11\u4e3a 6 \u4f4d\uff0c\u4e14\u8981\u540c\u65f6\u5305\u542b\u82f1\u6587\u3001\u6570\u5b57\u4e0e\u7b26\u53f7","wechatmpQrcode":"\u516c\u4f17\u53f7\u5173\u6ce8\u767b\u5f55","inputEmailUsername":"\u8bf7\u8f93\u5165\u90ae\u7bb1\u6216\u7528\u6237\u540d","inputUsername":"\u8bf7\u8f93\u5165\u7528\u6237\u540d","moreWays":"\u66f4\u591a\u767b\u5f55","inputCorrectPhoneOrEmail":"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1","sendCodeTimeout":"\u53d1\u9001\u5931\u8d25,\u8bf7\u7a0d\u540e\u5c1d\u8bd5","mediaDevicesSupport":"\u5f53\u524d\u8bbe\u5907\u6682\u4e0d\u652f\u6301\u4eba\u8138\u8bc6\u522b","AuthorizationCamera":"\u8bf7\u5148\u5f00\u542f\u6388\u6743","checkPreferences":"\u8bf7\u68c0\u67e5\u504f\u597d\u8bbe\u7f6e","requireError":"\u65e0\u6cd5\u6ee1\u8db3\u8981\u6c42\u9519\u8bef","hardwareSupport":"\u786c\u4ef6\u4e0d\u652f\u6301","qrcodeExpired":"\u70b9\u51fb\u5237\u65b0","noLoginMethodsDesc":"\u672a\u914d\u7f6e\u767b\u5f55\u65b9\u5f0f","inputNewPwd":"\u8bf7\u8f93\u5165\u65b0\u7684\u5bc6\u7801","socialConnectionMessage":"\u4e0d\u652f\u6301\u4f7f\u7528{{provider}}\u767b\u5f55,\u8bf7\u9009\u62e9\u5176\u4ed6\u65b9\u5f0f\u767b\u5f55\uff0c\u6216\u5728\u5176\u5b83\u6d4f\u89c8\u5668\u4e2d\u91cd\u8bd5","landrayKKScan":"\u84dd\u51ccKK\u626b\u7801\u767b\u5f55"}')},243:function(e){e.exports=JSON.parse('{"scanQrcode":"\u626b\u63cf\u4e8c\u7ef4\u7801","inputSafteyCode":"\u8f93\u5165\u5b89\u5168\u7801","viewInputSixCode":"\u5728\u624b\u673a\u67e5\u770b\u5e76\u8f93\u5165 6 \u4f4d\u6570\u5b57\u5b89\u5168\u7801\uff0c\u5b8c\u6210\u540e\u8fdb\u5165\u4e0b\u4e00\u6b65","numberSafteyCode":"\u6570\u5b57\u5b89\u5168\u7801","saveSecret":"\u8bf7\u59a5\u5584\u4fdd\u5b58\u5bc6\u94a5","resetCodeDoWhat":"\u5f53\u4f60\u7684 MFA \u4e22\u5931\u65f6\uff0c\u4f60\u9700\u8981\u91cd\u7f6e\u4ee3\u7801\u6765\u6062\u590d\u8d26\u53f7\u8bbf\u95ee\u3002","bindSuccess":"\u7ed1\u5b9a\u6210\u529f","bindedMfa":"\u4f60\u5df2\u6210\u529f\u7ed1\u5b9a MFA","bindFail":"\u7ed1\u5b9a\u5931\u8d25","unbindMfa":"\u89e3\u7ed1 MFA","confirmUnbindMfa":"\u786e\u5b9a\u89e3\u7ed1 MFA \u5417\uff1f","unbindSuccess":"\u89e3\u7ed1\u6210\u529f","unbindFail":"\u89e3\u7ed1\u5931\u8d25","bindInfoFetchFail":"\u7ed1\u5b9a\u4fe1\u606f\u8bf7\u6c42\u5931\u8d25","mfaBind":"MFA \u7ed1\u5b9a","addMfa":"\u6dfb\u52a0 MFA","saveRecoverCode":"\u4fdd\u5b58\u6062\u590d\u4ee3\u7801","bindFinish":"\u7ed1\u5b9a\u5b8c\u6210","prevStep":"\u4e0a\u4e00\u6b65","nextStep":"\u4e0b\u4e00\u6b65","currentPwd":"\u5f53\u524d\u5bc6\u7801","inputCurrPwd":"\u8bf7\u8f93\u5165\u5f53\u524d\u5bc6\u7801","newPwd":"\u65b0\u5bc6\u7801","inputNewPwd":"\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801","inputOldPwd":"\u8bf7\u8f93\u5165\u539f\u767b\u5f55\u5bc6\u7801","confrimPwd":"\u786e\u8ba4\u5bc6\u7801","needSameWithNewPwd":"\u9700\u8981\u4e0e\u65b0\u5bc6\u7801\u4e00\u81f4","confirmModify":"\u786e\u8ba4\u4fee\u6539","modifyPwd":"\u4fee\u6539\u5bc6\u7801","modifyPwdText":"\u4f60\u7684\u5bc6\u7801\u8fde\u7eed\u4f7f\u7528\u8d85\u8fc7 {{number}} \u4e2a\u6708\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669\u3002\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u5bc6\u7801\u3002","modifyNoticePwdText":"\u4f60\u7684\u5bc6\u7801\u8fde\u7eed\u4f7f\u7528\u8d85\u8fc7 {{number}} \u4e2a\u6708\uff0c\u5373\u5c06\u8fc7\u671f\uff0c\u4e3a\u4e86\u4e0d\u5f71\u54cd\u4f60\u7684\u4f7f\u7528\uff0c\u8bf7\u8bbe\u7f6e\u65b0\u5bc6\u7801","personalInfo":"\u4e2a\u4eba\u4fe1\u606f","accPwd":"\u8d26\u53f7\u5bc6\u7801","authenticationInfo":"\u8ba4\u8bc1\u4fe1\u606f","choosePrincipalAuthenticationType":"\u9009\u62e9\u8ba4\u8bc1\u7c7b\u578b","choosePrincipalAuthenticationDescription":"\u5b9e\u540d\u8ba4\u8bc1\u5c06\u5f71\u54cd\u8d26\u53f7\u5f52\u5c5e\u6743\uff0c\u8bf7\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u5b9e\u540d\u8ba4\u8bc1\u3002","personalAuthentication":"\u4e2a\u4eba\u8ba4\u8bc1","personalAuthenticationDescription":"\u9002\u7528\u4e2a\u4eba\u7528\u6237\uff0c\u8d26\u53f7\u5f52\u5c5e\u4e8e\u4e2a\u4eba","enterpriseAuthentication":"\u4f01\u4e1a\u8ba4\u8bc1","enterpriseAuthenticationDescription":"\u9002\u7528\u4f01\u4e1a\u3001\u653f\u5e9c\u3001\u4e8b\u4e1a\u5355\u4f4d\u3001\u5b66\u6821\u3001\u7ec4\u7ec7\u7b49\uff0c\u8d26\u53f7\u5f52\u5c5e\u4e8e\u4f01\u4e1a","principalAuthenticationType":"\u8ba4\u8bc1\u7c7b\u578b","realName":"\u771f\u5b9e\u59d3\u540d","enterpriseName":"\u4f01\u4e1a\u540d\u79f0","idCard":"\u8bc1\u4ef6\u53f7\u7801","authenticationTime":"\u8ba4\u8bc1\u65f6\u95f4","alreadyCompletedPersonalAuthentication":"\u606d\u559c\uff01\u4f60\u5df2\u7ecf\u5b8c\u6210\u4e2a\u4eba\u5b9e\u540d\u8ba4\u8bc1","alreadyCompletedEnterpriseAuthentication":"\u606d\u559c\uff01\u4f60\u5df2\u7ecf\u5b8c\u6210\u4f01\u4e1a\u5b9e\u540d\u8ba4\u8bc1","personal":"\u4e2a\u4eba","enterprise":"\u4f01\u4e1a","changeToEnterpriseAuthentication":"\u53d8\u66f4\u4e3a\u4f01\u4e1a\u8ba4\u8bc1","idNumberLabel":"\u8eab\u4efd\u8bc1\u53f7\uff1a","bankCardLabel":"\u94f6\u884c\u5361\u53f7\uff1a","inputName":"\u8bf7\u8f93\u5165\u59d3\u540d","inputIdNumber":"\u8bf7\u8f93\u5165\u8eab\u4efd\u8bc1\u53f7","inputBankCard":"\u8bf7\u8f93\u5165\u94f6\u884c\u5361\u53f7","enterpriseCode":"\u7edf\u4e00\u793e\u4f1a\u4fe1\u7528\u4ee3\u7801/\u6ce8\u518c\u53f7/\u7ec4\u7ec7\u673a\u6784\u4ee3\u7801","legalPersonName":"\u4f01\u4e1a\u6cd5\u4eba\u540d\u79f0","inputEnterpriseCode":"\u8bf7\u8f93\u5165\u7edf\u4e00\u793e\u4f1a\u4fe1\u7528\u4ee3\u7801/\u6ce8\u518c\u53f7/\u7ec4\u7ec7\u673a\u6784\u4ee3\u7801","inputLegalPersonName":"\u8bf7\u8f93\u5165\u4f01\u4e1a\u6cd5\u4eba\u540d\u79f0","inputEnterpriseName":"\u8bf7\u8f93\u5165\u4f01\u4e1a\u540d\u79f0","authenticationSuccess":"\u8ba4\u8bc1\u6210\u529f","securityRank":"\u5b89\u5168\u7b49\u7ea7","longTimeNoModifyPwd":"\u4f60\u7684\u5bc6\u7801\u957f\u65f6\u95f4\u672a\u4fee\u6539\uff0c\u5b58\u5728\u5b89\u5168\u9690\u60a3\uff0c\u5efa\u8bae\u4f60\u7acb\u523b\u4fee\u6539","noPwdDanger":"\u4f60\u7684\u5e10\u6237\u5b58\u5728\u9690\u60a3\uff0c\u8bf7\u7acb\u523b\u8bbe\u7f6e\u5bc6\u7801\u3002","pwdSecurityInfo":"\u5b89\u5168\u6027\u9ad8\u7684\u5bc6\u7801\u53ef\u4ee5\u4f7f\u8d26\u6237\u66f4\u5b89\u5168\u3002\u5efa\u8bae\u4f60\u5b9a\u671f\u66f4\u6362\u5bc6\u7801\u3002","currSecurityLevel":"\u4f60\u5f53\u524d\u7684\u5e10\u53f7\u5b89\u5168\u7a0b\u5ea6\uff1a","securityLevel":"\u5b89\u5168\u7ea7\u522b\uff1a","setted":"\u5df2\u8bbe\u7f6e","unSet":"\u672a\u8bbe\u7f6e","pwdStrang":"\u5bc6\u7801\u5f3a\u5ea6","modifyImmidate":"\u7acb\u5373\u4fee\u6539","configImmediate":"\u7acb\u5373\u8bbe\u7f6e","phoneBind":"\u624b\u673a\u7ed1\u5b9a","phoneBindTips":"\u7ed1\u5b9a\u624b\u673a\u53f7\u7801\uff0c\u8d26\u6237\u5b89\u5168\u95ee\u9898\u5b9e\u65f6\u901a\u77e5\u3002","binded":"\u5df2\u7ed1\u5b9a","unBind":"\u672a\u7ed1\u5b9a","bindImmediate":"\u7acb\u5373\u7ed1\u5b9a","emailBind":"\u90ae\u7bb1\u7ed1\u5b9a","bindEmailTips":"\u4e3a\u4e86\u4f60\u7684\u8d26\u6237\u5b89\u5168\uff0c\u8bf7\u7ed1\u5b9a\u90ae\u7bb1\u3002","personalMfa":"\u4e2a\u4eba MFA","error":"\u9519\u8bef\u4fe1\u606f","contactAdministrator":"\u672a\u77e5\u7684\u9519\u8bef\uff5e \u8bf7\u4f60\u8054\u7cfb\u7ba1\u7406\u5458\u8fdb\u884c\u5904\u7406","personalMfaTips":"\u7ed1\u5b9a\u4e2a\u4eba MFA \u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u767b\u5f55\u65f6\u8fdb\u884c\u4e8c\u6b21\u9a8c\u8bc1\uff0c\u66f4\u6709\u6548\u7684\u4fdd\u969c\u4f60\u7684\u8d26\u6237\u5b89\u5168\u3002","resetpasswordText1":"\u8f93\u5165\u4f60\u7684\u6ce8\u518c\u7535\u8bdd/\u90ae\u7bb1\uff0c\u8f93\u5165\u6536\u5230\u7684\u9a8c\u8bc1\u7801\uff0c\u6211\u4eec\u5c06\u4e3a\u4f60\u8fdb\u884c\u5bc6\u7801\u91cd\u7f6e\u3002","pleaseDownloadAuthenticator":"\u8bf7\u5728\u624b\u673a\u6253\u5f00 Google Authenticator / Microsoft Authenticator \u626b\u7801\u6dfb\u52a0 MFA","unlockTip":"\u82e5\u89e3\u9501\u9047\u5230\u95ee\u9898\uff0c\u8bf7\u70b9"}')},244:function(e){e.exports=JSON.parse('{"\u6ce8\u518c":"\u6ce8\u518c","\u767b\u5f55":"\u767b\u5f55"}')},314:function(e,t,n){},325:function(e,t,n){},338:function(e,t,n){},339:function(e,t,n){},596:function(e,t,n){},643:function(e,t,n){},655:function(e,t,n){},656:function(e,t,n){},657:function(e,t,n){},658:function(e,t,n){},714:function(e,t,n){},716:function(e,t,n){},722:function(e,t,n){},735:function(e,t,n){},741:function(e,t,n){},745:function(e,t,n){},746:function(e,t,n){},747:function(e,t,n){},752:function(e,t,n){},753:function(e,t,n){},754:function(e,t,n){},755:function(e,t,n){},759:function(e,t,n){},760:function(e,t,n){},761:function(e,t,n){},762:function(e,t,n){},763:function(e,t,n){},764:function(e,t,n){},765:function(e,t,n){},766:function(e,t,n){},767:function(e,t,n){},768:function(e,t,n){},769:function(e,t,n){},781:function(e,t,n){},782:function(e,t,n){},783:function(e,t,n){},784:function(e,t,n){},785:function(e,t,n){},786:function(e,t,n){},787:function(e,t,n){},788:function(e,t,n){},806:function(e,t,n){},809:function(e,t){},810:function(e,t){},811:function(e,t){},812:function(e,t,n){"use strict";n.r(t);var o={};n.r(o),n.d(o,"common",(function(){return M})),n.d(o,"login",(function(){return F})),n.d(o,"user",(function(){return B})),n.d(o,"map",(function(){return D}));var r={};n.r(r),n.d(r,"common",(function(){return q})),n.d(r,"login",(function(){return U})),n.d(r,"user",(function(){return V})),n.d(r,"map",(function(){return H}));var i=n(0),a=n.n(i),s=n(42),c=n.n(s),u=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,833)).then((function(t){var n=t.getCLS,o=t.getFID,r=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),o(e),r(e),i(e),a(e)}))},l=n(7),d=n(3),p=n(2),h=n.n(p),m=n(6),f=(n(221),n(27)),g=n(9),v=(n(345),n(76)),b=n.n(v);function y(){var e=a.a.createContext(void 0);return[e,function(){var t=a.a.useContext(e);if(!t)throw new Error("useBaseContext must be inside a Provider with a value");return t}]}var C=n(36),E=(Object(g.a)({},"SET_VALUE",(function(e,t){return Object(l.a)(Object(l.a)({},e),{},Object(g.a)({},t.key,t.value))})),y()),w=Object(d.a)(E,2),O=(w[0],w[1]);function S(){return O()}var k,T,P,N,A,x,I,j,_=n(96),L=n(140),R=n(347),M=n(237),F=n(238),B=n(239),D=n(240),q=n(241),U=n(242),V=n(243),H=n(244),z=function(){return k},G=function(){if("undefined"!==typeof window){var e=z(),t=null===e||void 0===e?void 0:e.defaultView;return t||window}},W=function(e,t){Object(i.useEffect)((function(){e&&(!function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}(t),null!==t&&void 0!==t&&t.publicConfig&&Me(e,t.publicConfig),null!==t&&void 0!==t&&t.pageConfig&&Ve(e,t.pageConfig))}),[e,t])},K=function(){},$=function(e){_.a.changeLanguage(e),K&&K(e)},Y=function(){var e,t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0,s="zh-CN",c=G();c&&(s="zh"===(null===c||void 0===c||null===(e=c.navigator)||void 0===e||null===(t=e.language)||void 0===t||null===(n=t.split("-"))||void 0===n?void 0:n[0])?"zh-CN":"en-US");Boolean(_.a.language)?_.a.changeLanguage(a):(_.a.use(R.a).use(L.e).init({detection:{order:[]},resources:{"en-US":{translation:o},"zh-CN":{translation:r}},fallbackLng:null!==a&&void 0!==a?a:s,debug:!1,interpolation:{escapeValue:!1}}),i.onChange&&(K=i.onChange))},Q=n(102),J=n.n(Q),Z=n(138),X=n.n(Z),ee=n(222),te=n.n(ee);!function(e){e.Modal="modal",e.Normal="normal"}(T||(T={})),function(e){e.LDAP="ldap",e.AppQr="app-qrcode",e.Password="password",e.PhoneCode="phone-code",e.WxMinQr="wechat-miniprogram-qrcode",e.AD="ad",e.WechatMpQrcode="wechatmp-qrcode",e.Landray="landray"}(P||(P={})),function(e){e.Email="email",e.Phone="phone",e.EmailCode="emailCode"}(N||(N={})),function(e){e.Login="login",e.Register="register",e.MfaVerify="mfaVerify",e.AppMfaVerify="appMfaVerify",e.RestPassword="restPassword",e.CompleteUserInfo="completeUserInfo"}(A||(A={})),function(e){e.Email="email",e.Phone="phone"}(x||(x={})),function(e){e.Qq="qq",e.Weibo="weibo",e.Github="github",e.Google="google",e.WxPc="wechat:pc",e.Dingtalk="dingtalk",e.WxWCorpQr="wechatwork:corp:qrconnect",e.WxWSPQr="wechatwork:service-provider:qrconnect",e.WxWSPAuth="wechatwork:service-provider:authorization",e.AlipayWeb="alipay:web",e.AppleWeb="apple:web",e.Baidu="baidu",e.LarkInternalApp="lark-internal",e.LarkMarketPlaceApp="lark-public"}(I||(I={})),function(e){e.AD="ad",e.CAS="cas",e.LDAP="ldap",e.OIDC="oidc",e.SAML="saml",e.OAUTH="oauth",e.AZURE_AD="azure-ad"}(j||(j={}));var ne,oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{w:585,h:649},n=t.w,o=t.h,r=G();if(r){var i=r.document,a=void 0!==r.screenLeft?r.screenLeft:r.screenX,s=void 0!==r.screenTop?r.screenTop:r.screenY,c=r.innerWidth?r.innerWidth:i.documentElement.clientWidth?i.documentElement.clientWidth:r.screen.width,u=r.innerHeight?r.innerHeight:i.documentElement.clientHeight?i.documentElement.clientHeight:r.screen.height,l=c/r.screen.availWidth,d=(c-n)/2/l+a,p=(u-o)/2/l+s,h=r.open(e,"_blank","\n toolbar=no,\n menubar=no,\n scrollbars=no,\n resizable=no,\n location=no,\n status=no\n width=".concat(n/l,", \n height=").concat(o/l,", \n top=").concat(p,", \n left=").concat(d,"\n "));null===h||void 0===h||h.focus()}},re={email:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,phone:/^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,ip:/^((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}$/,host:/^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+.?$/,username:/.?/},ie=function(e,t){return re[e].test(t)},ae=function(e,t){return[{required:!0,validateTrigger:["onChange"],message:t||_.a.t("common.isMissing",{name:e}),whitespace:!0}]};function se(){var e=G();if(e){var t=e.navigator.userAgent,n=e.navigator.platform,o=null;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(n)?o="Mac OS":-1!==["iPhone","iPad","iPod"].indexOf(n)?o="iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(n)?o="Windows":/Android/.test(t)?o="Android":!o&&/Linux/.test(n)&&(o="Linux"),o}}var ce={appConfig:null,userConfig:null},ue=function(e,t){var n=G();if(n){var o,r,i=n.document;if(i.createStyleSheet)r=i.createStyleSheet();else{var a=i.getElementsByTagName("head")[0];o=i.createElement("style"),a.appendChild(o),r=i.styleSheets[i.styleSheets.length-1]}if("string"===typeof e)o?o.innerHTML=e:r.cssText=e;else{var s=0;for(var c in e)if(r.insertRule){var u=c+" {"+e[c]+"}";r.insertRule(u,s++)}else r.addRule(c,e[c],s++)}t&&(ce[t]=o||r)}},le=function(e){var t;if(ce[e]){var n=ce[e];null===(t=n.parentNode)||void 0===t||t.removeChild(n),ce[e]=null}},de=function(e){return e.filter(Boolean).join(" ")};var pe,he=function(){var e=b.a.parse(window.location.search,{ignoreQueryPrefix:!0});return Object.keys(e).map((function(t){return{key:t,value:e[t]}}))},me=function(){var e;return"undefined"===typeof navigator?null:/MicroMessenger/i.test(null===(e=navigator)||void 0===e?void 0:e.userAgent)&&!/wxwork/i.test(navigator.userAgent)},fe=function(){return"undefined"===typeof navigator?null:/Lark/i.test(navigator.userAgent)},ge=function(){return"undefined"===typeof navigator?null:/dingtalk/i.test(navigator.userAgent)},ve=function(){var e;if(me()||/wxwork/i.test(navigator.userAgent)||fe()||ge()||"undefined"!==typeof navigator&&/QtWebEngine/i.test(navigator.userAgent)||"undefined"!==typeof navigator&&/MiuiBrowser/i.test(navigator.userAgent)||"undefined"!==typeof navigator&&/MQQBrowser/i.test(navigator.userAgent)||window.navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))return!0;var t=te()();return!["Chrome","Firefox","Safari","Opera","IE","Edge"].includes(null!==(e=t.browser.name)&&void 0!==e?e:"")};!function(e){e[e.NoCheck=0]="NoCheck",e[e.Low=1]="Low",e[e.Middle=2]="Middle",e[e.High=3]="High",e[e.AUTO=4]="AUTO"}(pe||(pe={}));var be,ye=(ne={},Object(g.a)(ne,pe.NoCheck,{placeholder:function(){return _.a.t("login.inputPwd")},validateMessage:function(){return _.a.t("login.inputPwd")}}),Object(g.a)(ne,pe.Low,{placeholder:function(){return _.a.t("login.setPwdLimit1")},validateMessage:function(){return _.a.t("login.setPwdLimitMsg1")}}),Object(g.a)(ne,pe.Middle,{placeholder:function(){return _.a.t("login.login.setPwdLimit2")},validateMessage:function(){return _.a.t("login.setPwdLimitMsg2")}}),Object(g.a)(ne,pe.High,{placeholder:function(){return _.a.t("login.login.setPwdLimit3")},validateMessage:function(){return _.a.t("login.setPwdLimitMsg3")}}),Object(g.a)(ne,pe.AUTO,{placeholder:function(){return _.a.t("login.inputPwd")},validateMessage:function(){return _.a.t("login.inputPwd")}}),ne),Ce=[/\d+/,/[a-zA-Z]/,/[`~!@#$%^&*()_\-+=<>?:"{}|,.\\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&*\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018'\uff0c\u3002\u3001]/],Ee=function(e){return Ce.map((function(t){return t.test(e)})).filter((function(e){return e})).length},we=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe.NoCheck,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,r=[].concat(Object(f.a)(ae(_.a.t("common.password"),o)),[{validateTrigger:"onBlur",validator:function(e,t){return-1!==(null!==t&&void 0!==t?t:"").indexOf(" ")?Promise.reject(_.a.t("common.checkPasswordHasSpace")):Promise.resolve()}}]),i=(e={},Object(g.a)(e,pe.NoCheck,Object(f.a)(r)),Object(g.a)(e,pe.Low,[].concat(Object(f.a)(r),[{validateTrigger:"onBlur",validator:function(e,t){return t&&t.length<6?Promise.reject(ye[pe.Low].validateMessage()):Promise.resolve()}}])),Object(g.a)(e,pe.Middle,[].concat(Object(f.a)(r),[{validateTrigger:"onBlur",validator:function(e,t){return t&&(t.length<6||Ee(t)<2)?Promise.reject(ye[pe.Middle].validateMessage()):Promise.resolve()}}])),Object(g.a)(e,pe.High,[].concat(Object(f.a)(r),[{validateTrigger:"onBlur",validator:function(e,t){return t&&(t.length<6||Ee(t)<3)?Promise.reject(ye[pe.High].validateMessage()):Promise.resolve(!0)}}])),Object(g.a)(e,pe.AUTO,[].concat(Object(f.a)(r),[{validateTrigger:"onBlur",pattern:null===n||void 0===n?void 0:n.regex,message:null===n||void 0===n?void 0:n.message}])),e);return i[t]},Oe=function e(t){return"#document"===t.nodeName?t:e(t.parentNode)},Se=function(e,t){var n,o,r,i,a=null===e||void 0===e?void 0:e.loginTabs.list,s=null!==(n=null===e||void 0===e||null===(o=e.verifyCodeTabConfig)||void 0===o?void 0:o.enabledLoginMethods)&&void 0!==n?n:[],c=null!==(r=null===e||void 0===e||null===(i=e.passwordTabConfig)||void 0===i?void 0:i.enabledLoginMethods)&&void 0!==r?r:[];return t===N.Phone?a.includes(P.PhoneCode)&&s.includes("phone-code")?{specifyDefaultLoginMethod:P.PhoneCode,lockMethod:"phone-code"}:a.includes(P.Password)&&c.includes("phone-password")?{specifyDefaultLoginMethod:P.Password}:void 0:t===N.EmailCode?a.includes(P.PhoneCode)&&s.includes("email-code")?{specifyDefaultLoginMethod:P.PhoneCode,lockMethod:"email-code"}:a.includes(P.Password)&&c.includes("email-password")?{specifyDefaultLoginMethod:P.Password}:void 0:t===N.Email?a.includes(P.Password)&&c.includes("email-password")?{specifyDefaultLoginMethod:P.Password}:a.includes(P.PhoneCode)&&s.includes("email-code")?{specifyDefaultLoginMethod:P.PhoneCode,lockMethod:"email-code"}:void 0:void 0},ke=function(e){return ie("phone",e)||ie("email",e)?e:""},Te=n(223),Pe=n.n(Te),Ne=function(e,t,o){var r=n(474);return!!t.includes(o)||(!!Pe()(t,(function(e){return!!r(e,o)}))||(!!e.includes(o)||!!Pe()(e,(function(e){return!!r(e,o)}))))},Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=G();if(n&&e.length>0){var o=n.location.origin,r=Ne(e,t,o);if(!r)throw new Error("".concat(_.a.t("common.corsErrorMessage")).concat(_.a.t("common.corsErrorMessage2")))}},xe=n(116),Ie=n(117);!function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(be||(be={}));var je=function(){function e(){Object(xe.a)(this,e)}return Object(Ie.a)(e,null,[{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be.INFO,n={type:t,message:e};console.log(JSON.stringify(n))}},{key:"info",value:function(e){this.log(e,be.INFO)}},{key:"warn",value:function(e){this.log(e,be.WARN)}},{key:"error",value:function(e){this.log(e,be.ERROR)}}]),e}();je.printType=[be.ERROR];var _e,Le={},Re=function(e){return null===Le||void 0===Le?void 0:Le[e]},Me=function(e,t){return Le[e]=t},Fe=function(){var e=Object(m.a)(h.a.mark((function e(t,n){var o,r,i,a,s,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.get,e.prev=1,e.next=4,r("/api/v2/applications/".concat(t,"/public-config"));case 4:o=e.sent,e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(1),je.error("Please check your config or network"),new Error("Please check your config or network");case 11:if(200===o.code&&o.data){e.next=14;break}throw je.error(null!==(i=null===(a=o)||void 0===a?void 0:a.message)&&void 0!==i?i:"Please check your config"),new Error(null!==(s=null===(c=o)||void 0===c?void 0:c.message)&&void 0!==s?s:"Please check your config");case 14:return Ae(o.data.allowedOrigins,o.data.corsWhitelist),Me(t,o.data),n.setUserpoolId(o.data.userPoolId),e.abrupt("return",Re(t));case 18:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t,n){return e.apply(this,arguments)}}(),Be=function(e,t){return null!==e&&void 0!==e&&e.__internalRequest__?null===e||void 0===e?void 0:e.host:function(e,t){var n=e.split(".")[0],o=new URL(t),r=o.hostname.split(".");r.shift();var i=o.port;return"".concat(o.protocol,"//").concat(n,".").concat(r.join(".")).concat(i&&":".concat(i))}(t.requestHostname,null===e||void 0===e?void 0:e.host)},De=function(e,t,n,o){var r=Object(i.useState)(),a=Object(d.a)(r,2),s=a[0],c=a[1],u=Object(i.useCallback)(Object(m.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!e){t.next=11;break}if(Re(e)){t.next=10;break}return t.prev=2,t.next=5,Fe(e,n);case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(2),o(t.t0);case 10:c(Re(e));case 11:case"end":return t.stop()}}),t,null,[[2,7]])}))),[e,n,o]);return Object(i.useEffect)((function(){u()}),[u]),Object(i.useMemo)((function(){if(s&&t)return Object(l.a)(Object(l.a)({},function(e,t){var n,o,r,i,a,s,c,u,d,p,h,m,f,g,v,b,y,C,E;return Object(l.a)(Object(l.a)({},e),{},{title:null!==(n=e.title)&&void 0!==n?n:t.name,logo:e.logo?e.logo:t.logo,loginMethods:null!==(o=null!==(r=null===e||void 0===e?void 0:e.loginMethods)&&void 0!==r?r:null===(i=t.loginTabs)||void 0===i?void 0:i.list)&&void 0!==o?o:[],passwordLoginMethods:null!==(a=null!==(s=null===e||void 0===e?void 0:e.passwordLoginMethods)&&void 0!==s?s:null===(c=t.passwordTabConfig)||void 0===c?void 0:c.enabledLoginMethods)&&void 0!==a?a:[],defaultLoginMethod:null!==(u=e.defaultLoginMethod)&&void 0!==u?u:t.loginTabs.default,disableResetPwd:!!(null!==(d=e.disableResetPwd)&&void 0!==d?d:null===(p=t.ssoPageComponentDisplay)||void 0===p||!p.forgetPasswordBtn),autoRegister:null!==(h=e.autoRegister)&&void 0!==h?h:t.ssoPageComponentDisplay.autoRegisterThenLoginHintInfo,registerMethods:null!==(m=e.registerMethods)&&void 0!==m?m:null===(f=t.registerTabs)||void 0===f?void 0:f.list,defaultRegisterMethod:null!==(g=e.defaultRegisterMethod)&&void 0!==g?g:t.registerTabs.default,disableRegister:!!(null!==(v=e.disableRegister)&&void 0!==v?v:!t.ssoPageComponentDisplay.registerBtn),publicKey:null!==(b=e.publicKey)&&void 0!==b?b:t.publicKey,agreementEnabled:null!==(y=e.agreementEnabled)&&void 0!==y?y:t.agreementEnabled,agreements:null!==(C=e.agreements)&&void 0!==C?C:t.agreements,contentCss:null!==(E=e.contentCss)&&void 0!==E?E:t.css})}(t,s)),{},{host:Be(t,s)})}),[t,s])},qe={},Ue=function(e){return null===qe||void 0===qe?void 0:qe[e]},Ve=function(e,t){return qe[e]=t},He=function(){var e=Object(m.a)(h.a.mark((function e(t,n){var o,r,i,a,s,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.get,e.prev=1,e.next=4,r("/api/v2/applications/".concat(t,"/components-public-config/guard"));case 4:o=e.sent,e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(1),je.error("Please check your config or network"),new Error("Please check your config or network");case 11:if(200===o.code&&o.data){e.next=14;break}throw je.error(null!==(i=null===(a=o)||void 0===a?void 0:a.message)&&void 0!==i?i:"Please check your config"),new Error(null!==(s=null===(c=o)||void 0===c?void 0:c.message)&&void 0!==s?s:"Please check your config");case 14:return Ve(t,o.data),e.abrupt("return",Ue(t));case 16:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t,n){return e.apply(this,arguments)}}();!function(e){e.ERROR="error",e.LOGIN="login",e.REGISTER="register",e.MFA="mfa",e.FORGET_PWD="forgetPassword",e.FORCED_PASSWORD_RESET="forcedPasswordReset",e.NOTICE_PASSWORD_RESET="noticePasswordReset",e.FIRST_LOGIN_PASSWORD="firstLoginPassword",e.UNSAFE_PASSWORD_RESET="unsafePasswordReset",e.DOWNLOAD_AT="downloadAT",e.BIND_TOTP="bindTotp",e.ANY_QUESTIONS="anyQuestions",e.LOGIN_COMPLETE_INFO="loginCompleteInfo",e.REGISTER_PASSWORD="registerPassword",e.REGISTER_COMPLETE_INFO="registerCompleteInfo",e.RECOVERY_CODE="recoveryCode",e.SUBMIT_SUCCESS="submitSuccess",e.IDENTITY_BINDING_ASK="identityBindingAsk",e.IDENTITY_BINDING="identityBinding",e.SELF_UNLOCK="selfUnlock"}(_e||(_e={}));n(475);var ze,Ge,We,Ke,$e,Ye,Qe,Je,Ze,Xe,et,tt="_authing_token",nt="_authing_user",ot=function(){function e(e){this.options=e,this.token=null,this.user=null}return e.prototype.setToken=function(e){"undefined"!==typeof localStorage?localStorage.setItem(tt,e):this.token=e},e.prototype.getToken=function(){return"undefined"!==typeof localStorage?localStorage.getItem(tt)||"":this.token},e.prototype.getUser=function(){return"undefined"!==typeof localStorage?localStorage.getItem(nt)?JSON.parse(localStorage.getItem(nt)):null:this.user},e.prototype.setUser=function(e){"undefined"!==typeof localStorage?(localStorage.setItem(nt,JSON.stringify(e)),localStorage.setItem(tt,e.token)):(this.user=e,this.token=e.token)},e.prototype.clearUser=function(){"undefined"!==typeof localStorage?(localStorage.removeItem(nt),localStorage.removeItem(tt)):(this.user=null,this.token=null)},e}(),rt=n(160),it=n.n(rt),at=n(350),st=n.n(at);!function(e){e.Data="DATA",e.Api="API",e.Menu="MENU",e.Ui="UI",e.Button="BUTTON"}(ze||(ze={})),function(e){e.User="USER",e.Role="ROLE",e.Group="GROUP",e.Org="ORG",e.AkSk="AK_SK"}(Ge||(Ge={})),function(e){e.And="AND",e.Or="OR"}(We||(We={})),function(e){e.ResetPassword="RESET_PASSWORD",e.PasswordResetedNotification="PASSWORD_RESETED_NOTIFICATION",e.ChangePassword="CHANGE_PASSWORD",e.Welcome="WELCOME",e.VerifyEmail="VERIFY_EMAIL",e.ChangeEmail="CHANGE_EMAIL"}(Ke||(Ke={})),function(e){e.CreatedatDesc="CREATEDAT_DESC",e.CreatedatAsc="CREATEDAT_ASC",e.UpdatedatDesc="UPDATEDAT_DESC",e.UpdatedatAsc="UPDATEDAT_ASC"}($e||($e={})),function(e){e.Suspended="Suspended",e.Resigned="Resigned",e.Activated="Activated",e.Archived="Archived"}(Ye||(Ye={})),function(e){e.String="STRING",e.Number="NUMBER",e.Datetime="DATETIME",e.Boolean="BOOLEAN",e.Object="OBJECT",e.Select="SELECT"}(Qe||(Qe={})),function(e){e.Allow="ALLOW",e.Deny="DENY"}(Je||(Je={})),function(e){e.Node="NODE",e.Org="ORG",e.User="USER",e.Userpool="USERPOOL",e.Role="ROLE",e.Permission="PERMISSION",e.Application="APPLICATION"}(Ze||(Ze={})),function(e){e.Username="USERNAME",e.Email="EMAIL",e.Phone="PHONE"}(Xe||(Xe={})),function(e){e.ResetPassword="RESET_PASSWORD",e.RESET_PASSWORD_VERIFY_CODE="RESET_PASSWORD_VERIFY_CODE",e.VerifyEmail="VERIFY_EMAIL",e.FIRST_EMAIL_LOGIN_VERIFY="FIRST_EMAIL_LOGIN_VERIFY",e.CONSOLE_CONDUCTED_VERIFY="CONSOLE_CONDUCTED_VERIFY",e.ChangeEmail="CHANGE_EMAIL",e.EMAIL_BIND_VERIFY_CODE="EMAIL_BIND_VERIFY_CODE",e.EMAIL_UNBIND_VERIFY_CODE="EMAIL_UNBIND_VERIFY_CODE",e.MfaVerify="MFA_VERIFY",e.VerifyCode="VERIFY_CODE",e.REGISTER_VERIFY_CODE="REGISTER_VERIFY_CODE",e.LOGIN_VERIFY_CODE="LOGIN_VERIFY_CODE",e.MFA_VERIFY_CODE="MFA_VERIFY_CODE",e.INFORMATION_COMPLETION_VERIFY_CODE="INFORMATION_COMPLETION_VERIFY_CODE"}(et||(et={}));var ct="\n mutation refreshToken($id: String) {\n refreshToken(id: $id) {\n token\n iat\n exp\n }\n}\n ",ut=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},lt=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},dt=function(e,t,n){return ut(void 0,void 0,void 0,(function(){var o,r;return lt(this,(function(i){switch(i.label){case 0:return o="\n mutation resetPassword($phone: String, $phoneCountryCode: String, $email: String, $code: String!, $newPassword: String!) {\n resetPassword(phone: $phone, phoneCountryCode: $phoneCountryCode, email: $email, code: $code, newPassword: $newPassword) {\n message\n code\n }\n}\n ",[4,t.getToken()];case 1:return r=i.sent(),[2,e.request({query:o,token:r,variables:n})]}}))}))},pt=function(e,t,n){return ut(void 0,void 0,void 0,(function(){var o,r;return lt(this,(function(i){switch(i.label){case 0:return o="\n query udv($targetType: UDFTargetType!, $targetId: String!) {\n udv(targetType: $targetType, targetId: $targetId) {\n key\n dataType\n value\n label\n }\n}\n ",[4,t.getToken()];case 1:return r=i.sent(),[2,e.request({query:o,token:r,variables:n})]}}))}))},ht=function(e,t,n){return ut(void 0,void 0,void 0,(function(){var o,r;return lt(this,(function(i){switch(i.label){case 0:return o="\n mutation removeUdv($targetType: UDFTargetType!, $targetId: String!, $key: String!) {\n removeUdv(targetType: $targetType, targetId: $targetId, key: $key) {\n key\n dataType\n value\n label\n }\n}\n ",[4,t.getToken()];case 1:return r=i.sent(),[2,e.request({query:o,token:r,variables:n})]}}))}))},mt=n(162),ft=n.n(mt),gt="Netscape",vt="Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1",bt={ASN1:null,Base64:null,Hex:null,crypto:null,href:null};function yt(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function Ct(e,t){return e&t}function Et(e,t){return e|t}function wt(e,t){return e^t}function Ot(e,t){return e&~t}function St(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function kt(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var Tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Pt(e){var t,n,o="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),o+=Tt.charAt(n>>6)+Tt.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),o+=Tt.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),o+=Tt.charAt(n>>2)+Tt.charAt((3&n)<<4));(3&o.length)>0;)o+="=";return o}function Nt(e){var t,n="",o=0,r=0;for(t=0;t<e.length&&"="!=e.charAt(t);++t){var i=Tt.indexOf(e.charAt(t));i<0||(0==o?(n+=yt(i>>2),r=3&i,o=1):1==o?(n+=yt(r<<2|i>>4),r=15&i,o=2):2==o?(n+=yt(r),n+=yt(i>>2),r=3&i,o=3):(n+=yt(r<<2|i>>4),n+=yt(15&i),o=0))}return 1==o&&(n+=yt(r<<2)),n}var At,xt=function(e,t){return(xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var It,jt=function(e){var t;if(void 0===At){var n="0123456789ABCDEF",o=" \f\n\r\t\xa0\u2028\u2029";for(At={},t=0;t<16;++t)At[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)At[n.charAt(t)]=t;for(t=0;t<o.length;++t)At[o.charAt(t)]=-1}var r=[],i=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=At[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);i|=s,++a>=2?(r[r.length]=i,i=0,a=0):i<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return r},_t={decode:function(e){var t;if(void 0===It){var n="= \f\n\r\t\xa0\u2028\u2029";for(It=Object.create(null),t=0;t<64;++t)It["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(t=0;t<n.length;++t)It[n.charAt(t)]=-1}var o=[],r=0,i=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=It[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);r|=a,++i>=4?(o[o.length]=r>>16,o[o.length]=r>>8&255,o[o.length]=255&r,r=0,i=0):r<<=6}}switch(i){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:o[o.length]=r>>10;break;case 3:o[o.length]=r>>16,o[o.length]=r>>8&255}return o},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=_t.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return _t.decode(e)}},Lt=1e13,Rt=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,o,r=this.buf,i=r.length;for(n=0;n<i;++n)(o=r[n]*e+t)<Lt?t=0:o-=(t=0|o/Lt)*Lt,r[n]=o;t>0&&(r[n]=t)},e.prototype.sub=function(e){var t,n,o=this.buf,r=o.length;for(t=0;t<r;++t)(n=o[t]-e)<0?(n+=Lt,e=1):e=0,o[t]=n;for(;0===o[o.length-1];)o.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),o=t.length-2;o>=0;--o)n+=(Lt+t[o]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*Lt+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),Mt=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,Ft=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function Bt(e,t){return e.length>t&&(e=e.substring(0,t)+"\u2026"),e}var Dt,qt=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset "+e+" on a stream of length "+this.enc.length);return"string"===typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var o="",r=e;r<t;++r)if(o+=this.hexByte(this.get(r)),!0!==n)switch(15&r){case 7:o+=" ";break;case 15:o+="\n";break;default:o+=" "}return o},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var o=this.get(n);if(o<32||o>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",o=e;o<t;++o)n+=String.fromCharCode(this.get(o));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",o=e;o<t;){var r=this.get(o++);n+=r<128?String.fromCharCode(r):r>191&&r<224?String.fromCharCode((31&r)<<6|63&this.get(o++)):String.fromCharCode((15&r)<<12|(63&this.get(o++))<<6|63&this.get(o++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,o,r="",i=e;i<t;)n=this.get(i++),o=this.get(i++),r+=String.fromCharCode(n<<8|o);return r},e.prototype.parseTime=function(e,t,n){var o=this.parseStringISO(e,t),r=(n?Mt:Ft).exec(o);return r?(n&&(r[1]=+r[1],r[1]+=+r[1]<70?2e3:1900),o=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(o+=":"+r[5],r[6]&&(o+=":"+r[6],r[7]&&(o+="."+r[7]))),r[8]&&(o+=" UTC","Z"!=r[8]&&(o+=r[8],r[9]&&(o+=":"+r[9]))),o):"Unrecognized time: "+o},e.prototype.parseInteger=function(e,t){for(var n,o=this.get(e),r=o>127,i=r?255:0,a="";o==i&&++e<t;)o=this.get(e);if(0===(n=t-e))return r?-1:0;if(n>4){for(a=o,n<<=3;0==(128&(+a^i));)a=+a<<1,--n;a="("+n+" bit)\n"}r&&(o-=256);for(var s=new Rt(o),c=e+1;c<t;++c)s.mulAdd(256,this.get(c));return a+s.toString()},e.prototype.parseBitString=function(e,t,n){for(var o=this.get(e),r="("+((t-e-1<<3)-o)+" bit)\n",i="",a=e+1;a<t;++a){for(var s=this.get(a),c=a==t-1?o:0,u=7;u>=c;--u)i+=s>>u&1?"1":"0";if(i.length>n)return r+Bt(i,n)}return r+i},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return Bt(this.parseStringISO(e,t),n);var o=t-e,r="("+o+" byte)\n";o>(n/=2)&&(t=e+n);for(var i=e;i<t;++i)r+=this.hexByte(this.get(i));return o>n&&(r+="\u2026"),r},e.prototype.parseOID=function(e,t,n){for(var o="",r=new Rt,i=0,a=e;a<t;++a){var s=this.get(a);if(r.mulAdd(128,127&s),i+=7,!(128&s)){if(""===o)if((r=r.simplify())instanceof Rt)r.sub(80),o="2."+r.toString();else{var c=r<80?r<40?0:1:2;o=c+"."+(r-40*c)}else o+="."+r.toString();if(o.length>n)return Bt(o,n);r=new Rt,i=0}}return i>0&&(o+=".incomplete"),o},e}(),Ut=function(){function e(e,t,n,o,r){if(!(o instanceof Vt))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=o,this.sub=r}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return Bt(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return Bt(this.stream.parseStringISO(t,t+n),e);case 30:return Bt(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,o=this.sub.length;n<o;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var o=0;o<n;++o)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substr(t,n)},e.decode=function(t){var n;n=t instanceof qt?t:new qt(t,0);var o=new qt(n),r=new Vt(n),i=e.decodeLength(n),a=n.pos,s=a-o.pos,c=null,u=function(){var t=[];if(null!==i){for(var o=a+i;n.pos<o;)t[t.length]=e.decode(n);if(n.pos!=o)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var r=e.decode(n);if(r.tag.isEOC())break;t[t.length]=r}i=a-n.pos}catch(s){throw new Error("Exception while decoding undefined length content: "+s)}return t};if(r.tagConstructed)c=u();else if(r.isUniversal()&&(3==r.tagNumber||4==r.tagNumber))try{if(3==r.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=u();for(var l=0;l<c.length;++l)if(c[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(d){c=null}if(null===c){if(null===i)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(i)}return new e(o,s,i,r,c)},e}(),Vt=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=0!==(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new Rt;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),Ht=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],zt=(1<<26)/Ht[Ht.length-1],Gt=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,o=(1<<t)-1,r=!1,i="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(r=!0,i=yt(n));a>=0;)s<t?(n=(this[a]&(1<<s)-1)<<t-s,n|=this[--a]>>(s+=this.DB-t)):(n=this[a]>>(s-=t)&o,s<=0&&(s+=this.DB,--a)),n>0&&(r=!0),r&&(i+=yt(n));return r?i:"0"},e.prototype.negate=function(){var t=Qt();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+on(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=Qt();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new Kt(t):new $t(t),this.exp(e,n)},e.prototype.clone=function(){var e=Qt();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,o=this.DB-e*this.DB%8,r=0;if(e-- >0)for(o<this.DB&&(n=this[e]>>o)!=(this.s&this.DM)>>o&&(t[r++]=n|this.s<<this.DB-o);e>=0;)o<8?(n=(this[e]&(1<<o)-1)<<8-o,n|=this[--e]>>(o+=this.DB-8)):(n=this[e]>>(o-=8)&255,o<=0&&(o+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(r>0||n!=this.s)&&(t[r++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=Qt();return this.bitwiseTo(e,Ct,t),t},e.prototype.or=function(e){var t=Qt();return this.bitwiseTo(e,Et,t),t},e.prototype.xor=function(e){var t=Qt();return this.bitwiseTo(e,wt,t),t},e.prototype.andNot=function(e){var t=Qt();return this.bitwiseTo(e,Ot,t),t},e.prototype.not=function(){for(var e=Qt(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=Qt();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=Qt();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+St(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=kt(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,Et)},e.prototype.clearBit=function(e){return this.changeBit(e,Ot)},e.prototype.flipBit=function(e){return this.changeBit(e,wt)},e.prototype.add=function(e){var t=Qt();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=Qt();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=Qt();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=Qt();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=Qt();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=Qt(),n=Qt();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,o,r=e.bitLength(),i=nn(1);if(r<=0)return i;n=r<18?1:r<48?3:r<144?4:r<768?5:6,o=r<8?new Kt(t):t.isEven()?new Yt(t):new $t(t);var a=[],s=3,c=n-1,u=(1<<n)-1;if(a[1]=o.convert(this),n>1){var l=Qt();for(o.sqrTo(a[1],l);s<=u;)a[s]=Qt(),o.mulTo(l,a[s-2],a[s]),s+=2}var d,p,h=e.t-1,m=!0,f=Qt();for(r=on(e[h])-1;h>=0;){for(r>=c?d=e[h]>>r-c&u:(d=(e[h]&(1<<r+1)-1)<<c-r,h>0&&(d|=e[h-1]>>this.DB+r-c)),s=n;0==(1&d);)d>>=1,--s;if((r-=s)<0&&(r+=this.DB,--h),m)a[d].copyTo(i),m=!1;else{for(;s>1;)o.sqrTo(i,f),o.sqrTo(f,i),s-=2;s>0?o.sqrTo(i,f):(p=i,i=f,f=p),o.mulTo(f,a[d],i)}for(;h>=0&&0==(e[h]&1<<r);)o.sqrTo(i,f),p=i,i=f,f=p,--r<0&&(r=this.DB-1,--h)}return o.revert(i)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var o=t.clone(),r=this.clone(),i=nn(1),a=nn(0),s=nn(0),c=nn(1);0!=o.signum();){for(;o.isEven();)o.rShiftTo(1,o),n?(i.isEven()&&a.isEven()||(i.addTo(this,i),a.subTo(t,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;r.isEven();)r.rShiftTo(1,r),n?(s.isEven()&&c.isEven()||(s.addTo(this,s),c.subTo(t,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(t,c),c.rShiftTo(1,c);o.compareTo(r)>=0?(o.subTo(r,o),n&&i.subTo(s,i),a.subTo(c,a)):(r.subTo(o,r),n&&s.subTo(i,s),c.subTo(a,c))}return 0!=r.compareTo(e.ONE)?e.ZERO:c.compareTo(t)>=0?c.subtract(t):c.signum()<0?(c.addTo(t,c),c.signum()<0?c.add(t):c):c},e.prototype.pow=function(e){return this.exp(e,new Wt)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var o=t;t=n,n=o}var r=t.getLowestSetBit(),i=n.getLowestSetBit();if(i<0)return t;for(r<i&&(i=r),i>0&&(t.rShiftTo(i,t),n.rShiftTo(i,n));t.signum()>0;)(r=t.getLowestSetBit())>0&&t.rShiftTo(r,t),(r=n.getLowestSetBit())>0&&n.rShiftTo(r,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return i>0&&n.lShiftTo(i,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=Ht[Ht.length-1]){for(t=0;t<Ht.length;++t)if(n[0]==Ht[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<Ht.length;){for(var o=Ht[t],r=t+1;r<Ht.length&&o<zt;)o*=Ht[r++];for(o=n.modInt(o);t<r;)if(o%Ht[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var o;if(16==n)o=4;else if(8==n)o=3;else if(256==n)o=8;else if(2==n)o=1;else if(32==n)o=5;else{if(4!=n)return void this.fromRadix(t,n);o=2}this.t=0,this.s=0;for(var r=t.length,i=!1,a=0;--r>=0;){var s=8==o?255&+t[r]:tn(t,r);s<0?"-"==t.charAt(r)&&(i=!0):(i=!1,0==a?this[this.t++]=s:a+o>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=o)>=this.DB&&(a-=this.DB))}8==o&&0!=(128&+t[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,o=this.DB-n,r=(1<<o)-1,i=Math.floor(e/this.DB),a=this.s<<n&this.DM,s=this.t-1;s>=0;--s)t[s+i+1]=this[s]>>o|a,a=(this[s]&r)<<n;for(s=i-1;s>=0;--s)t[s]=0;t[i]=a,t.t=this.t+i+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var o=e%this.DB,r=this.DB-o,i=(1<<o)-1;t[0]=this[n]>>o;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&i)<<r,t[a-n]=this[a]>>o;o>0&&(t[this.t-n-1]|=(this.s&i)<<r),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,o=0,r=Math.min(e.t,this.t);n<r;)o+=this[n]-e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o-=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o-=e[n],t[n++]=o&this.DM,o>>=this.DB;o-=e.s}t.s=o<0?-1:0,o<-1?t[n++]=this.DV+o:o>0&&(t[n++]=o),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var o=this.abs(),r=t.abs(),i=o.t;for(n.t=i+r.t;--i>=0;)n[i]=0;for(i=0;i<r.t;++i)n[i+o.t]=o.am(0,r[i],n,i,0,o.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var o=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,o,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,o){var r=t.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=n&&n.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=Qt());var a=Qt(),s=this.s,c=t.s,u=this.DB-on(r[r.t-1]);u>0?(r.lShiftTo(u,a),i.lShiftTo(u,o)):(r.copyTo(a),i.copyTo(o));var l=a.t,d=a[l-1];if(0!=d){var p=d*(1<<this.F1)+(l>1?a[l-2]>>this.F2:0),h=this.FV/p,m=(1<<this.F1)/p,f=1<<this.F2,g=o.t,v=g-l,b=null==n?Qt():n;for(a.dlShiftTo(v,b),o.compareTo(b)>=0&&(o[o.t++]=1,o.subTo(b,o)),e.ONE.dlShiftTo(l,b),b.subTo(a,a);a.t<l;)a[a.t++]=0;for(;--v>=0;){var y=o[--g]==d?this.DM:Math.floor(o[g]*h+(o[g-1]+f)*m);if((o[g]+=a.am(0,y,o,v,0,l))<y)for(a.dlShiftTo(v,b),o.subTo(b,o);o[g]<--y;)o.subTo(b,o)}null!=n&&(o.drShiftTo(l,n),s!=c&&e.ZERO.subTo(n,n)),o.t=l,o.clamp(),u>0&&o.rShiftTo(u,o),s<0&&e.ZERO.subTo(o,o)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var o=Qt(),r=Qt(),i=n.convert(this),a=on(t)-1;for(i.copyTo(o);--a>=0;)if(n.sqrTo(o,r),(t&1<<a)>0)n.mulTo(r,i,o);else{var s=o;o=r,r=s}return n.revert(o)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),o=nn(n),r=Qt(),i=Qt(),a="";for(this.divRemTo(o,r,i);r.signum()>0;)a=(n+i.intValue()).toString(e).substr(1)+a,r.divRemTo(o,r,i);return i.intValue().toString(e)+a},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var o=this.chunkSize(n),r=Math.pow(n,o),i=!1,a=0,s=0,c=0;c<t.length;++c){var u=tn(t,c);u<0?"-"==t.charAt(c)&&0==this.signum()&&(i=!0):(s=n*s+u,++a>=o&&(this.dMultiply(r),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(s,0)),i&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,o){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,o),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),Et,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var r=[],i=7&t;r.length=1+(t>>3),n.nextBytes(r),i>0?r[0]&=(1<<i)-1:r[0]=0,this.fromString(r,256)}},e.prototype.bitwiseTo=function(e,t,n){var o,r,i=Math.min(e.t,this.t);for(o=0;o<i;++o)n[o]=t(this[o],e[o]);if(e.t<this.t){for(r=e.s&this.DM,o=i;o<this.t;++o)n[o]=t(this[o],r);n.t=this.t}else{for(r=this.s&this.DM,o=i;o<e.t;++o)n[o]=t(r,e[o]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var o=e.ONE.shiftLeft(t);return this.bitwiseTo(o,n,o),o},e.prototype.addTo=function(e,t){for(var n=0,o=0,r=Math.min(e.t,this.t);n<r;)o+=this[n]+e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o+=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o+=e[n],t[n++]=o&this.DM,o>>=this.DB;o+=e.s}t.s=o<0?-1:0,o>0?t[n++]=o:o<-1&&(t[n++]=this.DV+o),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var o=Math.min(this.t+e.t,t);for(n.s=0,n.t=o;o>0;)n[--o]=0;for(var r=n.t-this.t;o<r;++o)n[o+this.t]=this.am(0,e[o],n,o,0,this.t);for(r=Math.min(e.t,t);o<r;++o)this.am(0,e[o],n,o,0,t-o);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var o=n.t=this.t+e.t-t;for(n.s=0;--o>=0;)n[o]=0;for(o=Math.max(t-this.t,0);o<e.t;++o)n[this.t+o-t]=this.am(t-o,e[o],n,0,0,this.t+o-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var o=this.t-1;o>=0;--o)n=(t*n+this[o])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),o=n.getLowestSetBit();if(o<=0)return!1;var r=n.shiftRight(o);(t=t+1>>1)>Ht.length&&(t=Ht.length);for(var i=Qt(),a=0;a<t;++a){i.fromInt(Ht[Math.floor(Math.random()*Ht.length)]);var s=i.modPow(r,this);if(0!=s.compareTo(e.ONE)&&0!=s.compareTo(n)){for(var c=1;c++<o&&0!=s.compareTo(n);)if(0==(s=s.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=s.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=Qt();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),o=e.s<0?e.negate():e.clone();if(n.compareTo(o)<0){var r=n;n=o,o=r}var i=n.getLowestSetBit(),a=o.getLowestSetBit();if(a<0)t(n);else{i<a&&(a=i),a>0&&(n.rShiftTo(a,n),o.rShiftTo(a,o));setTimeout((function e(){(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),(i=o.getLowestSetBit())>0&&o.rShiftTo(i,o),n.compareTo(o)>=0?(n.subTo(o,n),n.rShiftTo(1,n)):(o.subTo(n,o),o.rShiftTo(1,o)),n.signum()>0?setTimeout(e,0):(a>0&&o.lShiftTo(a,o),setTimeout((function(){t(o)}),0))}),10)}},e.prototype.fromNumberAsync=function(t,n,o,r){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,o),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),Et,this),this.isEven()&&this.dAddOffset(1,0);var i=this;setTimeout((function o(){i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(e.ONE.shiftLeft(t-1),i),i.isProbablePrime(n)?setTimeout((function(){r()}),0):setTimeout(o,0)}),0)}else{var a=[],s=7&t;a.length=1+(t>>3),n.nextBytes(a),s>0?a[0]&=(1<<s)-1:a[0]=0,this.fromString(a,256)}},e}(),Wt=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),Kt=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),$t=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=Qt();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Gt.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=Qt();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],o=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,o,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Yt=function(){function e(e){this.m=e,this.r2=Qt(),this.q3=Qt(),Gt.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=Qt();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function Qt(){return new Gt(null)}function Jt(e,t){return new Gt(e,t)}"Microsoft Internet Explorer"==gt?(Gt.prototype.am=function(e,t,n,o,r,i){for(var a=32767&t,s=t>>15;--i>=0;){var c=32767&this[e],u=this[e++]>>15,l=s*c+u*a;r=((c=a*c+((32767&l)<<15)+n[o]+(1073741823&r))>>>30)+(l>>>15)+s*u+(r>>>30),n[o++]=1073741823&c}return r},Dt=30):"Netscape"!=gt?(Gt.prototype.am=function(e,t,n,o,r,i){for(;--i>=0;){var a=t*this[e++]+n[o]+r;r=Math.floor(a/67108864),n[o++]=67108863&a}return r},Dt=26):(Gt.prototype.am=function(e,t,n,o,r,i){for(var a=16383&t,s=t>>14;--i>=0;){var c=16383&this[e],u=this[e++]>>14,l=s*c+u*a;r=((c=a*c+((16383&l)<<14)+n[o]+r)>>28)+(l>>14)+s*u,n[o++]=268435455&c}return r},Dt=28),Gt.prototype.DB=Dt,Gt.prototype.DM=(1<<Dt)-1,Gt.prototype.DV=1<<Dt;Gt.prototype.FV=Math.pow(2,52),Gt.prototype.F1=52-Dt,Gt.prototype.F2=2*Dt-52;var Zt,Xt,en=[];for(Zt="0".charCodeAt(0),Xt=0;Xt<=9;++Xt)en[Zt++]=Xt;for(Zt="a".charCodeAt(0),Xt=10;Xt<36;++Xt)en[Zt++]=Xt;for(Zt="A".charCodeAt(0),Xt=10;Xt<36;++Xt)en[Zt++]=Xt;function tn(e,t){var n=en[e.charCodeAt(t)];return null==n?-1:n}function nn(e){var t=Qt();return t.fromInt(e),t}function on(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}Gt.ZERO=nn(0),Gt.ONE=nn(1);var rn=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,o;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,o=this.S[t],this.S[t]=this.S[n],this.S[n]=o;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();var an,sn,cn=null;if(null==cn){cn=[],sn=0;var un=void 0;if(bt.crypto&&bt.crypto.getRandomValues){var ln=new Uint32Array(256);for(bt.crypto.getRandomValues(ln),un=0;un<ln.length;++un)cn[sn++]=255&ln[un]}var dn=function e(t){if(this.count=this.count||0,this.count>=256||sn>=256)bt.removeEventListener?bt.removeEventListener("mousemove",e,!1):bt.detachEvent&&bt.detachEvent("onmousemove",e);else try{var n=t.x+t.y;cn[sn++]=255&n,this.count+=1}catch(o){}};bt.addEventListener?bt.addEventListener("mousemove",dn,!1):bt.attachEvent&&bt.attachEvent("onmousemove",dn)}function pn(){if(null==an){for(an=new rn;sn<256;){var e=Math.floor(65536*Math.random());cn[sn++]=255&e}for(an.init(cn),sn=0;sn<cn.length;++sn)cn[sn]=0;sn=0}return an.next()}var hn=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=pn()},e}();var mn=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Jt(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=function(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],o=e.length-1;o>=0&&t>0;){var r=e.charCodeAt(o--);r<128?n[--t]=r:r>127&&r<2048?(n[--t]=63&r|128,n[--t]=r>>6|192):(n[--t]=63&r|128,n[--t]=r>>6&63|128,n[--t]=r>>12|224)}n[--t]=0;for(var i=new hn,a=[];t>2;){for(a[0]=0;0==a[0];)i.nextBytes(a);n[--t]=a[0]}return n[--t]=2,n[--t]=0,new Gt(n)}(e,this.n.bitLength()+7>>3);if(null==t)return null;var n=this.doPublic(t);if(null==n)return null;var o=n.toString(16);return 0==(1&o.length)?o:"0"+o},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Jt(e,16),this.e=parseInt(t,16),this.d=Jt(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,o,r,i,a,s){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Jt(e,16),this.e=parseInt(t,16),this.d=Jt(n,16),this.p=Jt(o,16),this.q=Jt(r,16),this.dmp1=Jt(i,16),this.dmq1=Jt(a,16),this.coeff=Jt(s,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new hn,o=e>>1;this.e=parseInt(t,16);for(var r=new Gt(t,16);;){for(;this.p=new Gt(e-o,1,n),0!=this.p.subtract(Gt.ONE).gcd(r).compareTo(Gt.ONE)||!this.p.isProbablePrime(10););for(;this.q=new Gt(o,1,n),0!=this.q.subtract(Gt.ONE).gcd(r).compareTo(Gt.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var i=this.p;this.p=this.q,this.q=i}var a=this.p.subtract(Gt.ONE),s=this.q.subtract(Gt.ONE),c=a.multiply(s);if(0==c.gcd(r).compareTo(Gt.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(c),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=Jt(e,16),n=this.doPrivate(t);return null==n?null:function(e,t){var n=e.toByteArray(),o=0;for(;o<n.length&&0==n[o];)++o;if(n.length-o!=t-1||2!=n[o])return null;++o;for(;0!=n[o];)if(++o>=n.length)return null;var r="";for(;++o<n.length;){var i=255&n[o];i<128?r+=String.fromCharCode(i):i>191&&i<224?(r+=String.fromCharCode((31&i)<<6|63&n[o+1]),++o):(r+=String.fromCharCode((15&i)<<12|(63&n[o+1])<<6|63&n[o+2]),o+=2)}return r}(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var o=new hn,r=e>>1;this.e=parseInt(t,16);var i=new Gt(t,16),a=this;setTimeout((function t(){var s=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var o=a.p.subtract(Gt.ONE),r=a.q.subtract(Gt.ONE),s=o.multiply(r);0==s.gcd(i).compareTo(Gt.ONE)?(a.n=a.p.multiply(a.q),a.d=i.modInverse(s),a.dmp1=a.d.mod(o),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout((function(){n()}),0)):setTimeout(t,0)},c=function e(){a.q=Qt(),a.q.fromNumberAsync(r,1,o,(function(){a.q.subtract(Gt.ONE).gcda(i,(function(t){0==t.compareTo(Gt.ONE)&&a.q.isProbablePrime(10)?setTimeout(s,0):setTimeout(e,0)}))}))};setTimeout((function t(){a.p=Qt(),a.p.fromNumberAsync(e-r,1,o,(function(){a.p.subtract(Gt.ONE).gcda(i,(function(e){0==e.compareTo(Gt.ONE)&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(t,0)}))}))}),0)}),0)},e.prototype.sign=function(e,t,n){var o=function(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,o="",r=0;r<n;r+=2)o+="ff";return Jt("0001"+o+"00"+e,16)}((fn[n]||"")+t(e).toString(),this.n.bitLength()/4);if(null==o)return null;var r=this.doPrivate(o);if(null==r)return null;var i=r.toString(16);return 0==(1&i.length)?i:"0"+i},e.prototype.verify=function(e,t,n){var o=Jt(t,16),r=this.doPublic(o);return null==r?null:function(e){for(var t in fn)if(fn.hasOwnProperty(t)){var n=fn[t],o=n.length;if(e.substr(0,o)==n)return e.substr(o)}return e}(r.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();var fn={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};var gn={};gn.lang={extend:function(e,t,n){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var o=function(){};if(o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),n){var r;for(r in n)e.prototype[r]=n[r];var i=function(){},a=["toString","valueOf"];try{/MSIE/.test(vt)&&(i=function(e,t){for(r=0;r<a.length;r+=1){var n=a[r],o=t[n];"function"===typeof o&&o!=Object.prototype[n]&&(e[n]=o)}})}catch(s){}i(e.prototype,n)}}};var vn={};function bn(e){var t=mn.call(this)||this;return e&&("string"===typeof e?t.parseKey(e):(bn.hasPrivateKeyProperty(e)||bn.hasPublicKeyProperty(e))&&t.parsePropertiesFrom(e)),t}function yn(e){e=e||{},this.default_key_size=parseInt(e.default_key_size,10)||1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}"undefined"!=typeof vn.asn1&&vn.asn1||(vn.asn1={}),vn.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var o="",r=0;r<n;r++)o+="f";t=new Gt(o,16).xor(e).add(Gt.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=vn.asn1,n=t.DERBoolean,o=t.DERInteger,r=t.DERBitString,i=t.DEROctetString,a=t.DERNull,s=t.DERObjectIdentifier,c=t.DEREnumerated,u=t.DERUTF8String,l=t.DERNumericString,d=t.DERPrintableString,p=t.DERTeletexString,h=t.DERIA5String,m=t.DERUTCTime,f=t.DERGeneralizedTime,g=t.DERSequence,v=t.DERSet,b=t.DERTaggedObject,y=t.ASN1Util.newObject,C=Object.keys(e);if(1!=C.length)throw"key of param shall be only one.";var E=C[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+E+":"))throw"undefined key: "+E;if("bool"==E)return new n(e[E]);if("int"==E)return new o(e[E]);if("bitstr"==E)return new r(e[E]);if("octstr"==E)return new i(e[E]);if("null"==E)return new a(e[E]);if("oid"==E)return new s(e[E]);if("enum"==E)return new c(e[E]);if("utf8str"==E)return new u(e[E]);if("numstr"==E)return new l(e[E]);if("prnstr"==E)return new d(e[E]);if("telstr"==E)return new p(e[E]);if("ia5str"==E)return new h(e[E]);if("utctime"==E)return new m(e[E]);if("gentime"==E)return new f(e[E]);if("seq"==E){for(var w=e[E],O=[],S=0;S<w.length;S++){var k=y(w[S]);O.push(k)}return new g({array:O})}if("set"==E){for(w=e[E],O=[],S=0;S<w.length;S++){k=y(w[S]);O.push(k)}return new v({array:O})}if("tag"==E){var T=e[E];if("[object Array]"===Object.prototype.toString.call(T)&&3==T.length){var P=y(T[2]);return new b({tag:T[0],explicit:T[1],obj:P})}var N={};if(void 0!==T.explicit&&(N.explicit=T.explicit),void 0!==T.tag&&(N.tag=T.tag),void 0===T.obj)throw"obj shall be specified for 'tag'.";return N.obj=y(T.obj),new b(N)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},vn.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substr(0,2),16),o=(t=Math.floor(n/40)+"."+n%40,""),r=2;r<e.length;r+=2){var i=("00000000"+parseInt(e.substr(r,2),16).toString(2)).slice(-8);if(o+=i.substr(1,7),"0"==i.substr(0,1))t=t+"."+new Gt(o,2).toString(10),o=""}return t},vn.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",o=new Gt(e,10).toString(2),r=7-o.length%7;7==r&&(r=0);for(var i="",a=0;a<r;a++)i+="0";o=i+o;for(a=0;a<o.length-1;a+=7){var s=o.substr(a,7);a!=o.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var o="",r=e.split("."),i=40*parseInt(r[0])+parseInt(r[1]);o+=t(i),r.splice(0,2);for(var a=0;a<r.length;a++)o+=n(r[a]);return o},vn.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if("undefined"==typeof this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var n=t.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},vn.asn1.DERAbstractString=function(e){vn.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("string"==typeof e?this.setString(e):"undefined"!=typeof e.str?this.setString(e.str):"undefined"!=typeof e.hex&&this.setStringHex(e.hex))},gn.lang.extend(vn.asn1.DERAbstractString,vn.asn1.ASN1Object),vn.asn1.DERAbstractTime=function(e){vn.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,n){var o=this.zeroPadding,r=this.localDateToUTC(e),i=String(r.getFullYear());"utc"==t&&(i=i.substr(2,2));var a=i+o(String(r.getMonth()+1),2)+o(String(r.getDate()),2)+o(String(r.getHours()),2)+o(String(r.getMinutes()),2)+o(String(r.getSeconds()),2);if(!0===n){var s=r.getMilliseconds();if(0!=s){var c=o(String(s),3);a=a+"."+(c=c.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,n,o,r,i){var a=new Date(Date.UTC(e,t-1,n,o,r,i,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},gn.lang.extend(vn.asn1.DERAbstractTime,vn.asn1.ASN1Object),vn.asn1.DERAbstractStructured=function(e){vn.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,"undefined"!=typeof e&&"undefined"!=typeof e.array&&(this.asn1Array=e.array)},gn.lang.extend(vn.asn1.DERAbstractStructured,vn.asn1.ASN1Object),vn.asn1.DERBoolean=function(){vn.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},gn.lang.extend(vn.asn1.DERBoolean,vn.asn1.ASN1Object),vn.asn1.DERInteger=function(e){vn.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=vn.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new Gt(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("undefined"!=typeof e.bigint?this.setByBigInteger(e.bigint):"undefined"!=typeof e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):"undefined"!=typeof e.hex&&this.setValueHex(e.hex))},gn.lang.extend(vn.asn1.DERInteger,vn.asn1.ASN1Object),vn.asn1.DERBitString=function(e){if(void 0!==e&&"undefined"!==typeof e.obj){var t=vn.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}vn.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var o="";for(n=0;n<e.length-1;n+=8){var r=e.substr(n,8),i=parseInt(r,2).toString(16);1==i.length&&(i="0"+i),o+=i}this.hTLV=null,this.isModified=!0,this.hV="0"+t+o},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!1;return t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):"undefined"!=typeof e.hex?this.setHexValueIncludingUnusedBits(e.hex):"undefined"!=typeof e.bin?this.setByBinaryString(e.bin):"undefined"!=typeof e.array&&this.setByBooleanArray(e.array))},gn.lang.extend(vn.asn1.DERBitString,vn.asn1.ASN1Object),vn.asn1.DEROctetString=function(e){if(void 0!==e&&"undefined"!==typeof e.obj){var t=vn.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}vn.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},gn.lang.extend(vn.asn1.DEROctetString,vn.asn1.DERAbstractString),vn.asn1.DERNull=function(){vn.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},gn.lang.extend(vn.asn1.DERNull,vn.asn1.ASN1Object),vn.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",o=new Gt(e,10).toString(2),r=7-o.length%7;7==r&&(r=0);for(var i="",a=0;a<r;a++)i+="0";o=i+o;for(a=0;a<o.length-1;a+=7){var s=o.substr(a,7);a!=o.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n};vn.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var o="",r=e.split("."),i=40*parseInt(r[0])+parseInt(r[1]);o+=t(i),r.splice(0,2);for(var a=0;a<r.length;a++)o+=n(r[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=o},this.setValueName=function(e){var t=vn.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"===typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},gn.lang.extend(vn.asn1.DERObjectIdentifier,vn.asn1.ASN1Object),vn.asn1.DEREnumerated=function(e){vn.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=vn.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new Gt(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("undefined"!=typeof e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):"undefined"!=typeof e.hex&&this.setValueHex(e.hex))},gn.lang.extend(vn.asn1.DEREnumerated,vn.asn1.ASN1Object),vn.asn1.DERUTF8String=function(e){vn.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},gn.lang.extend(vn.asn1.DERUTF8String,vn.asn1.DERAbstractString),vn.asn1.DERNumericString=function(e){vn.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},gn.lang.extend(vn.asn1.DERNumericString,vn.asn1.DERAbstractString),vn.asn1.DERPrintableString=function(e){vn.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},gn.lang.extend(vn.asn1.DERPrintableString,vn.asn1.DERAbstractString),vn.asn1.DERTeletexString=function(e){vn.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},gn.lang.extend(vn.asn1.DERTeletexString,vn.asn1.DERAbstractString),vn.asn1.DERIA5String=function(e){vn.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},gn.lang.extend(vn.asn1.DERIA5String,vn.asn1.DERAbstractString),vn.asn1.DERUTCTime=function(e){vn.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return"undefined"==typeof this.date&&"undefined"==typeof this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},gn.lang.extend(vn.asn1.DERUTCTime,vn.asn1.DERAbstractTime),vn.asn1.DERGeneralizedTime=function(e){vn.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},gn.lang.extend(vn.asn1.DERGeneralizedTime,vn.asn1.DERAbstractTime),vn.asn1.DERSequence=function(e){vn.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){e+=this.asn1Array[t].getEncodedHex()}return this.hV=e,this.hV}},gn.lang.extend(vn.asn1.DERSequence,vn.asn1.DERAbstractStructured),vn.asn1.DERSet=function(e){vn.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var n=this.asn1Array[t];e.push(n.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},"undefined"!=typeof e&&"undefined"!=typeof e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},gn.lang.extend(vn.asn1.DERSet,vn.asn1.DERAbstractStructured),vn.asn1.DERTaggedObject=function(e){vn.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("undefined"!=typeof e.tag&&(this.hT=e.tag),"undefined"!=typeof e.explicit&&(this.isExplicit=e.explicit),"undefined"!=typeof e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},gn.lang.extend(vn.asn1.DERTaggedObject,vn.asn1.ASN1Object),function(e,t){function n(){this.constructor=e}xt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(bn,mn),bn.prototype.parseKey=function(e){try{var t=0,n=0,o=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?jt(e):_t.unarmor(e),r=Ut.decode(o);if(3===r.sub.length&&(r=r.sub[2].sub[0]),9===r.sub.length){t=r.sub[1].getHexStringValue(),this.n=Jt(t,16),n=r.sub[2].getHexStringValue(),this.e=parseInt(n,16);var i=r.sub[3].getHexStringValue();this.d=Jt(i,16);var a=r.sub[4].getHexStringValue();this.p=Jt(a,16);var s=r.sub[5].getHexStringValue();this.q=Jt(s,16);var c=r.sub[6].getHexStringValue();this.dmp1=Jt(c,16);var u=r.sub[7].getHexStringValue();this.dmq1=Jt(u,16);var l=r.sub[8].getHexStringValue();this.coeff=Jt(l,16)}else{if(2!==r.sub.length)return!1;var d=r.sub[1].sub[0];t=d.sub[0].getHexStringValue(),this.n=Jt(t,16),n=d.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(p){return!1}},bn.prototype.getPrivateBaseKey=function(){var e={array:[new vn.asn1.DERInteger({int:0}),new vn.asn1.DERInteger({bigint:this.n}),new vn.asn1.DERInteger({int:this.e}),new vn.asn1.DERInteger({bigint:this.d}),new vn.asn1.DERInteger({bigint:this.p}),new vn.asn1.DERInteger({bigint:this.q}),new vn.asn1.DERInteger({bigint:this.dmp1}),new vn.asn1.DERInteger({bigint:this.dmq1}),new vn.asn1.DERInteger({bigint:this.coeff})]};return new vn.asn1.DERSequence(e).getEncodedHex()},bn.prototype.getPrivateBaseKeyB64=function(){return Pt(this.getPrivateBaseKey())},bn.prototype.getPublicBaseKey=function(){var e=new vn.asn1.DERSequence({array:[new vn.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new vn.asn1.DERNull]}),t=new vn.asn1.DERSequence({array:[new vn.asn1.DERInteger({bigint:this.n}),new vn.asn1.DERInteger({int:this.e})]}),n=new vn.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new vn.asn1.DERSequence({array:[e,n]}).getEncodedHex()},bn.prototype.getPublicBaseKeyB64=function(){return Pt(this.getPublicBaseKey())},bn.wordwrap=function(e,t){if(!e)return e;var n="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(n,"g")).join("\n")},bn.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=bn.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},bn.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=bn.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},bn.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},bn.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},bn.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},yn.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new bn(e)},yn.prototype.setPrivateKey=function(e){this.setKey(e)},yn.prototype.setPublicKey=function(e){this.setKey(e)},yn.prototype.decrypt=function(e){try{return this.getKey().decrypt(Nt(e))}catch(t){return!1}},yn.prototype.encrypt=function(e){try{return Pt(this.getKey().encrypt(e))}catch(t){return!1}},yn.prototype.sign=function(e,t,n){try{return Pt(this.getKey().sign(e,t,n))}catch(o){return!1}},yn.prototype.verify=function(e,t,n){try{return this.getKey().verify(e,Nt(t),n)}catch(o){return!1}},yn.prototype.getKey=function(e){if(!this.key){if(this.key=new bn,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},yn.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},yn.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},yn.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},yn.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},yn.version="3.0.0-rc.1";var Cn=n(32),En=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();var wn=function(){function e(){this.tlv=null,this.t="00",this.l="00",this.v=""}return e.prototype.getEncodedHex=function(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv},e.prototype.getLength=function(){var e=this.v.length/2,t=e.toString(16);return t.length%2===1&&(t="0"+t),e<128?t:(128+t.length/2).toString(16)+t},e.prototype.getValue=function(){return""},e}();(function(e){function t(t){var n=e.call(this)||this;return n.t="02",t&&(n.v=function(e){var t=e.toString(16);if("-"!==t[0])t.length%2===1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=(t=t.substr(1)).length;n%2===1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var o="",r=0;r<n;r++)o+="f";t=(t=(o=new Cn.BigInteger(o,16)).xor(e).add(Cn.BigInteger.ONE)).toString(16).replace(/^-/,"")}return t}(t)),n}En(t,e),t.prototype.getValue=function(){return this.v}})(wn),function(e){function t(t){var n=e.call(this)||this;return n.t="30",n.asn1Array=t,n}En(t,e),t.prototype.getValue=function(){return this.v=this.asn1Array.map((function(e){return e.getEncodedHex()})).join(""),this.v}}(wn);var On=new Cn.BigInteger("3"),Sn=function(){function e(e,t){this.x=t,this.q=e}return e.prototype.equals=function(e){return e===this||this.q.equals(e.q)&&this.x.equals(e.x)},e.prototype.toBigInteger=function(){return this.x},e.prototype.negate=function(){return new e(this.q,this.x.negate().mod(this.q))},e.prototype.add=function(t){return new e(this.q,this.x.add(t.toBigInteger()).mod(this.q))},e.prototype.subtract=function(t){return new e(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))},e.prototype.multiply=function(t){return new e(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))},e.prototype.divide=function(t){return new e(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))},e.prototype.square=function(){return new e(this.q,this.x.square().mod(this.q))},e}(),kn=function(){function e(e,t,n,o){this.curve=e,this.x=t,this.y=n,this.z=null==o?Cn.BigInteger.ONE:o,this.zinv=null}return e.prototype.getX=function(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},e.prototype.getY=function(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},e.prototype.equals=function(e){return e===this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(Cn.BigInteger.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(Cn.BigInteger.ZERO))},e.prototype.isInfinity=function(){return null===this.x&&null===this.y||this.z.equals(Cn.BigInteger.ZERO)&&!this.y.toBigInteger().equals(Cn.BigInteger.ZERO)},e.prototype.negate=function(){return new e(this.curve,this.x,this.y.negate(),this.z)},e.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var n=this.x.toBigInteger(),o=this.y.toBigInteger(),r=this.z,i=t.x.toBigInteger(),a=t.y.toBigInteger(),s=t.z,c=this.curve.q,u=n.multiply(s).mod(c),l=i.multiply(r).mod(c),d=u.subtract(l),p=o.multiply(s).mod(c),h=a.multiply(r).mod(c),m=p.subtract(h);if(Cn.BigInteger.ZERO.equals(d))return Cn.BigInteger.ZERO.equals(m)?this.twice():this.curve.infinity;var f=u.add(l),g=r.multiply(s).mod(c),v=d.square().mod(c),b=d.multiply(v).mod(c),y=g.multiply(m.square()).subtract(f.multiply(v)).mod(c),C=d.multiply(y).mod(c),E=m.multiply(v.multiply(u).subtract(y)).subtract(p.multiply(b)).mod(c),w=b.multiply(g).mod(c);return new e(this.curve,this.curve.fromBigInteger(C),this.curve.fromBigInteger(E),w)},e.prototype.twice=function(){if(this.isInfinity())return this;if(!this.y.toBigInteger().signum())return this.curve.infinity;var t=this.x.toBigInteger(),n=this.y.toBigInteger(),o=this.z,r=this.curve.q,i=this.curve.a.toBigInteger(),a=t.square().multiply(On).add(i.multiply(o.square())).mod(r),s=n.shiftLeft(1).multiply(o).mod(r),c=n.square().mod(r),u=c.multiply(t).multiply(o).mod(r),l=s.square().mod(r),d=a.square().subtract(u.shiftLeft(3)).mod(r),p=s.multiply(d).mod(r),h=a.multiply(u.shiftLeft(2).subtract(d)).subtract(l.shiftLeft(1).multiply(c)).mod(r),m=s.multiply(l).mod(r);return new e(this.curve,this.curve.fromBigInteger(p),this.curve.fromBigInteger(h),m)},e.prototype.multiply=function(e){if(this.isInfinity())return this;if(!e.signum())return this.curve.infinity;for(var t=e.multiply(On),n=this.negate(),o=this,r=t.bitLength()-2;r>0;r--){o=o.twice();var i=t.testBit(r);i!==e.testBit(r)&&(o=o.add(i?this:n))}return o},e}(),Tn=function(){function e(e,t,n){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(n),this.infinity=new kn(this,null,null)}return e.prototype.equals=function(e){return e===this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},e.prototype.fromBigInteger=function(e){return new Sn(this.q,e)},e.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var t=(e.length-2)/2,n=e.substr(2,t),o=e.substr(t+2,t);return new kn(this,this.fromBigInteger(new Cn.BigInteger(n,16)),this.fromBigInteger(new Cn.BigInteger(o,16)));default:return null}},e}(),Pn=new Cn.SecureRandom,Nn=_n(),An=Nn.curve,xn=Nn.G,In=Nn.n;function jn(){return An}function _n(){var e=new Cn.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),t=new Cn.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),n=new Cn.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16),o=new Tn(e,t,n),r=o.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:o,G:r,n:new Cn.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}function Ln(e,t,n){var o=(e?new Cn.BigInteger(e,t,n):new Cn.BigInteger(In.bitLength(),Pn)).mod(In.subtract(Cn.BigInteger.ONE)).add(Cn.BigInteger.ONE),r=Mn(o.toString(16),64),i=xn.multiply(o);return{privateKey:r,publicKey:"04"+Mn(i.getX().toBigInteger().toString(16),64)+Mn(i.getY().toBigInteger().toString(16),64)}}function Rn(e){for(var t=(e=unescape(encodeURIComponent(e))).length,n=[],o=0;o<t;o++)n[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;var r=[];for(o=0;o<t;o++){var i=n[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")}function Mn(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e}function Fn(e){return e.map((function(e){return 1===(e=e.toString(16)).length?"0"+e:e})).join("")}function Bn(e){var t=[],n=e.length;n%2!==0&&(e=Mn(e,n+1)),n=e.length;for(var o=0;o<n;o+=2)t.push(parseInt(e.substr(o,2),16));return t}function Dn(e,t){for(var n=[],o=~~(t/8),r=t%8,i=0,a=e.length;i<a;i++)n[i]=(e[(i+o)%a]<<r&255)+(e[(i+o+1)%a]>>>8-r&255);return n}function qn(e,t){for(var n=[],o=e.length-1;o>=0;o--)n[o]=255&(e[o]^t[o]);return n}function Un(e,t){for(var n=[],o=e.length-1;o>=0;o--)n[o]=e[o]&t[o]&255;return n}function Vn(e,t){for(var n=[],o=e.length-1;o>=0;o--)n[o]=255&(e[o]|t[o]);return n}function Hn(e,t){for(var n=[],o=0,r=e.length-1;r>=0;r--){var i=e[r]+t[r]+o;i>255?(o=1,n[r]=255&i):(o=0,n[r]=255&i)}return n}function zn(e){return qn(qn(e,Dn(e,9)),Dn(e,17))}function Gn(e,t,n,o){return o>=0&&o<=15?qn(qn(e,t),n):Vn(Vn(Un(e,t),Un(e,n)),Un(t,n))}function Wn(e,t,n,o){return o>=0&&o<=15?qn(qn(e,t),n):Vn(Un(e,t),Un(function(e){for(var t=[],n=e.length-1;n>=0;n--)t[n]=255&~e[n];return t}(e),n))}function Kn(e,t){for(var n,o=[],r=[],i=0;i<16;i++){var a=4*i;o.push(t.slice(a,a+4))}for(var s=16;s<68;s++)o.push(qn(qn((n=qn(qn(o[s-16],o[s-9]),Dn(o[s-3],15)),qn(qn(n,Dn(n,15)),Dn(n,23))),Dn(o[s-13],7)),o[s-6]));for(s=0;s<64;s++)r.push(qn(o[s],o[s+4]));var c,u,l,d,p=[121,204,69,25],h=[122,135,157,138],m=e.slice(0,4),f=e.slice(4,8),g=e.slice(8,12),v=e.slice(12,16),b=e.slice(16,20),y=e.slice(20,24),C=e.slice(24,28),E=e.slice(28,32);for(s=0;s<64;s++){var w=s>=0&&s<=15?p:h;u=qn(c=Dn(Hn(Hn(Dn(m,12),b),Dn(w,s)),7),Dn(m,12)),l=Hn(Hn(Hn(Gn(m,f,g,s),v),u),r[s]),d=Hn(Hn(Hn(Wn(b,y,C,s),E),c),o[s]),v=g,g=Dn(f,9),f=m,m=l,E=C,C=Dn(y,19),y=b,b=zn(d)}return qn([].concat(m,f,g,v,b,y,C,E),e)}function $n(e){var t=8*e.length,n=t%512;n=n>=448?512-n%448-1:448-n-1;for(var o=new Array((n-7)/8),r=0,i=o.length;r<i;r++)o[r]=0;var a=[];t=t.toString(2);for(r=7;r>=0;r--)if(t.length>8){var s=t.length-8;a[r]=parseInt(t.substr(s),2),t=t.substr(0,s)}else t.length>0?(a[r]=parseInt(t,2),t=""):a[r]=0;var c=[].concat(e,[128],o,a),u=c.length/64,l=[115,128,22,111,73,20,178,185,23,36,66,215,218,138,6,0,169,111,48,188,22,49,56,170,227,141,238,77,176,251,14,78];for(r=0;r<u;r++){s=64*r;l=Kn(l,c.slice(s,s+64))}return l}var Yn=function(e,t){for(var n=0,o=t.length,r=e.length;n<o;n++,r++)e[r]=t[n];return e},Qn=_n();Qn.G,Qn.curve,Qn.n;var Jn=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},Zn=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};var Xn=function(e,t){var n=void 0===t?{w:585,h:649}:t,o=n.w,r=n.h,i=void 0!==window.screenLeft?window.screenLeft:window.screenX,a=void 0!==window.screenTop?window.screenTop:window.screenY,s=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,c=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,u=s/window.screen.availWidth,l=(s-o)/2/u+i,d=(c-r)/2/u+a,p=window.open(e,"_blank","\n toolbar=no,\n menubar=no,\n scrollbars=no,\n resizable=no,\n location=no,\n status=no\n width="+o/u+",\n height="+r/u+",\n top="+d+",\n left="+l+"\n ");return null===p||void 0===p||p.focus(),p},eo=function(e,t){var n=document.createElement("style"),o="\n ."+e+" {\n "+t+"\n }\n ",r=document.createTextNode(o);n.appendChild(r),document.head.appendChild(n)},to=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")},no=function(e){for(var t=0,n=e;t<n.length;t++){var o=n[t],r=o.dataType,i=o.value;r===Qe.Number||r===Qe.Boolean?o.value=JSON.parse(i):r===Qe.Datetime?o.value=new Date(parseInt(i)):r===Qe.Object&&(o.value=JSON.parse(i))}return e},oo=function(e){for(var t=0,n=e=e||[];t<n.length;t++){var o=(u=n[t]).dataType,r=u.value;o===Qe.Number||o===Qe.Boolean?u.value=JSON.parse(r):o===Qe.Datetime?u.value="string"!=typeof(i=r)||isNaN(i)||isNaN(parseFloat(i))?new Date(r):new Date(parseInt(r)):o===Qe.Object&&(u.value=JSON.parse(r))}for(var i,a={},s=0,c=e;s<c.length;s++){var u;a[(u=c[s]).key]=u.value}return a},ro=function(){return"undefined"!==typeof navigator&&/MicroMessenger/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)},io=function(){return ro()||"undefined"!==typeof navigator&&/Lark/i.test(navigator.userAgent)};function ao(e){for(var t=[],n=97;n<123;n++)t.push(String.fromCharCode(n));for(var o=[];e--;){var r=Math.floor(16*Math.random());o.push(t[r])}return o.join("")}var so=function(e,t){return new Promise((function(n,o){var r=new FormData;r.append("file",e,e instanceof Blob?"personal.jpeg":void 0);var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===this.readyState)try{var e=JSON.parse(this.responseText),t=e.code,r=e.message,i=e.data;200!==t&&o({code:t,message:r}),n(i)}catch(a){t=500,r="\u4e0a\u4f20\u56fe\u7247\u5931\u8d25, error = "+a.message;o({code:t,message:r})}},i.open("POST",t),i.send(r)}))};function co(e){var t=e.url,n=e.accept,o=e.multiple;return new Promise((function(e,r){var i=document.createElement("input");i.type="file",i.accept=n,i.multiple=o,i.onchange=function(){var n=i.files;if(o){for(var a=[],s=0;s<n.length;)a.push(so(n[s],t)),s++;Promise.all(a).then((function(t){return e(t)})).catch((function(e){return r(e)}))}else{var c=n[0];so(c,t).then((function(t){return e(t)})).catch((function(e){return r(e)}))}},i.click()}))}var uo=function(e){for(var t=[],n=0,o=Object.keys(e);n<o.length;n++){var r=o[n];t.push({key:r,value:e[r]})}return t};var lo,po,ho,mo,fo,go,vo,bo,yo,Co=function(e,t){for(var n={},o=0,r=Object.keys(e);o<r.length;o++){var i=r[o];t(e[i],i)&&(n[i]=e[i])}return n},Eo=function(){return(Eo=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},wo=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},Oo=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},So=function(){function e(e,t){this.endpoint=e,this.options=t,this.axios=ft.a.create({withCredentials:!0})}return e.prototype.setOptions=function(e){this.options=e},e.prototype.request=function(e){var t,n;return wo(this,void 0,void 0,(function(){var o,r,i,a,s,c,u,l,d,p,h,m,f,g=this;return Oo(this,(function(v){switch(v.label){case 0:o=e.query,r=e.token,i=e.variables,(a={"content-type":"application/json"})[this.options.headers["app-id"]]=this.options.appId||"",a[this.options.headers["tenant-id"]]=this.options.tenantId,a[this.options.headers["userpool-id"]]=this.options.userPoolId||"",a[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",a[this.options.headers["sdk-version"]]="js:4.21.8",a[this.options.headers.lang]=this.options.lang||"",r&&(a.Authorization="Bearer "+r),s=null,c=null,v.label=1;case 1:return v.trys.push([1,3,,4]),[4,this.axios({url:this.endpoint,data:{query:o,variables:i},method:"post",headers:Eo({},Co(a,(function(e){return!!e}))),timeout:this.options.timeout})];case 2:return u=v.sent().data,s=u.data,c=u.errors,[3,4];case 3:throw l=v.sent(),d=l.code||(null===(t=null===l||void 0===l?void 0:l.response)||void 0===t?void 0:t.status),p=l.message||(null===(n=null===l||void 0===l?void 0:l.response)||void 0===n?void 0:n.data),this.options.onError(d||500,l.message,p),{code:d||500,message:l.message,data:p};case 4:if((null===c||void 0===c?void 0:c.length)>0)throw h=null,m=null,f=null,c.map((function(e){var t=e.message,n=t.code,o=t.message,r=t.data;m=n,h=o,f=r,g.options.onError(n,o,f)})),{code:m,message:h,data:f};return[2,s]}}))}))},e}();!function(e){e[e.LOW=1]="LOW",e[e.MIDDLE=2]="MIDDLE",e[e.HIGH=3]="HIGH"}(lo||(lo={})),function(e){e.ALIPAY="alipay",e.GOOGLE="google",e.WECHATPC="wechat:pc",e.WECHATMP="wechat:webpage-authorization",e.WECHAT_MINIPROGRAM="wechat:miniprogram:default",e.WECHAT_MINIPROGRAM_QRCODE="wechat:miniprogram:qrconnect",e.WECHAT_MINIPROGRAM_APPLAUNCH="wechat:miniprogram:app-launch",e.WECHATMOBILE="wechat:mobile",e.GITHUB="github",e.QQ="qq",e.WECHATWORK_ADDRESS_BOOK="wechatwork:addressbook",e.WECHATWORK_CORP_QRCONNECT="wechatwork:corp:qrconnect",e.WECHATWORK_SERVICEPROVIDER_QRCONNECT="wechatwork:service-provider:qrconnect",e.DINGTALK="dingtalk",e.WEIBO="weibo",e.APPLE="apple",e.APPLE_WEB="apple:web",e.LARK_PUBLIC="lark-public",e.LARK_INTERNAL="lark-internal",e.BAIDU="baidu",e.LINKEDIN="linkedin",e.SLACK="slack",e.YIDUN="yidun",e.QINGCLOUD="qingcloud",e.FACEBOOK="facebook"}(po||(po={})),function(e){e.OIDC="oidc",e.OAUTH="oauth",e.SAML="saml",e.CAS="cas",e.AZURE_AD="azure-ad"}(ho||(ho={})),function(e){e[e.NoCheck=0]="NoCheck",e[e.Low=1]="Low",e[e.Middle=2]="Middle",e[e.High=3]="High"}(mo||(mo={})),function(e){e.Email="email",e.Phone="phone"}(fo||(fo={})),function(e){e.LDAP="ldap",e.AppQr="app-qrcode",e.Password="password",e.PhoneCode="phone-code",e.WxMinQr="wechat-miniprogram-qrcode",e.AD="ad",e.Landray="Landray"}(go||(go={})),function(e){e.FRONT_CHANNEL="FRONT_CHANNEL",e.BACK_CHANNEL="BACK_CHANNEL"}(vo||(vo={})),function(e){e.SCENE_TYPE_LOGIN="login",e.SCENE_TYPE_REGISTER="register",e.SCENE_TYPE_RESET="reset",e.SCENE_TYPE_BIND="bind",e.SCENE_TYPE_UNBIND="unbind",e.SCENE_TYPE_MFA_BIND="mfa-bind",e.SCENE_TYPE_MFA_VERIFY="mfa-verify",e.SCENE_TYPE_MFA_UNBIND="mfa-unbind",e.SCENE_TYPE_COMPLETE_PHONE="complete-phone"}(bo||(bo={})),function(e){e.WEB_MESSAGE="web_message",e.FORM_POST="form_post",e.QUERY="query"}(yo||(yo={}));var ko,To,Po,No,Ao=function(){function e(e){this.options=e}return Object.defineProperty(e.prototype,"appHost",{get:function(){var e=this.options,t=e.appHost,n=e.domain,o=e.host;return t?t.replace(/\/$/,""):n?new URL(this.options.host).protocol+"//"+this.options.domain:o},enumerable:!1,configurable:!0}),e}(),xo=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},Io=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},jo=function(){function e(e,t,n,o){this.options=e,this.tokenProvider=t,this.httpClient=n,this.scene=o,this.baseClient=new Ao(e)}return e.prototype.startScanning=function(e,t){return xo(this,void 0,void 0,(function(){var n,o,r,i,a,s,c,u,l,d,p,h,m,f,g,v,b,y,C,E,w,O,S,k,T,P,N,A,x,I,j,_,L,R,M,F,B,D,q,U,V,H,z,G,W,K,$,Y,Q,J,Z,X,ee,te=this;return Io(this,(function(ne){switch(n=(t=t||{}).autoExchangeUserInfo,o=void 0!==n&&n,r=t.size,i=void 0===r?{height:240,width:240}:r,a=t.containerSize,s=void 0===a?{height:300,width:300}:a,c=t.interval,u=void 0===c?800:c,l=t.onStart,d=t.onResult,p=t.onScanned,h=t.onExpired,m=t.onSuccess,f=t.onCancel,g=t.onError,v=t.onCodeShow,b=t.onCodeLoaded,y=t.onCodeLoadFailed,C=t.onRetry,E=t.onMfa,w=t.onAuthFlow,O=t.tips,S=void 0===O?{}:O,k=t.context,T=t.customData,P=t.extIdpConnId,N=t.withCustomData,A=this.options.lang,x="zh-CN"===A,I={zh_CN:"",en_US:""},this.scene){case"APP_AUTH":I.zh_CN="\u4f7f\u7528 <strong> APP </strong> \u626b\u7801\u767b\u5f55",I.en_US="use <strong> APP </strong> scan code login";break;case"WECHAT_AUTH":case"WECHATMP_AUTH":I.zh_CN="\u4f7f\u7528 <strong> \u5fae\u4fe1 </strong> \u626b\u7801\u767b\u5f55",I.en_US="use <strong> \u5fae\u4fe1 </strong> scan code login";break;case"LANDRAY_AUTH":I.zh_CN="\u4f7f\u7528 <strong> \u84dd\u51cc KK </strong> \u626b\u7801\u767b\u5f55",I.en_US="use <strong> Landray KK </strong> scan code login"}return j=S.title,_=void 0===j?x?I.zh_CN:I.en_US:j,L=S.canceled,R=void 0===L?x?"\u7528\u6237\u53d6\u6d88\u6388\u6743":"User cancel authorization":L,M=S.expired,F=void 0===M?x?"\u4e8c\u7ef4\u7801\u5df2\u8fc7\u671f":"QR code has expired":M,B=S.succeed,D=void 0===B?x?"\u626b\u7801\u6210\u529f":"Scan code successfully":B,q=S.retry,U=void 0===q?x?"\u91cd\u8bd5":"Retry":q,V=document.getElementById(e),z=!1,V?V.style.position="relative":((V=document.createElement("div")).id=e,eo("__authing-qrcode-node-mount","z-index: 65535;position: fixed;background: #fff;width: "+s.width+"px;height: "+s.height+"px;left: 50%;margin-left: -"+s.width/2+"px;display: flex;justify-content: center;align-items: center;top: 50%;margin-top: -"+s.height/2+"px;border: 1px solid #ccc;"),V.classList.add("__authing-qrcode-node-mount"),document.getElementsByTagName("body")[0].appendChild(V),z=!0),G=document.createElement("style"),W="#authing__retry a:hover{outline:0px;text-decoration:none;}#authing__spinner{position:absolute;left:50%;margin-left:-6px;}.spinner{margin:100px auto;width:20px;height:20px;position:relative}.container1>div,.container2>div,.container3>div{width:6px;height:6px;background-color:#00a1ea;border-radius:100%;position:absolute;-webkit-animation:bouncedelay 1.2s infinite ease-in-out;animation:bouncedelay 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner .spinner-container{position:absolute;width:100%;height:100%}.container2{-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}.container3{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}.circle1{top:0;left:0}.circle2{top:0;right:0}.circle3{right:0;bottom:0}.circle4{left:0;bottom:0}.container2 .circle1{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1{-webkit-animation-delay:-1.0s;animation-delay:-1.0s}.container1 .circle2{-webkit-animation-delay:-0.9s;animation-delay:-0.9s}.container2 .circle2{-webkit-animation-delay:-0.8s;animation-delay:-0.8s}.container3 .circle2{-webkit-animation-delay:-0.7s;animation-delay:-0.7s}.container1 .circle3{-webkit-animation-delay:-0.6s;animation-delay:-0.6s}.container2 .circle3{-webkit-animation-delay:-0.5s;animation-delay:-0.5s}.container3 .circle3{-webkit-animation-delay:-0.4s;animation-delay:-0.4s}.container1 .circle4{-webkit-animation-delay:-0.3s;animation-delay:-0.3s}.container2 .circle4{-webkit-animation-delay:-0.2s;animation-delay:-0.2s}.container3 .circle4{-webkit-animation-delay:-0.1s;animation-delay:-0.1s}@-webkit-keyframes bouncedelay{0%,80%,100%{-webkit-transform:scale(0.0)}40%{-webkit-transform:scale(1.0)}}@keyframes bouncedelay{0%,80%,100%{transform:scale(0.0);-webkit-transform:scale(0.0)}40%{transform:scale(1.0);-webkit-transform:scale(1.0)}}",G.type="text/css",G.style?G.style.cssText=W:G.innerHTML=W,document.getElementsByTagName("head")[0].appendChild(G),K=function(){V.innerHTML='<div id="authing__spinner" class="spinner"><div class="spinner-container container1"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container2"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container3"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div></div>'},$=function(){var e=document.getElementById("authing__spinner");e&&V.removeChild(e)},Y=function(e){var t;try{t=JSON.parse(e).message||e}catch(o){t=e}var n=document.createElement("span");return n.className="authing__heading-subtitle",z?(eo("__authing__heading-subtitle-style","display: block;font-weight: 400;font-size: 12px;color: #888;"),n.classList.add("__authing__heading-subtitle-style")):(eo("__authing__heading-subtitle-style","display: block;font-weight: 400;font-size: 15px;color: #888;line-height: 48px;"),n.classList.add("__authing__heading-subtitle-style")),n.innerHTML=t,n},Q=function(e){return new Promise((function(t){var n=document.createElement("img");n.src=e,n.width=i.width,n.height=i.height,n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){t(n)}}))},J=function(e){return new Promise((function(t){var n=document.createElement("img");n.src=e,n.setAttribute("crossOrigin","Anonymous"),n.width=i.width/2.4,n.height=i.height/2.4,n.onload=function(){n.style.display="inline",t(n)},n.onerror=function(){t(n)}}))},Z=function(e,t,n){var o="authing__retry";document.getElementById(o)&&document.getElementById(o).remove();var r=document.createElement("div");r.id=o,eo("__authing-shadow-style","text-align:center;width: "+i.width+"px;height: "+i.height+"px;position: absolute;left: 50%;top: 0px;margin-left: -"+i.width/2+"px;background-color: rgba(0,0,0, 0.5);line-height:"+i.height+"px;color:#fff;font-weight:600;"),r.classList.add("__authing-shadow-style");var a=document.createElement("a");return a.innerHTML=e,a.style.color="#fff",a.style.borderBottom="1px solid #fff",a.style.cursor="pointer",t&&a.addEventListener("click",t),a.id=n,r.appendChild(a),r},X=function(e,t){var n="authing__retry";document.getElementById(n)&&document.getElementById(n).remove();var o=document.createElement("div");eo("__authing-shadow-style-position","text-align:center;width: "+i.width+"px;height: "+i.height+"px;position: absolute;left: 50%;top: 0px;margin-left: -"+i.width/2+"px;line-height:"+i.height+"px;color:#fff;font-weight:600;display: flex;\n align-items: center; /*\u5782\u76f4\u5c45\u4e2d*/\n justify-content: center; /*\u6c34\u5e73\u5c45\u4e2d*/"),o.classList.add("__authing-shadow-style-position"),o.id=n;var r=document.createElement("img");return r.id="authing__scanned-user",r.src=t,r.style.width="100px",r.style.height="100px",o.appendChild(r),o},(ee=function(){return xo(te,void 0,void 0,(function(){var e,t,n,r,s,O,S,A,x,I,j,L,M,B,q,G,W,te,ne,oe,re,ie,ae,se=this;return Io(this,(function(ce){switch(ce.label){case 0:K(),e=null,t=null,n=null,ce.label=1;case 1:return ce.trys.push([1,3,,4]),[4,this.geneCode({context:k,customData:T,extIdpConnId:P,withCustomData:N})];case 2:return r=ce.sent(),e=r.random,t=r.url,n=r.customLogo,[3,4];case 3:return s=ce.sent(),function(e,t,n){xo(this,void 0,void 0,(function(){var o,r,i,a;return Io(this,(function(s){switch(s.label){case 0:return o=Y(t),(H=document.createElement("div")).id="authing__qrcode-wrapper",H.style.textAlign="center",H.style.position="relative",[4,Q("https://usercontents.authing.cn/0ab3a1bf19c0d7106673e494d532f91a.png")];case 1:return(r=s.sent()).style.marginTop=z?"16px":"12px",r.onload=function(){$()},i=Z(U,(function(){C&&C(),ee()}),n||"__authing_retry_btn"),H.appendChild(r),H.appendChild(i),H.appendChild(o),(a=document.querySelector("#authing__qrcode-wrapper"))&&a.remove(),e.appendChild(H),[2]}}))}))}(V,(s=s).message),y&&y(s),[2];case 4:return b&&b(e,t),(H=document.createElement("div")).id="authing__qrcode-wrapper",H.style.textAlign="center",H.style.position="relative",H.style.margin="auto",[4,Q(t)];case 5:return O=ce.sent(),n?[4,J(n)]:[3,7];case 6:S=ce.sent(),ce.label=7;case 7:(A=document.createElement("canvas")).width=i.width,A.height=i.height,x=A.getContext("2d"),t&&x.drawImage(O,0,0,i.width,i.height),I=function(e){var t=e.width/2,n=e.height/2,o=e.width/2.4,r=e.height/2.4;return{x:t-o/2,y:n-r/2,ww:o,hh:r}}(i),j=I.x,L=I.y,M=I.ww,B=I.hh,x.save(),function(e,t,n,o,r,i){e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+o-i,n),e.quadraticCurveTo(t+o,n,t+o,n+i),e.lineTo(t+o,n+r-i),e.quadraticCurveTo(t+o,n+r,t+o-i,n+r),e.lineTo(t+i,n+r),e.quadraticCurveTo(t,n+r,t,n+r-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath()}(x,j,L,M,B,M/2),x.clip();try{S&&x.drawImage(S,j,L,M,B)}catch(a){console.log("Draw stop, check qrcodeLogo",S)}x.restore();try{q=A.toDataURL(),(G=document.createElement("img")).src=q,H.appendChild(G)}catch(c){H.appendChild(A)}return $(),v&&v(e,t),W=function(e,t){var n=Z(D,null,"__authing_success_tip");(H.appendChild(n),m)&&(o?e.token?m(e,t):se.exchangeUserInfo(t).then((function(e){se.tokenProvider.setUser(e),m(e,t)})):m(e,t))},te=function(e){var t=X(e.nickname,e.photo);H.appendChild(t),p&&p(e)},ne=function(){var e=Z(R,null,"__authing_success_tip");H.appendChild(e),f&&f()},oe=function(){var e=Z(F,(function(){H.innerHTML="",ee()}),"__authing_success_tip");H.appendChild(e),h&&h()},re=function(e){var t=e.message;g&&g(t)},this.startPolling(e,{interval:u,onStart:l,onResult:d,onScanned:te,onExpired:oe,onSuccess:W,onCancel:ne,onError:re,onMfa:E,onAuthFlow:w}),ie=Y(_),H.appendChild(ie),ae=document.querySelector("#authing__qrcode-wrapper"),console.log(ae,V),ae&&ae.remove(),V.appendChild(H),[2]}}))}))})(),[2]}))}))},e.prototype.geneCode=function(e){return xo(this,void 0,void 0,(function(){var t,n,o,r,i,a;return Io(this,(function(s){switch(s.label){case 0:return n=(t=e||{}).context,o=t.customData,r=t.extIdpConnId,i=t.withCustomData,a=this.baseClient.appHost+"/api/v2/qrcode/gene",[4,this.httpClient.request({method:"POST",url:a,data:{autoMergeQrCode:!1,scene:this.scene,context:n,params:o,extIdpConnId:r,withCustomData:i}})];case 1:return[2,s.sent()]}}))}))},e.prototype.checkStatus=function(e){return xo(this,void 0,void 0,(function(){var t;return Io(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/qrcode/check?random="+e,[4,this.httpClient.request({method:"GET",url:t})];case 1:return[2,n.sent()]}}))}))},e.prototype.exchangeUserInfo=function(e){return xo(this,void 0,void 0,(function(){var t;return Io(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/qrcode/userinfo",[4,this.httpClient.request({method:"POST",url:t,data:{ticket:e}})];case 1:return[2,n.sent()]}}))}))},e.prototype.startPolling=function(e,t){return xo(this,void 0,void 0,(function(){var n,o,r,i,a,s,c,u,l,d,p,h,m,f,g=this;return Io(this,(function(v){return n=(t=t||{}).interval,o=void 0===n?800:n,r=t.onStart,i=t.onResult,a=t.onScanned,s=t.onExpired,c=t.onSuccess,u=t.onCancel,l=t.onError,d=t.onMfa,p=t.onAuthFlow,h=!1,m=!1,[2,f=setInterval((function(){return xo(g,void 0,void 0,(function(){var t,n,o,g,v,b,y,C,E,w;return Io(this,(function(O){switch(O.label){case 0:r&&!m&&(r(f),m=!0),O.label=1;case 1:return O.trys.push([1,3,,4]),[4,this.checkStatus(e)];case 2:return t=O.sent(),n=t.status,o=t.ticket,g=t.userInfo,i&&i(t),-1===n&&(clearInterval(f),s&&s()),1===n&&a&&!h&&(a(g),h=!0),2===n&&(clearInterval(f),c&&c(g,o)),3===n&&(clearInterval(f),u&&u()),4===n&&(clearInterval(f),d&&(C=t.scannedResult,v=C.code,b=C.message,y=C.data,d(v,b,y)),p&&(C=t.scannedResult,p(C))),5===n&&(clearInterval(f),l&&(C=t.scannedResult,E=C.errmsg,l(E))),[3,4];case 3:return w=O.sent(),l&&l(w),clearInterval(f),[2];case 4:return[2]}}))}))}),o)]}))}))},e.prototype.stopPolling=function(e){return xo(this,void 0,void 0,(function(){return Io(this,(function(t){return clearInterval(e),[2]}))}))},e}(),_o=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},Lo=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ro=function(){function e(e,t,n){this.options=e,this.tokenProvider=t,this.httpClient=n,this.baseClient=new Ao(e)}return e.prototype.getMfaAuthenticators=function(e){return void 0===e&&(e={type:"totp",source:"SELF"}),_o(this,void 0,void 0,(function(){var t,n,o,r,i;return Lo(this,(function(a){switch(a.label){case 0:return t=e.type,n=e.mfaToken,o=e.source,r=this.baseClient.appHost+"/api/v2/mfa/authenticator",i={},n&&(i.authorization="Bearer "+n),[4,this.httpClient.request({method:"GET",url:r,params:{type:t,source:o},headers:i})];case 1:return[2,a.sent()]}}))}))},e.prototype.assosicateMfaAuthenticator=function(e){return void 0===e&&(e={authenticatorType:"totp",source:"SELF"}),_o(this,void 0,void 0,(function(){var t,n,o,r,i;return Lo(this,(function(a){switch(a.label){case 0:return t=e.authenticatorType,n=e.mfaToken,o=e.source,r={},n&&(r.authorization="Bearer "+n),i=this.baseClient.appHost+"/api/v2/mfa/totp/associate",[4,this.httpClient.request({method:"POST",url:i,data:{authenticator_type:t,source:o},headers:r})];case 1:return[2,a.sent()]}}))}))},e.prototype.deleteMfaAuthenticator=function(){return _o(this,void 0,void 0,(function(){var e;return Lo(this,(function(t){switch(t.label){case 0:return e=this.baseClient.appHost+"/api/v2/mfa/totp/associate",[4,this.httpClient.request({method:"DELETE",url:e})];case 1:return t.sent(),[2,{code:200,message:"TOTP MFA \u89e3\u7ed1\u6210\u529f"}]}}))}))},e.prototype.confirmAssosicateMfaAuthenticator=function(e){return void 0===e&&(e={authenticatorType:"totp",source:"SELF"}),_o(this,void 0,void 0,(function(){var t,n,o,r,i,a;return Lo(this,(function(s){switch(s.label){case 0:return t=this.baseClient.appHost+"/api/v2/mfa/totp/associate/confirm",n=e.authenticatorType,o=e.totp,r=e.source,i=e.mfaToken,a={},i&&(a.authorization="Bearer "+i),[4,this.httpClient.request({method:"POST",url:t,data:{authenticator_type:n,totp:o,source:r}})];case 1:return s.sent(),[2,{code:200,message:"TOTP MFA \u7ed1\u5b9a\u6210\u529f"}]}}))}))},e.prototype.verifyTotpMfa=function(e){return _o(this,void 0,void 0,(function(){var t;return Lo(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/mfa/totp/verify",[4,this.httpClient.request({method:"POST",url:t,data:{totp:e.totp},headers:{authorization:"Bearer "+e.mfaToken}})];case 1:return[2,n.sent()]}}))}))},e.prototype.verifyAppSmsMfa=function(e){return _o(this,void 0,void 0,(function(){var t;return Lo(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/applications/mfa/sms/verify",[4,this.httpClient.request({method:"POST",url:t,data:{phone:e.phone,code:e.code,phoneCountryCode:e.phoneCountryCode},headers:{authorization:"Bearer "+e.mfaToken}})];case 1:return[2,n.sent()]}}))}))},e.prototype.verifyAppEmailMfa=function(e){return _o(this,void 0,void 0,(function(){var t;return Lo(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/applications/mfa/email/verify",[4,this.httpClient.request({method:"POST",url:t,data:{email:e.email,code:e.code},headers:{authorization:"Bearer "+e.mfaToken}})];case 1:return[2,n.sent()]}}))}))},e.prototype.phoneOrEmailBindable=function(e){var t=e.phone,n=e.email,o=e.mfaToken;return _o(this,void 0,void 0,(function(){var e;return Lo(this,(function(r){switch(r.label){case 0:return e=this.baseClient.appHost+"/api/v2/applications/mfa/check",[4,this.httpClient.request({method:"POST",url:e,data:{email:n,phone:t},headers:{authorization:"Bearer "+o}})];case 1:return[2,r.sent()]}}))}))},e.prototype.verifyTotpRecoveryCode=function(e){return _o(this,void 0,void 0,(function(){var t;return Lo(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/mfa/totp/recovery",[4,this.httpClient.request({method:"POST",url:t,data:{recoveryCode:e.recoveryCode},headers:{authorization:"Bearer "+e.mfaToken}})];case 1:return[2,n.sent()]}}))}))},e.prototype.associateFaceByUrl=function(e){return _o(this,void 0,void 0,(function(){var t,n,o,r,i;return Lo(this,(function(a){switch(a.label){case 0:return t=e.baseFace,n=e.compareFace,o=e.mfaToken,r={},o&&(r.authorization="Bearer "+o),i=this.baseClient.appHost+"/api/v2/mfa/face/associate",[4,this.httpClient.request({method:"POST",url:i,data:{photoA:t,photoB:n,isExternal:!0},headers:r})];case 1:return[2,a.sent()]}}))}))},e.prototype.associateFaceByLocalFile=function(e){return _o(this,void 0,void 0,(function(){var t,n,o,r;return Lo(this,(function(i){switch(i.label){case 0:t={},e&&(t.authorization="Bearer "+e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,co({accept:".jpeg,.jpg,.png,.bmp",url:this.baseClient.appHost+"/api/v2/upload?folder=face-photo&private=true"})];case 2:return o=i.sent().key,n=o,[3,4];case 3:return r=i.sent(),this.options.onError(r.code,r.message),[3,4];case 4:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/mfa/face/associate",data:{photoA:n,photoB:n},headers:t})];case 5:return[2,i.sent()]}}))}))},e.prototype.associateFaceByBlob=function(e){return _o(this,void 0,void 0,(function(){var t,n,o,r,i,a,s,c,u,l;return Lo(this,(function(d){switch(d.label){case 0:t=e.baseFace,n=e.compareFace,o=e.mfaToken,r={},o&&(r.authorization="Bearer "+o),s=this.baseClient.appHost+"/api/v2/upload?folder=face-photo&private=true",d.label=1;case 1:return d.trys.push([1,6,,7]),[4,so(t,s)];case 2:return c=d.sent().key,i=c,n?[4,so(n,s)]:[3,4];case 3:return u=d.sent().key,a=u,[3,5];case 4:a=c,d.label=5;case 5:return[3,7];case 6:return l=d.sent(),this.options.onError(l.code,l.message),[3,7];case 7:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/mfa/face/associate",data:{photoA:i,photoB:a},headers:r})];case 8:return[2,d.sent()]}}))}))},e.prototype.verifyFaceMfa=function(e,t){return _o(this,void 0,void 0,(function(){var n;return Lo(this,(function(o){switch(o.label){case 0:return n=this.baseClient.appHost+"/api/v2/mfa/face/verify",[4,this.httpClient.request({method:"POST",url:n,data:{photo:e},headers:{authorization:"Bearer "+t}})];case 1:return[2,o.sent()]}}))}))},e}(),Mo=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Fo=function(){return(Fo=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},Bo=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},Do=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},qo=function(){function e(e,t){this.options=e,this.tokenProvider=t,this.axios=ft.a.create({withCredentials:!0})}return e.prototype.setOptions=function(e){this.options=e},e.prototype.request=function(e){var t;return Bo(this,void 0,void 0,(function(){var n,o,r,i,a;return Do(this,(function(s){switch(s.label){case 0:return(n={})[this.options.headers["app-id"]]=this.options.appId||"",n[this.options.headers["tenant-id"]]=this.options.tenantId,n[this.options.headers["userpool-id"]]=this.options.userPoolId||"",n[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",n[this.options.headers["sdk-version"]]="js:4.21.8",n[this.options.headers.lang]=this.options.lang||"",e.unSetToken?[3,3]:e&&e.headers&&e.headers.authorization?[3,2]:[4,null===(t=this.tokenProvider)||void 0===t?void 0:t.getToken()];case 1:return(o=s.sent())&&(n.Authorization="Bearer "+o),[3,3];case 2:n.authorization=e.headers.authorization,s.label=3;case 3:return e.headers=n,e.timeout=this.options.timeout,[4,this.axios.request(Fo(Fo({},e),{headers:Fo({},Co(e.headers,(function(e){return!!e})))}))];case 4:if(r=s.sent().data,i=r.code,a=r.message,200!==i)throw this.options.onError(i,a,r.data),new Error(JSON.stringify({code:i,message:a,data:r.data}));return[2,r.data]}}))}))},e}(),Uo=(function(e){function t(t,n){return e.call(this,t,n)||this}Mo(t,e),t.prototype.request=function(e){return Bo(this,void 0,void 0,(function(){var t,n;return Do(this,(function(o){switch(o.label){case 0:return(t={})[this.options.headers["app-id"]]=this.options.appId||"",t[this.options.headers["tenant-id"]]=this.options.tenantId,t[this.options.headers["userpool-id"]]=this.options.userPoolId||"",t[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",t[this.options.headers["sdk-version"]]="js:4.21.8",t[this.options.headers.lang]=this.options.lang||"",e&&e.headers&&e.headers.authorization?[3,2]:[4,this.tokenProvider.getToken()];case 1:return(n=o.sent())&&(t.Authorization="Bearer "+n),[3,3];case 2:t.authorization=e.headers.authorization,o.label=3;case 3:return e.headers=t,e.timeout=this.options.timeout,[4,this.axios.request(Fo(Fo({},e),{headers:Fo({},Co(e.headers,(function(e){return!!e})))}))];case 4:return[2,o.sent().data]}}))}))}}(qo),function(e){function t(t,n){return e.call(this,t,n)||this}return Mo(t,e),t.prototype.request=function(e){return Bo(this,void 0,void 0,(function(){var t;return Do(this,(function(n){switch(n.label){case 0:return(t={})[this.options.headers["app-id"]]=this.options.appId||"",t[this.options.headers["userpool-id"]]=t[this.options.headers["tenant-id"]]=this.options.tenantId,this.options.userPoolId,t[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",t[this.options.headers["sdk-version"]]="js:4.21.8",t[this.options.headers.lang]=this.options.lang||"",e.headers=Fo(Fo({},t),e.headers),e.timeout=this.options.timeout,[4,this.axios.request(Fo(Fo({},e),{headers:Fo({},Co(e.headers,(function(e){return!!e})))}))];case 1:return[2,n.sent().data]}}))}))},t}(qo)),Vo=n(351),Ho=n.n(Vo),zo=function(){function e(e,t,n){this.options=e,this.tokenProvider=t,this.httpClient=n,this.baseClient=new Ao(e)}return e.prototype.authorize=function(e,t){var n=this,o=(t=t||{}).position,r=t.popup,i=void 0===r||r,a=t.onSuccess,s=t.onError,c=t.authorization_params,u=t.authorizationParams,l=t.context,d=t.customData,p=t.withIdentities,h=void 0!==p&&p,m=t.protocol,f=void 0===m?"oidc":m,g=t.uuid,v=t.withCustomData,b=void 0!==v&&v,y=t.targetUrl,C=t.relayMethod,E=t.guardVersion,w={from_guard:"1",app_id:this.options.appId,authorization_params:JSON.stringify(c||u),with_identities:h?"1":"0",with_custom_data:b?"1":"0",protocol:f,uuid:g,target_url:y,relay_method:C,guard_version:E};l&&(w.context=JSON.stringify(l)),this.options.tenantId&&(w.tenant_id=this.options.tenantId),d&&(w.custom_data=JSON.stringify(d));var O=this.baseClient.appHost+"/connections/social/"+e+"?"+to(w);return window.addEventListener("message",(function e(t){var o=t.data,r=o.code,i=o.message,c=o.data,u=o.event,l=(u=u||{}).source,d=u.eventType;if("authing"===l&&"socialLogin"===d){try{r=JSON.parse(i).code}catch(t){}200===r?(n.tokenProvider.setUser(c),a&&a(c)):s&&s(r,i,c),window.removeEventListener("message",e)}})),io()?window.location.href=O:i?Xn(O,o):window.open(O),Promise.resolve()},e}(),Go=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},Wo=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ko=function(){function e(e,t){this.options=e,this.baseClient=new Ao(this.options),this.httpClient=t}return e.prototype.getPublicKey=function(){return Go(this,void 0,void 0,(function(){var e,t,n;return Wo(this,(function(o){switch(o.label){case 0:return this.options.publicKey?[2,this.options.publicKey]:this.publicKey?[2,this.publicKey]:(e=this.baseClient.appHost+"/api/v2/.well-known",[4,this.httpClient.request({method:"GET",url:e})]);case 1:return t=o.sent(),n=t.publicKey,this.publicKey=n,[2,this.publicKey]}}))}))},e}(),$o=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},Yo=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Qo=function(){function e(e,t,n){this.options=e,this.baseClient=new Ao(e),this.tokenProvider=t,this.httpClient=n}return e.prototype.initProviderContext=function(e){return $o(this,void 0,void 0,(function(){return Yo(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/applications/"+e+"/public-config"})];case 1:return[2,t.sent()]}}))}))},e.prototype.getProviderConfigAndError=function(e,t,n){var o,r,i=null===(r=null===(o=t.identityProviders)||void 0===o?void 0:o.find((function(t){return t.protocol===e&&t.identifier===n})))||void 0===r?void 0:r.config;if(!i)throw new Error("\u8eab\u4efd\u6e90\u914d\u7f6e\u4e0d\u5b58\u5728");return i},e.prototype.getLoginUrl=function(e,t,n,o){var r=this.getProviderConfigAndError(e,t,n);switch(e){case ho.OIDC:var i=to({state:o,client_id:(r=r).clientId,redirect_uri:r.redirectUri,scope:r.scopes,response_type:r.responseType,nonce:ao(32)});return r.authorizationEdpoint+"?"+i;case ho.SAML:return(r=r).samlRequest;case ho.CAS:return(r=r).casConnectionLoginUrl;case ho.OAUTH:return(r=r).authUrl;case ho.AZURE_AD:return(r=r).authorizationUrl;default:return""}},e.prototype.authorize=function(e,t,n){var o,r=this,i=(n=n||{}).position,a=n.popup,s=void 0===a||a,c=n.onSuccess,u=n.onError,l=this.options.appId,d=ao(32);return o=ro()?window:s?Xn("",i):window.open(""),this.initProviderContext(l).then((function(n){(e===ho.OIDC?r.httpClient.request({method:"POST",url:r.baseClient.appHost+"/api/v2/connections/oidc/start-interaction",data:{state:d,protocol:e,userPoolId:n.userPoolId,appId:l,referer:window.location.href,connection:{providerIentifier:t}}}):Promise.resolve()).then((function(){var i=r.getLoginUrl(e,n,t,d);window.addEventListener("message",(function e(t){var n=t.data,o=n.code,i=n.message,a=n.data,s=n.event,l=(s=s||{}).source,d=s.eventType;if("authing"===l&&"enterpriseLogin"===d){try{var p=JSON.parse(i);i=p.message,o=p.code}catch(t){}200===o?(r.tokenProvider.setUser(a),c&&c(a)):u&&u(o,i),window.removeEventListener("message",e)}})),o.location.assign(i)}))})),Promise.resolve()},e}(),Jo=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},Zo=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Xo=function(){function e(e,t,n){this.options=e,this.tokenProvider=t,this.httpClient=n,this.baseClient=new Ao(e)}return e.prototype.detail=function(){return Jo(this,void 0,void 0,(function(){var e;return Zo(this,(function(t){switch(t.label){case 0:return e=this.baseClient.appHost+"/api/v2/users/principal_authentication",[4,this.httpClient.request({method:"GET",url:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.authenticate=function(e){return Jo(this,void 0,void 0,(function(){var t,n;return Zo(this,(function(o){switch(o.label){case 0:return t=this.baseClient.appHost+"/api/v2/users/principal_authentication",n="P"===e.type?{type:"P",name:e.name,idCard:e.idCard,ext:e.bankCard}:{type:"E",name:e.enterpriseName,idCard:e.enterpriseCode,ext:e.legalPersonName},[4,this.httpClient.request({method:"POST",url:t,data:n})];case 1:return o.sent(),[2,!0]}}))}))},e}(),er=function(){return(er=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},tr=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(t){i(t)}}function s(e){try{c(o.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))},nr=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},or={appId:void 0,tenantId:void 0,appHost:void 0,protocol:"oidc",tokenEndPointAuthMethod:"client_secret_post",introspectionEndPointAuthMethod:"client_secret_post",revocationEndPointAuthMethod:"client_secret_post",timeout:1e4,onError:function(e,t,n){throw{code:e,message:t,data:n}},requestFrom:"sdk",encryptFunction:function(e,t,n){return Jn(void 0,void 0,void 0,(function(){return Zn(this,(function(o){return[2,new Promise((function(o,r){if(n&&"sm2"===(null===n||void 0===n?void 0:n.type)){if(!n.publicKey)throw new Error("\u672a\u914d\u7f6e: encryption.publicKey");return o("sm2:"+function(e,t,n){void 0===n&&(n=1),e="string"===typeof e?Bn(Rn(e)):Array.prototype.slice.call(e),t=jn().decodePointHex(t);var o=Ln(),r=new Cn.BigInteger(o.privateKey,16),i=o.publicKey;i.length>128&&(i=i.substr(i.length-128));var a=t.multiply(r),s=Bn(Mn(a.getX().toBigInteger().toRadix(16),64)),c=Bn(Mn(a.getY().toBigInteger().toRadix(16),64)),u=Fn($n([].concat(s,e,c))),l=1,d=0,p=[],h=[].concat(s,c),m=function(){p=$n(Yn(Yn([],h),[l>>24&255,l>>16&255,l>>8&255,255&l])),l++,d=0};m();for(var f=0,g=e.length;f<g;f++)d===p.length&&m(),e[f]^=255&p[d++];var v=Fn(e);return 0===n?i+v+u:i+u+v}(e,n.publicKey))}var i=new yn({});i.setPublicKey(t);var a=i.encrypt(e);!1!==a?o(a):r(a)}))]}))}))},host:"https://core.authing.cn",headers:{"userpool-id":"x-authing-userpool-id","app-id":"x-authing-app-id","request-from":"x-authing-request-from","sdk-version":"x-authing-sdk-version","tenant-id":"x-authing-app-tenant-id",lang:"x-authing-lang"},lang:"zh-CN"},rr=function(){function e(e){Object.keys(e).forEach((function(t){return!e[t]&&delete e[t]})),this.options=Object.assign({},or,e),this.baseClient=new Ao(this.options);var t=this.baseClient.appHost+"/graphql/v2";this.graphqlClient=new(this.options.graphqlClient||So)(t,this.options),this.tokenProvider=new(this.options.tokenProvider||ot)(this.options),this.httpClient=new(this.options.httpClient||qo)(this.options,this.tokenProvider),this.naiveHttpClient=new Uo(this.options,this.tokenProvider),this.publicKeyManager=new Ko(this.options,this.httpClient),this.wxqrcode=new jo(this.options,this.tokenProvider,this.httpClient,"WXAPP_AUTH"),this.qrcode=new jo(this.options,this.tokenProvider,this.httpClient,"APP_AUTH"),this.wechatmpqrcode=new jo(this.options,this.tokenProvider,this.httpClient,"WECHATMP_AUTH"),this.landrayqrcode=new jo(this.options,this.tokenProvider,this.httpClient,"LANDRAY_AUTH"),this.mfa=new Ro(this.options,this.tokenProvider,this.httpClient),this.social=new zo(this.options,this.tokenProvider,this.httpClient),this.enterprise=new Qo(this.options,this.tokenProvider,this.httpClient),this.principal=new Xo(this.options,this.tokenProvider,this.httpClient),this.options.token&&this.setToken(this.options.token)}return e.prototype.checkLoggedIn=function(){var e,t=this.tokenProvider.getUser();if(t)return t.id;var n=this.tokenProvider.getToken();if(!n)throw new Error("\u8bf7\u5148\u767b\u5f55\uff01");var o=Ho()(n),r=o.sub||(null===(e=o.data)||void 0===e?void 0:e.id);if(!r)throw new Error("\u4e0d\u5408\u6cd5\u7684 accessToken");return r},e.prototype.setCurrentUser=function(e){this.tokenProvider.setUser(e)},e.prototype.setToken=function(e){this.tokenProvider.setToken(e)},e.prototype.setRequestFrom=function(e){this.options.requestFrom=e,this.graphqlClient.setOptions(this.options),this.httpClient.setOptions(this.options)},e.prototype.registerByEmail=function(e,t,n,o){return tr(this,void 0,void 0,(function(){var r,i,a,s,c,u,l,d,p,h,m,f,g,v,b;return nr(this,(function(y){switch(y.label){case 0:return n=n||{},r=(o=o||{}).forceLogin,i=void 0!==r&&r,a=o.generateToken,s=void 0!==a&&a,c=o.clientIp,u=o.params,l=o.context,d=o.customData,p=o.phoneToken,m=(h=this.options).encryptFunction,f=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,m.apply(h,f.concat([y.sent(),this.options.encryption]))];case 2:return t=y.sent(),g=null,d?g=JSON.stringify(uo(d)):u&&(g=JSON.stringify(u)),v=null,l&&(v=JSON.stringify(l)),[4,(C=this.graphqlClient,E=this.tokenProvider,w={input:{email:e,password:t,profile:n,forceLogin:i,generateToken:s,clientIp:c,params:g,context:v,phoneToken:p}},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation registerByEmail($input: RegisterByEmailInput!) {\n registerByEmail(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n }\n}\n ",[4,E.getToken()];case 1:return t=n.sent(),[2,C.request({query:e,token:t,variables:w})]}}))})))];case 3:return b=y.sent().registerByEmail,this.setCurrentUser(b),[2,b]}var C,E,w}))}))},e.prototype.registerByUsername=function(e,t,n,o){return tr(this,void 0,void 0,(function(){var r,i,a,s,c,u,l,d,p,h,m,f,g,v,b,y;return nr(this,(function(C){switch(C.label){case 0:return n=n||{},r=(o=o||{}).forceLogin,i=void 0!==r&&r,a=o.generateToken,s=void 0!==a&&a,c=o.clientIp,u=o.params,l=o.context,d=o.customData,p=o.phoneToken,h=o.emailToken,f=(m=this.options).encryptFunction,g=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,f.apply(m,g.concat([C.sent(),this.options.encryption]))];case 2:return t=C.sent(),v=null,d?v=JSON.stringify(uo(d)):u&&(v=JSON.stringify(u)),b=null,l&&(b=JSON.stringify(l)),[4,(E=this.graphqlClient,w=this.tokenProvider,O={input:{username:e,password:t,profile:n,forceLogin:i,generateToken:s,clientIp:c,params:v,context:b,phoneToken:p,emailToken:h}},ut(void 0,void 0,void 0,(function(){var e;return lt(this,(function(t){return e=w.getToken(),[2,E.request({query:"\n mutation registerByUsername($input: RegisterByUsernameInput!) {\n registerByUsername(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n }\n}\n ",token:e,variables:O})]}))})))];case 3:return y=C.sent().registerByUsername,this.setCurrentUser(y),[2,y]}var E,w,O}))}))},e.prototype.registerByPhoneCode=function(e,t,n,o,r){return tr(this,void 0,void 0,(function(){var i,a,s,c,u,l,d,p,h,m,f,g,v,b,y,C;return nr(this,(function(E){switch(E.label){case 0:return o=o||{},i=(r=r||{}).forceLogin,a=void 0!==i&&i,s=r.generateToken,c=void 0!==s&&s,u=r.clientIp,l=r.params,d=r.context,p=r.customData,h=r.phoneCountryCode,m=r.emailToken,n?(g=(f=this.options).encryptFunction,v=[n],[4,this.publicKeyManager.getPublicKey()]):[3,3];case 1:return[4,g.apply(f,v.concat([E.sent(),this.options.encryption]))];case 2:n=E.sent(),E.label=3;case 3:return b=null,p?b=JSON.stringify(uo(p)):l&&(b=JSON.stringify(l)),y=null,d&&(y=JSON.stringify(d)),[4,(w=this.graphqlClient,O=this.tokenProvider,S={input:{phone:e,code:t,phoneCountryCode:h,password:n,profile:o,forceLogin:a,generateToken:c,clientIp:u,params:b,context:y,emailToken:m}},ut(void 0,void 0,void 0,(function(){var e;return lt(this,(function(t){return e=O.getToken(),[2,w.request({query:"\n mutation registerByPhoneCode($input: RegisterByPhoneCodeInput!) {\n registerByPhoneCode(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n }\n}\n ",token:e,variables:S})]}))})))];case 4:return C=E.sent().registerByPhoneCode,this.setCurrentUser(C),[2,C]}var w,O,S}))}))},e.prototype.checkPasswordStrength=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,o=this.tokenProvider,r={password:e},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e="\n query checkPasswordStrength($password: String!) {\n checkPasswordStrength(password: $password) {\n valid\n message\n }\n}\n ",[4,o.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:r})]}}))})))];case 1:return[2,t.sent().checkPasswordStrength]}var n,o,r}))}))},e.prototype.sendSmsCode=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r;return nr(this,(function(i){switch(i.label){case 0:return o=this.baseClient.appHost+"/api/v2/sms/send",r={phone:e},t&&(r.phoneCountryCode=t),n&&(r.scene=n),[4,this.httpClient.request({method:"POST",url:o,data:r})];case 1:return[2,i.sent()]}}))}))},e.prototype.loginByEmail=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r,i,a,s,c,u,l,d,p,h,m,f;return nr(this,(function(g){switch(g.label){case 0:return o=(n=n||{}).autoRegister,r=void 0!==o&&o,i=n.captchaCode,a=n.clientIp,s=n.params,c=n.context,u=n.customData,d=(l=this.options).encryptFunction,p=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,d.apply(l,p.concat([g.sent(),this.options.encryption]))];case 2:return t=g.sent(),h=null,u?h=JSON.stringify(uo(u)):s&&(h=JSON.stringify(s)),m=null,c&&(m=JSON.stringify(c)),[4,(v=this.graphqlClient,b=this.tokenProvider,y={input:{email:e,password:t,autoRegister:r,captchaCode:i,clientIp:a,params:h,context:m}},ut(void 0,void 0,void 0,(function(){var e;return lt(this,(function(t){return e=b.getToken(),[2,v.request({query:"\n mutation loginByEmail($input: LoginByEmailInput!) {\n loginByEmail(input: $input) {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n newlyCreated\n phoneCountryCode\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",token:e,variables:y})]}))})))];case 3:return(f=g.sent().loginByEmail).customData&&(f.customData=oo(f.customData)),this.setCurrentUser(f),[2,f]}var v,b,y}))}))},e.prototype.loginByUsername=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r,i,a,s,c,u,l,d,p,h,m,f;return nr(this,(function(g){switch(g.label){case 0:return o=(n=n||{}).autoRegister,r=void 0!==o&&o,i=n.captchaCode,a=n.clientIp,s=n.params,c=n.context,u=n.customData,d=(l=this.options).encryptFunction,p=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,d.apply(l,p.concat([g.sent(),this.options.encryption]))];case 2:return t=g.sent(),h=null,u?h=JSON.stringify(uo(u)):s&&(h=JSON.stringify(s)),m=null,c&&(m=JSON.stringify(c)),[4,(v=this.graphqlClient,b=this.tokenProvider,y={input:{username:e,password:t,autoRegister:r,captchaCode:i,clientIp:a,params:h,context:m}},ut(void 0,void 0,void 0,(function(){var e;return lt(this,(function(t){return e=b.getToken(),[2,v.request({query:"\n mutation loginByUsername($input: LoginByUsernameInput!) {\n loginByUsername(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n newlyCreated\n phoneCountryCode\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",token:e,variables:y})]}))})))];case 3:return(f=g.sent().loginByUsername).customData&&(f.customData=oo(f.customData)),this.setCurrentUser(f),[2,f]}var v,b,y}))}))},e.prototype.loginByPhoneCode=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r,i,a,s,c,u,l;return nr(this,(function(d){switch(d.label){case 0:return o=(n=n||{}).clientIp,r=n.params,i=n.context,a=n.customData,s=n.phoneCountryCode,c=null,a?c=JSON.stringify(uo(a)):r&&(c=JSON.stringify(r)),u=null,i&&(u=JSON.stringify(i)),[4,(p=this.graphqlClient,h=this.tokenProvider,m={input:{phone:e,code:t,phoneCountryCode:s,clientIp:o,params:c,context:u}},ut(void 0,void 0,void 0,(function(){var e;return lt(this,(function(t){return e=h.getToken(),[2,p.request({query:"\n mutation loginByPhoneCode($input: LoginByPhoneCodeInput!) {\n loginByPhoneCode(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n newlyCreated\n phoneCountryCode\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",token:e,variables:m})]}))})))];case 1:return(l=d.sent().loginByPhoneCode).customData&&(l.customData=oo(l.customData)),this.setCurrentUser(l),[2,l]}var p,h,m}))}))},e.prototype.loginByEmailCode=function(e,t,n){var o;return tr(this,void 0,void 0,(function(){var r,i,a,s,c,u,l,d,p;return nr(this,(function(h){switch(h.label){case 0:return r=(n=n||{}).clientIp,i=n.params,a=n.context,s=n.customData,c=n.phoneCountryCode,u=null,s?u=JSON.stringify(uo(s)):i&&(u=JSON.stringify(i)),l=null,a&&(l=JSON.stringify(a)),d=(null!==(o=this.options.appHost)&&void 0!==o?o:"")+"/api/v2/login/email-code",[4,this.httpClient.request({method:"POST",url:d,data:{email:e,code:t,phoneCountryCode:c,clientIp:r,params:u,context:l},unSetToken:!0})];case 1:return(p=h.sent()).customData&&(p.customData=oo(p.customData)),this.setCurrentUser(p),[2,p]}}))}))},e.prototype.loginByPhonePassword=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r,i,a,s,c,u,l,d,p,h,m,f;return nr(this,(function(g){switch(g.label){case 0:return o=(n=n||{}).captchaCode,r=n.autoRegister,i=void 0!==r&&r,a=n.clientIp,s=n.params,c=n.context,u=n.customData,d=(l=this.options).encryptFunction,p=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,d.apply(l,p.concat([g.sent(),this.options.encryption]))];case 2:return t=g.sent(),h=null,u?h=JSON.stringify(uo(u)):s&&(h=JSON.stringify(s)),m=null,c&&(m=JSON.stringify(c)),[4,(v=this.graphqlClient,b=this.tokenProvider,y={input:{phone:e,password:t,captchaCode:o,autoRegister:i,clientIp:a,params:h,context:m}},ut(void 0,void 0,void 0,(function(){var e;return lt(this,(function(t){return e=b.getToken(),[2,v.request({query:"\n mutation loginByPhonePassword($input: LoginByPhonePasswordInput!) {\n loginByPhonePassword(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n newlyCreated\n phoneCountryCode\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",token:e,variables:y})]}))})))];case 3:return(f=g.sent().loginByPhonePassword).customData&&(f.customData=oo(f.customData)),this.setCurrentUser(f),[2,f]}var v,b,y}))}))},e.prototype.loginBySubAccount=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r,i,a,s,c;return nr(this,(function(u){switch(u.label){case 0:return o=(n=n||{}).captchaCode,r=n.clientIp,a=(i=this.options).encryptFunction,s=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,a.apply(i,s.concat([u.sent(),this.options.encryption]))];case 2:return t=u.sent(),[4,(l=this.graphqlClient,d=this.tokenProvider,p={account:e,password:t,captchaCode:o,clientIp:r},ut(void 0,void 0,void 0,(function(){var e;return lt(this,(function(t){return e=d.getToken(),[2,l.request({query:"\n mutation loginBySubAccount($account: String!, $password: String!, $captchaCode: String, $clientIp: String) {\n loginBySubAccount(account: $account, password: $password, captchaCode: $captchaCode, clientIp: $clientIp) {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n newlyCreated\n phoneCountryCode\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",token:e,variables:p})]}))})))];case 3:return c=u.sent().loginBySubAccount,this.setCurrentUser(c),[2,c]}var l,d,p}))}))},e.prototype.checkLoginStatus=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,o=this.tokenProvider,r={token:e},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e="\n query checkLoginStatus($token: String) {\n checkLoginStatus(token: $token) {\n code\n message\n status\n exp\n iat\n data {\n id\n userPoolId\n arn\n }\n }\n}\n ",[4,o.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:r})]}}))})))];case 1:return[2,t.sent().checkLoginStatus]}var n,o,r}))}))},e.prototype.sendEmail=function(e,t){return tr(this,void 0,void 0,(function(){return nr(this,(function(n){switch(n.label){case 0:return[4,(o=this.graphqlClient,r=this.tokenProvider,i={email:e,scene:t},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation sendEmail($email: String!, $scene: EmailScene!) {\n sendEmail(email: $email, scene: $scene) {\n message\n code\n }\n}\n ",[4,r.getToken()];case 1:return t=n.sent(),[4,o.request({query:e,token:t,variables:i})];case 2:return[2,n.sent()]}}))})))];case 1:return[2,n.sent().sendEmail]}var o,r,i}))}))},e.prototype.resetPasswordByPhoneCode=function(e,t,n,o){return tr(this,void 0,void 0,(function(){var r,i,a;return nr(this,(function(s){switch(s.label){case 0:return i=(r=this.options).encryptFunction,a=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,i.apply(r,a.concat([s.sent(),this.options.encryption]))];case 2:return n=s.sent(),[4,dt(this.graphqlClient,this.tokenProvider,{phone:e,code:t,newPassword:n,phoneCountryCode:o})];case 3:return[2,s.sent().resetPassword]}}))}))},e.prototype.resetPasswordByEmailCode=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r,i;return nr(this,(function(a){switch(a.label){case 0:return r=(o=this.options).encryptFunction,i=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,r.apply(o,i.concat([a.sent(),this.options.encryption]))];case 2:return n=a.sent(),[4,dt(this.graphqlClient,this.tokenProvider,{email:e,code:t,newPassword:n})];case 3:return[2,a.sent().resetPassword]}}))}))},e.prototype.resetPasswordByFirstLoginToken=function(e){return tr(this,void 0,void 0,(function(){var t,n,o,r,i;return nr(this,(function(a){switch(a.label){case 0:return t=e.token,n=e.password,r=(o=this.options).encryptFunction,i=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,r.apply(o,i.concat([a.sent(),this.options.encryption]))];case 2:return n=a.sent(),[4,(s=this.graphqlClient,c=this.tokenProvider,u={token:t,password:n},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation resetPasswordByFirstLoginToken($token: String!, $password: String!) {\n resetPasswordByFirstLoginToken(token: $token, password: $password) {\n message\n code\n }\n}\n ",[4,c.getToken()];case 1:return t=n.sent(),[2,s.request({query:e,token:t,variables:u})]}}))})))];case 3:return[2,a.sent().resetPasswordByFirstLoginToken]}var s,c,u}))}))},e.prototype.resetPasswordByForceResetToken=function(e){return tr(this,void 0,void 0,(function(){var t,n,o,r,i,a,s,c,u;return nr(this,(function(l){switch(l.label){case 0:return t=e.token,n=e.newPassword,o=e.oldPassword,i=(r=this.options).encryptFunction,a=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,i.apply(r,a.concat([l.sent(),this.options.encryption]))];case 2:return n=l.sent(),c=(s=this.options).encryptFunction,u=[o],[4,this.publicKeyManager.getPublicKey()];case 3:return[4,c.apply(s,u.concat([l.sent(),this.options.encryption]))];case 4:return o=l.sent(),[4,(d=this.graphqlClient,p=this.tokenProvider,h={token:t,oldPassword:o,newPassword:n},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation resetPasswordByForceResetToken($token: String!, $oldPassword: String!, $newPassword: String!) {\n resetPasswordByForceResetToken(token: $token, oldPassword: $oldPassword, newPassword: $newPassword) {\n message\n code\n }\n}\n ",[4,p.getToken()];case 1:return t=n.sent(),[2,d.request({query:e,token:t,variables:h})]}}))})))];case 5:return[2,l.sent().resetPasswordByForceResetToken]}var d,p,h}))}))},e.prototype.updateProfile=function(e,t){return tr(this,void 0,void 0,(function(){var n,o,r,i,a;return nr(this,(function(s){switch(s.label){case 0:return n=this.checkLoggedIn(),r=(o=t||{}).emailToken,i=o.phoneToken,e&&e.password&&delete e.password,[4,(c=this.graphqlClient,u=this.tokenProvider,l={id:n,input:e,emailToken:r,phoneToken:i},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation updateUser($id: String, $input: UpdateUserInput!, $emailToken: String, $phoneToken: String) {\n updateUser(id: $id, input: $input, emailToken: $emailToken, phoneToken: $phoneToken) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n }\n}\n ",[4,u.getToken()];case 1:return t=n.sent(),[2,c.request({query:e,token:t,variables:l})]}}))})))];case 1:return a=s.sent().updateUser,this.setCurrentUser(a),[2,a]}var c,u,l}))}))},e.prototype.updatePassword=function(e,t){return tr(this,void 0,void 0,(function(){var n,o,r,i,a,s,c,u;return nr(this,(function(l){switch(l.label){case 0:return(n=e)?(r=(o=this.options).encryptFunction,i=[e],[4,this.publicKeyManager.getPublicKey()]):[3,3];case 1:return[4,r.apply(o,i.concat([l.sent(),this.options.encryption]))];case 2:n=l.sent(),l.label=3;case 3:return e=n,(a=t)?(c=(s=this.options).encryptFunction,u=[t],[4,this.publicKeyManager.getPublicKey()]):[3,6];case 4:return[4,c.apply(s,u.concat([l.sent(),this.options.encryption]))];case 5:a=l.sent(),l.label=6;case 6:return t=a,[4,(d=this.graphqlClient,p=this.tokenProvider,h={newPassword:e,oldPassword:t},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation updatePassword($newPassword: String!, $oldPassword: String) {\n updatePassword(newPassword: $newPassword, oldPassword: $oldPassword) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n phoneCountryCode\n }\n}\n ",[4,p.getToken()];case 1:return t=n.sent(),[2,d.request({query:e,token:t,variables:h})]}}))})))];case 7:return[2,l.sent().updatePassword]}var d,p,h}))}))},e.prototype.updatePhone=function(e,t,n,o,r,i){return tr(this,void 0,void 0,(function(){return nr(this,(function(a){switch(a.label){case 0:return[4,(s=this.graphqlClient,c=this.tokenProvider,u={phone:e,phoneCode:t,oldPhone:n,oldPhoneCode:o,phoneCountryCode:r,oldPhoneCountryCode:i},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation updatePhone($phone: String!, $phoneCode: String!, $oldPhone: String, $oldPhoneCode: String, $phoneCountryCode: String, $oldPhoneCountryCode: String) {\n updatePhone(phone: $phone, phoneCode: $phoneCode, oldPhone: $oldPhone, oldPhoneCode: $oldPhoneCode, phoneCountryCode: $phoneCountryCode, oldPhoneCountryCode: $oldPhoneCountryCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n phoneCountryCode\n }\n}\n ",[4,c.getToken()];case 1:return t=n.sent(),[2,s.request({query:e,token:t,variables:u})]}}))})))];case 1:return[2,a.sent().updatePhone]}var s,c,u}))}))},e.prototype.updateEmail=function(e,t,n,o){return tr(this,void 0,void 0,(function(){return nr(this,(function(r){switch(r.label){case 0:return[4,(i=this.graphqlClient,a=this.tokenProvider,s={email:e,emailCode:t,oldEmail:n,oldEmailCode:o},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation updateEmail($email: String!, $emailCode: String!, $oldEmail: String, $oldEmailCode: String) {\n updateEmail(email: $email, emailCode: $emailCode, oldEmail: $oldEmail, oldEmailCode: $oldEmailCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n phoneCountryCode\n }\n}\n ",[4,a.getToken()];case 1:return t=n.sent(),[2,i.request({query:e,token:t,variables:s})]}}))})))];case 1:return[2,r.sent().updateEmail]}var i,a,s}))}))},e.prototype.refreshToken=function(){return tr(this,void 0,void 0,(function(){var e;return nr(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,o=this.tokenProvider,r={},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e=ct,[4,o.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:r})]}}))})))];case 1:return e=t.sent().refreshToken,this.setToken(e.token),[2,e]}var n,o,r}))}))},e.prototype.linkAccount=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/users/link",data:{primaryUserToken:e.primaryUserToken,secondaryUserToken:e.secondaryUserToken}})];case 1:return t.sent(),[2,{code:200,message:"\u7ed1\u5b9a\u6210\u529f"}]}}))}))},e.prototype.unLinkAccount=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/users/unlink",data:{primaryUserToken:e.primaryUserToken,provider:e.provider}})];case 1:return t.sent(),[2,{code:200,message:"\u89e3\u7ed1\u6210\u529f"}]}}))}))},e.prototype.bindPhone=function(e,t,n){return tr(this,void 0,void 0,(function(){var o;return nr(this,(function(r){switch(r.label){case 0:return[4,(i=this.graphqlClient,a=this.tokenProvider,s={phone:e,phoneCode:t,phoneCountryCode:n},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation bindPhone($phone: String!, $phoneCode: String!, $phoneCountryCode: String) {\n bindPhone(phone: $phone, phoneCode: $phoneCode, phoneCountryCode: $phoneCountryCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n phoneCountryCode\n }\n}\n ",[4,a.getToken()];case 1:return t=n.sent(),[2,i.request({query:e,token:t,variables:s})]}}))})))];case 1:return o=r.sent().bindPhone,this.setCurrentUser(o),[2,o]}var i,a,s}))}))},e.prototype.unbindPhone=function(){return tr(this,void 0,void 0,(function(){var e;return nr(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,o=this.tokenProvider,r={},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e="\n mutation unbindPhone {\n unbindPhone {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n phoneCountryCode\n }\n}\n ",[4,o.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:r})]}}))})))];case 1:return e=t.sent().unbindPhone,this.setCurrentUser(e),[2,e]}var n,o,r}))}))},e.prototype.bindEmail=function(e,t){return tr(this,void 0,void 0,(function(){var n;return nr(this,(function(o){switch(o.label){case 0:return[4,(r=this.graphqlClient,i=this.tokenProvider,a={email:e,emailCode:t},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation bindEmail($email: String!, $emailCode: String!) {\n bindEmail(email: $email, emailCode: $emailCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n phoneCountryCode\n }\n}\n ",[4,i.getToken()];case 1:return t=n.sent(),[2,r.request({query:e,token:t,variables:a})]}}))})))];case 1:return n=o.sent().bindEmail,this.setCurrentUser(n),[2,n]}var r,i,a}))}))},e.prototype.unbindEmail=function(){return tr(this,void 0,void 0,(function(){var e;return nr(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,o=this.tokenProvider,r={},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e="\n mutation unbindEmail {\n unbindEmail {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n phoneCountryCode\n }\n}\n ",[4,o.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:r})]}}))})))];case 1:return e=t.sent().unbindEmail,this.setCurrentUser(e),[2,e]}var n,o,r}))}))},e.prototype.getCurrentUser=function(){return tr(this,void 0,void 0,(function(){var e;return nr(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(n=this.graphqlClient,o=this.tokenProvider,r={},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e="\n query user($id: String) {\n user(id: $id) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n type\n userPoolId\n extIdpId\n }\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n phoneCountryCode\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",[4,o.getToken()];case 1:return t=i.sent(),[4,n.request({query:e,token:t,variables:r})];case 2:return[2,i.sent()]}}))})))];case 1:return(e=t.sent().user).customData&&(e.customData=oo(e.customData)),this.setCurrentUser(e),[2,e];case 2:return t.sent(),[2,null];case 3:return[2]}var n,o,r}))}))},e.prototype.logout=function(){return tr(this,void 0,void 0,(function(){return nr(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/logout?app_id="+this.options.appId,withCredentials:!0})];case 1:return e.sent(),this.tokenProvider.clearUser(),[2]}}))}))},e.prototype.listUdv=function(){return tr(this,void 0,void 0,(function(){var e,t;return nr(this,(function(n){switch(n.label){case 0:return e=this.checkLoggedIn(),[4,pt(this.graphqlClient,this.tokenProvider,{targetType:Ze.User,targetId:e})];case 1:return t=n.sent().udv,[2,no(t)]}}))}))},e.prototype.setUdv=function(e,t){return tr(this,void 0,void 0,(function(){var n,o;return nr(this,(function(r){switch(r.label){case 0:return n=this.checkLoggedIn(),t=JSON.stringify(t),[4,(i=this.graphqlClient,a=this.tokenProvider,s={targetType:Ze.User,targetId:n,key:e,value:t},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation setUdv($targetType: UDFTargetType!, $targetId: String!, $key: String!, $value: String!) {\n setUdv(targetType: $targetType, targetId: $targetId, key: $key, value: $value) {\n key\n dataType\n value\n label\n }\n}\n ",[4,a.getToken()];case 1:return t=n.sent(),[2,i.request({query:e,token:t,variables:s})]}}))})))];case 1:return o=r.sent().setUdv,[2,no(o)]}var i,a,s}))}))},e.prototype.removeUdv=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t=this.checkLoggedIn(),[4,ht(this.graphqlClient,this.tokenProvider,{targetType:Ze.User,targetId:t,key:e})];case 1:return n=o.sent().removeUdv,[2,no(n)]}}))}))},e.prototype.listOrgs=function(){return tr(this,void 0,void 0,(function(){return nr(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/users/me/orgs"})];case 1:return[2,e.sent()]}}))}))},e.prototype.listDepartments=function(){return tr(this,void 0,void 0,(function(){var e;return nr(this,(function(t){switch(t.label){case 0:return e=this.checkLoggedIn(),[4,(n=this.graphqlClient,o=this.tokenProvider,r={id:e},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e="\n query getUserDepartments($id: String!, $orgId: String) {\n user(id: $id) {\n departments(orgId: $orgId) {\n totalCount\n list {\n department {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n codePath\n namePath\n createdAt\n updatedAt\n children\n isVirtualNode\n }\n isMainDepartment\n joinedAt\n }\n }\n }\n}\n ",[4,o.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:r})]}}))})))];case 1:return[2,t.sent().user.departments]}var n,o,r}))}))},e.prototype.loginByLdap=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r,i,a;return nr(this,(function(s){switch(s.label){case 0:return o=(n=n||{}).clientIp,r=n.withCustomData,i=this.baseClient.appHost+"/api/v2/ldap/verify-user",[4,this.httpClient.request({method:"POST",url:i,data:{username:e,password:t,clientIp:o,withCustomData:r}})];case 1:return a=s.sent(),this.setCurrentUser(a),[2,a]}}))}))},e.prototype.loginByAd=function(e,t,n){return tr(this,void 0,void 0,(function(){var o,r,i,a,s,c;return nr(this,(function(u){switch(u.label){case 0:return o=(n=n||{}).clientIp,r=n.withCustomData,i=new URL(this.baseClient.appHost).hostname.split(".").slice(1).join("."),a=this.options.websocketHost||"https://ws."+i,s=a+"/api/v2/ad/verify-user",[4,this.httpClient.request({method:"POST",url:s,data:{username:e,password:t,clientIp:o,withCustomData:r}})];case 1:return c=u.sent(),this.setCurrentUser(c),[2,c]}}))}))},e.prototype.uploadPhoto=function(e,t){var n=this;co({accept:e=e||"image/*",url:this.baseClient.appHost+"/api/v2/upload?folder=avatar"}).then((function(e){var n=e.url;return t(n)})).catch((function(e){var t=e.code,o=e.message;return n.options.onError(t,o)}))},e.prototype.updateAvatar=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:return[4,this.uploadAvatar(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.uploadAvatar=function(e){return tr(this,void 0,void 0,(function(){var t,n,o,r=this;return nr(this,(function(i){switch(i.label){case 0:return t=(e||{}).accept,this.checkLoggedIn(),[4,new Promise((function(e){r.uploadPhoto(t,(function(t){e(t)}))}))];case 1:return n=i.sent(),[4,this.updateProfile({photo:n})];case 2:return o=i.sent(),this.setCurrentUser(o),[2,o]}}))}))},e.prototype.getUdfValue=function(){return tr(this,void 0,void 0,(function(){var e,t;return nr(this,(function(n){switch(n.label){case 0:return e=this.checkLoggedIn(),[4,pt(this.graphqlClient,this.tokenProvider,{targetType:Ze.User,targetId:e})];case 1:return t=n.sent().udv,[2,oo(t)]}}))}))},e.prototype.setUdfValue=function(e){return tr(this,void 0,void 0,(function(){var t;return nr(this,(function(n){switch(n.label){case 0:if(0===Object.keys(e).length)throw new Error("empty udf value list");return t=this.checkLoggedIn(),[4,(o=this.graphqlClient,r=this.tokenProvider,i={targetType:Ze.User,targetId:t,udvList:Object.keys(e).map((function(t){return{key:t,value:JSON.stringify(e[t])}}))},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n mutation setUdvBatch($targetType: UDFTargetType!, $targetId: String!, $udvList: [UserDefinedDataInput!]) {\n setUdvBatch(targetType: $targetType, targetId: $targetId, udvList: $udvList) {\n key\n dataType\n value\n label\n }\n}\n ",[4,r.getToken()];case 1:return t=n.sent(),[2,o.request({query:e,token:t,variables:i})]}}))})))];case 1:return[2,n.sent().setUdvBatch]}var o,r,i}))}))},e.prototype.removeUdfValue=function(e){return tr(this,void 0,void 0,(function(){var t;return nr(this,(function(n){switch(n.label){case 0:return t=this.checkLoggedIn(),[4,ht(this.graphqlClient,this.tokenProvider,{targetType:Ze.User,targetId:t,key:e})];case 1:return n.sent(),[2]}}))}))},e.prototype.getSecurityLevel=function(){return tr(this,void 0,void 0,(function(){return nr(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/users/me/security-level"})];case 1:return[2,e.sent()]}}))}))},e.prototype.listAuthorizedResources=function(e,t){return tr(this,void 0,void 0,(function(){var n,o,r,i,a,s;return nr(this,(function(c){switch(c.label){case 0:return n=this.checkLoggedIn(),o=(t||{}).resourceType,[4,(u=this.graphqlClient,l=this.tokenProvider,d={id:n,namespace:e,resourceType:o},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n query listUserAuthorizedResources($id: String!, $namespace: String, $resourceType: String) {\n user(id: $id) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n apiIdentifier\n }\n }\n }\n}\n ",[4,l.getToken()];case 1:return t=n.sent(),[2,u.request({query:e,token:t,variables:d})]}}))})))];case 1:if(!(r=c.sent().user))throw new Error("\u7528\u6237\u4e0d\u5b58\u5728");return i=r.authorizedResources,a=i.list,s=i.totalCount,[2,{list:a=a.map((function(e){for(var t in e)e[t]||delete e[t];return e})),totalCount:s}]}var u,l,d}))}))},e.prototype.isUserExists=function(e){return tr(this,void 0,void 0,(function(){var t,n,o,r;return nr(this,(function(i){switch(i.label){case 0:return t=e.username,n=e.email,o=e.phone,r=e.externalId,[4,(a=this.graphqlClient,s=this.tokenProvider,c={username:t,email:n,phone:o,externalId:r},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n query isUserExists($email: String, $phone: String, $username: String, $externalId: String) {\n isUserExists(email: $email, phone: $phone, username: $username, externalId: $externalId)\n}\n ",[4,s.getToken()];case 1:return t=n.sent(),[2,a.request({query:e,token:t,variables:c})]}}))})))];case 1:return[2,i.sent().isUserExists]}var a,s,c}))}))},e.prototype.computedPasswordSecurityLevel=function(e){if("string"!==typeof e)throw"password must be a `string`";var t=new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{12,}$/g),n=new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)[^]{8,}$/g);return null!==e.match(t)?lo.HIGH:null!==e.match(n)?lo.MIDDLE:lo.LOW},e.prototype._generateTokenRequest=function(e){var t={};return Object.keys(e).map((function(n){"undefined"!==typeof e[n]&&(t[n]=e[n])})),new URLSearchParams(t).toString()},e.prototype._generateBasicAuthToken=function(e,t){var n=e||this.options.appId,o=t||this.options.secret;return"Basic "+Buffer.from(n+":"+o).toString("base64")},e.prototype._getAccessTokenByCodeWithClientSecretPost=function(e,t){return tr(this,void 0,void 0,(function(){var n,o;return nr(this,(function(r){switch(r.label){case 0:return n=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,grant_type:"authorization_code",code:e,redirect_uri:this.options.redirectUri,code_verifier:t}),o="","oidc"===this.options.protocol?o=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(o=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:o,data:n,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,r.sent()]}}))}))},e.prototype._getAccessTokenByCodeWithClientSecretBasic=function(e,t){return tr(this,void 0,void 0,(function(){var n,o;return nr(this,(function(r){switch(r.label){case 0:return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),o=this._generateTokenRequest({grant_type:"authorization_code",code:e,redirect_uri:this.options.redirectUri,code_verifier:t}),[4,this.naiveHttpClient.request({data:o,method:"POST",url:n,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,r.sent()]}}))}))},e.prototype._getAccessTokenByCodeWithNone=function(e,t){return tr(this,void 0,void 0,(function(){var n,o;return nr(this,(function(r){switch(r.label){case 0:return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),o=this._generateTokenRequest({client_id:this.options.appId,grant_type:"authorization_code",code:e,redirect_uri:this.options.redirectUri,code_verifier:t}),[4,this.naiveHttpClient.request({method:"POST",url:n,data:o})];case 1:return[2,r.sent()]}}))}))},e.prototype.getAccessTokenByCode=function(e,t){return tr(this,void 0,void 0,(function(){return nr(this,(function(n){switch(n.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 protocol \u53c2\u6570\u5fc5\u987b\u4e3a oauth \u6216 oidc\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570");if(!this.options.secret&&"none"!==this.options.tokenEndPointAuthMethod)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 appId \u548c secret \u53c2\u6570");return"client_secret_post"!==this.options.tokenEndPointAuthMethod?[3,2]:[4,this._getAccessTokenByCodeWithClientSecretPost(e,null===t||void 0===t?void 0:t.codeVerifier)];case 1:return[2,n.sent()];case 2:return"client_secret_basic"!==this.options.tokenEndPointAuthMethod?[3,4]:[4,this._getAccessTokenByCodeWithClientSecretBasic(e,null===t||void 0===t?void 0:t.codeVerifier)];case 3:return[2,n.sent()];case 4:return"none"!==this.options.tokenEndPointAuthMethod?[3,6]:[4,this._getAccessTokenByCodeWithNone(e,null===t||void 0===t?void 0:t.codeVerifier)];case 5:return[2,n.sent()];case 6:return[2]}}))}))},e.prototype.generateCodeChallenge=function(){return function(e){void 0===e&&(e=30);for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=n.length,r=0;r<e;r++)t+=n.charAt(Math.floor(Math.random()*o));return t}(43)},e.prototype.getCodeChallengeDigest=function(e){if(!e)throw new Error("\u8bf7\u63d0\u4f9b options \u53c2\u6570\uff0coptions.codeChallenge \u4e3a\u4e00\u4e2a\u957f\u5ea6\u5927\u4e8e\u7b49\u4e8e 43 \u7684\u5b57\u7b26\u4e32\uff0coptions.method \u53ef\u9009\u503c\u4e3a S256\u3001plain");if(!e.codeChallenge)throw new Error("\u8bf7\u63d0\u4f9b options.codeChallenge\uff0c\u503c\u4e3a\u4e00\u4e2a\u957f\u5ea6\u5927\u4e8e\u7b49\u4e8e 43 \u7684\u5b57\u7b26\u4e32");var t=e.method,n=void 0===t?"S256":t;if("S256"===n)return it()(e.codeChallenge).toString(st.a.enc.Base64).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");if("plain"===n)return e.codeChallenge;throw new Error("\u4e0d\u652f\u6301\u7684 options.method\uff0c\u53ef\u9009\u503c\u4e3a S256\u3001plain")},e.prototype.getAccessTokenByClientCredentials=function(e,t){return tr(this,void 0,void 0,(function(){var n,o,r,i;return nr(this,(function(a){switch(a.label){case 0:if(!e)throw new Error("\u8bf7\u4f20\u5165 scope \u53c2\u6570\uff0c\u8bf7\u770b\u6587\u6863\uff1ahttps://docs.authing.cn/v2/guides/authorization/m2m-authz.html");if(!t)throw new Error("\u8bf7\u5728\u8c03\u7528\u672c\u65b9\u6cd5\u65f6\u4f20\u5165 { accessKey: string, accessSecret: string }\uff0c\u8bf7\u770b\u6587\u6863\uff1ahttps://docs.authing.cn/v2/guides/authorization/m2m-authz.html");return n=(null===t||void 0===t?void 0:t.accessKey)||this.options.appId,o=(null===t||void 0===t?void 0:t.accessSecret)||this.options.secret,r=this._generateTokenRequest({client_id:n,client_secret:o,grant_type:"client_credentials",scope:e}),i="","oidc"===this.options.protocol?i=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(i=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:i,data:r,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,a.sent()]}}))}))},e.prototype.getUserInfoByAccessToken=function(e,t){return tr(this,void 0,void 0,(function(){var n;return nr(this,(function(o){switch(o.label){case 0:if(t){if(t.method&&!["POST","GET"].includes(t.method))throw new Error("options.method \u53c2\u6570\u7684\u53ef\u9009\u503c\u4e3a POST\u3001GET\uff0c\u8bf7\u68c0\u67e5\u8f93\u5165");if(t.tokenPlace&&!["query","header","body"].includes(t.tokenPlace))throw new Error("options.tokenPlace \u53c2\u6570\u7684\u53ef\u9009\u503c\u4e3a query\u3001header\u3001body\uff0c\u8bf7\u68c0\u67e5\u8f93\u5165");if("GET"===t.method&&"body"===t.tokenPlace)throw new Error("options.method \u53c2\u6570\u4e3a GET \u65f6\uff0coptions.tokenPlace \u53c2\u6570\u4e0d\u80fd\u4e3a body");t.method=t.method||"GET",t.tokenPlace=t.tokenPlace||"query"}return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/me":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/me"),"POST"!==(null===t||void 0===t?void 0:t.method)?[3,7]:"header"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,2]:[4,this.naiveHttpClient.request({method:"POST",url:n,headers:{Authorization:"Bearer "+e}})];case 1:return[2,o.sent()];case 2:return"query"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,4]:[4,this.naiveHttpClient.request({method:"POST",url:n,params:{access_token:e}})];case 3:return[2,o.sent()];case 4:return"body"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,6]:[4,this.naiveHttpClient.request({method:"POST",url:n,data:to({access_token:e})})];case 5:return[2,o.sent()];case 6:return[3,14];case 7:return"GET"!==(null===t||void 0===t?void 0:t.method)?[3,12]:"header"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,9]:[4,this.naiveHttpClient.request({method:"GET",url:n,headers:{Authorization:"Bearer "+e}})];case 8:return[2,o.sent()];case 9:return"query"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,11]:[4,this.naiveHttpClient.request({method:"GET",url:n,params:{access_token:e}})];case 10:return[2,o.sent()];case 11:return[3,14];case 12:return[4,this.naiveHttpClient.request({method:"GET",url:n,params:{access_token:e}})];case 13:return[2,o.sent()];case 14:return[2]}}))}))},e.prototype.buildAuthorizeUrl=function(e){if(!this.baseClient.appHost)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u5e94\u7528\u57df\u540d appHost \u53c2\u6570\uff0c\u5f62\u5982\uff1ahttps://app1.authing.cn");if("oidc"===this.options.protocol)return this._buildOidcAuthorizeUrl(e);if("oauth"===this.options.protocol)return this._buildOauthAuthorizeUrl(e);if("saml"===this.options.protocol)return this._buildSamlAuthorizeUrl();if("cas"===this.options.protocol)return this._buildCasAuthorizeUrl(e);throw new Error("\u4e0d\u652f\u6301\u7684\u534f\u8bae\u7c7b\u578b\uff0c\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 protocol \u53c2\u6570\uff0c\u53ef\u9009\u503c\u4e3a oidc\u3001oauth\u3001saml\u3001cas")},e.prototype._buildOidcAuthorizeUrl=function(e){var t={appId:"client_id",scope:"scope",state:"state",nonce:"nonce",responseMode:"response_mode",responseType:"response_type",redirectUri:"redirect_uri",codeChallenge:"code_challenge",codeChallengeMethod:"code_challenge_method",tenantId:"tenant_id"},n={nonce:Math.random().toString().slice(2),state:Math.random().toString().slice(2),scope:"openid profile email phone address",client_id:this.options.appId,redirect_uri:this.options.redirectUri,response_type:"code"};Object.keys(t).forEach((function(o){e&&e[o]&&("scope"===o&&e.scope.includes("offline_access")&&(n.prompt="consent"),n[t[o]]=e[o])}));var o=new URLSearchParams(n);return this.baseClient.appHost+"/oidc/auth?"+o.toString()},e.prototype._buildOauthAuthorizeUrl=function(e){var t={appId:"client_id",scope:"scope",state:"state",responseType:"response_type",redirectUri:"redirect_uri"},n={state:Math.random().toString().slice(2),scope:"user",client_id:this.options.appId,redirect_uri:this.options.redirectUri,response_type:"code"};Object.keys(t).forEach((function(o){e&&e[o]&&(n[t[o]]=e[o])}));var o=new URLSearchParams(n);return this.baseClient.appHost+"/oauth/auth?"+o.toString()},e.prototype._buildSamlAuthorizeUrl=function(){return this.baseClient.appHost+"/api/v2/saml-idp/"+this.options.appId},e.prototype._buildCasAuthorizeUrl=function(e){return(null===e||void 0===e?void 0:e.service)?this.baseClient.appHost+"/cas-idp/"+this.options.appId+"?service="+(null===e||void 0===e?void 0:e.service):this.baseClient.appHost+"/cas-idp/"+this.options.appId},e.prototype._buildCasLogoutUrl=function(e){return(null===e||void 0===e?void 0:e.redirectUri)?this.baseClient.appHost+"/cas-idp/logout?url="+e.redirectUri:this.baseClient.appHost+"/cas-idp/logout"},e.prototype._buildOidcLogoutUrl=function(e){if(e&&(!e.idToken||!e.redirectUri))throw new Error("\u5fc5\u987b\u540c\u65f6\u4f20\u5165 idToken \u548c redirectUri \u53c2\u6570\uff0c\u6216\u8005\u540c\u65f6\u90fd\u4e0d\u4f20\u5165");return(null===e||void 0===e?void 0:e.redirectUri)?this.baseClient.appHost+"/oidc/session/end?id_token_hint="+e.idToken+"&post_logout_redirect_uri="+e.redirectUri:this.baseClient.appHost+"/oidc/session/end"},e.prototype._buildEasyLogoutUrl=function(e){return(null===e||void 0===e?void 0:e.redirectUri)?this.baseClient.appHost+"/login/profile/logout?redirect_uri="+e.redirectUri:this.baseClient.appHost+"/login/profile/logout"},e.prototype.buildLogoutUrl=function(e){return"cas"===this.options.protocol?this._buildCasLogoutUrl(e):"oidc"===this.options.protocol&&(null===e||void 0===e?void 0:e.expert)?this._buildOidcLogoutUrl(e):this._buildEasyLogoutUrl(e)},e.prototype._getNewAccessTokenByRefreshTokenWithClientSecretPost=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,grant_type:"refresh_token",refresh_token:e}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:t,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,o.sent()]}}))}))},e.prototype._getNewAccessTokenByRefreshTokenWithClientSecretBasic=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token"),n=this._generateTokenRequest({grant_type:"refresh_token",refresh_token:e}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:t,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,o.sent()]}}))}))},e.prototype._getNewAccessTokenByRefreshTokenWithNone=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token"),n=this._generateTokenRequest({client_id:this.options.appId,grant_type:"refresh_token",refresh_token:e}),[4,this.naiveHttpClient.request({method:"POST",url:t,data:n})];case 1:return[2,o.sent()]}}))}))},e.prototype.getNewAccessTokenByRefreshToken=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 protocol \u53c2\u6570\u5fc5\u987b\u4e3a oauth \u6216 oidc\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570");if(!this.options.secret&&"none"!==this.options.tokenEndPointAuthMethod)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 appId \u548c secret \u53c2\u6570");return"client_secret_post"!==this.options.tokenEndPointAuthMethod?[3,2]:[4,this._getNewAccessTokenByRefreshTokenWithClientSecretPost(e)];case 1:return[2,t.sent()];case 2:return"client_secret_basic"!==this.options.tokenEndPointAuthMethod?[3,4]:[4,this._getNewAccessTokenByRefreshTokenWithClientSecretBasic(e)];case 3:return[2,t.sent()];case 4:return"none"!==this.options.tokenEndPointAuthMethod?[3,6]:[4,this._getNewAccessTokenByRefreshTokenWithNone(e)];case 5:return[2,t.sent()];case 6:return[2]}}))}))},e.prototype._revokeTokenWithClientSecretPost=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,token:e}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token/revocation":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token/revocation"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:t,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,o.sent()]}}))}))},e.prototype._revokeTokenWithClientSecretBasic=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:if(t="","oidc"===this.options.protocol)t=this.baseClient.appHost+"/oidc/token/revocation";else if("oauth"===this.options.protocol)throw new Error("OAuth 2.0 \u6682\u4e0d\u652f\u6301\u7528 client_secret_basic \u6a21\u5f0f\u8eab\u4efd\u9a8c\u8bc1\u64a4\u56de Token");return n=this._generateTokenRequest({token:e}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:t,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,o.sent()]}}))}))},e.prototype._revokeTokenWithNone=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token/revocation":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token/revocation"),n=this._generateTokenRequest({client_id:this.options.appId,token:e}),[4,this.naiveHttpClient.request({method:"POST",url:t,data:n})];case 1:return[2,o.sent()]}}))}))},e.prototype.revokeToken=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 protocol \u53c2\u6570\u5fc5\u987b\u4e3a oauth \u6216 oidc\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570");if(!this.options.secret&&"none"!==this.options.revocationEndPointAuthMethod)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 appId \u548c secret \u53c2\u6570");return"client_secret_post"!==this.options.revocationEndPointAuthMethod?[3,2]:[4,this._revokeTokenWithClientSecretPost(e)];case 1:return t.sent(),[2,!0];case 2:return"client_secret_basic"!==this.options.revocationEndPointAuthMethod?[3,4]:[4,this._revokeTokenWithClientSecretBasic(e)];case 3:return t.sent(),[2,!0];case 4:return"none"!==this.options.revocationEndPointAuthMethod?[3,6]:[4,this._revokeTokenWithNone(e)];case 5:return t.sent(),[2,!0];case 6:throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 revocationEndPointAuthMethod \u53c2\u6570\u53ef\u9009\u503c\u4e3a client_secret_base\u3001client_secret_post\u3001none\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570")}}))}))},e.prototype._introspectTokenWithClientSecretPost=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,token:e}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token/introspection"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:t,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,o.sent()]}}))}))},e.prototype._introspectTokenWithClientSecretBasic=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token/introspection"),n=this._generateTokenRequest({token:e}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:t,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,o.sent()]}}))}))},e.prototype._introspectTokenWithNone=function(e){return tr(this,void 0,void 0,(function(){var t,n;return nr(this,(function(o){switch(o.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token/introspection"),n=this._generateTokenRequest({client_id:this.options.appId,token:e}),[4,this.naiveHttpClient.request({method:"POST",url:t,data:n})];case 1:return[2,o.sent()]}}))}))},e.prototype.introspectToken=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 protocol \u53c2\u6570\u5fc5\u987b\u4e3a oauth \u6216 oidc\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570");if(!this.options.secret&&"none"!==this.options.introspectionEndPointAuthMethod)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 appId \u548c secret \u53c2\u6570");return"client_secret_post"!==this.options.introspectionEndPointAuthMethod?[3,2]:[4,this._introspectTokenWithClientSecretPost(e)];case 1:return[2,t.sent()];case 2:return"client_secret_basic"!==this.options.introspectionEndPointAuthMethod?[3,4]:[4,this._introspectTokenWithClientSecretBasic(e)];case 3:return[2,t.sent()];case 4:return"none"!==this.options.introspectionEndPointAuthMethod?[3,6]:[4,this._introspectTokenWithNone(e)];case 5:return[2,t.sent()];case 6:throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 introspectionEndPointAuthMethod \u53c2\u6570\u53ef\u9009\u503c\u4e3a client_secret_base\u3001client_secret_post\u3001none\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570")}}))}))},e.prototype.validateTicketV1=function(e,t){return tr(this,void 0,void 0,(function(){var n,o,r;return nr(this,(function(i){switch(i.label){case 0:return n=this.baseClient.appHost+"/cas-idp/"+this.options.appId+"/validate",[4,this.naiveHttpClient.request({method:"GET",url:n,params:{service:t,ticket:e}})];case 1:return o=i.sent(),r=o.split("\n")[0],[2,er({valid:"yes"===r},"yes"!==r&&{message:"ticket \u4e0d\u5408\u6cd5"})]}}))}))},e.prototype.validateTicketV2=function(e,t,n){return void 0===n&&(n="JSON"),tr(this,void 0,void 0,(function(){var o;return nr(this,(function(r){switch(r.label){case 0:if(!e)throw new Error("\u8bf7\u4f20\u5165 ticket \u4e00\u6b21\u6027\u7968\u636e");if(!t)throw new Error("\u8bf7\u4f20\u5165 service \u670d\u52a1\u5730\u5740");if("XML"!==n&&"JSON"!==n)throw new Error("format \u53c2\u6570\u53ef\u9009\u503c\u4e3a XML\u3001JSON\uff0c\u8bf7\u68c0\u67e5\u8f93\u5165");return o=this.baseClient.appHost+"/cas-idp/"+this.options.appId+"/serviceValidate",[4,this.naiveHttpClient.request({method:"GET",url:o,params:{service:t,ticket:e,format:n}})];case 1:return[2,r.sent()]}}))}))},e.prototype.hasRole=function(e,t){return tr(this,void 0,void 0,(function(){var n,o,r;return nr(this,(function(i){switch(i.label){case 0:return[4,(a=this.graphqlClient,s=this.tokenProvider,c={id:this.checkLoggedIn(),namespace:t},ut(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e="\n query getUserRoles($id: String!, $namespace: String) {\n user(id: $id) {\n roles(namespace: $namespace) {\n totalCount\n list {\n id\n code\n namespace\n arn\n description\n createdAt\n updatedAt\n parent {\n code\n namespace\n arn\n description\n createdAt\n updatedAt\n }\n }\n }\n }\n}\n ",[4,s.getToken()];case 1:return t=n.sent(),[2,a.request({query:e,token:t,variables:c})]}}))})))];case 1:return(n=i.sent().user)?(o=n.roles).totalCount<1?[2,!1]:(r=!1,o.list.forEach((function(t){t.code===e&&(r=!0)})),[2,r]):[2,!1]}var a,s,c}))}))},e.prototype.listApplications=function(e){return tr(this,void 0,void 0,(function(){var t,n,o,r,i;return nr(this,(function(a){switch(a.label){case 0:return n=(t=e||{}).page,o=void 0===n?1:n,r=t.limit,i=void 0===r?10:r,[4,this.httpClient.request({url:this.baseClient.appHost+"/api/v2/users/me/applications/allowed?page="+o+"&limit="+i,method:"GET"})];case 1:return[2,a.sent()]}}))}))},e.prototype.validateToken=function(e){return tr(this,void 0,void 0,(function(){return nr(this,(function(t){switch(t.label){case 0:if(!e)throw new Error("\u8bf7\u5728\u4f20\u5165\u7684\u53c2\u6570\u5bf9\u8c61\u4e2d\u5305\u542b accessToken \u6216 idToken \u5b57\u6bb5");if(e.accessToken&&e.idToken)throw new Error("accessToken \u548c idToken \u53ea\u80fd\u4f20\u5165\u4e00\u4e2a\uff0c\u4e0d\u80fd\u540c\u65f6\u4f20\u5165");return e.idToken?[4,this.naiveHttpClient.request({url:this.baseClient.appHost+"/api/v2/oidc/validate_token",method:"GET",params:{id_token:e.idToken}})]:[3,2];case 1:return[2,t.sent()];case 2:return e.accessToken?[4,this.naiveHttpClient.request({url:this.baseClient.appHost+"/api/v2/oidc/validate_token",method:"GET",params:{access_token:e.accessToken}})]:[3,4];case 3:return[2,t.sent()];case 4:return[2]}}))}))},e.prototype.trackSession=function(){return tr(this,void 0,void 0,(function(){return nr(this,(function(e){switch(e.label){case 0:return[4,this.naiveHttpClient.request({url:this.baseClient.appHost+"/cas/session",method:"GET"})];case 1:return[2,e.sent()]}}))}))},e.prototype.setLang=function(e){this.options.lang=e},e}(),ir=a.a.createContext(void 0),ar=function(){var e=Object(i.useContext)(ir);return null===e||void 0===e?void 0:e.client},sr="3.1.28-rc.1",cr=sr,ur=function(e,t){var n=t.appId,o=t.tenantId;if(e.options.appId!==n)throw new Error("AuthClientProvider \u4e0e Guard AppId \u521d\u59cb\u5316\u4e0d\u540c\uff0c\u8bf7\u68c0\u67e5\u521d\u59cb\u5316\u65f6\u4f20\u5165\u7684 AppId \u662f\u5426\u6b63\u786e");if(o&&e.options.tenantId!==o)throw new Error("AuthClientProvider \u4e0e Guard TenantId \u521d\u59cb\u5316\u4e0d\u540c\uff0c\u8bf7\u68c0\u67e5\u521d\u59cb\u5316\u65f6\u4f20\u5165\u7684 TenantId \u662f\u5426\u6b63\u786e");return!0},lr=function(){if(!ko)throw new Error("Please initialize GuardAuthClient");return ko},dr=function(){return lr()},pr=(n(25),n(14)),hr=n.n(pr),mr={onLogin:function(e,t){return hr.a.success(_.a.t("common.LoginSuccess")),e&&((null===e||void 0===e?void 0:e.token)&&t.setToken(e.token),t.setCurrentUser(e)),[e,t]},onRegister:function(){hr.a.success(_.a.t("common.registrationSuccess"));for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t}},fr=function(e,t){var n={};return Object.keys(mr).forEach((function(o){n[o]=function(){for(var n,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t&&mr[o].apply(mr,i),null===(n=e[o])||void 0===n||n.call.apply(n,[e].concat(i))}})),Object(l.a)(Object(l.a)({},e),n)},gr={lang:"zh-CN",langRange:["zh-CN","en-US"],escCloseable:!0,clickCloseable:!0,mode:T.Normal,host:"https://core.authing.cn"},vr=function(){return gr};!function(e){e.EmailCode="email-code",e.PhoneCode="phone-code"}(To||(To={})),function(e){e.Global="global"}(Po||(Po={})),function(e){e.WELCOME_EMAIL="WELCOME_EMAIL",e.FIRST_CREATED_USER="FIRST_CREATED_USER",e.REGISTER_VERIFY_CODE="REGISTER_VERIFY_CODE",e.LOGIN_VERIFY_CODE="LOGIN_VERIFY_CODE",e.MFA_VERIFY_CODE="MFA_VERIFY_CODE",e.INFORMATION_COMPLETION_VERIFY_CODE="INFORMATION_COMPLETION_VERIFY_CODE",e.FIRST_EMAIL_LOGIN_VERIFY="FIRST_EMAIL_LOGIN_VERIFY",e.CONSOLE_CONDUCTED_VERIFY="CONSOLE_CONDUCTED_VERIFY",e.RESET_PASSWORD_VERIFY_CODE="RESET_PASSWORD_VERIFY_CODE",e.EMAIL_BIND_VERIFY_CODE="EMAIL_BIND_VERIFY_CODE",e.EMAIL_UNBIND_VERIFY_CODE="EMAIL_UNBIND_VERIFY_CODE",e.SELF_UNLOCKING_VERIFY_CODE="SELF_UNLOCKING_VERIFY_CODE"}(No||(No={}));var br=Object(l.a)({},vr()),yr=function(){return Object(l.a)(Object(l.a)({},vr()),br)},Cr={finallyConfig:{},defaultMergedConfig:{},publicConfig:{},httpClient:{},appId:"",initData:{},currentModule:{},events:{},isAuthFlow:!1,contextLoaded:!1,guardPageConfig:{}},Er=a.a.createContext(Cr),wr=a.a.createContext({spin:!1,spinChange:function(){}}),Or=function(){return Object(i.useContext)(wr)},Sr=function(){return Object(i.useContext)(Er).publicConfig},kr=function(){return Object(i.useContext)(Er).httpClient},Tr=function(){return Object(i.useContext)(Er).appId},Pr=function(){return Object(i.useContext)(Er).tenantId};function Nr(){return Object(i.useContext)(Er).initData}var Ar=function(){return Object(i.useContext)(Er).events},xr=function(){var e=Object(i.useContext)(Er);return{changeModule:e.changeModule,backModule:e.backModule}},Ir=function(){return Object(i.useContext)(Er).finallyConfig},jr=function(){return Object(i.useContext)(Er).isAuthFlow};function _r(){return(_r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Lr(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Rr=i.createElement("style",null,"\n #path-f {\n fill: none;\n stroke: #0080ff;\n stroke-width: 8.2;\n stroke-dasharray: 100 220;\n animation: dash 40s infinite linear forwards;\n stroke-linecap: round;\n stroke-linejoin: round;\n\n }\n #path-b {\n fill: none;\n stroke: #eaebee;\n stroke-width: 8;\n stroke-linecap: round;\n stroke-linejoin: round;\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 12000;\n }\n }\n "),Mr=i.createElement("g",{id:"\\u5355\\u72EC",transform:"translate(25.000000, 16.000000)",fillRule:"nonzero",strokeWidth:2},i.createElement("path",{d:"M50,0 L0,30 C0,31 0,32 0,33 C0,69 20,100 50,116 C79,100 100,69 100,33 C100,32 99,31 99,30 L50,0 Z",id:"path-b"}),i.createElement("path",{d:"M50,0 L0,30 C0,31 0,32 0,33 C0,69 20,100 50,116 C79,100 100,69 100,33 C100,32 99,31 99,30 L50,0 Z",id:"path-f"}));function Fr(e,t){var n=e.title,o=e.titleId,r=Lr(e,["title","titleId"]);return i.createElement("svg",_r({width:"100%",height:"100%",viewBox:"0 0 150 150",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":o},r),Rr,void 0===n?i.createElement("title",{id:o},"Loading"):n?i.createElement("title",{id:o},n):null,Mr)}var Br,Dr=i.forwardRef(Fr),qr=(n.p,function(e){var t=Sr(),n=e.size?e.size:50;return a.a.createElement("div",{style:{width:n,height:n}},null!==t&&void 0!==t&&t.customLoading?a.a.createElement("img",{src:t.customLoading,alt:"",width:n}):a.a.createElement(Dr,null))}),Ur=function(){return a.a.createElement("div",{className:"g2-init-setting-loading"},a.a.createElement(qr,{size:100}))};!function(e){e.appQrcode="appQrcode",e.wechatMiniQrcode="wechatMiniQrcode",e.wechatmpQrcode="wechatmpQrcode"}(Br||(Br={}));var Vr,Hr=Object(l.a)(Object(l.a)(Object(l.a)({},Object(l.a)({},vr())),yr()),{},{isSSO:!1,defaultInitData:{},showLoading:!0,openEventsMapping:!0,loadingComponent:a.a.createElement("div",{className:"g2-init-setting-loading"},a.a.createElement(qr,{size:100}))});!function(e){e.ChangeModule="ChangeModule",e.Back="Back",e.Init="Init"}(Vr||(Vr={}));var zr,Gr=Object(Ie.a)((function e(t,n){var o,r=this;Object(xe.a)(this,e),this.order=0,this.config={},this.moduleStateHistory=[],this.stateMachineLog={},this.uninstallPopstate=function(){var e;null===(e=r.globalWindow())||void 0===e||e.removeEventListener("popstate",r.onPopstate)},this.globalWindow=function(){var e=G();return null!==e&&void 0!==e?e:void 0},this.next=function(e,t){var n=r.globalWindow(),o={moduleName:e,initData:t};r.changeModuleEvent(e,t);var i=r.moduleStateHistory.slice(1,2)[0];r.isUseHistoryHijack()&&(null===n||void 0===n||n.history.pushState(e,"",null===n||void 0===n?void 0:n.location.href)),i&&J()(i,o)?r.back():r.historyPush(o)},this.back=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(r.moduleStateHistory.length<=1)){var t=r.moduleStateHistory[1];r.changeModuleEvent(t.moduleName,Object(l.a)(Object(l.a)({},e),t.initData)),r.moduleStateHistory.splice(0,1)}},this.end=function(){},this.historyPush=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vr.ChangeModule;r.moduleStateHistory.unshift(e),r.stateMachineLog[r.order++]={action:t,date:(new Date).getTime(),dataSource:e},r.moduleStateHistory.length>10&&r.moduleStateHistory.splice(10,r.moduleStateHistory.length-10)},this.historyBack=function(e){r.moduleStateHistory.length<=1||(r.moduleStateHistory.splice(0,1),r.stateMachineLog[r.order++]={action:Vr.Back,date:(new Date).getTime(),dataSource:e})},this.setConfig=function(e){r.config=e},this.isUseHistoryHijack=function(){var e;return"about:blank"!==(null===(e=r.globalWindow())||void 0===e?void 0:e.location.href)},this.onPopstate=function(){r.back()},this.changeModuleEvent=t,null===(o=this.globalWindow())||void 0===o||o.addEventListener("popstate",this.onPopstate),this.historyPush(n,Vr.Init)})),Wr=function(){return zr},Kr=function(e){zr=e},$r=n(89),Yr=n.n($r),Qr=function(){var e=Object(m.a)(h.a.mark((function e(){var t,n=arguments;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch.apply(void 0,n);case 2:return t=e.sent,e.abrupt("return",t.json());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Jr=function(e){return new Promise((function(t){setTimeout((function(){t({data:{code:-1}}),e()}),1e4)}))};Qr.get=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i,a,s,c=arguments;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},o=c.length>2?c[2]:void 0,r=Object(l.a)(Object(l.a)({},null===o||void 0===o?void 0:o.headers),{},Object(g.a)({"Content-Type":"application/json"},Qr.langHeader,_.a.language)),""!==Qr.tenantId&&(r[Qr.tenantHeader]=Qr.tenantId),e.prev=4,i=Yr.a.CancelToken,a=i.source(),e.next=9,Promise.race([Jr(a.cancel),Yr()("".concat(Qr.baseUrl).concat(t).concat(b.a.stringify(n,{addQueryPrefix:!0})),Object(l.a)(Object(l.a)({method:"GET"},o),{},{withCredentials:!0,headers:r,cancelToken:a.token}))]);case 9:return s=e.sent,e.abrupt("return",null===s||void 0===s?void 0:s.data);case 13:return e.prev=13,e.t0=e.catch(4),e.abrupt("return",Promise.resolve({code:-2}));case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(t){return e.apply(this,arguments)}}(),Qr.post=function(){var e=Object(m.a)(h.a.mark((function e(t,n,o){var r,i,a,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(l.a)(Object(l.a)({},null===o||void 0===o?void 0:o.headers),{},Object(g.a)({"Content-Type":"application/json"},Qr.langHeader,_.a.language)),""!==Qr.tenantId&&(r[Qr.tenantHeader]=Qr.tenantId),e.prev=2,i=Yr.a.CancelToken,a=i.source(),e.next=7,Promise.race([Jr(a.cancel),Yr()("".concat(Qr.baseUrl).concat(t),{data:n,method:"POST",withCredentials:!0,cancelToken:a.token,headers:Object(l.a)(Object(l.a)({"Content-Type":"application/json"},null===o||void 0===o?void 0:o.headers),{},Object(g.a)({},Qr.langHeader,_.a.language))})]);case 7:return s=e.sent,e.abrupt("return",null===s||void 0===s?void 0:s.data);case 11:return e.prev=11,e.t0=e.catch(2),e.abrupt("return",Promise.resolve({code:-2}));case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t,n,o){return e.apply(this,arguments)}}(),Qr.postForm=function(){var e=Object(m.a)(h.a.mark((function e(t,n,o){var r,i,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=Yr.a.CancelToken,i=r.source(),e.next=5,Promise.race([Jr(i.cancel),Yr()("".concat(Qr.baseUrl).concat(t),{method:"POST",data:n,withCredentials:!0,cancelToken:i.token,headers:Object(l.a)(Object(l.a)({},null===o||void 0===o?void 0:o.headers),{},Object(g.a)({},Qr.langHeader,_.a.language))})]);case 5:return a=e.sent,e.abrupt("return",null===a||void 0===a?void 0:a.data);case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",Promise.resolve({code:-2}));case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n,o){return e.apply(this,arguments)}}(),Qr.baseUrl="",Qr.setBaseUrl=function(e){Qr.baseUrl=e.replace(/\/$/,"")};var Zr="x-authing-lang";Qr.langHeader=Zr,Qr.tenantHeader="x-authing-app-tenant-id\xe5\xe5",Qr.tenantId="",Qr.setLangHeader=function(e){Qr.langHeader=e||Zr},Qr.setTenantHeader=function(e){Qr.tenantHeader=e||Zr},Qr.setTenantId=function(e){Qr.tenantId=e};var Xr,ei,ti=function(e,t){if(-1===e.code)return hr.a.error(_.a.t("common.timeout")),e;if(-2===e.code)return hr.a.error(_.a.t("common.fetchError")),e;if(!e.statusCode)return e;var n,o=e.statusCode,r=e.apiCode;switch(n=o,Math.floor(n/100)){case 3:return r===Iu.FLOW_END?t(xu.FLOW_END,e):t(xu.CHANGE_MODULE,e);case 4:case 6:return t(xu.RENDER_MESSAGE,e)}return e};!function(e){e.ERROR_CODE="errorCode"}(ei||(ei={}));var ni,oi=function(){function e(t){var n=this;Object(xe.a)(this,e),this.headers={"x-authing-userpool-id":"","x-authing-app-id":"","x-authing-sdk-version":cr,"x-authing-request-from":"Guard@".concat(cr)},this.responseInterceptorMap=new Map,this.getHeaders=function(){return n.headers},this.get=function(){var e=Object(m.a)(h.a.mark((function e(t){var o,r,i,a=arguments;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>1&&void 0!==a[1]?a[1]:{},r=a.length>2?a[2]:void 0,e.next=4,Qr.get(t,o,Object(l.a)(Object(l.a)({},r),{},{headers:Object(l.a)(Object(l.a)({},n.headers),null===r||void 0===r?void 0:r.headers)}));case 4:return i=e.sent,e.abrupt("return",n.responseIntercept(i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=Object(m.a)(h.a.mark((function e(t,o,r){var i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.post(t,o,{headers:Object(l.a)(Object(l.a)({},n.headers),null===r||void 0===r?void 0:r.headers)});case 2:return i=e.sent,e.abrupt("return",n.responseIntercept(i));case 4:case"end":return e.stop()}}),e)})));return function(t,n,o){return e.apply(this,arguments)}}(),this.postForm=function(){var e=Object(m.a)(h.a.mark((function e(t,o,r){var i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qr.postForm(t,o,{headers:Object(l.a)(Object(l.a)({},n.headers),null===r||void 0===r?void 0:r.headers)});case 2:return i=e.sent,e.abrupt("return",n.responseIntercept(i));case 4:case"end":return e.stop()}}),e)})));return function(t,n,o){return e.apply(this,arguments)}}(),this.authFlow=function(){var e=Object(m.a)(h.a.mark((function e(t,o){var r,i,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/interaction/authFlow",r=Wr(),i={action:t,data:o,flowHandle:r},e.next=5,Qr.post("/interaction/authFlow",i,{headers:Object(l.a)({},n.headers)});case 5:return a=e.sent,e.abrupt("return",n.responseIntercept(a));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.initErrorCodeInterceptor=function(e){if(!n.responseInterceptorMap.has(ei.ERROR_CODE))return n.responseInterceptorMap.set(ei.ERROR_CODE,(function(t){return ti(t,e)})),n},this.responseIntercept=function(e){return 0===n.responseInterceptorMap.size?e:Array.from(n.responseInterceptorMap.values()).reduce((function(e,t){return t(e)}),e)},t&&this.getRequestClient().setBaseUrl(t)}return Object(Ie.a)(e,[{key:"getRequestClient",value:function(){return this.requestClient||(this.requestClient=Qr),this.requestClient}},{key:"setUserpoolId",value:function(e){return this.headers["x-authing-userpool-id"]=e,this}},{key:"setAppId",value:function(e){return this.headers["x-authing-app-id"]=e,this}},{key:"setTenantId",value:function(e){return this.headers["x-authing-app-tenant-id"]=e,this}},{key:"setBaseUrl",value:function(e){return this.getRequestClient().setBaseUrl(e),this}}]),e}(),ri=function(){if(!Xr)throw new Error("Please initialize Http Client");return Xr},ii=function(){return ri()},ai=function(){var e=Object(m.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=ri(),n=t.get,e.next=3,n("/cas/session",{});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),si=function(e,t){var n=function(){var n=e.createElement("div");n.innerHTML=t;var o=n.getElementsByTagName("svg")[0];o.setAttribute("aria-hidden","true"),o.id="guard-svg-string",o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden";var r=e.body;r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)},o=e.readyState;if(["complete","loaded","interactive"].includes(o))setTimeout((function(){n()}),0);else{e.addEventListener("DOMContentLoaded",(function t(){e.removeEventListener("DOMContentLoaded",t),n()}))}},ci=function(e){var t=e.guardProps,n=e.initState,o=e.children,r=t.tenantId,s=t.config,c=Object(i.useState)(),u=Object(d.a)(c,2),p=u[0],f=u[1],g=Object(i.useState)(),v=Object(d.a)(g,2),b=v[0],y=v[1],C=Object(i.useState)(),E=Object(d.a)(C,2),w=E[0],O=E[1],S=Object(i.useState)(),k=Object(d.a)(S,2),T=k[0],P=k[1],N=Object(i.useState)(),A=Object(d.a)(N,2),x=A[0],I=A[1],j=Object(i.useState)(),_=Object(d.a)(j,2),L=_[0],R=_[1],M=Object(i.useState)(!0),F=Object(d.a)(M,2),B=F[0],D=F[1],q=function(e,t,n){var o=ar(),r=Object(i.useMemo)((function(){return e||(t&&t.options.appId?t.options.appId:o&&o.options.appId?o.options.appId:void 0)}),[o,e,t]);return Object(i.useEffect)((function(){r||null===n||void 0===n||n(new Error("appId is required"))}),[r,n]),r}(t.appId,t.authClient,R);W(q,t.appendConfig);var U=Object(i.useState)(),V=Object(d.a)(U,2),H=V[0],z=V[1],K=Object(i.useMemo)((function(){var e=Er.Provider;return{Provider:function(t){var n=t.value,o=t.children;return a.a.createElement(e,{value:Object(l.a)(Object(l.a)({},Cr),n)},o)},Consumer:Er.Consumer}}),[]).Provider,$=Object(i.useReducer)((function(e,t){var n=t.type,o=t.payload;return{moduleName:n,initData:null===o||void 0===o?void 0:o.initData}}),n),Q=Object(d.a)($,2),J=Q[0],Z=Q[1];Object(i.useEffect)((function(){var e;null!==(e=n.initData)&&void 0!==e&&e.flowHandle&&Kr(n.initData.flowHandle)}),[n.initData]);var X=Object(i.useCallback)(function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o=arguments;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>1&&void 0!==o[1]?o[1]:{},e.t0=!(null!==p&&void 0!==p&&p.onBeforeChangeModule),e.t0){e.next=6;break}return e.next=5,p.onBeforeChangeModule(t,n);case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=8;break}Z({type:t,payload:{initData:null!==n&&void 0!==n?n:{}}});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[p]),ee=function(e,t){var n=Object(i.useState)(),o=Object(d.a)(n,2),r=o[0],a=o[1];return Object(i.useEffect)((function(){a(Object(l.a)(Object(l.a)({},e),t))}),[e,t]),r}(Hr,s);Object(i.useEffect)((function(){if(q&&ee){var e=function(e){if(!Xr){var t=new oi(e);Xr=t}return Xr}(ee.host);e.setAppId(q),r&&e.setTenantId(r),O(e)}}),[q,ee,r]);var te=De(q,ee,w,R),ne=function(e,t,n){var o=Object(i.useState)(),r=Object(d.a)(o,2),a=r[0],s=r[1],c=Object(i.useCallback)(Object(m.a)(h.a.mark((function o(){return h.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!t||!e){o.next=11;break}if(Ue(e)){o.next=10;break}return o.prev=2,o.next=5,He(e,t);case 5:o.next=10;break;case 7:o.prev=7,o.t0=o.catch(2),n(o.t0);case 10:s(Ue(e));case 11:case"end":return o.stop()}}),o,null,[[2,7]])}))),[e,t,n]);if(Object(i.useEffect)((function(){c()}),[c]),a)return a}(q,w,R),oe=function(e){var t=e.config,n=e.appId,o=e.setError,r=e.tenantId,a=ar(),s=Object(i.useState)(),c=Object(d.a)(s,2),u=c[0],l=c[1];return Object(i.useEffect)((function(){if(t&&n){var e=t.host,i=t.lang,s=ko;if(s)try{return ur(s,{appId:n,tenantId:r}),void l(s)}catch(L){o(L)}if(a)try{return ur(a,{appId:n,tenantId:r}),void l(a)}catch(L){o(L)}try{var c=new rr({appHost:e,tenantId:r,appId:n,lang:i,requestFrom:"Guard@".concat(cr),onError:function(e,t){console.error(e,t)}});l(c)}catch(L){o(L)}}}),[n,t,a,o,r]),Object(i.useMemo)((function(){u&&(ko=u)}),[u]),u}({config:te,appId:q,tenantId:r,setError:R,authClient:t.authClient}),re=function(e,t){var n=Object(i.useState)(!1),o=Object(d.a)(n,2),r=o[0],a=o[1],s=Object(i.useCallback)(Object(m.a)(h.a.mark((function n(){var o,r,i;return h.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,n.next=5,Yr()("".concat(e,"/svg-string/guard"));case 5:if(o=n.sent,r=o.data,i=G()){n.next=10;break}return n.abrupt("return");case 10:si(i.document,r),a(!0),n.next=17;break;case 14:n.prev=14,n.t0=n.catch(2),t(n.t0);case 17:case"end":return n.stop()}}),n,null,[[2,14]])}))),[e,t]);return Object(i.useEffect)((function(){s()}),[s]),r}(x);Object(i.useEffect)((function(){null!==s&&void 0!==s&&s.isSSO&&b&&p&&w&&ai().then((function(e){var t,n=e;n.userInfo&&(null===p||void 0===p||null===(t=p.onLogin)||void 0===t||t.call(p,n.userInfo,b))}))}),[q,b,null===s||void 0===s?void 0:s.isSSO,p,w]),Object(i.useEffect)((function(){w&&te&&(null===w||void 0===w||w.setBaseUrl(te.host))}),[te,w]),Object(i.useEffect)((function(){Y({},null===s||void 0===s?void 0:s.lang)}),[null===s||void 0===s?void 0:s.lang]),Object(i.useEffect)((function(){if(q){var e=Re(q);e&&(P(e),I(e.cdnBase))}}),[q,te]),Object(i.useEffect)((function(){y(oe)}),[oe]),Object(i.useEffect)((function(){if(ee){var e=function(e,t){var n={},o=["__changeModule"];return Object.keys(e).filter((function(e){return e.startsWith("on")||o.includes(e)})).forEach((function(t){n[t]=e[t]})),fr(n,t)}(Object(l.a)({},t),null===ee||void 0===ee?void 0:ee.openEventsMapping);f(e)}}),[t,ee]),Object(i.useEffect)((function(){var e=new Gr(X,n);return z(e),function(){e.uninstallPopstate()}}),[n,X]),Object(i.useEffect)((function(){return te&&te.contentCss&&ue(te.contentCss,"appConfig"),function(){return le("appConfig")}}),[te]),Object(i.useEffect)((function(){te&&D(!Boolean(null===te||void 0===te?void 0:te.__unAuthFlow__))}),[te]);var ie=Object(i.useMemo)((function(){if(p||H)return{changeModule:function(){var e=Object(m.a)(h.a.mark((function e(t,n){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===H||void 0===H||H.next(t,n);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),backModule:function(){null===H||void 0===H||H.back()}}}),[p,H]),ae=Object(i.useMemo)((function(){var e=[q,p,ee,te,w,ie,T,b,ne,re];return!e.includes(void 0)&&!e.includes(!1)}),[q,p,ee,te,w,ie,T,b,ne,re]);Object(i.useEffect)((function(){var e;ae&&(null===p||void 0===p||null===(e=p.onLoad)||void 0===e||e.call(p,b))}),[b,ae,p]);var se=Object(i.useMemo)((function(){return ae?Object(l.a)(Object(l.a)({contextLoaded:ae,isAuthFlow:B,defaultMergedConfig:ee,finallyConfig:te,publicConfig:T,httpClient:w,appId:q,tenantId:r,events:p},ie),{},{initData:J.initData,currentModule:J,guardPageConfig:ne}):{defaultMergedConfig:ee}}),[q,ae,ee,p,te,ne,w,B,ie,J,T,r]),ce=Object(i.useMemo)((function(){return se?a.a.createElement(K,{value:se},o):null}),[K,o,se]),de=Object(i.useMemo)((function(){return a.a.createElement(K,{value:{contextLoaded:!0,defaultMergedConfig:ee,initData:{error:L},currentModule:{moduleName:_e.ERROR,initData:{error:L}}}},o)}),[K,o,ee,L]);return Object(i.useMemo)((function(){return L?de:ae||Boolean(ee)?ce:null}),[ae,ee,L,ce,de])},ui=(n(297),n(24)),li=n.n(ui),di=(n(298),n(171)),pi=n.n(di),hi=n(823);!function(e){e[e.OTP_MFA_CODE=1635]="OTP_MFA_CODE",e[e.APP_MFA_CODE=1636]="APP_MFA_CODE",e[e.INPUT_CAPTCHACODE=2e3]="INPUT_CAPTCHACODE",e[e.USER_EXISTENCE=2026]="USER_EXISTENCE",e[e.LOGIN_INVALID=2021]="LOGIN_INVALID",e[e.PASSWORD_ERROR=2333]="PASSWORD_ERROR",e[e.USER_NOT_EXIST=2004]="USER_NOT_EXIST",e[e.MULTIPLE_ERROR_LOCK=2057]="MULTIPLE_ERROR_LOCK",e[e.ACCOUNT_LOCK=2005]="ACCOUNT_LOCK"}(ni||(ni={}));n(129);var mi,fi=n(73),gi=n.n(fi),vi=(n(33),n(8)),bi=n.n(vi),yi=(n(299),n(166)),Ci=n.n(yi),Ei=n(822),wi=n(18),Oi=y(),Si=Object(d.a)(Oi,2),ki=(Si[0],Si[1],n(353)),Ti=n(77),Pi=n.n(Ti),Ni=function(){var e;return e={},Object(g.a)(e,P.Password,_.a.t("login.pwdLogin")),Object(g.a)(e,P.PhoneCode,_.a.t("login.verifyCodeLogin")),Object(g.a)(e,P.AppQr,_.a.t("login.appScanLogin")),Object(g.a)(e,P.WxMinQr,_.a.t("login.scanLogin")),Object(g.a)(e,P.LDAP,_.a.t("login.ldapLogin")),Object(g.a)(e,P.AD,_.a.t("login.adLogin")),Object(g.a)(e,P.WechatMpQrcode,_.a.t("login.wechatmpQrcode")),e},Ai=["wechat:miniprogram:app-launch","wechat:miniprogram:qrconnect","wechat:miniprogram:default","wechatwork:addressbook","wechat:mobile","landray"],xi=["dingtalk","lark-public","lark-internal","wechatwork:corp:qrconnect","wechatwork:service-provider:qrconnect","wechatwork:agency:qrconnect"];!function(e){e.SMS="SMS",e.EMAIL="EMAIL"}(mi||(mi={}));Ni(),T.Normal,A.Login,P.Password,N.Email,P.Password,P.PhoneCode,N.Email,N.Phone;var Ii,ji=function(){return{isPhoneMedia:Object(ki.useMediaQuery)({maxWidth:450})}},_i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CN",o=void 0,r=t;if(!e)return{phoneNumber:r,countryCode:void 0};if(Pi()(t,{country:n}).isValid){var i=Pi()(t,{country:n});o=i.countryCode,r=i.phoneNumber.split(o)[1]}else if(Pi()(t).isValid){var a=Pi()(t);o=a.countryCode,r=a.phoneNumber.split(o)[1]}return{countryCode:o,phoneNumber:r}};!function(e){e.Message="message",e.Auth="auth"}(Ii||(Ii={}));var Li,Ri=function(e){var t,n,o,r,i,a,s=e.config,c=e.publicConfig,u=!(null!==s&&void 0!==s&&null!==(t=s.loginMethods)&&void 0!==t&&t.length);s.enterpriseConnections?o=(null===c||void 0===c||null===(r=c.identityProviders)||void 0===r||null===(i=r.filter)||void 0===i?void 0:i.call(r,(function(e){return s.enterpriseConnections.includes(e.identifier)})))||[]:o=(null===c||void 0===c?void 0:c.identityProviders)||[];if(s.socialConnections){var l,d,p,h=s.socialConnections;a=null!==(l=null===c||void 0===c||null===(d=c.socialConnections)||void 0===d||null===(p=d.filter)||void 0===p?void 0:p.call(d,(function(e){return h.includes(e.provider)})))&&void 0!==l?l:[]}else a=Object(f.a)((null===c||void 0===c?void 0:c.socialConnections)||[]);a=null===(n=a)||void 0===n?void 0:n.filter((function(e){return!Ai.includes(e.provider)})).filter((function(e){return!xi.includes(e.provider)||(o.find((function(t){return t.identifier===e.identifier}))||o.push(e),!1)}));var m=["wechat:mobile","wechat:miniprogram:app-launch","wechat:miniprogram:default","apple","yidun"];switch(!0){case me():var g=[po.WECHATPC,po.GITHUB,po.QQ,po.APPLE_WEB,po.ALIPAY,po.LINKEDIN,po.BAIDU,po.GOOGLE,po.WEIBO,po.FACEBOOK,po.SLACK,po.DINGTALK,"wechatwork:mobile","instagram","qingcloud","gitee","gitlab"];a=a.filter((function(e){return!m.includes(e.provider)})).map((function(e){return g.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e})),o=o.filter((function(e){return!(null!==e&&void 0!==e&&e.provider&&m.includes(e.provider))})).map((function(e){return g.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e}));break;case"undefined"===typeof navigator?null:/ QQ/i.test(navigator.userAgent):var v=[po.WECHATPC,po.WECHATMP,po.APPLE_WEB,po.GOOGLE,po.ALIPAY,po.WECHATWORK_CORP_QRCONNECT,po.DINGTALK,"wechatwork:agency:qrconnect","wechatwork:mobile"];a=a.filter((function(e){return!m.includes(e.provider)})).map((function(e){return v.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e})),o=o.filter((function(e){return!(null!==e&&void 0!==e&&e.provider&&m.includes(e.provider))})).map((function(e){return v.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e}));break;case"undefined"===typeof navigator?null:/MicroMessenger/i.test(navigator.userAgent)&&/wxwork/i.test(navigator.userAgent):var b=[po.WECHATPC,po.WECHATMP,po.GITHUB,po.QQ,po.APPLE_WEB,po.ALIPAY,po.LINKEDIN,po.BAIDU,po.GOOGLE,po.WEIBO,po.FACEBOOK,po.SLACK,po.DINGTALK,"wechatwork:mobile","instagram","qingcloud","gitee","gitlab"];a=a.filter((function(e){return!m.includes(e.provider)})).map((function(e){return b.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e})),o=o.filter((function(e){return!(null!==e&&void 0!==e&&e.provider&&m.includes(e.provider))})).map((function(e){return b.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e}));break;case ge():var y=[po.WECHATPC,po.WECHATMP,po.QQ,po.APPLE_WEB,po.GOOGLE,po.ALIPAY,po.WECHATWORK_CORP_QRCONNECT,"wechatwork:agency:qrconnect","wechatwork:mobile"];a=a.filter((function(e){return!m.includes(e.provider)})).map((function(e){return y.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e})),o=o.filter((function(e){return!(null!==e&&void 0!==e&&e.provider&&m.includes(e.provider))})).map((function(e){return y.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e}));break;case fe():var C=[po.WECHATPC,po.WECHATMP,po.GITHUB,po.QQ,po.APPLE_WEB,po.ALIPAY,po.LINKEDIN,po.BAIDU,po.GOOGLE,po.WEIBO,po.FACEBOOK,po.SLACK,po.DINGTALK,"gitlab","gitee","instagram","wechatwork:agency:qrconnect","wechatwork:mobile"];a=a.filter((function(e){return!m.includes(e.provider)})).map((function(e){return C.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e})),o=o.filter((function(e){return!(null!==e&&void 0!==e&&e.provider&&m.includes(e.provider))})).map((function(e){return C.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e}));break;default:var E=[po.WECHATMP,"wechatwork:mobile"];a=a.filter((function(e){return!m.includes(e.provider)})).map((function(e){return E.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e})),o=o.filter((function(e){return!(null!==e&&void 0!==e&&e.provider&&m.includes(e.provider))})).map((function(e){return E.includes(e.provider)?e.action=Ii.Message:e.action=Ii.Auth,e}))}var w=G();if(w){null!==s&&void 0!==s&&s.isHost||!ve()&&w.postMessage||(a=[],o=[]);var O=u&&(!(null!==c&&void 0!==c&&c.ssoPageComponentDisplay.socialLoginBtns)||!a.length)&&(!(null!==c&&void 0!==c&&c.ssoPageComponentDisplay.idpBtns)||!o.length);return[a,o,O]}},Mi=(n(45),n(23)),Fi=n.n(Mi),Bi=(n(596),function(e){var t=Or().spin,n=e.type,o=Object(i.useMemo)((function(){return t}),[t]),r=Object(i.useMemo)((function(){var t=e.className;return n&&(t+=" guard-button-link-like"),o&&(t+=" guard-button-disabled"),t}),[o,e,n]);return a.a.createElement(Fi.a,Object(wi.a)({},e,{className:r,onClick:function(t){o||e.onClick&&e.onClick(t)}}))}),Di=function(e,t){var n,o,r,s,c=Or(),u=c.spinChange,l=c.spin,p=Object(i.useState)(!1),h=Object(d.a)(p,2),m=h[0],f=h[1],g=Object(i.useState)(!1),v=Object(d.a)(g,2),b=v[0],y=v[1],C=function(){var e=document.getElementsByClassName("authing-g2-input"),t=document.getElementsByClassName("authing-agreements-item-invalid"),n=document.getElementsByClassName("authing-g2-code-input"),o=document.getElementsByClassName("g2-mfa-bindTotp-secretSave");return{MountShaking:function(){Array.from(e).forEach((function(e){e.classList.add("shaking")})),Array.from(t).forEach((function(e){e.classList.add("shaking")})),n[0]&&n[0].classList.add("shaking"),o[0]&&o[0].classList.add("shaking")},UnMountShaking:function(){Array.from(e).forEach((function(e){e.classList.remove("shaking")})),Array.from(t).forEach((function(e){e.classList.remove("shaking")})),n[0]&&n[0].classList.remove("shaking"),o[0]&&o[0].classList.remove("shaking")}}}(),E=C.MountShaking,w=C.UnMountShaking;Object(i.useEffect)((function(){var e;return!0===b&&(e=setTimeout((function(){w()}),1e3)),function(){clearTimeout(e)}}),[w,b]),Object(i.useImperativeHandle)(t,(function(){return{onError:function(e){f(!1),E(),y(!0),u(!1)},onSpin:function(e){f(e),u(e)}}}));var O=e.className?e.className:"";return a.a.createElement(Bi,Object(wi.a)({},e,{size:null!==(n=null===e||void 0===e?void 0:e.size)&&void 0!==n?n:"large",type:null!==(o=null===e||void 0===e?void 0:e.type)&&void 0!==o?o:"primary",htmlType:null!==(r=null===e||void 0===e?void 0:e.htmlType)&&void 0!==r?r:"submit",loading:m,disabled:!!l||(null!==(s=null===e||void 0===e?void 0:e.disabled)&&void 0!==s?s:m),onClick:e.onClick?e.onClick:function(){},className:"authing-g2-submit-button ".concat(O," ").concat("")}),e.text)},qi=Object(i.forwardRef)(Di);!function(e){e.VerifyTotpFirstTime="verify-totp-first-time",e.ConfirmTotpRecoveryCode="confirm-totp-recovery-code"}(Li||(Li={}));var Ui,Vi=function(){var e=Object(m.a)(h.a.mark((function e(t,n){var o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=ri(),r=o.authFlow,e.next=3,r(t,Object(l.a)({},n));case 3:return i=e.sent,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Hi=Ci.a.Paragraph,zi=function(e){var t=e.secret,n=e.onBind,o=Object(i.useRef)(null),r=bi.a.useForm(),s=Object(d.a)(r,1)[0],c=Object(Ei.a)().t,u=jr(),l=function(){var e=Object(m.a)(h.a.mark((function e(){var t,r,i,a,c,l,d,p;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(t=o.current)||void 0===t||t.onSpin(!0),e.next=3,s.validateFields();case 3:if(!u){e.next=14;break}return e.next=6,Vi(Li.ConfirmTotpRecoveryCode,{});case 6:i=e.sent,a=i.data,c=i.isFlowEnd,l=i.onGuardHandling,null===(r=o.current)||void 0===r||r.onSpin(!1),c?n(a):(null===(d=o.current)||void 0===d||d.onError(),null===l||void 0===l||l()),e.next=16;break;case 14:null===(p=o.current)||void 0===p||p.onSpin(!1),n();case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"authing-g2-mfa-title"},c("common.totpText1")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},c("common.totpText2")),a.a.createElement("div",{className:"g2-mfa-bindTotp-copySecret"},a.a.createElement(Hi,{copyable:!0},t)),a.a.createElement(bi.a,{form:s,onFinish:l,style:{width:"100%"},onFinishFailed:function(){var e;return null===(e=o.current)||void 0===e?void 0:e.onError()}},a.a.createElement(bi.a.Item,{className:"authing-g2-input-form g2-mfa-totp-verify-input",name:"remember",rules:[{validator:function(e,t){return t?Promise.resolve():Promise.reject()}}],valuePropName:"checked"},a.a.createElement(gi.a,{className:"g2-mfa-bindTotp-secretSave"},c("login.rememberedSecret"))),a.a.createElement(qi,{text:c("common.bindSuccess"),ref:o})))},Gi=(n(643),["borderRadius","noSpin","alt","style"]),Wi=function(e){var t=e.borderRadius,n=e.noSpin,o=e.alt,r=e.style,s=Object(C.a)(e,Gi),c=Object(i.useState)(!0===n),u=Object(d.a)(c,2),p=u[0],h=u[1],m=0,f=0;return e.size?(m=e.size,f=e.size):(m=e.width?e.width:"auto",f=e.height?e.height:"auto"),a.a.createElement("div",{style:{width:m,height:f},className:de(["g2-base-imagepro-container","g2-base-image-background-animation",p?"loaded":"unload",null===e||void 0===e?void 0:e.className])},a.a.createElement("img",Object(wi.a)({},s,{style:Object(l.a)({width:m,height:f,borderRadius:t},r),className:"g2-base-imagepro",draggable:!1,alt:o||"image",onLoad:function(){return h(!0)}})))},Ki=(n(314),["codeLength","ruleKeyword"]),$i=function(e){var t=Object(Ei.a)().t,n=e.codeLength,o=e.ruleKeyword,r=void 0===o?t("common.captchaCode"):o,i=Object(C.a)(e,Ki);return a.a.createElement(bi.a.Item,Object(wi.a)({validateTrigger:["onChange"],name:"mfaCode",className:"g2-mfa-totp-verify-input",validateFirst:!0,rules:[{type:"array",validateTrigger:["onChange"],message:t("common.isMissing",{name:r}),required:!0},{type:"array",validateTrigger:[""],message:t("common.fullCaptchaCode",{name:r}),min:n}]},i))},Yi=(n(209),n(120)),Qi=n.n(Yi),Ji=(n(44),n(17)),Zi=n.n(Ji),Xi=["length","size","gutter","className","onEenter","showDivider","onChange","value","onFinish"],ea=function(e){var t=e.length,n=void 0===t?4:t,o=e.size,r=void 0===o?"46px":o,s=e.gutter,c=void 0===s?n>4?"14px":"24px":s,u=(e.className,e.onEenter),l=e.showDivider,p=e.onChange,h=e.value,m=e.onFinish,g=Object(C.a)(e,Xi),v=Object(i.useRef)([]),b=Object(i.useRef)(null),y=Object(i.useState)(null!==h&&void 0!==h?h:[]),E=Object(d.a)(y,2),w=E[0],O=E[1],S=Object(i.useState)(0),k=Object(d.a)(S,2),T=k[0],P=k[1];Object(i.useEffect)((function(){v.current[T].focus()}),[T]);var N=Object(i.useCallback)((function(e){O(e),null===p||void 0===p||p(e)}),[p]),A=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,o=parseInt(e);e=isNaN(o)?"":String(o);var r=Object(f.a)(w);r[t]=e.split("").slice(-1)[0]||"",N(r),Boolean(e)&&Boolean(v.current[t+1])&&P(t+1),r.filter((function(e){return Boolean(e)})).length>=n&&t>=n-1&&(null===m||void 0===m||m(r))}),[n,N,m,w]);return Object(i.useEffect)((function(){var e=b.current,t=function(e){var t;e.preventDefault(),e.stopPropagation();var o=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text");if(o&&!isNaN(parseInt(o)))if(o.length<n){var r=w.map((function(e,t){var n;return null!==(n=null===o||void 0===o?void 0:o[t])&&void 0!==n?n:""}));N(r),P(o.length)}else{var i=o.slice(0,n).split("");N(i),P(n-1)}};return null===e||void 0===e||e.addEventListener("paste",t),function(){null===e||void 0===e||e.removeEventListener("paste",t)}}),[n,N,O,w]),a.a.createElement("div",Object(wi.a)({ref:b,className:"authing-g2-code-input"},g),new Array(n).fill(0).map((function(e,t){return a.a.createElement(i.Fragment,{key:t},a.a.createElement(Zi.a,{ref:function(e){return v.current[t]=e},style:{width:r,minWidth:r,minHeight:r,height:r,lineHeight:r,marginLeft:0===t?0:c},className:"authing-g2-code-input-item",size:"large",autoFocus:0===t,onKeyDown:function(e){return function(e,t){var n=w[t];switch(e.key){case"Backspace":!n&&v.current[t-1]&&(A("",t-1),v.current[t-1].focus());break;case"Enter":null===u||void 0===u||u();break;case"Left":case"ArrowLeft":e.preventDefault(),v.current[t-1]&&v.current[t-1].focus();break;case"Right":case"ArrowRight":e.preventDefault(),v.current[t+1]&&v.current[t+1].focus()}}(e,t)},value:w[t],maxLength:2,onChange:function(e){if(e.persist(),!e.nativeEvent.isComposing){var n=e.target.value;if(/^[0-9]*$/.test(n)){var o=w[t]||"",r=n.split("").filter((function(e){return e!==o}))[0]||n.slice(-1);A(r,t)}}},pattern:"[0-9]*",type:"tel"}),l&&t===Math.floor(n/2-1)&&a.a.createElement(Qi.a,{className:"authing-g2-code-input-divider"}))})))},ta=function(e){var t=e.mfaToken,n=e.qrcode,o=e.onNext,r=e.changeModule,s=bi.a.useForm(),c=Object(d.a)(s,1)[0],u=Object(i.useRef)(null),l=Object(Ei.a)().t,p=ii().post,f=jr(),g=Object(hi.a)(Object(m.a)(h.a.mark((function e(){var n,r,i,a,s,l,d,m,g,v,b,y,C;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(n=u.current)||void 0===n||n.onSpin(!0),e.next=3,c.validateFields();case 3:if(r=c.getFieldValue("saftyCode"),!f){e.next=14;break}return e.next=7,Vi(Li.VerifyTotpFirstTime,{totp:r.join("")});case 7:a=e.sent,s=a.statusCode,l=a.onGuardHandling,null===(i=u.current)||void 0===i||i.onSpin(!1),200===s?o():(null===(d=u.current)||void 0===d||d.onError(),null===l||void 0===l||l()),e.next=22;break;case 14:return e.next=16,p("/api/v2/mfa/totp/associate/confirm",{authenticator_type:"totp",totp:r.join(""),source:"APPLICATION"},{headers:{authorization:t}});case 16:g=e.sent,v=g.code,b=g.data,y=g.onGuardHandling,null===(m=u.current)||void 0===m||m.onSpin(!1),200===v?o(b):(null===(C=u.current)||void 0===C||C.onError(),null===y||void 0===y||y());case 22:case"end":return e.stop()}}),e)}))),[t]),v=Object(d.a)(g,2)[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"authing-g2-mfa-title"},l("user.mfaBind")),a.a.createElement("p",{className:"authing-g2-mfa-tips",style:{textAlign:"left"}},l("common.usePhoneOpen"),"\uff08",l("common.noValidator")," ",a.a.createElement("span",{style:{color:"#215AE5",cursor:"pointer"},onClick:function(){null===r||void 0===r||r(_e.DOWNLOAD_AT)}},l("common.clickTodownload")),"\uff09 ",l("common.mfaText1")),a.a.createElement(Wi,{className:"g2-mfa-bindTotp-qrcode",src:n,alt:"qrcode"}),a.a.createElement(bi.a,{className:"g2-mfa-bindTotp-securityCode-form",form:c,onSubmitCapture:function(){},onFinish:v,onFinishFailed:function(e){u.current.onError()}},a.a.createElement($i,{codeLength:6,name:"saftyCode",ruleKeyword:l("user.numberSafteyCode")},a.a.createElement(ea,{length:6,showDivider:!1,gutter:"10px",onFinish:v})),a.a.createElement(qi,{text:l("user.nextStep"),ref:u})))};n(655),Object(l.a)(Object(l.a)({},vr()),{},{autoRegister:!1});!function(e){e.SMS="SMS",e.EMAIL="EMAIL",e.TOTP="OTP",e.FACE="FACE"}(Ui||(Ui={}));n(656);var na,oa=function(e){var t=e.type,n=e.style,o=e.className;return a.a.createElement("svg",{style:Object(l.a)({},n),className:de(["g2-icon",o])},a.a.createElement("use",{xlinkHref:"#".concat(t)}))},ra=(n(657),function(e){var t=xr().changeModule,n=Ir(),o=Object(Ei.a)().t,r=Object(i.useCallback)((function(){return null===t||void 0===t?void 0:t(_e.LOGIN)}),[t]),s=e.isRender,c=void 0===s||s,u=Object(i.useMemo)((function(){if(!c)return null;var e=[_e.LOGIN,_e.REGISTER];return n.defaultScenes&&!e.includes(n.defaultScenes)?null:a.a.createElement(Bi,{type:"link",onClick:r,className:"g2-view-mfa-back-hover"},a.a.createElement(oa,{type:"authing-arrow-left-s-line",style:{fontSize:24}}),a.a.createElement("span",null,o("common.backLoginPage")))}),[c,n.defaultScenes,r,o]);return a.a.createElement("div",{className:"g2-view-back",style:{display:"inherit"}},u)}),ia=function(e){var t=xr().changeModule,n=Object(Ei.a)().t,o=e.onBack,r=void 0===o?function(){return null===t||void 0===t?void 0:t(_e.LOGIN)}:o,s=e.isRender,c=void 0===s||s,u=e.children,l=void 0===u?n("common.backLoginPage"):u,d=Object(i.useMemo)((function(){return c?a.a.createElement(Bi,{type:"link",onClick:r,className:"g2-view-mfa-back-hover"},a.a.createElement(oa,{type:"authing-arrow-left-s-line",style:{fontSize:24}}),a.a.createElement("span",null,l)):null}),[l,c,r]);return a.a.createElement("div",{className:"g2-view-back",style:{display:"inherit"}},d)};!function(e){e.SECURITY_CODE="securityCode",e.BIND_SUCCESS="bindSuccess"}(na||(na={}));var aa=function(){var e=Nr(),t=Ar(),n=xr().changeModule,o=ii(),r=o.get,s=o.post,c=jr(),u=Object(Ei.a)().t,p=Object(i.useState)(""),f=Object(d.a)(p,2),v=f[0],b=f[1],y=Object(i.useState)(""),C=Object(d.a)(y,2),E=C[0],w=C[1],O=Object(i.useState)(),S=Object(d.a)(O,2),k=S[0],T=S[1],P=Object(i.useState)(na.SECURITY_CODE),N=Object(d.a)(P,2),A=N[0],x=N[1],I=dr(),j=Object(hi.a)(Object(m.a)(h.a.mark((function t(){var o,i,a,c,u,l,d,p,m;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={source:"APPLICATION"},i={headers:{authorization:e.mfaToken}},t.prev=2,t.next=5,r("/api/v2/mfa/authenticator",o,i);case 5:if(a=t.sent,c=a.code,u=a.message,c!==ni.LOGIN_INVALID){t.next=12;break}return hr.a.error(u),null===n||void 0===n||n(_e.LOGIN,{}),t.abrupt("return");case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(2),hr.a.error(null===t.t0||void 0===t.t0?void 0:t.t0.message);case 17:return t.prev=17,t.next=20,s("/api/v2/mfa/totp/associate",o,i);case 20:l=t.sent,d=l.data,p=l.code,m=l.onGuardHandling,200===p?(b(d.recovery_code),w(d.qrcode_data_url)):null===m||void 0===m||m(),t.next=30;break;case 27:t.prev=27,t.t1=t.catch(17),hr.a.error(null===t.t1||void 0===t.t1?void 0:t.t1.message);case 30:case"end":return t.stop()}}),t,null,[[2,14],[17,27]])}))),[]),_=Object(d.a)(j,2),L=_[0],R=_[1];Object(i.useEffect)((function(){R()}),[R]);var M=Object(i.useMemo)((function(){var e;return e={},Object(g.a)(e,na.SECURITY_CODE,(function(e){return a.a.createElement(ta,e)})),Object(g.a)(e,na.BIND_SUCCESS,(function(e){return a.a.createElement(zi,e)})),e}),[]),F=Object(i.useMemo)((function(){return a.a.createElement(ia,{onBack:function(){null===n||void 0===n||n(_e.MFA,Object(l.a)(Object(l.a)({},e),{},{current:Ui.TOTP}))}},u("common.backToVerify"))}),[n,e,u]);return a.a.createElement(a.a.Fragment,null,L.loading?a.a.createElement(Ur,null):a.a.createElement("div",{className:"g2-view-container g2-bind-totp"},F,a.a.createElement("div",{className:"g2-mfa-content g2-mfa-bindTotp"},L.loading?a.a.createElement(qr,null):M[A]({mfaToken:e.mfaToken,qrcode:E,secret:v,onBind:function(e){var n,o;c&&e?null===t||void 0===t||null===(n=t.onLogin)||void 0===n||n.call(t,e,I):k&&(null===t||void 0===t||null===(o=t.onLogin)||void 0===o||o.call(t,k,I))},onNext:function(e){c||T(e),x(na.BIND_SUCCESS)},changeModule:n}))))},sa=n(103),ca=n.n(sa),ua=["rules","fieldRequiredRuleMessage"],la=function(e){var t=Object(i.useState)(),n=Object(d.a)(t,2),o=n[0],r=n[1];return Object(i.useCallback)(function(){var t=Object(m.a)(h.a.mark((function t(n,i){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o&&clearTimeout(o),t.abrupt("return",new Promise((function(t,n){var o=setTimeout((function(){e(i,t,n)}),500);r(o)})));case 2:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),[e,o])},da=["checkRepeat","checkExist","method","name","required","areaCode","isCheckI18nSms"],pa=function(e){var t,n,o=e.checkRepeat,r=void 0!==o&&o,s=e.checkExist,c=void 0!==s&&s,u=e.method,l=e.name,d=e.required,p=e.areaCode,g=e.isCheckI18nSms,v=void 0===g||g,b=Object(C.a)(e,da),y=Sr(),E=ii().get,w=Object(Ei.a)().t,O=Object(i.useMemo)((function(){var e;return(null===(e=y.internationalSmsConfig)||void 0===e?void 0:e.enabled)&&"phone"===u&&v}),[v,u,null===(t=y.internationalSmsConfig)||void 0===t?void 0:t.enabled]),S=Object(i.useMemo)((function(){return"email"===u?{field:w("common.emailLabel"),checkRepeatErrorMessage:w("common.checkEmail"),formatErrorMessage:w("common.emailFormatError"),checkExistErrorMessage:w("common.noFindEmail"),pattern:re.email}:"username"===u?{field:w("common.username"),checkRepeatErrorMessage:w("common.checkUserName"),checkExistErrorMessage:w("common.noFindUsername"),formatErrorMessage:w("common.usernameFormatError"),pattern:re.username}:{field:w("common.phone"),checkRepeatErrorMessage:w("common.checkPhone"),checkExistErrorMessage:w("common.noFindPhone"),formatErrorMessage:w("common.phoneFormateError"),pattern:re.phone}}),[u,w]),k=la((function(e,t,n){E("/api/v2/users/find",{userPoolId:null===y||void 0===y?void 0:y.userPoolId,key:e,type:u}).then((function(e){var o=e.data;c&&(Boolean(o)?t(!0):n(S.checkExistErrorMessage)),r&&(Boolean(o)?n(S.checkRepeatErrorMessage):t(!0))}))})),T=Object(i.useMemo)((function(){return O?{validateTrigger:"onBlur",validator:function(){var e=Object(m.a)(h.a.mark((function e(t,n){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&!Object(Ti.phone)(n,{country:p}).isValid){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:return e.abrupt("return",Promise.reject(w("common.internationPhoneMessage")));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}:{validateTrigger:"onBlur",pattern:S.pattern,message:S.formatErrorMessage}}),[p,O,S.formatErrorMessage,S.pattern,w]),P=Object(i.useMemo)((function(){if(!1===d)return[];var e=Object(f.a)(ae(S.field));return e.push(T),(r||c)&&e.push({validator:k,validateTrigger:[]}),e}),[d,S.field,T,r,c,k]);return a.a.createElement(bi.a.Item,Object(wi.a)({validateFirst:!0,validateTrigger:["onBlur","onChange"],rules:[].concat(Object(f.a)(P),Object(f.a)(null!==(n=null===b||void 0===b?void 0:b.rules)&&void 0!==n?n:[])),name:null!==l&&void 0!==l?l:u},b))},ha=ca.a;ha.Password=function(e){var t=e.rules,n=e.fieldRequiredRuleMessage,o=Object(C.a)(e,ua),r=Sr();return r?a.a.createElement(bi.a.Item,Object(wi.a)({validateTrigger:["onChange","onBlur"],validateFirst:!0,name:"password",rules:[].concat(Object(f.a)(we(r.passwordStrength,r.customPasswordStrength,n)),Object(f.a)(null!==t&&void 0!==t?t:[]))},o)):a.a.createElement(bi.a.Item,e)},ha.Email=function(e){return a.a.createElement(pa,Object(wi.a)({required:!0,method:"email"},e))},ha.Phone=function(e){return a.a.createElement(pa,Object(wi.a)({required:!0,method:"phone"},e))},ha.UserName=function(e){return a.a.createElement(pa,Object(wi.a)({required:!0,method:"username"},e))};var ma=ha;"undefined"!==typeof window&&"undefined"!==typeof window.document&&function(e){var t,n,o,r,i,a,s='<svg><symbol id="authing-gitlab" viewBox="0 0 1024 1024"><path d="M958.326 570.912l-50.136-154.3L808.827 110.8c-5.111-15.733-27.372-15.733-32.485 0l-99.365 305.812H347.024L247.656 110.8c-5.11-15.733-27.37-15.733-32.484 0l-99.363 305.812-50.134 154.3c-4.575 14.073 0.437 29.49 12.407 38.19L512 924.358 945.92 609.1a34.16 34.16 0 0 0 12.407-38.19" ></path></symbol><symbol id="authing-yuyan" viewBox="0 0 1024 1024"><path d="M960 511.616A447.808 447.808 0 0 0 512 64C264.576 64 64 264.384 64 511.616a447.808 447.808 0 0 0 392.32 444.16 224.384 224.384 0 0 0 60.352 3.456A447.744 447.744 0 0 0 960 511.616z m-64 6.4a437.952 437.952 0 0 0-8.768-65.472c0.384-7.616 0.512-14.784 0.256-21.504 5.696 26.496 8.512 53.504 8.512 80.64v6.272z m-768-6.4c0-26.56 2.752-53.12 8.192-79.104 16.576 17.728 55.68 17.28 65.216-9.216 17.024 10.176 39.936 12.032 39.936 32.32 0 67.072 2.432 138.944 63.36 140.032 1.664 0 33.92 12.224 49.28 52.096 5.312 13.76 26.304 0 49.344 0 11.52 0 0 19.328 0 61.184 0 41.92 89.92 105.984 89.92 105.984-0.384 27.584 0.768 49.92 3.008 67.712a150.912 150.912 0 0 0-50.816 6.848A383.68 383.68 0 0 1 128 511.616z m478.592 371.968c-2.048-9.728-10.752-15.04-26.624-10.88 12.672-54.016 18.816-84.288 45.312-107.2 38.272-33.216 4.48-70.144-24.576-65.792-23.04 3.456-8.448-28.416-29.056-30.208-20.544-1.728-47.232-42.432-76.736-56.512-15.616-7.424-30.976-27.328-55.104-28.16-21.376-0.832-52.672 18.048-52.672 3.456 0-46.912-4.8-80.448-5.76-93.76-0.768-10.752-7.04-3.648 21.888-2.944 15.744 0.384 8.064-31.616 23.616-32.832 15.296-1.28 51.712 14.272 60.992 8.128 8.64-5.76 63.36 143.744 63.36 24.704 0-14.08-7.296-38.72 0-52.096 28.992-52.864 56.064-95.936 53.632-102.208-1.344-3.584-29.568-6.464-52.16 1.088-7.68 2.56 2.432 14.464-8.512 17.024-41.024 9.472-77.248-11.072-64.64-30.336 13.056-19.84 60.16-8.64 64.256-48.256 2.368-22.72 4.352-49.088 5.632-68.608 55.232 8.64 49.152-71.616-32.896-80.192a384.128 384.128 0 0 1 358.272 257.92 15.552 15.552 0 0 0-9.152-4.16c-24.832-62.016-84.992-17.152-64.64 37.504-109.44 84.16-81.408 142.784-45.44 176.384 18.944 17.728 36.992 44.288 48.704 63.36-12.8 37.248 47.104 22.336 76.672-40.96a384.576 384.576 0 0 1-274.432 265.6z" ></path></symbol><symbol id="authing-anzhuo" viewBox="0 0 1024 1024"><path d="M141.1 331.2c-35 0-63.3 28.3-63.3 63.2v264.7c0 34.9 28.4 63.2 63.3 63.2 35 0 63.3-28.3 63.3-63.2V394.4c0-34.9-28.3-63.2-63.3-63.2zM228.9 753.3c0 37.3 30.3 67.5 67.6 67.5h46.1v140c0 34.9 28.4 63.2 63.3 63.2 35 0 63.3-28.3 63.3-63.2v-140h85.5v140c0 34.9 28.4 63.2 63.3 63.2 35 0 63.3-28.3 63.3-63.2v-140h46.1c37.3 0 67.6-30.2 67.6-67.5V343.1H228.9v410.2zM651.8 93.4L696 13c2.4-4.2 0.8-9.6-3.5-11.9-4.2-2.3-9.6-0.8-11.9 3.5l-44.7 81.2C598.4 69.2 556.4 59.9 512 59.9c-44.4 0-86.4 9.3-123.9 25.8L343.4 4.6c-2.3-4.3-7.7-5.8-11.9-3.5-4.3 2.3-5.9 7.7-3.5 11.9l44.2 80.4c-86.8 44.8-145.5 130-145.5 227.7h570.5c0.1-97.8-58.6-182.9-145.4-227.7zM382.2 218c-13.2 0-23.9-10.7-23.9-23.9s10.7-23.9 23.9-23.9 23.9 10.7 23.9 23.9c-0.1 13.2-10.8 23.9-23.9 23.9z m259.7 0c-13.2 0-23.9-10.7-23.9-23.9s10.7-23.9 23.9-23.9 23.9 10.7 23.9 23.9c-0.1 13.2-10.8 23.9-23.9 23.9zM882.9 331.2c-35 0-63.3 28.3-63.3 63.2v264.7c0 34.9 28.4 63.2 63.3 63.2 35 0 63.3-28.3 63.3-63.2V394.4c0-34.9-28.3-63.2-63.3-63.2z" ></path></symbol><symbol id="authing-lark-public" viewBox="0 0 1024 1024"><path d="M933.875 98.5625L726.53414917 322.64486695a6.61651612 6.61651612 0 0 0-1.64300537 5.81726073 40.54449463 40.54449463 0 0 1-68.92053223 36.37023927L490.72827148 530.02856445l16.29821778 218.30960083L692.5625 933.875z m0 0" ></path><path d="M931.6098938 104.2026062l-205.12023926 221.68377685a6.61651612 6.61651612 0 0 0-1.64300537 5.86175538 39.96688843 39.96688843 0 0 1-68.21026612 35.92611694L494.23675537 530.07388305a3.28601074 3.28601074 0 0 0-0.93273925 2.53125l16.03125 214.40148927 413.61547851-623.97537232 8.88162232-18.74047852z m0 0" ></path><path d="M925.48199463 90.16949463L701.39880372 297.46502685a6.61651612 6.61651612 0 0 1-5.86175538 1.68832398 40.54449463 40.54449463 0 0 0-36.32574462 68.92053222L493.97143555 533.31622315l-218.22143555-16.43005372L90.125 331.43667602z m0 0" ></path><path d="M919.8427124 92.65625l-221.77359008 205.12023926a6.61651612 6.61651612 0 0 1-5.77276612 1.64300537 39.96688843 39.96688843 0 0 0-35.92611695 68.21026612L493.92611695 530.02938843a3.28601074 3.28601074 0 0 1-2.57574463 0.93273925l-214.40148927-16.03125L900.96875 101.31539917l18.74047852-8.88079834z m0 0" ></path></symbol><symbol id="authing-lark-internal" viewBox="0 0 1024 1024"><path d="M933.875 98.5625L726.53414917 322.64486695a6.61651612 6.61651612 0 0 0-1.64300537 5.81726073 40.54449463 40.54449463 0 0 1-68.92053223 36.37023927L490.72827148 530.02856445l16.29821778 218.30960083L692.5625 933.875z m0 0" ></path><path d="M931.6098938 104.2026062l-205.12023926 221.68377685a6.61651612 6.61651612 0 0 0-1.64300537 5.86175538 39.96688843 39.96688843 0 0 1-68.21026612 35.92611694L494.23675537 530.07388305a3.28601074 3.28601074 0 0 0-0.93273925 2.53125l16.03125 214.40148927 413.61547851-623.97537232 8.88162232-18.74047852z m0 0" ></path><path d="M925.48199463 90.16949463L701.39880372 297.46502685a6.61651612 6.61651612 0 0 1-5.86175538 1.68832398 40.54449463 40.54449463 0 0 0-36.32574462 68.92053222L493.97143555 533.31622315l-218.22143555-16.43005372L90.125 331.43667602z m0 0" ></path><path d="M919.8427124 92.65625l-221.77359008 205.12023926a6.61651612 6.61651612 0 0 1-5.77276612 1.64300537 39.96688843 39.96688843 0 0 0-35.92611695 68.21026612L493.92611695 530.02938843a3.28601074 3.28601074 0 0 1-2.57574463 0.93273925l-214.40148927-16.03125L900.96875 101.31539917l18.74047852-8.88079834z m0 0" ></path></symbol><symbol id="authing-guanbi7-01copy_1" viewBox="0 0 1024 1024"><path d="M0.00007 512.306485a511.999485 511.999485 0 0 1 1023.99797-0.512v0.512a510.974486 510.974486 0 0 1-511.999485 511.691485C228.86384 1023.99797 0.00007 794.725201 0.00007 512.306485z m546.200451 0l178.89282-178.78982a23.244977 23.244977 0 0 0 0-33.075967l-1.126999-1.023999a23.244977 23.244977 0 0 0-33.176967 0L511.999555 478.514519l-178.78982-179.19982a23.244977 23.244977 0 0 0-33.177967 0l-1.023999 1.023999a23.244977 23.244977 0 0 0 0 33.074967l178.78982 179.199819-178.89282 178.789821a23.244977 23.244977 0 0 0 0 33.177966l1.126999 1.023999a23.244977 23.244977 0 0 0 33.176967 0L511.999555 547.12245 690.789375 725.80927a23.244977 23.244977 0 0 0 33.177967 0l1.023999-1.023999a23.244977 23.244977 0 0 0 0-33.176967l-178.78982-179.199819z" ></path></symbol><symbol id="authing-guanbi" viewBox="0 0 1024 1024"><path d="M583.168 523.776L958.464 148.48c18.944-18.944 18.944-50.176 0-69.12l-2.048-2.048c-18.944-18.944-50.176-18.944-69.12 0L512 453.12 136.704 77.312c-18.944-18.944-50.176-18.944-69.12 0l-2.048 2.048c-19.456 18.944-19.456 50.176 0 69.12l375.296 375.296L65.536 899.072c-18.944 18.944-18.944 50.176 0 69.12l2.048 2.048c18.944 18.944 50.176 18.944 69.12 0L512 594.944 887.296 970.24c18.944 18.944 50.176 18.944 69.12 0l2.048-2.048c18.944-18.944 18.944-50.176 0-69.12L583.168 523.776z" ></path></symbol><symbol id="authing-apple-web" viewBox="0 0 1024 1024"><path d="M797.3 656c24.6 34.8 52.8 57.3 84.6 67.5-13.8 42.6-35.7 87-65.7 133.2-46.2 69.6-91.8 104.4-136.8 104.4-16.8 0-41.7-5.7-74.7-17.1-30.6-11.4-57.3-17.1-80.1-17.1-22.8 0-48 6-75.6 18-28.8 11.4-52.5 17.1-71.1 17.1-54 0-107.1-45.9-159.3-137.7-52.2-90.6-78.3-179.7-78.3-267.3 0-81 19.8-147.3 59.4-198.9 40.8-51.6 91.2-77.4 151.2-77.4 13.2 0 27.9 1.65 44.1 4.95 16.2 3.3 33 9.45 50.4 18.45 18.6 10.2 33.9 17.25 45.9 21.15 12 3.9 21.3 5.85 27.9 5.85 7.8 0 19.8-1.8 36-5.4a166.088 166.088 0 0 0 48.6-19.8 366.113 366.113 0 0 1 45-21.6c12.6-4.8 25.5-7.2 38.7-7.2 42 0 79.8 11.4 113.4 34.2 18 12 36.3 29.7 54.9 53.1-27.6 24-47.7 45-60.3 63-23.4 33.6-35.1 70.2-35.1 109.8 0 43.8 12.3 83.4 36.9 118.8zM616.4 235.7c-21 19.8-40.2 32.7-57.6 38.7-6 1.8-13.65 3.45-22.95 4.95-9.3 1.5-19.95 2.85-31.95 4.05 0.6-52.8 14.4-98.4 41.4-136.8 27-38.4 71.4-64.8 133.2-79.2 1.2 6 2.1 10.2 2.7 12.6v9.9c0 21.6-5.1 45.9-15.3 72.9a221.625 221.625 0 0 1-49.5 72.9z" ></path></symbol><symbol id="authing-google" viewBox="0 0 1024 1024"><path d="M1000 523.6c0 283-193.8 484.4-480 484.4-274.4 0-496-221.6-496-496S245.6 16 520 16c133.6 0 246 49 332.6 129.8l-135 129.8c-176.6-170.4-505-42.4-505 236.4 0 173 138.2 313.2 307.4 313.2 196.4 0 270-140.8 281.6-213.8H520V440.8h472.2c4.6 25.4 7.8 49.8 7.8 82.8z" ></path></symbol><symbol id="authing-dingtalk" viewBox="0 0 1024 1024"><path d="M905.857912 382.800144a192.415957 192.415957 0 0 1-12.101998 31.649993h0.186l-0.744 1.257c-35.140992 76.657983-126.881972 226.998949-126.881971 226.998949s-0.093-0.373-0.466-0.93l-26.856994 47.567989h129.301971L621.375975 1024l56.039988-227.649949H575.715986l35.326992-150.525966a1436.834677 1436.834677 0 0 0-102.397977 29.789993s-54.130988 32.393993-155.923965-62.137986c0 0-68.699985-61.672986-28.857994-77.079982 16.941996-6.560999 82.197982-14.892997 133.53597-21.967996 69.444984-9.494998 112.172975-14.614997 112.172975-14.614996s-214.106952 3.257999-264.83994-4.886999c-50.732989-8.099998-115.104974-94.484979-128.834972-170.353962 0 0-21.223995-41.702991 45.65999-21.968995 66.838985 19.734996 343.499923 76.799983 343.499923 76.799983S205.267069 266.95017 181.250074 239.487176c-23.922995-27.459994-70.374984-149.732966-64.324985-224.901949 0 0 2.606999-18.757996 21.457995-13.729997 0 0 266.00294 123.946972 447.852899 191.762957 181.896959 67.815985 340.009924 102.398977 319.622929 190.181957z" ></path></symbol><symbol id="authing-apple" viewBox="0 0 1024 1024"><path d="M797.3 656c24.6 34.8 52.8 57.3 84.6 67.5-13.8 42.6-35.7 87-65.7 133.2-46.2 69.6-91.8 104.4-136.8 104.4-16.8 0-41.7-5.7-74.7-17.1-30.6-11.4-57.3-17.1-80.1-17.1-22.8 0-48 6-75.6 18-28.8 11.4-52.5 17.1-71.1 17.1-54 0-107.1-45.9-159.3-137.7-52.2-90.6-78.3-179.7-78.3-267.3 0-81 19.8-147.3 59.4-198.9 40.8-51.6 91.2-77.4 151.2-77.4 13.2 0 27.9 1.65 44.1 4.95 16.2 3.3 33 9.45 50.4 18.45 18.6 10.2 33.9 17.25 45.9 21.15 12 3.9 21.3 5.85 27.9 5.85 7.8 0 19.8-1.8 36-5.4a166.088 166.088 0 0 0 48.6-19.8 366.113 366.113 0 0 1 45-21.6c12.6-4.8 25.5-7.2 38.7-7.2 42 0 79.8 11.4 113.4 34.2 18 12 36.3 29.7 54.9 53.1-27.6 24-47.7 45-60.3 63-23.4 33.6-35.1 70.2-35.1 109.8 0 43.8 12.3 83.4 36.9 118.8zM616.4 235.7c-21 19.8-40.2 32.7-57.6 38.7-6 1.8-13.65 3.45-22.95 4.95-9.3 1.5-19.95 2.85-31.95 4.05 0.6-52.8 14.4-98.4 41.4-136.8 27-38.4 71.4-64.8 133.2-79.2 1.2 6 2.1 10.2 2.7 12.6v9.9c0 21.6-5.1 45.9-15.3 72.9a221.625 221.625 0 0 1-49.5 72.9z" ></path></symbol><symbol id="authing-alipay-web" viewBox="0 0 1024 1024"><path d="M427.154 210.262l-1.819 59.431H185.792v45.481h242.573v78.84H228.24v43.057l203.153-1.823 203.76-1.818-3.641 14.553c-9.094 35.177-47.907 129.173-55.183 132.196-4.244 1.216-33.961-5.458-67.316-15.16-101.276-30.924-151.61-40.023-220.136-40.023-69.74 0.603-115.217 13.342-158.886 44.27-84.897 60.647-91.57 179.506-12.735 245.602 83.687 70.348 220.739 77.017 345.06 16.375 44.267-21.225 123.71-78.84 150.39-108.553l10.922-12.736 34.57 16.98c34.568 17.586 248.03 116.437 284.413 131.598l19.403 8.49V711.17l-52.762-13.95c-47.907-12.74-170.406-50.94-209.826-66.105l-15.16-6.066 20.012-41.238c21.231-42.444 63.68-162.522 63.68-180.108 0-8.491-12.128-9.702-106.128-9.702H555.71v-78.827h254.704v-40.022c0-1.817-57.614-3.032-127.353-2.425l-127.347 0.602V151.437H428.967l-1.813 58.825z m-23.657 395.392c31.535 10.922 73.382 27.896 92.786 38.206l35.167 18.805-19.404 24.255c-10.913 13.342-35.775 36.387-56.399 51.548-69.133 51.542-133.41 71.553-215.887 66.703-86.112-4.852-132.201-40.023-137.66-105.517-3.64-40.63 5.459-63.675 33.359-84.901 35.172-26.685 63.67-32.742 141.296-30.924 59.431 1.814 78.232 5.449 126.742 21.825z" ></path></symbol><symbol id="authing-wechat-miniprogram-app-launch" viewBox="0 0 1126 1024"><path d="M961.876 262.606C900.851 134.702 747.238 80.676 619.77 141.425c-69.45 33.34-113.232 90.332-130.04 168.839-15.583 71.308-6.328 150.685 2.926 211.869 12.22 78.071 12.656 135.459 1.7 176.393-9.69 36.306-29.464 59.957-61.46 75.54a135.814 135.814 0 0 1-104.372 5.102 137.634 137.634 0 0 1-77.835-69.647 136.764 136.764 0 0 1 64.388-181.93c14.317-7.12 25.668-19.38 30.73-34.607 5.023-15.187 4.628-31.244-2.136-45.996a60.511 60.511 0 0 0-34.487-30.81 61.54 61.54 0 0 0-45.878 2.136 256.284 256.284 0 0 0-131.86 145.98 257.233 257.233 0 0 0 10.284 196.72 256.403 256.403 0 0 0 231.802 146.494 263.007 263.007 0 0 0 110.265-24.916c69.41-33.341 113.192-89.462 130.04-167.97 15.149-70.913 6.328-150.29-2.966-210.603-12.22-78.942-12.656-136.764-1.701-177.698 9.69-36.307 29.465-60.354 62.292-75.54a136.962 136.962 0 0 1 182.205 64.585 136.764 136.764 0 0 1-64.387 181.93 60.511 60.511 0 0 0-28.16 80.167c6.724 14.753 19.34 25.708 34.053 30.81 15.148 5.063 31.166 4.628 45.877-2.135 127.51-62.45 181.378-216.101 120.786-343.531z" ></path></symbol><symbol id="authing-qq" viewBox="0 0 1024 1024"><path d="M821.295 699.385a275.463 275.463 0 0 1-57.3 90.76c54.54 16.634 41.202 45.496 41.202 45.496 24.223 13.299 22.69 99.729-111.381 98.195-89.38-0.996-127.248-26.062-142.695-42.735-11.498 1.15-23.035 1.802-34.61 1.84-14.296 0-28.286-1.073-42.084-2.645-14.91 16.634-52.586 42.544-143.308 43.54-133.879 1.534-135.412-84.895-111.15-98.195 0 0-14.642-31.046 47.142-47.335a272.511 272.511 0 0 1-58.794-98.311c-56.035 99.537-83.057 33.575-79.033-42.66 3.604-67.687 63.241-144.61 78.726-163.43a60.98 60.98 0 0 1-4.6-22.804c0-16.482 6.593-31.506 17.363-42.775a44.844 44.844 0 0 1 20.045-46.223c-0.076-2.414-0.306-4.753-0.306-7.206 0-151.394 123.569-274.235 275.96-274.235 152.469 0 275.961 122.802 275.961 274.235 0 4.6-0.268 9.122-0.498 13.645 10.425 10.617 14.947 25.68 11.998 40.283 10.616 11.192 17.36 25.871 17.36 42.276 0 8.125-1.723 15.829-4.598 22.997 15.56 19.163 74.816 96.01 78.38 163.698 3.91 74.164-21.31 138.67-73.78 51.589z" ></path></symbol><symbol id="authing-wechat-mobile" viewBox="0 0 1239 1024"><path d="M745.256 511.245c-21.665 0-43.385 20.373-43.385 45.595 0 20.373 21.72 40.96 43.385 40.96 32.553 0 55.835-20.587 55.835-40.96 0-25.222-23.282-45.595-55.835-45.595M602.705 298.9c34.115 0 55.78-22.097 55.78-55.08 0-34.655-21.665-55.027-55.78-55.027-32.499 0-63.488 20.372-63.488 54.973 0 33.091 30.99 55.08 63.488 55.08M440.05 756.574c-57.344 0-99.167-9.431-153.439-25.169l-156.456 80.196 44.948-135.222C65.051 597.747 0 498.58 0 377.479 0 163.57 198.333 0 440.05 0c213.8 0 404.427 128.97 441.56 311.458a211.106 211.106 0 0 0-41.822-4.743c-210.729 0-373.383 160.498-373.383 353.927 0 33.037 4.635 62.895 12.396 94.37-12.396 1.616-26.409 1.616-38.804 1.616m646.198 154.14L1117.13 1024l-117.76-67.638c-44.894 9.378-88.28 23.606-133.228 23.606-207.656 0-371.873-144.761-371.873-324.07 0-179.253 164.217-323.96 371.873-323.96 196.77 0 373.437 144.707 373.437 323.907 0 100.783-66.614 190.356-153.384 254.922M295.882 188.793c-32.498 0-66.614 20.372-66.614 54.973 0 33.091 34.116 55.08 66.614 55.08 30.99 0 55.781-21.989 55.781-55.026 0-34.655-24.791-55.027-55.78-55.027m692.6 322.452c-23.228 0-43.385 20.373-43.385 45.595 0 20.373 20.157 40.96 43.385 40.96 30.99 0 54.272-20.587 54.272-40.96 0-25.222-23.282-45.595-54.272-45.595" ></path></symbol><symbol id="authing-baidu" viewBox="0 0 1024 1024"><path d="M204.8 537.876c104.422-22.429 90.196-147.185 86.967-174.501-5.149-42.066-54.545-115.55-121.658-109.746-84.48 7.593-96.873 129.6-96.873 129.6C61.891 439.695 100.64 560.262 204.8 537.876zM315.636 754.75c-3.141 8.858-9.861 31.244-4.058 50.75 11.607 43.766 49.658 45.774 49.658 45.774h54.677V717.658H357.44c-26.27 7.855-39.01 28.407-41.847 37.091z m82.779-426.022c57.774 0 104.29-66.37 104.29-148.407C502.705 98.327 456.19 32 398.415 32c-57.47 0-104.16 66.37-104.16 148.32 0 82.036 46.69 148.364 104.29 148.364z m248.334 9.731c77.062 10.037 126.676-72.262 136.407-134.618 10.037-62.138-39.665-134.53-94.21-146.924-54.633-12.523-122.88 75.055-129.077 132.131-7.418 69.818 9.95 139.462 86.88 149.411zM835.564 704.83s-119.259-92.247-188.815-191.913c-94.254-147.01-228.349-87.185-273.164-12.48-44.64 74.75-114.196 122.095-124.014 134.531-10.036 12.393-144 84.655-114.327 216.742 29.76 132 134.269 129.6 134.269 129.6s76.974 7.55 166.342-12.393c89.323-19.898 166.21 4.975 166.21 4.975s208.67 69.818 265.746-64.713C924.8 774.56 835.564 704.83 835.564 704.83zM478.487 905.076H342.865c-58.56-11.738-81.905-51.665-84.916-58.472-2.924-6.982-19.505-39.142-10.69-93.819 25.308-81.905 97.483-87.796 97.483-87.796h72.218v-88.844l61.484 0.96 0.087 327.928z m252.742-0.96H575.011c-60.524-15.534-63.316-58.56-63.316-58.56V672.844l63.36-1.004v155.127c3.84 16.495 24.436 19.637 24.436 19.637h64.32v-173.76h67.418v231.272z m220.975-461.018c0-29.847-24.742-119.65-116.64-119.65-92.073 0-104.335 84.741-104.335 144.654 0 57.163 4.887 137.062 119.127 134.443 114.415-2.443 101.848-129.469 101.848-159.447z" ></path></symbol><symbol id="authing-wechat-pc" viewBox="0 0 1239 1024"><path d="M727.677 511.336c-19.042 0-38.132 17.906-38.132 40.074 0 17.906 19.09 36 38.132 36 28.61 0 49.074-18.094 49.074-36 0-22.168-20.463-40.074-49.074-40.074m-125.29-186.63c29.985 0 49.026-19.422 49.026-48.411 0-30.459-19.041-48.364-49.025-48.364-28.564 0-55.8 17.905-55.8 48.316 0 29.084 27.237 48.41 55.8 48.41m-142.959 402.3c-50.4 0-87.158-8.288-134.858-22.12L187.06 775.32l39.505-118.847c-96.726-69.11-153.9-156.269-153.9-262.705C72.667 205.763 246.984 62 459.43 62c187.91 0 355.454 113.353 388.09 273.742a185.542 185.542 0 0 0-36.757-4.168c-185.211 0-328.17 141.062-328.17 311.068 0 29.037 4.075 55.28 10.896 82.943-10.895 1.42-23.211 1.42-34.105 1.42M1027.33 862.48l27.19 99.52-103.5-59.447c-39.458 8.242-77.59 20.747-117.096 20.747-182.51 0-326.841-127.231-326.841-284.827 0-157.547 144.331-284.73 326.841-284.73 172.943 0 328.216 127.183 328.216 284.683 0 88.58-58.547 167.305-134.81 224.053M332.72 227.93c-28.563 0-58.548 17.905-58.548 48.316 0 29.084 29.985 48.41 58.547 48.41 27.238 0 49.026-19.326 49.026-48.362 0-30.459-21.788-48.364-49.025-48.364m608.73 283.405c-20.415 0-38.13 17.906-38.13 40.074 0 17.906 17.715 36 38.13 36 27.238 0 47.7-18.094 47.7-36 0-22.168-20.462-40.074-47.7-40.074" ></path></symbol><symbol id="authing-wechat-miniprogram-qrconnec" viewBox="0 0 1126 1024"><path d="M961.876 262.606C900.851 134.702 747.238 80.676 619.77 141.425c-69.45 33.34-113.232 90.332-130.04 168.839-15.583 71.308-6.328 150.685 2.926 211.869 12.22 78.071 12.656 135.459 1.7 176.393-9.69 36.306-29.464 59.957-61.46 75.54a135.814 135.814 0 0 1-104.372 5.102 137.634 137.634 0 0 1-77.835-69.647 136.764 136.764 0 0 1 64.388-181.93c14.317-7.12 25.668-19.38 30.73-34.607 5.023-15.187 4.628-31.244-2.136-45.996a60.511 60.511 0 0 0-34.487-30.81 61.54 61.54 0 0 0-45.878 2.136 256.284 256.284 0 0 0-131.86 145.98 257.233 257.233 0 0 0 10.284 196.72 256.403 256.403 0 0 0 231.802 146.494 263.007 263.007 0 0 0 110.265-24.916c69.41-33.341 113.192-89.462 130.04-167.97 15.149-70.913 6.328-150.29-2.966-210.603-12.22-78.942-12.656-136.764-1.701-177.698 9.69-36.307 29.465-60.354 62.292-75.54a136.962 136.962 0 0 1 182.205 64.585 136.764 136.764 0 0 1-64.387 181.93 60.511 60.511 0 0 0-28.16 80.167c6.724 14.753 19.34 25.708 34.053 30.81 15.148 5.063 31.166 4.628 45.877-2.135 127.51-62.45 181.378-216.101 120.786-343.531z" ></path></symbol><symbol id="authing-wechat-webpage-authorization" viewBox="0 0 1188 1024"><path d="M512 1.896C229.452 1.896 0 229.452 0 512s229.452 510.104 512 510.104S1022.104 794.548 1022.104 512 794.548 1.896 512 1.896z m-91.022 629.57c-26.548 0-49.304-5.688-75.852-11.377l-75.852 37.926 22.756-66.37c-54.993-37.926-87.23-87.23-87.23-147.912 0-104.296 98.607-185.837 218.074-185.837 108.089 0 201.007 64.474 219.97 153.6-7.585 0-13.274-1.896-20.859-1.896-104.296 0-185.837 77.748-185.837 172.563 0 15.17 1.896 30.34 7.585 45.511-7.585 3.793-15.17 3.793-22.755 3.793z m322.37 77.749l17.067 54.992-58.785-34.133c-22.756 5.689-43.615 11.378-66.37 11.378-104.297 0-185.838-70.163-185.838-157.393S530.963 424.77 635.26 424.77c98.608 0 185.837 70.163 185.837 159.29 0 47.407-32.237 91.021-77.748 125.155z" fill="#46BB36" ></path><path d="M318.578 379.26c0 17.066 13.274 30.34 30.34 30.34s30.341-13.274 30.341-30.34-13.274-30.341-30.34-30.341-30.341 13.274-30.341 30.34z m235.14 159.288c0 13.274 11.378 24.652 24.652 24.652 13.274 0 24.652-11.378 24.652-24.652 0-13.274-11.378-24.652-24.652-24.652-13.274-1.896-24.651 9.482-24.651 24.652z m-81.54-159.289c0 17.067 13.274 30.341 30.34 30.341 17.067 0 30.341-13.274 30.341-30.34 0-17.067-13.274-30.341-30.34-30.341-17.067 0-30.341 13.274-30.341 30.34zM675.08 538.55c0 13.273 11.378 24.651 24.652 24.651 13.274 0 24.652-11.378 24.652-24.652 0-13.274-11.378-24.652-24.652-24.652-13.274-1.896-24.652 9.482-24.652 24.652z" fill="#46BB36" ></path></symbol><symbol id="authing-wechat-miniprogram-default" viewBox="0 0 1126 1024"><path d="M961.876 262.606C900.851 134.702 747.238 80.676 619.77 141.425c-69.45 33.34-113.232 90.332-130.04 168.839-15.583 71.308-6.328 150.685 2.926 211.869 12.22 78.071 12.656 135.459 1.7 176.393-9.69 36.306-29.464 59.957-61.46 75.54a135.814 135.814 0 0 1-104.372 5.102 137.634 137.634 0 0 1-77.835-69.647 136.764 136.764 0 0 1 64.388-181.93c14.317-7.12 25.668-19.38 30.73-34.607 5.023-15.187 4.628-31.244-2.136-45.996a60.511 60.511 0 0 0-34.487-30.81 61.54 61.54 0 0 0-45.878 2.136 256.284 256.284 0 0 0-131.86 145.98 257.233 257.233 0 0 0 10.284 196.72 256.403 256.403 0 0 0 231.802 146.494 263.007 263.007 0 0 0 110.265-24.916c69.41-33.341 113.192-89.462 130.04-167.97 15.149-70.913 6.328-150.29-2.966-210.603-12.22-78.942-12.656-136.764-1.701-177.698 9.69-36.307 29.465-60.354 62.292-75.54a136.962 136.962 0 0 1 182.205 64.585 136.764 136.764 0 0 1-64.387 181.93 60.511 60.511 0 0 0-28.16 80.167c6.724 14.753 19.34 25.708 34.053 30.81 15.148 5.063 31.166 4.628 45.877-2.135 127.51-62.45 181.378-216.101 120.786-343.531z" ></path></symbol><symbol id="authing-wechatwork-service-provider-authorization" viewBox="0 0 1182 1024"><path d="M993.598 913.02a7.062 7.062 0 0 1 4.908 2.224c15.678 17.761 37.252 31.073 59.816 35.505 15.713 3.354 26.482 18.873 26.482 36.634 0 19.968-14.706 36.617-32.362 36.617-16.666 0-30.402-14.424-32.361-32.185-4.909-25.53-15.714-47.722-30.42-65.466-0.971-1.112-1.942-3.337-2.931-5.561 0-4.432 2.93-7.768 6.868-7.768zM1024 0a105.931 105.931 0 0 1 105.931 105.949v453.42h-70.62V247.172H70.46v670.88h452.026v70.638H32.84C15.572 988.69 0.829 975.448 0 958.27v-857.9C2.79 44.19 49.346 0.053 105.843 0zM812.138 512c136.651 0 247.172 97.774 247.172 219.224h-60.804c0-101.888-85.663-162.286-182.22-163.045-117.565-0.918-189.686 76.182-193.553 157.184-2.471 51.412 16.42 92.495 61.617 127.47 5.032 4.131 4.184 17.479 3.178 23.658l-2.684 37.34s1.006 0 2.013-1.023l49.982-25.141a16.455 16.455 0 0 1 12.058-1.042c22.104 6.18 37.676 5.509 60.787 5.509 24.117 0 46.857-2.066 64.23-8.087l15.589 55.085a288.662 288.662 0 0 1-78.371 11.317c-25.124 0-49.24-3.09-72.334-9.27l-53.265 26.766c-5.014 2.065-12.059 3.09-18.08 3.09-6.037 0-12.058-2.066-17.09-5.138-10.045-7.221-15.06-19.562-14.053-34.993v-1.041l5.014-42.196c-49.222-40.148-76.358-97.775-76.358-157.484C564.966 609.792 675.486 512 812.138 512z m338.397 330.399c17.655 0 32.362 16.649 32.362 36.634 0 18.856-12.747 34.393-28.443 36.617-22.563 5.544-42.178 17.761-57.874 34.41a21.186 21.186 0 0 1-4.908 3.32c-3.92 0-6.868-3.32-6.868-7.769 0-2.225 0.99-4.431 1.978-5.544 15.678-17.76 27.454-42.178 31.373-67.707 2.948-17.744 16.684-29.961 32.38-29.961z m-141.242-30.261c3.92 0 6.868 3.337 6.868 7.768a9.075 9.075 0 0 1-1.977 5.544c-15.678 17.761-27.454 42.178-31.374 67.708-2.948 17.743-16.684 29.96-32.38 29.96-17.654 0-32.361-16.648-32.361-36.634 0-18.856 12.747-34.392 28.442-36.617 22.564-5.544 42.179-17.743 57.874-34.392 0.971-1.113 2.93-2.225 4.908-3.337z m39.23-70.62c16.667 0 30.402 14.424 32.362 32.185 4.908 25.511 15.713 47.722 30.42 65.465 1.942 1.112 1.942 3.337 2.93 5.561 0 4.432-2.93 7.769-6.867 7.769a7.062 7.062 0 0 1-4.908-2.225c-15.696-17.761-37.253-31.073-59.816-35.504-15.713-3.355-26.483-18.874-26.483-36.635 0-19.968 14.707-36.617 32.362-36.617zM511.912 70.584a53.177 53.177 0 0 0-37.5 15.537 53 53 0 0 0 17.426 86.422 53.407 53.407 0 0 0 58.05-11.582 52.824 52.824 0 0 0 11.388-57.838 53.23 53.23 0 0 0-49.364-32.539z m-176.605 0a53.177 53.177 0 0 0-37.5 15.537 53 53 0 0 0 17.426 86.422 53.407 53.407 0 0 0 58.05-11.582 52.824 52.824 0 0 0 11.388-57.838 53.23 53.23 0 0 0-49.364-32.539z m-176.499 0a53.177 53.177 0 0 0-37.5 15.537 53 53 0 0 0 17.426 86.422 53.407 53.407 0 0 0 58.05-11.582 52.824 52.824 0 0 0 11.388-57.838 53.23 53.23 0 0 0-49.364-32.539z" ></path></symbol><symbol id="authing-wechatwork-corp-qrconnect" viewBox="0 0 1220 1024"><path d="M1077.17 663.237c-29.54-34.659-51.2-77.982-61.047-127.803-3.938-34.659-31.508-62.819-64.985-62.819-35.446 0-64.984 32.493-64.984 71.483 0 34.659 21.661 64.985 53.17 71.484 45.291 8.664 88.614 34.658 120.122 69.316 1.97 2.167 5.908 4.333 9.846 4.333 7.877 0 13.785-6.499 13.785-15.163-1.97-4.333-1.97-8.665-5.908-10.831z m-194.955-26.782c1.97-2.166 3.939-6.498 3.939-10.83 0-8.665-5.908-15.163-13.785-15.163-3.938 2.166-7.877 4.332-9.846 6.498-31.508 32.492-70.892 56.32-116.185 67.15-31.507 4.333-57.107 34.66-57.107 71.484 0 38.99 29.538 71.483 64.984 71.483 31.508 0 59.077-23.828 64.985-58.486 7.877-49.822 31.508-97.477 63.015-132.136z m165.416 243.2c31.507-32.492 70.892-56.32 116.184-67.15 31.508-4.333 57.108-34.659 57.108-71.483 0-38.991-29.538-71.484-64.985-71.484-31.507 0-59.076 23.828-64.984 58.487-7.877 49.821-31.508 97.477-63.016 132.135-1.969 2.166-3.938 6.498-3.938 10.83 0 8.665 5.908 15.164 13.785 15.164 3.938-2.166 7.877-4.332 9.846-6.499z m-76.8 1.379c-45.293-8.665-88.616-34.659-120.123-69.317a14.375 14.375 0 0 0-9.846-4.332c-7.877 0-13.785 6.498-13.785 15.163 1.97 4.332 3.938 8.664 5.908 10.83 29.538 34.659 51.2 77.982 61.046 127.804 3.938 34.658 31.507 62.818 64.984 62.818 35.447 0 64.985-32.492 64.985-71.483 0-34.659-21.662-64.985-53.17-71.483z" ></path><path d="M243.554 810.2s2.048 0 4.096-2.067l101.534-50.708c8.172-4.135 16.345-4.135 24.497-2.067 44.899 12.445 76.544 11.106 123.49 11.106 48.995 0 95.174-4.155 130.502-16.325l31.665 111.065c-51.043 14.533-106.142 22.843-159.232 22.843a571.077 571.077 0 0 1-146.964-18.688l-108.19 53.957c-10.2 4.135-24.497 6.222-36.745 6.222-12.249 0-24.497-4.135-34.698-10.377-20.421-14.514-30.622-39.424-28.574-70.558v-2.068l10.201-85.07C55.099 676.51 0 560.285 0 439.926 0 197.12 224.551 0 502.154 0c277.622 0 502.154 197.14 502.154 442.014h-123.55c0-205.43-174.001-327.208-370.196-328.744-238.808-1.85-385.378 153.6-393.216 316.948-4.982 103.62 33.36 186.466 125.224 257.024 10.2 8.31 8.468 35.19 6.44 47.655" ></path></symbol><symbol id="authing-wechatwork-service-provider-qrconnect" viewBox="0 0 1220 1024"><path d="M1077.17 663.237c-29.54-34.659-51.2-77.982-61.047-127.803-3.938-34.659-31.508-62.819-64.985-62.819-35.446 0-64.984 32.493-64.984 71.483 0 34.659 21.661 64.985 53.17 71.484 45.291 8.664 88.614 34.658 120.122 69.316 1.97 2.167 5.908 4.333 9.846 4.333 7.877 0 13.785-6.499 13.785-15.163-1.97-4.333-1.97-8.665-5.908-10.831z m-194.955-26.782c1.97-2.166 3.939-6.498 3.939-10.83 0-8.665-5.908-15.163-13.785-15.163-3.938 2.166-7.877 4.332-9.846 6.498-31.508 32.492-70.892 56.32-116.185 67.15-31.507 4.333-57.107 34.66-57.107 71.484 0 38.99 29.538 71.483 64.984 71.483 31.508 0 59.077-23.828 64.985-58.486 7.877-49.822 31.508-97.477 63.015-132.136z m165.416 243.2c31.507-32.492 70.892-56.32 116.184-67.15 31.508-4.333 57.108-34.659 57.108-71.483 0-38.991-29.538-71.484-64.985-71.484-31.507 0-59.076 23.828-64.984 58.487-7.877 49.821-31.508 97.477-63.016 132.135-1.969 2.166-3.938 6.498-3.938 10.83 0 8.665 5.908 15.164 13.785 15.164 3.938-2.166 7.877-4.332 9.846-6.499z m-76.8 1.379c-45.293-8.665-88.616-34.659-120.123-69.317a14.375 14.375 0 0 0-9.846-4.332c-7.877 0-13.785 6.498-13.785 15.163 1.97 4.332 3.938 8.664 5.908 10.83 29.538 34.659 51.2 77.982 61.046 127.804 3.938 34.658 31.507 62.818 64.984 62.818 35.447 0 64.985-32.492 64.985-71.483 0-34.659-21.662-64.985-53.17-71.483z" ></path><path d="M243.554 810.2s2.048 0 4.096-2.067l101.534-50.708c8.172-4.135 16.345-4.135 24.497-2.067 44.899 12.445 76.544 11.106 123.49 11.106 48.995 0 95.174-4.155 130.502-16.325l31.665 111.065c-51.043 14.533-106.142 22.843-159.232 22.843a571.077 571.077 0 0 1-146.964-18.688l-108.19 53.957c-10.2 4.135-24.497 6.222-36.745 6.222-12.249 0-24.497-4.135-34.698-10.377-20.421-14.514-30.622-39.424-28.574-70.558v-2.068l10.201-85.07C55.099 676.51 0 560.285 0 439.926 0 197.12 224.551 0 502.154 0c277.622 0 502.154 197.14 502.154 442.014h-123.55c0-205.43-174.001-327.208-370.196-328.744-238.808-1.85-385.378 153.6-393.216 316.948-4.982 103.62 33.36 186.466 125.224 257.024 10.2 8.31 8.468 35.19 6.44 47.655" ></path></symbol><symbol id="authing-weibo" viewBox="0 0 1185 1024"><path d="M891.75 466.973c-17.137-5.012-29.37-7.545-19.616-30.019 19.616-47.477 19.616-90 0-120.017-39.18-57.503-144.538-54.97-264.61-2.48 0 0-39.125 17.517-29.37-12.502 19.615-59.982 17.19-109.992-12.234-140.01-66.127-67.473-240.089 2.532-389.532 154.992C63.7 431.942 0 551.96 0 656.996c0 199.94 252.322 322.49 497.314 322.49 323.354 0 536.55-192.503 538.975-347.496 0-92.533-75.934-142.545-144.539-165.017zM499.794 907C303.79 926.941 134.73 836.94 122.497 704.474c-14.714-129.987 134.73-252.484 330.735-272.532 196.005-19.939 365.01 70.06 377.243 202.527 14.712 129.987-134.73 252.484-330.68 272.532z m19.563-375.034c-93.072-25.005-198.43 22.527-240.088 107.515-41.605 87.52 0 182.478 93.125 212.496 97.975 32.497 213.142-17.515 252.322-109.995 39.179-92.53-9.81-185.01-105.359-210.016z m-70.976 219.987c-19.616 30.018-61.22 45-90.645 30.018-29.372-14.982-39.18-50.012-19.617-82.455 19.616-30.07 58.796-42.574 88.22-30.07 29.372 15.034 39.18 50.01 22.042 82.507z m63.7-82.455c-7.329 12.45-22.095 17.461-34.275 12.45-12.287-4.958-17.192-17.462-9.809-29.964 4.85-12.503 19.564-17.515 31.797-12.503 12.288 5.011 17.191 17.515 12.288 29.964z m431.137-327.555a83.964 83.964 0 0 0-14.66-74.963c-19.616-19.994-46.562-30.019-71.029-22.527-22.096 5.012-41.658-9.97-46.563-30.018a40.258 40.258 0 0 1 29.426-47.479c51.412-10.023 107.783 5.012 144.537 47.479a157.904 157.904 0 0 1 31.797 152.514c-7.33 19.994-29.372 32.497-48.988 25.006-19.563-5.012-31.796-27.485-24.466-50.012z m227.908 75.018a44.838 44.838 0 0 1-56.37 30.019c-24.521-7.546-36.755-35.032-29.426-57.504a226.13 226.13 0 0 0-46.508-222.52c-56.372-62.515-137.21-87.52-213.144-70.006a45.108 45.108 0 0 1-53.892-35.029c-4.904-24.952 9.754-49.958 34.276-54.97a312.789 312.789 0 0 1 298.884 97.544c78.413 87.467 98.03 207.485 66.18 312.466z" ></path></symbol><symbol id="authing-github" viewBox="0 0 1024 1024"><path d="M51.57 672.155c3.72-6.605 52.236-29.956 126.057 57.307 0.186 0 0.465 0.14 0.79 0.419 5.21 4.326 29.538 39.26 43.307 51.865 58.935 53.307 147.083 12.001 157.13 6.047 4.652-38.282 19.025-68.378 43.027-90.52a290.072 290.072 0 0 1-64.052-10.047 203.832 203.832 0 0 1-61.029-18.048 168.852 168.852 0 0 1-58.052-29.165c-17.35-9.35-33.677-23.444-49.027-42.237a205.367 205.367 0 0 1-40.004-58.284c-10.698-20.095-19.071-45.911-25.072-77.356-6-28.84-8.977-62.005-8.977-99.543 0-68.983 22.979-129.64 69.076-181.924-2.745-5.395-33.026-77.17 7.907-179.969 55.447-1.954 115.173 23.49 185.226 68.332A925.198 925.198 0 0 1 547.008 46.89c56.936 1.907 113.592 9.303 169.132 22.142C739.49 54.984 821.637-1.3 900.249 2.747c37.678 89.45 11.024 170.154 6.977 178.9 46.05 46.236 69.076 104.846 69.076 175.875v6.047c0.326 5.024 0.512 10.094 0.512 15.118 0 27.77-3.163 55.958-9.536 84.473a349.24 349.24 0 0 1-25.025 77.402 282.816 282.816 0 0 1-39.027 57.26 367.242 367.242 0 0 1-49.028 41.26c-18.42 10.56-37.445 20.002-57.074 28.142a1890.865 1890.865 0 0 1-61.076 18.048 1650.986 1650.986 0 0 0-64.052 10.048c30.05 25.49 45.4 66.982 46.05 124.662a3242.148 3242.148 0 0 0-0.464 55.54c0 19.583 0.186 40.282 0.465 62.052-0.651 21.444-0.93 37.724-0.93 48.795 0 11.07 0.279 16.931 0.93 17.536a677.27 677.27 0 0 1-159.084 20.048h-14.978c-54.424 0-107.452-6.651-159.177-20.14-0.698-0.652-0.977-39.214-0.977-115.546-20.7 4.652-157.037 31.538-217.508-69.913-19.304-30.05-35.351-103.405-100.753-136.152-6.93 18.048-28.84 2.652-14-10.047z" ></path></symbol></svg>',c=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(c&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(e){console&&console.log(e)}}function u(){i||(i=!0,o())}t=function(){var e,t,n;(n=document.createElement("div")).innerHTML=s,s=null,(t=n.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",e=t,(n=document.body).firstChild?(t=n.firstChild).parentNode.insertBefore(e,t):n.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(o=t,r=e.document,i=!1,(a=function(){try{r.documentElement.doScroll("left")}catch(e){return void setTimeout(a,50)}u()})(),r.onreadystatechange=function(){"complete"==r.readyState&&(r.onreadystatechange=null,u())})}(window);n(658);var fa,ga=function(e){var t=e.type,n=e.style,o=e.className;return a.a.createElement("svg",{style:Object(l.a)({},n),className:de(["authing-icon",o])},a.a.createElement("use",{xlinkHref:"#".concat(t)}))},va=a.a.forwardRef((function(e,t){return a.a.createElement(Zi.a.Password,Object(wi.a)({ref:t},e,{iconRender:function(e){return a.a.createElement("span",{style:{display:"flex",height:"100%",alignItems:"center"}},e?a.a.createElement(ga,{type:"authing-a-eye-line1"}):a.a.createElement(ga,{type:"authing-a-eye-close-line1"}))}}))})),ba=function(){var e=Object(Ei.a)().t,t=Object(i.useState)(!1),n=Object(d.a)(t,2),o=n[0];return{setPasswordErrorTextShow:n[1],getPassWordUnsafeText:function(){return a.a.createElement(a.a.Fragment,null,o?a.a.createElement("div",{style:{marginBottom:23,fontSize:12,color:"#E8353E",display:"block"}},e("common.passwordUnsafeTip")):a.a.createElement(a.a.Fragment,null))}}},ya=function(){var e=Object(Ei.a)().t,t=Ar(),n=bi.a.useForm(),o=Object(d.a)(n,1)[0],r=ji().isPhoneMedia,s=dr(),c=ri().post,u=Nr(),p=u.businessRequestName,f=u.content,g=u.isChangeComplete,v=u.onRegisterSuccess,b=u.onRegisterFailed,y=Object(i.useRef)(null),C=xr().changeModule,E=Sr().publicKey,w=dr().options.encryptFunction,O=ba(),S=O.getPassWordUnsafeText,k=O.setPasswordErrorTextShow,T=Object(i.useCallback)(function(){var e=Object(m.a)(h.a.mark((function e(n){var o,r,i,a,u,d,m,O,S,T,P,N,A,x;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("registerByEmailCode"!==p){e.next=6;break}return e.next=3,w(n.password,E);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=n.password;case 7:if(r=e.t0,null===(o=y.current)||void 0===o||o.onSpin(!0),!g){e.next=14;break}return null===C||void 0===C||C(_e.REGISTER_COMPLETE_INFO,{businessRequestName:p,content:Object(l.a)(Object(l.a)({},f),{},{password:r}),onRegisterSuccess:v,onRegisterFailed:b}),e.abrupt("return");case 14:if(e.prev=14,"registerByEmailCode"!==p){e.next=27;break}return e.next=18,c("/api/v2/register/email-code",Object(l.a)({email:f.email,code:f.code,password:r,profile:f.profile},f.options));case 18:i=e.sent,a=i.code,u=i.data,d=i.onGuardHandling,m=i.message,y.current.onSpin(!1),200===a?v(u):(a===Iu.UNSAFE_PASSWORD_TIP&&k(!0),null===d||void 0===d||d(),b(a,u,m),null===t||void 0===t||null===(O=t.onRegisterError)||void 0===O||O.call(t,{code:a,data:u,message:m})),e.next=33;break;case 27:if("registerByPhoneCode"!==p){e.next=33;break}return e.next=30,s.registerByPhoneCode(f.phone,f.code,r,f.profile,f.options);case 30:T=e.sent,null===(S=y.current)||void 0===S||S.onSpin(!1),v(T);case 33:e.next=42;break;case 35:e.prev=35,e.t1=e.catch(14),P=e.t1.code,N=e.t1.message,A=e.t1.data,P===Iu.UNSAFE_PASSWORD_TIP&&k(!0),y.current.onError(),hr.a.error(N),b(P,A,N);case 42:return e.prev=42,null===(x=y.current)||void 0===x||x.onSpin(!1),e.finish(42);case 45:case"end":return e.stop()}}),e,null,[[14,35,42,45]])})));return function(t){return e.apply(this,arguments)}}(),[s,p,C,f,w,t,g,b,v,c,E,k]);return a.a.createElement("div",{className:"authing-g2-login-phone-code"},a.a.createElement(bi.a,{name:"resetPassword",form:o,onFinish:T,onFinishFailed:function(){var e;null===y||void 0===y||null===(e=y.current)||void 0===e||e.onError()},autoComplete:"off"},a.a.createElement(ma.Password,{className:"authing-g2-input-form",name:"password",required:!0},a.a.createElement(va,{autoFocus:!r,className:"authing-g2-input",size:"large",placeholder:e("login.inputPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(t,n){var r=o.getFieldValue("password");return n?n!==r?Promise.reject(e("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(e("login.inputPwd"))}}]},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:e("login.inputPwdAgain"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),S(),a.a.createElement(bi.a.Item,{className:"authing-g2-input-form submit-form"},a.a.createElement(qi,{className:"forget-password",text:e("common.confirm"),ref:y}))))};!function(e){e.ResetPassword="reset-password-first-time",e.FirstLoginReset="reset-password-forced",e.ResetPasswordStrengthDetection="reset-password-strength-detection"}(fa||(fa={}));var Ca,Ea,wa,Oa,Sa=function(){var e=Object(m.a)(h.a.mark((function e(t,n){var o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=ri(),r=o.authFlow,e.next=3,r(t,Object(l.a)({},n));case 3:return i=e.sent,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),ka=function(e){var t=e.onReset,n=Object(Ei.a)().t,o=Nr(),r=jr(),s=Sr().publicKey,c=bi.a.useForm(),u=Object(d.a)(c,1)[0],l=dr(),p=l.options.encryptFunction,f=ji().isPhoneMedia,g=Object(i.useRef)(null),v=ba(),b=v.getPassWordUnsafeText,y=v.setPasswordErrorTextShow,C=function(){var e=Object(m.a)(h.a.mark((function e(n){var i,a,c,u,d,m,f,v,b,C,E;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.password,null===(i=g.current)||void 0===i||i.onSpin(!0),!r){e.next=19;break}return e.t0=Sa,e.t1=fa.FirstLoginReset,e.next=7,p(a,s);case 7:return e.t2=e.sent,e.t3={password:e.t2},e.next=11,(0,e.t0)(e.t1,e.t3);case 11:u=e.sent,d=u.apiCode,m=u.onGuardHandling,f=u.message,null===(c=g.current)||void 0===c||c.onSpin(!1),d===Iu.ABORT_FLOW?t():d===Iu.UNSAFE_PASSWORD_TIP?(hr.a.error(f),y(!0)):(null===(v=g.current)||void 0===v||v.onError(),null===m||void 0===m||m()),e.next=33;break;case 19:return e.prev=19,e.next=22,l.resetPasswordByFirstLoginToken({token:o.token,password:a});case 22:b=e.sent,t(b),e.next=30;break;case 26:e.prev=26,e.t4=e.catch(19),hr.a.error(e.t4.message),null===g||void 0===g||null===(C=g.current)||void 0===C||C.onError();case 30:return e.prev=30,null===(E=g.current)||void 0===E||E.onSpin(!1),e.finish(30);case 33:case"end":return e.stop()}}),e,null,[[19,26,30,33]])})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement("div",{className:"authing-g2-login-phone-code"},a.a.createElement(bi.a,{name:"resetPassword",form:u,onFinish:C,onFinishFailed:function(){var e;null===g||void 0===g||null===(e=g.current)||void 0===e||e.onError()},autoComplete:"off"},a.a.createElement(ma.Password,{className:"authing-g2-input-form",name:"password",required:!0},a.a.createElement(va,{autoFocus:!f,className:"authing-g2-input",size:"large",placeholder:n("login.inputNewPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,t){var o=u.getFieldValue("password");return t?t!==o?Promise.reject(n("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(n("login.inputPwd"))}}]},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:n("login.inputPwdAgain"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),b(),a.a.createElement(bi.a.Item,{className:"authing-g2-input-form submit-form"},a.a.createElement(qi,{className:"forget-password",text:n("common.confirm"),ref:g}))))},Ta=function(e){var t=Object(Ei.a)().t,n=e.onReset,o=e.onFinishCallBack,r=bi.a.useForm(),s=Object(d.a)(r,1)[0],c=Sr().publicKey,u=dr(),l=ji().isPhoneMedia,p=u.options.encryptFunction,g=jr(),v=Object(i.useRef)(null),b=Nr(),y=ba(),C=y.getPassWordUnsafeText,E=y.setPasswordErrorTextShow,w=function(){var t=Object(m.a)(h.a.mark((function t(r){var i,a,s,l,d,m,f,y,C,w,O,S,k;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o instanceof Function)){t.next=6;break}return t.next=3,o(r);case 3:return(a=t.sent).code===Iu.UNSAFE_PASSWORD_TIP&&(hr.a.error(a.message),E(!0)),t.abrupt("return");case 6:if(s=r.password,l=r.oldPassword,null===v||void 0===v||null===(i=v.current)||void 0===i||i.onSpin(!0),!g){t.next=28;break}return t.t0=Sa,t.t1=fa.ResetPassword,t.next=13,p(s,c);case 13:return t.t2=t.sent,t.next=16,p(l,c);case 16:return t.t3=t.sent,t.t4={password:t.t2,oldPassword:t.t3},t.next=20,(0,t.t0)(t.t1,t.t4);case 20:m=t.sent,f=m.apiCode,y=m.onGuardHandling,C=m.message,null===v||void 0===v||null===(d=v.current)||void 0===d||d.onSpin(!1),f===Iu.ABORT_FLOW?n():f===Iu.UNSAFE_PASSWORD_TIP?(hr.a.error(C),E(!0)):(null===v||void 0===v||null===(w=v.current)||void 0===w||w.onError(),null===y||void 0===y||y()),t.next=42;break;case 28:return t.prev=28,t.next=31,u.resetPasswordByForceResetToken({token:b.token,newPassword:s,oldPassword:l});case 31:O=t.sent,e.onReset({code:200,data:O}),t.next=39;break;case 35:t.prev=35,t.t5=t.catch(28),hr.a.error(t.t5.message),null===v||void 0===v||null===(S=v.current)||void 0===S||S.onError();case 39:return t.prev=39,null===v||void 0===v||null===(k=v.current)||void 0===k||k.onSpin(!1),t.finish(39);case 42:case"end":return t.stop()}}),t,null,[[28,35,39,42]])})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:"authing-g2-login-phone-code"},a.a.createElement(bi.a,{name:"resetPassword",form:s,onFinish:w,onFinishFailed:function(){var e;null===v||void 0===v||null===(e=v.current)||void 0===e||e.onError()},autoComplete:"off"},a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"oldPassword",rules:Object(f.a)(ae(t("common.password")))},a.a.createElement(va,{autoFocus:!l,className:"authing-g2-input",size:"large",placeholder:t("user.inputCurrPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),a.a.createElement(ma.Password,{className:"authing-g2-input-form",name:"password"},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:t("login.inputNewPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),a.a.createElement(ma.Password,{className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,n){var o=s.getFieldValue("password");return n?n!==o?Promise.reject(t("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(t("login.inputPwd"))}}]},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:t("login.inputPwdAgain"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),C(),a.a.createElement(bi.a.Item,{className:"authing-g2-input-form submit-form"},a.a.createElement(qi,{className:"forget-password",text:t("common.confirm"),ref:v}))))},Pa=function(e){var t=e.onReset,n=Object(Ei.a)().t,o=Nr(),r=jr(),s=Sr().publicKey,c=bi.a.useForm(),u=Object(d.a)(c,1)[0],l=dr(),p=l.options.encryptFunction,f=ji().isPhoneMedia,g=Object(i.useRef)(null),v=ba(),b=v.getPassWordUnsafeText,y=v.setPasswordErrorTextShow,C=function(){var e=Object(m.a)(h.a.mark((function e(n){var i,a,c,u,d,m,f,v,b,C,E;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.password,null===(i=g.current)||void 0===i||i.onSpin(!0),!r){e.next=19;break}return e.t0=Sa,e.t1=fa.ResetPasswordStrengthDetection,e.next=7,p(a,s);case 7:return e.t2=e.sent,e.t3={password:e.t2},e.next=11,(0,e.t0)(e.t1,e.t3);case 11:u=e.sent,d=u.apiCode,m=u.onGuardHandling,f=u.message,null===(c=g.current)||void 0===c||c.onSpin(!1),d===Iu.ABORT_FLOW?t():d===Iu.UNSAFE_PASSWORD_TIP?(hr.a.error(f),y(!0)):(null===(v=g.current)||void 0===v||v.onError(),null===m||void 0===m||m()),e.next=33;break;case 19:return e.prev=19,e.next=22,l.resetPasswordByFirstLoginToken({token:o.token,password:a});case 22:b=e.sent,t(b),e.next=30;break;case 26:e.prev=26,e.t4=e.catch(19),hr.a.error(e.t4.message),null===g||void 0===g||null===(C=g.current)||void 0===C||C.onError();case 30:return e.prev=30,null===(E=g.current)||void 0===E||E.onSpin(!1),e.finish(30);case 33:case"end":return e.stop()}}),e,null,[[19,26,30,33]])})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement("div",{className:"authing-g2-login-phone-code"},a.a.createElement(bi.a,{name:"resetPassword",form:u,onFinish:C,onFinishFailed:function(){var e;null===g||void 0===g||null===(e=g.current)||void 0===e||e.onError()},autoComplete:"off"},a.a.createElement(ma.Password,{className:"authing-g2-input-form",name:"password",required:!0},a.a.createElement(va,{autoFocus:!f,className:"authing-g2-input",size:"large",placeholder:n("login.inputNewPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,t){var o=u.getFieldValue("password");return t?t!==o?Promise.reject(n("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(n("login.inputPwd"))}}]},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:n("login.inputPwdAgain"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),b(),a.a.createElement(bi.a.Item,{className:"authing-g2-input-form submit-form"},a.a.createElement(qi,{className:"forget-password",text:n("common.confirm"),ref:g}))))},Na=function(e){var t=e.title,n=e.explain,o=e.children,r=Ir(),s=Object(i.useMemo)((function(){return{title:t,explain:n}}),[n,t]);return a.a.createElement("div",{className:"g2-view-container g2-change-password"},a.a.createElement("div",{className:"g2-view-header"},a.a.createElement(Wi,{src:null===r||void 0===r?void 0:r.logo,size:48,borderRadius:4,alt:"",className:"icon"}),a.a.createElement("div",{className:"title"},s.title),a.a.createElement("div",{className:"title-explain"},s.explain)),a.a.createElement("div",{className:"g2-view-tabs"},o))},Aa=function(){var e=Object(Ei.a)().t,t=xr().changeModule,n=Ir(),o=a.a.createElement(ka,{onReset:function(){hr.a.success(e("common.updatePsswordSuccess")),setTimeout((function(){null===t||void 0===t||t(_e.LOGIN)}),500)}});return a.a.createElement(Na,{title:"".concat(e("common.welcome")," ").concat(n.title),explain:e("common.initPasswordText")},o)},xa=function(){var e=Object(Ei.a)().t,t=xr().changeModule,n=Ir(),o=a.a.createElement(Pa,{onReset:function(){hr.a.success(e("common.updatePsswordSuccess")),setTimeout((function(){null===t||void 0===t||t(_e.LOGIN)}),500)}});return a.a.createElement(Na,{title:"".concat(e("common.welcome")," ").concat(n.title),explain:e("common.unsafePasswordChangeText")},o)},Ia=function(){var e=Object(Ei.a)().t,t=xr().changeModule,n=Nr(),o=a.a.createElement(Ta,{onReset:function(){hr.a.success(e("common.updatePsswordSuccess")),setTimeout((function(){null===t||void 0===t||t(_e.LOGIN)}),500)}});return a.a.createElement(Na,{title:e("user.modifyPwd"),explain:e("user.modifyPwdText",{number:n.forcedCycle})},o)},ja=function(){var e=Object(Ei.a)().t,t=xr().changeModule,n=Nr(),o=a.a.createElement(Ta,{onReset:function(){hr.a.success(e("common.updatePsswordSuccess")),setTimeout((function(){null===t||void 0===t||t(_e.LOGIN)}),500)},onFinishCallBack:n.onFinishCallBack});return a.a.createElement(Na,{title:e("user.modifyPwd"),explain:e("user.modifyNoticePwdText",{number:n.forcedCycle})},o)},_a=function(){var e=Object(Ei.a)().t,t=Ir();return a.a.createElement(Na,{title:"".concat(e("common.welcome")," ").concat(t.title),explain:e("common.initPasswordText")},a.a.createElement(ya,null))},La=(n(659),n(226)),Ra=n.n(La),Ma=(n(210),n(71)),Fa=n.n(Ma),Ba=(n(317),n(170)),Da=n.n(Ba),qa=(n(133),n(74)),Ua=n.n(qa),Va=n(824),Ha=function(e){var t=e.value,n=e.onChange,o=Object(i.useState)(!1),r=Object(d.a)(o,2),s=r[0],c=r[1],u=Object(Ei.a)().t,l=S().state.config.apiHost,p=a.a.createElement("div",null,a.a.createElement(Va.a,null),a.a.createElement("div",{style:{marginTop:8}},"Upload"));return a.a.createElement(Da.a,{name:"file",accept:"image/*",listType:"picture-card",showUploadList:!1,action:"".concat(l,"/api/v2/upload?folder=photos"),onChange:function(e){var t=e.file.status;if(c("uploading"===t),"done"===t){var o=e.file.response,r=o.code,i=o.message,a=o.data;if(200!==r)return hr.a.error(i);var s=a.url;null===n||void 0===n||n(s)}else"error"===t&&hr.a.error(u("common.uploadFail",{name:e.file.name}))}},a.a.createElement(Ua.a,{size:"small",spinning:s},t?a.a.createElement("img",{src:t,alt:"",style:{width:"100%"}}):p))};Object(l.a)({},vr());!function(e){e.NONE="none",e.EMAIL="email",e.PHONE="phone",e.IS_NUMBER="isNumber",e.REG_EXP="regExp"}(Ca||(Ca={})),function(e){e.USERNAME="username",e.PHONE="phone",e.EMAIL="email"}(Ea||(Ea={})),function(e){e.IMAGE="image",e.NUMBER="number",e.DATE="date",e.DATE_TIME="dateTime",e.SELECT="select",e.DROPDOWN="dropdown",e.BOOLEAN="boolean",e.STRING="string",e.TEXT="text",e.GENDER="gender",e.COUNTRY="country"}(wa||(wa={})),function(e){e.registerByEmail="email",e.registerByPhoneCode="phone",e.registerByEmailCode="email"}(Oa||(Oa={}));var za,Ga=["onChange","value"],Wa=a.a.forwardRef((function(e,t){var n=e.onChange,o=e.value,r=Object(C.a)(e,Ga),s=Object(i.useState)(/^[0-9]*$/.test(String(o))?o:""),c=Object(d.a)(s,2),u=c[0],l=c[1],p=function(e){l(e.target.value),null===n||void 0===n||n(e)};return a.a.createElement(Zi.a,Object(wi.a)({},r,{ref:t,value:u,type:"tel",pattern:"[0-9]*",onChange:function(e){var t=e.target.value;/^[0-9]*$/.test(t)&&p(e)}}))})),Ka=(n(157),n(694),n(355)),$a=n.n(Ka),Ya=(n(695),n(225)),Qa=n.n(Ya),Ja=["sendDesc","beforeSend","btnRef","setSent"],Za=function(e){var t,n=Object(Ei.a)().t,o=e.sendDesc,r=void 0===o?n("login.clickSent"):o,s=e.beforeSend,c=e.btnRef,u=e.setSent,l=Object(C.a)(e,Ja),p=function(e){var t=Object(i.useState)(0),n=Object(d.a)(t,2),o=n[0],r=n[1],a=Object(i.useRef)(0);return Object(i.useEffect)((function(){return function(){return clearInterval(a.current)}}),[]),Object(i.useEffect)((function(){o<=0?(clearInterval(a.current),null===e||void 0===e||e(!1)):null===e||void 0===e||e(!0)}),[o,e]),{enabled:Object(i.useMemo)((function(){return o<=0}),[o]),send:function(){r(60),a.current=setInterval((function(){r((function(e){return e-1}))}),1e3)},countDown:o}}(u),f=p.enabled,g=p.send,v=p.countDown,b=Object(i.useState)(!1),y=Object(d.a)(b,2),E=y[0],w=y[1],O=Object(i.useMemo)((function(){return!f||E}),[f,E]),S=function(){var e=Object(m.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w(!0),!O){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,s();case 5:if(!!e.sent){e.next=9;break}return w(!1),e.abrupt("return");case 9:w(!1),g();case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(Fi.a,Object(wi.a)({},l,{className:null!==(t=l.type)&&void 0!==t?t:"authing-g2-send-code-btn g2-loading-btn-center",disabled:O,loading:E,onClick:S,ref:c}),!0===E&&a.a.createElement("span",null),!1===E&&a.a.createElement("span",null,f?r:n("common.retryAfterTime",{time:v})))},Xa=["value","onChange","autoSubmit","form","beforeSend","maxLength"],es=function(e){var t=e.value,n=e.onChange,o=e.autoSubmit,r=void 0!==o&&o,i=e.form,s=e.beforeSend,c=e.maxLength,u=Object(C.a)(e,Xa),l=Object(Ei.a)().t;return a.a.createElement(a.a.Fragment,null,a.a.createElement($a.a,{justify:"space-between",align:"middle"},a.a.createElement(Qa.a,{span:15,className:"g2-send-code-input-col"},a.a.createElement(Wa,Object(wi.a)({value:t,onChange:function(e){null===n||void 0===n||n(e),r&&c&&e.target.value.length>=c&&(null===i||void 0===i||i.submit())}},u,{maxLength:c}))),a.a.createElement(Qa.a,{offset:1,span:8},a.a.createElement(Za,{beforeSend:s,sendDesc:l("common.sendVerifyCode")}))))},ts=["scene","data","form","onSendCodeBefore","fieldName"],ns=function(e){var t=e.scene,n=e.data,o=e.form,r=e.onSendCodeBefore,i=e.fieldName,s=Object(C.a)(e,ts),c=Object(Ei.a)().t,u=ri().post,l=function(){var e=Object(m.a)(h.a.mark((function e(n){var o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=3;break}return hr.a.error(c("login.inputEmail")),e.abrupt("return",!1);case 3:if(ie("email",n)){e.next=6;break}return hr.a.error(c("common.emailFormatError")),e.abrupt("return",!1);case 6:return e.prev=6,e.next=9,u("/api/v2/email/send",{email:n,scene:t});case 9:if(o=e.sent,200!==o.code){e.next=15;break}return e.abrupt("return",!0);case 15:return hr.a.error(c("login.sendCodeTimeout")),e.abrupt("return",!1);case 17:e.next=22;break;case 19:return e.prev=19,e.t0=e.catch(6),e.abrupt("return",!1);case 22:case"end":return e.stop()}}),e,null,[[6,19]])})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(es,Object(wi.a)({beforeSend:function(){return r().then(function(){var e=Object(m.a)(h.a.mark((function e(t){var r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o?o.getFieldValue(i||"email"):n,e.next=3,l(r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){return!1}))},form:o},s))},os=["scene","data","form","areaCode","onSendCodeBefore","fieldName","isInternationSms"],rs=function(e){var t=e.scene,n=e.data,o=e.form,r=e.areaCode,i=e.onSendCodeBefore,s=e.fieldName,c=e.isInternationSms,u=void 0!==c&&c,l=Object(C.a)(e,os),d=Object(Ei.a)().t,p=dr(),f=function(){var e=Object(m.a)(h.a.mark((function e(n,o){var r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.sendSmsCode(n,o,t);case 3:return e.abrupt("return",!0);case 6:if(e.prev=6,e.t0=e.catch(0),"ECONNABORTED"!==e.t0.code){e.next=11;break}return hr.a.error(d("login.sendCodeTimeout")),e.abrupt("return",!1);case 11:return r=JSON.parse(e.t0.message),i=r.message,hr.a.error(i),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t,n){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement(es,Object(wi.a)({beforeSend:function(){return i().then(function(){var e=Object(m.a)(h.a.mark((function e(t){var i,a,c,l;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o?o.getFieldValue(s||"phone"):n,a=_i(u,i,r),c=a.phoneNumber,l=a.countryCode,e.next=4,f(c,l);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){return!1}))},form:o},l)))},is=(n(91),n(61)),as=n.n(is),ss=[{iso:"CA",regions:"\u52a0\u62ff\u5927",regions_en:"Canada",phoneCountryCode:"+1"},{iso:"US",regions:"\u7f8e\u56fd",regions_en:"United States",phoneCountryCode:"+1"},{iso:"KZ",regions:"\u54c8\u8428\u514b\u65af\u5766",regions_en:"Kazakhstan",phoneCountryCode:"+7"},{iso:"RU",regions:"\u4fc4\u7f57\u65af",regions_en:"Russia",phoneCountryCode:"+7"},{iso:"EG",regions:"\u57c3\u53ca",regions_en:"Egypt",phoneCountryCode:"+20"},{iso:"ZA",regions:"\u5357\u975e",regions_en:"South Africa",phoneCountryCode:"+27"},{iso:"GR",regions:"\u5e0c\u814a",regions_en:"Greece",phoneCountryCode:"+30"},{iso:"NL",regions:"\u8377\u5170",regions_en:"Netherlands",phoneCountryCode:"+31"},{iso:"BE",regions:"\u6bd4\u5229\u65f6",regions_en:"Belgium",phoneCountryCode:"+32"},{iso:"FR",regions:"\u6cd5\u56fd",regions_en:"France",phoneCountryCode:"+33"},{iso:"ES",regions:"\u897f\u73ed\u7259",regions_en:"Spain",phoneCountryCode:"+34"},{iso:"HU",regions:"\u5308\u7259\u5229",regions_en:"Hungary",phoneCountryCode:"+36"},{iso:"IT",regions:"\u610f\u5927\u5229",regions_en:"Italy",phoneCountryCode:"+39"},{iso:"RO",regions:"\u7f57\u9a6c\u5c3c\u4e9a",regions_en:"Romania",phoneCountryCode:"+40"},{iso:"CH",regions:"\u745e\u58eb",regions_en:"Switzerland",phoneCountryCode:"+41"},{iso:"AT",regions:"\u5965\u5730\u5229",regions_en:"Austria",phoneCountryCode:"+43"},{iso:"GB",regions:"\u82f1\u56fd",regions_en:"United Kingdom",phoneCountryCode:"+44"},{iso:"DK",regions:"\u4e39\u9ea6",regions_en:"Denmark",phoneCountryCode:"+45"},{iso:"SE",regions:"\u745e\u5178",regions_en:"Sweden",phoneCountryCode:"+46"},{iso:"NO",regions:"\u632a\u5a01",regions_en:"Norway",phoneCountryCode:"+47"},{iso:"PL",regions:"\u6ce2\u5170",regions_en:"Poland",phoneCountryCode:"+48"},{iso:"DE",regions:"\u5fb7\u56fd",regions_en:"Germany",phoneCountryCode:"+49"},{iso:"PE",regions:"\u79d8\u9c81",regions_en:"Peru",phoneCountryCode:"+51"},{iso:"MX",regions:"\u58a8\u897f\u54e5",regions_en:"Mexico",phoneCountryCode:"+52"},{iso:"CU",regions:"\u53e4\u5df4",regions_en:"Cuba",phoneCountryCode:"+53"},{iso:"AR",regions:"\u963f\u6839\u5ef7",regions_en:"Argentina",phoneCountryCode:"+54"},{iso:"BR",regions:"\u5df4\u897f",regions_en:"Brazil",phoneCountryCode:"+55"},{iso:"CL",regions:"\u667a\u5229",regions_en:"Chile",phoneCountryCode:"+56"},{iso:"CO",regions:"\u54e5\u4f26\u6bd4\u4e9a",regions_en:"Colombia",phoneCountryCode:"+57"},{iso:"VE",regions:"\u59d4\u5185\u745e\u62c9",regions_en:"Venezuela",phoneCountryCode:"+58"},{iso:"MY",regions:"\u9a6c\u6765\u897f\u4e9a",regions_en:"Malaysia",phoneCountryCode:"+60"},{iso:"AU",regions:"\u6fb3\u5927\u5229\u4e9a",regions_en:"Australia",phoneCountryCode:"+61"},{iso:"ID",regions:"\u5370\u5ea6\u5c3c\u897f\u4e9a",regions_en:"Indonesia",phoneCountryCode:"+62"},{iso:"PH",regions:"\u83f2\u5f8b\u5bbe",regions_en:"Philippines",phoneCountryCode:"+63"},{iso:"NZ",regions:"\u65b0\u897f\u5170",regions_en:"New Zealand",phoneCountryCode:"+64"},{iso:"SG",regions:"\u65b0\u52a0\u5761",regions_en:"Singapore",phoneCountryCode:"+65"},{iso:"TH",regions:"\u6cf0\u56fd",regions_en:"Thailand",phoneCountryCode:"+66"},{iso:"JP",regions:"\u65e5\u672c",regions_en:"Japan",phoneCountryCode:"+81"},{iso:"KR",regions:"\u97e9\u56fd",regions_en:"South Korea",phoneCountryCode:"+82"},{iso:"VN",regions:"\u8d8a\u5357",regions_en:"Vietnam",phoneCountryCode:"+84"},{iso:"CN",regions:"\u4e2d\u56fd",regions_en:"China",phoneCountryCode:"+86"},{iso:"TR",regions:"\u571f\u8033\u5176",regions_en:"Turkey",phoneCountryCode:"+90"},{iso:"IN",regions:"\u5370\u5ea6",regions_en:"India",phoneCountryCode:"+91"},{iso:"PK",regions:"\u5df4\u57fa\u65af\u5766",regions_en:"Pakistan",phoneCountryCode:"+92"},{iso:"AF",regions:"\u963f\u5bcc\u6c57",regions_en:"Afghanistan",phoneCountryCode:"+93"},{iso:"LK",regions:"\u65af\u91cc\u5170\u5361",regions_en:"Sri Lanka",phoneCountryCode:"+94"},{iso:"MM",regions:"\u7f05\u7538",regions_en:"Myanmar",phoneCountryCode:"+95"},{iso:"IR",regions:"\u4f0a\u6717",regions_en:"Iran",phoneCountryCode:"+98"},{iso:"MA",regions:"\u6469\u6d1b\u54e5",regions_en:"Morocco",phoneCountryCode:"+212"},{iso:"DZ",regions:"\u963f\u5c14\u53ca\u5229\u4e9a",regions_en:"Algeria",phoneCountryCode:"+213"},{iso:"TN",regions:"\u7a81\u5c3c\u65af",regions_en:"Tunisia",phoneCountryCode:"+216"},{iso:"LY",regions:"\u5229\u6bd4\u4e9a",regions_en:"Libya",phoneCountryCode:"+218"},{iso:"GM",regions:"\u5188\u6bd4\u4e9a",regions_en:"Gambia",phoneCountryCode:"+220"},{iso:"SN",regions:"\u585e\u5185\u52a0\u5c14",regions_en:"Senegal",phoneCountryCode:"+221"},{iso:"MR",regions:"\u6bdb\u91cc\u5854\u5c3c\u4e9a",regions_en:"Mauritania",phoneCountryCode:"+222"},{iso:"ML",regions:"\u9a6c\u91cc",regions_en:"Mali",phoneCountryCode:"+223"},{iso:"GN",regions:"\u51e0\u5185\u4e9a",regions_en:"Guinea",phoneCountryCode:"+224"},{iso:"CI",regions:"\u8c61\u7259\u6d77\u5cb8",regions_en:"Ivory Coast",phoneCountryCode:"+225"},{iso:"BF",regions:"\u5e03\u57fa\u7eb3\u6cd5\u7d22",regions_en:"Burkina Faso",phoneCountryCode:"+226"},{iso:"NE",regions:"\u5c3c\u65e5\u5c14",regions_en:"Niger",phoneCountryCode:"+227"},{iso:"TG",regions:"\u591a\u54e5",regions_en:"Togo",phoneCountryCode:"+228"},{iso:"BJ",regions:"\u8d1d\u5b81",regions_en:"Benin",phoneCountryCode:"+229"},{iso:"MU",regions:"\u6bdb\u91cc\u6c42\u65af",regions_en:"Mauritius",phoneCountryCode:"+230"},{iso:"LR",regions:"\u5229\u6bd4\u91cc\u4e9a",regions_en:"Liberia",phoneCountryCode:"+231"},{iso:"SL",regions:"\u585e\u62c9\u5229\u6602",regions_en:"Sierra Leone",phoneCountryCode:"+232"},{iso:"GH",regions:"\u52a0\u7eb3",regions_en:"Ghana",phoneCountryCode:"+233"},{iso:"NG",regions:"\u5c3c\u65e5\u5229\u4e9a",regions_en:"Nigeria",phoneCountryCode:"+234"},{iso:"TD",regions:"\u4e4d\u5f97",regions_en:"Chad",phoneCountryCode:"+235"},{iso:"CF",regions:"\u4e2d\u975e\u5171\u548c\u56fd",regions_en:"Central African Republic",phoneCountryCode:"+236"},{iso:"CM",regions:"\u5580\u9ea6\u9686",regions_en:"Cameroon",phoneCountryCode:"+237"},{iso:"CV",regions:"\u5f00\u666e",regions_en:"Cape Verde",phoneCountryCode:"+238"},{iso:"ST",regions:"\u5723\u591a\u7f8e\u548c\u666e\u6797\u897f\u6bd4",regions_en:"Sao Tome and Principe",phoneCountryCode:"+239"},{iso:"GQ",regions:"\u8d64\u9053\u51e0\u5185\u4e9a",regions_en:"Equatorial Guinea",phoneCountryCode:"+240"},{iso:"GA",regions:"\u52a0\u84ec",regions_en:"Gabon",phoneCountryCode:"+241"},{iso:"CG",regions:"\u521a\u679c\u5171\u548c\u56fd",regions_en:"Republic Of The Congo",phoneCountryCode:"+242"},{iso:"CD",regions:"\u521a\u679c\u6c11\u4e3b\u5171\u548c\u56fd",regions_en:"Democratic Republic of theCongo",phoneCountryCode:"+243"},{iso:"AO",regions:"\u5b89\u54e5\u62c9",regions_en:"Angola",phoneCountryCode:"+244"},{iso:"GW",regions:"\u51e0\u5185\u4e9a\u6bd4\u7ecd\u5171\u548c\u56fd",regions_en:"Guinea-Bissau",phoneCountryCode:"+245"},{iso:"SC",regions:"\u585e\u820c\u5c14",regions_en:"Seychelles",phoneCountryCode:"+248"},{iso:"SD",regions:"\u82cf\u4e39",regions_en:"Sudan",phoneCountryCode:"+249"},{iso:"RW",regions:"\u5362\u65fa\u8fbe",regions_en:"Rwanda",phoneCountryCode:"+250"},{iso:"ET",regions:"\u57c3\u585e\u4fc4\u6bd4\u4e9a",regions_en:"Ethiopia",phoneCountryCode:"+251"},{iso:"SO",regions:"\u7d22\u9a6c\u91cc",regions_en:"Somalia",phoneCountryCode:"+252"},{iso:"DJ",regions:"\u5409\u5e03\u63d0",regions_en:"Djibouti",phoneCountryCode:"+253"},{iso:"KE",regions:"\u80af\u5c3c\u4e9a",regions_en:"Kenya",phoneCountryCode:"+254"},{iso:"TZ",regions:"\u5766\u6851\u5c3c\u4e9a",regions_en:"Tanzania",phoneCountryCode:"+255"},{iso:"UG",regions:"\u4e4c\u5e72\u8fbe",regions_en:"Uganda",phoneCountryCode:"+256"},{iso:"BI",regions:"\u5e03\u9686\u8fea",regions_en:"Burundi",phoneCountryCode:"+257"},{iso:"MZ",regions:"\u83ab\u6851\u6bd4\u514b",regions_en:"Mozambique",phoneCountryCode:"+258"},{iso:"ZM",regions:"\u8d5e\u6bd4\u4e9a",regions_en:"Zambia",phoneCountryCode:"+260"},{iso:"MG",regions:"\u9a6c\u8fbe\u52a0\u65af\u52a0",regions_en:"Madagascar",phoneCountryCode:"+261"},{iso:"RE",regions:"\u7559\u5c3c\u6c6a",regions_en:"R\xe9union Island",phoneCountryCode:"+262"},{iso:"ZW",regions:"\u6d25\u5df4\u5e03\u97e6",regions_en:"Zimbabwe",phoneCountryCode:"+263"},{iso:"NA",regions:"\u7eb3\u7c73\u6bd4\u4e9a",regions_en:"Namibia",phoneCountryCode:"+264"},{iso:"MW",regions:"\u9a6c\u62c9\u7ef4",regions_en:"Malawi",phoneCountryCode:"+265"},{iso:"LS",regions:"\u83b1\u7d22\u6258",regions_en:"Lesotho",phoneCountryCode:"+266"},{iso:"BW",regions:"\u535a\u8328\u74e6\u7eb3",regions_en:"Botswana",phoneCountryCode:"+267"},{iso:"SZ",regions:"\u65af\u5a01\u58eb\u5170",regions_en:"Swaziland",phoneCountryCode:"+268"},{iso:"KM",regions:"\u79d1\u6469\u7f57",regions_en:"Comoros",phoneCountryCode:"+269"},{iso:"YT",regions:"\u9a6c\u7ea6\u7279",regions_en:"Mayotte",phoneCountryCode:"+269"},{iso:"ER",regions:"\u5384\u7acb\u7279\u91cc\u4e9a",regions_en:"Eritrea",phoneCountryCode:"+291"},{iso:"AW",regions:"\u963f\u9c81\u5df4",regions_en:"Aruba",phoneCountryCode:"+297"},{iso:"FO",regions:"\u6cd5\u7f57\u7fa4\u5c9b",regions_en:"Faroe Islands",phoneCountryCode:"+298"},{iso:"GL",regions:"\u683c\u9675\u5170\u5c9b",regions_en:"Greenland",phoneCountryCode:"+299"},{iso:"GI",regions:"\u76f4\u5e03\u7f57\u9640",regions_en:"Gibraltar",phoneCountryCode:"+350"},{iso:"PT",regions:"\u8461\u8404\u7259",regions_en:"Portugal",phoneCountryCode:"+351"},{iso:"LU",regions:"\u5362\u68ee\u5821",regions_en:"Luxembourg",phoneCountryCode:"+352"},{iso:"IE",regions:"\u7231\u5c14\u5170",regions_en:"Ireland",phoneCountryCode:"+353"},{iso:"IS",regions:"\u51b0\u5c9b",regions_en:"Iceland",phoneCountryCode:"+354"},{iso:"AL",regions:"\u963f\u5c14\u5df4\u5c3c\u4e9a",regions_en:"Albania",phoneCountryCode:"+355"},{iso:"MT",regions:"\u9a6c\u8033\u4ed6",regions_en:"Malta",phoneCountryCode:"+356"},{iso:"CY",regions:"\u585e\u6d66\u8def\u65af",regions_en:"Cyprus",phoneCountryCode:"+357"},{iso:"FI",regions:"\u82ac\u5170",regions_en:"Finland",phoneCountryCode:"+358"},{iso:"BG",regions:"\u4fdd\u52a0\u5229\u4e9a",regions_en:"Bulgaria",phoneCountryCode:"+359"},{iso:"LT",regions:"\u7acb\u9676\u5b9b",regions_en:"Lithuania",phoneCountryCode:"+370"},{iso:"LV",regions:"\u62c9\u8131\u7ef4\u4e9a",regions_en:"Latvia",phoneCountryCode:"+371"},{iso:"EE",regions:"\u7231\u6c99\u5c3c\u4e9a",regions_en:"Estonia",phoneCountryCode:"+372"},{iso:"MD",regions:"\u6469\u5c14\u591a\u74e6",regions_en:"Moldova",phoneCountryCode:"+373"},{iso:"AM",regions:"\u4e9a\u7f8e\u5c3c\u4e9a",regions_en:"Armenia",phoneCountryCode:"+374"},{iso:"BY",regions:"\u767d\u4fc4\u7f57\u65af",regions_en:"Belarus",phoneCountryCode:"+375"},{iso:"AD",regions:"\u5b89\u9053\u5c14",regions_en:"Andorra",phoneCountryCode:"+376"},{iso:"MC",regions:"\u6469\u7eb3\u54e5",regions_en:"Monaco",phoneCountryCode:"+377"},{iso:"SM",regions:"\u5723\u9a6c\u529b\u8bfa",regions_en:"San Marino",phoneCountryCode:"+378"},{iso:"UA",regions:"\u4e4c\u514b\u5170",regions_en:"Ukraine",phoneCountryCode:"+380"},{iso:"RS",regions:"\u585e\u5c14\u7ef4\u4e9a",regions_en:"Serbia",phoneCountryCode:"+381"},{iso:"ME",regions:"\u9ed1\u5c71",regions_en:"Montenegro",phoneCountryCode:"+382"},{iso:"HR",regions:"\u514b\u7f57\u5730\u4e9a",regions_en:"Croatia",phoneCountryCode:"+385"},{iso:"SI",regions:"\u65af\u6d1b\u6587\u5c3c\u4e9a",regions_en:"Slovenia",phoneCountryCode:"+386"},{iso:"BA",regions:"\u6ce2\u65af\u5c3c\u4e9a\u548c\u9ed1\u585e\u54e5\u7ef4\u90a3",regions_en:"Bosniaand Herzegovina",phoneCountryCode:"+387"},{iso:"MK",regions:"\u9a6c\u5176\u987f",regions_en:"Macedonia",phoneCountryCode:"+389"},{iso:"CZ",regions:"\u6377\u514b",regions_en:"Czech",phoneCountryCode:"+420"},{iso:"SK",regions:"\u65af\u6d1b\u4f10\u514b",regions_en:"Slovakia",phoneCountryCode:"+421"},{iso:"LI",regions:"\u5217\u652f\u6566\u58eb\u767b",regions_en:"Liechtenstein",phoneCountryCode:"+423"},{iso:"BZ",regions:"\u4f2f\u5229\u5179",regions_en:"Belize",phoneCountryCode:"+501"},{iso:"GT",regions:"\u74dc\u5730\u9a6c\u62c9",regions_en:"Guatemala",phoneCountryCode:"+502"},{iso:"SV",regions:"\u8428\u5c14\u74e6\u591a",regions_en:"ElSalvador",phoneCountryCode:"+503"},{iso:"HN",regions:"\u6d2a\u90fd\u62c9\u65af",regions_en:"Honduras",phoneCountryCode:"+504"},{iso:"NI",regions:"\u5c3c\u52a0\u62c9\u74dc",regions_en:"Nicaragua",phoneCountryCode:"+505"},{iso:"CR",regions:"\u54e5\u65af\u8fbe\u9ece\u52a0",regions_en:"CostaRica",phoneCountryCode:"+506"},{iso:"PA",regions:"\u5df4\u62ff\u9a6c",regions_en:"Panama",phoneCountryCode:"+507"},{iso:"PM",regions:"\u5723\u5f7c\u57c3\u5c14\u548c\u5bc6\u514b\u9686\u5c9b",regions_en:"Saint Pierreand Miquelon",phoneCountryCode:"+508"},{iso:"HT",regions:"\u6d77\u5730",regions_en:"Haiti",phoneCountryCode:"+509"},{iso:"GP",regions:"\u74dc\u5fb7\u7f57\u666e\u5c9b",regions_en:"Guadeloupe",phoneCountryCode:"+590"},{iso:"BO",regions:"\u73bb\u5229\u7ef4\u4e9a",regions_en:"Bolivia",phoneCountryCode:"+591"},{iso:"GY",regions:"\u572d\u4e9a\u90a3",regions_en:"Guyana",phoneCountryCode:"+592"},{iso:"EC",regions:"\u5384\u74dc\u591a\u5c14",regions_en:"Ecuador",phoneCountryCode:"+593"},{iso:"GF",regions:"\u6cd5\u5c5e\u572d\u4e9a\u90a3",regions_en:"French Guiana",phoneCountryCode:"+594"},{iso:"PY",regions:"\u5df4\u62c9\u572d",regions_en:"Paraguay",phoneCountryCode:"+595"},{iso:"SR",regions:"\u82cf\u91cc\u5357",regions_en:"Suriname",phoneCountryCode:"+597"},{iso:"UY",regions:"\u4e4c\u62c9\u572d",regions_en:"Uruguay",phoneCountryCode:"+598"},{iso:"BQ",regions:"\u8377\u5170\u52a0\u52d2\u6bd4",regions_en:"Caribisch Nederland",phoneCountryCode:"+599"},{iso:"CW",regions:"\u5e93\u62c9\u7d22",regions_en:"Curacao",phoneCountryCode:"+599"},{iso:"TL",regions:"\u4e1c\u5e1d\u6c76",regions_en:"East Timor",phoneCountryCode:"+670"},{iso:"BN",regions:"\u6587\u83b1",regions_en:"Brunei",phoneCountryCode:"+673"},{iso:"NR",regions:"\u62ff\u9c81\u5c9b",regions_en:"Nauru",phoneCountryCode:"+674"},{iso:"PG",regions:"\u5df4\u5e03\u4e9a\u65b0\u51e0\u5185\u4e9a",regions_en:"Papua New Guinea",phoneCountryCode:"+675"},{iso:"TO",regions:"\u6c64\u52a0",regions_en:"Tonga",phoneCountryCode:"+676"},{iso:"SB",regions:"\u6240\u7f57\u95e8\u7fa4\u5c9b",regions_en:"Solomon Islands",phoneCountryCode:"+677"},{iso:"VU",regions:"\u74e6\u52aa\u963f\u56fe",regions_en:"Vanuatu",phoneCountryCode:"+678"},{iso:"FJ",regions:"\u6590\u6d4e",regions_en:"Fiji",phoneCountryCode:"+679"},{iso:"PW",regions:"\u5e15\u52b3",regions_en:"Palau",phoneCountryCode:"+680"},{iso:"CK",regions:"\u5e93\u514b\u7fa4\u5c9b",regions_en:"Cook Islands",phoneCountryCode:"+682"},{iso:"WS",regions:"\u8428\u6469\u4e9a",regions_en:"Samoa",phoneCountryCode:"+685"},{iso:"KI",regions:"\u57fa\u91cc\u5df4\u65af",regions_en:"Kiribati",phoneCountryCode:"+686"},{iso:"NC",regions:"\u65b0\u5580\u91cc\u591a\u5c3c\u4e9a",regions_en:"New Caledonia",phoneCountryCode:"+687"},{iso:"PF",regions:"\u6cd5\u5c5e\u6ce2\u5229\u5c3c\u897f\u4e9a",regions_en:"French Polynesia",phoneCountryCode:"+689"},{iso:"FM",regions:"\u5bc6\u514b\u7f57\u5c3c\u897f\u4e9a",regions_en:"Micronesia",phoneCountryCode:"+691"},{iso:"MH",regions:"\u9a6c\u7ecd\u5c14\u7fa4\u5c9b",regions_en:"Marshall Islands",phoneCountryCode:"+692"},{iso:"KP",regions:"\u671d\u9c9c",regions_en:"Korea Democratic Rep.",phoneCountryCode:"+850"},{iso:"HK",regions:"\u4e2d\u56fd\u9999\u6e2f",regions_en:"Hong Kong",phoneCountryCode:"+852"},{iso:"MO",regions:"\u4e2d\u56fd\u6fb3\u95e8",regions_en:"Macau",phoneCountryCode:"+853"},{iso:"KH",regions:"\u67ec\u57d4\u5be8",regions_en:"Cambodia",phoneCountryCode:"+855"},{iso:"LA",regions:"\u8001\u631d",regions_en:"Laos",phoneCountryCode:"+856"},{iso:"BD",regions:"\u5b5f\u52a0\u62c9\u56fd",regions_en:"Bangladesh",phoneCountryCode:"+880"},{iso:"TW",regions:"\u4e2d\u56fd\u53f0\u6e7e",regions_en:"Taiwan",phoneCountryCode:"+886"},{iso:"MV",regions:"\u9a6c\u5c14\u4ee3\u592b",regions_en:"Maldives",phoneCountryCode:"+960"},{iso:"LB",regions:"\u9ece\u5df4\u5ae9",regions_en:"Lebanon",phoneCountryCode:"+961"},{iso:"JO",regions:"\u7ea6\u65e6",regions_en:"Jordan",phoneCountryCode:"+962"},{iso:"SY",regions:"\u53d9\u5229\u4e9a",regions_en:"Syria",phoneCountryCode:"+963"},{iso:"IQ",regions:"\u4f0a\u62c9\u514b",regions_en:"Iraq",phoneCountryCode:"+964"},{iso:"KW",regions:"\u79d1\u5a01\u7279",regions_en:"Kuwait",phoneCountryCode:"+965"},{iso:"SA",regions:"\u6c99\u7279\u963f\u62c9\u4f2f",regions_en:"Saudi Arabia",phoneCountryCode:"+966"},{iso:"YE",regions:"\u4e5f\u95e8",regions_en:"Yemen",phoneCountryCode:"+967"},{iso:"OM",regions:"\u963f\u66fc",regions_en:"Oman",phoneCountryCode:"+968"},{iso:"AE",regions:"\u963f\u62c9\u4f2f\u8054\u5408\u914b\u957f\u56fd",regions_en:"United Arab Emirates",phoneCountryCode:"+971"},{iso:"IL",regions:"\u4ee5\u8272\u5217",regions_en:"Israel",phoneCountryCode:"+972"},{iso:"BH",regions:"\u5df4\u6797",regions_en:"Bahrain",phoneCountryCode:"+973"},{iso:"QA",regions:"\u5361\u5854\u5c14",regions_en:"Qatar",phoneCountryCode:"+974"},{iso:"BT",regions:"\u4e0d\u4e39",regions_en:"Bhutan",phoneCountryCode:"+975"},{iso:"MN",regions:"\u8499\u53e4",regions_en:"Mongolia",phoneCountryCode:"+976"},{iso:"NP",regions:"\u5c3c\u6cca\u5c14",regions_en:"Nepal",phoneCountryCode:"+977"},{iso:"TJ",regions:"\u5854\u5409\u514b\u65af\u5766",regions_en:"Tajikistan",phoneCountryCode:"+992"},{iso:"TM",regions:"\u571f\u5e93\u66fc\u65af\u5766",regions_en:"Turkmenistan",phoneCountryCode:"+993"},{iso:"AZ",regions:"\u963f\u585e\u62dc\u7586",regions_en:"Azerbaijan",phoneCountryCode:"+994"},{iso:"GE",regions:"\u683c\u9c81\u5409\u4e9a",regions_en:"Georgia",phoneCountryCode:"+995"},{iso:"KG",regions:"\u5409\u5c14\u5409\u65af\u65af\u5766",regions_en:"Kyrgyzstan",phoneCountryCode:"+996"},{iso:"UZ",regions:"\u4e4c\u5179\u522b\u514b\u65af\u5766",regions_en:"Uzbekistan",phoneCountryCode:"+998"},{iso:"BS",regions:"\u5df4\u54c8\u9a6c",regions_en:"Bahamas",phoneCountryCode:"+1242"},{iso:"BB",regions:"\u5df4\u5df4\u591a\u65af",regions_en:"Barbados",phoneCountryCode:"+1246"},{iso:"AI",regions:"\u5b89\u572d\u62c9",regions_en:"Anguilla",phoneCountryCode:"+1264"},{iso:"AG",regions:"\u5b89\u63d0\u74dc\u548c\u5df4\u5e03\u8fbe",regions_en:"Antigua and Barbuda",phoneCountryCode:"+1268"},{iso:"VG",regions:"\u82f1\u5c5e\u5904\u5973\u7fa4\u5c9b",regions_en:"VirginIslands,British",phoneCountryCode:"+1284"},{iso:"KY",regions:"\u5f00\u66fc\u7fa4\u5c9b",regions_en:"Cayman Islands",phoneCountryCode:"+1345"},{iso:"BM",regions:"\u767e\u6155\u5927\u7fa4\u5c9b",regions_en:"Bermuda",phoneCountryCode:"+1441"},{iso:"GD",regions:"\u683c\u6797\u7eb3\u8fbe",regions_en:"Grenada",phoneCountryCode:"+1473"},{iso:"TC",regions:"\u7279\u514b\u65af\u548c\u51ef\u79d1\u65af\u7fa4\u5c9b",regions_en:"Turksand Caicos Islands",phoneCountryCode:"+1649"},{iso:"MS",regions:"\u8499\u7279\u585e\u62c9\u7279\u5c9b",regions_en:"Montserrat",phoneCountryCode:"+1664"},{iso:"GU",regions:"\u5173\u5c9b",regions_en:"Guam",phoneCountryCode:"+1671"},{iso:"AS",regions:"\u7f8e\u5c5e\u8428\u6469\u4e9a",regions_en:"American Samoa",phoneCountryCode:"+1684"},{iso:"LC",regions:"\u5723\u9732\u897f\u4e9a",regions_en:"Saint Lucia",phoneCountryCode:"+1758"},{iso:"DM",regions:"\u591a\u7c73\u5c3c\u52a0",regions_en:"Dominica",phoneCountryCode:"+1767"},{iso:"VC",regions:"\u5723\u6587\u68ee\u7279\u548c\u683c\u6797\u7eb3\u4e01\u65af",regions_en:"Saint Vincent and The Grenadines",phoneCountryCode:"+1784"},{iso:"PR",regions:"\u6ce2\u591a\u9ece\u5404",regions_en:"Puerto Rico",phoneCountryCode:"+1787"},{iso:"DO",regions:"\u591a\u7c73\u5c3c\u52a0\u5171\u548c\u56fd",regions_en:"dominican republic",phoneCountryCode:"+1809"},{iso:"TT",regions:"\u7279\u7acb\u5c3c\u8fbe\u548c\u591a\u5df4\u54e5",regions_en:"Trinidadand Tobago",phoneCountryCode:"+1868"},{iso:"KN",regions:"\u5723\u57fa\u8328\u548c\u5c3c\u7ef4\u65af",regions_en:"Saint Kitts and Nevis",phoneCountryCode:"+1869"},{iso:"JM",regions:"\u7259\u4e70\u52a0",regions_en:"Jamaica",phoneCountryCode:"+1876"}],cs=(n(325),function(e){var t=e.value,n=e.onChange,o=ss.map((function(e){return{value:e.iso,key:e.iso,children:e.phoneCountryCode,label:a.a.createElement("div",{className:"select-option-item"},a.a.createElement("span",null,e.phoneCountryCode),a.a.createElement("div",{className:"country"},a.a.createElement(as.a,{title:"zh-CN"===_.a.language?e.regions:e.regions_en},"zh-CN"===_.a.language?e.regions:e.regions_en))),region:e.regions,region_en:e.regions_en}}));return a.a.createElement(Fa.a,{showSearch:!0,dropdownClassName:"areacode-virtual-dropdown",bordered:!1,listHeight:258,options:o,value:t,onChange:n,optionLabelProp:"children",dropdownMatchSelectWidth:138,filterOption:function(e,t){return t.children.toLowerCase().indexOf(e.toLowerCase())>=0||(t.region.toLowerCase().indexOf(e.toLowerCase())>=0||t.region_en.toLowerCase().indexOf(e.toLowerCase())>=0)},suffixIcon:a.a.createElement(oa,{className:"areacode-virtual-dropdown-icon",type:"authing-arrow-down-s-fill",style:{width:20,height:20}})})}),us=["areaCode","onAreaCodeChange","onChange","value"],ls=function(e){var t=e.areaCode,n=e.onAreaCodeChange,o=e.onChange,r=e.value,s=Object(C.a)(e,us),c=Object(Ei.a)().t,u=Object(i.useState)(/^[^a-zA-Z]*$/.test(String(r))?r:""),l=Object(d.a)(u,2),p=l[0],h=l[1],m=function(e){h(e.target.value),null===o||void 0===o||o(e)};return a.a.createElement(a.a.Fragment,null,a.a.createElement(Zi.a,Object(wi.a)({pattern:"[^a-zA-Z]*",value:p,placeholder:c("login.inputPhone")},s,{onChange:function(e){var t=e.target.value;/^[^a-zA-Z]*$/.test(t)&&m(e)},prefix:a.a.createElement(cs,{value:t,onChange:n})})))},ds=function(e,t){return t.props.value.toLowerCase().indexOf(e.toLowerCase())>=0||t.props.label.toLowerCase().indexOf(e.toLowerCase())>=0},ps=function(e){var t,n,o=e.metaData,r=e.businessRequest,s=Sr(),c=null===s||void 0===s?void 0:s.verifyCodeLength,u=Object(i.useRef)(null),p=Object(i.useState)([]),f=Object(d.a)(p,2),g=f[0],v=f[1],b=(null===s||void 0===s||null===(t=s.internationalSmsConfig)||void 0===t?void 0:t.enabled)||!1,y=Object(i.useState)((null===s||void 0===s||null===(n=s.internationalSmsConfig)||void 0===n?void 0:n.defaultISOType)||"CN"),C=Object(d.a)(y,2),E=C[0],w=C[1],O=ii(),S=O.get,k=O.post,T=Object(Ei.a)().t,P=bi.a.useForm(),N=Object(d.a)(P,1)[0],A=Object(i.useCallback)(Object(m.a)(h.a.mark((function e(){var t,n,o,r,i,a,s,c,u;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S("/api/v2/country-list");case 2:for(t=e.sent,n=t.data,o="zh-CN"===_.a.language?null===n||void 0===n?void 0:n.zh:null===n||void 0===n?void 0:n.en,r=[],i=0,a=Object.entries(o);i<a.length;i++)s=Object(d.a)(a[i],2),c=s[0],u=s[1],r.push({label:u+" (".concat(c,")"),value:c});v(r);case 8:case"end":return e.stop()}}),e)}))),[S]);Object(i.useEffect)((function(){o.map((function(e){return e.name})).includes("country")&&A()}),[A,o]);var x=Object(i.useCallback)((function(e){return b?a.a.createElement(ls,Object(wi.a)({},e,{className:"authing-g2-input",size:"large",areaCode:E,onAreaCodeChange:function(e){w(e),N.getFieldValue(["internal phone:phone"])&&N.validateFields(["internal phone:phone"])}})):a.a.createElement(Wa,Object(wi.a)({},e,{className:"authing-g2-input",autoComplete:"off",key:"internal-phone:phone123",type:"tel",size:"large",maxLength:11,placeholder:T("login.inputPhone")}))}),[E,N,b,T]),I=Object(i.useMemo)((function(){return{gender:function(e){return a.a.createElement(Fa.a,{key:e.key,className:"authing-g2-select",options:[{label:_.a.t("common.man"),value:"M"},{label:_.a.t("common.female"),value:"F"}]})},country:function(e){return a.a.createElement(Fa.a,{key:e.key,className:"authing-g2-select",options:g,showSearch:!0,filterOption:ds})},image:function(){return a.a.createElement(Ha,null)},number:function(e){return a.a.createElement(Wa,{key:e.key,style:{width:"100%"},className:"authing-g2-input"})},date:function(e){return a.a.createElement(Ra.a,{key:e.key,className:"authing-g2-input",style:{width:"100%"},placeholder:_.a.t("common.pleaseSelectDate")})},datetime:function(e){return a.a.createElement(Ra.a,{key:e.key,className:"authing-g2-input",style:{width:"100%"},placeholder:_.a.t("common.pleaseSelectDate")})},select:function(e){return a.a.createElement(Fa.a,{key:e.key,className:"authing-g2-select",showSearch:!0,options:e.options,filterOption:ds})},dropdown:function(e){return a.a.createElement(Fa.a,{key:e.key,className:"authing-g2-select",showSearch:!0,options:e.options,filterOption:ds})},boolean:function(e){return a.a.createElement(Fa.a,{key:e.key,className:"authing-g2-select",options:[{label:_.a.t("common.yes"),value:!0},{label:_.a.t("common.no"),value:!1}]})},string:function(e){return a.a.createElement(Zi.a,{key:e.key,type:"text",size:"large",className:"authing-g2-input",autoComplete:"off"})},text:function(e){return a.a.createElement(Zi.a,{key:e.key,type:"text",size:"large",className:"authing-g2-input",autoComplete:"off"})}}}),[g]),j=Object(i.useMemo)((function(){return{username:function(e){return a.a.createElement(ma.UserName,{validateFirst:!0,className:"authing-g2-input-form",name:"username",key:e.key,label:_.a.t("common.username"),required:e.required,checkRepeat:!0},a.a.createElement(Zi.a,{className:"authing-g2-input",autoComplete:"username",key:"internal-username:asdf",size:"large",maxLength:11,placeholder:T("login.inputUsername")}))},phone:function(e){return a.a.createElement(a.a.Fragment,null,a.a.createElement(ma.Phone,{validateFirst:!0,className:b?"authing-g2-input-form remove-padding":"authing-g2-input-form",name:"phone",key:"internal-phone:phone",label:_.a.t("common.phoneLabel"),required:e.required,checkRepeat:!0,areaCode:E},a.a.createElement(x,null)),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"phoneCode",key:"internal-phone:code",rules:e.required?ae(T("common.captchaCode")):void 0},a.a.createElement(rs,{isInternationSms:b,areaCode:E,className:"authing-g2-input g2-send-code-input",autoComplete:"one-time-code",size:"large",placeholder:T("common.inputFourVerifyCode",{length:c}),scene:bo.SCENE_TYPE_COMPLETE_PHONE,maxLength:c,fieldName:"phone",form:N,onSendCodeBefore:function(){return N.validateFields(["phone"])}})))},email:function(e){return a.a.createElement(a.a.Fragment,null,a.a.createElement(ma.Email,{className:"authing-g2-input-form",name:"email",checkRepeat:!0,label:_.a.t("common.email"),required:e.required,key:"internal email:email13",validateFirst:!0},a.a.createElement(Zi.a,{className:"authing-g2-input",autoComplete:"email",size:"large",placeholder:T("login.inputEmail")})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"emailCode",key:"internal email:code1432",rules:e.required?ae(T("common.captchaCode")):void 0},a.a.createElement(ns,{className:"authing-g2-input g2-send-code-input",autoComplete:"one-time-code",size:"large",placeholder:T("common.inputFourVerifyCode",{length:c}),maxLength:c,data:"",scene:No.INFORMATION_COMPLETION_VERIFY_CODE,fieldName:"email",form:N,onSendCodeBefore:function(){return N.validateFields(["email"])}})))}}}),[x,E,N,b,T,c]),L=Object(i.useCallback)((function(e){var t,n,o=[],r="zh-CN"===_.a.language&&e.label||e.name,i=null!==(t=e.validateRules)&&void 0!==t?t:[],a=null!==(n=e.required)&&void 0!==n&&n;return e.required&&o.push({required:!0,message:"".concat(r," ").concat(T("login.noEmpty"))}),i.forEach((function(e){switch(e.type){case"isNumber":o.push({type:"number",required:a,message:e.errorMessage||"\u8bf7\u586b\u5199\u6570\u5b57"});break;case"regExp":o.push({required:a,pattern:new RegExp(e.content.replaceAll("/","")),message:e.errorMessage})}})),o}),[T]),R=Object(i.useCallback)((function(e){var t="zh-CN"===_.a.language&&e.label||e.name;if(Object.values(Ea).includes(e.type))return j[e.name]({required:e.required});var n=function(n){return a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",rules:L(e),key:e.name,name:e.name,label:t,style:{marginBottom:8}},n)};return Object.keys(I).includes(e.name)?n(I[e.name]({options:e.options,key:e.name})):Object.keys(I).includes(e.type)?n(I[e.type]({options:e.options,key:e.name})):n(a.a.createElement(Zi.a,{type:"text",className:"authing-g2-input",autoComplete:"off"}))}),[I,L,j]),M=Object(i.useMemo)((function(){return o.map((function(e){return R(e)}))}),[R,o]),F=Object(hi.a)(function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,i,a,s,c,d,p,m,f,g,v,y,C,w,O,P,N,A;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Object.keys(t).filter((function(e){return void 0!==t[e]&&""!==t[e]})),null===(n=u.current)||void 0===n||n.onSpin(!0),i=o.filter((function(e){return!["phoneCode","emailCode"].includes(e)})).map((function(e){var n={name:e,value:t[e]};if("phone"===e){if(b){var o=_i(b,t[e],E).countryCode;return Object(l.a)(Object(l.a)({},n),{},{code:t.phoneCode,phoneCountryCode:o})}return Object(l.a)(Object(l.a)({},n),{},{code:t.phoneCode})}return"email"===e?Object(l.a)(Object(l.a)({},n),{},{code:t.emailCode}):n})),e.prev=3,!o.includes("username")){e.next=13;break}return e.next=7,S("/api/v2/users/is-user-exists",{username:t.username});case 7:if(a=e.sent,s=a.data,200!==a.code||!s){e.next=13;break}return hr.a.error(T("common.userNameIsExists")),e.abrupt("return");case 13:if(!o.includes("phone")){e.next=26;break}return c={phone:t.phone,phoneCode:t.phoneCode},b&&(d=_i(b,t.phone,E),p=d.countryCode,c.phoneCountryCode=p),e.next=18,k("/api/v2/sms/preCheckCode",c);case 18:if(m=e.sent,f=m.statusCode,g=m.data,v=g.valid,y=g.message,200===f&&v){e.next=26;break}return hr.a.error(y),e.abrupt("return");case 26:if(!o.includes("email")){e.next=37;break}return e.next=29,k("/api/v2/email/preCheckCode",{email:t.email,emailCode:t.emailCode});case 29:if(C=e.sent,w=C.statusCode,O=C.data,P=O.valid,N=O.message,200===w&&P){e.next=37;break}return hr.a.error(N),e.abrupt("return");case 37:return e.next=39,null===r||void 0===r?void 0:r({fieldValues:i});case 39:e.next=43;break;case 41:e.prev=41,e.t0=e.catch(3);case 43:return e.prev=43,null===(A=u.current)||void 0===A||A.onSpin(!1),e.finish(43);case 46:case"end":return e.stop()}}),e,null,[[3,41,43,46]])})));return function(t){return e.apply(this,arguments)}}(),[E]),B=Object(d.a)(F,2)[1];return a.a.createElement(bi.a,{layout:"vertical",form:N,onFinish:B,onSubmitCapture:function(){return u.current.onSpin(!0)},onFinishFailed:function(){return u.current.onError()},className:"authing-g2-completeInfo-form authing-g2-form-required-item-icon-after"},M,a.a.createElement(bi.a.Item,{className:"authing-g2-input-form"},a.a.createElement(qi,{text:T("common.problem.form.submit"),ref:u,className:"password g2-completeInfo-submit"})))};n(714);!function(e){e.Complete="complete-completion",e.Skip="skip-completion"}(za||(za={}));var hs,ms=function(){var e=Object(m.a)(h.a.mark((function e(t,n){var o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=ri(),r=o.authFlow,e.next=3,r(t,n);case 3:return i=e.sent,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),fs=function(e,t,n){var o=lr(),r=ri().post;if("registerByEmail"===e){var i=n.phoneToken;return delete n.phoneToken,o.registerByEmail(t.email,t.password,Object(l.a)(Object(l.a)({},t.profile),n),Object(l.a)(Object(l.a)({},t.options),{},{phoneToken:i}))}if("registerByPhoneCode"===e){var a=null===n||void 0===n?void 0:n.emailToken;return null===n||void 0===n||delete n.emailToken,o.registerByPhoneCode(t.phone,t.code,t.password,Object(l.a)(Object(l.a)({},t.profile),n),Object(l.a)(Object(l.a)({},t.options),{},{emailToken:a}))}if("registerByEmailCode"===e){var s=n.phoneToken;return delete n.phoneToken,r("/api/v2/register/email-code",Object(l.a)(Object(l.a)({email:t.email,code:t.code,password:t.password,profile:Object(l.a)(Object(l.a)({},t.profile),n)},t.options),{},{phoneToken:s}))}},gs=function(e,t){var n=lr(),o=ri().post;return"registerByEmail"===e?n.registerByEmail(t.email,t.password,Object(l.a)({},t.profile),Object(l.a)({},t.options)):"registerByPhoneCode"===e?n.registerByPhoneCode(t.phone,t.code,t.password,Object(l.a)({},t.profile),Object(l.a)({},t.options)):"registerByEmailCode"===e?o("/api/v2/register/email-code",Object(l.a)({email:t.email,code:t.code,password:t.password,profile:Object(l.a)({},t.profile)},t.options)):void 0},vs=function(){var e=Object(m.a)(h.a.mark((function e(t,n,o,r){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==za.Skip){e.next=6;break}return e.next=3,gs(n,o);case 3:return e.abrupt("return",e.sent);case 6:if(t!==za.Complete){e.next=10;break}return e.next=9,fs(n,o,r);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)})));return function(t,n,o,r){return e.apply(this,arguments)}}(),bs=function(e,t){var n={udf:[]};return null===t||void 0===t||t.forEach((function(t){var o,r=t.name,i=t.value,a=t.code,s=null===(o=e.find((function(e){return e.name===r})))||void 0===o?void 0:o.type;"internal"===s?("phone"===r&&(n.phoneToken=a),"email"===r&&(n.emailToken=a),n[r]=i):"user"===s&&n.udf.push({key:r,value:i})})),n},ys=function(e){var t=e.metaData,n=e.businessRequest,o=e.skipComplateFileds,r=Ir(),s=Object(Ei.a)().t,c=Or().spinChange,u=Object(i.useState)(!1),l=Object(d.a)(u,2),p=l[0],f=l[1],g=function(){var e=Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),f(!0),e.next=4,n(za.Skip);case 4:f(!1),c(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",{className:"g2-view-container g2-complete-info"},a.a.createElement("div",{className:"g2-view-header"},a.a.createElement("div",{className:"g2-completeInfo-header"},a.a.createElement(Wi,{src:null===r||void 0===r?void 0:r.logo,size:48,borderRadius:4,alt:"",className:"icon"}),o&&a.a.createElement(Bi,{className:"g2-completeInfo-header-skip",type:"link",loading:p,onClick:function(){return g()}},!p&&a.a.createElement(oa,{type:"authing-a-share-forward-line1"}),a.a.createElement("span",null,s("common.skip")))),a.a.createElement("div",{className:"title"},s("common.perfectUserInfo")),a.a.createElement("div",{className:"title-explain"},s("common.welcomeDoc",{name:r.title}))),a.a.createElement("div",{className:"g2-view-tabs g2-completeInfo-content"},a.a.createElement(ps,{metaData:t,businessRequest:function(){var e=Object(m.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===n||void 0===n?void 0:n(za.Complete,t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()})))},Cs=function(){var e=Nr(),t=e.metaData,n=e.skip,o=Ar(),r=dr(),i=function(){var e=Object(m.a)(h.a.mark((function e(t,n){var i,a,s,c,u;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ms(t,n);case 2:i=e.sent,a=i.isFlowEnd,s=i.data,c=i.onGuardHandling,a?null===o||void 0===o||null===(u=o.onLogin)||void 0===u||u.call(o,s,r):null===c||void 0===c||c();case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return a.a.createElement(ys,{metaData:t,businessRequest:i,skipComplateFileds:n})},Es=function(){var e=Nr(),t=Sr(),n=kr().get,o=Ir(),r=Object(i.useState)(),s=Object(d.a)(r,2),c=s[0],u=s[1],l=Object(i.useState)(),p=Object(d.a)(l,2),f=p[0],g=p[1],v=Object(i.useMemo)((function(){return null===t||void 0===t?void 0:t.extendsFields.filter((function(t){return t.name!==Oa[e.businessRequestName]}))}),[e.businessRequestName,null===t||void 0===t?void 0:t.extendsFields]),b=null===t||void 0===t?void 0:t.skipComplateFileds,y=Object(i.useMemo)((function(){return o.loadingComponent}),[o.loadingComponent]),C=Object(i.useCallback)(Object(m.a)(h.a.mark((function e(){var t,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n("/api/v2/udfs/field-metadata-for-completion",void 0,{});case 2:t=e.sent,o=t.data,u(o);case 5:case"end":return e.stop()}}),e)}))),[n]),E=function(){var t=Object(m.a)(h.a.mark((function t(n,o){var r,i,a,s,c,u,l,d,p;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=bs(v,null===o||void 0===o?void 0:o.fieldValues),t.prev=1,t.next=4,vs(n,e.businessRequestName,e.content,r);case 4:if(i=t.sent,"registerByEmailCode"!==e.businessRequestName){t.next=8;break}return 200===i.code?e.onRegisterSuccess(i.data):(null===i||void 0===i||null===(a=i.onGuardHandling)||void 0===a||a.call(i),s=i.code,c=i.message,u=i.data,e.onRegisterFailed(s,u,c)),t.abrupt("return");case 8:i&&e.onRegisterSuccess(i.data),t.next=16;break;case 11:t.prev=11,t.t0=t.catch(1),l=t.t0.code,d=t.t0.message,p=t.t0.data,hr.a.error(d),e.onRegisterFailed(l,p,d);case 16:case"end":return t.stop()}}),t,null,[[1,11]])})));return function(e,n){return t.apply(this,arguments)}}();return Object(i.useEffect)((function(){C()}),[C]),Object(i.useEffect)((function(){if(c){var e=function(){var e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){var n;return{type:t.inputType,label:t.label,name:t.name,required:t.required,validateRules:t.validateRules,options:null===(n=e.find((function(e){return e.key===t.name})))||void 0===n?void 0:n.options}}))}(v,c);g(e)}}),[v,c]),a.a.createElement(a.a.Fragment,null,f?a.a.createElement(ys,{metaData:f,skipComplateFileds:b,businessRequest:E}):y)},ws=(n(158),n(49)),Os=n.n(ws);n(716);!function(e){e.IOS="ios",e.Android="Android"}(hs||(hs={}));var Ss,ks=function(){var e=Object(Ei.a)().t,t=Sr(),n=xr().backModule,o=null===t||void 0===t?void 0:t.cdnBase,r=Object(i.useMemo)((function(){var t;return t={},Object(g.a)(t,hs.IOS,{title:e("common.downloadTotpAppIOS"),google:"".concat(o,"/GoogleAuthenticator-Apple.png"),microsoft:"".concat(o,"/MicrosoftAuthenticator-Apple.png")}),Object(g.a)(t,hs.Android,{title:e("common.downloadTotpAppAndroid"),google:"".concat(o,"/GoogleAuthenticator-Authing.png"),microsoft:"".concat(o,"/MicrosoftAuthenticator-Baidu.png")}),t}),[o,e]),s=Object(i.useMemo)((function(){return Object.keys(r).map((function(t,n){return a.a.createElement(Os.a.TabPane,{tab:r[t].title,key:n,className:"g2-mfa-download-at-tab"},a.a.createElement("span",{className:"g2-mfa-totp-download-subtitle"},e("common.downloadTotpAppDocs")),a.a.createElement("div",{className:"g2-mfa-totp-download-qrcode"},a.a.createElement("div",{className:"g2-mfa-totp-download-qrcode-item"},a.a.createElement(Wi,{width:120,height:120,className:"g2-mfa-totp-download-image",src:r[t].google,alt:"Google Authenticator"}),a.a.createElement("span",{className:"g2-mfa-totp-download-qrcode-text"},"Google Authenticator")),a.a.createElement("div",{className:"g2-mfa-totp-download-qrcode-item"},a.a.createElement(Wi,{width:120,height:120,className:"g2-mfa-totp-download-image",src:r[t].microsoft,alt:"Microsoft Authenticator"}),a.a.createElement("span",{className:"g2-mfa-totp-download-qrcode-text"},"Microsoft Authenticator"))))}))}),[r,e]),c=Object(i.useMemo)((function(){return a.a.createElement(ia,{onBack:function(){return null===n||void 0===n?void 0:n()}},e("common.backToMFA"))}),[n,e]);return a.a.createElement("div",{className:"g2-view-container g2-download-authenticator"},c,a.a.createElement("div",{className:"g2-view-tabs g2-mfa-totp-download-tabs"},a.a.createElement(Os.a,{defaultActiveKey:hs.IOS},s)))},Ts=(n(722),function(e){var t=Nr(),n=Object(i.useMemo)((function(){var n,o,r=null!==(n=null===e||void 0===e?void 0:e.error)&&void 0!==n?n:null===t||void 0===t?void 0:t.error;return null!==(o="".concat(null===r||void 0===r?void 0:r.message))&&void 0!==o?o:"".concat(_.a.t("user.contactAdministrator"))}),[null===t||void 0===t?void 0:t.error,null===e||void 0===e?void 0:e.error]);return a.a.createElement("div",{className:"g2-view-container g2-view-error"},a.a.createElement("div",{className:"g2-error-content"},a.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{width:240,height:160,backgroundImage:"url(https://authing-files.oss-cn-zhangjiakou.aliyuncs.com/authing-guard/authing_error.svg)",backgroundSize:"contain"}})),a.a.createElement("div",{className:"g2-error-message"},_.a.t("user.error")),a.a.createElement("span",{className:"g2-error-message-text",dangerouslySetInnerHTML:{__html:n}})))}),Ps=["methods","areaCode","currentMethod","checkRepeat","checkExist"],Ns={"phone-code":"phone","email-code":"email"},As=function(e){var t,n=e.methods,o=e.areaCode,r=void 0===o?"CN":o,s=e.currentMethod,c=e.checkRepeat,u=e.checkExist,l=Object(C.a)(e,Ps),d=Sr(),p=Object(Ei.a)().t,g=kr().get,v=(null===(t=d.internationalSmsConfig)||void 0===t?void 0:t.enabled)&&"phone-code"===s,b=Object(i.useMemo)((function(){return"email-code"===s?{field:p("common.emailLabel"),checkRepeatErrorMessage:p("common.checkEmail"),checkExistErrorMessage:p("common.noFindEmail"),formatErrorMessage:p("login.inputCorrectPhone"),pattern:re.email}:{field:p("common.phone"),checkRepeatErrorMessage:p("common.checkPhone"),checkExistErrorMessage:p("common.noFindPhone"),formatErrorMessage:p("login.inputCorrectPhone"),pattern:re.phone}}),[s,p]),y=la((function(e,t,n){var o=e;"phone-code"===s&&v&&(o=_i(v,o,r).phoneNumber);g("/api/v2/users/find",{userPoolId:null===d||void 0===d?void 0:d.userPoolId,key:o,type:Ns[s]}).then((function(e){var o=e.data;u&&(Boolean(o)?t(!0):n(b.checkExistErrorMessage)),c&&(Boolean(o)?n(b.checkRepeatErrorMessage):t(!0))}))})),E=Object(i.useMemo)((function(){return v?{validateTrigger:"onBlur",validator:function(){var e=Object(m.a)(h.a.mark((function e(t,n){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&!Object(Ti.phone)(n,{country:r}).isValid&&!Object(Ti.phone)(n).isValid){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:return e.abrupt("return",Promise.reject(p("common.i18nCheckErrorMessage")));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}:{validateTrigger:"onBlur",pattern:b.pattern,message:b.formatErrorMessage}}),[r,v,b.formatErrorMessage,b.pattern,p]),w=Object(i.useMemo)((function(){var e=Object(f.a)(ae(p("common.phoneOrEmail")));return e.push(E),(c||u)&&e.push({validator:y,validateTrigger:[]}),e}),[p,E,c,u,y]),O=Object(i.useMemo)((function(){if(1!==n.length)return a.a.createElement(ca.a,Object(wi.a)({validateTrigger:["onBlur","onChange"],validateFirst:!0,rules:w},l));switch(s){case"phone-code":return a.a.createElement(ma.Phone,Object(wi.a)({},l,{areaCode:r,checkRepeat:c,checkExist:u}));case"email-code":return a.a.createElement(ma.Email,Object(wi.a)({},l,{checkRepeat:c,checkExist:u}))}}),[r,u,c,s,l,n.length,w]);return a.a.createElement(a.a.Fragment,null,O)},xs=["methods"],Is=function(e){var t=e.methods,n=Object(C.a)(e,xs),o=Sr(),r=Object(Ei.a)().t,s=Object(i.useMemo)((function(){var e;return{"email-code":{t:r("common.email"),sort:2},"phone-code":{t:null!==o&&void 0!==o&&null!==(e=o.internationalSmsConfig)&&void 0!==e&&e.enabled?r("common.areaCodePhone"):r("common.phoneNumber"),sort:1}}}),[o,r]),c=Object(i.useMemo)((function(){return r("login.inputAccount",{text:null===t||void 0===t?void 0:t.map((function(e){return s[e]})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.t})).join(" / ")})}),[t,r,s]),u=Object(i.useMemo)((function(){return 1===t.length&&"phone-code"===t[0]?a.a.createElement(Wa,Object(wi.a)({maxLength:11,placeholder:c},n)):a.a.createElement(Zi.a,Object(wi.a)({placeholder:c},n,{prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})}))}),[n,t,c]);return a.a.createElement(a.a.Fragment,null,u)};!function(e){e.email="email-code",e.phone="phone-code"}(Ss||(Ss={}));var js,_s,Ls,Rs,Ms=function(e){var t,n,o=Object(Ei.a)().t,r=bi.a.useForm(),s=Object(d.a)(r,1)[0],c=Object(i.useState)(""),u=Object(d.a)(c,2),l=u[0],p=u[1],g=Object(i.useState)("phone"),v=Object(d.a)(g,2),b=v[0],y=v[1],C=Object(i.useRef)(null),E=ji().isPhoneMedia,w=ri().post,O=dr(),S=Sr().publicKey,k=null!==(t=e.publicConfig.verifyCodeLength)&&void 0!==t?t:4,T=(null===(n=e.publicConfig.internationalSmsConfig)||void 0===n?void 0:n.enabled)||!1,P=ba(),N=P.getPassWordUnsafeText,A=P.setPasswordErrorTextShow,x=function(){var t=Object(m.a)(h.a.mark((function t(n){var o,r,i,a,s,c,u,l,d,p;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n.identify,a=n.code,s=n.password,c=new Promise((function(){})),t.next=6,null===(o=O.options)||void 0===o||null===(r=o.encryptFunction)||void 0===r?void 0:r.call(o,s,S);case 6:u=t.sent,"email"===b&&(c=w("/api/v2/users/password/reset",{email:i,code:a,newPassword:u})),"phone"===b&&(l=_i(T,i),d=l.phoneNumber,p=l.countryCode,c=w("/api/v2/users/password/reset",{phone:d,code:a,newPassword:u,phoneCountryCode:p})),c.then((function(t){t.code===Iu.UNSAFE_PASSWORD_TIP&&A(!0),e.onSend(b),e.onReset(t)})).catch((function(t){C.current.onError(),e.onSendError(b,t),e.onReset(t)}));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=Object(i.useCallback)((function(e){return a.a.createElement(a.a.Fragment,null,"phone"===b&&a.a.createElement(rs,Object(wi.a)({},e,{isInternationSms:T,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:o("common.inputFourVerifyCode",{length:k}),prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:bo.SCENE_TYPE_RESET,maxLength:k,data:l,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})),"email"===b&&a.a.createElement(ns,Object(wi.a)({},e,{className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:o("common.inputFourVerifyCode",{length:k}),prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:No.RESET_PASSWORD_VERIFY_CODE,maxLength:k,data:l,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})))}),[b,s,l,T,o,k]);return a.a.createElement("div",{className:"authing-g2-login-phone-code"},a.a.createElement(bi.a,{name:"resetPassword",form:s,onFinish:x,onFinishFailed:function(){var e;null===C||void 0===C||null===(e=C.current)||void 0===e||e.onError()},autoComplete:"off"},a.a.createElement(As,{name:"identify",className:"authing-g2-input-form",methods:["email-code","phone-code"],currentMethod:Ss[b],checkExist:!0},a.a.createElement(Is,{methods:["email-code","phone-code"],className:"authing-g2-input",autoComplete:"off",autoFocus:!E,size:"large",value:l,onChange:function(e){var t=e.target.value;p(t),ie("email",t)?y("email"):y("phone")},prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"code",rules:Object(f.a)(ae(o("common.captchaCode")))},a.a.createElement(I,null)),a.a.createElement(ma.Password,{className:"authing-g2-input-form",name:"password"},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:o("user.inputNewPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),N(),a.a.createElement(bi.a.Item,{className:"authing-g2-input-form submit-form"},a.a.createElement(qi,{className:"forget-password",text:o("common.confirm"),ref:C}))))},Fs=function(){var e=Object(Ei.a)().t,t=Ar(),n=Sr(),o=dr(),r=Ir(),i=xr().changeModule;return a.a.createElement("div",{className:"g2-view-container g2-forget-password"},a.a.createElement("div",{className:"g2-view-header"},a.a.createElement(Wi,{src:null===r||void 0===r?void 0:r.logo,size:48,borderRadius:4,alt:"",className:"icon"}),a.a.createElement("div",{className:"title"},e("login.resetPwd")),a.a.createElement("div",{className:"title-explain"},e("user.resetpasswordText1"))),a.a.createElement("div",{className:"g2-view-tabs"},a.a.createElement(Ms,{onReset:function(n){var r,a;if(200!==n.code)return null===t||void 0===t||null===(a=t.onPwdResetError)||void 0===a||a.call(t,n,o),void hr.a.error(n.message);null===t||void 0===t||null===(r=t.onPwdReset)||void 0===r||r.call(t,o);var s={title:e("common.resetSuccess"),message:e("common.resetSuccessMessage")};null===i||void 0===i||i(_e.SUBMIT_SUCCESS,Object(l.a)({},s))},publicConfig:n,onSend:function(e){var n,r;"phone"===e&&(null===t||void 0===t||null===(n=t.onPwdPhoneSend)||void 0===n||n.call(t,o)),"email"===e&&(null===t||void 0===t||null===(r=t.onPwdEmailSend)||void 0===r||r.call(t,o))},onSendError:function(e,n){var r,i;"phone"===e&&(null===t||void 0===t||null===(r=t.onPwdPhoneSendError)||void 0===r||r.call(t,n,o)),"email"===e&&(null===t||void 0===t||null===(i=t.onPwdEmailSendError)||void 0===i||i.call(t,n,o))}})),a.a.createElement("div",{className:"g2-tips-line"},a.a.createElement("div",{className:"link-like back-to-login",onClick:function(){return null===i||void 0===i?void 0:i(_e.LOGIN)}},e("common.backLoginPage"))))},Bs=(n(330),n(219)),Ds=n.n(Bs),qs=n(228),Us=n.n(qs),Vs=["passwordLoginMethods"],Hs=function(e){var t=e.passwordLoginMethods,n=Object(C.a)(e,Vs),o=Object(Ei.a)().t,r=Object(i.useMemo)((function(){if(1!==t.length)return a.a.createElement(ca.a,Object(wi.a)({validateTrigger:["onBlur","onChange"],rules:ae(o("common.account"))},n));switch(t[0]){case"phone-password":return a.a.createElement(ma.Phone,Object(wi.a)({},n,{isCheckI18nSms:!1}));case"email-password":return a.a.createElement(ma.Email,n);case"username-password":return a.a.createElement(ma.UserName,n)}}),[n,t,o]);return a.a.createElement(a.a.Fragment,null,r)},zs=["passwordLoginMethods"],Gs=function(e){var t=e.passwordLoginMethods,n=Object(C.a)(e,zs),o=Object(Ei.a)().t,r=Object(i.useMemo)((function(){return{"email-password":{t:o("common.email"),sort:1},"phone-password":{t:o("common.phoneNumber"),sort:0},"username-password":{t:o("common.username"),sort:2}}}),[o]),s=Object(i.useMemo)((function(){return o("login.inputAccount",{text:null===t||void 0===t?void 0:t.map((function(e){return r[e]})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.t})).join(" / ")})}),[r,t,o]),c=Object(i.useMemo)((function(){return 1===t.length&&"phone-password"===t[0]?a.a.createElement(Wa,Object(wi.a)({maxLength:11,placeholder:s},n)):a.a.createElement(Zi.a,Object(wi.a)({placeholder:s},n))}),[n,t,s]);return a.a.createElement(a.a.Fragment,null,c)},Ws=["verifyCodeUrl","changeCode"],Ks=function(e){var t=e.verifyCodeUrl,n=e.changeCode,o=Object(C.a)(e,Ws),r=Object(Ei.a)().t;return a.a.createElement("div",{className:"g2-graphic-verify-code"},a.a.createElement(Zi.a,o),a.a.createElement(Wi,{className:"g2-captcha-code-image",src:t,alt:r("login.captchaCode"),height:"46px",style:{cursor:"pointer"},onClick:function(){return n()}}))},$s=(n(134),n(62)),Ys=n.n($s),Qs=(n(735),function(e){var t=e.showError,n=e.onChange,o=void 0===n?function(){}:n,r=e.style,s=e.agreements,c=Object(i.useState)([]),u=Object(d.a)(c,2),p=u[0],h=u[1],m=Object(i.useMemo)((function(){return s.filter((function(e){return e.required})).every((function(e){return p.includes(e.id)}))}),[p,s]);return Object(i.useEffect)((function(){o(m)}),[m,o]),a.a.createElement("div",{className:de(["authing-agreements",t&&"authing-agreements-error"])},s.map((function(e){return a.a.createElement("div",{key:e.id,style:Object(l.a)({},r),className:de(["authing-agreements-item",e.required&&!p.includes(e.id)&&"authing-agreements-item-invalid"]),onClick:function(t){var n;t.persist(),"A"!==t.target.nodeName&&(n=e.id,h((function(e){return e.includes(n)?e.filter((function(e){return e!==n})):[].concat(Object(f.a)(e),[n])})))}},a.a.createElement(Ys.a,{align:"start",size:5},a.a.createElement(gi.a,{className:"authing-agreements-checkbox",checked:p.includes(e.id)}),a.a.createElement("div",{className:"authing-agreements-item-content",dangerouslySetInnerHTML:{__html:e.title}})))})))}),Js=function(e){var t=e.agreements,n=e.onLoginFailed,o=e.onLoginSuccess,r=e.saveIdentify,s=Nr(),c=s._firstItemInitialValue,u=void 0===c?"":c,l=s.specifyDefaultLoginMethod,p=Object(i.useState)(!1),f=Object(d.a)(p,2),g=f[0],v=f[1],b=ji().isPhoneMedia,y=Object(i.useState)(!1),C=Object(d.a)(y,2),E=C[0],w=C[1],O=Object(Ei.a)().t,S=ii().post,k=dr(),T=Sr(),N=Object(i.useRef)(null),A=Object(i.useState)(!1),x=Object(d.a)(A,2),I=x[0],j=x[1],_=Object(i.useState)(""),L=Object(d.a)(_,2),R=L[0],M=L[1],F=Object(i.useState)(0),B=Object(d.a)(F,2),D=B[0],q=B[1],U=Object(i.useState)(!1),V=Object(d.a)(U,2),H=V[0],z=V[1],G=function(){var t=new URL(e.host);return t.pathname="/api/v2/security/captcha",t.search="?r=".concat(+new Date),t.href},W=k.options.encryptFunction,K=Object(i.useCallback)(function(){var t=Object(m.a)(h.a.mark((function t(n){var o,r,i,a,s,c,u,l;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.onLoginRequest){t.next=5;break}return t.next=3,e.onLoginRequest(n);case 3:return o=t.sent,t.abrupt("return",o);case 5:return r=n.data,i=null!==T&&void 0!==T&&T.mergeAdAndAccountPasswordLogin?"/api/v2/login/ad-all-in-one":"/api/v2/login/account",a=r.identity&&r.identity.trim(),s=r.password&&r.password.trim(),c=r.captchaCode&&r.captchaCode.trim(),t.t0=a,t.next=13,W(s,e.publicKey);case 13:return t.t1=t.sent,t.t2=c,t.t3=he(),t.t4=e.autoRegister,u={account:t.t0,password:t.t1,captchaCode:t.t2,customData:t.t3,autoRegister:t.t4,withCustomData:!0},t.next=20,S(i,u);case 20:return l=t.sent,t.abrupt("return",l);case 22:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[W,S,e,T.mergeAdAndAccountPasswordLogin]),$=function(){var n=Object(m.a)(h.a.mark((function n(o){var r,i,a,s,c;return h.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(w(!0),null===t||void 0===t||!t.length||g){n.next=4;break}return N.current.onError(),n.abrupt("return");case 4:return q(0),null===N||void 0===N||null===(r=N.current)||void 0===r||r.onSpin(!0),a={type:P.Password,data:{identity:o.account,password:o.password,captchaCode:o.captchaCode}},n.next=9,null===(i=e.onBeforeLogin)||void 0===i?void 0:i.call(e,a);case 9:if(n.sent||!e.onBeforeLogin){n.next=13;break}return null===N||void 0===N||null===(s=N.current)||void 0===s||s.onSpin(!1),n.abrupt("return");case 13:return n.next=15,K(a);case 15:c=n.sent,Y(c);case 17:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),Y=function(e){var t,r=e.code,i=e.apiCode,a=e.message,s=e.data,c=e.onGuardHandling;if(null===N||void 0===N||null===(t=N.current)||void 0===t||t.onSpin(!1),200===r)o(s,a);else{var u,l,d;if(i===ni.INPUT_CAPTCHACODE&&(M(G()),j(!0)),i===ni.PASSWORD_ERROR)if(null!==(u=null===s||void 0===s?void 0:s.remainCount)&&void 0!==u&&u)return q(null!==(l=null===s||void 0===s?void 0:s.remainCount)&&void 0!==l?l:0),null===N||void 0===N||null===(d=N.current)||void 0===d||d.onSpin(!1),void(null===n||void 0===n||n(9999,s,a));i!==ni.ACCOUNT_LOCK&&i!==ni.MULTIPLE_ERROR_LOCK||z(!0),(null===c||void 0===c?void 0:c())===xu.RENDER_MESSAGE&&(null===n||void 0===n||n(r,s,a))}};Object(i.useEffect)((function(){q(0),z(!1)}),[e.loginWay]);var Q=Object(i.useMemo)((function(){return e.submitButText?e.submitButText:e.autoRegister?"".concat(O("common.login")," / ").concat(O("common.register")):O("common.login")}),[e,O]);return a.a.createElement("div",{className:"authing-g2-login-password"},a.a.createElement(bi.a,{name:"passworLogin",onFinish:$,onFinishFailed:function(){return N.current.onError()},autoComplete:"off",onValuesChange:function(e){null!==e&&void 0!==e&&e.account&&r&&r(P.Password,null===e||void 0===e?void 0:e.account)}},a.a.createElement(Hs,{name:"account",className:"authing-g2-input-form",passwordLoginMethods:e.passwordLoginMethods,initialValue:l===P.Password?u:""},a.a.createElement(Gs,{className:"authing-g2-input",autoComplete:"off",size:"large",autoFocus:!b,prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}}),passwordLoginMethods:e.passwordLoginMethods})),a.a.createElement(bi.a.Item,{name:"password",validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",rules:ae(O("common.password"))},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:O("login.inputLoginPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),I&&a.a.createElement(bi.a.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:ae(O("common.captchaCode"))},a.a.createElement(Ks,{className:"authing-g2-input",size:"large",placeholder:O("login.inputCaptchaCode"),verifyCodeUrl:R,changeCode:function(){return M(G())}})),0!==D&&!H&&a.a.createElement("span",{style:{marginBottom:23,fontSize:12,color:"#E8353E",display:"block"}},O("common.loginFailCheck",{number:D})),H&&a.a.createElement("span",{style:{marginBottom:23,fontSize:12,color:"#E8353E",display:"block"}},O("common.accountLock")),Boolean(null===t||void 0===t?void 0:t.length)&&a.a.createElement(Qs,{onChange:v,agreements:t,showError:E}),a.a.createElement(bi.a.Item,null,a.a.createElement(qi,{text:Q,className:"password",ref:N}))))},Zs=function(e){var t=e.agreements,n=e.onLoginSuccess,o=e.onLoginFailed,r=Object(i.useState)(!1),s=Object(d.a)(r,2),c=s[0],u=s[1],l=ji().isPhoneMedia,p=Object(i.useState)(!1),f=Object(d.a)(p,2),g=f[0],v=f[1],b=kr().post,y=Object(Ei.a)().t,C=Object(i.useRef)(null),E=Object(i.useState)(!1),w=Object(d.a)(E,2),O=w[0],S=w[1],k=Object(i.useState)(""),T=Object(d.a)(k,2),N=T[0],A=T[1],x="".concat(e.host,"/api/v2/security/captcha"),I=function(){return"".concat(x,"?r=").concat(+new Date)},j=function(){var r=Object(m.a)(h.a.mark((function r(i){var a,s,u,l,d,p,m,f,g,E,w;return h.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(v(!0),null===t||void 0===t||!t.length||c){r.next=4;break}return null===(s=C.current)||void 0===s||s.onError(),r.abrupt("return");case 4:return null===(a=C.current)||void 0===a||a.onSpin(!0),u={type:P.LDAP,data:{identity:i.account,password:i.password,captchaCode:i.captchaCode}},r.next=8,e.onBeforeLogin(u);case 8:if(r.sent){r.next=12;break}return null===(l=C.current)||void 0===l||l.onSpin(!1),r.abrupt("return");case 12:return d=i.account&&i.account.trim(),p=i.password&&i.password.trim(),r.prev=14,r.next=17,b("/api/v2/ldap/verify-user",{username:d,password:p});case 17:m=r.sent,f=m.code,g=m.data,E=m.onGuardHandling,C.current.onSpin(!1),200===f?n(g):(f===ni.INPUT_CAPTCHACODE&&(A(I()),S(!0)),(null===E||void 0===E?void 0:E())===xu.RENDER_MESSAGE&&o(f,g)),r.next=29;break;case 25:r.prev=25,r.t0=r.catch(14),null===(w=C.current)||void 0===w||w.onSpin(!1),"ECONNABORTED"===r.t0.code?(hr.a.error(y("common.timeoutLDAP")),o(2333,{})):console.log(r.t0);case 29:case"end":return r.stop()}}),r,null,[[14,25]])})));return function(e){return r.apply(this,arguments)}}();return a.a.createElement("div",{className:"authing-g2-login-ldap"},a.a.createElement(bi.a,{name:"passworLogin",onFinish:j,onFinishFailed:function(){var e;return null===(e=C.current)||void 0===e?void 0:e.onError()},autoComplete:"off"},a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"account",rules:ae(y("common.account"))},a.a.createElement(Zi.a,{autoFocus:!l,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:y("login.inputLdapUsername"),prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password",rules:ae(y("common.password"))},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:y("login.inputLdapPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),O&&a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"captchaCode",rules:[{required:!0,message:y("login.inputCaptchaCode")}]},a.a.createElement(Zi.a,{className:"authing-g2-input add-after",size:"large",placeholder:y("login.inputCaptchaCode"),addonAfter:a.a.createElement("img",{className:"g2-captcha-code-image",src:N,alt:y("login.captchaCode"),style:{height:"2em",cursor:"pointer"},onClick:function(){return A(I())}})})),Boolean(null===t||void 0===t?void 0:t.length)&&a.a.createElement(Qs,{onChange:u,agreements:t,showError:g}),a.a.createElement(bi.a.Item,null,a.a.createElement(qi,{text:y("common.login"),className:"password",ref:C}))))},Xs=function(e){var t=e.agreements,n=e.onLoginFailed,o=e.onLoginSuccess,r=Object(i.useState)(!1),s=Object(d.a)(r,2),c=s[0],u=s[1],l=Object(i.useState)(!1),p=Object(d.a)(l,2),f=p[0],v=p[1],b=Sr(),y=Ir().host,C=Tr(),E=kr().responseIntercept,w=Object(Ei.a)().t,O=ji().isPhoneMedia,S=Object(i.useRef)(null),k=function(){var r=Object(m.a)(h.a.mark((function r(i){var a,s,u,l,d,p,m,f,O,k,T,P,N,A,x,I;return h.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(v(!0),null===t||void 0===t||!t.length||c){r.next=4;break}return null===(s=S.current)||void 0===s||s.onError(),r.abrupt("return");case 4:return null===(a=S.current)||void 0===a||a.onSpin(!0),u={type:go.AD,data:{identity:i.account,password:i.password}},r.next=8,e.onBeforeLogin(u);case 8:if(r.sent){r.next=12;break}return null===(l=S.current)||void 0===l||l.onSpin(!1),r.abrupt("return");case 12:return d=i.account&&i.account.trim(),p=i.password&&i.password.trim(),r.prev=14,O="".concat(y,"/api/v2/ad/verify-user"),r.next=18,fetch(O,{method:"POST",body:JSON.stringify({username:d,password:p}),credentials:"include",headers:(m={"Content-Type":"application/json"},Object(g.a)(m,Qr.langHeader,_.a.language),Object(g.a)(m,"x-authing-userpool-id",b.userPoolId),Object(g.a)(m,"x-authing-app-id",C),Object(g.a)(m,"x-authing-sdk-version",sr),Object(g.a)(m,"x-authing-request-from","Guard@".concat(sr)),m)});case 18:return k=r.sent,r.next=21,k.json();case 21:T=r.sent,P=E(T),N=P.code,A=P.data,x=P.onGuardHandling,null===(f=S.current)||void 0===f||f.onSpin(!1),200===N?o(A):(null===x||void 0===x?void 0:x())===xu.RENDER_MESSAGE&&n(N,A),r.next=31;break;case 27:r.prev=27,r.t0=r.catch(14),null===(I=S.current)||void 0===I||I.onSpin(!1),"ECONNABORTED"===r.t0.code?(hr.a.error(w("common.timeoutAD")),n(2333,{})):console.log(r.t0);case 31:case"end":return r.stop()}}),r,null,[[14,27]])})));return function(e){return r.apply(this,arguments)}}();return a.a.createElement("div",{className:"authing-g2-login-ad"},a.a.createElement(bi.a,{name:"adLogin",onFinish:k,onFinishFailed:function(){return S.current.onError()},autoComplete:"off"},(null===b||void 0===b?void 0:b.ssoPageComponentDisplay.userPasswordInput)&&a.a.createElement(a.a.Fragment,null,a.a.createElement(bi.a.Item,{className:"authing-g2-input-form",name:"account",validateTrigger:["onBlur","onChange"],rules:ae(w("common.account"))},a.a.createElement(Zi.a,{autoFocus:!O,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:null!==b&&void 0!==b&&b.mergeAdAndAccountPasswordLogin?w("login.inputUsername"):w("login.inputAdUsername"),prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password",rules:ae(w("common.password"))},a.a.createElement(va,{autoComplete:"off",className:"authing-g2-input",size:"large",placeholder:null!==b&&void 0!==b&&b.mergeAdAndAccountPasswordLogin?w("login.inputPwd"):w("login.inputAdPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),Boolean(null===t||void 0===t?void 0:t.length)&&a.a.createElement(Qs,{onChange:u,agreements:t,showError:f}),a.a.createElement(bi.a.Item,null,a.a.createElement(qi,{text:w("common.login"),className:"password",ref:S})))))},ec=function(e){var t=Object(i.useRef)(),n=dr(),o=Object(i.useState)(!0),r=Object(d.a)(o,2),s=r[0],c=r[1],u=n.qrcode,p=kr().responseIntercept,h=Ir();return Object(i.useEffect)((function(){var n=G();if(n&&(null===h||void 0===h||!h._qrCodeScanOptions)){var o=n.document;return e.canLoop?(c(!0),u.startScanning("authingGuardAppQrcode",Object(l.a)(Object(l.a)({currentDocument:o,autoExchangeUserInfo:!0},e.qrCodeScanOptions),{},{onCodeShow:function(){c(!1)},onStart:function(e){t.current=e},onSuccess:function(n){clearInterval(t.current),e.onLoginSuccess(n)},onError:function(e){e&&hr.a.error(e)},onCodeLoadFailed:function(e){var t=e.message;hr.a.error(JSON.parse(t).message),c(!1)},onRetry:function(){c(!0)},onAuthFlow:function(e){clearInterval(t.current);var n=p(e).onGuardHandling;null===n||void 0===n||n()}})),function(){return clearInterval(t.current)}):function(){return clearInterval(t.current)}}}),[u,e.canLoop]),a.a.createElement("div",{className:"authing-g2-login-app-qrcode"},h._qrCodeScanOptions?a.a.createElement("div",{className:"qrcode"},a.a.createElement("img",{src:h._qrCodeScanOptions.appQrcode.qrcode,alt:""}),a.a.createElement("span",null,e.qrCodeScanOptions.tips.title)):a.a.createElement(a.a.Fragment,null,s&&a.a.createElement(qr,null),a.a.createElement("div",{id:"authingGuardAppQrcode"})))},tc=function(e){var t=Object(i.useRef)(),n=dr(),o=Object(i.useState)(!0),r=Object(d.a)(o,2),s=r[0],c=r[1],u=n.wxqrcode,p=kr().responseIntercept,h=Ir(),m="authingGuardMiniQrcode-".concat(e.qrCodeScanOptions.extIdpConnId);return Object(i.useEffect)((function(){var n=G();if(n&&!h._qrCodeScanOptions){var o=n.document;return e.canLoop?(c(!0),u.startScanning(m,Object(l.a)(Object(l.a)({currentDocument:o,autoExchangeUserInfo:!0},e.qrCodeScanOptions),{},{onCodeShow:function(){c(!1)},onStart:function(e){t.current=e},onSuccess:function(n){clearInterval(t.current),e.onLoginSuccess(n)},onError:function(e){e&&hr.a.error(e)},onCodeLoadFailed:function(e){var t=e.message;hr.a.error(JSON.parse(t).message),c(!1)},onRetry:function(){c(!0)},onAuthFlow:function(e){clearInterval(t.current);var n=p(e).onGuardHandling;null===n||void 0===n||n()}})),function(){return clearInterval(t.current)}):function(){return clearInterval(t.current)}}}),[u,e.canLoop]),a.a.createElement("div",{className:"authing-g2-login-app-qrcode"},h._qrCodeScanOptions?a.a.createElement("div",{className:"qrcode"},a.a.createElement("img",{src:h._qrCodeScanOptions.wechatMiniQrcode.qrcode,alt:""}),a.a.createElement("span",null,e.qrCodeScanOptions.tips.title)):a.a.createElement(a.a.Fragment,null,s&&a.a.createElement(qr,null),a.a.createElement("div",{id:m})))},nc=function(e){var t=Object(i.useRef)(),n=dr(),o=kr().responseIntercept,r=Object(i.useState)(!0),s=Object(d.a)(r,2),c=s[0],u=s[1],p=n.wechatmpqrcode,h="authingGuardMpQrcode-".concat(e.qrCodeScanOptions.extIdpConnId),m=Ir();return Object(i.useEffect)((function(){var n=G();if(n&&!m._qrCodeScanOptions){var r=n.document;return e.canLoop?(u(!0),p.startScanning(h,Object(l.a)(Object(l.a)({currentDocument:r,autoExchangeUserInfo:!0},e.qrCodeScanOptions),{},{onCodeShow:function(){u(!1)},onStart:function(e){t.current=e},onSuccess:function(n){e.onLoginSuccess(n),clearInterval(t.current)},onError:function(e){e&&hr.a.error(e)},onCodeLoadFailed:function(e){var t=e.message;hr.a.error(JSON.parse(t).message),u(!1)},onRetry:function(){u(!0)},onAuthFlow:function(e){clearInterval(t.current);var n=o(e).onGuardHandling;null===n||void 0===n||n()}})),function(){return clearInterval(t.current)}):function(){return clearInterval(t.current)}}}),[p,e.canLoop]),a.a.createElement("div",{className:"authing-g2-login-app-qrcode"},m._qrCodeScanOptions?a.a.createElement("div",{className:"qrcode"},a.a.createElement("img",{src:m._qrCodeScanOptions.wechatmpQrcode.qrcode,alt:""}),a.a.createElement("span",null,e.qrCodeScanOptions.tips.title)):a.a.createElement(a.a.Fragment,null,c&&a.a.createElement(qr,null),a.a.createElement("div",{id:h})))},oc=(js={},Object(g.a)(js,ni.APP_MFA_CODE,{action:"changeModule",module:_e.MFA}),Object(g.a)(js,ni.OTP_MFA_CODE,{action:"changeModule",module:_e.MFA,initData:{current:Ui.TOTP,totpMfaEnabled:!0}}),Object(g.a)(js,ni.INPUT_CAPTCHACODE,{action:"message"}),Object(g.a)(js,500,{action:"message"}),Object(g.a)(js,1002,{action:"message"}),Object(g.a)(js,2820002,{action:"message"}),Object(g.a)(js,2333,{action:"message"}),Object(g.a)(js,2057,{action:"accountLock"}),Object(g.a)(js,2005,{action:"accountLock"}),Object(g.a)(js,2042,{action:"message"}),Object(g.a)(js,2001,{action:"message"}),Object(g.a)(js,1576,{action:"message"}),Object(g.a)(js,2029,{action:"message"}),Object(g.a)(js,3720001,{action:"message"}),Object(g.a)(js,3720002,{action:"message"}),Object(g.a)(js,3720003,{action:"message"}),Object(g.a)(js,2130010,{action:"message"}),Object(g.a)(js,2120008,{action:"message"}),Object(g.a)(js,2031,{action:"message"}),Object(g.a)(js,1640,{action:"changeModule",module:_e.IDENTITY_BINDING}),Object(g.a)(js,1641,{action:"changeModule",module:_e.IDENTITY_BINDING_ASK}),Object(g.a)(js,1642,{action:"changeModule",module:_e.LOGIN_COMPLETE_INFO}),Object(g.a)(js,408,{action:"message"}),js),rc=n(229),ic=n.n(rc),ac=(n(741),n(213),n(78)),sc=n.n(ac),cc=(_s={},Object(g.a)(_s,ho.OIDC,"/connections/oidc/init"),Object(g.a)(_s,ho.SAML,"/connections/saml/init"),Object(g.a)(_s,ho.CAS,"/connections/cas/init"),Object(g.a)(_s,ho.OAUTH,"/connections/oauth2/init"),Object(g.a)(_s,ho.AZURE_AD,"/connections/azure-ad/init"),_s),uc=(Ls={},Object(g.a)(Ls,ho.OIDC,"oidcConnectionLoginUrl"),Object(g.a)(Ls,ho.SAML,"samlRequest"),Object(g.a)(Ls,ho.CAS,"casConnectionLoginUrl"),Object(g.a)(Ls,ho.OAUTH,"authUrl"),Object(g.a)(Ls,ho.AZURE_AD,"authorizationUrl"),Ls),lc=function(e){var t=e.i,n=e.appId,o=e.appHost,r=e.isHost,s=Object(Ei.a)().t,c=Pr();return Object(i.useCallback)((function(){var e,i=Object(l.a)({from_guard:"1",app_id:n,guard_version:"Guard@".concat(sr)},c&&{tenant_id:c});if(r&&(delete i.from_guard,i.from_hosted_guard="1",ve())){i.redirected="1";var u,d=G();if(d)i.redirect_url=null===(u=b.a.parse(d.location.search))||void 0===u?void 0:u.finish_login_url}if(null!==t&&void 0!==t&&t.provider){var p="authing-".concat(t.provider.replace(/:/g,"-"));return a.a.createElement(Bi,{key:t.identifier,className:"g2-guard-third-login-btn",block:!0,size:"large",icon:a.a.createElement(oa,{type:"".concat(p,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:function(){var e,n;if(t.action===Ii.Message)hr.a.error(s("login.socialConnectionMessage",{provider:null!==(e=null!==(n=t.displayName)&&void 0!==n?n:"zh-CN"===_.a.language?t.name:t.name_en)&&void 0!==e?e:t.provider}));else if(t.action===Ii.Auth){var r="".concat(o,"/connections/social/").concat(t.identifier,"?").concat(b.a.stringify(i));i.redirected?window.location.replace(r):oe(r)}}},s("login.loginBy",{name:t.displayName}))}if(r){i.identifier=t.identifier;var h=cc[t.protocol];if(!h)return null;e="".concat(o).concat(h,"?").concat(b.a.stringify(i))}else{var m=uc[t.protocol];if(!m)return null;e=t.config[m]}return a.a.createElement(Bi,{key:t.identifier,className:"g2-guard-third-login-btn",block:!0,size:"large",icon:a.a.createElement(sc.a,{size:20,src:t.logo,style:{marginRight:8}}),onClick:function(){i.redirected?window.location.replace(e):oe(e)}},s("login.loginBy",{name:t.displayName}))}),[n,t,s,r,o,c])()},dc=function(e){var t,n=e.appId,o=e.config,r=e.onLoginFailed,s=e.onLoginSuccess,c=e.enterpriseConnectionObjs,u=e.socialConnectionObjs,l=!(null!==o&&void 0!==o&&null!==(t=o.loginMethods)&&void 0!==t&&t.length),d=Sr(),p=null===d||void 0===d?void 0:d.userPoolId,h=Object(Ei.a)().t,m=ji().isPhoneMedia,f=function(){var e=kr().responseIntercept;return function(t){var n=t.data,o=n.message,r=n.data,i=n.event,a=n.code;if("authing"===(i||{}).source){if(200===a)return{code:a,data:r,onGuardHandling:void 0};var s;try{s=JSON.parse(o)}catch(f){return console.error("Json parse error in postMessage"),void console.error("message: ".concat(o,", code: ").concat(a))}var c=s,u=c.code,l=c.statusCode,d=c.apiCode,p=c.message,h=c.data,m=c.flowHandle;return e({statusCode:l,apiCode:d,data:h,message:p,code:u,flowHandle:m})}}}(),g=Pr();Object(i.useEffect)((function(){var e=function(e){var t=f(e);if(t){var n=t.code,o=t.data,i=t.onGuardHandling;if(200===n)s(o);else(null===i||void 0===i?void 0:i())===xu.RENDER_MESSAGE&&r(n,o)}},t=G();return null===t||void 0===t||t.addEventListener("message",e),function(){null===t||void 0===t||t.removeEventListener("message",e)}}),[r,s,f]);var v=c.map((function(e){return a.a.createElement(lc,{key:e.identifier,i:e,appId:n,appHost:null===o||void 0===o?void 0:o.host,userPoolId:p,isHost:null===o||void 0===o?void 0:o.isHost})})),b=u.map((function(e){var t="authing-".concat(e.provider.replace(/:/g,"-")),r={from_guard:"1",app_id:n,guard_version:"Guard@".concat(sr)};if(g&&(r.tenant_id=g),null!==o&&void 0!==o&&o.isHost&&(r.from_hosted_guard="1",ve())){r.redirected="1";var i,s=G();if(s)r.redirect_url=null===(i=ic.a.parse(s.location.search))||void 0===i?void 0:i.finish_login_url}var c,u,d,p,f,v,b=function(){var t,n;if(e.action===Ii.Message)hr.a.error(h("login.socialConnectionMessage",{provider:null!==(t=null!==(n=e.displayName)&&void 0!==n?n:"zh-CN"===_.a.language?e.name:e.name_en)&&void 0!==t?t:e.provider}));else if(e.action===Ii.Auth){var i="".concat(o.host,"/connections/social/").concat(e.identifier,"?").concat(ic.a.stringify(r));r.redirected?window.location.replace(i):oe(i)}},y=o.socialConnectionsBtnShape;return"button"===y?a.a.createElement(Bi,{key:e.id,block:!0,size:"large",className:"g2-guard-third-login-btn",icon:a.a.createElement(oa,{type:"".concat(t,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:b,style:{marginBottom:8}},null!==(c=null!==(u=e.displayName)&&void 0!==u?u:"zh-CN"===_.a.language?e.name:e.name_en)&&void 0!==c?c:e.provider):"icon"===y?m?a.a.createElement(Bi,{className:"g2-social-login-item",onClick:b},a.a.createElement(oa,{type:"".concat(t,"-fill")})):a.a.createElement(as.a,{key:e.id,title:(null===(d=e.tooltip)||void 0===d?void 0:d[_.a.language])||e.name,trigger:["hover","click","contextMenu"]},a.a.createElement(Bi,{className:"g2-social-login-item",onClick:b},a.a.createElement(oa,{type:"".concat(t,"-fill")}))):l?a.a.createElement(Bi,{key:e.id,block:!0,size:"large",className:"g2-guard-third-login-btn",icon:a.a.createElement(oa,{type:"".concat(t,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:b},null!==(p=null!==(f=e.displayName)&&void 0!==f?f:"zh-CN"===_.a.language?e.name:e.name_en)&&void 0!==p?p:e.provider):m?a.a.createElement(Bi,{className:"g2-social-login-item",onClick:b,key:e.id},a.a.createElement(oa,{type:"".concat(t,"-fill")})):a.a.createElement(as.a,{overlayStyle:{fontFamily:"sans-serif"},key:e.id,title:e.displayName||(null===(v=e.tooltip)||void 0===v?void 0:v[_.a.language])||e.name,trigger:["hover","click","contextMenu"]},a.a.createElement(Bi,{className:"g2-social-login-item",onClick:b},a.a.createElement(oa,{type:"".concat(t,"-fill")})))})),y=c.length?a.a.createElement(a.a.Fragment,null,!l&&a.a.createElement("div",{className:"g2-social-login-title"},_.a.t("login.otherLoginWay")),a.a.createElement("div",{className:"g2-social-login-list"},v)):null,C=b.length>0&&l?a.a.createElement(Ys.a,{size:l?0:12,className:"g2-guard-full-width-space no-login-methods",direction:"vertical"},b):b.length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"g2-social-login-title"},h("login.thridAccLogin")),a.a.createElement("div",{className:"g2-social-login-list"},b));return a.a.createElement(a.a.Fragment,null,!l&&a.a.createElement("div",{style:{flex:1,minHeight:32}}),a.a.createElement(Ys.a,{size:l?0:12,direction:"vertical",className:"g2-guard-full-width-space"},!(null!==d&&void 0!==d&&d.ssoPageComponentDisplay.idpBtns)||y,!(null!==d&&void 0!==d&&d.ssoPageComponentDisplay.socialLoginBtns)||C))},pc=function(e){var t,n=Object(Ei.a)().i18n,o=Object(i.useContext)(Er).guardPageConfig;if(e.langRange.length<=1||null===o||void 0===o||null===(t=o.global)||void 0===t||!t.showChangeLanguage)return null;var r="English";return"en-US"===n.language&&(r="\u7b80\u4f53\u4e2d\u6587"),a.a.createElement("div",{className:"g2-change-language-container"},a.a.createElement("span",{className:"g2-change-language-button",onClick:function(){var t;if("zh-CN"===n.language)null===(t=e.onLangChange)||void 0===t||t.call(e,"en-US"),$("en-US");else if("en-US"===n.language){var o;null===(o=e.onLangChange)||void 0===o||o.call(e,"zh-CN"),$("zh-CN")}}},a.a.createElement(oa,{style:{fontSize:16},type:"zh-CN"===n.language?"authing-a-yingwen1":"authing-zhongwen"}),a.a.createElement("span",{className:"g2-change-language-text"},r)))},hc=(n(745),function(e){var t,n,o,r=Sr(),s=Nr(),c=s._firstItemInitialValue,u=void 0===c?"":c,p=s.specifyDefaultLoginMethod,g=s._lockMethod,v=e.agreements,b=e.methods,y=e.autoRegister,C=e.submitButText,E=e.onLoginFailed,w=e.onLoginSuccess,O=e.saveIdentify,S=null!==(t=null===r||void 0===r?void 0:r.verifyCodeLength)&&void 0!==t?t:4,k=kr().post,T=ji().isPhoneMedia,N=(null===r||void 0===r||null===(n=r.internationalSmsConfig)||void 0===n?void 0:n.enabled)||!1,A=Object(i.useState)(!1),x=Object(d.a)(A,2),I=x[0],j=x[1],_=Object(i.useState)(!1),L=Object(d.a)(_,2),R=L[0],M=L[1],F=Object(i.useState)(""),B=Object(d.a)(F,2),D=B[0],q=B[1],U=Object(i.useState)(p&&null!==g&&void 0!==g?g:b[0]),V=Object(d.a)(U,2),H=V[0],z=V[1],G=Object(i.useState)(!1),W=Object(d.a)(G,2),K=W[0],$=W[1],Y=Object(i.useState)((null===r||void 0===r||null===(o=r.internationalSmsConfig)||void 0===o?void 0:o.defaultISOType)||"CN"),Q=Object(d.a)(Y,2),J=Q[0],Z=Q[1],X=bi.a.useForm(),ee=Object(d.a)(X,1)[0],te=Object(i.useRef)(null),ne=Object(Ei.a)().t,oe=Object(i.useCallback)((function(e){return K?a.a.createElement(rs,Object(wi.a)({},e,{form:ee,fieldName:"identify",className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:ne("common.inputFourVerifyCode",{length:S}),areaCode:J,prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),isInternationSms:N,scene:bo.SCENE_TYPE_LOGIN,maxLength:S,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ee.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})):a.a.createElement(a.a.Fragment,null,H===To.PhoneCode&&a.a.createElement(rs,Object(wi.a)({},e,{isInternationSms:N,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:ne("common.inputFourVerifyCode",{length:S}),areaCode:J,prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:bo.SCENE_TYPE_LOGIN,maxLength:S,form:ee,fieldName:"identify",data:D,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ee.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})),H===To.EmailCode&&a.a.createElement(ns,Object(wi.a)({},e,{className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:ne("common.inputFourVerifyCode",{length:S}),prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),form:ee,fieldName:"identify",scene:No.LOGIN_VERIFY_CODE,maxLength:S,data:D,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ee.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})))}),[J,H,ee,D,N,K,ne,S]);Object(i.useEffect)((function(){var e;1===b.length&&"phone-code"===b[0]&&r&&null!==(e=r.internationalSmsConfig)&&void 0!==e&&e.enabled&&$(!0)}),[r,b]);var re=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,i,a,s,c,u;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={phone:t.phoneNumber,code:t.code,customData:he(),autoRegister:y,withCustomData:!0},r&&null!==(n=r.internationalSmsConfig)&&void 0!==n&&n.enabled&&(i.phoneCountryCode=t.phoneCountryCode),e.next=4,k("/api/v2/login/phone-code",i);case 4:a=e.sent,s=a.code,c=a.data,u=a.onGuardHandling,null===(o=te.current)||void 0===o||o.onSpin(!1),200===s?w(c):(null===u||void 0===u?void 0:u())===xu.RENDER_MESSAGE&&E(s,c);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),se=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i,a,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={email:t.identify,code:t.code,customData:he(),autoRegister:y,withCustomData:!0},e.next=3,k("/api/v2/login/email-code",o);case 3:r=e.sent,i=r.code,a=r.data,s=r.onGuardHandling,null===(n=te.current)||void 0===n||n.onSpin(!1),200===i?w(a):(null===s||void 0===s?void 0:s())===xu.RENDER_MESSAGE&&E(i,a);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ce=function(){var t=Object(m.a)(h.a.mark((function t(n){var o,r,i,a,s,c,u,d,p,m,f,g,b,y;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(M(!0),null===v||void 0===v||!v.length||I){t.next=4;break}return te.current.onError(),t.abrupt("return");case 4:return i=_i(N,n.identify,J),a=i.phoneNumber,s=i.countryCode,null===(o=te.current)||void 0===o||o.onSpin(!0),c={type:H,data:{identity:a,code:n.code,phoneCountryCode:s}},t.next=9,null===(r=e.onBeforeLogin)||void 0===r?void 0:r.call(e,c);case 9:if(t.sent||!e.onBeforeLogin){t.next=13;break}return null===(u=te.current)||void 0===u||u.onSpin(!1),t.abrupt("return");case 13:if(!e.onLoginRequest){t.next=21;break}return t.next=16,null===(d=e.onLoginRequest)||void 0===d?void 0:d.call(e,c);case 16:return m=t.sent,f=m.code,g=m.apiCode,b=m.data,y=m.onGuardHandling,null===(p=te.current)||void 0===p||p.onSpin(!1),200===f?w(b):(null===y||void 0===y?void 0:y())===xu.RENDER_MESSAGE&&E(null!==g&&void 0!==g?g:f,b),t.abrupt("return");case 21:if("phone-code"!==H){t.next=26;break}return t.next=24,re(Object(l.a)(Object(l.a)({},n),{},{phoneNumber:a,phoneCountryCode:s}));case 24:t.next=28;break;case 26:return t.next=28,se(n);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ue=Object(i.useMemo)((function(){return C||(y?"".concat(ne("common.login")," / ").concat(ne("common.register")):ne("common.login"))}),[y,C,ne]),le=Object(i.useCallback)((function(e){return a.a.createElement(ls,Object(wi.a)({},e,{className:"authing-g2-input",size:"large",areaCode:J,onAreaCodeChange:function(e){Z(e),ee.getFieldValue(["identify"])&&ee.validateFields(["identify"])}}))}),[J,ee]);return a.a.createElement("div",{className:"authing-g2-login-phone-code"},a.a.createElement(bi.a,{name:"phoneCode",form:ee,onFinish:ce,onFinishFailed:function(){return te.current.onError()},autoComplete:"off",onValuesChange:function(e){null!==e&&void 0!==e&&e.identify&&O&&O(P.PhoneCode,null===e||void 0===e?void 0:e.identify)}},a.a.createElement(As,{initialValue:p===P.PhoneCode?u:"",name:"identify",className:K?"authing-g2-input-form remove-padding":"authing-g2-input-form",methods:b,checkExist:!y,currentMethod:H,areaCode:J},K?a.a.createElement(le,{autoFocus:!T}):a.a.createElement(Is,{className:"authing-g2-input",size:"large",autoFocus:!T,value:D,methods:b,onChange:function(e){var t=e.target.value;q(t),1!==b.length&&(ie("email",t)?z(To.EmailCode):z(To.PhoneCode))},prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"code",rules:Object(f.a)(ae(ne("common.captchaCode")))},a.a.createElement(oe,null)),Boolean(null===v||void 0===v?void 0:v.length)&&a.a.createElement(Qs,{onChange:j,agreements:v,showError:R}),a.a.createElement(bi.a.Item,null,a.a.createElement(qi,{text:ue,className:"password",ref:te}))))}),mc=function(e){var t=Object(i.useRef)(),n=dr(),o=Object(i.useState)(!0),r=Object(d.a)(o,2),s=r[0],c=r[1],u=n.landrayqrcode,p=kr().responseIntercept,h=Ir(),m="authingGuardLandrayQrcode-".concat(e.qrCodeScanOptions.extIdpConnId);return Object(i.useEffect)((function(){var n=G();if(n&&!h._qrCodeScanOptions){var o=n.document;return e.canLoop?(c(!0),u.startScanning(m,Object(l.a)(Object(l.a)({currentDocument:o,autoExchangeUserInfo:!0},e.qrCodeScanOptions),{},{onCodeShow:function(){c(!1)},onStart:function(e){t.current=e},onSuccess:function(n){clearInterval(t.current),e.onLoginSuccess(n)},onError:function(e){e&&hr.a.error(e)},onCodeLoadFailed:function(e){var t=e.message;hr.a.error(JSON.parse(t).message),c(!1)},onRetry:function(){c(!0)},onAuthFlow:function(e){clearInterval(t.current);var n=p(e).onGuardHandling;null===n||void 0===n||n()}})),function(){return clearInterval(t.current)}):function(){return clearInterval(t.current)}}}),[u,e.canLoop]),a.a.createElement("div",{className:"authing-g2-login-app-qrcode"},h._qrCodeScanOptions?a.a.createElement("div",{className:"qrcode"},a.a.createElement("img",{src:h._qrCodeScanOptions.wechatMiniQrcode.qrcode,alt:""}),a.a.createElement("span",null,e.qrCodeScanOptions.tips.title)):a.a.createElement(a.a.Fragment,null,s&&a.a.createElement(qr,null),a.a.createElement("div",{id:m})))},fc=[P.Password,P.PhoneCode,P.AD,P.LDAP],gc=[P.AppQr,P.WxMinQr,P.WechatMpQrcode,P.Landray],vc=function(){var e,t,n,o=Nr().specifyDefaultLoginMethod,r=Ir(),s=Tr(),c=xr().changeModule,u=Ar(),p=Sr(),h=function(e){var t=null===e||void 0===e?void 0:e.defaultLoginMethod,n=null===e||void 0===e?void 0:e.loginMethods;return null!==n&&void 0!==n&&n.includes(t)||(t=null===n||void 0===n?void 0:n[0]),[t,Us()(n,fc).length>0,Us()(n,gc).length>0]}(r),m=Object(d.a)(h,3),f=m[0],v=m[1],b=m[2],y=null===r||void 0===r?void 0:r.agreementEnabled,C=Object(Ei.a)().t,E=Object(i.useState)(o||f),w=Object(d.a)(E,2),O=w[0],S=w[1],k=Object(i.useState)(!1),T=Object(d.a)(k,2),N=T[0],A=T[1],x=dr(),I=null===p||void 0===p?void 0:p.qrcodeTabsSettings,j=Object(i.useState)(0),L=Object(d.a)(j,2),R=L[0],M=L[1],F=Object(i.useState)(!1),B=Object(d.a)(F,2),D=B[0],q=B[1],U=Object(i.useRef)({}),V=null===r||void 0===r?void 0:r.publicKey,H=null===r||void 0===r?void 0:r.loginMethods,G=fc.filter((function(e){return null===H||void 0===H?void 0:H.includes(e)}))[0],W=gc.filter((function(e){return null===H||void 0===H?void 0:H.includes(e)}))[0],K=function(e){var t=e.config,n=t.disableResetPwd,o=t.disableRegister,r=e.loginWay,i=e.autoRegister;return r===P.PhoneCode&&(n=!0),r===P.LDAP&&(n=!0,o=!0),r===P.AD&&(o=!0),!0===i&&(o=!0),{disableResetPwd:n,disableRegister:o}}({config:r,loginWay:O,autoRegister:null===r||void 0===r?void 0:r.autoRegister}),$=K.disableResetPwd,Y=K.disableRegister,Q=Object(i.useMemo)((function(){var e,t,n=null!==(e=null===p||void 0===p||null===(t=p.verifyCodeTabConfig)||void 0===t?void 0:t.enabledLoginMethods)&&void 0!==e?e:["phone-code"];return 1===n.length&&"phone-code"===n[0]?C("common.phoneVerifyCode"):1===n.length&&"email-code"===n[0]?C("common.emailVerifyCode"):C("common.verifyCodeLogin")}),[p,C]),J=Object(i.useMemo)((function(){var e=H?H.filter((function(e){return gc.includes(e)})):[];return!(e.length>1)&&(!(!e.includes(P.AppQr)||!e.includes(P.Landray))||(!I||!((null===I||void 0===I?void 0:I[P.WechatMpQrcode].length)>1||(null===I||void 0===I?void 0:I[P.WxMinQr].length)>1)))}),[H,I]),Z=Object(i.useMemo)((function(){if([P.WechatMpQrcode,P.WxMinQr].includes(f)){var e,t,n=null===I||void 0===I||null===(e=I[f])||void 0===e||null===(t=e.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id;return f+n}return f}),[f,I]),X=function(e,t){var n;null===u||void 0===u||null===(n=u.onLogin)||void 0===n||n.call(u,e,x)},ee=function(e,t){U.current=Object(l.a)(Object(l.a)({},U.current),{},Object(g.a)({},e,ke(t)))},te=function(e,t,n){var o,r=oc[e];"message"===(null===r||void 0===r?void 0:r.action)&&M(R+1),"accountLock"===(null===r||void 0===r?void 0:r.action)&&q(!0),null===u||void 0===u||null===(o=u.onLoginError)||void 0===o||o.call(u,{code:e,data:t,message:n})},ne=function(e){var t;return null!==u&&void 0!==u&&u.onBeforeLogin?null===u||void 0===u||null===(t=u.onBeforeLogin)||void 0===t?void 0:t.call(u,e,x):function(){return console.log("Guard not onBeforeLogin hooks")}};Object(i.useEffect)((function(){gc.includes(O)?A(!0):A(!1)}),[O]);var oe=function(e){var t=_.a.t("login.scanLogin");return gc.includes(e)&&(t=_.a.t("login.moreWays")),{switchText:t,inputNone:fc.includes(e)?"":"none",qrcodeNone:gc.includes(e)?"":"none"}}(O),re=oe.switchText,ie=oe.inputNone,ae=oe.qrcodeNone,se=Object(i.useMemo)((function(){var e,t;return y&&null!==(e=null===r||void 0===r||null===(t=r.agreements)||void 0===t?void 0:t.filter((function(e){return e.lang===_.a.language&&((null===r||void 0===r?void 0:r.autoRegister)||!(null===e||void 0===e||!e.availableAt))})))&&void 0!==e?e:[]}),[y,null===r||void 0===r?void 0:r.autoRegister,null===r||void 0===r?void 0:r.agreements,_.a.language]),ce=Object(i.useMemo)((function(){var e,t;return null!==(e=null===p||void 0===p||null===(t=p.verifyCodeTabConfig)||void 0===t?void 0:t.enabledLoginMethods)&&void 0!==e?e:["phone-code"]}),[null===p||void 0===p||null===(e=p.verifyCodeTabConfig)||void 0===e?void 0:e.enabledLoginMethods]),ue=Ri({config:r,publicConfig:p}),le=Object(d.a)(ue,3),de=le[0],pe=le[1],he=le[2],fe=!(null!==r&&void 0!==r&&null!==(t=r.loginMethods)&&void 0!==t&&t.length),ge=ji().isPhoneMedia;return Object(i.useLayoutEffect)((function(){if(fe&&!ge){var e,t=null===(e=z().getElementsByClassName("g2-view-container"))||void 0===e?void 0:e[0];if(t)return t.style["min-height"]=he?"456px":"280px",t.classList.add("no-login-methods-view"),function(){t.style["min-height"]="610px",t.classList.remove("no-login-methods-view")}}}),[he,ge,fe]),Object(i.useEffect)((function(){var e,t=z(),n=null===(e=t.getElementsByClassName("g2-view-header"))||void 0===e?void 0:e[0],o=t.querySelector(".g2-view-login>.g2-view-container-inner");return ge&&fe?(n&&n.classList.add("g2-view-header-mobile"),o&&o.classList.add("g2-view-login-mobile-inner")):(null===n||void 0===n||n.classList.remove("g2-view-header-mobile"),null===o||void 0===o||o.classList.remove("g2-view-login-mobile-inner")),function(){null===n||void 0===n||n.classList.remove("g2-view-header-mobile"),null===o||void 0===o||o.classList.remove("g2-view-login-mobile-inner")}}),[ge,fe]),a.a.createElement("div",{className:"g2-view-container g2-view-login"},a.a.createElement("div",{className:"g2-view-container-inner"},he?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"g2-view-header"},a.a.createElement("img",{src:null===r||void 0===r?void 0:r.logo,alt:"",className:"icon"}),a.a.createElement("div",{className:"title"},null===r||void 0===r?void 0:r.title),!(null===p||void 0===p||!p.welcomeMessage)&&a.a.createElement("div",{className:"title-description"},null===p||void 0===p?void 0:p.welcomeMessage[_.a.language])),a.a.createElement("div",{className:"no-login-methods-view"},a.a.createElement(oa,{type:"authing-bianzu",style:{width:178,height:120}}),a.a.createElement("span",{className:"no-login-methods-desc"},C("login.noLoginMethodsDesc")))):a.a.createElement(a.a.Fragment,null,v&&b&&a.a.createElement("div",{className:"g2-qrcode-switch"},a.a.createElement(Ds.a,{placement:"leftTop",visible:!0,content:re,overlayClassName:"switch-text",getPopupContainer:function(e){return e?e.parentElement:document.body}},a.a.createElement("div",{className:"switch-img",onClick:function(){hr.a.destroy(),fc.includes(O)?S(W):gc.includes(O)&&S(G)}},a.a.createElement("div",{className:"imgae-mask"}),a.a.createElement(oa,{type:"authing-a-erweima22",className:"qrcode-switch-image ".concat(ie)}),a.a.createElement(oa,{type:"authing-diannao",className:"qrcode-switch-image ".concat(ae)})))),a.a.createElement("div",{className:"g2-view-header"},a.a.createElement("img",{src:null===r||void 0===r?void 0:r.logo,alt:"",className:"icon"}),a.a.createElement("div",{className:"title"},null===r||void 0===r?void 0:r.title),!(null===p||void 0===p||!p.welcomeMessage)&&a.a.createElement("div",{className:"title-description"},null===p||void 0===p?void 0:p.welcomeMessage[_.a.language])),v&&a.a.createElement("div",{className:ie},a.a.createElement("div",{className:"g2-view-tabs"},a.a.createElement(Os.a,{destroyInactiveTabPane:!0,onChange:function(e){var t;S(e),hr.a.destroy(),null===u||void 0===u||null===(t=u.onLoginTabChange)||void 0===t||t.call(u,e)},activeKey:O},(null===H||void 0===H?void 0:H.includes(P.Password))&&a.a.createElement(Os.a.TabPane,{key:P.Password,tab:C("login.pwdLogin")},a.a.createElement(Js,{loginWay:O,publicKey:V,autoRegister:null===r||void 0===r?void 0:r.autoRegister,host:null===r||void 0===r?void 0:r.host,onLoginSuccess:X,onLoginFailed:te,onBeforeLogin:ne,saveIdentify:ee,passwordLoginMethods:null!==(n=null===r||void 0===r?void 0:r.passwordLoginMethods)&&void 0!==n?n:[],agreements:se})),(null===H||void 0===H?void 0:H.includes(P.PhoneCode))&&a.a.createElement(Os.a.TabPane,{key:P.PhoneCode,tab:Q},a.a.createElement(hc,{verifyCodeLength:null===p||void 0===p?void 0:p.verifyCodeLength,autoRegister:null===r||void 0===r?void 0:r.autoRegister,onBeforeLogin:ne,onLoginSuccess:X,onLoginFailed:te,saveIdentify:ee,agreements:se,methods:ce})),(null===H||void 0===H?void 0:H.includes(P.LDAP))&&a.a.createElement(Os.a.TabPane,{key:P.LDAP,tab:C("login.ldapLogin")},a.a.createElement(Zs,{publicKey:V,autoRegister:null===r||void 0===r?void 0:r.autoRegister,host:null===r||void 0===r?void 0:r.host,onLoginSuccess:X,onLoginFailed:te,onBeforeLogin:ne,agreements:se})),(null===H||void 0===H?void 0:H.includes(P.AD))&&a.a.createElement(Os.a.TabPane,{key:P.AD,tab:C("login.adLogin")},a.a.createElement(Xs,{publicKey:V,autoRegister:null===r||void 0===r?void 0:r.autoRegister,onLoginSuccess:X,onLoginFailed:te,onBeforeLogin:ne,agreements:se})))),a.a.createElement("div",{className:"g2-tips-line"},!$&&a.a.createElement("div",null,a.a.createElement(Bi,{type:"link",className:"link-like forget-password-link",onClick:function(){return null===c||void 0===c?void 0:c(_e.FORGET_PWD,{})}},C("login.forgetPwd")),(R>=2||D)&&a.a.createElement("span",{style:{margin:"0 4px",color:"#EAEBEE"}},"\u4e28")),(R>=2||D)&&a.a.createElement(as.a,{title:C("common.feedback")},a.a.createElement("div",{className:"touch-tip question-feedback",onClick:function(){return null===c||void 0===c?void 0:c(_e.ANY_QUESTIONS,{identify:U.current[O]})}},a.a.createElement(oa,{type:"authing-a-question-line1",style:{fontSize:16}}))),!Y&&a.a.createElement("span",{className:"go-to-register"},a.a.createElement(Bi,{type:"link",className:"link-like register-link",onClick:function(){return null===c||void 0===c?void 0:c(_e.REGISTER,{})}},C("common.registerImmediate"))))),b&&a.a.createElement("div",{className:"g2-view-tabs ".concat(ae," ").concat(J&&"hidden")},a.a.createElement(Os.a,{destroyInactiveTabPane:!0,onChange:function(e){var t;hr.a.destroy(),null===u||void 0===u||null===(t=u.onLoginTabChange)||void 0===t||t.call(u,e)},defaultActiveKey:Z},(null===H||void 0===H?void 0:H.includes(P.WxMinQr))&&(null===I||void 0===I?void 0:I[P.WxMinQr].map((function(e){var t;return a.a.createElement(Os.a.TabPane,{key:P.WxMinQr+e.id,tab:null!==(t=e.title)&&void 0!==t?t:C("login.scanLogin")},a.a.createElement(tc,{onLoginSuccess:X,canLoop:N,qrCodeScanOptions:Object(l.a)(Object(l.a)({},null===r||void 0===r?void 0:r.qrCodeScanOptions),{},{extIdpConnId:e.id,tips:{title:"zh-CN"===_.a.language?"\u4f7f\u7528 \u5fae\u4fe1 \u626b\u7801\u767b\u5f55":"Use WeChat to scan and login",expired:C("login.qrcodeExpired")}})}))}))),(null===H||void 0===H?void 0:H.includes(P.AppQr))&&a.a.createElement(Os.a.TabPane,{key:P.AppQr,tab:C("login.appScanLogin")},a.a.createElement(ec,{onLoginSuccess:X,canLoop:N,qrCodeScanOptions:Object(l.a)(Object(l.a)({},null===r||void 0===r?void 0:r.qrCodeScanOptions),{},{tips:{title:"zh-CN"===_.a.language?"\u4f7f\u7528 \u79fb\u52a8\u7aef APP \u626b\u7801\u767b\u5f55":"Use Mobile APP to scan and login",expired:C("login.qrcodeExpired")}})})),(null===H||void 0===H?void 0:H.includes(P.WechatMpQrcode))&&(null===I||void 0===I?void 0:I[P.WechatMpQrcode].map((function(e){var t;return a.a.createElement(Os.a.TabPane,{key:P.WechatMpQrcode+e.id,tab:null!==(t=e.title)&&void 0!==t?t:C("login.wechatmpQrcode")},a.a.createElement(nc,{onLoginSuccess:X,canLoop:N,qrCodeScanOptions:Object(l.a)(Object(l.a)({},null===r||void 0===r?void 0:r.qrCodeScanOptions),{},{extIdpConnId:e.id,tips:{title:"zh-CN"===_.a.language?"".concat(me()?"\u957f\u6309\u4e8c\u7ef4\u7801\u767b\u5f55":"\u4f7f\u7528 \u5fae\u4fe1 \u626b\u7801\u767b\u5f55"):"".concat(me()?"Long press the QR code to log in":"Use WeChat to scan and login"," "),expired:C("login.qrcodeExpired")}})}))}))),(null===H||void 0===H?void 0:H.includes(P.Landray))&&(null===I||void 0===I?void 0:I[P.Landray].map((function(e){var t;return a.a.createElement(Os.a.TabPane,{key:P.Landray,tab:null!==(t=e.title)&&void 0!==t?t:C("login.landrayKKScan")},a.a.createElement(mc,{onLoginSuccess:X,canLoop:N,qrCodeScanOptions:Object(l.a)(Object(l.a)({},null===r||void 0===r?void 0:r.qrCodeScanOptions),{},{extIdpConnId:e.id,tips:{title:"zh-CN"===_.a.language?"\u4f7f\u7528 \u84dd\u51ccKK \u626b\u7801\u767b\u5f55":"Use LandrayKK to scan and login".concat(" "),expired:C("login.qrcodeExpired")}})}))}))))),a.a.createElement("div",{className:"g2-social-login"},a.a.createElement(dc,{appId:s,config:r,onLoginSuccess:X,onLoginFailed:te,socialConnectionObjs:de,enterpriseConnectionObjs:pe})))),a.a.createElement(pc,{langRange:null===r||void 0===r?void 0:r.langRange,onLangChange:null===u||void 0===u?void 0:u.onLangChange}))};!function(e){e.VerifyEmail="verify-email",e.VerifySms="verify-sms",e.VerifyTotp="verify-totp",e.VerifyFace="verify-face",e.AssociateFace="associate-face"}(Rs||(Rs={}));var bc,yc,Cc=function(){var e=Object(m.a)(h.a.mark((function e(t,n){var o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=ri(),r=o.authFlow,e.next=3,r(t,Object(l.a)({},n));case 3:return i=e.sent,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ec=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.email,o=t.code,r=t.mfaToken,i=ri(),a=i.post,e.next=4,a("/api/v2/applications/mfa/email/verify",{email:n,code:o},{headers:{authorization:"Bearer ".concat(r)}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),wc=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i,a,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.phone,o=t.code,r=t.mfaToken,i=t.phoneCountryCode,a=ri(),s=a.post,e.next=4,s("/api/v2/applications/mfa/sms/verify",{phone:n,code:o,phoneCountryCode:i},{headers:{authorization:"Bearer ".concat(r)}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Oc=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.totp,o=t.mfaToken,r=ri(),i=r.post,e.next=4,i("/api/v2/applications/mfa/totp/verify",{totp:n},{headers:{authorization:"Bearer ".concat(o)}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Sc=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.photo,o=t.mfaToken,r=ri(),i=r.post,e.next=4,i("/api/v2/applications/mfa/face/verify",{photo:n},{headers:{authorization:"Bearer ".concat(o)}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),kc=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i,a,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.photoA,o=t.photoB,r=t.isExternalPhoto,i=t.mfaToken,a=ri(),s=a.post,e.next=4,s("/api/v2/mfa/face/associate",{photoA:n,photoB:o,isExternalPhoto:r},{headers:{authorization:"Bearer ".concat(i)}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Tc=function(){var e,t=jr();return e={},Object(g.a)(e,Rs.VerifyEmail,(function(e){return t?Cc(Rs.VerifyEmail,e):Ec(e)})),Object(g.a)(e,Rs.VerifySms,(function(e){return t?Cc(Rs.VerifySms,e):wc(e)})),Object(g.a)(e,Rs.VerifyTotp,(function(e){return t?Cc(Rs.VerifyTotp,e):Oc(e)})),Object(g.a)(e,Rs.VerifyFace,(function(e){return t?Cc(Rs.VerifyFace,e):Sc(e)})),Object(g.a)(e,Rs.AssociateFace,(function(e){return t?Cc(Rs.AssociateFace,e):kc(e)})),e},Pc=function(e){e.mfaToken;var t=e.onBind,n=(e.config,Object(i.useRef)(null)),o=Object(Ei.a)().t,r=bi.a.useForm(),s=Object(d.a)(r,1)[0],c=function(){var e=Object(m.a)(h.a.mark((function e(o){var r,i,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.email,e.next=3,s.validateFields();case 3:null===(r=n.current)||void 0===r||r.onSpin(!1);try{t(i)}catch(c){a=JSON.parse(null===c||void 0===c?void 0:c.message),n.current.onError(),hr.a.error(a.message)}case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"authing-g2-mfa-title"},o("common.bindEmail")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},o("common.bindEmailDoc")),a.a.createElement(bi.a,{form:s,onSubmitCapture:function(){return n.current.onSpin(!0)},onFinish:c,onFinishFailed:function(){return n.current.onError()}},a.a.createElement(ma.Email,{className:"authing-g2-input-form",name:"email",form:s,checkRepeat:!0,required:!0},a.a.createElement(Zi.a,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:o("login.inputEmail"),prefix:a.a.createElement(oa,{type:"authing-a-mail-line3",style:{color:"#878A95"}})})),a.a.createElement(qi,{text:o("common.sure"),ref:n})))},Nc=function(e){var t=e.email,n=e.mfaToken,o=e.onVerify,r=e.sendCodeRef,s=e.codeLength,c=ri().post,u=Tc()[Rs.VerifyEmail],l=Object(i.useRef)(null),p=Object(Ei.a)().t,f=bi.a.useForm(),g=Object(d.a)(f,1)[0],v=Object(i.useState)(!1),b=Object(d.a)(v,2),y=b[0],C=b[1],E=function(){var e=Object(m.a)(h.a.mark((function e(){var n,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c("/api/v2/email/send",{email:t,scene:No.MFA_VERIFY_CODE});case 3:if(n=e.sent,200!==n.code){e.next=10;break}return C(!0),e.abrupt("return",!0);case 10:return hr.a.error(p("login.sendCodeTimeout")),e.abrupt("return",!1);case 12:e.next=22;break;case 14:if(e.prev=14,e.t0=e.catch(0),"ECONNABORTED"!==e.t0.code){e.next=19;break}return hr.a.error(p("login.sendCodeTimeout")),e.abrupt("return",!1);case 19:return o=JSON.parse(e.t0.message),hr.a.error(o.message),e.abrupt("return",!1);case 22:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=Object(m.a)(h.a.mark((function e(r){var i,a,s,c,d,p,m,f,v;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(i=l.current)||void 0===i||i.onSpin(!0),s=g.getFieldValue("mfaCode"),c={mfaToken:n,email:t,code:s.join("")},e.next=5,u(c);case 5:d=e.sent,p=d.isFlowEnd,m=d.data,f=d.onGuardHandling,null===(a=l.current)||void 0===a||a.onSpin(!1),p?o(200,m):(null===(v=l.current)||void 0===v||v.onError(),null===f||void 0===f||f());case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"authing-g2-mfa-title"},p("login.inputEmailCode")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},y?"".concat(p("login.verifyCodeSended")," ").concat(function(e){var t=e.split("@");return t[0].substr(0,1)+"***@"+t[1]}(t)):""),a.a.createElement(bi.a,{form:g,onFinish:w,onFinishFailed:function(){var e;return null===(e=l.current)||void 0===e?void 0:e.onError()}},a.a.createElement($i,{codeLength:s,ruleKeyword:p("common.captchaCode")},a.a.createElement(ea,{length:s,onFinish:w})),a.a.createElement(Za,{btnRef:r,setSent:C,beforeSend:function(){return E()},type:"link"}),a.a.createElement(qi,{text:p("common.sure"),ref:l,className:"g2-mfa-submit-button"})))},Ac=function(e){var t=e.email,n=e.mfaToken,o=e.mfaLogin,r=e.config,s=Object(i.useState)(t),c=Object(d.a)(s,2),u=c[0],l=c[1],p=Object(i.useRef)(null),h=Sr(),m=null===h||void 0===h?void 0:h.verifyCodeLength;return a.a.createElement(a.a.Fragment,null,u?a.a.createElement(Nc,{mfaToken:n,email:u,onVerify:function(e,t){o(e,t)},sendCodeRef:p,codeLength:null!==m&&void 0!==m?m:4}):a.a.createElement(Pc,{config:r,mfaToken:n,onBind:function(e){var t;l(e),null===(t=p.current)||void 0===t||t.click()}}))},xc=function(e){e.mfaToken;var t=e.onBind,n=(e.config,e.areaCode),o=e.setAreaCode,r=e.isInternationSms,s=Object(i.useRef)(null),c=Object(Ei.a)().t,u=bi.a.useForm(),l=Object(d.a)(u,1)[0],p=function(){var e=Object(m.a)(h.a.mark((function e(n){var o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.phone,e.next=3,l.validateFields();case 3:null===(o=s.current)||void 0===o||o.onSpin(!1);try{t(r)}catch(a){null===(i=s.current)||void 0===i||i.onError()}case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=Object(i.useCallback)((function(e){return r?a.a.createElement(ls,Object(wi.a)({},e,{className:"authing-g2-input",size:"large",areaCode:n,onAreaCodeChange:function(e){o(e),l.getFieldValue(["phone"])&&l.validateFields(["phone"])}})):a.a.createElement(Wa,Object(wi.a)({},e,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:c("login.inputPhone"),prefix:a.a.createElement(oa,{type:"authing-a-smartphone-line1",style:{color:"#878A95"}})}))}),[n,l,r,o,c]);return a.a.createElement(a.a.Fragment,null,a.a.createElement("h3",{className:"authing-g2-mfa-title"},c("common.bindPhone")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},c("login.bindPhoneInfo")),a.a.createElement(bi.a,{form:l,onSubmitCapture:function(){return s.current.onSpin(!0)},onFinish:p,onFinishFailed:function(){return s.current.onError()}},a.a.createElement(ma.Phone,{className:r?"authing-g2-input-form remove-padding":"authing-g2-input-form",name:"phone",form:l,checkRepeat:!0,required:!0,areaCode:n},a.a.createElement(f,null)),a.a.createElement(qi,{text:c("common.sure"),ref:s})))},Ic=function(e){var t=e.mfaToken,n=e.phone,o=e.userPhone,r=e.onVerify,s=e.sendCodeRef,c=e.codeLength,u=void 0===c?4:c,l=e.areaCode,p=e.phoneCountryCode,f=e.isInternationSms,g=dr(),v=Object(i.useRef)(null),b=Object(Ei.a)().t,y=bi.a.useForm(),C=Object(d.a)(y,1)[0],E=Object(i.useState)(!1),w=Object(d.a)(E,2),O=w[0],S=w[1],k=_i(f,n,l),T=k.phoneNumber,P=k.countryCode,N=Tc()[Rs.VerifySms],A=function(){var e=Object(m.a)(h.a.mark((function e(o){var i,a,s,c,u,l,d,m;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(i=v.current)||void 0===i||i.onSpin(!0),s=C.getFieldValue("mfaCode"),c={mfaToken:t,phone:n,code:s.join(""),phoneCountryCode:p||P},e.next=5,N(c);case 5:u=e.sent,l=u.isFlowEnd,d=u.data,m=u.onGuardHandling,null===(a=v.current)||void 0===a||a.onSpin(!1),l?r(200,d):(v.current.onError(),null===m||void 0===m||m());case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=Object(i.useMemo)((function(){return O?"".concat(b("login.verifyCodeSended")," ").concat(f?p||P:""," ").concat(function(e){return e.replace(/(\d{3})\d*(\d{4})/,"$1****$2")}(n)):""}),[P,f,n,p,O,b]),I=function(){var e=Object(m.a)(h.a.mark((function e(){var t;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.sendSmsCode(o||T,p||P,bo.SCENE_TYPE_MFA_VERIFY);case 3:return e.abrupt("return",!0);case 6:if(e.prev=6,e.t0=e.catch(0),"ECONNABORTED"!==e.t0.code){e.next=11;break}return hr.a.error(b("login.sendCodeTimeout")),e.abrupt("return",!1);case 11:return t=JSON.parse(e.t0.message),hr.a.error(t.message),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("h3",{className:"authing-g2-mfa-title"},b("login.inputPhoneCode")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},x),a.a.createElement(bi.a,{form:C,onFinish:A,onFinishFailed:function(){return v.current.onError()}},a.a.createElement($i,{codeLength:u,ruleKeyword:b("common.captchaCode")},a.a.createElement(ea,{length:u,onFinish:A})),a.a.createElement(Za,{btnRef:s,beforeSend:function(){return I()},type:"link",setSent:S}),a.a.createElement(qi,{text:b("common.sure"),ref:v,className:"g2-mfa-submit-button"})))},jc=function(e){var t,n,o=e.mfaLogin,r=e.config,s=e.initData,c=s.phone,u=s.mfaToken,l=s.phoneCountryCode,p=Object(i.useState)(c),h=Object(d.a)(p,2),m=h[0],f=h[1],g=Object(i.useRef)(null),v=Sr(),b=null===v||void 0===v?void 0:v.verifyCodeLength,y=Object(i.useState)((null===v||void 0===v||null===(t=v.internationalSmsConfig)||void 0===t?void 0:t.defaultISOType)||"CN"),C=Object(d.a)(y,2),E=C[0],w=C[1],O=Boolean(null===v||void 0===v||null===(n=v.internationalSmsConfig)||void 0===n?void 0:n.enabled);return a.a.createElement(a.a.Fragment,null,m?a.a.createElement(Ic,{mfaToken:u,phone:m,userPhone:c,phoneCountryCode:l,isInternationSms:O,onVerify:function(e,t){o(e,t)},codeLength:null!==b&&void 0!==b?b:4,sendCodeRef:g,areaCode:E}):a.a.createElement(xc,{config:r,mfaToken:u,areaCode:E,setAreaCode:w,isInternationSms:O,onBind:function(e){var t;f(e),null===(t=g.current)||void 0===t||t.click()}}))},_c=function(){if(bc)return bc},Lc={video:{width:210,height:210}};function Rc(){var e=_c();if(e)return new(0,e.TinyFaceDetectorOptions)({inputSize:512,scoreThreshold:.5})}function Mc(){var e=_c();if(e)return e.nets.tinyFaceDetector}function Fc(e){var t;t=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);for(var n=e.split(",")[0].split(":")[1].split(";")[0],o=new Uint8Array(t.length),r=0;r<t.length;r++)o[r]=t.charCodeAt(r);return new Blob([o],{type:n})}!function(e){e.NotAllowedError="NotAllowedError",e.AbortError="AbortError",e.NotReadableError="NotReadableError",e.OverconstrainedError="OverconstrainedError",e.SecurityError="SecurityError"}(yc||(yc={}));var Bc,Dc,qc,Uc=function(e){var t=Object(i.useContext)($c),n=ii().postForm,o=Object(Ei.a)().t,r=Object(i.useState)("ready"),s=Object(d.a)(r,2),c=s[0],u=s[1],l=Object(i.useState)(0),p=Object(d.a)(l,2),f=p[0],g=p[1],v=Tc(),b=Or().spinChange,y=v[Rs.VerifyFace],C=v[Rs.AssociateFace],E=Object(i.useRef)(null),w=Object(i.useRef)(null),O=Object(i.useRef)(),S=Object(i.useRef)(),k=Object(i.useRef)(),T=Object(i.useRef)(0),P=Sr(),N=null===P||void 0===P?void 0:P.cdnBase,A=function(e){return{offset:7*e,dashStyle:{}}}(f),x=A.offset,I=A.dashStyle;Object(i.useEffect)((function(){if(Mc().loadFromUri("".concat(N,"/face-api/v1/tiny_face_detector_model-weights_manifest.json")),"identifying"===c)return navigator.mediaDevices.getUserMedia(Lc).then((function(e){E.current.srcObject=e})).catch((function(e){var t=function(e){var t="";switch(e.name){case yc.NotAllowedError:t="login.AuthorizationCamera";break;case yc.SecurityError:t="login.checkPreferences";break;case yc.OverconstrainedError:t="login.requireError";break;default:t="login.hardwareSupport"}return t}(e);hr.a.error(o(t))})),function(){O.current&&clearInterval(O.current)}}),[c,O,e.config,N,o]),Object(i.useEffect)((function(){"check"===(null===t||void 0===t?void 0:t.mfaBackState)?e.setShowMethods(!1):e.setShowMethods(!0)}),[null===t||void 0===t?void 0:t.mfaBackState,e]);var j=function(){var e=Object(m.a)(h.a.mark((function e(t){var o,r,i,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),(r=new FormData).append("folder","photos"),r.append("file",t,"personal.jpeg"),"/api/v2/upload?folder=photos&private=true",e.next=7,n("/api/v2/upload?folder=photos&private=true",r);case 7:return i=e.sent,a=null===(o=i.data)||void 0===o?void 0:o.key,b(!1),e.abrupt("return",a);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(e){var t=w.current,n=t.getContext("2d");return n.clearRect(0,0,t.width,t.height),n.drawImage(e,0,0,t.width,t.height),t.toDataURL("image/jpeg",1)},L=function(){var t=Object(m.a)(h.a.mark((function t(){var n,o,r,i,a,s;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={photoA:S.current,photoB:k.current,mfaToken:e.initData.mfaToken},t.next=3,C(n);case 3:o=t.sent,r=o.isFlowEnd,i=o.onGuardHandling,a=o.code,s=o.data,r?e.mfaLogin(200,s):1700===a||1701===a||1702===a?(S.current=void 0,k.current=void 0,O.current=void 0,T.current=0,u("retry")):null===i||void 0===i||i();case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var t=Object(m.a)(h.a.mark((function t(){var n,o,r,i,a,s;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={photo:S.current,mfaToken:e.initData.mfaToken},b(!0),t.next=4,y(n);case 4:o=t.sent,b(!1),r=o.isFlowEnd,i=o.onGuardHandling,a=o.data,s=o.code,r?e.mfaLogin(200,a):1700===s||1701===s||1702===s?(S.current=void 0,k.current=void 0,O.current=void 0,T.current=0,u("retry")):null===i||void 0===i||i();case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(t){g(100),j(t).then((function(t){var n;!0===(null===(n=e.initData)||void 0===n?void 0:n.faceMfaEnabled)?function(e){S.current=e,O.current&&clearInterval(O.current),R()}(t):function(e){S.current?(T.current>0&&(T.current-=1),T.current<=0&&(k.current=e,O.current&&clearInterval(O.current),L())):S.current=e}(t)}))},F=Object(i.useCallback)(Object(m.a)(h.a.mark((function e(){var t,n,o,r,i,a,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O.current||(O.current=setInterval((function(){return F()}),500)),!(null!==(t=E.current)&&void 0!==t&&t.paused||null!==t&&void 0!==t&&t.ended)&&Mc().params){e.next=4;break}return e.abrupt("return");case 4:if(n=Rc(),o=_c()){e.next=8;break}return e.abrupt("return");case 8:return r=o.detectSingleFace,e.next=11,r(t,n);case 11:(i=e.sent)?i.score>.65?(a=_(t),s=Fc(a),M(s)):g((function(){return i.score/.65*100})):g(10);case 13:case"end":return e.stop()}}),e)}))),[]);return a.a.createElement("div",null,a.a.createElement("h3",{className:"authing-g2-mfa-title"},o("common.faceText1")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},o("common.faceText2")),("ready"===c||"login"===(null===t||void 0===t?void 0:t.mfaBackState))&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Wi,{className:"g2-mfa-face-image",width:247,height:131,src:"".concat(N,"/face.png"),alt:""}),a.a.createElement(qi,{onClick:function(){navigator.mediaDevices?(u("identifying"),(null===t||void 0===t?void 0:t.setMfaBackState)&&t.setMfaBackState("check"),F()):hr.a.error(o("login.mediaDevicesSupport"))},text:o("common.faceText3"),className:"mfa-face"})),a.a.createElement("div",{className:"g2-mfa-face-identifying",style:{display:"ready"!==c&&"login"!==(null===t||void 0===t?void 0:t.mfaBackState)?"flex":"none"}},a.a.createElement("video",{className:"video-round",ref:E,style:{transform:"rotateY(180deg)"},id:"inputVideo",autoPlay:!0,muted:!0,playsInline:!0}),a.a.createElement("div",{className:"video-round mesh",style:{display:"retry"===c?"flex":"none"},onClick:function(){u("identifying"),g(0),F()}},o("common.faceText4")),a.a.createElement("div",{className:"video-round ring"},a.a.createElement("svg",{width:240,height:240,fill:"none"},a.a.createElement("circle",{className:"svg-circle-running",style:I,strokeDasharray:700,strokeDashoffset:700-x,cx:120,cy:120,r:110})))),a.a.createElement("canvas",{style:{width:210,height:210,opacity:0,position:"absolute",display:"none"},ref:w}))},Vc=function(e){var t=e.changeModule,n=e.initData,o=Object(Ei.a)().t;return a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"authing-g2-mfa-title"},o("common.bindTotp")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},o("common.otpText1")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.a.createElement(oa,{type:"authing-otp",style:{width:247,height:131}})),a.a.createElement(qi,{text:o("common.sure"),onClick:function(){return t(_e.BIND_TOTP,n)},className:"g2-mfa-submit-button bind-totp"}))},Hc=function(e){var t=e.mfaToken,n=e.mfaLogin,o=e.changeModule,r=Object(Ei.a)().t,s=bi.a.useForm(),c=Object(d.a)(s,1)[0],u=Object(i.useRef)(null),p=Nr(),f=Tc()[Rs.VerifyTotp],g=Object(hi.a)(Object(m.a)(h.a.mark((function e(){var o,r,i,a,s,l,d,p;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(o=u.current)||void 0===o||o.onSpin(!0),i=c.getFieldValue("mfaCode"),a={totp:i.join(""),mfaToken:t},e.next=5,f(a);case 5:s=e.sent,l=s.isFlowEnd,d=s.data,p=s.onGuardHandling,null===(r=u.current)||void 0===r||r.onSpin(!1),l?n(200,d):(u.current.onError(),null===p||void 0===p||p());case 11:case"end":return e.stop()}}),e)}))),[t]),v=Object(d.a)(g,2)[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"authing-g2-mfa-title"},r("login.accPwdLoginVerify")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},r("login.inputSixCode")),a.a.createElement(bi.a,{form:c,onSubmitCapture:function(){},onFinish:v,onFinishFailed:function(){return u.current.onError()}},a.a.createElement($i,{codeLength:6},a.a.createElement(ea,{length:6,showDivider:!1,gutter:"10px",onFinish:v})),a.a.createElement(qi,{text:r("common.sure"),ref:u}),a.a.createElement("p",{className:"authing-g2-mfa-totp-recoveryCode"},r("common.hasLooseSaftyCode"),a.a.createElement(Bi,{type:"link",onClick:function(){o(_e.RECOVERY_CODE,Object(l.a)({},p))}},r("common.useRecoverCode")))))},zc=function(e){var t=e.changeModule,n=e.initData,o=e.mfaLogin;return a.a.createElement(a.a.Fragment,null,n.totpMfaEnabled?a.a.createElement(Hc,{mfaToken:n.mfaToken,mfaLogin:o,changeModule:t}):a.a.createElement(Vc,{initData:n,changeModule:t}))},Gc=(n(746),Bc={},Object(g.a)(Bc,Ui.EMAIL,{title:function(){return _.a.t("common.EmailVerification")},icon:"authing-mail"}),Object(g.a)(Bc,Ui.SMS,{title:function(){return _.a.t("common.SMS")},icon:"authing-phone"}),Object(g.a)(Bc,Ui.TOTP,{title:function(){return _.a.t("common.OTPVerification")},icon:"authing-totp"}),Object(g.a)(Bc,Ui.FACE,{title:function(){return _.a.t("common.faceVerification")},icon:"authing-face"}),Bc),Wc=function(e){var t=e.method,n=e.onChangeMethod,o=Object(i.useState)(t),r=Object(d.a)(o,2),s=r[0],c=r[1],u=Object(Ei.a)().t,l=Nr().applicationMfa,p=Object(i.useMemo)((function(){return l.filter((function(e){return Object.keys(Gc).includes(e.mfaPolicy)})).filter((function(e){return e.mfaPolicy!==s})).filter((function(e){if(e.mfaPolicy===Ui.FACE){var t=_c();return Boolean(t)}return!0})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return a.a.createElement(Bi,{className:"g2-guard-mfa-methods-btn",onClick:function(t){n(e.mfaPolicy),c(e.mfaPolicy)},key:e.mfaPolicy},a.a.createElement(oa,{type:Gc[e.mfaPolicy].icon}),"".concat(Gc[e.mfaPolicy].title()))}))}),[l,s,n]);return a.a.createElement(a.a.Fragment,null,0!==p.length&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{minHeight:32}}),a.a.createElement("div",{className:"g2-mfa-method"},a.a.createElement("div",{className:"g2-mfa-method-title"},u("login.otherVerifyWay")),p)))},Kc={2021:{action:"changeModule",module:_e.LOGIN},1700:{action:"insideFix",message:"verification failed, let components inside fix is fine."},1701:{action:"insideFix",message:"verification failed, let components inside fix is fine."},1702:{action:"insideFix",message:"verification failed, let components inside fix is fine."},500:{action:"message"},6001:{action:"message"},602:{action:"message"}},$c=(n(747),a.a.createContext(void 0)),Yc=(Dc={},Object(g.a)(Dc,Ui.EMAIL,(function(e){var t=e.config,n=e.initData,o=e.mfaLogin;return a.a.createElement(Ac,{config:t,mfaToken:n.mfaToken,email:n.email,mfaLogin:o})})),Object(g.a)(Dc,Ui.SMS,(function(e){var t=e.config,n=e.initData,o=e.mfaLogin;return a.a.createElement(jc,{config:t,initData:n,mfaLogin:o})})),Object(g.a)(Dc,Ui.TOTP,(function(e){var t=e.initData,n=e.config,o=e.changeModule,r=e.mfaLogin;return a.a.createElement(zc,{changeModule:o,config:n,initData:t,mfaLogin:r})})),Object(g.a)(Dc,Ui.FACE,(function(e){var t=e.config,n=e.initData,o=e.mfaLogin,r=e.setShowMethods;return a.a.createElement(Uc,{config:t,initData:n,mfaLogin:o,setShowMethods:r})})),Dc),Qc=function(){var e,t,n=Nr(),o=Ir(),r=xr().changeModule,s=Ar(),c=Object(i.useState)(null!==(e=n.current)&&void 0!==e?e:null===(t=n.applicationMfa)||void 0===t?void 0:t.sort((function(e,t){return e.sort-t.sort}))[0].mfaPolicy),u=Object(d.a)(c,2),p=u[0],h=u[1],m=Object(i.useState)("login"),f=Object(d.a)(m,2),g=f[0],v=f[1],b=Object(i.useState)(!0),y=Object(d.a)(b,2),C=y[0],E=y[1],w=dr(),O=Object(Ei.a)().t,S=function(e,t){var n=Kc[e];if(200===e)return function(e){var t;null===s||void 0===s||null===(t=s.onLogin)||void 0===t||t.call(s,e,w)};if(!n)return function(t){console.error("not catch code",e)};if("changeModule"===(null===n||void 0===n?void 0:n.action)){var o=n.module?n.module:_e.ERROR,i=n.initData?n.initData:{};return function(e){return null===r||void 0===r?void 0:r(o,Object(l.a)(Object(l.a)({},e),{},{init:i}))}}return"insideFix"===(null===n||void 0===n?void 0:n.action)?function(){}:"message"===(null===n||void 0===n?void 0:n.action)?function(e){e.message?hr.a.error(e.message):hr.a.error(t)}:function(){console.error("last action at mfaview")}},k=Object(i.useMemo)((function(){return p===Ui.FACE&&"check"===g?a.a.createElement(ia,{onBack:function(){var e;h(n.applicationMfa.find((function(e){return e.mfaPolicy===Ui.FACE}))?Ui.FACE:null===(e=n.applicationMfa)||void 0===e?void 0:e.sort((function(e,t){return e.sort-t.sort}))[0].mfaPolicy),E(!0),v("login")}},O("common.backToVerify")):a.a.createElement(ra,null)}),[p,n.applicationMfa,g,O]);return a.a.createElement($c.Provider,{value:{setMfaBackState:v,mfaBackState:g}},a.a.createElement("div",{className:"g2-view-container g2-view-mfa"},k,a.a.createElement("div",{className:"g2-mfa-content"},Yc[p]({config:o,initData:n,changeModule:r,mfaLogin:function(e,t,n){var o=null===S||void 0===S?void 0:S(e,n);t||(t={}),t.__message=n,null===o||void 0===o||o(t)},setShowMethods:E})),C&&a.a.createElement(Wc,{method:p,onChangeMethod:function(e){h(e)}})))},Jc=(n(318),n(218)),Zc=n.n(Jc),Xc=function(e){var t=Object(Ei.a)().t,n=Nr(),o={0:[t("common.problem.noVerifyTip.tip"),t("common.problem.noVerifyTip.type1"),t("common.problem.noVerifyTip.type2"),t("common.problem.noVerifyTip.type3")],1:[t("common.problem.noLoginTips"),t("common.problem.noLoginTip.type1"),t("common.problem.noLoginTip.type2")],2:[t("common.problem.noRegisterTip.tip"),t("common.problem.noRegisterTip.type1"),t("common.problem.noRegisterTip.type2"),t("common.problem.noRegisterTip.type3")],3:[t("common.problem.noAccountTip.tip"),t("common.problem.noAccountTip.type1"),t("common.problem.noAccountTip.type2")],4:[t("common.problem.noResetPassTip.tip"),t("common.problem.noResetPassTip.type1"),t("common.problem.noResetPassTip.type2")],5:[t("common.problem.lockedTips")],6:[]},r=[{label:t("common.problem.noVerify"),value:0},{label:t("common.problem.noLogin"),value:1},{label:t("common.problem.noRegister"),value:2},{label:t("common.problem.noAccount"),value:3},{label:t("common.problem.noResetPass"),value:4},{label:t("common.problem.locked"),value:5},{label:t("common.problem.other"),value:6}],s=bi.a.useForm(),c=Object(d.a)(s,1)[0],u=ii().post,l=Object(i.useState)([]),p=Object(d.a)(l,2),g=p[0],v=p[1],b=Object(i.useState)(!1),y=Object(d.a)(b,2),C=y[0],E=y[1],w=Object(i.useState)(),O=Object(d.a)(w,2),S=O[0],k=O[1],T=Object(i.useState)([]),P=Object(d.a)(T,2),N=P[0],A=P[1],x=Object(i.useState)(0),I=Object(d.a)(x,2),j=I[0],_=I[1],L=Object(i.useRef)(null),R=o[j],M=function(){var e=Object(m.a)(h.a.mark((function e(t){var n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("error"!==t.status&&!t.response){e.next=6;break}return e.next=3,new Promise((function(e){var n=new FileReader;n.readAsDataURL(t.originFileObj),n.onload=function(){return e(n.result)}}));case 3:n=e.sent,e.next=7;break;case 6:n=t.response.data.url;case 7:k(n),E(!0);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement("div",{className:"authing-g2-describe-questions authing-g2-form-required-item-icon-after"},a.a.createElement(bi.a,{name:"resetPassword",layout:"vertical",form:c,onFinish:function(t){var n;null===L||void 0===L||null===(n=L.current)||void 0===n||n.onSpin(!0);var o={type:j,description:t.description,phone:t.identify,images:g,appId:e.appId};u("/api/v2/feedback",o).then((function(t){var n;200===t.code&&(null===L||void 0===L||null===(n=L.current)||void 0===n||n.onSpin(!1),e.onSuccess())}))},onFinishFailed:function(){var e;null===L||void 0===L||null===(e=L.current)||void 0===e||e.onError()},autoComplete:"off"},a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"identify",label:t("common.problem.form.phone"),validateFirst:!0,initialValue:null===n||void 0===n?void 0:n.identify,rules:[].concat(Object(f.a)(ae(t("common.problem.form.phone"))),[{validator:function(){var e=Object(m.a)(h.a.mark((function e(n,o){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o){e.next=2;break}return e.abrupt("return");case 2:if(!ie("email",o)&&!ie("phone",o)){e.next=6;break}return e.abrupt("return");case 6:throw new Error(t("login.inputCorrectPhoneOrEmail"));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}])},a.a.createElement(Zi.a,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:t("login.inputPhoneOrEmail"),prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form ",label:t("common.problem.form.question"),name:"questionPicker",initialValue:j},a.a.createElement(Fa.a,{className:"authing-g2-select",onChange:function(e){_(e)}},null===r||void 0===r?void 0:r.map((function(e){var t=e.value,n=e.label;return a.a.createElement(Fa.a.Option,{key:t,value:t,className:"authing-g2-question-option ".concat(j===t?"authing-g2-question-option-active":"")},n)})))),a.a.createElement("div",{className:"authing-g2-input-form"},null===R||void 0===R?void 0:R.map((function(e,t){return a.a.createElement("div",{key:t},e)}))),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"description",label:t("common.problem.form.questionDescript")},a.a.createElement(Zi.a.TextArea,{className:"authing-g2-questions-textarea",maxLength:200,showCount:!0,rows:4,style:{marginBottom:10}})),a.a.createElement("div",{className:"authing-g2-input-form"},a.a.createElement("div",{className:"label-title"},t("common.problem.form.questionClip")),a.a.createElement("div",{className:"g2-questions"},a.a.createElement(Da.a,{action:"".concat(e.host,"/api/v2/upload?folder=photos"),listType:"picture-card",accept:"image/png, image/jpeg, image/jpg",className:"authing-g2-questions-upload-self",fileList:N,onPreview:M,onChange:function(e){A(e.fileList);var t=e.fileList.map((function(e){var t=e.response;return null===t||void 0===t?void 0:t.data.url}));v(t)},beforeUpload:function(e){return!!["image/png","image/jpeg","image/jpg"].includes(e.type)||Promise.reject(e)},itemRender:function(e,t){return a.a.createElement(a.a.Fragment,null,"uploading"===t.status?a.a.createElement("div",{style:{padding:6,borderRadius:2,border:"1px solid #d9d9d9"}},a.a.createElement(Zc.a,{showInfo:!1,style:{margin:1},width:40,type:"circle",percent:t.percent})):e)}},N.length<4&&a.a.createElement(Va.a,null)))),a.a.createElement(bi.a.Item,{className:"authing-g2-input-form submit-form"},a.a.createElement(qi,{className:"forget-password",text:t("common.problem.form.submit"),ref:L}))),a.a.createElement(pi.a,{visible:C,title:null,footer:null,onCancel:function(){return E(!1)}},a.a.createElement("img",{alt:"example",style:{width:"100%"},src:S})))},eu=function(e){var t=Object(Ei.a)().t,n=Tr(),o=xr().changeModule,r=Ir();return a.a.createElement("div",{className:"g2-view-container g2-need-help"},a.a.createElement("div",{className:"g2-view-header"},a.a.createElement(Wi,{src:r.logo,size:48,borderRadius:4,alt:"",className:"icon"}),a.a.createElement("div",{className:"title"},t("common.problem.title"))),a.a.createElement("div",{className:"g2-view-tabs"},a.a.createElement(Xc,{appId:n,host:r.host,onSuccess:function(){null===o||void 0===o||o(_e.SUBMIT_SUCCESS)}})),a.a.createElement("div",{className:"g2-tips-line "},a.a.createElement("div",{className:"back-to-login"},a.a.createElement("span",{className:"gray"},t("common.noQuestions")),a.a.createElement("span",{className:"link-like",onClick:function(){return null===o||void 0===o?void 0:o(_e.LOGIN)}},t("common.goToLogin")))))};function tu(e,t){return nu.apply(this,arguments)}function nu(){return(nu=Object(m.a)(h.a.mark((function e(t,n){var o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=ri(),r=o.authFlow,e.next=3,r(t,Object(l.a)({},n));case 3:return i=e.sent,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e.RecoveryTotp="recovery-totp",e.ConfirmTotpRecoveryCode="confirm-totp-recovery-code"}(qc||(qc={}));var ou,ru,iu=Ci.a.Paragraph,au=function(e){var t=e.secret,n=e.onBind,o=Object(Ei.a)().t,r=bi.a.useForm(),s=Object(d.a)(r,1)[0],c=jr(),u=Object(i.useRef)(null),l=function(){var e=Object(m.a)(h.a.mark((function e(){var t,o,r,i,a,l,d,p,m;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=u.current)||void 0===t||t.onSpin(!0),!c){e.next=12;break}return e.next=4,tu(qc.ConfirmTotpRecoveryCode,{});case 4:r=e.sent,i=r.isFlowEnd,a=r.data,l=r.onGuardHandling,null===(o=u.current)||void 0===o||o.onSpin(!1),i?n(a):(null===(d=u.current)||void 0===d||d.onError(),null===l||void 0===l||l()),e.next=24;break;case 12:return e.prev=12,e.next=15,s.validateFields();case 15:n(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),null===(p=u.current)||void 0===p||p.onError();case 21:return e.prev=21,null===(m=u.current)||void 0===m||m.onSpin(!1),e.finish(21);case 24:case"end":return e.stop()}}),e,null,[[12,18,21,24]])})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"authing-g2-mfa-title"},o("common.useRecoverCode")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},o("common.totpGenerateCode")),a.a.createElement("div",{className:"g2-mfa-bindTotp-copySecret"},a.a.createElement(iu,{copyable:!0},t)),a.a.createElement(bi.a,{form:s,onFinish:l,style:{width:"100%"},onFinishFailed:function(){var e;return null===(e=u.current)||void 0===e?void 0:e.onError()}},a.a.createElement(bi.a.Item,{className:"authing-g2-input-form g2-mfa-totp-recoveryCode-input",name:"remember",rules:[{validator:function(e,t){return t?Promise.resolve():Promise.reject(o("common.pleaseRecordKey"))}}],valuePropName:"checked"},a.a.createElement(gi.a,{className:"g2-mfa-bindTotp-secretSave"},o("login.rememberedSecret"))),a.a.createElement(qi,{text:o("common.confirm"),ref:u})))},su=function(e){var t=e.mfaToken,n=e.onSubmit,o=Object(Ei.a)().t,r=jr(),s=bi.a.useForm(),c=Object(d.a)(s,1)[0],u=ii().post,l=Object(i.useRef)(null),p=function(){var e=Object(m.a)(h.a.mark((function e(o){var i,a,s,d,p,m,f,g,v,b,y,C;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(i=l.current)||void 0===i||i.onSpin(!0),!r){e.next=12;break}return e.next=4,tu(qc.RecoveryTotp,{recoveryCode:o.recoveryCode});case 4:s=e.sent,d=s.data,p=s.onGuardHandling,m=s.statusCode,null===(a=l.current)||void 0===a||a.onSpin(!1),200===m?n(d.recoveryCode):(null===(f=l.current)||void 0===f||f.onError(),null===p||void 0===p||p()),e.next=25;break;case 12:return e.prev=12,e.next=15,u("/api/v2/mfa/totp/recovery",{recoveryCode:c.getFieldValue("recoveryCode")},{headers:{authorization:t}});case 15:200===(g=e.sent).code?n(g.recoveryCode,g.data):(null===(v=l.current)||void 0===v||v.onError(),null===(b=g.onGuardHandling)||void 0===b||b.call(g)),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(12),null===(y=l.current)||void 0===y||y.onError();case 22:return e.prev=22,null===(C=l.current)||void 0===C||C.onSpin(!1),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[12,19,22,25]])})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"authing-g2-mfa-title"},o("common.useRecoverCode")),a.a.createElement("p",{className:"authing-g2-mfa-tips"},o("login.mfaAfterReset")),a.a.createElement(bi.a,{form:c,onFinish:p,onFinishFailed:function(){return l.current.onError()}},a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"recoveryCode",rules:[{required:!0,message:o("login.inputRecoverCode")}]},a.a.createElement(Zi.a,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:o("login.inputRecoverCode"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{className:"authing-g2-input-form submit-form"},a.a.createElement(qi,{text:o("common.sure"),ref:l}))))},cu=(n(752),function(){var e=xr().changeModule,t=Nr(),n=Ar(),o=Object(Ei.a)().t,r=Object(i.useState)(),s=Object(d.a)(r,2),c=s[0],u=s[1],p=Object(i.useState)(),h=Object(d.a)(p,2),m=h[0],f=h[1],g=dr(),v=Object(i.useMemo)((function(){return a.a.createElement(ia,{onBack:function(){return null===e||void 0===e?void 0:e(_e.MFA,Object(l.a)(Object(l.a)({},t),{},{current:Ui.TOTP}))}},o("common.backToVerify"))}),[e,t,o]);return a.a.createElement("div",{className:"g2-view-container g2-mfa-recovery-code"},v,a.a.createElement("div",{className:"g2-mfa-content"},c&&m?a.a.createElement(au,{secret:m,onBind:function(){var e;c&&(null===n||void 0===n||null===(e=n.onLogin)||void 0===e||e.call(n,c,g))}}):a.a.createElement(su,{mfaToken:t.mfaToken,onSubmit:function(e,t){u(t),f(e)}})))}),uu=function(){var e=xr().changeModule,t=Nr(),n=Object(i.useState)(),o=Object(d.a)(n,2),r=o[0],s=o[1],c=Ar(),u=dr(),p=Object(Ei.a)().t,h=Object(i.useMemo)((function(){return a.a.createElement(ia,{onBack:function(){return null===e||void 0===e?void 0:e(_e.MFA,Object(l.a)(Object(l.a)({},t),{},{current:Ui.TOTP}))}},p("common.backToVerify"))}),[e,t,p]);return a.a.createElement("div",{className:"g2-view-container g2-mfa-recovery-code"},h,a.a.createElement("div",{className:"g2-mfa-content"},r?a.a.createElement(au,{secret:r,onBind:function(e){var t;e&&(null===c||void 0===c||null===(t=c.onLogin)||void 0===t||t.call(c,e,u))}}):a.a.createElement(su,{mfaToken:t.mfaToken,onSubmit:function(e){s(e)}})))},lu=function(){var e=jr();return a.a.createElement(a.a.Fragment,null,e?a.a.createElement(uu,null):a.a.createElement(cu,null))},du=function(e){var t=Sr().extendsFields;return!!Sr().complateFiledsPlace.includes("register")&&(!(!Boolean(X()(t,e))||0===t.length)&&(1!==t.length||t[0].name!==e))},pu=function(e){var t=e.onRegisterSuccess,n=e.onRegisterFailed,o=e.onBeforeRegister,r=e.agreements,s=e.registeContext,c=Object(Ei.a)().t,u=Object(i.useRef)(null),l=ji().isPhoneMedia,p=dr(),f=bi.a.useForm(),g=Object(d.a)(f,1)[0],v=du("email"),b=xr().changeModule,y=Object(i.useState)(!1),C=Object(d.a)(y,2),E=C[0],w=C[1],O=Object(i.useState)(!1),S=Object(d.a)(O,2),k=S[0],T=S[1],P=ba(),N=P.getPassWordUnsafeText,A=P.setPasswordErrorTextShow,x=Object(hi.a)(function(){var e=Object(m.a)(h.a.mark((function e(i){var a,c,l,d,m,f,y,C,w,O,S,k,P,N;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(a=u.current)||void 0===a||a.onSpin(!0),!o){e.next=16;break}return e.prev=2,e.next=5,o({type:fo.Phone,data:{phone:i.phone,password:i.password,code:i.code}},p);case 5:if(e.sent){e.next=9;break}return null===(c=u.current)||void 0===c||c.onSpin(!1),e.abrupt("return");case 9:e.next=16;break;case 11:return e.prev=11,e.t0=e.catch(2),"string"===typeof e.t0?hr.a.error(e.t0):hr.a.error(null===e.t0||void 0===e.t0?void 0:e.t0.message),null===(l=u.current)||void 0===l||l.onSpin(!1),e.abrupt("return");case 16:return e.prev=16,e.next=19,g.validateFields();case 19:if(T(!0),null===r||void 0===r||!r.length||E){e.next=23;break}return u.current.onError(),e.abrupt("return");case 23:if(m=i.email,f=i.password,y=null!==s&&void 0!==s?s:{},C={email:m,password:f,profile:{browser:"undefined"!==typeof navigator?navigator.userAgent:null,device:se()},options:{context:y,generateToken:!0}},w=function(e){t(e,{registerFrom:fo.Email,account:m})},!v){e.next=30;break}return null===b||void 0===b||b(_e.REGISTER_COMPLETE_INFO,{businessRequestName:"registerByEmail",content:C,onRegisterSuccess:w,onRegisterFailed:n}),e.abrupt("return");case 30:return e.next=32,p.registerByEmail(C.email,C.password,C.profile,C.options);case 32:O=e.sent,null===(d=u.current)||void 0===d||d.onSpin(!1),w(O),e.next=44;break;case 37:e.prev=37,e.t1=e.catch(16),S=e.t1.message,k=e.t1.code,P=e.t1.data,k===Iu.UNSAFE_PASSWORD_TIP&&A(!0),u.current.onError(),hr.a.error(S),n(k,P,S);case 44:return e.prev=44,null===(N=u.current)||void 0===N||N.onSpin(!1),e.finish(44);case 47:case"end":return e.stop()}}),e,null,[[2,11],[16,37,44,47]])})));return function(t){return e.apply(this,arguments)}}(),[g,E],{loading:!1}),I=Object(d.a)(x,2)[1];return a.a.createElement("div",{className:"authing-g2-register-email"},a.a.createElement(bi.a,{form:g,name:"emailRegister",autoComplete:"off",onSubmitCapture:function(){return u.current.onSpin(!0)},onFinish:function(e){I(e)},onFinishFailed:function(){return u.current.onError()},onValuesChange:function(e,t){t.password&&t["new-password"]&&g.validateFields(["new-password"])}},a.a.createElement(ma.Email,{key:"email",name:"email",className:"authing-g2-input-form",validateFirst:!0,form:g,checkRepeat:!0,required:!0},a.a.createElement(Zi.a,{autoFocus:!l,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:c("login.inputEmail"),prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),a.a.createElement(ma.Password,{key:"password",name:"password",className:"authing-g2-input-form",validateFirst:!0},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:c("login.inputPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),a.a.createElement(ma.Password,{key:"new-password",name:"new-password",fieldRequiredRuleMessage:c("common.repeatPasswordDoc"),rules:[{validateTrigger:"onBlur",validator:function(e,t){return t!==g.getFieldValue("password")&&t?Promise.reject(c("common.repeatPasswordDoc")):Promise.resolve()}}],className:"authing-g2-input-form",validateFirst:!0},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:c("common.passwordAgain"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),Boolean(null===r||void 0===r?void 0:r.length)&&a.a.createElement(Qs,{onChange:w,agreements:r,showError:k}),N(),a.a.createElement(bi.a.Item,null,a.a.createElement(qi,{text:c("common.register"),ref:u}))))},hu=function(e){var t,n,o,r=e.onRegisterSuccess,s=e.onRegisterFailed,c=e.onBeforeRegister,u=e.agreements,p=e.publicConfig,f=e.registeContext,g=e.methods,v=void 0===g?[]:g,b=Object(Ei.a)().t,y=du("phone"),C=du("email"),E=Ir(),w=ji().isPhoneMedia,O=dr(),S=xr().changeModule,k=ii().post,T=Object(i.useRef)(null),P=bi.a.useForm(),A=Object(d.a)(P,1)[0],x=Object(i.useState)(!1),I=Object(d.a)(x,2),j=I[0],_=I[1],L=Object(i.useState)(!1),R=Object(d.a)(L,2),M=R[0],F=R[1],B=Object(i.useState)((null===p||void 0===p||null===(t=p.internationalSmsConfig)||void 0===t?void 0:t.defaultISOType)||"CN"),D=Object(d.a)(B,2),q=D[0],U=D[1],V=null!==(n=null===p||void 0===p?void 0:p.verifyCodeLength)&&void 0!==n?n:4,H=Object(i.useState)(v[0]),z=Object(d.a)(H,2),G=z[0],W=z[1],K=Object(i.useState)(""),$=Object(d.a)(K,2),Y=$[0],Q=$[1],J=Object(i.useState)(!1),Z=Object(d.a)(J,2),X=Z[0],ee=Z[1],te=(null===p||void 0===p||null===(o=p.internationalSmsConfig)||void 0===o?void 0:o.enabled)||!1;Object(i.useEffect)((function(){var e;1===v.length&&"phone-code"===v[0]&&p&&null!==(e=p.internationalSmsConfig)&&void 0!==e&&e.enabled&&ee(!0)}),[v,p]);var ne=Object(i.useCallback)(function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,i,a,l,d,p,m,g,v,b,C,w,P,x,I,_,L,R,M,B,D,U,V,H,z,G,W,K,$;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null===(n=E.passwordLoginMethods)||void 0===n?void 0:n.includes("phone-password"),null===(o=T.current)||void 0===o||o.onSpin(!0),t.phone=t.identify,!c){e.next=18;break}return e.prev=4,e.next=7,c({type:N.Phone,data:{phone:t.phone,password:t.password,code:t.code}},O);case 7:if(e.sent){e.next=11;break}return T.current.onSpin(!1),e.abrupt("return");case 11:e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(4),"string"===typeof e.t0?hr.a.error(e.t0):hr.a.error(null===e.t0||void 0===e.t0?void 0:e.t0.message),T.current.onSpin(!1),e.abrupt("return");case 18:return e.prev=18,e.next=21,A.validateFields();case 21:if(F(!0),null===u||void 0===u||!u.length||j){e.next=25;break}return T.current.onError(),e.abrupt("return");case 25:if(a=t.phone,l=t.password,d=void 0===l?"":l,p=t.code,m=null!==f&&void 0!==f?f:{},g=_i(te,a,q),v=g.phoneNumber,b=g.countryCode,C={context:m,generateToken:!0},te&&(C.phoneCountryCode=b),w={phone:v,code:p,password:d,profile:{browser:"undefined"!==typeof navigator?navigator.userAgent:null,device:se()},options:C},P=function(e){r(e,{registerFrom:N.Phone,account:te?"":v})},!i){e.next=50;break}return e.next=35,k("/api/v2/sms/preCheckCode",{phone:v,phoneCode:p,phoneCountryCode:b});case 35:if(x=e.sent,I=x.statusCode,_=x.data,L=_.valid,R=_.message,200!==I||!L){e.next=45;break}return null===S||void 0===S||S(_e.REGISTER_PASSWORD,{businessRequestName:"registerByPhoneCode",content:w,isChangeComplete:y,onRegisterSuccess:P,onRegisterFailed:s}),e.abrupt("return");case 45:return T.current.onError(),hr.a.error(R),e.abrupt("return");case 48:e.next=71;break;case 50:if(!y){e.next=66;break}return e.next=53,k("/api/v2/sms/preCheckCode",{phone:v,phoneCode:p,phoneCountryCode:b});case 53:if(B=e.sent,D=B.statusCode,U=B.data,V=U.valid,H=U.message,200!==D||!V){e.next=63;break}return null===S||void 0===S||S(_e.REGISTER_COMPLETE_INFO,{businessRequestName:"registerByPhoneCode",content:w,onRegisterSuccess:P,onRegisterFailed:s}),e.abrupt("return");case 63:return T.current.onError(),hr.a.error(H),e.abrupt("return");case 66:return e.next=68,O.registerByPhoneCode(v,p,d,{browser:"undefined"!==typeof navigator?navigator.userAgent:null,device:se()},C);case 68:z=e.sent,null===(M=T.current)||void 0===M||M.onSpin(!1),P(z);case 71:e.next=79;break;case 73:e.prev=73,e.t1=e.catch(18),G=e.t1.message,W=e.t1.code,K=e.t1.data,T.current.onError(),hr.a.error(G),!i&&s(W,K,G);case 79:return e.prev=79,null===($=T.current)||void 0===$||$.onSpin(!1),e.finish(79);case 82:case"end":return e.stop()}}),e,null,[[4,13],[18,73,79,82]])})));return function(t){return e.apply(this,arguments)}}(),[E.passwordLoginMethods,c,O,A,null===u||void 0===u?void 0:u.length,j,f,te,q,k,S,y,r,s]),oe=Object(i.useCallback)(function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,i,a,d,p,m,g,v,b,y,w,P,x,I,_,L,R,M,B,D,q,U,V,H,z;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=null===(n=E.passwordLoginMethods)||void 0===n?void 0:n.includes("email-password"),T.current.onSpin(!0),t.email=t.identify,!c){e.next=18;break}return e.prev=4,e.next=7,c({type:N.Phone,data:{phone:t.phone,password:t.password,code:t.code}},O);case 7:if(e.sent){e.next=11;break}return T.current.onSpin(!1),e.abrupt("return");case 11:e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(4),"string"===typeof e.t0?hr.a.error(e.t0):hr.a.error(null===e.t0||void 0===e.t0?void 0:e.t0.message),T.current.onSpin(!1),e.abrupt("return");case 18:return e.prev=18,e.next=21,A.validateFields();case 21:if(F(!0),null===u||void 0===u||!u.length||j){e.next=25;break}return T.current.onError(),e.abrupt("return");case 25:if(i=t.email,a=t.code,d=null!==f&&void 0!==f?f:{},p={email:i,code:a,profile:{browser:"undefined"!==typeof navigator?navigator.userAgent:null,device:se()},options:{context:JSON.stringify(d),generateToken:!0}},m=function(e){r(e,{registerFrom:N.EmailCode,account:i})},!o){e.next=47;break}return e.next=32,k("/api/v2/email/preCheckCode",{email:i,emailCode:a});case 32:if(g=e.sent,v=g.statusCode,b=g.data,y=b.valid,w=b.message,200!==v||!y){e.next=42;break}return null===S||void 0===S||S(_e.REGISTER_PASSWORD,{businessRequestName:"registerByEmailCode",content:p,isChangeComplete:C,onRegisterSuccess:m,onRegisterFailed:s}),e.abrupt("return");case 42:return T.current.onError(),hr.a.error(w),e.abrupt("return");case 45:e.next=72;break;case 47:if(!C){e.next=63;break}return e.next=50,k("/api/v2/email/preCheckCode",{email:i,emailCode:a});case 50:if(P=e.sent,x=P.statusCode,I=P.data,_=I.valid,L=I.message,200!==x||!_){e.next=60;break}return null===S||void 0===S||S(_e.REGISTER_COMPLETE_INFO,{businessRequestName:"registerByEmailCode",content:p,onRegisterSuccess:m,onRegisterFailed:s}),e.abrupt("return");case 60:return T.current.onError(),hr.a.error(L),e.abrupt("return");case 63:return e.next=65,k("/api/v2/register/email-code",Object(l.a)({email:p.email,code:p.code,profile:p.profile},p.options));case 65:R=e.sent,M=R.code,B=R.data,D=R.onGuardHandling,q=R.message,T.current.onSpin(!1),200===M?m(B):(null===D||void 0===D||D(),s(a,B,q));case 72:e.next=80;break;case 74:e.prev=74,e.t1=e.catch(18),U=e.t1.message,V=e.t1.code,H=e.t1.data,T.current.onError(),hr.a.error(U),!o&&s(V,H,hr.a);case 80:return e.prev=80,null===(z=T.current)||void 0===z||z.onSpin(!1),e.finish(80);case 83:case"end":return e.stop()}}),e,null,[[4,13],[18,74,80,83]])})));return function(t){return e.apply(this,arguments)}}(),[E.passwordLoginMethods,c,O,A,null===u||void 0===u?void 0:u.length,j,f,k,S,C,r,s]),re=Object(i.useCallback)(function(){var e=Object(m.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(G!==To.EmailCode){e.next=5;break}return e.next=3,oe(t);case 3:e.next=8;break;case 5:if(G!==To.PhoneCode){e.next=8;break}return e.next=8,ne(t);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[G,oe,ne]),ce=Object(i.useCallback)((function(e){return X?a.a.createElement(rs,Object(wi.a)({},e,{form:A,fieldName:"identify",className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:b("common.inputFourVerifyCode",{length:V}),areaCode:q,prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),isInternationSms:te,scene:bo.SCENE_TYPE_REGISTER,maxLength:V,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})):a.a.createElement(a.a.Fragment,null,G===To.PhoneCode&&a.a.createElement(rs,Object(wi.a)({},e,{isInternationSms:te,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:b("common.inputFourVerifyCode",{length:V}),areaCode:q,prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:bo.SCENE_TYPE_REGISTER,maxLength:V,data:Y,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})),G===To.EmailCode&&a.a.createElement(ns,Object(wi.a)({},e,{className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:b("common.inputFourVerifyCode",{length:V}),prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:No.REGISTER_VERIFY_CODE,maxLength:V,data:Y,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})))}),[q,G,A,Y,te,X,b,V]),ue=Object(i.useCallback)((function(e){return a.a.createElement(ls,Object(wi.a)({},e,{className:"authing-g2-input",size:"large",areaCode:q,onAreaCodeChange:function(e){U(e),A.getFieldValue(["identify"])&&A.validateFields(["identify"])}}))}),[q,A]);return a.a.createElement("div",{className:"authing-g2-register-email"},a.a.createElement(bi.a,{form:A,name:"emailRegister",autoComplete:"off",onSubmitCapture:function(){return T.current.onSpin(!0)},onFinish:re,onFinishFailed:function(){return T.current.onError()}},a.a.createElement(As,{name:"identify",className:X?"authing-g2-input-form remove-padding":"authing-g2-input-form",methods:v,currentMethod:G,areaCode:q,checkRepeat:!0,required:!0},X?a.a.createElement(ue,{autoFocus:!w}):a.a.createElement(Is,{className:"authing-g2-input",size:"large",autoFocus:!w,value:Y,methods:v,onChange:function(e){var t=e.target.value;Q(t),1!==v.length&&(ie("email",t)?W(To.EmailCode):W(To.PhoneCode))},prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{key:"code",name:"code",validateTrigger:["onBlur","onChange"],rules:ae(b("common.captchaCode")),className:"authing-g2-input-form",validateFirst:!0},a.a.createElement(ce,null)),Boolean(null===u||void 0===u?void 0:u.length)&&a.a.createElement(Qs,{onChange:_,agreements:u,showError:M}),a.a.createElement(bi.a.Item,null,a.a.createElement(qi,{text:b("common.register"),ref:T}))))},mu=function(){var e=Ar(),t=Ir(),n=xr().changeModule,o=Object(Ei.a)().t,r=null===t||void 0===t?void 0:t.agreementEnabled,s=t.langRange,c=dr(),u=Sr(),l=Object(i.useMemo)((function(){var e=[],n=t.registerMethods;return null!==n&&void 0!==n&&n.includes(N.EmailCode)&&e.push("email-code"),null!==n&&void 0!==n&&n.includes(N.Phone)&&e.push("phone-code"),e}),[t]),d=Object(i.useMemo)((function(){var o,i;return{onRegisterSuccess:function(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=Se(u,r.registerFrom),a={};i&&(a.specifyDefaultLoginMethod=i.specifyDefaultLoginMethod,(null===i||void 0===i?void 0:i.lockMethod)&&(a._lockMethod=i.lockMethod),a._firstItemInitialValue=r.account),null===e||void 0===e||null===(t=e.onRegister)||void 0===t||t.call(e,o,c),null===n||void 0===n||n(_e.LOGIN,a)},onRegisterFailed:function(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;null===e||void 0===e||null===(n=e.onRegisterError)||void 0===n||n.call(e,{code:t,data:o,message:r})},registeContext:t.registerContext,onBeforeRegister:null===e||void 0===e?void 0:e.onBeforeRegister,agreements:r&&null!==(o=null===t||void 0===t||null===(i=t.agreements)||void 0===i?void 0:i.filter((function(e){return e.lang===_.a.language&&1!==(null===e||void 0===e?void 0:e.availableAt)})))&&void 0!==o?o:[],publicConfig:u,methods:l}}),[r,null===t||void 0===t?void 0:t.agreements,null===e||void 0===e?void 0:e.onBeforeRegister,_.a.language,l]),p=Object(i.useMemo)((function(){var e,t="";return t=l.length>1?o("common.verifyCodeRegister"):l.includes("phone-code")?o("common.phoneVerifyCode"):l.includes("email-code")?o("common.emailVerifyCode"):o("common.verifyCodeRegister"),e={},Object(g.a)(e,N.Email,{component:a.a.createElement(pu,d),name:o("common.PasswordRegister")}),Object(g.a)(e,N.Phone,{component:a.a.createElement(hu,d),name:t}),e}),[d,o,l]),h=Object(i.useMemo)((function(){var e,n=t.registerMethods,o=t.defaultRegisterMethod,r=null===n||void 0===n?void 0:n.filter((function(e){return[N.Email,N.EmailCode,N.Phone].includes(e)}));return null===(e=function(e,t){var n=t.indexOf(e),o=t.splice(n,1)[0];return t.unshift(o),t}(o,Object(f.a)(new Set(null===r||void 0===r?void 0:r.map((function(e){switch(e){case N.EmailCode:case N.Phone:return N.Phone;case N.Email:return N.Email;default:return e}}))))))||void 0===e?void 0:e.map((function(e){return a.a.createElement(Os.a.TabPane,{tab:p[e].name,key:e},p[e].component)}))}),[t,p]);return a.a.createElement("div",{className:"g2-view-container g2-view-register"},a.a.createElement("div",{className:"g2-view-container-inner"},a.a.createElement("div",{className:"g2-view-header"},a.a.createElement("img",{src:null===t||void 0===t?void 0:t.logo,alt:"",className:"icon"}),a.a.createElement("div",{className:"title"},null===t||void 0===t?void 0:t.title)),a.a.createElement("div",{className:"g2-view-tabs"},a.a.createElement(Os.a,{destroyInactiveTabPane:!0,defaultActiveKey:null===t||void 0===t?void 0:t.defaultRegisterMethod,onChange:function(t){var n;null===e||void 0===e||null===(n=e.onRegisterTabChange)||void 0===n||n.call(e,t)}},h)),a.a.createElement("div",{className:"g2-tips-line"},a.a.createElement("span",{className:"back-to-login"},a.a.createElement("span",{className:"link-like",onClick:function(){return null===n||void 0===n?void 0:n(_e.LOGIN,{})}},o("common.backLoginPage"))))),a.a.createElement(pc,{langRange:s,onLangChange:null===e||void 0===e?void 0:e.onLangChange}))},fu=function(){var e=Object(Ei.a)().t,t=Nr(),n=xr().changeModule,o=Object(i.useState)(5),r=Object(d.a)(o,2),s=r[0],c=r[1],u=Object(i.useRef)(0),l=Sr(),p=null!==t&&void 0!==t?t:{},h=p.title,m=void 0===h?e("common.problem.successTip"):h,f=p.message,g=void 0===f?e("common.problem.successTipMsg"):f,v=p.text,b=void 0===v?e("common.backLoginPage"):v,y=p.countDesc,C=void 0===y?e("common.pToLogin"):y,E=p.changeModule,w=void 0===E?_e.LOGIN:E,O=null===l||void 0===l?void 0:l.cdnBase;return Object(i.useEffect)((function(){return u.current=setInterval((function(){c((function(e){return e-1}))}),1e3),function(){return clearInterval(u.current)}}),[]),Object(i.useEffect)((function(){s<=0&&(clearInterval(u.current),null===n||void 0===n||n(w))}),[s]),a.a.createElement("div",{className:"g2-view-container g2-submit-success"},a.a.createElement("div",{className:"g2-view-tabs g2-questions-send-success-page"},a.a.createElement(Wi,{className:"plate",src:"".concat(O,"/questions-send-ok.png"),alt:"",width:191,height:146}),a.a.createElement("div",{className:"title"},m),a.a.createElement("div",{className:"message"},g),a.a.createElement(qi,{onClick:function(){null===n||void 0===n||n(w)},text:b}),a.a.createElement("div",{className:"timer-tip"},s," ",C)))},gu=n(356),vu=n.n(gu),bu=n(357),yu=n.n(bu);!function(e){e.PhoneCode="phone-code",e.EmailCode="emial-code",e.Password="password"}(ou||(ou={})),function(e){e.CreateUser="create-federation-account",e.BindByPassword="bind-identity-by-password",e.BindByPhoneCode="bind-identity-by-phone-code",e.BindByEmailCode="bind-identity-by-email-code"}(ru||(ru={}));var Cu,Eu=function(){var e,t=ii().authFlow;return e={},Object(g.a)(e,ou.PhoneCode,(function(e){return t(ru.BindByPhoneCode,e)})),Object(g.a)(e,ou.EmailCode,(function(e){return t(ru.BindByEmailCode,e)})),Object(g.a)(e,ou.Password,(function(e){return t(ru.BindByPassword,e)})),e},wu=(n(753),function(){var e,t=Nr(),n=Ir(),o=xr().backModule,r=Object(Ei.a)().t,s=Ar(),c=n.publicKey,u=n.agreementEnabled,d=Sr(),p=Or().spinChange,f=(null===d||void 0===d||null===(e=d.internationalSmsConfig)||void 0===e?void 0:e.enabled)||!1,g=dr(),v=Eu()[ou.PhoneCode],b=Eu()[ou.EmailCode],y=Eu()[ou.Password],C={"phone-code":function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.identity,o=t.code,r=t.phoneCountryCode,i={phone:n,code:o},f&&(i.phoneCountryCode=r),e.next=5,v(i);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),"email-code":function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.identity,o=t.code,e.next=3,b({email:n,code:o});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),password:function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.identity,o=t.password,r=g.options.encryptFunction,i=t.captchaCode&&t.captchaCode.trim(),e.next=5,r(o,c);case 5:return a=e.sent,e.next=8,y({account:n,password:a,captchaCode:i});case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},E=function(e){var t,n;null===s||void 0===s||null===(t=s.onBinding)||void 0===t||t.call(s,e,g),null===s||void 0===s||null===(n=s.onLogin)||void 0===n||n.call(s,e,g)},w=function(e,t,n){var o,r;null===s||void 0===s||null===(o=s.onBindingError)||void 0===o||o.call(s,{code:e,data:t,message:n}),null===s||void 0===s||null===(r=s.onLoginError)||void 0===r||r.call(s,{code:e,data:t,message:n})},O=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.type,r=t.data,p(!0),e.next=4,null===(n=C[o])||void 0===n?void 0:n.call(C,r);case 4:if(i=e.sent,a=i.isFlowEnd,p(!1),!a){e.next=9;break}return e.abrupt("return",Object(l.a)(Object(l.a)({},i),{},{apiCode:200,code:200}));case 9:return e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=Object(i.useMemo)((function(){var e,t;return u&&null!==(e=null===n||void 0===n||null===(t=n.agreements)||void 0===t?void 0:t.filter((function(e){return e.lang===_.a.language&&!(null===e||void 0===e||!e.availableAt)})))&&void 0!==e?e:[]}),[u,null===n||void 0===n?void 0:n.agreements,_.a.language]),k=Object(i.useMemo)((function(){var e=["username-password","email-password","phone-password"];return t.methods.filter((function(t){return e.includes(t)}))}),[t.methods]),T=Object(i.useMemo)((function(){var e=["email-code","phone-code"];return t.methods.filter((function(t){return e.includes(t)}))}),[t.methods]),P=[{key:"code",title:r("common.verifyCodeLogin"),component:a.a.createElement(hc,{verifyCodeLength:null===d||void 0===d?void 0:d.verifyCodeLength,autoRegister:!1,onLoginRequest:O,onLoginSuccess:E,onLoginFailed:w,agreements:S,methods:T,submitButText:r("common.bind")})},{key:"password",title:r("login.pwdLogin"),component:a.a.createElement(Js,{publicKey:c,autoRegister:!1,host:n.host,onLoginRequest:O,passwordLoginMethods:k,onLoginSuccess:E,onLoginFailed:w,agreements:S,submitButText:r("common.bind")})}],N=Object(i.useMemo)((function(){return t.source===_e.IDENTITY_BINDING_ASK?a.a.createElement(ia,{onBack:function(){return null===o||void 0===o?void 0:o()}},r("common.back")):a.a.createElement(ra,null)}),[o,t.source,r]);return a.a.createElement("div",{className:"g2-view-container g2-view-identity-binding"},N,a.a.createElement("div",{className:"g2-view-identity-binding-content"},a.a.createElement("div",{className:"g2-view-identity-binding-content-logo"},a.a.createElement("img",{src:null===n||void 0===n?void 0:n.logo,alt:"",className:"logo"})),a.a.createElement("div",{className:"g2-view-identity-binding-content-title"},a.a.createElement("span",null,r("common.identityBindingTitle"))),a.a.createElement("div",{className:"g2-view-identity-binding-content-desc"},a.a.createElement("span",null,r("common.identityBindingDesc"))),a.a.createElement("div",{className:"g2-view-identity-binding-content-login"},a.a.createElement(Os.a,null,P.filter((function(e){return"password"===e.key?0!==k.length:"code"!==e.key||0!==T.length})).map((function(e){return a.a.createElement(Os.a.TabPane,{key:e.key,tab:e.title},e.component)}))))))}),Ou=(n(754),function(){var e=Nr(),t=xr().changeModule,n=Object(Ei.a)().t,o=ii().authFlow,r=dr(),i=Ar(),s=Or().spinChange,c=function(e){var t,n;null===i||void 0===i||null===(t=i.onLogin)||void 0===t||t.call(i,e,r),null===i||void 0===i||null===(n=i.onCreate)||void 0===n||n.call(i,e,r)},u=function(e,t){var n,o;null===i||void 0===i||null===(n=i.onCreateError)||void 0===n||n.call(i,{code:e,data:t}),null===i||void 0===i||null===(o=i.onLoginError)||void 0===o||o.call(i,{code:e,data:t})},p=Object(hi.a)(Object(m.a)(h.a.mark((function e(){var t,n,r,i,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.next=3,o(ru.CreateUser);case 3:t=e.sent,n=t.code,r=t.onGuardHandling,i=t.data,a=t.isFlowEnd,s(!1),a?c(i):(u(n,i),null===r||void 0===r||r());case 10:case"end":return e.stop()}}),e)}))),[]),f=Object(d.a)(p,2),g=f[0],v=f[1];return a.a.createElement("div",{className:"g2-view-container g2-view-identity-binding-ask"},a.a.createElement(ra,null),a.a.createElement("div",{className:"g2-view-identity-binding-ask-content"},a.a.createElement("div",{className:"g2-view-identity-binding-ask-content-title"},a.a.createElement("span",null,n("common.identityBindingAskTitle"))),a.a.createElement("div",{className:"g2-view-identity-binding-ask-content-desc"},a.a.createElement("span",null,n("common.identityBindingAskDesc"))),a.a.createElement("div",{className:"g2-view-identity-binding-ask-content-img"},a.a.createElement(oa,{type:"authing-bind"})),a.a.createElement("div",{className:"g2-view-identity-binding-ask-content-button-group"},a.a.createElement(Bi,{className:"g2-view-identity-binding-ask-content-button g2-view-identity-binding-ask-content-button-create",loading:g.loading,onClick:v},n("common.identityBindingCreate")),a.a.createElement(Bi,{className:" g2-view-identity-binding-ask-content-button g2-view-identity-binding-ask-content-button-binding authing-g2-submit-button",onClick:function(){null===t||void 0===t||t(_e.IDENTITY_BINDING,Object(l.a)(Object(l.a)({},e),{},{source:_e.IDENTITY_BINDING_ASK}))},type:"primary"},n("common.identityBindingBinding")))))});n(755);!function(e){e.email="email-code",e.phone="phone-code"}(Cu||(Cu={}));var Su,ku,Tu=function(e){var t=e.identifyRef,n=Object(Ei.a)().t,o=bi.a.useForm(),r=Object(d.a)(o,1)[0],s=Object(i.useState)(""),c=Object(d.a)(s,2),u=c[0],l=c[1],p=Object(i.useState)("phone"),g=Object(d.a)(p,2),v=g[0],b=g[1],y=Object(i.useRef)(null),C=ji().isPhoneMedia,E=dr(),w=Ar(),O=Nr();Object(i.useEffect)((function(){O.defaultEmail&&(l(O.defaultEmail),r.setFieldsValue({identify:O.defaultEmail}),b("email")),O.defaultPhone&&(l(O.defaultPhone),r.setFieldsValue({identify:O.defaultPhone}),b("phone"))}),[O,r]),Object(i.useEffect)((function(){t&&(t.current=ke(u))}),[u]);var S=ii().authFlow,k=Sr(),T=k.publicKey,P=k.verifyCodeLength,N=k.internationalSmsConfig,A=(null===N||void 0===N?void 0:N.enabled)||!1,x=function(){var e=Object(m.a)(h.a.mark((function e(t){var n,o,r,i,a,s,c,u,l,d,p,m,f,g,b,C,O,k,P,N;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.identify,i=t.code,a=t.password,e.next=5,null===(n=E.options)||void 0===n||null===(o=n.encryptFunction)||void 0===o?void 0:o.call(n,a,T);case 5:if(s=e.sent,"email"!==v){e.next=15;break}return e.next=9,S("unlock-account-by-email",{email:r,code:i,password:s});case 9:u=e.sent,l=u.isFlowEnd,d=u.data,p=u.onGuardHandling,null===(c=y.current)||void 0===c||c.onSpin(!1),l?null===w||void 0===w||null===(m=w.onLogin)||void 0===m||m.call(w,d,E):null===p||void 0===p||p();case 15:if("phone"!==v){e.next=25;break}return g=_i(A,r),b=g.phoneNumber,e.next=19,S("unlock-account-by-phone",{phone:b,code:i,password:s});case 19:C=e.sent,O=C.isFlowEnd,k=C.data,P=C.onGuardHandling,null===(f=y.current)||void 0===f||f.onSpin(!1),O?null===w||void 0===w||null===(N=w.onLogin)||void 0===N||N.call(w,k,E):null===P||void 0===P||P();case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=Object(i.useCallback)((function(e){return a.a.createElement(a.a.Fragment,null,"phone"===v&&a.a.createElement(rs,Object(wi.a)({},e,{isInternationSms:A,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:n("common.inputFourVerifyCode",{length:P}),prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:bo.SCENE_TYPE_RESET,maxLength:P,data:u,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)})))})),"email"===v&&a.a.createElement(ns,Object(wi.a)({},e,{className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:n("common.inputFourVerifyCode",{length:P}),prefix:a.a.createElement(oa,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:No.SELF_UNLOCKING_VERIFY_CODE,maxLength:P,data:u,onSendCodeBefore:Object(m.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.validateFields(["identify"]);case 2:case"end":return e.stop()}}),e)}))),value:u})))}),[v,r,u,A,n,P]);return a.a.createElement("div",{className:"authing-g2-login-phone-code"},a.a.createElement(bi.a,{name:"resetPassword",form:r,onFinish:x,onFinishFailed:function(){var e;null===y||void 0===y||null===(e=y.current)||void 0===e||e.onError()},autoComplete:"off"},a.a.createElement(As,{name:"identify",className:"authing-g2-input-form",methods:["email-code","phone-code"],currentMethod:Cu[v]},a.a.createElement(Is,{methods:["email-code","phone-code"],className:"authing-g2-input",autoComplete:"off",autoFocus:!C,size:"large",value:u,onChange:function(e){var t=e.target.value;l(t),ie("email",t)?b("email"):b("phone")},prefix:a.a.createElement(oa,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"code",rules:Object(f.a)(ae(n("common.captchaCode")))},a.a.createElement(I,null)),a.a.createElement(bi.a.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password",rules:Object(f.a)(ae(n("common.password")))},a.a.createElement(va,{className:"authing-g2-input",size:"large",placeholder:n("user.inputOldPwd"),prefix:a.a.createElement(oa,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),a.a.createElement(bi.a.Item,{className:"authing-g2-input-form submit-form"},a.a.createElement(qi,{className:"forget-password",text:n("common.unlock"),ref:y}))))},Pu=function(){var e=Object(Ei.a)().t,t=Ir(),n=xr().changeModule,o=Object(i.useRef)("");return a.a.createElement("div",{className:"g2-view-container g2-forget-password"},a.a.createElement("div",{className:"g2-view-header"},a.a.createElement(Wi,{src:null===t||void 0===t?void 0:t.logo,size:48,borderRadius:4,alt:"",className:"icon"}),a.a.createElement("div",{className:"title"},e("login.selfUnlock")),a.a.createElement("div",{className:"title-explain"},e("login.selfUnlockText"))),a.a.createElement("div",{className:"g2-view-tabs"},a.a.createElement(Tu,{identifyRef:o})),a.a.createElement("div",{className:"g2-tips-line"},a.a.createElement("span",null,e("user.unlockTip")," \xa0"),a.a.createElement("span",{className:"link-like",onClick:function(){return null===n||void 0===n?void 0:n(_e.ANY_QUESTIONS,{identify:o.current})}},e("common.feedback")),a.a.createElement("div",{className:"link-like back-to-login",onClick:function(){return null===n||void 0===n?void 0:n(_e.LOGIN)}},e("common.backLoginPage"))))},Nu="authing-ant";hr.a.config({prefixCls:"".concat(Nu,"-message")}),function(e){e.zhCn="zh-CN",e.enUs="en-US"}(ku||(ku={}));var Au,xu,Iu,ju=(Su={},Object(g.a)(Su,ku.zhCn,vu.a),Object(g.a)(Su,ku.enUs,yu.a),Su),_u=function(e){var t,n,o=e.guardProps,r=Object(i.useContext)(Er).defaultMergedConfig,s=Object(i.useContext)(Er).contextLoaded,c=Object(i.useContext)(Er).currentModule.moduleName,u=kr(),p=xr().changeModule,h=function(){var e=wr.Provider;return{GuardButtonProvider:function(t){var n=t.children,o=a.a.useState(!1),r=Object(d.a)(o,2),i=r[0],s=r[1];return a.a.createElement(e,{value:{spin:i,spinChange:function(e){s(e)}}},n)}}}().GuardButtonProvider,m=Object(i.useMemo)((function(){return r.loadingComponent}),[r]),f=(t={},Object(g.a)(t,_e.ERROR,(function(e){return a.a.createElement(Ts,{key:e})})),Object(g.a)(t,_e.LOGIN,(function(e){return a.a.createElement(vc,{key:e})})),Object(g.a)(t,_e.IDENTITY_BINDING,(function(e){return a.a.createElement(wu,{key:e})})),Object(g.a)(t,_e.IDENTITY_BINDING_ASK,(function(e){return a.a.createElement(Ou,{key:e})})),Object(g.a)(t,_e.MFA,(function(e){return a.a.createElement(Qc,{key:e})})),Object(g.a)(t,_e.REGISTER,(function(e){return a.a.createElement(mu,{key:e})})),Object(g.a)(t,_e.DOWNLOAD_AT,(function(e){return a.a.createElement(ks,{key:e})})),Object(g.a)(t,_e.FORGET_PWD,(function(e){return a.a.createElement(Fs,{key:e})})),Object(g.a)(t,_e.FIRST_LOGIN_PASSWORD,(function(e){return a.a.createElement(Aa,{key:e})})),Object(g.a)(t,_e.NOTICE_PASSWORD_RESET,(function(e){return a.a.createElement(ja,{key:e})})),Object(g.a)(t,_e.FORCED_PASSWORD_RESET,(function(e){return a.a.createElement(Ia,{key:e})})),Object(g.a)(t,_e.BIND_TOTP,(function(e){return a.a.createElement(aa,{key:e})})),Object(g.a)(t,_e.ANY_QUESTIONS,(function(e){return a.a.createElement(eu,{key:e})})),Object(g.a)(t,_e.RECOVERY_CODE,(function(e){return a.a.createElement(lu,{key:e})})),Object(g.a)(t,_e.SUBMIT_SUCCESS,(function(e){return a.a.createElement(fu,{key:e})})),Object(g.a)(t,_e.REGISTER_COMPLETE_INFO,(function(e){return a.a.createElement(Es,{key:e})})),Object(g.a)(t,_e.LOGIN_COMPLETE_INFO,(function(e){return a.a.createElement(Cs,{key:e})})),Object(g.a)(t,_e.REGISTER_PASSWORD,(function(e){return a.a.createElement(_a,{key:e})})),Object(g.a)(t,_e.SELF_UNLOCK,(function(e){return a.a.createElement(Pu,{key:e})})),Object(g.a)(t,_e.UNSAFE_PASSWORD_RESET,(function(e){return a.a.createElement(xa,{key:e})})),t);Object(i.useEffect)((function(){if(u&&p){u.initErrorCodeInterceptor((function(e,t){var n;t.flowHandle&&Kr(t.flowHandle);var o=(n={},Object(g.a)(n,xu.CHANGE_MODULE,(function(){var e=Du[t.apiCode],n=t.data;return p(e,n),xu.CHANGE_MODULE})),Object(g.a)(n,xu.RENDER_MESSAGE,(function(){var e;return hr.a.error(null!==(e=t.message)&&void 0!==e?e:t.messages),xu.RENDER_MESSAGE})),Object(g.a)(n,xu.FLOW_END,(function(){return xu.FLOW_END})),n)[e];if(!o)return t;if(t.apiCode===Iu.FLOW_END){var r=t.data.user;return Object(l.a)(Object(l.a)({},t),{},{onGuardHandling:o,isFlowEnd:!0,data:r?Object(l.a)({},r):t})}return Object(l.a)(Object(l.a)({},t),{},{onGuardHandling:o})}))}}),[u,p]);var v=Object(i.useMemo)((function(){return s?c&&f[c]?f[c]((new Date).toString()):a.a.createElement(Ts,{error:new Error("\u672a\u77e5\u9519\u8bef\uff01moduleName \u4e3a <b>".concat(c,"</b> \u65e0\u6cd5\u8bc6\u522b"))}):m||null}),[f,s,m,c]),b=Object(i.useMemo)((function(){return o.visible}),[o.visible]),y=Object(i.useMemo)((function(){return a.a.createElement(h,null,v)}),[h,v]);return a.a.createElement(li.a,{prefixCls:Nu,locale:ju[_.a.language]},r.mode===T.Modal?a.a.createElement(pi.a,{className:"authing-g2-render-module-modal",closeIcon:a.a.createElement(oa,{type:"authing-close-line",className:"g2-modal-close"}),visible:b,onCancel:null===o||void 0===o?void 0:o.onClose,keyboard:r.escCloseable,maskClosable:!1,getContainer:null!==(n=r.target)&&void 0!==n&&n},a.a.createElement("div",{className:"authing-g2-render-module"},y)):a.a.createElement("div",{className:"authing-g2-render-module"},y))},Lu=function(e){if(!e)return!0;var t=function(e){return bc=e}(e);return J()(t,e)},Ru=function(e){var t=e.guardProps,n=e.initState;return function(e){var t=e.facePlugin;Lu(t)}(t),a.a.createElement(ci,{guardProps:t,initState:n},a.a.createElement(_u,{guardProps:t}))},Mu=function(e,t){return function(e,t){var n=Object.keys(e).filter((function(e){return e.startsWith("on")})),o=Object.keys(t).filter((function(e){return e.startsWith("on")}));return J()(X()(e,n),X()(t,o))}(e,t)},Fu=Object(i.memo)((function(e){var t,n,o=e.config,r=Object(i.useRef)(null),s=Object(i.useState)(!1),c=Object(d.a)(s,2),u=c[0],l=c[1];Object(i.useEffect)((function(){null!==r&&void 0!==r&&r.current&&(!function(e){k=e}(Oe(r.current)),l(!0))}),[]);var p={moduleName:null!==(t=null===o||void 0===o?void 0:o.defaultScenes)&&void 0!==t?t:_e.LOGIN,initData:null!==(n=null===o||void 0===o?void 0:o.defaultInitData)&&void 0!==n?n:{}};return a.a.createElement("div",{ref:r},u&&a.a.createElement(Ru,{guardProps:e,initState:p}))}),Mu);!function(e){e.CHANGE_MODULE="changeModule",e.RENDER_MESSAGE="renderMessage",e.FLOW_END="flowEnd"}(xu||(xu={})),function(e){e[e.IDENTITY_BINDING_ASK=1641]="IDENTITY_BINDING_ASK",e[e.IDENTITY_BINDING=1640]="IDENTITY_BINDING",e[e.APP_MFA=1636]="APP_MFA",e[e.MFA=1635]="MFA",e[e.ABORT_FLOW=1699]="ABORT_FLOW",e[e.COMPLETE_INFO=1642]="COMPLETE_INFO",e[e.UNLOCK=1643]="UNLOCK",e[e.FLOW_END=1600]="FLOW_END",e[e.FIRST_LOGIN_PASSWORD=1639]="FIRST_LOGIN_PASSWORD",e[e.FORCED_PASSWORD_RESET=2058]="FORCED_PASSWORD_RESET",e[e.UNSAFE_PASSWORD_TIP=2061]="UNSAFE_PASSWORD_TIP",e[e.UNSAFE_PASSWORD_RESET=2071]="UNSAFE_PASSWORD_RESET"}(Iu||(Iu={}));var Bu,Du=(Au={},Object(g.a)(Au,Iu.IDENTITY_BINDING,_e.IDENTITY_BINDING),Object(g.a)(Au,Iu.IDENTITY_BINDING_ASK,_e.IDENTITY_BINDING_ASK),Object(g.a)(Au,Iu.APP_MFA,_e.MFA),Object(g.a)(Au,Iu.MFA,_e.MFA),Object(g.a)(Au,Iu.ABORT_FLOW,_e.LOGIN),Object(g.a)(Au,Iu.COMPLETE_INFO,_e.LOGIN_COMPLETE_INFO),Object(g.a)(Au,Iu.FIRST_LOGIN_PASSWORD,_e.FIRST_LOGIN_PASSWORD),Object(g.a)(Au,Iu.FORCED_PASSWORD_RESET,_e.FORCED_PASSWORD_RESET),Object(g.a)(Au,Iu.UNLOCK,_e.SELF_UNLOCK),Object(g.a)(Au,Iu.UNSAFE_PASSWORD_RESET,_e.UNSAFE_PASSWORD_RESET),Au);n(759);!function(e){e[e.Verify=0]="Verify",e[e.Reset=1]="Reset"}(Bu||(Bu={}));var qu;n(825),n(826),n(760),n(828),n(827),n(761),n(762),n(763),n(764),n(765),n(829),n(830),n(766),n(767),n(768),n(769),n(337),n(136),n(230),n(781);!function(e){e.Mobile="mobile",e.Desktop="desktop"}(qu||(qu={}));var Uu;qu.Mobile,qu.Desktop,n(338),n(339),n(782),n(831),n(783),n(784),n(358),P.LDAP,P.Password,P.PhoneCode;!function(e){e.SMS="SMS",e.EMAIL="EMAIL"}(Uu||(Uu={}));var Vu;!function(e){e.FRONT_CHANNEL="FRONT_CHANNEL",e.BACK_CHANNEL="BACK_CHANNEL"}(Vu||(Vu={}));n(785),n(217),n(786),n(832),n(787),n(788),n(789),n(359),n(791),n(231),n(806);var Hu="authing-ant";hr.a.config({prefixCls:"".concat(Hu,"-message")});var zu=n(360),Gu=function(){return a.a.createElement(Fu,{appId:"62ce374febad68aaa4f6f36d",onRegisterError:function(e){console.log(e)},config:{host:"https://landray-kk.authing.localhost/"},facePlugin:zu})};c.a.render(a.a.createElement(Gu,null),document.getElementById("root")),u()}},[[812,1,2]]]);
2
- //# sourceMappingURL=main.5735e6f1.chunk.js.map