PageSourceSearch

https://www.karnataka-recruitment.com/_next/static/chunks/pages/signup-3144a37e05eef94b.js

js karnataka-recruitment.com collected 2026-10-02 01:34:27 UTC 10,834 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7616],{28575:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/signup",function(){return r(88018)}])},50721:function(e,t,r){"use strict";var s=r(85893),a=r(67294),n=r(91444),l=r(51471),i=r(59363),o=r(67095),c=r(89593),u=r(11163),d=r(33299),m=r(96352),f=r(80667);t.Z=e=>{let{setLogin:t,setUnlock:p}=e,x=(0,i.TL)(),h=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,{data:g}=(0,d.useSession)(),v=(0,u.useRouter)(),[y,b]=(0,a.useState)({firstName:{value:"",message:""},email:{value:"",message:""},password:{value:"",message:""},phoneNumber:{value:"",message:""},code:{value:"",message:""}}),[N,w]=(0,a.useState)((0,f.rM)("false")),j=e=>{let{value:t,name:r}=e.target;switch(b(e=>({...e,[r]:{value:t,message:""}})),r){case"firstName":b(e=>({...e,firstName:{...e.firstName,message:t?"":"Enter firstname"}}));break;case"email":{let e=h.test(t);b(t=>({...t,email:{...t.email,message:e?"":"Invalid email format"}}));break}case"password":{let e=t.length>=6;b(t=>({...t,password:{...t.password,message:e?"":"Password must be at least 6 characters"}}))}}},O=async e=>{try{e.preventDefault(),x(l.rY.setLoader(!0));let r={firstName:y.firstName.value,username:y.email.value.substring(0,y.email.value.lastIndexOf("@")),email:y.email.value,password:y.password.value};if(r.firstName&&r.password&&h.test(r.email)){let e=await x((0,o.F)({...c.signUpApi,body:r}));if(x(l.rY.setLoader(!1)),e.payload&&e.payload){(await (0,d.signIn)("credentials",{redirect:!1,email:y.email.value,password:y.password.value})).ok&&(n.Am.success("Successufull Register",{position:n.Am.POSITION.TOP_CENTER,autoClose:1e4,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"}),"/signup"!==v.asPath?v.push(v.asPath):v.push(sessionStorage.getItem("callback")?(0,f.rM)(sessionStorage.getItem("callback")):"/"),p(!1),t(!1));return}n.Am.error("Email or Username are already taken",{position:"top-center",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"})}else n.Am.error("Invalid firstName or password or Email",{position:n.Am.POSITION.TOP_CENTER,autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"});x(l.rY.setLoader(!1))}catch(e){}};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"".concat("/signup"===v.asPath?" min-h-screen":""," bg-gray-100 pt-5"),children:(0,s.jsx)("div",{className:"flex pt-3 max-md:items-center max-md:justify-center max-md:px-4 max-md:py-3 lg:justify-center",children:(0,s.jsxs)("div",{className:"max ".concat("/signup"!==v.asPath?"w-[480px]":""," flex w-full flex-col overflow-hidden rounded-[20px] bg-white shadow-lg max-md:w-[480px] max-md:py-5 lg:max-w-screen-sm lg:flex-1 lg:flex-row"),children:["/signup"===v.asPath&&(0,s.jsx)(n.Ix,{}),(0,s.jsxs)("div",{className:"bg-white max-md:px-5 md:px-[40px] md:py-5 lg:flex-1",children:[!(null==g?void 0:g.jwt)&&(0,s.jsxs)("div",{className:" mb-5 flex justify-between overflow-hidden rounded-lg border border-black",children:[(0,s.jsx)("div",{className:" w-1/2 py-3 max-sm:px-2 text-center".concat(N?" text-black":" bg-blue-700 text-white"),onClick:()=>{w(!1)},children:"Login With OTP"}),(0,s.jsx)("div",{className:" w-1/2 px-20 py-3 text-center max-sm:px-7 ".concat(N?"bg-blue-700 text-white":" text-black"),onClick:()=>w(!0),children:"Sign Up"})]}),(0,s.jsx)("h3",{className:"my-4 text-center text-3xl font-bold leading-[34px] tracking-[-2px] text-gray-700"}),N?(0,s.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,s.jsx)("div",{className:"flex max-md:flex-col md:gap-[20px]",children:(0,s.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,s.jsx)("label",{htmlFor:"email",className:"my-[10px] text-sm font-bold text-gray-500",children:"Full Name"}),(0,s.jsx)("input",{type:"firstName",id:"email",name:"firstName",placeholder:"First Name",autoFocus:!0,value:y.firstName.value,onChange:j,className:"rounded border border-gray-300 px-4 py-2 transition duration-300 focus:border-transparent focus:outline-none focus:ring-4 focus:ring-blue-200"}),(0,s.jsx)("span",{className:"text-red-700",children:y.firstName.message})]})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("label",{htmlFor:"email",className:"my-[10px] text-sm font-bold text-gray-500",children:"Email"}),(0,s.jsx)("input",{type:"email",id:"email",placeholder:"Enter Email",autoFocus:!0,name:"email",value:y.email.value,onChange:j,className:"rounded border border-gray-300 px-4 py-2 transition duration-300 focus:border-transparent focus:outline-none focus:ring-4 focus:ring-blue-200"}),(0,s.jsx)("span",{className:"text-red-700",children:y.email.message})]}),(0,s.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,s.jsx)("div",{className:"flex items-center justify-between",children:(0,s.jsx)("label",{htmlFor:"password",className:"my-[10px] text-sm font-bold text-gray-500",children:"Password"})}),(0,s.jsx)("input",{placeholder:"Enter password",type:"password",id:"password",name:"password",value:y.password.value,onChange:j,className:"rounded border border-gray-300 px-4 py-2 transition duration-300 focus:border-transparent focus:outline-none focus:ring-4 focus:ring-blue-200"}),(0,s.jsx)("span",{className:"text-red-700",children:y.password.message})]}),(0,s.jsx)("div",{className:" py-3",children:(0,s.jsx)("button",{onClick:e=>{var t,s;O(e),r.e(1767).then(r.t.bind(r,51767,23)).then(e=>e.default).then(e=>{e.init("1136468974119600"),e.track("CompleteRegistration")}),null===(s=window)||void 0===s||null===(t=s.location)||void 0===t||t.href},className:"w-full rounded-lg bg-[#7F56D9] px-4 py-2 text-lg font-semibold text-white shadow transition-colors duration-300 hover:bg-[#4847A4] focus:outline-none focus:ring-4 focus:ring-blue-200",children:"Create Account"})}),(0,s.jsxs)("div",{className:"flex  items-center justify-center gap-[10px] text-center",children:[(0,s.jsx)("p",{className:"text-[20px] text-[#001D6C]",children:"Already have an account?"}),(0,s.jsx)("div",{onClick:()=>{"/signup"===v.asPath?v.push("/login"):(t(!0),p(!1))},className:"text-sm text-[#000000] underline hover:cursor-pointer focus:text-blue-800",children:"Login Here"})]})]}
1):(0,s.jsx)(m.J,{setLogin:t,setUnlock:p})]})]})})})})}},88018:function(e,t,r){"use strict";r.r(t);var s=r(85893);r(67294);var a=r(50721),n=r(48398);t.default=(0,n.cU)(()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(a.Z,{setLogin:!1,setUnlock:!1})}))},88357:function(e,t,r){"use strict";r.d(t,{w_:function(){return o}});var s=r(67294),a={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n=s.createContext&&s.createContext(a),l=function(){return(l=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},i=function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)0>t.indexOf(s[a])&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r};function o(e){return function(t){return s.createElement(c,l({attr:l({},e.attr)},t),function e(t){return t&&t.map(function(t,r){return s.createElement(t.tag,l({key:r},t.attr),e(t.child))})}(e.child))}}function c(e){var t=function(t){var r,a=e.attr,n=e.size,o=e.title,c=i(e,["attr","size","title"]),u=n||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),s.createElement("svg",l({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,c,{className:r,style:l(l({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),o&&s.createElement("title",null,o),e.children)};return void 0!==n?s.createElement(n.Consumer,null,function(e){return t(e)}):t(a)}},87462:function(e,t,r){"use strict";function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e}).apply(this,arguments)}r.d(t,{Z:function(){return s}})},28771:function(e,t,r){"use strict";r.d(t,{F:function(){return a},e:function(){return n}});var s=r(67294);function a(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function n(...e){return(0,s.useCallback)(a(...e),e)}},88426:function(e,t,r){"use strict";r.d(t,{g7:function(){return l}});var s=r(87462),a=r(67294),n=r(28771);let l=(0,a.forwardRef)((e,t)=>{let{children:r,...n}=e,l=a.Children.toArray(r),o=l.find(c);if(o){let e=o.props.children,r=l.map(t=>t!==o?t:a.Children.count(e)>1?a.Children.only(null):(0,a.isValidElement)(e)?e.props.children:null);return(0,a.createElement)(i,(0,s.Z)({},n,{ref:t}),(0,a.isValidElement)(e)?(0,a.cloneElement)(e,void 0,r):null)}return(0,a.createElement)(i,(0,s.Z)({},n,{ref:t}),r)});l.displayName="Slot";let i=(0,a.forwardRef)((e,t)=>{let{children:r,...s}=e;return(0,a.isValidElement)(r)?(0,a.cloneElement)(r,{...function(e,t){let r={...t};for(let s in t){let a=e[s],n=t[s];/^on[A-Z]/.test(s)?a&&n?r[s]=(...e)=>{n(...e),a(...e)}:a&&(r[s]=a):"style"===s?r[s]={...a,...n}:"className"===s&&(r[s]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}(s,r.props),ref:t?(0,n.F)(t,r.ref):r.ref}):a.Children.count(r)>1?a.Children.only(null):null});i.displayName="SlotClone";let o=({children:e})=>(0,a.createElement)(a.Fragment,null,e);function c(e){return(0,a.isValidElement)(e)&&e.type===o}},45139:function(e,t,r){"use strict";r.d(t,{j:function(){return n}});let s=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,a=function(){for(var e,t,r=0,s="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,s,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t){if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(s=e(t[r]))&&(a&&(a+=" "),a+=s);else for(r in t)t[r]&&(a&&(a+=" "),a+=r)}return a}(e))&&(s&&(s+=" "),s+=t);return s},n=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:i}=t,o=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],a=null==i?void 0:i[e];if(null===t)return null;let n=s(t)||s(a);return l[e][n]}),c=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return a(e,o,null==t?void 0:null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...c}[t]):({...i,...c})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},function(e){e.O(0,[1057,8159,6352,2888,9774,179],function(){return e(e.s=28575)}),_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.