@burdenoff/microfe-support 2026.817.3 → 2026.819.1

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.
Files changed (129) hide show
  1. package/dist/generated/global-operations.d.ts +237 -0
  2. package/dist/generated/global-operations.js +341 -227
  3. package/dist/generated/global-operations.js.map +1 -1
  4. package/dist/generated/global-types.d.ts +165 -17
  5. package/dist/generated/global-types.js.map +1 -1
  6. package/dist/node_modules/clsx/dist/clsx.js +7 -5
  7. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  8. package/dist/node_modules/dompurify/dist/purify.es.js +399 -304
  9. package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
  10. package/dist/node_modules/marked/lib/marked.esm.js +23 -17
  11. package/dist/node_modules/marked/lib/marked.esm.js.map +1 -1
  12. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +130 -130
  13. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  14. package/dist/support/SupportAdminRoot.js +4 -2
  15. package/dist/support/SupportAdminRoot.js.map +1 -1
  16. package/dist/support/SupportAdminRoutes.js +2 -2
  17. package/dist/support/SupportAdminRoutes.js.map +1 -1
  18. package/dist/support/SupportUserRoot.js +4 -2
  19. package/dist/support/SupportUserRoot.js.map +1 -1
  20. package/dist/support/SupportUserRoutes.js +2 -2
  21. package/dist/support/SupportUserRoutes.js.map +1 -1
  22. package/dist/support/components/NotificationToast.js.map +1 -1
  23. package/dist/support/components/PageLayout.js.map +1 -1
  24. package/dist/support/components/RouteHelpers.js.map +1 -1
  25. package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
  26. package/dist/support/components/analytics/MetricCard.js.map +1 -1
  27. package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
  28. package/dist/support/components/analytics/SLAReport.js.map +1 -1
  29. package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
  30. package/dist/support/components/analytics/TopAgents.js.map +1 -1
  31. package/dist/support/components/analytics/TrendChart.js +5 -5
  32. package/dist/support/components/analytics/TrendChart.js.map +1 -1
  33. package/dist/support/components/careers/BulkCandidateActionGuidance.d.ts +6 -0
  34. package/dist/support/components/careers/BulkCandidateActionGuidance.js +28 -0
  35. package/dist/support/components/careers/BulkCandidateActionGuidance.js.map +1 -0
  36. package/dist/support/components/careers/BulkCandidateDialogs.d.ts +18 -0
  37. package/dist/support/components/careers/BulkCandidateDialogs.js +441 -0
  38. package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -0
  39. package/dist/support/components/careers/BulkOperationFeedback.d.ts +21 -0
  40. package/dist/support/components/careers/BulkOperationFeedback.js +194 -0
  41. package/dist/support/components/careers/BulkOperationFeedback.js.map +1 -0
  42. package/dist/support/components/careers/BulkSelectionSummary.d.ts +6 -0
  43. package/dist/support/components/careers/BulkSelectionSummary.js +15 -0
  44. package/dist/support/components/careers/BulkSelectionSummary.js.map +1 -0
  45. package/dist/support/components/kb/ArticleForm.js.map +1 -1
  46. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  47. package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
  48. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  49. package/dist/support/components/tickets/AttachmentList.js.map +1 -1
  50. package/dist/support/components/tickets/MarkdownContent.js.map +1 -1
  51. package/dist/support/components/tickets/MessageComposer.js +2 -2
  52. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  53. package/dist/support/components/tickets/MessageThread.js +1 -1
  54. package/dist/support/components/tickets/MessageThread.js.map +1 -1
  55. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  56. package/dist/support/components/tickets/TicketHeader.js.map +1 -1
  57. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  58. package/dist/support/components/ui.d.ts +1 -1
  59. package/dist/support/components/ui.js +2 -2
  60. package/dist/support/constants/pipeline.d.ts +15 -0
  61. package/dist/support/constants/pipeline.js +73 -0
  62. package/dist/support/constants/pipeline.js.map +1 -0
  63. package/dist/support/events/rybbit.js.map +1 -1
  64. package/dist/support/hooks/index.js +6 -5
  65. package/dist/support/hooks/useAnalyticsOperations.js +1 -1
  66. package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
  67. package/dist/support/hooks/useAttachmentsFailedToast.js.map +1 -1
  68. package/dist/support/hooks/useChatOperations.js +7 -7
  69. package/dist/support/hooks/useChatOperations.js.map +1 -1
  70. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  71. package/dist/support/hooks/useNotification.js.map +1 -1
  72. package/dist/support/hooks/useRegisterFooter.js.map +1 -1
  73. package/dist/support/hooks/useSettingsOperations.js.map +1 -1
  74. package/dist/support/hooks/useSupportAttachments.js.map +1 -1
  75. package/dist/support/hooks/useTicketListOperations.js.map +1 -1
  76. package/dist/support/hooks/useTicketOperations.js +76 -75
  77. package/dist/support/hooks/useTicketOperations.js.map +1 -1
  78. package/dist/support/index.js +11 -10
  79. package/dist/support/pages/AnalyticsPage.js.map +1 -1
  80. package/dist/support/pages/ArticleDetailAdminPage.js +1 -1
  81. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  82. package/dist/support/pages/ArticleDetailUserPage.js +1 -1
  83. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  84. package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
  85. package/dist/support/pages/ContactInquiryDetailPage.js +4 -1
  86. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  87. package/dist/support/pages/CreateArticlePage.js.map +1 -1
  88. package/dist/support/pages/CreateTicketPage.js +4 -3
  89. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  90. package/dist/support/pages/EditArticlePage.js.map +1 -1
  91. package/dist/support/pages/InterviewersPage.js +127 -127
  92. package/dist/support/pages/InterviewersPage.js.map +1 -1
  93. package/dist/support/pages/JobApplicationDetailPage.js +627 -587
  94. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  95. package/dist/support/pages/JobApplicationsPage.js +652 -404
  96. package/dist/support/pages/JobApplicationsPage.js.map +1 -1
  97. package/dist/support/pages/JobPostingDetailPage.js +42 -5
  98. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  99. package/dist/support/pages/JobPostingsPage.js.map +1 -1
  100. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  101. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  102. package/dist/support/pages/SettingsPage.js.map +1 -1
  103. package/dist/support/pages/TicketDetailAdminPage.js +4 -1
  104. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  105. package/dist/support/pages/TicketDetailUserPage.js +4 -1
  106. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  107. package/dist/support/pages/TicketListPage.js.map +1 -1
  108. package/dist/support/providers/SupportProvider.js.map +1 -1
  109. package/dist/support/store/supportStore.js.map +1 -1
  110. package/dist/support/utils/attachments.js +3 -3
  111. package/dist/support/utils/attachments.js.map +1 -1
  112. package/dist/support/utils/breadcrumbRegistry.js.map +1 -1
  113. package/dist/support/utils/bulkCandidateOperations.d.ts +174 -0
  114. package/dist/support/utils/bulkCandidateOperations.js +265 -0
  115. package/dist/support/utils/bulkCandidateOperations.js.map +1 -0
  116. package/dist/support/utils/categoryColors.js.map +1 -1
  117. package/dist/support/utils/cn.js +1 -1
  118. package/dist/support/utils/cn.js.map +1 -1
  119. package/dist/support/utils/context.js.map +1 -1
  120. package/dist/support/utils/errors.js.map +1 -1
  121. package/dist/support/utils/i18n.js.map +1 -1
  122. package/dist/support/utils/index.js +1 -1
  123. package/dist/support/utils/index.js.map +1 -1
  124. package/dist/support/utils/markdown.js +2 -2
  125. package/dist/support/utils/markdown.js.map +1 -1
  126. package/dist/support/utils/supportFiles.js.map +1 -1
  127. package/dist/support/utils/ticketFilters.js.map +1 -1
  128. package/dist/support/utils/uiTokens.js.map +1 -1
  129. package/package.json +23 -12
@@ -1,40 +1,45 @@
1
- import { Badge as e, Button as t, Dialog as n, DialogContent as r, DialogDescription as i, DialogFooter as ee, DialogHeader as te, DialogTitle as ne, Input as a, Label as o, Select as re, SelectContent as ie, SelectItem as s, SelectTrigger as ae, SelectValue as oe, Textarea as se } from "../components/ui.js";
2
- import { useCreateJobApplicationMutation as ce, useGetJobApplicationsQuery as le, useGetJobPostingsQuery as ue } from "../../generated/global-operations.js";
3
- import { JobApplicationStatus as c, JobPostingStatus as de } from "../../generated/global-types.js";
4
- import { nativeNotify as l } from "../../utils/nativeBridge.js";
5
- import { useEffect as u, useRef as fe, useState as d } from "react";
6
- import { AlertCircle as pe, Briefcase as f, ChevronDown as me, Filter as he, Grid as ge, List as _e, Loader2 as p, Paperclip as m, Plus as ve, Search as ye, UserPlus as be } from "lucide-react";
7
- import { useLocation as xe, useNavigate as Se } from "react-router";
8
- import { graphqlFetch as Ce } from "@burdenoff/fe-libs/shared/graphql/fetch";
9
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
10
- import { IllustratedEmptyState as we, PagePurpose as Te } from "@burdenoff/fe-libs/ui";
1
+ import { Badge as e, Button as t, Checkbox as n, Dialog as r, DialogContent as i, DialogDescription as a, DialogFooter as ee, DialogHeader as te, DialogTitle as ne, Input as o, Label as s, Select as re, SelectContent as ie, SelectItem as ae, SelectTrigger as oe, SelectValue as se, Textarea as ce } from "../components/ui.js";
2
+ import { useCreateJobApplicationMutation as le, useGetBulkCandidateTargetsLazyQuery as ue, useGetJobApplicationsQuery as de, useGetJobPostingsQuery as fe } from "../../generated/global-operations.js";
3
+ import { JobPostingStatus as pe } from "../../generated/global-types.js";
4
+ import { nativeNotify as c } from "../../utils/nativeBridge.js";
5
+ import { roundStatusConfig as me, roundStatusOrder as he, statusColors as l, statusLabels as ge, statusOrder as _e } from "../constants/pipeline.js";
6
+ import { CandidateMaterializationError as ve, createEmptyCandidateSelection as u, getCandidateSelectionCount as ye, getSelectedCandidateIds as be, materializeCandidateTargets as xe, materializeCandidateTargetsByIds as Se, selectAllMaterializedCandidates as Ce, setVisibleCandidateSelection as we, toggleCandidateSelection as Te } from "../utils/bulkCandidateOperations.js";
7
+ import { AddSelectedToRoundDialog as Ee, BulkCandidateSendDialog as De } from "../components/careers/BulkCandidateDialogs.js";
8
+ import { BulkSelectionSummary as Oe } from "../components/careers/BulkSelectionSummary.js";
9
+ import { useEffect as ke, useRef as d, useState as f } from "react";
10
+ import { AlertCircle as Ae, Briefcase as je, ChevronDown as Me, Filter as Ne, Grid as Pe, List as Fe, Loader2 as p, Paperclip as Ie, Plus as Le, Search as Re, Send as ze, Shuffle as Be, UserPlus as Ve } from "lucide-react";
11
+ import { useLocation as He, useNavigate as Ue } from "react-router";
12
+ import { graphqlFetch as We } from "@burdenoff/fe-libs/shared/graphql/fetch";
13
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
14
+ import { IllustratedEmptyState as Ge, PagePurpose as Ke } from "@burdenoff/fe-libs/ui";
11
15
  //#region src/support/pages/JobApplicationsPage.tsx
12
- var v = [
13
- c.New,
14
- c.Screening,
15
- c.Shortlisted,
16
- c.Interview,
17
- c.Hired,
18
- c.Rejected,
19
- c.Archived
20
- ], y = {
21
- NEW: "bg-status-info-bg-subtle text-status-info-text",
22
- SCREENING: "bg-status-warning-bg-subtle text-status-warning-text",
23
- SHORTLISTED: "bg-accent-purple-subtle text-accent-purple",
24
- INTERVIEW: "bg-accent-blue-subtle text-accent-blue",
25
- HIRED: "bg-status-success-bg-subtle text-status-success-text",
26
- REJECTED: "bg-status-error-bg-subtle text-status-error-text",
27
- ARCHIVED: "bg-bg-sunken text-text-secondary"
28
- }, b = {
29
- NEW: "New",
30
- SCREENING: "Screening",
31
- SHORTLISTED: "Shortlisted",
32
- INTERVIEW: "Interview",
33
- HIRED: "Hired",
34
- REJECTED: "Rejected",
35
- ARCHIVED: "Archived"
36
- };
37
- function x(e) {
16
+ var _ = 50;
17
+ function qe(e) {
18
+ return {
19
+ id: e.id,
20
+ jobPostingId: e.jobPostingId ?? null,
21
+ interviewRounds: e.interviewRounds.map((e) => ({
22
+ id: e.id,
23
+ roundConfigId: e.roundConfigId ?? null,
24
+ name: e.name,
25
+ roundType: e.roundType,
26
+ emailLogs: e.emailLogs.map((e) => ({ emailType: e.emailType }))
27
+ }))
28
+ };
29
+ }
30
+ function Je(e) {
31
+ return {
32
+ ...e,
33
+ ...e.ids ? { ids: [...e.ids] } : {},
34
+ ...e.statuses ? { statuses: [...e.statuses] } : {},
35
+ ...e.roundStatuses ? { roundStatuses: [...e.roundStatuses] } : {}
36
+ };
37
+ }
38
+ function Ye(e, t) {
39
+ let n = new Set(e);
40
+ return n.has(t) ? n.delete(t) : n.add(t), n;
41
+ }
42
+ function Xe(e) {
38
43
  return new Date(e).toLocaleDateString("en-US", {
39
44
  month: "short",
40
45
  day: "numeric",
@@ -43,38 +48,38 @@ function x(e) {
43
48
  minute: "2-digit"
44
49
  });
45
50
  }
46
- function Ee(e) {
51
+ function Ze(e) {
47
52
  let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
48
53
  if (n < 2) return "just now";
49
54
  if (n < 60) return `${n}m ago`;
50
55
  let r = Math.floor(n / 60);
51
56
  if (r < 24) return `${r}h ago`;
52
57
  let i = Math.floor(r / 24);
53
- return i < 30 ? `${i}d ago` : x(e);
58
+ return i < 30 ? `${i}d ago` : Xe(e);
54
59
  }
55
- var S = "__none__", De = [
60
+ var v = "__none__", Qe = [
56
61
  "LinkedIn",
57
62
  "Referral",
58
63
  "Indeed",
59
64
  "Email",
60
65
  "Walk-in",
61
66
  "Other"
62
- ], Oe = 10 * 1024 * 1024, ke = ".pdf,.doc,.docx", Ae = new Set([
67
+ ], $e = 10485760, et = ".pdf,.doc,.docx", tt = /* @__PURE__ */ new Set([
63
68
  "application/pdf",
64
69
  "application/msword",
65
70
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
66
- ]), C = {
71
+ ]), nt = {
67
72
  name: "",
68
73
  email: "",
69
74
  phone: "",
70
- jobPostingId: S,
75
+ jobPostingId: v,
71
76
  position: "",
72
77
  source: "",
73
78
  linkedin: "",
74
79
  portfolio: "",
75
80
  coverLetter: ""
76
81
  };
77
- function je(e) {
82
+ function rt(e) {
78
83
  return new Promise((t, n) => {
79
84
  let r = new FileReader();
80
85
  r.onload = () => {
@@ -88,653 +93,874 @@ function je(e) {
88
93
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read file")), r.readAsDataURL(e);
89
94
  });
90
95
  }
91
- function w() {
92
- let c = Se(), x = xe().search, [w, Me] = d(""), [T, Ne] = d(""), [E, Pe] = d(""), [D, Fe] = d(""), [O, Ie] = d(""), [k, Le] = d(!1), [A, j] = d("list"), [Re, M] = d(!1), [N, P] = d(C), [F, I] = d({}), [L, R] = d(null), [z, B] = d(""), [V, H] = d(!1), [U, ze] = d({}), W = fe(U);
93
- W.current = U, u(() => {
94
- let e = setTimeout(() => Ne(w), 300);
96
+ function it() {
97
+ let Xe = Ue(), it = He().search, [y, at] = f(""), [b, ot] = f(""), [x, st] = f(/* @__PURE__ */ new Set()), [S, ct] = f(/* @__PURE__ */ new Set()), [C, lt] = f(""), [w, ut] = f(""), [T, dt] = f(!1), [ft, pt] = f("list"), [E, D] = f(u), [mt, ht] = f([]), [O, gt] = f(!1), [_t, k] = f(null), [A, vt] = f(null), [yt, j] = f([]), [bt, xt] = f(u), [M, N] = f(!1), [St, P] = f(null), [Ct, F] = f(!1), [I, L] = f(nt), [R, wt] = f({}), [z, B] = f(null), [Tt, V] = f(""), [Et, Dt] = f(!1), [Ot, kt] = f(!1), [H, At] = f({}), jt = d(_), U = d(0), Mt = d(H);
98
+ Mt.current = H, ke(() => {
99
+ let e = setTimeout(() => ot(y), 300);
95
100
  return () => clearTimeout(e);
96
- }, [w]);
97
- let { data: G, loading: K, error: q, fetchMore: Be } = le({
101
+ }, [y]);
102
+ let W = y !== b, Nt = {
103
+ ...b ? { search: b } : {},
104
+ ...x.size > 0 ? { statuses: Array.from(x) } : {},
105
+ ...S.size > 0 ? { roundStatuses: Array.from(S) } : {},
106
+ ...C ? { productId: C } : {},
107
+ ...w ? { jobPostingId: w } : {}
108
+ }, G = JSON.stringify({
109
+ searchInput: y,
110
+ search: b,
111
+ statuses: Array.from(x).sort(),
112
+ roundStatuses: Array.from(S).sort(),
113
+ productId: C,
114
+ jobPostingId: w
115
+ }), K = d({
116
+ key: G,
117
+ generation: 0
118
+ });
119
+ K.current.key !== G && (K.current = {
120
+ key: G,
121
+ generation: K.current.generation + 1
122
+ });
123
+ let q = `${K.current.generation}:${G}`, J = d(q);
124
+ J.current = q, ke(() => {
125
+ U.current += 1, D(u()), ht([]), gt(!1), k(null), vt(null), j([]), xt(u()), N(!1), P(null), kt(!1), jt.current = _;
126
+ }, [q]);
127
+ let { data: Pt, loading: Ft, error: It, fetchMore: Lt } = de({
98
128
  variables: {
99
- filter: {
100
- ...T ? { search: T } : {},
101
- ...E ? { status: E } : {},
102
- ...D ? { productId: D } : {},
103
- ...O ? { jobPostingId: O } : {}
104
- },
105
- limit: 50,
129
+ filter: Nt,
130
+ limit: _,
106
131
  offset: 0
107
132
  },
108
133
  fetchPolicy: "cache-and-network"
109
- }), { data: J, loading: Y } = ue({
134
+ }), [Rt] = ue({ fetchPolicy: "network-only" }), { data: zt, loading: Bt } = fe({
110
135
  variables: {
111
136
  limit: 200,
112
137
  offset: 0
113
138
  },
114
139
  fetchPolicy: "cache-and-network"
115
- }), [Ve] = ce(), He = (J?.jobPostings?.items ?? []).filter((e) => e.status === de.Open), X = G?.jobApplications?.items ?? [], Ue = G?.jobApplications?.total ?? 0, Z = G?.jobApplications?.hasMore ?? !1, We = (J?.jobPostings?.items ?? []).reduce((e, t) => (e[t.id] = t, e), {}), Ge = Array.from(new Set(X.flatMap((e) => e.productId ? [e.productId] : []))).sort(), Q = Ge.join(",");
116
- u(() => {
117
- let e = Q ? Q.split(",").filter((e) => !W.current[e]) : [];
140
+ }), [Vt] = le(), Ht = (zt?.jobPostings?.items ?? []).filter((e) => e.status === pe.Open), Ut = Pt?.jobApplications?.items ?? [], Wt = /* @__PURE__ */ new Map();
141
+ for (let e of Ut) Wt.set(e.id, e);
142
+ let Y = Array.from(Wt.values()), X = Pt?.jobApplications?.total ?? 0, Gt = Pt?.jobApplications?.hasMore ?? !1, Z = Y.map((e) => e.id), Kt = be(E), Q = ye(E), qt = (E.mode === "all" ? mt : Y.map(qe)).filter((e) => Kt.has(e.id)), Jt = qt.length === Q, Yt = !!w && Jt && qt.every((e) => e.jobPostingId === w), Xt = Z.filter((e) => Kt.has(e)).length, Zt = Z.length > 0 && Xt === Z.length, Qt = Yt && Q > 0 && !W && !O && !M, $t = (zt?.jobPostings?.items ?? []).reduce((e, t) => (e[t.id] = t, e), {}), en = async (e) => {
143
+ let t = Je(Nt);
144
+ return xe({
145
+ scopeKey: e,
146
+ expectedTotal: X,
147
+ getCurrentScopeKey: () => J.current,
148
+ fetchPage: async (e, n) => {
149
+ let r = (await Rt({ variables: {
150
+ filter: t,
151
+ limit: e,
152
+ offset: n
153
+ } })).data?.jobApplications;
154
+ if (!r) throw Error("The candidate target query returned no data.");
155
+ return {
156
+ items: r.items.map(qe),
157
+ total: r.total,
158
+ hasMore: r.hasMore
159
+ };
160
+ }
161
+ });
162
+ }, tn = async (e, t) => {
163
+ let n = Je(Nt);
164
+ return Se({
165
+ scopeKey: e,
166
+ applicationIds: t,
167
+ getCurrentScopeKey: () => J.current,
168
+ fetchChunkPage: async (e, t, r) => {
169
+ let i = (await Rt({ variables: {
170
+ filter: {
171
+ ...n,
172
+ ids: [...e]
173
+ },
174
+ limit: t,
175
+ offset: r
176
+ } })).data?.jobApplications;
177
+ if (!i) throw Error("The candidate target query returned no data.");
178
+ return {
179
+ items: i.items.map(qe),
180
+ total: i.total,
181
+ hasMore: i.hasMore
182
+ };
183
+ }
184
+ });
185
+ }, nn = async () => {
186
+ if (O || W || X === 0) return;
187
+ let e = q;
188
+ gt(!0), k(null);
189
+ try {
190
+ let t = await en(e);
191
+ if (J.current !== e) return;
192
+ ht(t), D(Ce(t.map((e) => e.id)));
193
+ } catch (t) {
194
+ if (t instanceof ve && t.code === "STALE_SCOPE" || J.current !== e) return;
195
+ k(t instanceof Error ? t.message : "Could not load all matching applications."), c("error");
196
+ } finally {
197
+ J.current === e && gt(!1);
198
+ }
199
+ }, $ = async (e) => {
200
+ if (!w || Q === 0 || W || M) return;
201
+ let t = q, n = U.current + 1;
202
+ U.current = n;
203
+ let r = be(E);
204
+ vt(e), j([]), xt(E), P(null), N(!0);
205
+ try {
206
+ let e = await tn(t, [...r]);
207
+ if (J.current !== t || U.current !== n) return;
208
+ let i = new Map(e.map((e) => [e.id, e])), a = [...r].map((e) => i.get(e)).filter((e) => !!e);
209
+ if (a.length !== r.size) throw Error("Some selected applications no longer match the frozen filter. Clear and select again.");
210
+ j(a);
211
+ } catch (e) {
212
+ if (e instanceof ve && e.code === "STALE_SCOPE" || J.current !== t || U.current !== n) return;
213
+ P(e instanceof Error ? e.message : "Could not refresh the selected applications."), c("error");
214
+ } finally {
215
+ J.current === t && U.current === n && N(!1);
216
+ }
217
+ }, rn = () => {
218
+ U.current += 1, vt(null), j([]), xt(u()), P(null), N(!1);
219
+ }, an = Array.from(new Set(Y.flatMap((e) => e.productId ? [e.productId] : []))).sort(), on = an.join(",");
220
+ ke(() => {
221
+ let e = on ? on.split(",").filter((e) => !Mt.current[e]) : [];
118
222
  e.length !== 0 && e.forEach((e) => {
119
- Ce({
223
+ We({
120
224
  gateway: "global",
121
225
  query: "query($id: ID!) { platformProduct(id: $id) { name } }",
122
226
  variables: { id: e }
123
227
  }).then((t) => {
124
228
  let n = t.data?.platformProduct?.name;
125
- n && ze((t) => ({
229
+ n && At((t) => ({
126
230
  ...t,
127
231
  [e]: n
128
232
  }));
129
233
  }).catch(() => {});
130
234
  });
131
- }, [Q]);
132
- let Ke = () => {
133
- Z && Be({
134
- variables: { offset: X.length },
135
- updateQuery: (e, { fetchMoreResult: t }) => t ? { jobApplications: {
136
- ...t.jobApplications,
137
- items: [...e.jobApplications?.items ?? [], ...t.jobApplications?.items ?? []]
138
- } } : e
139
- });
140
- }, $ = () => {
141
- P(C), I({}), R(null), B("");
142
- }, qe = (e) => {
235
+ }, [on]);
236
+ let sn = async () => {
237
+ if (!Gt || Ot) return;
238
+ let e = jt.current, t = q;
239
+ kt(!0);
240
+ try {
241
+ let n = await Lt({
242
+ variables: { offset: e },
243
+ updateQuery: (e, { fetchMoreResult: t }) => {
244
+ if (!t) return e;
245
+ let n = /* @__PURE__ */ new Map();
246
+ for (let t of e.jobApplications?.items ?? []) n.set(t.id, t);
247
+ for (let e of t.jobApplications?.items ?? []) n.set(e.id, e);
248
+ return { jobApplications: {
249
+ ...t.jobApplications,
250
+ items: Array.from(n.values())
251
+ } };
252
+ }
253
+ });
254
+ J.current === t && (jt.current = e + (n.data.jobApplications?.items.length ?? _));
255
+ } catch (e) {
256
+ console.error("Failed to load more applications:", e), c("error");
257
+ } finally {
258
+ J.current === t && kt(!1);
259
+ }
260
+ }, cn = () => {
261
+ L(nt), wt({}), B(null), V("");
262
+ }, ln = (e) => {
143
263
  let t = e.target.files?.[0] ?? null;
144
- if (B(""), !t) {
145
- R(null);
264
+ if (V(""), !t) {
265
+ B(null);
146
266
  return;
147
267
  }
148
- if (t.size > Oe) {
149
- B("Resume must be 10 MB or smaller."), R(null), e.target.value = "";
268
+ if (t.size > $e) {
269
+ V("Resume must be 10 MB or smaller."), B(null), e.target.value = "";
150
270
  return;
151
271
  }
152
272
  let n = t.name.toLowerCase().split(".").pop() ?? "";
153
- if (!Ae.has(t.type) && ![
273
+ if (!tt.has(t.type) && ![
154
274
  "pdf",
155
275
  "doc",
156
276
  "docx"
157
277
  ].includes(n)) {
158
- B("Resume must be a PDF, DOC, or DOCX file."), R(null), e.target.value = "";
278
+ V("Resume must be a PDF, DOC, or DOCX file."), B(null), e.target.value = "";
159
279
  return;
160
280
  }
161
- R(t);
162
- }, Je = () => {
281
+ B(t);
282
+ }, un = () => {
163
283
  let e = {};
164
- return N.name.trim() || (e.name = "Name is required"), N.email.trim() ? /^\S+@\S+\.\S+$/.test(N.email.trim()) || (e.email = "Enter a valid email") : e.email = "Email is required", N.source.trim() || (e.source = "Source is required"), N.jobPostingId === S && !N.position.trim() && (e.position = "Position is required when no job posting is selected"), I(e), Object.keys(e).length === 0;
165
- }, Ye = async (e) => {
166
- if (e.preventDefault(), Je()) {
167
- H(!0);
284
+ return I.name.trim() || (e.name = "Name is required"), I.email.trim() ? /^\S+@\S+\.\S+$/.test(I.email.trim()) || (e.email = "Enter a valid email") : e.email = "Email is required", I.source.trim() || (e.source = "Source is required"), I.jobPostingId === v && !I.position.trim() && (e.position = "Position is required when no job posting is selected"), wt(e), Object.keys(e).length === 0;
285
+ }, dn = async (e) => {
286
+ if (e.preventDefault(), un()) {
287
+ Dt(!0);
168
288
  try {
169
289
  let e, t, n;
170
- L && (t = await je(L), e = L.name, n = L.type || void 0);
171
- let r = N.jobPostingId !== S, i = (await Ve({
290
+ z && (t = await rt(z), e = z.name, n = z.type || void 0);
291
+ let r = I.jobPostingId !== v, i = (await Vt({
172
292
  variables: { input: {
173
- name: N.name.trim(),
174
- email: N.email.trim(),
175
- phone: N.phone.trim() || void 0,
176
- jobPostingId: r ? N.jobPostingId : void 0,
177
- position: r ? void 0 : N.position.trim() || void 0,
178
- source: N.source.trim(),
179
- linkedin: N.linkedin.trim() || void 0,
180
- portfolio: N.portfolio.trim() || void 0,
181
- coverLetter: N.coverLetter.trim() || void 0,
293
+ name: I.name.trim(),
294
+ email: I.email.trim(),
295
+ phone: I.phone.trim() || void 0,
296
+ jobPostingId: r ? I.jobPostingId : void 0,
297
+ position: r ? void 0 : I.position.trim() || void 0,
298
+ source: I.source.trim(),
299
+ linkedin: I.linkedin.trim() || void 0,
300
+ portfolio: I.portfolio.trim() || void 0,
301
+ coverLetter: I.coverLetter.trim() || void 0,
182
302
  resumeFileName: e,
183
303
  resumeBase64: t,
184
304
  resumeMimeType: n
185
305
  } },
186
306
  refetchQueries: ["GetJobApplications"]
187
307
  })).data?.createJobApplication?.id;
188
- l("success"), M(!1), $(), i && c(`/support/applications/${i}${x}`);
308
+ c("success"), F(!1), cn(), i && Xe(`/support/applications/${i}${it}`);
189
309
  } catch (e) {
190
- console.error("Failed to create candidate:", e), l("error");
310
+ console.error("Failed to create candidate:", e), c("error");
191
311
  } finally {
192
- H(!1);
312
+ Dt(!1);
193
313
  }
194
314
  }
195
- }, Xe = v.reduce((e, t) => (e[t] = X.filter((e) => e.status === t), e), {}), Ze = (t, n = !1) => {
196
- let r = t.jobPostingId ? We[t.jobPostingId]?.title : void 0;
197
- return /* @__PURE__ */ g("button", {
198
- type: "button",
199
- onClick: () => c(`/support/applications/${t.id}${x}`),
200
- className: `w-full text-left bg-bg-surface border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group ${n ? "p-3" : "p-4"}`,
201
- children: /* @__PURE__ */ _("div", {
202
- className: `flex ${n ? "flex-col" : "items-start"} justify-between gap-3`,
203
- children: [/* @__PURE__ */ _("div", {
204
- className: "flex-1 min-w-0",
205
- children: [
206
- /* @__PURE__ */ _("div", {
207
- className: "flex items-center gap-2 mb-1 flex-wrap",
208
- children: [
209
- /* @__PURE__ */ _("h3", {
210
- className: "font-semibold text-text-primary truncate group-hover:text-primary transition-colors text-sm",
211
- children: [
212
- t.firstName,
213
- " ",
214
- t.lastName
215
- ]
216
- }),
217
- /* @__PURE__ */ g(e, {
218
- variant: "secondary",
219
- className: `${y[t.status] || y.NEW} ${t.status === "NEW" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
220
- children: b[t.status] || t.status
221
- }),
222
- r && /* @__PURE__ */ g(e, {
223
- variant: "outline",
224
- title: `Job posting: ${r}`,
225
- children: r
226
- }),
227
- t.productId && U[t.productId] && /* @__PURE__ */ g(e, {
228
- variant: "secondary",
229
- className: "bg-accent-purple-subtle text-accent-purple",
230
- title: `Product: ${U[t.productId]}`,
231
- children: U[t.productId]
232
- }),
233
- t.resumeFileName && /* @__PURE__ */ _(e, {
234
- variant: "secondary",
235
- className: "bg-accent-blue-subtle text-accent-blue gap-1",
236
- children: [/* @__PURE__ */ g(m, { size: n ? 10 : 11 }), "Resume"]
237
- })
238
- ]
239
- }),
240
- /* @__PURE__ */ _("p", {
241
- className: `text-text-secondary mb-1 ${n ? "text-xs" : "text-sm"}`,
242
- children: [/* @__PURE__ */ g("span", {
243
- className: "font-medium",
244
- children: t.position
245
- }), t.department && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("span", {
246
- className: "mx-1.5 text-text-secondary/50",
247
- children: "·"
248
- }), /* @__PURE__ */ g("span", { children: t.department })] })]
249
- }),
250
- /* @__PURE__ */ g("p", {
251
- className: `text-text-secondary truncate ${n ? "text-[11px]" : "text-xs"}`,
252
- children: t.email
253
- })
254
- ]
255
- }), /* @__PURE__ */ g("div", {
256
- className: `text-text-secondary whitespace-nowrap ${n ? "text-[11px]" : "text-xs"}`,
257
- children: Ee(t.createdAt)
258
- })]
259
- })
315
+ }, fn = _e.reduce((e, t) => (e[t] = Y.filter((e) => e.status === t), e), {}), pn = (t, r = !1) => {
316
+ let i = t.jobPostingId ? $t[t.jobPostingId]?.title : void 0, a = Kt.has(t.id);
317
+ return /* @__PURE__ */ g("div", {
318
+ className: `w-full bg-bg-surface border rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group flex items-start gap-2 ${r ? "p-3" : "p-4"} ${a ? "border-primary" : "border-border-seam"}`,
319
+ children: [/* @__PURE__ */ h("div", {
320
+ className: "pt-0.5",
321
+ children: /* @__PURE__ */ h(n, {
322
+ checked: a,
323
+ disabled: O || W,
324
+ onCheckedChange: () => D((e) => Te(e, t.id)),
325
+ "aria-label": `Select ${t.firstName} ${t.lastName}`
326
+ })
327
+ }), /* @__PURE__ */ h("button", {
328
+ type: "button",
329
+ onClick: () => Xe(`/support/applications/${t.id}${it}`),
330
+ className: "flex-1 min-w-0 text-left",
331
+ children: /* @__PURE__ */ g("div", {
332
+ className: `flex ${r ? "flex-col" : "items-start"} justify-between gap-3`,
333
+ children: [/* @__PURE__ */ g("div", {
334
+ className: "flex-1 min-w-0",
335
+ children: [
336
+ /* @__PURE__ */ g("div", {
337
+ className: "flex items-center gap-2 mb-1 flex-wrap",
338
+ children: [
339
+ /* @__PURE__ */ g("h3", {
340
+ className: "font-semibold text-text-primary truncate group-hover:text-primary transition-colors text-sm",
341
+ children: [
342
+ t.firstName,
343
+ " ",
344
+ t.lastName
345
+ ]
346
+ }),
347
+ /* @__PURE__ */ h(e, {
348
+ variant: "secondary",
349
+ className: `${l[t.status] || l.NEW} ${t.status === "NEW" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
350
+ children: ge[t.status] || t.status
351
+ }),
352
+ i && /* @__PURE__ */ h(e, {
353
+ variant: "outline",
354
+ title: `Job posting: ${i}`,
355
+ children: i
356
+ }),
357
+ t.productId && H[t.productId] && /* @__PURE__ */ h(e, {
358
+ variant: "secondary",
359
+ className: "bg-accent-purple-subtle text-accent-purple",
360
+ title: `Product: ${H[t.productId]}`,
361
+ children: H[t.productId]
362
+ }),
363
+ t.resumeFileName && /* @__PURE__ */ g(e, {
364
+ variant: "secondary",
365
+ className: "bg-accent-blue-subtle text-accent-blue gap-1",
366
+ children: [/* @__PURE__ */ h(Ie, { size: r ? 10 : 11 }), "Resume"]
367
+ })
368
+ ]
369
+ }),
370
+ /* @__PURE__ */ g("p", {
371
+ className: `text-text-secondary mb-1 ${r ? "text-xs" : "text-sm"}`,
372
+ children: [/* @__PURE__ */ h("span", {
373
+ className: "font-medium",
374
+ children: t.position
375
+ }), t.department && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
376
+ className: "mx-1.5 text-text-secondary/50",
377
+ children: "·"
378
+ }), /* @__PURE__ */ h("span", { children: t.department })] })]
379
+ }),
380
+ /* @__PURE__ */ h("p", {
381
+ className: `text-text-secondary truncate ${r ? "text-[11px]" : "text-xs"}`,
382
+ children: t.email
383
+ })
384
+ ]
385
+ }), /* @__PURE__ */ h("div", {
386
+ className: `text-text-secondary whitespace-nowrap ${r ? "text-[11px]" : "text-xs"}`,
387
+ children: Ze(t.createdAt)
388
+ })]
389
+ })
390
+ })]
260
391
  }, t.id);
261
392
  };
262
- return K && X.length === 0 ? /* @__PURE__ */ _("div", {
393
+ return Ft && Y.length === 0 ? /* @__PURE__ */ g("div", {
263
394
  className: "p-6",
264
- children: [/* @__PURE__ */ _("div", {
395
+ children: [/* @__PURE__ */ g("div", {
265
396
  className: "flex items-center gap-3 mb-6",
266
- children: [/* @__PURE__ */ g(f, {
397
+ children: [/* @__PURE__ */ h(je, {
267
398
  size: 24,
268
399
  className: "text-text-primary"
269
- }), /* @__PURE__ */ g("h1", {
400
+ }), /* @__PURE__ */ h("h1", {
270
401
  className: "text-2xl font-bold text-text-primary",
271
402
  children: "Job Applications"
272
403
  })]
273
- }), /* @__PURE__ */ _("div", {
404
+ }), /* @__PURE__ */ g("div", {
274
405
  className: "flex flex-col items-center justify-center py-16",
275
- children: [/* @__PURE__ */ g(p, {
406
+ children: [/* @__PURE__ */ h(p, {
276
407
  size: 32,
277
408
  className: "animate-spin text-text-secondary mb-4"
278
- }), /* @__PURE__ */ g("p", {
409
+ }), /* @__PURE__ */ h("p", {
279
410
  className: "text-sm text-text-secondary",
280
411
  children: "Loading applications…"
281
412
  })]
282
413
  })]
283
- }) : q ? /* @__PURE__ */ _("div", {
414
+ }) : It ? /* @__PURE__ */ g("div", {
284
415
  className: "p-6",
285
- children: [/* @__PURE__ */ _("div", {
416
+ children: [/* @__PURE__ */ g("div", {
286
417
  className: "flex items-center gap-3 mb-6",
287
- children: [/* @__PURE__ */ g(f, {
418
+ children: [/* @__PURE__ */ h(je, {
288
419
  size: 24,
289
420
  className: "text-text-primary"
290
- }), /* @__PURE__ */ g("h1", {
421
+ }), /* @__PURE__ */ h("h1", {
291
422
  className: "text-2xl font-bold text-text-primary",
292
423
  children: "Job Applications"
293
424
  })]
294
- }), /* @__PURE__ */ _("div", {
425
+ }), /* @__PURE__ */ g("div", {
295
426
  className: "flex flex-col items-center justify-center py-16 text-center",
296
427
  children: [
297
- /* @__PURE__ */ g("div", {
428
+ /* @__PURE__ */ h("div", {
298
429
  className: "p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4",
299
- children: /* @__PURE__ */ g(pe, { size: 48 })
430
+ children: /* @__PURE__ */ h(Ae, { size: 48 })
300
431
  }),
301
- /* @__PURE__ */ g("h3", {
432
+ /* @__PURE__ */ h("h3", {
302
433
  className: "text-lg font-semibold text-text-primary mb-2",
303
434
  children: "Failed to load applications"
304
435
  }),
305
- /* @__PURE__ */ g("p", {
436
+ /* @__PURE__ */ h("p", {
306
437
  className: "text-sm text-text-secondary",
307
- children: q.message
438
+ children: It.message
308
439
  })
309
440
  ]
310
441
  })]
311
- }) : /* @__PURE__ */ _("div", {
442
+ }) : /* @__PURE__ */ g("div", {
312
443
  className: "p-6",
313
444
  children: [
314
- /* @__PURE__ */ _("div", {
445
+ /* @__PURE__ */ g("div", {
315
446
  className: "flex items-center justify-between mb-6",
316
- children: [/* @__PURE__ */ _("div", {
447
+ children: [/* @__PURE__ */ g("div", {
317
448
  className: "flex items-center gap-3",
318
449
  children: [
319
- /* @__PURE__ */ g(f, {
450
+ /* @__PURE__ */ h(je, {
320
451
  size: 24,
321
452
  className: "text-text-primary"
322
453
  }),
323
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
454
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
324
455
  className: "text-2xl font-bold text-text-primary",
325
456
  children: "Job Applications"
326
- }), /* @__PURE__ */ g("p", {
457
+ }), /* @__PURE__ */ h("p", {
327
458
  className: "text-sm text-text-secondary",
328
459
  children: "Careers form submissions"
329
460
  })] }),
330
- /* @__PURE__ */ g(e, {
461
+ /* @__PURE__ */ h(e, {
331
462
  variant: "secondary",
332
463
  className: "ml-2",
333
- children: Ue
464
+ children: X
465
+ })
466
+ ]
467
+ }), /* @__PURE__ */ g(t, {
468
+ onClick: () => F(!0),
469
+ children: [/* @__PURE__ */ h(Le, { size: 18 }), "Add Candidate"]
470
+ })]
471
+ }),
472
+ Y.length > 0 && /* @__PURE__ */ g("div", {
473
+ className: "mb-4 -mt-2 space-y-2",
474
+ children: [/* @__PURE__ */ g("div", {
475
+ className: "flex flex-wrap items-center gap-2",
476
+ children: [
477
+ /* @__PURE__ */ h(n, {
478
+ checked: Zt ? !0 : Xt > 0 && "indeterminate",
479
+ disabled: O || W,
480
+ onCheckedChange: (e) => D((t) => we(t, Z, e === !0)),
481
+ "aria-label": "Select all visible applications"
482
+ }),
483
+ Q > 0 ? /* @__PURE__ */ h(Oe, { selection: E }) : /* @__PURE__ */ g("span", {
484
+ className: "text-xs text-text-secondary",
485
+ children: [
486
+ "Select all ",
487
+ Y.length,
488
+ " visible applications"
489
+ ]
490
+ }),
491
+ X > 0 && (E.mode !== "all" || E.excludedIds.size > 0) ? /* @__PURE__ */ g(t, {
492
+ type: "button",
493
+ variant: "ghost",
494
+ size: "sm",
495
+ onClick: () => void nn(),
496
+ disabled: O || W,
497
+ children: [
498
+ O ? /* @__PURE__ */ h(p, {
499
+ size: 14,
500
+ className: "animate-spin"
501
+ }) : null,
502
+ "Select all ",
503
+ X,
504
+ " matching applications"
505
+ ]
506
+ }) : null,
507
+ Q > 0 ? /* @__PURE__ */ h("button", {
508
+ type: "button",
509
+ onClick: () => {
510
+ D(u()), ht([]), k(null);
511
+ },
512
+ disabled: O,
513
+ className: "text-xs text-text-secondary underline hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-50",
514
+ children: "Clear"
515
+ }) : null
516
+ ]
517
+ }), _t ? /* @__PURE__ */ h("p", {
518
+ className: "text-sm text-status-error-text",
519
+ role: "alert",
520
+ children: _t
521
+ }) : null]
522
+ }),
523
+ Q > 0 && /* @__PURE__ */ g("div", {
524
+ className: "mb-4 flex flex-col justify-between gap-3 rounded-lg border border-primary/30 bg-primary/5 p-3 sm:flex-row sm:items-center",
525
+ children: [/* @__PURE__ */ h("div", { children: w ? Yt ? /* @__PURE__ */ h("p", {
526
+ className: "text-xs text-text-secondary",
527
+ children: "Bulk actions run sequential requests of no more than 100 candidates each."
528
+ }) : /* @__PURE__ */ h("p", {
529
+ className: "text-xs text-status-error-text",
530
+ children: "Some selected applications are no longer available in this posting. Clear and select again."
531
+ }) : /* @__PURE__ */ h("p", {
532
+ className: "text-xs text-text-secondary",
533
+ children: "Filter to one job posting to enable bulk candidate actions."
534
+ }) }), /* @__PURE__ */ g("div", {
535
+ className: "flex flex-wrap items-center gap-2",
536
+ children: [
537
+ /* @__PURE__ */ g(t, {
538
+ variant: "outline",
539
+ size: "sm",
540
+ disabled: !Qt,
541
+ onClick: () => void $("addRound"),
542
+ className: "gap-2",
543
+ children: [/* @__PURE__ */ h(Ve, { size: 14 }), "Add Selected to Round"]
544
+ }),
545
+ /* @__PURE__ */ g(t, {
546
+ variant: "outline",
547
+ size: "sm",
548
+ disabled: !Qt,
549
+ onClick: () => void $("message"),
550
+ className: "gap-2",
551
+ children: [/* @__PURE__ */ h(ze, { size: 14 }), "Send Message"]
552
+ }),
553
+ /* @__PURE__ */ g(t, {
554
+ variant: "outline",
555
+ size: "sm",
556
+ disabled: !Qt,
557
+ onClick: () => void $("assignment"),
558
+ className: "gap-2",
559
+ children: [/* @__PURE__ */ h(Be, { size: 14 }), "Assign & Email Random Take-Home"]
334
560
  })
335
561
  ]
336
- }), /* @__PURE__ */ _(t, {
337
- onClick: () => M(!0),
338
- children: [/* @__PURE__ */ g(ve, { size: 18 }), "Add Candidate"]
339
562
  })]
340
563
  }),
341
- /* @__PURE__ */ g(Te, {
564
+ /* @__PURE__ */ h(Ke, {
342
565
  className: "mb-6",
343
566
  children: "Candidates who apply through your careers pages show up here. Review resumes and move applicants through your hiring pipeline — from new submission to screening, interview and hire — so promising people get a timely response. Open an application to see the full profile and resume."
344
567
  }),
345
- /* @__PURE__ */ _("div", {
568
+ /* @__PURE__ */ g("div", {
346
569
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-4 p-4 rounded-xl border border-border-seam bg-bg-surface mb-6",
347
570
  children: [
348
- /* @__PURE__ */ _("div", {
571
+ /* @__PURE__ */ g("div", {
349
572
  className: "relative flex-1",
350
- children: [/* @__PURE__ */ g(ye, {
573
+ children: [/* @__PURE__ */ h(Re, {
351
574
  size: 18,
352
575
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
353
- }), /* @__PURE__ */ g(a, {
576
+ }), /* @__PURE__ */ h(o, {
354
577
  type: "text",
355
578
  "aria-label": "Search applications",
356
579
  placeholder: "Search by name, email, or position...",
357
- value: w,
358
- onChange: (e) => Me(e.target.value),
580
+ value: y,
581
+ onChange: (e) => at(e.target.value),
359
582
  className: "pl-10"
360
583
  })]
361
584
  }),
362
- /* @__PURE__ */ _("div", {
585
+ /* @__PURE__ */ g("div", {
363
586
  className: "flex items-center gap-1 p-1 rounded-lg border bg-bg-sunken/50",
364
- children: [/* @__PURE__ */ g(t, {
365
- variant: A === "list" ? "secondary" : "ghost",
587
+ children: [/* @__PURE__ */ h(t, {
588
+ variant: ft === "list" ? "secondary" : "ghost",
366
589
  size: "sm",
367
- onClick: () => j("list"),
590
+ onClick: () => pt("list"),
368
591
  className: "px-3",
369
592
  "aria-label": "Show applications as a list",
370
- children: /* @__PURE__ */ g(_e, { size: 18 })
371
- }), /* @__PURE__ */ g(t, {
372
- variant: A === "kanban" ? "secondary" : "ghost",
593
+ children: /* @__PURE__ */ h(Fe, { size: 18 })
594
+ }), /* @__PURE__ */ h(t, {
595
+ variant: ft === "kanban" ? "secondary" : "ghost",
373
596
  size: "sm",
374
- onClick: () => j("kanban"),
597
+ onClick: () => pt("kanban"),
375
598
  className: "px-3",
376
599
  "aria-label": "Show applications as a kanban board",
377
- children: /* @__PURE__ */ g(ge, { size: 18 })
600
+ children: /* @__PURE__ */ h(Pe, { size: 18 })
378
601
  })]
379
602
  }),
380
- /* @__PURE__ */ _(t, {
381
- variant: k ? "secondary" : "outline",
603
+ /* @__PURE__ */ g(t, {
604
+ variant: T ? "secondary" : "outline",
382
605
  size: "sm",
383
- onClick: () => Le(!k),
606
+ onClick: () => dt(!T),
384
607
  className: "gap-2",
385
608
  children: [
386
- /* @__PURE__ */ g(he, { size: 16 }),
609
+ /* @__PURE__ */ h(Ne, { size: 16 }),
387
610
  "Filters",
388
- /* @__PURE__ */ g(me, {
611
+ /* @__PURE__ */ h(Me, {
389
612
  size: 14,
390
- className: k ? "rotate-180 transition-transform" : "transition-transform"
613
+ className: T ? "rotate-180 transition-transform" : "transition-transform"
391
614
  })
392
615
  ]
393
616
  })
394
617
  ]
395
618
  }),
396
- k && /* @__PURE__ */ g("div", {
397
- className: "mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg",
398
- children: /* @__PURE__ */ _("div", {
399
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
400
- children: [
401
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
402
- htmlFor: "job-app-status-filter",
403
- className: "block text-xs font-medium text-text-secondary mb-1",
404
- children: "Status"
405
- }), /* @__PURE__ */ _("select", {
406
- id: "job-app-status-filter",
407
- value: E,
408
- onChange: (e) => Pe(e.target.value),
409
- className: "w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
410
- children: [
411
- /* @__PURE__ */ g("option", {
412
- value: "",
413
- children: "All statuses"
414
- }),
415
- /* @__PURE__ */ g("option", {
416
- value: "NEW",
417
- children: "New"
418
- }),
419
- /* @__PURE__ */ g("option", {
420
- value: "SCREENING",
421
- children: "Screening"
422
- }),
423
- /* @__PURE__ */ g("option", {
424
- value: "SHORTLISTED",
425
- children: "Shortlisted"
426
- }),
427
- /* @__PURE__ */ g("option", {
428
- value: "INTERVIEW",
429
- children: "Interview"
430
- }),
431
- /* @__PURE__ */ g("option", {
432
- value: "HIRED",
433
- children: "Hired"
434
- }),
435
- /* @__PURE__ */ g("option", {
436
- value: "REJECTED",
437
- children: "Rejected"
438
- }),
439
- /* @__PURE__ */ g("option", {
440
- value: "ARCHIVED",
441
- children: "Archived"
442
- })
443
- ]
444
- })] }),
445
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
619
+ T && /* @__PURE__ */ g("div", {
620
+ className: "mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg space-y-4",
621
+ children: [
622
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("p", {
623
+ className: "block text-xs font-medium text-text-secondary mb-1.5",
624
+ children: ["Status ", /* @__PURE__ */ h("span", {
625
+ className: "font-normal",
626
+ children: "(select any number)"
627
+ })]
628
+ }), /* @__PURE__ */ g("div", {
629
+ className: "flex flex-wrap gap-1.5",
630
+ children: [_e.map((e) => {
631
+ let t = x.has(e);
632
+ return /* @__PURE__ */ h("button", {
633
+ type: "button",
634
+ onClick: () => st((t) => Ye(t, e)),
635
+ "aria-pressed": t,
636
+ className: `px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${t ? `${l[e]} border-transparent` : "bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong"}`,
637
+ children: ge[e]
638
+ }, e);
639
+ }), x.size > 0 && /* @__PURE__ */ h("button", {
640
+ type: "button",
641
+ onClick: () => st(/* @__PURE__ */ new Set()),
642
+ className: "px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline",
643
+ children: "Clear"
644
+ })]
645
+ })] }),
646
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("p", {
647
+ className: "block text-xs font-medium text-text-secondary mb-1.5",
648
+ children: ["Interview round stage ", /* @__PURE__ */ h("span", {
649
+ className: "font-normal",
650
+ children: "(select any number)"
651
+ })]
652
+ }), /* @__PURE__ */ g("div", {
653
+ className: "flex flex-wrap gap-1.5",
654
+ children: [he.map((e) => {
655
+ let t = S.has(e), n = me[e];
656
+ return /* @__PURE__ */ h("button", {
657
+ type: "button",
658
+ onClick: () => ct((t) => Ye(t, e)),
659
+ "aria-pressed": t,
660
+ className: `px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${t ? `${n.className} border-transparent` : "bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong"}`,
661
+ children: n.label
662
+ }, e);
663
+ }), S.size > 0 && /* @__PURE__ */ h("button", {
664
+ type: "button",
665
+ onClick: () => ct(/* @__PURE__ */ new Set()),
666
+ className: "px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline",
667
+ children: "Clear"
668
+ })]
669
+ })] }),
670
+ /* @__PURE__ */ g("div", {
671
+ className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
672
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
446
673
  htmlFor: "job-app-product-filter",
447
674
  className: "block text-xs font-medium text-text-secondary mb-1",
448
675
  children: "Product"
449
- }), /* @__PURE__ */ _("select", {
676
+ }), /* @__PURE__ */ g("select", {
450
677
  id: "job-app-product-filter",
451
- value: D,
452
- onChange: (e) => Fe(e.target.value),
678
+ value: C,
679
+ onChange: (e) => lt(e.target.value),
453
680
  className: "w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
454
- children: [/* @__PURE__ */ g("option", {
681
+ children: [/* @__PURE__ */ h("option", {
455
682
  value: "",
456
683
  children: "All products"
457
- }), Ge.map((e) => /* @__PURE__ */ g("option", {
684
+ }), an.map((e) => /* @__PURE__ */ h("option", {
458
685
  value: e,
459
- children: U[e] || e
686
+ children: H[e] || e
460
687
  }, e))]
461
- })] }),
462
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
688
+ })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
463
689
  htmlFor: "job-app-posting-filter",
464
690
  className: "block text-xs font-medium text-text-secondary mb-1",
465
691
  children: "Job Posting"
466
- }), /* @__PURE__ */ _("select", {
692
+ }), /* @__PURE__ */ g("select", {
467
693
  id: "job-app-posting-filter",
468
- value: O,
469
- onChange: (e) => Ie(e.target.value),
470
- disabled: Y,
694
+ value: w,
695
+ onChange: (e) => ut(e.target.value),
696
+ disabled: Bt,
471
697
  className: "w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50",
472
- children: [/* @__PURE__ */ g("option", {
698
+ children: [/* @__PURE__ */ h("option", {
473
699
  value: "",
474
700
  children: "All postings"
475
- }), (J?.jobPostings?.items ?? []).map((e) => /* @__PURE__ */ g("option", {
701
+ }), (zt?.jobPostings?.items ?? []).map((e) => /* @__PURE__ */ h("option", {
476
702
  value: e.id,
477
703
  children: e.title
478
704
  }, e.id))]
479
- })] })
480
- ]
481
- })
705
+ })] })]
706
+ })
707
+ ]
482
708
  }),
483
- X.length === 0 ? /* @__PURE__ */ g(we, {
709
+ Y.length === 0 ? /* @__PURE__ */ h(Ge, {
484
710
  illustration: "empty-people",
485
711
  title: "No applications yet",
486
712
  description: "Job applications from your careers pages will appear here."
487
- }) : /* @__PURE__ */ _(h, { children: [A === "list" ? /* @__PURE__ */ g("div", {
713
+ }) : /* @__PURE__ */ g(m, { children: [ft === "list" ? /* @__PURE__ */ h("div", {
488
714
  className: "space-y-3",
489
- children: X.map((e) => Ze(e))
490
- }) : /* @__PURE__ */ g("div", {
715
+ children: Y.map((e) => pn(e))
716
+ }) : /* @__PURE__ */ h("div", {
491
717
  className: "flex gap-4 overflow-x-auto pb-4",
492
- children: v.map((t) => {
493
- let n = Xe[t] ?? [];
494
- return /* @__PURE__ */ _("div", {
718
+ children: _e.map((t) => {
719
+ let n = fn[t] ?? [];
720
+ return /* @__PURE__ */ g("div", {
495
721
  className: "flex flex-col gap-3 w-[280px] flex-shrink-0 max-h-[calc(100vh-280px)]",
496
- children: [/* @__PURE__ */ _("div", {
722
+ children: [/* @__PURE__ */ g("div", {
497
723
  className: "flex items-center justify-between px-1",
498
- children: [/* @__PURE__ */ g("h3", {
724
+ children: [/* @__PURE__ */ h("h3", {
499
725
  className: "text-sm font-semibold text-text-primary",
500
- children: b[t]
501
- }), /* @__PURE__ */ g(e, {
726
+ children: ge[t]
727
+ }), /* @__PURE__ */ h(e, {
502
728
  variant: "secondary",
503
- className: y[t],
729
+ className: l[t],
504
730
  children: n.length
505
731
  })]
506
- }), /* @__PURE__ */ _("div", {
732
+ }), /* @__PURE__ */ g("div", {
507
733
  className: "flex flex-col gap-3 overflow-y-auto pr-1",
508
- children: [n.length === 0 && /* @__PURE__ */ g("div", {
734
+ children: [n.length === 0 && /* @__PURE__ */ h("div", {
509
735
  className: "text-center py-6 px-3 rounded-lg border border-dashed border-border-seam bg-bg-sunken/30",
510
- children: /* @__PURE__ */ g("p", {
736
+ children: /* @__PURE__ */ h("p", {
511
737
  className: "text-xs text-text-secondary",
512
738
  children: "No applications"
513
739
  })
514
- }), n.map((e) => Ze(e, !0))]
740
+ }), n.map((e) => pn(e, !0))]
515
741
  })]
516
742
  }, t);
517
743
  })
518
- }), Z && /* @__PURE__ */ g("div", {
744
+ }), Gt && /* @__PURE__ */ h("div", {
519
745
  className: "flex justify-center mt-6",
520
- children: /* @__PURE__ */ _(t, {
746
+ children: /* @__PURE__ */ g(t, {
521
747
  variant: "outline",
522
748
  size: "sm",
523
- onClick: Ke,
524
- disabled: K,
749
+ onClick: () => void sn(),
750
+ disabled: Ot,
525
751
  className: "gap-2",
526
- children: [K ? /* @__PURE__ */ g(p, {
752
+ children: [Ot ? /* @__PURE__ */ h(p, {
527
753
  size: 14,
528
754
  className: "animate-spin"
529
755
  }) : null, "Load more"]
530
756
  })
531
757
  })] }),
532
- /* @__PURE__ */ g(n, {
533
- open: Re,
758
+ /* @__PURE__ */ h(r, {
759
+ open: Ct,
534
760
  onOpenChange: (e) => {
535
- M(e), e || $();
761
+ F(e), e || cn();
536
762
  },
537
- children: /* @__PURE__ */ _(r, {
763
+ children: /* @__PURE__ */ g(i, {
538
764
  className: "sm:max-w-2xl max-h-[90vh] overflow-y-auto",
539
765
  children: [
540
- /* @__PURE__ */ _(te, { children: [/* @__PURE__ */ g(ne, { children: "Add Candidate" }), /* @__PURE__ */ g(i, { children: "Manually add a candidate to the hiring pipeline. Resumes are optional and can be attached as PDF, DOC, or DOCX (max 10 MB)." })] }),
541
- /* @__PURE__ */ _("form", {
766
+ /* @__PURE__ */ g(te, { children: [/* @__PURE__ */ h(ne, { children: "Add Candidate" }), /* @__PURE__ */ h(a, { children: "Manually add a candidate to the hiring pipeline. Resumes are optional and can be attached as PDF, DOC, or DOCX (max 10 MB)." })] }),
767
+ /* @__PURE__ */ g("form", {
542
768
  id: "add-candidate-form",
543
- onSubmit: Ye,
769
+ onSubmit: dn,
544
770
  className: "space-y-4",
545
771
  children: [
546
- /* @__PURE__ */ _("div", {
772
+ /* @__PURE__ */ g("div", {
547
773
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
548
- children: [/* @__PURE__ */ _("div", {
774
+ children: [/* @__PURE__ */ g("div", {
549
775
  className: "space-y-1.5",
550
776
  children: [
551
- /* @__PURE__ */ _(o, {
777
+ /* @__PURE__ */ g(s, {
552
778
  htmlFor: "candidate-name",
553
- children: ["Name ", /* @__PURE__ */ g("span", {
779
+ children: ["Name ", /* @__PURE__ */ h("span", {
554
780
  className: "text-status-error-text",
555
781
  children: "*"
556
782
  })]
557
783
  }),
558
- /* @__PURE__ */ g(a, {
784
+ /* @__PURE__ */ h(o, {
559
785
  id: "candidate-name",
560
- value: N.name,
561
- onChange: (e) => P((t) => ({
786
+ value: I.name,
787
+ onChange: (e) => L((t) => ({
562
788
  ...t,
563
789
  name: e.target.value
564
790
  })),
565
791
  placeholder: "Full name",
566
- "aria-invalid": !!F.name
792
+ "aria-invalid": !!R.name
567
793
  }),
568
- F.name && /* @__PURE__ */ g("p", {
794
+ R.name && /* @__PURE__ */ h("p", {
569
795
  className: "text-xs text-status-error-text",
570
- children: F.name
796
+ children: R.name
571
797
  })
572
798
  ]
573
- }), /* @__PURE__ */ _("div", {
799
+ }), /* @__PURE__ */ g("div", {
574
800
  className: "space-y-1.5",
575
801
  children: [
576
- /* @__PURE__ */ _(o, {
802
+ /* @__PURE__ */ g(s, {
577
803
  htmlFor: "candidate-email",
578
- children: ["Email ", /* @__PURE__ */ g("span", {
804
+ children: ["Email ", /* @__PURE__ */ h("span", {
579
805
  className: "text-status-error-text",
580
806
  children: "*"
581
807
  })]
582
808
  }),
583
- /* @__PURE__ */ g(a, {
809
+ /* @__PURE__ */ h(o, {
584
810
  id: "candidate-email",
585
811
  type: "email",
586
- value: N.email,
587
- onChange: (e) => P((t) => ({
812
+ value: I.email,
813
+ onChange: (e) => L((t) => ({
588
814
  ...t,
589
815
  email: e.target.value
590
816
  })),
591
817
  placeholder: "email@example.com",
592
- "aria-invalid": !!F.email
818
+ "aria-invalid": !!R.email
593
819
  }),
594
- F.email && /* @__PURE__ */ g("p", {
820
+ R.email && /* @__PURE__ */ h("p", {
595
821
  className: "text-xs text-status-error-text",
596
- children: F.email
822
+ children: R.email
597
823
  })
598
824
  ]
599
825
  })]
600
826
  }),
601
- /* @__PURE__ */ _("div", {
827
+ /* @__PURE__ */ g("div", {
602
828
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
603
- children: [/* @__PURE__ */ _("div", {
829
+ children: [/* @__PURE__ */ g("div", {
604
830
  className: "space-y-1.5",
605
- children: [/* @__PURE__ */ g(o, {
831
+ children: [/* @__PURE__ */ h(s, {
606
832
  htmlFor: "candidate-phone",
607
833
  children: "Phone"
608
- }), /* @__PURE__ */ g(a, {
834
+ }), /* @__PURE__ */ h(o, {
609
835
  id: "candidate-phone",
610
- value: N.phone,
611
- onChange: (e) => P((t) => ({
836
+ value: I.phone,
837
+ onChange: (e) => L((t) => ({
612
838
  ...t,
613
839
  phone: e.target.value
614
840
  })),
615
841
  placeholder: "+91 98765 43210"
616
842
  })]
617
- }), /* @__PURE__ */ _("div", {
843
+ }), /* @__PURE__ */ g("div", {
618
844
  className: "space-y-1.5",
619
845
  children: [
620
- /* @__PURE__ */ _(o, {
846
+ /* @__PURE__ */ g(s, {
621
847
  htmlFor: "candidate-source",
622
- children: ["Source ", /* @__PURE__ */ g("span", {
848
+ children: ["Source ", /* @__PURE__ */ h("span", {
623
849
  className: "text-status-error-text",
624
850
  children: "*"
625
851
  })]
626
852
  }),
627
- /* @__PURE__ */ g(a, {
853
+ /* @__PURE__ */ h(o, {
628
854
  id: "candidate-source",
629
855
  list: "candidate-source-suggestions",
630
- value: N.source,
631
- onChange: (e) => P((t) => ({
856
+ value: I.source,
857
+ onChange: (e) => L((t) => ({
632
858
  ...t,
633
859
  source: e.target.value
634
860
  })),
635
861
  placeholder: "e.g. LinkedIn",
636
- "aria-invalid": !!F.source
862
+ "aria-invalid": !!R.source
637
863
  }),
638
- /* @__PURE__ */ g("datalist", {
864
+ /* @__PURE__ */ h("datalist", {
639
865
  id: "candidate-source-suggestions",
640
- children: De.map((e) => /* @__PURE__ */ g("option", { value: e }, e))
866
+ children: Qe.map((e) => /* @__PURE__ */ h("option", { value: e }, e))
641
867
  }),
642
- F.source && /* @__PURE__ */ g("p", {
868
+ R.source && /* @__PURE__ */ h("p", {
643
869
  className: "text-xs text-status-error-text",
644
- children: F.source
870
+ children: R.source
645
871
  })
646
872
  ]
647
873
  })]
648
874
  }),
649
- /* @__PURE__ */ _("div", {
875
+ /* @__PURE__ */ g("div", {
650
876
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
651
- children: [/* @__PURE__ */ _("div", {
877
+ children: [/* @__PURE__ */ g("div", {
652
878
  className: "space-y-1.5",
653
879
  children: [
654
- /* @__PURE__ */ g(o, {
880
+ /* @__PURE__ */ h(s, {
655
881
  htmlFor: "candidate-job-posting",
656
882
  children: "Job Posting"
657
883
  }),
658
- /* @__PURE__ */ _(re, {
659
- value: N.jobPostingId,
660
- onValueChange: (e) => P((t) => ({
884
+ /* @__PURE__ */ g(re, {
885
+ value: I.jobPostingId,
886
+ onValueChange: (e) => L((t) => ({
661
887
  ...t,
662
888
  jobPostingId: e
663
889
  })),
664
- disabled: Y,
665
- children: [/* @__PURE__ */ g(ae, {
890
+ disabled: Bt,
891
+ children: [/* @__PURE__ */ h(oe, {
666
892
  id: "candidate-job-posting",
667
- children: /* @__PURE__ */ g(oe, { placeholder: "Select an open posting" })
668
- }), /* @__PURE__ */ _(ie, { children: [/* @__PURE__ */ g(s, {
669
- value: S,
893
+ children: /* @__PURE__ */ h(se, { placeholder: "Select an open posting" })
894
+ }), /* @__PURE__ */ g(ie, { children: [/* @__PURE__ */ h(ae, {
895
+ value: v,
670
896
  children: "No posting (manual entry)"
671
- }), He.map((e) => /* @__PURE__ */ g(s, {
897
+ }), Ht.map((e) => /* @__PURE__ */ h(ae, {
672
898
  value: e.id,
673
899
  children: e.title
674
900
  }, e.id))] })]
675
901
  }),
676
- /* @__PURE__ */ g("p", {
902
+ /* @__PURE__ */ h("p", {
677
903
  className: "text-xs text-text-secondary",
678
904
  children: "Position and department are derived from the selected posting."
679
905
  })
680
906
  ]
681
- }), /* @__PURE__ */ _("div", {
907
+ }), /* @__PURE__ */ g("div", {
682
908
  className: "space-y-1.5",
683
909
  children: [
684
- /* @__PURE__ */ _(o, {
910
+ /* @__PURE__ */ g(s, {
685
911
  htmlFor: "candidate-position",
686
912
  children: [
687
913
  "Position",
688
914
  " ",
689
- N.jobPostingId === S && /* @__PURE__ */ g("span", {
915
+ I.jobPostingId === v && /* @__PURE__ */ h("span", {
690
916
  className: "text-status-error-text",
691
917
  children: "*"
692
918
  })
693
919
  ]
694
920
  }),
695
- /* @__PURE__ */ g(a, {
921
+ /* @__PURE__ */ h(o, {
696
922
  id: "candidate-position",
697
- value: N.position,
698
- onChange: (e) => P((t) => ({
923
+ value: I.position,
924
+ onChange: (e) => L((t) => ({
699
925
  ...t,
700
926
  position: e.target.value
701
927
  })),
702
928
  placeholder: "e.g. Product Engineer",
703
- disabled: N.jobPostingId !== S,
704
- "aria-invalid": !!F.position
929
+ disabled: I.jobPostingId !== v,
930
+ "aria-invalid": !!R.position
705
931
  }),
706
- F.position && /* @__PURE__ */ g("p", {
932
+ R.position && /* @__PURE__ */ h("p", {
707
933
  className: "text-xs text-status-error-text",
708
- children: F.position
934
+ children: R.position
709
935
  })
710
936
  ]
711
937
  })]
712
938
  }),
713
- /* @__PURE__ */ _("div", {
939
+ /* @__PURE__ */ g("div", {
714
940
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
715
- children: [/* @__PURE__ */ _("div", {
941
+ children: [/* @__PURE__ */ g("div", {
716
942
  className: "space-y-1.5",
717
- children: [/* @__PURE__ */ g(o, {
943
+ children: [/* @__PURE__ */ h(s, {
718
944
  htmlFor: "candidate-linkedin",
719
945
  children: "LinkedIn"
720
- }), /* @__PURE__ */ g(a, {
946
+ }), /* @__PURE__ */ h(o, {
721
947
  id: "candidate-linkedin",
722
- value: N.linkedin,
723
- onChange: (e) => P((t) => ({
948
+ value: I.linkedin,
949
+ onChange: (e) => L((t) => ({
724
950
  ...t,
725
951
  linkedin: e.target.value
726
952
  })),
727
953
  placeholder: "https://linkedin.com/in/…"
728
954
  })]
729
- }), /* @__PURE__ */ _("div", {
955
+ }), /* @__PURE__ */ g("div", {
730
956
  className: "space-y-1.5",
731
- children: [/* @__PURE__ */ g(o, {
957
+ children: [/* @__PURE__ */ h(s, {
732
958
  htmlFor: "candidate-portfolio",
733
959
  children: "Portfolio"
734
- }), /* @__PURE__ */ g(a, {
960
+ }), /* @__PURE__ */ h(o, {
735
961
  id: "candidate-portfolio",
736
- value: N.portfolio,
737
- onChange: (e) => P((t) => ({
962
+ value: I.portfolio,
963
+ onChange: (e) => L((t) => ({
738
964
  ...t,
739
965
  portfolio: e.target.value
740
966
  })),
@@ -742,15 +968,15 @@ function w() {
742
968
  })]
743
969
  })]
744
970
  }),
745
- /* @__PURE__ */ _("div", {
971
+ /* @__PURE__ */ g("div", {
746
972
  className: "space-y-1.5",
747
- children: [/* @__PURE__ */ g(o, {
973
+ children: [/* @__PURE__ */ h(s, {
748
974
  htmlFor: "candidate-cover-letter",
749
975
  children: "Cover Letter"
750
- }), /* @__PURE__ */ g(se, {
976
+ }), /* @__PURE__ */ h(ce, {
751
977
  id: "candidate-cover-letter",
752
- value: N.coverLetter,
753
- onChange: (e) => P((t) => ({
978
+ value: I.coverLetter,
979
+ onChange: (e) => L((t) => ({
754
980
  ...t,
755
981
  coverLetter: e.target.value
756
982
  })),
@@ -758,62 +984,84 @@ function w() {
758
984
  rows: 4
759
985
  })]
760
986
  }),
761
- /* @__PURE__ */ _("div", {
987
+ /* @__PURE__ */ g("div", {
762
988
  className: "space-y-1.5",
763
989
  children: [
764
- /* @__PURE__ */ g(o, {
990
+ /* @__PURE__ */ h(s, {
765
991
  htmlFor: "candidate-resume",
766
992
  children: "Resume (optional)"
767
993
  }),
768
- /* @__PURE__ */ g(a, {
994
+ /* @__PURE__ */ h(o, {
769
995
  id: "candidate-resume",
770
996
  type: "file",
771
- accept: ke,
772
- onChange: qe
997
+ accept: et,
998
+ onChange: ln
773
999
  }),
774
- /* @__PURE__ */ _("p", {
1000
+ /* @__PURE__ */ g("p", {
775
1001
  className: "text-xs text-text-secondary flex items-center gap-1",
776
1002
  children: [
777
- /* @__PURE__ */ g(m, { size: 11 }),
1003
+ /* @__PURE__ */ h(Ie, { size: 11 }),
778
1004
  "PDF, DOC, or DOCX up to 10 MB.",
779
- L ? ` Selected: ${L.name}` : ""
1005
+ z ? ` Selected: ${z.name}` : ""
780
1006
  ]
781
1007
  }),
782
- z && /* @__PURE__ */ g("p", {
1008
+ Tt && /* @__PURE__ */ h("p", {
783
1009
  className: "text-xs text-status-error-text",
784
- children: z
1010
+ children: Tt
785
1011
  })
786
1012
  ]
787
1013
  })
788
1014
  ]
789
1015
  }),
790
- /* @__PURE__ */ _(ee, { children: [/* @__PURE__ */ g(t, {
1016
+ /* @__PURE__ */ g(ee, { children: [/* @__PURE__ */ h(t, {
791
1017
  type: "button",
792
1018
  variant: "outline",
793
1019
  onClick: () => {
794
- M(!1), $();
1020
+ F(!1), cn();
795
1021
  },
796
- disabled: V,
1022
+ disabled: Et,
797
1023
  children: "Cancel"
798
- }), /* @__PURE__ */ g(t, {
1024
+ }), /* @__PURE__ */ h(t, {
799
1025
  type: "submit",
800
1026
  form: "add-candidate-form",
801
- disabled: V,
802
- children: V ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(p, {
1027
+ disabled: Et,
1028
+ children: Et ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
803
1029
  size: 16,
804
1030
  className: "animate-spin mr-2"
805
- }), "Adding…"] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(be, {
1031
+ }), "Adding…"] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(Ve, {
806
1032
  size: 16,
807
1033
  className: "mr-2"
808
1034
  }), "Add Candidate"] })
809
1035
  })] })
810
1036
  ]
811
1037
  })
812
- })
1038
+ }),
1039
+ A === "message" || A === "assignment" ? /* @__PURE__ */ h(De, {
1040
+ mode: A,
1041
+ open: !0,
1042
+ onClose: rn,
1043
+ onOpenAddRound: () => void $("addRound"),
1044
+ targets: yt,
1045
+ selection: bt,
1046
+ jobPostingId: w,
1047
+ previewLoading: M,
1048
+ previewError: St,
1049
+ refreshTargets: (e) => tn(q, e)
1050
+ }) : null,
1051
+ A === "addRound" ? /* @__PURE__ */ h(Ee, {
1052
+ open: !0,
1053
+ onClose: rn,
1054
+ targets: yt,
1055
+ selection: bt,
1056
+ jobPostingId: w,
1057
+ previewLoading: M,
1058
+ previewError: St,
1059
+ refreshTargets: (e) => tn(q, e)
1060
+ }) : null
813
1061
  ]
814
1062
  });
815
1063
  }
816
1064
  //#endregion
817
- export { w as JobApplicationsPage };
1065
+ export { it as JobApplicationsPage };
818
1066
 
819
1067
  //# sourceMappingURL=JobApplicationsPage.js.map