@authing/guard-shim-react18 4.5.50-alpha.6 → 4.5.50-alpha.7
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.
- package/dist/guard.min.js +4 -4
- package/package.json +1 -1
package/dist/guard.min.js
CHANGED
|
@@ -27325,7 +27325,7 @@ var $L=i(4232),HL=i(4631),WL=i(1062),GL=i(8787),KL={zhCN:$L/* default */.Z,enUS:
|
|
|
27325
27325
|
* 多账号 状态
|
|
27326
27326
|
*/
|
|
27327
27327
|
multipleInstance:{isMultipleAccount:!1,instance:void 0,referMultipleState:void 0,multipleAccountData:void 0,clearBackFillData:void 0},phoneRegex:null,defaultLanguageConfig:"zh-CN",tenantInstance:void 0,isSpecialBrowser:!1},nD=y().createContext(tD),rD=y().createContext({spin:!1,spinChange:function(){}}),oD=function(){return XL(rD)},iD=function(){return XL(nD).publicConfig},aD=function(){return XL(nD).httpClient},sD=function(){return XL(nD).isSpecialBrowser},cD=function(){return XL(nD).appId},lD=function(){return XL(nD).tenantId};function uD(){return XL(nD).initData}var dD=function(){return XL(nD).currentModule},fD=function(){return XL(nD).events},pD=function(){var e=XL(nD);return{changeModule:e.changeModule,backModule:e.backModule,currentModule:e.currentModule}},hD=function(){return XL(nD).finallyConfig},mD=function(){return XL(nD).isAuthFlow},vD=function(){return XL(nD).multipleInstance},gD=function(){return XL(nD).phoneRegex},yD=function(){return XL(nD).defaultLanguageConfig},bD=function(){var e=iD(),t=e.customSecurityEnabled,n=e.appRobotVerify,r=e.userpoolRobotVerify;return t?n:r},wD=function(e){var t,n,r,o=iD(),i=o.loginSmsConfig,a=o.registerSmsConfig,s=o.forgetPasswordSmsConfig,c=!1;switch(e){case"login":c="ON"===(null===(t=null==i?void 0:i.robot)||void 0===t?void 0:t.switch);break;case"register":c="ON"===(null===(n=null==a?void 0:a.robot)||void 0===n?void 0:n.switch);break;case"forget-password":c="ON"===(null===(r=null==s?void 0:s.robot)||void 0===r?void 0:r.switch)}return c},CD=function(e){var t,n,r,o=iD(),i=o.loginEmailConfig,a=o.registerEmailConfig,s=o.forgetPasswordEmailConfig,c=!1;switch(e){case"login":c="ON"===(null===(t=null==i?void 0:i.robot)||void 0===t?void 0:t.switch);break;case"register":c="ON"===(null===(n=null==a?void 0:a.robot)||void 0===n?void 0:n.switch);break;case"forget-password":c="ON"===(null===(r=null==s?void 0:s.robot)||void 0===r?void 0:r.switch)}return c},ED=y().useMemo,kD={"zh-CN":{label:"简体中文"},"zh-TW":{label:"繁體中文"},"en-US":{label:"English"},"ja-JP":{label:"日本語"}},SD=function(e){var t=e.langRange,n=void 0===t?["zh-CN","zh-TW","en-US","ja-JP"]:t,r=e.onLangChange,o=_u().i18n,i=XL(nD).guardPageConfig,a=hD(),s=ED((function(){return"g2-change-language-text ".concat(a.mode)}),[a]),c=ED((function(){var e;return null===(e=i.global)||void 0===e?void 0:e.showChangeLanguage}),[i]),l=ED((function(){var e,t=null!==(e=o.resolvedLanguage)&&void 0!==e?e:o.language;return Object.keys(kD).includes(t)?t:ud(t)[0]||"en-US"}),[o.resolvedLanguage,o.language]),u=ED((function(){return y().createElement(y().Fragment,null,y().createElement("span",null,kD[l].label))}),[l]),d=ED((function(){return Object.keys(kD).filter((function(e){return n.includes(e)})).map((function(e){return{key:e,label:kD[e].label}}))}),[n]);if(!c||0===n.length)return null;var f={items:d,onClick:function(e){l!==e.key&&(o.changeLanguage(e.key),null==r||r(e.key))}};return y().createElement("div",{className:"g2-change-language-container"},y().createElement(CP,{menu:f,trigger:["click"],placement:"bottom",overlayClassName:"authing-g2-change-language-menu"},y().createElement("span",{className:s},u,y().createElement(JL,{type:"authing-arrow-down-s-fill",className:"down-fill-svg"}))))};// CONCATENATED MODULE: ./package.json
|
|
27328
|
-
const xD=JSON.parse('{"i8":"4.5.50-alpha.
|
|
27328
|
+
const xD=JSON.parse('{"i8":"4.5.50-alpha.7"}');// CONCATENATED MODULE: ./src/_utils/getVersion.ts
|
|
27329
27329
|
function _D(){return xD.i8}// CONCATENATED MODULE: ./src/_utils/flowHandleStorage.ts
|
|
27330
27330
|
var PD,TD=function(){return PD},ND=function(e){PD=e},OD=function(){return OD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},OD.apply(this,arguments)},ID=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},AD=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},RD=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},MD=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},LD=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ID(void 0,void 0,void 0,(function(){return AD(this,(function(t){switch(t.label){case 0:return[4/*yield*/,fetch.apply(void 0,MD([],RD(e),!1))];case 1:return[2/*return*/,t.sent().json()]}}))}))},DD=function(e){return new Promise((function(t){setTimeout((function(){t({data:{code:-1}}),e()}),1e4)}))};LD.get=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ID(void 0,MD([e],RD(t),!1),void 0,(function(e,t,n){var r,o,i,a,s;return void 0===t&&(t={}),AD(this,(function(c){switch(c.label){case 0:r=OD(OD({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[LD.langHeader]=v0(),s)),""!==LD.tenantId&&(r[LD.tenantHeader]=LD.tenantId),c.label=1;case 1:return c.trys.push([1,3,,4]),o=ha().CancelToken,i=o.source(),[4/*yield*/,Promise.race([DD(i.cancel),ha()("".concat(LD.baseUrl).concat(e).concat(Fc().stringify(t,{addQueryPrefix:!0})),OD(OD({method:"GET"},n),{withCredentials:!0,headers:r,cancelToken:i.token}))])];case 2:return[2/*return*/,null==(a=c.sent())?void 0:a.data];case 3:return c.sent(),[2/*return*/,Promise.resolve({code:-2})];case 4:return[2/*return*/]}}))}))},LD.post=function(e,t,n){return ID(void 0,void 0,void 0,(function(){var r,o,i,a,s,c,l;return AD(this,(function(u){switch(u.label){case 0:r=OD(OD({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[LD.langHeader]=null!==(l=su.resolvedLanguage)&&void 0!==l?l:su.language,s)),""!==LD.tenantId&&(r[LD.tenantHeader]=LD.tenantId),u.label=1;case 1:return u.trys.push([1,3,,4]),o=ha().CancelToken,i=o.source(),[4/*yield*/,Promise.race([DD(i.cancel),ha()("".concat(LD.baseUrl).concat(e),{data:t,method:"POST",withCredentials:!0,cancelToken:i.token,headers:OD(OD({"Content-Type":"application/json"},null==n?void 0:n.headers),(c={},c[LD.langHeader]=v0(),c))})])];case 2:return[2/*return*/,null==(a=u.sent())?void 0:a.data];case 3:return u.sent(),[2/*return*/,Promise.resolve({code:-2})];case 4:return[2/*return*/]}}))}))},LD.postForm=function(e,t,n){return ID(void 0,void 0,void 0,(function(){var r,o,i,a;return AD(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),r=ha().CancelToken,o=r.source(),[4/*yield*/,Promise.race([DD(o.cancel),ha()("".concat(LD.baseUrl).concat(e),{method:"POST",data:t,withCredentials:!0,cancelToken:o.token,headers:OD(OD({},null==n?void 0:n.headers),(a={},a[LD.langHeader]=v0(),a))})])];case 1:return[2/*return*/,null==(i=s.sent())?void 0:i.data];case 2:return s.sent(),[2/*return*/,Promise.resolve({code:-2})];case 3:return[2/*return*/]}}))}))},LD.baseUrl="",LD.setBaseUrl=function(e){LD.baseUrl=e.replace(/\/$/,"")};var FD,jD="x-authing-lang";LD.langHeader=jD,LD.tenantHeader="x-authing-app-tenant-idåå",LD.tenantId="",LD.setLangHeader=function(e){LD.langHeader=e||jD},LD.setTenantHeader=function(e){LD.tenantHeader=e||jD},LD.setTenantId=function(e){LD.tenantId=e},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.IDENTITY_BINDING_NO_ASK="identityBindingNoAsk",e.SELF_UNLOCK="selfUnlock",e.FLOW_SELECT_ACCOUNT="flowSelectAccount",
|
|
27331
27331
|
/** 多租户门户选择页 */
|
|
@@ -27804,7 +27804,7 @@ m===fX.ABORT_FLOW?n():m===fX.UNSAFE_PASSWORD_TIP?(gC.error(g),h(!0)):(null===(x=
|
|
|
27804
27804
|
return null!=c?c:t("user.passwordExpired")}),[o,r]);return y().createElement(Nq,{title:a,explain:s,logo:null==o?void 0:o.noticePwdCustomLogo},i)},Rq=function(){var e,t,n=_u().t,r=pD().changeModule,o=iD(),i=uD(),a=y().createElement(Eq,{onReset:function(){gC.success(n("common.updatePsswordSuccess")),setTimeout((function(){null==r||r(FD.LOGIN)}),500)},onFinishCallBack:i.onFinishCallBack});return y().createElement(Nq,{title:null!==(e=null==i?void 0:i.title)&&void 0!==e?e:n("user.modifyPwd"),explain:null!==(t=null==i?void 0:i.explain)&&void 0!==t?t:n("user.passwordExpiredByDay"),logo:null==o?void 0:o.noticePwdCustomLogo},a)},Mq=function(){var e=_u().t,t=hD();return y().createElement(Nq,{title:"".concat(e("common.welcome")," ").concat(t.title),explain:e("common.registerCompletePasswordDesc")},y().createElement(PU,null))},Lq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Dq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Fq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},jq=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Bq=y().useCallback,Uq=function(){var e,t,n=hD(),r=fD(),o=_u().t,i=ZD(),a=aD().post,s=uD(),c=null!==(e=null==s?void 0:s.accounts)&&void 0!==e?e:[],l=null!==(t=null==s?void 0:s.myself)&&void 0!==t?t:{},u=null==s?void 0:s.i18n,d=jq([l],Fq(c),!1);FB();var f=jX().authFlow,p=Bq((function(e){return Lq(void 0,void 0,void 0,(function(){var t,n,o,a,s;return Dq(this,(function(c){switch(c.label){case 0:return[4/*yield*/,f("public-account-login-selection",{userId:e.userId})];case 1:return t=c.sent(),n=t.isFlowEnd,o=t.data,a=t.onGuardHandling,n?null===(s=null==r?void 0:r.onLogin)||void 0===s||s.call(r,o,i):null==a||a(),[2/*return*/]}}))}))}),[i,a,r]);return y().createElement(y().Fragment,null,s?y().createElement("div",{className:"g2-view-container g2-view-container-2-login"},y().createElement("div",{className:"g2-view-header"},y().createElement(Xj,{src:null==n?void 0:n.logo,size:42,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},u)),y().createElement("div",{className:"g2-view-tabs"},y().createElement("ul",{className:"g2-select-account-2-login_wrapper"},d.map((function(e,t){return y().createElement("li",{className:"g2-select-account-2-login__li",key:t,onClick:function(){return p(e)}},y().createElement("img",{className:"g2-select-account-2-login__avatar",alt:e.userId,src:e.avatar||""}),y().createElement("div",{className:"g2-select-account-2-login__body"},e.displayName&&y().createElement(mP,{className:"g2-select-account-2-login__title"},e.displayName,2==+e.usertype&&y().createElement(mP,{className:"g2-select-account-2-login__des"},o("common.publicAccount"))),y().createElement(mP,{className:"g2-multiple__tel"},(null==e?void 0:e.phone)||"-")))}))))):n.loadingComponent)},qq=function(){return qq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qq.apply(this,arguments)};qq({},Ac());!function(e){e.NONE="none",e.EMAIL="email",e.PHONE="phone",e.IS_NUMBER="isNumber",e.REG_EXP="regExp"}(IU||(IU={})),function(e){e.USERNAME="username",e.PHONE="phone",e.EMAIL="email"}(AU||(AU={})),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"}(RU||(RU={})),function(e){e.registerByEmail="email",e.registerByPhoneCode="phone",e.registerByEmailCode="email",e["phone-password"]="phone"}(MU||(MU={}));// CONCATENATED MODULE: ./src/SendCode/SendCodeByEmail.tsx
|
|
27805
27805
|
var Vq,zq=function(){return zq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zq.apply(this,arguments)},$q=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Hq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Wq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Gq=function(e){var t=e.scene,n=e.data,r=e.form,o=e.onSendCodeBefore,i=e.fieldName,a=e.captchaCode,s=e.onSendCodeError,c=e.codeFieldName,l=Wq(e,["scene","data","form","onSendCodeBefore","fieldName","captchaCode","onSendCodeError","codeFieldName"]),u=_u().t,d=fD(),f=ZD(),p=jX().post,h=function(e,n){return $q(void 0,void 0,void 0,(function(){var r,o,i,a,s;return Hq(this,(function(c){switch(c.label){case 0:if(!e)return gC.error(u("login.inputEmail")),[2/*return*/,{status:!1,error:{code:400,message:u("login.inputEmail")}}];if(!KX("email",e))return gC.error(u("common.emailFormatError")),[2/*return*/,{status:!1,error:{code:400,message:u("common.emailFormatError")}}];c.label=1;case 1:return c.trys.push([1,3,,4]),[4/*yield*/,p("/api/v2/email/send",{email:e,scene:t,captchaCode:n})];case 2:return r=c.sent(),o=r.code,i=r.message,2080===(a=r.apiCode)?(
|
|
27806
27806
|
// 一分钟只能发一次邮箱验证码的提示信息,特殊处理
|
|
27807
|
-
gC.error(i),[2/*return*/,{status:!1,error:{code:a,message:i}}]):200===o?[2/*return*/,{status:!0}]:(gC.error(u("login.sendCodeTimeout")),[2/*return*/,{status:!1,error:{code:o,message:u("login.sendCodeTimeout")}}]);case 3:return s=c.sent(),[2/*return*/,{status:!1,error:{message:JSON.stringify(s),code:401}}];case 4:return[2/*return*/]}}))}))};return y().createElement(tq,zq({beforeSend:function(){return o().then((function(e){return $q(void 0,void 0,void 0,(function(){var e,o,l,u,p,m,v;return Hq(this,(function(g){switch(g.label){case 0:return e=r?r.getFieldValue(i||"email"):n,o=r?null==r?void 0:r.getFieldValue(c||"captchaCode"):a,[4/*yield*/,h(e,o)];case 1:return l=g.sent(),u=l.status,p=l.error,u?null===(m=null==d?void 0:d.onEmailSend)||void 0===m||m.call(d,f,t):(null==s||s(p),null===(v=null==d?void 0:d.onEmailSendError)||void 0===v||v.call(d,p,f,t)),[2/*return*/,u]}}))}))})).catch((function(e){var n;return null==s||s(e),null===(n=null==d?void 0:d.onEmailSendError)||void 0===n||n.call(d,e,f,t),!1}))},form:r},l))},Kq=[{iso:"CA",regions:"加拿大",regions_en:"Canada",phoneCountryCode:"+1"},{iso:"US",regions:"美国",regions_en:"United States",phoneCountryCode:"+1"},{iso:"KZ",regions:"哈萨克斯坦",regions_en:"Kazakhstan",phoneCountryCode:"+7"},{iso:"RU",regions:"俄罗斯",regions_en:"Russia",phoneCountryCode:"+7"},{iso:"EG",regions:"埃及",regions_en:"Egypt",phoneCountryCode:"+20"},{iso:"ZA",regions:"南非",regions_en:"South Africa",phoneCountryCode:"+27"},{iso:"GR",regions:"希腊",regions_en:"Greece",phoneCountryCode:"+30"},{iso:"NL",regions:"荷兰",regions_en:"Netherlands",phoneCountryCode:"+31"},{iso:"BE",regions:"比利时",regions_en:"Belgium",phoneCountryCode:"+32"},{iso:"FR",regions:"法国",regions_en:"France",phoneCountryCode:"+33"},{iso:"ES",regions:"西班牙",regions_en:"Spain",phoneCountryCode:"+34"},{iso:"HU",regions:"匈牙利",regions_en:"Hungary",phoneCountryCode:"+36"},{iso:"IT",regions:"意大利",regions_en:"Italy",phoneCountryCode:"+39"},{iso:"RO",regions:"罗马尼亚",regions_en:"Romania",phoneCountryCode:"+40"},{iso:"CH",regions:"瑞士",regions_en:"Switzerland",phoneCountryCode:"+41"},{iso:"AT",regions:"奥地利",regions_en:"Austria",phoneCountryCode:"+43"},{iso:"GB",regions:"英国",regions_en:"United Kingdom",phoneCountryCode:"+44"},{iso:"DK",regions:"丹麦",regions_en:"Denmark",phoneCountryCode:"+45"},{iso:"SE",regions:"瑞典",regions_en:"Sweden",phoneCountryCode:"+46"},{iso:"NO",regions:"挪威",regions_en:"Norway",phoneCountryCode:"+47"},{iso:"PL",regions:"波兰",regions_en:"Poland",phoneCountryCode:"+48"},{iso:"DE",regions:"德国",regions_en:"Germany",phoneCountryCode:"+49"},{iso:"PE",regions:"秘鲁",regions_en:"Peru",phoneCountryCode:"+51"},{iso:"MX",regions:"墨西哥",regions_en:"Mexico",phoneCountryCode:"+52"},{iso:"CU",regions:"古巴",regions_en:"Cuba",phoneCountryCode:"+53"},{iso:"AR",regions:"阿根廷",regions_en:"Argentina",phoneCountryCode:"+54"},{iso:"BR",regions:"巴西",regions_en:"Brazil",phoneCountryCode:"+55"},{iso:"CL",regions:"智利",regions_en:"Chile",phoneCountryCode:"+56"},{iso:"CO",regions:"哥伦比亚",regions_en:"Colombia",phoneCountryCode:"+57"},{iso:"VE",regions:"委内瑞拉",regions_en:"Venezuela",phoneCountryCode:"+58"},{iso:"MY",regions:"马来西亚",regions_en:"Malaysia",phoneCountryCode:"+60"},{iso:"AU",regions:"澳大利亚",regions_en:"Australia",phoneCountryCode:"+61"},{iso:"ID",regions:"印度尼西亚",regions_en:"Indonesia",phoneCountryCode:"+62"},{iso:"PH",regions:"菲律宾",regions_en:"Philippines",phoneCountryCode:"+63"},{iso:"NZ",regions:"新西兰",regions_en:"New Zealand",phoneCountryCode:"+64"},{iso:"SG",regions:"新加坡",regions_en:"Singapore",phoneCountryCode:"+65"},{iso:"TH",regions:"泰国",regions_en:"Thailand",phoneCountryCode:"+66"},{iso:"JP",regions:"日本",regions_en:"Japan",phoneCountryCode:"+81"},{iso:"KR",regions:"韩国",regions_en:"South Korea",phoneCountryCode:"+82"},{iso:"VN",regions:"越南",regions_en:"Vietnam",phoneCountryCode:"+84"},{iso:"CN",regions:"中国",regions_en:"China",phoneCountryCode:"+86"},{iso:"TR",regions:"土耳其",regions_en:"Turkey",phoneCountryCode:"+90"},{iso:"IN",regions:"印度",regions_en:"India",phoneCountryCode:"+91"},{iso:"PK",regions:"巴基斯坦",regions_en:"Pakistan",phoneCountryCode:"+92"},{iso:"AF",regions:"阿富汗",regions_en:"Afghanistan",phoneCountryCode:"+93"},{iso:"LK",regions:"斯里兰卡",regions_en:"Sri Lanka",phoneCountryCode:"+94"},{iso:"MM",regions:"缅甸",regions_en:"Myanmar",phoneCountryCode:"+95"},{iso:"IR",regions:"伊朗",regions_en:"Iran",phoneCountryCode:"+98"},{iso:"MA",regions:"摩洛哥",regions_en:"Morocco",phoneCountryCode:"+212"},{iso:"DZ",regions:"阿尔及利亚",regions_en:"Algeria",phoneCountryCode:"+213"},{iso:"TN",regions:"突尼斯",regions_en:"Tunisia",phoneCountryCode:"+216"},{iso:"LY",regions:"利比亚",regions_en:"Libya",phoneCountryCode:"+218"},{iso:"GM",regions:"冈比亚",regions_en:"Gambia",phoneCountryCode:"+220"},{iso:"SN",regions:"塞内加尔",regions_en:"Senegal",phoneCountryCode:"+221"},{iso:"MR",regions:"毛里塔尼亚",regions_en:"Mauritania",phoneCountryCode:"+222"},{iso:"ML",regions:"马里",regions_en:"Mali",phoneCountryCode:"+223"},{iso:"GN",regions:"几内亚",regions_en:"Guinea",phoneCountryCode:"+224"},{iso:"CI",regions:"象牙海岸",regions_en:"Ivory Coast",phoneCountryCode:"+225"},{iso:"BF",regions:"布基纳法索",regions_en:"Burkina Faso",phoneCountryCode:"+226"},{iso:"NE",regions:"尼日尔",regions_en:"Niger",phoneCountryCode:"+227"},{iso:"TG",regions:"多哥",regions_en:"Togo",phoneCountryCode:"+228"},{iso:"BJ",regions:"贝宁",regions_en:"Benin",phoneCountryCode:"+229"},{iso:"MU",regions:"毛里求斯",regions_en:"Mauritius",phoneCountryCode:"+230"},{iso:"LR",regions:"利比里亚",regions_en:"Liberia",phoneCountryCode:"+231"},{iso:"SL",regions:"塞拉利昂",regions_en:"Sierra Leone",phoneCountryCode:"+232"},{iso:"GH",regions:"加纳",regions_en:"Ghana",phoneCountryCode:"+233"},{iso:"NG",regions:"尼日利亚",regions_en:"Nigeria",phoneCountryCode:"+234"},{iso:"TD",regions:"乍得",regions_en:"Chad",phoneCountryCode:"+235"},{iso:"CF",regions:"中非共和国",regions_en:"Central African Republic",phoneCountryCode:"+236"},{iso:"CM",regions:"喀麦隆",regions_en:"Cameroon",phoneCountryCode:"+237"},{iso:"CV",regions:"开普",regions_en:"Cape Verde",phoneCountryCode:"+238"},{iso:"ST",regions:"圣多美和普林西比",regions_en:"Sao Tome and Principe",phoneCountryCode:"+239"},{iso:"GQ",regions:"赤道几内亚",regions_en:"Equatorial Guinea",phoneCountryCode:"+240"},{iso:"GA",regions:"加蓬",regions_en:"Gabon",phoneCountryCode:"+241"},{iso:"CG",regions:"刚果共和国",regions_en:"Republic Of The Congo",phoneCountryCode:"+242"},{iso:"CD",regions:"刚果民主共和国",regions_en:"Democratic Republic of theCongo",phoneCountryCode:"+243"},{iso:"AO",regions:"安哥拉",regions_en:"Angola",phoneCountryCode:"+244"},{iso:"GW",regions:"几内亚比绍共和国",regions_en:"Guinea-Bissau",phoneCountryCode:"+245"},{iso:"SC",regions:"塞舌尔",regions_en:"Seychelles",phoneCountryCode:"+248"},{iso:"SD",regions:"苏丹",regions_en:"Sudan",phoneCountryCode:"+249"},{iso:"RW",regions:"卢旺达",regions_en:"Rwanda",phoneCountryCode:"+250"},{iso:"ET",regions:"埃塞俄比亚",regions_en:"Ethiopia",phoneCountryCode:"+251"},{iso:"SO",regions:"索马里",regions_en:"Somalia",phoneCountryCode:"+252"},{iso:"DJ",regions:"吉布提",regions_en:"Djibouti",phoneCountryCode:"+253"},{iso:"KE",regions:"肯尼亚",regions_en:"Kenya",phoneCountryCode:"+254"},{iso:"TZ",regions:"坦桑尼亚",regions_en:"Tanzania",phoneCountryCode:"+255"},{iso:"UG",regions:"乌干达",regions_en:"Uganda",phoneCountryCode:"+256"},{iso:"BI",regions:"布隆迪",regions_en:"Burundi",phoneCountryCode:"+257"},{iso:"MZ",regions:"莫桑比克",regions_en:"Mozambique",phoneCountryCode:"+258"},{iso:"ZM",regions:"赞比亚",regions_en:"Zambia",phoneCountryCode:"+260"},{iso:"MG",regions:"马达加斯加",regions_en:"Madagascar",phoneCountryCode:"+261"},{iso:"RE",regions:"留尼汪",regions_en:"Réunion Island",phoneCountryCode:"+262"},{iso:"ZW",regions:"津巴布韦",regions_en:"Zimbabwe",phoneCountryCode:"+263"},{iso:"NA",regions:"纳米比亚",regions_en:"Namibia",phoneCountryCode:"+264"},{iso:"MW",regions:"马拉维",regions_en:"Malawi",phoneCountryCode:"+265"},{iso:"LS",regions:"莱索托",regions_en:"Lesotho",phoneCountryCode:"+266"},{iso:"BW",regions:"博茨瓦纳",regions_en:"Botswana",phoneCountryCode:"+267"},{iso:"SZ",regions:"斯威士兰",regions_en:"Swaziland",phoneCountryCode:"+268"},{iso:"KM",regions:"科摩罗",regions_en:"Comoros",phoneCountryCode:"+269"},{iso:"YT",regions:"马约特",regions_en:"Mayotte",phoneCountryCode:"+269"},{iso:"ER",regions:"厄立特里亚",regions_en:"Eritrea",phoneCountryCode:"+291"},{iso:"AW",regions:"阿鲁巴",regions_en:"Aruba",phoneCountryCode:"+297"},{iso:"FO",regions:"法罗群岛",regions_en:"Faroe Islands",phoneCountryCode:"+298"},{iso:"GL",regions:"格陵兰岛",regions_en:"Greenland",phoneCountryCode:"+299"},{iso:"GI",regions:"直布罗陀",regions_en:"Gibraltar",phoneCountryCode:"+350"},{iso:"PT",regions:"葡萄牙",regions_en:"Portugal",phoneCountryCode:"+351"},{iso:"LU",regions:"卢森堡",regions_en:"Luxembourg",phoneCountryCode:"+352"},{iso:"IE",regions:"爱尔兰",regions_en:"Ireland",phoneCountryCode:"+353"},{iso:"IS",regions:"冰岛",regions_en:"Iceland",phoneCountryCode:"+354"},{iso:"AL",regions:"阿尔巴尼亚",regions_en:"Albania",phoneCountryCode:"+355"},{iso:"MT",regions:"马耳他",regions_en:"Malta",phoneCountryCode:"+356"},{iso:"CY",regions:"塞浦路斯",regions_en:"Cyprus",phoneCountryCode:"+357"},{iso:"FI",regions:"芬兰",regions_en:"Finland",phoneCountryCode:"+358"},{iso:"BG",regions:"保加利亚",regions_en:"Bulgaria",phoneCountryCode:"+359"},{iso:"LT",regions:"立陶宛",regions_en:"Lithuania",phoneCountryCode:"+370"},{iso:"LV",regions:"拉脱维亚",regions_en:"Latvia",phoneCountryCode:"+371"},{iso:"EE",regions:"爱沙尼亚",regions_en:"Estonia",phoneCountryCode:"+372"},{iso:"MD",regions:"摩尔多瓦",regions_en:"Moldova",phoneCountryCode:"+373"},{iso:"AM",regions:"亚美尼亚",regions_en:"Armenia",phoneCountryCode:"+374"},{iso:"BY",regions:"白俄罗斯",regions_en:"Belarus",phoneCountryCode:"+375"},{iso:"AD",regions:"安道尔",regions_en:"Andorra",phoneCountryCode:"+376"},{iso:"MC",regions:"摩纳哥",regions_en:"Monaco",phoneCountryCode:"+377"},{iso:"SM",regions:"圣马力诺",regions_en:"San Marino",phoneCountryCode:"+378"},{iso:"UA",regions:"乌克兰",regions_en:"Ukraine",phoneCountryCode:"+380"},{iso:"RS",regions:"塞尔维亚",regions_en:"Serbia",phoneCountryCode:"+381"},{iso:"ME",regions:"黑山",regions_en:"Montenegro",phoneCountryCode:"+382"},{iso:"HR",regions:"克罗地亚",regions_en:"Croatia",phoneCountryCode:"+385"},{iso:"SI",regions:"斯洛文尼亚",regions_en:"Slovenia",phoneCountryCode:"+386"},{iso:"BA",regions:"波斯尼亚和黑塞哥维那",regions_en:"Bosniaand Herzegovina",phoneCountryCode:"+387"},{iso:"MK",regions:"马其顿",regions_en:"Macedonia",phoneCountryCode:"+389"},{iso:"CZ",regions:"捷克",regions_en:"Czech",phoneCountryCode:"+420"},{iso:"SK",regions:"斯洛伐克",regions_en:"Slovakia",phoneCountryCode:"+421"},{iso:"LI",regions:"列支敦士登",regions_en:"Liechtenstein",phoneCountryCode:"+423"},{iso:"BZ",regions:"伯利兹",regions_en:"Belize",phoneCountryCode:"+501"},{iso:"GT",regions:"瓜地马拉",regions_en:"Guatemala",phoneCountryCode:"+502"},{iso:"SV",regions:"萨尔瓦多",regions_en:"ElSalvador",phoneCountryCode:"+503"},{iso:"HN",regions:"洪都拉斯",regions_en:"Honduras",phoneCountryCode:"+504"},{iso:"NI",regions:"尼加拉瓜",regions_en:"Nicaragua",phoneCountryCode:"+505"},{iso:"CR",regions:"哥斯达黎加",regions_en:"CostaRica",phoneCountryCode:"+506"},{iso:"PA",regions:"巴拿马",regions_en:"Panama",phoneCountryCode:"+507"},{iso:"PM",regions:"圣彼埃尔和密克隆岛",regions_en:"Saint Pierreand Miquelon",phoneCountryCode:"+508"},{iso:"HT",regions:"海地",regions_en:"Haiti",phoneCountryCode:"+509"},{iso:"GP",regions:"瓜德罗普岛",regions_en:"Guadeloupe",phoneCountryCode:"+590"},{iso:"BO",regions:"玻利维亚",regions_en:"Bolivia",phoneCountryCode:"+591"},{iso:"GY",regions:"圭亚那",regions_en:"Guyana",phoneCountryCode:"+592"},{iso:"EC",regions:"厄瓜多尔",regions_en:"Ecuador",phoneCountryCode:"+593"},{iso:"GF",regions:"法属圭亚那",regions_en:"French Guiana",phoneCountryCode:"+594"},{iso:"PY",regions:"巴拉圭",regions_en:"Paraguay",phoneCountryCode:"+595"},{iso:"SR",regions:"苏里南",regions_en:"Suriname",phoneCountryCode:"+597"},{iso:"UY",regions:"乌拉圭",regions_en:"Uruguay",phoneCountryCode:"+598"},{iso:"BQ",regions:"荷兰加勒比",regions_en:"Caribisch Nederland",phoneCountryCode:"+599"},{iso:"CW",regions:"库拉索",regions_en:"Curacao",phoneCountryCode:"+599"},{iso:"TL",regions:"东帝汶",regions_en:"East Timor",phoneCountryCode:"+670"},{iso:"BN",regions:"文莱",regions_en:"Brunei",phoneCountryCode:"+673"},{iso:"NR",regions:"拿鲁岛",regions_en:"Nauru",phoneCountryCode:"+674"},{iso:"PG",regions:"巴布亚新几内亚",regions_en:"Papua New Guinea",phoneCountryCode:"+675"},{iso:"TO",regions:"汤加",regions_en:"Tonga",phoneCountryCode:"+676"},{iso:"SB",regions:"所罗门群岛",regions_en:"Solomon Islands",phoneCountryCode:"+677"},{iso:"VU",regions:"瓦努阿图",regions_en:"Vanuatu",phoneCountryCode:"+678"},{iso:"FJ",regions:"斐济",regions_en:"Fiji",phoneCountryCode:"+679"},{iso:"PW",regions:"帕劳",regions_en:"Palau",phoneCountryCode:"+680"},{iso:"CK",regions:"库克群岛",regions_en:"Cook Islands",phoneCountryCode:"+682"},{iso:"WS",regions:"萨摩亚",regions_en:"Samoa",phoneCountryCode:"+685"},{iso:"KI",regions:"基里巴斯",regions_en:"Kiribati",phoneCountryCode:"+686"},{iso:"NC",regions:"新喀里多尼亚",regions_en:"New Caledonia",phoneCountryCode:"+687"},{iso:"PF",regions:"法属波利尼西亚",regions_en:"French Polynesia",phoneCountryCode:"+689"},{iso:"FM",regions:"密克罗尼西亚",regions_en:"Micronesia",phoneCountryCode:"+691"},{iso:"MH",regions:"马绍尔群岛",regions_en:"Marshall Islands",phoneCountryCode:"+692"},{iso:"KP",regions:"朝鲜",regions_en:"Korea Democratic Rep.",phoneCountryCode:"+850"},{iso:"HK",regions:"中国香港",regions_en:"Hong Kong",phoneCountryCode:"+852"},{iso:"MO",regions:"中国澳门",regions_en:"Macau",phoneCountryCode:"+853"},{iso:"KH",regions:"柬埔寨",regions_en:"Cambodia",phoneCountryCode:"+855"},{iso:"LA",regions:"老挝",regions_en:"Laos",phoneCountryCode:"+856"},{iso:"BD",regions:"孟加拉国",regions_en:"Bangladesh",phoneCountryCode:"+880"},{iso:"TW",regions:"中国台湾",regions_en:"Taiwan",phoneCountryCode:"+886"},{iso:"MV",regions:"马尔代夫",regions_en:"Maldives",phoneCountryCode:"+960"},{iso:"LB",regions:"黎巴嫩",regions_en:"Lebanon",phoneCountryCode:"+961"},{iso:"JO",regions:"约旦",regions_en:"Jordan",phoneCountryCode:"+962"},{iso:"SY",regions:"叙利亚",regions_en:"Syria",phoneCountryCode:"+963"},{iso:"IQ",regions:"伊拉克",regions_en:"Iraq",phoneCountryCode:"+964"},{iso:"KW",regions:"科威特",regions_en:"Kuwait",phoneCountryCode:"+965"},{iso:"SA",regions:"沙特阿拉伯",regions_en:"Saudi Arabia",phoneCountryCode:"+966"},{iso:"YE",regions:"也门",regions_en:"Yemen",phoneCountryCode:"+967"},{iso:"OM",regions:"阿曼",regions_en:"Oman",phoneCountryCode:"+968"},{iso:"AE",regions:"阿拉伯联合酋长国",regions_en:"United Arab Emirates",phoneCountryCode:"+971"},{iso:"IL",regions:"以色列",regions_en:"Israel",phoneCountryCode:"+972"},{iso:"BH",regions:"巴林",regions_en:"Bahrain",phoneCountryCode:"+973"},{iso:"QA",regions:"卡塔尔",regions_en:"Qatar",phoneCountryCode:"+974"},{iso:"BT",regions:"不丹",regions_en:"Bhutan",phoneCountryCode:"+975"},{iso:"MN",regions:"蒙古",regions_en:"Mongolia",phoneCountryCode:"+976"},{iso:"NP",regions:"尼泊尔",regions_en:"Nepal",phoneCountryCode:"+977"},{iso:"TJ",regions:"塔吉克斯坦",regions_en:"Tajikistan",phoneCountryCode:"+992"},{iso:"TM",regions:"土库曼斯坦",regions_en:"Turkmenistan",phoneCountryCode:"+993"},{iso:"AZ",regions:"阿塞拜疆",regions_en:"Azerbaijan",phoneCountryCode:"+994"},{iso:"GE",regions:"格鲁吉亚",regions_en:"Georgia",phoneCountryCode:"+995"},{iso:"KG",regions:"吉尔吉斯斯坦",regions_en:"Kyrgyzstan",phoneCountryCode:"+996"},{iso:"UZ",regions:"乌兹别克斯坦",regions_en:"Uzbekistan",phoneCountryCode:"+998"},{iso:"BS",regions:"巴哈马",regions_en:"Bahamas",phoneCountryCode:"+1242"},{iso:"BB",regions:"巴巴多斯",regions_en:"Barbados",phoneCountryCode:"+1246"},{iso:"AI",regions:"安圭拉",regions_en:"Anguilla",phoneCountryCode:"+1264"},{iso:"AG",regions:"安提瓜和巴布达",regions_en:"Antigua and Barbuda",phoneCountryCode:"+1268"},{iso:"VG",regions:"英属处女群岛",regions_en:"VirginIslands,British",phoneCountryCode:"+1284"},{iso:"KY",regions:"开曼群岛",regions_en:"Cayman Islands",phoneCountryCode:"+1345"},{iso:"BM",regions:"百慕大群岛",regions_en:"Bermuda",phoneCountryCode:"+1441"},{iso:"GD",regions:"格林纳达",regions_en:"Grenada",phoneCountryCode:"+1473"},{iso:"TC",regions:"特克斯和凯科斯群岛",regions_en:"Turksand Caicos Islands",phoneCountryCode:"+1649"},{iso:"MS",regions:"蒙特塞拉特岛",regions_en:"Montserrat",phoneCountryCode:"+1664"},{iso:"GU",regions:"关岛",regions_en:"Guam",phoneCountryCode:"+1671"},{iso:"AS",regions:"美属萨摩亚",regions_en:"American Samoa",phoneCountryCode:"+1684"},{iso:"LC",regions:"圣露西亚",regions_en:"Saint Lucia",phoneCountryCode:"+1758"},{iso:"DM",regions:"多米尼加",regions_en:"Dominica",phoneCountryCode:"+1767"},{iso:"VC",regions:"圣文森特和格林纳丁斯",regions_en:"Saint Vincent and The Grenadines",phoneCountryCode:"+1784"},{iso:"PR",regions:"波多黎各",regions_en:"Puerto Rico",phoneCountryCode:"+1787"},{iso:"DO",regions:"多米尼加共和国",regions_en:"dominican republic",phoneCountryCode:"+1809"},{iso:"TT",regions:"特立尼达和多巴哥",regions_en:"Trinidadand Tobago",phoneCountryCode:"+1868"},{iso:"KN",regions:"圣基茨和尼维斯",regions_en:"Saint Kitts and Nevis",phoneCountryCode:"+1869"},{iso:"JM",regions:"牙买加",regions_en:"Jamaica",phoneCountryCode:"+1876"}],Yq=function(e){var t,n=e.value,r=e.onChange,o=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,i=Kq.map((function(e){return{value:e.iso,key:e.iso,children:e.phoneCountryCode,label:y().createElement("div",{className:"select-option-item"},y().createElement("span",null,e.phoneCountryCode),y().createElement("div",{className:"country"},y().createElement(fv,{title:"zh-CN"===o?e.regions:e.regions_en},"zh-CN"===o?e.regions:e.regions_en))),region:e.regions,region_en:e.regions_en}}));
|
|
27807
|
+
gC.error(i),[2/*return*/,{status:!1,error:{code:a,message:i}}]):200===o?[2/*return*/,{status:!0}]:(gC.error(i||u("login.sendCodeTimeout")),[2/*return*/,{status:!1,error:{code:o,message:i||u("login.sendCodeTimeout")}}]);case 3:return s=c.sent(),[2/*return*/,{status:!1,error:{message:JSON.stringify(s),code:401}}];case 4:return[2/*return*/]}}))}))};return y().createElement(tq,zq({beforeSend:function(){return o().then((function(e){return $q(void 0,void 0,void 0,(function(){var e,o,l,u,p,m,v;return Hq(this,(function(g){switch(g.label){case 0:return e=r?r.getFieldValue(i||"email"):n,o=r?null==r?void 0:r.getFieldValue(c||"captchaCode"):a,[4/*yield*/,h(e,o)];case 1:return l=g.sent(),u=l.status,p=l.error,u?null===(m=null==d?void 0:d.onEmailSend)||void 0===m||m.call(d,f,t):(null==s||s(p),null===(v=null==d?void 0:d.onEmailSendError)||void 0===v||v.call(d,p,f,t)),[2/*return*/,u]}}))}))})).catch((function(e){var n;return null==s||s(e),null===(n=null==d?void 0:d.onEmailSendError)||void 0===n||n.call(d,e,f,t),!1}))},form:r},l))},Kq=[{iso:"CA",regions:"加拿大",regions_en:"Canada",phoneCountryCode:"+1"},{iso:"US",regions:"美国",regions_en:"United States",phoneCountryCode:"+1"},{iso:"KZ",regions:"哈萨克斯坦",regions_en:"Kazakhstan",phoneCountryCode:"+7"},{iso:"RU",regions:"俄罗斯",regions_en:"Russia",phoneCountryCode:"+7"},{iso:"EG",regions:"埃及",regions_en:"Egypt",phoneCountryCode:"+20"},{iso:"ZA",regions:"南非",regions_en:"South Africa",phoneCountryCode:"+27"},{iso:"GR",regions:"希腊",regions_en:"Greece",phoneCountryCode:"+30"},{iso:"NL",regions:"荷兰",regions_en:"Netherlands",phoneCountryCode:"+31"},{iso:"BE",regions:"比利时",regions_en:"Belgium",phoneCountryCode:"+32"},{iso:"FR",regions:"法国",regions_en:"France",phoneCountryCode:"+33"},{iso:"ES",regions:"西班牙",regions_en:"Spain",phoneCountryCode:"+34"},{iso:"HU",regions:"匈牙利",regions_en:"Hungary",phoneCountryCode:"+36"},{iso:"IT",regions:"意大利",regions_en:"Italy",phoneCountryCode:"+39"},{iso:"RO",regions:"罗马尼亚",regions_en:"Romania",phoneCountryCode:"+40"},{iso:"CH",regions:"瑞士",regions_en:"Switzerland",phoneCountryCode:"+41"},{iso:"AT",regions:"奥地利",regions_en:"Austria",phoneCountryCode:"+43"},{iso:"GB",regions:"英国",regions_en:"United Kingdom",phoneCountryCode:"+44"},{iso:"DK",regions:"丹麦",regions_en:"Denmark",phoneCountryCode:"+45"},{iso:"SE",regions:"瑞典",regions_en:"Sweden",phoneCountryCode:"+46"},{iso:"NO",regions:"挪威",regions_en:"Norway",phoneCountryCode:"+47"},{iso:"PL",regions:"波兰",regions_en:"Poland",phoneCountryCode:"+48"},{iso:"DE",regions:"德国",regions_en:"Germany",phoneCountryCode:"+49"},{iso:"PE",regions:"秘鲁",regions_en:"Peru",phoneCountryCode:"+51"},{iso:"MX",regions:"墨西哥",regions_en:"Mexico",phoneCountryCode:"+52"},{iso:"CU",regions:"古巴",regions_en:"Cuba",phoneCountryCode:"+53"},{iso:"AR",regions:"阿根廷",regions_en:"Argentina",phoneCountryCode:"+54"},{iso:"BR",regions:"巴西",regions_en:"Brazil",phoneCountryCode:"+55"},{iso:"CL",regions:"智利",regions_en:"Chile",phoneCountryCode:"+56"},{iso:"CO",regions:"哥伦比亚",regions_en:"Colombia",phoneCountryCode:"+57"},{iso:"VE",regions:"委内瑞拉",regions_en:"Venezuela",phoneCountryCode:"+58"},{iso:"MY",regions:"马来西亚",regions_en:"Malaysia",phoneCountryCode:"+60"},{iso:"AU",regions:"澳大利亚",regions_en:"Australia",phoneCountryCode:"+61"},{iso:"ID",regions:"印度尼西亚",regions_en:"Indonesia",phoneCountryCode:"+62"},{iso:"PH",regions:"菲律宾",regions_en:"Philippines",phoneCountryCode:"+63"},{iso:"NZ",regions:"新西兰",regions_en:"New Zealand",phoneCountryCode:"+64"},{iso:"SG",regions:"新加坡",regions_en:"Singapore",phoneCountryCode:"+65"},{iso:"TH",regions:"泰国",regions_en:"Thailand",phoneCountryCode:"+66"},{iso:"JP",regions:"日本",regions_en:"Japan",phoneCountryCode:"+81"},{iso:"KR",regions:"韩国",regions_en:"South Korea",phoneCountryCode:"+82"},{iso:"VN",regions:"越南",regions_en:"Vietnam",phoneCountryCode:"+84"},{iso:"CN",regions:"中国",regions_en:"China",phoneCountryCode:"+86"},{iso:"TR",regions:"土耳其",regions_en:"Turkey",phoneCountryCode:"+90"},{iso:"IN",regions:"印度",regions_en:"India",phoneCountryCode:"+91"},{iso:"PK",regions:"巴基斯坦",regions_en:"Pakistan",phoneCountryCode:"+92"},{iso:"AF",regions:"阿富汗",regions_en:"Afghanistan",phoneCountryCode:"+93"},{iso:"LK",regions:"斯里兰卡",regions_en:"Sri Lanka",phoneCountryCode:"+94"},{iso:"MM",regions:"缅甸",regions_en:"Myanmar",phoneCountryCode:"+95"},{iso:"IR",regions:"伊朗",regions_en:"Iran",phoneCountryCode:"+98"},{iso:"MA",regions:"摩洛哥",regions_en:"Morocco",phoneCountryCode:"+212"},{iso:"DZ",regions:"阿尔及利亚",regions_en:"Algeria",phoneCountryCode:"+213"},{iso:"TN",regions:"突尼斯",regions_en:"Tunisia",phoneCountryCode:"+216"},{iso:"LY",regions:"利比亚",regions_en:"Libya",phoneCountryCode:"+218"},{iso:"GM",regions:"冈比亚",regions_en:"Gambia",phoneCountryCode:"+220"},{iso:"SN",regions:"塞内加尔",regions_en:"Senegal",phoneCountryCode:"+221"},{iso:"MR",regions:"毛里塔尼亚",regions_en:"Mauritania",phoneCountryCode:"+222"},{iso:"ML",regions:"马里",regions_en:"Mali",phoneCountryCode:"+223"},{iso:"GN",regions:"几内亚",regions_en:"Guinea",phoneCountryCode:"+224"},{iso:"CI",regions:"象牙海岸",regions_en:"Ivory Coast",phoneCountryCode:"+225"},{iso:"BF",regions:"布基纳法索",regions_en:"Burkina Faso",phoneCountryCode:"+226"},{iso:"NE",regions:"尼日尔",regions_en:"Niger",phoneCountryCode:"+227"},{iso:"TG",regions:"多哥",regions_en:"Togo",phoneCountryCode:"+228"},{iso:"BJ",regions:"贝宁",regions_en:"Benin",phoneCountryCode:"+229"},{iso:"MU",regions:"毛里求斯",regions_en:"Mauritius",phoneCountryCode:"+230"},{iso:"LR",regions:"利比里亚",regions_en:"Liberia",phoneCountryCode:"+231"},{iso:"SL",regions:"塞拉利昂",regions_en:"Sierra Leone",phoneCountryCode:"+232"},{iso:"GH",regions:"加纳",regions_en:"Ghana",phoneCountryCode:"+233"},{iso:"NG",regions:"尼日利亚",regions_en:"Nigeria",phoneCountryCode:"+234"},{iso:"TD",regions:"乍得",regions_en:"Chad",phoneCountryCode:"+235"},{iso:"CF",regions:"中非共和国",regions_en:"Central African Republic",phoneCountryCode:"+236"},{iso:"CM",regions:"喀麦隆",regions_en:"Cameroon",phoneCountryCode:"+237"},{iso:"CV",regions:"开普",regions_en:"Cape Verde",phoneCountryCode:"+238"},{iso:"ST",regions:"圣多美和普林西比",regions_en:"Sao Tome and Principe",phoneCountryCode:"+239"},{iso:"GQ",regions:"赤道几内亚",regions_en:"Equatorial Guinea",phoneCountryCode:"+240"},{iso:"GA",regions:"加蓬",regions_en:"Gabon",phoneCountryCode:"+241"},{iso:"CG",regions:"刚果共和国",regions_en:"Republic Of The Congo",phoneCountryCode:"+242"},{iso:"CD",regions:"刚果民主共和国",regions_en:"Democratic Republic of theCongo",phoneCountryCode:"+243"},{iso:"AO",regions:"安哥拉",regions_en:"Angola",phoneCountryCode:"+244"},{iso:"GW",regions:"几内亚比绍共和国",regions_en:"Guinea-Bissau",phoneCountryCode:"+245"},{iso:"SC",regions:"塞舌尔",regions_en:"Seychelles",phoneCountryCode:"+248"},{iso:"SD",regions:"苏丹",regions_en:"Sudan",phoneCountryCode:"+249"},{iso:"RW",regions:"卢旺达",regions_en:"Rwanda",phoneCountryCode:"+250"},{iso:"ET",regions:"埃塞俄比亚",regions_en:"Ethiopia",phoneCountryCode:"+251"},{iso:"SO",regions:"索马里",regions_en:"Somalia",phoneCountryCode:"+252"},{iso:"DJ",regions:"吉布提",regions_en:"Djibouti",phoneCountryCode:"+253"},{iso:"KE",regions:"肯尼亚",regions_en:"Kenya",phoneCountryCode:"+254"},{iso:"TZ",regions:"坦桑尼亚",regions_en:"Tanzania",phoneCountryCode:"+255"},{iso:"UG",regions:"乌干达",regions_en:"Uganda",phoneCountryCode:"+256"},{iso:"BI",regions:"布隆迪",regions_en:"Burundi",phoneCountryCode:"+257"},{iso:"MZ",regions:"莫桑比克",regions_en:"Mozambique",phoneCountryCode:"+258"},{iso:"ZM",regions:"赞比亚",regions_en:"Zambia",phoneCountryCode:"+260"},{iso:"MG",regions:"马达加斯加",regions_en:"Madagascar",phoneCountryCode:"+261"},{iso:"RE",regions:"留尼汪",regions_en:"Réunion Island",phoneCountryCode:"+262"},{iso:"ZW",regions:"津巴布韦",regions_en:"Zimbabwe",phoneCountryCode:"+263"},{iso:"NA",regions:"纳米比亚",regions_en:"Namibia",phoneCountryCode:"+264"},{iso:"MW",regions:"马拉维",regions_en:"Malawi",phoneCountryCode:"+265"},{iso:"LS",regions:"莱索托",regions_en:"Lesotho",phoneCountryCode:"+266"},{iso:"BW",regions:"博茨瓦纳",regions_en:"Botswana",phoneCountryCode:"+267"},{iso:"SZ",regions:"斯威士兰",regions_en:"Swaziland",phoneCountryCode:"+268"},{iso:"KM",regions:"科摩罗",regions_en:"Comoros",phoneCountryCode:"+269"},{iso:"YT",regions:"马约特",regions_en:"Mayotte",phoneCountryCode:"+269"},{iso:"ER",regions:"厄立特里亚",regions_en:"Eritrea",phoneCountryCode:"+291"},{iso:"AW",regions:"阿鲁巴",regions_en:"Aruba",phoneCountryCode:"+297"},{iso:"FO",regions:"法罗群岛",regions_en:"Faroe Islands",phoneCountryCode:"+298"},{iso:"GL",regions:"格陵兰岛",regions_en:"Greenland",phoneCountryCode:"+299"},{iso:"GI",regions:"直布罗陀",regions_en:"Gibraltar",phoneCountryCode:"+350"},{iso:"PT",regions:"葡萄牙",regions_en:"Portugal",phoneCountryCode:"+351"},{iso:"LU",regions:"卢森堡",regions_en:"Luxembourg",phoneCountryCode:"+352"},{iso:"IE",regions:"爱尔兰",regions_en:"Ireland",phoneCountryCode:"+353"},{iso:"IS",regions:"冰岛",regions_en:"Iceland",phoneCountryCode:"+354"},{iso:"AL",regions:"阿尔巴尼亚",regions_en:"Albania",phoneCountryCode:"+355"},{iso:"MT",regions:"马耳他",regions_en:"Malta",phoneCountryCode:"+356"},{iso:"CY",regions:"塞浦路斯",regions_en:"Cyprus",phoneCountryCode:"+357"},{iso:"FI",regions:"芬兰",regions_en:"Finland",phoneCountryCode:"+358"},{iso:"BG",regions:"保加利亚",regions_en:"Bulgaria",phoneCountryCode:"+359"},{iso:"LT",regions:"立陶宛",regions_en:"Lithuania",phoneCountryCode:"+370"},{iso:"LV",regions:"拉脱维亚",regions_en:"Latvia",phoneCountryCode:"+371"},{iso:"EE",regions:"爱沙尼亚",regions_en:"Estonia",phoneCountryCode:"+372"},{iso:"MD",regions:"摩尔多瓦",regions_en:"Moldova",phoneCountryCode:"+373"},{iso:"AM",regions:"亚美尼亚",regions_en:"Armenia",phoneCountryCode:"+374"},{iso:"BY",regions:"白俄罗斯",regions_en:"Belarus",phoneCountryCode:"+375"},{iso:"AD",regions:"安道尔",regions_en:"Andorra",phoneCountryCode:"+376"},{iso:"MC",regions:"摩纳哥",regions_en:"Monaco",phoneCountryCode:"+377"},{iso:"SM",regions:"圣马力诺",regions_en:"San Marino",phoneCountryCode:"+378"},{iso:"UA",regions:"乌克兰",regions_en:"Ukraine",phoneCountryCode:"+380"},{iso:"RS",regions:"塞尔维亚",regions_en:"Serbia",phoneCountryCode:"+381"},{iso:"ME",regions:"黑山",regions_en:"Montenegro",phoneCountryCode:"+382"},{iso:"HR",regions:"克罗地亚",regions_en:"Croatia",phoneCountryCode:"+385"},{iso:"SI",regions:"斯洛文尼亚",regions_en:"Slovenia",phoneCountryCode:"+386"},{iso:"BA",regions:"波斯尼亚和黑塞哥维那",regions_en:"Bosniaand Herzegovina",phoneCountryCode:"+387"},{iso:"MK",regions:"马其顿",regions_en:"Macedonia",phoneCountryCode:"+389"},{iso:"CZ",regions:"捷克",regions_en:"Czech",phoneCountryCode:"+420"},{iso:"SK",regions:"斯洛伐克",regions_en:"Slovakia",phoneCountryCode:"+421"},{iso:"LI",regions:"列支敦士登",regions_en:"Liechtenstein",phoneCountryCode:"+423"},{iso:"BZ",regions:"伯利兹",regions_en:"Belize",phoneCountryCode:"+501"},{iso:"GT",regions:"瓜地马拉",regions_en:"Guatemala",phoneCountryCode:"+502"},{iso:"SV",regions:"萨尔瓦多",regions_en:"ElSalvador",phoneCountryCode:"+503"},{iso:"HN",regions:"洪都拉斯",regions_en:"Honduras",phoneCountryCode:"+504"},{iso:"NI",regions:"尼加拉瓜",regions_en:"Nicaragua",phoneCountryCode:"+505"},{iso:"CR",regions:"哥斯达黎加",regions_en:"CostaRica",phoneCountryCode:"+506"},{iso:"PA",regions:"巴拿马",regions_en:"Panama",phoneCountryCode:"+507"},{iso:"PM",regions:"圣彼埃尔和密克隆岛",regions_en:"Saint Pierreand Miquelon",phoneCountryCode:"+508"},{iso:"HT",regions:"海地",regions_en:"Haiti",phoneCountryCode:"+509"},{iso:"GP",regions:"瓜德罗普岛",regions_en:"Guadeloupe",phoneCountryCode:"+590"},{iso:"BO",regions:"玻利维亚",regions_en:"Bolivia",phoneCountryCode:"+591"},{iso:"GY",regions:"圭亚那",regions_en:"Guyana",phoneCountryCode:"+592"},{iso:"EC",regions:"厄瓜多尔",regions_en:"Ecuador",phoneCountryCode:"+593"},{iso:"GF",regions:"法属圭亚那",regions_en:"French Guiana",phoneCountryCode:"+594"},{iso:"PY",regions:"巴拉圭",regions_en:"Paraguay",phoneCountryCode:"+595"},{iso:"SR",regions:"苏里南",regions_en:"Suriname",phoneCountryCode:"+597"},{iso:"UY",regions:"乌拉圭",regions_en:"Uruguay",phoneCountryCode:"+598"},{iso:"BQ",regions:"荷兰加勒比",regions_en:"Caribisch Nederland",phoneCountryCode:"+599"},{iso:"CW",regions:"库拉索",regions_en:"Curacao",phoneCountryCode:"+599"},{iso:"TL",regions:"东帝汶",regions_en:"East Timor",phoneCountryCode:"+670"},{iso:"BN",regions:"文莱",regions_en:"Brunei",phoneCountryCode:"+673"},{iso:"NR",regions:"拿鲁岛",regions_en:"Nauru",phoneCountryCode:"+674"},{iso:"PG",regions:"巴布亚新几内亚",regions_en:"Papua New Guinea",phoneCountryCode:"+675"},{iso:"TO",regions:"汤加",regions_en:"Tonga",phoneCountryCode:"+676"},{iso:"SB",regions:"所罗门群岛",regions_en:"Solomon Islands",phoneCountryCode:"+677"},{iso:"VU",regions:"瓦努阿图",regions_en:"Vanuatu",phoneCountryCode:"+678"},{iso:"FJ",regions:"斐济",regions_en:"Fiji",phoneCountryCode:"+679"},{iso:"PW",regions:"帕劳",regions_en:"Palau",phoneCountryCode:"+680"},{iso:"CK",regions:"库克群岛",regions_en:"Cook Islands",phoneCountryCode:"+682"},{iso:"WS",regions:"萨摩亚",regions_en:"Samoa",phoneCountryCode:"+685"},{iso:"KI",regions:"基里巴斯",regions_en:"Kiribati",phoneCountryCode:"+686"},{iso:"NC",regions:"新喀里多尼亚",regions_en:"New Caledonia",phoneCountryCode:"+687"},{iso:"PF",regions:"法属波利尼西亚",regions_en:"French Polynesia",phoneCountryCode:"+689"},{iso:"FM",regions:"密克罗尼西亚",regions_en:"Micronesia",phoneCountryCode:"+691"},{iso:"MH",regions:"马绍尔群岛",regions_en:"Marshall Islands",phoneCountryCode:"+692"},{iso:"KP",regions:"朝鲜",regions_en:"Korea Democratic Rep.",phoneCountryCode:"+850"},{iso:"HK",regions:"中国香港",regions_en:"Hong Kong",phoneCountryCode:"+852"},{iso:"MO",regions:"中国澳门",regions_en:"Macau",phoneCountryCode:"+853"},{iso:"KH",regions:"柬埔寨",regions_en:"Cambodia",phoneCountryCode:"+855"},{iso:"LA",regions:"老挝",regions_en:"Laos",phoneCountryCode:"+856"},{iso:"BD",regions:"孟加拉国",regions_en:"Bangladesh",phoneCountryCode:"+880"},{iso:"TW",regions:"中国台湾",regions_en:"Taiwan",phoneCountryCode:"+886"},{iso:"MV",regions:"马尔代夫",regions_en:"Maldives",phoneCountryCode:"+960"},{iso:"LB",regions:"黎巴嫩",regions_en:"Lebanon",phoneCountryCode:"+961"},{iso:"JO",regions:"约旦",regions_en:"Jordan",phoneCountryCode:"+962"},{iso:"SY",regions:"叙利亚",regions_en:"Syria",phoneCountryCode:"+963"},{iso:"IQ",regions:"伊拉克",regions_en:"Iraq",phoneCountryCode:"+964"},{iso:"KW",regions:"科威特",regions_en:"Kuwait",phoneCountryCode:"+965"},{iso:"SA",regions:"沙特阿拉伯",regions_en:"Saudi Arabia",phoneCountryCode:"+966"},{iso:"YE",regions:"也门",regions_en:"Yemen",phoneCountryCode:"+967"},{iso:"OM",regions:"阿曼",regions_en:"Oman",phoneCountryCode:"+968"},{iso:"AE",regions:"阿拉伯联合酋长国",regions_en:"United Arab Emirates",phoneCountryCode:"+971"},{iso:"IL",regions:"以色列",regions_en:"Israel",phoneCountryCode:"+972"},{iso:"BH",regions:"巴林",regions_en:"Bahrain",phoneCountryCode:"+973"},{iso:"QA",regions:"卡塔尔",regions_en:"Qatar",phoneCountryCode:"+974"},{iso:"BT",regions:"不丹",regions_en:"Bhutan",phoneCountryCode:"+975"},{iso:"MN",regions:"蒙古",regions_en:"Mongolia",phoneCountryCode:"+976"},{iso:"NP",regions:"尼泊尔",regions_en:"Nepal",phoneCountryCode:"+977"},{iso:"TJ",regions:"塔吉克斯坦",regions_en:"Tajikistan",phoneCountryCode:"+992"},{iso:"TM",regions:"土库曼斯坦",regions_en:"Turkmenistan",phoneCountryCode:"+993"},{iso:"AZ",regions:"阿塞拜疆",regions_en:"Azerbaijan",phoneCountryCode:"+994"},{iso:"GE",regions:"格鲁吉亚",regions_en:"Georgia",phoneCountryCode:"+995"},{iso:"KG",regions:"吉尔吉斯斯坦",regions_en:"Kyrgyzstan",phoneCountryCode:"+996"},{iso:"UZ",regions:"乌兹别克斯坦",regions_en:"Uzbekistan",phoneCountryCode:"+998"},{iso:"BS",regions:"巴哈马",regions_en:"Bahamas",phoneCountryCode:"+1242"},{iso:"BB",regions:"巴巴多斯",regions_en:"Barbados",phoneCountryCode:"+1246"},{iso:"AI",regions:"安圭拉",regions_en:"Anguilla",phoneCountryCode:"+1264"},{iso:"AG",regions:"安提瓜和巴布达",regions_en:"Antigua and Barbuda",phoneCountryCode:"+1268"},{iso:"VG",regions:"英属处女群岛",regions_en:"VirginIslands,British",phoneCountryCode:"+1284"},{iso:"KY",regions:"开曼群岛",regions_en:"Cayman Islands",phoneCountryCode:"+1345"},{iso:"BM",regions:"百慕大群岛",regions_en:"Bermuda",phoneCountryCode:"+1441"},{iso:"GD",regions:"格林纳达",regions_en:"Grenada",phoneCountryCode:"+1473"},{iso:"TC",regions:"特克斯和凯科斯群岛",regions_en:"Turksand Caicos Islands",phoneCountryCode:"+1649"},{iso:"MS",regions:"蒙特塞拉特岛",regions_en:"Montserrat",phoneCountryCode:"+1664"},{iso:"GU",regions:"关岛",regions_en:"Guam",phoneCountryCode:"+1671"},{iso:"AS",regions:"美属萨摩亚",regions_en:"American Samoa",phoneCountryCode:"+1684"},{iso:"LC",regions:"圣露西亚",regions_en:"Saint Lucia",phoneCountryCode:"+1758"},{iso:"DM",regions:"多米尼加",regions_en:"Dominica",phoneCountryCode:"+1767"},{iso:"VC",regions:"圣文森特和格林纳丁斯",regions_en:"Saint Vincent and The Grenadines",phoneCountryCode:"+1784"},{iso:"PR",regions:"波多黎各",regions_en:"Puerto Rico",phoneCountryCode:"+1787"},{iso:"DO",regions:"多米尼加共和国",regions_en:"dominican republic",phoneCountryCode:"+1809"},{iso:"TT",regions:"特立尼达和多巴哥",regions_en:"Trinidadand Tobago",phoneCountryCode:"+1868"},{iso:"KN",regions:"圣基茨和尼维斯",regions_en:"Saint Kitts and Nevis",phoneCountryCode:"+1869"},{iso:"JM",regions:"牙买加",regions_en:"Jamaica",phoneCountryCode:"+1876"}],Yq=function(e){var t,n=e.value,r=e.onChange,o=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,i=Kq.map((function(e){return{value:e.iso,key:e.iso,children:e.phoneCountryCode,label:y().createElement("div",{className:"select-option-item"},y().createElement("span",null,e.phoneCountryCode),y().createElement("div",{className:"country"},y().createElement(fv,{title:"zh-CN"===o?e.regions:e.regions_en},"zh-CN"===o?e.regions:e.regions_en))),region:e.regions,region_en:e.regions_en}}));
|
|
27808
27808
|
// 现在需要回填国际化短信
|
|
27809
27809
|
return y().createElement(lI,{showSearch:!0,popupClassName:"areacode-virtual-dropdown",bordered:!1,listHeight:258,options:i,value:n,onChange:r,onClick:function(e){e.preventDefault(),e.stopPropagation()},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:y().createElement(y().Fragment,null,y().createElement(JL,{className:"areacode-virtual-dropdown-icon",type:"authing-arrow-down-s-fill",style:{width:20,height:20}}))})},Jq=function(){return Jq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jq.apply(this,arguments)},Qq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Zq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Xq=y().useEffect,eV=y().useState,tV=function(e){var t=e.areaCode,n=e.onAreaCodeChange,r=e.onChange,o=e.value,i=Qq(e,["areaCode","onAreaCodeChange","onChange","value"]),a=_u().t,s=Zq(eV(/^[^a-zA-Z]*$/.test(String(o))?o:""),2),c=s[0],l=s[1];
|
|
27810
27810
|
// 当formValue变化时候
|
|
@@ -28335,7 +28335,7 @@ var _K,PK,TK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){functio
|
|
|
28335
28335
|
// checkRepeat={true}
|
|
28336
28336
|
required:!0},y().createElement(oN,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:r("login.inputEmail"),prefix:y().createElement(JL,{type:"authing-a-mail-line3",style:{color:"#878A95"}})})),y().createElement(Dj,{text:r("common.sure"),ref:n})))},MK=function(e){var t=e.email,n=e.mfaToken,r=e.onVerify,o=e.sendCodeRef,i=e.codeLength,a=jX().post,s=SK()[vK.VerifyEmail],c=IK(null),l=_u().t,u=OK(cT.useForm(),1)[0],d=OK(AK(!1),2),f=d[0],p=d[1];xK((function(){var e;null===(e=o.current)||void 0===e||e.click()}));var h=function(e){return TK(void 0,void 0,void 0,(function(){var e,o,i,a,l,d,f,p;return NK(this,(function(h){switch(h.label){case 0:return null===(d=c.current)||void 0===d||d.onSpin(!0),e=u.getFieldValue("mfaCode"),[4/*yield*/,s({mfaToken:n,email:t,code:e})];case 1:return o=h.sent(),i=o.isFlowEnd,a=o.data,l=o.onGuardHandling,null===(f=c.current)||void 0===f||f.onSpin(!1),i?r(200,a):(null===(p=c.current)||void 0===p||p.onError(),null==l||l()),[2/*return*/]}}))}))};return y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-title"},l("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},f?"".concat(l("login.verifyCodeSended")," ").concat(u0(t)):l("common.emailMfaCheck")),y().createElement(cT,{form:u,onFinish:h,onFinishFailed:function(){var e;return null===(e=c.current)||void 0===e?void 0:e.onError()}},y().createElement(rB,{codeLength:i,ruleKeyword:l("common.captchaCode")},y().createElement(SB,{length:i,onFinish:h})),y().createElement(HU,{btnRef:o,setSent:p,beforeSend:function(){return TK(void 0,void 0,void 0,(function(){var e,n,r,o,i;return NK(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4/*yield*/,a("/api/v2/email/send",{email:t,scene:Nc.MFA_VERIFY_CODE})];case 1:return e=s.sent(),n=e.code,r=e.message,2080===e.apiCode?(
|
|
28337
28337
|
// 一分钟只能发一次邮箱验证码的提示信息,特殊处理
|
|
28338
|
-
gC.error(r),[2/*return*/,!1]):200===n?(p(!0),[2/*return*/,!0]):(gC.error(l("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(o=s.sent()).code)return gC.error(l("login.sendCodeTimeout")),[2/*return*/,!1];try{i=JSON.parse(o.message),gC.error(i.message)}catch(e){gC.error(o)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link"}),y().createElement(Dj,{text:l("common.sure"),ref:c,className:"g2-mfa-submit-button"})))},LK=function(e){var t=e.email,n=e.mfaToken,r=e.mfaLogin,o=e.config,i=OK(AK(t),2),a=i[0],s=i[1],c=IK(null),l=iD(),u=null==l?void 0:l.verifyCodeLength;return y().createElement(y().Fragment,null,a?y().createElement(MK,{mfaToken:n,email:a,onVerify:function(e,t){r(e,t)},sendCodeRef:c,codeLength:null!=u?u:4}):y().createElement(RK,{config:o,mfaToken:n,onBind:function(e){var t;s(e),null===(t=c.current)||void 0===t||t.click()}}))},DK=function(){return DK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DK.apply(this,arguments)},FK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},jK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},BK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},UK=y().useCallback,qK=y().useMemo,VK=y().useRef,zK=y().useState,$K=function(e){e.mfaToken;var t=e.onBind,n=(e.config,e.areaCode),r=e.setAreaCode,o=e.isInternationSms,i=e.mfaConfigsMap,a=VK(null),s=_u().t,c=BK(cT.useForm(),1)[0],l=UK((function(e){return o?y().createElement(tV,DK({},e,{className:"authing-g2-input",size:"large",areaCode:n,onAreaCodeChange:function(e){r(e),c.getFieldValue(["phone"])&&c.validateFields(["phone"])},maxLength:20})):y().createElement(ZU,DK({},e,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:s("login.inputPhone"),prefix:y().createElement(JL,{type:"authing-a-smartphone-line1",style:{color:"#878A95"}}),maxLength:20}))}),[n,c,o,r,s]);return y().createElement(y().Fragment,null,y().createElement("h3",{className:"authing-g2-mfa-title"},s("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},i.get(yB.SMS)?s("login.bindWarning"):s("login.bindPhoneInfo")),i.get(yB.SMS)?y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement(JL,{type:"authing-bianzu",style:{width:178,height:120}})):y().createElement(cT,{form:c,onSubmitCapture:function(){return a.current.onSpin(!0)},onFinish:function(e){return FK(void 0,[e],void 0,(function(e){var n,r,o=e.phone;return jK(this,(function(e){switch(e.label){case 0:return[4/*yield*/,c.validateFields()];case 1:e.sent(),null===(n=a.current)||void 0===n||n.onSpin(!1);try{t(o)}catch(e){
|
|
28338
|
+
gC.error(r),[2/*return*/,!1]):200===n?(p(!0),[2/*return*/,!0]):(gC.error(r||l("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(o=s.sent()).code)return gC.error(l("login.sendCodeTimeout")),[2/*return*/,!1];try{i=JSON.parse(o.message),gC.error(i.message)}catch(e){gC.error(o)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link"}),y().createElement(Dj,{text:l("common.sure"),ref:c,className:"g2-mfa-submit-button"})))},LK=function(e){var t=e.email,n=e.mfaToken,r=e.mfaLogin,o=e.config,i=OK(AK(t),2),a=i[0],s=i[1],c=IK(null),l=iD(),u=null==l?void 0:l.verifyCodeLength;return y().createElement(y().Fragment,null,a?y().createElement(MK,{mfaToken:n,email:a,onVerify:function(e,t){r(e,t)},sendCodeRef:c,codeLength:null!=u?u:4}):y().createElement(RK,{config:o,mfaToken:n,onBind:function(e){var t;s(e),null===(t=c.current)||void 0===t||t.click()}}))},DK=function(){return DK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DK.apply(this,arguments)},FK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},jK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},BK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},UK=y().useCallback,qK=y().useMemo,VK=y().useRef,zK=y().useState,$K=function(e){e.mfaToken;var t=e.onBind,n=(e.config,e.areaCode),r=e.setAreaCode,o=e.isInternationSms,i=e.mfaConfigsMap,a=VK(null),s=_u().t,c=BK(cT.useForm(),1)[0],l=UK((function(e){return o?y().createElement(tV,DK({},e,{className:"authing-g2-input",size:"large",areaCode:n,onAreaCodeChange:function(e){r(e),c.getFieldValue(["phone"])&&c.validateFields(["phone"])},maxLength:20})):y().createElement(ZU,DK({},e,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:s("login.inputPhone"),prefix:y().createElement(JL,{type:"authing-a-smartphone-line1",style:{color:"#878A95"}}),maxLength:20}))}),[n,c,o,r,s]);return y().createElement(y().Fragment,null,y().createElement("h3",{className:"authing-g2-mfa-title"},s("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},i.get(yB.SMS)?s("login.bindWarning"):s("login.bindPhoneInfo")),i.get(yB.SMS)?y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement(JL,{type:"authing-bianzu",style:{width:178,height:120}})):y().createElement(cT,{form:c,onSubmitCapture:function(){return a.current.onSpin(!0)},onFinish:function(e){return FK(void 0,[e],void 0,(function(e){var n,r,o=e.phone;return jK(this,(function(e){switch(e.label){case 0:return[4/*yield*/,c.validateFields()];case 1:e.sent(),null===(n=a.current)||void 0===n||n.onSpin(!1);try{t(o)}catch(e){
|
|
28339
28339
|
// do nothing
|
|
28340
28340
|
null===(r=a.current)||void 0===r||r.onError()}return[2/*return*/]}}))}))},onFinishFailed:function(){return a.current.onError()}},y().createElement(hU.Phone,{className:o?"authing-g2-input-form remove-padding":"authing-g2-input-form",name:"phone",form:c,
|
|
28341
28341
|
// checkRepeat={true}
|
|
@@ -28473,7 +28473,7 @@ return y().createElement(NI,PQ({split:!1,size:"small"},i,{className:iB()(i.class
|
|
|
28473
28473
|
return y().createElement(NI.Item,{actions:null==e?void 0:e.actions,extra:null==e?void 0:e.extra,key:r,onClick:function(){return null==n?void 0:n(e,r)},className:iB()("authing-guard-select-list-item"),style:(null==t?void 0:t.length)!==r+1?{marginBottom:o}:{}},y().createElement(NI.Item.Meta,{avatar:"string"==typeof(null==e?void 0:e.avatar)?y().createElement(bv,{size:40,src:e.avatar}):y().createElement(bv,PQ({size:40},e.avatar)),title:null==e?void 0:e.title,description:null==e?void 0:e.description}))}}))};!function(e){e.InputTenantCode="inputTenantCode",e.InputEnterpriseEmail="inputEnterpriseEmail",e.VerifyEmailCode="verifyEmailCode",e.NoEnterpriseDomain="noEnterpriseDomain",e.JoinSuccess="joinSuccess",e.JoinFailed="joinFailed"}(vQ||(vQ={}));// CONCATENATED MODULE: ./src/TenantPortalSelect/InputEmailCode/index.tsx
|
|
28474
28474
|
var OQ,IQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},AQ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},RQ=y().useRef,MQ=(y().useState,y().useEffect),LQ=function(e){var t=e.email,n=e.setSent,r=e.onFinish,o=_u().t,i=BX(),a=i.post,s=(i.get,iD()),c=null==s?void 0:s.verifyCodeLength,l=RQ(null);return MQ((function(){setTimeout((function(){var e;null===(e=l.current)||void 0===e||e.click()}))}),[]),y().createElement(y().Fragment,null,y().createElement(rB,{name:"emailCode",codeLength:c,ruleKeyword:o("common.captchaCode")},y().createElement(SB,{length:c,onFinish:r})),y().createElement(HU,{btnRef:l,setSent:n,beforeSend:function(){return IQ(void 0,void 0,void 0,(function(){var e,r,i,s,c;return AQ(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4/*yield*/,a("/api/v2/email/send",{email:t,scene:v.VerifyCode})];case 1:return e=l.sent(),r=e.code,i=e.message,2080===e.apiCode?(
|
|
28475
28475
|
// 一分钟只能发一次邮箱验证码的提示信息,特殊处理
|
|
28476
|
-
gC.error(i),[2/*return*/,!1]):200===r?(n(!0),[2/*return*/,!0]):(gC.error(o("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(s=l.sent()).code)return gC.error(o("login.sendCodeTimeout")),[2/*return*/,!1];try{c=JSON.parse(s.message),gC.error(c.message)}catch(e){gC.error(s)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link",className:"authing-join-send-btn"}))},DQ=function(){return DQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DQ.apply(this,arguments)},FQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},jQ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};!function(e){e.JoinTenant="join-tenant-portal",e.CreateTenant="create-tenant-portal"}(OQ||(OQ={}));var BQ,UQ,qQ=function(e,t){return FQ(void 0,void 0,void 0,(function(){return jQ(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,jX().authFlow)(e,DQ({},t))];case 1:return[2/*return*/,n.sent()]}}))}))},VQ=function(){return VQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},VQ.apply(this,arguments)},zQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},$Q=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},HQ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},WQ=y().useMemo,GQ=y().useState,KQ=y().useRef,YQ=y().useCallback,JQ=function(e){var t,n,r=e.onBack,o=_u().t,i=fD(),a=iD(),s=ZD(),c=aD(),l=HQ(GQ(null),2),u=l[0],d=l[1],f=HQ(GQ(vQ.InputTenantCode),2),p=f[0],h=f[1],m=HQ(cT.useForm(),1)[0],v=KQ(null),g=HQ(GQ(!1),2),b=g[0],w=g[1],C=HQ(GQ(""),2),E=C[0],k=C[1],S=function(e,t){return zQ(void 0,void 0,void 0,(function(){var n,r,o,a,l,u;return $Q(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),(null==e?void 0:e.host)&&c.setBaseUrl(null==e?void 0:e.host),!(null==e?void 0:e.isUserPool)&&(null==e?void 0:e.tenantId)?c.setTenantId(null==e?void 0:e.tenantId):c.setTenantId(""),[4/*yield*/,qQ(OQ.JoinTenant,{tenantId:e.tenantId,email:E||void 0,passCode:t})];case 1:return n=d.sent(),r=n.isFlowEnd,o=n.data,a=n.onGuardHandling,null===(u=null==i?void 0:i.onTenantSelect)||void 0===u||u.call(i,e),r?setTimeout((function(){var e;null===(e=null==i?void 0:i.onLogin)||void 0===e||e.call(i,o,s)})):null==a||a(),[3/*break*/,3];case 2:return(null==(l=d.sent())?void 0:l.message)&&gC.error(null==l?void 0:l.message),[3/*break*/,3];case 3:return[2/*return*/]}}))}))},x=YQ((function(){return zQ(void 0,void 0,void 0,(function(){var e,t,n,r;return $Q(this,(function(i){switch(i.label){case 0:return i.trys.push([0,7,,8]),[4/*yield*/,(s=m.getFieldValue("code"),FQ(void 0,void 0,void 0,(function(){return jQ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,(0,jX().get)("/api/v3/get-tenant-public-info-by-code",{code:s})];case 1:return[2/*return*/,e.sent()]}}))})))];case 1:return e=i.sent(),t=e.data,n=e.message,d(t),t?a.enableVerifyDomainInJoinTenant?((null===(r=t.enterpriseDomains)||void 0===r?void 0:r.length)?
|
|
28476
|
+
gC.error(i),[2/*return*/,!1]):200===r?(n(!0),[2/*return*/,!0]):(gC.error(i||o("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(s=l.sent()).code)return gC.error(o("login.sendCodeTimeout")),[2/*return*/,!1];try{c=JSON.parse(s.message),gC.error(c.message)}catch(e){gC.error(s)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link",className:"authing-join-send-btn"}))},DQ=function(){return DQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DQ.apply(this,arguments)},FQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},jQ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};!function(e){e.JoinTenant="join-tenant-portal",e.CreateTenant="create-tenant-portal"}(OQ||(OQ={}));var BQ,UQ,qQ=function(e,t){return FQ(void 0,void 0,void 0,(function(){return jQ(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,jX().authFlow)(e,DQ({},t))];case 1:return[2/*return*/,n.sent()]}}))}))},VQ=function(){return VQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},VQ.apply(this,arguments)},zQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},$Q=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},HQ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},WQ=y().useMemo,GQ=y().useState,KQ=y().useRef,YQ=y().useCallback,JQ=function(e){var t,n,r=e.onBack,o=_u().t,i=fD(),a=iD(),s=ZD(),c=aD(),l=HQ(GQ(null),2),u=l[0],d=l[1],f=HQ(GQ(vQ.InputTenantCode),2),p=f[0],h=f[1],m=HQ(cT.useForm(),1)[0],v=KQ(null),g=HQ(GQ(!1),2),b=g[0],w=g[1],C=HQ(GQ(""),2),E=C[0],k=C[1],S=function(e,t){return zQ(void 0,void 0,void 0,(function(){var n,r,o,a,l,u;return $Q(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),(null==e?void 0:e.host)&&c.setBaseUrl(null==e?void 0:e.host),!(null==e?void 0:e.isUserPool)&&(null==e?void 0:e.tenantId)?c.setTenantId(null==e?void 0:e.tenantId):c.setTenantId(""),[4/*yield*/,qQ(OQ.JoinTenant,{tenantId:e.tenantId,email:E||void 0,passCode:t})];case 1:return n=d.sent(),r=n.isFlowEnd,o=n.data,a=n.onGuardHandling,null===(u=null==i?void 0:i.onTenantSelect)||void 0===u||u.call(i,e),r?setTimeout((function(){var e;null===(e=null==i?void 0:i.onLogin)||void 0===e||e.call(i,o,s)})):null==a||a(),[3/*break*/,3];case 2:return(null==(l=d.sent())?void 0:l.message)&&gC.error(null==l?void 0:l.message),[3/*break*/,3];case 3:return[2/*return*/]}}))}))},x=YQ((function(){return zQ(void 0,void 0,void 0,(function(){var e,t,n,r;return $Q(this,(function(i){switch(i.label){case 0:return i.trys.push([0,7,,8]),[4/*yield*/,(s=m.getFieldValue("code"),FQ(void 0,void 0,void 0,(function(){return jQ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,(0,jX().get)("/api/v3/get-tenant-public-info-by-code",{code:s})];case 1:return[2/*return*/,e.sent()]}}))})))];case 1:return e=i.sent(),t=e.data,n=e.message,d(t),t?a.enableVerifyDomainInJoinTenant?((null===(r=t.enterpriseDomains)||void 0===r?void 0:r.length)?
|
|
28477
28477
|
// 输入企业邮箱
|
|
28478
28478
|
h(vQ.InputEnterpriseEmail):
|
|
28479
28479
|
// 当前组织管理员未设置企业邮箱域名,请联系管理员设置后加入组织。
|
package/package.json
CHANGED