@authing/guard-shim-react 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 CHANGED
@@ -27320,7 +27320,7 @@ var zL=i(4232),$L=i(4631),HL=i(1062),WL=i(8787),GL={zhCN:zL/* default */.Z,enUS:
27320
27320
  * 多账号 状态
27321
27321
  */
27322
27322
  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},tD=y().createContext(eD),nD=y().createContext({spin:!1,spinChange:function(){}}),rD=function(){return ZL(nD)},oD=function(){return ZL(tD).publicConfig},iD=function(){return ZL(tD).httpClient},aD=function(){return ZL(tD).isSpecialBrowser},sD=function(){return ZL(tD).appId},cD=function(){return ZL(tD).tenantId};function lD(){return ZL(tD).initData}var uD=function(){return ZL(tD).currentModule},dD=function(){return ZL(tD).events},fD=function(){var e=ZL(tD);return{changeModule:e.changeModule,backModule:e.backModule,currentModule:e.currentModule}},pD=function(){return ZL(tD).finallyConfig},hD=function(){return ZL(tD).isAuthFlow},mD=function(){return ZL(tD).multipleInstance},vD=function(){return ZL(tD).phoneRegex},gD=function(){return ZL(tD).defaultLanguageConfig},yD=function(){var e=oD(),t=e.customSecurityEnabled,n=e.appRobotVerify,r=e.userpoolRobotVerify;return t?n:r},bD=function(e){var t,n,r,o=oD(),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},wD=function(e){var t,n,r,o=oD(),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},CD=y().useMemo,ED={"zh-CN":{label:"简体中文"},"zh-TW":{label:"繁體中文"},"en-US":{label:"English"},"ja-JP":{label:"日本語"}},kD=function(e){var t=e.langRange,n=void 0===t?["zh-CN","zh-TW","en-US","ja-JP"]:t,r=e.onLangChange,o=Pu().i18n,i=ZL(tD).guardPageConfig,a=pD(),s=CD((function(){return"g2-change-language-text ".concat(a.mode)}),[a]),c=CD((function(){var e;return null===(e=i.global)||void 0===e?void 0:e.showChangeLanguage}),[i]),l=CD((function(){var e,t=null!==(e=o.resolvedLanguage)&&void 0!==e?e:o.language;return Object.keys(ED).includes(t)?t:dd(t)[0]||"en-US"}),[o.resolvedLanguage,o.language]),u=CD((function(){return y().createElement(y().Fragment,null,y().createElement("span",null,ED[l].label))}),[l]),d=CD((function(){return Object.keys(ED).filter((function(e){return n.includes(e)})).map((function(e){return{key:e,label:ED[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(wP,{menu:f,trigger:["click"],placement:"bottom",overlayClassName:"authing-g2-change-language-menu"},y().createElement("span",{className:s},u,y().createElement(YL,{type:"authing-arrow-down-s-fill",className:"down-fill-svg"}))))};// CONCATENATED MODULE: ./package.json
27323
- const SD=JSON.parse('{"i8":"4.5.50-alpha.6"}');// CONCATENATED MODULE: ./src/_utils/getVersion.ts
27323
+ const SD=JSON.parse('{"i8":"4.5.50-alpha.7"}');// CONCATENATED MODULE: ./src/_utils/getVersion.ts
27324
27324
  function xD(){return SD.i8}// CONCATENATED MODULE: ./src/_utils/flowHandleStorage.ts
27325
27325
  var _D,PD=function(){return _D},TD=function(e){_D=e},ND=function(){return ND=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},ND.apply(this,arguments)},OD=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())}))},ID=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])}}},AD=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},RD=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))},MD=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return OD(void 0,void 0,void 0,(function(){return ID(this,(function(t){switch(t.label){case 0:return[4/*yield*/,fetch.apply(void 0,RD([],AD(e),!1))];case 1:return[2/*return*/,t.sent().json()]}}))}))},LD=function(e){return new Promise((function(t){setTimeout((function(){t({data:{code:-1}}),e()}),1e4)}))};MD.get=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return OD(void 0,RD([e],AD(t),!1),void 0,(function(e,t,n){var r,o,i,a,s;return void 0===t&&(t={}),ID(this,(function(c){switch(c.label){case 0:r=ND(ND({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[MD.langHeader]=m0(),s)),""!==MD.tenantId&&(r[MD.tenantHeader]=MD.tenantId),c.label=1;case 1:return c.trys.push([1,3,,4]),o=ma().CancelToken,i=o.source(),[4/*yield*/,Promise.race([LD(i.cancel),ma()("".concat(MD.baseUrl).concat(e).concat(jc().stringify(t,{addQueryPrefix:!0})),ND(ND({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*/]}}))}))},MD.post=function(e,t,n){return OD(void 0,void 0,void 0,(function(){var r,o,i,a,s,c,l;return ID(this,(function(u){switch(u.label){case 0:r=ND(ND({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[MD.langHeader]=null!==(l=cu.resolvedLanguage)&&void 0!==l?l:cu.language,s)),""!==MD.tenantId&&(r[MD.tenantHeader]=MD.tenantId),u.label=1;case 1:return u.trys.push([1,3,,4]),o=ma().CancelToken,i=o.source(),[4/*yield*/,Promise.race([LD(i.cancel),ma()("".concat(MD.baseUrl).concat(e),{data:t,method:"POST",withCredentials:!0,cancelToken:i.token,headers:ND(ND({"Content-Type":"application/json"},null==n?void 0:n.headers),(c={},c[MD.langHeader]=m0(),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*/]}}))}))},MD.postForm=function(e,t,n){return OD(void 0,void 0,void 0,(function(){var r,o,i,a;return ID(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),r=ma().CancelToken,o=r.source(),[4/*yield*/,Promise.race([LD(o.cancel),ma()("".concat(MD.baseUrl).concat(e),{method:"POST",data:t,withCredentials:!0,cancelToken:o.token,headers:ND(ND({},null==n?void 0:n.headers),(a={},a[MD.langHeader]=m0(),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*/]}}))}))},MD.baseUrl="",MD.setBaseUrl=function(e){MD.baseUrl=e.replace(/\/$/,"")};var DD,FD="x-authing-lang";MD.langHeader=FD,MD.tenantHeader="x-authing-app-tenant-idåå",MD.tenantId="",MD.setLangHeader=function(e){MD.langHeader=e||FD},MD.setTenantHeader=function(e){MD.tenantHeader=e||FD},MD.setTenantId=function(e){MD.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",
27326
27326
  /** 多租户门户选择页 */
@@ -27799,7 +27799,7 @@ m===dX.ABORT_FLOW?n():m===dX.UNSAFE_PASSWORD_TIP?(vC.error(g),h(!0)):(null===(x=
27799
27799
  return null!=c?c:t("user.passwordExpired")}),[o,r]);return y().createElement(Tq,{title:a,explain:s,logo:null==o?void 0:o.noticePwdCustomLogo},i)},Aq=function(){var e,t,n=Pu().t,r=fD().changeModule,o=oD(),i=lD(),a=y().createElement(Cq,{onReset:function(){vC.success(n("common.updatePsswordSuccess")),setTimeout((function(){null==r||r(DD.LOGIN)}),500)},onFinishCallBack:i.onFinishCallBack});return y().createElement(Tq,{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)},Rq=function(){var e=Pu().t,t=pD();return y().createElement(Tq,{title:"".concat(e("common.welcome")," ").concat(t.title),explain:e("common.registerCompletePasswordDesc")},y().createElement(_U,null))},Mq=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())}))},Lq=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])}}},Dq=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},Fq=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))},jq=y().useCallback,Bq=function(){var e,t,n=pD(),r=dD(),o=Pu().t,i=QD(),a=iD().post,s=lD(),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=Fq([l],Dq(c),!1);DB();var f=FX().authFlow,p=jq((function(e){return Mq(void 0,void 0,void 0,(function(){var t,n,o,a,s;return Lq(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(Zj,{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(hP,{className:"g2-select-account-2-login__title"},e.displayName,2==+e.usertype&&y().createElement(hP,{className:"g2-select-account-2-login__des"},o("common.publicAccount"))),y().createElement(hP,{className:"g2-multiple__tel"},(null==e?void 0:e.phone)||"-")))}))))):n.loadingComponent)},Uq=function(){return Uq=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},Uq.apply(this,arguments)};Uq({},Rc());!function(e){e.NONE="none",e.EMAIL="email",e.PHONE="phone",e.IS_NUMBER="isNumber",e.REG_EXP="regExp"}(OU||(OU={})),function(e){e.USERNAME="username",e.PHONE="phone",e.EMAIL="email"}(IU||(IU={})),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"}(AU||(AU={})),function(e){e.registerByEmail="email",e.registerByPhoneCode="phone",e.registerByEmailCode="email",e["phone-password"]="phone"}(RU||(RU={}));// CONCATENATED MODULE: ./src/SendCode/SendCodeByEmail.tsx
27800
27800
  var qq,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={};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},Wq=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=Hq(e,["scene","data","form","onSendCodeBefore","fieldName","captchaCode","onSendCodeError","codeFieldName"]),u=Pu().t,d=dD(),f=QD(),p=FX().post,h=function(e,n){return zq(void 0,void 0,void 0,(function(){var r,o,i,a,s;return $q(this,(function(c){switch(c.label){case 0:if(!e)return vC.error(u("login.inputEmail")),[2/*return*/,{status:!1,error:{code:400,message:u("login.inputEmail")}}];if(!GX("email",e))return vC.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)?(
27801
27801
  // 一分钟只能发一次邮箱验证码的提示信息,特殊处理
27802
- vC.error(i),[2/*return*/,{status:!1,error:{code:a,message:i}}]):200===o?[2/*return*/,{status:!0}]:(vC.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(eq,Vq({beforeSend:function(){return o().then((function(e){return zq(void 0,void 0,void 0,(function(){var e,o,l,u,p,m,v;return $q(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))},Gq=[{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"}],Kq=function(e){var t,n=e.value,r=e.onChange,o=null!==(t=cu.resolvedLanguage)&&void 0!==t?t:cu.language,i=Gq.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(dv,{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}}));
27802
+ vC.error(i),[2/*return*/,{status:!1,error:{code:a,message:i}}]):200===o?[2/*return*/,{status:!0}]:(vC.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(eq,Vq({beforeSend:function(){return o().then((function(e){return zq(void 0,void 0,void 0,(function(){var e,o,l,u,p,m,v;return $q(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))},Gq=[{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"}],Kq=function(e){var t,n=e.value,r=e.onChange,o=null!==(t=cu.resolvedLanguage)&&void 0!==t?t:cu.language,i=Gq.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(dv,{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}}));
27803
27803
  // 现在需要回填国际化短信
27804
27804
  return y().createElement(cI,{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(YL,{className:"areacode-virtual-dropdown-icon",type:"authing-arrow-down-s-fill",style:{width:20,height:20}}))})},Yq=function(){return Yq=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},Yq.apply(this,arguments)},Jq=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},Qq=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},Zq=y().useEffect,Xq=y().useState,eV=function(e){var t=e.areaCode,n=e.onAreaCodeChange,r=e.onChange,o=e.value,i=Jq(e,["areaCode","onAreaCodeChange","onChange","value"]),a=Pu().t,s=Qq(Xq(/^[^a-zA-Z]*$/.test(String(o))?o:""),2),c=s[0],l=s[1];
27805
27805
  // 当formValue变化时候
@@ -28330,7 +28330,7 @@ var xK,_K,PK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){functio
28330
28330
  // checkRepeat={true}
28331
28331
  required:!0},y().createElement(rN,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:r("login.inputEmail"),prefix:y().createElement(YL,{type:"authing-a-mail-line3",style:{color:"#878A95"}})})),y().createElement(Lj,{text:r("common.sure"),ref:n})))},RK=function(e){var t=e.email,n=e.mfaToken,r=e.onVerify,o=e.sendCodeRef,i=e.codeLength,a=FX().post,s=kK()[mK.VerifyEmail],c=OK(null),l=Pu().t,u=NK(sT.useForm(),1)[0],d=NK(IK(!1),2),f=d[0],p=d[1];SK((function(){var e;null===(e=o.current)||void 0===e||e.click()}));var h=function(e){return PK(void 0,void 0,void 0,(function(){var e,o,i,a,l,d,f,p;return TK(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(l0(t)):l("common.emailMfaCheck")),y().createElement(sT,{form:u,onFinish:h,onFinishFailed:function(){var e;return null===(e=c.current)||void 0===e?void 0:e.onError()}},y().createElement(nB,{codeLength:i,ruleKeyword:l("common.captchaCode")},y().createElement(kB,{length:i,onFinish:h})),y().createElement($U,{btnRef:o,setSent:p,beforeSend:function(){return PK(void 0,void 0,void 0,(function(){var e,n,r,o,i;return TK(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:Oc.MFA_VERIFY_CODE})];case 1:return e=s.sent(),n=e.code,r=e.message,2080===e.apiCode?(
28332
28332
  // 一分钟只能发一次邮箱验证码的提示信息,特殊处理
28333
- vC.error(r),[2/*return*/,!1]):200===n?(p(!0),[2/*return*/,!0]):(vC.error(l("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(o=s.sent()).code)return vC.error(l("login.sendCodeTimeout")),[2/*return*/,!1];try{i=JSON.parse(o.message),vC.error(i.message)}catch(e){vC.error(o)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link"}),y().createElement(Lj,{text:l("common.sure"),ref:c,className:"g2-mfa-submit-button"})))},MK=function(e){var t=e.email,n=e.mfaToken,r=e.mfaLogin,o=e.config,i=NK(IK(t),2),a=i[0],s=i[1],c=OK(null),l=oD(),u=null==l?void 0:l.verifyCodeLength;return y().createElement(y().Fragment,null,a?y().createElement(RK,{mfaToken:n,email:a,onVerify:function(e,t){r(e,t)},sendCodeRef:c,codeLength:null!=u?u:4}):y().createElement(AK,{config:o,mfaToken:n,onBind:function(e){var t;s(e),null===(t=c.current)||void 0===t||t.click()}}))},LK=function(){return LK=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},LK.apply(this,arguments)},DK=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())}))},FK=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])}}},jK=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},BK=y().useCallback,UK=y().useMemo,qK=y().useRef,VK=y().useState,zK=function(e){e.mfaToken;var t=e.onBind,n=(e.config,e.areaCode),r=e.setAreaCode,o=e.isInternationSms,i=e.mfaConfigsMap,a=qK(null),s=Pu().t,c=jK(sT.useForm(),1)[0],l=BK((function(e){return o?y().createElement(eV,LK({},e,{className:"authing-g2-input",size:"large",areaCode:n,onAreaCodeChange:function(e){r(e),c.getFieldValue(["phone"])&&c.validateFields(["phone"])},maxLength:20})):y().createElement(QU,LK({},e,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:s("login.inputPhone"),prefix:y().createElement(YL,{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(gB.SMS)?s("login.bindWarning"):s("login.bindPhoneInfo")),i.get(gB.SMS)?y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement(YL,{type:"authing-bianzu",style:{width:178,height:120}})):y().createElement(sT,{form:c,onSubmitCapture:function(){return a.current.onSpin(!0)},onFinish:function(e){return DK(void 0,[e],void 0,(function(e){var n,r,o=e.phone;return FK(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){
28333
+ vC.error(r),[2/*return*/,!1]):200===n?(p(!0),[2/*return*/,!0]):(vC.error(r||l("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(o=s.sent()).code)return vC.error(l("login.sendCodeTimeout")),[2/*return*/,!1];try{i=JSON.parse(o.message),vC.error(i.message)}catch(e){vC.error(o)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link"}),y().createElement(Lj,{text:l("common.sure"),ref:c,className:"g2-mfa-submit-button"})))},MK=function(e){var t=e.email,n=e.mfaToken,r=e.mfaLogin,o=e.config,i=NK(IK(t),2),a=i[0],s=i[1],c=OK(null),l=oD(),u=null==l?void 0:l.verifyCodeLength;return y().createElement(y().Fragment,null,a?y().createElement(RK,{mfaToken:n,email:a,onVerify:function(e,t){r(e,t)},sendCodeRef:c,codeLength:null!=u?u:4}):y().createElement(AK,{config:o,mfaToken:n,onBind:function(e){var t;s(e),null===(t=c.current)||void 0===t||t.click()}}))},LK=function(){return LK=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},LK.apply(this,arguments)},DK=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())}))},FK=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])}}},jK=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},BK=y().useCallback,UK=y().useMemo,qK=y().useRef,VK=y().useState,zK=function(e){e.mfaToken;var t=e.onBind,n=(e.config,e.areaCode),r=e.setAreaCode,o=e.isInternationSms,i=e.mfaConfigsMap,a=qK(null),s=Pu().t,c=jK(sT.useForm(),1)[0],l=BK((function(e){return o?y().createElement(eV,LK({},e,{className:"authing-g2-input",size:"large",areaCode:n,onAreaCodeChange:function(e){r(e),c.getFieldValue(["phone"])&&c.validateFields(["phone"])},maxLength:20})):y().createElement(QU,LK({},e,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:s("login.inputPhone"),prefix:y().createElement(YL,{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(gB.SMS)?s("login.bindWarning"):s("login.bindPhoneInfo")),i.get(gB.SMS)?y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement(YL,{type:"authing-bianzu",style:{width:178,height:120}})):y().createElement(sT,{form:c,onSubmitCapture:function(){return a.current.onSpin(!0)},onFinish:function(e){return DK(void 0,[e],void 0,(function(e){var n,r,o=e.phone;return FK(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){
28334
28334
  // do nothing
28335
28335
  null===(r=a.current)||void 0===r||r.onError()}return[2/*return*/]}}))}))},onFinishFailed:function(){return a.current.onError()}},y().createElement(pU.Phone,{className:o?"authing-g2-input-form remove-padding":"authing-g2-input-form",name:"phone",form:c,
28336
28336
  // checkRepeat={true}
@@ -28468,7 +28468,7 @@ return y().createElement(TI,_Q({split:!1,size:"small"},i,{className:oB()(i.class
28468
28468
  return y().createElement(TI.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:oB()("authing-guard-select-list-item"),style:(null==t?void 0:t.length)!==r+1?{marginBottom:o}:{}},y().createElement(TI.Item.Meta,{avatar:"string"==typeof(null==e?void 0:e.avatar)?y().createElement(yv,{size:40,src:e.avatar}):y().createElement(yv,_Q({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"}(mQ||(mQ={}));// CONCATENATED MODULE: ./src/TenantPortalSelect/InputEmailCode/index.tsx
28469
28469
  var NQ,OQ=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())}))},IQ=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])}}},AQ=y().useRef,RQ=(y().useState,y().useEffect),MQ=function(e){var t=e.email,n=e.setSent,r=e.onFinish,o=Pu().t,i=jX(),a=i.post,s=(i.get,oD()),c=null==s?void 0:s.verifyCodeLength,l=AQ(null);return RQ((function(){setTimeout((function(){var e;null===(e=l.current)||void 0===e||e.click()}))}),[]),y().createElement(y().Fragment,null,y().createElement(nB,{name:"emailCode",codeLength:c,ruleKeyword:o("common.captchaCode")},y().createElement(kB,{length:c,onFinish:r})),y().createElement($U,{btnRef:l,setSent:n,beforeSend:function(){return OQ(void 0,void 0,void 0,(function(){var e,r,i,s,c;return IQ(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?(
28470
28470
  // 一分钟只能发一次邮箱验证码的提示信息,特殊处理
28471
- vC.error(i),[2/*return*/,!1]):200===r?(n(!0),[2/*return*/,!0]):(vC.error(o("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(s=l.sent()).code)return vC.error(o("login.sendCodeTimeout")),[2/*return*/,!1];try{c=JSON.parse(s.message),vC.error(c.message)}catch(e){vC.error(s)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link",className:"authing-join-send-btn"}))},LQ=function(){return LQ=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},LQ.apply(this,arguments)},DQ=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())}))},FQ=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"}(NQ||(NQ={}));var jQ,BQ,UQ=function(e,t){return DQ(void 0,void 0,void 0,(function(){return FQ(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,FX().authFlow)(e,LQ({},t))];case 1:return[2/*return*/,n.sent()]}}))}))},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)},VQ=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())}))},zQ=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])}}},$Q=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},HQ=y().useMemo,WQ=y().useState,GQ=y().useRef,KQ=y().useCallback,YQ=function(e){var t,n,r=e.onBack,o=Pu().t,i=dD(),a=oD(),s=QD(),c=iD(),l=$Q(WQ(null),2),u=l[0],d=l[1],f=$Q(WQ(mQ.InputTenantCode),2),p=f[0],h=f[1],m=$Q(sT.useForm(),1)[0],v=GQ(null),g=$Q(WQ(!1),2),b=g[0],w=g[1],C=$Q(WQ(""),2),E=C[0],k=C[1],S=function(e,t){return VQ(void 0,void 0,void 0,(function(){var n,r,o,a,l,u;return zQ(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*/,UQ(NQ.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)&&vC.error(null==l?void 0:l.message),[3/*break*/,3];case 3:return[2/*return*/]}}))}))},x=KQ((function(){return VQ(void 0,void 0,void 0,(function(){var e,t,n,r;return zQ(this,(function(i){switch(i.label){case 0:return i.trys.push([0,7,,8]),[4/*yield*/,(s=m.getFieldValue("code"),DQ(void 0,void 0,void 0,(function(){return FQ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,(0,FX().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)?
28471
+ vC.error(i),[2/*return*/,!1]):200===r?(n(!0),[2/*return*/,!0]):(vC.error(i||o("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(s=l.sent()).code)return vC.error(o("login.sendCodeTimeout")),[2/*return*/,!1];try{c=JSON.parse(s.message),vC.error(c.message)}catch(e){vC.error(s)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link",className:"authing-join-send-btn"}))},LQ=function(){return LQ=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},LQ.apply(this,arguments)},DQ=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())}))},FQ=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"}(NQ||(NQ={}));var jQ,BQ,UQ=function(e,t){return DQ(void 0,void 0,void 0,(function(){return FQ(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,FX().authFlow)(e,LQ({},t))];case 1:return[2/*return*/,n.sent()]}}))}))},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)},VQ=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())}))},zQ=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])}}},$Q=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},HQ=y().useMemo,WQ=y().useState,GQ=y().useRef,KQ=y().useCallback,YQ=function(e){var t,n,r=e.onBack,o=Pu().t,i=dD(),a=oD(),s=QD(),c=iD(),l=$Q(WQ(null),2),u=l[0],d=l[1],f=$Q(WQ(mQ.InputTenantCode),2),p=f[0],h=f[1],m=$Q(sT.useForm(),1)[0],v=GQ(null),g=$Q(WQ(!1),2),b=g[0],w=g[1],C=$Q(WQ(""),2),E=C[0],k=C[1],S=function(e,t){return VQ(void 0,void 0,void 0,(function(){var n,r,o,a,l,u;return zQ(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*/,UQ(NQ.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)&&vC.error(null==l?void 0:l.message),[3/*break*/,3];case 3:return[2/*return*/]}}))}))},x=KQ((function(){return VQ(void 0,void 0,void 0,(function(){var e,t,n,r;return zQ(this,(function(i){switch(i.label){case 0:return i.trys.push([0,7,,8]),[4/*yield*/,(s=m.getFieldValue("code"),DQ(void 0,void 0,void 0,(function(){return FQ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,(0,FX().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)?
28472
28472
  // 输入企业邮箱
28473
28473
  h(mQ.InputEnterpriseEmail):
28474
28474
  // 当前组织管理员未设置企业邮箱域名,请联系管理员设置后加入组织。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.5.50-alpha.6",
3
+ "version": "4.5.50-alpha.7",
4
4
  "description": "Guard shim for react 16 / 17, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",