@burdenoff/microfe-support 2026.818.1 → 2026.819.2

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