PageSourceSearch

https://keepsoddydaisybeautiful.org/build/assets/Login-C11rEfDy.js

js keepsoddydaisybeautiful.org collected 2026-10-05 22:04:02 UTC 13,659 bytes, 1 lines download raw bytes

1import{X as j,r as d,G as h,j as e,S,A as D}from"./client-BdA7rF3J.js";function L({onSwitchToLogin:n,compact:i=!1}){const{flash:o}=j().props,[u,x]=d.useState(!1),[b]=d.useState(Math.floor(Date.now()/1e3)),t=h({first_name:"",last_name:"",email:"",interest_type:"join",website_url:"",form_time:b});d.useEffect(()=>{o!=null&&o.cleanup_interest_success&&x(!0)},[o]);const c=s=>{s.preventDefault(),t.post(route("public.forms.cleanup-interest-2027"),{preserveScroll:!0,onSuccess:()=>x(!0)})};return u?e.jsxs("div",{className:"text-center py-6",children:[e.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"You're on the List!"}),e.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"We'll let you know as soon as 2027 Cleanup Challenge registration opens. Thanks for your interest!"}),e.jsx("a",{href:"/community/events/hamilton-county-cleanup-challenge-2026",className:"text-green-600 hover:text-green-700 text-sm font-medium",children:"View 2026 results in the meantime →"})]}):e.jsxs("div",{className:i?"":"py-2",children:[!i&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"text-center mb-5",children:[e.jsx("span",{className:"inline-block px-3 py-1 bg-emerald-100 text-emerald-700 text-xs font-bold rounded-full uppercase tracking-wide mb-3",children:"Coming Spring 2027"}),e.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Get Notified for the 2027 Challenge"}),e.jsx("p",{className:"text-gray-600 text-sm",children:"The 2026 Cleanup Challenge was a huge success — 11 teams, 259 bags, 78 tires collected! Want to be part of it next year?"})]})}),e.jsxs("form",{onSubmit:c,className:"space-y-3",children:[e.jsx("input",{type:"text",name:"website_url",value:t.data.website_url,onChange:s=>t.setData("website_url",s.target.value),className:"hidden",tabIndex:-1,autoComplete:"off"}),e.jsx("input",{type:"hidden",name:"form_time",value:t.data.form_time}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("input",{type:"text",placeholder:"First name",value:t.data.first_name,onChange:s=>t.setData("first_name",s.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0}),t.errors.first_name&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:t.errors.first_name})]}),e.jsxs("div",{children:[e.jsx("input",{type:"text",placeholder:"Last name",value:t.data.last_name,onChange:s=>t.setData("last_name",s.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0}),t.errors.last_name&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:t.errors.last_name})]})]}),e.jsxs("div",{children:[e.jsx("input",{type:"email",placeholder:"Email address",value:t.data.email,onChange:s=>t.setData("email",s.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0}),t.errors.email&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:t.errors.email})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1.5",children:"I'm interested in..."}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{value:"lead",label:"Leading a Team",icon:"🏆"},{value:"join",label:"Joining a Team",icon:"🤝"},{value:"info",label:"Just Updates",icon:"📬"}].map(s=>e.jsxs("button",{type:"button",onClick:()=>t.setData("interest_type",s.value),className:`p-2.5 rounded-lg border text-center transition-all text-xs ${t.data.interest_type===s.value?"border-green-500 bg-green-50 text-green-700 ring-1 ring-green-500":"border-gray-200 text-gray-600 hover:border-green-300 hover:bg-green-50/50"}`,children:[e.jsx("span",{className:"text-base block mb-0.5",children:s.icon}),s.label]},s.value))})]}),e.jsx("button",{type:"submit",disabled:t.processing,className:"w-full bg-green-600 text-white py-2.5 px-4 roun
1ded-lg font-medium text-sm hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:t.processing?"Signing up...":"Notify Me When Registration Opens"})]}),!i&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-4 pt-3 border-t border-gray-200 text-center",children:e.jsx("a",{href:"/community/events/hamilton-county-cleanup-challenge-2026",className:"text-green-600 hover:text-green-700 text-sm font-medium",children:"View 2026 Results"})}),n&&e.jsx("div",{className:"mt-3 text-center",children:e.jsxs("p",{className:"text-sm text-gray-500",children:["Already registered?"," ",e.jsx("button",{type:"button",onClick:n,className:"text-green-600 hover:text-green-700 font-medium",children:"Sign in to your dashboard"})]})})]})]})}function N(){const{flash:n}=j().props,[i,o]=d.useState("login"),[u,x]=d.useState("email"),[b,t]=d.useState(""),[c,s]=d.useState(""),m=h({email:""}),r=h({email:"",pin:""}),v=h({email:""});h({team_name:"",leader_name:"",leader_email:"",leader_phone:"",planned_location:"",pin:"",pin_confirm:""}),d.useEffect(()=>{(n==null?void 0:n.login_step)==="pin"?(x("pin"),s(n.login_email||""),t(n.login_team_name||""),r.setData("email",n.login_email||"")):(n==null?void 0:n.login_step)==="magic_link_sent"&&x("magic_link_sent")},[n]);const k=a=>{a.preventDefault(),m.post(route("cleanup-challenge.check-email"),{preserveScroll:!0})},w=a=>{a.preventDefault(),r.post(route("cleanup-challenge.login.submit"))},_=a=>{a.preventDefault(),v.setData("email",c),D.post(route("cleanup-challenge.send-magic-link"),{email:c},{preserveScroll:!0})},f=()=>{x("email"),t(""),s(""),m.reset(),r.reset()};return e.jsxs(e.Fragment,{children:[e.jsx(S,{title:i==="login"?"Hamilton County Cleanup Challenge - Login":"Register Your Team"}),e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-green-50 to-emerald-100 flex items-center justify-center p-4",children:e.jsxs("div",{className:"max-w-md w-full",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("img",{src:"https://cdn.cbaip.org/wp-content/uploads/2024/12/11113843/1.png",alt:"Keep Soddy-Daisy Beautiful",className:"h-20 w-auto mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Hamilton County Cleanup Challenge"}),e.jsx("p",{className:"text-gray-600 mt-1",children:"Keep Soddy-Daisy Beautiful"})]}),e.jsxs("div",{className:"flex mb-6 bg-white rounded-lg shadow-sm p-1",children:[e.jsx("button",{type:"button",onClick:()=>{o("login"),f()},className:`flex-1 py-2.5 px-4 rounded-md text-sm font-medium transition-colors ${i==="login"?"bg-green-600 text-white shadow-sm":"text-gray-600 hover:text-gray-800"}`,children:"Sign In"}),e.jsx("button",{type:"button",onClick:()=>o("register"),className:`flex-1 py-2.5 px-4 rounded-md text-sm font-medium transition-colors ${i==="register"?"bg-green-600 text-white shadow-sm":"text-gray-600 hover:text-gray-800"}`,children:"2027 Interest"})]}),e.jsx("div",{className:"bg-white rounded-xl shadow-lg p-8",children:i==="login"?e.jsxs(e.Fragment,{children:[u==="email"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Team Leader Sign In"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"Enter your team leader email to access your dashboard."}),e.jsxs("form",{onSubmit:k,children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{htmlFor:"login-email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email Address"}),e.jsx("input",{type:"email",id:"login-email",value:m.data.email,onChange:a=>m.setData("email",a.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent",placeholder:"[email protected]",required:!0,autoFocus:!0}),m.errors.email&&e.jsx("p",{className:"text-red-500 text-sm mt-1",children:"No team found for this email. Registration for 2026 is closed — check back in spring 2027."})]}),e.jsx("button",{type:"submit",disabled:m.processing,className:"w-full bg-green-600 text-white py-2 px-4 rounded-lg font-medium hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:m.processing?"Checking...":"Next"})]}),e.jsx("div",{className:"mt-6 pt-5 border-t border-gray-200",children:e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 text-center",children:[e.jsx("p",{className:"text-sm font-semibold text-amber-800 mb-1",children:"Registration for 2026 is closed"}),e.jsx("p",{className:"text-xs text-amber-700",children:"The 2026 Cleanup Challenge has ended. Thank y
1ou to all the teams who participated! Check back next spring for the 2027 challenge."})]})})]}),u==="pin"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-4",children:e.jsxs("button",{type:"button",onClick:f,className:"text-sm text-green-600 hover:text-green-700 flex items-center gap-1",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]})}),e.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-1",children:"Welcome back!"}),e.jsxs("p",{className:"text-gray-600 mb-1 text-sm",children:["Signing in as ",e.jsx("span",{className:"font-medium text-gray-800",children:c})]}),b&&e.jsxs("p",{className:"text-green-700 font-medium mb-5 text-sm",children:["Team: ",b]}),e.jsxs("form",{onSubmit:w,children:[e.jsx("input",{type:"hidden",value:c}),e.jsxs("div",{className:"mb-5",children:[e.jsx("label",{htmlFor:"login-pin",className:"block text-sm font-medium text-gray-700 mb-2",children:"Enter your 4-digit PIN"}),e.jsx("div",{className:"flex justify-center gap-3",children:[0,1,2,3].map(a=>e.jsx("input",{type:"text",inputMode:"numeric",maxLength:1,id:`pin-${a}`,value:r.data.pin[a]||"",onChange:g=>{var y;const l=g.target.value.replace(/\D/g,"");if(l.length<=1){const p=r.data.pin.split("");p[a]=l;const C=p.join("").substring(0,4);r.setData("pin",C),r.setData("email",c),l&&a<3&&((y=document.getElementById(`pin-${a+1}`))==null||y.focus())}},onKeyDown:g=>{var l;g.key==="Backspace"&&!r.data.pin[a]&&a>0&&((l=document.getElementById(`pin-${a-1}`))==null||l.focus())},onPaste:g=>{var p;g.preventDefault();const l=g.clipboardData.getData("text").replace(/\D/g,"").substring(0,4);r.setData("pin",l),r.setData("email",c);const y=Math.min(l.length,3);(p=document.getElementById(`pin-${y}`))==null||p.focus()},className:"w-14 h-14 text-center text-2xl font-bold border-2 border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-green-500",autoFocus:a===0},a))}),r.errors.pin&&e.jsx("p",{className:"text-red-500 text-sm mt-2 text-center",children:r.errors.pin})]}),e.jsx("button",{type:"submit",disabled:r.processing||r.data.pin.length<4,className:"w-full bg-green-600 text-white py-2 px-4 rounded-lg font-medium hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:r.processing?"Signing in...":"Sign In"})]}),e.jsxs("div",{className:"flex items-center gap-3 my-5",children:[e.jsx("div",{className:"flex-1 border-t border-gray-200"}),e.jsx("span",{className:"text-xs text-gray-400 uppercase",children:"or"}),e.jsx("div",{className:"flex-1 border-t border-gray-200"})]}),e.jsxs("button",{type:"button",onClick:_,className:"w-full border border-gray-300 text-gray-700 py-2 px-4 rounded-lg font-medium hover:bg-gray-50 transition-colors flex items-center justify-center gap-2",children:[e.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),"Send me a login link instead"]}),e.jsx("p",{className:"text-xs text-gray-400 text-center mt-2",children:"Forgot your PIN? We'll email you a one-click login link."})]}),u==="magic_link_sent"&&e.jsxs("div",{className:"text-center py-4",children:[e.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),e.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Check Your Email"}),e.jsx("p",{className:"text-gray-600 mb-4",children:"If your email is registered, you'll receive a login link shortly. The link expires in 24 hours."}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Don't see it? Check your spam folder."}),e.jsx("button",{type:"button",onClick:f,className:"text-green-600 hover:text-green-700 text-sm font-medium",children:"Back to Sign In"})]})]}):e.jsx(L,{onSwitchToLogin:()=>{o("login"),f()}})}),e.jsx("div",{className:"text-center mt-6",children:e.jsx("a",{href:"/",className:"text-sm text-gray-500 hover:text-gray-700",children:"← Back to main site"})})]})})]})}N.layout=n=>n;const E=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));
1export{E as _};

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.