PageSourceSearch

https://play.zensimu.com/assets/CZ571aGx.js

js zensimu.com collected 2026-10-08 06:34:43 UTC 6,124 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a1157e-2d88-75a3-9496-9001eacb56a5")}catch(e){}}();import{S as I}from"./CXvHpnej.js";import{A as y}from"./KBhe_ZRO.js";import{_ as M,I as C,d as V,b as L}from"./Blbj7Q2n.js";import{Z as P}from"./B3RZiJ4_.js";import{I as E}from"./CGJQRl9l.js";import{l as d,f as a,D as h,g as m,B as u,p as r,C as n,k as l,e as g,j as A,m as R,K as B,H as p}from"./lZAXvXTB.js";import"./Cea4M7LB.js";import"./BXlOunvM.js";import"./DWdpTwXK.js";const D=["auth/invalid-credential","auth/invalid-login-credentials","auth/wrong-password","auth/user-not-found","auth/invalid-email"],N={name:"login",components:{SocialSignInButtons:I,AuthViewLayout:y,ZsPasswordInput:P,IconArrowLeft:C,IconCheck:E},setup(){const s=V(),e=L();return{sharedStore:s,authStore:e}},mounted(){this.$refs.focusinput&&this.$refs.focusinput.focus()},methods:{submitLogin(s){if(s.preventDefault(),this.showSso){this.loginWithSso();return}this.resetMode?!this.email||!this.email.length?this.sharedStore.setError({message:this.$t("dashboard.verifyFormFields")}):this.authStore.sendResetPasswordEmail({email:this.email}).then(e=>{e&&(this.resetValidated=!0)}):!this.email||!this.password||!this.email.length||this.password.length<6?(this.sharedStore.setError({message:this.$t("dashboard.verifyFormFields")}),this.flagCredentials(this.email?"passwordinput":"focusinput")):this.authStore.login({email:this.email,password:this.password}).then(()=>{this.$router.push("/dashboard/intro")}).catch(e=>{D.includes(e==null?void 0:e.code)&&this.sharedStore.setError({code:e.code,message:this.$t("dashboard.authInvalidCredentials")}),this.flagCredentials("passwordinput")})},flagCredentials(s){this.credentialsInvalid=!0,this.$nextTick(()=>{var e;(e=this.$refs[s])==null||e.focus()})},toggleResetMode(){this.resetMode=!this.resetMode,this.resetValidated=!1,this.credentialsInvalid=!1},async checkSso(){if(this.resetMode||!this.email){this.ssoProvider=null;return}this.ssoProvider=await this.authStore.lookupSsoProvider(this.email)},loginWithSso(){this.authStore.loginSso({providerId:this.ssoProvider.providerId,type:this.ssoProvider.type},this.$route).then(s=>{s&&this.$router.push(s)})}},computed:{showSso(){return!!this.ssoProvider&&!this.resetMode}},watch:{email(){this.credentialsInvalid=!1},password(){this.credentialsInvalid=!1}},data(){return{credentialsInvalid:!1,email:"",password:"",resetMode:!1,resetValidated:!1,ssoProvider:null}}},z={class:"login-page"},T={class:"title is-2 has-text-centered"},W={class:"box"},F={key:0},x=["data-content"],q={class:"field"},U={for:"email",class:"label"},Z=["aria-invalid","disabled"],j={key:0,class:"field"},H={for:"current-password",class:"label"},K=["disabled"],O=["disabled"],G={key:0},J={key:1},Q={key:4,class:"has-text-success"},X={key:5,class:"mt-4"},Y={class:"has-text-centered mt-4"};function $(s,e,ee,c,t,i){const b=u("social-sign-in-buttons"),v=u("zs-password-input"),f=u("b-field"),_=u("IconCheck"),w=u("IconArrowLeft"),S=u("router-link"),k=u("auth-view-layout");return a(),d("div",z,[h(k,null,{default:m(()=>[r("h1",T,n(s.$t("dashboard.login")),1),r("div",W,[t.resetMode?l("",!0):(a(),d("div",F,[h(b,{signup:!1}),r("div",{class:"is-divider","data-content":s.$t("or")},null,8,x)])),r("form",{onSubmit:e[7]||(e[7]=(...o)=>i.submitLogin&&i.submitLogin(...o)),novalidate:""},[r("div",q,[r("label",U,n(s.$t("dashboard.signupWorkEmail")),1),A(r("input",{ref:"focusinput",id:"email",name:"email",class:R(["input",{"is-danger":t.credentialsInvalid}]),"aria-invalid":t.credentialsInvalid?"true":null,type:"email",autocomplete:"username",inputmode:"email",autocapitalize:"none",autocorrect:"off",spellcheck:"false",required:"","onUpdate:modelValue":e[0]||(e[0]=o=>t.email=o),disabled:c.sharedStore.loading,onBlur:e[1]||(e[1]=(...o)=>i.checkSso&&i.checkSso(...o)),onInput:e[2]||(e[2]=o=>t.ssoProvider=null)},null,42,Z),[[B,t.email,void 0,{trim:!0}]])]),!t.resetMode&&!i.showSso?(a(),d("div",j,[r("label",H,n(s.$t("dashboard.password")),1),h(v,{ref:"passwordinput",id:"current-password",status:t.credentialsInvalid?"is-danger":"","aria-invalid":t.credentialsInvalid?"true":null,name:"current-password",autocomplete:"current-password",required:"",modelValue:t.password,"onUpdate:modelValue":e[3]||(e[3]=o=>t.password=o),modelModifiers:{trim:!0},disabled:c.sharedStore.loading},null,8,["status","aria-invalid","modelValue","disabled"])])):l("",!0),!t.resetMode&&!i.showSso?(a(),d("button",{key:1,type:"button",class:"zs-link-button is-link-text",onClick:e[4]||(e[4]=(...o)=>i.toggleResetMode&&i.toggleResetMode(...o))},n(s.$t("dashboard.forgotPassword")),1)):l("",!0),i.showSso?(a(),g(f,{key:2,class:"has-text-centered mt-4"},{default:m(()=>[r("button",{type:"button",class:"button is-info is-rounded is-medium btn-login",disabled:c.sharedStore.loading,onClick:e[5]||(e[5]=(...o)=>i.loginWithSso&&i.loginWithSso(...o))},n(s.$t("dashboard.continueWithSso",{name:t.ssoProvider.displayName})),9,K)]),_:1})):(a(),g(f,{key:3,class:"has-text-centered mt-4"},{default:m(()=>
1[t.resetValidated?l("",!0):(a(),d("button",{key:0,type:"submit",class:"button is-info is-rounded is-large btn-login",disabled:c.sharedStore.loading},[t.resetMode?l("",!0):(a(),d("span",G,n(s.$t("dashboard.login")),1)),t.resetMode?(a(),d("span",J,n(s.$t("dashboard.sendPasswordResetLink")),1)):l("",!0)],8,O))]),_:1})),t.resetMode&&t.resetValidated?(a(),d("p",Q,[p(n(s.$t("dashboard.passwordResetLinkSent"))+" ",1),h(_,{class:"icon is-small"})])):l("",!0),t.resetMode?(a(),d("p",X,[r("button",{type:"button",class:"zs-link-button is-link-text",onClick:e[6]||(e[6]=(...o)=>i.toggleResetMode&&i.toggleResetMode(...o))},[h(w,{class:"icon is-small"}),p(" "+n(s.$t("dashboard.backToLogin")),1)])])):l("",!0)],32),r("div",Y,[h(S,{to:"/signup"},{default:m(()=>[p(n(s.$t("dashboard.loginLinkToSignup")),1)]),_:1})])])]),_:1})])}const ue=M(N,[["render",$]]);export{ue as default};
2
3//# chunkId=01a1157e-2d88-75a3-9496-9001eacb56a5

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.