1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244],{13388:(e,n,t)=>{"use strict";t.d(n,{A:()=>d});var a=t(9329),s=t(37197),r=t(20148),l=t(81278),o=t(82959);function c(){let e=(0,a._)(["\n query RedirectStandardAlignmentQuery {\n currentTeacher {\n id\n needsStandardAlignment\n }\n }\n"]);return c=function(){return e},e}let i=(0,s.J1)(c()),d=()=>{var e;let n=(0,l.useRouter)(),{data:t}=(0,r.I)(i);n&&t&&(null==t||null==(e=t.currentTeacher)?void 0:e.needsStandardAlignment)&&n.push((0,o.MQ)(n.asPath))}},20273:(e,n,t)=>{"use strict";t.d(n,{A:()=>l});var a=t(6029),s=t(95669),r=t.n(s);let l=e=>{let{pageName:n="",appName:t="Teachers"}=e,s=[n,t,"Legends of Learning"].filter(e=>!!e).join(" - ");return(0,a.jsx)(r(),{children:(0,a.jsx)("title",{children:s})})}},28846:(e,n,t)=>{"use strict";t.d(n,{A:()=>r});var a=t(6029);let s=(0,t(55729).forwardRef)((e,n)=>{let{id:t,label:s,value:r,onChange:l,error:o,placeholder:c,autoFocus:i}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:t,className:"block mb-1 text-sm font-medium text-universal",children:s}),(0,a.jsx)("input",{ref:n,id:t,name:t,type:"text",inputMode:"text",autoComplete:"one-time-code",autoFocus:i,value:r,onChange:e=>l(e.target.value),placeholder:c,className:"w-full rounded-lg border border-light-grey-2 px-4 py-3 text-lg tracking-widest text-center font-mono focus:outline-none focus:ring-2 focus:ring-cta"}),o&&(0,a.jsx)("p",{className:"text-red-500 text-sm font-medium pl-1 mt-1",children:o})]})});s.displayName="TwoFactorCodeInput";let r=s},34810:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});var a=t(6029),s=t(62563),r=t(55729),l=t(76264);let o=function(e){let{text:n,icon:t,onContentCopied:o,className:c,label:i,tooltipText:d}=e,[u,m]=(0,r.useState)(!1),g=()=>{navigator.clipboard.writeText(n),m(!0),o&&o()};return(0,a.jsxs)(a.Fragment,{children:[i?(0,a.jsx)("span",{className:"text-dark-grey header-sm uppercase mb-2",children:i}):null,(0,a.jsxs)("div",{className:(0,l.QP)("rounded-lg p-2 inline-flex items-center border border-light-grey-2 bg-white",c),children:[t?(0,a.jsx)("i",{className:"fas fa-".concat(t," text-2xl text-cta px-2")}):null,(0,a.jsx)("input",{type:"text",className:"bg-transparent appearance-none focus:outline-none hover:underline font-medium text-gray-900 truncate flex-grow cursor-pointer",value:n,onClick:g,readOnly:!0}),(0,a.jsx)(s.Ay,{visible:u,placement:"right",onClickOutside:()=>m(!1),content:(0,a.jsx)("div",{className:"bg-white rounded-md p-2 shadow-md",children:d||"Copied!"}),children:(0,a.jsx)("i",{onClick:g,className:"p-2 fas fa-copy cursor-pointer text-cta text-base"})})]})]})}},35927:(e,n,t)=>{"use strict";t.d(n,{FL:()=>u,WK:()=>m,iv:()=>d,qM:()=>h,rv:()=>g});var a=t(9329),s=t(37197);function r(){let e=(0,a._)(["\n mutation TwoFactorPrecheckSignIn(\n $email: String!\n $password: String!\n $role: SignInRole\n ) {\n signIn(email: $email, password: $password, role: $role) {\n success\n requiresTwoFactor\n challengeToken\n errors {\n field\n message\n }\n }\n }\n"]);return r=function(){return e},e}function l(){let e=(0,a._)(["\n mutation VerifyTwoFactorSignIn($challengeToken: String!, $code: String!) {\n verifyTwoFactorSignIn(challengeToken: $challengeToken, code: $code) {\n success\n errors {\n field\n message\n }\n }\n }\n"]);return l=function(){return e},e}function o(){let e=(0,a._)(["\n mutation BeginTwoFactorEnrollment {\n beginTwoFactorEnrollment {\n success\n secret\n otpauthUri\n qrCodeSvg\n errors {\n field\n message\n }\n }\n }\n"]);return o=function(){return e},e}function c(){let e=(0,a._)(["\n mutation ConfirmTwoFactorEnrollment($code: String!) {\n confirmTwoFactorEnrollment(code: $code) {\n success\n recoveryCodes\n errors {\n field\n message\n }\n }\n }\n"]);return c=function(){return e},e}function i(){let e=(0,a._)(["\n mutation DisableTwoFactor($code: String!) {\n disableTwoFactor(code: $code) {\n success\n errors {\n field\n message\n }\n }\n }\n"]);return i=function(){return e},e}let d=(0,s.J1)(r()),u=(0,s.J1)(l()),m=(0,s.J1)(o()),g=(0,s.J1)(c()),h=(0,s.J1)(i())},42711:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>ek});var a=t(9329),s=t(6029),r=t(37197),l=t(20148),o=t(26751),c=t(31810),i=t(63777),d=t(23590),u=t(20273),m=t(7234),g=t(12364),h=t.n(g),x=t(55729),p=t(76264),f=t(64476),v=t(67567);function b(){let e=(0,a._)(["\n mutation UpdateAssignmentSettings(\n $gameAssessmentQuestionCount: Int\n $ttsPlaybackRate: Float\n ) {\n updateAssignmentSettings(\n gameAssessmentQuestionCount: $gameAssessmentQuestionCount\n ttsPlaybackRate: $ttsPlaybackRate\
1n ) {\n id\n gameAssessmentQuestionCount\n ttsPlaybackRate\n }\n }\n"]);return b=function(){return e},e}let y=(0,r.J1)(b()),j=e=>{let{children:n,className:t="",...a}=e;return(0,s.jsx)("button",{type:"button",className:(0,p.QP)("text-prussian-blue text-2xl w-16 p-2 appearance-none focus:outline-none hover:bg-slate-100 transition-colors duration-150",t),...a,children:n})},w=e=>{var n;let{className:t="",assignmentSettings:a,ttsPlaybackRate:r}=e,{t:l}=(0,o.Bd)("teachers"),c=(0,f.u)("tts_playback_speed_enabled"),i=function(){let{t:e,i18n:n}=(0,o.Bd)("teachers");return(0,x.useMemo)(()=>{var t,a;let s=new Intl.NumberFormat(null!=(a=null!=(t=n.resolvedLanguage)?t:n.language)?a:"en"),r=e=>({speed:s.format(e)});return[{value:"",label:e("account.assignments.tts.auto","Auto (based on grade)")},{value:"0.5",label:e("account.assignments.tts.slowest","{speed}x (Slowest)",r(.5))},{value:"0.75",label:e("account.assignments.tts.plain","{speed}x",r(.75))},{value:"0.85",label:e("account.assignments.tts.plain","{speed}x",r(.85))},{value:"1",label:e("account.assignments.tts.normal","{speed}x (Normal)",r(1))},{value:"1.25",label:e("account.assignments.tts.fastest","{speed}x (Fastest)",r(1.25))}]},[e,n.resolvedLanguage,n.language])}(),[d,u]=(0,x.useState)(null!=(n=a.gameAssessmentQuestionCount)?n:8),[g,b]=(0,x.useState)(null!=r?String(r):"");(0,x.useEffect)(()=>{b(null!=r?String(r):"")},[r]);let[w]=(0,m.n)(y),N=(0,x.useCallback)(h()(async e=>w({variables:{gameAssessmentQuestionCount:e}}),300),[]);return(0,s.jsx)(v.A,{header:l("account.assignments.title","Assignment Settings"),className:t,children:(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("p",{className:"text-lg text-center pb-4 leading-5",children:l("account.assignments.questionCountIntro","Set the number of questions to ask students before and after an instructional game or video")}),(0,s.jsxs)("div",{className:"flex max-w-[16rem] border rounded-lg items-center mx-auto overflow-hidden transition-all duration-150 focus-within:ring-2 focus-within:ring-summer-sky focus-within:ring-opacity-60",children:[(0,s.jsx)(j,{onClick:()=>{let e=d-1;e>=0&&(u(e),N(e))},className:"border-r",children:(0,s.jsx)("i",{className:"fas fa-minus"})}),(0,s.jsx)("span",{className:(0,p.QP)("px-2 flex-grow text-center transition-all duration-200 font-bold",d?"text-summer-sky":"text-gray-600"),children:d?l("account.assignments.questionCount","{questionCount, plural, one {# Question} other {# Questions}}",{questionCount:d}):l("account.assignments.questionsDisabled","Disabled")}),(0,s.jsx)(j,{onClick:()=>{let e=d+1;e<=8&&(u(e),N(e))},className:"border-l",children:(0,s.jsx)("i",{className:"fas fa-plus"})})]}),c&&(0,s.jsxs)("div",{className:"mt-6 border-t pt-4",children:[(0,s.jsx)("p",{className:"text-lg text-center pb-4 leading-5",children:l("account.assignments.tts.heading","Read Out Loud Speed")}),(0,s.jsx)("div",{className:"flex max-w-[16rem] mx-auto",children:(0,s.jsx)("select",{value:g,onChange:e=>{let n=e.target.value;b(n),w({variables:{ttsPlaybackRate:""===n?null:parseFloat(n)}})},className:"w-full border rounded-lg p-2 text-center font-bold text-summer-sky appearance-none focus:outline-none focus:ring-2 focus:ring-summer-sky focus:ring-opacity-60 transition-all duration-150",children:i.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})})]})]})})};var N=t(95099),S=t(27072);let A=e=>{let{title:n,subtitle:t=null,onChange:a,name:r,className:l="",value:c}=e,{t:i}=(0,o.Bd)("teachers"),d=e=>a("true"===e.target.value);return(0,s.jsxs)("div",{className:l,children:[(0,s.jsx)("h3",{className:(0,p.QP)("font-semibold tracking-wide text-gray-900",!t&&"pb-1"),children:n}),t&&(0,s.jsx)("h4",{className:"text-gray-700 text-sm pb-2",children:t}),(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("input",{type:"radio",name:r,id:"".concat(r,"_on"),value:"true",checked:c,onChange:d}),(0,s.jsx)("label",{htmlFor:"".concat(r,"_on"),className:"text-gray-900 text-sm ml-2 font-medium",children:i("account.emailPreferences.on","On")})]}),(0,s.jsxs)("div",{className:"ml-8",children:[(0,s.jsx)("input",{type:"radio",name:r,id:"".concat(r,"_off"),value:"false",checked:!c,onChange:d}),(0,s.jsx)("label",{htmlFor:"".concat(r,"_off"),className:"text-gray-900 text-sm ml-2 font-medium",children:i("account.emailPreferences.off","Off")})]})]})]})};function C(){let e=(0,a._)(["\n mutation UpdateUseClassTerms($useClassTerms: Boolean!) {\n updateUseClassTerms(useClassTerms: $useClassTerms) {\n id\n useClassTerms\n }\n }\n"]);return C=function(){return e},e}let k=(0,r.J1)(C()),T=e=>{let{className:n=""}=e,{t}=(0,o.Bd)("teachers"),{flagEnabled:a,useClassTerms:r}=(0,S.y4)(),[l]=(0,m.n)(k);if(!a||null===r)return null;
1let c=async e=>{try{await l({variables:{useClassTerms:e}})}catch(e){N.Ay.error(t("account.classTerms.saveFailed","Couldn't save that setting â please try again"))}};return(0,s.jsx)(v.A,{header:t("account.classTerms.title","Class Terms"),className:n,children:(0,s.jsx)("div",{className:"p-4","data-testid":"class-terms-setting",children:(0,s.jsx)(A,{name:"useClassTerms",title:t("account.classTerms.toggle","Use class terms"),subtitle:t("account.classTerms.description","Turn this on to organize your classes by term. You get a Terms page for setting up your school year, a term on each class, and term filters on your classes, students, and assignments. Turning it off hides those controls again â any terms you already made are kept."),value:!0===r,onChange:c})})})};function F(){let e=(0,a._)(["\n mutation UpdateEmailPreferences(\n $weeklyDigestEmail: Boolean!\n $completedAssignmentEmail: Boolean!\n ) {\n updateEmailPreferences(\n weeklyDigestEmail: $weeklyDigestEmail\n completedAssignmentEmail: $completedAssignmentEmail\n ) {\n id\n completedAssignmentEmail\n weeklyDigestEmail\n }\n }\n"]);return F=function(){return e},e}let L=(0,r.J1)(F()),P=e=>{let{className:n="",emailPreferences:t}=e,{t:a}=(0,o.Bd)("teachers"),[r]=(0,m.n)(L),l=async e=>{r({variables:e})};return(0,s.jsx)(v.A,{header:a("account.emailPreferences.title","Email Preferences"),className:n,children:(0,s.jsxs)("div",{className:"p-4 flex flex-col sm:flex-row",children:[(0,s.jsx)(A,{name:"weeklyDigest",title:a("account.emailPreferences.weeklyDigest","Weekly Digest"),value:null==t?void 0:t.weeklyDigestEmail,onChange:e=>l({...t,weeklyDigestEmail:e}),className:"w-full sm:w-1/2"}),(0,s.jsx)(A,{name:"completedAssignments",title:a("account.emailPreferences.completedAssignments","Completed Assignments"),value:null==t?void 0:t.completedAssignmentEmail,onChange:e=>l({...t,completedAssignmentEmail:e}),className:"w-full sm:w-1/2 mt-4 sm:mt-0"})]})})};var E=t(82959),$=t(71056);function _(){let e=(0,a._)(["\n mutation UnlinkGoogleAccount {\n unlinkGoogleAccount {\n id\n hasGoogleAccount\n }\n }\n"]);return _=function(){return e},e}let I=(0,r.J1)(_()),G=()=>{let{t:e}=(0,o.Bd)("teachers"),[n]=(0,m.n)(I);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("p",{className:"font-semibold text-gray-800 tracking-wide ",children:e("account.google.linked.heading","Your account is linked to Google.")}),(0,s.jsx)("p",{className:"text-gray-700 mt-3 text-sm",children:(0,s.jsx)(o.x6,{t:e,i18nKey:"account.google.linked.beforeUnlinking",defaults:"Before unlinking your account, we suggest using the <0>{passwordSection}</0> form above to set a secure password. After unlinking from Google, you will use this password along with your email address to sign in to this account.",values:{passwordSection:e("account.password.title","Reset Password")},components:[(0,s.jsx)("strong",{},"section")]})}),(0,s.jsx)("p",{className:"text-gray-700 mt-3 text-sm",children:e("account.google.linked.rosterKept","Your groups and students on your Students page will remain, but will be unlinked from your Google Account.")}),(0,s.jsx)("p",{className:"text-gray-700 mt-3 text-sm",children:e("account.google.linked.relink","You can always re-link your account later, but duplicate groups will be created.")})]}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-b-lg p-4 flex justify-center",children:(0,s.jsx)($.A,{onClick:()=>n(),children:e("account.google.linked.unlink","Unlink my account from Google")})})]})},B=()=>{let{t:e}=(0,o.Bd)("teachers");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("p",{className:"font-semibold text-gray-800 tracking-wide",children:e("account.google.unlinked.heading","Your account is not linked to Google.")}),(0,s.jsx)("p",{className:"text-gray-700 mt-3 text-sm",children:e("account.google.unlinked.benefits","Linking your account to Google will allow you to sign in with Google SSO as well as use other features made especially for Google users, such as Google Classroom integration.")})]}),(0,s.jsx)("form",{action:(0,E.Mi)(),method:"post",className:"bg-gray-100 rounded-b-lg p-4 flex justify-center",children:(0,s.jsx)($.A,{type:"submit",children:e("account.google.unlinked.signIn","Sign in With Google")})})]})},Q=e=>{let{className:n="",hasGoogleAccount:t}=e,{t:a}=(0,o.Bd)("teachers");return(0,s.jsx)(v.A,{header:a("account.google.title","Google Account"),className:n,children:t?(0,s.jsx)(G,{}):(0,s.jsx)(B,{})})};var q=t(88992),D=t(14869),U=t(97893),M=t(82190),z=t(57240);function R(){let e=(0,a._)(["\n mutation SetPassword($password: String!) {\n setPassword(password: $password) {\n id\n }\n }\n"]);return R=function(){return e},e}let J=(0,r.J1)(R()),O=e=>{var n,t,a,r,l;let{className:c=""}=e,{t:i}=(0,o.Bd)("teachers"),{start:d,value:u}=(0,D.A)(5e3),[g]=(0,m.n)(J),h={newPassword:"",confirmPassword:""},{handleSubmit:x,register:p,getValues:f,formState:{errors:b}}=(0,q.mN)({defaultValues:h}),y=async e=>{let{newPassword:n}=e;await g({variables:{password:n}}),d()},j=i("account.password.errors.minLength","Should have at least {minLength, plural, one {# character} other {# characters}}",{minLength:6});return(0,s.jsx)(v.A,{header:i("account.password.title","Reset Password"),className:c,children:(0,s.jsxs)("form",{onSubmit:x(y),children:[(0,s.jsx)("div",{className:"p-4",children:(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row",children:[(0,s.jsxs)("div",{className:"w-full sm:w-1/2 mr-0 sm:mr-2",children:[(0,s.jsx)(U.A,{id:"newPassword",type:"password",label:i("account.password.newLabel","New password"),className:"w-full",defaultValue:h.newPassword,...p("newPassword",{required:!0,minLength:6})}),(null==b||null==(n=b.newPassword)?void 0:n.type)==="required"&&(0,s.jsx)(M.A,{children:i("account.password.errors.newRequired","Password is required")}),(null==b||null==(t=b.newPassword)?void 0:t.type)==="minLength"&&(0,s.jsx)(M.A,{children:j})]}),(0,s.jsxs)("div",{className:"w-full sm:w-1/2 ml-0 sm:ml-2 mt-3 sm:mt-0",children:[(0,s.jsx)(U.A,{id:"confirmPassword",type:"password",label:i("account.password.confirmLabel","Confirm new password"),className:"w-full",defaultValue:h.confirmPassword,...p("confirmPassword",{required:!0,minLength:6,validate:{confirmation:e=>e===f().newPassword}})}),(null==b||null==(a=b.confirmPassword)?void 0:a.type)==="required"&&(0,s.jsx)(M.A,{children:i("account.password.errors.confirmRequired","Confirm the password")}),(null==b||null==(r=b.confirmPassword)?void 0:r.type)==="minLength"&&(0,s.jsx)(M.A,{children:j}),(null==b||null==(l=b.confirmPassword)?void 0:l.type)==="confirmation"&&(0,s.jsx)(M.A,{children:i("account.password.errors.mismatch","Passwords donât match")})]})]})}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-b-lg p-4 flex justify-center",children:u?(0,s.jsx)(z.A,{message:i("account.password.saved","Password changed!"),visible:!0}):(0,s.jsx)($.A,{type:"submit",children:i("account.password.submit","Reset password")})})]})})};var W=t(75847);let K=()=>{let{t:e}=(0,o.Bd)("teachers");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"p-4 text-gray-900 font-semibold text-lg",children:e("account.schoolInfo.admin.heading","You are an Admin.")}),(0,s.jsx)("p",{className:"px-4 pb-4 text-gray-800",children:(0,s.jsx)(o.x6,{t:e,i18nKey:"account.schoolInfo.admin.contact",defaults:"Please contact <0>{email}</0> to change your District or School affiliation.",values:{email:"[email protected]"},components:[(0,s.jsx)("span",{className:"text-teal-600"},"email")]})})]})},V=()=>{let{t:e}=(0,o.Bd)("teachers");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"p-4 text-gray-900 font-medium",children:e("account.schoolInfo.teacher.explanation","This information allows us to determine the appropriate standards alignment.")}),(0,s.jsx)("p",{className:"p-4",children:(0,s.jsxs)("a",{href:(0,E.ZE)(),className:"text-teal-500 font-bold border border-teal-500 p-4 rounded-lg inline-block hover:bg-slate-100 hover:bg-opacity-50",target:"_blank",rel:"noreferrer",children:[e("account.schoolInfo.teacher.update","Update")," ",(0,s.jsx)("i",{className:"fas fa-arrow-up-right-from-square"})]})})]})},Y=e=>{let{className:n="",currentTeacher:t}=e,{t:a}=(0,o.Bd)("teachers"),r=(null==t?void 0:t.isSchoolAdmin)||(null==t?void 0:t.isDistrictAdmin);return(0,s.jsx)(v.A,{header:a("account.schoolInfo.title","State, District, and School"),className:n,children:r?(0,s.jsx)(K,{}):(0,s.jsx)(V,{})})};var H=t(10945),X=t(11062),Z=t(20836),ee=t(95637);let en={control:(e,n)=>({...e,backgroundColor:ee.w4.colors.white,paddingTop:"1.5rem",borderRadius:"0.5rem",color:ee.w4.colors.gray[900],fontWeight:ee.w4.fontWeight.medium,boxShadow:n.isFocused?"0 0 0 1px ".concat(ee.w4.colors["summer-sky"]):e.boxShadow,borderColor:n.isFocused?ee.w4.colors["summer-sky"]:ee.w4.colors.slate[300]}),option:(e,n)=>{let{isDisabled:t}=n;return{...e,cursor:t?"not-allowed":"default"}}
1,input:e=>({...e}),placeholder:e=>({...e,color:ee.w4.colors.gray[400],fontWeight:ee.w4.fontWeight.normal}),singleValue:e=>({...e}),indicatorSeparator:e=>({...e,backgroundColor:"unset"}),valueContainer:e=>({...e,paddingLeft:"0.75rem"})},et=e=>{let{label:n,className:t,...a}=e,r=(0,x.useRef)(null);return(0,s.jsxs)("div",{className:(0,p.QP)("relative",t),children:[(0,s.jsx)(Z.Ay,{ref:r,styles:en,...a}),(0,s.jsx)("label",{className:"absolute top-0 left-0 right-0 text-slate-500 text-xs px-4 pt-2 font-medium",onClick:()=>{var e;return null==(e=r.current)?void 0:e.focus()},children:n})]})};var ea=t(71405);function es(){let e=(0,a._)(["\n mutation UpdateContentLibrary(\n $mathStandard: String!\n $scienceStandard: String!\n $socialStudiesStandard: String\n $mathGrades: [Int]\n $scienceGrades: [Int]\n $socialStudiesGrades: [Int]\n $gradeLevelElementary: Boolean\n $gradeLevelMiddle: Boolean\n ) {\n updateContentLibrary(\n mathStandard: $mathStandard\n scienceStandard: $scienceStandard\n socialStudiesStandard: $socialStudiesStandard\n mathGrades: $mathGrades\n scienceGrades: $scienceGrades\n socialStudiesGrades: $socialStudiesGrades\n gradeLevelElementary: $gradeLevelElementary\n gradeLevelMiddle: $gradeLevelMiddle\n ) {\n id\n mathStandard {\n id\n }\n scienceStandard {\n id\n }\n socialStudiesStandard {\n id\n }\n mathGrades\n scienceGrades\n socialStudiesGrades\n gradeLevelMiddle\n gradeLevelElementary\n }\n }\n"]);return es=function(){return e},e}let er=(0,r.J1)(es()),el=e=>{let{text:n,icon:t}=e;return(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("i",{className:(0,p.QP)("fas text-teal-500 text-2xl",t)}),(0,s.jsx)("h3",{className:"font-bold tracking-wider uppercase text-gray-900 pt-1 pb-3",children:n})]})},eo={MATH:"math",SCIENCE:"science",SOCIAL_STUDIES:"social studies"},ec=e=>n=>n.subjectArea===e,ei=e=>({label:e.publicName,value:e.id}),ed=(e,n)=>e.find(e=>e.value===n),eu=e=>{var n,t,a;let{className:r="",standards:l,teacher:c}=e,{t:i}=(0,o.Bd)("teachers"),{start:d,value:u}=(0,D.A)(5e3),g=(0,H.m)(),{refetchUserData:h}=(0,X.L)(),[x,{loading:p}]=(0,m.n)(er,{onCompleted:async()=>{await h(),await g.refetchQueries({include:["SearchAllCollections","TeacherAccountQuery","GetLearningObjectivesByID","LearningObjectivesSearch","standardsQuery","QuestionsByLO","Subjects"]}),d()}}),f={scienceStandard:null==(n=c.scienceStandard)?void 0:n.id,mathStandard:null==(t=c.mathStandard)?void 0:t.id,socialStudiesStandard:null==(a=c.socialStudiesStandard)?void 0:a.id,gradeLevelElementary:c.gradeLevelElementary,gradeLevelMiddle:c.gradeLevelMiddle},{control:b,handleSubmit:y}=(0,q.mN)({defaultValues:f}),j=async e=>{await x({variables:e})},w=l.filter(ec(eo.MATH)).filter(e=>!!e.publicName).map(ei),N=l.filter(ec(eo.SCIENCE)).filter(e=>!!e.publicName).map(ei),S=l.filter(ec(eo.SOCIAL_STUDIES)).filter(e=>!!e.publicName).map(ei);return(0,s.jsx)(v.A,{header:i("account.standards.title","Standards and Content Library"),className:r,children:(0,s.jsxs)("form",{onSubmit:y(j),children:[(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(el,{text:i("account.standards.science.heading","Science Standard"),icon:"fa-flask"}),(0,s.jsx)(q.xI,{control:b,name:"scienceStandard",render:e=>{let{field:{onChange:n,onBlur:t,value:a}}=e;return(0,s.jsx)(et,{label:i("account.standards.science.label","Science standard"),className:"w-full",options:N,value:ed(N,a),onChange:e=>n(e.value),onBlur:t})}}),(0,s.jsx)("hr",{className:"border-t border-2 border-slate-200 my-4"}),(0,s.jsx)(el,{text:i("account.standards.math.heading","Math Standard"),icon:"fa-calculator-simple"}),(0,s.jsx)(q.xI,{control:b,name:"mathStandard",render:e=>{let{field:{onChange:n,onBlur:t,value:a}}=e;return(0,s.jsx)(et,{label:i("account.standards.math.label","Math standard"),className:"w-full",options:w,value:ed(w,a),onChange:e=>n(e.value),onBlur:t})}}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{className:"border-t border-2 border-slate-200 my-4"}),(0,s.jsx)(el,{text:i("account.standards.socialStudies.heading","Social Studies Standard"),icon:"fa-globe"}),(0,s.jsx)(q.xI,{control:b,name:"socialStudiesStandard",render:e=>
1{let{field:{onChange:n,onBlur:t,value:a}}=e;return(0,s.jsx)(et,{label:i("account.standards.socialStudies.label","Social Studies standard"),className:"w-full",options:S,value:ed(S,a),onChange:e=>n(e.value),onBlur:t})}})]}),(0,s.jsx)("hr",{className:"border-t border-2 border-slate-200 my-4"}),(0,s.jsx)(el,{text:i("account.standards.library.heading","Content Library"),icon:"fa-flask"}),(0,s.jsxs)("div",{className:"flex justify-around",children:[(0,s.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,s.jsx)("h3",{children:i("account.standards.library.elementary","Elementary School")}),(0,s.jsx)(q.xI,{control:b,name:"gradeLevelElementary",render:e=>{let{field:{onChange:n,value:t}}=e;return(0,s.jsx)(ea.A,{name:"gradeLevelElementary",value:t,onChange:e=>{n(e.target.checked)},className:"cursor-pointer"})}})]}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,s.jsx)("h3",{children:i("account.standards.library.middle","Middle School")}),(0,s.jsx)(q.xI,{control:b,name:"gradeLevelMiddle",render:e=>{let{field:{onChange:n,value:t}}=e;return(0,s.jsx)(ea.A,{name:"gradeLevelMiddle",value:t,onChange:e=>{n(e.target.checked)},className:"cursor-pointer"})}})]})]})]}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-b-lg p-4 flex justify-center",children:u?(0,s.jsx)(z.A,{message:i("account.standards.saved","Standards and Content Library updated!"),visible:!0}):(0,s.jsx)($.A,{type:"submit",disabled:p,children:p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("i",{className:"far fa-spinner-third animate-spin mr-2"}),i("account.actions.saving","Savingâ¦")]}):i("account.actions.save","Save")})})]})})};function em(){let e=(0,a._)(["\n mutation UpdateTeacherCode($code: String!) {\n updateTeacherCode(code: $code) {\n id\n code\n }\n }\n"]);return em=function(){return e},e}let eg=(0,r.J1)(em()),eh=e=>{var n,t,a;let{code:r,className:l=""}=e,{t:c}=(0,o.Bd)("teachers"),{translateError:i}=(0,o.lQ)(),{start:d,value:u}=(0,D.A)(5e3),[g]=(0,m.n)(eg),{register:h,handleSubmit:x,setError:p,formState:{errors:f}}=(0,q.mN)({defaultValues:{code:r}}),b=async e=>{try{await g({variables:e}),d()}catch(e){if(e.graphQLErrors){var n;p("code",{type:"unknown",message:null!=(n=i(e))?n:c("account.teacherCode.errors.server","Code {message}",{message:e.graphQLErrors[0].message})})}}};return(0,s.jsx)(v.A,{header:c("account.teacherCode.title","Teacher Code"),className:l,children:(0,s.jsxs)("form",{onSubmit:x(b),children:[(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("p",{className:"text-lg text-center pb-4",children:c("account.teacherCode.description","This is the code students will use to find you. Keep it simple!")}),(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[(0,s.jsx)(U.A,{id:"code",label:c("account.teacherCode.label","Teacher code"),className:"w-40",defaultValue:r,...h("code",{required:!0,minLength:4})}),(null==f||null==(n=f.code)?void 0:n.type)==="required"&&(0,s.jsx)(M.A,{children:c("account.teacherCode.errors.required","Teacher code is required")}),(null==f||null==(t=f.code)?void 0:t.type)==="minLength"&&(0,s.jsx)(M.A,{children:c("account.teacherCode.errors.minLength","must be longer than {minLength, plural, one {# character} other {# characters}}",{minLength:4})}),(null==f||null==(a=f.code)?void 0:a.type)==="unknown"&&(0,s.jsx)(M.A,{children:f.code.message})]})]}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-b-lg p-4 flex justify-center",children:u?(0,s.jsx)(z.A,{message:c("account.teacherCode.saved","Teacher code updated!"),visible:!0}):(0,s.jsx)($.A,{type:"submit",children:c("account.actions.save","Save")})})]})})};function ex(){let e=(0,a._)(["\n mutation UpdateTimezone($timezone: String!) {\n updateTimezone(timezone: $timezone) {\n id\n timezone\n }\n }\n"]);return ex=function(){return e},e}let ep=(0,r.J1)(ex()),ef=e=>{let{className:n="",timezones:t,timezone:a}=e,{t:r}=(0,o.Bd)("teachers"),{start:l,value:c}=(0,D.A)(5e3),[i]=(0,m.n)(ep),{control:d,handleSubmit:u}=(0,q.mN)({defaultValues:{timezone:a}}),g=async e=>{await i({variables:e}),l()},h=t.map(e=>({label:e.name,options:e.list.map(e=>{let{id:n,name:t}=e;return{value:n,label:t}})}));return(0,s.jsx)(v.A,{header:r("account.timezone.title","Timezone"),className:n,children:(0,s.jsxs)("form",{onSubmit:u(g),children:[(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(q.xI,{control:d,name:"timezone",render:e=>
1{let{field:{onChange:n,onBlur:t,value:a}}=e;return(0,s.jsx)(et,{label:r("account.timezone.label","Select your timezone"),className:"w-full",options:h,value:h.map(e=>e.options).reduce((e,n)=>[...e,...n],[]).find(e=>e.value===a),onChange:e=>n(e.value),onBlur:t})}})}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-b-lg p-4 flex justify-center",children:c?(0,s.jsx)(z.A,{message:r("account.timezone.saved","Timezone updated!"),visible:!0}):(0,s.jsx)($.A,{type:"submit",children:r("account.actions.save","Save")})})]})})};var ev=t(35927),eb=t(28846),ey=t(34810);let ej=e=>{let{className:n=""}=e,{t}=(0,o.Bd)("teachers"),[a,r]=(0,x.useState)("idle"),[l,c]=(0,x.useState)(null),[i,d]=(0,x.useState)([]),[u,g]=(0,x.useState)(!1),[h,p]=(0,x.useState)(""),[f,b]=(0,x.useState)(""),[y,j]=(0,x.useState)(!1),[w,N]=(0,x.useState)(null),[S,{loading:A}]=(0,m.n)(ev.WK),[C,{loading:k}]=(0,m.n)(ev.rv),[T,{loading:F}]=(0,m.n)(ev.qM),L=async()=>{N(null);try{var e,n;let a=null==(e=(await S()).data)?void 0:e.beginTwoFactorEnrollment;if((null==a?void 0:a.success)&&a.secret&&a.qrCodeSvg)c({secret:a.secret,qrCodeSvg:a.qrCodeSvg}),r("enrolling");else{let e=(null==a||null==(n=a.errors[0])?void 0:n.message)||"";e.toLowerCase().includes("already enabled")?r("enabled"):N(e||t("account.twoFactor.errors.beginFailed","Could not start two-factor setup. Please try again."))}}catch(e){console.error("Begin two-factor enrollment error:",e),N(t("account.twoFactor.errors.unexpected","An unexpected error occurred. Please try again."))}},P=async e=>{if(e.preventDefault(),h.trim()){N(null);try{var n,a;let e=null==(n=(await C({variables:{code:h.trim()}})).data)?void 0:n.confirmTwoFactorEnrollment;(null==e?void 0:e.success)?(d(e.recoveryCodes||[]),p(""),r("recoveryCodes")):N((null==e||null==(a=e.errors[0])?void 0:a.message)||t("account.twoFactor.errors.confirmFailed","That code didn't match. Check your authenticator app and try again."))}catch(e){console.error("Confirm two-factor enrollment error:",e),N(t("account.twoFactor.errors.unexpected","An unexpected error occurred. Please try again."))}}},E=async e=>{if(e.preventDefault(),f.trim()){N(null);try{var n,a;let e=null==(n=(await T({variables:{code:f.trim()}})).data)?void 0:n.disableTwoFactor;(null==e?void 0:e.success)?(b(""),j(!1),r("idle")):N((null==e||null==(a=e.errors[0])?void 0:a.message)||t("account.twoFactor.errors.disableFailed","That code didn't match. Check your authenticator app and try again."))}catch(e){console.error("Disable two-factor error:",e),N(t("account.twoFactor.errors.unexpected","An unexpected error occurred. Please try again."))}}};return(0,s.jsx)(v.A,{header:t("account.twoFactor.title","Two-Factor Authentication"),className:n,children:(0,s.jsxs)("div",{className:"p-4",children:[w&&(0,s.jsx)(M.A,{children:w}),"idle"===a&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:t("account.twoFactor.idle.description","Add an extra layer of security to your account by requiring a code from an authenticator app every time you sign in.")}),(0,s.jsx)($.A,{onClick:L,disabled:A,children:A?t("account.twoFactor.idle.starting","Starting..."):t("account.twoFactor.idle.start","Set Up Two-Factor Authentication")})]}),"enrolling"===a&&l&&(0,s.jsxs)("form",{onSubmit:P,children:[(0,s.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:t("account.twoFactor.enrolling.scanInstructions","Scan this QR code with your authenticator app (like Google Authenticator or Authy), or enter the code manually.")}),(0,s.jsx)("div",{className:"w-48 h-48 mx-auto mb-4",dangerouslySetInnerHTML:{__html:l.qrCodeSvg}}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(ey.A,{label:t("account.twoFactor.enrolling.manualEntryLabel","Manual entry code"),text:l.secret})}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(eb.A,{id:"two-factor-confirm-code",label:t("account.twoFactor.enrolling.codeLabel","Enter the 6-digit code from your app"),value:h,onChange:p,placeholder:"123456",autoFocus:!0})}),(0,s.jsx)($.A,{type:"submit",disabled:k||!h.trim(),children:k?t("account.twoFactor.enrolling.confirming","Confirming..."):t("account.twoFactor.enrolling.confirm","Confirm and Enable")})]}),"recoveryCodes"===a&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-900 mb-2",children:t("account.twoFactor.recoveryCodes.title","Save your recovery codes")}),(0,s.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:t("account.twoFactor.recoveryCodes.description","Each code can be used once to sign in if you lose access to your authenticator app. This is the only time they'll be shown â store them somewhere safe.")}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 bg-gray-50 border border-gray-200 rounded-lg p-4 mb-4 font-mono text-sm",children:i.map(e=>(0,s.jsx)("div",{children:e},e))}),(0,s.jsxs)("label",{className:"flex items-center gap-2 mb-4 cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:u,onChange:e=>g(e.target.checked)}),(0,s.jsx)("span",{className:"text-sm text-gray-700",children:t("account.twoFactor.recoveryCodes.acknowledge","I have saved these recovery codes")})]}),(0,s.jsx)($.A,{onClick:()=>{d([]),g(!1),c(null),r("enabled")},disabled:!u,children:t("account.twoFactor.recoveryCodes.continue","Continue")})]}),"enabled"===a&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm text-teal-700 font-medium mb-4",children:[(0,s.jsx)("i",{className:"far fa-circle-check mr-1"}),t("account.twoFactor.enabled.description","Two-factor authentication is enabled on your account.")]}),y?(0,s.jsxs)("form",{onSubmit:E,children:[(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(eb.A,{id:"two-factor-disable-code",label:t("account.twoFactor.enabled.disableCodeLabel","Enter a code from your app, or a recovery code, to confirm"),value:f,onChange:b,placeholder:"123456",autoFocus:!0})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)($.A,{type:"submit",disabled:F||!f.trim(),children:F?t("account.twoFactor.enabled.disabling","Disabling..."):t("account.twoFactor.enabled.confirmDisable","Confirm Disable")}),(0,s.jsx)("button",{type:"button",onClick:()=>{j(!1),b(""),N(null)},className:"px-4 py-2 text-gray-600 hover:text-gray-900",children:t("account.twoFactor.enabled.cancel","Cancel")})]})]}):(0,s.jsx)($.A,{onClick:()=>j(!0),children:t("account.twoFactor.enabled.disable","Disable Two-Factor Authentication")})]})]})})};var ew=t(13388),eN=t(67262);function eS(){let e=(0,a._)(["\n query TeacherAccountQuery {\n timezones {\n id\n name\n list {\n id\n name\n }\n }\n currentUser {\n id\n email\n firstName\n lastName\n displayName\n timezone\n hasGoogleAccount\n gradeLevels {\n gradeLevel\n subject\n }\n }\n currentTeacher {\n id\n code\n scienceStandard {\n id\n }\n mathStandard {\n id\n }\n mathGrades\n scienceGrades\n gradeLevelElementary\n gradeLevelMiddle\n isDistrictAdmin\n isSchoolAdmin\n isPaid\n playerAvatar {\n fullAvatarUrl\n headsh
1otUrl\n }\n gameAssessmentQuestionCount\n ttsPlaybackRate\n }\n standards {\n id\n publicName\n subjectArea\n }\n emailPreferences {\n id\n completedAssignmentEmail\n weeklyDigestEmail\n }\n }\n"]);return eS=function(){return e},e}let eA=(0,r.J1)(eS()),eC=()=>{var e,n;let{t}=(0,o.Bd)("teachers");(0,ew.A)();let{data:a}=(0,l.I)(eA,{fetchPolicy:"cache-and-network"}),r=null==a?void 0:a.currentTeacher,m=null==a?void 0:a.currentUser;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{pageName:t("account.pageTitle","Account Settings")}),(0,s.jsxs)("div",{className:"w-full md:max-w-screen-sm mx-auto",children:[(0,s.jsx)("div",{className:"flex justify-center py-10 mb-4",children:(0,s.jsx)(i.e,{size:"lg",imageUrl:(0,c.QY)(null==r||null==(e=r.playerAvatar)?void 0:e.headshotUrl)||"",className:"border-0 hidden -mt-1 -mb-10 lg:block",alt:t("account.avatarAlt","{name}âs avatar",{name:null!=(n=null==m?void 0:m.displayName)?n:""})})}),m&&(0,s.jsx)(d.Ay,{currentUser:m}),m&&(0,s.jsx)(W.A,{currentUser:m,className:"mt-8"}),r&&(0,s.jsx)(eh,{code:null==r?void 0:r.code,className:"mt-8"}),r&&(0,s.jsx)(eu,{className:"mt-8",standards:null==a?void 0:a.standards,teacher:r}),(0,s.jsx)(O,{className:"mt-8"}),(null==r?void 0:r.isDistrictAdmin)&&(0,s.jsx)(ej,{className:"mt-8"}),m&&(0,s.jsx)(w,{className:"mt-8",assignmentSettings:{gameAssessmentQuestionCount:null==r?void 0:r.gameAssessmentQuestionCount},ttsPlaybackRate:null==r?void 0:r.ttsPlaybackRate}),(0,s.jsx)(T,{className:"mt-8"}),(null==a?void 0:a.emailPreferences)&&(0,s.jsx)(P,{className:"mt-8",emailPreferences:null==a?void 0:a.emailPreferences}),m&&(0,s.jsx)(ef,{className:"mt-8",timezones:a.timezones,timezone:null==m?void 0:m.timezone}),r&&(0,s.jsx)(Y,{className:"mt-8",currentTeacher:r}),m&&(0,s.jsx)(Q,{className:"mt-8",hasGoogleAccount:null==m?void 0:m.hasGoogleAccount})]})]})};eC.getLayout=(e,n)=>(0,s.jsx)(eN.O,{className:"items-center text-gray-900",pageKey:"account",children:e});let ek=eC},71405:(e,n,t)=>{"use strict";t.d(n,{A:()=>r});var a=t(6029);t(55729);var s=t(76264);let r=e=>{let{value:n,onChange:t,className:r,name:l="toggle"}=e;return(0,a.jsxs)("div",{className:(0,s.QP)("relative rounded-full w-12 h-6 transition duration-200 ease-linear",r,n?"bg-summer-sky":"bg-gray-400"),children:[(0,a.jsx)("label",{htmlFor:l,className:(0,s.QP)("absolute left-0 bg-white border-2 mb-2 w-6 h-6 rounded-full transition transform duration-100 ease-linear cursor-pointer",n?"translate-x-full border-summer-sky":"translate-x-0 border-gray-400")}),(0,a.jsx)("input",{type:"checkbox",id:l,name:l,onChange:t,value:n,className:"appearance-none w-full h-full active:outline-none focus:outline-none"})]})}},71481:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account",function(){return t(42711)}])},95669:(e,n,t)=>{e.exports=t(44807)}},e=>{e.O(0,[883,1864,8588,2563,4170,4575,7314,5879,7983,836,2573,2734,2981,7262,636,6593,8792],()=>e(e.s=71481)),_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.