1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6696],{6696:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return Z}});var a,n,r=o(57437),l=o(2265),i=o(71907),s=o(26578),c=o(88632),u=o(50023),d=o(22215),p=o(15734),h=o.n(p),m=o(89243);function _(e){let{onResetClick:t,onSuccess:o}=e,a=(0,l.useRef)(null),[n,p]=(0,l.useState)(""),[_,f]=(0,l.useState)(""),[g,x]=(0,l.useState)(""),[b,v]=(0,l.useState)(""),[w,y]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e;return n&&(e=setTimeout(()=>j("Email"),500)),()=>clearTimeout(e)},[n]);let j=e=>{(0,m.Z)({action:"input",category:"Authorization Modal",label:"".concat(e," Changed")})},A=async e=>{if(e.preventDefault(),(0,m.Z)({action:"click",category:"Authorization Modal",label:"SignIn With Email Click",data:"".concat(n)}),!(0,c.o)(n))return v("Invalid Email");if(_.length<6||_.length>19||!/[A-Z]/.test(_)||!/[a-z]/.test(_))return x("Password should be 6 - 20 symbols and contain as minimum one uppercase and one lowercase letter");if(await a.current.executeAsync()){let e;y(!0);try{if(e=await fetch("".concat("https://production-new.gis.beakid.com/api","/auth/local"),{method:"POST",credentials:"include",body:JSON.stringify({username:n,password:_})}),200===e.status&&e.url==="".concat("https://production-new.gis.beakid.com/api","/auth/local")){(0,m.Z)({action:"event",category:"Authorization Modal",label:"Successfully Logged In With Email",data:"".concat(n)});let{userData:t}=await e.json();o(null==t?void 0:t.is_new,t)}else 403===e.status?(v("Invalid username or password"),x("Invalid username or password")):(v("Server error"),x("Server error"));y(!1)}catch(e){y(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("form",{className:h().root,method:"POST",onSubmit:A,children:[(0,r.jsx)("div",{className:h().input,children:(0,r.jsx)(u.Z,{label:"Your Email",id:"modal-auth-email",placeholder:"Your Email",error:!!b,helperText:b,onChange:e=>{p(e.target.value),v(""),x("")},defaultValue:n,value:n})}),(0,r.jsxs)("div",{className:h().input,children:[(0,r.jsx)(u.Z,{label:"Password",id:"modal-auth-password",placeholder:"Password",type:"password",error:!!g,helperText:g,onChange:e=>{f(e.target.value),x(""),v("")},defaultValue:_,value:_}),(0,r.jsx)("button",{className:h().password,type:"button",onClick:t,children:"Forgot password?"})]}),(0,r.jsx)(d.Z,{label:"Continue with Email",type:"submit",disabled:!!b||!!g||!_||!n}),(0,r.jsx)(i.Z,{ref:a,size:"invisible",sitekey:"6LeaO9AeAAAAABbkhkRyVGhIuzwqZhKenHF_TclA"})]}),w&&(0,r.jsx)("div",{className:"circle-loader-wrapper",children:(0,r.jsx)(s.Z,{className:"circle-loader",size:40})})]})}var f=o(48513),g=o.n(f);function x(){return(0,r.jsx)("div",{className:g().root,children:(0,r.jsx)("span",{className:g().text,children:"or"})})}var b=o(6465),v=o(4410);function w(){return(w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e}).apply(this,arguments)}var y=e=>v.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),a||(a=v.createElement("g",{fillRule:"evenodd",clipPath:"url(#social-google-rounded_svg__a)",clipRule:"evenodd"},v.createElement("path",{fill:"#FBBC05",d:"M5.174 12c0-.78.13-1.527.36-2.228L1.49 6.684A12 12 0 0 0 .258 12c0 1.91.443 3.713 1.23 5.312l4.043-3.094A7.1 7.1 0 0 1 5.174 12"}),v.createElement("path",{fill:"#EA4335",d:"M12.273 4.91c1.693 0 3.223.6 4.425 1.58L20.193 3c-2.13-1.855-4.861-3-7.92-3-4.749 0-8.83 2.716-10.785 6.684l4.044 3.088a7.08 7.08 0 0 1 6.741-4.863"}),v.createElement("path",{fill:"#34A853",d:"M12.273 19.09a7.08 7.08 0 0 1-6.74-4.863l-4.045 3.088A11.98 11.98 0 0 0 12.273 24c2.931 0 5.73-1.041 7.83-2.991l-3.84-2.968c-1.082.683-2.446 1.05-3.99 1.05"}),v.createElement("path",{fill:"#4285F4",d:"M23.744 12c0-.709-.11-1.473-.273-2.182H12.273v4.637h6.446c-.322 1.58-1.2 2.796-2.455 3.586l3.84 2.968c2.205-2.047 3.64-5.097 3.64-9.009"}))),n||(n=v.createElement("defs",null,v.createElement("clipPath",{id:"social-google-rounded_svg__a"},v.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"}))))),j=o(99724),A=o.n(j);function Z(e){let{onResetClick:t,onSuccess:o,oauthDestination:a}=e;(0,l.useEffect)(()=>((0,m.Z)({action:"modal_open",category:"Authorization Modal",label:"Authorization Modal Opened"}),()=>{(0,m.Z)({action:"modal_close",category:"Authorization Modal",label:"Authorization Modal Closed"})}),[]);let n=async()=>{(0,m.Z)({action:"click",category:"Authorization Modal",label:"SignIn With Google Click"});let e=window.location.href.replace(/^(https?:\/\/[^/]+)\/old\//,"$1/");window.open("".concat("https://production-new.gis.beakid.com/api","/auth/google?successCallbackUrl=").concat(encodeURIComponent(a||e)),"_self")};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Z,{title:"Welcome to BeAKid",text:"Welcome to BeAKid where we give you the most complete view of activities for your children"}),(0,r.jsx)(_,{onResetClick:t,onSuccess:o}),(0,r.jsx)(x,{}),[{label:"Continue with Google",onClick:n,icon:y}].map((e,t)=>(0,r.jsx)("div",{className:A().button,children:(0,r.jsx)(d.Z,{label:e.label,onClick:e.onClick,style:"secondary",Icon:e.icon})},t))]})}},22215:function(e,t,o){"use strict";o.d(t,{Z:function(){return l}});var a=o(57437);o(2265);var n=o(87826),r=o.n(n);function l(e){let{label:t,onClick:o,Icon:n,style:l,type:i,disabled:s,inlineStyles:c}=e,u=r().root;return("secondary"===l&&(u+=" ".concat(r().root_secondary)),s&&(u+=" ".concat(r().root_disabled)),"submit"===i)?(0,a.jsxs)("button",{className:u,type:i,disabled:s,style:c,children:[n&&(0,a.jsx)(n,{className:r().icon}),t]}):(0,a.jsxs)("div",{className:u,onClick:s?()=>null:o,style:c,children:[n&&(0,a.jsx)(n,{className:r().icon}),t]})}},6465:function(e,t,o){"use strict";o.d(t,{Z:function(){return l}});var a=o(57437);o(2265);var n=o(48637),r=o.n(n);function l(e){let{title:t,text:o,success:n}=e,l=r().text;return n&&(l+=" ".concat(r().text_success)),(0,a.jsxs)("div",{className:r().root,children:[(0,a.jsx)("b",{className:r().title,children:t}),(0,a.jsx)("p",{className:l,children:o})]})}},50023:function(e,t,o){"use strict";o.d(t,{Z:function(){return p}});var a=o(57437);o(2265);var n=o(21513),r=o(41809),l=o(42711),i=o(37661),s=o(67445),c=o.n(s);let u=(0,n.Z)(()=>({root:{fontFamily:"var(--font-lato)",fontSize:14,fontWeight:700,lineHeight:"20px",color:"#282828",transform:"none",top:"-7px","&.Mu
1i-focused":{color:"#282828"},"&.Mui-error":{color:"#fe6031"}}}))(l.Z),d=(0,n.Z)(e=>({root:{"label + &":{marginTop:"21px"},"&.Mui-error .MuiInputBase-input":{borderColor:"#fe6031"}},input:{position:"relative",display:"flex",alignItems:"center",minHeight:"48px",boxSizing:"border-box",padding:"9px 16px",width:"100%",fontSize:16,fontWeight:400,lineHeight:"30px",fontFamily:"var(--font-lato)",borderRadius:12,border:"1px solid #D2D2D7",transition:e.transitions.create(["border-color","box-shadow"]),"&:focus":{borderColor:"#9B6EFF"},"&::placeholder":{color:"#D2D2D7",opacity:1}}}))(r.Z);function p(e){let{id:t,label:o,placeholder:n,type:r,error:l,onChange:s,defaultValue:p,helperText:h="",value:m,name:_,disabled:f}=e,g=c().helper;return l&&(g+=" ".concat(c().helper_danger)),(0,a.jsxs)(i.Z,{className:c().root,error:l,children:[o&&(0,a.jsx)(u,{shrink:!0,htmlFor:t,children:o}),(0,a.jsx)(d,{name:_,defaultValue:p,id:t,placeholder:n,type:r,onChange:s,value:m,disabled:f}),h&&(0,a.jsx)("span",{className:g,children:h})]})}},88632:function(e,t,o){"use strict";o.d(t,{o:function(){return a}});let a=e=>String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},99724:function(e){e.exports={button:"AuthScreen_button__ajBmz"}},87826:function(e){e.exports={root:"Button_root__vcaam",root_disabled:"Button_root_disabled__r5Ju8",root_secondary:"Button_root_secondary__QP8BI",icon:"Button_icon__0SV8y"}},48637:function(e){e.exports={root:"Heading_root__NMBve",title:"Heading_title__EKqaP",text:"Heading_text__lhbDZ",text_success:"Heading_text_success__TJby6"}},67445:function(e){e.exports={root:"Input_root__U1aKf",helper:"Input_helper__MG7sw",helper_danger:"Input_helper_danger__Xd_45"}},15734:function(e){e.exports={root:"SignupForm_root__gj83Z",input:"SignupForm_input__hfkuE",password:"SignupForm_password__W6bAZ"}},48513:function(e){e.exports={root:"Separator_root__FCxPN",text:"Separator_text__log2o"}}}]);
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.