PageSourceSearch

https://personalwalkies.com/assets/chunk-Dj7BHk8R.js

js personalwalkies.com collected 2026-10-02 00:18:23 UTC 4,619 bytes, 2 lines download raw bytes

1import{l as D,u as O,x as j,r as n,R as e,I as H,B as M,L as $,ab as _}from"./index-Dd0nhlQ2.js";import{bm as C,a$ as z,bI as U,a_ as J,b9 as K,bG as Q}from"./firebase-core-CGPY8Ago.js";import{auth as y}from"./firebase-Vb08dxKi.js";/* empty css              */import{B as V,a as X}from"./chunk-BCxoRtJd.js";import{T as S,F as Y}from"./chunk-DrB-hHBu.js";import{A as Z}from"./chunk-DhTH9lf7.js";import{A as P}from"./chunk-2cqbixmo.js";import"./firebaseApp-ChlqBJwq.js";import"./firebase-app-DcuUl0wI.js";function A(o){switch(o){case"auth/invalid-email":return{email:"Please enter a valid email address."};case"auth/email-already-in-use":return{email:"An account with this email already exists."};case"auth/weak-password":return{password:"Password must be at least 6 characters."};case"auth/too-many-requests":return{form:"Too many attempts. Please try again later."};default:return{form:"Something went wrong. Please try again."}}}function ue(){const o=D(),{user:u,loading:m}=O(),[I]=j(),g=I.get("redirect"),f=g&&g.startsWith("/")?g:null,l=f||"/home",x=f?`/signin?redirect=${encodeURIComponent(f)}`:"/signin",[w,k]=n.useState(""),[E,F]=n.useState(""),[d,R]=n.useState(""),[r,s]=n.useState({}),[p,N]=n.useState(!1),[i,v]=n.useState(null),h=n.useRef(null),b=n.useRef(!1);m||(b.current=!0,h.current===null&&(h.current=!!u));const B=t=>{k(t),(r.name||r.form)&&s(a=>({...a,name:"",form:""}))},G=t=>{F(t),(r.email||r.form)&&s(a=>({...a,email:"",form:""}))},L=t=>{R(t),(r.password||r.form)&&s(a=>({...a,password:"",form:""}))};if(n.useEffect(()=>{window.scrollTo(0,0)},[]),n.useEffect(()=>{if(!m){if(i){o(i,{replace:!0});return}u&&h.current&&o(l,{replace:!0})}},[m,i,u,o,l]),m&&!b.current||u&&h.current)return null;const T=async t=>{t.preventDefault();const a={};if(w.trim()||(a.name="Please enter your name."),E||(a.email="Please enter your email."),d?d.length<6&&(a.password="Password must be at least 6 characters."):a.password="Please enter a password.",Object.keys(a).length>0){s(a);return}N(!0),s({});try{const c=await K(y,E,d);await Q(c.user,{displayName:w.trim()}),P.signedUp("email"),v(l)}catch(c){s(A(c.code)),N(!1)}},W=async()=>{var t;s({});try{const a=await C(y,new z);(t=U(a))!=null&&t.isNewUser&&P.signedUp("google"),v(l)}catch(a){a.code!=="auth/popup-closed-by-user"&&s(A(a.code))}},q=async()=>{var t;s({});try{const a=new J("apple.com");a.addScope("email"),a.addScope("name");const c=await C(y,a);(t=U(c))!=null&&t.isNewUser&&P.signedUp("apple"),v(l)}catch(a){a.code!=="auth/popup-closed-by-user"&&s(A(a.code))}};return e.createElement("div",{className:"auth-page auth-page-split"},e.createElement(H,{title:"Sign up — Walkies",description:"Create a Walkies account.",path:"/signup",noindex:!0}),e.createElement("div",{className:"auth-content"},e.createElement("div",{className:"auth-card"},e.createElement("h2",{className:"journal-page-title auth-title"},"Pet parent sign up"),e.createElement("p",{className:"auth-subtitle"},"Follow your pet’s walks, updates and invoices."),e.createElement("div",{className:"auth-social-buttons"},e.createElement(V,{action:W,title:"Sign up with Google"}),e.createElement(X,{action:q,title:"Sign up with Apple"})),e.createElement("div",{className:"auth-divider"},e.createElement("div",{className:"auth-divider-line"}),e.createElement("span",{className:"auth-divider-text"},"or"),e.createElement("div",{className:"auth-divider-line"})),e.createElement("form",{className:"auth-form",onSubmit:T,autoComplete:"on"},e.createElement(S,{type:"text",name:"name",placeholder:"Full name",value:w,onChange:t=>B(t.target.value),autoComplete:"name",required:!0,error:r.name,id:"signup-name",disabled:p||!!i}),e.createElement(S,{type:"email",name:"email",placeholder:"Email",value:E,onChange:t=>G(t.target.value),autoComplete:"email",required:!0,error:r.email,id:"signup-email",disabled:p||!!i}),e.createElement(S,{type:"password",name:"new-password",placeholder:"Password",value:d,onChange:t=>L(t.target.value),autoComplete:"new-password",required:!0,minLength:6,error:r.password,id:"signup-password",disabled:p||!!i}),e.createElement(Y,{id:"signup-form",message:r.form}),e.createElement(M,{title:p?e.createElement(e.Fragment,null,e.createElement("span",{className:"button-spinner"})," Creating account"):"Sign up"})),e.createElement("div",{className:"auth-footer"},e.createElement("p",null,"Already have an account? ",e.createElement($,{to:x},"Sign in"))),e.createElement("p",{className:"auth-cross-link"},"Are you a pet sitter? ",e.createElement("a",{href:_()}
1,"Sign up here")))),e.createElement(Z,{variant:"parent"}))}export{ue as default};
2//# sourceMappingURL=chunk-Dj7BHk8R.js.map

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.