1import{c as Ce,q as Ee,H as De,v as Fe,r as a,j as e,z as Le,E as Be,B as A,s as y,t as r,Z as Ge,$ as Oe}from"./index-CqGqwWKp.js";import{I as o}from"./input-C-dhHZfz.js";import{L as x}from"./label-BKVSJH31.js";import{S as te,a as se,b as ae,c as re,d as ce}from"./select-4H_lyalD.js";import{P as Se}from"./phone-GaEkZOZ2.js";import{C as ke}from"./chevron-down-D5hvyLKM.js";import{E as ie}from"./eye-off-CtJ4omIA.js";import{E as le}from"./eye-B8aPKStA.js";import{L as W}from"./loader-circle-CCfGGRPf.js";import{L as Pe}from"./log-in-DiOYefbL.js";import"./useComposition-CjDhl5L8.js";import"./usePersistFn-DaDCSoQ3.js";import"./index-Bx-ZvfA0.js";import"./index-Day0wMJL.js";import"./check-Crx4ZKfw.js";import"./chevron-up-BZF2vgGI.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Me=Ce("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 7 * @license lucide-react v0.453.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const $e=Ce("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]),Ve="https://d2xsxph8kpxj0f.cloudfront.net/310519663548498135/8FWXHBGLaXzwMXfkkMnXxw/hant-logo-new_6f9c4c11.png",je="hant_pending_profile";function ut(n){localStorage.setItem(je,JSON.stringify(n))}function ft(){try{const n=localStorage.getItem(je);return n?JSON.parse(n):null}catch{return null}}function bt(){localStorage.removeItem(je)}function ue(n,c){localStorage.setItem("hant_session_token",n),localStorage.setItem("hant_session_expires",String(c)),localStorage.removeItem("hant_logged_out"),Ge(),localStorage.removeItem("manus-runtime-user-info"),window.__hant_token_valid=!0,Oe()}function We(){try{const n=new URLSearchParams(window.location.search).get("returnTo");return n&&n.startsWith("/")&&!n.startsWith("//")?n:"/"}catch{return"/"}}const Te=["ìì¸í¹ë³ì","ë¶ì°ê´ìì","ë구ê´ìì","ì¸ì²ê´ìì","ê´ì£¼ê´ìì","ëì ê´ìì","ì¸ì°ê´ìì","ì¸ì¢ í¹ë³ìì¹ì","경기ë","ê°ìí¹ë³ìì¹ë","ì¶©ì²ë¶ë","ì¶©ì²ë¨ë","ì ë¶í¹ë³ìì¹ë","ì ë¼ë¨ë","ê²½ìë¶ë","ê²½ìë¨ë","ì 주í¹ë³ìì¹ë"];function wt(){const{isAuthenticated:n,loading:c}=Ee(),[,u]=De(),h=typeof window<"u"&&(window.location.hostname==="hantp.com"||window.location.hostname==="www.hantp.com"||window.location.hostname.endsWith(".hantp.com")),E=Fe();(()=>{try{return localStorage.getItem("hant_logged_out")==="1"}catch{return!1}})();const[b,_]=a.useState(!1);return a.useEffect(()=>{!h&&!c&&n&&u("/")},[n,c,u]),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:90",className:"min-h-screen bg-[#1a4a2e] flex flex-col items-center justify-center px-4 py-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:91",className:"flex flex-col items-center mb-6",children:[e.jsx("img",{"data-loc":"client/src/pages/Register.tsx:92",src:Ve,alt:"HANT",className:"h-20 object-contain mb-3"}),e.jsx("h1",{"data-loc":"client/src/pages/Register.tsx:93",className:"text-white text-2xl font-bold tracking-tight",children:"HANT íêµí¸ë ì¼"}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:94",className:"text-white/60 text-sm mt-1",children:"ì¬ë¨ë²ì¸ íêµ ì¬ë길 (KHA)"})]}),!b&&e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:99",type:"button",onClick:()=>_(!0),className:"w-full max-w-sm mb-3 flex items-center gap-3 px-4 py-3 rounded-xl bg-amber-500/20 border border-amber-400/40 hover:bg-amber-500/30 transition-colors text-left",children:[e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:104",className:"text-2xl",children:"ð"}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:105",className:"flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:106",className:"text-amber-200 text-sm font-semibold",children:"ì²ì ì¤ì ¨ëì?"}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:107",className:"text-amber-300/70 text-xs mt-0.5",children:"ë¬´ë£ íìê°ì í HANT ë°ë¼ê±·ê¸°ë¥¼ ììíì¸ì"})]}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:109",className:"text-amber-300/60 text-sm font-bold",children:"â"})]}),e.jsx(Le,{"data-loc":"client/src/pages/Register.tsx:112",className:"w-full max-w-sm bg-white/10 border-white/20 backdrop-blur-sm",children:e.jsx(Be,{"data-loc":"client/src/pages/Register.tsx:113",className:"p-6",children:b?e.jsx(e.Fragment,{children:e.jsx(Ue,{"data-loc":"client/src/pages/Register.tsx:116",navigate:u,onSwitchToLogin:()=>_(!1)})}):e.jsxs(e.Fragment,{children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:120",className:"text-white font-semibold text-base mb-4 text-center",children:"ë¡ê·¸ì¸"}),e.jsx(qe,{"data-loc":"client/src/pages/Register.tsx:121",navigate:u,onSwitchToRegister:()=>_(!0)})]})})}),!h&&E&&!b&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:128",className:"w-full max-w-sm mt-4 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:129",className:"text-white/65 text-xs leading-relaxed mb-3",children:"ìë² ì°ê²°ì´ 복구ëë©´ ë¡ê·¸ì¸Â·ë¹ë°ë²í¸ ì°¾ê¸°Â·ê¸°ë¡ ì ì¡ì ì´ì©í ì ììµëë¤. ë¡ê·¸ìì ìíì ì
11ì 걷기ë ì´ ê¸°ê¸°ìë§ ë³´ê´ë©ëë¤."}),e.jsx(A,{"data-loc":"client/src/pages/Register.tsx:132",type:"button",variant:"outline",onClick:()=>u("/track?offline=1"),className:"w-full border-amber-300/60 bg-amber-300/10 text-amber-100 hover:bg-amber-300/20",children:"ìë² ì°ê²° ìì´ ìì 걷기 기ë¡í기"})]}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:143",className:"text-white/40 text-xs mt-6 text-center",children:"HANT íêµí¸ë ì¼"})]})}const d="bg-white/10 border-white/20 text-white placeholder:text-white/40",p="text-white/80 text-sm";function Ye({navigate:n}){const[c,u]=a.useState(""),[h,E]=a.useState(""),[b,_]=a.useState(!1),[C,w]=a.useState("login"),[f,H]=a.useState("phone"),[R,D]=a.useState(""),[k,F]=a.useState(""),[v,L]=a.useState(""),[$,B]=a.useState(""),[P,q]=a.useState(!1),[m,G]=a.useState(""),g=y.auth.loginPhone.useMutation({onSuccess:i=>{ue(i.token,i.expires),r.success("ë¡ê·¸ì¸ ì±ê³µ!"),typeof window<"u"&&(window.location.hostname.includes("hantp.com")||window.location.hostname.includes("manus.space"))?setTimeout(()=>{window.location.href="/"},800):n("/")},onError:i=>r.error(i.message||"ë¡ê·¸ì¸ ì¤í¨")}),M=y.auth.sendPasswordResetByPhone.useMutation({onSuccess:()=>{w("forgot_code"),r.success("ì¸ì¦ë²í¸ë¥¼ ë°ì¡íìµëë¤")},onError:i=>r.error(i.message||"ì¸ì¦ë²í¸ ë°ì¡ ì¤í¨")}),N=y.auth.sendPasswordResetByEmail.useMutation({onSuccess:i=>{G(i.maskedPhone||""),w("forgot_code"),r.success(`ë±ë¡ë ì íë²í¸(${i.maskedPhone})ë¡ ì¸ì¦ë²í¸ë¥¼ ë°ì¡íìµëë¤`)},onError:i=>r.error(i.message||"ì¸ì¦ë²í¸ ë°ì¡ ì¤í¨")}),I=y.auth.resetPasswordWithSms.useMutation({onSuccess:()=>{r.success("ë¹ë°ë²í¸ê° ë³ê²½ëììµëë¤"),w("login"),D(""),F(""),L(""),B("")},onError:i=>r.error(i.message||"ë¹ë°ë²í¸ ë³ê²½ ì¤í¨")});return C!=="login"?e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:187",className:"space-y-3",children:[e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:188",type:"button",onClick:()=>w("login"),className:"text-white/60 hover:text-white text-sm flex items-center gap-1 mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:189",children:"â"})," ë¡ê·¸ì¸ì¼ë¡ ëìê°ê¸°"]}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:191",className:"text-white font-semibold text-base",children:"ë¹ë°ë²í¸ 찾기"}),C==="forgot_select"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:193",className:"space-y-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:194",className:"text-white/70 text-sm",children:"ë³¸ì¸ íì¸ ë°©ë²ì ì íí´ì£¼ì¸ì"}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:195",type:"button",onClick:()=>{H("phone"),w("forgot_input")},className:"w-full h-12 rounded-lg border border-white/30 text-white text-sm font-medium hover:bg-white/10 transition-colors",children:"ì íë²í¸ë¡ 찾기"}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:199",type:"button",onClick:()=>{H("email"),w("forgot_input")},className:"w-full h-12 rounded-lg border border-white/30 text-white text-sm font-medium hover:bg-white/10 transition-colors",children:"ì´ë©ì¼ë¡ 찾기"})]}),C==="forgot_input"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:206",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:207",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:208",className:p,children:f==="email"?"ê°ì
ì ì¬ì©í ì´ë©ì¼":"ê°ì
ì ë±ë¡í ì íë²í¸"}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:209",type:f==="email"?"email":"tel",inputMode:f==="email"?"email":"tel",placeholder:f==="email"?"[email protected]":"01012345678",value:R,onChange:i=>D(i.target.value),autoComplete:"off","data-form-type":"other",className:d})]}),e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:214",type:"button",onClick:()=>{if(!R.trim()){r.error(f==="email"?"ì´ë©ì¼ì ì
ë ¥í´ì£¼ì¸ì":"ì íë²í¸ë¥¼ ì
ë ¥í´ì£¼ì¸ì");return}f==="email"?N.mutate({email:R.trim()}
11):M.mutate({phoneNumber:R.trim()})},className:"w-full h-12 bg-white text-[#1a4a2e] hover:bg-white/90 font-bold text-base",disabled:N.isPending||M.isPending,children:[N.isPending||M.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:220",size:16,className:"animate-spin mr-2"}):null,"ì¸ì¦ë²í¸ ë°ê¸°"]})]}),C==="forgot_code"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:226",className:"space-y-3",children:[m&&e.jsxs("p",{"data-loc":"client/src/pages/Register.tsx:227",className:"text-white/70 text-sm",children:[m,"ì¼ë¡ ì¸ì¦ë²í¸ë¥¼ ë°ì¡íìµëë¤"]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:228",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:229",className:p,children:"ì¸ì¦ë²í¸ (6ì리)"}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:230",type:"text",inputMode:"numeric",placeholder:"123456",maxLength:6,value:k,onChange:i=>F(i.target.value.replace(/[^0-9]/g,"").slice(0,6)),autoComplete:"one-time-code","data-form-type":"other",className:`${d} text-center text-lg tracking-widest`})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:235",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:236",className:p,children:"ì ë¹ë°ë²í¸ (8ì ì´ì)"}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:237",className:"relative",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:238",type:P?"text":"password",placeholder:"ì ë¹ë°ë²í¸",value:v,onChange:i=>L(i.target.value),autoComplete:"new-password","data-form-type":"other",className:`${d} pr-10`}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:241",type:"button",onClick:()=>q(!P),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/50",children:P?e.jsx(ie,{"data-loc":"client/src/pages/Register.tsx:243",size:16}):e.jsx(le,{"data-loc":"client/src/pages/Register.tsx:243",size:16})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:247",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:248",className:p,children:"ì ë¹ë°ë²í¸ íì¸"}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:249",type:"password",placeholder:"ë¹ë°ë²í¸ ì¬ì
ë ¥",value:$,onChange:i=>B(i.target.value),autoComplete:"new-password","data-form-type":"other",className:d})]}),e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:253",type:"button",onClick:()=>{if(k.length!==6){r.error("ì¸ì¦ë²í¸ 6ì리를 ì
ë ¥í´ì£¼ì¸ì");return}if(v.length<8){r.error("ë¹ë°ë²í¸ë 8ì ì´ìì´ì´ì¼ í©ëë¤");return}if(v!==$){r.error("ë¹ë°ë²í¸ê° ì¼ì¹íì§ ììµëë¤");return}I.mutate({identifier:R.trim(),identifierType:f,code:k,newPassword:v})},className:"w-full h-12 bg-white text-[#1a4a2e] hover:bg-white/90 font-bold text-base",disabled:I.isPending,children:[I.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:260",size:16,className:"animate-spin mr-2"}):null,"ë¹ë°ë²í¸ ë³ê²½"]})]})]}):e.jsx("form",{"data-loc":"client/src/pages/Register.tsx:270",autoComplete:"off",onSubmit:i=>{if(i.preventDefault(),!c.trim()){r.error("ì íë²í¸ë¥¼ ì
ë ¥í´ì£¼ì¸ì");return}if(!h){r.error("ë¹ë°ë²í¸ë¥¼ ì
ë ¥í´ì£¼ì¸ì");return}g.mutate({phoneNumber:c,password:h})},noValidate:!0,children:e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:271",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:272",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:273",className:p,children:"ì íë²í¸"}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:274",type:"tel",inputMode:"tel",placeholder:"010-1234-5678",value:c,onChange:i=>u(ve(i.target.value)),autoComplete:"off","data-form-type":"other",className:d})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:278",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:279",className:p,children:"ë¹ë°ë²í¸"}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:280",className:"relative",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:281",type:b?"text":"password",placeholder:"ë¹ë°ë²í¸",value:h,onChange:i=>E(i.target.value),autoComplete:"current-password","data-form-type":"other",className:`${d} pr-10`}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:285",type:"button",onClick:()=>_(!b),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/50",children:b?e.jsx(ie,{"data-loc":"client/src/pages/Register.tsx:287",size:16}):e.jsx(le,{"data-loc":"client/src/pages/Register.tsx:287",size:16})})]})]}),e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:291",type:"submit",className:"w-full h-12 bg-white text-[#1a4a2e] hover:bg-white/90 font-bold text-base mt-1",disabled:g.isPending,children:[g.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:293",size:16,className:"animate-spin mr-2"}):e.jsx(Pe,{"data-loc":"client/src/pages/Register.tsx:293",size:16,className:"mr-2"}),"ë¡ê·¸ì¸"]}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:296",type:"button",onClick:()=>w("forgot_select"),className:"w-full text-white/50 text-xs text-center py-1 hover:text-white/80 transition-colors",children:"ë¹ë°ë²í¸ë¥¼ ìì¼ì
¨ëì?"})]})})}function Ue({navigate:n,onSwitchToLogin:c}
11){const[u,h]=a.useState("sms");return e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:310",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:311",className:"flex gap-2",children:[e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:312",type:"button",onClick:()=>h("sms"),className:`flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg text-sm font-medium border transition-colors ${u==="sms"?"bg-white text-[#1a4a2e] border-white":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:[e.jsx(Se,{"data-loc":"client/src/pages/Register.tsx:319",size:14}),"ì íë²í¸"]}),e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:322",type:"button",onClick:()=>h("email"),className:`flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg text-sm font-medium border transition-colors ${u==="email"?"bg-white text-[#1a4a2e] border-white":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:[e.jsx(Me,{"data-loc":"client/src/pages/Register.tsx:329",size:14}),"ì´ë©ì¼"]})]}),u==="sms"?e.jsx(Je,{"data-loc":"client/src/pages/Register.tsx:335",navigate:n}):e.jsx(Ze,{"data-loc":"client/src/pages/Register.tsx:337",navigate:n}),e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:340",type:"button",onClick:c,className:"w-full text-center text-white/50 text-sm hover:text-white/70 transition-colors pt-1",children:["ì´ë¯¸ ê³ì ì´ ìì¼ì ê°ì? ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:345",className:"underline",children:"ë¡ê·¸ì¸"})]})]})}function qe({navigate:n,onSwitchToRegister:c}){const[u,h]=a.useState("phone");return e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:355",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:356",className:"flex gap-2",children:[e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:357",type:"button",onClick:()=>h("phone"),className:`flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg text-sm font-medium border transition-colors ${u==="phone"?"bg-white text-[#1a4a2e] border-white":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:[e.jsx(Se,{"data-loc":"client/src/pages/Register.tsx:361",size:14}),"ì íë²í¸"]}),e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:364",type:"button",onClick:()=>h("email"),className:`flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg text-sm font-medium border transition-colors ${u==="email"?"bg-white text-[#1a4a2e] border-white":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:[e.jsx(Me,{"data-loc":"client/src/pages/Register.tsx:368",size:14}),"ì´ë©ì¼"]})]}),u==="phone"?e.jsx(Ye,{"data-loc":"client/src/pages/Register.tsx:373",navigate:n}):e.jsx(Qe,{"data-loc":"client/src/pages/Register.tsx:375",navigate:n}),e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:377",type:"button",onClick:c,className:"w-full text-center text-white/50 text-sm hover:text-white/70 transition-colors pt-1",children:["ê³ì ì´ ìì¼ì ê°ì? ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:379",className:"underline",children:"íìê°ì
"})]})]})}function ve(n){const c=n.replace(/[^0-9]/g,"");return c.length<=3?c:c.length<=7?`${c.slice(0,3)}-${c.slice(3)}`:`${c.slice(0,3)}-${c.slice(3,7)}-${c.slice(7,11)}`}function Xe(n){const c=Math.floor(n/60),u=n%60;return`${c}:${u.toString().padStart(2,"0")}`}function Je({navigate:n}){const[c,u]=a.useState(""),[h,E]=a.useState(""),[b,_]=a.useState(""),[C,w]=a.useState(""),[f,H]=a.useState(""),[R,D]=a.useState(""),[k,F]=a.useState(""),[v,L]=a.useState(""),[$,B]=a.useState(""),[P,q]=a.useState("general"),[m,G]=a.useState("personal"),[g,M]=a.useState(""),[N,I]=a.useState(""),[i,K]=a.useState(""),[l,ne]=a.useState(""),[T,fe]=a.useState("association"),[Y,xe]=a.useState(""),[O,X]=a.useState(!1),[U,pe]=a.useState(!1),[he,oe]=a.useState(!1),[z,be]=a.useState(""),[Z,we]=a.useState(""),[de,Q]=a.useState(!1),[V,Re]=a.useState(""),[ge,ee]=a.useState("info"),[J,s]=a.useState(0),j=a.useRef(null),Ae=y.profile.upsert.useMutation(),_e=y.hant.checkAndIssue.useMutation(),He=y.useUtils(),me=y.sms.sendCode.useMutation({onSuccess:t=>{t.success?(ee("code"),s(180),r.success("ì¸ì¦ë²í¸ê° ë°ì¡ëììµëë¤ (3ë¶ ì í¨)")):r.error("ë°ì¡ ì¤í¨")},onError:t=>{const S=t.message||"";
11S.includes("IP")?r.error("SMS ìë¹ì¤ ì¤ë¥ì
ëë¤. ì´ë©ì¼ë¡ ê°ì
í´ ì£¼ì¸ì."):r.error(S||"ì¸ì¦ë²í¸ ë°ì¡ ì¤í¨")}}),Ne=y.auth.loginSms.useMutation({onSuccess:async t=>{ue(t.token,t.expires);try{if(await Ae.mutateAsync({fullName:c.trim(),phoneNumber:h,gender:b||void 0,birthDate:C||void 0,regionCity:v||void 0,regionDistrict:$||void 0,affiliationType:m,hgGeneration:m==="hg"&&g?parseInt(g):void 0,orgName:m==="group"?N.trim():void 0,groupSize:i?parseInt(i):void 0,companionCount:m==="personal"&&l?parseInt(l):void 0,leaderType:m==="leader"?T:void 0,hantNumber:Y.trim()||void 0}),U)try{const S=await _e.mutateAsync({name:c.trim(),phone:h,paidDeposit:!1,affiliationType:m,hgGeneration:m==="hg"&&g?parseInt(g):void 0,groupSize:i?parseInt(i):void 0,companionCount:m==="personal"&&l?parseInt(l):void 0,leaderType:m==="leader"?T:void 0});S.issued&&S.hantNumber&&r.success(`ì¶íí©ëë¤! ì°ë¦¬ êµí 를 ê±·ë íìëì HANT ë±ë¡ë²í¸ ${S.hantNumber}ê° ë°ê¸ëììµëë¤ ð`)}catch{}}catch{}r.success("ê°ì
ìë£! íìí©ëë¤."),n("/")},onError:t=>r.error(t.message||"ì¸ì¦ ì¤í¨")});a.useEffect(()=>(J>0&&(j.current=setInterval(()=>{s(t=>t<=1?(clearInterval(j.current),0):t-1)},1e3)),()=>{j.current&&clearInterval(j.current)}),[J]);const Ie=async()=>{if(!c.trim()){r.error("ì´ë¦ì 먼ì ì
ë ¥í´ ì£¼ì¸ì");return}if(!h.trim()){r.error("ì íë²í¸ë¥¼ 먼ì ì
ë ¥í´ ì£¼ì¸ì");return}try{const t=await He.client.hantReg.lookupByNamePhone.query({name:c.trim(),phoneNumber:h});t.found&&t.hantNumber?(xe(t.hantNumber),X(!0),pe(!0),r.success("ì¶íí©ëë¤! ì°ë¦¬ êµí 를 ê±·ë íìëì HANT ë±ë¡ë²í¸ê° ë°ê¸ëììµëë¤ ð")):(X(!0),pe(!1),r.info("HANT ì주 ì¸ì¦ì ìí´ ë±ë¡í ë¶ê»ë§ ë°ê¸ë©ëë¤. HANT ë±ë¡ë²í¸ ìì´ë íìê°ì
ë©ëë¤."))}catch{r.error("ì¡°í ì¤ ì¤ë¥ê° ë°ìíìµëë¤.")}},ye=()=>{if(!c.trim()){r.error("ì´ë¦ì ì
ë ¥í´ ì£¼ì¸ì");return}if(!b){r.error("ì±ë³ì ì íí´ ì£¼ì¸ì");return}if(!C){r.error("ìë
ìì¼ì ì
ë ¥í´ ì£¼ì¸ì");return}if(!v){r.error("ê±°ì£¼ì§ ì/ë를 ì íí´ ì£¼ì¸ì");return}if(!$.trim()){r.error("ê±°ì£¼ì§ ì/êµ°/구를 ì
ë ¥í´ ì£¼ì¸ì");return}if(m==="hg"&&!g){r.error("êµí ì¢
ì£¼ë¨ ê¸°ì를 ì
ë ¥í´ ì£¼ì¸ì");return}if(m==="group"&&!N.trim()){r.error("ë¨ì²´ëª
ì ì
ë ¥í´ ì£¼ì¸ì");return}if(m==="leader"&&!T){r.error("ì¸ìì ì íì ì íí´ ì£¼ì¸ì");return}if(!h.trim()){r.error("ì íë²í¸ë¥¼ ì
ë ¥í´ ì£¼ì¸ì");return}me.mutate({phoneNumber:h})},ze=()=>{if(V.length!==6){r.error("6ì리 ì¸ì¦ë²í¸ë¥¼ ì
ë ¥í´ ì£¼ì¸ì");return}if(z.length<8){r.error("ë¹ë°ë²í¸ë 8ì ì´ìì´ì´ì¼ í©ëë¤");return}if(z!==Z){r.error("ë¹ë°ë²í¸ê° ì¼ì¹íì§ ììµëë¤");return}Ne.mutate({phoneNumber:h,code:V,name:c.trim()||void 0,password:z||void 0})};return e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:548",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:550",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:551",className:p,children:["ì´ë¦ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:551",className:"text-red-400",children:"*"})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:552",placeholder:"í길ë",value:c,onChange:t=>u(t.target.value),autoComplete:"off","data-form-type":"other",className:d})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:557",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:558",className:p,children:["ì íë²í¸ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:558",className:"text-red-400",children:"*"})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:559",type:"tel",inputMode:"tel",placeholder:"010-1234-5678",value:h,onChange:t=>{E(ve(t.target.value)),ee("info"),Re(""),X(!1)},disabled:ge==="code",autoComplete:"off","data-form-type":"other",className:`${d} flex-1 w-full`})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:565",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:566",className:p,children:["HANT ë±ë¡ë²í¸",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:568",className:"text-white/40 text-xs ml-1",children:"(ìì¼ë©´ ê°ì
í ì ì²)"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:570",className:"flex gap-2",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:571",placeholder:"ì´ë¦+ì íë²
11í¸ ì
ë ¥ í ë°ê¸ ë²í¼ í´ë¦",value:Y,onChange:t=>{xe(t.target.value.trim()),X(!1)},autoComplete:"off","data-form-type":"other",className:`${d} flex-1`,readOnly:O&&!!Y}),e.jsx(A,{"data-loc":"client/src/pages/Register.tsx:575",type:"button",onClick:Ie,className:"bg-[#52b788] text-white hover:bg-[#40916c] shrink-0 text-xs px-3 font-semibold",children:"ë°ê¸"})]}),O&&U&&e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:581",className:"text-green-300 text-xs mt-1",children:"ð ì¶íí©ëë¤! ì°ë¦¬ êµí 를 ê±·ë íìëì HANT ë±ë¡ë²í¸ê° ë°ê¸ëììµëë¤."}),O&&!U&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:584",className:"mt-1 space-y-1",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:585",className:"text-yellow-300 text-xs",children:"HANT ì¬ì ë±ë¡ìê° ìë ë¶ì HANT ë²í¸ê° ë°ê¸ëì§ ììµëë¤."}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:586",className:"text-white/60 text-xs",children:"HANT ë²í¸ ìì´ë íìê°ì
ì ê°ë¥í©ëë¤."}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:587",type:"button",onClick:()=>oe(!0),className:"text-[#52b788] text-xs underline underline-offset-2 hover:text-[#40916c]",children:"HANT ë±ë¡ ì ì² ë°©ë²ì ìë´í´ ë릴ê¹ì? â"})]}),!O&&e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:594",className:"text-white/40 text-xs",children:"ì´ë¦ê³¼ ì íë²í¸ ì
ë ¥ í ë°ê¸ ë²í¼ì ë르ì¸ì."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:599",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:600",className:p,children:["ì±ë³ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:600",className:"text-red-400",children:"*"})]}),e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:601",className:"flex gap-2",children:[{v:"male",l:"ë¨ì±"},{v:"female",l:"ì¬ì±"}].map(({v:t,l:S})=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:603",type:"button",onClick:()=>_(t),className:`flex-1 py-2 rounded-lg text-sm font-medium border transition-colors ${b===t?"bg-white text-[#1a4a2e] border-white":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:S},t))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:612",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:613",className:p,children:["ìë
ìì¼ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:613",className:"text-red-400",children:"*"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:614",className:"flex gap-2",children:[e.jsxs(te,{"data-loc":"client/src/pages/Register.tsx:615",value:f,onValueChange:t=>{H(t),w(`${t}-${R||"01"}-${k||"01"}`)},children:[e.jsx(se,{"data-loc":"client/src/pages/Register.tsx:616",className:"flex-1 bg-white/10 border-white/20 text-white",children:e.jsx(ae,{"data-loc":"client/src/pages/Register.tsx:617",placeholder:"ì°ë"})}),e.jsx(re,{"data-loc":"client/src/pages/Register.tsx:619",className:"max-h-60",children:Array.from({length:new Date().getFullYear()-1919},(t,S)=>String(new Date().getFullYear()-S)).map(t=>e.jsxs(ce,{"data-loc":"client/src/pages/Register.tsx:621",value:t,children:[t,"ë
"]},t))})]}),e.jsxs(te,{"data-loc":"client/src/pages/Register.tsx:625",value:R,onValueChange:t=>{D(t),w(`${f||"2000"}-${t}-${k||"01"}`)},children:[e.jsx(se,{"data-loc":"client/src/pages/Register.tsx:626",className:"w-20 bg-white/10 border-white/20 text-white",children:e.jsx(ae,{"data-loc":"client/src/pages/Register.tsx:627",placeholder:"ì"})}),e.jsx(re,{"data-loc":"client/src/pages/Register.tsx:629",children:Array.from({length:12},(t,S)=>String(S+1).padStart(2,"0")).map(t=>e.jsxs(ce,{"data-loc":"client/src/pages/Register.tsx:631",value:t,children:[t,"ì"]},t))})]}),e.jsxs(te,{"data-loc":"client/src/pages/Register.tsx:635",value:k,onValueChange:t=>{F(t),w(`${f||"2000"}-${R||"01"}-${t}`)},children:[e.jsx(se,{"data-loc":"client/src/pages/Register.tsx:636",className:"w-20 bg-white/10 border-white/20 text-white",children:e.jsx(ae,{"data-loc":"client/src/pages/Register.tsx:637",placeholder:"ì¼"})}),e.jsx(re,{"data-loc":"client/src/pages/Register.tsx:639",children:Array.from({length:31},(t,S)=>String(S+1).padStart(2,"0")).map(t=>e.jsxs(ce,{"data-loc":"client/src/pages/Register.tsx:641",value:t,children:[t,"ì¼"]},t))})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:649",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:650",className:p,children:["ê±°ì£¼ì§ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:650",className:"text-red-400",children:"*"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:651",className:"flex gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:652",className:"relative flex-1",children:[e.jsxs("select",{"data-loc":"client/src/pages/Register.tsx:653",value:v,onCh
11ange:t=>L(t.target.value),className:"w-full appearance-none bg-white/10 border border-white/20 text-white rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary pr-8",children:[e.jsx("option",{"data-loc":"client/src/pages/Register.tsx:655",value:"",className:"bg-[#1a4a2e]",children:"ì/ë ì í"}),Te.map(t=>e.jsx("option",{"data-loc":"client/src/pages/Register.tsx:656",value:t,className:"bg-[#1a4a2e]",children:t},t))]}),e.jsx(ke,{"data-loc":"client/src/pages/Register.tsx:658",size:14,className:"absolute right-2 top-1/2 -translate-y-1/2 text-white/50 pointer-events-none"})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:660",placeholder:"ì/êµ°/구",value:$,onChange:t=>B(t.target.value),className:`${d} flex-1`})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:666",className:"space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:667",className:"flex items-center justify-between",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:668",className:p,children:["ìì ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:668",className:"text-red-400",children:"*"})]}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:669",className:"text-white/40 text-xs",children:"ëì¤ì ë³ê²½ ê°ë¥í©ëë¤"})]}),e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:671",className:"flex gap-2",children:["hant","general"].map(t=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:673",type:"button",onClick:()=>{q(t),G(t==="hant"?"hg":"personal")},className:`flex-1 py-2 rounded-lg text-sm font-semibold border transition-colors ${P===t?"bg-white text-[#1a4a2e] border-white":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:t==="hant"?"HANT":"ì¼ë° ì¬ì©ì"},t))}),P==="hant"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:683",className:"space-y-1.5 mt-1",children:[e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:684",className:"flex gap-1.5 flex-wrap",children:["hg","personal","group","leader"].map(t=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:686",type:"button",onClick:()=>G(t),className:`flex-1 min-w-[4rem] py-1.5 rounded-lg text-xs font-medium border transition-colors ${m===t?"bg-[#52b788] text-white border-[#52b788]":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:t==="hg"?"êµí ì¢
주ë¨":t==="personal"?"ê°ì¸":t==="group"?"ë¨ì²´":"ì¸ìì"},t))}),m==="hg"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:695",className:"flex items-center gap-2",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:696",type:"number",inputMode:"numeric",placeholder:"기ì (1, 2, 3...)",value:g,onChange:t=>M(t.target.value.replace(/[^0-9]/g,"")),className:`${d} flex-1`}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:699",className:"text-white/60 text-sm shrink-0",children:"기"})]}),m==="personal"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:703",className:"flex items-center gap-2",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:704",type:"number",inputMode:"numeric",placeholder:"ëë£ ì (ì í)",value:l,onChange:t=>ne(t.target.value.replace(/[^0-9]/g,"")),className:`${d} flex-1`}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:707",className:"text-white/60 text-sm shrink-0",children:"ëª
"})]}),m==="group"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:711",className:"space-y-1.5",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:712",placeholder:"ë¨ì²´ëª
ì
ë ¥",value:N,onChange:t=>I(t.target.value),className:d}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:713",className:"flex items-center gap-2",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:714",type:"number",inputMode:"numeric",placeholder:"ì¸ìì (ì í)",value:i,onChange:t=>K(t.target.value.replace(/[^0-9]/g,"")),className:`${d} flex-1`}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:717",className:"text-white/60 text-sm shrink-0",children:"ëª
"})]})]}),m==="leader"&&e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:722",className:"flex gap-1.5",children:["association","external"].map(t=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:724",type:"button",onClick:()=>fe(t),className:`flex-1 py-1.5 rounded-lg text-xs font-medium border transition-colors ${T===t?"bg-[#52b788] text-white border-[#52b788]":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:t==="association"?"íí ì¸ìì":"ì¸ë¶ ì¸ìì"},t))})]}),P==="general"&&e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:736",className:"flex gap-1.5 mt-1",children:["personal","cyclist"].map(t=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:738",type:"button",onClick:()=>G(t),className:`flex-1 py-1.5 rounded-lg text-xs font-medium border transition-colors ${m===t?"bg-[#52b788] text-white border-[#52b788]":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:t==="personal"?"ì¼ë° ì¬ì©ì":"ìì ê±°ì¬íì"},t))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:750",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:751",className:p,children:["ë¹ë°ë²í¸ ì¤ì ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:751",className:"text-red-400",children:"*"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:752",className:"relative",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:753",type:de?"text":"password",placeholder:"8ì ì´ì",value:z,onChange:t=>be(t.target.value),autoComplete:"new-password","data-form-type":"other",className:`${d} pr-10`}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:756",type:"button",onClick:()=>Q(!de),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/50",children:de?e.jsx(ie,{"data-loc":"client/src/pages/Register.tsx:758",size:16}):e.jsx(le,{"data-loc":"client/src/pages/Register.tsx:758",size:16})})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:761",type:"password",placeholder:"ë¹ë°ë²í¸ íì¸",value:Z,onChange:t=>we(t.target.value),autoComplete:"new-password","data-form-type":"other",className:d}),z&&Z&&z!==Z&&e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:765",className:"text-red-400 text-xs",children:"ë¹ë°ë²í¸ê° ì¼ì¹íì§ ììµëë¤"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:770",className:"border-t border-white/10 pt-3 space-y-3",children:[ge==="info"&&e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:772",type:"button",onClick:ye,disabled:me.isPending,className:"w-full h-12 bg-white/20 text-white hover:bg-white/30 font-semibold text-sm border border-white/30",children:[me.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:775",size:14,className:"animate-spin mr-2"}):null,"í´ëí° ë³¸ì¸ì¸ì¦"]}),ge==="code"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:781",className:"flex gap-2 items-center",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:782",type:"text",inputMode:"numeric",placeholder:"ì¸ì¦ë²í¸ 6ì리",value:V,onChange:t=>Re(t.target.value.replace(/[^0-9]/g,"").slice(0,6)),autoComplete:"one-time-code","data-form-type":"other",className:`${d} flex-1 text-center text-lg tracking-widest`}),e.jsx(A,{"data-loc":"client/src/pages/Register.tsx:786",type:"button",onClick:ye,disabled:me.isPending||J>0,className:"bg-white/20 text-white hover:bg-white/30 shrink-0 text-xs px-3 border border-white/30",children:J>0?Xe(J):"ì¬ë°ì¡"})]}),e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:792",type:"button",className:"w-full h-12 bg-white text-[#1a4a2e] hover:bg-white/90 font-bold text-base",onClick:ze,disabled:Ne.isPending||V.length!==6,children:[Ne.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:794",size:16,className:"animate-spin mr-2"}):e.jsx($e,{"data-loc":"client/src/pages/Register.tsx:794",size:16,className:"mr-2"}),"íìê°ì
ìë£"]})]})]}),he&&e.jsx(Ke,{"data-loc":"client/src/pages/Register.tsx:802",onClose:()=>oe(!1),onApply:()=>oe(!1)})]})}function Ke({onClose:n,onApply:c}){return e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:815",className:"fixed inset-0 z-50 flex items-end justify-center bg-black/60",onClick:n,children:e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:816",className:"w-full max-w-md bg-[#1a2e1a] rounded-t-2xl p-5 pb-8 space-y-4",onClick:u=>u.stopPropagation(),children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:817",className:"flex items-center justify-between",children:[e.jsx("h2",{"data-loc":"client/src/pages/Register.tsx:818",className:"text-white font-bold text-base",children:"HANT ë±ë¡ ì ì² ë°©ë²"}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:819",onClick:n,className:"text-white/50 text-xl leading-none",children:"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:821",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:823",className:"flex gap-3 items-start",children:[e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:824",className:"w-7 h-7 rounded-full bg-[#52b788] flex items-center justify-center shrink-0 text-white font-bold text-sm",children:"1"}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:825",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:826",className:"text-white font-semibold text-sm",children:"ë±ë¡ë¹ 10ë§ì ì
ê¸"}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:827",className:"text-white/60 text-xs mt-0.5",children:"기ì
ìí 257-148861-01-013"}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:828",className:"text-white/60 text-xs",children:"ìê¸ì£¼: íêµì¬ë길걷기íí"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:832",className:"flex gap-3 items-start",children:[e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:833",className:"w-7 h-7 rounded-full bg-[#52b788] flex items-center justify-center shrink-0 text-white font-bold text-sm",children:"2"}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:834",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:835",className:"text-white font-semibold text-sm",children:"ì´ë¦ + ì íë²í¸ ë±ë¡ ì ì²"}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:836",className:"text-white/60 text-xs mt-0.5",children:"íìê°ì
í ë§ì´íì´ì§ â HANT ë±ë¡ ì ì²"}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:837",className:"text-white/60 text-xs",children:"ëë ìë ë²í¼ì¼ë¡ ë°ë¡ ì ì²"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:841",className:"flex gap-3 items-start",children:[e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:842",className:"w-7 h-7 rounded-full bg-[#52b788] flex items-center justify-center shrink-0 text-white font-bold text-sm",children:"3"}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:843",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:844",className:"text-white font-semibold text-sm",children:"HANT ë²í¸ ìë ë°ê¸"}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:845",className:"text-white/60 text-xs mt-0.5",children:"ì
ê¸ íì¸ í ê´ë¦¬ì ì¹ì¸ ì ìë ë°ê¸ë©ëë¤"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:849",className:"bg-[#52b788]/20 rounded-lg p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:850",className:"text-[#52b788] text-xs font-semibold",children:"ð¡ HANT ë²í¸ ìì´ë íìê°ì
ë° ì± ì¬ì©ì´ ê°ë¥í©ëë¤."}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:851",className:"text-white/60 text-xs mt-1",children:"HANT ì주 ì¸ì¦ì ìíìë ë¶ë§ ë±ë¡íì¸ì."})]}),c&&e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:854",onClick:c,className:"w-full py-3 bg-[#52b788] text-white rounded-xl font-semibold text-sm hover:bg-[#40916c]",children:"ì§ê¸ ì ì²íë¬ ê°ê¸°"}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:859",onClick:n,className:"w-full py-2.5 bg-white/10 text-white/70 rounded-xl text-sm hover:bg-white/20",children:"ë«ê¸°"})]})})}function Ze({navigate:n}){const[c,u]=a.useState(""),[h,E]=a.useState(""),[b,_]=a.useState(""),[C,w]=a.useState(""),[f,H]=a.use
11State(""),[R,D]=a.useState(""),[k,F]=a.useState(""),[v,L]=a.useState(""),[$,B]=a.useState(""),[P,q]=a.useState(""),[m,G]=a.useState("general"),[g,M]=a.useState("personal"),[N,I]=a.useState(""),[i,K]=a.useState(""),[l,ne]=a.useState(""),[T,fe]=a.useState(""),[Y,xe]=a.useState("association"),[O,X]=a.useState(""),[U,pe]=a.useState(""),[he,oe]=a.useState(""),[z,be]=a.useState(!1),Z=y.profile.upsert.useMutation(),we=y.hant.checkAndIssue.useMutation(),de=y.useUtils(),[Q,V]=a.useState(!1),[Re,ge]=a.useState(!1),ee=y.auth.registerEmail.useMutation({onSuccess:async s=>{ue(s.token,s.expires);try{if(await Z.mutateAsync({fullName:c.trim(),phoneNumber:b||void 0,gender:C||void 0,birthDate:f||void 0,regionCity:$||void 0,regionDistrict:P||void 0,affiliationType:g,hgGeneration:g==="hg"&&N?parseInt(N):void 0,orgName:g==="group"?i.trim():void 0,groupSize:l?parseInt(l):void 0,companionCount:g==="personal"&&T?parseInt(T):void 0,leaderType:g==="leader"?Y:void 0,hantNumber:O.trim()||void 0}),Q)try{const j=await we.mutateAsync({name:c.trim(),phone:b,paidDeposit:!1,affiliationType:g,hgGeneration:g==="hg"&&N?parseInt(N):void 0,groupSize:l?parseInt(l):void 0,companionCount:g==="personal"&&T?parseInt(T):void 0,leaderType:g==="leader"?Y:void 0});j.issued&&j.hantNumber&&r.success(`ì¶íí©ëë¤! ì°ë¦¬ êµí 를 ê±·ë íìëì HANT ë±ë¡ë²í¸ ${j.hantNumber}ê° ë°ê¸ëììµëë¤ ð`)}catch{}}catch{}r.success("íìê°ì
ìë£! íìí©ëë¤."),n("/")},onError:s=>r.error(s.message||"íìê°ì
ì¤í¨")}),J=()=>{if(!c.trim()){r.error("ì´ë¦ì ì
ë ¥í´ ì£¼ì¸ì");return}if(!h.trim()){r.error("ì´ë©ì¼ì ì
ë ¥í´ ì£¼ì¸ì");return}if(U.length<8){r.error("ë¹ë°ë²í¸ë 8ì ì´ìì´ì´ì¼ í©ëë¤");return}if(U!==he){r.error("ë¹ë°ë²í¸ê° ì¼ì¹íì§ ììµëë¤");return}if(!b.trim()){r.error("ì íë²í¸ë¥¼ ì
ë ¥í´ ì£¼ì¸ì");return}if(!C){r.error("ì±ë³ì ì íí´ ì£¼ì¸ì");return}if(!f){r.error("ìë
ìì¼ì ì
ë ¥í´ ì£¼ì¸ì");return}if(!$){r.error("ê±°ì£¼ì§ ì/ë를 ì íí´ ì£¼ì¸ì");return}if(!P.trim()){r.error("ê±°ì£¼ì§ ì/êµ°/구를 ì
ë ¥í´ ì£¼ì¸ì");return}if(g==="hg"&&!N){r.error("êµí ì¢
ì£¼ë¨ ê¸°ì를 ì
ë ¥í´ ì£¼ì¸ì");return}if(g==="group"&&!i.trim()){r.error("ë¨ì²´ëª
ì ì
ë ¥í´ ì£¼ì¸ì");return}if(g==="leader"&&!Y){r.error("ì¸ìì ì íì ì íí´ ì£¼ì¸ì");return}ee.mutate({email:h.trim(),password:U,name:c.trim()})};return e.jsxs("form",{"data-loc":"client/src/pages/Register.tsx:959",autoComplete:"off",onSubmit:s=>{s.preventDefault(),J()},noValidate:!0,children:[e.jsx("input",{"data-loc":"client/src/pages/Register.tsx:960",type:"text",name:"fakeusernameremembered",style:{display:"none"},tabIndex:-1,readOnly:!0}),e.jsx("input",{"data-loc":"client/src/pages/Register.tsx:961",type:"password",name:"fakepasswordremembered",style:{display:"none"},tabIndex:-1,readOnly:!0}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:962",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:964",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:965",className:p,children:["ì´ë¦ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:965",className:"text-red-400",children:"*"})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:966",placeholder:"í길ë",value:c,onChange:s=>u(s.target.value),autoComplete:"off","data-form-type":"other",className:d})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:970",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:971",className:p,children:["ì íë²í¸ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:971",className:"text-red-400",children:"*"})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:972",type:"tel",inputMode:"tel",placeholder:"010-1234-5678",value:b,onChange:s=>{_(ve(s.target.value)),V(!1)},autoComplete:"off","data-form-type":"other",className:d})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:977",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:978",className:p,children:["HANT ë±ë¡ë²í¸",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:980",className:"text-white/40 text-xs ml-1",children:"(ìì¼ë©´ ê°ì
í ì ì²)"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:982",className:"flex gap-2",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:983",placeholder:"ì´ë¦+ì íë²
11í¸ ì
ë ¥ í ë°ê¸ ë²í¼ í´ë¦",value:O,onChange:s=>{X(s.target.value.trim()),V(!1)},autoComplete:"off","data-form-type":"other",className:`${d} flex-1`,readOnly:Q&&!!O}),e.jsx(A,{"data-loc":"client/src/pages/Register.tsx:987",type:"button",onClick:async()=>{if(!c.trim()){r.error("ì´ë¦ì 먼ì ì
ë ¥í´ ì£¼ì¸ì");return}if(!b.trim()){r.error("ì íë²í¸ë¥¼ 먼ì ì
ë ¥í´ ì£¼ì¸ì");return}try{const s=await de.client.hantReg.lookupByNamePhone.query({name:c.trim(),phoneNumber:b});s.found&&s.hantNumber?(X(s.hantNumber),V(!0),r.success("ì¶íí©ëë¤! ì°ë¦¬ êµí 를 ê±·ë íìëì HANT ë±ë¡ë²í¸ê° ë°ê¸ëììµëë¤ ð")):(V(!1),r.info("HANT ì¬ì ë±ë¡ìê° ìë ë¶ì ë²í¸ê° ë°ê¸ëì§ ììµëë¤. ë²í¸ ìì´ë ê°ì
ê°ë¥í©ëë¤."),ge(!0))}catch{r.error("ì¡°í ì¤ ì¤ë¥ê° ë°ìíìµëë¤.")}},className:"bg-[#52b788] text-white hover:bg-[#40916c] shrink-0 text-xs px-3 font-semibold",children:"ë°ê¸"})]}),Q&&e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:1008",className:"text-green-300 text-xs mt-1",children:"ð ì¶íí©ëë¤! ì°ë¦¬ êµí 를 ê±·ë íìëì HANT ë±ë¡ë²í¸ê° ë°ê¸ëììµëë¤."}),!Q&&!O&&e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:1011",className:"text-white/40 text-xs",children:"ì´ë¦ê³¼ ì íë²í¸ ì
ë ¥ í ë°ê¸ ë²í¼ì ë르ì¸ì."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1015",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:1016",className:p,children:["ì´ë©ì¼ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1016",className:"text-red-400",children:"*"})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1017",type:"text",inputMode:"email",placeholder:"[email protected]",value:h,onChange:s=>E(s.target.value),autoComplete:"off","data-form-type":"other",className:d})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1022",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:1023",className:p,children:["ë¹ë°ë²í¸ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1023",className:"text-red-400",children:"*"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1024",className:"relative",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1025",type:z?"text":"password",placeholder:"8ì ì´ì",value:U,onChange:s=>pe(s.target.value),autoComplete:"new-password","data-form-type":"other",className:`${d} pr-10`}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1029",type:"button",onClick:()=>be(!z),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/50",children:z?e.jsx(ie,{"data-loc":"client/src/pages/Register.tsx:1031",size:16}):e.jsx(le,{"data-loc":"client/src/pages/Register.tsx:1031",size:16})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1035",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:1036",className:p,children:["ë¹ë°ë²í¸ íì¸ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1036",className:"text-red-400",children:"*"})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1037",type:"password",placeholder:"ë¹ë°ë²í¸ ì¬ì
ë ¥",value:he,onChange:s=>oe(s.target.value),autoComplete:"new-password","data-form-type":"other",className:d})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1042",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:1043",className:p,children:["ì±ë³ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1043",className:"text-red-400",children:"*"})]}),e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:1044",className:"flex gap-2",children:[{v:"male",l:"ë¨ì±"},{v:"female",l:"ì¬ì±"}].map(({v:s,l:j})=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1046",type:"button",onClick:()=>w(s),className:`flex-1 py-2 rounded-lg text-sm font-medium border transition-colors ${C===s?"bg-white text-[#1a4a2e] border-white":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:j},s))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1054",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:1055",className:p,children:["ìë
ìì¼ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1055",className:"text-red-400",children:"*"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1056",className:"flex gap-2",children:[e.jsxs(te,{"data-loc":"client/src/pages/Register.tsx:1057",value:R,onValueChange:s=>{D(s),H(`${s}-${k||"01"}-${v||"01"}`)},children:[e.jsx(se,{"data-loc":"client/src/pages/Register.tsx:1058",className:"flex-1 bg-white/10 border-white/20 text-white",children:e.jsx(ae,{"data-loc":"client/src/pages/Register.tsx:1059",placeholder:"ì°ë"})}),e.jsx(re,{"data-loc":"client/src/pages/Register.tsx:1061",className:"max-h-60",children:Array.from({length:new Date().getFullYear()-1919},(s,j)=>String(new Date().getFullYear()-j)).map(s=>e.jsxs(ce,{"data-loc":"client/src/pages/Register.tsx:1063",value:s,children:[s,"ë
"]},s))})]}),e.jsxs(te,{"data-loc":"client/src/pages/Register.tsx:1067",value:k,onValueChange:s=>{F(s),H(`${R||"2000"}-${s}-${v||"01"}`)},children:[e.jsx(se,{"data-loc":"client/src/pages/Register.tsx:1068",className:"w-20 bg-white/10 border-white/20 text-white",children:e.jsx(ae,{"data-loc":"client/src/pages/Register.tsx:1069",placeholder:"ì"})}),e.jsx(re,{"data-loc":"client/src/pages/Register.tsx:1071",children:Array.from({length:12},(s,j)=>String(j+1).padStart(2,"0")).map(s=>e.jsxs(ce,{"data-loc":"client/src/pages/Register.tsx:1073",value:s,children:[s,"ì"]},s))})]}),e.jsxs(te,{"data-loc":"client/src/pages/Register.tsx:1077",value:v,onValueChange:s=>{L(s),H(`${R||"2000"}-${k||"01"}-${s}`)},children:[e.jsx(se,{"data-loc":"client/src/pages/Register.tsx:1078",className:"w-20 bg-white/10 border-white/20 text-white",children:e.jsx(ae,{"data-loc":"client/src/pages/Register.tsx:1079",placeholder:"ì¼"})}),e.jsx(re,{"data-loc":"client/src/pages/Register.tsx:1081",children:Array.from({length:31},(s,j)=>String(j+1).padStart(2,"0")).map(s=>e.jsxs(ce,{"data-loc":"client/src/pages/Register.tsx:1083",value:s,children:[s,"ì¼"]},s))})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1090",className:"space-y-1.5",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:1091",className:p,children:["ê±°ì£¼ì§ ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1091",className:"text-red-400",children:"*"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1092",className:"flex gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1093",className:"relative flex-1",children:[e.jsxs("select",{"data-loc":"client/src/pages/Register.tsx:1094",value:$,onChange:s=>B(s.target.value),className:"w-full appearance-none bg-white/10 border border-white/20 text-white rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary pr-8",children:[e.jsx("option",{"data-loc":"client/src/pages/Register.tsx:1096",value:"",className:"bg-[#1a4a2e]",children:"ì/ë ì í"}),Te.map(s=>e.jsx("option",{"data-loc":"client/src/pages/Register.tsx:1097",value:s,className:"bg-[#1a4a2e]",children:s},s))]}),e.jsx(ke,{"data-loc":"client/src/pages/Register.tsx:1099",size:14,className:"absolute right-2 top-1/2 -translate-y-1/2 text-white/50 pointer-events-none"})]}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1101",placeholder:"ì/êµ°/구",value:P,onChange:s=>q(s.target.value),className:`${d} flex-1`})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1106",className:"space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1107",className:"flex items-center justify-between",children:[e.jsxs(x,{"data-loc":"client/src/pages/Register.tsx:1108",className:p,children:["ìì ",e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1108",className:"text-red-400",children:"*"})]}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1109",className:"text-white/40 text-xs",children:"ëì¤ì ë³ê²½ ê°ë¥í©ëë¤"})]}),e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:1111",className:"flex gap-2",children:["hant","general"].map(s=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1113",type:"button",onClick:()=>{G(s),M(s==="hant"?"hg":"personal")},className:`flex-1 py-2 rounded-lg text-sm font-semibold border transition-colors ${m===s?"bg-white text-[#1a4a2e] border-white":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:s==="hant"?"HANT":"ì¼ë° ì¬ì©ì"},s))}),m==="hant"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1123",className:"space-y-1.5 mt-1",children:[e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:1124",className:"flex gap-1.5 flex-wrap",children:["hg","personal","group","leader"].map(s=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1126",type:"button",onClick:()=>M(s),className:`flex-1 min-w-[4rem] py-1.5 rounded-lg text-xs font-medium border transition-colors ${g===s?"bg-[#52b788] text-white border-[#52b788]":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:s==="hg"?"êµí ì¢
주ë¨":s==="personal"?"ê°ì¸":s==="group"?"ë¨ì²´":"ì¸ìì"},s))}),g==="hg"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1135",className:"flex items-center gap-2",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1136",type:"number",inputMode:"numeric",placeholder:"기ì (1, 2, 3...)",value:N,onChange:s=>I(s.target.value.replace(/[^0-9]/g,"")),className:`${d} flex-1`}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1139",className:"text-white/60 text-sm shrink-0",children:"기"})]}),g==="personal"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1143",className:"flex items-center gap-2",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1144",type:"number",inputMode:"numeric",placeholder:"ëë£ ì (ì í)",value:T,onChange:s=>fe(s.target.value.replace(/[^0-9]/g,"")),className:`${d} flex-1`}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1147",className:"text-white/60 text-sm shrink-0",children:"ëª
"})]}),g==="group"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1151",className:"space-y-1.5",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1152",placeholder:"ë¨ì²´ëª
ì
ë ¥",value:i,onChange:s=>K(s.target.value),className:d}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1153",className:"flex items-center gap-2",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1154",type:"number",inputMode:"numeric",placeholder:"ì¸ìì (ì í)",value:l,onCh
11ange:s=>ne(s.target.value.replace(/[^0-9]/g,"")),className:`${d} flex-1`}),e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1157",className:"text-white/60 text-sm shrink-0",children:"ëª
"})]})]}),g==="leader"&&e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:1162",className:"flex gap-1.5",children:["association","external"].map(s=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1164",type:"button",onClick:()=>xe(s),className:`flex-1 py-1.5 rounded-lg text-xs font-medium border transition-colors ${Y===s?"bg-[#52b788] text-white border-[#52b788]":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:s==="association"?"íí ì¸ìì":"ì¸ë¶ ì¸ìì"},s))})]}),m==="general"&&e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:1176",className:"flex gap-1.5 mt-1",children:["personal","cyclist"].map(s=>e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1178",type:"button",onClick:()=>M(s),className:`flex-1 py-1.5 rounded-lg text-xs font-medium border transition-colors ${g===s?"bg-[#52b788] text-white border-[#52b788]":"bg-transparent text-white/60 border-white/20 hover:border-white/40"}`,children:s==="personal"?"ì¼ë° ì¬ì©ì":"ìì ê±°ì¬íì"},s))})]}),e.jsxs("p",{"data-loc":"client/src/pages/Register.tsx:1188",className:"text-white/50 text-xs text-center mt-2",children:["íìê°ì
ì"," ",e.jsx("a",{"data-loc":"client/src/pages/Register.tsx:1190",href:"/privacy",target:"_blank",rel:"noopener noreferrer",className:"underline text-white/70 hover:text-white",children:"ê°ì¸ì ë³´ì²ë¦¬ë°©ì¹¨"}),"ì ëìíë ê²ì¼ë¡ ê°ì£¼ë©ëë¤."]}),e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:1195",type:"submit",className:"w-full h-12 bg-white text-[#1a4a2e] hover:bg-white/90 font-bold text-base mt-1",disabled:ee.isPending,children:[ee.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:1197",size:16,className:"animate-spin mr-2"}):e.jsx($e,{"data-loc":"client/src/pages/Register.tsx:1197",size:16,className:"mr-2"}),"íìê°ì
ìë£"]})]})]})}function Qe({navigate:n}){const[c,u]=a.useState(""),[h,E]=a.useState(""),[b,_]=a.useState(!1),[C,w]=a.useState("login"),[f,H]=a.useState("email"),[R,D]=a.useState(""),[k,F]=a.useState(""),[v,L]=a.useState(""),[$,B]=a.useState(""),[P,q]=a.useState(!1),[m,G]=a.useState(""),g=y.auth.loginEmail.useMutation({onSuccess:l=>{ue(l.token,l.expires),r.success("ë¡ê·¸ì¸ ì±ê³µ!");const ne=typeof window<"u"&&(window.location.hostname.includes("hantp.com")||window.location.hostname.includes("manus.space")),T=We();ne?setTimeout(()=>{window.location.href=T},800):n(T)},onError:l=>r.error(l.message||"ë¡ê·¸ì¸ ì¤í¨")}),M=y.auth.sendPasswordResetByEmail.useMutation({onSuccess:l=>{G(l.maskedPhone||""),w("forgot_code"),r.success(`ë±ë¡ë ì íë²í¸(${l.maskedPhone})ë¡ ì¸ì¦ë²í¸ë¥¼ ë°ì¡íìµëë¤`)},onError:l=>r.error(l.message||"ì¸ì¦ë²í¸ ë°ì¡ ì¤í¨")}),N=y.auth.sendPasswordResetByPhone.useMutation({onSuccess:()=>{w("forgot_code"),r.success("ì¸ì¦ë²í¸ë¥¼ ë°ì¡íìµëë¤")},onError:l=>r.error(l.message||"ì¸ì¦ë²í¸ ë°ì¡ ì¤í¨")}),I=y.auth.resetPasswordWithSms.useMutation({onSuccess:()=>{r.success("ë¹ë°ë²í¸ê° ë³ê²½ëììµëë¤. ì ë¹ë°ë²í¸ë¡ ë¡ê·¸ì¸í´ì£¼ì¸ì"),w("login"),D(""),F(""),L(""),B("")},onError:l=>r.error(l.message||"ë¹ë°ë²í¸ ë³ê²½ ì¤í¨")}),i=()=>
11{if(!R.trim()){r.error(f==="email"?"ì´ë©ì¼ì ì
ë ¥í´ì£¼ì¸ì":"ì íë²í¸ë¥¼ ì
ë ¥í´ì£¼ì¸ì");return}f==="email"?M.mutate({email:R.trim()}):N.mutate({phoneNumber:R.trim()})},K=()=>{if(k.length!==6){r.error("ì¸ì¦ë²í¸ 6ì리를 ì
ë ¥í´ì£¼ì¸ì");return}if(v.length<8){r.error("ë¹ë°ë²í¸ë 8ì ì´ìì´ì´ì¼ í©ëë¤");return}if(v!==$){r.error("ë¹ë°ë²í¸ê° ì¼ì¹íì§ ììµëë¤");return}I.mutate({identifier:R.trim(),identifierType:f,code:k,newPassword:v})};return C!=="login"?e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1251",className:"space-y-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Register.tsx:1252",className:"flex items-center gap-2 mb-1",children:e.jsxs("button",{"data-loc":"client/src/pages/Register.tsx:1253",type:"button",onClick:()=>w("login"),className:"text-white/60 hover:text-white text-sm flex items-center gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Register.tsx:1254",children:"â"})," ë¡ê·¸ì¸ì¼ë¡ ëìê°ê¸°"]})}),e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:1257",className:"text-white font-semibold text-base",children:"ë¹ë°ë²í¸ 찾기"}),C==="forgot_select"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1260",className:"space-y-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:1261",className:"text-white/70 text-sm",children:"ë³¸ì¸ íì¸ ë°©ë²ì ì íí´ì£¼ì¸ì"}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1262",type:"button",onClick:()=>{H("email"),w("forgot_input")},className:"w-full h-12 rounded-lg border border-white/30 text-white text-sm font-medium hover:bg-white/10 transition-colors",children:"ì´ë©ì¼ë¡ 찾기"}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1266",type:"button",onClick:()=>{H("phone"),w("forgot_input")},className:"w-full h-12 rounded-lg border border-white/30 text-white text-sm font-medium hover:bg-white/10 transition-colors",children:"ì íë²í¸ë¡ 찾기"})]}),C==="forgot_input"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1274",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1275",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:1276",className:p,children:f==="email"?"ê°ì
ì ì¬ì©í ì´ë©ì¼":"ê°ì
ì ë±ë¡í ì íë²í¸"}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1277",type:f==="email"?"email":"tel",inputMode:f==="email"?"email":"tel",placeholder:f==="email"?"[email protected]":"01012345678",value:R,onChange:l=>D(l.target.value),autoComplete:"off","data-form-type":"other",className:d})]}),f==="email"&&e.jsx("p",{"data-loc":"client/src/pages/Register.tsx:1283",className:"text-white/50 text-xs",children:"ê°ì
ì ë±ë¡í ì íë²í¸ë¡ ì¸ì¦ë²í¸ê° ë°ì¡ë©ëë¤"}),e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:1284",type:"button",onClick:i,className:"w-full h-12 bg-white text-[#1a4a2e] hover:bg-white/90 font-bold text-base",disabled:M.isPending||N.isPending,children:[M.isPending||N.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:1286",size:16,className:"animate-spin mr-2"}):null,"ì¸ì¦ë²í¸ ë°ê¸°"]})]}),C==="forgot_code"&&e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1293",className:"space-y-3",children:[m&&e.jsxs("p",{"data-loc":"client/src/pages/Register.tsx:1294",className:"text-white/70 text-sm",children:[m,"ì¼ë¡ ì¸ì¦ë²í¸ë¥¼ ë°ì¡íìµëë¤"]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1295",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:1296",className:p,children:"ì¸ì¦ë²í¸ (6ì리)"}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1297",type:"text",inputMode:"numeric",placeholder:"123456",maxLength:6,value:k,onChange:l=>F(l.target.value.replace(/[^0-9]/g,"").slice(0,6)),autoComplete:"one-time-code","data-form-type":"other",className:`${d} text-center text-lg tracking-widest`})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1302",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:1303",className:p,children:"ì ë¹ë°ë²í¸ (8ì ì´ì)"}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1304",className:"relative",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1305",type:P?"text":"password",placeholder:"ì ë¹ë°ë²í¸",value:v,onCh
11ange:l=>L(l.target.value),autoComplete:"new-password","data-form-type":"other",className:`${d} pr-10`}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1308",type:"button",onClick:()=>q(!P),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/50",children:P?e.jsx(ie,{"data-loc":"client/src/pages/Register.tsx:1310",size:16}):e.jsx(le,{"data-loc":"client/src/pages/Register.tsx:1310",size:16})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1314",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:1315",className:p,children:"ì ë¹ë°ë²í¸ íì¸"}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1316",type:"password",placeholder:"ë¹ë°ë²í¸ ì¬ì
ë ¥",value:$,onChange:l=>B(l.target.value),autoComplete:"new-password","data-form-type":"other",className:d})]}),e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:1320",type:"button",onClick:K,className:"w-full h-12 bg-white text-[#1a4a2e] hover:bg-white/90 font-bold text-base",disabled:I.isPending,children:[I.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:1322",size:16,className:"animate-spin mr-2"}):null,"ë¹ë°ë²í¸ ë³ê²½"]}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1325",type:"button",onClick:i,className:"w-full text-white/50 text-xs text-center py-1",disabled:M.isPending||N.isPending,children:"ì¸ì¦ë²í¸ ì¬ë°ì¡"})]})]}):e.jsxs("form",{"data-loc":"client/src/pages/Register.tsx:1336",autoComplete:"off",onSubmit:l=>{l.preventDefault(),g.mutate({email:c.trim(),password:h})},noValidate:!0,children:[e.jsx("input",{"data-loc":"client/src/pages/Register.tsx:1337",type:"text",name:"fakeusernameremembered",style:{display:"none"},tabIndex:-1,readOnly:!0}),e.jsx("input",{"data-loc":"client/src/pages/Register.tsx:1338",type:"password",name:"fakepasswordremembered",style:{display:"none"},tabIndex:-1,readOnly:!0}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1339",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1340",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:1341",className:p,children:"ì´ë©ì¼"}),e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1342",type:"text",inputMode:"email",placeholder:"[email protected]",value:c,onChange:l=>u(l.target.value),autoComplete:"off","data-form-type":"other",className:d})]}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1346",className:"space-y-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Register.tsx:1347",className:p,children:"ë¹ë°ë²í¸"}),e.jsxs("div",{"data-loc":"client/src/pages/Register.tsx:1348",className:"relative",children:[e.jsx(o,{"data-loc":"client/src/pages/Register.tsx:1349",type:b?"text":"password",placeholder:"ë¹ë°ë²í¸",value:h,onChange:l=>E(l.target.value),autoComplete:"current-password","data-form-type":"other",className:`${d} pr-10`}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1353",type:"button",onClick:()=>_(!b),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/50",children:b?e.jsx(ie,{"data-loc":"client/src/pages/Register.tsx:1355",size:16}):e.jsx(le,{"data-loc":"client/src/pages/Register.tsx:1355",size:16})})]})]}),e.jsxs(A,{"data-loc":"client/src/pages/Register.tsx:1359",type:"submit",className:"w-full h-12 bg-white text-[#1a4a2e] hover:bg-white/90 font-bold text-base mt-1",disabled:g.isPending,children:[g.isPending?e.jsx(W,{"data-loc":"client/src/pages/Register.tsx:1361",size:16,className:"animate-spin mr-2"}):e.jsx(Pe,{"data-loc":"client/src/pages/Register.tsx:1361",size:16,className:"mr-2"}),"ë¡ê·¸ì¸"]}),e.jsx("button",{"data-loc":"client/src/pages/Register.tsx:1364",type:"button",onClick:()=>w("forgot_select"),className:"w-full text-white/50 text-xs text-center py-1 hover:text-white/80 transition-colors",children:"ë¹ë°ë²í¸ë¥¼ ìì¼ì
¨ëì?"})]})]})}export{bt as clearPendingProfile,wt as default,ft as loadPendingProfile,ut as savePendingProfile};
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.