1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5698],{3074:(e,t,n)=>{Promise.resolve().then(n.bind(n,3717))},3717:(e,t,n)=>{"use strict";n.d(t,{SignInForm:()=>g});var s=n(5155),r=n(2115),l=n(8173),a=n.n(l),i=n(6046),o=n(4505),c=n(814),d=n(580),u=n(3209),m=n(590);let x="w-full rounded-lg border border-line bg-white px-3 py-2 text-sm text-ink outline-none placeholder:text-ink-50 focus:border-ink",h="mb-1.5 block text-xs font-medium text-ink-70",p="border-b-2 border-hi font-medium text-ink no-underline transition hover:text-ink-70";function g(){let e=(0,i.useRouter)(),t=(0,i.useSearchParams)(),n=(0,m._r)(t),[l,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(""),[k,v]=(0,r.useState)(null),[j,w]=(0,r.useState)(null);async function y(e){var t;e.preventDefault(),v(null),w("email");let{error:s}=await u.Jv.email({email:l,password:f,callbackURL:n},{onError:e=>{var t;return v(null!==(t=e.error.message)&&void 0!==t?t:"Could not sign in")}});s&&v(null!==(t=s.message)&&void 0!==t?t:"Could not sign in"),w(null)}async function N(){v(null),w("google"),await u.Jv.social({provider:"google",callbackURL:n,errorCallbackURL:"/sign-in"}),w(null)}return(0,r.useEffect)(()=>{if("success"!==t.get("reset"))return;c.o.success("Password updated. You can sign in with your new password.");let n=new URLSearchParams(t.toString());n.delete("reset");let s=n.toString();e.replace(s?"/sign-in?".concat(s):"/sign-in",{scroll:!1})},[t,e]),(0,s.jsxs)("div",{className:"mx-auto w-full max-w-[400px]",children:[(0,s.jsx)("div",{className:"mb-2 flex justify-center",children:(0,s.jsx)(a(),{href:"/",className:"rounded-lg","aria-label":"Bookmark.new home",children:(0,s.jsx)(d.Q,{size:40})})}),(0,s.jsxs)("div",{className:"mb-8 text-center",children:[(0,s.jsx)("h1",{className:"font-display text-2xl font-bold tracking-tight",children:"Sign in"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-ink-70",children:"Welcome back to Bookmark.new"})]}),(0,s.jsx)("div",{className:"flex flex-col gap-3",children:(0,s.jsxs)("button",{type:"button",onClick:N,disabled:null!==j,className:"flex w-full items-center justify-center gap-2 rounded-full border-[1.5px] border-ink bg-white py-2.5 text-sm font-semibold text-ink transition hover:bg-hi-soft disabled:opacity-50",children:["google"===j?(0,s.jsx)(o.A,{className:"h-4 w-4 animate-spin"}):null,"Continue with Google"]})}),(0,s.jsxs)("div",{className:"relative my-8",children:[(0,s.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":!0,children:(0,s.jsx)("div",{className:"w-full border-t border-line"})}),(0,s.jsx)("div",{className:"relative flex justify-center font-mono text-xs uppercase tracking-wide",children:(0,s.jsx)("span",{className:"bg-paper px-2 text-ink-50",children:"Or use email"})})]}),(0,s.jsxs)("form",{onSubmit:y,className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"email",className:h,children:"Email"}),(0,s.jsx)("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,value:l,onChange:e=>g(e.target.value),className:x,placeholder:"[email protected]"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"password",className:h,children:"Password"}),(0,s.jsx)("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,value:f,onChange:e=>b(e.target.value),className:x}),(0,s.jsx)("div",{className:"mt-1.5 flex justify-end",children:(0,s.jsx)(a(),{href:(0,m.XV)("/forgot-password",t),className:"text-xs ".concat(p),children:"Forgot password?"})})]}),k?(0,s.jsx)("p",{className:"rounded-md border border-red-300 bg-red-50 px-3 py-2 text-sm text-red-700",role:"alert",children:k}):null,(0,s.jsxs)("button",{type:"submit",disabled:null!==j,className:"flex w-full items-center justify-center gap-2 rounded-full border-[1.5px] border-ink bg-ink py-2.5 text-sm font-semibold text-paper transition hover:shadow-[0_6px_18px_rgba(22,24,29,0.18)] disabled:opacity-50",children:["email"===j?(0,s.jsx)(o.A,{className:"h-4 w-4 animate-spin"}):null,"Sign in"]})]}),(0,s.jsxs)("p",{className:"mt-8 text-center text-sm text-ink-50",children:["No account?"," ",(0,s.jsx)(a(),{href:(0,m.XV)("/sign-up",t),className:p,children:"Create one"})]}),(0,s.jsx)("p",{className:"mt-4 text-center text-sm text-ink-50",children:(0,s.jsx)(a(),{href:"/auth/continue?from=".concat(encodeURIComponent(n)),className:"text-ink-70 underline-offset-2 transition hover:text-ink hover:underline",children:"Try without an account (guest)"})})]})}},580:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i,l:()=>
1o});var s=n(5155),r=n(8173),l=n.n(r),a=n(9602);function i(e){let{size:t=26,className:n}=e;return(0,s.jsx)("span",{"aria-hidden":!0,className:(0,a.cn)("grid shrink-0 place-items-center rounded-[27%] bg-ink",n),style:{width:t,height:t},children:(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",style:{width:t/2,height:t/2},children:(0,s.jsx)("path",{d:"M6 3h12v18l-6-4.5L6 21V3z",fill:"#FFE04A",stroke:"#FFE04A",strokeWidth:"2",strokeLinejoin:"round"})})})}function o(e){let{inverted:t=!1,className:n}=e;return(0,s.jsxs)(l(),{href:"/",className:(0,a.cn)("flex items-center gap-2.5 font-display text-lg font-bold tracking-tight no-underline",t?"text-paper":"text-ink",n),children:[(0,s.jsx)("span",{"aria-hidden":!0,className:(0,a.cn)("grid h-[26px] w-[26px] shrink-0 place-items-center rounded-[7px]",t?"bg-hi":"bg-ink"),children:(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",className:"h-[13px] w-[13px]",children:(0,s.jsx)("path",{d:"M6 3h12v18l-6-4.5L6 21V3z",fill:t?"#16181D":"#FFE04A",stroke:t?"#16181D":"#FFE04A",strokeWidth:"2",strokeLinejoin:"round"})})}),"bookmark.new"]})}},608:(e,t,n)=>{"use strict";n(2818)},3209:(e,t,n)=>{"use strict";n.d(t,{CI:()=>i,Hh:()=>a,Ht:()=>c,Jv:()=>l,w2:()=>d,wV:()=>o,xw:()=>u});var s=n(2144),r=n(8705);let{signIn:l,signUp:a,signOut:i,useSession:o,getSession:c,requestPasswordReset:d,resetPassword:u}=(0,s.M)({plugins:[(0,r.v)()]})},590:(e,t,n)=>{"use strict";function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/dashboard";return!e||!e.startsWith("/")||e.startsWith("//")?t:e}function r(e,t){let n=new URLSearchParams,s=t.get("from"),r=t.get("plan"),l=t.get("import");s&&n.set("from",s),r&&n.set("plan",r),l&&n.set("import",l);let a=n.toString();return a?"".concat(e,"?").concat(a):e}function l(e){let t;let n=e.get("import");t=n?"/settings/import?open=1&import=".concat(encodeURIComponent(n)):s(e.get("from"));let r=e.get("plan");if("pro"===r||"pro_monthly"===r||"pro_yearly"===r||"yearly"===r){var l;let e=new URLSearchParams(t.includes("?")?t.split("?")[1]:""),n=null!==(l=t.split("?")[0])&&void 0!==l?l:t;e.set("plan","pro_yearly"===r||"yearly"===r?"pro_yearly":"pro");let s=e.toString();return s?"".concat(n,"?").concat(s):n}return t}function a(e){let t=e.get("from");return t?s(t):l(e)}n.d(t,{XV:()=>r,Y5:()=>l,_r:()=>a,kg:()=>s})},9602:(e,t,n)=>{"use strict";n.d(t,{cn:()=>l});var s=n(3463),r=n(9795);function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.QP)((0,s.$)(t))}n(608)},4505:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(7401).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])}},e=>{var t=t=>e(e.s=t);e.O(0,[8173,1181,1087,814,8441,5861,7358],()=>t(3074)),_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.