@hadoku/jobplatform 3.42.70 → 3.42.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/{ApplicationTracking-CoME_aIo.js → ApplicationTracking-NY5b-raR.js} +2 -2
- package/dist/{ApplicationsList-UHSm2cP2.js → ApplicationsList-S1jUvNA5.js} +1 -1
- package/dist/{ClipboardPalette-COZkKuN-.js → ClipboardPalette-ClkxwPD3.js} +1 -1
- package/dist/{InsightsPage-DSJBQopJ.js → InsightsPage-CqP3hiJc.js} +1 -1
- package/dist/{PacketDetail-DUzfgMQa.js → PacketDetail-DpWzH6ON.js} +1 -1
- package/dist/{PacketsList-Dv7np_9D.js → PacketsList-DTHGYYiB.js} +1 -1
- package/dist/PipelineBoard-DYchvnIr.js +413 -0
- package/dist/{ProfilePage-DFG6yzMx.js → ProfilePage-DTU51lJg.js} +1 -1
- package/dist/api/pipeline.d.ts +12 -1
- package/dist/api/pipeline.d.ts.map +1 -1
- package/dist/components/ImportPosting.d.ts +4 -0
- package/dist/components/ImportPosting.d.ts.map +1 -1
- package/dist/components/JobDrawer.d.ts.map +1 -1
- package/dist/components/safeHtml.d.ts +16 -0
- package/dist/components/safeHtml.d.ts.map +1 -0
- package/dist/{entry-D7QDbdxu.js → entry-9LEkYNMB.js} +726 -637
- package/dist/index.js +1 -1
- package/dist/{pipeline-Es-b-u_8.js → pipeline-BZkEg05A.js} +9 -4
- package/dist/style.css +1 -1
- package/package.json +2 -4
- package/dist/PipelineBoard-BeQEH8-g.js +0 -306
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as g, jsx as s, Fragment as Fe } from "react/jsx-runtime";
|
|
2
2
|
import { createRoot as wa } from "react-dom/client";
|
|
3
|
-
import { logger as
|
|
3
|
+
import { logger as Ot } from "@wolffm/logger/client";
|
|
4
4
|
import * as p from "react";
|
|
5
|
-
import { useState as N, useRef as Te, useEffect as z, useCallback as se, useId as
|
|
6
|
-
import { LoadingSkeleton as
|
|
7
|
-
import { HadokuThemeRoot as
|
|
5
|
+
import { useState as N, useRef as Te, useEffect as z, useCallback as se, useId as _a, useMemo as fe, Suspense as tt, lazy as me } from "react";
|
|
6
|
+
import { LoadingSkeleton as ka, AppHeader as Ra } from "@wolffm/task-ui-components";
|
|
7
|
+
import { HadokuThemeRoot as Na, useHadokuTheme as ja } from "@wolffm/themes";
|
|
8
8
|
var wt = "popstate";
|
|
9
|
-
function
|
|
9
|
+
function _t(e) {
|
|
10
10
|
return typeof e == "object" && e != null && "pathname" in e && "search" in e && "hash" in e && "state" in e && "key" in e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Ca(e = {}) {
|
|
13
13
|
function t(r, o) {
|
|
14
14
|
let {
|
|
15
15
|
pathname: i = "/",
|
|
@@ -30,7 +30,7 @@ function ja(e = {}) {
|
|
|
30
30
|
let c = r.location.href, u = c.indexOf("#");
|
|
31
31
|
l = u === -1 ? c : c.slice(0, u);
|
|
32
32
|
}
|
|
33
|
-
return l + "#" + (typeof o == "string" ? o :
|
|
33
|
+
return l + "#" + (typeof o == "string" ? o : $e(o));
|
|
34
34
|
}
|
|
35
35
|
function n(r, o) {
|
|
36
36
|
X(
|
|
@@ -40,7 +40,7 @@ function ja(e = {}) {
|
|
|
40
40
|
)})`
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return Sa(
|
|
44
44
|
t,
|
|
45
45
|
a,
|
|
46
46
|
n,
|
|
@@ -60,10 +60,10 @@ function X(e, t) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Ea() {
|
|
64
64
|
return Math.random().toString(36).substring(2, 10);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function kt(e, t) {
|
|
67
67
|
return {
|
|
68
68
|
usr: e.state,
|
|
69
69
|
key: e.key,
|
|
@@ -86,11 +86,11 @@ function at(e, t, a = null, n, r) {
|
|
|
86
86
|
// full Locations now and avoid the need to run through this flow at all
|
|
87
87
|
// But that's a pretty big refactor to the current test suite so going to
|
|
88
88
|
// keep as is for the time being and just let any incoming keys take precedence
|
|
89
|
-
key: t && t.key || n ||
|
|
89
|
+
key: t && t.key || n || Ea(),
|
|
90
90
|
unstable_mask: r
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function $e({
|
|
94
94
|
pathname: e = "/",
|
|
95
95
|
search: t = "",
|
|
96
96
|
hash: a = ""
|
|
@@ -107,7 +107,7 @@ function ke(e) {
|
|
|
107
107
|
}
|
|
108
108
|
return t;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Sa(e, t, a, n = {}) {
|
|
111
111
|
let { window: r = document.defaultView, v5Compat: o = !1 } = n, i = r.history, l = "POP", c = null, u = h();
|
|
112
112
|
u == null && (u = 0, i.replaceState({ ...i.state, idx: u }, ""));
|
|
113
113
|
function h() {
|
|
@@ -120,27 +120,27 @@ function Ea(e, t, a, n = {}) {
|
|
|
120
120
|
}
|
|
121
121
|
function v(f, C) {
|
|
122
122
|
l = "PUSH";
|
|
123
|
-
let
|
|
124
|
-
a && a(
|
|
125
|
-
let R =
|
|
123
|
+
let w = _t(f) ? f : at(m.location, f, C);
|
|
124
|
+
a && a(w, f), u = h() + 1;
|
|
125
|
+
let R = kt(w, u), $ = m.createHref(w.unstable_mask || w);
|
|
126
126
|
try {
|
|
127
|
-
i.pushState(R, "",
|
|
128
|
-
} catch (
|
|
129
|
-
if (
|
|
130
|
-
throw
|
|
131
|
-
r.location.assign(
|
|
127
|
+
i.pushState(R, "", $);
|
|
128
|
+
} catch (x) {
|
|
129
|
+
if (x instanceof DOMException && x.name === "DataCloneError")
|
|
130
|
+
throw x;
|
|
131
|
+
r.location.assign($);
|
|
132
132
|
}
|
|
133
133
|
o && c && c({ action: l, location: m.location, delta: 1 });
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function b(f, C) {
|
|
136
136
|
l = "REPLACE";
|
|
137
|
-
let
|
|
138
|
-
a && a(
|
|
139
|
-
let R =
|
|
140
|
-
i.replaceState(R, "",
|
|
137
|
+
let w = _t(f) ? f : at(m.location, f, C);
|
|
138
|
+
a && a(w, f), u = h();
|
|
139
|
+
let R = kt(w, u), $ = m.createHref(w.unstable_mask || w);
|
|
140
|
+
i.replaceState(R, "", $), o && c && c({ action: l, location: m.location, delta: 0 });
|
|
141
141
|
}
|
|
142
142
|
function _(f) {
|
|
143
|
-
return
|
|
143
|
+
return Pa(f);
|
|
144
144
|
}
|
|
145
145
|
let m = {
|
|
146
146
|
get action() {
|
|
@@ -169,32 +169,32 @@ function Ea(e, t, a, n = {}) {
|
|
|
169
169
|
};
|
|
170
170
|
},
|
|
171
171
|
push: v,
|
|
172
|
-
replace:
|
|
172
|
+
replace: b,
|
|
173
173
|
go(f) {
|
|
174
174
|
return i.go(f);
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
177
|
return m;
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function Pa(e, t = !1) {
|
|
180
180
|
let a = "http://localhost";
|
|
181
181
|
typeof window < "u" && (a = window.location.origin !== "null" ? window.location.origin : window.location.href), I(a, "No window.location.(origin|href) available to create URL");
|
|
182
|
-
let n = typeof e == "string" ? e :
|
|
182
|
+
let n = typeof e == "string" ? e : $e(e);
|
|
183
183
|
return n = n.replace(/ $/, "%20"), !t && n.startsWith("//") && (n = a + n), new URL(n, a);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
return
|
|
185
|
+
function Dt(e, t, a = "/") {
|
|
186
|
+
return xa(e, t, a, !1);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function xa(e, t, a, n) {
|
|
189
189
|
let r = typeof t == "string" ? ke(t) : t, o = ue(r.pathname || "/", a);
|
|
190
190
|
if (o == null)
|
|
191
191
|
return null;
|
|
192
|
-
let i =
|
|
192
|
+
let i = Ft(e);
|
|
193
193
|
$a(i);
|
|
194
194
|
let l = null;
|
|
195
195
|
for (let c = 0; l == null && c < i.length; ++c) {
|
|
196
|
-
let u =
|
|
197
|
-
l =
|
|
196
|
+
let u = Ha(o);
|
|
197
|
+
l = Ma(
|
|
198
198
|
i[c],
|
|
199
199
|
u,
|
|
200
200
|
n
|
|
@@ -202,7 +202,7 @@ function Pa(e, t, a, n) {
|
|
|
202
202
|
}
|
|
203
203
|
return l;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Ft(e, t = [], a = [], n = "", r = !1) {
|
|
206
206
|
let o = (i, l, c = r, u) => {
|
|
207
207
|
let h = {
|
|
208
208
|
relativePath: u === void 0 ? i.path || "" : u,
|
|
@@ -224,7 +224,7 @@ function Dt(e, t = [], a = [], n = "", r = !1) {
|
|
|
224
224
|
// @ts-expect-error
|
|
225
225
|
i.index !== !0,
|
|
226
226
|
`Index routes must not have child routes. Please remove all child routes from route path "${d}".`
|
|
227
|
-
),
|
|
227
|
+
), Ft(
|
|
228
228
|
i.children,
|
|
229
229
|
t,
|
|
230
230
|
v,
|
|
@@ -232,7 +232,7 @@ function Dt(e, t = [], a = [], n = "", r = !1) {
|
|
|
232
232
|
c
|
|
233
233
|
)), !(i.path == null && !i.index) && t.push({
|
|
234
234
|
path: d,
|
|
235
|
-
score:
|
|
235
|
+
score: Ua(d, i.index),
|
|
236
236
|
routesMeta: v
|
|
237
237
|
});
|
|
238
238
|
};
|
|
@@ -240,17 +240,17 @@ function Dt(e, t = [], a = [], n = "", r = !1) {
|
|
|
240
240
|
if (i.path === "" || !i.path?.includes("?"))
|
|
241
241
|
o(i, l);
|
|
242
242
|
else
|
|
243
|
-
for (let c of
|
|
243
|
+
for (let c of Ut(i.path))
|
|
244
244
|
o(i, l, !0, c);
|
|
245
245
|
}), t;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function Ut(e) {
|
|
248
248
|
let t = e.split("/");
|
|
249
249
|
if (t.length === 0) return [];
|
|
250
250
|
let [a, ...n] = t, r = a.endsWith("?"), o = a.replace(/\?$/, "");
|
|
251
251
|
if (n.length === 0)
|
|
252
252
|
return r ? [o, ""] : [o];
|
|
253
|
-
let i =
|
|
253
|
+
let i = Ut(n.join("/")), l = [];
|
|
254
254
|
return l.push(
|
|
255
255
|
...i.map(
|
|
256
256
|
(c) => c === "" ? o : [o, c].join("/")
|
|
@@ -261,21 +261,21 @@ function Ft(e) {
|
|
|
261
261
|
}
|
|
262
262
|
function $a(e) {
|
|
263
263
|
e.sort(
|
|
264
|
-
(t, a) => t.score !== a.score ? a.score - t.score :
|
|
264
|
+
(t, a) => t.score !== a.score ? a.score - t.score : Ia(
|
|
265
265
|
t.routesMeta.map((n) => n.childrenIndex),
|
|
266
266
|
a.routesMeta.map((n) => n.childrenIndex)
|
|
267
267
|
)
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
|
-
var
|
|
271
|
-
function
|
|
270
|
+
var La = /^:[\w-]+$/, Ta = 3, Aa = 2, Oa = 1, Da = 10, Fa = -2, Rt = (e) => e === "*";
|
|
271
|
+
function Ua(e, t) {
|
|
272
272
|
let a = e.split("/"), n = a.length;
|
|
273
|
-
return a.some(
|
|
274
|
-
(r, o) => r + (
|
|
273
|
+
return a.some(Rt) && (n += Fa), t && (n += Aa), a.filter((r) => !Rt(r)).reduce(
|
|
274
|
+
(r, o) => r + (La.test(o) ? Ta : o === "" ? Oa : Da),
|
|
275
275
|
n
|
|
276
276
|
);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Ia(e, t) {
|
|
279
279
|
return e.length === t.length && e.slice(0, -1).every((n, r) => n === t[r]) ? (
|
|
280
280
|
// If two routes are siblings, we should try to match the earlier sibling
|
|
281
281
|
// first. This allows people to have fine-grained control over the matching
|
|
@@ -288,7 +288,7 @@ function Ua(e, t) {
|
|
|
288
288
|
0
|
|
289
289
|
);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Ma(e, t, a = !1) {
|
|
292
292
|
let { routesMeta: n } = e, r = {}, o = "/", i = [];
|
|
293
293
|
for (let l = 0; l < n.length; ++l) {
|
|
294
294
|
let c = n[l], u = l === n.length - 1, h = o === "/" ? t : t.slice(o.length) || "/", d = Be(
|
|
@@ -308,7 +308,7 @@ function Ia(e, t, a = !1) {
|
|
|
308
308
|
// TODO: Can this as be avoided?
|
|
309
309
|
params: r,
|
|
310
310
|
pathname: re([o, d.pathname]),
|
|
311
|
-
pathnameBase:
|
|
311
|
+
pathnameBase: Ka(
|
|
312
312
|
re([o, d.pathnameBase])
|
|
313
313
|
),
|
|
314
314
|
route: v
|
|
@@ -318,7 +318,7 @@ function Ia(e, t, a = !1) {
|
|
|
318
318
|
}
|
|
319
319
|
function Be(e, t) {
|
|
320
320
|
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
321
|
-
let [a, n] =
|
|
321
|
+
let [a, n] = Ba(
|
|
322
322
|
e.path,
|
|
323
323
|
e.caseSensitive,
|
|
324
324
|
e.end
|
|
@@ -332,8 +332,8 @@ function Be(e, t) {
|
|
|
332
332
|
let _ = l[v] || "";
|
|
333
333
|
i = o.slice(0, o.length - _.length).replace(/(.)\/+$/, "$1");
|
|
334
334
|
}
|
|
335
|
-
const
|
|
336
|
-
return d && !
|
|
335
|
+
const b = l[v];
|
|
336
|
+
return d && !b ? u[h] = void 0 : u[h] = (b || "").replace(/%2F/g, "/"), u;
|
|
337
337
|
},
|
|
338
338
|
{}
|
|
339
339
|
),
|
|
@@ -342,7 +342,7 @@ function Be(e, t) {
|
|
|
342
342
|
pattern: e
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Ba(e, t = !1, a = !0) {
|
|
346
346
|
X(
|
|
347
347
|
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
348
348
|
`Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
|
|
@@ -359,7 +359,7 @@ function Ma(e, t = !1, a = !0) {
|
|
|
359
359
|
).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
360
360
|
return e.endsWith("*") ? (n.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : a ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), n];
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Ha(e) {
|
|
363
363
|
try {
|
|
364
364
|
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
365
365
|
} catch (t) {
|
|
@@ -376,20 +376,20 @@ function ue(e, t) {
|
|
|
376
376
|
let a = t.endsWith("/") ? t.length - 1 : t.length, n = e.charAt(a);
|
|
377
377
|
return n && n !== "/" ? null : e.slice(a) || "/";
|
|
378
378
|
}
|
|
379
|
-
var
|
|
380
|
-
function
|
|
379
|
+
var Wa = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
380
|
+
function Ja(e, t = "/") {
|
|
381
381
|
let {
|
|
382
382
|
pathname: a,
|
|
383
383
|
search: n = "",
|
|
384
384
|
hash: r = ""
|
|
385
385
|
} = typeof e == "string" ? ke(e) : e, o;
|
|
386
|
-
return a ? (a =
|
|
386
|
+
return a ? (a = It(a), a.startsWith("/") ? o = Nt(a.substring(1), "/") : o = Nt(a, t)) : o = t, {
|
|
387
387
|
pathname: o,
|
|
388
|
-
search:
|
|
389
|
-
hash:
|
|
388
|
+
search: Va(n),
|
|
389
|
+
hash: Ga(r)
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Nt(e, t) {
|
|
393
393
|
let a = He(t).split("/");
|
|
394
394
|
return e.split("/").forEach((r) => {
|
|
395
395
|
r === ".." ? a.length > 1 && a.pop() : r !== "." && a.push(r);
|
|
@@ -400,13 +400,13 @@ function ze(e, t, a, n) {
|
|
|
400
400
|
n
|
|
401
401
|
)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function qa(e) {
|
|
404
404
|
return e.filter(
|
|
405
405
|
(t, a) => a === 0 || t.route.path && t.route.path.length > 0
|
|
406
406
|
);
|
|
407
407
|
}
|
|
408
|
-
function
|
|
409
|
-
let t =
|
|
408
|
+
function ct(e) {
|
|
409
|
+
let t = qa(e);
|
|
410
410
|
return t.map(
|
|
411
411
|
(a, n) => n === t.length - 1 ? a.pathname : a.pathnameBase
|
|
412
412
|
);
|
|
@@ -436,32 +436,32 @@ function We(e, t, a, n = !1) {
|
|
|
436
436
|
}
|
|
437
437
|
l = d >= 0 ? t[d] : "/";
|
|
438
438
|
}
|
|
439
|
-
let c =
|
|
439
|
+
let c = Ja(r, l), u = i && i !== "/" && i.endsWith("/"), h = (o || i === ".") && a.endsWith("/");
|
|
440
440
|
return !c.pathname.endsWith("/") && (u || h) && (c.pathname += "/"), c;
|
|
441
441
|
}
|
|
442
|
-
var
|
|
442
|
+
var It = (e) => e.replace(/\/\/+/g, "/"), re = (e) => It(e.join("/")), He = (e) => e.replace(/\/+$/, ""), Ka = (e) => He(e).replace(/^\/*/, "/"), Va = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Ga = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, za = class {
|
|
443
443
|
constructor(e, t, a, n = !1) {
|
|
444
444
|
this.status = e, this.statusText = t || "", this.internal = n, a instanceof Error ? (this.data = a.toString(), this.error = a) : this.data = a;
|
|
445
445
|
}
|
|
446
446
|
};
|
|
447
|
-
function
|
|
447
|
+
function Ya(e) {
|
|
448
448
|
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Qa(e) {
|
|
451
451
|
let t = e.map((a) => a.route.path).filter(Boolean);
|
|
452
452
|
return re(t) || "/";
|
|
453
453
|
}
|
|
454
|
-
var
|
|
455
|
-
function
|
|
454
|
+
var Mt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
455
|
+
function Bt(e, t) {
|
|
456
456
|
let a = e;
|
|
457
|
-
if (typeof a != "string" || !
|
|
457
|
+
if (typeof a != "string" || !Wa.test(a))
|
|
458
458
|
return {
|
|
459
459
|
absoluteURL: void 0,
|
|
460
460
|
isExternal: !1,
|
|
461
461
|
to: a
|
|
462
462
|
};
|
|
463
463
|
let n = a, r = !1;
|
|
464
|
-
if (
|
|
464
|
+
if (Mt)
|
|
465
465
|
try {
|
|
466
466
|
let o = new URL(window.location.href), i = a.startsWith("//") ? new URL(o.protocol + a) : new URL(a), l = ue(i.pathname, t);
|
|
467
467
|
i.origin === o.origin && l != null ? a = l + i.search + i.hash : r = !0;
|
|
@@ -478,38 +478,38 @@ function Mt(e, t) {
|
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
480
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
481
|
-
var
|
|
481
|
+
var Ht = [
|
|
482
482
|
"POST",
|
|
483
483
|
"PUT",
|
|
484
484
|
"PATCH",
|
|
485
485
|
"DELETE"
|
|
486
486
|
];
|
|
487
487
|
new Set(
|
|
488
|
-
|
|
488
|
+
Ht
|
|
489
489
|
);
|
|
490
|
-
var
|
|
490
|
+
var Xa = [
|
|
491
491
|
"GET",
|
|
492
|
-
...
|
|
492
|
+
...Ht
|
|
493
493
|
];
|
|
494
|
-
new Set(
|
|
494
|
+
new Set(Xa);
|
|
495
495
|
var Ee = p.createContext(null);
|
|
496
496
|
Ee.displayName = "DataRouter";
|
|
497
497
|
var Je = p.createContext(null);
|
|
498
498
|
Je.displayName = "DataRouterState";
|
|
499
|
-
var
|
|
500
|
-
function
|
|
501
|
-
return p.useContext(
|
|
499
|
+
var Wt = p.createContext(!1);
|
|
500
|
+
function Za() {
|
|
501
|
+
return p.useContext(Wt);
|
|
502
502
|
}
|
|
503
|
-
var
|
|
503
|
+
var Jt = p.createContext({
|
|
504
504
|
isTransitioning: !1
|
|
505
505
|
});
|
|
506
|
-
|
|
507
|
-
var
|
|
506
|
+
Jt.displayName = "ViewTransition";
|
|
507
|
+
var en = p.createContext(
|
|
508
508
|
/* @__PURE__ */ new Map()
|
|
509
509
|
);
|
|
510
|
-
|
|
511
|
-
var
|
|
512
|
-
|
|
510
|
+
en.displayName = "Fetchers";
|
|
511
|
+
var tn = p.createContext(null);
|
|
512
|
+
tn.displayName = "Await";
|
|
513
513
|
var Z = p.createContext(
|
|
514
514
|
null
|
|
515
515
|
);
|
|
@@ -524,11 +524,11 @@ var ae = p.createContext({
|
|
|
524
524
|
isDataRoute: !1
|
|
525
525
|
});
|
|
526
526
|
ae.displayName = "Route";
|
|
527
|
-
var
|
|
528
|
-
|
|
529
|
-
var
|
|
530
|
-
function
|
|
531
|
-
if (e.startsWith(`${
|
|
527
|
+
var ut = p.createContext(null);
|
|
528
|
+
ut.displayName = "RouteError";
|
|
529
|
+
var qt = "REACT_ROUTER_ERROR", an = "REDIRECT", nn = "ROUTE_ERROR_RESPONSE";
|
|
530
|
+
function rn(e) {
|
|
531
|
+
if (e.startsWith(`${qt}:${an}:{`))
|
|
532
532
|
try {
|
|
533
533
|
let t = JSON.parse(e.slice(28));
|
|
534
534
|
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean")
|
|
@@ -536,14 +536,14 @@ function nn(e) {
|
|
|
536
536
|
} catch {
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function on(e) {
|
|
540
540
|
if (e.startsWith(
|
|
541
|
-
`${
|
|
541
|
+
`${qt}:${nn}:{`
|
|
542
542
|
))
|
|
543
543
|
try {
|
|
544
544
|
let t = JSON.parse(e.slice(40));
|
|
545
545
|
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string")
|
|
546
|
-
return new
|
|
546
|
+
return new za(
|
|
547
547
|
t.status,
|
|
548
548
|
t.statusText,
|
|
549
549
|
t.data
|
|
@@ -551,7 +551,7 @@ function rn(e) {
|
|
|
551
551
|
} catch {
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function sn(e, { relative: t } = {}) {
|
|
555
555
|
I(
|
|
556
556
|
Se(),
|
|
557
557
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
@@ -572,27 +572,27 @@ function ee() {
|
|
|
572
572
|
"useLocation() may be used only in the context of a <Router> component."
|
|
573
573
|
), p.useContext(Ae).location;
|
|
574
574
|
}
|
|
575
|
-
var
|
|
576
|
-
function
|
|
575
|
+
var Kt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
576
|
+
function Vt(e) {
|
|
577
577
|
p.useContext(Z).static || p.useLayoutEffect(e);
|
|
578
578
|
}
|
|
579
579
|
function ye() {
|
|
580
580
|
let { isDataRoute: e } = p.useContext(ae);
|
|
581
|
-
return e ?
|
|
581
|
+
return e ? kn() : ln();
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function ln() {
|
|
584
584
|
I(
|
|
585
585
|
Se(),
|
|
586
586
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
587
587
|
// router loaded. We can help them understand how to avoid that.
|
|
588
588
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
589
589
|
);
|
|
590
|
-
let e = p.useContext(Ee), { basename: t, navigator: a } = p.useContext(Z), { matches: n } = p.useContext(ae), { pathname: r } = ee(), o = JSON.stringify(
|
|
591
|
-
return
|
|
590
|
+
let e = p.useContext(Ee), { basename: t, navigator: a } = p.useContext(Z), { matches: n } = p.useContext(ae), { pathname: r } = ee(), o = JSON.stringify(ct(n)), i = p.useRef(!1);
|
|
591
|
+
return Vt(() => {
|
|
592
592
|
i.current = !0;
|
|
593
593
|
}), p.useCallback(
|
|
594
594
|
(c, u = {}) => {
|
|
595
|
-
if (X(i.current,
|
|
595
|
+
if (X(i.current, Kt), !i.current) return;
|
|
596
596
|
if (typeof c == "number") {
|
|
597
597
|
a.go(c);
|
|
598
598
|
return;
|
|
@@ -618,23 +618,23 @@ function sn() {
|
|
|
618
618
|
]
|
|
619
619
|
);
|
|
620
620
|
}
|
|
621
|
-
var
|
|
622
|
-
function
|
|
623
|
-
return p.useContext(
|
|
621
|
+
var Gt = p.createContext(null);
|
|
622
|
+
function cn() {
|
|
623
|
+
return p.useContext(Gt);
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function un(e) {
|
|
626
626
|
let t = p.useContext(ae).outlet;
|
|
627
627
|
return p.useMemo(
|
|
628
|
-
() => t && /* @__PURE__ */ p.createElement(
|
|
628
|
+
() => t && /* @__PURE__ */ p.createElement(Gt.Provider, { value: e }, t),
|
|
629
629
|
[t, e]
|
|
630
630
|
);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function zt() {
|
|
633
633
|
let { matches: e } = p.useContext(ae), t = e[e.length - 1];
|
|
634
634
|
return t ? t.params : {};
|
|
635
635
|
}
|
|
636
636
|
function Oe(e, { relative: t } = {}) {
|
|
637
|
-
let { matches: a } = p.useContext(ae), { pathname: n } = ee(), r = JSON.stringify(
|
|
637
|
+
let { matches: a } = p.useContext(ae), { pathname: n } = ee(), r = JSON.stringify(ct(a));
|
|
638
638
|
return p.useMemo(
|
|
639
639
|
() => We(
|
|
640
640
|
e,
|
|
@@ -645,10 +645,10 @@ function Oe(e, { relative: t } = {}) {
|
|
|
645
645
|
[e, r, n, t]
|
|
646
646
|
);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
648
|
+
function dn(e, t) {
|
|
649
|
+
return Yt(e, t);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function Yt(e, t, a) {
|
|
652
652
|
I(
|
|
653
653
|
Se(),
|
|
654
654
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
@@ -658,7 +658,7 @@ function zt(e, t, a) {
|
|
|
658
658
|
let { navigator: n } = p.useContext(Z), { matches: r } = p.useContext(ae), o = r[r.length - 1], i = o ? o.params : {}, l = o ? o.pathname : "/", c = o ? o.pathnameBase : "/", u = o && o.route;
|
|
659
659
|
{
|
|
660
660
|
let f = u && u.path || "";
|
|
661
|
-
|
|
661
|
+
Xt(
|
|
662
662
|
l,
|
|
663
663
|
!u || f.endsWith("*") || f.endsWith("*?"),
|
|
664
664
|
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${f}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
@@ -675,12 +675,12 @@ Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" :
|
|
|
675
675
|
), d = f;
|
|
676
676
|
} else
|
|
677
677
|
d = h;
|
|
678
|
-
let v = d.pathname || "/",
|
|
678
|
+
let v = d.pathname || "/", b = v;
|
|
679
679
|
if (c !== "/") {
|
|
680
680
|
let f = c.replace(/^\//, "").split("/");
|
|
681
|
-
|
|
681
|
+
b = "/" + v.replace(/^\//, "").split("/").slice(f.length).join("/");
|
|
682
682
|
}
|
|
683
|
-
let _ =
|
|
683
|
+
let _ = Dt(e, { pathname: b });
|
|
684
684
|
X(
|
|
685
685
|
u || _ != null,
|
|
686
686
|
`No routes matched location "${d.pathname}${d.search}${d.hash}" `
|
|
@@ -688,7 +688,7 @@ Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" :
|
|
|
688
688
|
_ == null || _[_.length - 1].route.element !== void 0 || _[_.length - 1].route.Component !== void 0 || _[_.length - 1].route.lazy !== void 0,
|
|
689
689
|
`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
690
690
|
);
|
|
691
|
-
let m =
|
|
691
|
+
let m = yn(
|
|
692
692
|
_ && _.map(
|
|
693
693
|
(f) => Object.assign({}, f, {
|
|
694
694
|
params: Object.assign({}, i, f.params),
|
|
@@ -737,14 +737,14 @@ Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" :
|
|
|
737
737
|
m
|
|
738
738
|
) : m;
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
let e =
|
|
740
|
+
function pn() {
|
|
741
|
+
let e = _n(), t = Ya(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), a = e instanceof Error ? e.stack : null, n = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: n }, o = { padding: "2px 4px", backgroundColor: n }, i = null;
|
|
742
742
|
return console.error(
|
|
743
743
|
"Error handled by React Router default ErrorBoundary:",
|
|
744
744
|
e
|
|
745
745
|
), i = /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ p.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ p.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ p.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ p.createElement("h3", { style: { fontStyle: "italic" } }, t), a ? /* @__PURE__ */ p.createElement("pre", { style: r }, a) : null, i);
|
|
746
746
|
}
|
|
747
|
-
var
|
|
747
|
+
var hn = /* @__PURE__ */ p.createElement(pn, null), Qt = class extends p.Component {
|
|
748
748
|
constructor(e) {
|
|
749
749
|
super(e), this.state = {
|
|
750
750
|
location: e.location,
|
|
@@ -775,33 +775,33 @@ var pn = /* @__PURE__ */ p.createElement(dn, null), Yt = class extends p.Compone
|
|
|
775
775
|
render() {
|
|
776
776
|
let e = this.state.error;
|
|
777
777
|
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
778
|
-
const a =
|
|
778
|
+
const a = on(e.digest);
|
|
779
779
|
a && (e = a);
|
|
780
780
|
}
|
|
781
781
|
let t = e !== void 0 ? /* @__PURE__ */ p.createElement(ae.Provider, { value: this.props.routeContext }, /* @__PURE__ */ p.createElement(
|
|
782
|
-
|
|
782
|
+
ut.Provider,
|
|
783
783
|
{
|
|
784
784
|
value: e,
|
|
785
785
|
children: this.props.component
|
|
786
786
|
}
|
|
787
787
|
)) : this.props.children;
|
|
788
|
-
return this.context ? /* @__PURE__ */ p.createElement(
|
|
788
|
+
return this.context ? /* @__PURE__ */ p.createElement(fn, { error: e }, t) : t;
|
|
789
789
|
}
|
|
790
790
|
};
|
|
791
|
-
|
|
791
|
+
Qt.contextType = Wt;
|
|
792
792
|
var Ye = /* @__PURE__ */ new WeakMap();
|
|
793
|
-
function
|
|
793
|
+
function fn({
|
|
794
794
|
children: e,
|
|
795
795
|
error: t
|
|
796
796
|
}) {
|
|
797
797
|
let { basename: a } = p.useContext(Z);
|
|
798
798
|
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
799
|
-
let n =
|
|
799
|
+
let n = rn(t.digest);
|
|
800
800
|
if (n) {
|
|
801
801
|
let r = Ye.get(t);
|
|
802
802
|
if (r) throw r;
|
|
803
|
-
let o =
|
|
804
|
-
if (
|
|
803
|
+
let o = Bt(n.location, a);
|
|
804
|
+
if (Mt && !Ye.get(t))
|
|
805
805
|
if (o.isExternal || n.reloadDocument)
|
|
806
806
|
window.location.href = o.absoluteURL || o.to;
|
|
807
807
|
else {
|
|
@@ -823,11 +823,11 @@ function hn({
|
|
|
823
823
|
}
|
|
824
824
|
return e;
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function mn({ routeContext: e, match: t, children: a }) {
|
|
827
827
|
let n = p.useContext(Ee);
|
|
828
828
|
return n && n.static && n.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (n.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ p.createElement(ae.Provider, { value: e }, a);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function yn(e, t = [], a) {
|
|
831
831
|
let n = a?.state;
|
|
832
832
|
if (e == null) {
|
|
833
833
|
if (!n)
|
|
@@ -860,7 +860,7 @@ function mn(e, t = [], a) {
|
|
|
860
860
|
for (let h = 0; h < r.length; h++) {
|
|
861
861
|
let d = r[h];
|
|
862
862
|
if ((d.route.HydrateFallback || d.route.hydrateFallbackElement) && (l = h), d.route.id) {
|
|
863
|
-
let { loaderData: v, errors:
|
|
863
|
+
let { loaderData: v, errors: b } = n, _ = d.route.loader && !v.hasOwnProperty(d.route.id) && (!b || b[d.route.id] === void 0);
|
|
864
864
|
if (d.route.lazy || _) {
|
|
865
865
|
a.isStatic && (i = !0), l >= 0 ? r = r.slice(0, l + 1) : r = [r[0]];
|
|
866
866
|
break;
|
|
@@ -872,22 +872,22 @@ function mn(e, t = [], a) {
|
|
|
872
872
|
c(h, {
|
|
873
873
|
location: n.location,
|
|
874
874
|
params: n.matches?.[0]?.params ?? {},
|
|
875
|
-
unstable_pattern:
|
|
875
|
+
unstable_pattern: Qa(n.matches),
|
|
876
876
|
errorInfo: d
|
|
877
877
|
});
|
|
878
878
|
} : void 0;
|
|
879
879
|
return r.reduceRight(
|
|
880
880
|
(h, d, v) => {
|
|
881
|
-
let
|
|
882
|
-
n && (
|
|
881
|
+
let b, _ = !1, m = null, f = null;
|
|
882
|
+
n && (b = o && d.route.id ? o[d.route.id] : void 0, m = d.route.errorElement || hn, i && (l < 0 && v === 0 ? (Xt(
|
|
883
883
|
"route-fallback",
|
|
884
884
|
!1,
|
|
885
885
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
886
886
|
), _ = !0, f = null) : l === v && (_ = !0, f = d.route.hydrateFallbackElement || null)));
|
|
887
|
-
let C = t.concat(r.slice(0, v + 1)),
|
|
887
|
+
let C = t.concat(r.slice(0, v + 1)), w = () => {
|
|
888
888
|
let R;
|
|
889
|
-
return
|
|
890
|
-
|
|
889
|
+
return b ? R = m : _ ? R = f : d.route.Component ? R = /* @__PURE__ */ p.createElement(d.route.Component, null) : d.route.element ? R = d.route.element : R = h, /* @__PURE__ */ p.createElement(
|
|
890
|
+
mn,
|
|
891
891
|
{
|
|
892
892
|
match: d,
|
|
893
893
|
routeContext: {
|
|
@@ -900,91 +900,91 @@ function mn(e, t = [], a) {
|
|
|
900
900
|
);
|
|
901
901
|
};
|
|
902
902
|
return n && (d.route.ErrorBoundary || d.route.errorElement || v === 0) ? /* @__PURE__ */ p.createElement(
|
|
903
|
-
|
|
903
|
+
Qt,
|
|
904
904
|
{
|
|
905
905
|
location: n.location,
|
|
906
906
|
revalidation: n.revalidation,
|
|
907
907
|
component: m,
|
|
908
|
-
error:
|
|
909
|
-
children:
|
|
908
|
+
error: b,
|
|
909
|
+
children: w(),
|
|
910
910
|
routeContext: { outlet: null, matches: C, isDataRoute: !0 },
|
|
911
911
|
onError: u
|
|
912
912
|
}
|
|
913
|
-
) :
|
|
913
|
+
) : w();
|
|
914
914
|
},
|
|
915
915
|
null
|
|
916
916
|
);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function dt(e) {
|
|
919
919
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function gn(e) {
|
|
922
922
|
let t = p.useContext(Ee);
|
|
923
|
-
return I(t,
|
|
923
|
+
return I(t, dt(e)), t;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function vn(e) {
|
|
926
926
|
let t = p.useContext(Je);
|
|
927
|
-
return I(t,
|
|
927
|
+
return I(t, dt(e)), t;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function bn(e) {
|
|
930
930
|
let t = p.useContext(ae);
|
|
931
|
-
return I(t,
|
|
931
|
+
return I(t, dt(e)), t;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
934
|
-
let t =
|
|
933
|
+
function pt(e) {
|
|
934
|
+
let t = bn(e), a = t.matches[t.matches.length - 1];
|
|
935
935
|
return I(
|
|
936
936
|
a.route.id,
|
|
937
937
|
`${e} can only be used on routes that contain a unique "id"`
|
|
938
938
|
), a.route.id;
|
|
939
939
|
}
|
|
940
940
|
function wn() {
|
|
941
|
-
return
|
|
941
|
+
return pt(
|
|
942
942
|
"useRouteId"
|
|
943
943
|
/* UseRouteId */
|
|
944
944
|
);
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
let e = p.useContext(
|
|
946
|
+
function _n() {
|
|
947
|
+
let e = p.useContext(ut), t = vn(
|
|
948
948
|
"useRouteError"
|
|
949
949
|
/* UseRouteError */
|
|
950
|
-
), a =
|
|
950
|
+
), a = pt(
|
|
951
951
|
"useRouteError"
|
|
952
952
|
/* UseRouteError */
|
|
953
953
|
);
|
|
954
954
|
return e !== void 0 ? e : t.errors?.[a];
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
let { router: e } =
|
|
956
|
+
function kn() {
|
|
957
|
+
let { router: e } = gn(
|
|
958
958
|
"useNavigate"
|
|
959
959
|
/* UseNavigateStable */
|
|
960
|
-
), t =
|
|
960
|
+
), t = pt(
|
|
961
961
|
"useNavigate"
|
|
962
962
|
/* UseNavigateStable */
|
|
963
963
|
), a = p.useRef(!1);
|
|
964
|
-
return
|
|
964
|
+
return Vt(() => {
|
|
965
965
|
a.current = !0;
|
|
966
966
|
}), p.useCallback(
|
|
967
967
|
async (r, o = {}) => {
|
|
968
|
-
X(a.current,
|
|
968
|
+
X(a.current, Kt), a.current && (typeof r == "number" ? await e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...o }));
|
|
969
969
|
},
|
|
970
970
|
[e, t]
|
|
971
971
|
);
|
|
972
972
|
}
|
|
973
|
-
var
|
|
974
|
-
function
|
|
975
|
-
!t && !
|
|
973
|
+
var jt = {};
|
|
974
|
+
function Xt(e, t, a) {
|
|
975
|
+
!t && !jt[e] && (jt[e] = !0, X(!1, a));
|
|
976
976
|
}
|
|
977
|
-
p.memo(
|
|
978
|
-
function
|
|
977
|
+
p.memo(Rn);
|
|
978
|
+
function Rn({
|
|
979
979
|
routes: e,
|
|
980
980
|
future: t,
|
|
981
981
|
state: a,
|
|
982
982
|
isStatic: n,
|
|
983
983
|
onError: r
|
|
984
984
|
}) {
|
|
985
|
-
return
|
|
985
|
+
return Yt(e, void 0, { state: a, isStatic: n, onError: r });
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function Zt({
|
|
988
988
|
to: e,
|
|
989
989
|
replace: t,
|
|
990
990
|
state: a,
|
|
@@ -1003,7 +1003,7 @@ function Xt({
|
|
|
1003
1003
|
);
|
|
1004
1004
|
let { matches: o } = p.useContext(ae), { pathname: i } = ee(), l = ye(), c = We(
|
|
1005
1005
|
e,
|
|
1006
|
-
|
|
1006
|
+
ct(o),
|
|
1007
1007
|
i,
|
|
1008
1008
|
n === "path"
|
|
1009
1009
|
), u = JSON.stringify(c);
|
|
@@ -1011,8 +1011,8 @@ function Xt({
|
|
|
1011
1011
|
l(JSON.parse(u), { replace: t, state: a, relative: n });
|
|
1012
1012
|
}, [l, u, n, t, a]), null;
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1014
|
+
function ea(e) {
|
|
1015
|
+
return un(e.context);
|
|
1016
1016
|
}
|
|
1017
1017
|
function Y(e) {
|
|
1018
1018
|
I(
|
|
@@ -1020,7 +1020,7 @@ function Y(e) {
|
|
|
1020
1020
|
"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."
|
|
1021
1021
|
);
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function Nn({
|
|
1024
1024
|
basename: e = "/",
|
|
1025
1025
|
children: t = null,
|
|
1026
1026
|
location: a,
|
|
@@ -1049,7 +1049,7 @@ function Rn({
|
|
|
1049
1049
|
search: h = "",
|
|
1050
1050
|
hash: d = "",
|
|
1051
1051
|
state: v = null,
|
|
1052
|
-
key:
|
|
1052
|
+
key: b = "default",
|
|
1053
1053
|
unstable_mask: _
|
|
1054
1054
|
} = a, m = p.useMemo(() => {
|
|
1055
1055
|
let f = ue(u, l);
|
|
@@ -1059,7 +1059,7 @@ function Rn({
|
|
|
1059
1059
|
search: h,
|
|
1060
1060
|
hash: d,
|
|
1061
1061
|
state: v,
|
|
1062
|
-
key:
|
|
1062
|
+
key: b,
|
|
1063
1063
|
unstable_mask: _
|
|
1064
1064
|
},
|
|
1065
1065
|
navigationType: n
|
|
@@ -1070,7 +1070,7 @@ function Rn({
|
|
|
1070
1070
|
h,
|
|
1071
1071
|
d,
|
|
1072
1072
|
v,
|
|
1073
|
-
|
|
1073
|
+
b,
|
|
1074
1074
|
n,
|
|
1075
1075
|
_
|
|
1076
1076
|
]);
|
|
@@ -1079,11 +1079,11 @@ function Rn({
|
|
|
1079
1079
|
`<Router basename="${l}"> is not able to match the URL "${u}${h}${d}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
1080
1080
|
), m == null ? null : /* @__PURE__ */ p.createElement(Z.Provider, { value: c }, /* @__PURE__ */ p.createElement(Ae.Provider, { children: t, value: m }));
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function jn({
|
|
1083
1083
|
children: e,
|
|
1084
1084
|
location: t
|
|
1085
1085
|
}) {
|
|
1086
|
-
return
|
|
1086
|
+
return dn(nt(e), t);
|
|
1087
1087
|
}
|
|
1088
1088
|
function nt(e, t = []) {
|
|
1089
1089
|
let a = [];
|
|
@@ -1134,22 +1134,22 @@ var Ue = "get", Ie = "application/x-www-form-urlencoded";
|
|
|
1134
1134
|
function qe(e) {
|
|
1135
1135
|
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function Cn(e) {
|
|
1138
1138
|
return qe(e) && e.tagName.toLowerCase() === "button";
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1140
|
+
function En(e) {
|
|
1141
1141
|
return qe(e) && e.tagName.toLowerCase() === "form";
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1143
|
+
function Sn(e) {
|
|
1144
1144
|
return qe(e) && e.tagName.toLowerCase() === "input";
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function Pn(e) {
|
|
1147
1147
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1149
|
+
function xn(e, t) {
|
|
1150
1150
|
return e.button === 0 && // Ignore everything but left clicks
|
|
1151
1151
|
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
1152
|
-
!
|
|
1152
|
+
!Pn(e);
|
|
1153
1153
|
}
|
|
1154
1154
|
function rt(e = "") {
|
|
1155
1155
|
return new URLSearchParams(
|
|
@@ -1170,7 +1170,7 @@ function $n(e, t) {
|
|
|
1170
1170
|
}), a;
|
|
1171
1171
|
}
|
|
1172
1172
|
var De = null;
|
|
1173
|
-
function
|
|
1173
|
+
function Ln() {
|
|
1174
1174
|
if (De === null)
|
|
1175
1175
|
try {
|
|
1176
1176
|
new FormData(
|
|
@@ -1183,30 +1183,30 @@ function xn() {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
return De;
|
|
1185
1185
|
}
|
|
1186
|
-
var
|
|
1186
|
+
var Tn = /* @__PURE__ */ new Set([
|
|
1187
1187
|
"application/x-www-form-urlencoded",
|
|
1188
1188
|
"multipart/form-data",
|
|
1189
1189
|
"text/plain"
|
|
1190
1190
|
]);
|
|
1191
1191
|
function Qe(e) {
|
|
1192
|
-
return e != null && !
|
|
1192
|
+
return e != null && !Tn.has(e) ? (X(
|
|
1193
1193
|
!1,
|
|
1194
1194
|
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ie}"`
|
|
1195
1195
|
), null) : e;
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function An(e, t) {
|
|
1198
1198
|
let a, n, r, o, i;
|
|
1199
|
-
if (
|
|
1199
|
+
if (En(e)) {
|
|
1200
1200
|
let l = e.getAttribute("action");
|
|
1201
1201
|
n = l ? ue(l, t) : null, a = e.getAttribute("method") || Ue, r = Qe(e.getAttribute("enctype")) || Ie, o = new FormData(e);
|
|
1202
|
-
} else if (
|
|
1202
|
+
} else if (Cn(e) || Sn(e) && (e.type === "submit" || e.type === "image")) {
|
|
1203
1203
|
let l = e.form;
|
|
1204
1204
|
if (l == null)
|
|
1205
1205
|
throw new Error(
|
|
1206
1206
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1207
1207
|
);
|
|
1208
1208
|
let c = e.getAttribute("formaction") || l.getAttribute("action");
|
|
1209
|
-
if (n = c ? ue(c, t) : null, a = e.getAttribute("formmethod") || l.getAttribute("method") || Ue, r = Qe(e.getAttribute("formenctype")) || Qe(l.getAttribute("enctype")) || Ie, o = new FormData(l, e), !
|
|
1209
|
+
if (n = c ? ue(c, t) : null, a = e.getAttribute("formmethod") || l.getAttribute("method") || Ue, r = Qe(e.getAttribute("formenctype")) || Qe(l.getAttribute("enctype")) || Ie, o = new FormData(l, e), !Ln()) {
|
|
1210
1210
|
let { name: u, type: h, value: d } = e;
|
|
1211
1211
|
if (h === "image") {
|
|
1212
1212
|
let v = u ? `${u}.` : "";
|
|
@@ -1223,11 +1223,11 @@ function Tn(e, t) {
|
|
|
1223
1223
|
return o && r === "text/plain" && (i = o, o = void 0), { action: n, method: a.toLowerCase(), encType: r, formData: o, body: i };
|
|
1224
1224
|
}
|
|
1225
1225
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
1226
|
-
function
|
|
1226
|
+
function ht(e, t) {
|
|
1227
1227
|
if (e === !1 || e === null || typeof e > "u")
|
|
1228
1228
|
throw new Error(t);
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1230
|
+
function ta(e, t, a, n) {
|
|
1231
1231
|
let r = typeof e == "string" ? new URL(
|
|
1232
1232
|
e,
|
|
1233
1233
|
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
@@ -1236,7 +1236,7 @@ function ea(e, t, a, n) {
|
|
|
1236
1236
|
) : e;
|
|
1237
1237
|
return a ? r.pathname.endsWith("/") ? r.pathname = `${r.pathname}_.${n}` : r.pathname = `${r.pathname}.${n}` : r.pathname === "/" ? r.pathname = `_root.${n}` : t && ue(r.pathname, t) === "/" ? r.pathname = `${He(t)}/_root.${n}` : r.pathname = `${He(r.pathname)}.${n}`, r;
|
|
1238
1238
|
}
|
|
1239
|
-
async function
|
|
1239
|
+
async function On(e, t) {
|
|
1240
1240
|
if (e.id in t)
|
|
1241
1241
|
return t[e.id];
|
|
1242
1242
|
try {
|
|
@@ -1253,27 +1253,27 @@ async function An(e, t) {
|
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function Dn(e) {
|
|
1257
1257
|
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
1258
1258
|
}
|
|
1259
|
-
async function
|
|
1259
|
+
async function Fn(e, t, a) {
|
|
1260
1260
|
let n = await Promise.all(
|
|
1261
1261
|
e.map(async (r) => {
|
|
1262
1262
|
let o = t.routes[r.route.id];
|
|
1263
1263
|
if (o) {
|
|
1264
|
-
let i = await
|
|
1264
|
+
let i = await On(o, a);
|
|
1265
1265
|
return i.links ? i.links() : [];
|
|
1266
1266
|
}
|
|
1267
1267
|
return [];
|
|
1268
1268
|
})
|
|
1269
1269
|
);
|
|
1270
|
-
return
|
|
1271
|
-
n.flat(1).filter(
|
|
1270
|
+
return Bn(
|
|
1271
|
+
n.flat(1).filter(Dn).filter((r) => r.rel === "stylesheet" || r.rel === "preload").map(
|
|
1272
1272
|
(r) => r.rel === "stylesheet" ? { ...r, rel: "prefetch", as: "style" } : { ...r, rel: "prefetch" }
|
|
1273
1273
|
)
|
|
1274
1274
|
);
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function Ct(e, t, a, n, r, o) {
|
|
1277
1277
|
let i = (c, u) => a[u] ? c.route.id !== a[u].route.id : !0, l = (c, u) => (
|
|
1278
1278
|
// param change, /users/123 -> /users/456
|
|
1279
1279
|
a[u].pathname !== c.pathname || // splat param changed, which is not present in match.path
|
|
@@ -1305,8 +1305,8 @@ function jt(e, t, a, n, r, o) {
|
|
|
1305
1305
|
return !0;
|
|
1306
1306
|
}) : [];
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
return
|
|
1308
|
+
function Un(e, t, { includeHydrateFallback: a } = {}) {
|
|
1309
|
+
return In(
|
|
1310
1310
|
e.map((n) => {
|
|
1311
1311
|
let r = t.routes[n.route.id];
|
|
1312
1312
|
if (!r) return [];
|
|
@@ -1315,52 +1315,52 @@ function Fn(e, t, { includeHydrateFallback: a } = {}) {
|
|
|
1315
1315
|
}).flat(1)
|
|
1316
1316
|
);
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function In(e) {
|
|
1319
1319
|
return [...new Set(e)];
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function Mn(e) {
|
|
1322
1322
|
let t = {}, a = Object.keys(e).sort();
|
|
1323
1323
|
for (let n of a)
|
|
1324
1324
|
t[n] = e[n];
|
|
1325
1325
|
return t;
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function Bn(e, t) {
|
|
1328
1328
|
let a = /* @__PURE__ */ new Set();
|
|
1329
1329
|
return new Set(t), e.reduce((n, r) => {
|
|
1330
|
-
let o = JSON.stringify(
|
|
1330
|
+
let o = JSON.stringify(Mn(r));
|
|
1331
1331
|
return a.has(o) || (a.add(o), n.push({ key: o, link: r })), n;
|
|
1332
1332
|
}, []);
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1334
|
+
function ft() {
|
|
1335
1335
|
let e = p.useContext(Ee);
|
|
1336
|
-
return
|
|
1336
|
+
return ht(
|
|
1337
1337
|
e,
|
|
1338
1338
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1339
1339
|
), e;
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function Hn() {
|
|
1342
1342
|
let e = p.useContext(Je);
|
|
1343
|
-
return
|
|
1343
|
+
return ht(
|
|
1344
1344
|
e,
|
|
1345
1345
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1346
1346
|
), e;
|
|
1347
1347
|
}
|
|
1348
|
-
var
|
|
1349
|
-
|
|
1350
|
-
function
|
|
1351
|
-
let e = p.useContext(
|
|
1352
|
-
return
|
|
1348
|
+
var mt = p.createContext(void 0);
|
|
1349
|
+
mt.displayName = "FrameworkContext";
|
|
1350
|
+
function yt() {
|
|
1351
|
+
let e = p.useContext(mt);
|
|
1352
|
+
return ht(
|
|
1353
1353
|
e,
|
|
1354
1354
|
"You must render this element inside a <HydratedRouter> element"
|
|
1355
1355
|
), e;
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1358
|
-
let a = p.useContext(
|
|
1357
|
+
function Wn(e, t) {
|
|
1358
|
+
let a = p.useContext(mt), [n, r] = p.useState(!1), [o, i] = p.useState(!1), { onFocus: l, onBlur: c, onMouseEnter: u, onMouseLeave: h, onTouchStart: d } = t, v = p.useRef(null);
|
|
1359
1359
|
p.useEffect(() => {
|
|
1360
1360
|
if (e === "render" && i(!0), e === "viewport") {
|
|
1361
1361
|
let m = (C) => {
|
|
1362
|
-
C.forEach((
|
|
1363
|
-
i(
|
|
1362
|
+
C.forEach((w) => {
|
|
1363
|
+
i(w.isIntersecting);
|
|
1364
1364
|
});
|
|
1365
1365
|
}, f = new IntersectionObserver(m, { threshold: 0.5 });
|
|
1366
1366
|
return v.current && f.observe(v.current), () => {
|
|
@@ -1377,7 +1377,7 @@ function Hn(e, t) {
|
|
|
1377
1377
|
};
|
|
1378
1378
|
}
|
|
1379
1379
|
}, [n]);
|
|
1380
|
-
let
|
|
1380
|
+
let b = () => {
|
|
1381
1381
|
r(!0);
|
|
1382
1382
|
}, _ = () => {
|
|
1383
1383
|
r(!1), i(!1);
|
|
@@ -1386,31 +1386,31 @@ function Hn(e, t) {
|
|
|
1386
1386
|
o,
|
|
1387
1387
|
v,
|
|
1388
1388
|
{
|
|
1389
|
-
onFocus:
|
|
1390
|
-
onBlur:
|
|
1391
|
-
onMouseEnter:
|
|
1392
|
-
onMouseLeave:
|
|
1393
|
-
onTouchStart:
|
|
1389
|
+
onFocus: xe(l, b),
|
|
1390
|
+
onBlur: xe(c, _),
|
|
1391
|
+
onMouseEnter: xe(u, b),
|
|
1392
|
+
onMouseLeave: xe(h, _),
|
|
1393
|
+
onTouchStart: xe(d, b)
|
|
1394
1394
|
}
|
|
1395
1395
|
] : [!1, v, {}];
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function xe(e, t) {
|
|
1398
1398
|
return (a) => {
|
|
1399
1399
|
e && e(a), a.defaultPrevented || t(a);
|
|
1400
1400
|
};
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1403
|
-
let a =
|
|
1404
|
-
() =>
|
|
1402
|
+
function Jn({ page: e, ...t }) {
|
|
1403
|
+
let a = Za(), { router: n } = ft(), r = p.useMemo(
|
|
1404
|
+
() => Dt(n.routes, e, n.basename),
|
|
1405
1405
|
[n.routes, e, n.basename]
|
|
1406
1406
|
);
|
|
1407
|
-
return r ? a ? /* @__PURE__ */ p.createElement(
|
|
1407
|
+
return r ? a ? /* @__PURE__ */ p.createElement(Kn, { page: e, matches: r, ...t }) : /* @__PURE__ */ p.createElement(Vn, { page: e, matches: r, ...t }) : null;
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1410
|
-
let { manifest: t, routeModules: a } =
|
|
1409
|
+
function qn(e) {
|
|
1410
|
+
let { manifest: t, routeModules: a } = yt(), [n, r] = p.useState([]);
|
|
1411
1411
|
return p.useEffect(() => {
|
|
1412
1412
|
let o = !1;
|
|
1413
|
-
return
|
|
1413
|
+
return Fn(e, t, a).then(
|
|
1414
1414
|
(i) => {
|
|
1415
1415
|
o || r(i);
|
|
1416
1416
|
}
|
|
@@ -1419,15 +1419,15 @@ function Jn(e) {
|
|
|
1419
1419
|
};
|
|
1420
1420
|
}, [e, t, a]), n;
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1422
|
+
function Kn({
|
|
1423
1423
|
page: e,
|
|
1424
1424
|
matches: t,
|
|
1425
1425
|
...a
|
|
1426
1426
|
}) {
|
|
1427
|
-
let n = ee(), { future: r } =
|
|
1427
|
+
let n = ee(), { future: r } = yt(), { basename: o } = ft(), i = p.useMemo(() => {
|
|
1428
1428
|
if (e === n.pathname + n.search + n.hash)
|
|
1429
1429
|
return [];
|
|
1430
|
-
let l =
|
|
1430
|
+
let l = ta(
|
|
1431
1431
|
e,
|
|
1432
1432
|
o,
|
|
1433
1433
|
r.unstable_trailingSlashAwareDataRequests,
|
|
@@ -1445,13 +1445,13 @@ function qn({
|
|
|
1445
1445
|
]);
|
|
1446
1446
|
return /* @__PURE__ */ p.createElement(p.Fragment, null, i.map((l) => /* @__PURE__ */ p.createElement("link", { key: l, rel: "prefetch", as: "fetch", href: l, ...a })));
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function Vn({
|
|
1449
1449
|
page: e,
|
|
1450
1450
|
matches: t,
|
|
1451
1451
|
...a
|
|
1452
1452
|
}) {
|
|
1453
|
-
let n = ee(), { future: r, manifest: o, routeModules: i } =
|
|
1454
|
-
() =>
|
|
1453
|
+
let n = ee(), { future: r, manifest: o, routeModules: i } = yt(), { basename: l } = ft(), { loaderData: c, matches: u } = Hn(), h = p.useMemo(
|
|
1454
|
+
() => Ct(
|
|
1455
1455
|
e,
|
|
1456
1456
|
t,
|
|
1457
1457
|
u,
|
|
@@ -1461,7 +1461,7 @@ function Kn({
|
|
|
1461
1461
|
),
|
|
1462
1462
|
[e, t, u, o, n]
|
|
1463
1463
|
), d = p.useMemo(
|
|
1464
|
-
() =>
|
|
1464
|
+
() => Ct(
|
|
1465
1465
|
e,
|
|
1466
1466
|
t,
|
|
1467
1467
|
u,
|
|
@@ -1474,12 +1474,12 @@ function Kn({
|
|
|
1474
1474
|
if (e === n.pathname + n.search + n.hash)
|
|
1475
1475
|
return [];
|
|
1476
1476
|
let m = /* @__PURE__ */ new Set(), f = !1;
|
|
1477
|
-
if (t.forEach((
|
|
1478
|
-
let R = o.routes[
|
|
1479
|
-
!R || !R.hasLoader || (!h.some((
|
|
1477
|
+
if (t.forEach((w) => {
|
|
1478
|
+
let R = o.routes[w.route.id];
|
|
1479
|
+
!R || !R.hasLoader || (!h.some(($) => $.route.id === w.route.id) && w.route.id in c && i[w.route.id]?.shouldRevalidate || R.hasClientLoader ? f = !0 : m.add(w.route.id));
|
|
1480
1480
|
}), m.size === 0)
|
|
1481
1481
|
return [];
|
|
1482
|
-
let C =
|
|
1482
|
+
let C = ta(
|
|
1483
1483
|
e,
|
|
1484
1484
|
l,
|
|
1485
1485
|
r.unstable_trailingSlashAwareDataRequests,
|
|
@@ -1487,7 +1487,7 @@ function Kn({
|
|
|
1487
1487
|
);
|
|
1488
1488
|
return f && m.size > 0 && C.searchParams.set(
|
|
1489
1489
|
"_routes",
|
|
1490
|
-
t.filter((
|
|
1490
|
+
t.filter((w) => m.has(w.route.id)).map((w) => w.route.id).join(",")
|
|
1491
1491
|
), [C.pathname + C.search];
|
|
1492
1492
|
}, [
|
|
1493
1493
|
l,
|
|
@@ -1499,11 +1499,11 @@ function Kn({
|
|
|
1499
1499
|
t,
|
|
1500
1500
|
e,
|
|
1501
1501
|
i
|
|
1502
|
-
]),
|
|
1503
|
-
() =>
|
|
1502
|
+
]), b = p.useMemo(
|
|
1503
|
+
() => Un(d, o),
|
|
1504
1504
|
[d, o]
|
|
1505
|
-
), _ =
|
|
1506
|
-
return /* @__PURE__ */ p.createElement(p.Fragment, null, v.map((m) => /* @__PURE__ */ p.createElement("link", { key: m, rel: "prefetch", as: "fetch", href: m, ...a })),
|
|
1505
|
+
), _ = qn(d);
|
|
1506
|
+
return /* @__PURE__ */ p.createElement(p.Fragment, null, v.map((m) => /* @__PURE__ */ p.createElement("link", { key: m, rel: "prefetch", as: "fetch", href: m, ...a })), b.map((m) => /* @__PURE__ */ p.createElement("link", { key: m, rel: "modulepreload", href: m, ...a })), _.map(({ key: m, link: f }) => (
|
|
1507
1507
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1508
1508
|
// already with their own props
|
|
1509
1509
|
/* @__PURE__ */ p.createElement(
|
|
@@ -1517,27 +1517,27 @@ function Kn({
|
|
|
1517
1517
|
)
|
|
1518
1518
|
)));
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function Gn(...e) {
|
|
1521
1521
|
return (t) => {
|
|
1522
1522
|
e.forEach((a) => {
|
|
1523
1523
|
typeof a == "function" ? a(t) : a != null && (a.current = t);
|
|
1524
1524
|
});
|
|
1525
1525
|
};
|
|
1526
1526
|
}
|
|
1527
|
-
var
|
|
1527
|
+
var zn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1528
1528
|
try {
|
|
1529
|
-
|
|
1529
|
+
zn && (window.__reactRouterVersion = // @ts-expect-error
|
|
1530
1530
|
"7.14.1");
|
|
1531
1531
|
} catch {
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1533
|
+
function Yn({
|
|
1534
1534
|
basename: e,
|
|
1535
1535
|
children: t,
|
|
1536
1536
|
unstable_useTransitions: a,
|
|
1537
1537
|
window: n
|
|
1538
1538
|
}) {
|
|
1539
1539
|
let r = p.useRef();
|
|
1540
|
-
r.current == null && (r.current =
|
|
1540
|
+
r.current == null && (r.current = Ca({ window: n, v5Compat: !0 }));
|
|
1541
1541
|
let o = r.current, [i, l] = p.useState({
|
|
1542
1542
|
action: o.action,
|
|
1543
1543
|
location: o.location
|
|
@@ -1548,7 +1548,7 @@ function zn({
|
|
|
1548
1548
|
[a]
|
|
1549
1549
|
);
|
|
1550
1550
|
return p.useLayoutEffect(() => o.listen(c), [o, c]), /* @__PURE__ */ p.createElement(
|
|
1551
|
-
|
|
1551
|
+
Nn,
|
|
1552
1552
|
{
|
|
1553
1553
|
basename: e,
|
|
1554
1554
|
children: t,
|
|
@@ -1559,7 +1559,7 @@ function zn({
|
|
|
1559
1559
|
}
|
|
1560
1560
|
);
|
|
1561
1561
|
}
|
|
1562
|
-
var
|
|
1562
|
+
var aa = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, he = p.forwardRef(
|
|
1563
1563
|
function({
|
|
1564
1564
|
onClick: t,
|
|
1565
1565
|
discover: a = "render",
|
|
@@ -1573,12 +1573,12 @@ var ta = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, he = p.forwardRef(
|
|
|
1573
1573
|
to: h,
|
|
1574
1574
|
preventScrollReset: d,
|
|
1575
1575
|
viewTransition: v,
|
|
1576
|
-
unstable_defaultShouldRevalidate:
|
|
1576
|
+
unstable_defaultShouldRevalidate: b,
|
|
1577
1577
|
..._
|
|
1578
1578
|
}, m) {
|
|
1579
|
-
let { basename: f, navigator: C, unstable_useTransitions:
|
|
1580
|
-
h =
|
|
1581
|
-
let
|
|
1579
|
+
let { basename: f, navigator: C, unstable_useTransitions: w } = p.useContext(Z), R = typeof h == "string" && aa.test(h), $ = Bt(h, f);
|
|
1580
|
+
h = $.to;
|
|
1581
|
+
let x = sn(h, { relative: r }), D = ee(), W = null;
|
|
1582
1582
|
if (l) {
|
|
1583
1583
|
let T = We(
|
|
1584
1584
|
l,
|
|
@@ -1588,10 +1588,10 @@ var ta = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, he = p.forwardRef(
|
|
|
1588
1588
|
);
|
|
1589
1589
|
f !== "/" && (T.pathname = T.pathname === "/" ? f : re([f, T.pathname])), W = C.createHref(T);
|
|
1590
1590
|
}
|
|
1591
|
-
let [B, P, A] =
|
|
1591
|
+
let [B, P, A] = Wn(
|
|
1592
1592
|
n,
|
|
1593
1593
|
_
|
|
1594
|
-
), M =
|
|
1594
|
+
), M = er(h, {
|
|
1595
1595
|
replace: i,
|
|
1596
1596
|
unstable_mask: l,
|
|
1597
1597
|
state: c,
|
|
@@ -1599,32 +1599,32 @@ var ta = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, he = p.forwardRef(
|
|
|
1599
1599
|
preventScrollReset: d,
|
|
1600
1600
|
relative: r,
|
|
1601
1601
|
viewTransition: v,
|
|
1602
|
-
unstable_defaultShouldRevalidate:
|
|
1603
|
-
unstable_useTransitions:
|
|
1602
|
+
unstable_defaultShouldRevalidate: b,
|
|
1603
|
+
unstable_useTransitions: w
|
|
1604
1604
|
});
|
|
1605
1605
|
function k(T) {
|
|
1606
1606
|
t && t(T), T.defaultPrevented || M(T);
|
|
1607
1607
|
}
|
|
1608
|
-
let F = !(
|
|
1608
|
+
let F = !($.isExternal || o), H = (
|
|
1609
1609
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1610
1610
|
/* @__PURE__ */ p.createElement(
|
|
1611
1611
|
"a",
|
|
1612
1612
|
{
|
|
1613
1613
|
..._,
|
|
1614
1614
|
...A,
|
|
1615
|
-
href: (F ? W : void 0) ||
|
|
1615
|
+
href: (F ? W : void 0) || $.absoluteURL || x,
|
|
1616
1616
|
onClick: F ? k : t,
|
|
1617
|
-
ref:
|
|
1617
|
+
ref: Gn(m, P),
|
|
1618
1618
|
target: u,
|
|
1619
1619
|
"data-discover": !R && a === "render" ? "true" : void 0
|
|
1620
1620
|
}
|
|
1621
1621
|
)
|
|
1622
1622
|
);
|
|
1623
|
-
return B && !R ? /* @__PURE__ */ p.createElement(p.Fragment, null, H, /* @__PURE__ */ p.createElement(
|
|
1623
|
+
return B && !R ? /* @__PURE__ */ p.createElement(p.Fragment, null, H, /* @__PURE__ */ p.createElement(Jn, { page: x })) : H;
|
|
1624
1624
|
}
|
|
1625
1625
|
);
|
|
1626
1626
|
he.displayName = "Link";
|
|
1627
|
-
var
|
|
1627
|
+
var Qn = p.forwardRef(
|
|
1628
1628
|
function({
|
|
1629
1629
|
"aria-current": t = "page",
|
|
1630
1630
|
caseSensitive: a = !1,
|
|
@@ -1636,19 +1636,19 @@ var Yn = p.forwardRef(
|
|
|
1636
1636
|
children: c,
|
|
1637
1637
|
...u
|
|
1638
1638
|
}, h) {
|
|
1639
|
-
let d = Oe(i, { relative: u.relative }), v = ee(),
|
|
1639
|
+
let d = Oe(i, { relative: u.relative }), v = ee(), b = p.useContext(Je), { navigator: _, basename: m } = p.useContext(Z), f = b != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1640
1640
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1641
|
-
|
|
1642
|
-
a || (
|
|
1643
|
-
const
|
|
1644
|
-
let
|
|
1645
|
-
isActive:
|
|
1641
|
+
or(d) && l === !0, C = _.encodeLocation ? _.encodeLocation(d).pathname : d.pathname, w = v.pathname, R = b && b.navigation && b.navigation.location ? b.navigation.location.pathname : null;
|
|
1642
|
+
a || (w = w.toLowerCase(), R = R ? R.toLowerCase() : null, C = C.toLowerCase()), R && m && (R = ue(R, m) || R);
|
|
1643
|
+
const $ = C !== "/" && C.endsWith("/") ? C.length - 1 : C.length;
|
|
1644
|
+
let x = w === C || !r && w.startsWith(C) && w.charAt($) === "/", D = R != null && (R === C || !r && R.startsWith(C) && R.charAt(C.length) === "/"), W = {
|
|
1645
|
+
isActive: x,
|
|
1646
1646
|
isPending: D,
|
|
1647
1647
|
isTransitioning: f
|
|
1648
|
-
}, B =
|
|
1648
|
+
}, B = x ? t : void 0, P;
|
|
1649
1649
|
typeof n == "function" ? P = n(W) : P = [
|
|
1650
1650
|
n,
|
|
1651
|
-
|
|
1651
|
+
x ? "active" : null,
|
|
1652
1652
|
D ? "pending" : null,
|
|
1653
1653
|
f ? "transitioning" : null
|
|
1654
1654
|
].filter(Boolean).join(" ");
|
|
@@ -1668,8 +1668,8 @@ var Yn = p.forwardRef(
|
|
|
1668
1668
|
);
|
|
1669
1669
|
}
|
|
1670
1670
|
);
|
|
1671
|
-
|
|
1672
|
-
var
|
|
1671
|
+
Qn.displayName = "NavLink";
|
|
1672
|
+
var Xn = p.forwardRef(
|
|
1673
1673
|
({
|
|
1674
1674
|
discover: e = "render",
|
|
1675
1675
|
fetcherKey: t,
|
|
@@ -1684,12 +1684,12 @@ var Qn = p.forwardRef(
|
|
|
1684
1684
|
preventScrollReset: h,
|
|
1685
1685
|
viewTransition: d,
|
|
1686
1686
|
unstable_defaultShouldRevalidate: v,
|
|
1687
|
-
...
|
|
1687
|
+
...b
|
|
1688
1688
|
}, _) => {
|
|
1689
|
-
let { unstable_useTransitions: m } = p.useContext(Z), f =
|
|
1690
|
-
if (c && c(
|
|
1691
|
-
|
|
1692
|
-
let D =
|
|
1689
|
+
let { unstable_useTransitions: m } = p.useContext(Z), f = nr(), C = rr(l, { relative: u }), w = i.toLowerCase() === "get" ? "get" : "post", R = typeof l == "string" && aa.test(l), $ = (x) => {
|
|
1690
|
+
if (c && c(x), x.defaultPrevented) return;
|
|
1691
|
+
x.preventDefault();
|
|
1692
|
+
let D = x.nativeEvent.submitter, W = D?.getAttribute("formmethod") || i, B = () => f(D || x.currentTarget, {
|
|
1693
1693
|
fetcherKey: t,
|
|
1694
1694
|
method: W,
|
|
1695
1695
|
navigate: a,
|
|
@@ -1706,24 +1706,24 @@ var Qn = p.forwardRef(
|
|
|
1706
1706
|
"form",
|
|
1707
1707
|
{
|
|
1708
1708
|
ref: _,
|
|
1709
|
-
method:
|
|
1709
|
+
method: w,
|
|
1710
1710
|
action: C,
|
|
1711
|
-
onSubmit: n ? c :
|
|
1712
|
-
...
|
|
1711
|
+
onSubmit: n ? c : $,
|
|
1712
|
+
...b,
|
|
1713
1713
|
"data-discover": !R && e === "render" ? "true" : void 0
|
|
1714
1714
|
}
|
|
1715
1715
|
);
|
|
1716
1716
|
}
|
|
1717
1717
|
);
|
|
1718
|
-
|
|
1719
|
-
function
|
|
1718
|
+
Xn.displayName = "Form";
|
|
1719
|
+
function Zn(e) {
|
|
1720
1720
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1722
|
+
function na(e) {
|
|
1723
1723
|
let t = p.useContext(Ee);
|
|
1724
|
-
return I(t,
|
|
1724
|
+
return I(t, Zn(e)), t;
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function er(e, {
|
|
1727
1727
|
target: t,
|
|
1728
1728
|
replace: a,
|
|
1729
1729
|
unstable_mask: n,
|
|
@@ -1736,10 +1736,10 @@ function Zn(e, {
|
|
|
1736
1736
|
} = {}) {
|
|
1737
1737
|
let h = ye(), d = ee(), v = Oe(e, { relative: i });
|
|
1738
1738
|
return p.useCallback(
|
|
1739
|
-
(
|
|
1740
|
-
if (
|
|
1741
|
-
|
|
1742
|
-
let _ = a !== void 0 ? a :
|
|
1739
|
+
(b) => {
|
|
1740
|
+
if (xn(b, t)) {
|
|
1741
|
+
b.preventDefault();
|
|
1742
|
+
let _ = a !== void 0 ? a : $e(d) === $e(v), m = () => h(e, {
|
|
1743
1743
|
replace: _,
|
|
1744
1744
|
unstable_mask: n,
|
|
1745
1745
|
state: r,
|
|
@@ -1768,7 +1768,7 @@ function Zn(e, {
|
|
|
1768
1768
|
]
|
|
1769
1769
|
);
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function ra(e) {
|
|
1772
1772
|
X(
|
|
1773
1773
|
typeof URLSearchParams < "u",
|
|
1774
1774
|
"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params."
|
|
@@ -1795,20 +1795,20 @@ function na(e) {
|
|
|
1795
1795
|
);
|
|
1796
1796
|
return [r, i];
|
|
1797
1797
|
}
|
|
1798
|
-
var
|
|
1799
|
-
function
|
|
1800
|
-
let { router: e } =
|
|
1798
|
+
var tr = 0, ar = () => `__${String(++tr)}__`;
|
|
1799
|
+
function nr() {
|
|
1800
|
+
let { router: e } = na(
|
|
1801
1801
|
"useSubmit"
|
|
1802
1802
|
/* UseSubmit */
|
|
1803
1803
|
), { basename: t } = p.useContext(Z), a = wn(), n = e.fetch, r = e.navigate;
|
|
1804
1804
|
return p.useCallback(
|
|
1805
1805
|
async (o, i = {}) => {
|
|
1806
|
-
let { action: l, method: c, encType: u, formData: h, body: d } =
|
|
1806
|
+
let { action: l, method: c, encType: u, formData: h, body: d } = An(
|
|
1807
1807
|
o,
|
|
1808
1808
|
t
|
|
1809
1809
|
);
|
|
1810
1810
|
if (i.navigate === !1) {
|
|
1811
|
-
let v = i.fetcherKey ||
|
|
1811
|
+
let v = i.fetcherKey || ar();
|
|
1812
1812
|
await n(v, a, i.action || l, {
|
|
1813
1813
|
unstable_defaultShouldRevalidate: i.unstable_defaultShouldRevalidate,
|
|
1814
1814
|
preventScrollReset: i.preventScrollReset,
|
|
@@ -1836,7 +1836,7 @@ function ar() {
|
|
|
1836
1836
|
[n, r, t, a]
|
|
1837
1837
|
);
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1839
|
+
function rr(e, { relative: t } = {}) {
|
|
1840
1840
|
let { basename: a } = p.useContext(Z), n = p.useContext(ae);
|
|
1841
1841
|
I(n, "useFormAction must be used inside a RouteContext");
|
|
1842
1842
|
let [r] = n.matches.slice(-1), o = { ...Oe(e || ".", { relative: t }) }, i = ee();
|
|
@@ -1849,15 +1849,15 @@ function nr(e, { relative: t } = {}) {
|
|
|
1849
1849
|
o.search = h ? `?${h}` : "";
|
|
1850
1850
|
}
|
|
1851
1851
|
}
|
|
1852
|
-
return (!e || e === ".") && r.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), a !== "/" && (o.pathname = o.pathname === "/" ? a : re([a, o.pathname])),
|
|
1852
|
+
return (!e || e === ".") && r.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), a !== "/" && (o.pathname = o.pathname === "/" ? a : re([a, o.pathname])), $e(o);
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1855
|
-
let a = p.useContext(
|
|
1854
|
+
function or(e, { relative: t } = {}) {
|
|
1855
|
+
let a = p.useContext(Jt);
|
|
1856
1856
|
I(
|
|
1857
1857
|
a != null,
|
|
1858
1858
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1859
1859
|
);
|
|
1860
|
-
let { basename: n } =
|
|
1860
|
+
let { basename: n } = na(
|
|
1861
1861
|
"useViewTransitionState"
|
|
1862
1862
|
/* useViewTransitionState */
|
|
1863
1863
|
), r = Oe(e, { relative: t });
|
|
@@ -1870,7 +1870,7 @@ function O(e, t = !1) {
|
|
|
1870
1870
|
const a = { Accept: "application/json" };
|
|
1871
1871
|
return t && (a["Content-Type"] = "application/json"), a;
|
|
1872
1872
|
}
|
|
1873
|
-
const Re = "/jobplatform/api",
|
|
1873
|
+
const Re = "/jobplatform/api", Et = ["junior", "mid", "senior", "staff", "principal", "fellow"], St = ["manager", "senior_manager", "director", "vp", "cxo"], sr = {
|
|
1874
1874
|
junior: "Junior",
|
|
1875
1875
|
mid: "Mid",
|
|
1876
1876
|
senior: "Senior",
|
|
@@ -1897,7 +1897,7 @@ async function Ne(e) {
|
|
|
1897
1897
|
);
|
|
1898
1898
|
return t.data;
|
|
1899
1899
|
}
|
|
1900
|
-
async function
|
|
1900
|
+
async function ir(e) {
|
|
1901
1901
|
const t = await fetch(`${Re}/profiles`, {
|
|
1902
1902
|
method: "GET",
|
|
1903
1903
|
headers: O(),
|
|
@@ -1905,7 +1905,7 @@ async function sr(e) {
|
|
|
1905
1905
|
});
|
|
1906
1906
|
return (await Ne(t)).profiles;
|
|
1907
1907
|
}
|
|
1908
|
-
async function
|
|
1908
|
+
async function lr(e, t) {
|
|
1909
1909
|
const a = await fetch(`${Re}/profiles`, {
|
|
1910
1910
|
method: "POST",
|
|
1911
1911
|
headers: O(t, !0),
|
|
@@ -1914,7 +1914,7 @@ async function ir(e, t) {
|
|
|
1914
1914
|
});
|
|
1915
1915
|
return (await Ne(a)).profile;
|
|
1916
1916
|
}
|
|
1917
|
-
async function
|
|
1917
|
+
async function cr(e, t, a) {
|
|
1918
1918
|
const n = await fetch(`${Re}/profiles/${encodeURIComponent(e)}`, {
|
|
1919
1919
|
method: "PUT",
|
|
1920
1920
|
headers: O(a, !0),
|
|
@@ -1923,7 +1923,7 @@ async function lr(e, t, a) {
|
|
|
1923
1923
|
});
|
|
1924
1924
|
return (await Ne(n)).profile;
|
|
1925
1925
|
}
|
|
1926
|
-
async function
|
|
1926
|
+
async function ur(e, t) {
|
|
1927
1927
|
const a = await fetch(`${Re}/profiles/${encodeURIComponent(e)}`, {
|
|
1928
1928
|
method: "DELETE",
|
|
1929
1929
|
headers: O(),
|
|
@@ -1931,7 +1931,7 @@ async function cr(e, t) {
|
|
|
1931
1931
|
});
|
|
1932
1932
|
await Ne(a);
|
|
1933
1933
|
}
|
|
1934
|
-
async function
|
|
1934
|
+
async function dr(e, t) {
|
|
1935
1935
|
const a = await fetch(`${Re}/profiles/${encodeURIComponent(e)}/companies`, {
|
|
1936
1936
|
method: "GET",
|
|
1937
1937
|
headers: O(),
|
|
@@ -1939,7 +1939,7 @@ async function ur(e, t) {
|
|
|
1939
1939
|
});
|
|
1940
1940
|
return (await Ne(a)).companies;
|
|
1941
1941
|
}
|
|
1942
|
-
async function
|
|
1942
|
+
async function pr(e, t, a) {
|
|
1943
1943
|
const n = await fetch(`${Re}/profiles/${encodeURIComponent(e)}/companies`, {
|
|
1944
1944
|
method: "POST",
|
|
1945
1945
|
headers: O(a, !0),
|
|
@@ -1948,36 +1948,36 @@ async function dr(e, t, a) {
|
|
|
1948
1948
|
});
|
|
1949
1949
|
return Ne(n);
|
|
1950
1950
|
}
|
|
1951
|
-
async function
|
|
1951
|
+
async function hr(e, t, a) {
|
|
1952
1952
|
const n = await fetch(
|
|
1953
1953
|
`${Re}/profiles/${encodeURIComponent(e)}/companies/${encodeURIComponent(t)}`,
|
|
1954
1954
|
{ method: "DELETE", headers: O(), credentials: "include" }
|
|
1955
1955
|
);
|
|
1956
1956
|
await Ne(n);
|
|
1957
1957
|
}
|
|
1958
|
-
const Q = /* @__PURE__ */ new Map(),
|
|
1959
|
-
function
|
|
1960
|
-
for (; Q.size >
|
|
1958
|
+
const Q = /* @__PURE__ */ new Map(), fr = 120;
|
|
1959
|
+
function mr() {
|
|
1960
|
+
for (; Q.size > fr; ) {
|
|
1961
1961
|
const e = Q.keys().next();
|
|
1962
1962
|
if (e.done) return;
|
|
1963
1963
|
Q.delete(e.value);
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
|
-
const
|
|
1967
|
-
function Me(e, t, { onStale: a, maxAgeMs: n =
|
|
1966
|
+
const yr = 3e4;
|
|
1967
|
+
function Me(e, t, { onStale: a, maxAgeMs: n = yr } = {}) {
|
|
1968
1968
|
const r = Q.get(e);
|
|
1969
1969
|
if (r && "value" in r) {
|
|
1970
1970
|
const i = Date.now() - r.at < n;
|
|
1971
1971
|
if (a?.(r.value, i), i) return Promise.resolve(r.value);
|
|
1972
1972
|
}
|
|
1973
1973
|
if (r?.inflight) return r.inflight;
|
|
1974
|
-
const o = t().then((i) => (Q.delete(e), Q.set(e, { value: i, at: Date.now() }),
|
|
1974
|
+
const o = t().then((i) => (Q.delete(e), Q.set(e, { value: i, at: Date.now() }), mr(), i)).catch((i) => {
|
|
1975
1975
|
const l = Q.get(e);
|
|
1976
1976
|
throw l ? Q.set(e, { value: l.value, at: l.at }) : Q.delete(e), i;
|
|
1977
1977
|
});
|
|
1978
1978
|
return Q.set(e, r ? { ...r, inflight: o } : { inflight: o }), o;
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1980
|
+
function Pt(e) {
|
|
1981
1981
|
const t = Q.get(e);
|
|
1982
1982
|
return t && "value" in t ? t.value : void 0;
|
|
1983
1983
|
}
|
|
@@ -1987,43 +1987,43 @@ function Le(e) {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
function Ke(e, t, { enabled: a = !0, maxAgeMs: n } = {}) {
|
|
1989
1989
|
const [r, o] = N(
|
|
1990
|
-
() => a ?
|
|
1990
|
+
() => a ? Pt(e) : void 0
|
|
1991
1991
|
), [i, l] = N(!1), [c, u] = N(null), [h, d] = N(0), v = Te(t);
|
|
1992
1992
|
return v.current = t, z(() => {
|
|
1993
1993
|
if (!a) {
|
|
1994
1994
|
l(!1);
|
|
1995
1995
|
return;
|
|
1996
1996
|
}
|
|
1997
|
-
let
|
|
1997
|
+
let b = !1;
|
|
1998
1998
|
u(null);
|
|
1999
|
-
const _ =
|
|
1999
|
+
const _ = Pt(e);
|
|
2000
2000
|
return _ !== void 0 && o(_), l(!0), Me(e, () => v.current(), {
|
|
2001
2001
|
maxAgeMs: n,
|
|
2002
2002
|
onStale: (m, f) => {
|
|
2003
|
-
|
|
2003
|
+
b || (o(m), f && l(!1));
|
|
2004
2004
|
}
|
|
2005
2005
|
}).then((m) => {
|
|
2006
|
-
|
|
2006
|
+
b || o(m);
|
|
2007
2007
|
}).catch((m) => {
|
|
2008
|
-
|
|
2008
|
+
b || u(m);
|
|
2009
2009
|
}).finally(() => {
|
|
2010
|
-
|
|
2010
|
+
b || l(!1);
|
|
2011
2011
|
}), () => {
|
|
2012
|
-
|
|
2012
|
+
b = !0;
|
|
2013
2013
|
};
|
|
2014
2014
|
}, [e, a, n, h]), {
|
|
2015
2015
|
data: r,
|
|
2016
2016
|
loading: a && r === void 0 && c === null,
|
|
2017
2017
|
refreshing: i,
|
|
2018
2018
|
error: c,
|
|
2019
|
-
reload: () => d((
|
|
2019
|
+
reload: () => d((b) => b + 1)
|
|
2020
2020
|
};
|
|
2021
2021
|
}
|
|
2022
|
-
function
|
|
2022
|
+
function gr() {
|
|
2023
2023
|
const e = window.location.pathname + window.location.search + window.location.hash;
|
|
2024
2024
|
return `/auth?return=${encodeURIComponent(e)}`;
|
|
2025
2025
|
}
|
|
2026
|
-
function
|
|
2026
|
+
function vr({
|
|
2027
2027
|
auth: e,
|
|
2028
2028
|
selectedId: t,
|
|
2029
2029
|
onSelect: a,
|
|
@@ -2036,8 +2036,8 @@ function gr({
|
|
|
2036
2036
|
data: h,
|
|
2037
2037
|
loading: d,
|
|
2038
2038
|
error: v,
|
|
2039
|
-
reload:
|
|
2040
|
-
} = Ke(`profiles:${o ?? 0}`, () =>
|
|
2039
|
+
reload: b
|
|
2040
|
+
} = Ke(`profiles:${o ?? 0}`, () => ir(), { enabled: u }), _ = h ?? [], m = l ?? (v ? v instanceof _e ? v.message : "Failed to load profiles" : null), f = !u || !d;
|
|
2041
2041
|
z(() => {
|
|
2042
2042
|
f && i?.(_.length);
|
|
2043
2043
|
}, [f, _.length, i]), z(() => {
|
|
@@ -2046,17 +2046,17 @@ function gr({
|
|
|
2046
2046
|
t !== null && a(null);
|
|
2047
2047
|
return;
|
|
2048
2048
|
}
|
|
2049
|
-
_.find((
|
|
2049
|
+
_.find((w) => w.id === t) || a(_[0].id);
|
|
2050
2050
|
}
|
|
2051
2051
|
}, [d, _, t, a]);
|
|
2052
|
-
const C = async (
|
|
2053
|
-
const R =
|
|
2052
|
+
const C = async (w) => {
|
|
2053
|
+
const R = w.is_default ? "Hide the default profile? It won’t come back (your edits/deletion are remembered)." : "Delete this profile?";
|
|
2054
2054
|
if (window.confirm(R)) {
|
|
2055
2055
|
c(null);
|
|
2056
2056
|
try {
|
|
2057
|
-
await
|
|
2058
|
-
} catch (
|
|
2059
|
-
c(
|
|
2057
|
+
await ur(w.id, e), Le("profiles:"), b();
|
|
2058
|
+
} catch ($) {
|
|
2059
|
+
c($ instanceof _e ? $.message : "Failed to delete profile");
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
2062
|
};
|
|
@@ -2066,8 +2066,8 @@ function gr({
|
|
|
2066
2066
|
/* @__PURE__ */ s("button", { type: "button", className: "jp-sidebar__new", onClick: n, children: "+ New" })
|
|
2067
2067
|
] }),
|
|
2068
2068
|
m && /* @__PURE__ */ s("p", { className: "jp-error", children: m }),
|
|
2069
|
-
d ? /* @__PURE__ */ s("p", { className: "jp-muted", children: "Loading…" }) : _.length === 0 ? /* @__PURE__ */ s("p", { className: "jp-muted", children: "No profiles yet. Create one to start scoring jobs." }) : /* @__PURE__ */ s("ul", { className: "jp-sidebar__list", children: _.map((
|
|
2070
|
-
const R =
|
|
2069
|
+
d ? /* @__PURE__ */ s("p", { className: "jp-muted", children: "Loading…" }) : _.length === 0 ? /* @__PURE__ */ s("p", { className: "jp-muted", children: "No profiles yet. Create one to start scoring jobs." }) : /* @__PURE__ */ s("ul", { className: "jp-sidebar__list", children: _.map((w) => {
|
|
2070
|
+
const R = w.id === t;
|
|
2071
2071
|
return /* @__PURE__ */ g(
|
|
2072
2072
|
"li",
|
|
2073
2073
|
{
|
|
@@ -2078,16 +2078,16 @@ function gr({
|
|
|
2078
2078
|
{
|
|
2079
2079
|
type: "button",
|
|
2080
2080
|
className: "jp-sidebar__item-main",
|
|
2081
|
-
onClick: () => a(
|
|
2081
|
+
onClick: () => a(w.id),
|
|
2082
2082
|
children: [
|
|
2083
2083
|
/* @__PURE__ */ g("span", { className: "jp-sidebar__item-name", children: [
|
|
2084
|
-
|
|
2085
|
-
|
|
2084
|
+
w.name,
|
|
2085
|
+
w.is_default && /* @__PURE__ */ s("span", { className: "jp-sidebar__badge", children: "default" })
|
|
2086
2086
|
] }),
|
|
2087
2087
|
/* @__PURE__ */ g("span", { className: "jp-sidebar__item-meta", children: [
|
|
2088
|
-
|
|
2088
|
+
w.keywords.length,
|
|
2089
2089
|
" kw · ",
|
|
2090
|
-
|
|
2090
|
+
w.remote_pref
|
|
2091
2091
|
] })
|
|
2092
2092
|
]
|
|
2093
2093
|
}
|
|
@@ -2098,8 +2098,8 @@ function gr({
|
|
|
2098
2098
|
{
|
|
2099
2099
|
type: "button",
|
|
2100
2100
|
className: "jp-sidebar__item-edit",
|
|
2101
|
-
onClick: () => r(
|
|
2102
|
-
"aria-label": `Edit ${
|
|
2101
|
+
onClick: () => r(w),
|
|
2102
|
+
"aria-label": `Edit ${w.name}`,
|
|
2103
2103
|
children: "✎"
|
|
2104
2104
|
}
|
|
2105
2105
|
),
|
|
@@ -2109,22 +2109,22 @@ function gr({
|
|
|
2109
2109
|
type: "button",
|
|
2110
2110
|
className: "jp-sidebar__item-remove",
|
|
2111
2111
|
onClick: () => {
|
|
2112
|
-
C(
|
|
2112
|
+
C(w);
|
|
2113
2113
|
},
|
|
2114
|
-
"aria-label":
|
|
2114
|
+
"aria-label": w.is_default ? `Hide ${w.name}` : `Delete ${w.name}`,
|
|
2115
2115
|
children: "×"
|
|
2116
2116
|
}
|
|
2117
2117
|
)
|
|
2118
2118
|
] })
|
|
2119
2119
|
]
|
|
2120
2120
|
},
|
|
2121
|
-
|
|
2121
|
+
w.id
|
|
2122
2122
|
);
|
|
2123
2123
|
}) })
|
|
2124
2124
|
] }) : /* @__PURE__ */ g("aside", { className: "jp-sidebar", children: [
|
|
2125
2125
|
/* @__PURE__ */ s("div", { className: "jp-sidebar__header", children: /* @__PURE__ */ s("h2", { children: "Profiles" }) }),
|
|
2126
2126
|
/* @__PURE__ */ s("p", { className: "jp-muted", children: "The feed to the right is the whole public corpus, newest first. Sign in to rank it against your own profile — keywords, IC or manager track, level and remote preference — and to track which jobs you’ve looked at." }),
|
|
2127
|
-
/* @__PURE__ */ s("a", { className: "jp-sidebar__signin", href:
|
|
2127
|
+
/* @__PURE__ */ s("a", { className: "jp-sidebar__signin", href: gr(), children: "Sign in" })
|
|
2128
2128
|
] });
|
|
2129
2129
|
}
|
|
2130
2130
|
const q = "/jobplatform/api";
|
|
@@ -2139,7 +2139,7 @@ async function K(e) {
|
|
|
2139
2139
|
throw new ne(t.message ?? t.error ?? `HTTP ${e.status}`, e.status);
|
|
2140
2140
|
return t.data;
|
|
2141
2141
|
}
|
|
2142
|
-
async function
|
|
2142
|
+
async function br(e, t) {
|
|
2143
2143
|
const a = new URLSearchParams();
|
|
2144
2144
|
e.profile_id && a.set("profile_id", e.profile_id), e.state && a.set("state", e.state), e.hide_dismissed && a.set("hide_dismissed", "true"), e.hide_queued && a.set("hide_queued", "true"), e.page && a.set("page", String(e.page)), e.limit && a.set("limit", String(e.limit)), e.sort && a.set("sort", e.sort), e.min_score !== void 0 && a.set("min_score", String(e.min_score)), e.min_salary !== void 0 && a.set("min_salary", String(e.min_salary)), e.workplace && a.set("workplace", e.workplace), e.near && (a.set("near", e.near), e.radius_miles && a.set("radius_miles", String(e.radius_miles)), e.include_remote === !1 && a.set("include_remote", "false"));
|
|
2145
2145
|
const n = `${q}/jobs${a.toString() ? `?${a}` : ""}`, r = await fetch(n, {
|
|
@@ -2167,7 +2167,7 @@ async function wr(e, t, a) {
|
|
|
2167
2167
|
});
|
|
2168
2168
|
return (await K(r)).job;
|
|
2169
2169
|
}
|
|
2170
|
-
async function
|
|
2170
|
+
async function _r(e, t, a, n) {
|
|
2171
2171
|
const r = await fetch(`${q}/jobs/${encodeURIComponent(e)}/state`, {
|
|
2172
2172
|
method: "PUT",
|
|
2173
2173
|
headers: O(a, !0),
|
|
@@ -2176,7 +2176,7 @@ async function br(e, t, a, n) {
|
|
|
2176
2176
|
});
|
|
2177
2177
|
return K(r);
|
|
2178
2178
|
}
|
|
2179
|
-
async function
|
|
2179
|
+
async function xt(e, t, a, n) {
|
|
2180
2180
|
const r = await fetch(`${q}/jobs/${encodeURIComponent(e)}/feedback`, {
|
|
2181
2181
|
method: "PUT",
|
|
2182
2182
|
headers: O(n, !0),
|
|
@@ -2185,7 +2185,7 @@ async function Pt(e, t, a, n) {
|
|
|
2185
2185
|
});
|
|
2186
2186
|
return K(r);
|
|
2187
2187
|
}
|
|
2188
|
-
async function
|
|
2188
|
+
async function kr(e, t) {
|
|
2189
2189
|
const a = await fetch(`${q}/jobs/${encodeURIComponent(e)}/feedback`, {
|
|
2190
2190
|
method: "DELETE",
|
|
2191
2191
|
headers: O(),
|
|
@@ -2193,7 +2193,7 @@ async function _r(e, t) {
|
|
|
2193
2193
|
});
|
|
2194
2194
|
return K(a);
|
|
2195
2195
|
}
|
|
2196
|
-
async function
|
|
2196
|
+
async function Rr(e, t, a) {
|
|
2197
2197
|
const n = await fetch(`${q}/jobs/${encodeURIComponent(e)}/resume`, {
|
|
2198
2198
|
method: "POST",
|
|
2199
2199
|
headers: O(t, !0),
|
|
@@ -2202,7 +2202,7 @@ async function kr(e, t, a) {
|
|
|
2202
2202
|
});
|
|
2203
2203
|
return K(n);
|
|
2204
2204
|
}
|
|
2205
|
-
async function
|
|
2205
|
+
async function Nr(e, t, a) {
|
|
2206
2206
|
const n = await fetch(`${q}/jobs/${encodeURIComponent(e)}/cover-letter`, {
|
|
2207
2207
|
method: "POST",
|
|
2208
2208
|
headers: O(t, !0),
|
|
@@ -2211,7 +2211,7 @@ async function Rr(e, t, a) {
|
|
|
2211
2211
|
});
|
|
2212
2212
|
return K(n);
|
|
2213
2213
|
}
|
|
2214
|
-
async function
|
|
2214
|
+
async function oa(e, t, a) {
|
|
2215
2215
|
const n = await fetch(`${q}/jobs/${encodeURIComponent(e)}/packet-link`, {
|
|
2216
2216
|
method: "POST",
|
|
2217
2217
|
headers: O(a, !0),
|
|
@@ -2220,7 +2220,7 @@ async function ra(e, t, a) {
|
|
|
2220
2220
|
});
|
|
2221
2221
|
return K(n);
|
|
2222
2222
|
}
|
|
2223
|
-
async function
|
|
2223
|
+
async function sa(e, t, a) {
|
|
2224
2224
|
const n = await fetch(`${q}/jobs/${encodeURIComponent(e)}/application-extras`, {
|
|
2225
2225
|
method: "POST",
|
|
2226
2226
|
headers: O(a, !0),
|
|
@@ -2229,7 +2229,7 @@ async function oa(e, t, a) {
|
|
|
2229
2229
|
});
|
|
2230
2230
|
return K(n);
|
|
2231
2231
|
}
|
|
2232
|
-
async function
|
|
2232
|
+
async function xo(e) {
|
|
2233
2233
|
const t = await fetch(`${q}/jobs/packets`, {
|
|
2234
2234
|
method: "GET",
|
|
2235
2235
|
headers: O(),
|
|
@@ -2237,7 +2237,7 @@ async function jo(e) {
|
|
|
2237
2237
|
});
|
|
2238
2238
|
return (await K(t)).packets;
|
|
2239
2239
|
}
|
|
2240
|
-
async function
|
|
2240
|
+
async function ia(e, t = "review", a) {
|
|
2241
2241
|
const n = await fetch(`${q}/jobs/${encodeURIComponent(e)}/apply`, {
|
|
2242
2242
|
method: "POST",
|
|
2243
2243
|
headers: { "Content-Type": "application/json", ...O() },
|
|
@@ -2246,7 +2246,7 @@ async function sa(e, t = "review", a) {
|
|
|
2246
2246
|
});
|
|
2247
2247
|
return (await K(n)).application;
|
|
2248
2248
|
}
|
|
2249
|
-
async function
|
|
2249
|
+
async function $o(e, t) {
|
|
2250
2250
|
const n = await fetch(`${q}/applications`, {
|
|
2251
2251
|
method: "GET",
|
|
2252
2252
|
headers: O(),
|
|
@@ -2254,7 +2254,7 @@ async function Co(e, t) {
|
|
|
2254
2254
|
});
|
|
2255
2255
|
return (await K(n)).applications;
|
|
2256
2256
|
}
|
|
2257
|
-
async function
|
|
2257
|
+
async function Lo(e, t) {
|
|
2258
2258
|
const a = await fetch(`${q}/applications/${encodeURIComponent(e)}/approve`, {
|
|
2259
2259
|
method: "POST",
|
|
2260
2260
|
headers: O(),
|
|
@@ -2262,7 +2262,7 @@ async function Eo(e, t) {
|
|
|
2262
2262
|
});
|
|
2263
2263
|
return (await K(a)).application;
|
|
2264
2264
|
}
|
|
2265
|
-
async function
|
|
2265
|
+
async function To(e) {
|
|
2266
2266
|
const t = await fetch(`${q}/unanswered-questions`, {
|
|
2267
2267
|
method: "GET",
|
|
2268
2268
|
headers: O(),
|
|
@@ -2270,7 +2270,7 @@ async function So(e) {
|
|
|
2270
2270
|
});
|
|
2271
2271
|
return (await K(t)).questions;
|
|
2272
2272
|
}
|
|
2273
|
-
async function
|
|
2273
|
+
async function Ao(e) {
|
|
2274
2274
|
const t = await fetch(`${q}/application-answers`, {
|
|
2275
2275
|
method: "GET",
|
|
2276
2276
|
headers: O(),
|
|
@@ -2278,7 +2278,7 @@ async function Po(e) {
|
|
|
2278
2278
|
});
|
|
2279
2279
|
return (await K(t)).answers;
|
|
2280
2280
|
}
|
|
2281
|
-
async function
|
|
2281
|
+
async function Oo(e, t, a) {
|
|
2282
2282
|
const n = await fetch(`${q}/application-answers`, {
|
|
2283
2283
|
method: "PUT",
|
|
2284
2284
|
headers: { ...O(), "Content-Type": "application/json" },
|
|
@@ -2287,14 +2287,14 @@ async function $o(e, t, a) {
|
|
|
2287
2287
|
});
|
|
2288
2288
|
return (await K(n)).answer;
|
|
2289
2289
|
}
|
|
2290
|
-
async function
|
|
2290
|
+
async function Do(e, t) {
|
|
2291
2291
|
const a = await fetch(
|
|
2292
2292
|
`${q}/application-answers/${encodeURIComponent(e)}`,
|
|
2293
2293
|
{ method: "DELETE", headers: O(), credentials: "include" }
|
|
2294
2294
|
);
|
|
2295
2295
|
return (await K(a)).answers;
|
|
2296
2296
|
}
|
|
2297
|
-
async function
|
|
2297
|
+
async function Fo(e) {
|
|
2298
2298
|
const t = await fetch(`${q}/verification-codes`, {
|
|
2299
2299
|
method: "GET",
|
|
2300
2300
|
headers: O(),
|
|
@@ -2302,13 +2302,13 @@ async function Lo(e) {
|
|
|
2302
2302
|
});
|
|
2303
2303
|
return (await K(t)).codes;
|
|
2304
2304
|
}
|
|
2305
|
-
const
|
|
2305
|
+
const jr = "/jobplatform/api";
|
|
2306
2306
|
class ot extends Error {
|
|
2307
2307
|
constructor(t, a) {
|
|
2308
2308
|
super(t), this.status = a, this.name = "CompaniesApiError";
|
|
2309
2309
|
}
|
|
2310
2310
|
}
|
|
2311
|
-
async function
|
|
2311
|
+
async function Cr(e) {
|
|
2312
2312
|
const t = await e.json();
|
|
2313
2313
|
if (!e.ok || !t.success || !t.data)
|
|
2314
2314
|
throw new ot(
|
|
@@ -2317,14 +2317,14 @@ async function jr(e) {
|
|
|
2317
2317
|
);
|
|
2318
2318
|
return t.data;
|
|
2319
2319
|
}
|
|
2320
|
-
async function
|
|
2321
|
-
const a = await fetch(`${
|
|
2320
|
+
async function Er(e, t) {
|
|
2321
|
+
const a = await fetch(`${jr}/companies/match`, {
|
|
2322
2322
|
method: "POST",
|
|
2323
2323
|
headers: O(t, !0),
|
|
2324
2324
|
credentials: "include",
|
|
2325
2325
|
body: JSON.stringify({ names: e })
|
|
2326
2326
|
});
|
|
2327
|
-
return (await
|
|
2327
|
+
return (await Cr(a)).results;
|
|
2328
2328
|
}
|
|
2329
2329
|
function $t(e) {
|
|
2330
2330
|
const t = /* @__PURE__ */ new Set(), a = [];
|
|
@@ -2334,34 +2334,34 @@ function $t(e) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
return a;
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2337
|
+
function Sr(e) {
|
|
2338
2338
|
return e ? `https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&sz=64` : null;
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2341
|
-
const [n, r] = N(null), [o, i] = N(""), [l, c] = N(!1), [u, h] = N(null), [d, v] = N(null), [
|
|
2340
|
+
function Pr({ auth: e, profileId: t, onCompaniesChanged: a }) {
|
|
2341
|
+
const [n, r] = N(null), [o, i] = N(""), [l, c] = N(!1), [u, h] = N(null), [d, v] = N(null), [b, _] = N(null), {
|
|
2342
2342
|
data: m,
|
|
2343
2343
|
loading: f,
|
|
2344
2344
|
error: C,
|
|
2345
|
-
reload:
|
|
2345
|
+
reload: w
|
|
2346
2346
|
} = Ke(
|
|
2347
2347
|
`profile-companies:${t ?? ""}`,
|
|
2348
|
-
() =>
|
|
2348
|
+
() => dr(t ?? ""),
|
|
2349
2349
|
{ enabled: !!t }
|
|
2350
|
-
), R = t ? m ?? [] : [],
|
|
2351
|
-
Le(`profile-companies:${t ?? ""}`),
|
|
2352
|
-
}, [t,
|
|
2350
|
+
), R = t ? m ?? [] : [], $ = n ?? (C ? C instanceof _e ? C.message : "Failed to load companies" : null), x = se(() => {
|
|
2351
|
+
Le(`profile-companies:${t ?? ""}`), w();
|
|
2352
|
+
}, [t, w]);
|
|
2353
2353
|
z(() => {
|
|
2354
2354
|
h(null);
|
|
2355
2355
|
}, [t]);
|
|
2356
2356
|
const D = (k, F) => `${k}:${F}`, W = new Set(R.map((k) => D(k.ats, k.slug))), B = async (k, F, H) => {
|
|
2357
|
-
if (!(!t ||
|
|
2357
|
+
if (!(!t || b)) {
|
|
2358
2358
|
r(null), v(null);
|
|
2359
2359
|
try {
|
|
2360
|
-
await
|
|
2360
|
+
await pr(
|
|
2361
2361
|
t,
|
|
2362
2362
|
{ ats: k, slug: F, display_name: H.trim() || F },
|
|
2363
2363
|
e
|
|
2364
|
-
),
|
|
2364
|
+
), x(), a?.();
|
|
2365
2365
|
} catch (T) {
|
|
2366
2366
|
const V = T instanceof ot || T instanceof _e ? T.message : "Failed to add company";
|
|
2367
2367
|
throw v(V), T;
|
|
@@ -2373,7 +2373,7 @@ function Sr({ auth: e, profileId: t, onCompaniesChanged: a }) {
|
|
|
2373
2373
|
if (!(F.length === 0 || l)) {
|
|
2374
2374
|
c(!0), v(null), h(null);
|
|
2375
2375
|
try {
|
|
2376
|
-
h(await
|
|
2376
|
+
h(await Er(F, e));
|
|
2377
2377
|
} catch (H) {
|
|
2378
2378
|
v(H instanceof ot ? H.message : "Failed to look up company");
|
|
2379
2379
|
} finally {
|
|
@@ -2394,7 +2394,7 @@ function Sr({ auth: e, profileId: t, onCompaniesChanged: a }) {
|
|
|
2394
2394
|
if (t) {
|
|
2395
2395
|
r(null);
|
|
2396
2396
|
try {
|
|
2397
|
-
await
|
|
2397
|
+
await hr(t, k, e), x(), a?.();
|
|
2398
2398
|
} catch (F) {
|
|
2399
2399
|
r(F instanceof _e ? F.message : "Failed to remove company");
|
|
2400
2400
|
}
|
|
@@ -2419,7 +2419,7 @@ function Sr({ auth: e, profileId: t, onCompaniesChanged: a }) {
|
|
|
2419
2419
|
] }),
|
|
2420
2420
|
d && /* @__PURE__ */ s("p", { className: "job-platform__companies-error", children: d }),
|
|
2421
2421
|
u && /* @__PURE__ */ s("div", { className: "job-platform__match-results", children: u.map((k) => {
|
|
2422
|
-
const F = k.ats && k.slug ? D(k.ats, k.slug) : k.query, H = k.ats && k.slug ? W.has(F) : !1, T =
|
|
2422
|
+
const F = k.ats && k.slug ? D(k.ats, k.slug) : k.query, H = k.ats && k.slug ? W.has(F) : !1, T = Sr(k.domain), V = k.matched && k.n_jobs === 0;
|
|
2423
2423
|
return k.matched ? /* @__PURE__ */ g(
|
|
2424
2424
|
"div",
|
|
2425
2425
|
{
|
|
@@ -2463,8 +2463,8 @@ function Sr({ auth: e, profileId: t, onCompaniesChanged: a }) {
|
|
|
2463
2463
|
onClick: () => {
|
|
2464
2464
|
A(k);
|
|
2465
2465
|
},
|
|
2466
|
-
disabled: H ||
|
|
2467
|
-
children: H ? "Added ✓" :
|
|
2466
|
+
disabled: H || b !== null,
|
|
2467
|
+
children: H ? "Added ✓" : b === F ? "Adding…" : V ? "Add anyway" : "Confirm & add"
|
|
2468
2468
|
}
|
|
2469
2469
|
)
|
|
2470
2470
|
]
|
|
@@ -2505,16 +2505,16 @@ function Sr({ auth: e, profileId: t, onCompaniesChanged: a }) {
|
|
|
2505
2505
|
}
|
|
2506
2506
|
)
|
|
2507
2507
|
] }, k.id)) }),
|
|
2508
|
-
|
|
2508
|
+
$ && /* @__PURE__ */ s("p", { className: "job-platform__companies-error", children: $ })
|
|
2509
2509
|
] }) : /* @__PURE__ */ s("p", { className: "job-platform__companies-empty", children: "Save the profile first, then add the companies it should track." });
|
|
2510
2510
|
}
|
|
2511
|
-
const Ze = 15 * 6e4,
|
|
2511
|
+
const Ze = 15 * 6e4, xr = [
|
|
2512
2512
|
{ value: "either", label: "Either", hint: "No constraint — both tracks in the feed" },
|
|
2513
2513
|
{ value: "ic", label: "IC", hint: "No direct reports" },
|
|
2514
2514
|
{ value: "manager", label: "Manager", hint: "Has direct reports" }
|
|
2515
2515
|
];
|
|
2516
|
-
function
|
|
2517
|
-
return e === "ic" ?
|
|
2516
|
+
function Lt(e) {
|
|
2517
|
+
return e === "ic" ? Et : e === "manager" ? St : [...Et, ...St];
|
|
2518
2518
|
}
|
|
2519
2519
|
function et({ count: e }) {
|
|
2520
2520
|
return e === null ? null : e === "loading" ? /* @__PURE__ */ s("span", { className: "jp-editor__count jp-editor__count--loading", children: "…" }) : /* @__PURE__ */ g("span", { className: e === 0 ? "jp-editor__count jp-editor__count--zero" : "jp-editor__count", children: [
|
|
@@ -2524,7 +2524,7 @@ function et({ count: e }) {
|
|
|
2524
2524
|
] });
|
|
2525
2525
|
}
|
|
2526
2526
|
function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r }) {
|
|
2527
|
-
const [o, i] = N(t?.id ?? null), [l, c] = N(t?.name ?? ""), [u, h] = N(t?.keywords ?? []), [d, v] = N(""), [
|
|
2527
|
+
const [o, i] = N(t?.id ?? null), [l, c] = N(t?.name ?? ""), [u, h] = N(t?.keywords ?? []), [d, v] = N(""), [b, _] = N(t?.track ?? "either"), [m, f] = N(t?.levels ?? []), [C, w] = N(t?.remote_pref ?? "any"), [R, $] = N(!1), [x, D] = N(null), [W, B] = N(!1), [P, A] = N({}), [M, k] = N({}), [F, H] = N(null), T = se(
|
|
2528
2528
|
async (y) => {
|
|
2529
2529
|
A((j) => ({ ...j, [y]: "loading" }));
|
|
2530
2530
|
try {
|
|
@@ -2562,17 +2562,17 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2562
2562
|
for (const y of m) V(y);
|
|
2563
2563
|
}
|
|
2564
2564
|
}, [u, m, T, V]), z(() => {
|
|
2565
|
-
if (
|
|
2565
|
+
if (b === "either") {
|
|
2566
2566
|
H(null);
|
|
2567
2567
|
return;
|
|
2568
2568
|
}
|
|
2569
2569
|
let y = !1;
|
|
2570
|
-
return H("loading"), Me(`preflight:track:${
|
|
2570
|
+
return H("loading"), Me(`preflight:track:${b}`, () => Xe({ track: b }), {
|
|
2571
2571
|
maxAgeMs: Ze
|
|
2572
2572
|
}).then((j) => !y && H(j)).catch(() => !y && H(null)), () => {
|
|
2573
2573
|
y = !0;
|
|
2574
2574
|
};
|
|
2575
|
-
}, [
|
|
2575
|
+
}, [b, e]), z(() => {
|
|
2576
2576
|
const y = (j) => {
|
|
2577
2577
|
j.key === "Escape" && a();
|
|
2578
2578
|
};
|
|
@@ -2590,9 +2590,9 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2590
2590
|
y.key === "Enter" || y.key === "," ? (y.preventDefault(), oe(d)) : y.key === "Backspace" && !d && u.length && h((j) => j.slice(0, -1));
|
|
2591
2591
|
}, ge = (y) => h((j) => j.filter((U) => U !== y)), ve = (y) => f((j) => j.includes(y) ? j.filter((U) => U !== y) : (M[y] === void 0 && V(y), [...j, y])), Ce = (y) => {
|
|
2592
2592
|
_(y);
|
|
2593
|
-
const j =
|
|
2593
|
+
const j = Lt(y);
|
|
2594
2594
|
f((U) => U.filter((de) => j.includes(de)));
|
|
2595
|
-
},
|
|
2595
|
+
}, be = () => {
|
|
2596
2596
|
const y = d.trim() ? [
|
|
2597
2597
|
...u,
|
|
2598
2598
|
...d.split(",").map((j) => j.trim()).filter(Boolean)
|
|
@@ -2600,26 +2600,26 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2600
2600
|
return {
|
|
2601
2601
|
name: l.trim(),
|
|
2602
2602
|
keywords: y,
|
|
2603
|
-
track:
|
|
2603
|
+
track: b,
|
|
2604
2604
|
levels: m,
|
|
2605
2605
|
remote_pref: C
|
|
2606
2606
|
};
|
|
2607
2607
|
}, le = async () => {
|
|
2608
2608
|
if (!(!l.trim() || R)) {
|
|
2609
|
-
|
|
2609
|
+
$(!0), D(null);
|
|
2610
2610
|
try {
|
|
2611
|
-
const y =
|
|
2611
|
+
const y = be();
|
|
2612
2612
|
if (o) {
|
|
2613
|
-
const j = await
|
|
2613
|
+
const j = await cr(o, y, e);
|
|
2614
2614
|
n(j), a();
|
|
2615
2615
|
} else {
|
|
2616
|
-
const j = await
|
|
2616
|
+
const j = await lr(y, e);
|
|
2617
2617
|
i(j.id), h(j.keywords), n(j), B(!0);
|
|
2618
2618
|
}
|
|
2619
2619
|
} catch (y) {
|
|
2620
2620
|
D(y instanceof _e ? y.message : "Failed to save profile");
|
|
2621
2621
|
} finally {
|
|
2622
|
-
|
|
2622
|
+
$(!1);
|
|
2623
2623
|
}
|
|
2624
2624
|
}
|
|
2625
2625
|
};
|
|
@@ -2690,8 +2690,8 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2690
2690
|
/* @__PURE__ */ s("span", { className: "jp-editor__field-label", children: "Track" }),
|
|
2691
2691
|
/* @__PURE__ */ s("span", { className: "jp-editor__hint", children: "Does the role have direct reports? A hard filter — jobs on the other track don’t appear in this profile’s feed at all." })
|
|
2692
2692
|
] }),
|
|
2693
|
-
/* @__PURE__ */ s("div", { className: "jp-role-picker", role: "radiogroup", "aria-label": "Track", children:
|
|
2694
|
-
const j =
|
|
2693
|
+
/* @__PURE__ */ s("div", { className: "jp-role-picker", role: "radiogroup", "aria-label": "Track", children: xr.map((y) => {
|
|
2694
|
+
const j = b === y.value;
|
|
2695
2695
|
return /* @__PURE__ */ g(
|
|
2696
2696
|
"button",
|
|
2697
2697
|
{
|
|
@@ -2715,7 +2715,7 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2715
2715
|
/* @__PURE__ */ s("span", { className: "jp-editor__field-label", children: "Levels" }),
|
|
2716
2716
|
/* @__PURE__ */ s("span", { className: "jp-editor__hint", children: "Rungs on the ladder. Scored by distance — one rung off still counts, two doesn’t. Pick none to ignore level entirely." })
|
|
2717
2717
|
] }),
|
|
2718
|
-
/* @__PURE__ */ s("div", { className: "jp-role-picker", children:
|
|
2718
|
+
/* @__PURE__ */ s("div", { className: "jp-role-picker", children: Lt(b).map((y) => {
|
|
2719
2719
|
const j = m.includes(y);
|
|
2720
2720
|
return /* @__PURE__ */ g(
|
|
2721
2721
|
"button",
|
|
@@ -2725,7 +2725,7 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2725
2725
|
onClick: () => ve(y),
|
|
2726
2726
|
"aria-pressed": j,
|
|
2727
2727
|
children: [
|
|
2728
|
-
|
|
2728
|
+
sr[y],
|
|
2729
2729
|
j && /* @__PURE__ */ s(et, { count: M[y] ?? null })
|
|
2730
2730
|
]
|
|
2731
2731
|
},
|
|
@@ -2741,7 +2741,7 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2741
2741
|
id: "jp-editor-remote",
|
|
2742
2742
|
className: "jp-editor__text",
|
|
2743
2743
|
value: C,
|
|
2744
|
-
onChange: (y) =>
|
|
2744
|
+
onChange: (y) => w(y.target.value),
|
|
2745
2745
|
children: [
|
|
2746
2746
|
/* @__PURE__ */ s("option", { value: "any", children: "Any" }),
|
|
2747
2747
|
/* @__PURE__ */ s("option", { value: "remote", children: "Remote" }),
|
|
@@ -2757,7 +2757,7 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2757
2757
|
/* @__PURE__ */ s("span", { className: "jp-editor__hint", children: "Optional. Empty = score the whole corpus; add companies to scope the feed." })
|
|
2758
2758
|
] }),
|
|
2759
2759
|
o ? /* @__PURE__ */ s(
|
|
2760
|
-
|
|
2760
|
+
Pr,
|
|
2761
2761
|
{
|
|
2762
2762
|
auth: e,
|
|
2763
2763
|
profileId: o,
|
|
@@ -2766,9 +2766,9 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2766
2766
|
) : /* @__PURE__ */ s("p", { className: "job-platform__companies-empty", children: "Create the profile first (below), then add the companies it should track." })
|
|
2767
2767
|
] })
|
|
2768
2768
|
] }),
|
|
2769
|
-
|
|
2769
|
+
x && /* @__PURE__ */ s("p", { className: "jp-editor__error", children: x }),
|
|
2770
2770
|
/* @__PURE__ */ g("div", { className: "jp-editor__footer", children: [
|
|
2771
|
-
W &&
|
|
2771
|
+
W && !x && /* @__PURE__ */ s("span", { className: "jp-editor__saved", children: "Saved — add companies above, or close." }),
|
|
2772
2772
|
/* @__PURE__ */ s("button", { type: "button", className: "jp-editor__cancel", onClick: a, children: o ? "Close" : "Cancel" }),
|
|
2773
2773
|
/* @__PURE__ */ s(
|
|
2774
2774
|
"button",
|
|
@@ -2787,9 +2787,9 @@ function $r({ auth: e, initial: t, onClose: a, onSaved: n, onCompaniesChanged: r
|
|
|
2787
2787
|
}
|
|
2788
2788
|
) });
|
|
2789
2789
|
}
|
|
2790
|
-
const
|
|
2790
|
+
const Lr = "/jobplatform/api";
|
|
2791
2791
|
async function je(e, t, a = {}, n = !1) {
|
|
2792
|
-
const r = await fetch(`${
|
|
2792
|
+
const r = await fetch(`${Lr}${e}`, {
|
|
2793
2793
|
...a,
|
|
2794
2794
|
headers: O(t, n),
|
|
2795
2795
|
credentials: "include"
|
|
@@ -2798,49 +2798,49 @@ async function je(e, t, a = {}, n = !1) {
|
|
|
2798
2798
|
throw new ne(o.message ?? o.error ?? `HTTP ${r.status}`, r.status);
|
|
2799
2799
|
return o.data;
|
|
2800
2800
|
}
|
|
2801
|
-
function
|
|
2801
|
+
function la(e, t) {
|
|
2802
2802
|
return { method: e, body: JSON.stringify(t) };
|
|
2803
2803
|
}
|
|
2804
|
-
async function
|
|
2804
|
+
async function Uo(e) {
|
|
2805
2805
|
return (await je("/applicant-profile", e)).profile;
|
|
2806
2806
|
}
|
|
2807
|
-
async function
|
|
2807
|
+
async function Io(e, t) {
|
|
2808
2808
|
return (await je(
|
|
2809
2809
|
"/applicant-profile",
|
|
2810
2810
|
t,
|
|
2811
|
-
|
|
2811
|
+
la("PUT", { profile: e }),
|
|
2812
2812
|
!0
|
|
2813
2813
|
)).updated_at;
|
|
2814
2814
|
}
|
|
2815
|
-
async function
|
|
2815
|
+
async function Mo(e) {
|
|
2816
2816
|
return (await je("/blocked-companies", e)).companies;
|
|
2817
2817
|
}
|
|
2818
|
-
async function
|
|
2818
|
+
async function Tr(e, t) {
|
|
2819
2819
|
return (await je(
|
|
2820
2820
|
"/blocked-companies",
|
|
2821
2821
|
t,
|
|
2822
|
-
|
|
2822
|
+
la("PUT", { company: e }),
|
|
2823
2823
|
!0
|
|
2824
2824
|
)).company;
|
|
2825
2825
|
}
|
|
2826
|
-
async function
|
|
2826
|
+
async function Bo(e, t) {
|
|
2827
2827
|
await je(
|
|
2828
2828
|
`/blocked-companies?company=${encodeURIComponent(e)}`,
|
|
2829
2829
|
t,
|
|
2830
2830
|
{ method: "DELETE" }
|
|
2831
2831
|
);
|
|
2832
2832
|
}
|
|
2833
|
-
async function
|
|
2833
|
+
async function Ar(e, t) {
|
|
2834
2834
|
return (await je(
|
|
2835
2835
|
`/locations?q=${encodeURIComponent(e)}&limit=8`,
|
|
2836
2836
|
t
|
|
2837
2837
|
)).locations;
|
|
2838
2838
|
}
|
|
2839
|
-
async function
|
|
2839
|
+
async function Ho(e) {
|
|
2840
2840
|
return je("/insights", e);
|
|
2841
2841
|
}
|
|
2842
|
-
const
|
|
2843
|
-
function
|
|
2842
|
+
const Or = [10, 25, 50, 100], st = "jobplatform:near";
|
|
2843
|
+
function Dr() {
|
|
2844
2844
|
try {
|
|
2845
2845
|
const e = window.localStorage.getItem(st);
|
|
2846
2846
|
if (!e) return null;
|
|
@@ -2850,19 +2850,19 @@ function Or() {
|
|
|
2850
2850
|
return null;
|
|
2851
2851
|
}
|
|
2852
2852
|
}
|
|
2853
|
-
function
|
|
2853
|
+
function Fr(e) {
|
|
2854
2854
|
try {
|
|
2855
2855
|
e ? window.localStorage.setItem(st, JSON.stringify(e)) : window.localStorage.removeItem(st);
|
|
2856
2856
|
} catch {
|
|
2857
2857
|
}
|
|
2858
2858
|
}
|
|
2859
|
-
function
|
|
2859
|
+
function Ur({
|
|
2860
2860
|
auth: e,
|
|
2861
2861
|
value: t,
|
|
2862
2862
|
onChange: a
|
|
2863
2863
|
}) {
|
|
2864
|
-
const n =
|
|
2865
|
-
|
|
2864
|
+
const n = _a(), [r, o] = N(""), [i, l] = N([]), c = (u) => {
|
|
2865
|
+
Fr(u), a(u);
|
|
2866
2866
|
};
|
|
2867
2867
|
return z(() => {
|
|
2868
2868
|
const u = r.trim();
|
|
@@ -2872,7 +2872,7 @@ function Fr({
|
|
|
2872
2872
|
}
|
|
2873
2873
|
let h = !1;
|
|
2874
2874
|
const d = setTimeout(() => {
|
|
2875
|
-
|
|
2875
|
+
Ar(u, e).then(
|
|
2876
2876
|
(v) => {
|
|
2877
2877
|
h || l(v);
|
|
2878
2878
|
},
|
|
@@ -2905,7 +2905,7 @@ function Fr({
|
|
|
2905
2905
|
{
|
|
2906
2906
|
value: t.radius,
|
|
2907
2907
|
onChange: (u) => c({ ...t, radius: Number(u.target.value) }),
|
|
2908
|
-
children:
|
|
2908
|
+
children: Or.map((u) => /* @__PURE__ */ g("option", { value: u, children: [
|
|
2909
2909
|
u,
|
|
2910
2910
|
" mi"
|
|
2911
2911
|
] }, u))
|
|
@@ -2942,18 +2942,18 @@ function Fr({
|
|
|
2942
2942
|
/* @__PURE__ */ s("datalist", { id: n, children: i.map((u) => /* @__PURE__ */ s("option", { value: u.label }, u.key)) })
|
|
2943
2943
|
] });
|
|
2944
2944
|
}
|
|
2945
|
-
async function
|
|
2946
|
-
const n = await
|
|
2945
|
+
async function Ir(e, t, a) {
|
|
2946
|
+
const n = await Rr(e, t);
|
|
2947
2947
|
let r = "";
|
|
2948
2948
|
try {
|
|
2949
|
-
r = (await
|
|
2949
|
+
r = (await sa(
|
|
2950
2950
|
e,
|
|
2951
2951
|
{ resume_markdown: n.resume_markdown },
|
|
2952
2952
|
t
|
|
2953
|
-
)).cover_letter_markdown || (await
|
|
2953
|
+
)).cover_letter_markdown || (await Nr(e, t)).cover_letter_markdown;
|
|
2954
2954
|
} catch {
|
|
2955
2955
|
}
|
|
2956
|
-
const { url: o, slug: i } = await
|
|
2956
|
+
const { url: o, slug: i } = await oa(
|
|
2957
2957
|
e,
|
|
2958
2958
|
{
|
|
2959
2959
|
resume_markdown: n.resume_markdown,
|
|
@@ -2963,10 +2963,10 @@ async function Ur(e, t, a) {
|
|
|
2963
2963
|
);
|
|
2964
2964
|
return { slug: i, url: o, resume: n.resume_markdown, coverLetter: r };
|
|
2965
2965
|
}
|
|
2966
|
-
async function
|
|
2966
|
+
async function Mr(e, t, a) {
|
|
2967
2967
|
a({ phase: "queueing" });
|
|
2968
2968
|
try {
|
|
2969
|
-
await
|
|
2969
|
+
await ia(e, "review", t), a({ phase: "queued" });
|
|
2970
2970
|
} catch (n) {
|
|
2971
2971
|
a({
|
|
2972
2972
|
phase: "error",
|
|
@@ -2974,7 +2974,7 @@ async function Ir(e, t, a) {
|
|
|
2974
2974
|
});
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
|
-
const
|
|
2977
|
+
const Br = [
|
|
2978
2978
|
{ reason: "pay", label: "Pay too low" },
|
|
2979
2979
|
{ reason: "location", label: "Wrong location" },
|
|
2980
2980
|
{ reason: "stack", label: "Wrong stack" },
|
|
@@ -2982,14 +2982,14 @@ const Mr = [
|
|
|
2982
2982
|
{ reason: "level", label: "Wrong level" },
|
|
2983
2983
|
{ reason: "company", label: "Company" },
|
|
2984
2984
|
{ reason: "other", label: "Other" }
|
|
2985
|
-
],
|
|
2985
|
+
], Hr = [
|
|
2986
2986
|
{ reason: "domain", label: "Exciting domain" },
|
|
2987
2987
|
{ reason: "comp", label: "Great comp" },
|
|
2988
2988
|
{ reason: "fit", label: "Great fit" },
|
|
2989
2989
|
{ reason: "company", label: "Dream company" },
|
|
2990
2990
|
{ reason: "other", label: "Other" }
|
|
2991
2991
|
];
|
|
2992
|
-
function
|
|
2992
|
+
function ca({
|
|
2993
2993
|
jobId: e,
|
|
2994
2994
|
auth: t,
|
|
2995
2995
|
vote: a,
|
|
@@ -3000,15 +3000,15 @@ function la({
|
|
|
3000
3000
|
}) {
|
|
3001
3001
|
const [l, c] = N(null), u = Te(null), h = (m) => {
|
|
3002
3002
|
if (a === m) {
|
|
3003
|
-
const
|
|
3004
|
-
c(null), r(e, null, []),
|
|
3003
|
+
const w = n;
|
|
3004
|
+
c(null), r(e, null, []), kr(e).catch(() => r(e, m, w));
|
|
3005
3005
|
return;
|
|
3006
3006
|
}
|
|
3007
3007
|
const f = a, C = n;
|
|
3008
|
-
r(e, m, []),
|
|
3008
|
+
r(e, m, []), xt(e, m, [], t).catch(() => r(e, f, C)), c(m);
|
|
3009
3009
|
}, d = (m, f) => {
|
|
3010
|
-
const C = n,
|
|
3011
|
-
r(e, m,
|
|
3010
|
+
const C = n, w = C.includes(f) ? C.filter((R) => R !== f) : [...C, f];
|
|
3011
|
+
r(e, m, w), xt(e, m, w, t).catch(() => r(e, m, C));
|
|
3012
3012
|
};
|
|
3013
3013
|
return /* @__PURE__ */ g(
|
|
3014
3014
|
"div",
|
|
@@ -3051,7 +3051,7 @@ function la({
|
|
|
3051
3051
|
children: "👎"
|
|
3052
3052
|
}
|
|
3053
3053
|
),
|
|
3054
|
-
l !== null && /* @__PURE__ */ s("div", { className: "jp-vote__reasons", role: "menu", "aria-label": "Why?", "data-testid": "vote-reasons", children: (l === -1 ?
|
|
3054
|
+
l !== null && /* @__PURE__ */ s("div", { className: "jp-vote__reasons", role: "menu", "aria-label": "Why?", "data-testid": "vote-reasons", children: (l === -1 ? Br : Hr).map(({ reason: m, label: f }) => /* @__PURE__ */ s(
|
|
3055
3055
|
"button",
|
|
3056
3056
|
{
|
|
3057
3057
|
type: "button",
|
|
@@ -3068,17 +3068,17 @@ function la({
|
|
|
3068
3068
|
}
|
|
3069
3069
|
);
|
|
3070
3070
|
}
|
|
3071
|
-
function
|
|
3071
|
+
function Wr(e, t) {
|
|
3072
3072
|
if (e === null && t === null) return null;
|
|
3073
3073
|
const a = (n) => n >= 1e3 ? `$${Math.round(n / 1e3)}k` : `$${n}`;
|
|
3074
3074
|
return e && t ? `${a(e)}–${a(t)}` : a(e ?? t);
|
|
3075
3075
|
}
|
|
3076
|
-
function
|
|
3076
|
+
function Jr(e) {
|
|
3077
3077
|
if (!e) return null;
|
|
3078
3078
|
const t = new Date(e), a = Math.floor((Date.now() - t.getTime()) / 864e5);
|
|
3079
3079
|
return a === 0 ? "today" : a === 1 ? "yesterday" : a < 30 ? `${a}d ago` : t.toLocaleDateString();
|
|
3080
3080
|
}
|
|
3081
|
-
const
|
|
3081
|
+
const qr = {
|
|
3082
3082
|
queued: "Queued",
|
|
3083
3083
|
filled: "Filled",
|
|
3084
3084
|
approved: "Approved",
|
|
@@ -3086,7 +3086,7 @@ const Jr = {
|
|
|
3086
3086
|
needs_manual: "Needs you",
|
|
3087
3087
|
failed: "Failed",
|
|
3088
3088
|
job_closed: "Closed"
|
|
3089
|
-
},
|
|
3089
|
+
}, Kr = {
|
|
3090
3090
|
idle: "Apply",
|
|
3091
3091
|
waiting: "…",
|
|
3092
3092
|
preparing: "…",
|
|
@@ -3094,10 +3094,10 @@ const Jr = {
|
|
|
3094
3094
|
queued: "Queued",
|
|
3095
3095
|
error: "Retry"
|
|
3096
3096
|
};
|
|
3097
|
-
function
|
|
3097
|
+
function Vr(e) {
|
|
3098
3098
|
return e >= 0.75 ? "high" : e >= 0.5 ? "mid" : "low";
|
|
3099
3099
|
}
|
|
3100
|
-
function
|
|
3100
|
+
function Gr({
|
|
3101
3101
|
job: e,
|
|
3102
3102
|
showScore: t,
|
|
3103
3103
|
auth: a,
|
|
@@ -3108,9 +3108,9 @@ function Vr({
|
|
|
3108
3108
|
onApply: l,
|
|
3109
3109
|
applyStatus: c
|
|
3110
3110
|
}) {
|
|
3111
|
-
const u =
|
|
3111
|
+
const u = Wr(e.salary_min, e.salary_max), h = Jr(e.posted_date ?? e.scraped_at), d = t ? Vr(e.score) : null, v = e.state && e.state !== "new", b = e.state !== null && e.state !== void 0, _ = b, m = e.application_status ? "queued" : c?.phase ?? "idle", f = m === "waiting" || m === "preparing" || m === "queueing", C = ["jp-jobcard"];
|
|
3112
3112
|
d && C.push(`jp-jobcard--score-${d}`), v && C.push(`jp-jobcard--state-${e.state}`), n === -1 && C.push("jp-jobcard--downvoted");
|
|
3113
|
-
const
|
|
3113
|
+
const w = d ? `jp-jobcard__score jp-jobcard__score--${d}` : "jp-jobcard__score";
|
|
3114
3114
|
return (
|
|
3115
3115
|
// Not a <button>: the vote thumbs live inside the card, and buttons can't
|
|
3116
3116
|
// nest. role+tabIndex+keydown keep it clickable and keyboard-activatable.
|
|
@@ -3136,9 +3136,9 @@ function Vr({
|
|
|
3136
3136
|
children: e.state
|
|
3137
3137
|
}
|
|
3138
3138
|
),
|
|
3139
|
-
t && /* @__PURE__ */ s("span", { className:
|
|
3140
|
-
|
|
3141
|
-
|
|
3139
|
+
t && /* @__PURE__ */ s("span", { className: w, children: e.score.toFixed(2) }),
|
|
3140
|
+
b && /* @__PURE__ */ s(
|
|
3141
|
+
ca,
|
|
3142
3142
|
{
|
|
3143
3143
|
jobId: e.id,
|
|
3144
3144
|
auth: a,
|
|
@@ -3187,7 +3187,7 @@ function Vr({
|
|
|
3187
3187
|
onClick: (R) => {
|
|
3188
3188
|
R.stopPropagation(), _ && l(e.id);
|
|
3189
3189
|
},
|
|
3190
|
-
children: e.application_status ?
|
|
3190
|
+
children: e.application_status ? qr[e.application_status] : Kr[m]
|
|
3191
3191
|
}
|
|
3192
3192
|
)
|
|
3193
3193
|
] })
|
|
@@ -3196,7 +3196,7 @@ function Vr({
|
|
|
3196
3196
|
)
|
|
3197
3197
|
);
|
|
3198
3198
|
}
|
|
3199
|
-
const
|
|
3199
|
+
const zr = [
|
|
3200
3200
|
{ value: "", label: "All" },
|
|
3201
3201
|
{ value: "new", label: "New" },
|
|
3202
3202
|
{ value: "interested", label: "Interested" },
|
|
@@ -3207,7 +3207,7 @@ const Gr = [
|
|
|
3207
3207
|
{ value: "rejected", label: "Rejected" },
|
|
3208
3208
|
{ value: "dismissed", label: "Dismissed" }
|
|
3209
3209
|
];
|
|
3210
|
-
function
|
|
3210
|
+
function Yr({
|
|
3211
3211
|
auth: e,
|
|
3212
3212
|
profileId: t,
|
|
3213
3213
|
onSelect: a,
|
|
@@ -3217,14 +3217,14 @@ function zr({
|
|
|
3217
3217
|
stateOverrides: i,
|
|
3218
3218
|
awaitingProfile: l
|
|
3219
3219
|
}) {
|
|
3220
|
-
const [c, u] = N(1), [h, d] = N({}), [v,
|
|
3220
|
+
const [c, u] = N(1), [h, d] = N({}), [v, b] = N("score"), [_, m] = N(""), [f, C] = N(""), [w, R] = N(!0), [$, x] = N(""), [D, W] = N(Dr), B = 25, P = w && f === "", A = !t && v === "score" ? "date" : v, M = fe(
|
|
3221
3221
|
() => ({
|
|
3222
3222
|
profile_id: t ?? void 0,
|
|
3223
3223
|
state: f || void 0,
|
|
3224
3224
|
page: c,
|
|
3225
3225
|
limit: B,
|
|
3226
3226
|
sort: A,
|
|
3227
|
-
workplace:
|
|
3227
|
+
workplace: $ || void 0,
|
|
3228
3228
|
near: D?.place.key,
|
|
3229
3229
|
radius_miles: D?.radius,
|
|
3230
3230
|
include_remote: D?.includeRemote,
|
|
@@ -3233,18 +3233,18 @@ function zr({
|
|
|
3233
3233
|
// would queue it a second time.
|
|
3234
3234
|
hide_queued: !0
|
|
3235
3235
|
}),
|
|
3236
|
-
[t, f, c, B, A,
|
|
3236
|
+
[t, f, c, B, A, $, D]
|
|
3237
3237
|
), {
|
|
3238
3238
|
data: k,
|
|
3239
3239
|
loading: F,
|
|
3240
3240
|
refreshing: H,
|
|
3241
3241
|
error: T
|
|
3242
|
-
} = Ke(`jobs:${n ?? 0}:${JSON.stringify(M)}`, () =>
|
|
3242
|
+
} = Ke(`jobs:${n ?? 0}:${JSON.stringify(M)}`, () => br(M), {
|
|
3243
3243
|
enabled: !l
|
|
3244
3244
|
}), V = fe(() => k?.jobs ?? [], [k]), G = k?.total ?? 0, oe = T ? T instanceof ne ? T.message : "Failed to load jobs" : null;
|
|
3245
3245
|
z(() => {
|
|
3246
3246
|
u(1);
|
|
3247
|
-
}, [t, A, f,
|
|
3247
|
+
}, [t, A, f, $, D]);
|
|
3248
3248
|
const ie = fe(
|
|
3249
3249
|
() => V.map((E) => i[E.id] ? { ...E, state: i[E.id] } : E),
|
|
3250
3250
|
[V, i]
|
|
@@ -3262,7 +3262,7 @@ function zr({
|
|
|
3262
3262
|
return y;
|
|
3263
3263
|
}, [ie, _, P, h]), ve = se(
|
|
3264
3264
|
(E) => {
|
|
3265
|
-
|
|
3265
|
+
Mr(
|
|
3266
3266
|
E,
|
|
3267
3267
|
e,
|
|
3268
3268
|
(y) => d((j) => ({ ...j, [E]: y }))
|
|
@@ -3272,7 +3272,7 @@ function zr({
|
|
|
3272
3272
|
), Ce = fe(() => {
|
|
3273
3273
|
const E = Object.values(h).filter((y) => y.phase === "error");
|
|
3274
3274
|
return E.length === 0 ? null : /* @__PURE__ */ s("p", { className: "jp-error", children: E.length === 1 ? E[0].error : `${E.length} postings failed — press Retry.` });
|
|
3275
|
-
}, [h]),
|
|
3275
|
+
}, [h]), be = Math.max(1, Math.ceil(G / B)), le = ie.some((E) => E.state !== null && E.state !== void 0);
|
|
3276
3276
|
return /* @__PURE__ */ g("div", { className: "jp-jobs", children: [
|
|
3277
3277
|
/* @__PURE__ */ g("div", { className: "jp-jobs__filters", children: [
|
|
3278
3278
|
/* @__PURE__ */ s(
|
|
@@ -3287,7 +3287,7 @@ function zr({
|
|
|
3287
3287
|
),
|
|
3288
3288
|
/* @__PURE__ */ g("label", { className: "jp-jobs__filter", children: [
|
|
3289
3289
|
"Sort",
|
|
3290
|
-
/* @__PURE__ */ g("select", { value: A, onChange: (E) =>
|
|
3290
|
+
/* @__PURE__ */ g("select", { value: A, onChange: (E) => b(E.target.value), children: [
|
|
3291
3291
|
t && /* @__PURE__ */ s("option", { value: "score", children: "Score" }),
|
|
3292
3292
|
t && /* @__PURE__ */ s("option", { value: "comp", children: "Comp lens" }),
|
|
3293
3293
|
t && /* @__PURE__ */ s("option", { value: "interest", children: "Interest lens" }),
|
|
@@ -3301,8 +3301,8 @@ function zr({
|
|
|
3301
3301
|
/* @__PURE__ */ g(
|
|
3302
3302
|
"select",
|
|
3303
3303
|
{
|
|
3304
|
-
value:
|
|
3305
|
-
onChange: (E) =>
|
|
3304
|
+
value: $,
|
|
3305
|
+
onChange: (E) => x(E.target.value),
|
|
3306
3306
|
children: [
|
|
3307
3307
|
/* @__PURE__ */ s("option", { value: "", children: "All" }),
|
|
3308
3308
|
/* @__PURE__ */ s("option", { value: "remote", children: "Remote" }),
|
|
@@ -3312,7 +3312,7 @@ function zr({
|
|
|
3312
3312
|
}
|
|
3313
3313
|
)
|
|
3314
3314
|
] }),
|
|
3315
|
-
/* @__PURE__ */ s(
|
|
3315
|
+
/* @__PURE__ */ s(Ur, { auth: e, value: D, onChange: W }),
|
|
3316
3316
|
le && /* @__PURE__ */ g("label", { className: "jp-jobs__filter", children: [
|
|
3317
3317
|
"State",
|
|
3318
3318
|
/* @__PURE__ */ s(
|
|
@@ -3320,7 +3320,7 @@ function zr({
|
|
|
3320
3320
|
{
|
|
3321
3321
|
value: f,
|
|
3322
3322
|
onChange: (E) => C(E.target.value),
|
|
3323
|
-
children:
|
|
3323
|
+
children: zr.map((E) => /* @__PURE__ */ s("option", { value: E.value, children: E.label }, E.value || "all"))
|
|
3324
3324
|
}
|
|
3325
3325
|
)
|
|
3326
3326
|
] }),
|
|
@@ -3329,7 +3329,7 @@ function zr({
|
|
|
3329
3329
|
"input",
|
|
3330
3330
|
{
|
|
3331
3331
|
type: "checkbox",
|
|
3332
|
-
checked:
|
|
3332
|
+
checked: w,
|
|
3333
3333
|
onChange: (E) => R(E.target.checked)
|
|
3334
3334
|
}
|
|
3335
3335
|
),
|
|
@@ -3342,7 +3342,7 @@ function zr({
|
|
|
3342
3342
|
F ? /* @__PURE__ */ s("p", { className: "jp-muted", children: "Loading jobs…" }) : ge.length === 0 ? /* @__PURE__ */ s("p", { className: "jp-muted", children: G === 0 ? "No jobs match your filters." : "No matches for the current search." }) : /* @__PURE__ */ s("ul", { className: "jp-jobs__list", "data-refreshing": H ? "true" : void 0, children: ge.map((E) => {
|
|
3343
3343
|
const y = r[E.id], j = y ? y.vote : E.vote ?? null, U = y ? y.reasons : E.vote_reasons ?? [];
|
|
3344
3344
|
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
|
|
3345
|
-
|
|
3345
|
+
Gr,
|
|
3346
3346
|
{
|
|
3347
3347
|
job: E,
|
|
3348
3348
|
showScore: !!t,
|
|
@@ -3362,20 +3362,103 @@ function zr({
|
|
|
3362
3362
|
"Page ",
|
|
3363
3363
|
c,
|
|
3364
3364
|
" / ",
|
|
3365
|
-
|
|
3365
|
+
be,
|
|
3366
3366
|
" · ",
|
|
3367
3367
|
G,
|
|
3368
3368
|
" total"
|
|
3369
3369
|
] }),
|
|
3370
|
-
/* @__PURE__ */ s("button", { type: "button", disabled: c >=
|
|
3370
|
+
/* @__PURE__ */ s("button", { type: "button", disabled: c >= be, onClick: () => u((E) => E + 1), children: "Next →" })
|
|
3371
3371
|
] })
|
|
3372
3372
|
] });
|
|
3373
3373
|
}
|
|
3374
|
-
const
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3374
|
+
const Qr = /* @__PURE__ */ new Set([
|
|
3375
|
+
"a",
|
|
3376
|
+
"b",
|
|
3377
|
+
"blockquote",
|
|
3378
|
+
"br",
|
|
3379
|
+
"code",
|
|
3380
|
+
"div",
|
|
3381
|
+
"em",
|
|
3382
|
+
"h1",
|
|
3383
|
+
"h2",
|
|
3384
|
+
"h3",
|
|
3385
|
+
"h4",
|
|
3386
|
+
"h5",
|
|
3387
|
+
"h6",
|
|
3388
|
+
"hr",
|
|
3389
|
+
"i",
|
|
3390
|
+
"li",
|
|
3391
|
+
"ol",
|
|
3392
|
+
"p",
|
|
3393
|
+
"pre",
|
|
3394
|
+
"span",
|
|
3395
|
+
"strong",
|
|
3396
|
+
"sub",
|
|
3397
|
+
"sup",
|
|
3398
|
+
"table",
|
|
3399
|
+
"tbody",
|
|
3400
|
+
"td",
|
|
3401
|
+
"th",
|
|
3402
|
+
"thead",
|
|
3403
|
+
"tr",
|
|
3404
|
+
"u",
|
|
3405
|
+
"ul"
|
|
3406
|
+
]), Xr = /* @__PURE__ */ new Set([
|
|
3407
|
+
"script",
|
|
3408
|
+
"style",
|
|
3409
|
+
"iframe",
|
|
3410
|
+
"object",
|
|
3411
|
+
"embed",
|
|
3412
|
+
"noscript",
|
|
3413
|
+
"template",
|
|
3414
|
+
"svg",
|
|
3415
|
+
"math",
|
|
3416
|
+
"head",
|
|
3417
|
+
"title",
|
|
3418
|
+
"form",
|
|
3419
|
+
"select",
|
|
3420
|
+
"textarea",
|
|
3421
|
+
"button"
|
|
3422
|
+
]);
|
|
3423
|
+
function Zr(e) {
|
|
3424
|
+
if (!e) return null;
|
|
3425
|
+
try {
|
|
3426
|
+
const t = new URL(e, "https://invalid.example/");
|
|
3427
|
+
return t.origin === "https://invalid.example" ? null : t.protocol === "https:" || t.protocol === "http:" ? t.href : null;
|
|
3428
|
+
} catch {
|
|
3429
|
+
return null;
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
function it(e, t, a) {
|
|
3433
|
+
for (const n of Array.from(e.childNodes)) {
|
|
3434
|
+
if (n.nodeType === Node.TEXT_NODE) {
|
|
3435
|
+
t.appendChild(a.createTextNode(n.textContent ?? ""));
|
|
3436
|
+
continue;
|
|
3437
|
+
}
|
|
3438
|
+
if (n.nodeType !== Node.ELEMENT_NODE) continue;
|
|
3439
|
+
const r = n, o = r.tagName.toLowerCase();
|
|
3440
|
+
if (Xr.has(o)) continue;
|
|
3441
|
+
if (!Qr.has(o)) {
|
|
3442
|
+
it(r, t, a);
|
|
3443
|
+
continue;
|
|
3444
|
+
}
|
|
3445
|
+
const i = a.createElement(o);
|
|
3446
|
+
if (o === "a") {
|
|
3447
|
+
const l = Zr(r.getAttribute("href"));
|
|
3448
|
+
l && (i.setAttribute("href", l), i.setAttribute("target", "_blank"), i.setAttribute("rel", "noopener noreferrer nofollow"));
|
|
3449
|
+
}
|
|
3450
|
+
it(r, i, a), t.appendChild(i);
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
function eo(e) {
|
|
3454
|
+
const t = new DOMParser().parseFromString(e, "text/html"), a = document.implementation.createHTMLDocument(""), n = a.createElement("div");
|
|
3455
|
+
return it(t.body, n, a), n.innerHTML;
|
|
3456
|
+
}
|
|
3457
|
+
const to = me(
|
|
3458
|
+
() => import("./ApplicationTracking-NY5b-raR.js").then((e) => ({ default: e.ApplicationTracking }))
|
|
3459
|
+
), ao = me(
|
|
3460
|
+
() => import("./ClipboardPalette-ClkxwPD3.js").then((e) => ({ default: e.ClipboardPalette }))
|
|
3461
|
+
), Tt = {
|
|
3379
3462
|
relevance: "Relevance",
|
|
3380
3463
|
level_match: "Level",
|
|
3381
3464
|
geo_fit: "Geo/Remote",
|
|
@@ -3383,7 +3466,7 @@ const Yr = me(
|
|
|
3383
3466
|
stack_fit: "Stack",
|
|
3384
3467
|
domain_interest: "Interest",
|
|
3385
3468
|
discipline_factor: "Discipline"
|
|
3386
|
-
},
|
|
3469
|
+
}, no = [
|
|
3387
3470
|
[
|
|
3388
3471
|
{ state: "interested", label: "Interested", verb: "Mark interested" },
|
|
3389
3472
|
{ state: "saved", label: "Saved", verb: "Save" },
|
|
@@ -3396,8 +3479,14 @@ const Yr = me(
|
|
|
3396
3479
|
{ state: "rejected", label: "Rejected", verb: "Rejected" }
|
|
3397
3480
|
]
|
|
3398
3481
|
];
|
|
3399
|
-
function
|
|
3400
|
-
return e ? /<(p|br|div|li|ul|ol|h[1-6])\b/i.test(e) ? /* @__PURE__ */ s(
|
|
3482
|
+
function ro({ text: e }) {
|
|
3483
|
+
return e ? /<(p|br|div|li|ul|ol|h[1-6])\b/i.test(e) ? /* @__PURE__ */ s(
|
|
3484
|
+
"div",
|
|
3485
|
+
{
|
|
3486
|
+
className: "jp-drawer__description",
|
|
3487
|
+
dangerouslySetInnerHTML: { __html: eo(e) }
|
|
3488
|
+
}
|
|
3489
|
+
) : /* @__PURE__ */ s("div", { className: "jp-drawer__description jp-drawer__description--plain", children: e }) : /* @__PURE__ */ s("p", { className: "jp-drawer__description jp-muted", children: /* @__PURE__ */ s("em", { children: "No description" }) });
|
|
3401
3490
|
}
|
|
3402
3491
|
function ce({
|
|
3403
3492
|
label: e,
|
|
@@ -3433,7 +3522,7 @@ function ce({
|
|
|
3433
3522
|
)
|
|
3434
3523
|
] });
|
|
3435
3524
|
}
|
|
3436
|
-
function
|
|
3525
|
+
function oo({ tier: e, verified: t }) {
|
|
3437
3526
|
if (t)
|
|
3438
3527
|
return /* @__PURE__ */ s("p", { className: "jp-apply-tier jp-apply-tier--verified", children: "Auto-apply verified — the runner has filled a form on this board before." });
|
|
3439
3528
|
const n = {
|
|
@@ -3444,7 +3533,7 @@ function eo({ tier: e, verified: t }) {
|
|
|
3444
3533
|
}[e];
|
|
3445
3534
|
return n ? /* @__PURE__ */ s("p", { className: `jp-apply-tier jp-apply-tier--${e}`, children: n }) : null;
|
|
3446
3535
|
}
|
|
3447
|
-
function
|
|
3536
|
+
function so({
|
|
3448
3537
|
auth: e,
|
|
3449
3538
|
jobId: t,
|
|
3450
3539
|
profileId: a,
|
|
@@ -3455,16 +3544,16 @@ function to({
|
|
|
3455
3544
|
onTrackingChange: l,
|
|
3456
3545
|
onCompanyBlocked: c
|
|
3457
3546
|
}) {
|
|
3458
|
-
const [u, h] = N(null), [d, v] = N(null), [
|
|
3547
|
+
const [u, h] = N(null), [d, v] = N(null), [b, _] = N(null), [m, f] = N(n ?? null), [C, w] = N([]), [R, $] = N(!1), [x, D] = N(null), [W, B] = N(null), [P, A] = N(null), [M, k] = N(null), [F, H] = N(!1), [T, V] = N(null), [G, oe] = N(null), [ie, ge] = N(!1), [ve, Ce] = N(!1), [be, le] = N(null), [E, y] = N(null), [j, U] = N(!1), [de, Pe] = N(!1), [pe, gt] = N(!1), {
|
|
3459
3548
|
data: L,
|
|
3460
|
-
loading:
|
|
3549
|
+
loading: ua,
|
|
3461
3550
|
error: Ve
|
|
3462
3551
|
} = Ke(
|
|
3463
3552
|
`job:${t}:${a ?? ""}`,
|
|
3464
3553
|
() => wr(t, a ?? void 0)
|
|
3465
|
-
),
|
|
3554
|
+
), vt = u ?? (Ve ? Ve instanceof ne ? Ve.message : "Failed to load job" : null);
|
|
3466
3555
|
z(() => {
|
|
3467
|
-
h(null), v(null), f(n ?? null), D(null), B(null), A(null), k(null), V(null), oe(null), Ce(!1), le(null), y(null), U(!1),
|
|
3556
|
+
h(null), v(null), f(n ?? null), D(null), B(null), A(null), k(null), V(null), oe(null), Ce(!1), le(null), y(null), U(!1), gt(!1);
|
|
3468
3557
|
}, [t, a, n]), z(() => {
|
|
3469
3558
|
L && v(L.state);
|
|
3470
3559
|
}, [L]), z(() => {
|
|
@@ -3473,11 +3562,11 @@ function to({
|
|
|
3473
3562
|
};
|
|
3474
3563
|
return window.addEventListener("keydown", S), () => window.removeEventListener("keydown", S);
|
|
3475
3564
|
}, [r]);
|
|
3476
|
-
const
|
|
3477
|
-
if (!
|
|
3565
|
+
const da = async (S) => {
|
|
3566
|
+
if (!b) {
|
|
3478
3567
|
_(S), h(null);
|
|
3479
3568
|
try {
|
|
3480
|
-
const te = await
|
|
3569
|
+
const te = await _r(t, S, e, S === "applied" ? G ?? void 0 : void 0);
|
|
3481
3570
|
v(te.state), Le(`job:${t}:`), o?.(t, te.state);
|
|
3482
3571
|
} catch (J) {
|
|
3483
3572
|
h(J instanceof ne ? J.message : "Failed to update state");
|
|
@@ -3485,15 +3574,15 @@ function to({
|
|
|
3485
3574
|
_(null);
|
|
3486
3575
|
}
|
|
3487
3576
|
}
|
|
3488
|
-
},
|
|
3577
|
+
}, bt = async () => {
|
|
3489
3578
|
if (R) return null;
|
|
3490
|
-
|
|
3579
|
+
$(!0), B(null), k(null), A(null), V(null), oe(null), y(null), U(!1);
|
|
3491
3580
|
try {
|
|
3492
|
-
const S = await
|
|
3581
|
+
const S = await Ir(t, e, () => {
|
|
3493
3582
|
});
|
|
3494
3583
|
D({ resume: S.resume, coverLetter: S.coverLetter }), V(S.url), oe(S.slug);
|
|
3495
3584
|
try {
|
|
3496
|
-
const J = await
|
|
3585
|
+
const J = await sa(t, { resume_markdown: S.resume }, e);
|
|
3497
3586
|
A(J);
|
|
3498
3587
|
} catch (J) {
|
|
3499
3588
|
k(
|
|
@@ -3504,17 +3593,17 @@ function to({
|
|
|
3504
3593
|
} catch (S) {
|
|
3505
3594
|
return B(S instanceof ne ? S.message : "Failed to generate résumé"), null;
|
|
3506
3595
|
} finally {
|
|
3507
|
-
|
|
3596
|
+
$(!1);
|
|
3508
3597
|
}
|
|
3509
|
-
},
|
|
3510
|
-
|
|
3511
|
-
},
|
|
3512
|
-
if (!(
|
|
3598
|
+
}, pa = () => {
|
|
3599
|
+
bt();
|
|
3600
|
+
}, ha = async () => {
|
|
3601
|
+
if (!(!x || F)) {
|
|
3513
3602
|
H(!0), y(null);
|
|
3514
3603
|
try {
|
|
3515
|
-
const { url: S, slug: J } = await
|
|
3604
|
+
const { url: S, slug: J } = await oa(
|
|
3516
3605
|
t,
|
|
3517
|
-
{ resume_markdown:
|
|
3606
|
+
{ resume_markdown: x.resume, cover_letter_markdown: x.coverLetter },
|
|
3518
3607
|
e
|
|
3519
3608
|
);
|
|
3520
3609
|
V(S), oe(J);
|
|
@@ -3525,47 +3614,47 @@ function to({
|
|
|
3525
3614
|
}
|
|
3526
3615
|
}
|
|
3527
3616
|
};
|
|
3528
|
-
async function
|
|
3617
|
+
async function fa() {
|
|
3529
3618
|
ge(!0), le(null);
|
|
3530
3619
|
try {
|
|
3531
|
-
if (!(G ?? await
|
|
3620
|
+
if (!(G ?? await bt())) {
|
|
3532
3621
|
le(
|
|
3533
3622
|
"The application packet could not be built, so there is nothing to queue — see the error above."
|
|
3534
3623
|
);
|
|
3535
3624
|
return;
|
|
3536
3625
|
}
|
|
3537
|
-
await
|
|
3626
|
+
await ia(t, "review", e), Ce(!0);
|
|
3538
3627
|
} catch (S) {
|
|
3539
3628
|
le(S instanceof ne ? S.message : "Failed to queue the application");
|
|
3540
3629
|
} finally {
|
|
3541
3630
|
ge(!1);
|
|
3542
3631
|
}
|
|
3543
3632
|
}
|
|
3544
|
-
const
|
|
3633
|
+
const ma = async () => {
|
|
3545
3634
|
if (!(!L || de)) {
|
|
3546
3635
|
Pe(!0), h(null);
|
|
3547
3636
|
try {
|
|
3548
|
-
await
|
|
3637
|
+
await Tr(L.company, e), gt(!0), Le("blocked-companies"), c?.(L.company);
|
|
3549
3638
|
} catch (S) {
|
|
3550
3639
|
h(S instanceof ne ? S.message : "Failed to hide the company");
|
|
3551
3640
|
} finally {
|
|
3552
3641
|
Pe(!1);
|
|
3553
3642
|
}
|
|
3554
3643
|
}
|
|
3555
|
-
},
|
|
3644
|
+
}, ya = () => {
|
|
3556
3645
|
T && navigator.clipboard?.writeText(T).then(
|
|
3557
3646
|
() => {
|
|
3558
3647
|
U(!0), setTimeout(() => U(!1), 2e3);
|
|
3559
3648
|
},
|
|
3560
3649
|
() => y("Copy failed — select the link and copy manually")
|
|
3561
3650
|
);
|
|
3562
|
-
},
|
|
3651
|
+
}, we = d !== null;
|
|
3563
3652
|
return /* @__PURE__ */ g(Fe, { children: [
|
|
3564
3653
|
/* @__PURE__ */ s("div", { className: "jp-drawer-backdrop", onClick: r }),
|
|
3565
3654
|
/* @__PURE__ */ g("aside", { className: "jp-drawer", role: "dialog", "aria-labelledby": "jp-drawer-title", children: [
|
|
3566
3655
|
/* @__PURE__ */ s("div", { className: "jp-drawer__header", children: /* @__PURE__ */ s("button", { type: "button", className: "jp-drawer__close", onClick: r, "aria-label": "Close", children: "×" }) }),
|
|
3567
|
-
|
|
3568
|
-
|
|
3656
|
+
ua && /* @__PURE__ */ s("p", { className: "jp-muted", children: "Loading…" }),
|
|
3657
|
+
vt && /* @__PURE__ */ s("p", { className: "jp-error", children: vt }),
|
|
3569
3658
|
L && /* @__PURE__ */ g(Fe, { children: [
|
|
3570
3659
|
/* @__PURE__ */ s("h2", { id: "jp-drawer-title", className: "jp-drawer__title", children: L.title }),
|
|
3571
3660
|
/* @__PURE__ */ g("p", { className: "jp-drawer__company", children: [
|
|
@@ -3602,8 +3691,8 @@ function to({
|
|
|
3602
3691
|
"Total: ",
|
|
3603
3692
|
/* @__PURE__ */ s("strong", { children: L.score.toFixed(2) })
|
|
3604
3693
|
] }),
|
|
3605
|
-
/* @__PURE__ */ s("ul", { className: "jp-drawer__breakdown", children: Object.keys(
|
|
3606
|
-
/* @__PURE__ */ s("span", { className: "jp-drawer__breakdown-label", children:
|
|
3694
|
+
/* @__PURE__ */ s("ul", { className: "jp-drawer__breakdown", children: Object.keys(Tt).map((S) => /* @__PURE__ */ g("li", { children: [
|
|
3695
|
+
/* @__PURE__ */ s("span", { className: "jp-drawer__breakdown-label", children: Tt[S] }),
|
|
3607
3696
|
/* @__PURE__ */ s("div", { className: "jp-drawer__breakdown-bar", children: /* @__PURE__ */ s(
|
|
3608
3697
|
"div",
|
|
3609
3698
|
{
|
|
@@ -3616,44 +3705,44 @@ function to({
|
|
|
3616
3705
|
] }),
|
|
3617
3706
|
/* @__PURE__ */ g("section", { className: "jp-drawer__section", children: [
|
|
3618
3707
|
/* @__PURE__ */ s("h3", { children: "Description" }),
|
|
3619
|
-
/* @__PURE__ */ s(
|
|
3708
|
+
/* @__PURE__ */ s(ro, { text: L.description })
|
|
3620
3709
|
] }),
|
|
3621
3710
|
/* @__PURE__ */ g("section", { className: "jp-drawer__section", children: [
|
|
3622
3711
|
/* @__PURE__ */ s("h3", { children: "Triage" }),
|
|
3623
|
-
!
|
|
3712
|
+
!we && /* @__PURE__ */ s("p", { className: "jp-muted", children: "Sign in to track your interest in this job." }),
|
|
3624
3713
|
/* @__PURE__ */ s("div", { className: "jp-drawer__vote", children: /* @__PURE__ */ s(
|
|
3625
|
-
|
|
3714
|
+
ca,
|
|
3626
3715
|
{
|
|
3627
3716
|
jobId: t,
|
|
3628
3717
|
auth: e,
|
|
3629
3718
|
vote: m,
|
|
3630
3719
|
reasons: C,
|
|
3631
|
-
disabled: !
|
|
3720
|
+
disabled: !we,
|
|
3632
3721
|
align: "start",
|
|
3633
3722
|
onVoteChange: (S, J, te) => {
|
|
3634
|
-
f(J),
|
|
3723
|
+
f(J), w(te), i?.(S, J, te);
|
|
3635
3724
|
}
|
|
3636
3725
|
}
|
|
3637
3726
|
) }),
|
|
3638
|
-
|
|
3639
|
-
const Ge = d === te,
|
|
3727
|
+
no.map((S, J) => /* @__PURE__ */ s("div", { className: "jp-drawer__actions jp-drawer__actions--states", children: S.map(({ state: te, label: ga, verb: va }) => {
|
|
3728
|
+
const Ge = d === te, ba = b === te;
|
|
3640
3729
|
return /* @__PURE__ */ s(
|
|
3641
3730
|
"button",
|
|
3642
3731
|
{
|
|
3643
3732
|
type: "button",
|
|
3644
3733
|
className: `jp-drawer__cta jp-drawer__cta--state-${te}${Ge ? " jp-drawer__cta--active" : ""}`,
|
|
3645
|
-
disabled: !
|
|
3734
|
+
disabled: !we || b !== null,
|
|
3646
3735
|
onClick: () => {
|
|
3647
|
-
|
|
3736
|
+
da(te);
|
|
3648
3737
|
},
|
|
3649
3738
|
"aria-pressed": Ge,
|
|
3650
3739
|
"data-testid": `state-action-${te}`,
|
|
3651
|
-
children:
|
|
3740
|
+
children: ba ? "…" : Ge ? ga : va
|
|
3652
3741
|
},
|
|
3653
3742
|
te
|
|
3654
3743
|
);
|
|
3655
3744
|
}) }, J)),
|
|
3656
|
-
|
|
3745
|
+
we && /* @__PURE__ */ s("p", { className: "jp-drawer__block", children: pe ? /* @__PURE__ */ g("span", { "data-testid": "company-blocked", children: [
|
|
3657
3746
|
L.company,
|
|
3658
3747
|
" is hidden from your feed. Undo it on the Profile tab."
|
|
3659
3748
|
] }) : /* @__PURE__ */ s(
|
|
@@ -3662,7 +3751,7 @@ function to({
|
|
|
3662
3751
|
type: "button",
|
|
3663
3752
|
className: "jp-drawer__link",
|
|
3664
3753
|
onClick: () => {
|
|
3665
|
-
|
|
3754
|
+
ma();
|
|
3666
3755
|
},
|
|
3667
3756
|
disabled: de,
|
|
3668
3757
|
"data-testid": "block-company",
|
|
@@ -3671,7 +3760,7 @@ function to({
|
|
|
3671
3760
|
) })
|
|
3672
3761
|
] }),
|
|
3673
3762
|
d && d !== "new" && /* @__PURE__ */ s(tt, { fallback: /* @__PURE__ */ s("p", { className: "jp-muted", children: "Loading tracking…" }), children: /* @__PURE__ */ s(
|
|
3674
|
-
|
|
3763
|
+
to,
|
|
3675
3764
|
{
|
|
3676
3765
|
auth: e,
|
|
3677
3766
|
jobId: t,
|
|
@@ -3683,8 +3772,8 @@ function to({
|
|
|
3683
3772
|
) }),
|
|
3684
3773
|
/* @__PURE__ */ g("section", { className: "jp-drawer__section", children: [
|
|
3685
3774
|
/* @__PURE__ */ s("h3", { children: "Apply" }),
|
|
3686
|
-
/* @__PURE__ */ s(
|
|
3687
|
-
|
|
3775
|
+
/* @__PURE__ */ s(oo, { tier: L.apply_tier, verified: L.apply_verified }),
|
|
3776
|
+
we && /* @__PURE__ */ s(tt, { fallback: null, children: /* @__PURE__ */ s(ao, { auth: e }) }),
|
|
3688
3777
|
/* @__PURE__ */ g("div", { className: "jp-drawer__actions", children: [
|
|
3689
3778
|
/* @__PURE__ */ g(
|
|
3690
3779
|
"a",
|
|
@@ -3704,10 +3793,10 @@ function to({
|
|
|
3704
3793
|
{
|
|
3705
3794
|
type: "button",
|
|
3706
3795
|
className: "jp-drawer__cta",
|
|
3707
|
-
onClick:
|
|
3708
|
-
disabled: !
|
|
3796
|
+
onClick: pa,
|
|
3797
|
+
disabled: !we || R,
|
|
3709
3798
|
"data-testid": "prepare-application",
|
|
3710
|
-
children: R ? "Preparing…" :
|
|
3799
|
+
children: R ? "Preparing…" : x ? "Regenerate application" : "Prepare application"
|
|
3711
3800
|
}
|
|
3712
3801
|
)
|
|
3713
3802
|
] }),
|
|
@@ -3719,9 +3808,9 @@ function to({
|
|
|
3719
3808
|
type: "button",
|
|
3720
3809
|
className: "jp-drawer__cta jp-drawer__cta--primary",
|
|
3721
3810
|
onClick: () => {
|
|
3722
|
-
|
|
3811
|
+
fa();
|
|
3723
3812
|
},
|
|
3724
|
-
disabled: !
|
|
3813
|
+
disabled: !we || ie || ve || R,
|
|
3725
3814
|
"data-testid": "queue-application",
|
|
3726
3815
|
title: G ? "Queue this application for the form runner" : "Builds the application packet, then queues it for the form runner",
|
|
3727
3816
|
children: ve ? "Queued ✓" : ie ? G ? "Queueing…" : "Preparing, then queueing…" : "Hand to runner"
|
|
@@ -3729,10 +3818,10 @@ function to({
|
|
|
3729
3818
|
),
|
|
3730
3819
|
/* @__PURE__ */ s("span", { className: "jp-muted", children: ve ? "Fills, then waits for your approval." : "Review mode — nothing is sent without your approval." })
|
|
3731
3820
|
] }),
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
/* @__PURE__ */ s(ce, { label: "Tailored résumé", value:
|
|
3735
|
-
|
|
3821
|
+
be && /* @__PURE__ */ s("p", { className: "jp-error", children: be }),
|
|
3822
|
+
x && /* @__PURE__ */ g("div", { className: "jp-drawer__packet", children: [
|
|
3823
|
+
/* @__PURE__ */ s(ce, { label: "Tailored résumé", value: x.resume, rows: 12 }),
|
|
3824
|
+
x.coverLetter && /* @__PURE__ */ s(ce, { label: "Cover letter", value: x.coverLetter, rows: 12 }),
|
|
3736
3825
|
/* @__PURE__ */ s("div", { className: "jp-drawer__packet-link", children: T ? /* @__PURE__ */ g(Fe, { children: [
|
|
3737
3826
|
/* @__PURE__ */ s(
|
|
3738
3827
|
"input",
|
|
@@ -3744,7 +3833,7 @@ function to({
|
|
|
3744
3833
|
"aria-label": "Shareable packet link"
|
|
3745
3834
|
}
|
|
3746
3835
|
),
|
|
3747
|
-
/* @__PURE__ */ s("button", { type: "button", className: "jp-drawer__cta", onClick:
|
|
3836
|
+
/* @__PURE__ */ s("button", { type: "button", className: "jp-drawer__cta", onClick: ya, children: j ? "Copied ✓" : "Copy" }),
|
|
3748
3837
|
/* @__PURE__ */ s(
|
|
3749
3838
|
"a",
|
|
3750
3839
|
{
|
|
@@ -3761,9 +3850,9 @@ function to({
|
|
|
3761
3850
|
type: "button",
|
|
3762
3851
|
className: "jp-drawer__cta jp-drawer__cta--primary",
|
|
3763
3852
|
onClick: () => {
|
|
3764
|
-
|
|
3853
|
+
ha();
|
|
3765
3854
|
},
|
|
3766
|
-
disabled: F ||
|
|
3855
|
+
disabled: F || !x.coverLetter,
|
|
3767
3856
|
children: F ? "Creating link…" : "Create shareable link"
|
|
3768
3857
|
}
|
|
3769
3858
|
) }),
|
|
@@ -3816,74 +3905,74 @@ function to({
|
|
|
3816
3905
|
] })
|
|
3817
3906
|
] });
|
|
3818
3907
|
}
|
|
3819
|
-
const
|
|
3820
|
-
() => import("./ApplicationsList-
|
|
3821
|
-
),
|
|
3822
|
-
() => import("./PacketsList-
|
|
3823
|
-
),
|
|
3824
|
-
() => import("./PacketDetail-
|
|
3825
|
-
),
|
|
3826
|
-
() => import("./PipelineBoard-
|
|
3827
|
-
),
|
|
3828
|
-
() => import("./InsightsPage-
|
|
3829
|
-
),
|
|
3830
|
-
() => import("./ProfilePage-
|
|
3831
|
-
),
|
|
3832
|
-
function
|
|
3908
|
+
const io = me(
|
|
3909
|
+
() => import("./ApplicationsList-S1jUvNA5.js").then((e) => ({ default: e.ApplicationsList }))
|
|
3910
|
+
), lo = me(
|
|
3911
|
+
() => import("./PacketsList-DTHGYYiB.js").then((e) => ({ default: e.PacketsList }))
|
|
3912
|
+
), co = me(
|
|
3913
|
+
() => import("./PacketDetail-DpWzH6ON.js").then((e) => ({ default: e.PacketDetail }))
|
|
3914
|
+
), uo = me(
|
|
3915
|
+
() => import("./PipelineBoard-DYchvnIr.js").then((e) => ({ default: e.PipelineBoard }))
|
|
3916
|
+
), po = me(
|
|
3917
|
+
() => import("./InsightsPage-CqP3hiJc.js").then((e) => ({ default: e.InsightsPage }))
|
|
3918
|
+
), ho = me(
|
|
3919
|
+
() => import("./ProfilePage-DTU51lJg.js").then((e) => ({ default: e.ProfilePage }))
|
|
3920
|
+
), fo = /* @__PURE__ */ s("p", { className: "jp-muted", children: "Loading…" });
|
|
3921
|
+
function mo(e = {}) {
|
|
3833
3922
|
const t = Te(null);
|
|
3834
|
-
return /* @__PURE__ */ s(
|
|
3923
|
+
return /* @__PURE__ */ s(Na, { theme: e.theme, containerRef: t, children: /* @__PURE__ */ s(yo, { ...e, containerRef: t }) });
|
|
3835
3924
|
}
|
|
3836
|
-
function
|
|
3837
|
-
const { containerRef: t } = e, a = !!e.userType && e.userType !== "public", n = fe(() => ({ signedIn: a }), [a]), [r] = N(() => window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)").matches : !1), { theme: o, isDarkTheme: i, isThemeReady: l, isInitialThemeLoad: c } =
|
|
3838
|
-
return c && !l ? /* @__PURE__ */ s(
|
|
3925
|
+
function yo(e) {
|
|
3926
|
+
const { containerRef: t } = e, a = !!e.userType && e.userType !== "public", n = fe(() => ({ signedIn: a }), [a]), [r] = N(() => window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)").matches : !1), { theme: o, isDarkTheme: i, isThemeReady: l, isInitialThemeLoad: c } = ja();
|
|
3927
|
+
return c && !l ? /* @__PURE__ */ s(ka, { isDarkTheme: r }) : /* @__PURE__ */ s(
|
|
3839
3928
|
"main",
|
|
3840
3929
|
{
|
|
3841
3930
|
ref: t,
|
|
3842
3931
|
className: "job-platform-container",
|
|
3843
3932
|
"data-theme": o,
|
|
3844
3933
|
"data-dark-theme": i ? "true" : "false",
|
|
3845
|
-
children: /* @__PURE__ */ s(
|
|
3846
|
-
/* @__PURE__ */ s(
|
|
3847
|
-
/* @__PURE__ */ s(
|
|
3848
|
-
/* @__PURE__ */ s(tt, { fallback:
|
|
3849
|
-
/* @__PURE__ */ g(Y, { element: /* @__PURE__ */ s(
|
|
3934
|
+
children: /* @__PURE__ */ s(Yn, { children: /* @__PURE__ */ g("div", { className: "job-platform", children: [
|
|
3935
|
+
/* @__PURE__ */ s(Ra, { title: e.appName ?? "Job Platform" }),
|
|
3936
|
+
/* @__PURE__ */ s(go, {}),
|
|
3937
|
+
/* @__PURE__ */ s(tt, { fallback: fo, children: /* @__PURE__ */ g(jn, { children: [
|
|
3938
|
+
/* @__PURE__ */ g(Y, { element: /* @__PURE__ */ s(Ro, { auth: n }), children: [
|
|
3850
3939
|
/* @__PURE__ */ s(Y, { index: !0, element: null }),
|
|
3851
|
-
/* @__PURE__ */ s(Y, { path: "jobs/:jobId", element: /* @__PURE__ */ s(
|
|
3940
|
+
/* @__PURE__ */ s(Y, { path: "jobs/:jobId", element: /* @__PURE__ */ s(At, { auth: n, base: "/" }) })
|
|
3852
3941
|
] }),
|
|
3853
|
-
/* @__PURE__ */ g(Y, { path: "pipeline", element: /* @__PURE__ */ s(
|
|
3942
|
+
/* @__PURE__ */ g(Y, { path: "pipeline", element: /* @__PURE__ */ s(vo, { auth: n }), children: [
|
|
3854
3943
|
/* @__PURE__ */ s(Y, { index: !0, element: null }),
|
|
3855
3944
|
/* @__PURE__ */ s(
|
|
3856
3945
|
Y,
|
|
3857
3946
|
{
|
|
3858
3947
|
path: "jobs/:jobId",
|
|
3859
|
-
element: /* @__PURE__ */ s(
|
|
3948
|
+
element: /* @__PURE__ */ s(At, { auth: n, base: "/pipeline" })
|
|
3860
3949
|
}
|
|
3861
3950
|
)
|
|
3862
3951
|
] }),
|
|
3863
|
-
/* @__PURE__ */ s(Y, { path: "applications", element: /* @__PURE__ */ s(
|
|
3864
|
-
/* @__PURE__ */ s(Y, { path: "packets", element: /* @__PURE__ */ s(
|
|
3952
|
+
/* @__PURE__ */ s(Y, { path: "applications", element: /* @__PURE__ */ s(bo, { auth: n }) }),
|
|
3953
|
+
/* @__PURE__ */ s(Y, { path: "packets", element: /* @__PURE__ */ s(wo, { auth: n }) }),
|
|
3865
3954
|
/* @__PURE__ */ s(
|
|
3866
3955
|
Y,
|
|
3867
3956
|
{
|
|
3868
3957
|
path: "insights",
|
|
3869
|
-
element: /* @__PURE__ */ s("section", { className: "jp-main", children: /* @__PURE__ */ s(
|
|
3958
|
+
element: /* @__PURE__ */ s("section", { className: "jp-main", children: /* @__PURE__ */ s(po, { auth: n }) })
|
|
3870
3959
|
}
|
|
3871
3960
|
),
|
|
3872
3961
|
/* @__PURE__ */ s(
|
|
3873
3962
|
Y,
|
|
3874
3963
|
{
|
|
3875
3964
|
path: "profile",
|
|
3876
|
-
element: /* @__PURE__ */ s("section", { className: "jp-main", children: /* @__PURE__ */ s(
|
|
3965
|
+
element: /* @__PURE__ */ s("section", { className: "jp-main", children: /* @__PURE__ */ s(ho, { auth: n }) })
|
|
3877
3966
|
}
|
|
3878
3967
|
),
|
|
3879
|
-
/* @__PURE__ */ s(Y, { path: "packets/:jobId/:slug", element: /* @__PURE__ */ s(
|
|
3880
|
-
/* @__PURE__ */ s(Y, { path: "*", element: /* @__PURE__ */ s(
|
|
3968
|
+
/* @__PURE__ */ s(Y, { path: "packets/:jobId/:slug", element: /* @__PURE__ */ s(_o, { auth: n }) }),
|
|
3969
|
+
/* @__PURE__ */ s(Y, { path: "*", element: /* @__PURE__ */ s(Zt, { to: "/", replace: !0 }) })
|
|
3881
3970
|
] }) })
|
|
3882
3971
|
] }) })
|
|
3883
3972
|
}
|
|
3884
3973
|
);
|
|
3885
3974
|
}
|
|
3886
|
-
function
|
|
3975
|
+
function go() {
|
|
3887
3976
|
const { pathname: e } = ee(), t = e.startsWith("/packets") ? "packets" : e.startsWith("/applications") ? "applications" : e.startsWith("/pipeline") ? "pipeline" : e.startsWith("/insights") ? "insights" : e.startsWith("/profile") ? "profile" : "feed";
|
|
3888
3977
|
return /* @__PURE__ */ g("nav", { className: "job-platform__nav", children: [
|
|
3889
3978
|
/* @__PURE__ */ s(he, { to: "/", className: t === "feed" ? "active" : void 0, children: "Feed" }),
|
|
@@ -3894,14 +3983,14 @@ function po() {
|
|
|
3894
3983
|
/* @__PURE__ */ s(he, { to: "/profile", className: t === "profile" ? "active" : void 0, children: "Profile" })
|
|
3895
3984
|
] });
|
|
3896
3985
|
}
|
|
3897
|
-
function
|
|
3986
|
+
function vo({ auth: e }) {
|
|
3898
3987
|
const t = ye(), [a, n] = N(0), r = se(() => n((i) => i + 1), []), o = fe(
|
|
3899
3988
|
() => ({ onJobStateChanged: r, onTrackingChanged: r }),
|
|
3900
3989
|
[r]
|
|
3901
3990
|
);
|
|
3902
3991
|
return /* @__PURE__ */ g("section", { className: "jp-main", children: [
|
|
3903
3992
|
/* @__PURE__ */ s(
|
|
3904
|
-
|
|
3993
|
+
uo,
|
|
3905
3994
|
{
|
|
3906
3995
|
auth: e,
|
|
3907
3996
|
reloadKey: a,
|
|
@@ -3910,16 +3999,16 @@ function ho({ auth: e }) {
|
|
|
3910
3999
|
}
|
|
3911
4000
|
}
|
|
3912
4001
|
),
|
|
3913
|
-
/* @__PURE__ */ s(
|
|
4002
|
+
/* @__PURE__ */ s(ea, { context: o })
|
|
3914
4003
|
] });
|
|
3915
4004
|
}
|
|
3916
|
-
function
|
|
3917
|
-
return /* @__PURE__ */ s("section", { className: "jp-main", children: /* @__PURE__ */ s(
|
|
4005
|
+
function bo({ auth: e }) {
|
|
4006
|
+
return /* @__PURE__ */ s("section", { className: "jp-main", children: /* @__PURE__ */ s(io, { auth: e }) });
|
|
3918
4007
|
}
|
|
3919
|
-
function
|
|
4008
|
+
function wo({ auth: e }) {
|
|
3920
4009
|
const t = ye();
|
|
3921
4010
|
return /* @__PURE__ */ s("section", { className: "jp-main", children: /* @__PURE__ */ s(
|
|
3922
|
-
|
|
4011
|
+
lo,
|
|
3923
4012
|
{
|
|
3924
4013
|
auth: e,
|
|
3925
4014
|
onSelect: (a) => {
|
|
@@ -3930,25 +4019,25 @@ function mo({ auth: e }) {
|
|
|
3930
4019
|
}
|
|
3931
4020
|
) });
|
|
3932
4021
|
}
|
|
3933
|
-
function
|
|
3934
|
-
const { jobId: t, slug: a } =
|
|
3935
|
-
return !t || !a ? /* @__PURE__ */ s(
|
|
4022
|
+
function _o({ auth: e }) {
|
|
4023
|
+
const { jobId: t, slug: a } = zt(), n = ye();
|
|
4024
|
+
return !t || !a ? /* @__PURE__ */ s(Zt, { to: "/packets", replace: !0 }) : /* @__PURE__ */ s(co, { auth: e, jobId: t, slug: a, onClose: () => {
|
|
3936
4025
|
n("/packets");
|
|
3937
4026
|
} });
|
|
3938
4027
|
}
|
|
3939
|
-
const
|
|
3940
|
-
function
|
|
4028
|
+
const lt = "jobplatform:last-profile";
|
|
4029
|
+
function ko() {
|
|
3941
4030
|
try {
|
|
3942
|
-
return window.localStorage.getItem(
|
|
4031
|
+
return window.localStorage.getItem(lt);
|
|
3943
4032
|
} catch {
|
|
3944
4033
|
return null;
|
|
3945
4034
|
}
|
|
3946
4035
|
}
|
|
3947
|
-
function
|
|
3948
|
-
const [t, a] =
|
|
4036
|
+
function Ro({ auth: e }) {
|
|
4037
|
+
const [t, a] = ra(), n = ye(), r = se(
|
|
3949
4038
|
(P) => {
|
|
3950
4039
|
try {
|
|
3951
|
-
P ? window.localStorage.setItem(
|
|
4040
|
+
P ? window.localStorage.setItem(lt, P) : window.localStorage.removeItem(lt);
|
|
3952
4041
|
} catch {
|
|
3953
4042
|
}
|
|
3954
4043
|
a(
|
|
@@ -3960,39 +4049,39 @@ function vo({ auth: e }) {
|
|
|
3960
4049
|
);
|
|
3961
4050
|
},
|
|
3962
4051
|
[a]
|
|
3963
|
-
), [o] = N(() => t.get("profile") ? null :
|
|
4052
|
+
), [o] = N(() => t.get("profile") ? null : ko());
|
|
3964
4053
|
z(() => {
|
|
3965
4054
|
o && !t.get("profile") && r(o);
|
|
3966
4055
|
}, [o, t, r]);
|
|
3967
|
-
const i = t.get("profile") ?? o, [l, c] = N(!1), u = se((P) => c(P === 0), []), h = e.signedIn && !i && !l, [d, v] = N(0),
|
|
4056
|
+
const i = t.get("profile") ?? o, [l, c] = N(!1), u = se((P) => c(P === 0), []), h = e.signedIn && !i && !l, [d, v] = N(0), b = se(() => {
|
|
3968
4057
|
Le("jobs:"), v((P) => P + 1);
|
|
3969
4058
|
}, []), [_, m] = N({}), f = se(
|
|
3970
4059
|
(P, A) => m((M) => ({ ...M, [P]: A })),
|
|
3971
4060
|
[]
|
|
3972
|
-
), [C,
|
|
4061
|
+
), [C, w] = N({}), R = se(
|
|
3973
4062
|
(P, A, M) => {
|
|
3974
|
-
|
|
4063
|
+
w((k) => ({ ...k, [P]: { vote: A, reasons: M } }));
|
|
3975
4064
|
},
|
|
3976
4065
|
[]
|
|
3977
|
-
), [x
|
|
3978
|
-
() => ({ onJobStateChanged: f, onJobVoted: R, onCompanyBlocked:
|
|
3979
|
-
[f, R,
|
|
4066
|
+
), [$, x] = N(null), [D, W] = N(0), B = fe(
|
|
4067
|
+
() => ({ onJobStateChanged: f, onJobVoted: R, onCompanyBlocked: b }),
|
|
4068
|
+
[f, R, b]
|
|
3980
4069
|
);
|
|
3981
4070
|
return /* @__PURE__ */ g("div", { className: "jp-dashboard", children: [
|
|
3982
4071
|
/* @__PURE__ */ s(
|
|
3983
|
-
|
|
4072
|
+
vr,
|
|
3984
4073
|
{
|
|
3985
4074
|
auth: e,
|
|
3986
4075
|
selectedId: i,
|
|
3987
4076
|
onSelect: r,
|
|
3988
|
-
onNew: () =>
|
|
3989
|
-
onEdit: (P) =>
|
|
4077
|
+
onNew: () => x({ mode: "new" }),
|
|
4078
|
+
onEdit: (P) => x({ mode: "edit", profile: P }),
|
|
3990
4079
|
reloadKey: D,
|
|
3991
4080
|
onResolved: u
|
|
3992
4081
|
}
|
|
3993
4082
|
),
|
|
3994
4083
|
/* @__PURE__ */ s("section", { className: "jp-main", children: /* @__PURE__ */ s(
|
|
3995
|
-
|
|
4084
|
+
Yr,
|
|
3996
4085
|
{
|
|
3997
4086
|
auth: e,
|
|
3998
4087
|
profileId: i,
|
|
@@ -4007,27 +4096,27 @@ function vo({ auth: e }) {
|
|
|
4007
4096
|
}
|
|
4008
4097
|
}
|
|
4009
4098
|
) }),
|
|
4010
|
-
/* @__PURE__ */ s(
|
|
4011
|
-
|
|
4099
|
+
/* @__PURE__ */ s(ea, { context: B }),
|
|
4100
|
+
$ && /* @__PURE__ */ s(
|
|
4012
4101
|
$r,
|
|
4013
4102
|
{
|
|
4014
4103
|
auth: e,
|
|
4015
|
-
initial:
|
|
4016
|
-
onClose: () =>
|
|
4104
|
+
initial: $.mode === "edit" ? $.profile : null,
|
|
4105
|
+
onClose: () => x(null),
|
|
4017
4106
|
onSaved: (P) => {
|
|
4018
|
-
W((A) => A + 1), r(P.id),
|
|
4107
|
+
W((A) => A + 1), r(P.id), b();
|
|
4019
4108
|
},
|
|
4020
|
-
onCompaniesChanged:
|
|
4109
|
+
onCompaniesChanged: b
|
|
4021
4110
|
}
|
|
4022
4111
|
)
|
|
4023
4112
|
] });
|
|
4024
4113
|
}
|
|
4025
|
-
function
|
|
4026
|
-
const { jobId: a } =
|
|
4114
|
+
function At({ auth: e, base: t }) {
|
|
4115
|
+
const { jobId: a } = zt(), [n] = ra(), r = n.get("profile"), o = ye(), i = ee(), l = cn();
|
|
4027
4116
|
if (!a) return null;
|
|
4028
4117
|
const c = i.state?.vote ?? null;
|
|
4029
4118
|
return /* @__PURE__ */ s(
|
|
4030
|
-
|
|
4119
|
+
so,
|
|
4031
4120
|
{
|
|
4032
4121
|
auth: e,
|
|
4033
4122
|
jobId: a,
|
|
@@ -4044,36 +4133,36 @@ function Tt({ auth: e, base: t }) {
|
|
|
4044
4133
|
}
|
|
4045
4134
|
);
|
|
4046
4135
|
}
|
|
4047
|
-
function
|
|
4136
|
+
function Wo(e, t = {}) {
|
|
4048
4137
|
const a = wa(e);
|
|
4049
|
-
a.render(/* @__PURE__ */ s(
|
|
4138
|
+
a.render(/* @__PURE__ */ s(mo, { ...t })), e.__root = a, Ot.info("[job-platform] Mounted successfully", { theme: t.theme });
|
|
4050
4139
|
}
|
|
4051
|
-
function
|
|
4052
|
-
e.__root?.unmount(),
|
|
4140
|
+
function Jo(e) {
|
|
4141
|
+
e.__root?.unmount(), Ot.info("[job-platform] Unmounted successfully");
|
|
4053
4142
|
}
|
|
4054
4143
|
export {
|
|
4055
|
-
|
|
4144
|
+
ro as D,
|
|
4056
4145
|
ne as J,
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4146
|
+
Ao as a,
|
|
4147
|
+
Fo as b,
|
|
4148
|
+
$o as c,
|
|
4149
|
+
Lo as d,
|
|
4150
|
+
xo as e,
|
|
4151
|
+
Do as f,
|
|
4063
4152
|
wr as g,
|
|
4064
|
-
|
|
4153
|
+
_r as h,
|
|
4065
4154
|
Le as i,
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4155
|
+
Ho as j,
|
|
4156
|
+
Uo as k,
|
|
4157
|
+
To as l,
|
|
4158
|
+
Mo as m,
|
|
4159
|
+
Io as n,
|
|
4160
|
+
Tr as o,
|
|
4161
|
+
Bo as p,
|
|
4073
4162
|
je as q,
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4163
|
+
la as r,
|
|
4164
|
+
Oo as s,
|
|
4165
|
+
Wo as t,
|
|
4077
4166
|
Ke as u,
|
|
4078
|
-
|
|
4167
|
+
Jo as v
|
|
4079
4168
|
};
|