PageSourceSearch

https://lms.k12onlineschools.com/_next/static/chunks/pages/login-519b035ceec00b2d.js

js k12onlineschools.com collected 2026-10-05 23:06:13 UTC 15,992 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[83459],{36429:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return t(92571)}])},39240:function(e,n,t){"use strict";t.d(n,{w2:function(){return i},cC:function(){return a},bS:function(){return l},as:function(){return r}});let o=new(t(26285)).ZP("storage");o.version(1).stores({pairs:"++id,key,value"});let i=async(e,n)=>{try{if(void 0!==e&&void 0!==n){let t=await o.pairs.where("key").equals(e).first();void 0!==t?await o.pairs.update(t.id,{value:n}):await o.pairs.add({key:e,value:n})}else console.error("Invalid key or value provided to storage")}catch(e){console.error("Error: ".concat(e))}},r=async(e,n)=>{try{if(e&&n){let t=await o.pairs.where("key").equals(e).first();void 0!==t?await o.pairs.update(t.id,{value:n}):console.error("No item found with key: ".concat(e))}else console.error("Invalid key or updated value provided to storage")}catch(e){console.error("Error: ".concat(e))}},a=async e=>{try{let n=await o.pairs.where("key").equals(e).first();void 0!==n?await o.pairs.where("id").equals(n.id).delete():console.error("No item found with key: ".concat(e))}catch(e){console.error("Error: ".concat(e))}},l=async e=>{try{let n=await o.pairs.where("key").equals(e).first();return n?n.value:null}catch(e){console.error("Error: ".concat(e))}}},92571:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return S}});var o=t(85893),i=t(25675),r=t.n(i),a=t(39332),l=t(67294),s=t(91898),u=t(34853),d=t(91036),c=t.n(d),p=t(78536),v=t(67839),m=t(62286),h=t(41664),w=t.n(h),f=t(88738),y=t(5152),g=t.n(y),b=t(26880),A=t(39240);t(58386);let k=g()(()=>t.e(48656).then(t.bind(t,48656)),{loadableGenerated:{webpack:()=>[48656]}}),x=g()(()=>t.e(37917).then(t.bind(t,37917)),{loadableGenerated:{webpack:()=>[37917]}});function S(){let[e,n]=(0,l.useState)(""),[t,i]=(0,l.useState)(""),d=(0,a.useRouter)(),[h,y]=(0,l.useState)(""),[g,S]=(0,l.useState)(""),[N,C]=(0,l.useState)(!1),[P,E]=(0,l.useState)(null),T=async e=>{try{var n,t;let o=await fetch("".concat("/api","/parent/crm/admission/get-student-list"),{headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}}),i=await o.json();return(null==i?void 0:null===(t=i.data)||void 0===t?void 0:null===(n=t.students)||void 0===n?void 0:n.map(e=>{var n;return{...e,_id:(null==e?void 0:null===(n=e.studentId)||void 0===n?void 0:n._id)||(null==e?void 0:e._id),userId:{name:{...null==e?void 0:e.studentName}}}}))||[]}catch(e){(0,b.Mc)("error",null==e?void 0:e.message)}},B=e=>{let n=e.trim();return c()(n)},R=async n=>{n.preventDefault(),n.stopPropagation();let o=!1;if(o=(0,s.XZ)(t,S),!P){(0,b.Mc)("error","Please complete the reCAPTCHA");return}if(o){C(!0);try{let n=B(e),o=B(t),s=await fetch("".concat("/api","/account/authentication/login"),{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain"},body:await (0,p.mp)({email:n,password:o,captchaToken:P})}),c=await s.json();if(c.success){var i,r,a,l,u;let e=JSON.parse(await (0,p.vv)(c.data));if(await (0,v.X)(e),(null==e?void 0:null===(i=e.userTypeDetails)||void 0===i?void 0:i.userRoleName)==="Student"){let n=(null==e?void 0:e.pendingAssignments)||[];n.length>0&&await (0,A.w2)("pendingAssignments",(0,p.ZR)(n)),await (0,A.w2)("hasGivenFeedback",null!==(a=null==e?void 0:e.hasGivenFeedback)&&void 0!==a&&a),sessionStorage.removeItem("feedbackModalShown"),(0,b.Mc)("success","Login successful, Redirecting..."),d.push("/lms")}else if((null==e?void 0:null===(r=e.userTypeDetails)||void 0===r?void 0:r.userRoleName)==="Teacher")await (0,v.X)(e),await (0,A.w2)("hasGivenFeedback",null!==(l=null==e?void 0:e.hasGivenFeedback)&&void 0!==l&&l),sessionStorage.removeItem("pdSurveyShown"),(0,b.Mc)("success","Login successful, Redirecting..."),d.push("/lms");else if("parent"===e.userType){await (0,A.w2)("hasGivenFeedback",null!==(u=null==e?void 0:e.hasGivenFeedback)&&void 0!==u&&u),sessionStorage.removeItem("feedbackModalShown");let n=(null==e?void 0:e.students)||[],t=await T(null==e?void 0:e.token);n=[...n,...t];let o=new Set,i=[];for(let e of n){let n=null==e?void 0:e._id;o.has(n)||(o.add(n),i.push(e))}if(0==(n=[...i]).length){(0,b.Mc)("error","This Account doesn't have any active students."),C(!1);return}await (0,A.w2)("studentObj",(0,p.ZR)(n));let r=null==n?void 0:n.find(e=>!(null==e?void 0:e.studentId));
1r?((0,m.setCookie)(null,"studentProfilePhotoParent",JSON.stringify(null==r?void 0:r.studentProfilePhotoParent),{path:"/"}),await (0,A.w2)("studentFirstObj",(0,p.ZR)(r)),(0,b.Mc)("success","Login successful, Redirecting..."),d.push("/parents/admission")):((0,m.setCookie)(null,"studentProfilePhotoParent",JSON.stringify(null==r?void 0:r.studentProfilePhotoParent),{path:"/"}),await (0,A.w2)("studentFirstObj",(0,p.ZR)(n[0])),(0,b.Mc)("success","Login successful, Redirecting..."),d.push("/parents"))}else(0,b.Mc)("success","Login successful, Redirecting..."),d.push("/erp")}else c.error.map(e=>{(null==e?void 0:e.field)=="email"&&y(null==e?void 0:e.message),(null==e?void 0:e.field)=="password"&&S(null==e?void 0:e.message),(null==e?void 0:e.field)=="popup"&&alert(null==e?void 0:e.message)})}catch(e){console.error(e)}C(!1)}};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:"container",children:(0,o.jsxs)("div",{className:"row gx-5",children:[(0,o.jsx)("div",{className:"col d-none d-lg-flex align-items-center justify-content-center min-vh-100",children:(0,o.jsx)(r(),{src:"https://k12-production-s3.k12onlineschools.com/k12-advantages.webp",alt:"k12 advantages",width:450,height:450,priority:!0,className:"img-fluid"})}),(0,o.jsx)("div",{className:"col",children:(0,o.jsx)("form",{method:"post",onSubmit:R,className:"d-flex align-items-center justify-content-center min-vh-100 px-lg-5 ms-lg-5 me-lg-4",children:(0,o.jsxs)("div",{className:"row row-cols-1 gy-3",children:[(0,o.jsx)("div",{className:"col text-center",children:(0,o.jsx)(r(),{src:"https://k12-production-s3.k12onlineschools.com/K12-DashboardLogo.png",alt:"k12schools-logo",width:325,height:90,quality:1,priority:!0})}),(0,o.jsx)("div",{className:"col",children:(0,o.jsx)("div",{className:"form-group",children:(0,o.jsx)(x,{labelText:"Email",error:h,inputType:"text",inputValue:e,placeholder:"[email protected]",setInputValue:n,disabled:N})})}),(0,o.jsxs)("div",{className:"col",children:[(0,o.jsx)("div",{className:"form-group",children:(0,o.jsx)(k,{labelText:"Password",error:g,value:t,placeholder:"########",setValue:i,disabled:N})}),(0,o.jsx)("p",{className:"text-end",children:(0,o.jsx)(w(),{href:"/forgot-password",style:{fontSize:"13px"},className:"text-decoration-none",children:"Forgot Password?"})})]}),(0,o.jsx)("div",{className:"col ",children:(0,o.jsx)(u.Z,{sitekey:"6LdCtiwqAAAAAHGDYqiuqG04OApASMhJa9heDflK",onChange:e=>{E(e)}})}),(0,o.jsx)("div",{className:"col",children:(0,o.jsx)("div",{className:"d-grid",children:(0,o.jsx)("button",{type:"submit",className:"btn-bargundi",style:{borderRadius:"0.375rem",position:"relative",zIndex:1},disabled:N,children:(0,o.jsxs)(f.g,{children:[(0,o.jsxs)(f.g.When,{isTrue:N,children:[(0,o.jsx)("span",{className:"spinner-border spinner-border-sm me-2",role:"status","aria-hidden":"true"}),(0,o.jsx)("span",{children:"Login..."})]}),(0,o.jsx)(f.g.Else,{children:(0,o.jsx)("span",{children:"Login"})})]})})})})]})})})]})})})}},78536:function(e,n,t){"use strict";t.d(n,{YV:function(){return a},hM:function(){return s},ZR:function(){return l},PH:function(){return d},WX:function(){return u},vv:function(){return p},mp:function(){return c},kD:function(){return v}});var o=t(81354),i=t.n(o);let r="\n  -----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIFLTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQI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GTObqpMEZOFrB27ALuMKTvsHwWoEHX07qrIZPGNmWgFA1BuYstMwFW4c\n9DXlzBYABszraNrty+i+M6dEGCO/WIK3akmImkN6pOY0BcvNjUDOGtk3cKiomCaJ\nrXTpBZvUTo6R3mUfl5WHzDmZHGPqTF6uzT5WaqPln7lv8ELrfpXs045TMoe5Zi7y\nWltyRrNEESFfMiP1wD7qpx/kpdwITb3SQwM9Y68k9ySQSka2QoijEuNfdw94ZBCs\npbPbpzl6w0KL4gqEGDw/sH4T9oBOP0OLaX74YLJBbToX8zszeVhcSwGadIuumFfN\n6Hu7JJgqef1KR1wq3xf6GSPyAOUbT4S4bBlEdK4U/YDiTnOkbcwzOGhXorA7bOlJ\nfh/GDc3e7wVrRUUZK9WImpfZssBRzvunt4JFPWnzO3+tSN2FcAmcHqYqQuk+KWfS\nhQ8pCo4aMJzt1L5oJHA7sBNHJ1aRYXXDH8AR8or1txNnDDG4DQOgZn8naHka1gKl\nx4LdZ5x7bkxD521NaysriixLKLAG/bSbubGPkNhROY/GUbXW7kkWcSkkeQzLb85T\nlzrja72j1AOXIUcBmu2bSApgOshAGBTBTwsVmPYtDRyoPq+03IMBqRkcvIHBoEK3\nxelWnnYFqmvimAgTz1acvswrydnWMyem+XC0nQk1idHa\n-----END ENCRYPTED PRIVATE KEY-----\n  ";function a(e){if(e)try{return JSON.stringify(e)}catch(e){console.error("Error during encryption: ",e)}}
1function l(e){if(e)try{return i().AES.encrypt(JSON.stringify(e),r).toString()}catch(e){return console.error("Error during array encryption: ",e),null}}function s(e){if(e)try{let n=i().AES.decrypt(e,r);return JSON.parse(n.toString(i().enc.Utf8))}catch(e){return console.error("Error during array decryption: ",e),null}}function u(e){if(e)try{return i().AES.encrypt(e,r).toString()}catch(e){return console.error("Error during text encryption: ",e),null}}function d(e){if(e)try{return i().AES.decrypt(e,r).toString(i().enc.Utf8)}catch(e){return console.error("Error during text decryption: ",e),null}}async function c(e){let n=JSON.stringify(e);if(!window.crypto||!window.crypto.subtle)throw Error("Web Crypto API not available.Use HTTPS or localhost.");let t=new TextEncoder,o=window.crypto.getRandomValues(new Uint8Array(16)),i=await window.crypto.subtle.importKey("raw",t.encode("JKBFjnersifbakjnWRKjIWKEbfiWRIBU"),"PBKDF2",!1,["deriveKey"]),r=await window.crypto.subtle.deriveKey({name:"PBKDF2",salt:t.encode("salt"),iterations:1e5,hash:"SHA-256"},i,{name:"AES-CBC",length:256},!1,["encrypt"]),a=await window.crypto.subtle.encrypt({name:"AES-CBC",iv:o},r,t.encode(n)),l=btoa(String.fromCharCode(...o)),s=btoa(String.fromCharCode(...new Uint8Array(a)));return"".concat(l,":").concat(s)}async function p(e){if(!window.crypto||!window.crypto.subtle)throw Error("Web Crypto API not available.Use HTTPS or localhost.");let n=e.split(":"),t=Uint8Array.from(atob(n[0]),e=>e.charCodeAt(0)),o=Uint8Array.from(atob(n[1]),e=>e.charCodeAt(0)),i=new TextEncoder,r=await window.crypto.subtle.importKey("raw",i.encode("JKBFjnersifbakjnWRKjIWKEbfiWRIBU"),"PBKDF2",!1,["deriveBits","deriveKey"]),a=await window.crypto.subtle.deriveKey({name:"PBKDF2",salt:i.encode("salt"),iterations:1e5,hash:"SHA-256"},r,{name:"AES-CBC",length:256},!1,["decrypt"]),l=await window.crypto.subtle.decrypt({name:"AES-CBC",iv:t},a,o);return new TextDecoder().decode(l)}async function v(e){if(!window.crypto||!window.crypto.subtle)throw Error("Web Crypto API not available.Use HTTPS or localhost.");let n=e.split(":"),t=Uint8Array.from(atob(n[0]),e=>e.charCodeAt(0)),o=Uint8Array.from(atob(n[1]),e=>e.charCodeAt(0)),i=new TextEncoder,r=await window.crypto.subtle.importKey("raw",i.encode("JKBFjneruidnWRKjIWKEbfbcuiqcsifbakjniWRIBU"),"PBKDF2",!1,["deriveBits","deriveKey"]),a=await window.crypto.subtle.deriveKey({name:"PBKDF2",salt:i.encode("salt"),iterations:1e5,hash:"SHA-256"},r,{name:"AES-CBC",length:256},!1,["decrypt"]),l=await window.crypto.subtle.decrypt({name:"AES-CBC",iv:t},a,o);return new TextDecoder().decode(l)}},67839:function(e,n,t){"use strict";t.d(n,{X:function(){return a}});var o=t(62286),i=t(78536),r=t(39240);async function a(e){try{var n,t,a,l,s,u,d,c,p,v,m,h,w,f;(0,o.setCookie)(null,"token",(0,i.WX)(null==e?void 0:e.token),{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"userId",(0,i.WX)(null==e?void 0:e.userId),{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"userType",(0,i.WX)(null==e?void 0:e.userType),{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"termName",null==e?void 0:e.termName,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"termNumber",null==e?void 0:e.termNumber,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"permissions",(0,i.ZR)(null==e?void 0:e.permissions),{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"userRole",(0,i.WX)(null==e?void 0:null===(n=e.userTypeDetails)||void 0===n?void 0:n.userRoleName),{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"firstName",null==e?void 0:null===(t=e.name)||void 0===t?void 0:t.firstName,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"lastName",null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.lastName,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"middleName",null==e?void 0:null===(l=e.name)||void 0===l?void 0:l.middleName,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"mobileNumber",null==e?void 0:null===(u=e.userTypeDetails)||void 0===u?void 0:null===(s=u.mobileNumber)||void 0===s?void 0:s.number,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"countryCode",null==e?void 0:null===(c=e.userTypeDetails)||void 0===c?void 0:null===(d=c.mobileNumber)||void 0===d?void 0:d.countryCode,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"employeeCode",null==e?void 0:null===(p=e.userTypeDetails)||void 0===p?void 0:p.employeeCode,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"organization",null==e?void 0:null===(v=e.userTypeDetails)||void 0===v?void 0:v.organization,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"userRoleName",null==e?void 0:null===(m=e.userTypeDetails)||void 0===m?void 0:m.userRoleName,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"email",null==e?void 0:e.email,{maxAge:2592e3,path:"/"}),(0,o.setCookie)(null,"emailIsValid",(0,i.WX)(null==e?void 0:e.email),{maxAge:2592e3,path:"/"}
1),(0,o.setCookie)(null,"studentProfilePhoto",JSON.stringify(e.studentProfilePhoto),{path:"/"}),await (0,r.w2)("actionMenu",(0,i.ZR)(null==e?void 0:e.actionMenu)),await (0,r.w2)("currentSubSystem",(0,i.WX)(null==e?void 0:null===(h=e.actionMenu[0])||void 0===h?void 0:h.subSystemKey)),await (0,r.w2)("currentActionMenu",(0,i.ZR)(null==e?void 0:e.actionMenu[0]));let y=null==e?void 0:null===(w=e.actionMenu)||void 0===w?void 0:w.map(e=>null==e?void 0:e.subSystemName);(0,o.setCookie)(null,"subsystems",y,{maxAge:2592e3,path:"/"}),(null==e?void 0:null===(f=e.pendingPDTrackers)||void 0===f?void 0:f.length)>0&&(0,o.setCookie)(null,"pdTrackingData",(0,i.ZR)(e.pendingPDTrackers),{maxAge:86400,path:"/"})}catch(e){console.error("Error: ",e)}}},91898:function(e,n,t){"use strict";t.d(n,{Je:function(){return r},XZ:function(){return a},ok:function(){return s},vm:function(){return l},yy:function(){return u}});var o=t(91036),i=t.n(o);function r(e,n){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e)?(n(""),!0):(n("Please provide a valid email."),!1)}function a(e,n){return""!=e?(n(""),!0):(n("Please provide a password."),!1)}function l(e,n,t){return""!=s(n)?(t(""),!0):(t("Please provide a ".concat(e)),!1)}function s(e){let n=null==e?void 0:e.trim();return i()(n)}function u(e,n){return e.match(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/)?(n(""),!0):(n("Invalid password!"),!1)}},42480:function(){},22868:function(){},14777:function(){},99830:function(){},70209:function(){}},function(e){e.O(0,[81354,25675,41664,48764,26285,91036,12645,62169,92888,49774,40179],function(){return e(e.s=36429)}),_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.