1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="59895137-1446-4f19-8db5-7c3fb6b68ba7",e._sentryDebugIdIdentifier="sentry-dbid-59895137-1446-4f19-8db5-7c3fb6b68ba7")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{83236:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return a(4764)}])},4764:function(e,t,a){"use strict";a.r(t);var s=a(85893),r=a(41664),n=a.n(r),o=a(39332),i=a(11163),l=a(42746),d=a(50259),u=a(87536),c=a(1604),g=a(50051),m=a(58892),h=a(45364),f=a(78983),y=a(32024),p=a(46648),x=a(3525),v=a(93851),w=a(11787),b=a(57345),_=a(96280),E=a(19989),N=a(62619);t.default=()=>{var e,t,a;let r=(0,i.useRouter)(),{executeRecaptcha:j}=(0,d.xX)(),L=(0,l.useTranslations)(),A=(0,l.useTranslations)(),{register:P,handleSubmit:T,formState:{errors:k,isSubmitting:R},setError:S}=(0,u.cI)(),I=(0,b.T)(),C=T(async e=>{try{if(!j)return;let t="";if(!(t=await j("loginForm")))return;let a=await (0,v.jW)({email:e.email,password:e.password},{headers:{[y.e.reCaptchaHeadersKey]:t}});if(a.isSucceed){(0,N.uB)(E.M2.ERP_USER_TOKEN,a.data.token),(0,N.uB)(E.M2.REFRESH_TOKEN,a.data.refreshToken),I((0,_.av)(a.data.user));let e=await (0,w.TW)();e.isSucceed&&I((0,_.av)(e.data.profile))}else throw Error(a.message||"Unknown error")}catch(e){var t,a,s;S("root",{type:"manual",message:(null==e?void 0:null===(t=e.response)||void 0===t?void 0:null===(a=t.data)||void 0===a?void 0:null===(s=a.error)||void 0===s?void 0:s.message)||e.message})}}),O=(0,o.useSearchParams)(),Z=O.get("Auth.Login.redirectTo")||p._j.home,W=O.get("Auth.Login.fragment");return(0,s.jsx)(g.Z,{seo:{title:L("Pages.login")},className:"bg-gray-100 px-16 py-128",authorization:E.hJ.GUEST,redirect:Z+(W?"#".concat(W):""),"data-sentry-element":"Page","data-sentry-component":"LoginPage","data-sentry-source-file":"login.tsx",children:(0,s.jsxs)("form",{onSubmit:C,className:"relative mx-auto flex max-w-md flex-col gap-12 overflow-hidden rounded-24 bg-white px-24 py-40",children:[(0,s.jsx)(x.v9,{className:"absolute -right-32 h-128 text-gray-200","data-sentry-element":"ScentlinqLogo","data-sentry-source-file":"login.tsx"}),(0,s.jsxs)("div",{className:"relative mb-80",children:[(0,s.jsx)("h1",{className:"text-left font-display text-d-xl font-bold",children:L("Auth.Login.h1")}),(0,s.jsx)("h2",{className:" text-t-lg font-medium text-gray-500",children:L("Auth.Login.h2")})]}),(0,s.jsx)(f.ZP,{className:"lowercase",placeholder:L("Auth.Login.email.placeholder"),errors:k.email?null===(e=k.email)||void 0===e?void 0:e.message:[],disabled:R,...P("email",{required:L("Auth.Login.email.error.invalid"),validate:e=>c.z.string().email().safeParse(e).success||L("Auth.Login.email.error.invalid")}),"data-sentry-element":"Input","data-sentry-source-file":"login.tsx"}),(0,s.jsx)(f.ZP,{placeholder:L("Auth.Login.password.placeholder"),type:"password",errors:k.password?null===(t=k.password)||void 0===t?void 0:t.message:[],disabled:R,...P("password",{required:L("Auth.Login.password.error.empty")}),"data-sentry-element":"Input","data-sentry-source-file":"login.tsx"}),(0,s.jsx)(n(),{className:"text-right text-t-lg hover:underline",href:p._j.forgotPassword,"data-sentry-element":"Link","data-sentry-source-file":"login.tsx",children:L("Auth.Login.forgotPassword")}),(null===(a=k.root)||void 0===a?void 0:a.type)==="manual"&&(0,s.jsx)(m.Z,{className:"mt-12",title:L("Auth.Login.serverError.title"),message:k.root.message&&["somethingWentWrongTryAgain","noRecaptchaToken"].includes(k.root.message)?A("Common.".concat(k.root.message)):k.root.message,variant:m.U.ERROR,onClose:()=>{S("root",{})}}),(0,s.jsx)(h.ZP,{loading:R,className:"mt-12",type:"submit","data-sentry-element":"Button","data-sentry-source-file":"login.tsx",children:L("Auth.Login.submit")}),(0,s.jsx)(h.ZP,{onClick:()=>{r.push({pathname:p._j.register,query:{redirectTo:Z}})},variant:h.Wu.STROKE,type:"button","data-sentry-element":"Button","data-sentry-source-file":"login.tsx",children:L("Auth.Login.register")})]})})}}},function(e){e.O(0,[2962,8941,1604,2112,9774,2888,179],function(){return e(e.s=83236)}),_N_E=e.O()}]);
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.