1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3791],{34864:(e,t,l)=>{l.d(t,{A:()=>x});var s=l(71156),i=l(48822),a=l(42258),r=l(35544),n=l(21547),c=l(97468),d=l(69906),o=l(44482);function x(e){var t;let{onBack:l,onSubmit:x}=e,m=(0,a.c)("settings"),[u,f]=(0,r.useState)(null),[h,p]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),[j,b]=(0,r.useState)({company:"",jobTitle:"",email:""}),[w,N]=(0,r.useState)([]),[y,D]=(0,r.useState)([]),[F,k]=(0,r.useState)(!1),[E,S]=(0,r.useState)(!1),[C,_]=(0,r.useState)(!1),L=(0,o.k)(e=>e.verify),B=(0,o.k)(e=>e.updateVerify),A=null!=(t=null==L?void 0:L.career)?t:null;(0,r.useEffect)(()=>{if(!A){f(null),b({company:"",jobTitle:"",email:""}),S(!1),N([]),D([]);return}f(A);let e=A.data;b({company:(null==e?void 0:e.company)||"",jobTitle:(null==e?void 0:e.job_title)||"",email:(null==e?void 0:e.verification_email)||""}),S(!!(null==e?void 0:e.verification_email_verified));let t=(null==e?void 0:e.documents)||(null==e?void 0:e.document_urls)||[];N(t),D(t.map(e=>{try{let t=decodeURIComponent(e).split("/");return t[t.length-1].split("?")[0]}catch(l){let t=e.split("/");return t[t.length-1].split("?")[0]}}))},[A]),(0,r.useEffect)(()=>{v&&(x(),g(!1))},[v,x]);let M=async e=>{if(e.target.files){let t=Array.from(e.target.files),l=3-w.length,s=t.slice(0,l);for(let e of(_(!0),s))try{let t=await c.Ef.uploadFile(e);N(e=>[...e,t]),D(t=>[...t,e.name])}catch(t){console.error("Failed to upload file:",e.name,t),n.oR.error(m("verification.careerForm.toasts.uploadFailed",{fileName:e.name}))}_(!1)}e.target.value=""},T=async()=>{if(!j.company||!j.jobTitle)return void n.oR.error(m("verification.careerForm.toasts.requiredFields"));if(!E&&0===w.length)return void n.oR.error(m("verification.careerForm.toasts.verifyOrUpload"));let e={company:j.company,job_title:j.jobTitle,verification_email:E?j.email:void 0,verification_email_verified:E,document_urls:w.length>0?w:void 0};p(!0);try{await c.gu.submitCareerVerification(e),B("career",{status:"pending",verified:!1,rejection_reason:"",reviewed_at:void 0,submitted_at:new Date().toISOString(),data:e}),g(!0)}catch(t){let e=(null==t?void 0:t.message)||m("verification.careerForm.toasts.submitFallback");n.oR.error(m("verification.careerForm.toasts.submitFailed",{error:e}))}finally{p(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex flex-col w-full h-full",children:(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full bg-white rounded-2xl",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full px-4 py-3 md:px-6 border-b border-[#E5E2DC]",children:[(0,s.jsx)("h2",{className:"text-base font-semibold leading-6 text-[#171717]",children:m("verification.careerForm.heading")}),(0,s.jsx)("button",{onClick:l,className:"p-1 hover:bg-gray-100 rounded-lg transition-colors","aria-label":m("verification.careerForm.closeAria"),children:(0,s.jsx)(i.A,{className:"w-4 h-4 text-[#171717]",strokeWidth:1.8})})]}),(0,s.jsxs)("div",{className:"flex flex-col px-4 py-4 md:px-6 flex-1 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 overflow-y-auto pr-2 flex-1 md:max-h-[70vh] pb-4",children:[u&&"pending"===u.status&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 p-4 w-full bg-[#FFF9E6] border border-[#FDE277] rounded-lg",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"i-mdi:alert-circle-outline",style:{width:20,height:20,color:"#F59E0B"}}),(0,s.jsx)("span",{className:"font-semibold text-sm text-[#92400E]",children:m("verification.careerForm.statusBanner.title")})]}),(0,s.jsx)("p",{className:"text-sm text-[#92400E]",children:m("verification.careerForm.statusBanner.description")}),u.submitted_at&&(0,s.jsx)("p",{className:"text-xs text-[#92400E] opacity-75",children:m("verification.careerForm.statusBanner.submittedOn",{date:new Date(u.submitted_at).toLocaleDateString()})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[m("verification.careerForm.fields.company.label")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("div",{className:"flex flex-row items-center py-0 px-3 gap-2 w-full h-10 bg-white border border-[#D8D8D8] rounded-lg",children:(0,s.jsx)("input",{type:"text",placeholder:m("verification.careerForm.fields.company.placeholder"),value:j.company,onChange:e=>b({...j,company:e.target.value}),className:"font-medium text-sm leading-4 text-[#171717] flex-1 outline-none placeholder:text-[rgba(48,48,48,0.4)]"})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[m("verification.careerForm.fields.jobTitle.label")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("div",{className:"flex flex-row items-center py-0 px-3 gap-2 w-full h-10 bg-white border border-[#D8D8D8] rounded-lg",children:(0,s.jsx)("input",{type:"text",placeholder:m("verification.careerForm.fields.jobTitle.placeholder"),value:j.jobTitle,onChange:e=>b({...j,jobTitle:e.target.value}),className:"font-medium text-sm leading-4 text-[#171717] flex-1 outline-none placeholder:text-[rgba(48,48,48,0.4)]"})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[m("verification.careerForm.verification.label")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("p",{className:"font-medium text-sm leading-[22px] text-[rgba(48,48,48,0.64)]",children:m("verification.careerForm.verification.intro")}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full pl-5",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[m("verification.careerForm.verification.emailLabel")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),E?(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 pl-1 gap-1 h-7 bg-[#DDFEBC] rounded-full",children:[(0,s.jsx)("div",{className:"i-mdi:check-circle",style:{width:20,height:20,color:"#4BB543"}}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:m("verification.careerForm.verification.verified")})]}):(0,s.jsxs)("div",{className:"flex flex-row items-start gap-2 w-full",children:[(0,s.jsx)("input",{type:"email",placeholder:m("verification.careerForm.verification.emailPlaceholder"),value:j.email,onChange:e=>b({...j,email:e.target.value}),className:"flex flex-row items-center py-0 px-3 gap-2 flex-1 h-10 bg-white border border-[#D8D8D8] rounded-lg font-medium text-sm leading-4 text-[#171717] outline-none placeholder:text-[rgba(48,48,48,0.4)]"}),(0,s.jsx)("button",{onClick:()=>{var e;(null==(e=j.email)?void 0:e.includes("@"))&&k(!0)},className:"flex flex-row items-center justify-center py-0 px-2 gap-2 w-[80px] md:w-[120px] h-10 bg-white border border-[#171717] rounded-lg shrink-0 hover:bg-gray-50 transition-colors",children:(0,s.jsx)("span",{className:"font-medium text-sm leading-4 text-[#171717]",children:m("verification.careerForm.verification.verifyButton")})})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full pl-5",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[m("verification.careerForm.documents.label")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("p",{className:"font-medium text-sm leading-[22px] text-[rgba(48,48,48,0.64)]",children:m("verification.careerForm.documents.description")}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-start items-end gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"flex flex-col justify-center items-center p-2 gap-2 w-[104px] h-[104px] bg-[#FBFBFB] border border-dashed border-[#D8D8D8] rounded ".concat(w.length>=3||C?"opacity-50 cursor-not-allowed":"cursor-pointer"),children:[(0,s.jsx)("input",{type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.pdf",onChange:M,disabled:w.length>=3||C,className:"hidden"}),(0,s.jsx)("div",{className:"i-mdi:plus",style:{width:14,height:14,color:"#878787"}}),(0,s.jsx)("span",{className:"font-medium text-sm leading-[22px] text-[#878787]",children:C?m("verification.careerForm.documents.uploading"):m("verification.careerForm.documents.upload")})]}),(0,s.jsxs)("p",{className:"font-normal text-xs leading-5 text-[#979797]",children:[m("verification.careerForm.documents.formatHint"),(0,s.jsx)("br",{}),m("verification.careerForm.documents.maxSizeHint"),(0,s.jsx)("br",{}),m("verification.careerForm.documents.multipleHint")]})]}),y.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-2 w-full",children:y.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-row items-center justify-between py-2 px-3 gap-2 w-full bg-[#F6F6F6] rounded-lg",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 flex-1",children:[(0,s.jsx)("div",{className:"i-mdi:file-document-outline",style:{width:16,height:16,color:"#171717"}}),(0,s.jsx)("span",{className:"font-medium text-sm text-[#171717] truncate",children:e})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{N(e=>e.filter((e,l)=>l!==t)),D(e=>e.filter((e,l)=>l!==t))},className:"flex items-center justify-center w-6 h-6 hover:bg-[#
1E0E0E0] rounded",children:(0,s.jsx)("div",{className:"i-mdi:close",style:{width:12,height:12,color:"#878787"}})})]},t))})]})]})]})]})]}),(0,s.jsx)("div",{className:"pt-4 border-t border-[#E5E2DC]",children:(0,s.jsx)("button",{onClick:T,disabled:h,className:"flex flex-row items-center justify-center py-2.5 px-4 gap-3 w-full bg-[#171717] rounded-lg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-[#333] transition-colors",children:(0,s.jsx)("span",{className:"font-medium text-sm leading-4 text-white",children:h?m("verification.careerForm.submitting"):m("verification.careerForm.submit")})})})]})]})}),(0,s.jsx)(d.A,{isOpen:F,onClose:()=>k(!1),email:j.email,onVerifySuccess:()=>{S(!0)},title:m("verification.careerForm.emailModalTitle")})]})}},46718:(e,t,l)=>{l.d(t,{Cy:()=>a,Q1:()=>x,QI:()=>s,U1:()=>m,dH:()=>u,dR:()=>i});let s="h-12 md:h-16",i="h-7 w-7",a="pb-[calc(4.5rem+env(safe-area-inset-bottom))]",r=new Set(["/api-playground","/history","/integration","/invite-friends","/mydinq","/organization","/settings","/subscription"]),n=["/inbox/","/mydinq/","/organization/","/settings/","/talent-radar/","/task/"],c=new Set(["/inbox/notifications"]),d=new Set(["/search/advisor","/search/citation","/search/analyze"]),o=new Set(["account-callback","admin","analysis","api","api-playground","auth","blogs","california-privacy-notice","changelog","cookies","debug","demo","dinqbot","guidelines","history","inbox","integration","integrations","invite","invite-friends","join","mydinq","onboarding","organization","organizations","payment","pricing","privacy","reset","search","settings","shortlist","signin","signup","subscription","talent-radar","task","terms","waiting-list"]);function x(e){if(!e)return!1;let t=e.length>1?e.replace(/\/+$/,""):e;return d.has(t)}function m(e){return!!e&&(!!r.has(e)||!c.has(e)&&(!(!e.startsWith("/search/")||x(e))||n.some(t=>e.startsWith(t))))}function u(e){return"/shortlist"===e||"/organization"===e||(null==e?void 0:e.startsWith("/talent-radar/"))||(null==e?void 0:e.startsWith("/task/"))||function(e){var t;let l=null!=(t=null==e?void 0:e.split("/").filter(Boolean))?t:[];return 1===l.length&&!o.has(l[0])}(e)}},60507:(e,t,l)=>{l.d(t,{A:()=>y});var s=l(71156),i=l(48822),a=l(56362),r=l(42258),n=l(35544),c=l(21547),d=l(97468),o=l(69906);let x=["Associate Degree","Bachelor's Degree","Master's Degree","Doctoral Degree (Ph.D.)","Professional Degree (MBA, MD, JD, etc.)","Postdoctoral","Certificate","Diploma"];function m(e){let{value:t,onChange:l}=e,[i,a]=(0,n.useState)(!1),r=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=e=>{r.current&&!r.current.contains(e.target)&&a(!1)};return i&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[i]),(0,s.jsxs)("div",{ref:r,className:"relative w-full",children:[(0,s.jsxs)("div",{onClick:()=>a(!i),className:"flex flex-row items-center py-0 px-3 gap-2 w-full h-10 bg-white border border-[#D8D8D8] rounded-lg cursor-pointer",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 flex-1 ".concat(t?"text-[#171717]":"text-[rgba(48,48,48,0.4)]"),children:t||"Select degree..."}),(0,s.jsx)("div",{className:"i-mdi:chevron-down",style:{width:24,height:24}})]}),i&&(0,s.jsx)("div",{className:"absolute z-50 w-full mt-1 bg-white border border-[#D8D8D8] rounded-lg shadow-lg max-h-[240px] overflow-y-auto",children:x.map(e=>(0,s.jsx)("div",{onClick:()=>{l(e),a(!1)},className:"px-3 py-2 cursor-pointer hover:bg-[#F6F6F6] transition-colors ".concat(t===e?"bg-[#F6F6F6]":""),children:(0,s.jsx)("div",{className:"font-medium text-sm text-[#171717]",children:e})},e))})]})}var u=l(63761);function f(e){let{value:t,onChange:l,options:i,placeholder:a="Search...",loading:r=!1,allowFreeText:c=!0,minSearchLength:d=0,showChevron:o=!1,emptyText:x="No results found",className:m,inputClassName:f,dropdownClassName:h}
1=e,[p,v]=(0,n.useState)(!1),[g,j]=(0,n.useState)(t),b=(0,n.useRef)(null),w=(0,n.useRef)(null);(0,n.useEffect)(()=>{null!==w.current&&w.current.value===t?j(w.current.label):j(t),w.current=null},[t]),(0,n.useEffect)(()=>{if(!p)return;let e=e=>{b.current&&!b.current.contains(e.target)&&v(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[p]);let N=(0,n.useMemo)(()=>g?i.filter(e=>e.label.toLowerCase().includes(g.toLowerCase())):i,[i,g]),y=p&&g.length>=d;return(0,s.jsxs)("div",{ref:b,className:(0,u.cn)("relative w-full",m),children:[(0,s.jsxs)("div",{className:"flex flex-row items-center py-0 px-3 gap-2 w-full h-10 bg-white border border-[#D8D8D8] rounded-lg",children:[(0,s.jsx)("input",{type:"text",value:g,onChange:e=>{let t=e.target.value;j(t),c&&l(t),t.length>=d&&v(!0)},onFocus:()=>{g.length>=d&&v(!0)},placeholder:a,className:(0,u.cn)("font-medium text-base leading-6 text-[#171717] flex-1 outline-none placeholder:text-[rgba(48,48,48,0.4)] bg-transparent",f)}),o&&(0,s.jsx)("div",{className:"i-mdi:chevron-down",style:{width:24,height:24}})]}),y&&(0,s.jsx)("div",{className:(0,u.cn)("absolute z-50 w-full mt-1 bg-white border border-[#D8D8D8] rounded-lg shadow-lg max-h-[240px] overflow-y-auto",h),children:r?(0,s.jsx)("div",{className:"px-3 py-2 text-sm text-[#878787]",children:"Searching..."}):N.length>0?N.map((e,i)=>(0,s.jsxs)("div",{onClick:()=>{e.label!==e.value&&e.value!==t?w.current={value:e.value,label:e.label}:w.current=null,l(e.value),j(e.label),v(!1)},className:(0,u.cn)("px-3 py-2 cursor-pointer hover:bg-[#F6F6F6] transition-colors",t===e.value&&"bg-[#F6F6F6]"),children:[(0,s.jsx)("div",{className:"font-medium text-sm text-[#171717]",children:e.label}),e.subLabel&&(0,s.jsx)("div",{className:"font-normal text-xs text-[#878787]",children:e.subLabel})]},"".concat(e.value,"-").concat(i))):(0,s.jsx)("div",{className:"px-3 py-2 text-sm text-[#878787]",children:x})})]})}let h=["Accounting","Aerospace Engineering","Anthropology","Architecture","Biology","Biomedical Engineering","Business Administration","Chemical Engineering","Chemistry","Civil Engineering","Communications","Computer Science","Dentistry","Design","Economics","Education","Electrical Engineering","English Literature","Entrepreneurship","Environmental Engineering","Environmental Science","Finance","Fine Arts","History","Industrial Engineering","International Business","Journalism","Law","Management","Marketing","Mathematics","Mechanical Engineering","Medicine","Music","Neuroscience","Nursing","Pharmacy","Philosophy","Physics","Political Science","Psychology","Public Health","Sociology","Software Engineering","Statistics"];function p(e){let{value:t,onChange:l}=e,i=(0,r.c)("common"),a=(0,n.useMemo)(()=>h.map(e=>({label:e,value:e})),[]);return(0,s.jsx)(f,{value:t,onChange:l,options:a,placeholder:i("inputs.major.placeholder"),showChevron:!0,allowFreeText:!0})}let v=[{value:"1",key:"jan"},{value:"2",key:"feb"},{value:"3",key:"mar"},{value:"4",key:"apr"},{value:"5",key:"may"},{value:"6",key:"jun"},{value:"7",key:"jul"},{value:"8",key:"aug"},{value:"9",key:"sep"},{value:"10",key:"oct"},{value:"11",key:"nov"},{value:"12",key:"dec"}];function g(e){var t;let{value:l,onChange:i}=e,a=(0,r.c)("common"),[c,d]=(0,n.useState)(!1),o=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&d(!1)};return c&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[c]);let x=null==(t=v.find(e=>e.value===l))?void 0:t.key,m=x?a("inputs.month.names.long.".concat(x)):a("inputs.month.placeholder");return(0,s.jsxs)("div",{ref:o,className:"relative w-full",children:[(0,s.jsxs)("div",{onClick:()=>d(!c),className:"flex flex-row items-center py-0 px-3 gap-2 w-full h-10 bg-white border border-[#D8D8D8] rounded-lg cursor-pointer",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 flex-1 ".concat(l?"text-[#171717]":"text-[rgba(48,48,48,0.4)]"),children:m}),(0,s.jsx)("div",{className:"i-mdi:chevron-down",style:{width:24,height:24}})]}),c&&(0,s.jsx)("div",{className:"absolute z-50 w-full mt-1 bg-white border border-[#D8D8D8] rounded-lg shadow-lg p-2",children:(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1",children:v.map(e=>(0,s.jsx)("div",{onClick:()=>{i(e.value),d(!1)},className:"px-3 py-2 cursor-pointer rounded-lg hover:bg-[#F6F6F6] transition-colors text-center ".concat(l===e.value?"bg-[#171717] text-white hover:bg-[#171717]":""),children:(0,s.jsx)("div",{className:"font-medium text-sm",children:a("inputs.month.names.short.".concat(e.key))})},e.value))})})]})}var j=l(78716);function b(e){let{value:t,onChange:l,variant:i="default"}=e,a=(0,r.c)("common"),{data:c=[],loading:d}=(0,j.A)(async()=>
1{if(!t||t.length<2)return[];try{var e;let l=await fetch("https://api.ror.org/v2/organizations?query=".concat(encodeURIComponent(t)));if(!l.ok)throw Error("Failed to fetch");return null!=(e=(await l.json()).items)?e:[]}catch(e){return[]}},{debounceWait:800,refreshDeps:[t],ready:t.length>=3}),o=(0,n.useMemo)(()=>c.map(e=>{var t,l;let s=function(e){var t,l,s;let i=e.names.find(e=>e.types.includes("ror_display"));return null!=(s=null!=(l=null==i?void 0:i.value)?l:null==(t=e.names[0])?void 0:t.value)?s:""}(e);return{label:s,subLabel:null==(l=e.locations[0])||null==(t=l.geonames_details)?void 0:t.country_name,value:s}}),[c]),x="outlined"===i;return(0,s.jsx)(f,{value:t,onChange:l,options:o,placeholder:a("inputs.school.placeholder"),loading:d,allowFreeText:!0,minSearchLength:3,emptyText:t.length>=3?a("inputs.school.noResults"):a("inputs.school.minChars",{count:3}),inputClassName:x?"font-medium text-[16px] leading-[16px]":void 0,className:x?"[&>div:first-child]:bg-transparent [&>div:first-child]:border-[#171717]":void 0,dropdownClassName:x?"border-[#171717]":void 0})}function w(e){let{value:t,onChange:l}=e,[i,a]=(0,n.useState)(!1),r=(0,n.useRef)(null),c=new Date().getFullYear(),d=Array.from({length:61},(e,t)=>c-t);return(0,n.useEffect)(()=>{let e=e=>{r.current&&!r.current.contains(e.target)&&a(!1)};return i&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[i]),(0,s.jsxs)("div",{ref:r,className:"relative w-full",children:[(0,s.jsxs)("div",{onClick:()=>a(!i),className:"flex flex-row items-center py-0 px-3 gap-2 w-full h-10 bg-white border border-[#D8D8D8] rounded-lg cursor-pointer",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 flex-1 ".concat(t?"text-[#171717]":"text-[rgba(48,48,48,0.4)]"),children:t||"Year"}),(0,s.jsx)("div",{className:"i-mdi:chevron-down",style:{width:24,height:24}})]}),i&&(0,s.jsx)("div",{className:"absolute z-50 w-full mt-1 bg-white border border-[#D8D8D8] rounded-lg shadow-lg p-2 max-h-[240px] overflow-y-auto",children:(0,s.jsx)("div",{className:"grid grid-cols-4 gap-1",children:d.map(e=>(0,s.jsx)("div",{onClick:()=>{l(e.toString()),a(!1)},className:"px-2 py-2 cursor-pointer rounded-lg hover:bg-[#F6F6F6] transition-colors text-center ".concat(t===e.toString()?"bg-[#171717] text-white hover:bg-[#171717]":""),children:(0,s.jsx)("div",{className:"font-medium text-sm",children:e})},e))})})]})}var N=l(44482);function y(e){var t;let{onBack:l,onSubmit:x}=e,u=(0,r.c)("settings"),[f,h]=(0,n.useState)(null),[v,j]=(0,n.useState)(!1),[y,D]=(0,n.useState)(!1),[F,k]=(0,n.useState)("current"),[E,S]=(0,n.useState)({university:"",degree:"",department:"",enrollMonth:"",enrollYear:"",email:""}
1),[C,_]=(0,n.useState)([]),[L,B]=(0,n.useState)([]),[A,M]=(0,n.useState)(!1),[T,R]=(0,n.useState)(!1),[z,P]=(0,n.useState)(!1),I=(0,N.k)(e=>e.verify),H=(0,N.k)(e=>e.updateVerify),O=null!=(t=null==I?void 0:I.education)?t:null;(0,n.useEffect)(()=>{if(!O){h(null),k("current"),S({university:"",degree:"",department:"",enrollMonth:"",enrollYear:"",email:""}),R(!1),_([]),B([]);return}h(O);let e=O.data;k((null==e?void 0:e.student_type)||"current"),S({university:(null==e?void 0:e.university)||"",degree:(null==e?void 0:e.degree)||"",department:(null==e?void 0:e.department)||"",enrollMonth:(null==e?void 0:e.enroll_month)||"",enrollYear:(null==e?void 0:e.enroll_year)||"",email:(null==e?void 0:e.verification_email)||""}),R(!!(null==e?void 0:e.verification_email_verified));let t=(null==e?void 0:e.documents)||(null==e?void 0:e.document_urls)||[];_(t),B(t.map(e=>{try{let t=decodeURIComponent(e).split("/");return t[t.length-1].split("?")[0]}catch(l){let t=e.split("/");return t[t.length-1].split("?")[0]}}))},[O]),(0,n.useEffect)(()=>{y&&(x(),D(!1))},[y,x]);let W=e=>{let{filled:t}=e;return t?(0,s.jsx)("div",{className:"i-mdi:check-circle",style:{width:18,height:18,color:"#171717"}}):(0,s.jsx)("div",{className:"i-mdi:circle-outline",style:{width:18,height:18,color:"#D8D8D8"}})},Y=async e=>{if(e.target.files){let t=Array.from(e.target.files),l=3-C.length,s=t.slice(0,l);for(let e of(P(!0),s))try{let t=await d.Ef.uploadFile(e);_(e=>[...e,t]),B(t=>[...t,e.name])}catch(t){console.error("Failed to upload file:",e.name,t),c.oR.error(u("verification.educationForm.toasts.uploadFailed",{fileName:e.name}))}P(!1)}e.target.value=""},U=e=>{_(t=>t.filter((t,l)=>l!==e)),B(t=>t.filter((t,l)=>l!==e))},V=async()=>{if(!E.university||!E.degree||!E.department)return void c.oR.error(u("verification.educationForm.toasts.requiredFields"));if("current"===F){if(!T&&0===C.length)return void c.oR.error(u("verification.educationForm.toasts.verifyOrUpload"))}else if(0===C.length)return void c.oR.error(u("verification.educationForm.toasts.uploadCertificate"));let e={student_type:F,university:E.university,degree:E.degree,department:E.department,enroll_month:E.enrollMonth,enroll_year:E.enrollYear,verification_email:T?E.email:void 0,verification_email_verified:T,document_urls:C.length>0?C:void 0};j(!0);try{await d.gu.submitEducationVerification(e),H("education",{status:"pending",verified:!1,rejection_reason:"",reviewed_at:void 0,submitted_at:new Date().toISOString(),data:e}),D(!0)}catch(t){let e=(null==t?void 0:t.message)||u("verification.educationForm.toasts.submitFallback");c.oR.error(u("verification.educationForm.toasts.submitFailed",{error:e}))}finally{j(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex flex-col w-full h-full",children:(0,s.jsxs)("div",{className:"flex flex-col w-full bg-white rounded-2xl h-full",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full px-4 py-3 md:px-6 border-b border-[#E5E2DC]",children:[(0,s.jsx)("h2",{className:"text-base font-semibold leading-6 text-[#171717]",children:u("verification.educationForm.heading")}),(0,s.jsx)("button",{onClick:l,className:"p-1 hover:bg-gray-100 rounded-lg transition-colors","aria-label":u("verification.educationForm.closeAria"),children:(0,s.jsx)(i.A,{className:"w-4 h-4 text-[#171717]",strokeWidth:1.8})})]}),(0,s.jsxs)("div",{className:"flex flex-col px-4 py-4 md:px-6 flex-1 overflow-hidden",children:[f&&"pending"===f.status&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 p-4 w-full bg-[#FFF9E6] border border-[#FDE277] rounded-lg",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"i-mdi:alert-circle-outline",style:{width:20,height:20,color:"#F59E0B"}}),(0,s.jsx)("span",{className:"font-semibold text-sm text-[#92400E]",children:u("verification.educationForm.statusBanner.title")})]}),(0,s.jsx)("p",{className:"text-sm text-[#92400E]",children:u("verification.educationForm.statusBanner.description")}),f.submitted_at&&(0,s.jsx)("p",{className:"text-xs text-[#92400E] opacity-75",children:u("verification.educationForm.statusBanner.submittedOn",{date:new Date(f.submitted_at).toLocaleDateString()})})]}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 md:gap-3 w-full",children:[(0,s.jsxs)("button",{onClick:()=>k("current"),className:"relative flex flex-row items-center justify-center px-2 md:px-4 gap-1.5 md:gap-2 flex-1 h-10 rounded-lg ".concat("current"===F?"bg-white border border-[#171717]":"bg-white border border-[#D8D8D8]"),children:[(0,s.jsx)("div",{className:"absolute left-2 md:left-4",children:(0,s.jsx)(W,{filled:"current"===F})}),(0,s.jsx)(a.default,{className:"shrink-0",src:"/icons/settings/book.svg",alt:u("verification.educationForm.studentType.current"),width:20,height:20}),(0,s.jsx)("span",{className:"text-sm leading-5 ".concat("current"===F?"font-bold":"font-medium"),children:u("verification.educationForm.studentType.current")})]}),(0,s.jsxs)("button",{onClick:()=>k("graduated"),className:"relative flex flex-row items-center justify-center px-2 md:px-4 gap-1.5 md:gap-2 flex-1 h-10 rounded-lg ".concat("graduated"===F?"bg-white border border-[#171717]":"bg-white border border-[#D8D8D8]"),children:[(0,s.jsx)("div",{className:"absolute left-2 md:left-4",children:(0,s.jsx)(W,{filled:"graduated"===F})}),(0,s.jsx)(a.default,{className:"shrink-0",src:"/icons/settings/education.svg",alt:u("verification.educationForm.studentType.graduated"),width:20,height:20}),(0,s.jsx)("span",{className:"text-sm leading-5 ".concat("graduated"===F?"font-bold":"font-medium"),children:u("verification.educationForm.studentType.graduated")})]})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-col gap-3 overflow-y-auto pr-2 flex-1 pb-4",children:(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[u("verification.educationForm.fields.university")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(b,{value:E.university,onChange:e=>S({...E,university:e})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[u("verification.educationForm.fields.degree")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(m,{value:E.degree,onChange:e=>S({...E,degree:e})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[u("verification.educationForm.fields.department")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(p,{value:E.department,onChange:e=>S({...E,department:e})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsx)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:u("verification.educationForm.fields.enroll")}),(0,s.jsxs)("div",{className:"flex flex-row items-start gap-2.5 w-full",children:[(0,s.jsx)(g,{value:E.enrollMonth,onChange:e=>S({...E,enrollMonth:e})}),(0,s.jsx)(w,{value:E.enrollYear,onChange:e=>S({...E,enrollYear:e})})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full",children:[(0,s.jsx)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:"current"===F?(0,s.jsxs)(s.Fragment,{children:[u("verification.educationForm.verification.labelCurrent")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}):(0,s.jsxs)(s.Fragment,{children:[u("verification.educationForm.verification.labelGraduated")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]})}),"current"===F?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"font-medium text-sm leading-[22px] text-[rgba(48,48,48,0.64)]",children:u("verification.educationForm.verification.intro")}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full overflow-hidden pl-5",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[u("verification.educationForm.verification.emailLabel")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),T?(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 pl-1 gap-1 h-7 bg-[#DDFEBC] rounded-full",children:[(0,s.jsx)("div",{className:"i-mdi:check-circle",style:{width:20,height:20,color:"#4BB543"}}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:u("verification.educationForm.verification.verified")})]}):(0,s.jsxs)("div",{className:"flex flex-row items-start gap-2",children:[(0,s.jsx)("input",{type:"email",placeholder:u("verification.educationForm.verification.emailPlaceholder"),value:E.email,onChange:e=>S({...E,email:e.target.value}),className:"flex flex-row items-center py-0 px-3 gap-2 flex-1 h-10 bg-white border border-[#D8D8D8] rounded-lg font-medium text-sm leading-4 text-[#171717] outline-none placeholder:text-[rgba(48,48,48,0.4)]"}),(0,s.jsx)("button",{onClick:()=>{var e;(null==(e=E.email)?void 0:e.includes("@"))&&M(!0)},className:"flex flex-row items-center justify-center py-0 px-2 gap-2 w-[80px] md:w-[120px] h-10 bg-white border border-[#171717] rounded-lg shrink-0 hover:bg-gray-50 transition-colors",children:(0,s.jsx)("span",{className:"font-medium text-sm leading-4 text-[#171717]",children:u("verification.educationForm.verification.verifyButton")})})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full pl-5",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[u("verification.educationForm.documents.currentLabel")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("p",{className:"font-medium text-sm leading-[22px] text-[rgba(48,48,48,0.64)]",children:u.rich("verification.educationForm.documents.currentDescription",{br:()=>(0,s.jsx)("br",{})})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-start items-end gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"flex flex-col justify-center items-center p-2 gap-2 w-[104px] h-[104px] bg-[#FBFBFB] border border-dashed border-[#D8D8D8] rounded ".concat(C.length>=3||z?"opacity-50 cursor-not-allowed":"cursor-pointer"),children:[(0,s.jsx)("input",{type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.pdf",onChange:Y,disabled:C.length>=3||z,className:"hidden"}),(0,s.jsx)("div",{className:"i-mdi:plus",style:{width:14,height:14,color:"#878787"}}),(0,s.jsx)("span",{className:"font-medium text-sm leading-[22px] text-[#878787]",children:z?u("verification.educationForm.documents.uploading"):u("verification.educationForm.documents.upload")})]}),(0,s.jsxs)("p",{className:"font-normal text-xs leading-5 text-[#979797]",children:[u("verification.educationForm.documents.formatHint"),(0,s.jsx)("br",{}),u("verification.educationForm.documents.maxSizeHint"),(0,s.jsx)("br",{}),u("verification.educationForm.documents.multipleHint")]})]}),L.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-2 w-full",children:L.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-row items-center justify-between py-2 px-3 gap-2 w-full bg-[#F6F6F6] rounded-lg",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 flex-1",children:[(0,s.jsx)("div",{className:"i-mdi:file-document-outline",style:{width:16,height:16,color:"#171717"}}),(0,s.jsx)("span",{className:"font-medium text-sm text-[#171717] truncate",children:e})]}),(0,s.jsx)("button",{type:"button",onClick:()=>U(t),className:"flex items-center justify-center w-6 h-6 hover:bg-[#
1E0E0E0] rounded",children:(0,s.jsx)("div",{className:"i-mdi:close",style:{width:12,height:12,color:"#878787"}})})]},t))})]})]})]}):(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2.5 w-full pl-5",children:[(0,s.jsxs)("label",{className:"font-medium text-sm leading-5 text-[#171717]",children:[u("verification.educationForm.documents.graduatedLabel")," ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("p",{className:"font-medium text-sm leading-[22px] text-[rgba(48,48,48,0.64)]",children:u.rich("verification.educationForm.documents.graduatedDescription",{br:()=>(0,s.jsx)("br",{})})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-start items-end gap-2.5 w-full",children:[(0,s.jsxs)("label",{className:"flex flex-col justify-center items-center p-2 gap-2 w-[104px] h-[104px] bg-[#FBFBFB] border border-dashed border-[#D8D8D8] rounded ".concat(C.length>=3||z?"opacity-50 cursor-not-allowed":"cursor-pointer"),children:[(0,s.jsx)("input",{type:"file",accept:".jpg,.jpeg,.png,.pdf",onChange:Y,disabled:C.length>=3||z,className:"hidden"}),(0,s.jsx)("div",{className:"i-mdi:plus",style:{width:14,height:14,color:"#878787"}}),(0,s.jsx)("span",{className:"font-medium text-sm leading-[22px] text-[#878787]",children:z?u("verification.educationForm.documents.uploading"):u("verification.educationForm.documents.upload")})]}),(0,s.jsxs)("p",{className:"font-normal text-xs leading-5 text-[#979797]",children:[u("verification.educationForm.documents.formatHint"),(0,s.jsx)("br",{}),u("verification.educationForm.documents.maxSizeHint")]})]}),L.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-2 w-full",children:L.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-row items-center justify-between py-2 px-3 gap-2 w-full bg-[#F6F6F6] rounded-lg",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 flex-1",children:[(0,s.jsx)("div",{className:"i-mdi:file-document-outline",style:{width:16,height:16,color:"#171717"}}),(0,s.jsx)("span",{className:"font-medium text-sm text-[#171717] truncate",children:e})]}),(0,s.jsx)("button",{type:"button",onClick:()=>U(t),className:"flex items-center justify-center w-6 h-6 hover:bg-[#E0E0E0] rounded",children:(0,s.jsx)("div",{className:"i-mdi:close",style:{width:12,height:12,color:"#878787"}})})]},t))})]})]})]})]})}),(0,s.jsx)("div",{className:"pt-4 border-t border-[#E5E2DC]",children:(0,s.jsx)("button",{onClick:V,disabled:v,className:"flex flex-row items-center justify-center py-2.5 px-4 gap-3 w-full bg-[#171717] rounded-lg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-[#333] transition-colors",children:(0,s.jsx)("span",{className:"font-medium text-sm leading-4 text-white",children:v?u("verification.educationForm.submitting"):u("verification.educationForm.submit")})})})]})]})}),(0,s.jsx)(o.A,{isOpen:A,onClose:()=>M(!1),email:E.email,onVerifySuccess:()=>{R(!0)},title:u("verification.educationForm.emailModalTitle")})]})}},69906:(e,t,l)=>{l.d(t,{A:()=>c});var s=l(71156),i=l(42258),a=l(35544),r=l(62905),n=l(97468);function c(e){let{isOpen:t,onClose:l,email:c,onVerifySuccess:d,onVerifyError:o,title:x}=e,m=(0,i.c)("settings"),u=null!=x?x:m("verification.emailModal.title"),[f,h]=(0,a.useState)(""),[p,v]=(0,a.useState)(60),[g,j]=(0,a.useState)(!1),[b,w]=(0,a.useState)(!1),[N,y]=(0,a.useState)(!1),[D,F]=(0,a.useState)(""),k=async()=>{y(!0),F("");try{await n.ZQ.sendCode({email:c,type:"profile_verification"}),v(60),j(!1)}catch(e){console.error("Failed to send verification code:",e),F(e.message||m("verification.emailModal.sendError"))}finally{y(!1)}};(0,a.useEffect)(()=>{if(t&&p>0){let e=setTimeout(()=>v(p-1),1e3);return()=>clearTimeout(e)}0===p&&j(!0)},[p,t]),(0,a.useEffect)(()=>{t&&(h(""),F(""),v(60),j(!1),k())},[t]);let E=async()=>{if(f.trim()){w(!0),F("");try{await n.ZQ.verifyCode({email:c,code:f}),d(),l()}catch(e){console.error("Verification failed:",e),F(e.message||m("verification.emailModal.invalidCode")),null==o||o()}finally{w(!1)}}};return t?(0,r.createPortal)((0,s.jsx)("div",{className:"fixed inset-0 z-[4000] flex items-center justify-center bg-black bg-opacity-50",children:(0,s.jsxs)("div",{className:"flex flex-col items-start w-[480px] bg-white rounded-2xl",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center justify-between py-4 px-6 gap-4 w-full h-14 border-b border-[#
1E5E2DC]",children:[(0,s.jsx)("h2",{className:"font-semibold text-base leading-6 text-black flex-1",children:u}),(0,s.jsx)("button",{onClick:l,className:"w-6 h-6 flex items-center justify-center",children:(0,s.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"#171717",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-6 gap-6 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-2 w-full",children:[(0,s.jsx)("span",{className:"font-semibold text-base leading-6 text-[#171717]",children:(e=>{let[t,l]=e.split("@");return t.length<=3?"".concat(t[0],"***@").concat(l):"".concat(t.substring(0,3),"***@").concat(l)})(c)}),(0,s.jsxs)("div",{className:"flex flex-row items-start gap-2 w-full h-12",children:[(0,s.jsx)("input",{type:"text",placeholder:m("verification.emailModal.codePlaceholder"),value:f,onChange:e=>h(e.target.value),className:"flex flex-row items-center py-0 px-3 gap-2 flex-1 h-12 bg-white border border-[#D8D8D8] rounded-lg font-medium text-base leading-6 outline-none placeholder:text-[rgba(48,48,48,0.64)]"}),(0,s.jsx)("button",{onClick:()=>{k()},disabled:!g||N,className:"flex flex-row justify-center items-center py-0 px-3 gap-2 w-[114px] h-12 rounded-lg ".concat(g&&!N?"bg-white border border-[#171717]":"bg-white border border-[#D8D8D8]"),children:(0,s.jsx)("span",{className:"font-medium text-base leading-6 ".concat(g&&!N?"text-[#171717]":"text-[#7B7B7B]"),children:N?m("verification.emailModal.sending"):g?m("verification.emailModal.resend"):m("verification.emailModal.countdown",{seconds:p})})})]})]}),D&&(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 w-full px-3 py-2 bg-[#FEF2F2] border border-[#FED7D7] rounded-lg",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#DC2626",strokeWidth:"1.5"}),(0,s.jsx)("path",{d:"M8 4v4M8 11h.01",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),(0,s.jsx)("span",{className:"font-medium text-sm text-[#DC2626]",children:D})]}),(0,s.jsx)("button",{onClick:E,disabled:!f.trim()||b,className:"flex flex-row justify-center items-center py-3 px-4 gap-2 w-full h-12 bg-[#171717] rounded-lg disabled:opacity-50",children:(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-white",children:b?m("verification.emailModal.verifying"):m("verification.emailModal.verifyButton")})})]})]})}),document.body):null}},94409:(e,t,l)=>{l.d(t,{A:()=>j});var s=l(71156),i=l(56362),a=l(42258),r=l(35544),n=l(21547),c=l(97468),d=l(48822),o=l(62905);function x(e){try{let t=decodeURIComponent(e),l=t.split("/"),s=l[l.length-1];return s.includes(".")?s:s+(t.includes(".pdf")?".pdf":t.includes(".png")?".png":t.includes(".jpg")||t.includes(".jpeg")?".jpg":t.includes(".doc")||t.includes(".docx")?".docx":"")}catch(e){return"unknown_file"}}function m(e){let{isOpen:t,onClose:l,status:i,data:n={},onEdit:c}=e,m=(0,a.c)("settings");return((0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&l()};return t&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t,l]),t)?(0,o.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-[3000] flex items-center justify-center",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50",onClick:l}),(0,s.jsx)("div",{className:"relative flex flex-col items-start w-[480px] bg-white rounded-2xl shadow-xl overflow-y-auto",style:{maxHeight:"90vh"},children:(()=>{switch(i){case"in-review":return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-row items-center p-4 px-6 gap-4 w-full h-14 border-b border-[#E5E2DC]",children:[(0,s.jsx)("h3",{className:"font-semibold text-base leading-6 text-black flex-1",children:m("verification.careerStatus.title")}),(0,s.jsx)("button",{onClick:l,className:"p-1",children:(0,s.jsx)(d.A,{size:24,color:"#171717"})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-6 gap-6 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-4 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:building w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.company")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.company||m("verification.careerStatus.placeholders.company")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:briefcase w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.jobTitle")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.jobTitle||m("verification.careerStatus.placeholders.jobTitle")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:mail w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.email")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.email||m("verification.careerStatus.placeholders.email")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),n.uploadedDocuments&&n.uploadedDocuments.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3 w-full",children:(0,s.jsxs)("div",{className:"flex flex-row items-start gap-3 w-full",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl mt-1.5",children:(0,s.jsx)("div",{className:"i-lucide:file-text w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.documents")}),(0,s.jsx)("div",{className:"flex flex-col items-start gap-2 w-full",children:n.uploadedDocuments.map((e,t)=>{let l=x(e);return(0,s.jsxs)("div",{className:"flex flex-row items-center p-3 gap-2 w-full h-[54px] bg-white border border-[#D8D8D8] rounded-xl shadow-sm",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-1.5 w-[30px] h-[30px] bg-[#CCE5FF] rounded-md",children:(0,s.jsx)("div",{className:"i-lucide:file w-4.5 h-4.5"})}),(0,s.jsx)("span",{className:"font-medium text-sm leading-6 text-black flex-1 truncate",style:{maxWidth:"280px"},title:l,children:l})]},t)})})]})]})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-4 gap-2 w-full bg-[#F8F8F8] border border-[#D8D8D8] rounded-xl shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:m("verification.careerStatus.statusLabel")}),(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 gap-1 h-7 bg-[#FDE277] rounded-full",children:[(0,s.jsx)("div",{className:"i-lucide:loader-2 w-5 h-5 animate-spin"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:m("verification.careerStatus.status.in-review")})]})]}),(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:m("verification.careerStatus.timeLabel")}),(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:n.submittedAt||m("verification.careerStatus.placeholders.submittedAt")})]})]})]})]});case"rejected":return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-row items-center p-4 px-6 gap-4 w-full h-14 border-b border-[#
1E5E2DC]",children:[(0,s.jsx)("h3",{className:"font-semibold text-base leading-6 text-black flex-1",children:m("verification.careerStatus.title")}),(0,s.jsx)("button",{onClick:l,className:"p-1",children:(0,s.jsx)(d.A,{size:24,color:"#171717"})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-6 gap-6 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-4 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:building w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.company")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.company||m("verification.careerStatus.placeholders.company")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:briefcase w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.jobTitle")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.jobTitle||m("verification.careerStatus.placeholders.jobTitle")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:mail w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.email")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.email||m("verification.careerStatus.placeholders.email")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),n.uploadedDocuments&&n.uploadedDocuments.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3 w-full",children:(0,s.jsxs)("div",{className:"flex flex-row items-start gap-3 w-full",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl mt-1.5",children:(0,s.jsx)("div",{className:"i-lucide:file-text w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.documents")}),(0,s.jsx)("div",{className:"flex flex-col items-start gap-2 w-full",children:n.uploadedDocuments.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-row items-center p-3 gap-2 w-full h-[54px] bg-white border border-[#D8D8D8] rounded-xl shadow-sm",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-1.5 w-[30px] h-[30px] bg-[#CCE5FF] rounded-md",children:(0,s.jsx)("div",{className:"i-lucide:file w-4.5 h-4.5"})}),(0,s.jsx)("span",{className:"font-medium text-sm leading-6 text-black flex-1",children:e})]},t))})]})]})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-4 gap-2 w-full bg-[#F8F8F8] border border-[#D8D8D8] rounded-xl shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:m("verification.careerStatus.statusLabel")}),(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 gap-1 h-7 bg-[#FED7D7] rounded-full",children:[(0,s.jsx)("div",{className:"i-lucide:x-circle w-5 h-5"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:m("verification.careerStatus.status.rejected")})]})]}),(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:m("verification.careerStatus.timeLabel")}),(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:n.submittedAt||m("verification.careerStatus.placeholders.submittedAt")})]}),(0,s.jsxs)("div",{className:"flex flex-row items-start gap-1 w-full mt-2",children:[(0,s.jsx)("div",{className:"i-lucide:alert-circle w-6 h-6 text-red-600"}),(0,s.jsx)("p",{className:"font-medium text-sm leading-6 text-[#C81E1D] flex-1",children:n.rejectionReason||m("verification.careerStatus.placeholders.rejectionReason")})]}),(0,s.jsx)("button",{onClick:()=>{l(),null==c||c()},className:"flex flex-row justify-center items-center py-2.5 px-6 gap-2 w-full h-12 bg-white border border-[#171717] rounded-lg mt-2",children:(0,s.jsx)("span",{className:"font-medium text-base leading-4 text-[#171717]",children:m("verification.careerStatus.actions.edit")})})]})]})]});case"verified":return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-row items-center p-4 px-6 gap-4 w-full h-14 border-b border-[#
1E5E2DC]",children:[(0,s.jsx)("h3",{className:"font-semibold text-base leading-6 text-black flex-1",children:m("verification.careerStatus.title")}),(0,s.jsx)("button",{onClick:l,className:"p-1",children:(0,s.jsx)(d.A,{size:24,color:"#171717"})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-6 gap-6 w-full flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-4 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:building w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.company")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.company||m("verification.careerStatus.placeholders.company")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:briefcase w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.jobTitle")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.jobTitle||m("verification.careerStatus.placeholders.jobTitle")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:mail w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.email")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.email||m("verification.careerStatus.placeholders.email")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),n.uploadedDocuments&&n.uploadedDocuments.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3 w-full",children:(0,s.jsxs)("div",{className:"flex flex-row items-start gap-3 w-full",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl mt-1.5",children:(0,s.jsx)("div",{className:"i-lucide:file-text w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.careerStatus.fields.documents")}),(0,s.jsx)("div",{className:"flex flex-col items-start gap-2 w-full",children:n.uploadedDocuments.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-row items-center p-3 gap-2 w-full h-[54px] bg-white border border-[#D8D8D8] rounded-xl shadow-sm",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-1.5 w-[30px] h-[30px] bg-[#CCE5FF] rounded-md",children:(0,s.jsx)("div",{className:"i-lucide:file w-4.5 h-4.5"})}),(0,s.jsx)("span",{className:"font-medium text-sm leading-6 text-black flex-1",children:e})]},t))})]})]})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-4 gap-2 w-full bg-[#F8F8F8] border border-[#D8D8D8] rounded-xl shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:m("verification.careerStatus.statusLabel")}),(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 pl-1 gap-1 h-7 bg-[#DDFEBC] rounded-full",children:[(0,s.jsx)("div",{className:"i-mdi:check-circle w-5 h-5"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:m("verification.careerStatus.status.verified")})]})]}),(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:m("verification.careerStatus.timeLabel")}),(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:n.submittedAt||m("verification.careerStatus.placeholders.submittedAt")})]}),(0,s.jsx)("button",{onClick:()=>{l(),null==c||c()},className:"flex flex-row justify-center items-center py-2.5 px-6 gap-2 w-full h-12 bg-white border border-[#171717] rounded-lg mt-2",children:(0,s.jsx)("span",{className:"font-medium text-base leading-4 text-[#171717]",children:m("verification.careerStatus.actions.reverification")})})]})]})]})}})()})]}),document.body):null}function u(e){let{isOpen:t,onClose:l,status:i,data:n={},onEdit:c}=e,m=(0,a.c)("settings");return((0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&l()};return t&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t,l]),t)?(0,o.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-[3000] flex items-center justify-center",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50",onClick:l}),(0,s.jsx)("div",{className:"relative flex flex-col items-start w-[480px] bg-white rounded-2xl shadow-xl overflow-y-auto",style:{maxHeight:"90vh"},children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-row items-center p-4 px-6 gap-4 w-full h-14 border-b border-[#
1E5E2DC]",children:[(0,s.jsx)("h3",{className:"font-semibold text-base leading-6 text-black flex-1",children:m("verification.educationStatus.title")}),(0,s.jsx)("button",{onClick:l,className:"p-1",children:(0,s.jsx)(d.A,{size:24,color:"#171717"})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-6 gap-6 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start gap-4 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:graduation-cap w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.educationStatus.fields.university")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.university||m("verification.educationStatus.placeholders.university")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:book-open w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.educationStatus.fields.degree")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.degree||m("verification.educationStatus.placeholders.degree")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:user w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.educationStatus.fields.department")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.department||m("verification.educationStatus.placeholders.department")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),"current"===n.studentType&&(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:calendar w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.educationStatus.fields.enrollmentDate")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.enrollMonth&&n.enrollYear?"".concat(n.enrollMonth," ").concat(n.enrollYear):m("verification.educationStatus.placeholders.enrollmentDate")})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),"current"===n.studentType&&n.email&&(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl",children:(0,s.jsx)("div",{className:"i-lucide:mail w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.educationStatus.fields.email")}),(0,s.jsx)("span",{className:"font-medium text-sm leading-5 text-[#787878]",children:n.email})]})]}),(0,s.jsx)("div",{className:"w-full h-px bg-[#D8D8D8]"})]}),n.uploadedDocuments&&n.uploadedDocuments.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3 w-full",children:(0,s.jsxs)("div",{className:"flex flex-row items-start gap-3 w-full",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#171717] rounded-3xl mt-1.5",children:(0,s.jsx)("div",{className:"i-lucide:file-text w-6 h-6"})}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2 flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-[#171717]",children:m("verification.educationStatus.fields.documents")}),(0,s.jsx)("div",{className:"flex flex-col items-start gap-2 w-full",children:n.uploadedDocuments.map((e,t)=>{let l=x(e);return(0,s.jsxs)("div",{className:"flex flex-row items-center p-3 gap-2 w-full h-[54px] bg-white border border-[#D8D8D8] rounded-xl shadow-sm",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-1.5 w-[30px] h-[30px] bg-[#CCE5FF] rounded-md",children:(0,s.jsx)("div",{className:"i-lucide:file w-4.5 h-4.5"})}),(0,s.jsx)("span",{className:"font-medium text-sm leading-6 text-black flex-1 truncate",style:{maxWidth:"280px"},title:l,children:l})]},t)})})]})]})})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start p-4 gap-2 w-full bg-[#F8F8F8] border border-[#D8D8D8] rounded-xl shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:m("verification.educationStatus.statusLabel")}),(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 gap-1 h-7 rounded-full ".concat("verified"===i?"bg-[#DDFEBC] pl-1":"rejected"===i?"bg-[#FED7D7]":"bg-[#FDE277]"),children:["verified"===i?(0,s.jsx)("div",{className:"i-mdi:check-circle w-5 h-5"}):"rejected"===i?(0,s.jsx)("div",{className:"i-lucide:x-circle w-5 h-5"}):(0,s.jsx)("div",{className:"i-lucide:loader-2 w-5 h-5 animate-spin"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:m("verification.educationStatus.status.".concat(i))})]})]}),(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:m("verification.educationStatus.timeLabel")}),(0,s.jsx)("span",{className:"font-medium text-base leading-6 text-black",children:n.submittedAt||m("verification.educationStatus.placeholders.submittedAt")})]}),"rejected"===i&&(0,s.jsxs)("div",{className:"flex flex-row items-start gap-1 w-full mt-2",children:[(0,s.jsx)("div",{className:"i-lucide:alert-circle w-6 h-6 text-red-600"}),(0,s.jsx)("p",{className:"font-medium text-sm leading-6 text-[#C81E1D] flex-1",children:n.rejectionReason||m("verification.educationStatus.placeholders.rejectionReason")})]}),("rejected"===i||"verified"===i)&&(0,s.jsx)("button",{onClick:()=>{l(),null==c||c()},className:"flex flex-row justify-center items-center py-2.5 px-6 gap-2 w-full h-12 bg-white border border-[#171717] rounded-lg mt-2",children:(0,s.jsx)("span",{className:"font-medium text-base leading-4 text-[#171717]",children:m("rejected"===i?"verification.educationStatus.actions.edit":"verification.educationStatus.actions.reverification")})})]})]})]})})]}),document.body):null}var f=l(20563),h=l(4445),p=l(34147),v=l(44482);let g=[{name:"twitter",displayName:"Twitter",icon:"/icons/settings/twitter-simple.svg"},{name:"linkedin",displayName:"LinkedIn",icon:"/icons/settings/linkedin-simple.svg"}];function j(e){var t,l,d,o,x,j;let{onVerifyEducation:b,onVerifyCareer:w}=e,N=(0,a.c)("settings"),{confirm:y}=(0,f.G)(),{closeProfileSettings:D}=(0,p.B)(),F=(0,h.b)(e=>e.openConsumerPaywall),k=(0,v.k)(e=>e.verify),E=(0,v.k)(e=>e.loadVerifications),S=(0,v.k)(e=>e.updateVerify),C=(0,v.k)(e=>e.subscription),[_,L]=(0,r.useState)(!1),[B,A]=(0,r.useState)(!1),M=!(null==C?void 0:C.plan)||"free"===C.plan,T=null!=(t=null==k?void 0:k.education)?t:null,R=null!=(l=null==T?void 0:T.data)?l:null,z=null!=(d=null==k?void 0:k.career)?d:null,P=null!=(o=null==z?void 0:z.data)?o:null,I=null!=(x=null==k?void 0:k.social)?x:null,H=null!=(j=null==I?void 0:I.accounts)?j:[],[O,W]=(0,r.useState)(!1),[Y,U]=(0,r.useState)(!1),V=e=>H.some(t=>t.platform.toLowerCase()===e.toLowerCase()&&t.linked),q=async e=>{L(!0);try{let t=await c.gu.getSocialOAuthURL({platform:e}),l=window.screen.width/2-300,s=window.screen.height/2-350,i=window.open(t.url,"".concat(e,"_oauth"),"width=".concat(600,",height=").concat(700,",left=").concat(l,",top=").concat(s,",toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes"));if(!i){n.oR.error(N("verification.card.toasts.allowPopups")),L(!1);return}let a=setInterval(()=>{i.closed&&(clearInterval(a),L(!1),E())},500)}catch(e){console.error("Failed to get OAuth URL:",e),n.oR.error(N("verification.card.toasts.oauthFailed")),L(!1)}},K=async e=>{A(!0);try{await c.gu.unlinkSocialAccount({platform:e});let t=H.map(t=>t.platform.toLowerCase()===e.toLowerCase()?{...t,linked:!1}:t),l=t.filter(e=>e.linked).length;S("social",{accounts:t,linked_count:l,verified:l>0})}catch(e){console.error("Failed to unlink account:",e),n.oR.error(N("verification.card.toasts.unlinkFailed"))}finally{A(!1)}},Q=e=>{if(e)try{return new Date(e).toISOString().split("T")[0]}catch(t){return e}},G=e=>e?e.verified||"approved"===e.status?"verified":"pending"===e.status?"in-review":"rejected"===e.status?"rejected":"unverified":"unverified",J=[{nameKey:"education",icon:"/icons/settings/education.svg",status:G(T),type:"education"},{nameKey:"career",icon:"/icons/settings/career.svg",status:G(z),type:"career"},{nameKey:"social",icon:"/icons/settings/link.svg",status:I?I.verified?"verified":I.linked_count>0?"in-review":"unverified":"unverified",hasSocials:!0}],Z=(e,t)=>{"education"===e&&("unverified"===t?null==b||b():W(!0)),"career"===e&&("unverified"===t?null==w||w():U(!0))};return(0,s.jsxs)("div",{className:"flex flex-col items-start gap-3 w-full bg-white rounded-2xl",children:[(0,s.jsx)("div",{className:"max-md:hidden flex justify-between items-center w-full h-8",children:(0,s.jsx)("h2",{className:"font-semibold text-2xl text-[#171717]",children:N("verification.card.heading")})}),(0,s.jsx)("div",{className:"flex flex-col items-start rounded-xl border border-[#
1EEEDE9] bg-[#F8F7F3] px-4 py-3 w-full",children:(0,s.jsx)("p",{className:"text-sm leading-[22px] text-[#6b6862]",children:N("verification.card.intro")})}),(0,s.jsx)("div",{className:"flex flex-col items-start gap-2 w-full ".concat(M?"opacity-30 pointer-events-none":""),children:J.map((e,t)=>(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full h-12",children:[(0,s.jsx)("div",{className:"flex justify-center items-center p-3 w-12 h-12 bg-white border border-[#E6E1DA] rounded-3xl flex-shrink-0",children:(0,s.jsx)(i.default,{src:e.icon,alt:N("verification.card.types.".concat(e.nameKey)),width:24,height:24})}),(0,s.jsx)("div",{className:"flex flex-col justify-center items-start gap-1 flex-1",children:(0,s.jsx)("span",{className:"font-semibold text-base leading-6 text-[#171717]",children:N("verification.card.types.".concat(e.nameKey))})}),((e,t,l,i)=>{if(!t&&!l){if("unverified"===e)return(0,s.jsx)("button",{onClick:()=>Z(i,e),className:"flex justify-center items-center py-2 px-4 gap-2 h-8 border rounded-lg flex-shrink-0 border-black text-[#171717]",children:(0,s.jsx)("span",{className:"font-medium text-xs leading-4",children:N("verification.card.actions.verify")})});if("in-review"===e||"rejected"===e||"verified"===e)return(0,s.jsx)("button",{onClick:()=>Z(i,e),className:"flex flex-row items-center gap-2 hover:opacity-80 transition-opacity",children:"in-review"===e?(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 gap-1 h-7 bg-[#FDE277] rounded-full",children:[(0,s.jsx)("div",{className:"i-lucide:loader-2 w-5 h-5 animate-spin"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:N("verification.card.status.in-review")})]}):"rejected"===e?(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 gap-1 h-7 bg-[#FED7D7] rounded-full",children:[(0,s.jsx)("div",{className:"i-lucide:x-circle w-5 h-5"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:N("verification.card.status.rejected")})]}):(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 pl-1 gap-1 h-7 bg-[#DDFEBC] rounded-full",children:[(0,s.jsx)("div",{className:"i-mdi:check-circle-outline w-5 h-5"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:N("verification.card.status.verified")})]})})}switch(e){case"verified":return(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 pl-1 gap-1 h-7 bg-[#DDFEBC] rounded-full",children:[(0,s.jsx)("div",{className:"i-mdi:check-circle-outline w-5 h-5"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:N("verification.card.status.verified")})]});case"in-review":return(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 gap-1 h-7 bg-[#FDE277] rounded-full",children:[(0,s.jsx)("div",{className:"i-lucide:loader-2 w-5 h-5 animate-spin"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:N("verification.card.status.in-review")})]});case"rejected":return(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 gap-1 h-7 bg-[#FED7D7] rounded-full",children:[(0,s.jsx)("div",{className:"i-lucide:x-circle w-5 h-5"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:N("verification.card.status.rejected")})]}),(0,s.jsx)("div",{className:"i-lucide:alert-circle w-6 h-6 text-red-600"})]});default:return null}})(e.status,e.hasInput,e.hasSocials,e.type)]}),e.hasInput&&"unverified"===e.status&&(0,s.jsxs)("div",{className:"flex items-start gap-3 w-full mt-3",children:[(0,s.jsx)("input",{type:"text",placeholder:N("verification.card.phone.placeholder"),className:"flex items-center py-0 px-3 gap-2 flex-1 h-10 bg-white border border-[#D8D8D8] rounded-lg font-medium text-base text-[#171717] placeholder:text-[rgba(48,48,48,0.64)]"}),(0,s.jsx)("button",{className:"flex justify-center items-center py-2 px-4 gap-2 w-[160px] h-10 border border-black rounded-lg",children:(0,s.jsx)("span",{className:"font-medium text-base text-[#171717]",children:N("verification.card.phone.submit")})})]}),e.hasSocials&&(0,s.jsx)("div",{className:"flex flex-col items-start mt-4 p-0 w-full bg-[#F8F7F3] border border-[#
1EEEDE9] rounded-xl",children:(0,s.jsx)("div",{className:"flex flex-col items-start p-3 gap-3 w-full",children:g.map((e,t)=>{let l=V(e.name),a=(e=>{let t=H.find(t=>t.platform.toLowerCase()===e.toLowerCase());return(null==t?void 0:t.platform_username)||void 0})(e.name);return(0,s.jsxs)("div",{className:"flex items-center gap-2 w-full min-h-8",children:[(0,s.jsxs)("div",{className:"flex items-start gap-2 flex-1",children:[(0,s.jsx)(i.default,{src:e.icon,alt:e.displayName,width:24,height:24,className:"w-6 h-6"}),(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"font-medium text-base text-[#171717]",children:e.displayName}),l&&a&&(0,s.jsxs)("span",{className:"text-xs text-[#8a8880]",children:["@",a]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,s.jsxs)("div",{className:"flex flex-row items-center py-1 px-2 pl-1 gap-1 h-7 bg-[#DDFEBC] rounded-full",children:[(0,s.jsx)("div",{className:"i-mdi:check-circle-outline w-5 h-5"}),(0,s.jsx)("span",{className:"font-semibold text-sm leading-4 text-black",children:N("verification.card.status.verified")})]}),(0,s.jsx)("button",{onClick:()=>{var t;V(t=e.name)?y({title:N("verification.card.unlinkDialog.title"),message:N("verification.card.unlinkDialog.message",{platform:t}),onConfirm:()=>K(t)}):q(t)},disabled:_||B,className:"w-18 flex justify-center items-center py-2 px-4 gap-2 h-8 border rounded-lg disabled:opacity-50 disabled:cursor-not-allowed ".concat(l?"border-[#EF4444] text-[#EF4444]":"border-[#D8D3CA] text-[#2a2826] bg-white"),children:(0,s.jsx)("span",{className:"font-medium text-xs",children:l?N("verification.card.actions.unlink"):N("verification.card.actions.link")})})]})]},t)})})}),t<J.length-1&&(0,s.jsx)("div",{className:"w-full h-px bg-[#EEEDE9] my-3"})]},t))}),M&&(0,s.jsxs)("button",{onClick:()=>{D(),F("c_verification_locked")},className:"flex justify-center items-center gap-2 w-full py-2 px-4 h-10 bg-[#171717] hover:bg-[#333] rounded-lg transition-colors",children:[(0,s.jsx)(i.default,{src:"/images/card/thunder.svg",alt:"",width:16,height:16}),(0,s.jsx)("span",{className:"font-medium text-sm text-white",children:N("verification.card.upgradeToUnlock")})]}),O&&(0,s.jsx)(u,{isOpen:O,onClose:()=>W(!1),status:(null==T?void 0:T.status)==="rejected"?"rejected":(null==T?void 0:T.status)==="pending"?"in-review":"verified",data:{university:null==R?void 0:R.university,degree:null==R?void 0:R.degree,department:null==R?void 0:R.department,enrollMonth:null==R?void 0:R.enroll_month,enrollYear:null==R?void 0:R.enroll_year,email:null==R?void 0:R.verification_email,uploadedDocuments:(null==R?void 0:R.documents)||(null==R?void 0:R.document_urls),submittedAt:Q(null==T?void 0:T.submitted_at),rejectionReason:null==T?void 0:T.rejection_reason,studentType:null==R?void 0:R.student_type},onEdit:()=>{W(!1),null==b||b()}}),Y&&(0,s.jsx)(m,{isOpen:Y,onClose:()=>U(!1),status:(null==z?void 0:z.status)==="rejected"?"rejected":(null==z?void 0:z.status)==="pending"?"in-review":"verified",data:{company:null==P?void 0:P.company,jobTitle:null==P?void 0:P.job_title,email:null==P?void 0:P.verification_email,uploadedDocuments:(null==P?void 0:P.documents)||(null==P?void 0:P.document_urls),submittedAt:Q(null==z?void 0:z.submitted_at),rejectionReason:null==z?void 0:z.rejection_reason},onEdit:()=>{U(!1),null==w||w()}})]})}}}]);
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.