PageSourceSearch

https://backtrace.io/_next/static/chunks/pages/login-43f1e007f51c8f99.js

js backtrace.io collected 2026-10-01 11:33:02 UTC 17,023 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[459],{3236:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return n(2453)}])},2453:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return C},default:function(){return E}});var r=n(5893),s=n(7294),a=n(8358),i=n(7568),c=n(6042),o=n(655),u=n(7536),l=n(8862);function d(e,t){return f.apply(this,arguments)}function f(){return(f=(0,i.Z)((function(e,t){var n;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return"https://create.backtrace.io/api/discover",(n={}).method="POST",n.body=JSON.stringify((0,l.O)({email:e,password:t})),n.headers={"Content-Type":"application/json"},[4,fetch("https://create.backtrace.io/api/discover",n).then((function(e){return e.json()})).catch((function(e){return e}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}var m=n(7620),h=n(9603),p=n(8779),x=n(5106),g=n.n(x),w=n(6263),v=n(9594),b=n(1329),y=function(e){var t=e.setFormState,n=e.setSubmittedEmail,a=(0,s.useState)(""),l=a[0],f=a[1],x=(0,s.useState)(!1),y=x[0],j=x[1],_=(0,u.cI)(),N=_.register,S=_.getValues,k=_.reset,Z=_.formState.errors,C=(0,v.Z)(),E=C.recaptchaRef,F=C.checkCaptcha,A=C.verifyCaptcha,R=function(){var e=(0,i.Z)((function(e){var r,s,a,i,c,u,l,m,h;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return j(!0),[4,A(e)];case 1:return o.sent().captchaSuccess?(r=S(),s=r.email,a=r.password,n(s),f(""),[4,d(s,a)]):[3,3];case 2:i=o.sent(),h={},u=(c=i||h).originalEmail,l=c.message,(m=c.redirectUrl)?(window.location.href=m,k()):"multiple accounts"===l?t("multiple-instances"):f(u&&l?"Unable to log in with user ".concat(u,": ").concat(l):l?"Unable to log in: ".concat(l):"Something went wrong, please try again."),o.label=3;case 3:return j(!1),[2]}}))}));return function(t){return e.apply(this,arguments)}}();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Z,{onSubmit:R,ref:E}),(0,r.jsxs)("div",{className:"".concat(g().card),children:[(0,r.jsx)(w.Z,{authOptions:[{label:"Sign in",link:"/login"},{label:"Create account",link:"/sign-up"}]}),(0,r.jsxs)("form",{onSubmit:F,className:"flex flex-col gap-5 mt-9",children:[(0,r.jsx)("input",(0,c.Z)({type:"email",placeholder:"Email Address"},N("email",{required:!0,onBlur:function(e){return e.target.reportValidity()}}))),(0,r.jsx)(m.Z,{placeholder:"Password",id:"password",register:N,errors:Z,minLength:!1}),(0,r.jsxs)("div",{className:"grid grid-cols-1 xs:grid-cols-2 gap-y-5",children:[(0,r.jsx)("button",{type:"submit",className:"font-semibold bg-[#EC8273] text-white py-3 w-full justify-center rounded-md flex items-center gap-2.5",disabled:y,children:y?"Signing in...":(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.G,{icon:p.Yem,className:"w-3.5 text-white"}),"Sign In"]})}),(0,r.jsx)("div",{className:"flex items-center justify-center xs:justify-end",children:(0,r.jsx)("button",{type:"button",className:"bg-transparent text-body-dark",onClick:function(){return t("forgot-password")},children:"Forgot password"})})]}),l&&(0,r.jsxs)("span",{className:"text-[#FF749E] font-medium flex gap-2 items-center text-sm",children:[(0,r.jsx)(h.G,{icon:p.xHz,className:"w-3.5 flex-shrink-0"}),l]})]})]})]})},j=n(3582);function _(e){return N.apply(this,arguments)}function N(){return(N=(0,i.Z)((function(e){var t;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return"https://create.backtrace.io/api/discover-reset",(t={}).method="POST",t.body=JSON.stringify((0,l.O)({email:e})),t.headers={"Content-Type":"application/json"},[4,fetch("https://create.backtrace.io/api/discover-reset",t).then((function(e){return e.json()})).catch((function(e){return console.log("error:",e)}))];case 1:return[2,n.sent()]}}))}))).apply(this,arguments)}var S=function(e){var t,n,a=e.formState,l=e.setFormState,d=(0,s.useState)(!1),f=d[0],m=d[1],x=(0,s.useState)(""),w=x[0],y=x[1],N=(0,u.cI)(),S=N.register,k=N.setError,Z=N.getValues,C=N.formState.errors,E=(0,v.Z)(),F=E.recaptchaRef,A=E.checkCaptcha,R=E.verifyCaptcha,G=function(){var e=(0,i.Z)((function(e){var t,n,r,s,a,i;return(0,o.__generator)(this,(function(c){switch(c.label){case 0:return m(!0),[4,R(e)];
1case 1:return c.sent().captchaSuccess?(n={},t=(Z()||n).email,y(t),[4,_(t)]):[3,3];case 2:r=c.sent(),s=r.status,a=r.message,i={},"ok"===s?l("forgot-password-confirm"):k("email",(i.message=a||"Something went wrong, please try again.",i)),c.label=3;case 3:return m(!1),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=(0,i.Z)((function(){return(0,o.__generator)(this,(function(e){switch(e.label){case 0:return m(!0),w?[4,_(w.trim())]:[3,2];case 1:"ok"===e.sent().status&&alert("Email resend succesful."),e.label=2;case 2:return m(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Z,{onSubmit:G,ref:F}),"forgot-password"===a?(0,r.jsxs)("div",{className:"".concat(g().card," xs:!py-9"),children:[(0,r.jsx)("h2",{className:"text-[21px] font-semibold text-white leading-[25px]",children:"Forgot your password?"}),(0,r.jsx)("p",{className:"mt-3 text-sm text-body-dark",children:"Enter your email address and we'll send you instructions to reset your password."}),(0,r.jsxs)("form",{onSubmit:A,children:[(0,r.jsx)("input",(0,c.Z)({type:"email",placeholder:"Email Address"},S("email",{required:!0,onBlur:function(e){return e.target.reportValidity()}}))),(null===C||void 0===C||null===(t=C.email)||void 0===t?void 0:t.message)&&(0,r.jsx)("span",{className:"text-[#FF749E] font-medium flex gap-2 justify-center items-center text-sm",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.G,{icon:p.xHz,className:"w-3.5"}),null===C||void 0===C||null===(n=C.email)||void 0===n?void 0:n.message]})}),(0,r.jsx)("button",{type:"submit",className:"font-semibold bg-[#EC8273] text-white py-3 w-full justify-center rounded-md flex items-center gap-2.5",disabled:f,children:f?"Sending request...":(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.G,{icon:j.XCy,className:"w-[13px] text-white"}),"Send request"]})})]}),(0,r.jsxs)("button",{className:"flex items-center text-body-dark mt-[1.875rem] mx-auto text-sm",onClick:function(){return l("sign-in")},children:[(0,r.jsx)(h.G,{icon:p.acZ,className:"w-3.5 "}),"\xa0Return to sign in"]})]}):"forgot-password-confirm"===a?(0,r.jsxs)("div",{className:"".concat(g().card," !pt-10"),children:[(0,r.jsx)(h.G,{icon:j.XCy,className:"w-8 text-white"}),(0,r.jsx)("h2",{className:"text-[21px] font-semibold text-white leading-[25px] mt-6",children:"Password reset sent!"}),(0,r.jsxs)("p",{className:"mt-3 text-sm text-body-dark",children:["Please check your email for instructions to reset your password. If you haven't received an email in 5 minutes, check your spam or\xa0",(0,r.jsx)("button",{className:"font-medium transition-opacity duration-200 ease-in-out text-cg-red hover:opacity-80",onClick:P,disabled:f,children:"resend email"}),"."]}),(0,r.jsxs)("button",{className:"flex items-center text-body-dark mt-[1.875rem] mx-auto text-sm",onClick:function(){return l("sign-in")},children:[(0,r.jsx)(h.G,{icon:p.acZ,className:"w-3.5 "}),"\xa0Return to sign in"]})]}):null]})},k=function(){var e=(0,u.cI)(),t=e.register,n=e.watch,a=e.trigger,c=e.getValues,l=e.formState.errors,d=(0,s.useState)(!1),f=d[0],p=d[1],x=(0,v.Z)(),w=x.recaptchaRef,y=x.checkCaptcha,_=x.verifyCaptcha,N=function(){var e=(0,i.Z)((function(e){var t;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return p(!0),[4,_(e)];
1case 1:return n.sent().captchaSuccess&&(t=c(),console.log(t)),p(!1),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),S=n("new-password");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Z,{onSubmit:N,ref:w}),(0,r.jsxs)("div",{className:"".concat(g().card," xs:!pt-9"),children:[(0,r.jsx)("h2",{className:"text-[21px] font-semibold text-white leading-[25px]",children:"Reset your password"}),(0,r.jsxs)("form",{onSubmit:y,className:"flex flex-col gap-5 mt-7 xs:mt-[1.875rem]",children:[(0,r.jsx)(m.Z,{placeholder:"New password",id:"new-password",register:t,errors:l,trigger:a}),(0,r.jsx)(m.Z,{placeholder:"Confirm your new password",id:"confirm-new-password",register:t,errors:l,validate:S,trigger:a,minLength:!1}),(0,r.jsxs)("button",{type:"submit",className:"font-semibold bg-[#EC8273] text-white py-3 w-full justify-center rounded-md flex items-center gap-2.5",disabled:f,children:[(0,r.jsx)(h.G,{icon:j.XCy,className:"w-[13px] text-[#fff]"}),"Send Request"]})]})]})]})},Z=function(e){var t=e.submittedEmail,n=e.setFormState,a=(0,s.useState)(!1),c=a[0],u=a[1],l=function(){var e=(0,i.Z)((function(){return(0,o.__generator)(this,(function(e){switch(e.label){case 0:return u(!0),t?[4,_(t)]:[3,2];case 1:"ok"===e.sent().status&&alert("Email resend succesful."),e.label=2;case 2:return u(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,r.jsxs)("div",{className:"".concat(g().card," xs:!pt-10"),children:[(0,r.jsx)(h.G,{icon:j.XCy,className:"w-7 xs:w-8 text-white"}),(0,r.jsx)("h2",{className:"text-[21px] font-semibold text-white leading-[25px] mt-4 xs:mt-6",children:"Sign in instructions sent"}),(0,r.jsxs)("p",{className:"mt-3 text-sm text-body-dark",children:["We detected you have accounts in multiple instances, and have sent login instructions. If you haven't received an email in 5 minutes, check your spam or\xa0",(0,r.jsx)("button",{className:"font-medium transition-opacity duration-200 ease-in-out text-cg-red hover:opacity-80",onClick:(0,i.Z)((function(){return(0,o.__generator)(this,(function(e){switch(e.label){case 0:return[4,l()];case 1:return[2,e.sent()]}}))})),disabled:c,children:"resend email"}),"."]}),(0,r.jsxs)("button",{className:"flex items-center text-body-dark mt-[1.875rem] mx-auto text-sm",onClick:function(){return n("sign-in")},children:[(0,r.jsx)(h.G,{icon:p.acZ,className:"w-3.5 "}),"\xa0Return to sign in"]})]})},C=!0,E=function(){var e=(0,s.useState)("sign-in"),t=e[0],n=e[1],i=(0,s.useState)(""),c=i[0],o=i[1];return(0,r.jsx)(a.Z,{background:"login-bg",children:(0,r.jsxs)("div",{className:"relative flex flex-grow w-full",children:[(0,r.jsx)("div",{className:"-mt-20 -skew-y-6 ".concat(g()["bg-decoration-line"]),"aria-hidden":"true"}),(0,r.jsx)("div",{className:"mt-20 -skew-y-6 ".concat(g()["bg-decoration-line"]),"aria-hidden":"true"}),(0,r.jsx)("div",{className:"container relative z-10 mt-20 xs:my-auto",children:"sign-in"===t?(0,r.jsx)(y,{setFormState:n,setSubmittedEmail:o}):"forgot-password"===t||"forgot-password-confirm"===t?(0,r.jsx)(S,{formState:t,setFormState:n}):"reset-password"===t?(0,r.jsx)(k,{}):"multiple-instances"===t?(0,r.jsx)(Z,{submittedEmail:c,setFormState:n}):null})]})})}},1329:function(e,t,n){"use strict";var r=n(5893),s=n(4853),a=(0,n(7294).forwardRef)((function(e,t){var n=e.onSubmit;return(0,r.jsx)(s.Z,{ref:t,size:"invisible",sitekey:"6LeAYREhAAAAABrHbxjzYaSPpPqBVpkFTXp0FX1q",onChange:n})}));a.displayName="RecaptchaBadge",t.Z=a},7620:function(e,t,n){"use strict";var r=n(7568),s=n(6042),a=n(655),i=n(5893),c=n(7294),o=n(9603),u=n(8779),l=n(5106),d=n.n(l),f=n(4697);t.Z=function(e){var t,n,l=e.placeholder,m=void 0===l?"Password":l,h=e.id,p=e.register,x=e.errors,g=e.trigger,w=e.validate,v=e.minLength,b=void 0===v||v,y=(0,c.useState)(!1),j=y[0],_=y[1],N=/[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/,S=/\d/,k=(0,f.y1)((function(){g(h)}),500);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("input",(0,s.Z)({type:j?"text":"password",placeholder:m,className:d().password,id:h,required:!0},p(h,(0,s.Z)({minLength:b?{value:8,message:"min length is 8"}:null,validate:(0,s.Z)({},w?{passwordMatch:function(e){return w?e===w||"The passwords do not match":null}}
1:g?{hasSpecialChar:function(e){return N.test(e)||"must contain at least one special character."},hasNumber:function(e){return S.test(e)||"must contain at least one number."}}:{})},g?{onChange:(0,r.Z)((function(){return(0,a.__generator)(this,(function(e){switch(e.label){case 0:return[4,k()];case 1:return[2,e.sent()]}}))}))}:{})))),(0,i.jsx)("button",{className:"absolute p-2 transform -translate-y-1/2 bg-transparent cursor-pointer right-4 top-1/2",onClick:function(){return _((function(e){return!e}))},onPointerDown:function(e){return e.preventDefault()},type:"button","aria-label":j?"hide password":"show password",children:j?(0,i.jsx)(o.G,{icon:u.Aq,className:"w-4 text-white"}):(0,i.jsx)(o.G,{icon:u.Mdf,className:"w-4 text-white"})})]}),(null===x||void 0===x||null===(t=x[h])||void 0===t?void 0:t.message)&&(0,i.jsxs)("span",{className:"text-[#FF749E] font-medium flex gap-2 justify-center items-center text-sm",children:[(0,i.jsx)(o.G,{icon:u.xHz,className:"w-3.5 flex-shrink-0"}),"Password: ",null===x||void 0===x||null===(n=x[h])||void 0===n?void 0:n.message]})]})}},6263:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5893),s=n(1664),a=n.n(s),i=n(1163);function c(e){var t=e.authOptions,n=(0,i.useRouter)().pathname;return(0,r.jsx)("div",{className:"flex w-full",children:t.map((function(e,t){return(0,r.jsx)(a(),{href:null===e||void 0===e?void 0:e.link,children:(0,r.jsx)("a",{className:"text-xl font-semibold text-white flex justify-center text-center flex-grow border-b-2 border-cg-red pb-3 transition-all ".concat(n===(null===e||void 0===e?void 0:e.link)?"opacity-100 border-opacity-100":"opacity-50 hover:opacity-100 border-opacity-20 hover:border-opacity-30"),children:null===e||void 0===e?void 0:e.label})},"".concat(null===e||void 0===e?void 0:e.label,"-").concat(t))}))})}},8358:function(e,t,n){"use strict";var r=n(5893),s=n(1664),a=n.n(s),i=n(4608),c=n(5106),o=n.n(c);t.Z=function(e){var t=e.background,n=e.children;return(0,r.jsxs)("div",{className:"w-screen flex flex-col min-h-screen gap-y-2 place-content-center overflow-hidden pb-8 ".concat(o()[t]),children:[(0,r.jsx)("header",{children:(0,r.jsx)("nav",{className:"container flex justify-start pt-8 md:pt-14 lg:pt-20",children:(0,r.jsx)(a(),{prefetch:!1,href:"/",children:(0,r.jsx)("a",{className:"w-min",title:"Backtrace home",children:(0,r.jsx)(i.Z,{variety:"full-white"})})})})}),n]})}},9594:function(e,t,n){"use strict";var r=n(7568),s=n(655),a=n(7294),i=function(){var e=(0,r.Z)((function(e){var t,n,r,a;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return t={},[4,fetch("/api/form",(t.method="POST",t.body=JSON.stringify({captcha:e}),t))];case 1:return[4,s.sent().json()];case 2:return n=s.sent(),r=null===n||void 0===n?void 0:n.success,[2,((a={}).captchaSuccess=r,a)]}}))}));return function(t){return e.apply(this,arguments)}}();t.Z=function(){var e=(0,a.useRef)(null);return{recaptchaRef:e,checkCaptcha:function(t){t.preventDefault(),(null===e||void 0===e?void 0:e.current)&&e.current.execute()},verifyCaptcha:i}}},5106:function(e){e.exports={"login-bg":"Auth_login-bg__tKV4_","sign-up-bg":"Auth_sign-up-bg__YqzKT","bg-decoration-line":"Auth_bg-decoration-line__NstNd","text-card-grid":"Auth_text-card-grid__4ZBtD",card:"Auth_card__Gl_ZR","with-text":"Auth_with-text__3L_iA",password:"Auth_password__ffTSU",error:"Auth_error__Q8fGG","info-button":"Auth_info-button___lQQJ","tool-tip":"Auth_tool-tip__8e5Da","tool-tip-polygon":"Auth_tool-tip-polygon__VtLuQ"}},4697:function(e,t,n){"use strict";n.d(t,{y1:function(){return s}});var r=n(7294);function s(e,t,n){var s=this,a=(0,r.useRef)(null),i=(0,r.useRef)(0),c=(0,r.useRef)(null),o=(0,r.useRef)([]),u=(0,r.useRef)(),l=(0,r.useRef)(),d=(0,r.useRef)(e),f=(0,r.useRef)(!0);(0,r.useEffect)((function(){d.current=e}),[e]);var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,x="maxWait"in n,g=x?Math.max(+n.maxWait||0,t):null;(0,r.useEffect)((function(){return f.current=!0,function(){f.current=!1}}),[]);var w=(0,r.useMemo)((function(){var e=function(e){var t=o.current,n=u.current;return o.current=u.current=null,i.current=e,l.current=d.current.apply(n,t)},n=function(e,t){m&&cancelAnimationFrame(c.current),c.current=m?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!f.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||x&&e-i.current>=g},w=function(t){return c.current=null,p&&o.current?e(t):(o.current=u.current=null,l.current)},v=function e(){var s=Date.now();if(r(s))return w(s);if(f.current){var c=t-(s-a.current),o=x?Math.min(c,g-(s-i.current)):c;n(e,o)}},b=function(){var d=Date.now(),m=r(d);if(o.current=[].slice.call(arguments),u.current=s,a.current=d,m){if(!c.current&&f.current)return i.current=a.current,n(v,t),h?e(a.current):l.current;if(x)return n(v,t),e(a.current)}return c.current||n(v,t),l.current};return b.cancel=function(){c.current&&(m?cancelAnimationFrame(c.current):clearTimeout(c.current)),i.current=0,o.current=a.current=u.current=c.current=null},b.isPending=function(){return!!c.current},b.flush=function(){return c.current?w(Date.now()):l.current},b}),[h,x,t,g,p,m]);return w}}},function(e){e.O(0,[51,726,853,774,888,179],(function(){return t=3236,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.