@igamingcareer/igaming-components 1.0.71 → 1.0.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7814,7 +7814,7 @@ You can add a description to the \`${Oo}\` by passing a \`${tP}\` component as a
7814
7814
 
7815
7815
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Oo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
7816
7816
 
7817
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var n;document.getElementById((n=a.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(e)},[e,a]),null},WO=X_,ZO=J_,sP=Y_,oP=K_,cP=rP,lP=iP,dP=eP,hP=aP;const XO=WO,JO=ZO,uP=v.forwardRef(({className:a,...e},r)=>t.jsx(sP,{className:ce("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e,ref:r}));uP.displayName=sP.displayName;const pP=v.forwardRef(({className:a,...e},r)=>t.jsxs(JO,{children:[t.jsx(uP,{}),t.jsx(oP,{ref:r,className:ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...e})]}));pP.displayName=oP.displayName;const yP=({className:a,...e})=>t.jsx("div",{className:ce("flex flex-col space-y-2 text-center sm:text-left",a),...e});yP.displayName="AlertDialogHeader";const mP=({className:a,...e})=>t.jsx("div",{className:ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});mP.displayName="AlertDialogFooter";const fP=v.forwardRef(({className:a,...e},r)=>t.jsx(dP,{ref:r,className:ce("text-lg font-semibold",a),...e}));fP.displayName=dP.displayName;const xP=v.forwardRef(({className:a,...e},r)=>t.jsx(hP,{ref:r,className:ce("text-sm text-muted-foreground",a),...e}));xP.displayName=hP.displayName;const gP=v.forwardRef(({className:a,...e},r)=>t.jsx(cP,{ref:r,className:ce(Kj(),a),...e}));gP.displayName=cP.displayName;const kP=v.forwardRef(({className:a,...e},r)=>t.jsx(lP,{ref:r,className:ce(Kj({variant:"outline"}),"mt-2 sm:mt-0",a),...e}));kP.displayName=lP.displayName;function pS({open:a,onClose:e,onAdded:r,title:n,placeholder:i}){const[o,c]=j.useState("");j.useEffect(()=>{a||c("")},[a]);const l=()=>{o.trim()&&(r(o.trim()),c(""),e())};return t.jsx(mr,{open:a,onOpenChange:e,children:t.jsxs(Ta,{children:[t.jsx(fr,{children:t.jsx(Da,{children:n})}),t.jsx("div",{className:"space-y-4 py-2",children:t.jsxs("div",{children:[t.jsx(ye,{children:n}),t.jsx(We,{value:o,onChange:d=>c(d.target.value),placeholder:i||"Type and save"})]})}),t.jsxs(Ra,{children:[t.jsx(U,{variant:"outline",onClick:e,children:"Cancel"}),t.jsx(U,{onClick:l,disabled:!o.trim(),children:"Add"})]})]})})}const yS=["Product Management","Project Management","Agile","Scrum","Leadership","Communication","Stakeholder Management","Game Design","Data Analysis","Marketing Strategy","UX/UI Design","Regulatory Compliance","Casino Operations","Sportsbook Operations","Frontend Development","Backend Development","React","TypeScript","Python","SQL","Kubernetes","Cloud Infrastructure"];function YO({open:a,onClose:e,onAdded:r}){const[n,i]=j.useState(""),[o,c]=j.useState(yS),l=()=>{n.trim()&&(r(n.trim()),i(""),e())},d=h=>{i(h);const u=yS.filter(p=>p.toLowerCase().includes(h.toLowerCase()));c(u)};return t.jsx(mr,{open:a,onOpenChange:e,children:t.jsxs(Ta,{children:[t.jsx(fr,{children:t.jsx(Da,{children:"Add Skill"})}),t.jsxs("div",{className:"space-y-4 py-2",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"skill",children:"Skill Name"}),t.jsx(We,{id:"skill",placeholder:"e.g. Product Strategy",value:n,onChange:h=>d(h.target.value)})]}),n&&o.length>0&&t.jsx("div",{className:"border rounded-md p-2 space-y-1 max-h-40 overflow-y-auto",children:o.map(h=>t.jsx("div",{className:"cursor-pointer px-2 py-1 hover:bg-muted rounded-md text-sm",onClick:()=>{i(h)},children:h},h))})]}),t.jsxs(Ra,{children:[t.jsx(U,{variant:"outline",onClick:e,children:"Cancel"}),t.jsx(U,{onClick:l,disabled:!n.trim(),children:"Add Skill"})]})]})})}const mS=["Regulation","Technology","Market Trends","Responsible Gaming","Game Design","Payments","Marketing","AI in iGaming","Player Retention","Security"];function KO({open:a,onClose:e,onAdded:r}){const[n,i]=j.useState(""),[o,c]=j.useState(mS),l=()=>{n.trim()&&(r(n.trim()),i(""),e())},d=h=>{i(h),c(mS.filter(u=>u.toLowerCase().includes(h.toLowerCase())))};return t.jsx(mr,{open:a,onOpenChange:e,children:t.jsxs(Ta,{children:[t.jsx(fr,{children:t.jsx(Da,{children:"Add Interested Topic"})}),t.jsxs("div",{className:"space-y-4 py-2",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"topic",children:"Topic"}),t.jsx(We,{id:"topic",placeholder:"e.g. Game Design",value:n,onChange:h=>d(h.target.value)})]}),n&&o.length>0&&t.jsx("div",{className:"border rounded-md p-2 space-y-1 max-h-40 overflow-y-auto",children:o.map(h=>t.jsx("div",{className:"cursor-pointer px-2 py-1 hover:bg-muted rounded-md text-sm",onClick:()=>i(h),children:h},h))})]}),t.jsxs(Ra,{children:[t.jsx(U,{variant:"outline",onClick:e,children:"Cancel"}),t.jsx(U,{onClick:l,disabled:!n.trim(),children:"Add Topic"})]})]})})}const QO=["English","Spanish","French","German","Italian","Portuguese","Polish","Turkish","Swedish","Norwegian","Finnish","Danish","Dutch","Japanese","Chinese","Korean"],eV=["Native","Fluent","Intermediate","Basic"];function tV({open:a,onClose:e,onAdded:r}){const[n,i]=j.useState({name:"",proficiency:""}),o=()=>{if(!n.name||!n.proficiency)return;const c={name:n.name,proficiency:n.proficiency};r(c),i({name:"",proficiency:""}),e()};return t.jsx(mr,{open:a,onOpenChange:e,children:t.jsxs(Ta,{children:[t.jsx(fr,{children:t.jsx(Da,{children:"Add Language"})}),t.jsxs("div",{className:"space-y-4 py-2",children:[t.jsxs("div",{children:[t.jsx(ye,{children:"Language"}),t.jsxs(Yc,{value:n.name,onValueChange:c=>i(l=>({...l,name:c})),children:[t.jsx(Jo,{children:t.jsx(Kc,{placeholder:"Select a language"})}),t.jsx(Yo,{children:QO.map(c=>t.jsx(Ko,{value:c,children:c},c))})]})]}),t.jsxs("div",{children:[t.jsx(ye,{children:"Proficiency"}),t.jsxs(Yc,{value:n.proficiency,onValueChange:c=>i(l=>({...l,proficiency:c})),children:[t.jsx(Jo,{children:t.jsx(Kc,{placeholder:"Select proficiency"})}),t.jsx(Yo,{children:eV.map(c=>t.jsx(Ko,{value:c,children:c},c))})]})]})]}),t.jsxs(Ra,{children:[t.jsx(U,{variant:"outline",onClick:e,children:"Cancel"}),t.jsx(U,{onClick:o,disabled:!n.name||!n.proficiency,children:"Add"})]})]})})}function aV({profile:a,onUpdate:e,isSaving:r=!1}){const[n,i]=j.useState(a),[o,c]=j.useState(!1),[l,d]=j.useState(null),[h,u]=j.useState(null),[p,f]=j.useState(null),[m,g]=j.useState(!1),[y,x]=j.useState(!1),[k,w]=j.useState(!1),[M,L]=j.useState(!1),[b,I]=j.useState(!1),S=["Full-time","Part-time","Contract","Freelance","Internship","Temporary"],C=["English","Spanish","French","German","Italian","Portuguese","Polish","Turkish","Swedish","Norwegian","Finnish","Danish","Dutch","Japanese","Chinese","Korean"],N=()=>{l&&(i(_=>{const q={..._,workExperience:_.workExperience.filter(z=>z.id!==l)};return e({type:"profile",payload:q}),q}),d(null))},T=(_,q,z)=>{i(V=>({...V,[_]:{...V[_],[q]:z}}))},R=(_,q,z)=>{i(V=>({...V,[_]:{...V[_],[q]:z}}))},D=()=>{e({type:"profile",payload:n})};return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-3xl font-bold",children:"Your Profile"}),t.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your professional information"})]}),t.jsx(U,{onClick:D,disabled:r,children:r?"Saving...":"Save Changes"})]}),t.jsxs(co,{defaultValue:"personal",className:"w-full",children:[t.jsxs(pr,{className:"grid w-full grid-cols-3 lg:grid-cols-7",children:[t.jsx(Ie,{value:"personal",children:"Personal"}),t.jsx(Ie,{value:"experience",children:"Experience"}),t.jsx(Ie,{value:"job-search",children:"Job Search"}),t.jsx(Ie,{value:"skills",children:"Skills"}),t.jsx(Ie,{value:"languages",children:"Languages"}),t.jsx(Ie,{value:"alerts",children:"Alerts"}),t.jsx(Ie,{value:"preferences",children:"Preferences"})]}),t.jsx(Ne,{value:"personal",children:t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Personal Details"}),t.jsx(Be,{children:"Update your personal information"})]}),t.jsx(je,{className:"space-y-4",children:t.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"fullName",children:"Full Name"}),t.jsx(We,{id:"fullName",value:n.personalDetails.fullName,onChange:_=>T("personalDetails","fullName",_.target.value)})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"email",children:"Email"}),t.jsx(We,{id:"email",type:"email",value:n.personalDetails.email,onChange:_=>T("personalDetails","email",_.target.value)})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"phone",children:"Phone"}),t.jsx(We,{id:"phone",value:n.personalDetails.phone,onChange:_=>T("personalDetails","phone",_.target.value)})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"location",children:"Location"}),t.jsx(We,{id:"location",value:n.personalDetails.location,onChange:_=>T("personalDetails","location",_.target.value)})]})]})})]})}),t.jsx(Ne,{value:"experience",children:t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Work Experience"}),t.jsx(Be,{children:"Your iGaming industry experience"})]}),t.jsxs(je,{className:"space-y-4",children:[n.workExperience.map(_=>t.jsxs("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:[t.jsxs("div",{className:"flex justify-between items-start",children:[t.jsxs("div",{children:[t.jsx("h4",{className:"font-semibold",children:_.title}),t.jsx("p",{className:"text-sm text-muted-foreground",children:_.company}),t.jsx("p",{className:"text-xs text-muted-foreground",children:_.period}),_.location&&t.jsx("p",{className:"text-xs text-muted-foreground",children:_.location})]}),t.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[t.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const q=n.workExperience.find(z=>z.id===_.id);f(q||null),c(!0)},children:"Edit"}),t.jsx(U,{variant:"destructive",size:"sm",onClick:()=>d(_.id),children:"Delete"})]})]}),t.jsx("div",{className:"flex flex-wrap gap-2",children:_.tags.map(q=>t.jsx(at,{variant:"secondary",children:q},q))}),_.summary&&t.jsx("p",{className:"text-sm text-muted-foreground",children:_.summary})]},_.id)),t.jsx(U,{variant:"outline",className:"w-full",onClick:()=>c(!0),children:"Add Experience"})]})]})}),t.jsx(TO,{open:o,onClose:()=>{c(!1),f(null)},existingExperience:p,onAdded:_=>{i(q=>({...q,workExperience:[...q.workExperience,_]}))},onUpdated:_=>{i(q=>({...q,workExperience:q.workExperience.map(z=>z.id===_.id?_:z)}))}}),t.jsx(XO,{open:!!l,onOpenChange:()=>d(null),children:t.jsxs(pP,{children:[t.jsxs(yP,{children:[t.jsx(fP,{children:"Delete Experience"}),t.jsx(xP,{children:"Are you sure you want to delete this work experience? This action cannot be undone."})]}),t.jsxs(mP,{children:[t.jsx(kP,{children:"Cancel"}),t.jsx(gP,{onClick:N,className:"bg-destructive text-white",children:"Delete"})]})]})}),t.jsxs(Ne,{value:"job-search",children:[t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Job Search Details"}),t.jsx(Be,{children:"Define your ideal job preferences"})]}),t.jsxs(je,{className:"space-y-6",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{children:"Desired Roles"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:n.jobSearchDetails.desiredRoles.map(_=>t.jsxs(at,{variant:"secondary",children:[_,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(q=>({...q,jobSearchDetails:{...q.jobSearchDetails,desiredRoles:Array.from(new Set([...q.jobSearchDetails.desiredRoles,_]))}})),children:"✕"})]},_))}),t.jsx(U,{variant:"outline",size:"sm",onClick:()=>g(!0),children:"Add Role"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{children:"Preferred Locations"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:n.jobSearchDetails.locations.map(_=>t.jsxs(at,{variant:"secondary",children:[_,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(q=>({...q,jobSearchDetails:{...q.jobSearchDetails,locations:q.jobSearchDetails.locations.filter(z=>z!==_)}})),children:"✕"})]},_))}),t.jsx(U,{variant:"outline",size:"sm",onClick:()=>x(!0),children:"Add Location"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{children:"Employment Type"}),t.jsxs(AO,{children:[t.jsx(_O,{asChild:!0,children:t.jsx(U,{variant:"outline",className:"w-full justify-between",children:n.jobSearchDetails.employmentType.length>0?n.jobSearchDetails.employmentType.join(", "):"Select Employment Type"})}),t.jsx($_,{className:"w-64 p-2 space-y-2",children:S.map(_=>{const q=n.jobSearchDetails.employmentType.includes(_);return t.jsxs("div",{className:"flex items-center space-x-2",onClick:()=>i(z=>{const G=z.jobSearchDetails.employmentType.includes(_)?z.jobSearchDetails.employmentType.filter(E=>E!==_):[...z.jobSearchDetails.employmentType,_];return{...z,jobSearchDetails:{...z.jobSearchDetails,employmentType:G}}}),children:[t.jsx(GC,{checked:q}),t.jsx(ye,{className:"text-sm",children:_})]},_)})})]})]})]})]}),t.jsx(pS,{open:m,onClose:()=>g(!1),title:"Add Desired Role",placeholder:"e.g. Senior Product Manager",onAdded:_=>i(q=>({...q,jobSearchDetails:{...q.jobSearchDetails,desiredRoles:[...q.jobSearchDetails.desiredRoles,_]}}))}),t.jsx(pS,{open:y,onClose:()=>x(!1),title:"Add Preferred Location",placeholder:"e.g. Malta or Remote",onAdded:_=>i(q=>({...q,jobSearchDetails:{...q.jobSearchDetails,locations:[...q.jobSearchDetails.locations,_]}}))})]}),t.jsxs(Ne,{value:"skills",children:[t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Skill Set"}),t.jsx(Be,{children:"Your professional skills and expertise"})]}),t.jsxs(je,{className:"space-y-4",children:[t.jsx("div",{className:"flex flex-wrap gap-2",children:n.skills.map(_=>t.jsxs(at,{variant:"secondary",className:"flex items-center gap-1",children:[_,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(q=>({...q,skills:q.skills.filter(z=>z!==_)})),children:"✕"})]},_))}),t.jsx(U,{variant:"outline",onClick:()=>w(!0),children:"Add Skill"})]})]}),t.jsx(YO,{open:k,onClose:()=>w(!1),onAdded:_=>i(q=>({...q,skills:Array.from(new Set([...q.skills,_]))}))})]}),t.jsxs(Ne,{value:"languages",children:[t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Languages"}),t.jsx(Be,{children:"Your spoken and professional languages"})]}),t.jsxs(je,{className:"space-y-4",children:[t.jsx("div",{className:"flex flex-wrap gap-2",children:n.languages.map((_,q)=>t.jsxs(at,{variant:"secondary",className:"flex items-center gap-1",children:[_.name," — ",_.proficiency,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(z=>({...z,languages:z.languages.filter((V,G)=>G!==q)})),children:"✕"})]},`${_.name}-${q}`))}),t.jsx(U,{variant:"outline",onClick:()=>I(!0),children:"Add Language"})]})]}),t.jsx(tV,{open:b,onClose:()=>I(!1),onAdded:_=>i(q=>({...q,languages:[...q.languages,_]}))})]}),t.jsx(Ne,{value:"alerts",children:t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Alerts & Subscriptions"}),t.jsx(Be,{children:"Manage your notification preferences"})]}),t.jsxs(je,{className:"space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx(ye,{htmlFor:"job-alerts",className:"text-base",children:"Job Alerts"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Get notified about new job matches"})]}),t.jsx(Kt,{id:"job-alerts",checked:n.alerts.jobAlerts,onCheckedChange:_=>R("alerts","jobAlerts",_)})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx(ye,{htmlFor:"course-alerts",className:"text-base",children:"Course Alerts"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Updates on new courses and training"})]}),t.jsx(Kt,{id:"course-alerts",checked:n.alerts.courseAlerts,onCheckedChange:_=>R("alerts","courseAlerts",_)})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx(ye,{htmlFor:"news-alerts",className:"text-base",children:"News Alerts"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Industry news and updates"})]}),t.jsx(Kt,{id:"news-alerts",checked:n.alerts.newsAlerts,onCheckedChange:_=>R("alerts","newsAlerts",_)})]})]})]})}),t.jsxs(Ne,{value:"preferences",children:[t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Preferences"}),t.jsx(Be,{children:"Customize your platform experience"})]}),t.jsxs(je,{className:"space-y-6",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{children:"Interested Topics"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:n.preferences.topics.map(_=>t.jsxs(at,{variant:"secondary",className:"flex items-center gap-1",children:[_,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(q=>({...q,preferences:{...q.preferences,topics:q.preferences.topics.filter(z=>z!==_)}})),children:"✕"})]},_))}),t.jsx(U,{variant:"outline",size:"sm",onClick:()=>L(!0),children:"Manage Topics"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"language",children:"Language"}),t.jsxs(Yc,{value:n.preferences.language,onValueChange:_=>T("preferences","language",_),children:[t.jsx(Jo,{id:"language",children:t.jsx(Kc,{placeholder:"Select your preferred language"})}),t.jsx(Yo,{children:C.map(_=>t.jsx(Ko,{value:_,children:_},_))})]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx(ye,{htmlFor:"email-notif",className:"text-base",children:"Email Notifications"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive updates via email"})]}),t.jsx(Kt,{id:"email-notif",checked:n.preferences.emailNotifications,onCheckedChange:_=>R("preferences","emailNotifications",_)})]})]})]}),t.jsx(KO,{open:M,onClose:()=>L(!1),onAdded:_=>i(q=>({...q,preferences:{...q.preferences,topics:Array.from(new Set([...q.preferences.topics,_]))}}))})]})]})]})}const rV=a=>a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(1)} KB`:`${(a/(1024*1024)).toFixed(1)} MB`,fS=800;function nV({onCVChange:a,previewText:e,previewStatus:r="idle",previewErrorMessage:n}){const[i,o]=j.useState(!1),[c,l]=j.useState(null),[d,h]=j.useState(null),[u,p]=j.useState(null),[f,m]=j.useState(!1);j.useEffect(()=>()=>{d&&URL.revokeObjectURL(d)},[d]);const g=j.useMemo(()=>c?{name:c.name,size:rV(c.size),lastModified:new Date(c.lastModified).toLocaleDateString()}:null,[c]),y=async L=>{var S;const b=(S=L.target.files)==null?void 0:S[0];if(!b)return;if(b.type!=="application/pdf"){p("Only PDF files are supported.");return}d&&URL.revokeObjectURL(d);const I=URL.createObjectURL(b);l(b),h(I),m(!1),a(b)},x=()=>{d&&URL.revokeObjectURL(d),l(null),h(null),p(null),m(!1),a(null)},k=(e==null?void 0:e.replace(/\s{2,}/g," ").replace(/\n{3,}/g,`
7817
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var n;document.getElementById((n=a.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(e)},[e,a]),null},WO=X_,ZO=J_,sP=Y_,oP=K_,cP=rP,lP=iP,dP=eP,hP=aP;const XO=WO,JO=ZO,uP=v.forwardRef(({className:a,...e},r)=>t.jsx(sP,{className:ce("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e,ref:r}));uP.displayName=sP.displayName;const pP=v.forwardRef(({className:a,...e},r)=>t.jsxs(JO,{children:[t.jsx(uP,{}),t.jsx(oP,{ref:r,className:ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...e})]}));pP.displayName=oP.displayName;const yP=({className:a,...e})=>t.jsx("div",{className:ce("flex flex-col space-y-2 text-center sm:text-left",a),...e});yP.displayName="AlertDialogHeader";const mP=({className:a,...e})=>t.jsx("div",{className:ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});mP.displayName="AlertDialogFooter";const fP=v.forwardRef(({className:a,...e},r)=>t.jsx(dP,{ref:r,className:ce("text-lg font-semibold",a),...e}));fP.displayName=dP.displayName;const xP=v.forwardRef(({className:a,...e},r)=>t.jsx(hP,{ref:r,className:ce("text-sm text-muted-foreground",a),...e}));xP.displayName=hP.displayName;const gP=v.forwardRef(({className:a,...e},r)=>t.jsx(cP,{ref:r,className:ce(Kj(),a),...e}));gP.displayName=cP.displayName;const kP=v.forwardRef(({className:a,...e},r)=>t.jsx(lP,{ref:r,className:ce(Kj({variant:"outline"}),"mt-2 sm:mt-0",a),...e}));kP.displayName=lP.displayName;function pS({open:a,onClose:e,onAdded:r,title:n,placeholder:i}){const[o,c]=j.useState("");j.useEffect(()=>{a||c("")},[a]);const l=()=>{o.trim()&&(r(o.trim()),c(""),e())};return t.jsx(mr,{open:a,onOpenChange:e,children:t.jsxs(Ta,{children:[t.jsx(fr,{children:t.jsx(Da,{children:n})}),t.jsx("div",{className:"space-y-4 py-2",children:t.jsxs("div",{children:[t.jsx(ye,{children:n}),t.jsx(We,{value:o,onChange:d=>c(d.target.value),placeholder:i||"Type and save"})]})}),t.jsxs(Ra,{children:[t.jsx(U,{variant:"outline",onClick:e,children:"Cancel"}),t.jsx(U,{onClick:l,disabled:!o.trim(),children:"Add"})]})]})})}const yS=["Product Management","Project Management","Agile","Scrum","Leadership","Communication","Stakeholder Management","Game Design","Data Analysis","Marketing Strategy","UX/UI Design","Regulatory Compliance","Casino Operations","Sportsbook Operations","Frontend Development","Backend Development","React","TypeScript","Python","SQL","Kubernetes","Cloud Infrastructure"];function YO({open:a,onClose:e,onAdded:r}){const[n,i]=j.useState(""),[o,c]=j.useState(yS),l=()=>{n.trim()&&(r(n.trim()),i(""),e())},d=h=>{i(h);const u=yS.filter(p=>p.toLowerCase().includes(h.toLowerCase()));c(u)};return t.jsx(mr,{open:a,onOpenChange:e,children:t.jsxs(Ta,{children:[t.jsx(fr,{children:t.jsx(Da,{children:"Add Skill"})}),t.jsxs("div",{className:"space-y-4 py-2",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"skill",children:"Skill Name"}),t.jsx(We,{id:"skill",placeholder:"e.g. Product Strategy",value:n,onChange:h=>d(h.target.value)})]}),n&&o.length>0&&t.jsx("div",{className:"border rounded-md p-2 space-y-1 max-h-40 overflow-y-auto",children:o.map(h=>t.jsx("div",{className:"cursor-pointer px-2 py-1 hover:bg-muted rounded-md text-sm",onClick:()=>{i(h)},children:h},h))})]}),t.jsxs(Ra,{children:[t.jsx(U,{variant:"outline",onClick:e,children:"Cancel"}),t.jsx(U,{onClick:l,disabled:!n.trim(),children:"Add Skill"})]})]})})}const mS=["Regulation","Technology","Market Trends","Responsible Gaming","Game Design","Payments","Marketing","AI in iGaming","Player Retention","Security"];function KO({open:a,onClose:e,onAdded:r}){const[n,i]=j.useState(""),[o,c]=j.useState(mS),l=()=>{n.trim()&&(r(n.trim()),i(""),e())},d=h=>{i(h),c(mS.filter(u=>u.toLowerCase().includes(h.toLowerCase())))};return t.jsx(mr,{open:a,onOpenChange:e,children:t.jsxs(Ta,{children:[t.jsx(fr,{children:t.jsx(Da,{children:"Add Interested Topic"})}),t.jsxs("div",{className:"space-y-4 py-2",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"topic",children:"Topic"}),t.jsx(We,{id:"topic",placeholder:"e.g. Game Design",value:n,onChange:h=>d(h.target.value)})]}),n&&o.length>0&&t.jsx("div",{className:"border rounded-md p-2 space-y-1 max-h-40 overflow-y-auto",children:o.map(h=>t.jsx("div",{className:"cursor-pointer px-2 py-1 hover:bg-muted rounded-md text-sm",onClick:()=>i(h),children:h},h))})]}),t.jsxs(Ra,{children:[t.jsx(U,{variant:"outline",onClick:e,children:"Cancel"}),t.jsx(U,{onClick:l,disabled:!n.trim(),children:"Add Topic"})]})]})})}const QO=["English","Spanish","French","German","Italian","Portuguese","Polish","Turkish","Swedish","Norwegian","Finnish","Danish","Dutch","Japanese","Chinese","Korean"],eV=["Native","Fluent","Intermediate","Basic"];function tV({open:a,onClose:e,onAdded:r}){const[n,i]=j.useState({name:"",proficiency:""}),o=()=>{if(!n.name||!n.proficiency)return;const c={name:n.name,proficiency:n.proficiency};r(c),i({name:"",proficiency:""}),e()};return t.jsx(mr,{open:a,onOpenChange:e,children:t.jsxs(Ta,{children:[t.jsx(fr,{children:t.jsx(Da,{children:"Add Language"})}),t.jsxs("div",{className:"space-y-4 py-2",children:[t.jsxs("div",{children:[t.jsx(ye,{children:"Language"}),t.jsxs(Yc,{value:n.name,onValueChange:c=>i(l=>({...l,name:c})),children:[t.jsx(Jo,{children:t.jsx(Kc,{placeholder:"Select a language"})}),t.jsx(Yo,{children:QO.map(c=>t.jsx(Ko,{value:c,children:c},c))})]})]}),t.jsxs("div",{children:[t.jsx(ye,{children:"Proficiency"}),t.jsxs(Yc,{value:n.proficiency,onValueChange:c=>i(l=>({...l,proficiency:c})),children:[t.jsx(Jo,{children:t.jsx(Kc,{placeholder:"Select proficiency"})}),t.jsx(Yo,{children:eV.map(c=>t.jsx(Ko,{value:c,children:c},c))})]})]})]}),t.jsxs(Ra,{children:[t.jsx(U,{variant:"outline",onClick:e,children:"Cancel"}),t.jsx(U,{onClick:o,disabled:!n.name||!n.proficiency,children:"Add"})]})]})})}function aV({profile:a,onUpdate:e,isSaving:r=!1}){const[n,i]=j.useState(a),[o,c]=j.useState(!1),[l,d]=j.useState(null),[h,u]=j.useState(null),[p,f]=j.useState(null),[m,g]=j.useState(!1),[y,x]=j.useState(!1),[k,w]=j.useState(!1),[M,L]=j.useState(!1),[b,I]=j.useState(!1),S=["Full-time","Part-time","Contract","Freelance","Internship","Temporary"],C=["English","Spanish","French","German","Italian","Portuguese","Polish","Turkish","Swedish","Norwegian","Finnish","Danish","Dutch","Japanese","Chinese","Korean"],N=()=>{l&&(i(_=>{const q={..._,workExperience:_.workExperience.filter(z=>z.id!==l)};return e({type:"profile",payload:q}),q}),d(null))},T=(_,q,z)=>{i(V=>({...V,[_]:{...V[_],[q]:z}}))},R=(_,q,z)=>{i(V=>({...V,[_]:{...V[_],[q]:z}}))},D=()=>{e({type:"profile",payload:n})};return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-3xl font-bold",children:"Your Profile"}),t.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your professional information"})]}),t.jsx(U,{onClick:D,disabled:r,children:r?"Saving...":"Save Changes"})]}),t.jsxs(co,{defaultValue:"personal",className:"w-full",children:[t.jsxs(pr,{className:"grid w-full grid-cols-3 lg:grid-cols-7",children:[t.jsx(Ie,{value:"personal",children:"Personal"}),t.jsx(Ie,{value:"experience",children:"Experience"}),t.jsx(Ie,{value:"job-search",children:"Job Search"}),t.jsx(Ie,{value:"skills",children:"Skills"}),t.jsx(Ie,{value:"languages",children:"Languages"}),t.jsx(Ie,{value:"alerts",children:"Alerts"}),t.jsx(Ie,{value:"preferences",children:"Preferences"})]}),t.jsx(Ne,{value:"personal",children:t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Personal Details"}),t.jsx(Be,{children:"Update your personal information"})]}),t.jsx(je,{className:"space-y-4",children:t.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"fullName",children:"Full Name"}),t.jsx(We,{id:"fullName",value:n.personalDetails.fullName??"",onChange:_=>T("personalDetails","fullName",_.target.value)})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"email",children:"Email"}),t.jsx(We,{id:"email",type:"email",value:n.personalDetails.email??"",onChange:_=>T("personalDetails","email",_.target.value)})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"phone",children:"Phone"}),t.jsx(We,{id:"phone",value:n.personalDetails.phone??"",onChange:_=>T("personalDetails","phone",_.target.value)})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"location",children:"Location"}),t.jsx(We,{id:"location",value:n.personalDetails.location??"",onChange:_=>T("personalDetails","location",_.target.value)})]})]})})]})}),t.jsx(Ne,{value:"experience",children:t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Work Experience"}),t.jsx(Be,{children:"Your iGaming industry experience"})]}),t.jsxs(je,{className:"space-y-4",children:[n.workExperience.map(_=>t.jsxs("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:[t.jsxs("div",{className:"flex justify-between items-start",children:[t.jsxs("div",{children:[t.jsx("h4",{className:"font-semibold",children:_.title}),t.jsx("p",{className:"text-sm text-muted-foreground",children:_.company}),t.jsx("p",{className:"text-xs text-muted-foreground",children:_.period}),_.location&&t.jsx("p",{className:"text-xs text-muted-foreground",children:_.location})]}),t.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[t.jsx(U,{variant:"outline",size:"sm",onClick:()=>{const q=n.workExperience.find(z=>z.id===_.id);f(q||null),c(!0)},children:"Edit"}),t.jsx(U,{variant:"destructive",size:"sm",onClick:()=>d(_.id),children:"Delete"})]})]}),t.jsx("div",{className:"flex flex-wrap gap-2",children:_.tags.map(q=>t.jsx(at,{variant:"secondary",children:q},q))}),_.summary&&t.jsx("p",{className:"text-sm text-muted-foreground",children:_.summary})]},_.id)),t.jsx(U,{variant:"outline",className:"w-full",onClick:()=>c(!0),children:"Add Experience"})]})]})}),t.jsx(TO,{open:o,onClose:()=>{c(!1),f(null)},existingExperience:p,onAdded:_=>{i(q=>({...q,workExperience:[...q.workExperience,_]}))},onUpdated:_=>{i(q=>({...q,workExperience:q.workExperience.map(z=>z.id===_.id?_:z)}))}}),t.jsx(XO,{open:!!l,onOpenChange:()=>d(null),children:t.jsxs(pP,{children:[t.jsxs(yP,{children:[t.jsx(fP,{children:"Delete Experience"}),t.jsx(xP,{children:"Are you sure you want to delete this work experience? This action cannot be undone."})]}),t.jsxs(mP,{children:[t.jsx(kP,{children:"Cancel"}),t.jsx(gP,{onClick:N,className:"bg-destructive text-white",children:"Delete"})]})]})}),t.jsxs(Ne,{value:"job-search",children:[t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Job Search Details"}),t.jsx(Be,{children:"Define your ideal job preferences"})]}),t.jsxs(je,{className:"space-y-6",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{children:"Desired Roles"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:n.jobSearchDetails.desiredRoles.map(_=>t.jsxs(at,{variant:"secondary",children:[_,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(q=>({...q,jobSearchDetails:{...q.jobSearchDetails,desiredRoles:Array.from(new Set([...q.jobSearchDetails.desiredRoles,_]))}})),children:"✕"})]},_))}),t.jsx(U,{variant:"outline",size:"sm",onClick:()=>g(!0),children:"Add Role"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{children:"Preferred Locations"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:n.jobSearchDetails.locations.map(_=>t.jsxs(at,{variant:"secondary",children:[_,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(q=>({...q,jobSearchDetails:{...q.jobSearchDetails,locations:q.jobSearchDetails.locations.filter(z=>z!==_)}})),children:"✕"})]},_))}),t.jsx(U,{variant:"outline",size:"sm",onClick:()=>x(!0),children:"Add Location"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{children:"Employment Type"}),t.jsxs(AO,{children:[t.jsx(_O,{asChild:!0,children:t.jsx(U,{variant:"outline",className:"w-full justify-between",children:n.jobSearchDetails.employmentType.length>0?n.jobSearchDetails.employmentType.join(", "):"Select Employment Type"})}),t.jsx($_,{className:"w-64 p-2 space-y-2",children:S.map(_=>{const q=n.jobSearchDetails.employmentType.includes(_);return t.jsxs("div",{className:"flex items-center space-x-2",onClick:()=>i(z=>{const G=z.jobSearchDetails.employmentType.includes(_)?z.jobSearchDetails.employmentType.filter(E=>E!==_):[...z.jobSearchDetails.employmentType,_];return{...z,jobSearchDetails:{...z.jobSearchDetails,employmentType:G}}}),children:[t.jsx(GC,{checked:q}),t.jsx(ye,{className:"text-sm",children:_})]},_)})})]})]})]})]}),t.jsx(pS,{open:m,onClose:()=>g(!1),title:"Add Desired Role",placeholder:"e.g. Senior Product Manager",onAdded:_=>i(q=>({...q,jobSearchDetails:{...q.jobSearchDetails,desiredRoles:[...q.jobSearchDetails.desiredRoles,_]}}))}),t.jsx(pS,{open:y,onClose:()=>x(!1),title:"Add Preferred Location",placeholder:"e.g. Malta or Remote",onAdded:_=>i(q=>({...q,jobSearchDetails:{...q.jobSearchDetails,locations:[...q.jobSearchDetails.locations,_]}}))})]}),t.jsxs(Ne,{value:"skills",children:[t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Skill Set"}),t.jsx(Be,{children:"Your professional skills and expertise"})]}),t.jsxs(je,{className:"space-y-4",children:[t.jsx("div",{className:"flex flex-wrap gap-2",children:n.skills.map(_=>t.jsxs(at,{variant:"secondary",className:"flex items-center gap-1",children:[_,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(q=>({...q,skills:q.skills.filter(z=>z!==_)})),children:"✕"})]},_))}),t.jsx(U,{variant:"outline",onClick:()=>w(!0),children:"Add Skill"})]})]}),t.jsx(YO,{open:k,onClose:()=>w(!1),onAdded:_=>i(q=>({...q,skills:Array.from(new Set([...q.skills,_]))}))})]}),t.jsxs(Ne,{value:"languages",children:[t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Languages"}),t.jsx(Be,{children:"Your spoken and professional languages"})]}),t.jsxs(je,{className:"space-y-4",children:[t.jsx("div",{className:"flex flex-wrap gap-2",children:n.languages.map((_,q)=>t.jsxs(at,{variant:"secondary",className:"flex items-center gap-1",children:[_.name," — ",_.proficiency,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(z=>({...z,languages:z.languages.filter((V,G)=>G!==q)})),children:"✕"})]},`${_.name}-${q}`))}),t.jsx(U,{variant:"outline",onClick:()=>I(!0),children:"Add Language"})]})]}),t.jsx(tV,{open:b,onClose:()=>I(!1),onAdded:_=>i(q=>({...q,languages:[...q.languages,_]}))})]}),t.jsx(Ne,{value:"alerts",children:t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Alerts & Subscriptions"}),t.jsx(Be,{children:"Manage your notification preferences"})]}),t.jsxs(je,{className:"space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx(ye,{htmlFor:"job-alerts",className:"text-base",children:"Job Alerts"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Get notified about new job matches"})]}),t.jsx(Kt,{id:"job-alerts",checked:n.alerts.jobAlerts,onCheckedChange:_=>R("alerts","jobAlerts",_)})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx(ye,{htmlFor:"course-alerts",className:"text-base",children:"Course Alerts"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Updates on new courses and training"})]}),t.jsx(Kt,{id:"course-alerts",checked:n.alerts.courseAlerts,onCheckedChange:_=>R("alerts","courseAlerts",_)})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx(ye,{htmlFor:"news-alerts",className:"text-base",children:"News Alerts"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Industry news and updates"})]}),t.jsx(Kt,{id:"news-alerts",checked:n.alerts.newsAlerts,onCheckedChange:_=>R("alerts","newsAlerts",_)})]})]})]})}),t.jsxs(Ne,{value:"preferences",children:[t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsx(Re,{children:"Preferences"}),t.jsx(Be,{children:"Customize your platform experience"})]}),t.jsxs(je,{className:"space-y-6",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{children:"Interested Topics"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:n.preferences.topics.map(_=>t.jsxs(at,{variant:"secondary",className:"flex items-center gap-1",children:[_,t.jsx(U,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>i(q=>({...q,preferences:{...q.preferences,topics:q.preferences.topics.filter(z=>z!==_)}})),children:"✕"})]},_))}),t.jsx(U,{variant:"outline",size:"sm",onClick:()=>L(!0),children:"Manage Topics"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(ye,{htmlFor:"language",children:"Language"}),t.jsxs(Yc,{value:n.preferences.language,onValueChange:_=>T("preferences","language",_),children:[t.jsx(Jo,{id:"language",children:t.jsx(Kc,{placeholder:"Select your preferred language"})}),t.jsx(Yo,{children:C.map(_=>t.jsx(Ko,{value:_,children:_},_))})]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx(ye,{htmlFor:"email-notif",className:"text-base",children:"Email Notifications"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive updates via email"})]}),t.jsx(Kt,{id:"email-notif",checked:n.preferences.emailNotifications,onCheckedChange:_=>R("preferences","emailNotifications",_)})]})]})]}),t.jsx(KO,{open:M,onClose:()=>L(!1),onAdded:_=>i(q=>({...q,preferences:{...q.preferences,topics:Array.from(new Set([...q.preferences.topics,_]))}}))})]})]})]})}const rV=a=>a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(1)} KB`:`${(a/(1024*1024)).toFixed(1)} MB`,fS=800;function nV({onCVChange:a,previewText:e,previewStatus:r="idle",previewErrorMessage:n}){const[i,o]=j.useState(!1),[c,l]=j.useState(null),[d,h]=j.useState(null),[u,p]=j.useState(null),[f,m]=j.useState(!1);j.useEffect(()=>()=>{d&&URL.revokeObjectURL(d)},[d]);const g=j.useMemo(()=>c?{name:c.name,size:rV(c.size),lastModified:new Date(c.lastModified).toLocaleDateString()}:null,[c]),y=async L=>{var S;const b=(S=L.target.files)==null?void 0:S[0];if(!b)return;if(b.type!=="application/pdf"){p("Only PDF files are supported.");return}d&&URL.revokeObjectURL(d);const I=URL.createObjectURL(b);l(b),h(I),m(!1),a(b)},x=()=>{d&&URL.revokeObjectURL(d),l(null),h(null),p(null),m(!1),a(null)},k=(e==null?void 0:e.replace(/\s{2,}/g," ").replace(/\n{3,}/g,`
7818
7818
 
7819
7819
  `).trim())??"",w=k.length>fS,M=f?k:w?`${k.slice(0,fS)}…`:k;return t.jsxs(mr,{open:i,onOpenChange:o,children:[t.jsx(Xz,{asChild:!0,children:t.jsxs(U,{children:[t.jsx(Za,{className:"h-4 w-4 mr-2"}),"Upload CV"]})}),t.jsxs(Ta,{className:"sm:max-w-2xl",children:[t.jsxs(fr,{children:[t.jsx(Da,{children:"Upload your CV"}),t.jsx(z9,{children:"Add a PDF so we can extract key details and keep it ready for job applications."})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(We,{type:"file",accept:"application/pdf",onChange:y}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Accepted format: PDF only. Text extraction should be handled by the host application if needed."})]}),u&&t.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u}),c&&g&&t.jsxs("div",{className:"rounded-md border border-muted p-4 space-y-3",children:[t.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(wc,{className:"h-5 w-5 text-primary"}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium",children:g.name}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.size," • Updated ",g.lastModified]})]})]}),t.jsx(at,{variant:"secondary",children:"Stored"})]}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[d&&t.jsx(U,{variant:"outline",size:"sm",asChild:!0,children:t.jsx("a",{href:d,target:"_blank",rel:"noreferrer",children:"View PDF"})}),t.jsxs(U,{variant:"destructive",size:"sm",onClick:x,children:[t.jsx(Ro,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]}),t.jsxs("div",{className:"rounded-md border border-muted p-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("p",{className:"font-medium",children:"Extracted preview"}),r==="parsing"&&t.jsx(at,{variant:"outline",children:"Parsing..."})]}),r==="error"?t.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:n||"Text preview is unavailable for this file."}):M?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mt-2 max-h-48 overflow-y-auto rounded-md border bg-muted/30 p-2",children:t.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:M})}),w&&t.jsx(U,{variant:"link",size:"sm",className:"px-0",onClick:()=>m(L=>!L),children:f?"Show less":"Show full text"})]}):t.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Upload a PDF to preview extracted text from the host app."})]})]}),t.jsx(Ra,{children:t.jsx(U,{variant:"outline",onClick:()=>o(!1),children:"Close"})})]})]})}function iV({savedJobs:a,applications:e,recommendedJobs:r,onApply:n,onRemove:i,onUploadCV:o,cvPreviewText:c,cvPreviewStatus:l,cvPreviewErrorMessage:d,onSetAlert:h,onUpdateProfile:u}){const p=M=>({savedJobs:M.saved,recommendedJobs:M.recommended,applications:M.applications}),[f,m]=j.useState({saved:a||[],recommended:r||[],applications:e||[]});j.useEffect(()=>{m({saved:a||[],recommended:r||[],applications:e||[]})},[a,r,e]);const g=M=>{m(L=>{if(L.saved.some(S=>S.id===M.id))return L;const I={...L,saved:[...L.saved,M]};return u==null||u({type:"jobs",payload:p(I)}),I})},y=M=>{m(L=>{const b={...L,saved:L.saved.filter(I=>I.id!==M)};return u==null||u({type:"jobs",payload:p(b)}),b})},x=M=>{m(L=>{const b={...L,recommended:L.recommended.filter(I=>I.id!==M)};return u==null||u({type:"jobs",payload:p(b)}),b})},k=M=>{const L=f.recommended.find(b=>b.id===M);L&&(m(b=>{const I={...b,applications:[...b.applications,{...L,status:"Applied",appliedDate:new Date().toLocaleDateString()}]};return u==null||u({type:"jobs",payload:p(I)}),I}),n(M))},w=({job:M,view:L})=>{var C;const b=f.saved.some(N=>N.id===M.id),I=M.city?`${M.city}, ${M.country}`:M.location,S=M.salaryMin&&M.salaryMax?`${M.salaryMin}–${M.salaryMax} ${M.salaryCurrency||""}`:void 0;return t.jsxs(be,{children:[t.jsxs(Te,{children:[t.jsxs("div",{className:"flex justify-between items-start",children:[t.jsxs("div",{className:"flex-1",children:[t.jsx(Re,{className:"text-lg",children:M.title}),t.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mt-2",children:[t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx(wo,{className:"h-4 w-4"})," ",M.company]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx(Zt,{className:"h-4 w-4"})," ",I]})]})]}),L==="applications"&&M.status&&t.jsx(at,{variant:"secondary",children:M.status})]}),S&&t.jsx("p",{className:"text-sm font-semibold text-accent mt-1",children:S})]}),t.jsx(je,{children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex flex-wrap gap-2",children:[M.department&&t.jsx(at,{variant:"outline",children:M.department}),(C=M.skills)==null?void 0:C.slice(0,6).map(N=>t.jsx(at,{variant:"secondary",children:N},N))]}),L==="applications"&&M.appliedDate&&t.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[t.jsx(Qt,{className:"h-3 w-3"}),"Applied ",M.appliedDate]}),t.jsxs("div",{className:"flex gap-2",children:[L==="recommended"&&t.jsxs(t.Fragment,{children:[t.jsx(U,{size:"sm",onClick:()=>k(M.id),children:"Apply Now"}),t.jsx(U,{variant:b?"secondary":"outline",size:"sm",disabled:b,onClick:()=>g(M),children:b?"Saved":"Save Job"}),t.jsx(U,{variant:"destructive",size:"sm",onClick:()=>x(M.id),children:"Remove"})]}),L==="saved"&&t.jsx(U,{variant:"destructive",size:"sm",onClick:()=>y(M.id),children:"Remove"}),L==="applications"&&t.jsx(U,{variant:"outline",size:"sm",children:"View Application"})]})]})})]})};return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-3xl font-bold",children:"Jobs"}),t.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your job search"})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(U,{variant:"outline",onClick:h,children:"Set Job Alerts"}),t.jsx(nV,{onCVChange:o,previewText:c,previewStatus:l,previewErrorMessage:d})]})]}),t.jsxs(co,{defaultValue:"recommended",className:"w-full",children:[t.jsxs(pr,{className:"grid w-full grid-cols-3 lg:grid-cols-3",children:[t.jsxs(Ie,{value:"recommended",children:["Recommended (",f.recommended.length,")"]}),t.jsxs(Ie,{value:"saved",children:[t.jsx(da,{className:"h-4 w-4 mr-2"}),"Saved (",f.saved.length,")"]}),t.jsxs(Ie,{value:"applications",children:[t.jsx(vt,{className:"h-4 w-4 mr-2"}),"Applications (",f.applications.length,")"]})]}),t.jsx(Ne,{value:"recommended",className:"space-y-4",children:t.jsx("div",{className:"grid gap-4",children:f.recommended.map(M=>t.jsx(w,{job:M,view:"recommended"},M.id))})}),t.jsx(Ne,{value:"saved",className:"space-y-4",children:t.jsx("div",{className:"grid gap-4",children:f.saved.length===0?t.jsx(be,{children:t.jsxs(je,{className:"flex flex-col items-center justify-center py-10",children:[t.jsx(da,{className:"h-12 w-12 text-muted-foreground mb-4"}),t.jsx("p",{className:"text-muted-foreground",children:"No saved jobs yet"}),t.jsx(U,{variant:"link",className:"mt-2",children:"Browse Jobs"})]})}):f.saved.map(M=>t.jsx(w,{job:M,view:"saved"},M.id))})}),t.jsx(Ne,{value:"applications",className:"space-y-4",children:t.jsx("div",{className:"grid gap-4",children:f.applications.length===0?t.jsx(be,{children:t.jsxs(je,{className:"flex flex-col items-center justify-center py-10",children:[t.jsx(vt,{className:"h-12 w-12 text-muted-foreground mb-4"}),t.jsx("p",{className:"text-muted-foreground",children:"No applications yet"}),t.jsx(U,{variant:"link",className:"mt-2",children:"Start Applying"})]})}):f.applications.map(M=>t.jsx(w,{job:M,view:"applications"},M.id))})})]})]})}function sV(a,e=[]){let r=[];function n(o,c){const l=v.createContext(c);l.displayName=o+"Context";const d=r.length;r=[...r,c];const h=p=>{var k;const{scope:f,children:m,...g}=p,y=((k=f==null?void 0:f[a])==null?void 0:k[d])||l,x=v.useMemo(()=>g,Object.values(g));return t.jsx(y.Provider,{value:x,children:m})};h.displayName=o+"Provider";function u(p,f){var y;const m=((y=f==null?void 0:f[a])==null?void 0:y[d])||l,g=v.useContext(m);if(g)return g;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[h,u]}const i=()=>{const o=r.map(c=>v.createContext(c));return function(l){const d=(l==null?void 0:l[a])||o;return v.useMemo(()=>({[`__scope${a}`]:{...l,[a]:d}}),[l,d])}};return i.scopeName=a,[n,oV(i,...e)]}function oV(...a){const e=a[0];if(a.length===1)return e;const r=()=>{const n=a.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const c=n.reduce((l,{useScope:d,scopeName:h})=>{const p=d(o)[`__scope${h}`];return{...l,...p}},{});return v.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return r.scopeName=e.scopeName,r}var cV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vP=cV.reduce((a,e)=>{const r=Jj(`Primitive.${e}`),n=v.forwardRef((i,o)=>{const{asChild:c,...l}=i,d=c?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),t.jsx(d,{...l,ref:o})});return n.displayName=`Primitive.${e}`,{...a,[e]:n}},{}),iL="Progress",sL=100,[lV]=sV(iL),[dV,hV]=lV(iL),wP=v.forwardRef((a,e)=>{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:o=uV,...c}=a;(i||i===0)&&!xS(i)&&console.error(pV(`${i}`,"Progress"));const l=xS(i)?i:sL;n!==null&&!gS(n,l)&&console.error(yV(`${n}`,"Progress"));const d=gS(n,l)?n:null,h=w9(d)?o(d,l):void 0;return t.jsx(dV,{scope:r,value:d,max:l,children:t.jsx(vP.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":w9(d)?d:void 0,"aria-valuetext":h,role:"progressbar","data-state":jP(d,l),"data-value":d??void 0,"data-max":l,...c,ref:e})})});wP.displayName=iL;var MP="ProgressIndicator",bP=v.forwardRef((a,e)=>{const{__scopeProgress:r,...n}=a,i=hV(MP,r);return t.jsx(vP.div,{"data-state":jP(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:e})});bP.displayName=MP;function uV(a,e){return`${Math.round(a/e*100)}%`}function jP(a,e){return a==null?"indeterminate":a===e?"complete":"loading"}function w9(a){return typeof a=="number"}function xS(a){return w9(a)&&!isNaN(a)&&a>0}function gS(a,e){return w9(a)&&!isNaN(a)&&a<=e&&a>=0}function pV(a,e){return`Invalid prop \`max\` of value \`${a}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${sL}\`.`}function yV(a,e){return`Invalid prop \`value\` of value \`${a}\` supplied to \`${e}\`. The \`value\` prop must be:
7820
7820
  - a positive number
package/dist/index.mjs CHANGED
@@ -48577,7 +48577,7 @@ function $O({
48577
48577
  Ye,
48578
48578
  {
48579
48579
  id: "fullName",
48580
- value: n.personalDetails.fullName,
48580
+ value: n.personalDetails.fullName ?? "",
48581
48581
  onChange: (A) => T("personalDetails", "fullName", A.target.value)
48582
48582
  }
48583
48583
  )
@@ -48589,7 +48589,7 @@ function $O({
48589
48589
  {
48590
48590
  id: "email",
48591
48591
  type: "email",
48592
- value: n.personalDetails.email,
48592
+ value: n.personalDetails.email ?? "",
48593
48593
  onChange: (A) => T("personalDetails", "email", A.target.value)
48594
48594
  }
48595
48595
  )
@@ -48600,7 +48600,7 @@ function $O({
48600
48600
  Ye,
48601
48601
  {
48602
48602
  id: "phone",
48603
- value: n.personalDetails.phone,
48603
+ value: n.personalDetails.phone ?? "",
48604
48604
  onChange: (A) => T("personalDetails", "phone", A.target.value)
48605
48605
  }
48606
48606
  )
@@ -48611,7 +48611,7 @@ function $O({
48611
48611
  Ye,
48612
48612
  {
48613
48613
  id: "location",
48614
- value: n.personalDetails.location,
48614
+ value: n.personalDetails.location ?? "",
48615
48615
  onChange: (A) => T("personalDetails", "location", A.target.value)
48616
48616
  }
48617
48617
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igamingcareer/igaming-components",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "Reusable React component library for the iGamingCareer platform",
5
5
  "author": "iGamingCareer <info@igamingcareer.com>",
6
6
  "license": "MIT",