PageSourceSearch

https://www.gonoodle.com/_next/static/chunks/pages/registration-63cd7697eda9dd3b.js

js gonoodle.com collected 2026-10-01 10:25:51 UTC 41,160 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[979],{14517:(e,s,a)=>{"use strict";a.d(s,{A:()=>m});var r=a(6029);a(55729);var l=a(56121),t=a.n(l),n=a(8588),i=a.n(n),o=a(64218),c=a(72504),d=a(21418);function m(e){let s,a,{children:l,className:t,ageGate:n=!1,onPress:m=()=>{},onAgeGateFailed:u=()=>{},variantStyle:h="",disabled:x=!1}=e,g=n?o.Ow:o.Xb;switch(h){case"google":a="bg-white text-gray-500 rounded-sm border border-gray-300 focus:bg-gray-100 focus:border-gray-300 focus:ring-gray-100 hover:bg-gray-50 hover:text-gray-600 shadow-[0_4px_0_0_#CBCBCB,0_8px_0_0_rgba(0,0,0,0.25)]",s=(0,r.jsx)(i(),{src:"".concat(d.A.GN_ASSETS_BASE_URL,"/web_public/icons/google.svg"),alt:"Google icon",width:"26",height:"26"});break;case"clever":a="text-white bg-[#436CF2] focus:bg-[#436CF2] hover:bg-[#6989f5] border border-transparent focus:border-[#819df6] focus:ring-[#819df6] focus:ring shadow-[0_4px_0_0_#3D62DC,0_8px_0_0_rgba(0,0,0,0.25)]",s=(0,r.jsx)(i(),{src:"".concat(d.A.GN_ASSETS_BASE_URL,"/web_public/icons/clever.svg"),alt:"Clever icon",width:"24",height:"24"})}return(0,r.jsx)(g,{className:(0,c.Q)(t,a,"text-md font-bold h-fit min-h-button-lg px-sm",x&&"opacity-50"),onPress:m,onAgeGateFailed:n?u:void 0,disabled:x,children:(0,r.jsxs)("div",{className:"flex flex-row items-center w-full px-3",children:[s,(0,r.jsx)("p",{className:"px-2 mx-auto",children:l})]})})}m.propTypes={children:t().string.isRequired,className:t().string,ageGate:t().bool,onPress:t().func,onAgeGateFailed:t().func,variantStyle:t().string,disabled:t().bool}},27714:(e,s,a)=>{"use strict";a.d(s,{A:()=>c});var r=a(6029);a(55729);var l=a(8588),t=a.n(l),n=a(21420),i=a(86329),o=a(3990);function c(e){let{className:s}=e;return(0,r.jsx)("nav",{className:"gn-nav ".concat(s),children:(0,r.jsx)("div",{className:"flex items-center justify-center h-navbar",children:(0,r.jsx)("div",{className:"transform transition hover:scale-110",children:(0,r.jsxs)(o.A,{href:i.fp.HOME,events:[{event:"Link Clicked",properties:{title:"GoNoodle Logo",sourceName:n.bP.LOGO,sourceElement:n.$u.HEADER}}],children:[(0,r.jsx)("span",{className:"sr-only",children:"GoNoodle"}),(0,r.jsx)(t(),{width:150,height:25,src:"".concat(i.tl.GN_ASSETS_BASE_URL,"/web_public/GoNoodleLogo_Registered_Reverse.svg"),alt:"GoNoodle logo"})]})})})})}},33070:(e,s,a)=>{"use strict";a.d(s,{A:()=>i});var r=a(6029),l=a(56121),t=a.n(l),n=a(64218);function i(e){let{className:s,points:a,size:l="sm"}=e;return(0,r.jsxs)("span",{className:(0,n.Qh)("relative","sm"===l&&"text-xs",s),children:[(0,r.jsx)("span",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 font-bold text-white",children:a}),(0,r.jsx)("svg",{className:(0,n.Qh)("sm"===l&&"w-6 h-6","lg"===l&&"w-12 h-12"),viewBox:"0 0 29 29",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M14.5 0L17.0082 2.69963L20.3977 1.25359L21.591 4.74002L25.2756 4.79761L24.9477 8.468L28.2903 10.0193L26.4979 13.239L28.9206 16.0157L25.9735 18.228L27.0574 21.75L23.4653 22.5724L23.0229 26.2307L19.4069 25.521L17.5147 28.6831L14.5 26.564L11.4853 28.6831L9.59313 25.521L5.97711 26.2307L5.5347 22.5724L1.94263 21.75L3.02645 18.228L0.0794325 16.0157L2.50209 13.239L0.709681 10.0193L4.05227 8.468L3.7244 4.79761L7.40896 4.74002L8.60232 1.25359L11.9918 2.69963L14.5 0Z",fill:"#5D15E3"})})]})}i.propTypes={className:t().string,points:t().number.isRequired,size:t().oneOf(["sm","lg"])}},62167:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/registration",function(){return a(76336)}])},76336:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>X,default:()=>Z});var r=a(6029),l=a(55729),t=a(43887),n=a(64218),i=a(90472),o=a(22318),c=a.n(o),d=a(65750),m=a(16932),u=a(93251),h=a(87343),x=a.n(h),g=a(4014),p=a(88669),f=a(21420),v=a(83),y=a.n(v),N=a(52229),j=a(8588),b=a.n(j),w=a(72504),C=a(94118),S=a(38142),E=a(27714),_=a(14517),G=a(37444),P=a(56121),O=a.n(P),k=a(86329);function A(e){let{type:s,onClick:a=()=>{}}=e,{img:l,text:t}=s===k.KU.CLASSROOM?{img:"classroom-user-registration.png",text:"At a School"}:{img:"home-user-registration.png",text:"At Home"};return(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{onClick:()=>a(s),onKeyUp:e=>{"Enter"===e.key&&a(s)},role:"button",tabIndex:0,className:"cursor-pointer aspect-w-2 aspect-h-1",children:(0,r.jsx)(b(),{unoptimized:!0,width:"490",height:"245",priority:!0,alt:"".concat(t," option"),src:"".concat(k.tl.GN_ASSETS_BASE_URL,"/web_public/").concat(l)})}
1),(0,r.jsx)("p",{className:"text-lg font-bold text-white self-center mt-md",children:t})]})}A.propTypes={type:O().oneOf([k.KU.CLASSROOM,k.KU.KID_HOME]).isRequired,onClick:O().func};var L=a(33070),R=a(22718),T=a(64021),I=a(97450),U=a(3783),B=a(3990);function M(e){let{children:s,referrer:a={},...l}=e,t=(0,N.usePathname)(),{intendedPath:n}=(0,I.uC)(),i=n||t;return(0,r.jsx)(B.A,{href:{pathname:"/".concat(k.Zt.LOGIN),query:{intended_path:i,...a}},as:{pathname:"/".concat(k.Zt.LOGIN),query:{intended_path:i}},...l,children:s})}var F=a(43122),V=a(29143);let q=(0,R.A)();function D(e){let{title:s,description:a,email:l,onClose:i}=e,{validateEmail:o}=(0,I.cm)(),{updateUserFlags:c}=(0,U.Jd)(),{resetLoggedOutChampPoints:d}=(0,I.A6)(),m=(0,N.useSearchParams)().get("oauth_initiator"),u={email:"email",password:"password",importCleverProfiles:"importCleverProfiles"},{logEvent:h}=(0,T._B)({event:"Clever Account Connected to GoNoodle Account",properties:{sourceElement:f.$u.CLEVER},options:{includeReferrer:!1,includeSourcePage:!1,includeSourcePageType:!1}}),{logEvent:x}=(0,T._B)({event:"Google Account Connected to GoNoodle Account",properties:{sourceElement:f.$u.GOOGLE},options:{includeReferrer:!1,includeSourcePage:!1,includeSourcePageType:!1}}),{login:g,error:p,isLoading:v}=(0,I.vz)({redirectRoute:{pathname:"/".concat(k.Zt.PROFILES),query:{registration_initiator:k.r4.CLEVER},referrer:{sourceElement:f.$u.CLEVER,sourceName:f.$u.CREATE_ACCOUNT}},onSuccess:(e,s)=>{m===k.DC.CLEVER_SIGNUP?h():m===k.DC.GOOGLE_SIGNUP&&x(),c({importCleverProfiles:s[u.importCleverProfiles]}),d()}});return(0,r.jsx)(n.lG.bL,{isOpen:!0,isDismissable:!v,onClose:i,children:(0,r.jsx)(n.lG.UC,{className:"w-full md:w-screen-xs p-md my-8 bg-white rounded-lg transform transition-all",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-md",children:[(0,r.jsx)(n.lG.hE,{className:"gn-headline-sm text-center",children:s}),(0,r.jsx)("p",{className:"gn-text text-center",children:a}),(0,r.jsx)(t.l1,{initialValues:{email:void 0,password:void 0,importCleverProfiles:m===k.DC.CLEVER},onSubmit:e=>g({email:l||e.email,password:e.password,importCleverProfiles:e.importCleverProfiles}),children:e=>{let{values:s,errors:a,setFieldValue:c,handleBlur:d}=e;return(0,r.jsx)(t.lV,{method:"post",noValidate:!0,children:(0,r.jsxs)("div",{className:"mt-6 space-y-6",children:[p?(0,r.jsx)(n.yh,{text:p,className:"px-2 py-sm"}):null,(0,r.jsxs)("div",{className:"flex flex-col bg-white rounded-lg space-y-4",children:[l?null:(0,r.jsx)(G.LP,{name:u.email,label:"Email address",autoFocus:!0,validateAsync:async e=>{if(s[u.email]!==e)try{await o(e);return}catch(e){if((null==e?void 0:e.code)===422){let{error:s}=await e.response.json();return s}return}return a[u.email]}}),(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)(G.s3,{name:u.password,label:"Password",validate:e=>e&&e.length<6?"Your password must be at least 6 characters":/\s/.test(e)?"Your password cannot contain spaces":void 0}),(0,r.jsx)("div",{children:(0,r.jsx)(B.A,{href:"/".concat(k.Zt.FORGOT_PASSWORD),className:"text-gray-700 text-[12px] underline cursor-pointer",onMouseDown:e=>e.preventDefault(),children:"Forgot Password?"})})]}),m===k.DC.CLEVER_SIGNUP?(0,r.jsx)(n.Sc,{name:u.importCleverProfiles,label:"Would you like to sync classes from Clever?",description:"This will add Clever classes to your account.",onChange:e=>c(u.importCleverProfiles,e),checked:s.importCleverProfiles,onBlur:d}):null]}),(0,r.jsxs)("div",{className:"flex flex-row space-x-4 mt-6",children:[(0,r.jsx)(n.$n,{variant:n.Ck.darkOutline,size:n.GO.lg,className:"w-full",disabled:v,onPress:i,children:"Nevermind"}),(0,r.jsx)(n.$n,{variant:n.Ck.dark,size:n.GO.lg,type:"submit",disabled:v,className:"w-full",children:"Continue"})]})]})})}})]})})})}function z(){let{user:e}=(0,U.Jd)(),{intendedPath:s}=(0,I.uC)(),a=(0,I.rd)(),{executeRecaptcha:i}=(0,d._Y)(),[o,u]=l.useState(),h=(0,N.useSearchParams)(),x=JSON.stringify({intended_path:s,oauth_initiator:k.DC.GOOGLE_SIGNUP}),g="".concat("https://accounts.google.com/o/oauth2/v2/auth","?response_type=code&redirect_uri=").concat("https://api.gonoodle.com","/universe/v1/oauth/callback/google&client_id=").concat("1048527681671-o9ojg561av1atd4bcgr5g0nj3004m87v.apps.googleusercontent.com","&scope=https%3A//www.googleapis.com/auth/userinfo.profile+https%3A//www.googleapis.com/auth/userinfo.email&state=").concat(x),p=JSON.stringify({intended_path:s,oauth_initiator:k.DC.CLEVER_LOGIN}),v="".concat("https://clever.com/oauth/authorize","?response_type=code&redirect_uri=").concat("https://api.gonoodle.com","/universe/v1/oauth/callback/clever&client_id=").concat("075615b7465543a121d5","&state=").concat(p);V.env.NEXT_PUBLIC_CLEVER_DISTRICT_ID&&(v+="&district_id=".concat(V.env.NEXT_PUBLIC_CLEVER_DISTRICT_ID));let j=h.get("oauth_initiator"),b=h.get("google_error"),w=h.get("email"),C=h.get("account_found"),S=h.get("existing_clever_connection"),G="termsOfService",P="privacyPolicy",O="allowMarketingEmails",{logEvent:A}=(0,T._B)({event:"Google Sign Up Submission",properties:{sourceElement:f.$u.GOOGLE},options:{includeReferrer:!1,includeSourcePage:!1,includeSourcePageType:!1}}),{logEvent:L}=(0,T._B)({event:"Age Gate Failed",properties:{sourceElement:f.$u.CREATE_ACCOUNT},options:{includeReferrer:!1}}),{logEvent:R}=(0,T._B)({event:"Google Sign Up Started",properties:{sourceElement:f.$u.CREATE_ACCOUNT},options:{includeReferrer:!1,includeSourcePage:!1,includeSourcePageType:!1}}),{mutate:B}=(0,m.n)({mutationFn:async e=>{let s=await i("register");return q.register({...e,recaptchaToken:s})},onSuccess:()=>{A(),a.replace("/".concat(k.Zt.PROFILES,"?registration_initiator=").concat(k.r4.GOOGLE),void 0,{sourceElement:f.$u.GOOGLE,sourceName:f.$u.CREATE_ACCOUNT})}});return(0,r.jsxs)(r.Fragment,{children:[b===k.Mi.SIGNUP?(0,r.jsx)(n.yh,{text:"Sorry! We're experiencing some issues with Google right now. Please try again later.",className:"px-3 py-sm"}):null,(0,r.jsx)(_.A,{ageGate:!0,onAgeGateFailed:L,variantStyle:"google",onPress:async()=>{try{await R()}catch(e){}finally{window.location.href=g}},children:"Sign Up with Google"}),(0,r.jsxs)(n.lG.bL,{className:"flex flex-col bg-gray-900 justify-normal",isOpen:"false"===C&&j===k.DC.GOOG
1LE_SIGNUP,children:[(0,r.jsxs)(n.lG.hE,{className:"gn-headline-md text-white text-center space-y-8",children:[(0,r.jsx)(E.A,{}),(0,r.jsx)("p",{children:"Let's Get GoNoodling!"})]}),(0,r.jsx)(n.lG.UC,{className:"w-full md:w-screen-xs p-md mt-10 mb-8 bg-white rounded-lg transform transition-all",children:(0,r.jsx)(t.l1,{initialValues:{termsOfService:!1,privacyPolicy:!1,allowMarketingEmails:e.isUserInUsa,importCleverProfiles:!1},validate:e=>{let s={},{error:a}=c().object({termsOfService:c().bool().valid(!0).messages({"any.only":"Please agree to our terms of service"}),privacyPolicy:c().bool().valid(!0).messages({"any.only":"Please agree to our privacy policy"}),allowMarketingEmails:c().bool()}).validate(e,{abortEarly:!1,allowUnknown:!0,errors:{label:"path"}});return a&&y()(a.details,e=>{s[e.context.key]=e.message}),s},onSubmit:e=>{let{allowMarketingEmails:s}=e;B({email:w,allowMarketingEmails:s})},children:e=>{let{values:s,touched:a,errors:l,handleBlur:i,setFieldValue:o,submitForm:c}=e;return(0,r.jsx)(t.lV,{method:"post",noValidate:!0,children:(0,r.jsxs)("div",{className:"flex flex-col space-y-md p-4",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(n.Sc,{name:G,label:(0,r.jsxs)(r.Fragment,{children:["I have read and agree to the"," ",(0,r.jsx)(n.h4,{className:"text-purple"})]}),ariaLabel:"I have read and agree to the Terms of Service",required:!0,onChange:e=>o(G,e),checked:s.termsOfService,error:a.termsOfService&&l.termsOfService,onBlur:i}),(0,r.jsx)(n.Sc,{name:P,label:(0,r.jsxs)(r.Fragment,{children:["I have read and agree to the"," ",(0,r.jsx)(n.Hz,{className:"text-purple"})]}),ariaLabel:"I have read and agree to the Privacy Policy",required:!0,onChange:e=>o(P,e),checked:s.privacyPolicy,error:a.privacyPolicy&&l.privacyPolicy,onBlur:i}),(0,r.jsx)(n.Sc,{name:O,label:"I’d like weekly emails from GoNoodle",description:"Become a GoNoodle Insider!",onChange:e=>o(O,e),checked:s.allowMarketingEmails,onBlur:i})]}),(0,r.jsx)("div",{className:"flex flex-col space-y-6",children:(0,r.jsx)(n.$n,{variant:n.Ck.vivid,size:n.GO.lg,className:"w-full",onPress:()=>{c()},children:"Continue"})})]})})}})})]}),(0,r.jsxs)(n.lG.bL,{className:"flex flex-col bg-gray-900 justify-normal",isOpen:"true"===S,children:[(0,r.jsxs)(n.lG.hE,{className:"gn-headline-md text-white text-center",children:[(0,r.jsx)(E.A,{className:"mb-lg"}),"Already GoNoodling?"]}),(0,r.jsx)(n.lG.UC,{className:"w-full md:w-screen-xs p-md mt-14 mb-8 bg-white rounded-lg text-center transform transition-all",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-md",children:[(0,r.jsxs)("p",{className:"gn-text",children:["You are connected by Clever already.",(0,r.jsx)("br",{})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-sm",children:[(0,r.jsx)(n.$n,{variant:n.Ck.dark,size:n.GO.md,onPress:()=>{window.location.href=v},children:"Log In to my GoNoodle Account with Clever"}),(0,r.jsx)(F.A,{variant:n.Ck.darkOutline,size:n.GO.md,children:"Never mind, I’ll sign up using a different email"})]})]})})]}),(0,r.jsxs)(n.lG.bL,{className:"flex flex-col bg-gray-900 justify-normal",isOpen:"true"===C&&j===k.DC.GOOGLE_SIGNUP&&!S,children:[(0,r.jsxs)(n.lG.hE,{className:"gn-headline-md text-white text-center",children:[(0,r.jsx)(E.A,{className:"mb-lg"}),"Already GoNoodling?"]}),(0,r.jsx)(n.lG.UC,{className:"w-full md:w-screen-xs p-md mt-14 mb-8 bg-white rounded-lg text-center transform transition-all",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-md",children:[(0,r.jsxs)("p",{className:"gn-text",children:["We found a GoNoodle account for",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:" font-extrabold text-black",children:w}),(0,r.jsx)("br",{}),"Would you like to connect this account to Google?"]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-sm",children:[(0,r.jsx)(n.$n,{variant:n.Ck.dark,size:n.GO.md,onPress:()=>u({email:w}),children:"Yes, connect this account to Google"}),(0,r.jsx)(F.A,{variant:n.Ck.darkOutline,size:n.GO.md,children:"Never mind, I’ll sign up using a different email"}),(0,r.jsx)(n.Xb,{className:"underline gn-text-sm",onPress:()=>u({email:void 0}),children:"Connect a different GoNoodle account to google"})]})]})})]}),o?(0,r.jsx)(D,{email:o.email,title:o.email?"Enter your password":"Enter your log in information",description:o.email?(0,r.jsxs)(r.Fragment,{children:["We found a GoNoodle account for",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:" font-extrabold text-black",children:w}),(0,r.jsx)("br",{}),"Would you like to connect this account to Google?"]}):"To connect an existing GoNoodle account to Google, please enter your GoNoodle login email and password:",onClose:()=>u(void 0)}):null]})}function $(){let{user:e}=(0,U.Jd)(),{intendedPath:s}=(0,I.uC)(),a=(0,I.rd)(),{executeRecaptcha:i}=(0,d._Y)(),[o,u]=l.useState(),h=(0,N.useSearchParams)(),x=JSON.stringify({intended_path:s,oauth_initiator:k.DC.GOOG
1LE_SIGNUP}),g="".concat("https://accounts.google.com/o/oauth2/v2/auth","?response_type=code&redirect_uri=").concat("https://api.gonoodle.com","/universe/v1/oauth/callback/google&client_id=").concat("1048527681671-o9ojg561av1atd4bcgr5g0nj3004m87v.apps.googleusercontent.com","&scope=https%3A//www.googleapis.com/auth/userinfo.profile+https%3A//www.googleapis.com/auth/userinfo.email&state=").concat(x),p=JSON.stringify({intended_path:s,oauth_initiator:k.DC.CLEVER_SIGNUP}),v="".concat("https://clever.com/oauth/authorize","?response_type=code&redirect_uri=").concat("https://api.gonoodle.com","/universe/v1/oauth/callback/clever&client_id=").concat("075615b7465543a121d5","&state=").concat(p);V.env.NEXT_PUBLIC_CLEVER_DISTRICT_ID&&(v+="&district_id=".concat(V.env.NEXT_PUBLIC_CLEVER_DISTRICT_ID));let j=h.get("oauth_initiator"),b=h.get("clever_error"),w=h.get("email"),C=h.get("account_found"),S=h.get("existing_google_connection"),G="termsOfService",P="privacyPolicy",O="allowMarketingEmails",A="importCleverProfiles",{logEvent:L}=(0,T._B)({event:"Clever Sign Up Submission",properties:{sourceElement:f.$u.CLEVER},options:{includeReferrer:!1,includeSourcePage:!1,includeSourcePageType:!1}}),{logEvent:R}=(0,T._B)({event:"Age Gate Failed",properties:{sourceElement:f.$u.CREATE_ACCOUNT},options:{includeReferrer:!1}}),{logEvent:B}=(0,T._B)({event:"Clever Sign Up Started",properties:{sourceElement:f.$u.CREATE_ACCOUNT},options:{includeReferrer:!1,includeSourcePage:!1,includeSourcePageType:!1}}),{mutate:M}=(0,m.n)({mutationFn:async e=>{let s=await i("register");return q.register({...e,recaptchaToken:s})},onSuccess:()=>{L(),a.replace("/".concat(k.Zt.PROFILES,"?registration_initiator=").concat(k.r4.CLEVER),void 0,{sourceElement:f.$u.CLEVER,sourceName:f.$u.CREATE_ACCOUNT})}});return(0,r.jsxs)(r.Fragment,{children:[b===k.Mi.SIGNUP?(0,r.jsx)(n.yh,{text:"Sorry! We're experiencing some issues with Clever right now. Please try again later.",className:"px-3 py-sm"}):null,(0,r.jsx)(_.A,{ageGate:!0,onAgeGateFailed:R,variantStyle:"clever",onPress:async()=>{try{await B()}catch(e){}finally{window.location.href=v}},children:"Sign Up with Clever"}),(0,r.jsxs)(n.lG.bL,{className:"flex flex-col bg-gray-900 justify-normal",isOpen:"false"===C&&j===k.DC.CLEVER_SIGNUP,children:[(0,r.jsxs)(n.lG.hE,{className:"gn-headline-md text-white text-center space-y-8",children:[(0,r.jsx)(E.A,{}),(0,r.jsx)("p",{children:"Let's Get GoNoodling!"})]}),(0,r.jsx)(n.lG.UC,{className:"w-full md:w-screen-xs p-md mt-10 mb-8 bg-white rounded-lg transform transition-all",children:(0,r.jsx)(t.l1,{initialValues:{termsOfService:!1,privacyPolicy:!1,allowMarketingEmails:e.isUserInUsa},validate:e=>{let s={},{error:a}=c().object({termsOfService:c().bool().valid(!0).messages({"any.only":"Please agree to our terms of service"}),privacyPolicy:c().bool().valid(!0).messages({"any.only":"Please agree to our privacy policy"}),allowMarketingEmails:c().bool()}).validate(e,{abortEarly:!1,allowUnknown:!0,errors:{label:"path"}});return a&&y()(a.details,e=>{s[e.context.key]=e.message}),s},onSubmit:e=>{let{allowMarketingEmails:s,importCleverProfiles:a}=e;M({email:w,allowMarketingEmails:s,importCleverProfiles:a})},children:e=>{let{values:s,touched:a,errors:l,handleBlur:i,setFieldValue:o,submitForm:c}=e;return(0,r.jsx)(t.lV,{method:"post",noValidate:!0,children:(0,r.jsxs)("div",{className:"flex flex-col space-y-md p-4",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(n.Sc,{name:G,label:(0,r.jsxs)(r.Fragment,{children:["I have read and agree to the"," ",(0,r.jsx)(n.h4,{className:"text-purple"})]}),ariaLabel:"I have read and agree to the Terms of Service",required:!0,onChange:e=>o(G,e),checked:s.termsOfService,error:a.termsOfService&&l.termsOfService,onBlur:i}),(0,r.jsx)(n.Sc,{name:P,label:(0,r.jsxs)(r.Fragment,{children:["I have read and agree to the"," ",(0,r.jsx)(n.Hz,{className:"text-purple"})]}),ariaLabel:"I have read and agree to the Privacy Policy",required:!0,onChange:e=>o(P,e),checked:s.privacyPolicy,error:a.privacyPolicy&&l.privacyPolicy,onBlur:i}),(0,r.jsx)(n.Sc,{name:O,label:"I’d like weekly emails from GoNoodle",description:"Become a GoNoodle Insider!",onChange:e=>o(O,e),checked:s.allowMarketingEmails,onBlur:i})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,r.jsx)(n.$n,{variant:n.Ck.vivid,size:n.GO.lg,className:"w-full",onPress:()=>{o(A,!0),c()},children:"Sign Up and Sync Classes!"}),(0,r.jsx)(n.$n,{variant:n.Ck.darkOutline,size:n.GO.md,onPress:()=>{o(A,!1),c()},children:"Sign Up without Syncing Classes"})]})]})})}})})]}),(0,r.jsxs)(n.lG.bL,{className:"flex flex-col bg-gray-900 justify-normal",isOpen:"true"===S,children:[(0,r.jsxs)(n.lG.hE,{className:"gn-headline-md text-white text-center",children:[(0,r.jsx)(E.A,{className:"mb-lg"}),"Already GoNoodling?"]}),(0,r.jsx)(n.lG.UC,{className:"w-full md:w-screen-xs p-md mt-14 mb-8 bg-white rounded-lg text-center transform transition-all",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-md",children:[(0,r.jsxs)("p",{className:"gn-text",children:["You are connected by Google already.",(0,r.jsx)("br",{})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-sm",children:[(0,r.jsx)(n.$n,{variant:n.Ck.dark,size:n.GO.md,onPress:()=>{window.location.href=g},children:"Log In to my GoNoodle Account with Google"}),(0,r.jsx)(F.A,{variant:n.Ck.darkOutline,size:n.GO.md,children:"Never mind, I’ll sign up using a different email"})]})]})})]}),(0,r.jsxs)(n.lG.bL,{className:"flex flex-col bg-gray-900 justify-normal",isOpen:"true"===C&&j===k.DC.CLEVER_SIGNUP&&!S,children:[(0,r.jsxs)(n.lG.hE,{className:"gn-headline-md text-white text-center",children:[(0,r.jsx)(E.A,{className:"mb-lg"}),"Already GoNoodling?"]}),(0,r.jsx)(n.lG.UC,{className:"w-full md:w-screen-xs p-md mt-14 mb-8 bg-white rounded-lg text-center transform transition-all",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-md",children:[(0,r.jsxs)("p",{className:"gn-text",children:["We found a GoNoodle account for",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:" font-extrabold text-black",children:w}),(0,r.jsx)("br",{}),"Would you like to connect this account to Clever?"]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-sm",children:[(0,r.jsx)(n.$n,{variant:n.Ck.dark,size:n.GO.md,onPress:()=>u({email:w}),children:"Yes, connect this account to Clever"}),(0,r.jsx)(F.A,{variant:n.Ck.darkOutline,size:n.GO.md,children:"Never mind, I’ll sign up using a different email"}),(0,r.jsx)(n.Xb,{className:"underline gn-text-sm",onPress:()=>u({email:void 0}),children:"Connect a different GoNoodle account to clever"})]})]})})]}),o?(0,r.jsx)(D,{email:o.email,title:o.email?"Enter your password":"Enter your log in information",description:o.email?(0,r.jsxs)(r.Fragment,{children:["We found a GoNoodle account for",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:" font-extrabold text-black",children:w}),(0,r.jsx)("br",{}),"Would you like to connect this account to Clever?"]}):"To connect an existing GoNoodle account to Clever, please enter your GoNoodle login email and password:",onClose:()=>u(void 0)}):null]})}let K=e=>{let{onComplete:s}=e,{logEvent:a}=(0,T._B)({event:"Create Account Profile Selection",options:{includeReferrer:!1}});return(0,r.jsx)("div",{className:"flex flex-col items-center pb-8 px-sm",children:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("h1",{className:"gn-headline-md text-white text-center mb-lg",children:"Where are you using GoNoodle?"}),(0,r.jsx)("div",{className:"space-y-xl",children:(0,r.jsx)(t.l1,{initialValues:{profileType:void 0},validate:e=>{let{profileType:s}=e;return!!s},onSubmit:e=>{a({profileType:e.profileType}),s(e)},children:e=>{let{setFieldValue:s,submitForm:a}=e;return(0,r.jsx)(t.lV,{method:"post",noValidate:!0,children:(0,r.jsxs)("div",{className:"space-y-xl md:w-[490px]",children:[(0,r.jsx)(A,{type:k.KU.CLASSROOM,onClick:e=>{s("profileType",e),a()}}),(0,r.jsx)("hr",{className:"md:-mx-xl"}),(0,r.jsx)(A,{type:k.KU.KID_HOME,onClick:e=>{s("profileType",e),a()}})]})})}})})]})})},H=e=>{let{onComplete:s,isSubmitting:a}=e,o=n.Fc.useAlert(),[d,m]=l.useState(),u=(0,i.d7)(d,500),h={school:"school",numberOfKids:"numberOfKids",className:"className",grade:"grade"},{schools:g,schoolsError:p,isSchoolsLoading:f}=(0,I.Ru)(u),{grades:v,isGradesLoading:N,gradesError:j}=(0,I._)(),b=l.useMemo(()=>!g||f||p?[]:x()(g,[{id:null,name:"School Not Found"}]),[g,f,p]);return p&&o.publish("Something went wrong. Please reload page."),(0,r.jsxs)("div",{className:"flex flex-row-reverse pb-8 px-sm",children:[(0,r.jsx)(t.l1,{onSubmit:s,initialValues:{school:void 0,numberOfKids:NaN,className:void 0,grade:void 0},validate:e=>{let s={},{error:a}=c().object({school:c().object({id:c().any(),name:c().string().required(),address:c().any()}).required().messages({"any.required":"Please select your school"}),numberOfKids:c().number().min(1).max(100).required().messages({"any.required":"Please enter the number of kids","number.base":"Please enter the number of kids","number.min":"Please enter a number between 1 and 100","number.max":"Please enter a number between 1 and 100"}
1),className:c().string().required().pattern(/[\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff]/,{invert:!0}).messages({"any.required":"Please enter your class name","string.empty":"Please enter your class name","string.pattern.invert.base":"Please only use valid characters"}),grade:c().object({id:c().number().required(),name:c().string().required()}).required().messages({"any.required":"Please select your grade"})}).validate(e,{abortEarly:!1,errors:{label:"path"}});return a&&y()(a.details,e=>{s[e.context.key]=e.message}),s},children:e=>{let{values:s,errors:l,touched:i,handleBlur:o,setFieldValue:c,setFieldTouched:d}=e;return(0,r.jsx)(t.lV,{method:"post",noValidate:!0,children:(0,r.jsxs)("div",{className:"md:w-screen-xs space-y-md flex flex-col p-lg mt-lg bg-white rounded-lg",children:[(0,r.jsx)("div",{className:"text-center",children:(0,r.jsx)("h1",{className:"gn-headline-md",children:"Create Class Profile"})}),(0,r.jsxs)("div",{className:"space-y-sm",children:[(0,r.jsx)(n.jT,{name:h.school,label:"School",options:b,required:!0,autoFocus:!0,testId:"school-autocomplete",error:i.school&&l.school?l.school:p?"Something went wrong try again":void 0,inputProps:{onBlur:o,autoComplete:"off",spellCheck:"false",endAdornment:f?(0,r.jsx)(n.fN,{className:"h-input-icon text-gray-300 animate-spin"}):null},onChange:e=>{setTimeout(()=>{c(h.school,e)},0)},onInputValueChange:e=>m(e),renderOptions:(e,s,a)=>{let{name:l,address:t,id:i}=e;if(null===i){let{onClick:e,...l}=a();return(0,r.jsx)("li",{...l,children:(0,r.jsxs)("div",{className:"flex justify-between pl-3 pt-2 pr-xs pb-3 mt-4 border-t-sm border-pink-300 cursor-default",children:[(0,r.jsxs)("div",{className:"flex-col",children:[(0,r.jsx)("p",{className:"text-xs",children:"We work with schools to keep GoNoodle awesome!"}),(0,r.jsxs)("p",{className:"text-xs",children:["Can't find your school?"," ",(0,r.jsx)("span",{className:"underline cursor-pointer",onClick:e,children:"Continue"})]})]}),(null==s?void 0:s.id)===i?(0,r.jsx)("div",{className:"self-center",children:(0,r.jsx)(n.Sr,{className:"h-input-icon text-gray-300","aria-hidden":"true"})}):null]})})}return(0,r.jsx)("li",{...a(),children:(0,r.jsxs)("div",{className:"flex justify-between pl-3 pt-2 pr-xs pb-1",children:[(0,r.jsxs)("div",{className:"flex-col space-y-xs",children:[(0,r.jsx)("p",{className:"font-bold text-sm",children:l}),(0,r.jsx)("p",{className:"text-xs",children:t})]}),(null==s?void 0:s.id)===i?(0,r.jsx)("div",{className:"self-center",children:(0,r.jsx)(n.Sr,{className:"h-input-icon text-gray-300","aria-hidden":"true"})}):null]})})}}),(0,r.jsx)(n.oz,{label:"Number of Kids",name:h.numberOfKids,required:!0,onChange:e=>c(h.numberOfKids,e),onBlur:()=>d(h.numberOfKids,!0,!1),value:s.numberOfKids,errorMessage:i.numberOfKids&&l.numberOfKids}),(0,r.jsx)(n.l6,{options:v||[],name:h.grade,label:"Grade",value:s.grade,testId:"grade-select",error:i.grade&&l.grade||j&&"Something went wrong try again",onChange:e=>
1c(h.grade,e),onBlur:o,buttonClassNames:"block w-full h-input pl-sm gn-text rounded border-sm border-gray-300 shadow-lightSM",optionClassNames:"pl-lg",optionTextClassNames:"gn-text-xs font-semibold",checkmark:!0,inputProps:{endAdornment:N?(0,r.jsx)(n.fN,{className:"h-input-icon text-gray-300 animate-spin"}):(0,r.jsx)(n.rH,{className:"h-input-icon text-gray-300"})}}),(0,r.jsx)(n.A_,{name:h.className,label:"Give your class a fun name",required:!0,onChange:e=>c(h.className,e),value:s.className,onBlur:o,errorMessage:i.className&&l.className})]}),(0,r.jsx)("div",{children:(0,r.jsx)(n.$n,{variant:n.Ck.vivid,size:n.GO.lg,disabled:a,type:"submit",className:"w-full",children:"Choose your Champ"})})]})})}}),(0,r.jsx)("div",{className:"hidden lg:block lg:absolute lg:left-0 lg:top-1/3 lg:ml-lg",children:(0,r.jsx)(n.F4,{text:"Hey GoNoodlers, McPufferson here! Create a profile for each of your classrooms so you can watch me and my friends grow when your class plays GoNoodle!"})})]})},W=e=>{let{onComplete:s,isSubmitting:a}=e,l={userName:"userName",grade:"grade"},{grades:i,isGradesLoading:o,gradesError:d}=(0,I._)();return(0,r.jsxs)("div",{className:"flex flex-row-reverse pb-8 px-sm",children:[(0,r.jsx)(t.l1,{initialValues:{userName:void 0,grade:void 0},validate:e=>{let s={},{error:a}=c().object({grade:c().object({id:c().number().required(),name:c().string().required()}).required().messages({"any.required":"Please select your grade"}),userName:c().string().required().pattern(/\s/,{invert:!0}).message("You cannot use spaces in your username").pattern(/[\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff]/,{invert:!0}).messages({"string.empty":"Please enter your user name","any.required":"Please enter your user name","string.pattern.invert.base":"Please only use valid characters"})}).validate(e,{abortEarly:!1,errors:{label:"path"}});return a&&y()(a.details,e=>{s[e.context.key]=e.message}),s},onSubmit:s,children:e=>{let{values:s,touched:c,errors:m,handleBlur:u,setFieldValue:h}=e;return(0,r.jsx)(t.lV,{method:"post",noValidate:!0,children:(0,r.jsxs)("div",{className:"md:w-screen-xs space-y-md flex flex-col p-lg mt-lg bg-white rounded-lg",children:[(0,r.jsx)("div",{className:"text-center",children:(0,r.jsx)("h1",{className:"gn-headline-md",children:"Create Kid (Home) Profile"})}),(0,r.jsxs)("div",{className:"space-y-sm",children:[(0,r.jsx)(n.A_,{name:l.userName,id:l.userName,label:"Username",description:"For privacy, choose a fun username, not your kid's actual name!",required:!0,autoFocus:!0,onChange:e=>h(l.userName,e),value:s.userName,errorMessage:c.userName&&m.userName,onBlur:u}),(0,r.jsx)(n.l6,{options:i||[],id:l.grade,label:"Grade",value:s.grade,testId:"grade-select",error:c.grade&&m.grade||d&&"Something went wrong try again",onChange:e=>
1h(l.grade,e),onBlur:u,buttonClassNames:"block w-full h-input pl-sm gn-text rounded border-sm border-gray-300 shadow-lightSM",optionClassNames:"pl-lg",optionTextClassNames:"gn-text-xs font-semibold",checkmark:!0,inputProps:{endAdornment:o?(0,r.jsx)(n.fN,{className:"h-input-icon text-gray-300 animate-spin"}):(0,r.jsx)(n.rH,{className:"h-input-icon text-gray-300"})}})]}),(0,r.jsx)("div",{children:(0,r.jsx)(n.$n,{variant:n.Ck.vivid,size:n.GO.lg,disabled:a,type:"submit",className:"w-full",children:"Choose your Champ"})})]})})}}),(0,r.jsx)("div",{className:"hidden lg:block lg:absolute lg:left-0 lg:top-1/3 lg:ml-lg",children:(0,r.jsx)(n.F4,{text:"Hey GoNoodlers, McPufferson here! Create a profile for each kid so they can watch me and my friends grow when you play GoNoodle at home!"})})]})},Y=e=>{let{onComplete:s,error:a,profileType:l,isSubmitting:t}=e;return(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[a?(0,r.jsx)("div",{className:"flex md:w-screen-xs",children:(0,r.jsx)(n.yh,{className:"p-sm",text:"Something went wrong"})}):null,l===k.KU.CLASSROOM?(0,r.jsx)(H,{onComplete:s,isSubmitting:t}):null,l===k.KU.KID_HOME?(0,r.jsx)(W,{onComplete:s,isSubmitting:t}):null]})},J=[e=>{let{onComplete:s,email:a,password:i,dateOfBirth:o,termsOfService:d,privacyPolicy:m,allowMarketingEmails:u}=e,h={email:"email",password:"password",termsOfService:"termsOfService",privacyPolicy:"privacyPolicy",allowMarketingEmails:"allowMarketingEmails",dateOfBirth:"dateOfBirth"},x=(0,I.rd)(),[g,p]=l.useState(!1),[v,N]=l.useState(!1),{validateEmail:j}=(0,I.cm)(),{logEvent:C}=(0,T._B)({event:"Create Account Email Submission",options:{includeReferrer:!1}});return(0,T._B)({event:"Age Gate Failed",properties:{sourceElement:f.$u.CREATE_ACCOUNT},options:{enabled:g,includeReferrer:!1}}),(0,r.jsxs)("div",{className:"w-full flex flex-col px-4 py-lg md:px-6 lg:mx-auto lg:w-3/5",children:[(0,r.jsxs)("div",{className:"text-white text-center space-y-3 mb-10",children:[(0,r.jsx)("h1",{className:"gn-headline-md",children:g?"Sorry, buddy!":"Hello, Grown Up Person!"}),(0,r.jsx)("p",{className:"gn-text",children:g?"You need a grown up to help you.":"Creating an account unlocks GoNoodle in the classroom and at home with access to your favorite videos, educator resources, and activities"})]}),(0,r.jsxs)("div",{className:(0,w.Q)("w-full",v?"mb-8":"invisible h-0"),children:[(0,r.jsx)(b(),{src:"".concat(k.tl.GN_ASSETS_BASE_URL,"/web_public/registration-banner-mobile.png"),width:700,height:175,alt:"registration-banner",className:"w-full md:hidden",onLoad:()=>{N(!0)},onError:()=>{N(!1)}}),(0,r.jsx)(b(),{src:"".concat(k.tl.GN_ASSETS_BASE_URL,"/web_public/registration-banner-desktop.png"),width:800,height:63,alt:"registration-banner",className:"w-full hidden md:block",onLoad:()=>{N(!0)},onError:()=>{N(!1)}})]}),!0===g?null:(0,r.jsx)(t.l1,{initialValues:{email:a,password:i,dateOfBirth:o,termsOfService:!!d,privacyPolicy:!!m,allowMarketingEmails:!!u},validate:e=>{let s={},{error:a}=c().object({termsOfService:c().bool().valid(!0).messages({"any.only":"Please agree to our terms of service"}),privacyPolicy:c().bool().valid(!0).messages({"any.only":"Please agree to our privacy policy"}),allowMarketingEmails:c().bool()}).validate(e,{abortEarly:!1,allowUnknown:!0,errors:{label:"path"}});return a&&y()(a.details,e=>{s[e.context.key]=e.message}),s},onSubmit:e=>{let{dateOfBirth:a,...r}=e,l=new Date(new Date-a.toDate()).getFullYear()-1970;l<18||l>100?p(!0):(C({newsletterSignup:!!e.allowMarketingEmails}),s(r))},children:e=>{let{values:s,touched:l,errors:i,handleBlur:o,setFieldValue:c}=e;return(0,r.jsx)(t.lV,{method:"post",noValidate:!0,children:(0,r.jsxs)("div",{className:"md:w-full space-y-6",children:[(0,r.jsxs)("div",{className:"flex flex-col md:flex-row px-4 lg:px-9 py-11 bg-white rounded-lg",children:[(0,r.jsxs)("div",{className:"flex flex-col flex-1 space-y-md",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(G.LP,{name:h.email,label:"Enter your email address",autoFocus:!0,autoComplete:"off",errorMessage:l.email&&i.email,validateAsync:async e=>{if(s[h.email]!==a)try{await j(e);return}catch(e){if((null==e?void 0:e.code)===403){let{error:s}=await e.response.json();return(0,r.jsxs)("span",{children:[s,(0,r.jsx)(M,{referrer:{sourceElement:f.$u.CREATE_ACCOUNT,sourceName:f.$u.CREATE_ACCOUNT},children:(0,r.jsx)("p",{className:"text-gray-700 underline cursor-pointer",children:"Log In"})})]})}if((null==e?void 0:e.code)===422){let{error:s}=await e.response.json();return s}return"Sorry, we’re having trouble with that. Please try again!"}return i[h.email]}}
1),(0,r.jsx)(G.s3,{name:h.password,label:"Choose a password",description:"Please use at least 6 characters",validate:e=>/\s/.test(e)?"Your password cannot contain spaces":e&&e.length<6?"Your password must be at least 6 characters":void 0}),(0,r.jsx)(G.vM,{name:h.dateOfBirth,label:"Date of Birth",description:"We need to confirm you're an adult. We do not keep or share this information with anyone",required:!0})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(n.Sc,{name:h.termsOfService,label:(0,r.jsxs)(r.Fragment,{children:["I have read and agree to the"," ",(0,r.jsx)(n.h4,{className:"text-purple"})]}),ariaLabel:"I have read and agree to the Terms of Service",required:!0,onChange:e=>c(h.termsOfService,e),checked:s.termsOfService,error:l.termsOfService&&i.termsOfService,onBlur:o}),(0,r.jsx)(n.Sc,{name:h.privacyPolicy,label:(0,r.jsxs)(r.Fragment,{children:["I have read and agree to the"," ",(0,r.jsx)(n.Hz,{className:"text-purple"})]}),ariaLabel:"I have read and agree to the Privacy Policy",required:!0,onChange:e=>c(h.privacyPolicy,e),checked:s.privacyPolicy,error:l.privacyPolicy&&i.privacyPolicy,onBlur:o}),(0,r.jsx)(n.Sc,{name:h.allowMarketingEmails,label:"I’d like weekly emails from GoNoodle",description:"Become a GoNoodle Insider!",onChange:e=>c(h.allowMarketingEmails,e),checked:s.allowMarketingEmails,onBlur:o})]}),(0,r.jsx)(n.$n,{variant:n.Ck.vivid,size:n.GO.lg,type:"submit",className:"mt-6",children:"Next"})]}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"hidden md:block mx-7 border-r-sm border-gray-500"}),(0,r.jsxs)("div",{className:"flex flex-col space-y-6 flex-1 mt-6 md:mt-0",children:[(0,r.jsxs)("div",{className:"flex flex-row items-center ",children:[(0,r.jsx)("span",{className:"md:hidden flex-1 border-t-sm border-dashed border-gray-500"}),(0,r.jsx)("p",{className:"text-center font-bold gn-text-sm text-gray-500 uppercase mx-auto",children:"Or create an account with"}),(0,r.jsx)("span",{className:"md:hidden flex-1 border-t-sm border-dashed border-gray-500"})]}),(0,r.jsx)($,{}),(0,r.jsx)(z,{})]})]})]}),(0,r.jsxs)("div",{className:"flex flex-row justify-center space-x-sm text-gray-300 gn-text-xs ",children:[(0,r.jsx)(n.Hz,{className:"ml-5"}),(0,r.jsx)("p",{children:" | "}),(0,r.jsx)(n.h4,{})]})]})})}}),(0,r.jsxs)("div",{className:"flex flex-col md:w-screen-xs p-md bg-white rounded-lg space-y-md self-center ".concat(g?"":"hidden"),children:[(0,r.jsx)("div",{className:"self-center mr-4",children:(0,r.jsx)("img",{className:"w-[150px] h-[180px] object-contain",width:150,height:180,src:"".concat(k.tl.GN_ASSETS_BASE_URL,"/web_public/McPufferson-L1-sad.svg"),alt:""})}),(0,r.jsx)(n.$n,{variant:n.Ck.dark,size:n.GO.md,onPress:()=>{x.push(k.fp.HOME)},children:"Watch GoNoodle Videos"})]})]})},K,Y,function(e){let{onComplete:s,grade:a,school:l,numberOfKids:t,className:n,profileType:i,userName:o,isSubmitting:c}=e,d=(0,I.Jj)(k.nm.MC_PUFFERSON),{loggedOutChampPoints:m}=(0,I.A6)(),{logEvent:u}=(0,T._B)({event:"Champ Selected",properties:{gradeId:null==a?void 0:a.id,size:t,schoolId:null==l?void 0:l.id,name:null!=n?n:o},options:{includeReferrer:!1,includeSourcePage:!0,includeSourcePageType:!0}});return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-xl",children:[(0,r.jsx)("h1",{className:"font-display text-2xl lg:text-4xl text-white mb-md text-center",children:"Choose your Champ"}),m?(0,r.jsxs)("p",{className:"text-white text-md text-center",children:["Your"," ",(0,r.jsx)(L.A,{size:"sm",points:m,className:"px-0.5 inline-block align-middle mb-[1px]"})," ","point",1===m?"":"s"," will transfer to your new Champ."]}):null]}),(0,r.jsx)(C.A,{defaultSelectedChampion:d,onChange:function(e,a){u({champName:e.name,champRandomizerUsed:a,profileType:i}),s({selectedChamp:e})},disabled:c})]})}];var X=!0;function Z(){let{user:e}=(0,U.Jd)(),[s,a]=l.useState(!1),t=(0,N.useSearchParams)(),[i,o]=l.useState({allowMarketingEmails:e.isUserInUsa}),[c,h]=l.useState(0),{redirectToIntendedPath:x}=(0,I.uC)(),v=(0,u.jE)(),{executeRecaptcha:y}=(0,d._Y)(),j=t.get("oauth_initiator"),{loggedOutChampPoints:b,resetLoggedOutChampPoints:w}=(0,I.A6)(),{logEvent:C}=(0,T._B)({event:"Profile Created",options:{includeReferrer:!1,includeSourcePage:!0,includeSourcePageType:!0}}),{mutate:_,isPending:G,error:P,reset:O}=(0,m.n)({mutationFn:e=>q.register({...e,loggedOutChampPoints:b}),onSuccess:async(e,s)=>
1{await v.invalidateQueries({queryKey:[k.es.USER]}),v.invalidateQueries({queryKey:[k.es.USER_ACCESSES]}),C({gradeId:s.grade.id,size:s.numberOfKids,schoolId:s.profileType===k.KU.CLASSROOM?s.school.id:void 0,name:s.profileType===k.KU.CLASSROOM?s.className:s.userName,profileType:s.profileType}),w(),x(k.fp.HOME)}});(0,T._B)({event:"Create Account Flow Entered",options:{enabled:null===j}});let A=J[c]===K||J[c]===Y,{logEvent:L}=(0,T._B)({event:"Create Account Profile Exited",properties:{sourceName:f.bP.REGISTRATION_BACK_BUTTON},options:{includeReferrer:!1}});l.useEffect(()=>{let e=!0,a=async()=>{if(e){let e=await y("register");_({...i,recaptchaToken:e})}};return s&&a(),()=>{e=!1}},[i,s,y,_]);let R=l.useMemo(()=>J[c],[c]);return(0,r.jsxs)(S.A,{pageTitle:"Registration",pageDescription:"Registration Page",footer:!1,header:!1,children:[(0,r.jsxs)("div",{className:"relative flex items-center justify-center w-full px-sm",children:[A?(0,r.jsx)("button",{className:"absolute left-0 px-sm",onClick:()=>{h(c-1),O(),a(!1),L()},children:(0,r.jsx)(n._n,{className:"w-7 h-[25px] text-white"})}):null,(0,r.jsx)(E.A,{})]}),(0,r.jsx)("div",{className:"w-full flex flex-col items-center",children:(0,r.jsx)(g.N,{mode:"wait",children:(0,r.jsx)(p.P.div,{className:"w-full",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},children:(0,r.jsx)(R,{onComplete:e=>{o({...i,...e}),c!==J.length-1?h(c+1):a(!0)},...i,error:P,isSubmitting:G})},c)})})]})}},87343:(e,s,a)=>{var r=a(65517),l=a(83965),t=a(97722),n=a(91544);e.exports=function(){var e=arguments.length;if(!e)return[];for(var s=Array(e-1),a=arguments[0],i=e;i--;)s[i-1]=arguments[i];return r(n(a)?t(a):[a],l(s,1))}}},e=>{var s=s=>e(e.s=s);e.O(0,[8277,8190,6020,5761,636,6593,8792],()=>s(62167)),_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.