@authing/guard-shim-react 4.5.40-alpha.5 → 4.5.40-alpha.6
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 +13 -12
- package/package.json +1 -1
package/dist/guard.min.js
CHANGED
|
@@ -22484,7 +22484,7 @@ if(Bc()||"undefined"!=typeof navigator&&/wxwork/i.test(navigator.userAgent)||Uc(
|
|
|
22484
22484
|
// 由于一些特殊浏览器也可能会被误判为非特殊,所以需要首先经过第 1 步筛选
|
|
22485
22485
|
var t=Lc()();return!["Chrome","Firefox","Safari","Opera","IE","Edge"].includes(null!==(e=t.browser.name)&&void 0!==e?e:"");
|
|
22486
22486
|
// 3. 可能有一些 UA 没有任何特征,这种情况下一律默认为特殊浏览器
|
|
22487
|
-
},zc=function(){var e=jc().parse(window.location.search,{ignoreQueryPrefix:!0});try{if(e.login_page_context)return JSON.parse(e.login_page_context).phone||""}catch(e){return""}},$c=i(7061),Hc=i.n($c);// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
22487
|
+
},zc=function(){if("undefined"==typeof window)return"";var e=jc().parse(window.location.search,{ignoreQueryPrefix:!0});try{if(e.login_page_context)return JSON.parse(e.login_page_context).phone||""}catch(e){return""}},$c=i(7061),Hc=i.n($c);// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
22488
22488
|
function Wc(e){return Wc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wc(e)}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
22489
22489
|
function Gc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
22490
22490
|
function Kc(e){var t=// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
@@ -27475,7 +27475,7 @@ var $D=i(4232),HD=i(4631),WD=i(1062),GD=i(8787),KD={zhCN:$D/* default */.Z,enUS:
|
|
|
27475
27475
|
* 多账号 状态
|
|
27476
27476
|
*/
|
|
27477
27477
|
multipleInstance:{isMultipleAccount:!1,instance:void 0,referMultipleState:void 0,multipleAccountData:void 0,clearBackFillData:void 0},phoneRegex:null,defaultLanguageConfig:"zh-CN",tenantInstance:void 0},nL=y().createContext(tL),rL=y().createContext({spin:!1,spinChange:function(){}}),oL=function(){return XD(rL)},iL=function(){return XD(nL).publicConfig},aL=function(){return XD(nL).httpClient},sL=function(){return XD(nL).appId},cL=function(){return XD(nL).tenantId};function lL(){return XD(nL).initData}var uL=function(){return XD(nL).currentModule},dL=function(){return XD(nL).events},fL=function(){var e=XD(nL);return{changeModule:e.changeModule,backModule:e.backModule,currentModule:e.currentModule}},pL=function(){return XD(nL).finallyConfig},hL=function(){return XD(nL).isAuthFlow},mL=function(){return XD(nL).multipleInstance},vL=function(){return XD(nL).phoneRegex},gL=function(){return XD(nL).defaultLanguageConfig},yL=function(){var e=iL(),t=e.customSecurityEnabled,n=e.appRobotVerify,r=e.userpoolRobotVerify;return t?n:r},bL=function(e){var t,n,r=iL(),o=r.loginSmsConfig,i=r.registerSmsConfig,a=!1;switch(e){case"login":a="ON"===(null===(t=null==o?void 0:o.robot)||void 0===t?void 0:t.switch);break;case"register":a="ON"===(null===(n=null==i?void 0:i.robot)||void 0===n?void 0:n.switch)}return a},wL=y().useMemo,CL={"zh-CN":{label:"简体中文"},"zh-TW":{label:"繁體中文"},"en-US":{label:"English"},"ja-JP":{label:"日本語"}},EL=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=XD(nL).guardPageConfig,a=pL(),s=wL((function(){return"g2-change-language-text ".concat(a.mode)}),[a]),c=wL((function(){var e;return null===(e=i.global)||void 0===e?void 0:e.showChangeLanguage}),[i]),l=wL((function(){return Object.keys(CL).includes(fd)?fd:dd(fd)[0]||"en-US"}),[fd]),u=wL((function(){return y().createElement(y().Fragment,null,y().createElement("span",null,CL[l].label))}),[l]),d=wL((function(){return Object.keys(CL).filter((function(e){return n.includes(e)})).map((function(e){return{key:e,label:CL[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(JD,{type:"authing-arrow-down-s-fill",className:"down-fill-svg"}))))};// CONCATENATED MODULE: ./package.json
|
|
27478
|
-
const kL=JSON.parse('{"i8":"4.5.40-alpha.
|
|
27478
|
+
const kL=JSON.parse('{"i8":"4.5.40-alpha.6"}');// CONCATENATED MODULE: ./src/_utils/getVersion.ts
|
|
27479
27479
|
function SL(){return kL.i8}// CONCATENATED MODULE: ./src/_utils/flowHandleStorage.ts
|
|
27480
27480
|
var xL,_L=function(){return xL},PL=function(e){xL=e},TL=function(){return TL=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},TL.apply(this,arguments)},OL=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())}))},NL=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},IL=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},AL=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))},RL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return OL(void 0,void 0,void 0,(function(){return NL(this,(function(t){switch(t.label){case 0:return[4/*yield*/,fetch.apply(void 0,AL([],IL(e),!1))];case 1:return[2/*return*/,t.sent().json()]}}))}))},ML=function(e){return new Promise((function(t){setTimeout((function(){t({data:{code:-1}}),e()}),1e4)}))};RL.get=function(e,t,n){return void 0===t&&(t={}),OL(void 0,void 0,void 0,(function(){var r,o,i,a,s;return NL(this,(function(c){switch(c.label){case 0:r=TL(TL({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[RL.langHeader]=_X(),s)),""!==RL.tenantId&&(r[RL.tenantHeader]=RL.tenantId),c.label=1;case 1:return c.trys.push([1,3,,4]),o=ma().CancelToken,i=o.source(),[4/*yield*/,Promise.race([ML(i.cancel),ma()("".concat(RL.baseUrl).concat(e).concat(jc().stringify(t,{addQueryPrefix:!0})),TL(TL({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*/]}}))}))},RL.post=function(e,t,n){return OL(void 0,void 0,void 0,(function(){var r,o,i,a,s,c;return NL(this,(function(l){switch(l.label){case 0:r=TL(TL({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[RL.langHeader]=cu.resolvedLanguage,s)),""!==RL.tenantId&&(r[RL.tenantHeader]=RL.tenantId),l.label=1;case 1:return l.trys.push([1,3,,4]),o=ma().CancelToken,i=o.source(),[4/*yield*/,Promise.race([ML(i.cancel),ma()("".concat(RL.baseUrl).concat(e),{data:t,method:"POST",withCredentials:!0,cancelToken:i.token,headers:TL(TL({"Content-Type":"application/json"},null==n?void 0:n.headers),(c={},c[RL.langHeader]=_X(),c))})])];case 2:return[2/*return*/,null==(a=l.sent())?void 0:a.data];case 3:return l.sent(),[2/*return*/,Promise.resolve({code:-2})];case 4:return[2/*return*/]}}))}))},RL.postForm=function(e,t,n){return OL(void 0,void 0,void 0,(function(){var r,o,i,a;return NL(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([ML(o.cancel),ma()("".concat(RL.baseUrl).concat(e),{method:"POST",data:t,withCredentials:!0,cancelToken:o.token,headers:TL(TL({},null==n?void 0:n.headers),(a={},a[RL.langHeader]=_X(),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*/]}}))}))},RL.baseUrl="",RL.setBaseUrl=function(e){RL.baseUrl=e.replace(/\/$/,"")};var DL,LL="x-authing-lang";RL.langHeader=LL,RL.tenantHeader="x-authing-app-tenant-idåå",RL.tenantId="",RL.setLangHeader=function(e){RL.langHeader=e||LL},RL.setTenantHeader=function(e){RL.tenantHeader=e||LL},RL.setTenantId=function(e){RL.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",
|
|
27481
27481
|
/** 多租户门户选择页 */
|
|
@@ -27780,7 +27780,7 @@ n.userInfo&&(null===(t=null==d?void 0:d.onLogin)||void 0===t||t.call(d,n.userInf
|
|
|
27780
27780
|
// 优先使用用户自定义 host
|
|
27781
27781
|
g&&J&&!(null==a?void 0:a.host)&&(null==g||g.setBaseUrl(J.host))}),[J,g]),XF((function(){if(L){var e=WX(L);e&&(E(e),x(e.cdnBase))}}),[L,J]),
|
|
27782
27782
|
// 特殊脚本注入
|
|
27783
|
-
XF((function(){var e,t,n,r;if(C){var o=ad();
|
|
27783
|
+
XF((function(){var e,t,n,r;if("undefined"!=typeof window&&C){var o=ad();
|
|
27784
27784
|
// TODO: 脚本后续上传到 oss
|
|
27785
27785
|
if((null===(e=C.qrcodeTabsSettings)||void 0===e?void 0:e[zs.DingTalkQrcode])&&!(null===(t=D.current)||void 0===t?void 0:t.dingtalk)){var i=document.createElement("script");i.innerHTML='!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1382)}({1382:function(e,t){var r=function(e,t){var r=e.match(new RegExp("[?&]"+t+"=([^&]+)"));return r?r[1]:null};window.DTFrameLogin=function(e,t,n,o){var i,u=e.id&&document.getElementById(e.id)||null,c=document.createElement("iframe");t.client_id&&t.redirect_uri&&t.response_type&&t.scope?u?(u.innerHTML="",u.appendChild(c),c&&c.contentWindow&&c.contentWindow.postMessage&&window.addEventListener?(c.src="https://"+((i=t).isPre?"pre-login":"login")+".dingtalk.com/oauth2/auth?iframe=true&redirect_uri="+i.redirect_uri+"&response_type="+i.response_type+"&client_id="+i.client_id+"&scope="+i.scope+(i.prompt?"&prompt="+i.prompt:"")+(i.state?"&state="+i.state:"")+(i.org_type?"&org_type="+i.org_type:"")+(i.corpId?"&corpId="+i.corpId:"")+(i.exclusiveLogin?"&exclusiveLogin="+i.exclusiveLogin:"")+(i.exclusiveCorpId?"&exclusiveCorpId="+i.exclusiveCorpId:""),c.width=""+(e.width||300),c.height=""+(e.height||300),c.frameBorder="0",c.scrolling="no",window.addEventListener("message",(function(e){var t=e.data,i=e.origin;if(/login.dingtalk.com/.test(i)&&t)if(t.success&&t.redirectUrl){var u=t.redirectUrl,c=r(u,"authCode")||"",d=r(u,"state")||"",s=r(u,"error")||"";c?n&&n({redirectUrl:u,authCode:c,state:d}):o&&o(s)}else o&&o(t.errorMsg)}))):o&&o("Browser not support")):o&&o("Element not found"):o&&o("Missing parameters");return c;}}});',o.body.appendChild(i),D.current=Object.assign(D.current,{dingtalk:i})}if((null===(n=C.qrcodeTabsSettings)||void 0===n?void 0:n[zs.WechatworkCorpQrconnect])&&!(null===(r=D.current)||void 0===r?void 0:r.weCom)){var a=document.createElement("script");
|
|
27786
27786
|
// weComScriptDom.innerHTML = `!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).WwLogin=t()}(this,(function(){"use strict";var e=["work.weixin.qq.com","tencent.com"],t={sso:"/wwopen/sso/qrConnect",tww:"/login/wwLogin/sso/qrConnect",native:"/native/sso/qrConnect",twxg:"/login/wwLogin/sso/qrConnect"},n="1.2.7";return function(){function o(e){this.options=e,this.options=e,this.createFrame()}return o.prototype.destroyed=function(){console.log("WwLogin had destroyed."),window.removeEventListener("message",this.onPostMessage)},o.prototype.getUrl=function(e){var o=[];Object.keys(e).forEach((function(t){var n=e[t];[void 0,null].indexOf(n)>-1||-1!==["string","number","boolean"].indexOf(typeof n)&&"id"!==t&&o.push("".concat(t,"=").concat(n))})),o.push("version=".concat(n)),o.push("login_type=jssdk");var s=t[e.business_type||"sso"];if(!s)throw new Error("Argument business_type not match. Current version is ".concat(n,"."));var i="https://open.work.weixin.qq.com";return/tencent\.com$/.test(window.location.host)&&(i="https://open.wecom.tencent.com"),"".concat(i).concat(s,"?").concat(o.join("&"))},o.prototype.createFrame=function(){var e=this;if(this.options.is_mobile)window.location.href=this.getUrl(this.options);else{this.frame=document.createElement("iframe");var t=document.getElementById(this.options.id);this.frame.src=this.getUrl(this.options),this.frame.frameBorder="0",this.frame.allowTransparency="true",this.frame.scrolling="no",this.frame.width="158px",this.frame.height="158px",t.innerHTML="",t.appendChild(this.frame),this.frame.onload=function(){e.frame.contentWindow.postMessage&&window.addEventListener&&(window.addEventListener("message",e.onPostMessage),e.frame.contentWindow.postMessage("ask_usePostMessage","*"))}}},o.prototype.onPostMessage=function(t){if(e.filter((function(e){return new RegExp("".concat(e,"$")).test(t.origin)})).length){var n=t.data;if(n&&"string"==typeof n&&/^http/.test(n)){var b = document.createElement('iframe');b.src = n; b.style.display = 'none';document.body.appendChild(b)}}},o}()}));`
|
|
@@ -28070,7 +28070,7 @@ o.redirect_url=null===(t=jc().parse(i.location.search))||void 0===t?void 0:t.fin
|
|
|
28070
28070
|
// 托管登录页,直接写死登录 URL
|
|
28071
28071
|
o.identifier=e.identifier;var a=oF[e.protocol];if(!a)return null;r="".concat(n).concat(a,"?").concat(jc().stringify(o))}else{var s=iF[e.protocol];if(!s)return null;
|
|
28072
28072
|
// 嵌入式组件,从配置字段获取登录 URL
|
|
28073
|
-
r=e.config[s]}o.redirected
|
|
28073
|
+
r=e.config[s]}if(o.redirected){if("undefined"==typeof window)return;window.location.replace(r)}else JQ(r)}(s.identityProvider):te("fail"),[3/*break*/,6];case 4:return[4/*yield*/,ie(o)];case 5:c=v.sent(),se(c,t.account),v.label=6;case 6:return[3/*break*/,9];case 7:throw v.sent();case 8:
|
|
28074
28074
|
// 图形验证码出现后,不管是「图形验证码」错了,还是「账号」「密码」错了,都要重新发验证码
|
|
28075
28075
|
return V&&z(Fz(e.host)),[7/*endfinally*/];case 9:return[2/*return*/]}}))}))},onFinishFailed:function(){return F.current.onError()},autoComplete:"off",form:f,onValuesChange:function(e){(null==e?void 0:e.account)&&a&&a(zs.Password,null==e?void 0:e.account)}},y().createElement(pz,{name:"account",className:"authing-g2-input-form",validPasswordLoginMethods:(null===(t=null==R?void 0:R.passwordTabConfig)||void 0===t?void 0:t.validLoginMethods)||[],initialValue:b===zs.Password?g:""},y().createElement(gz,{className:"authing-g2-input",autoComplete:"off",size:"large",autoFocus:!S,prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}}),
|
|
28076
28076
|
// onChange={e => {
|
|
@@ -28257,11 +28257,11 @@ var t=e.i,n=e.appId,r=e.appHost,o=e.isHost,i=Pu().t,a=cL(),s=SL(),c=xH((function
|
|
|
28257
28257
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
28258
28258
|
l.redirect_url=null===(e=jc().parse(u.location.search))||void 0===e?void 0:e.finish_login_url)}if(null==t?void 0:t.provider){
|
|
28259
28259
|
// 社交身份源
|
|
28260
|
-
var d="authing-".concat(t.provider.replace(/:/g,"-"));return y().createElement(bj,{key:t.identifier,className:"g2-guard-third-login-btn",block:!0,size:"large",icon:y().createElement(JD,{type:"".concat(d,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:function(){var e,n;if(t.action===aj.Message)gC.error(i("login.socialConnectionMessage",{provider:null!==(n=null!==(e=t.displayName)&&void 0!==e?e:"zh-CN"===cu.resolvedLanguage?t.name:t.name_en)&&void 0!==n?n:t.provider}));else if(t.action===aj.Auth){var o="".concat(r,"/connections/social/").concat(t.identifier,"?").concat(jc().stringify(l));l.redirected
|
|
28260
|
+
var d="authing-".concat(t.provider.replace(/:/g,"-"));return y().createElement(bj,{key:t.identifier,className:"g2-guard-third-login-btn",block:!0,size:"large",icon:y().createElement(JD,{type:"".concat(d,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:function(){var e,n;if(t.action===aj.Message)gC.error(i("login.socialConnectionMessage",{provider:null!==(n=null!==(e=t.displayName)&&void 0!==e?e:"zh-CN"===cu.resolvedLanguage?t.name:t.name_en)&&void 0!==n?n:t.provider}));else if(t.action===aj.Auth){var o="".concat(r,"/connections/social/").concat(t.identifier,"?").concat(jc().stringify(l));if(l.redirected){if("undefined"==typeof window)return;window.location.replace(o)}else JQ(o)}}},i("login.loginBy",{name:t.displayName}))}if(o){
|
|
28261
28261
|
// 托管登录页,直接写死登录 URL
|
|
28262
28262
|
l.identifier=t.identifier;var f=oF[t.protocol];if(!f)return null;c="".concat(r).concat(f,"?").concat(jc().stringify(l))}else{var p=iF[t.protocol];if(!p)return null;
|
|
28263
28263
|
// 嵌入式组件,从配置字段获取登录 URL
|
|
28264
|
-
c=t.config[p]}return y().createElement(bj,{key:t.identifier,className:"g2-guard-third-login-btn",block:!0,size:"large",icon:y().createElement(bv,{size:20,src:t.logo,style:{marginRight:8}}),onClick:function(){l.redirected
|
|
28264
|
+
c=t.config[p]}return y().createElement(bj,{key:t.identifier,className:"g2-guard-third-login-btn",block:!0,size:"large",icon:y().createElement(bv,{size:20,src:t.logo,style:{marginRight:8}}),onClick:function(){if(l.redirected){if("undefined"==typeof window)return;window.location.replace(c)}else JQ(c)}},i("login.loginBy",{name:t.displayName}))}),[n,t,i,o,r,a]);return c()};// CONCATENATED MODULE: ./node_modules/@github/webauthn-json/dist/esm/webauthn-json.js
|
|
28265
28265
|
// src/webauthn-json/base64url.ts
|
|
28266
28266
|
function PH(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),o=new ArrayBuffer(r.length),i=new Uint8Array(o);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);return o}function TH(e){const t=new Uint8Array(e);let n="";for(const e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}
|
|
28267
28267
|
// src/webauthn-json/convert.ts
|
|
@@ -28274,7 +28274,7 @@ function(e){return IH(PH,jH,e)}(e));return function(e){return IH(TH,BH,e)}(t)}as
|
|
|
28274
28274
|
// CONCATENATED MODULE: ./src/Login/socialLogin/PasskeyButton/index.tsx
|
|
28275
28275
|
var $H,HH=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())}))},WH=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},GH=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},KH=y().useCallback,YH=function(e){var t=e.onLoginFailed,n=e.onLoginSuccess,r=iL(),o=GH((0,g.useState)(),2),i=o[0],a=o[1],s=GH((0,g.useState)(!1),2),c=s[0],l=s[1],u=pL().host,d=sL(),f=SL(),p=aL().responseIntercept,h=Pu().t,m=KH((function(){return!!r.passkeyEnabled&&!!(navigator.credentials&&navigator.credentials.create&&navigator.credentials.get&&window.PublicKeyCredential)}),[r]);return y().createElement(y().Fragment,null,m()&&y().createElement(bj,{className:"g2-guard-third-login-btn",block:!0,loading:c,size:"large",onClick:function(){return HH(void 0,void 0,void 0,(function(){var e,o,s,c,h,m,v,g,y,b,w,C,E,k,S,x,_;return WH(this,(function(P){switch(P.label){case 0:l(!0),P.label=1;case 1:return P.trys.push([1,7,8,9]),e="".concat(u,"/api/v3/webauthn/login/initialize"),[4/*yield*/,fetch(e,{method:"POST",body:JSON.stringify({}),credentials:"include",headers:(x={"Content-Type":"application/json"},x[RL.langHeader]=fd,x["x-authing-userpool-id"]=r.userPoolId,x["x-authing-app-id"]=d,x["x-authing-sdk-version"]=f,x["x-authing-request-from"]="Guard@".concat(f),x)})];case 2:return[4/*yield*/,P.sent().json()];case 3:return o=P.sent(),s=p(o),c=s.statusCode,h=s.data,m=s.message,200!==c?(t(c,void 0,m),[2/*return*/]):(h.mediation="required",h.signal=function(){i&&i.abort();var e=new AbortController;return a(e),e.signal}(),v=h.ticket,[4/*yield*/,zH(h)]);case 4:return g=P.sent(),y="".concat(u,"/api/v3/webauthn/login/finalize"),[4/*yield*/,fetch(y,{method:"POST",body:JSON.stringify({credential:g,ticket:v}),credentials:"include",headers:(_={"Content-Type":"application/json"},_[RL.langHeader]=fd,_["x-authing-userpool-id"]=r.userPoolId,_["x-authing-app-id"]=d,_["x-authing-sdk-version"]=f,_["x-authing-request-from"]="Guard@".concat(f),_)})];case 5:return[4/*yield*/,P.sent().json()];case 6:return b=P.sent(),w=p(b),C=w.statusCode,E=w.data,k=w.message,200!==C?(t(C,void 0,k),[2/*return*/]):(n(E),[3/*break*/,9]);case 7:return S=P.sent(),t(500,void 0,S.message),[3/*break*/,9];case 8:return l(!1),[7/*endfinally*/];case 9:return[2/*return*/]}}))}))},icon:y().createElement(JD,{type:"authing-slideshow-3-line",style:{fontSize:16,marginRight:8,color:"#215AE5"}})},h("login.loginWithPasskey")))},JH=function(e){var t,n=e.appId,r=e.config,o=e.enterpriseConnectionObjs,i=e.socialConnectionObjs,a=e.onLoginSuccess,s=e.onLoginFailed,c=!(null===(t=null==r?void 0:r.loginMethods)||void 0===t?void 0:t.length),l=iL(),u=null==l?void 0:l.userPoolId,d=Pu().t,f=hj().isPhoneMedia,p=cL(),h=o.map((function(e){return y().createElement(_H,{key:e.identifier,i:e,appId:n,appHost:null==r?void 0:r.host,userPoolId:u,isHost:null==r?void 0:r.isHost})})),m=i.map((function(e){var t,o,i,a,s,l,u,h="authing-".concat(e.provider.replace(/:/g,"-")),m=SL(),v={from_guard:"1",app_id:n,guard_version:"Guard@".concat(m)};if(p&&(v.tenant_id=p),(null==r?void 0:r.isHost)&&(v.from_hosted_guard="1",Vc())){v.redirected="1";var g=MX();g&&(
|
|
28276
28276
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
28277
|
-
v.redirect_url=null===(t=kH.parse(g.location.search))||void 0===t?void 0:t.finish_login_url)}var b=function(){var t,n;if(e.action===aj.Message)gC.error(d("login.socialConnectionMessage",{provider:null!==(n=null!==(t=e.displayName)&&void 0!==t?t:"zh-CN"===cu.resolvedLanguage?e.name:e.name_en)&&void 0!==n?n:e.provider}));else if(e.action===aj.Auth){var o="".concat(r.host,"/connections/social/").concat(e.identifier,"?").concat(kH.stringify(v));v.redirected
|
|
28277
|
+
v.redirect_url=null===(t=kH.parse(g.location.search))||void 0===t?void 0:t.finish_login_url)}var b=function(){var t,n;if(e.action===aj.Message)gC.error(d("login.socialConnectionMessage",{provider:null!==(n=null!==(t=e.displayName)&&void 0!==t?t:"zh-CN"===cu.resolvedLanguage?e.name:e.name_en)&&void 0!==n?n:e.provider}));else if(e.action===aj.Auth){var o="".concat(r.host,"/connections/social/").concat(e.identifier,"?").concat(kH.stringify(v));if(v.redirected){if("undefined"==typeof window)return;window.location.replace(o)}else JQ(o)}},w=r.socialConnectionsBtnShape;return"button"===w?y().createElement(bj,{key:e.id,block:!0,size:"large",className:"g2-guard-third-login-btn",icon:y().createElement(JD,{type:"".concat(h,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:b,style:{marginBottom:8}},null!==(i=null!==(o=e.displayName)&&void 0!==o?o:"zh-CN"===cu.resolvedLanguage?e.name:e.name_en)&&void 0!==i?i:e.provider):"icon"===w?f?y().createElement(bj,{className:"g2-social-login-item",onClick:b,icon:y().createElement(JD,{type:"".concat(h,"-fill")})}):y().createElement(fv,{key:e.id,title:(null===(a=e.tooltip)||void 0===a?void 0:a[cu.resolvedLanguage])||e.name,trigger:["hover","click","contextMenu"]},y().createElement(bj,{className:"g2-social-login-item",onClick:b,icon:y().createElement(JD,{type:"".concat(h,"-fill")})})):c?y().createElement(bj,{key:e.id,block:!0,size:"large",className:"g2-guard-third-login-btn",icon:y().createElement(JD,{type:"".concat(h,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:b},null!==(l=null!==(s=e.displayName)&&void 0!==s?s:"zh-CN"===cu.resolvedLanguage?e.name:e.name_en)&&void 0!==l?l:e.provider):f?y().createElement(bj,{className:"g2-social-login-item",onClick:b,key:e.id,icon:y().createElement(JD,{type:"".concat(h,"-fill")})}):y().createElement(fv,{overlayStyle:{fontFamily:"sans-serif"},key:e.id,title:e.displayName||(null===(u=e.tooltip)||void 0===u?void 0:u[cu.resolvedLanguage])||e.name,trigger:["hover","click","contextMenu"]},y().createElement(bj,{className:"g2-social-login-item",onClick:b,icon:y().createElement(JD,{type:"".concat(h,"-fill")})}))})),v=o.length?y().createElement(y().Fragment,null,!c&&y().createElement("div",{className:"g2-social-login-title"},cu.t("login.otherLoginWay")),y().createElement("div",{className:"g2-social-login-list g2-enterprise-connection-space"},h)):null,g=m.length>0&&c?y().createElement(mP,{size:c?0:12,className:"g2-guard-full-width-space no-login-methods",direction:"vertical"},m):m.length>0&&y().createElement(y().Fragment,null,y().createElement("div",{className:"g2-social-login-title"},d("login.thridAccLogin")),y().createElement("div",{className:"g2-social-login-list g2-social-connection-space"},m)),b=y().createElement("div",{className:"g2-social-login-list",style:{marginTop:-8}},y().createElement(YH,{onLoginSuccess:a,onLoginFailed:s}));return y().createElement(y().Fragment,null,!c&&y().createElement("div",{style:{flex:1,minHeight:16}}),y().createElement(mP,{size:c?0:8,direction:"vertical",className:"g2-guard-full-width-space"},!(null==l?void 0:l.ssoPageComponentDisplay.idpBtns)||v,b,!(null==l?void 0:l.ssoPageComponentDisplay.socialLoginBtns)||g))},ZH=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},QH=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))},XH=y().useMemo,eW=y().useCallback,tW=function(e){var t=e.lists,n=e.handleDel,r=e.onClick,o=Pu().t,i=hj().isPhoneMedia,a=XH((function(){return i?"click":"hover"}),[i]),s=XH((function(){return QH(QH([],ZH(t),!1),[{operation:!1,id:"other",title:o("login.useOtherAccount"),element:y().createElement("div",{className:"g2-multiple__icon--add-line"},y().createElement(JD,{style:{fontSize:24,color:"#4E5969"},type:"authing-add-line"}))}],!1)}),[t,o]),c=eW((function(e,t){n(t),e.stopPropagation()}),[n]),l=XH((function(){return s.map((function(e){var t=e,n=t.photo,i=t.title,s=t.description,l=t.id,u=t.operation,d=void 0===u||u,f=t.element;return y().createElement("li",{className:"g2-multiple__li",key:l,onClick:function(){return r(l)}},f||y().createElement("img",{className:"g2-multiple__avatar",alt:"",src:n}),y().createElement("section",{className:"g2-multiple__body"},i&&y().createElement("span",{className:"g2-multiple__title"},i),y().createElement("span",{className:i?"g2-multiple__desc":"g2-multiple__title"},s)),d&&y().createElement("span",{className:"g2-multiple__op",onClick:function(e){return e.stopPropagation()}},y().createElement(vv,{trigger:a,overlayClassName:"g2-multiple__op-wrapper",getPopupContainer:function(e){return e},content:y().createElement("div",{className:"g2-multiple__del",onClick:function(e){return c(e,l)}},y().createElement(JD,{style:{fontSize:20,marginRight:8},type:"authing-indeterminate-circle-line"}),o("common.del"))},y().createElement("div",{className:"g2-multiple__icon"},y().createElement(JD,{type:"authing-more-fill"})))))}))}),[s,r,c,o,a]);return y().createElement("ul",{className:"g2-multiple"},l)},nW=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},rW=y().useCallback,oW=y().useState,iW=y().memo((function(e){var t=nW(oW(0),2)[1],n=e.multipleInstance,r=e.referMultipleState,o=null==n?void 0:n.getMemoUser(),i=rW((function(){return t(Math.random)}),[]);if(!o)
|
|
28278
28278
|
// 这里应该额外处理下 其实本质上应该是存在的
|
|
28279
28279
|
return null;
|
|
28280
28280
|
/**
|
|
@@ -28334,13 +28334,13 @@ return(null==u?void 0:u.autoRegister)?l("login.inputAccount",{text:OX(t,x,f)}):l
|
|
|
28334
28334
|
function ZW(e){var t=Pu().t;return y().createElement(y().Fragment,null,y().createElement("div",{className:"pending-tips"},y().createElement("div",{className:"code-success"},y().createElement(JD,{type:"authing-checkbox-circle-fill"})),y().createElement("div",null,t("login.otpLoginPendingText"))),y().createElement(cT,null,y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(ly,{block:!0,style:{width:"348px",height:"44px",background:"#F2F3F5",borderRadius:"4px",border:"none"},onClick:function(){e.onCancelLogin()}},t("login.authingOtpPushCancelLogin")))))}// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/index.tsx
|
|
28335
28335
|
var QW=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())}))},XW=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},eG=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},tG=y().useCallback,nG=y().useEffect,rG=y().useRef,oG=y().useState;function iG(e){var t=this,n=e.onLoginSuccess,r=e.multipleInstance,o=e.agreements,i=eG(oG("before"),2),a=i[0],s=i[1],c=eG(oG(""),2),l=c[0],u=c[1],d=eG(oG(!0),2),f=d[0],p=d[1],h=rG(),m=eG(oG(""),2),v=m[0],g=m[1],b=function(){h.current&&clearInterval(h.current)},w=YQ(),C=w.post,E=w.get,k=iL(),S=tG((function(){b(),s("before")}),[]),x=tG((function(e){void 0===e&&(e=!0),p(e)}),[]),_=tG((function(e){return QW(t,void 0,void 0,(function(){var t,n;return XW(this,(function(r){switch(r.label){case 0:return t=e.pushCodeId,n="/api/v3/check-pushcode-status?pushCodeId=".concat(t),[4/*yield*/,E(n)];case 1:return[2/*return*/,r.sent()]}}))}))}),[E]),P=tG((function(e){return QW(t,void 0,void 0,(function(){var t;return XW(this,(function(n){switch(n.label){case 0:return"/api/v2/users/me/info",t={headers:{"x-authing-userpool-id":k.userPoolId,authorization:"Bearer ".concat(e)}},[4/*yield*/,E("/api/v2/users/me/info",{},t)];case 1:return[2/*return*/,n.sent()]}}))}))}),[E,k.userPoolId]),T=function(){return QW(t,void 0,void 0,(function(){var e,t,o,i,a,s,c,u,d;return XW(this,(function(f){switch(f.label){case 0:return[4/*yield*/,_({pushCodeId:l})];case 1:return e=f.sent(),t=e.statusCode,o=e.data,i=e.message,200!==t?(gC.error(i),S(),[2/*return*/]):"AUTHORIZED"!==o.status?[3/*break*/,3]:(a=o.tokenSet.access_token,b(),[4/*yield*/,P(a)]);case 2:if(s=f.sent(),c=s.code,u=s.data,d=s.message,200===c)return null==r||r.setLoginWay("input",zs.AuthingOtpPush),n(u,d),[2/*return*/];f.label=3;case 3:return"PUSHED"!==o.status&&(p(!1),S()),[2/*return*/]}}))}))};nG((function(){if(l)return h.current=setInterval(T,1e3),function(){b()}}),[l,_,P,n,S]);var O={before:y().createElement(JW,{defaultAccount:v,setAccount:g,onPushSuccess:function(e){s("pending"),u(e.pushCodeId)},signinByPush:function(e){return QW(t,void 0,void 0,(function(){var t,n;return XW(this,(function(r){switch(r.label){case 0:return t=e.account,n=e.agreementIds,"/api/v3/signin-by-push",[4/*yield*/,C("/api/v3/signin-by-push",{account:t,agreementIds:n})];case 1:return[2/*return*/,r.sent()]}}))}))},pushLoginStatus:f,onchangePushLoginStatus:x,agreements:o}),pending:y().createElement(ZW,{onCancelLogin:S})};return y().createElement("div",null,O[a])}// CONCATENATED MODULE: ./src/Login/socialLogin/postMessage.ts
|
|
28336
28336
|
// 处理所有使用 postMessage 方式的登录
|
|
28337
|
-
var aG=function(){return aG=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},aG.apply(this,arguments)},sG=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())}))},cG=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},lG=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},uG=SL(),dG=y().useCallback,fG=y().useEffect,pG=y().useState,hG=(y().useMemo,function(e){var t=e.QRConfig,n=e.id,r=lG(pG(!0),2),o=r[0],i=r[1],a=aL().get,s=cL(),c=sL(),l=pL(),u=iL(),d=dL(),f=YL(),p=dG((function(){return sG(void 0,void 0,void 0,(function(){var e,r,o,a,d;return cG(this,(function(f){return e=window.WwLogin,r=aG({from_guard:"1",app_id:c,guard_version:"Guard@".concat(uG)},s&&{tenant_id:s}),(null==l?void 0:l.isHost)&&(delete r.from_guard,r.from_hosted_guard="1",Vc()&&(r.redirected="1",(o=MX())&&(
|
|
28337
|
+
var aG=function(){return aG=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},aG.apply(this,arguments)},sG=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())}))},cG=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},lG=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},uG=SL(),dG=y().useCallback,fG=y().useEffect,pG=y().useState,hG=(y().useMemo,function(e){var t=e.QRConfig,n=e.id,r=lG(pG(!0),2),o=r[0],i=r[1],a=aL().get,s=cL(),c=sL(),l=pL(),u=iL(),d=dL(),f=YL(),p=dG((function(){return sG(void 0,void 0,void 0,(function(){var e,r,o,a,d;return cG(this,(function(f){return"undefined"==typeof window||(e=window.WwLogin,r=aG({from_guard:"1",app_id:c,guard_version:"Guard@".concat(uG)},s&&{tenant_id:s}),(null==l?void 0:l.isHost)&&(delete r.from_guard,r.from_hosted_guard="1",Vc()&&(r.redirected="1",(o=MX())&&(
|
|
28338
28338
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
28339
28339
|
r.redirect_url=null===(d=jc().parse(o.location.search))||void 0===d?void 0:d.finish_login_url))),(a=new e({id:"weCom_qrcode_wrapper-".concat(n),appid:t.corpId,agentid:t.agentId,redirect_uri:encodeURIComponent("".concat(t.redirectUrl,"?").concat(jc().stringify(r))),
|
|
28340
28340
|
// redirect_uri,
|
|
28341
|
-
href:"".concat(null==u?void 0:u.cdnBase,"/guard-assets/wrp_code_friesland.css"),lang:fd.includes("zh")?"zh":"en"})).frame.onload=function(e){i(!1),a.frame.contentWindow.postMessage&&a.frame.contentWindow.postMessage("ask_usePostMessage","*")},[2/*return*/]}))}))}),[t.agentId,t.corpId,t.redirectUrl,c,null==l?void 0:l.isHost,n,null==u?void 0:u.cdnBase,s]);return fG((function(){p()}),[p]),fG((function(){var n=function(n){return sG(void 0,void 0,void 0,(function(){var r,o,i,s;return cG(this,(function(c){switch(c.label){case 0:if(!IX(n))return[3/*break*/,6];c.label=1;case 1:return c.trys.push([1,5,,6]),(null==d?void 0:d.onBeforeLogin)?[4/*yield*/,null==d?void 0:d.onBeforeLogin({type:zs.WechatworkCorpQrconnect,data:n.data},f)]:[3/*break*/,3];case 2:if(!c.sent())return[2/*return*/];c.label=3;case 3:return r=new URL(n.data).search,[4/*yield*/,a("/api/v1/qrcode/".concat(t.identifier,"/verify").concat(r))];case 4:return 200===(o=c.sent()).code?(e.multipleInstance&&e.multipleInstance.setLoginWay("qrcode",zs.WechatworkCorpQrconnect,e.id),e.onLoginSuccess(o.data)):
|
|
28341
|
+
href:"".concat(null==u?void 0:u.cdnBase,"/guard-assets/wrp_code_friesland.css"),lang:fd.includes("zh")?"zh":"en"})).frame.onload=function(e){i(!1),a.frame.contentWindow.postMessage&&a.frame.contentWindow.postMessage("ask_usePostMessage","*")}),[2/*return*/]}))}))}),[t.agentId,t.corpId,t.redirectUrl,c,null==l?void 0:l.isHost,n,null==u?void 0:u.cdnBase,s]);return fG((function(){p()}),[p]),fG((function(){var n=function(n){return sG(void 0,void 0,void 0,(function(){var r,o,i,s;return cG(this,(function(c){switch(c.label){case 0:if(!IX(n))return[3/*break*/,6];c.label=1;case 1:return c.trys.push([1,5,,6]),(null==d?void 0:d.onBeforeLogin)?[4/*yield*/,null==d?void 0:d.onBeforeLogin({type:zs.WechatworkCorpQrconnect,data:n.data},f)]:[3/*break*/,3];case 2:if(!c.sent())return[2/*return*/];c.label=3;case 3:return r=new URL(n.data).search,[4/*yield*/,a("/api/v1/qrcode/".concat(t.identifier,"/verify").concat(r))];case 4:return 200===(o=c.sent()).code?(e.multipleInstance&&e.multipleInstance.setLoginWay("qrcode",zs.WechatworkCorpQrconnect,e.id),e.onLoginSuccess(o.data)):
|
|
28342
28342
|
// 向上层抛出错误
|
|
28343
|
-
(null===(s=null==o?void 0:o.onGuardHandling)||void 0===s?void 0:s.call(o))===kQ.RENDER_MESSAGE&&e.onLoginFailed(o.code,o.data,o.message),[3/*break*/,6];case 5:return i=c.sent(),gC.error(i.message),[3/*break*/,6];case 6:return[2/*return*/]}}))}))};return o||window.addEventListener("message",n,!1),function(){window.removeEventListener("message",n,!1)}}),[t.identifier,f,d,a,o,e]),y().createElement("div",{className:"wecom_container"},o&&y().createElement(uF,null),y().createElement("div",{id:"weCom_qrcode_wrapper-".concat(n),style:{display:o?"none":""}}))}),mG=function(){return mG=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},mG.apply(this,arguments)},vG=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())}))},gG=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},yG=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},bG=SL(),wG=y().useCallback,CG=y().useEffect,EG=y().useState,kG=function(e){var t=e.QRConfig,n=e.id,r=yG(EG(!0),2),o=r[0],i=r[1],a=aL().get,s=cL(),c=sL(),l=dL(),u=YL(),d=pL(),f=wG((function(){return vG(void 0,void 0,void 0,(function(){var r,o,f,p,h,m;return gG(this,(function(v){return r=window.DTFrameLogin,o=mG({from_guard:"1",embedded:"1",app_id:c,guard_version:"Guard@".concat(bG)},s&&{tenant_id:s}),f=MX(),(null==d?void 0:d.isHost)&&(delete o.from_guard,o.from_hosted_guard="1",Vc()&&(o.redirected="1",f&&(
|
|
28343
|
+
(null===(s=null==o?void 0:o.onGuardHandling)||void 0===s?void 0:s.call(o))===kQ.RENDER_MESSAGE&&e.onLoginFailed(o.code,o.data,o.message),[3/*break*/,6];case 5:return i=c.sent(),gC.error(i.message),[3/*break*/,6];case 6:return[2/*return*/]}}))}))};return o||window.addEventListener("message",n,!1),function(){window.removeEventListener("message",n,!1)}}),[t.identifier,f,d,a,o,e]),y().createElement("div",{className:"wecom_container"},o&&y().createElement(uF,null),y().createElement("div",{id:"weCom_qrcode_wrapper-".concat(n),style:{display:o?"none":""}}))}),mG=function(){return mG=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},mG.apply(this,arguments)},vG=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())}))},gG=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},yG=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},bG=SL(),wG=y().useCallback,CG=y().useEffect,EG=y().useState,kG=function(e){var t=e.QRConfig,n=e.id,r=yG(EG(!0),2),o=r[0],i=r[1],a=aL().get,s=cL(),c=sL(),l=dL(),u=YL(),d=pL(),f=wG((function(){return vG(void 0,void 0,void 0,(function(){var r,o,f,p,h,m;return gG(this,(function(v){return"undefined"==typeof window||(r=window.DTFrameLogin,o=mG({from_guard:"1",embedded:"1",app_id:c,guard_version:"Guard@".concat(bG)},s&&{tenant_id:s}),f=MX(),(null==d?void 0:d.isHost)&&(delete o.from_guard,o.from_hosted_guard="1",Vc()&&(o.redirected="1",f&&(
|
|
28344
28344
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
28345
28345
|
o.redirect_url=null===(h=jc().parse(f.location.search))||void 0===h?void 0:h.finish_login_url))),p=r({id:"dingtalk_qrcode_wrapper-".concat(n),width:"100%",height:388},{redirect_uri:encodeURIComponent("".concat(d.isHost?t.redirectUrl:null===(m=null==f?void 0:f.location)||void 0===m?void 0:m.origin,"?").concat(jc().stringify(o))),client_id:t.clientId,scope:"openid",response_type:"code",
|
|
28346
28346
|
// state: 'xxxxxxxxx',
|
|
@@ -28348,7 +28348,7 @@ prompt:"consent"},(function(n){return vG(void 0,void 0,void 0,(function(){var r,
|
|
|
28348
28348
|
// 向上层抛出错误
|
|
28349
28349
|
(null===(c=null==i?void 0:i.onGuardHandling)||void 0===c?void 0:c.call(i))===kQ.RENDER_MESSAGE&&e.onLoginFailed(i.code,i.data),[3/*break*/,6];case 5:return s=d.sent(),gC.error(s.message),[3/*break*/,6];case 6:return[2/*return*/]}}))}))}),(function(e){})),
|
|
28350
28350
|
// frame 页面二维码加载完毕
|
|
28351
|
-
p.onload=function(){setTimeout((function(){i(!1)}),500)},[2/*return*/]}))}))}),[t,c,null==d?void 0:d.isHost,s]);return CG((function(){f()}),[f]),y().createElement("div",{className:"wecom_container"},o&&y().createElement(uF,{className:"dingtalk_loading"}),y().createElement("div",{id:"dingtalk_qrcode_wrapper-".concat(n),style:{visibility:o?"hidden":"visible"}}))},SG=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())}))},xG=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},_G=y().useRef,PG=function(e){var t=_G(),n=e.canLoop,r=e.qrConfig,o=e.qrCodeScanOptions,i=aL().responseIntercept,a=dL(),s=YL(),c=Pu().t;if(!n)return null;var l={already:function(e){return y().createElement("span",{className:"qrcode__again-scan",onClick:e},c("login.scanAgain"))},ready:c("login.zjzwScanLogin"),success:c("common.LoginSuccess"),MFA:c("common.LoginSuccess")};
|
|
28351
|
+
p.onload=function(){setTimeout((function(){i(!1)}),500)}),[2/*return*/]}))}))}),[t,c,null==d?void 0:d.isHost,s]);return CG((function(){f()}),[f]),y().createElement("div",{className:"wecom_container"},o&&y().createElement(uF,{className:"dingtalk_loading"}),y().createElement("div",{id:"dingtalk_qrcode_wrapper-".concat(n),style:{visibility:o?"hidden":"visible"}}))},SG=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())}))},xG=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(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},_G=y().useRef,PG=function(e){var t=_G(),n=e.canLoop,r=e.qrConfig,o=e.qrCodeScanOptions,i=aL().responseIntercept,a=dL(),s=YL(),c=Pu().t;if(!n)return null;var l={already:function(e){return y().createElement("span",{className:"qrcode__again-scan",onClick:e},c("login.scanAgain"))},ready:c("login.zjzwScanLogin"),success:c("common.LoginSuccess"),MFA:c("common.LoginSuccess")};
|
|
28352
28352
|
/**
|
|
28353
28353
|
* Sever Status 发生变化
|
|
28354
28354
|
* @param status
|
|
@@ -28672,8 +28672,9 @@ else{var s=0;for(var c in e)if(o.insertRule){var l=c+" {"+e[c]+"}";o.insertRule(
|
|
|
28672
28672
|
/**
|
|
28673
28673
|
* @description 在托管页下上传query.login_page_context中指定的用户自定义字段进行补全(/oidc/auth发起的认证只会携带 login_page_context)
|
|
28674
28674
|
*/
|
|
28675
|
-
var dX,fX=function(){var e=[]
|
|
28675
|
+
var dX,fX=function(){var e=[];if("undefined"==typeof window)return e;
|
|
28676
28676
|
// 解析查询字符串
|
|
28677
|
+
var t=jc().parse(window.location.search,{ignoreQueryPrefix:!0}).login_page_context;
|
|
28677
28678
|
// 尝试将 loginPageContext 从字符串转换为 JSON 对象
|
|
28678
28679
|
if("string"==typeof t)try{t=JSON.parse(t)}catch(e){}
|
|
28679
28680
|
// 提取键值对函数,避免代码重复
|
package/package.json
CHANGED