1import{u as Y,a as E,V as H,W as M,j as e,F as Q,L as D,X as G,A as m,Y as p,Z as F,b as w,_ as J,B as X,$ as S,a0 as Z,g as K,e as ee,c as ae,a1 as te,f as ne,z as se,a2 as oe,r as ie,a3 as f,p as re,a4 as N,T as R,w as le,a5 as A,a6 as ce,a7 as de,a8 as ue,a9 as ge,aa as me,ab as he,ac as I,ad as pe,ae as be,af as we,ag as C,J as fe}from"./index-B_zyyVxz.js";import{r as k}from"./vendor-McOe3FL1.js";import{i as O}from"./interpolateMarkup-DM-scC0I.js";import{S as ke}from"./SocialLoginButtons-0UwuDVs1.js";import{R as ye}from"./recaptcha-wrapper-DF9kFvYJ.js";import{P as ve}from"./index-cvB0eTOU.js";import{R as xe}from"./RichText-C5mqTIMp.js";import{M as je}from"./Message-m-oGsKRC.js";import{p as Se}from"./login-BxnADuoa.js";import{u as _e}from"./useRefreshSiteAccessFlags-B_ilM6yD.js";import{ak as j}from"./app-DhXlNaMc.js";import"./dayjs-timezone-iana-plugin-cHmUPcLi.js";import"./collapseNbsp-i8CiqWZm.js";try{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="332a34b9-074c-4117-a56d-c973a98dd0c1",a._sentryDebugIdIdentifier="sentry-dbid-332a34b9-074c-4117-a56d-c973a98dd0c1")}catch{}const Pe={en:"Email",nl:"Email"},Le={en:"Forgot password?",nl:"Wachtwoord vergeten?"},Te={en:"Login",nl:"Log in"},De={en:"Password",nl:"Wachtwoord"},Fe={email:Pe,forgotPassword:Le,login:Te,password:De};function Ne(a){const t=Y(a),s=E(Fe),g=t.binding("password"),l=H(),c=M(),i=k.useCallback(n=>{t.onSubmit(n),t.values.captcharesponse=null},[t]);return e.jsxs(Q,{...m(p.form),form:t,onSubmit:i,warnUnsaved:!1,children:[e.jsx(D,{label:s("email"),required:!0,children:e.jsx(G,{disabled:a.disableEmail||t.submitting,required:!0,name:"email",type:"email",placeholder:s("email"),...t.binding("email"),autoComplete:"username",onChange:n=>{t.binding("email").onChange(n)},...m(p.emailInput)})}),e.jsxs(F,{gap:4,children:[e.jsx(D,{label:s("password"),required:!0,children:e.jsx(ve,{autoFocus:a.autoFocusPassword,disabled:t.submitting,required:!0,name:"password","aria-label":s("password"),placeholder:s("password"),onChange:n=>g.onChange(n.currentTarget.value),value:g.value||"",autoComplete:"current-password",...m(p.passwordInput)})}),e.jsx(w,{style:{marginLeft:"auto"},to:`/forgot-password${a.includeQueryOnForgotPassword?c.search:""}`,children:s("forgotPassword")})]}),e.jsx("br",{}),a.showCaptcha&&e.jsx(ye,{sitekey:l.recaptcha_checkbox_key,...t.binding("captcharesponse"),...m(p.recaptchaCheckbox)},a.attemptNumber),e.jsxs(F,{gap:"sm",children:[l.settings.auth_login_extra_text&&e.jsx(J,{bg:"gray.1",bdrs:"sm",p:"sm",children:e.jsx(xe,{size:"small",children:l.settings.auth_login_extra_text})}),e.jsx(X,{fullWidth:!0,type:"submit",loading:t.submitting,...m(p.submitButton),children:s("login")})]})]})}const Re=a=>(a.status===400||a.status===401)&&(a.code===S.FAILED_CAPTCHA||a.code===S.WRONG_PASSWORD_CAPTCHA),Ae={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeedBasicsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"detectedPrimaryLanguage"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"summary"}},{kind:"Field",name:{kind:"Name",value:"title"}}]}}]}}]},Ie={en:"Step 1. Login to your personal account",nl:"Stap 1. Log in met je persoonlijke account"},Ce={en:"This account will be linked to your %{g:organization}, you can change this later.",nl:"Dit account wordt gelinkt aan je %{g:organization}. Dit kun je later veranderen."},Oe={en:"Step 1. Login to your personal account",nl:"Stap 1. Log in met je persoonlijke account"},Ee={en:"This account will be linked to your request for help",nl:"Dit account wordt gekoppeld aan je hulpvraag"},Me={en:"You have successfully logged in through your organisation, but we do not have sufficient information available for your profile. Please, contact your administrator to be able to use the platform.",nl:"U bent succesvol ingelogd via uw organisatie, maar we hebben niet voldoende informatie beschikbaar voor uw profiel. Neem contact op met uw beheerder om het platform te kunnen gebruiken."},Ue={en:"You have successfully logged in through your school, but we have no information available for your profile. Please, contact your administrator to be able to use the platform.",nl:"U bent succesvol ingelogd via uw school, maar we hebben geen informatie beschikbaar voor uw profiel. Neem contact op met uw beheerder om het platform te kunnen gebruiken."},$e={en:"There was an error while logging you in",nl:"Er is een fout opgetreden tijdens het inloggen"},We={en:"Invalid email or password. You can <sign-up-link>sign up here</sign-up-link> if you are not a member, or you can <reset-password-link>reset your password</reset-password-link> if you have lost it.",nl:"Ongeldig e-mailadres of wachtwoord. Je kunt je hier <sign-up-link> aanmelden </sign-up-link> als je nog geen lid bent, of je kunt <reset-password-link> je wachtwoord opnieuw instellen </reset-password-link> als je het kwijt bent."},qe={en:"No account yet? ",nl:"Heb je nog geen account?"},ze={en:"Your password has been reset successfully. You can now log in.",nl:"Uw wachtwoord is succesvol gereset. U kunt nu inloggen."},Be={en:"Create account here",nl:"Maak hier een account aan"},Ve={en:"Login",nl:"Log in"},Ye={createOrgStep:Ie,createOrgStep_sub:Ce,createP2PStep:Oe,createP2PStep_sub:Ee,error_oidc_azure_missing_information:Me,error_oidc_kennisnet_missing_information:Ue,error_unknown:$e,invali
1dUsernameOrPasswordMessage:We,noAccount:qe,passwordResetSuccess:ze,registerHere:Be,title:Ve};function He(){const[a,t]=k.useState(null),[s,g]=k.useState(!1),[l,c]=k.useState(0),i=Z(),n=E(Ye),h=K(),{settings:U}=h.whitelabel,$=ee(),y=ae(),_=M(),W=te(),P=ne(),q=se(),[d]=oe(),z=_e();ie(()=>P.customMetaTags??{},!!P.customMetaTags);const v=d.get("error"),L=U.email_login_disabled&&!d.get(f.showRegularLogin),B=async r=>$(ge({...r,whitelabel:h.whitelabel})).then(async o=>{if(me(o)){const T=he(d);y(I("twoFactorAuth",{ticket:o.ticket,next:T||void 0,email:o.email||void 0,backRedirect:o.email?I("login",{email:o.email,next:T||"/"}):void 0}));return}const b=o;await W.resetStore(),b?(await z().catch(pe),Se({memberships:b,searchParams:d,location:_,navigate:y})):y(`/pending-verify-account?email=${encodeURIComponent(r.email)}`)}).catch(o=>{if(i.current){if(c(b=>b+1),o.status===401&&o.code===S.INVALID_USERNAME_OR_PASSWORD){t({type:"invalid-username-or-password",email:r.email});return}Re(o)&&(t(null),g(!0))}return q()(o)});re(n("title"));const u=d.get(f.next),x=u==="/create-organization",V=u===`/${N}${h.deedsString}/create`||u?.endsWith(`/${N}${h.deedsString}/new`);return e.jsxs("div",{className:j.root,children:[x||V?e.jsxs(e.Fragment,{children:[e.jsx(R,{order:1,ta:"center",size:"h2",children:n(x?"createOrgStep":"createP2PStep")}),e.jsx(le,{ta:"center",children:n(x?"createOrgStep_sub":"createP2PStep_sub")})]}):e.jsx(R,{order:1,ta:"center",size:"h2",children:n("title")}),e.jsxs("div",{className:j.contentWrapper,children:[d.get("passwordReset")==="true"&&e.jsx(A,{status:"success",children:e.jsx("p",{children:n("passwordResetSuccess")})}),v&&e.jsx(A,{status:"danger",children:e.jsx("p",{children:O(n(`error_${ce(v)?v:"unknown"}`),{contactLink:(...r)=>e.jsx("a",{href:`mailto:${h.whitelabel.contact_email}`,target:"_blank",rel:"nofollow noreferrer noopener",children:r})})})}),e.jsx(ke,{mode:"login",hasDividerOnBottom:!L}),a?.type==="invalid-username-or-password"&&e.jsx(je,{...m(de.invalidUsernameOrPasswordMessage),status:"danger",children:O(n("invalidUsernameOrPasswordMessage"),{"sign-up-link":(...r)=>e.jsx(w,{to:{pathname:"/register",search:`?${new URLSearchParams({...u?{next:u}:{},email:a.email}).toString()}`},children:r}),"reset-password-link":(...r)=>e.jsx(w,{to:{pathname:"/forgot-password",search:`?${new URLSearchParams({...u?{next:u}:{},email:a.email}).toString()}`},children:r})})}),!L&&e.jsxs(e.Fragment,{children:[e.jsx(Ne,{onSubmit:B,attemptNumber:l,showCaptcha:s,initialValues:{email:d.get(f.email)||""},includeQueryOnForgotPassword:!0}),e.jsxs("div",{className:j.noAccount,children:[`${n("noAccount")} `,e.jsx(w,{to:`/register${_.search}`,children:n("registerHere")})]})]})]}),e.jsx(ue,{mode:"accounts",align:"center"}),!1]})}const Qe=async({client:a,site:t,initialState:s,search:g})=>{if(!t.whitelabel.settings.login_wall_allow_insecure_deed_sharing||!a)return;const l=new URLSearchParams(g??"").get(f.next),c=be({path:we({deedsTranslation:t.deedsString}),end:!0},l??"");if(!c||!c.params.deedId)return;const{deed:i}=(await a.query({query:Ae,variables:{id:c.params.deedId}})).data;if(!i)return;s||(s={});const n={currentlyActiveLanguage:t.language,originalContentLanguage:i.detectedPrimaryLanguage,shouldAttemptTranslateToUserLanguage:!1,whitelabel:t.whitelabel};s.customMetaTags={"og:type":"article","og:title":C({...n,obj:i.title}),...fe(i.image),"og:description":C({...n,obj:i.summary})}};He.preload=Qe;export{He as default}; 2//# sourceMappingURL=index-DIqp78s9.js.map
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.