PageSourceSearch

https://samugiken.com/_next/static/chunks/pages/login-9c9d3f0f6ee06a50.js

js samugiken.com collected 2026-10-07 01:51:17 UTC 6,961 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{69941:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return r(62495)}])},62495:function(e,s,r){"use strict";r.r(s),r.d(s,{__N_SSP:function(){return v},default:function(){return S}});var a=r(52676),n=r(76517),t=r(71030),l=r(18060),i=r(21844),o=r(78051),c=r(83214),u=r(69504),m=e=>{let{onBackToLogin:s}=e,[r]=l.Z.useForm(),m=(0,t.D)({mutationFn:u.o9,onError:e=>n.Am.error((0,c._g)(e)),onSuccess:s});return(0,a.jsx)("div",{className:"card w-[95%] max-w-[450px] bg-transparent",children:(0,a.jsx)("div",{children:(0,a.jsxs)(l.Z,{form:r,layout:"vertical",onFinish:e=>{n.Am.promise(m.mutateAsync(e),{pending:"Sending email...",success:"Email sent successfully",error:{render(e){let{data:s}=e;return(0,c._g)(s)}}})},children:[(0,a.jsx)(l.Z.Item,{name:"email",label:"Email",rules:[{required:!0},{type:"email"}],children:(0,a.jsx)(i.default,{size:"large"})}),(0,a.jsx)(o.ZP,{type:"primary",htmlType:"submit",block:!0,size:"large",className:"mt-3 !bg-[#FB233B]",children:"Reset Password"}),(0,a.jsx)("div",{className:"mt-5 text-center",children:(0,a.jsx)("p",{className:"text-sm font-semibold underline cursor-pointer hover:text-primary/50",onClick:s,children:"Back to Login"})})]})})})},d=r(91709),x=r(73414),h=r(75271),p=r(62581),g=e=>{let{onForgetPassword:s}=e,[r]=l.Z.useForm(),n=(0,x.useRouter)(),[m,g]=(0,h.useState)(null),{mutate:b}=(0,t.D)({mutationFn:u.x4,onError:e=>g((0,c._g)(e)),onSuccess:()=>{n.push(p.Z.HOME)}});return(0,a.jsxs)("div",{className:"w-[95%] max-w-[450px] bg-transparent",children:[(0,a.jsx)("div",{className:"w-full max-w-[450px]",children:m&&(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsx)(d.Z,{message:m,type:"error",showIcon:!0})})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(l.Z,{form:r,layout:"vertical",onFinish:e=>{b(e)},children:[(0,a.jsx)(l.Z.Item,{name:"identifier",label:"Email or Username",rules:[{required:!0,message:"Please input your email or username"}],children:(0,a.jsx)(i.default,{size:"large"})}),(0,a.jsx)(l.Z.Item,{name:"password",className:"label-full-width",label:"Password",rules:[{required:!0,message:"Please input your password"}],children:(0,a.jsx)(i.default.Password,{size:"large"})}),(0,a.jsx)(o.ZP,{type:"primary",htmlType:"submit",block:!0,size:"large",className:"mt-3 !bg-[#FB233B]",children:(0,a.jsx)("span",{className:"font-semibold",children:"SIGN IN"})})]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("p",{className:"mt-2 text-xs underline cursor-pointer hover:text-primary/50",onClick:s,children:"Forgot your password?"})})]})]})},b=r(94170),j=r(74563),N=r.n(j);r(41877);var f=()=>{let[e]=l.Z.useForm(),[s,r]=(0,h.useState)(null),[n,m]=(0,h.useState)(null),x=(0,t.D)({mutationFn:u.IU,onError:e=>{m(null),r((0,c._g)(e))},onSuccess:()=>{r(null),m("Signup successful. Please check your email to verify your account."),e.resetFields()}});return(0,a.jsxs)("div",{className:"card w-[95%] max-w-[450px] bg-transparent",children:[(0,a.jsxs)("div",{className:"w-full max-w-[450px]",children:[n&&(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsx)(d.Z,{message:n,type:"info",showIcon:!0,closable:!0})}),s&&(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsx)(d.Z,{message:s,type:"error",showIcon:!0,closable:!0})})]}),(0,a.jsxs)(l.Z,{form:e,layout:"vertical",onFinish:e=>{r(null),m(null),x.mutateAsync(e)},children:[(0,a.jsx)(l.Z.Item,{name:"firstName",label:"First Name",rules:[{required:!0}],children:(0,a.jsx)(i.default,{size:"large"})}),(0,a.jsx)(l.Z.Item,{name:"lastName",label:"Last Name",rules:[{required:!0}],children:(0,a.jsx)(i.default,{size:"large"})}),(0,a.jsx)(l.Z.Item,{name:"username",label:"Username",rules:[{required:!0,message:"Please enter your username"},{min:3,max:30,message:"Username must be between 3 and 30 characters"},{pattern:/^[a-zA-Z0-9._-]+$/,message:"Username can only contain letters, numbers, dots, underscores and hyphens"}],children:(0,a.jsx)(i.default,{size:"large"})}),(0,a.jsx)(l.Z.Item,{name:"phone",label:"Phone Number",rules:[{required:!0}],children:(0,a.jsx)(N(),{inputProps:{required:!0},country:"my",inputClass:"form-control",inputStyle:{width:"100%",borderRadius:"6px"},buttonStyle:{borderRadius:"6px 0px 0px 6px",backgroundColor:"#FFFFFF"}})}),(0,a.jsx)(l.Z.Item,{name:"email",label:"Email",rules:[{required:!0},{type:"email"}],children:(0,a.jsx)(i.default,{size:"large"})}),(0,a.jsx)(o.ZP,{type:"primary",htmlType:"submit",block:!0,size:"large",className:"mt-3 !bg-[#FB233B]",loading:x.isPending,disabled:x.isPending,children:x.isPending?"Signing up...":"Signup"})]})]})},y=r(46980),w=r(33561),v=!0,S=e=>{let{user:s}=e,r=(0,w.useRouter)(),[n,t]=(0,h.useState)(b.hY.LOGIN),[l,i]=(0,h.useState)(null),{redirect:o}=r.query;return(0,h.useEffect)(()=>{"warranty"===o&&i("Please login to submit warranty, it will be available at profile > warranties")},[o]),(0,h.useEffect)(()=>{r.isReady&&"signup"===r.query.mode&&t(b.hY.SIGNUP)},[r.isReady,r.query.mode]),(0,a.jsx)(y.Z,{user:s,children:(0,a.jsx)("div",{className:"flex items-center justify-center px-4 mt-15 md:px-0",children:(0,a.jsxs)("div",{className:"w-full max-w-[450px] p-5 md:p-10 rounded-lg bg-white shadow-[0_0_24px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"relative w-full mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("button",{type:"button",onClick:()=>t(b.hY.LOGIN),className:"w-1/2 bg-transparent border-0 appearance-none focus:outline-none focus:ring-0 shadow-none cursor-pointer select-none pb-3 text-center font-semibold tracking-wider ".concat(n!==b.hY.SIGNUP?"text-gray-800":"text-gray-500 hover:text-gray-800"),"aria-current":n===b.hY.LOGIN?"page":void 0,children:(0,a.jsx)("span",{className:"text-lg font-bold",children:"SIGN IN"})}),(0,a.jsx)("button",{type:"button",onClick:()=>t(b.hY.SIGNUP),className:"w-1/2 bg-transparent border-0 appearance-none focus:outline-none focus:ring-0 shadow-none cursor-pointer select-none pb-3 text-center font-semibold tracking-wider ".concat(n===b.hY.SIGNUP?"text-gray-800":"text-gray-500 hover:text-gray-800"),"aria-current":n===b.hY.SIGNUP?"page":void 0,children:(0,a.jsx)("span",{className:"text-lg font-bold",children:"SIGN UP"})})]}),(0,a.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-[3px] bg-gray-200"}),(0,a.jsx)("div",{className:"pointer-events-none absolute  h-[2px] w-1/2 bg-[#FB233B] transition-all duration-300 ".concat(n===b.hY.LOGIN||n===b.hY.FORGET_PASSWORD?"left-0 bottom-0":"left-1/2 bottom-[
11px]")})]}),l&&(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsx)(d.Z,{message:l,type:"warning",showIcon:!0})}),n===b.hY.LOGIN&&(0,a.jsx)(g,{onForgetPassword:()=>{t(b.hY.FORGET_PASSWORD)}}),n===b.hY.SIGNUP&&(0,a.jsx)(f,{}),n===b.hY.FORGET_PASSWORD&&(0,a.jsx)(m,{onBackToLogin:()=>{t(b.hY.LOGIN)}})]})})})}}},function(e){e.O(0,[5989,4237,7610,8174,9834,8051,4190,6631,6220,9575,1887,8060,9830,7005,3619,6980,2888,9774,179],function(){return e(e.s=69941)}),_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.