PageSourceSearch

https://theleaply.com/_next/static/chunks/app/(main)/%5Blocale%5D/login/page-6b90dac58e0a162a.js

js theleaply.com collected 2026-10-01 23:48:56 UTC 14,486 bytes, 7 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8372],{2709:(e,t,r)=>{"use strict";r.d(t,{o:()=>s});var i=r(68192);let n=["deviceID","userId","modal"];async function s(e=null,t){let{identify:r,Identify:a,setDeviceId:l}=await (0,i.g)(),o=new a,c={...(e=>{if(!e)return{};let t=e.startsWith("?")?e.slice(1):e;return t?t.split("&").reduce((e,t)=>{let[r,i]=t.split("=");return r&&(e[decodeURIComponent(r)]=void 0===i||decodeURIComponent(i)),e},{}):{}})(new URLSearchParams(window.location.search).toString())};e&&(c={...c,...e}),t&&(c={...c,...t}),e?.deviceId&&l(e.deviceId),Object.keys(c).forEach(e=>{let t=c[e];n.includes(e)||void 0===t||o.set(e,t)});let d=e?.userId;return await r(o,d?{user_id:d}:void 0).promise}},11750:(e,t,r)=>{"use strict";r.d(t,{Q:()=>d,cO:()=>c,iD:()=>l,sX:()=>o});let i="https://api.theleaply.com",n="664f8a14068d753e3b0536c2";function s(){let e={"Content-Type":"application/json"};return n&&(e["Lw-Client"]=n),e}let a=`
2  mutation webAutoLogin($input: WebAutoLoginInput!) {
3    webAutoLogin(input: $input) {
4      redirectURL
5    }
6  }
7`;async function l(e,t){let r=await fetch(`${i}/v1/auth/login`,{method:"POST",headers:s(),body:JSON.stringify({email:e,password:t})});if(!r.ok)throw Error(await r.text()||`Login failed: ${r.status}`);return r.json()}async function o(e){let t=await fetch(`${i}/v1/auth/password-reset/request`,{method:"POST",headers:s(),body:JSON.stringify({email:e})}),r=await t.text(),n=null;try{n=JSON.parse(r)}catch{n=null}if(!t.ok)throw Error(r||`Request failed: ${t.status}`);if(!n)throw Error(r||"Invalid JSON");return n}async function c(e,t){let r=new URLSearchParams({uid:e}),n=await fetch(`${i}/v1/auth/password-reset/web/change-password?${r.toString()}`,{method:"POST",headers:s(),body:JSON.stringify({newPassword:t})});if(!n.ok)throw Error(await n.text()||`Password change failed: ${n.status}`);return n.json()}async function d(e,t){let r=s(),n=await fetch(`${i}/graphql`,{method:"POST",headers:r,body:JSON.stringify({query:a,variables:{input:{userIdOrLegacyId:e,locale:t}}})});if(!n.ok)throw Error(await n.text()||`Web auto-login failed: ${n.status}`);let l=await n.json();if(l.errors?.length)throw Error(l.errors[0]?.message??"GraphQL error");let o=l.data?.webAutoLogin?.redirectURL;if(!o)throw Error("No redirect URL in response");return o}},38761:(e,t,r)=>{Promise.resolve().then(r.bind(r,95208)),Promise.resolve().then(r.bind(r,53124)),Promise.resolve().then(r.bind(r,29151))},82849:(e,t,r)=>{"use strict";function i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)e[i]=r[i]}return e}r.d(t,{A:()=>n});var n=function e(t,r){function n(e,n,s){if("u">typeof document){"number"==typeof(s=i({},r,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,!0!==s[l]&&(a+="="+s[l].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+a}}return Object.create({set:n,get:function(e){if("u">typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],i={},n=0;n<r.length;n++){var s=r[n].split("="),a=s.slice(1).join("=");try{var l=decodeURIComponent(s[0]);if(i[l]=t.read(a,l),e===l)break}catch(e){}}return e?i[e]:i}},remove:function(e,t){n(e,"",i({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,i({},this.attributes,t))},withConverter:function(t){return e(i({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},94908:(e,t,r)=>{"use strict";r.d(t,{U:()=>n});var i=r(12115);function n(e){let[t,r]=(0,i.useState)(void 0);return(0,i.useEffect)(()=>{let t=window.matchMedia(e),i=()=>r(t.matches);return i(),t.addEventListener("change",i),()=>
7t.removeEventListener("change",i)},[e]),t}},95208:(e,t,r)=>{"use strict";r.d(t,{default:()=>y});var i=r(95155),n=r(12115),s=r(11697),a=r(50910),l=r(78065),o=r(62680),c=r(11750),d=r(29417),u=r(75991),p=r(2709),m=r(94277),h=r(95431),f=r(43577);function x(){let e=(0,n.useRef)(null),t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let r=e.current;if(!r)return;let i=0,n=!0,s=!1,a=0,l=null,o=null,c="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,d=()=>{n="visible"===document.visibilityState},u=e=>{e.preventDefault(),s=!0,cancelAnimationFrame(i)},p=(window.requestIdleCallback??(e=>window.setTimeout(e,200)))(()=>{if(s)return;let e=Math.min(window.devicePixelRatio||1,2),p="function"==typeof window.matchMedia&&window.matchMedia("(max-width: 639px)").matches,m=(0,f.tr)(r,{...f.C1,layer:1,ambientBg:!0,useTrail:!1,pointerAmp:0,blobOpacity:0,scale:p?.8:f.C1.scale,contourOpacity:p?.2:.14,contourColor:[.25,.51,.44],glowA:[1,1,1],glowB:[1,1,1]});if(!m)return;if(t.current=m,m.resize(r.clientWidth,r.clientHeight,e),c)return void m.render(.016);let h=e=>{if(s)return;let t=Math.min((e-a)/1e3||.016,.033);a=e,n&&m.render(t),i=requestAnimationFrame(h)};i=requestAnimationFrame(h),document.addEventListener("visibilitychange",d),r.addEventListener("webglcontextlost",u),"u">typeof IntersectionObserver&&(l=new IntersectionObserver(e=>{n="visible"===document.visibilityState&&e[0].isIntersecting},{threshold:0})).observe(r),"u">typeof ResizeObserver&&(o=new ResizeObserver(()=>{let e=Math.min(window.devicePixelRatio||1,2);m.resize(r.clientWidth,r.clientHeight,e)})).observe(r)});return()=>{s=!0,cancelAnimationFrame(i),"number"==typeof p&&window.cancelIdleCallback&&window.cancelIdleCallback(p),document.removeEventListener("visibilitychange",d),r.removeEventListener("webglcontextlost",u),l?.disconnect(),o?.disconnect(),t.current?.dispose(),t.current=null}},[]),(0,i.jsx)("canvas",{ref:e,"aria-hidden":!0,className:"pointer-events-none absolute inset-0 z-0 h-full w-full"})}var g=r(94908);let w="https://app.theleaply.com/login".replace(/\/login$/,""),b="placeholder:body-s w-full rounded-[12px] border border-[#E6E9E8] bg-transparent px-4 py-3.5 text-[#10231F] placeholder:text-[#616764] transition-colors focus:border-[#1B3B32] focus:outline-none focus:ring-1 focus:ring-[#1B3B32]",v="flex h-14 w-full cursor-pointer items-center justify-center rounded-[40px] bg-[#1B3B32] px-6 text-lg font-medium text-white transition-colors hover:bg-[#152e27] disabled:cursor-not-allowed disabled:opacity-50 sm:px-8 sm:text-xl";function y(){let e=(0,a.c)("LoginPage"),t=(0,s.Ym)(),r=(0,g.U)("(min-width: 1024px)"),[f,y]=(0,n.useState)(""),[_,j]=(0,n.useState)(""),[N,S]=(0,n.useState)("idle"),[E,A]=(0,n.use
7State)(null),[I,O]=(0,n.useState)(!1),[L,C]=(0,n.useState)(""),[R,k]=(0,n.useState)("idle"),[P,T]=(0,n.useState)(null),B=(0,h.T)();async function D(r){r.preventDefault(),(0,d.s)(o.A.LOGIN_FORM_SUBMIT,{locale:t}),S("loading"),A(null);try{let{user:r}=await (0,c.iD)(f,_);if(await (0,p.o)({userId:r.id}),m.$.SIGN_IN_WITH_WEB_APP_REDIRECT&&1){let e=(0,u.q)(),r=new URLSearchParams({...e?{deviceId:e}:{},locale:t});(0,d.s)(o.A.LOGIN_SSO_REDIRECT,{locale:t,flow:"login"}),window.location.href=`https://app.theleaply.com/login?${r.toString()}`;return}if(!r.id){(0,d.s)(o.A.LOGIN_AUTH_FAILED,{locale:t,reason:"missing_user_id"}),A(e("errorSso")),S("error");return}let i=await (0,c.Q)(r.id,t);(0,d.s)(o.A.LOGIN_SSO_REDIRECT,{locale:t,flow:"login"}),window.location.href=i}catch(i){S("error");let r=i instanceof Error?i.message:"";r.includes("401")||r.toLowerCase().includes("invalid")||r.toLowerCase().includes("unauthorized")?((0,d.s)(o.A.LOGIN_AUTH_FAILED,{locale:t,reason:"invalid_credentials"}),A(e("errorLogin"))):((0,d.s)(o.A.LOGIN_AUTH_FAILED,{locale:t,reason:"other"}),A(e("errorSso")))}}async function U(r){r.preventDefault(),(0,d.s)(o.A.PASSWORD_RESET_EMAIL_SUBMIT,{locale:t}),k("loading"),T(null);try{await (0,c.sX)(L.trim()),(0,d.s)(o.A.PASSWORD_RESET_EMAIL_SUCCESS,{locale:t}),k("success")}catch{(0,d.s)(o.A.PASSWORD_RESET_EMAIL_ERROR,{locale:t}),k("error"),T(e("errorForgotPassword"))}}function F(){(0,d.s)(o.A.LOGIN_FORGOT_PASSWORD_CLICK,{locale:t}),O(!0),C(f),k("idle"),T(null)}function M(){O(!1),k("idle"),T(null)}return(0,n.useEffect)(()=>{B&&(window.location.href=w)},[B]),(0,n.useEffect)(()=>{(0,d.s)(o.A.LOGIN_PAGE_VIEW,{locale:t})},[t]),(0,n.useEffect)(()=>{I&&(0,d.s)(o.A.LOGIN_FORGOT_PASSWORD_VIEW,{locale:t})},[I,t]),(0,i.jsxs)("section",{className:"grid min-h-[100dvh] grid-cols-1 grid-rows-[auto_1fr] lg:grid-cols-2 lg:grid-rows-none",children:[(0,i.jsxs)("aside",{className:"relative flex h-[220px] flex-col justify-center overflow-hidden px-6 pb-6 pt-20 sm:h-auto sm:min-h-[300px] sm:px-10 sm:pb-14 sm:pt-24 lg:min-h-0 lg:justify-between lg:px-14 lg:py-16 xl:px-20 xl:py-20",style:{background:"radial-gradient(120% 120% at 16% 94%, rgba(84,158,133,0.16) 0%, rgba(84,158,133,0) 66%), #ffffff"},children:[r&&(0,i.jsx)(x,{}),(0,i.jsx)("h1",{className:"relative z-10 max-w-[8em] self-center text-center text-[34px] font-semibold leading-[1.05] tracking-[-0.03em] text-[#3A7968] sm:text-5xl lg:mt-[7vh] lg:text-6xl xl:text-[76px]",children:e("headlineSplit")}),(0,i.jsxs)("div",{className:"relative z-10 hidden items-end justify-center pt-10 lg:mb-[6vh] lg:flex","aria-hidden":"true",children:[(0,i.jsx)("div",{className:"login-card-rise relative shrink-0 transition-transform duration-300 hover:-translate-y-3 hover:scale-[1.04]",children:(0,i.jsx)("div",{className:"relative aspect-[208/277] w-[150px] rotate-[-4.26deg] overflow-hidden rounded-[18px] border-[7px] border-white shadow-[0_9px_9px_-4px_rgba(12,12,13,0.06),0_2px_2px_-2px_rgba(12,12,13,0.06)] xl:w-[184px]",children:(0,i.jsx)("img",{src:"/images/login-card-1.webp",alt:"",className:"absolute inset-0 h-full w-full object-cover object-center"})})}),(0,i.jsx)("div",{className:"login-card-rise relative z-10 -mx-8 shrink-0 transition-transform duration-300 hover:-translate-y-3 hover:scale-[1.04]",style:{animationDelay:"110ms"},children:(0,i.jsx)("div",{className:"relative aspect-[208/277] w-[150px] -translate-y-5 overflow-hidden rounded-[18px] border-[7px] border-white shadow-[0_9px_9px_-4px_rgba(12,12,13,0.06),0_2px_2px_-2px_rgba(12,12,13,0.06)] xl:w-[184px]",children:(0,i.jsx)("img",{src:"/images/login-card-2.webp",alt:"",className:"absolute inset-0 h-full w-full object-cover object-center"})})}),(0,i.jsx)("div",{className:"login-card-rise relative z-20 shrink-0 transition-transform duration-300 hover:-translate-y-3 hover:scale-[1.04]",style:{animationDelay:"220ms"},children:(0,i.jsx)("div",{className:"relative aspect-[208/277] w-[150px] rotate-[3.4deg] overflow-hidden rounded-[18px] border-[7px] border-white shadow-[0_9px_9px_-4px_rgba(12,12,13,0.06),0_2px_2px_-2px_rgba(12,12,13,0.06)] xl:w-[184px]",children:(0,i.jsx)("img",{src:"/images/login-card-3.webp",alt:"",className:"absolute inset-0 h-full w-full object-cover object-top"})})})]})]}),(0,i.jsx)("div",{className:"flex items-start justify-center border-t-[3px] border-t-[#3A7968] bg-white px-6 pb-12 pt-10 sm:items-center sm:px-10 sm:py-12 lg:border-t-0 lg:border-l lg:border-l-[#3A7968] lg:py-0 lg:pl-10 lg:pr-24 xl:pl-16 xl:pr-40",children:(0,i.jsxs)("div",{className:"flex w-full max-w-[440px] flex-col gap-8",children:[(0,i.jsxs)("header",{className:"flex flex-col gap-2",children:[!I&&(0,i.jsx)(l.A,{as:"h2",weight:"semibold",className:"title-xxs sm:title-xs text-[#10231F]",children:e("heading")}),(0,i.jsx)(l.A,{as:"p",className:"body-xs sm:body-s text-[#616764]",children:I?e("forgotPasswordTitle"):e("subtitle")})]}),I?(0,i.jsx)(i.Fragment,{children:"success"===R?(0,i.jsxs)("div",{className:"flex w-full flex-col items-center gap-6",children:[(0,i.jsx)("div",{className:"rounded-2xl bg-[#E8F5F0] px-5 py-4 text-center",children:(0,i.jsx)(l.A,{as:"p",weight:"medium",className:"body-s text-[#1B3B32]",children:e("resetLinkSent")})}),(0,i.jsx)("button",{type:"button",onClick:M,className:"cursor-pointer text-sm font-medium text-[#1B3B32] underline hover:no-underline",children:e("backToLogin")})]}):(0,i.jsxs)("form",{className:"flex w-full flex-col gap-5",onSubmit:U,children:[(0,i.jsx)("input",{name:"email",type:"email",placeholder:e("fields.email"),"aria-label":e("fields.email"),className:b,value:L,onChange:e=>C(e.target.value),required:!0,autoComplete:"email"}),(0,i.jsx)("button",{type:"submit",disabled:"loading"===R,className:v,children:"loading"===R?e("sending"):e("sendResetLink")}),(0,i.jsx)("button",{type:"button",onClick:M,className:"cursor-pointer text-center text-sm font-medium text-[#616764] underline hover:no-underline",children:e("backToLogin")}),"error"===R&&P&&(0,i.jsx)("p",{className:"body-s text-center font-medium text-red-500",children:P})]})}):(0,i.jsxs)("form",{className:"flex w-full flex-col gap-5",onSubmit:D,children:[(0,i.jsx)("input",{name:"email",type:"email",placeholder:e("fields.email"),"aria-label":e("fields.email"),className:b,value:f,onChange:e=>y(e.target.value),required:!0,autoComplete:"email"}),(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)("input",{name:"password",type:"password",placeholder:e("fields.password"),"aria-label":e("fields.password"),className:b,value:_,onCh
7ange:e=>j(e.target.value),required:!0,autoComplete:"current-password"}),(0,i.jsx)("button",{type:"button",onClick:F,className:"self-end shrink-0 cursor-pointer text-sm font-medium text-[#1B3B32] underline hover:no-underline",children:e("forgotPassword")})]}),(0,i.jsx)("button",{type:"submit",className:v,disabled:"loading"===N,children:"loading"===N?e("loading"):e("submit")}),"error"===N&&E&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"body-s hidden text-center font-medium text-red-500 sm:block",children:E}),(0,i.jsxs)("div",{className:"flex flex-col gap-3 rounded-2xl bg-[#E8F5F0] px-5 py-4",children:[(0,i.jsx)(l.A,{as:"p",weight:"medium",align:"center",className:"body-s text-[#1B3B32]",children:e("forgotPasswordHint")}),(0,i.jsx)("button",{type:"button",onClick:F,className:v,children:e("resetMyPassword")})]})]})]})]})})]})}},95431:(e,t,r)=>{"use strict";r.d(t,{T:()=>s});var i=r(12115),n=r(82849);function s(){let[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{t("true"===n.A.get("leaply_is_logged_in"))},[]),e}}},e=>{e.O(0,[4583,19,8437,7622,7276,3577,8441,3794,7358],()=>e(e.s=38761)),_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.