PageSourceSearch

https://mintminer.com/assets/LoginView-CwmVNC6B.js

js mintminer.com collected 2026-10-06 08:09:46 UTC 17,861 bytes, 1 lines download raw bytes

1import{d as pe,z as w,B as t,E as k,H as F,G as g,u as c,X as Ue,C as d,r as l,w as Ee,n as te,o as Ce,F as Se,V as Ge,c as I,q as xe,k as V,D as S,M as He,K as ae,a1 as Je,U as Qe,Q as we,W as Xe,A as Ae,a2 as Ye,Z as Ze}from"./vendor-vue-Dzwqm9Y9.js";import"./AppHeader.vue_vue_type_style_index_0_scoped_80f3916c_lang-CWJeTQGo.js";import{a as $e,u as et,J as tt,K as at,_ as N,N as lt,O as nt,a8 as st,D as ot}from"./index-BB-1BiLf.js";import"./vendor-misc-B-nM3tYW.js";import"./useClipboard-00CrFCqB.js";/* empty css                                                                       */import{A as rt}from"./AuthLayout-DBu6UiEG.js";import{L as it,_ as ut,a as dt,b as ct,c as vt}from"./LoginAgreementPrompt-D9F0h1HR.js";import{s as pt,r as ft,c as de}from"./oauthAffiliate-CrlUwkd1.js";import{u as fe}from"./vendor-i18n-BuoWFzps.js";import{_ as mt}from"./CaptchaChallenge.vue_vue_type_script_setup_true_lang-CagJo7ro.js";import{a as ce}from"./apiError-BcAuv_LF.js";const ht={class:"space-y-4"},gt=["disabled"],yt={class:"icon mr-2",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20","aria-hidden":"true",style:{"flex-shrink":"0"}},_t={key:0,class:"flex items-center gap-3"},bt={class:"text-xs text-gray-500 dark:text-dark-400"},kt=pe({__name:"DingTalkOAuthSection",props:{disabled:{type:Boolean},affCode:{},showDivider:{type:Boolean,default:!0}},emits:["start"],setup(L,{emit:n}){const E=L,M=n,v=Ue(),{t:b}=fe();function x(){const p=v.query.redirect||"/dashboard";pt(ft(E.affCode,v.query.aff,v.query.aff_code)),M("start",{provider:"dingtalk",params:{redirect:p}})}return(p,r)=>(d(),w("div",ht,[t("button",{type:"button",disabled:L.disabled,class:"btn btn-secondary w-full",onClick:x},[(d(),w("svg",yt,[...r[0]||(r[0]=[t("circle",{cx:"12",cy:"12",r:"12",fill:"#1677FF"},null,-1),t("text",{x:"12",y:"17","font-family":"sans-serif","font-size":"13","font-weight":"bold",fill:"white","text-anchor":"middle"},"D",-1)])])),F(" "+g(c(b)("auth.dingtalk.signIn")),1)],8,gt),L.showDivider?(d(),w("div",_t,[r[1]||(r[1]=t("div",{class:"h-px flex-1 bg-gray-200 dark:bg-dark-700"},null,-1)),t("span",bt,g(c(b)("auth.oauthOrContinue")),1),r[2]||(r[2]=t("div",{class:"h-px flex-1 bg-gray-200 dark:bg-dark-700"},null,-1))])):k("",!0)]))}}),xt={class:"fixed inset-0 z-50 overflow-y-auto"},wt={class:"flex min-h-full items-center justify-center p-4"},At={class:"relative w-full max-w-md transform rounded-xl bg-white p-6 shadow-xl transition-all dark:bg-dark-800"},Et={class:"mb-6 text-center"},Ct={class:"mt-4 text-xl font-semibold text-gray-900 dark:text-white"},St={class:"mt-2 text-sm text-gray-500 dark:text-gray-400"},$t={key:0,class:"mt-1 text-sm font-medium text-gray-700 dark:text-gray-300"},Rt={class:"mb-6"},Ot={class:"flex justify-center gap-2"},It=["disabled","onInput","onKeydown"],Lt={key:0,class:"mt-3 flex items-center justify-center gap-2 text-sm text-gray-500"},Mt=["disabled"],Dt=pe({__name:"TotpLoginModal",props:{tempToken:{},userEmailMasked:{}},emits:["verify","cancel"],setup(L,{expose:n,emit:E}){const M=E,{t:v}=fe(),b=$e(),x=l(!1),p=l(["","","","","",""]),r=l([]),B=l(null);Ee(()=>p.value.join(""),s=>{s.length===6&&!x.value&&M("verify",s)}),n({setVerifying:s=>{x.value=s},setError:s=>{s&&b.showError(s),p.value=["","","","","",""],r.value.forEach(o=>{o&&(o.value="")}),B.value&&(B.value.value=""),te(()=>{var o;(o=r.value[0])==null||o.focus()})}});const O=(s,o)=>{r.value[o]=s},W=(s,o)=>{const u=s.target.value.replace(/[^0-9]/g,"");p.value[o]=u,u&&o<5&&te(()=>{var f;(f=r.value[o+1])==null||f.focus()})},$=s=>{const y=s.target.value.replace(/[^0-9]/g,"").slice(0,6).split("");y.forEach((u,f)=>{p.value[f]=u,r.value[f]&&(r.value[f].value=u)});for(let u=y.length;u<6;u++)p.value[u]="",r.value[u]&&(r.value[u].value="")},K=(s,o)=>{var y;s.key==="Backspace"&&!s.target.value&&o>0&&(s.preventDefault(),(y=r.value[o-1])==null||y.focus())},X=s=>{var f;s.preventDefault();const y=(((f=s.clipboardData)==null?void 0:f.getData("text"))||"").replace(/[^0-9]/g,"").slice(0,6).split("");y.forEach((_,D)=>{p.value[D]=_,r.value[D]&&(r.value[D].value=_)});for(let _=y.length;_<6;_++)p.value[_]="",r.value[_]&&(r.value[_].value="");const u=Math.min(y.length,5);te(()=>{var _;(_=r.value[u])==null||_.focus()})};return Ce(()=>{te(()=>{var s;(s=r.value[0])==null||s.focus()})}),(s,o)=>(d(),w("div",xt,[t("div",wt,[o[3]||(o[3]=t("div",{class:"fixed inset-0 bg-black/50 transition-opacity"},null,-1)),t("div",At,[t("div",Et,[o[1]||(o[1]=t("div",{class:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-primary-100 dark:bg-primary-900/30"},[t("svg",{class:"h-6 w-6 text-primary-600 dark:text-primary-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"})])],-1)),t("h3",Ct,g(c(v)("profile.totp.loginTitle")),1),t("p",St,g(c(v)("profile.totp.loginHint")),1),L.userEmailMasked?(d(),w("p",$t,g(L.userEmailMasked),1)):k("",!0)]),t("div",Rt,[t("input",{ref_key:"hiddenOtpInputRef",ref:B,type:"text",inputmode:"numeric",autocomplete:"one-time-code",maxlength:"6",class:"pointer-events-none absolute left-0 top-0 h-px w-px opacity-0","aria-hidden":"true",tabindex:"-1",onInput:$},null,544),t("div",Ot,[(d(),w(Se,null,Ge(6,(y,u)=>t("input",{key:u,ref_for:!0,ref:f=>O(f,u),type:"text",maxlength:"1",inputmode:"numeric",pattern:"[0-9]",autocomplete:"off",class:"h-12 w-10 rounded-lg border border-gray-300 text-center text-lg font-semibold focus:border-primary-500 focus:ring-primary-500 dark:border-dark-600 dark:bg-dark-700",disabled:x.value,onInput:f=>W(f,u),onKeydown:f=>K(f,u),onPaste:X},null,40,It)),64))]),x.value?(d(),w("div",Lt,[o[2]||(o[2]=t("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary-500"},null,-1)),F(" "+g(c(v)("common.verifying")),1)])):k("",!0)]),t("button",{type:"button",class:"btn btn-secondary w-full",disabled:x.value,onClick:o[0]||(o[0]=y=>s.$emit("cancel"))},g(c(v)("common.cancel")),9,Mt)])])]))}}),Tt={class:"space-y-6"},Pt={class:"text-center"},Vt={class:"text-2xl font-bold text-gray-900 dark:text-white"},Ft={class:"mt-2 text-sm text-gray-500 dark:text-dark-400"},Bt={for:"email",class:"input-label"},qt={class:"relative"},zt={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5"},jt=["disabled","placeholder"],Nt={for:"password",class:"input-label"},Wt={class:"relative"},Kt={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5"},Ut=["type","disabled","placeholder"],Gt=["disabled"],Ht={class:"mt-1 flex items-center justify-between"},Jt={key:0},Qt=["disabled"],Xt={key:0,class:"-ml-1 mr-2 h-4 w-4 animate-spin text-white",f
1ill:"none",viewBox:"0 0 24 24"},Yt={key:2,class:"space-y-3 pt-1"},Zt={class:"flex items-center gap-3"},ea={class:"text-xs text-gray-500 dark:text-dark-400"},ta=["disabled"],aa={class:"text-gray-500 dark:text-dark-400"},ve="sub2api_login_agreement_consent",la=pe({__name:"LoginView",setup(L){const{t:n}=fe(),E=Ze(),M=et(),v=$e(),b=l(!1),x=l(!1),p=l(""),r=l(!1),B=l(!1),O=l(!1),W=l(""),$=l(!1),K=l(""),X=l("cn"),s=l(!1),o=l(""),y=l(""),u=l("cn"),f=l(!1),_=l(!1),D=l(!1),U=l(!1),le=l(!1),me=l("OIDC"),ne=l(!1),se=l(!1),he=l(!1),ge=l(!1),q=l(!1),G=l("modal"),oe=l(""),Y=l(""),ye=l([]),T=l(!1),P=l(!1),H=l(null),R=l(""),z=l(""),Re=I(()=>s.value&&!!o.value&&!!y.value),J=I(()=>$.value&&!!K.value||Re.value),_e=I(()=>O.value&&!!W.value||J.value),Z=l(!1),ee=l(""),re=l(""),j=l(null),C=xe({email:"",password:""}),h=xe({email:"",password:"",turnstile:""}),Oe=I(()=>h.email||h.password||h.turnstile||""),ie=I(()=>q.value&&!T.value),A=I(()=>b.value||x.value||!B.value||ie.value),be=I(()=>ge.value&&typeof window.PublicKeyCredential<"u"),Ie=I(()=>!U.value&&(f.value||_.value||D.value||le.value||ne.value||se.value));Ee(Oe,(a,e)=>{a&&a!==e&&v.showError(a)}),Ce(async()=>{if(sessionStorage.getItem("auth_expired")){sessionStorage.removeItem("auth_expired");const e=n("auth.reloginRequired");p.value=e,v.showWarning(e)}try{const e=await tt();O.value=e.turnstile_enabled,W.value=e.turnstile_site_key||"",$.value=e.tencent_captcha_enabled===!0,K.value=e.tencent_captcha_app_id||"",X.value=e.tencent_captcha_region||"cn",s.value=e.aliyun_captcha_enabled===!0,o.value=e.aliyun_captcha_scene_id||"",y.value=e.aliyun_captcha_prefix||"",u.value=e.aliyun_captcha_region||"cn",f.value=e.linuxdo_oauth_enabled,_.value=e.dingtalk_oauth_enabled??!1,D.value=at(e),U.value=e.backend_mode_enabled,le.value=e.oidc_oauth_enabled,me.value=e.oidc_oauth_provider_name||"OIDC",ne.value=e.github_oauth_enabled,se.value=e.google_oauth_enabled,U.value=e.backend_mode_enabled,he.value=e.password_reset_enabled,ge.value=e.passkey_enabled===!0,Le(e)}catch(e){console.error("Failed to load public settings:",e),q.value=!1,T.value=!0}finally{B.value=!0}});function Le(a){const e=Array.isArray(a.login_agreement_documents)?a.login_agreement_documents.filter(i=>{var m;return(m=i.title)==null?void 0:m.trim()}):[];ye.value=e,q.value=a.login_agreement_enabled===!0&&e.length>0,G.value=a.login_agreement_mode==="checkbox"?"checkbox":"modal",oe.value=a.login_agreement_updated_at||"",Y.value=a.login_agreement_revision||`${oe.value}:${e.map(i=>`${i.id}:${i.title}`).join("|")}`,T.value=!q.value||Me(Y.value),P.value=q.value&&!T.value&&G.value!=="checkbox"}function Me(a){if(!a)return!1;try{const e=localStorage.getItem(ve);return e?JSON.parse(e).revision===a:!1}catch{return!1}}function De(){Y.value&&localStorage.setItem(ve,JSON.stringify({revision:Y.value,accepted_at:new Date().toISOString()})),T.value=!0,P.value=!1}function Te(){localStorage.removeItem(ve),T.value=!1,P.value=!1,v.showWarning(n("legal.loginAgreementPrompt.loginRejectedWarning"))}function Pe(a,e=""){R.value=a,z.value=e,h.turnstile=""}function Ve(){R.value="",z.value="",h.turnstile=n("auth.turnstileExpired")}function Fe(){R.value="",z.value="",h.turnstile=n("auth.turnstileFailed")}function ue(){var a;(a=H.value)==null||a.reset(),R.value="",z.value="",h.turnstile=""}async function Be(){var e;if(!J.value)return!0;const a=await((e=H.value)==null?void 0:e.verifyAction());return a?(R.value=a.token,z.value=a.randstr,!0):!1}function qe(){h.email="",h.password="",h.turnstile="";let a=!0;return ie.value?(v.showWarning(n("legal.loginAgreementPrompt.loginRequiredWarning")),G.value!=="checkbox"&&(P.value=!0),!1):(C.email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(C.email)||(h.email=n("auth.invalidEmail"),a=!1):(h.email=n("auth.emailRequired"),a=!1),C.password?C.password.length<6&&(h.password=n("auth.passwordMinLength"),a=!1):(h.password=n("auth.passwordRequired"),a=!1),O.value&&!R.value&&(h.turnstile=n("auth.completeVerification"),a=!1),a)}async function ze(){if(p.value="",!!qe()&&await Be()){b.value=!0;try{const a=await M.login({email:C.email,password:C.password,turnstile_token:O.value||s.value?R.value:void 0,tencent_captcha_ticket:$.value?R.value:void 0,tencent_captcha_randstr:$.value?z.value:void 0});if(st(a)){const i=a;ee.value=i.temp_token||"",re.value=i.user_email_masked||"",Z.value=!0,b.value=!1;return}de(),v.showSuccess(n("auth.loginSuccess"));const e=E.currentRoute.value.query.redirect||"/dashboard";await E.push(e)}catch(a){p.value=ce(a,n,"auth.errors",n("auth.loginFailed")),v.showError(p.value)}finally{_e.value&&ue(),b.value=!1}}}async function je(){var a;if(ie.value){v.showWarning(n("legal.loginAgreementPrompt.loginRequiredWarning")),G.value!=="checkbox"&&(P.value=!0);return}x.value=!0;try{let e;if(J.value){const m=await((a=H.value)==null?void 0:a.verifyAction());if(!m)return;e=$.value?{tencent_captcha_ticket:m.token,tencent_captcha_randstr:m.randstr}:{turnstile_token:m.token}}await M.loginWithPasskey(e),de(),v.showSuccess(n("auth.loginSuccess"));const i=E.currentRoute.value.query.redirect||"/dashboard";await E.push(i)}catch(e){const i=e instanceof DOMException&&e.name==="NotAllowedError"?n("auth.passkeyCancelled"):n("auth.passkeyFailed");p.value=ce(e,n,"auth.errors",i),v.showError(p.value)}finally{J.value&&ue(),x.value=!1}}async function Q(a){var e;if(!A.value){if(!J.value){window.location.href=lt(a);return}b.value=!0;try{const i=await((e=H.value)==null?void 0:e.verifyAction());if(!i)return;const m=await nt(a,$.value?{tencent_captcha_ticket:i.token,tencent_captcha_randstr:i.randstr}:{turnstile_token:i.token});window.location.href=m.authorize_url}catch(i){p.value=ce(i,n,"auth.errors",n("auth.turnstileFailed")),v.showError(p.value)}finally{ue(),b.value=!1}}}async function Ne(a){var e,i;j.value&&j.value.setVerifying(!0);try{await M.login2FA(ee.value,a),Z.value=!1,de(),v.showSuccess(n("auth.loginSuccess"));const m=E.currentRoute.value.query.redirect||"/dashboard";await E.push(m)}catch(m){const ke=m,Ke=((i=(e=ke.response)==null?void 0:e.data)==null?void 0:i.message)||ke.message||n("profile.totp.loginFailed");j.value&&(j.value.setError(Ke),j.value.setVerifying(!1))}}function We(){Z.value=!1,ee.value="",re.value=""}return(a,e)=>{const i=Je("router-link");return d(),w(Se,null,[V(c(rt),null,He({default:ae(()=>[t("div",Tt,[t("div",Pt,[t("h2",Vt,g(c(n)("auth.welcomeBack")),1),t("p",Ft,g(c(n)("auth.signInToAccount")),1)]),t("form",{onSubmit:Qe(ze,["prevent"]),class:"space-y-5"},[t("div",null,[t("label",Bt,g(c(n)("auth.emailLabel")),1),t("div",qt,[t("div",zt,[V(N,{name:"mail",size:"md",class:"text-gray-400 dark:text-dark-500"})]),we(t("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=m=>C.email=m),type:"email",required:"",autofocus:"",autocomplete:"email",disabled:A.value,class:Ae(["input pl-11",{"input-error":h.email}]),placeholder:c(n)("auth.emailPlaceholder")},null,10,jt),[[Xe,C.email]])])]),t("div",null,[t("label",Nt,g(c(n)("auth.passwordLabel")),1),t("div",Wt,[t("div",Kt,[V(N,{name:"lock",size:"md",class:"text-gray-400 dark:text-dark-500"})]),we(t("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=m=>C.password=m),type:r.value?"text":"password",required:"",autocomplete:"current-password",disabled:A.value,class:Ae(["input pl-11 pr-11",{"input-error":h.password}]),placeholder:c(n)("auth.passwordPlaceholder")},null,10,Ut),[[Ye,C.password]]),t("button",{type:"button",onClick:e[2]||(e[2]=m=>r.value=!r.value),disabled:A.value,class:"absolute inset-y-0 right-0 flex items-center pr-3.5 text-gray-400 transition-colors hover:text-gray-600 dark:hover:text-dark-300"},[r.value?(d(),S(N,{key:0,name:"eyeOff",size:"md"})):(d(),S(N,{key:1,name:"eye",size:"md"}))],8,Gt)]),t("div",Ht,[e[4]||(e[4]=t("span",null,null,-1)),he.value&&!U.value?(d(),S(i,{key:0,to:"/forgot-password",class:"text-sm font-medium text-primary-600 transition-colors hover:text-primary-500 dark:text-primary-400 dark:hover:text-primary-300"},{default:ae(()=>[F(g(c(n)("auth.forgotPassword")),1)]),_:1})):k("",!0)])]),_e.value?(d(),w("div",Jt,[V(mt,{ref_key:"turnstileRef",ref:H,"turnstile-enabled":O.value,"turnstile-site-key":W.value,"tencent-enabled":$.value,"tencent-app-id":K.value,"tencent-region":X.value,"aliyun-enabled":s.value,"aliyun-scene-id":o.value,"aliyun-prefix":y.value,"aliyun-region":u.value,onVerify:Pe,onExpire:Ve,onError:Fe},null,8,["turnstile-enabled","turnstile-site-key","tencent-enabled","tencent-app-id","tencent-region","aliyun-enabled","aliyun-scene-id","aliyun-prefix","aliyun-region"])])):k("",!0),t("button",{type:"submit",disabled:A.value||O.value&&!R.value,class:"btn btn-primary w-full"},[b.value?(d(),w("svg",Xt,[...e[5]||(e[5]=[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(d(),S(N,{key:1,name:"login",size:"md",class:"mr-2"})),F(" "+g(b.value?c(n)("auth.signingIn"):c(n)("auth.signIn")),1)],8,Qt),q.value?(d(),S(it,{key:1,accepted:T.value,documents:ye.value,mode:G.value,"updated-at":oe.value,visible:P.value,onAccept:De,onReject:Te,onOpen:e[3]||(e[3]=m=>P.value=!0)},null,8,["accepted","documents","mode","updated-at","visible"])):k("",!0),be.value||Ie.value?(d(),w("div",Yt,[t("div",Zt,[e[6]||(e[6]=t("div",{class:"h-px flex-1 bg-gray-200 dark:bg-dark-700"},null,-1)),t("span",ea,g(c(n)("auth.oauthOrContinue")),1),e[7]||(e[7]=t("div",{class:"h-px flex-1 bg-gray-200 dark:bg-dark-700"}
1,null,-1))]),be.value?(d(),w("button",{key:0,type:"button",class:"btn btn-secondary w-full",disabled:A.value,onClick:je},[V(N,{name:"key",size:"md",class:"mr-2"}),F(" "+g(x.value?c(n)("auth.passkeySigningIn"):c(n)("auth.passkeySignIn")),1)],8,ta)):k("",!0),V(ut,{disabled:A.value,"github-enabled":ne.value,"google-enabled":se.value,"show-divider":!1,onStart:Q},null,8,["disabled","github-enabled","google-enabled"]),f.value?(d(),S(dt,{key:1,disabled:A.value,"show-divider":!1,onStart:Q},null,8,["disabled"])):k("",!0),_.value?(d(),S(kt,{key:2,disabled:A.value,"show-divider":!1,onStart:Q},null,8,["disabled"])):k("",!0),D.value?(d(),S(ct,{key:3,disabled:A.value,"show-divider":!1,onStart:Q},null,8,["disabled"])):k("",!0),le.value?(d(),S(vt,{key:4,disabled:A.value,"provider-name":me.value,"show-divider":!1,onStart:Q},null,8,["disabled","provider-name"])):k("",!0)])):k("",!0)],32)])]),_:2},[U.value?void 0:{name:"footer",fn:ae(()=>[t("p",aa,[F(g(c(n)("auth.dontHaveAccount"))+" ",1),V(i,{to:"/register",class:"font-medium text-primary-600 transition-colors hover:text-primary-500 dark:text-primary-400 dark:hover:text-primary-300"},{default:ae(()=>[F(g(c(n)("auth.signUp")),1)]),_:1})])]),key:"0"}]),1024),Z.value?(d(),S(Dt,{key:0,ref_key:"totpModalRef",ref:j,"temp-token":ee.value,"user-email-masked":re.value,onVerify:Ne,onCancel:We},null,8,["temp-token","user-email-masked"])):k("",!0)],64)}}}),ha=ot(la,[["__scopeId","data-v-908c1df6"]]);export{ha as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.