@inploi/plugin-job-search 1.1.0 → 1.2.0

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.
@@ -1,3870 +0,0 @@
1
- var bo = Object.defineProperty;
2
- var Eo = (e, t, n) => t in e ? bo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var pt = (e, t, n) => (Eo(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- var Qe = (e) => {
5
- throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`);
6
- };
7
- function wo(e, t) {
8
- if (!e)
9
- throw new Error(t);
10
- }
11
- function So(e, t) {
12
- return e in t;
13
- }
14
- var fn = {
15
- ANNUALLY: "per year",
16
- DAILY: "per day",
17
- HOURLY: "per hour",
18
- MONTHLY: "per month",
19
- WEEKLY: "per week"
20
- }, Co = (e) => {
21
- const { salary: t, config: n, t: r = (s) => s } = e, o = new Intl.NumberFormat(n.locales, {
22
- style: "currency",
23
- currency: t.pay_currency,
24
- // @ts-expect-error - CI/CD is not happy with this, though locally it works
25
- trailingZeroDisplay: "stripIfInteger"
26
- });
27
- if (t.pay_display === !1)
28
- return;
29
- if (t.pay_mask)
30
- return r("competitive");
31
- if (t.pay_max && Number.isNaN(+t.pay_max) || t.pay_min && Number.isNaN(+t.pay_min) || t.pay && Number.isNaN(+t.pay))
32
- return r("invalid_salary");
33
- const a = t.pay_type && t.pay_type in fn ? fn[t.pay_type] : void 0;
34
- return t.pay ? [o.format(+t.pay), a].filter(Boolean).join(" ") : t.pay_max && t.pay_min ? [o.formatRange(+t.pay_min, +t.pay_max), a].filter(Boolean).join(" ") || "" : t.pay_max ? `${r("up_to")} ${[o.format(+t.pay_max), a].filter(Boolean).join(" ")}` : t.pay_min ? `${r("from")} ${[o.format(+t.pay_min), a].filter(Boolean).join(" ")}` : r("invalid_salary");
35
- }, xo = new Intl.RelativeTimeFormat(void 0, { numeric: "auto" }), To = ({
36
- from: e = /* @__PURE__ */ new Date(),
37
- to: t,
38
- formatter: n = xo,
39
- t: r = (o) => o
40
- }) => {
41
- const a = (t instanceof Date ? t : new Date(t)).getTime() - e.getTime(), s = {
42
- days: Math.round(a / 1e3 / 60 / 60 / 24),
43
- months: Math.round(a / 1e3 / 60 / 60 / 24 / 30)
44
- };
45
- return s.days === 0 ? r("today") : Math.abs(s.days) < 30 ? n.format(s.days, "days") : Math.abs(s.days) < 3 ? n.format(s.months, "months") : s.months < 0 ? r("over_30_days_ago") : r("in_over_30_days");
46
- }, ze, w, tr, Ee, _n, nr, Ot, rr, Ne = {}, or = [], ko = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, at = Array.isArray;
47
- function ie(e, t) {
48
- for (var n in t)
49
- e[n] = t[n];
50
- return e;
51
- }
52
- function ar(e) {
53
- var t = e.parentNode;
54
- t && t.removeChild(e);
55
- }
56
- function X(e, t, n) {
57
- var r, o, a, s = {};
58
- for (a in t)
59
- a == "key" ? r = t[a] : a == "ref" ? o = t[a] : s[a] = t[a];
60
- if (arguments.length > 2 && (s.children = arguments.length > 3 ? ze.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null)
61
- for (a in e.defaultProps)
62
- s[a] === void 0 && (s[a] = e.defaultProps[a]);
63
- return Pe(e, s, r, o, null);
64
- }
65
- function Pe(e, t, n, r, o) {
66
- var a = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: o ?? ++tr };
67
- return o == null && w.vnode != null && w.vnode(a), a;
68
- }
69
- function ir() {
70
- return { current: null };
71
- }
72
- function I(e) {
73
- return e.children;
74
- }
75
- function G(e, t) {
76
- this.props = e, this.context = t;
77
- }
78
- function tt(e, t) {
79
- if (t == null)
80
- return e.__ ? tt(e.__, e.__.__k.indexOf(e) + 1) : null;
81
- for (var n; t < e.__k.length; t++)
82
- if ((n = e.__k[t]) != null && n.__e != null)
83
- return n.__e;
84
- return typeof e.type == "function" ? tt(e) : null;
85
- }
86
- function sr(e) {
87
- var t, n;
88
- if ((e = e.__) != null && e.__c != null) {
89
- for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++)
90
- if ((n = e.__k[t]) != null && n.__e != null) {
91
- e.__e = e.__c.base = n.__e;
92
- break;
93
- }
94
- return sr(e);
95
- }
96
- }
97
- function Rt(e) {
98
- (!e.__d && (e.__d = !0) && Ee.push(e) && !nt.__r++ || _n !== w.debounceRendering) && ((_n = w.debounceRendering) || nr)(nt);
99
- }
100
- function nt() {
101
- var e, t, n, r, o, a, s, l, c;
102
- for (Ee.sort(Ot); e = Ee.shift(); )
103
- e.__d && (t = Ee.length, r = void 0, o = void 0, a = void 0, l = (s = (n = e).__v).__e, (c = n.__P) && (r = [], o = [], (a = ie({}, s)).__v = s.__v + 1, Ht(c, s, a, n.__n, c.ownerSVGElement !== void 0, s.__h != null ? [l] : null, r, l ?? tt(s), s.__h, o), dr(r, s, o), s.__e != l && sr(s)), Ee.length > t && Ee.sort(Ot));
104
- nt.__r = 0;
105
- }
106
- function lr(e, t, n, r, o, a, s, l, c, d, f) {
107
- var i, p, y, _, h, C, g, E, S, v, b = 0, m = r && r.__k || or, k = m.length, x = k, T = t.length;
108
- for (n.__k = [], i = 0; i < T; i++)
109
- (_ = n.__k[i] = (_ = t[i]) == null || typeof _ == "boolean" || typeof _ == "function" ? null : typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" ? Pe(null, _, null, null, _) : at(_) ? Pe(I, { children: _ }, null, null, null) : _.__b > 0 ? Pe(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _) != null && (_.__ = n, _.__b = n.__b + 1, (E = Oo(_, m, g = i + b, x)) === -1 ? y = Ne : (y = m[E] || Ne, m[E] = void 0, x--), Ht(e, _, y, o, a, s, l, c, d, f), h = _.__e, (p = _.ref) && y.ref != p && (y.ref && Ft(y.ref, null, _), f.push(p, _.__c || h, _)), h != null && (C == null && (C = h), v = !(S = y === Ne || y.__v === null) && E === g, S ? E == -1 && b-- : E !== g && (E === g + 1 ? (b++, v = !0) : E > g ? x > T - g ? (b += E - g, v = !0) : b-- : b = E < g && E == g - 1 ? E - g : 0), g = i + b, v = v || E == i && !S, typeof _.type != "function" || E === g && y.__k !== _.__k ? typeof _.type == "function" || v ? _.__d !== void 0 ? (c = _.__d, _.__d = void 0) : c = h.nextSibling : c = ur(e, h, c) : c = cr(_, c, e), typeof n.type == "function" && (n.__d = c)));
110
- for (n.__e = C, i = k; i--; )
111
- m[i] != null && (typeof n.type == "function" && m[i].__e != null && m[i].__e == n.__d && (n.__d = m[i].__e.nextSibling), fr(m[i], m[i]));
112
- }
113
- function cr(e, t, n) {
114
- for (var r, o = e.__k, a = 0; o && a < o.length; a++)
115
- (r = o[a]) && (r.__ = e, t = typeof r.type == "function" ? cr(r, t, n) : ur(n, r.__e, t));
116
- return t;
117
- }
118
- function le(e, t) {
119
- return t = t || [], e == null || typeof e == "boolean" || (at(e) ? e.some(function(n) {
120
- le(n, t);
121
- }) : t.push(e)), t;
122
- }
123
- function ur(e, t, n) {
124
- return n == null || n.parentNode !== e ? e.insertBefore(t, null) : t == n && t.parentNode != null || e.insertBefore(t, n), t.nextSibling;
125
- }
126
- function Oo(e, t, n, r) {
127
- var o = e.key, a = e.type, s = n - 1, l = n + 1, c = t[n];
128
- if (c === null || c && o == c.key && a === c.type)
129
- return n;
130
- if (r > (c != null ? 1 : 0))
131
- for (; s >= 0 || l < t.length; ) {
132
- if (s >= 0) {
133
- if ((c = t[s]) && o == c.key && a === c.type)
134
- return s;
135
- s--;
136
- }
137
- if (l < t.length) {
138
- if ((c = t[l]) && o == c.key && a === c.type)
139
- return l;
140
- l++;
141
- }
142
- }
143
- return -1;
144
- }
145
- function Ro(e, t, n, r, o) {
146
- var a;
147
- for (a in n)
148
- a === "children" || a === "key" || a in t || rt(e, a, null, n[a], r);
149
- for (a in t)
150
- o && typeof t[a] != "function" || a === "children" || a === "key" || a === "value" || a === "checked" || n[a] === t[a] || rt(e, a, t[a], n[a], r);
151
- }
152
- function pn(e, t, n) {
153
- t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || ko.test(t) ? n : n + "px";
154
- }
155
- function rt(e, t, n, r, o) {
156
- var a;
157
- e:
158
- if (t === "style")
159
- if (typeof n == "string")
160
- e.style.cssText = n;
161
- else {
162
- if (typeof r == "string" && (e.style.cssText = r = ""), r)
163
- for (t in r)
164
- n && t in n || pn(e.style, t, "");
165
- if (n)
166
- for (t in n)
167
- r && n[t] === r[t] || pn(e.style, t, n[t]);
168
- }
169
- else if (t[0] === "o" && t[1] === "n")
170
- a = t !== (t = t.replace(/Capture$/, "")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + a] = n, n ? r || e.addEventListener(t, a ? yn : hn, a) : e.removeEventListener(t, a ? yn : hn, a);
171
- else if (t !== "dangerouslySetInnerHTML") {
172
- if (o)
173
- t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
174
- else if (t !== "width" && t !== "height" && t !== "href" && t !== "list" && t !== "form" && t !== "tabIndex" && t !== "download" && t !== "rowSpan" && t !== "colSpan" && t in e)
175
- try {
176
- e[t] = n ?? "";
177
- break e;
178
- } catch {
179
- }
180
- typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
181
- }
182
- }
183
- function hn(e) {
184
- return this.l[e.type + !1](w.event ? w.event(e) : e);
185
- }
186
- function yn(e) {
187
- return this.l[e.type + !0](w.event ? w.event(e) : e);
188
- }
189
- function Ht(e, t, n, r, o, a, s, l, c, d) {
190
- var f, i, p, y, _, h, C, g, E, S, v, b, m, k, x, T = t.type;
191
- if (t.constructor !== void 0)
192
- return null;
193
- n.__h != null && (c = n.__h, l = t.__e = n.__e, t.__h = null, a = [l]), (f = w.__b) && f(t);
194
- try {
195
- e:
196
- if (typeof T == "function") {
197
- if (g = t.props, E = (f = T.contextType) && r[f.__c], S = f ? E ? E.props.value : f.__ : r, n.__c ? C = (i = t.__c = n.__c).__ = i.__E : ("prototype" in T && T.prototype.render ? t.__c = i = new T(g, S) : (t.__c = i = new G(g, S), i.constructor = T, i.render = No), E && E.sub(i), i.props = g, i.state || (i.state = {}), i.context = S, i.__n = r, p = i.__d = !0, i.__h = [], i._sb = []), i.__s == null && (i.__s = i.state), T.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = ie({}, i.__s)), ie(i.__s, T.getDerivedStateFromProps(g, i.__s))), y = i.props, _ = i.state, i.__v = t, p)
198
- T.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), i.componentDidMount != null && i.__h.push(i.componentDidMount);
199
- else {
200
- if (T.getDerivedStateFromProps == null && g !== y && i.componentWillReceiveProps != null && i.componentWillReceiveProps(g, S), !i.__e && (i.shouldComponentUpdate != null && i.shouldComponentUpdate(g, i.__s, S) === !1 || t.__v === n.__v)) {
201
- for (t.__v !== n.__v && (i.props = g, i.state = i.__s, i.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(O) {
202
- O && (O.__ = t);
203
- }), v = 0; v < i._sb.length; v++)
204
- i.__h.push(i._sb[v]);
205
- i._sb = [], i.__h.length && s.push(i);
206
- break e;
207
- }
208
- i.componentWillUpdate != null && i.componentWillUpdate(g, i.__s, S), i.componentDidUpdate != null && i.__h.push(function() {
209
- i.componentDidUpdate(y, _, h);
210
- });
211
- }
212
- if (i.context = S, i.props = g, i.__P = e, i.__e = !1, b = w.__r, m = 0, "prototype" in T && T.prototype.render) {
213
- for (i.state = i.__s, i.__d = !1, b && b(t), f = i.render(i.props, i.state, i.context), k = 0; k < i._sb.length; k++)
214
- i.__h.push(i._sb[k]);
215
- i._sb = [];
216
- } else
217
- do
218
- i.__d = !1, b && b(t), f = i.render(i.props, i.state, i.context), i.state = i.__s;
219
- while (i.__d && ++m < 25);
220
- i.state = i.__s, i.getChildContext != null && (r = ie(ie({}, r), i.getChildContext())), p || i.getSnapshotBeforeUpdate == null || (h = i.getSnapshotBeforeUpdate(y, _)), lr(e, at(x = f != null && f.type === I && f.key == null ? f.props.children : f) ? x : [x], t, n, r, o, a, s, l, c, d), i.base = t.__e, t.__h = null, i.__h.length && s.push(i), C && (i.__E = i.__ = null);
221
- } else
222
- a == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = Lo(n.__e, t, n, r, o, a, s, c, d);
223
- (f = w.diffed) && f(t);
224
- } catch (O) {
225
- t.__v = null, (c || a != null) && (t.__e = l, t.__h = !!c, a[a.indexOf(l)] = null), w.__e(O, t, n);
226
- }
227
- }
228
- function dr(e, t, n) {
229
- for (var r = 0; r < n.length; r++)
230
- Ft(n[r], n[++r], n[++r]);
231
- w.__c && w.__c(t, e), e.some(function(o) {
232
- try {
233
- e = o.__h, o.__h = [], e.some(function(a) {
234
- a.call(o);
235
- });
236
- } catch (a) {
237
- w.__e(a, o.__v);
238
- }
239
- });
240
- }
241
- function Lo(e, t, n, r, o, a, s, l, c) {
242
- var d, f, i, p = n.props, y = t.props, _ = t.type, h = 0;
243
- if (_ === "svg" && (o = !0), a != null) {
244
- for (; h < a.length; h++)
245
- if ((d = a[h]) && "setAttribute" in d == !!_ && (_ ? d.localName === _ : d.nodeType === 3)) {
246
- e = d, a[h] = null;
247
- break;
248
- }
249
- }
250
- if (e == null) {
251
- if (_ === null)
252
- return document.createTextNode(y);
253
- e = o ? document.createElementNS("http://www.w3.org/2000/svg", _) : document.createElement(_, y.is && y), a = null, l = !1;
254
- }
255
- if (_ === null)
256
- p === y || l && e.data === y || (e.data = y);
257
- else {
258
- if (a = a && ze.call(e.childNodes), f = (p = n.props || Ne).dangerouslySetInnerHTML, i = y.dangerouslySetInnerHTML, !l) {
259
- if (a != null)
260
- for (p = {}, h = 0; h < e.attributes.length; h++)
261
- p[e.attributes[h].name] = e.attributes[h].value;
262
- (i || f) && (i && (f && i.__html == f.__html || i.__html === e.innerHTML) || (e.innerHTML = i && i.__html || ""));
263
- }
264
- if (Ro(e, y, p, o, l), i)
265
- t.__k = [];
266
- else if (lr(e, at(h = t.props.children) ? h : [h], t, n, r, o && _ !== "foreignObject", a, s, a ? a[0] : n.__k && tt(n, 0), l, c), a != null)
267
- for (h = a.length; h--; )
268
- a[h] != null && ar(a[h]);
269
- l || ("value" in y && (h = y.value) !== void 0 && (h !== e.value || _ === "progress" && !h || _ === "option" && h !== p.value) && rt(e, "value", h, p.value, !1), "checked" in y && (h = y.checked) !== void 0 && h !== e.checked && rt(e, "checked", h, p.checked, !1));
270
- }
271
- return e;
272
- }
273
- function Ft(e, t, n) {
274
- try {
275
- typeof e == "function" ? e(t) : e.current = t;
276
- } catch (r) {
277
- w.__e(r, n);
278
- }
279
- }
280
- function fr(e, t, n) {
281
- var r, o;
282
- if (w.unmount && w.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || Ft(r, null, t)), (r = e.__c) != null) {
283
- if (r.componentWillUnmount)
284
- try {
285
- r.componentWillUnmount();
286
- } catch (a) {
287
- w.__e(a, t);
288
- }
289
- r.base = r.__P = null, e.__c = void 0;
290
- }
291
- if (r = e.__k)
292
- for (o = 0; o < r.length; o++)
293
- r[o] && fr(r[o], t, n || typeof e.type != "function");
294
- n || e.__e == null || ar(e.__e), e.__ = e.__e = e.__d = void 0;
295
- }
296
- function No(e, t, n) {
297
- return this.constructor(e, n);
298
- }
299
- function $e(e, t, n) {
300
- var r, o, a, s;
301
- w.__ && w.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], s = [], Ht(t, e = (!r && n || t).__k = X(I, null, [e]), o || Ne, Ne, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? ze.call(t.childNodes) : null, a, !r && n ? n : o ? o.__e : t.firstChild, r, s), dr(a, e, s);
302
- }
303
- function _r(e, t) {
304
- $e(e, t, _r);
305
- }
306
- function Do(e, t, n) {
307
- var r, o, a, s, l = ie({}, e.props);
308
- for (a in e.type && e.type.defaultProps && (s = e.type.defaultProps), t)
309
- a == "key" ? r = t[a] : a == "ref" ? o = t[a] : l[a] = t[a] === void 0 && s !== void 0 ? s[a] : t[a];
310
- return arguments.length > 2 && (l.children = arguments.length > 3 ? ze.call(arguments, 2) : n), Pe(e.type, l, r || e.key, o || e.ref, null);
311
- }
312
- function it(e, t) {
313
- var n = { __c: t = "__cC" + rr++, __: e, Consumer: function(r, o) {
314
- return r.children(o);
315
- }, Provider: function(r) {
316
- var o, a;
317
- return this.getChildContext || (o = [], (a = {})[t] = this, this.getChildContext = function() {
318
- return a;
319
- }, this.shouldComponentUpdate = function(s) {
320
- this.props.value !== s.value && o.some(function(l) {
321
- l.__e = !0, Rt(l);
322
- });
323
- }, this.sub = function(s) {
324
- o.push(s);
325
- var l = s.componentWillUnmount;
326
- s.componentWillUnmount = function() {
327
- o.splice(o.indexOf(s), 1), l && l.call(s);
328
- };
329
- }), r.children;
330
- } };
331
- return n.Provider.__ = n.Consumer.contextType = n;
332
- }
333
- ze = or.slice, w = { __e: function(e, t, n, r) {
334
- for (var o, a, s; t = t.__; )
335
- if ((o = t.__c) && !o.__)
336
- try {
337
- if ((a = o.constructor) && a.getDerivedStateFromError != null && (o.setState(a.getDerivedStateFromError(e)), s = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), s = o.__d), s)
338
- return o.__E = o;
339
- } catch (l) {
340
- e = l;
341
- }
342
- throw e;
343
- } }, tr = 0, G.prototype.setState = function(e, t) {
344
- var n;
345
- n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ie({}, this.state), typeof e == "function" && (e = e(ie({}, n), this.props)), e && ie(n, e), e != null && this.__v && (t && this._sb.push(t), Rt(this));
346
- }, G.prototype.forceUpdate = function(e) {
347
- this.__v && (this.__e = !0, e && this.__h.push(e), Rt(this));
348
- }, G.prototype.render = I, Ee = [], nr = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ot = function(e, t) {
349
- return e.__v.__b - t.__v.__b;
350
- }, nt.__r = 0, rr = 0;
351
- var Lt = "RFC3986", Nt = {
352
- RFC1738: (e) => String(e).replace(/%20/g, "+"),
353
- RFC3986: (e) => String(e)
354
- }, Ao = "RFC1738", Io = Array.isArray, Y = (() => {
355
- const e = [];
356
- for (let t = 0; t < 256; ++t)
357
- e.push("%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase());
358
- return e;
359
- })(), ht = 1024, Mo = (e, t, n, r, o) => {
360
- if (e.length === 0)
361
- return e;
362
- let a = e;
363
- if (typeof e == "symbol" ? a = Symbol.prototype.toString.call(e) : typeof e != "string" && (a = String(e)), n === "iso-8859-1")
364
- return escape(a).replace(/%u[0-9a-f]{4}/gi, function(l) {
365
- return "%26%23" + parseInt(l.slice(2), 16) + "%3B";
366
- });
367
- let s = "";
368
- for (let l = 0; l < a.length; l += ht) {
369
- const c = a.length >= ht ? a.slice(l, l + ht) : a, d = [];
370
- for (let f = 0; f < c.length; ++f) {
371
- let i = c.charCodeAt(f);
372
- if (i === 45 || // -
373
- i === 46 || // .
374
- i === 95 || // _
375
- i === 126 || // ~
376
- i >= 48 && i <= 57 || // 0-9
377
- i >= 65 && i <= 90 || // a-z
378
- i >= 97 && i <= 122 || // A-Z
379
- o === Ao && (i === 40 || i === 41)) {
380
- d[d.length] = c.charAt(f);
381
- continue;
382
- }
383
- if (i < 128) {
384
- d[d.length] = Y[i];
385
- continue;
386
- }
387
- if (i < 2048) {
388
- d[d.length] = Y[192 | i >> 6] + Y[128 | i & 63];
389
- continue;
390
- }
391
- if (i < 55296 || i >= 57344) {
392
- d[d.length] = Y[224 | i >> 12] + Y[128 | i >> 6 & 63] + Y[128 | i & 63];
393
- continue;
394
- }
395
- f += 1, i = 65536 + ((i & 1023) << 10 | c.charCodeAt(f) & 1023), d[d.length] = Y[240 | i >> 18] + Y[128 | i >> 12 & 63] + Y[128 | i >> 6 & 63] + Y[128 | i & 63];
396
- }
397
- s += d.join("");
398
- }
399
- return s;
400
- };
401
- function Po(e) {
402
- return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
403
- }
404
- function gn(e, t) {
405
- if (Io(e)) {
406
- const n = [];
407
- for (let r = 0; r < e.length; r += 1)
408
- n.push(t(e[r]));
409
- return n;
410
- }
411
- return t(e);
412
- }
413
- var jo = Object.prototype.hasOwnProperty, pr = {
414
- brackets(e) {
415
- return String(e) + "[]";
416
- },
417
- comma: "comma",
418
- indices(e, t) {
419
- return String(e) + "[" + t + "]";
420
- },
421
- repeat(e) {
422
- return String(e);
423
- }
424
- }, J = Array.isArray, Vo = Array.prototype.push, hr = function(e, t) {
425
- Vo.apply(e, J(t) ? t : [t]);
426
- }, $o = Date.prototype.toISOString, P = {
427
- addQueryPrefix: !1,
428
- allowDots: !1,
429
- allowEmptyArrays: !1,
430
- arrayFormat: "indices",
431
- charset: "utf-8",
432
- charsetSentinel: !1,
433
- delimiter: "&",
434
- encode: !0,
435
- encodeDotInKeys: !1,
436
- encoder: Mo,
437
- encodeValuesOnly: !1,
438
- format: Lt,
439
- formatter: Nt[Lt],
440
- /** @deprecated */
441
- indices: !1,
442
- serializeDate(e) {
443
- return $o.call(e);
444
- },
445
- skipNulls: !1,
446
- strictNullHandling: !1
447
- };
448
- function Uo(e) {
449
- return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
450
- }
451
- var yt = {};
452
- function yr(e, t, n, r, o, a, s, l, c, d, f, i, p, y, _, h, C, g) {
453
- let E = e, S = g, v = 0, b = !1;
454
- for (; (S = S.get(yt)) !== void 0 && !b; ) {
455
- const O = S.get(e);
456
- if (v += 1, typeof O < "u") {
457
- if (O === v)
458
- throw new RangeError("Cyclic object value");
459
- b = !0;
460
- }
461
- typeof S.get(yt) > "u" && (v = 0);
462
- }
463
- if (typeof d == "function" ? E = d(t, E) : E instanceof Date ? E = p == null ? void 0 : p(E) : n === "comma" && J(E) && (E = gn(E, function(O) {
464
- return O instanceof Date ? p == null ? void 0 : p(O) : O;
465
- })), E === null) {
466
- if (a)
467
- return c && !h ? (
468
- // @ts-expect-error
469
- c(t, P.encoder, C, "key", y)
470
- ) : t;
471
- E = "";
472
- }
473
- if (Uo(E) || Po(E)) {
474
- if (c) {
475
- const O = h ? t : (
476
- // @ts-expect-error
477
- c(t, P.encoder, C, "key", y)
478
- );
479
- return [
480
- (_ == null ? void 0 : _(O)) + "=" + // @ts-expect-error
481
- (_ == null ? void 0 : _(c(E, P.encoder, C, "value", y)))
482
- ];
483
- }
484
- return [(_ == null ? void 0 : _(t)) + "=" + (_ == null ? void 0 : _(String(E)))];
485
- }
486
- const m = [];
487
- if (typeof E > "u")
488
- return m;
489
- let k;
490
- if (n === "comma" && J(E))
491
- h && c && (E = gn(E, c)), k = [{ value: E.length > 0 ? E.join(",") || null : void 0 }];
492
- else if (J(d))
493
- k = d;
494
- else {
495
- const O = Object.keys(E);
496
- k = f ? O.sort(f) : O;
497
- }
498
- const x = l ? String(t).replace(/\./g, "%2E") : String(t), T = r && J(E) && E.length === 1 ? x + "[]" : x;
499
- if (o && J(E) && E.length === 0)
500
- return T + "[]";
501
- for (let O = 0; O < k.length; ++O) {
502
- const U = k[O], K = (
503
- // @ts-expect-error
504
- typeof U == "object" && typeof U.value < "u" ? U.value : E[U]
505
- );
506
- if (s && K === null)
507
- continue;
508
- const H = i && l ? U.replace(/\./g, "%2E") : U, ue = J(E) ? typeof n == "function" ? n(T, H) : T : T + (i ? "." + H : "[" + H + "]");
509
- g.set(e, v);
510
- const qe = /* @__PURE__ */ new WeakMap();
511
- qe.set(yt, g), hr(
512
- m,
513
- yr(
514
- K,
515
- ue,
516
- n,
517
- r,
518
- o,
519
- a,
520
- s,
521
- l,
522
- // @ts-expect-error
523
- n === "comma" && h && J(E) ? null : c,
524
- d,
525
- f,
526
- i,
527
- p,
528
- y,
529
- _,
530
- h,
531
- C,
532
- qe
533
- )
534
- );
535
- }
536
- return m;
537
- }
538
- function Ho(e = P) {
539
- if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
540
- throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
541
- if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
542
- throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
543
- if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
544
- throw new TypeError("Encoder has to be a function.");
545
- const t = e.charset || P.charset;
546
- if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
547
- throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
548
- let n = Lt;
549
- if (typeof e.format < "u") {
550
- if (!jo.call(Nt, e.format))
551
- throw new TypeError("Unknown format option provided.");
552
- n = e.format;
553
- }
554
- const r = Nt[n];
555
- let o = P.filter;
556
- (typeof e.filter == "function" || J(e.filter)) && (o = e.filter);
557
- let a;
558
- if (e.arrayFormat && e.arrayFormat in pr ? a = e.arrayFormat : "indices" in e ? a = e.indices ? "indices" : "repeat" : a = P.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
559
- throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
560
- const s = typeof e.allowDots > "u" ? e.encodeDotInKeys ? !0 : P.allowDots : !!e.allowDots;
561
- return {
562
- addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : P.addQueryPrefix,
563
- // @ts-ignore
564
- allowDots: s,
565
- allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : P.allowEmptyArrays,
566
- arrayFormat: a,
567
- charset: t,
568
- charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : P.charsetSentinel,
569
- commaRoundTrip: !!e.commaRoundTrip,
570
- delimiter: typeof e.delimiter > "u" ? P.delimiter : e.delimiter,
571
- encode: typeof e.encode == "boolean" ? e.encode : P.encode,
572
- encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : P.encodeDotInKeys,
573
- encoder: typeof e.encoder == "function" ? e.encoder : P.encoder,
574
- encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : P.encodeValuesOnly,
575
- filter: o,
576
- format: n,
577
- formatter: r,
578
- serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : P.serializeDate,
579
- skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : P.skipNulls,
580
- // @ts-expect-error
581
- sort: typeof e.sort == "function" ? e.sort : null,
582
- strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : P.strictNullHandling
583
- };
584
- }
585
- function gr(e, t = {}) {
586
- let n = e;
587
- const r = Ho(t);
588
- let o, a;
589
- typeof r.filter == "function" ? (a = r.filter, n = a("", n)) : J(r.filter) && (a = r.filter, o = a);
590
- const s = [];
591
- if (typeof n != "object" || n === null)
592
- return "";
593
- const l = pr[r.arrayFormat], c = l === "comma" && r.commaRoundTrip;
594
- o || (o = Object.keys(n)), r.sort && o.sort(r.sort);
595
- const d = /* @__PURE__ */ new WeakMap();
596
- for (let p = 0; p < o.length; ++p) {
597
- const y = o[p];
598
- r.skipNulls && n[y] === null || hr(
599
- s,
600
- yr(
601
- n[y],
602
- y,
603
- // @ts-expect-error
604
- l,
605
- c,
606
- r.allowEmptyArrays,
607
- r.strictNullHandling,
608
- r.skipNulls,
609
- r.encodeDotInKeys,
610
- r.encode ? r.encoder : null,
611
- r.filter,
612
- r.sort,
613
- r.allowDots,
614
- r.serializeDate,
615
- r.format,
616
- r.formatter,
617
- r.encodeValuesOnly,
618
- r.charset,
619
- d
620
- )
621
- );
622
- }
623
- const f = s.join(r.delimiter);
624
- let i = r.addQueryPrefix === !0 ? "?" : "";
625
- return r.charsetSentinel && (r.charset === "iso-8859-1" ? i += "utf8=%26%2310003%3B&" : i += "utf8=%E2%9C%93&"), f.length > 0 ? i + f : "";
626
- }
627
- var st = class extends Error {
628
- /**
629
- * Creates a Valibot error with useful information.
630
- *
631
- * @param issues The error issues.
632
- */
633
- constructor(t) {
634
- super(t[0].message);
635
- pt(this, "issues");
636
- this.name = "ValiError", this.issues = t;
637
- }
638
- };
639
- function vn(e, t) {
640
- return {
641
- ...e,
642
- _parse(n, r) {
643
- return e._parse(t(n), r);
644
- }
645
- };
646
- }
647
- function Be(e) {
648
- return { issues: e };
649
- }
650
- function we(e) {
651
- return { output: e };
652
- }
653
- function Fo(e, t) {
654
- return {
655
- reason: e == null ? void 0 : e.reason,
656
- validation: t.validation,
657
- origin: (e == null ? void 0 : e.origin) || "value",
658
- message: t.message,
659
- input: t.input,
660
- path: t.path,
661
- abortEarly: e == null ? void 0 : e.abortEarly,
662
- abortPipeEarly: e == null ? void 0 : e.abortPipeEarly,
663
- skipPipe: e == null ? void 0 : e.skipPipe
664
- };
665
- }
666
- function Wo(e, t) {
667
- return {
668
- reason: t,
669
- origin: e == null ? void 0 : e.origin,
670
- abortEarly: e == null ? void 0 : e.abortEarly,
671
- abortPipeEarly: e == null ? void 0 : e.abortPipeEarly,
672
- skipPipe: e == null ? void 0 : e.skipPipe
673
- };
674
- }
675
- function ve(e, t, n, r) {
676
- if (!t || !t.length || n != null && n.skipPipe)
677
- return we(e);
678
- let o, a, s = e;
679
- for (const l of t) {
680
- const c = l._parse(s);
681
- if (c.issues) {
682
- o = o || Wo(n, r);
683
- for (const d of c.issues) {
684
- const f = Fo(o, d);
685
- a ? a.push(f) : a = [f];
686
- }
687
- if (o.abortEarly || o.abortPipeEarly)
688
- break;
689
- } else
690
- s = c.output;
691
- }
692
- return a ? Be(a) : we(s);
693
- }
694
- function he(e, t) {
695
- return Array.isArray(e) ? [void 0, e] : [e, t];
696
- }
697
- function vr(e) {
698
- return typeof e == "function" ? e() : e;
699
- }
700
- function zo(e, t, n, r) {
701
- return Be([
702
- {
703
- validation: e,
704
- message: vr(t),
705
- input: n,
706
- requirement: r
707
- }
708
- ]);
709
- }
710
- function Bo(e, t, n) {
711
- if (!e || typeof e == "object" && !Array.isArray(e)) {
712
- const [a, s] = he(t, n);
713
- return [e, a, s];
714
- }
715
- const [r, o] = he(
716
- e,
717
- t
718
- );
719
- return [void 0, r, o];
720
- }
721
- function me(e, t, n, r, o, a) {
722
- return {
723
- issues: [
724
- {
725
- reason: t,
726
- validation: n,
727
- origin: (e == null ? void 0 : e.origin) || "value",
728
- message: vr(r),
729
- input: o,
730
- issues: a,
731
- abortEarly: e == null ? void 0 : e.abortEarly,
732
- abortPipeEarly: e == null ? void 0 : e.abortPipeEarly,
733
- skipPipe: e == null ? void 0 : e.skipPipe
734
- }
735
- ]
736
- };
737
- }
738
- function mr(e) {
739
- return typeof e.default == "function" ? e.default() : e.default;
740
- }
741
- function qo(e) {
742
- return {
743
- type: "any",
744
- async: !1,
745
- pipe: e,
746
- _parse(t, n) {
747
- return ve(t, this.pipe, n, "any");
748
- }
749
- };
750
- }
751
- function Wt(e, t, n) {
752
- const [r = "Invalid type", o] = he(t, n);
753
- return {
754
- type: "array",
755
- async: !1,
756
- item: e,
757
- message: r,
758
- pipe: o,
759
- _parse(a, s) {
760
- if (!Array.isArray(a))
761
- return me(s, "type", "array", this.message, a);
762
- let l;
763
- const c = [];
764
- for (let d = 0; d < a.length; d++) {
765
- const f = a[d], i = this.item._parse(f, s);
766
- if (i.issues) {
767
- const p = {
768
- type: "array",
769
- input: a,
770
- key: d,
771
- value: f
772
- };
773
- for (const y of i.issues)
774
- y.path ? y.path.unshift(p) : y.path = [p], l == null || l.push(y);
775
- if (l || (l = i.issues), s != null && s.abortEarly)
776
- break;
777
- } else
778
- c.push(i.output);
779
- }
780
- return l ? Be(l) : ve(c, this.pipe, s, "array");
781
- }
782
- };
783
- }
784
- function mn(e, t) {
785
- const [n = "Invalid type", r] = he(e, t);
786
- return {
787
- type: "boolean",
788
- async: !1,
789
- message: n,
790
- pipe: r,
791
- _parse(o, a) {
792
- return typeof o != "boolean" ? me(a, "type", "boolean", this.message, o) : ve(o, this.pipe, a, "boolean");
793
- }
794
- };
795
- }
796
- function oe(e, t = "Invalid type") {
797
- return {
798
- type: "literal",
799
- async: !1,
800
- literal: e,
801
- message: t,
802
- _parse(n, r) {
803
- return n !== this.literal ? me(r, "type", "literal", this.message, n) : we(n);
804
- }
805
- };
806
- }
807
- function z(e, t) {
808
- return {
809
- type: "nullable",
810
- async: !1,
811
- wrapped: e,
812
- default: t,
813
- _parse(n, r) {
814
- if (n === null) {
815
- const o = mr(this);
816
- if (o === void 0)
817
- return we(n);
818
- n = o;
819
- }
820
- return this.wrapped._parse(n, r);
821
- }
822
- };
823
- }
824
- function de(e, t) {
825
- const [n = "Invalid type", r] = he(e, t);
826
- return {
827
- type: "number",
828
- async: !1,
829
- message: n,
830
- pipe: r,
831
- _parse(o, a) {
832
- return typeof o != "number" || isNaN(o) ? me(a, "type", "number", this.message, o) : ve(o, this.pipe, a, "number");
833
- }
834
- };
835
- }
836
- function se(e, t, n, r) {
837
- const [o, a = "Invalid type", s] = Bo(t, n, r);
838
- let l;
839
- return {
840
- type: "object",
841
- async: !1,
842
- entries: e,
843
- rest: o,
844
- message: a,
845
- pipe: s,
846
- _parse(c, d) {
847
- if (!c || typeof c != "object")
848
- return me(d, "type", "object", this.message, c);
849
- l = l || Object.entries(this.entries);
850
- let f;
851
- const i = {};
852
- for (const [p, y] of l) {
853
- const _ = c[p], h = y._parse(_, d);
854
- if (h.issues) {
855
- const C = {
856
- type: "object",
857
- input: c,
858
- key: p,
859
- value: _
860
- };
861
- for (const g of h.issues)
862
- g.path ? g.path.unshift(C) : g.path = [C], f == null || f.push(g);
863
- if (f || (f = h.issues), d != null && d.abortEarly)
864
- break;
865
- } else
866
- (h.output !== void 0 || p in c) && (i[p] = h.output);
867
- }
868
- if (this.rest && !(d != null && d.abortEarly && f)) {
869
- for (const p in c)
870
- if (!(p in this.entries)) {
871
- const y = c[p], _ = this.rest._parse(y, d);
872
- if (_.issues) {
873
- const h = {
874
- type: "object",
875
- input: c,
876
- key: p,
877
- value: y
878
- };
879
- for (const C of _.issues)
880
- C.path ? C.path.unshift(h) : C.path = [h], f == null || f.push(C);
881
- if (f || (f = _.issues), d != null && d.abortEarly)
882
- break;
883
- } else
884
- i[p] = _.output;
885
- }
886
- }
887
- return f ? Be(f) : ve(
888
- i,
889
- this.pipe,
890
- d,
891
- "object"
892
- );
893
- }
894
- };
895
- }
896
- function fe(e, t) {
897
- return {
898
- type: "optional",
899
- async: !1,
900
- wrapped: e,
901
- default: t,
902
- _parse(n, r) {
903
- if (n === void 0) {
904
- const o = mr(this);
905
- if (o === void 0)
906
- return we(n);
907
- n = o;
908
- }
909
- return this.wrapped._parse(n, r);
910
- }
911
- };
912
- }
913
- function L(e, t) {
914
- const [n = "Invalid type", r] = he(e, t);
915
- return {
916
- type: "string",
917
- async: !1,
918
- message: n,
919
- pipe: r,
920
- _parse(o, a) {
921
- return typeof o != "string" ? me(a, "type", "string", this.message, o) : ve(o, this.pipe, a, "string");
922
- }
923
- };
924
- }
925
- function Go(e, t, n, r) {
926
- if (typeof t == "object" && !Array.isArray(t)) {
927
- const [s, l] = he(n, r);
928
- return [e, t, s, l];
929
- }
930
- const [o, a] = he(
931
- t,
932
- n
933
- );
934
- return [L(), e, o, a];
935
- }
936
- var Ko = ["__proto__", "prototype", "constructor"];
937
- function br(e, t, n, r) {
938
- const [o, a, s = "Invalid type", l] = Go(e, t, n, r);
939
- return {
940
- type: "record",
941
- async: !1,
942
- key: o,
943
- value: a,
944
- message: s,
945
- pipe: l,
946
- _parse(c, d) {
947
- if (!c || typeof c != "object")
948
- return me(d, "type", "record", this.message, c);
949
- let f;
950
- const i = {};
951
- for (const [p, y] of Object.entries(c))
952
- if (!Ko.includes(p)) {
953
- let _;
954
- const h = this.key._parse(p, {
955
- origin: "key",
956
- abortEarly: d == null ? void 0 : d.abortEarly,
957
- abortPipeEarly: d == null ? void 0 : d.abortPipeEarly,
958
- skipPipe: d == null ? void 0 : d.skipPipe
959
- });
960
- if (h.issues) {
961
- _ = {
962
- type: "record",
963
- input: c,
964
- key: p,
965
- value: y
966
- };
967
- for (const g of h.issues)
968
- g.path = [_], f == null || f.push(g);
969
- if (f || (f = h.issues), d != null && d.abortEarly)
970
- break;
971
- }
972
- const C = this.value._parse(y, d);
973
- if (C.issues) {
974
- _ = _ || {
975
- type: "record",
976
- input: c,
977
- key: p,
978
- value: y
979
- };
980
- for (const g of C.issues)
981
- g.path ? g.path.unshift(_) : g.path = [_], f == null || f.push(g);
982
- if (f || (f = C.issues), d != null && d.abortEarly)
983
- break;
984
- }
985
- !h.issues && !C.issues && (i[h.output] = C.output);
986
- }
987
- return f ? Be(f) : ve(
988
- i,
989
- this.pipe,
990
- d,
991
- "record"
992
- );
993
- }
994
- };
995
- }
996
- function bn(e, t = "Invalid type") {
997
- return {
998
- type: "union",
999
- async: !1,
1000
- options: e,
1001
- message: t,
1002
- _parse(n, r) {
1003
- let o, a;
1004
- for (const s of this.options) {
1005
- const l = s._parse(n, r);
1006
- if (l.issues)
1007
- if (o)
1008
- for (const c of l.issues)
1009
- o.push(c);
1010
- else
1011
- o = l.issues;
1012
- else {
1013
- a = [l.output];
1014
- break;
1015
- }
1016
- }
1017
- return a ? we(a[0]) : me(r, "type", "union", this.message, n, o);
1018
- }
1019
- };
1020
- }
1021
- function Er(e, t, n) {
1022
- const r = e._parse(t, n);
1023
- if (r.issues)
1024
- throw new st(r.issues);
1025
- return r.output;
1026
- }
1027
- function zt(e, t, n) {
1028
- const r = e._parse(t, n);
1029
- return r.issues ? {
1030
- success: !1,
1031
- error: new st(r.issues),
1032
- issues: r.issues
1033
- } : {
1034
- success: !0,
1035
- data: r.output,
1036
- output: r.output
1037
- };
1038
- }
1039
- function _e(e, t, n) {
1040
- return {
1041
- ...e,
1042
- _parse(r, o) {
1043
- const a = e._parse(r, o);
1044
- if (a.issues)
1045
- return a;
1046
- const s = t(a.output);
1047
- return n && !Array.isArray(n) ? n._parse(s, o) : ve(s, n, o, typeof s);
1048
- }
1049
- };
1050
- }
1051
- function Zo(e = "Invalid URL") {
1052
- return {
1053
- type: "url",
1054
- async: !1,
1055
- message: e,
1056
- requirement(t) {
1057
- try {
1058
- return new URL(t), !0;
1059
- } catch {
1060
- return !1;
1061
- }
1062
- },
1063
- _parse(t) {
1064
- return this.requirement(t) ? we(t) : zo(this.type, this.message, t, this.requirement);
1065
- }
1066
- };
1067
- }
1068
- const Ws = "inploi-job-search", Yo = 10, Jo = br(
1069
- Wt(se({ label: vn(L(), String), value: vn(L(), String), jobs: de() }))
1070
- ), Qo = L([Zo()]), Xo = se({
1071
- total: de(),
1072
- current_page: de(),
1073
- per_page: de(),
1074
- last_page: de()
1075
- }), ea = se({
1076
- id: de(),
1077
- company_name: L(),
1078
- company_logo: z(fe(L())),
1079
- employment_type: L(),
1080
- location_type: bn([oe("LOCATION"), oe("REMOTE"), oe("HYBRID")]),
1081
- pay_type: z(
1082
- bn([oe("ANNUALLY"), oe("HOURLY"), oe("MONTHLY"), oe("WEEKLY"), oe("DAILY")])
1083
- ),
1084
- pay_currency: L(),
1085
- // Whether to mask the pay and show as "competitive"
1086
- pay_mask: mn(),
1087
- // Whether to display pay at all
1088
- pay_display: mn(),
1089
- // Decimal numeric string e.g. "12.70"
1090
- pay: z(L()),
1091
- // Decimal numeric string e.g. "12.70"
1092
- pay_min: z(L()),
1093
- // Decimal numeric string e.g. "12.70"
1094
- pay_max: z(L()),
1095
- description: L(),
1096
- title: L(),
1097
- // E.g.: Any varchar, e.g.: "Permanent contract"
1098
- contract_type: z(L()),
1099
- created_at: z(L()),
1100
- custom_data: z(br(qo())),
1101
- href: L(),
1102
- industry: z(L()),
1103
- category: z(L()),
1104
- skills: fe(L()),
1105
- town: fe(L()),
1106
- city: z(L()),
1107
- country: z(L()),
1108
- vector_distance: fe(z(L()))
1109
- }), ta = (e) => _e(ea, (t) => {
1110
- const n = zt(Qo, t.company_logo);
1111
- return {
1112
- id: t.id,
1113
- createdAt: t.created_at,
1114
- company: {
1115
- name: t.company_name,
1116
- logo: n.success ? n.output : null
1117
- },
1118
- employmentType: t.employment_type,
1119
- locationType: t.location_type,
1120
- pay: Co({ salary: t, config: { locales: void 0 }, t: e }) ?? null,
1121
- description: t.description,
1122
- title: t.title,
1123
- contractType: t.contract_type,
1124
- href: t.href,
1125
- relativePostedDate: t.created_at ? To({ to: new Date(t.created_at), t: e }) : "INVALID DATE",
1126
- customData: t.custom_data,
1127
- raw: t,
1128
- match: t.vector_distance && parseFloat(t.vector_distance) < 0.15 ? e("great_match") : null
1129
- };
1130
- }), na = (e) => _e(
1131
- se({
1132
- data: Wt(ta(e)),
1133
- pagination: Xo
1134
- }),
1135
- (t) => ({
1136
- pagination: t.pagination,
1137
- results: t.data
1138
- })
1139
- ), ra = (e) => !e || Array.isArray(e) && e.length === 0 ? null : e, wr = (e) => {
1140
- var n;
1141
- const t = {};
1142
- for (const r in e.filters) {
1143
- const o = e.filters[r];
1144
- t[r] = ra(o == null ? void 0 : o.value);
1145
- }
1146
- return ((n = e.geo) == null ? void 0 : n.type) === "provided" && e.geo.coords && (t.geolocation = {
1147
- type: e.geo.type,
1148
- lat: e.geo.coords.lat,
1149
- lng: e.geo.coords.lng,
1150
- radius: e.geo.radius
1151
- }), t;
1152
- }, zs = async ({
1153
- apiClient: e,
1154
- state: t,
1155
- logger: n,
1156
- signal: r
1157
- }) => {
1158
- try {
1159
- const o = new URLSearchParams(
1160
- gr({
1161
- filters: wr(t),
1162
- query: t.query
1163
- })
1164
- ), a = "/search/filters", s = await e.fetch([a, o.toString()].filter(Boolean).join("?"), {
1165
- signal: r
1166
- });
1167
- return Er(Jo, s);
1168
- } catch (o) {
1169
- throw o instanceof st ? n.error(o.message, o.issues) : n.error(o), o;
1170
- }
1171
- }, Bs = async ({
1172
- apiClient: e,
1173
- logger: t,
1174
- signal: n,
1175
- state: r,
1176
- page: o = 1,
1177
- t: a
1178
- }) => {
1179
- try {
1180
- const s = new URLSearchParams(
1181
- gr({
1182
- filters: wr(r)
1183
- })
1184
- );
1185
- s.set("page", o.toString()), s.set("per_page", Yo.toString()), r.query && (s.set("query", r.query), s.set("mode", r.mode));
1186
- const l = await e.fetch(["/search/results", s.toString()].filter(Boolean).join("?"), {
1187
- signal: n
1188
- });
1189
- return Er(na(a), l);
1190
- } catch (s) {
1191
- throw s instanceof st ? t.error(s.message, s.issues) : t.error(s), s;
1192
- }
1193
- }, Sr = (e) => {
1194
- if (e.error)
1195
- return { queryState: "error", error: e.error, swr: e };
1196
- if (e.isLoading && e.data === void 0)
1197
- return { queryState: "loading", swr: e };
1198
- if ((e.isLoading || e.isValidating) && e.data)
1199
- return { queryState: "revalidating", data: e.data, swr: e };
1200
- if (!e.isLoading && e.data)
1201
- return { queryState: "loaded", data: e.data, swr: e };
1202
- if (!e.data && !e.isLoading)
1203
- return { queryState: "idle", swr: e };
1204
- throw console.error("Unhandled data state", e), new Error("Unhandled data state");
1205
- }, qs = {
1206
- keepPreviousData: !0,
1207
- revalidateOnFocus: !1,
1208
- revalidateOnReconnect: !1,
1209
- revalidateIfStale: !1,
1210
- revalidateFirstPage: !1
1211
- };
1212
- var oa = 0;
1213
- function u(e, t, n, r, o, a) {
1214
- var s, l, c = {};
1215
- for (l in t)
1216
- l == "ref" ? s = t[l] : c[l] = t[l];
1217
- var d = { type: e, props: c, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --oa, __source: o, __self: a };
1218
- if (typeof e == "function" && (s = e.defaultProps))
1219
- for (l in s)
1220
- c[l] === void 0 && (c[l] = s[l]);
1221
- return w.vnode && w.vnode(d), d;
1222
- }
1223
- function Cr(e) {
1224
- var t, n, r = "";
1225
- if (typeof e == "string" || typeof e == "number")
1226
- r += e;
1227
- else if (typeof e == "object")
1228
- if (Array.isArray(e)) {
1229
- var o = e.length;
1230
- for (t = 0; t < o; t++)
1231
- e[t] && (n = Cr(e[t])) && (r && (r += " "), r += n);
1232
- } else
1233
- for (n in e)
1234
- e[n] && (r && (r += " "), r += n);
1235
- return r;
1236
- }
1237
- function aa() {
1238
- for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++)
1239
- (e = arguments[n]) && (t = Cr(e)) && (r && (r += " "), r += t);
1240
- return r;
1241
- }
1242
- var ia = ["other", "few", "many", "two", "one", "zero"], En = ({
1243
- terms: e,
1244
- overrides: t,
1245
- locale: n
1246
- }) => {
1247
- const r = new Intl.PluralRules(n);
1248
- function o(a, s) {
1249
- const l = (t == null ? void 0 : t[a]) ?? e[a];
1250
- switch (typeof l) {
1251
- case "string":
1252
- return l.replace(/{{(\w+)}}/g, (c, d) => {
1253
- var f;
1254
- return ((f = s == null ? void 0 : s[d]) == null ? void 0 : f.toString()) ?? "";
1255
- });
1256
- case "object": {
1257
- if (typeof (s == null ? void 0 : s.count) != "number")
1258
- throw new Error(`Missing count for translation key “${a.toString()}”`);
1259
- let c = r.select(s.count);
1260
- if (!(c in l)) {
1261
- const d = ia.find((f) => f in l);
1262
- if (!d)
1263
- throw new Error(`Missing plural rule for translation key “${a.toString()}”`);
1264
- c = d;
1265
- }
1266
- return l[c].replace(/{{(\w+)}}/g, (d, f) => {
1267
- var i;
1268
- return ((i = s == null ? void 0 : s[f]) == null ? void 0 : i.toString()) ?? "";
1269
- });
1270
- }
1271
- default:
1272
- throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`);
1273
- }
1274
- }
1275
- return o;
1276
- }, ce, N, gt, wn, De = 0, xr = [], Xe = [], Sn = w.__b, Cn = w.__r, xn = w.diffed, Tn = w.__c, kn = w.unmount;
1277
- function Se(e, t) {
1278
- w.__h && w.__h(N, e, De || t), De = 0;
1279
- var n = N.__H || (N.__H = { __: [], __h: [] });
1280
- return e >= n.__.length && n.__.push({ __V: Xe }), n.__[e];
1281
- }
1282
- function j(e) {
1283
- return De = 1, Bt(kr, e);
1284
- }
1285
- function Bt(e, t, n) {
1286
- var r = Se(ce++, 2);
1287
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : kr(void 0, t), function(l) {
1288
- var c = r.__N ? r.__N[0] : r.__[0], d = r.t(c, l);
1289
- c !== d && (r.__N = [d, r.__[1]], r.__c.setState({}));
1290
- }], r.__c = N, !N.u)) {
1291
- var o = function(l, c, d) {
1292
- if (!r.__c.__H)
1293
- return !0;
1294
- var f = r.__c.__H.__.filter(function(p) {
1295
- return p.__c;
1296
- });
1297
- if (f.every(function(p) {
1298
- return !p.__N;
1299
- }))
1300
- return !a || a.call(this, l, c, d);
1301
- var i = !1;
1302
- return f.forEach(function(p) {
1303
- if (p.__N) {
1304
- var y = p.__[0];
1305
- p.__ = p.__N, p.__N = void 0, y !== p.__[0] && (i = !0);
1306
- }
1307
- }), !(!i && r.__c.props === l) && (!a || a.call(this, l, c, d));
1308
- };
1309
- N.u = !0;
1310
- var a = N.shouldComponentUpdate, s = N.componentWillUpdate;
1311
- N.componentWillUpdate = function(l, c, d) {
1312
- if (this.__e) {
1313
- var f = a;
1314
- a = void 0, o(l, c, d), a = f;
1315
- }
1316
- s && s.call(this, l, c, d);
1317
- }, N.shouldComponentUpdate = o;
1318
- }
1319
- return r.__N || r.__;
1320
- }
1321
- function ee(e, t) {
1322
- var n = Se(ce++, 3);
1323
- !w.__s && Kt(n.__H, t) && (n.__ = e, n.i = t, N.__H.__h.push(n));
1324
- }
1325
- function Ce(e, t) {
1326
- var n = Se(ce++, 4);
1327
- !w.__s && Kt(n.__H, t) && (n.__ = e, n.i = t, N.__h.push(n));
1328
- }
1329
- function q(e) {
1330
- return De = 5, be(function() {
1331
- return { current: e };
1332
- }, []);
1333
- }
1334
- function Tr(e, t, n) {
1335
- De = 6, Ce(function() {
1336
- return typeof e == "function" ? (e(t()), function() {
1337
- return e(null);
1338
- }) : e ? (e.current = t(), function() {
1339
- return e.current = null;
1340
- }) : void 0;
1341
- }, n == null ? n : n.concat(e));
1342
- }
1343
- function be(e, t) {
1344
- var n = Se(ce++, 7);
1345
- return Kt(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
1346
- }
1347
- function je(e, t) {
1348
- return De = 8, be(function() {
1349
- return e;
1350
- }, t);
1351
- }
1352
- function lt(e) {
1353
- var t = N.context[e.__c], n = Se(ce++, 9);
1354
- return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(N)), t.props.value) : e.__;
1355
- }
1356
- function qt(e, t) {
1357
- w.useDebugValue && w.useDebugValue(t ? t(e) : e);
1358
- }
1359
- function sa(e) {
1360
- var t = Se(ce++, 10), n = j();
1361
- return t.__ = e, N.componentDidCatch || (N.componentDidCatch = function(r, o) {
1362
- t.__ && t.__(r, o), n[1](r);
1363
- }), [n[0], function() {
1364
- n[1](void 0);
1365
- }];
1366
- }
1367
- function Gt() {
1368
- var e = Se(ce++, 11);
1369
- if (!e.__) {
1370
- for (var t = N.__v; t !== null && !t.__m && t.__ !== null; )
1371
- t = t.__;
1372
- var n = t.__m || (t.__m = [0, 0]);
1373
- e.__ = "P" + n[0] + "-" + n[1]++;
1374
- }
1375
- return e.__;
1376
- }
1377
- function la() {
1378
- for (var e; e = xr.shift(); )
1379
- if (e.__P && e.__H)
1380
- try {
1381
- e.__H.__h.forEach(et), e.__H.__h.forEach(Dt), e.__H.__h = [];
1382
- } catch (t) {
1383
- e.__H.__h = [], w.__e(t, e.__v);
1384
- }
1385
- }
1386
- w.__b = function(e) {
1387
- N = null, Sn && Sn(e);
1388
- }, w.__r = function(e) {
1389
- Cn && Cn(e), ce = 0;
1390
- var t = (N = e.__c).__H;
1391
- t && (gt === N ? (t.__h = [], N.__h = [], t.__.forEach(function(n) {
1392
- n.__N && (n.__ = n.__N), n.__V = Xe, n.__N = n.i = void 0;
1393
- })) : (t.__h.forEach(et), t.__h.forEach(Dt), t.__h = [], ce = 0)), gt = N;
1394
- }, w.diffed = function(e) {
1395
- xn && xn(e);
1396
- var t = e.__c;
1397
- t && t.__H && (t.__H.__h.length && (xr.push(t) !== 1 && wn === w.requestAnimationFrame || ((wn = w.requestAnimationFrame) || ca)(la)), t.__H.__.forEach(function(n) {
1398
- n.i && (n.__H = n.i), n.__V !== Xe && (n.__ = n.__V), n.i = void 0, n.__V = Xe;
1399
- })), gt = N = null;
1400
- }, w.__c = function(e, t) {
1401
- t.some(function(n) {
1402
- try {
1403
- n.__h.forEach(et), n.__h = n.__h.filter(function(r) {
1404
- return !r.__ || Dt(r);
1405
- });
1406
- } catch (r) {
1407
- t.some(function(o) {
1408
- o.__h && (o.__h = []);
1409
- }), t = [], w.__e(r, n.__v);
1410
- }
1411
- }), Tn && Tn(e, t);
1412
- }, w.unmount = function(e) {
1413
- kn && kn(e);
1414
- var t, n = e.__c;
1415
- n && n.__H && (n.__H.__.forEach(function(r) {
1416
- try {
1417
- et(r);
1418
- } catch (o) {
1419
- t = o;
1420
- }
1421
- }), n.__H = void 0, t && w.__e(t, n.__v));
1422
- };
1423
- var On = typeof requestAnimationFrame == "function";
1424
- function ca(e) {
1425
- var t, n = function() {
1426
- clearTimeout(r), On && cancelAnimationFrame(t), setTimeout(e);
1427
- }, r = setTimeout(n, 100);
1428
- On && (t = requestAnimationFrame(n));
1429
- }
1430
- function et(e) {
1431
- var t = N, n = e.__c;
1432
- typeof n == "function" && (e.__c = void 0, n()), N = t;
1433
- }
1434
- function Dt(e) {
1435
- var t = N;
1436
- e.__c = e.__(), N = t;
1437
- }
1438
- function Kt(e, t) {
1439
- return !e || e.length !== t.length || t.some(function(n, r) {
1440
- return n !== e[r];
1441
- });
1442
- }
1443
- function kr(e, t) {
1444
- return typeof t == "function" ? t(e) : t;
1445
- }
1446
- var Rn = it(null), ua = (e) => ({
1447
- TranslationProvider: ({ terms: t, children: n, locale: r }) => {
1448
- const o = be(() => (console.log("instantiating"), En({ locale: r, terms: e, overrides: t })), [t, r]);
1449
- return /* @__PURE__ */ u(Rn.Provider, { value: { t: o, locale: r }, children: n });
1450
- },
1451
- useTranslation: () => {
1452
- const t = lt(Rn);
1453
- if (t === null)
1454
- throw new Error("Please wrap useTranslation in a TranslationProvider");
1455
- return { t: t.t, locale: t.locale };
1456
- },
1457
- createTFunction: ({
1458
- overrides: t,
1459
- locale: n
1460
- }) => En({ terms: e, overrides: t, locale: n })
1461
- });
1462
- const { TranslationProvider: Gs, useTranslation: xe, createTFunction: Ks } = ua({
1463
- type_to_search_jobs: "Type to search jobs",
1464
- type_to_search: "Type to search",
1465
- jobs_found: { one: "{{count}} job found", other: "{{count}} jobs found" },
1466
- no_jobs_found: "No jobs found",
1467
- no_jobs_found_description: "We could not find any jobs matching your filtering criteria.",
1468
- jobs_loading_error: "We’re having trouble loading available jobs.",
1469
- filters_loading_error: "We’re having trouble loading available filters.",
1470
- no_filter_options_available: "No filter options available.",
1471
- clear: "Clear",
1472
- selected: "selected",
1473
- done: "Done",
1474
- skip: "Skip",
1475
- new: "NEW",
1476
- posted: "Posted",
1477
- retry: "Retry",
1478
- widget_unavailable: "Sorry, this widget is unavailable at the moment.",
1479
- load_more_count: "Load {{count}} more",
1480
- of_remaining_count: "of {{count}} remaining",
1481
- today: "today",
1482
- over_30_days_ago: "over 30 days ago",
1483
- in_over_30_days: "in over 30 days",
1484
- up_to: "Up to",
1485
- from: "From",
1486
- invalid_salary: "Invalid salary",
1487
- competitive: "Competitive",
1488
- natural_language_input: "Type anything",
1489
- great_match: "Great match",
1490
- advanced_mode: "Filters",
1491
- simple_mode: "Hide filters",
1492
- ai_disclaimer: "Results may not be perfect. AI-powered search can occasionally suggest unrelated content.",
1493
- geo_error_timeout: "Timed out. Please type your location manually.",
1494
- geo_error_permission_denied: "Please allow location access to use this feature.",
1495
- geo_error_position_unavailable: "Could not locate you. Please type your location manually.",
1496
- geo_my_location: "My location",
1497
- geo_locating: "Locating you...",
1498
- geo_search_placeholder: "Search for a location",
1499
- geo_clear_search: "Clear location search",
1500
- location_provided: "Provided location",
1501
- search_label: "What",
1502
- geo_label: "Where",
1503
- geo_range_label: "Within",
1504
- geo_suggestions_error: "Could not get the suggested locations.",
1505
- feedback: "How was your search experience?"
1506
- });
1507
- function Or(e) {
1508
- var t, n, r = "";
1509
- if (typeof e == "string" || typeof e == "number")
1510
- r += e;
1511
- else if (typeof e == "object")
1512
- if (Array.isArray(e))
1513
- for (t = 0; t < e.length; t++)
1514
- e[t] && (n = Or(e[t])) && (r && (r += " "), r += n);
1515
- else
1516
- for (t in e)
1517
- e[t] && (r && (r += " "), r += t);
1518
- return r;
1519
- }
1520
- function vt() {
1521
- for (var e, t, n = 0, r = ""; n < arguments.length; )
1522
- (e = arguments[n++]) && (t = Or(e)) && (r && (r += " "), r += t);
1523
- return r;
1524
- }
1525
- const Ln = (e) => typeof e == "boolean" ? "".concat(e) : e === 0 ? "0" : e, da = (e) => {
1526
- const t = function() {
1527
- for (var o = arguments.length, a = new Array(o), s = 0; s < o; s++)
1528
- a[s] = arguments[s];
1529
- var l, c;
1530
- return typeof (e == null || (l = e.hooks) === null || l === void 0 ? void 0 : l["cx:done"]) < "u" ? e == null ? void 0 : e.hooks["cx:done"](vt(a)) : typeof (e == null || (c = e.hooks) === null || c === void 0 ? void 0 : c.onComplete) < "u" ? e == null ? void 0 : e.hooks.onComplete(vt(a)) : vt(a);
1531
- };
1532
- return { compose: function() {
1533
- for (var o = arguments.length, a = new Array(o), s = 0; s < o; s++)
1534
- a[s] = arguments[s];
1535
- return (l) => {
1536
- const c = Object.fromEntries(Object.entries(l || {}).filter((d) => {
1537
- let [f] = d;
1538
- return !["class", "className"].includes(f);
1539
- }));
1540
- return t(a.map((d) => d(c)), l == null ? void 0 : l.class, l == null ? void 0 : l.className);
1541
- };
1542
- }, cva: (o) => (a) => {
1543
- var s;
1544
- if ((o == null ? void 0 : o.variants) == null)
1545
- return t(o == null ? void 0 : o.base, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
1546
- const { variants: l, defaultVariants: c } = o, d = Object.keys(l).map((p) => {
1547
- const y = a == null ? void 0 : a[p], _ = c == null ? void 0 : c[p], h = Ln(y) || Ln(_);
1548
- return l[p][h];
1549
- }), f = { ...c, ...a && Object.entries(a).reduce((p, y) => {
1550
- let [_, h] = y;
1551
- return typeof h > "u" ? p : { ...p, [_]: h };
1552
- }, {}) }, i = o == null || (s = o.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((p, y) => {
1553
- let { class: _, className: h, ...C } = y;
1554
- return Object.entries(C).every((g) => {
1555
- let [E, S] = g;
1556
- const v = f[E];
1557
- return Array.isArray(S) ? S.includes(v) : v === S;
1558
- }) ? [...p, _, h] : p;
1559
- }, []);
1560
- return t(o == null ? void 0 : o.base, d, i, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
1561
- }, cx: t };
1562
- }, { compose: Zs, cva: te, cx: Ys } = da(), Ue = te({
1563
- base: "fr animate-selected-tag justify-center touch-hitbox text-style-filter ease-expo-out disabled:text-interactive-neutral-bg-hover disabled:bg-interactive-neutral-bg disabled:hover:disabled:bg-interactive-neutral-bg flex cursor-pointer items-center transition-all duration-snappy active:scale-95",
1564
- variants: {
1565
- variant: {
1566
- neutral: "bg-interactive-neutral-bg pointer-fine:hover:bg-interactive-neutral-bg-hover text-interactive-neutral-text",
1567
- accent: "bg-interactive-accent-bg pointer-fine:hover:bg-interactive-accent-bg-hover text-interactive-accent-text"
1568
- },
1569
- icon: {
1570
- none: "",
1571
- right: "",
1572
- left: "",
1573
- only: ""
1574
- },
1575
- position: {
1576
- relative: "relative",
1577
- absolute: "absolute"
1578
- },
1579
- size: {
1580
- sm: "py-1 rounded-interactive",
1581
- lg: "py-2 rounded-interactive",
1582
- unsized: ""
1583
- }
1584
- },
1585
- compoundVariants: [
1586
- { size: "sm", icon: "right", class: "pl-3 pr-1" },
1587
- { size: "sm", icon: "left", class: "pl-1 pr-3" },
1588
- { size: "sm", icon: "none", class: "px-3" },
1589
- { size: "lg", icon: "none", class: "px-5" },
1590
- { size: "lg", icon: "right", class: "pl-5 pr-3" },
1591
- { size: "lg", icon: "only", class: "px-2 py-2" },
1592
- { size: "sm", icon: "only", class: "px-1 py-1" }
1593
- ],
1594
- defaultVariants: {
1595
- variant: "neutral",
1596
- icon: "none",
1597
- position: "relative",
1598
- size: "sm"
1599
- }
1600
- }), Js = ({ error: e, resetError: t }) => {
1601
- const { t: n } = xe();
1602
- return /* @__PURE__ */ u(
1603
- "div",
1604
- {
1605
- style: {
1606
- display: "flex",
1607
- flexDirection: "column",
1608
- gap: ".5rem",
1609
- padding: "1rem",
1610
- fontSize: "1rem",
1611
- color: "hsl(10, 82%, 45%)",
1612
- fontFamily: "'system-ui' 'Helvetica'",
1613
- background: "hsl(7, 100%, 98%)"
1614
- },
1615
- children: [
1616
- /* @__PURE__ */ u("p", { children: e.message }),
1617
- /* @__PURE__ */ u(
1618
- "button",
1619
- {
1620
- type: "button",
1621
- onClick: t,
1622
- style: {
1623
- background: "white",
1624
- border: "none",
1625
- cursor: "pointer",
1626
- textAlign: "center",
1627
- borderRadius: "4px",
1628
- padding: "0.5rem 1rem"
1629
- },
1630
- children: n("retry")
1631
- }
1632
- )
1633
- ]
1634
- }
1635
- );
1636
- }, Nn = ({ error: e, resetError: t, class: n, ...r }) => {
1637
- const { t: o } = xe();
1638
- return /* @__PURE__ */ u(
1639
- "div",
1640
- {
1641
- class: aa(
1642
- "bg-neutral-12 ring-section-weak-stroke rounded-section flex flex-col items-center gap-4 overflow-hidden p-6 text-center",
1643
- n
1644
- ),
1645
- ...r,
1646
- children: [
1647
- /* @__PURE__ */ u("div", { class: "flex max-w-full flex-col gap-1", children: [
1648
- /* @__PURE__ */ u("p", { class: "text-neutral-1 text-style-job-heading font-style-job-heading font-weight-job-heading [text-wrap:balance]", children: o("widget_unavailable") }),
1649
- /* @__PURE__ */ u("p", { class: "text-neutral-8 text-style-tag font-style-tag font-weight-tag max-w-full break-words leading-snug [text-wrap:pretty]", children: e.message })
1650
- ] }),
1651
- /* @__PURE__ */ u(
1652
- "button",
1653
- {
1654
- type: "button",
1655
- class: Ue({
1656
- variant: "neutral",
1657
- size: "lg",
1658
- class: "text-interactive-neutral-bg bg-lowest"
1659
- }),
1660
- onClick: t,
1661
- children: o("retry")
1662
- }
1663
- )
1664
- ]
1665
- }
1666
- );
1667
- };
1668
- class Qs extends G {
1669
- constructor() {
1670
- super(...arguments);
1671
- pt(this, "state", { error: null });
1672
- }
1673
- static getDerivedStateFromError(n) {
1674
- return { error: n.message };
1675
- }
1676
- componentDidCatch(n) {
1677
- this.setState({ error: n });
1678
- }
1679
- render() {
1680
- if (this.state.error) {
1681
- const { Fallback: n } = this.props;
1682
- return /* @__PURE__ */ u(
1683
- n,
1684
- {
1685
- error: this.state.error,
1686
- resetError: () => {
1687
- this.setState({ error: null });
1688
- }
1689
- }
1690
- );
1691
- }
1692
- return this.props.children;
1693
- }
1694
- }
1695
- const fa = {
1696
- briefcase: /* @__PURE__ */ u(I, { children: [
1697
- /* @__PURE__ */ u("path", { d: "M17.25 7.75H6.75C5.64543 7.75 4.75 8.64543 4.75 9.75V16.25C4.75 17.3546 5.64543 18.25 6.75 18.25H17.25C18.3546 18.25 19.25 17.3546 19.25 16.25V9.75C19.25 8.64543 18.3546 7.75 17.25 7.75Z" }),
1698
- /* @__PURE__ */ u("path", { d: "M4.75 11.75H19.25" }),
1699
- /* @__PURE__ */ u("path", { d: "M13.25 12.25V13.25H10.75V12.25H13.25Z" }),
1700
- /* @__PURE__ */ u("path", { d: "M9.25 7.5V6.25C9.25 5.42157 9.92157 4.75 10.75 4.75H13.25C14.0784 4.75 14.75 5.42157 14.75 6.25V7.5" })
1701
- ] }),
1702
- brand: /* @__PURE__ */ u(I, { children: [
1703
- /* @__PURE__ */ u("path", { d: "M18.45 13.9901C18.1288 15.031 17.5574 15.9886 16.773 16.773C15.5071 18.0388 13.7902 18.75 12 18.75C10.2098 18.75 8.49289 18.0388 7.22702 16.773C6.44262 15.9886 5.87122 15.031 5.55003 13.9901" }),
1704
- /* @__PURE__ */ u("path", { d: "M9.87868 14.8713C10.1573 15.1499 10.488 15.3709 10.8519 15.5216C11.2159 15.6724 11.606 15.75 12 15.75C12.394 15.75 12.7841 15.6724 13.1481 15.5216C13.512 15.3709 13.8427 15.1499 14.1213 14.8713" }),
1705
- /* @__PURE__ */ u("path", { d: "M17.0791 7.55413C16.7038 7.12546 16.2758 6.74602 15.8053 6.42486" }),
1706
- /* @__PURE__ */ u("path", { d: "M12.8451 5.30311C12.2799 5.23179 11.7079 5.2323 11.1428 5.30465" }),
1707
- /* @__PURE__ */ u("path", { d: "M8.25666 6.38307C7.78259 6.69901 7.35043 7.07369 6.97047 7.49818" }),
1708
- /* @__PURE__ */ u("circle", { cx: "18.75", cy: "12", r: "2" }),
1709
- /* @__PURE__ */ u("circle", { cx: "5.25", cy: "12", r: "2" })
1710
- ] }),
1711
- building: /* @__PURE__ */ u(I, { children: [
1712
- /* @__PURE__ */ u("path", { d: "M16.75 10.25H13.75" }),
1713
- /* @__PURE__ */ u("path", { d: "M16.75 13.25H13.75" }),
1714
- /* @__PURE__ */ u("path", { d: "M3 18.25H5.25006M5.25006 18.25V14.25C5.25006 13.1454 6.14549 12.25 7.25006 12.25H10.2501L10.25 8.25003C10.25 6.59316 11.5932 5.25 13.25 5.25H17.25C18.9069 5.25 20.25 6.59315 20.25 8.25V18.25H5.25006Z" }),
1715
- /* @__PURE__ */ u("path", { d: "M10.25 12.25V18.25" })
1716
- ] }),
1717
- circles: /* @__PURE__ */ u(I, { children: [
1718
- /* @__PURE__ */ u("path", { d: "M16.773 16.773C15.829 17.717 14.6262 18.3599 13.3169 18.6203C12.0075 18.8808 10.6503 18.7471 9.41689 18.2362C8.18349 17.7253 7.12928 16.8601 6.38758 15.7501C5.64588 14.6401 5.25 13.335 5.25 12C5.25 10.665 5.64588 9.35993 6.38758 8.2499C7.12928 7.13987 8.18349 6.27471 9.41689 5.76381C10.6503 5.25292 12.0075 5.11925 13.3169 5.3797C14.6262 5.64015 15.829 6.28302 16.773 7.22703" }),
1719
- /* @__PURE__ */ u("path", { d: "M9.34835 9.34835C9.8728 8.8239 10.541 8.46675 11.2684 8.32206C11.9958 8.17736 12.7498 8.25162 13.4351 8.53545C14.1203 8.81928 14.706 9.29993 15.118 9.91661C15.5301 10.5333 15.75 11.2583 15.75 12C15.75 12.7417 15.5301 13.4667 15.118 14.0834C14.706 14.7001 14.1203 15.1807 13.4351 15.4645C12.7498 15.7484 11.9958 15.8226 11.2684 15.6779C10.541 15.5333 9.8728 15.1761 9.34835 14.6517" })
1720
- ] }),
1721
- clock: /* @__PURE__ */ u(I, { children: [
1722
- /* @__PURE__ */ u("path", { d: "M14 9L12 13L9.5 12" }),
1723
- /* @__PURE__ */ u("path", { d: "M18.75 12C18.75 15.7279 15.7279 18.75 12 18.75C8.27208 18.75 5.25 15.7279 5.25 12C5.25 8.27208 8.27208 5.25 12 5.25C15.7279 5.25 18.75 8.27208 18.75 12Z" })
1724
- ] }),
1725
- filter: /* @__PURE__ */ u(I, { children: /* @__PURE__ */ u("path", { d: "M19.25 7H4.75V8.5L10.25 12.25V17.5H13.75V12.25L19.25 8.5V7Z" }) }),
1726
- globe: /* @__PURE__ */ u(I, { children: [
1727
- /* @__PURE__ */ u("path", { d: "M5 13.75H19" }),
1728
- /* @__PURE__ */ u("path", { d: "M5 10.25H19" }),
1729
- /* @__PURE__ */ u("path", { d: "M12 4.75C15.5 9.25 15.5 14.75 12.0001 19.25C8.50012 14.75 8.50005 9.25 12 4.75Z" }),
1730
- /* @__PURE__ */ u("circle", { cx: "12", cy: "12", r: "7.25" })
1731
- ] }),
1732
- magnifier: /* @__PURE__ */ u(I, { children: [
1733
- /* @__PURE__ */ u("path", { d: "M15.5659 15.5659C14.4875 16.6442 13.025 17.25 11.5 17.25C9.97501 17.25 8.51247 16.6442 7.43414 15.5659C6.3558 14.4875 5.75 13.025 5.75 11.5C5.75 9.97501 6.3558 8.51247 7.43414 7.43414C8.51247 6.3558 9.97501 5.75 11.5 5.75C13.025 5.75 14.4875 6.3558 15.5659 7.43414C16.6442 8.51247 17.25 9.97501 17.25 11.5C17.25 13.025 16.6442 14.4875 15.5659 15.5659L15.5659 15.5659Z" }),
1734
- /* @__PURE__ */ u("path", { d: "M11.5 8.75C11.8611 8.75 12.2187 8.82113 12.5524 8.95933C12.886 9.09753 13.1892 9.3001 13.4445 9.55546C13.6999 9.81082 13.9025 10.114 14.0407 10.4476C14.1789 10.7813 14.25 11.1389 14.25 11.5" }),
1735
- /* @__PURE__ */ u("path", { d: "M16 16L19 19" })
1736
- ] }),
1737
- magnifierSimple: /* @__PURE__ */ u(I, { children: [
1738
- /* @__PURE__ */ u("path", { d: "M15.5659 15.5659C14.4875 16.6442 13.025 17.25 11.5 17.25C9.97501 17.25 8.51247 16.6442 7.43414 15.5659C6.3558 14.4875 5.75 13.025 5.75 11.5C5.75 9.97501 6.3558 8.51247 7.43414 7.43414C8.51247 6.3558 9.97501 5.75 11.5 5.75C13.025 5.75 14.4875 6.3558 15.5659 7.43414C16.6442 8.51247 17.25 9.97501 17.25 11.5C17.25 13.025 16.6442 14.4875 15.5659 15.5659L15.5659 15.5659Z" }),
1739
- /* @__PURE__ */ u("path", { d: "M16 16L19 19" })
1740
- ] }),
1741
- mapPin: /* @__PURE__ */ u(I, { children: /* @__PURE__ */ u(I, { children: [
1742
- /* @__PURE__ */ u("circle", { cx: "12", cy: "9", r: "2" }),
1743
- /* @__PURE__ */ u("path", { d: "M16.2426 16.8358C17.0818 17.1155 17.6532 17.4719 17.8847 17.8598C18.1162 18.2478 17.9974 18.6499 17.5433 19.0154C17.0892 19.3808 16.3201 19.6932 15.3334 19.9129C14.3467 20.1327 13.1867 20.25 12 20.25C10.8133 20.25 9.65327 20.1327 8.66658 19.9129C7.67988 19.6932 6.91085 19.3808 6.45672 19.0154C6.0026 18.6499 5.88378 18.2478 6.11529 17.8598C6.3468 17.4719 6.91825 17.1155 7.75736 16.8358" }),
1744
- /* @__PURE__ */ u("path", { d: "M17.25 9C17.25 13.3995 12 16.75 12 16.75C12 16.75 6.75 13.3995 6.75 9C6.75 6.10051 9.10051 3.75 12 3.75C14.8995 3.75 17.25 6.10051 17.25 9Z" })
1745
- ] }) }),
1746
- pay: /* @__PURE__ */ u(I, { children: [
1747
- /* @__PURE__ */ u("path", { d: "M16.8 16.8a6.78 6.78 0 1 1 0-9.6M12 16v-1M12 9V8" }),
1748
- /* @__PURE__ */ u("path", { d: "M10 14c.3.7 1 1 2 1 2.6 0 2.7-3 0-3s-2.7-3 0-3c1 0 1.7.4 2 1" })
1749
- ] }),
1750
- sunset: /* @__PURE__ */ u(I, { children: [
1751
- /* @__PURE__ */ u("path", { d: "M18.5 8.5L17.5 9.5" }),
1752
- /* @__PURE__ */ u("path", { d: "M5.5 8.5L6.5 9.5" }),
1753
- /* @__PURE__ */ u("path", { d: "M12 6L12 7.5" }),
1754
- /* @__PURE__ */ u("path", { d: "M7.5 15.25L7.5 14.25C7.5 13.6591 7.6164 13.0739 7.84254 12.5279C8.06869 11.982 8.40016 11.4859 8.81802 11.068C9.23588 10.6502 9.73196 10.3187 10.2779 10.0925C10.8239 9.8664 11.4091 9.75 12 9.75C12.5909 9.75 13.1761 9.8664 13.7221 10.0925C14.268 10.3187 14.7641 10.6502 15.182 11.068C15.5998 11.4859 15.9313 11.982 16.1575 12.5279C16.3836 13.0739 16.5 13.6591 16.5 14.25V15.25" }),
1755
- /* @__PURE__ */ u("path", { d: "M20.25 15.25H12H3.75" }),
1756
- /* @__PURE__ */ u("path", { d: "M16.25 18.25H12L7.75 18.25" })
1757
- ] }),
1758
- x: /* @__PURE__ */ u("path", { d: "M8 8l8 8M8 16l8 -8" }),
1759
- plus: /* @__PURE__ */ u("path", { d: "M12 8V16M8 12H16" }),
1760
- "chevron-right": /* @__PURE__ */ u("path", { d: "M11 8L15 12L11 16" }),
1761
- ai: /* @__PURE__ */ u(
1762
- "path",
1763
- {
1764
- d: "M8.3 14.5c3.4 0 5.2-1.7 5.2-5.2 0 3.5 1.8 5.2 5.3 5.2-3.6 0-5.3 1.7-5.3 5.1 0-3.4-1.8-5.1-5.3-5.1ZM5 7.5c2.3 0 3.5-1.2 3.5-3.5 0 2.3 1.2 3.4 3.5 3.4-2.3 0-3.5 1.2-3.5 3.5 0-2.3-1.2-3.5-3.5-3.5Z",
1765
- fill: "currentColor"
1766
- }
1767
- ),
1768
- "target-location": /* @__PURE__ */ u(I, { children: [
1769
- /* @__PURE__ */ u("circle", { cx: "12", cy: "12", r: "0.75" }),
1770
- /* @__PURE__ */ u("circle", { cx: "12", cy: "12", r: "5.75" }),
1771
- /* @__PURE__ */ u("path", { d: "M12 4.25V6.25" }),
1772
- /* @__PURE__ */ u("path", { d: "M12 17.75V19.75" }),
1773
- /* @__PURE__ */ u("path", { d: "M4.25 12L6.25 12" }),
1774
- /* @__PURE__ */ u("path", { d: "M17.75 12L19.75 12" })
1775
- ] }),
1776
- warning: /* @__PURE__ */ u(
1777
- "path",
1778
- {
1779
- fill: "currentColor",
1780
- stroke: "none",
1781
- d: "M12 20.4C16.63 20.4 20.4 16.64 20.4 12C20.4 7.36 16.64 3.6 12.0 3.6C7.36 3.6 3.6 7.36 3.6 12C3.6 16.64 7.36 20.4 12 20.4ZM10.8 12.6V7.8H13.2V12.6H10.8ZM10.8 16.8V14.4H13.2V16.8H10.8Z"
1782
- }
1783
- )
1784
- }, Xs = ({ theme: e }) => /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", style: { display: "none" }, children: /* @__PURE__ */ u("defs", { children: Object.entries(fa).map(([t, n]) => {
1785
- var r;
1786
- return /* @__PURE__ */ u("symbol", { id: `i-icon-${t}`, children: /* @__PURE__ */ u(
1787
- "g",
1788
- {
1789
- fill: "none",
1790
- "stroke-width": e.mode === "dark" && ((r = e.accessibility) == null ? void 0 : r.highContrast) !== !0 ? "1" : "1.5",
1791
- "stroke-linecap": "round",
1792
- "stroke-linejoin": "round",
1793
- stroke: "currentColor",
1794
- children: n
1795
- }
1796
- ) }, t);
1797
- }) }) }), ye = ({ name: e, ...t }) => /* @__PURE__ */ u("svg", { viewBox: "0 0 24 24", width: 24, height: 24, ...t, children: /* @__PURE__ */ u("use", { href: `#i-icon-${e}` }) }), _a = (e) => {
1798
- const [t, n] = j(!1);
1799
- return ee(() => {
1800
- if (typeof window > "u")
1801
- return;
1802
- const r = window.matchMedia(e), o = () => n(r.matches);
1803
- return o(), r.addEventListener("change", o), () => r.removeEventListener("change", o);
1804
- }, [e]), t;
1805
- }, el = (e, { minViewTime: t = 1e3, visibilityThreshold: n = 0, onView: r }) => {
1806
- const [o, a] = j(!1);
1807
- ee(() => {
1808
- if (o || !e.current)
1809
- return;
1810
- let s;
1811
- const l = new IntersectionObserver(
1812
- (c) => c.forEach((d) => {
1813
- clearTimeout(s), d.isIntersecting && (s = setTimeout(() => {
1814
- a(!0), r();
1815
- }, t));
1816
- }),
1817
- {
1818
- threshold: n
1819
- }
1820
- );
1821
- return l.observe(e.current), () => {
1822
- l.disconnect(), clearTimeout(s);
1823
- };
1824
- }, [e, t, n, r, o]);
1825
- };
1826
- function Rr(e, t) {
1827
- for (var n in t)
1828
- e[n] = t[n];
1829
- return e;
1830
- }
1831
- function At(e, t) {
1832
- for (var n in e)
1833
- if (n !== "__source" && !(n in t))
1834
- return !0;
1835
- for (var r in t)
1836
- if (r !== "__source" && e[r] !== t[r])
1837
- return !0;
1838
- return !1;
1839
- }
1840
- function mt(e, t) {
1841
- return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
1842
- }
1843
- function ot(e) {
1844
- this.props = e;
1845
- }
1846
- function Lr(e, t) {
1847
- function n(o) {
1848
- var a = this.props.ref, s = a == o.ref;
1849
- return !s && a && (a.call ? a(null) : a.current = null), t ? !t(this.props, o) || !s : At(this.props, o);
1850
- }
1851
- function r(o) {
1852
- return this.shouldComponentUpdate = n, X(e, o);
1853
- }
1854
- return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
1855
- }
1856
- (ot.prototype = new G()).isPureReactComponent = !0, ot.prototype.shouldComponentUpdate = function(e, t) {
1857
- return At(this.props, e) || At(this.state, t);
1858
- };
1859
- var Dn = w.__b;
1860
- w.__b = function(e) {
1861
- e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Dn && Dn(e);
1862
- };
1863
- var pa = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
1864
- function Zt(e) {
1865
- function t(n) {
1866
- var r = Rr({}, n);
1867
- return delete r.ref, e(r, n.ref || null);
1868
- }
1869
- return t.$$typeof = pa, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
1870
- }
1871
- var An = function(e, t) {
1872
- return e == null ? null : le(le(e).map(t));
1873
- }, Nr = { map: An, forEach: An, count: function(e) {
1874
- return e ? le(e).length : 0;
1875
- }, only: function(e) {
1876
- var t = le(e);
1877
- if (t.length !== 1)
1878
- throw "Children.only";
1879
- return t[0];
1880
- }, toArray: le }, ha = w.__e;
1881
- w.__e = function(e, t, n, r) {
1882
- if (e.then) {
1883
- for (var o, a = t; a = a.__; )
1884
- if ((o = a.__c) && o.__c)
1885
- return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
1886
- }
1887
- ha(e, t, n, r);
1888
- };
1889
- var In = w.unmount;
1890
- function Dr(e, t, n) {
1891
- return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
1892
- typeof r.__c == "function" && r.__c();
1893
- }), e.__c.__H = null), (e = Rr({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
1894
- return Dr(r, t, n);
1895
- })), e;
1896
- }
1897
- function Ar(e, t, n) {
1898
- return e && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
1899
- return Ar(r, t, n);
1900
- }), e.__c && e.__c.__P === t && (e.__e && n.insertBefore(e.__e, e.__d), e.__c.__e = !0, e.__c.__P = n)), e;
1901
- }
1902
- function Ve() {
1903
- this.__u = 0, this.t = null, this.__b = null;
1904
- }
1905
- function Ir(e) {
1906
- var t = e.__.__c;
1907
- return t && t.__a && t.__a(e);
1908
- }
1909
- function Mr(e) {
1910
- var t, n, r;
1911
- function o(a) {
1912
- if (t || (t = e()).then(function(s) {
1913
- n = s.default || s;
1914
- }, function(s) {
1915
- r = s;
1916
- }), r)
1917
- throw r;
1918
- if (!n)
1919
- throw t;
1920
- return X(n, a);
1921
- }
1922
- return o.displayName = "Lazy", o.__f = !0, o;
1923
- }
1924
- function Le() {
1925
- this.u = null, this.o = null;
1926
- }
1927
- w.unmount = function(e) {
1928
- var t = e.__c;
1929
- t && t.__R && t.__R(), t && e.__h === !0 && (e.type = null), In && In(e);
1930
- }, (Ve.prototype = new G()).__c = function(e, t) {
1931
- var n = t.__c, r = this;
1932
- r.t == null && (r.t = []), r.t.push(n);
1933
- var o = Ir(r.__v), a = !1, s = function() {
1934
- a || (a = !0, n.__R = null, o ? o(l) : l());
1935
- };
1936
- n.__R = s;
1937
- var l = function() {
1938
- if (!--r.__u) {
1939
- if (r.state.__a) {
1940
- var d = r.state.__a;
1941
- r.__v.__k[0] = Ar(d, d.__c.__P, d.__c.__O);
1942
- }
1943
- var f;
1944
- for (r.setState({ __a: r.__b = null }); f = r.t.pop(); )
1945
- f.forceUpdate();
1946
- }
1947
- }, c = t.__h === !0;
1948
- r.__u++ || c || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(s, s);
1949
- }, Ve.prototype.componentWillUnmount = function() {
1950
- this.t = [];
1951
- }, Ve.prototype.render = function(e, t) {
1952
- if (this.__b) {
1953
- if (this.__v.__k) {
1954
- var n = document.createElement("div"), r = this.__v.__k[0].__c;
1955
- this.__v.__k[0] = Dr(this.__b, n, r.__O = r.__P);
1956
- }
1957
- this.__b = null;
1958
- }
1959
- var o = t.__a && X(I, null, e.fallback);
1960
- return o && (o.__h = null), [X(I, null, t.__a ? null : e.children), o];
1961
- };
1962
- var Mn = function(e, t, n) {
1963
- if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size))
1964
- for (n = e.u; n; ) {
1965
- for (; n.length > 3; )
1966
- n.pop()();
1967
- if (n[1] < n[0])
1968
- break;
1969
- e.u = n = n[2];
1970
- }
1971
- };
1972
- function ya(e) {
1973
- return this.getChildContext = function() {
1974
- return e.context;
1975
- }, e.children;
1976
- }
1977
- function ga(e) {
1978
- var t = this, n = e.i;
1979
- t.componentWillUnmount = function() {
1980
- $e(null, t.l), t.l = null, t.i = null;
1981
- }, t.i && t.i !== n && t.componentWillUnmount(), e.__v ? (t.l || (t.i = n, t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r) {
1982
- this.childNodes.push(r), t.i.appendChild(r);
1983
- }, insertBefore: function(r, o) {
1984
- this.childNodes.push(r), t.i.appendChild(r);
1985
- }, removeChild: function(r) {
1986
- this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
1987
- } }), $e(X(ya, { context: t.context }, e.__v), t.l)) : t.l && t.componentWillUnmount();
1988
- }
1989
- function Pr(e, t) {
1990
- var n = X(ga, { __v: e, i: t });
1991
- return n.containerInfo = t, n;
1992
- }
1993
- (Le.prototype = new G()).__a = function(e) {
1994
- var t = this, n = Ir(t.__v), r = t.o.get(e);
1995
- return r[0]++, function(o) {
1996
- var a = function() {
1997
- t.props.revealOrder ? (r.push(o), Mn(t, e, r)) : o();
1998
- };
1999
- n ? n(a) : a();
2000
- };
2001
- }, Le.prototype.render = function(e) {
2002
- this.u = null, this.o = /* @__PURE__ */ new Map();
2003
- var t = le(e.children);
2004
- e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
2005
- for (var n = t.length; n--; )
2006
- this.o.set(t[n], this.u = [1, 0, this.u]);
2007
- return e.children;
2008
- }, Le.prototype.componentDidUpdate = Le.prototype.componentDidMount = function() {
2009
- var e = this;
2010
- this.o.forEach(function(t, n) {
2011
- Mn(e, n, t);
2012
- });
2013
- };
2014
- var jr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, va = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, ma = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ba = /[A-Z0-9]/g, Ea = typeof document < "u", wa = function(e) {
2015
- return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
2016
- };
2017
- function Vr(e, t, n) {
2018
- return t.__k == null && (t.textContent = ""), $e(e, t), typeof n == "function" && n(), e ? e.__c : null;
2019
- }
2020
- function $r(e, t, n) {
2021
- return _r(e, t), typeof n == "function" && n(), e ? e.__c : null;
2022
- }
2023
- G.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
2024
- Object.defineProperty(G.prototype, e, { configurable: !0, get: function() {
2025
- return this["UNSAFE_" + e];
2026
- }, set: function(t) {
2027
- Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
2028
- } });
2029
- });
2030
- var Pn = w.event;
2031
- function Sa() {
2032
- }
2033
- function Ca() {
2034
- return this.cancelBubble;
2035
- }
2036
- function xa() {
2037
- return this.defaultPrevented;
2038
- }
2039
- w.event = function(e) {
2040
- return Pn && (e = Pn(e)), e.persist = Sa, e.isPropagationStopped = Ca, e.isDefaultPrevented = xa, e.nativeEvent = e;
2041
- };
2042
- var Yt, Ta = { enumerable: !1, configurable: !0, get: function() {
2043
- return this.class;
2044
- } }, jn = w.vnode;
2045
- w.vnode = function(e) {
2046
- typeof e.type == "string" && function(t) {
2047
- var n = t.props, r = t.type, o = {};
2048
- for (var a in n) {
2049
- var s = n[a];
2050
- if (!(a === "value" && "defaultValue" in n && s == null || Ea && a === "children" && r === "noscript" || a === "class" || a === "className")) {
2051
- var l = a.toLowerCase();
2052
- a === "defaultValue" && "value" in n && n.value == null ? a = "value" : a === "download" && s === !0 ? s = "" : l === "ondoubleclick" ? a = "ondblclick" : l !== "onchange" || r !== "input" && r !== "textarea" || wa(n.type) ? l === "onfocus" ? a = "onfocusin" : l === "onblur" ? a = "onfocusout" : ma.test(a) ? a = l : r.indexOf("-") === -1 && va.test(a) ? a = a.replace(ba, "-$&").toLowerCase() : s === null && (s = void 0) : l = a = "oninput", l === "oninput" && o[a = l] && (a = "oninputCapture"), o[a] = s;
2053
- }
2054
- }
2055
- r == "select" && o.multiple && Array.isArray(o.value) && (o.value = le(n.children).forEach(function(c) {
2056
- c.props.selected = o.value.indexOf(c.props.value) != -1;
2057
- })), r == "select" && o.defaultValue != null && (o.value = le(n.children).forEach(function(c) {
2058
- c.props.selected = o.multiple ? o.defaultValue.indexOf(c.props.value) != -1 : o.defaultValue == c.props.value;
2059
- })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", Ta)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
2060
- }(e), e.$$typeof = jr, jn && jn(e);
2061
- };
2062
- var Vn = w.__r;
2063
- w.__r = function(e) {
2064
- Vn && Vn(e), Yt = e.__c;
2065
- };
2066
- var $n = w.diffed;
2067
- w.diffed = function(e) {
2068
- $n && $n(e);
2069
- var t = e.props, n = e.__e;
2070
- n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Yt = null;
2071
- };
2072
- var Ur = { ReactCurrentDispatcher: { current: { readContext: function(e) {
2073
- return Yt.__n[e.__c].props.value;
2074
- } } } }, ka = "17.0.2";
2075
- function Hr(e) {
2076
- return X.bind(null, e);
2077
- }
2078
- function Jt(e) {
2079
- return !!e && e.$$typeof === jr;
2080
- }
2081
- function Fr(e) {
2082
- return Jt(e) ? Do.apply(null, arguments) : e;
2083
- }
2084
- function Wr(e) {
2085
- return !!e.__k && ($e(null, e), !0);
2086
- }
2087
- function zr(e) {
2088
- return e && (e.base || e.nodeType === 1 && e) || null;
2089
- }
2090
- var Br = function(e, t) {
2091
- return e(t);
2092
- }, qr = function(e, t) {
2093
- return e(t);
2094
- }, Gr = I;
2095
- function Qt(e) {
2096
- e();
2097
- }
2098
- function Kr(e) {
2099
- return e;
2100
- }
2101
- function Zr() {
2102
- return [!1, Qt];
2103
- }
2104
- var Yr = Ce;
2105
- function Jr(e, t) {
2106
- var n = t(), r = j({ h: { __: n, v: t } }), o = r[0].h, a = r[1];
2107
- return Ce(function() {
2108
- o.__ = n, o.v = t, mt(o.__, t()) || a({ h: o });
2109
- }, [e, n, t]), ee(function() {
2110
- return mt(o.__, o.v()) || a({ h: o }), e(function() {
2111
- mt(o.__, o.v()) || a({ h: o });
2112
- });
2113
- }, [e]), n;
2114
- }
2115
- var ct = { useState: j, useId: Gt, useReducer: Bt, useEffect: ee, useLayoutEffect: Ce, useInsertionEffect: Yr, useTransition: Zr, useDeferredValue: Kr, useSyncExternalStore: Jr, startTransition: Qt, useRef: q, useImperativeHandle: Tr, useMemo: be, useCallback: je, useContext: lt, useDebugValue: qt, version: "17.0.2", Children: Nr, render: Vr, hydrate: $r, unmountComponentAtNode: Wr, createPortal: Pr, createElement: X, createContext: it, createFactory: Hr, cloneElement: Fr, createRef: ir, Fragment: I, isValidElement: Jt, findDOMNode: zr, Component: G, PureComponent: ot, memo: Lr, forwardRef: Zt, flushSync: qr, unstable_batchedUpdates: Br, StrictMode: Gr, Suspense: Ve, SuspenseList: Le, lazy: Mr, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ur };
2116
- const Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2117
- __proto__: null,
2118
- Children: Nr,
2119
- Component: G,
2120
- Fragment: I,
2121
- PureComponent: ot,
2122
- StrictMode: Gr,
2123
- Suspense: Ve,
2124
- SuspenseList: Le,
2125
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ur,
2126
- cloneElement: Fr,
2127
- createContext: it,
2128
- createElement: X,
2129
- createFactory: Hr,
2130
- createPortal: Pr,
2131
- createRef: ir,
2132
- default: ct,
2133
- findDOMNode: zr,
2134
- flushSync: qr,
2135
- forwardRef: Zt,
2136
- hydrate: $r,
2137
- isValidElement: Jt,
2138
- lazy: Mr,
2139
- memo: Lr,
2140
- render: Vr,
2141
- startTransition: Qt,
2142
- unmountComponentAtNode: Wr,
2143
- unstable_batchedUpdates: Br,
2144
- useCallback: je,
2145
- useContext: lt,
2146
- useDebugValue: qt,
2147
- useDeferredValue: Kr,
2148
- useEffect: ee,
2149
- useErrorBoundary: sa,
2150
- useId: Gt,
2151
- useImperativeHandle: Tr,
2152
- useInsertionEffect: Yr,
2153
- useLayoutEffect: Ce,
2154
- useMemo: be,
2155
- useReducer: Bt,
2156
- useRef: q,
2157
- useState: j,
2158
- useSyncExternalStore: Jr,
2159
- useTransition: Zr,
2160
- version: ka
2161
- }, Symbol.toStringTag, { value: "Module" }));
2162
- var Ze = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2163
- function Ra(e) {
2164
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
2165
- }
2166
- function La(e) {
2167
- if (e.__esModule)
2168
- return e;
2169
- var t = e.default;
2170
- if (typeof t == "function") {
2171
- var n = function r() {
2172
- return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
2173
- };
2174
- n.prototype = t.prototype;
2175
- } else
2176
- n = {};
2177
- return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
2178
- var o = Object.getOwnPropertyDescriptor(e, r);
2179
- Object.defineProperty(n, r, o.get ? o : {
2180
- enumerable: !0,
2181
- get: function() {
2182
- return e[r];
2183
- }
2184
- });
2185
- }), n;
2186
- }
2187
- var It = { exports: {} }, bt = {};
2188
- const Qr = /* @__PURE__ */ La(Oa);
2189
- /**
2190
- * @license React
2191
- * use-sync-external-store-shim.production.min.js
2192
- *
2193
- * Copyright (c) Facebook, Inc. and its affiliates.
2194
- *
2195
- * This source code is licensed under the MIT license found in the
2196
- * LICENSE file in the root directory of this source tree.
2197
- */
2198
- var Un;
2199
- function Na() {
2200
- if (Un)
2201
- return bt;
2202
- Un = 1;
2203
- var e = Qr;
2204
- function t(i, p) {
2205
- return i === p && (i !== 0 || 1 / i === 1 / p) || i !== i && p !== p;
2206
- }
2207
- var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, a = e.useLayoutEffect, s = e.useDebugValue;
2208
- function l(i, p) {
2209
- var y = p(), _ = r({ inst: { value: y, getSnapshot: p } }), h = _[0].inst, C = _[1];
2210
- return a(function() {
2211
- h.value = y, h.getSnapshot = p, c(h) && C({ inst: h });
2212
- }, [i, y, p]), o(function() {
2213
- return c(h) && C({ inst: h }), i(function() {
2214
- c(h) && C({ inst: h });
2215
- });
2216
- }, [i]), s(y), y;
2217
- }
2218
- function c(i) {
2219
- var p = i.getSnapshot;
2220
- i = i.value;
2221
- try {
2222
- var y = p();
2223
- return !n(i, y);
2224
- } catch {
2225
- return !0;
2226
- }
2227
- }
2228
- function d(i, p) {
2229
- return p();
2230
- }
2231
- var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : l;
2232
- return bt.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, bt;
2233
- }
2234
- var Et = {};
2235
- /**
2236
- * @license React
2237
- * use-sync-external-store-shim.development.js
2238
- *
2239
- * Copyright (c) Facebook, Inc. and its affiliates.
2240
- *
2241
- * This source code is licensed under the MIT license found in the
2242
- * LICENSE file in the root directory of this source tree.
2243
- */
2244
- var Hn;
2245
- function Da() {
2246
- return Hn || (Hn = 1, process.env.NODE_ENV !== "production" && function() {
2247
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2248
- var e = Qr, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2249
- function n(S) {
2250
- {
2251
- for (var v = arguments.length, b = new Array(v > 1 ? v - 1 : 0), m = 1; m < v; m++)
2252
- b[m - 1] = arguments[m];
2253
- r("error", S, b);
2254
- }
2255
- }
2256
- function r(S, v, b) {
2257
- {
2258
- var m = t.ReactDebugCurrentFrame, k = m.getStackAddendum();
2259
- k !== "" && (v += "%s", b = b.concat([k]));
2260
- var x = b.map(function(T) {
2261
- return String(T);
2262
- });
2263
- x.unshift("Warning: " + v), Function.prototype.apply.call(console[S], console, x);
2264
- }
2265
- }
2266
- function o(S, v) {
2267
- return S === v && (S !== 0 || 1 / S === 1 / v) || S !== S && v !== v;
2268
- }
2269
- var a = typeof Object.is == "function" ? Object.is : o, s = e.useState, l = e.useEffect, c = e.useLayoutEffect, d = e.useDebugValue, f = !1, i = !1;
2270
- function p(S, v, b) {
2271
- f || e.startTransition !== void 0 && (f = !0, n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
2272
- var m = v();
2273
- if (!i) {
2274
- var k = v();
2275
- a(m, k) || (n("The result of getSnapshot should be cached to avoid an infinite loop"), i = !0);
2276
- }
2277
- var x = s({
2278
- inst: {
2279
- value: m,
2280
- getSnapshot: v
2281
- }
2282
- }), T = x[0].inst, O = x[1];
2283
- return c(function() {
2284
- T.value = m, T.getSnapshot = v, y(T) && O({
2285
- inst: T
2286
- });
2287
- }, [S, m, v]), l(function() {
2288
- y(T) && O({
2289
- inst: T
2290
- });
2291
- var U = function() {
2292
- y(T) && O({
2293
- inst: T
2294
- });
2295
- };
2296
- return S(U);
2297
- }, [S]), d(m), m;
2298
- }
2299
- function y(S) {
2300
- var v = S.getSnapshot, b = S.value;
2301
- try {
2302
- var m = v();
2303
- return !a(b, m);
2304
- } catch {
2305
- return !0;
2306
- }
2307
- }
2308
- function _(S, v, b) {
2309
- return v();
2310
- }
2311
- var h = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", C = !h, g = C ? _ : p, E = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : g;
2312
- Et.useSyncExternalStore = E, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
2313
- }()), Et;
2314
- }
2315
- process.env.NODE_ENV === "production" ? It.exports = Na() : It.exports = Da();
2316
- var Aa = It.exports;
2317
- const pe = () => {
2318
- }, W = (
2319
- /*#__NOINLINE__*/
2320
- pe()
2321
- ), wt = Object, R = (e) => e === W, Q = (e) => typeof e == "function", ge = (e, t) => ({
2322
- ...e,
2323
- ...t
2324
- }), Ia = (e) => Q(e.then), Ye = /* @__PURE__ */ new WeakMap();
2325
- let Ma = 0;
2326
- const He = (e) => {
2327
- const t = typeof e, n = e && e.constructor, r = n == Date;
2328
- let o, a;
2329
- if (wt(e) === e && !r && n != RegExp) {
2330
- if (o = Ye.get(e), o)
2331
- return o;
2332
- if (o = ++Ma + "~", Ye.set(e, o), n == Array) {
2333
- for (o = "@", a = 0; a < e.length; a++)
2334
- o += He(e[a]) + ",";
2335
- Ye.set(e, o);
2336
- }
2337
- if (n == wt) {
2338
- o = "#";
2339
- const s = wt.keys(e).sort();
2340
- for (; !R(a = s.pop()); )
2341
- R(e[a]) || (o += a + ":" + He(e[a]) + ",");
2342
- Ye.set(e, o);
2343
- }
2344
- } else
2345
- o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
2346
- return o;
2347
- }, ae = /* @__PURE__ */ new WeakMap(), St = {}, Je = {}, Xt = "undefined", ut = typeof window != Xt, Mt = typeof document != Xt, Pa = () => ut && typeof window.requestAnimationFrame != Xt, Xr = (e, t) => {
2348
- const n = ae.get(e);
2349
- return [
2350
- // Getter
2351
- () => !R(t) && e.get(t) || St,
2352
- // Setter
2353
- (r) => {
2354
- if (!R(t)) {
2355
- const o = e.get(t);
2356
- t in Je || (Je[t] = o), n[5](t, ge(o, r), o || St);
2357
- }
2358
- },
2359
- // Subscriber
2360
- n[6],
2361
- // Get server cache snapshot
2362
- () => !R(t) && t in Je ? Je[t] : !R(t) && e.get(t) || St
2363
- ];
2364
- };
2365
- let Pt = !0;
2366
- const ja = () => Pt, [jt, Vt] = ut && window.addEventListener ? [
2367
- window.addEventListener.bind(window),
2368
- window.removeEventListener.bind(window)
2369
- ] : [
2370
- pe,
2371
- pe
2372
- ], Va = () => {
2373
- const e = Mt && document.visibilityState;
2374
- return R(e) || e !== "hidden";
2375
- }, $a = (e) => (Mt && document.addEventListener("visibilitychange", e), jt("focus", e), () => {
2376
- Mt && document.removeEventListener("visibilitychange", e), Vt("focus", e);
2377
- }), Ua = (e) => {
2378
- const t = () => {
2379
- Pt = !0, e();
2380
- }, n = () => {
2381
- Pt = !1;
2382
- };
2383
- return jt("online", t), jt("offline", n), () => {
2384
- Vt("online", t), Vt("offline", n);
2385
- };
2386
- }, Ha = {
2387
- isOnline: ja,
2388
- isVisible: Va
2389
- }, Fa = {
2390
- initFocus: $a,
2391
- initReconnect: Ua
2392
- }, Fn = !ct.useId, Fe = !ut || "Deno" in window, Wa = (e) => Pa() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Ct = Fe ? ee : Ce, xt = typeof navigator < "u" && navigator.connection, Wn = !Fe && xt && ([
2393
- "slow-2g",
2394
- "2g"
2395
- ].includes(xt.effectiveType) || xt.saveData), en = (e) => {
2396
- if (Q(e))
2397
- try {
2398
- e = e();
2399
- } catch {
2400
- e = "";
2401
- }
2402
- const t = e;
2403
- return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? He(e) : "", [
2404
- e,
2405
- t
2406
- ];
2407
- };
2408
- let za = 0;
2409
- const $t = () => ++za, eo = 0, to = 1, no = 2, Ba = 3;
2410
- var Ie = {
2411
- __proto__: null,
2412
- ERROR_REVALIDATE_EVENT: Ba,
2413
- FOCUS_EVENT: eo,
2414
- MUTATE_EVENT: no,
2415
- RECONNECT_EVENT: to
2416
- };
2417
- async function ro(...e) {
2418
- const [t, n, r, o] = e, a = ge({
2419
- populateCache: !0,
2420
- throwOnError: !0
2421
- }, typeof o == "boolean" ? {
2422
- revalidate: o
2423
- } : o || {});
2424
- let s = a.populateCache;
2425
- const l = a.rollbackOnError;
2426
- let c = a.optimisticData;
2427
- const d = (p) => typeof l == "function" ? l(p) : l !== !1, f = a.throwOnError;
2428
- if (Q(n)) {
2429
- const p = n, y = [], _ = t.keys();
2430
- for (const h of _)
2431
- // Skip the special useSWRInfinite and useSWRSubscription keys.
2432
- !/^\$(inf|sub)\$/.test(h) && p(t.get(h)._k) && y.push(h);
2433
- return Promise.all(y.map(i));
2434
- }
2435
- return i(n);
2436
- async function i(p) {
2437
- const [y] = en(p);
2438
- if (!y)
2439
- return;
2440
- const [_, h] = Xr(t, y), [C, g, E, S] = ae.get(t), v = () => {
2441
- const H = C[y];
2442
- return (Q(a.revalidate) ? a.revalidate(_().data, p) : a.revalidate !== !1) && (delete E[y], delete S[y], H && H[0]) ? H[0](no).then(() => _().data) : _().data;
2443
- };
2444
- if (e.length < 3)
2445
- return v();
2446
- let b = r, m;
2447
- const k = $t();
2448
- g[y] = [
2449
- k,
2450
- 0
2451
- ];
2452
- const x = !R(c), T = _(), O = T.data, U = T._c, K = R(U) ? O : U;
2453
- if (x && (c = Q(c) ? c(K, O) : c, h({
2454
- data: c,
2455
- _c: K
2456
- })), Q(b))
2457
- try {
2458
- b = b(K);
2459
- } catch (H) {
2460
- m = H;
2461
- }
2462
- if (b && Ia(b))
2463
- if (b = await b.catch((H) => {
2464
- m = H;
2465
- }), k !== g[y][0]) {
2466
- if (m)
2467
- throw m;
2468
- return b;
2469
- } else
2470
- m && x && d(m) && (s = !0, h({
2471
- data: K,
2472
- _c: W
2473
- }));
2474
- if (s && !m)
2475
- if (Q(s)) {
2476
- const H = s(b, K);
2477
- h({
2478
- data: H,
2479
- error: W,
2480
- _c: W
2481
- });
2482
- } else
2483
- h({
2484
- data: b,
2485
- error: W,
2486
- _c: W
2487
- });
2488
- if (g[y][1] = $t(), Promise.resolve(v()).then(() => {
2489
- h({
2490
- _c: W
2491
- });
2492
- }), m) {
2493
- if (f)
2494
- throw m;
2495
- return;
2496
- }
2497
- return b;
2498
- }
2499
- }
2500
- const zn = (e, t) => {
2501
- for (const n in e)
2502
- e[n][0] && e[n][0](t);
2503
- }, qa = (e, t) => {
2504
- if (!ae.has(e)) {
2505
- const n = ge(Fa, t), r = {}, o = ro.bind(W, e);
2506
- let a = pe;
2507
- const s = {}, l = (f, i) => {
2508
- const p = s[f] || [];
2509
- return s[f] = p, p.push(i), () => p.splice(p.indexOf(i), 1);
2510
- }, c = (f, i, p) => {
2511
- e.set(f, i);
2512
- const y = s[f];
2513
- if (y)
2514
- for (const _ of y)
2515
- _(i, p);
2516
- }, d = () => {
2517
- if (!ae.has(e) && (ae.set(e, [
2518
- r,
2519
- {},
2520
- {},
2521
- {},
2522
- o,
2523
- c,
2524
- l
2525
- ]), !Fe)) {
2526
- const f = n.initFocus(setTimeout.bind(W, zn.bind(W, r, eo))), i = n.initReconnect(setTimeout.bind(W, zn.bind(W, r, to)));
2527
- a = () => {
2528
- f && f(), i && i(), ae.delete(e);
2529
- };
2530
- }
2531
- };
2532
- return d(), [
2533
- e,
2534
- o,
2535
- d,
2536
- a
2537
- ];
2538
- }
2539
- return [
2540
- e,
2541
- ae.get(e)[4]
2542
- ];
2543
- }, Ga = (e, t, n, r, o) => {
2544
- const a = n.errorRetryCount, s = o.retryCount, l = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * n.errorRetryInterval;
2545
- !R(a) && s > a || setTimeout(r, l, o);
2546
- }, Ka = (e, t) => He(e) == He(t), [oo, Za] = qa(/* @__PURE__ */ new Map()), Ya = ge(
2547
- {
2548
- // events
2549
- onLoadingSlow: pe,
2550
- onSuccess: pe,
2551
- onError: pe,
2552
- onErrorRetry: Ga,
2553
- onDiscarded: pe,
2554
- // switches
2555
- revalidateOnFocus: !0,
2556
- revalidateOnReconnect: !0,
2557
- revalidateIfStale: !0,
2558
- shouldRetryOnError: !0,
2559
- // timeouts
2560
- errorRetryInterval: Wn ? 1e4 : 5e3,
2561
- focusThrottleInterval: 5 * 1e3,
2562
- dedupingInterval: 2 * 1e3,
2563
- loadingTimeout: Wn ? 5e3 : 3e3,
2564
- // providers
2565
- compare: Ka,
2566
- isPaused: () => !1,
2567
- cache: oo,
2568
- mutate: Za,
2569
- fallback: {}
2570
- },
2571
- // use web preset by default
2572
- Ha
2573
- ), Ja = (e, t) => {
2574
- const n = ge(e, t);
2575
- if (t) {
2576
- const { use: r, fallback: o } = e, { use: a, fallback: s } = t;
2577
- r && a && (n.use = r.concat(a)), o && s && (n.fallback = ge(o, s));
2578
- }
2579
- return n;
2580
- }, Qa = it({}), Xa = "$inf$", ao = ut && window.__SWR_DEVTOOLS_USE__, ei = ao ? window.__SWR_DEVTOOLS_USE__ : [], ti = () => {
2581
- ao && (window.__SWR_DEVTOOLS_REACT__ = ct);
2582
- }, ni = (e) => Q(e[1]) ? [
2583
- e[0],
2584
- e[1],
2585
- e[2] || {}
2586
- ] : [
2587
- e[0],
2588
- null,
2589
- (e[1] === null ? e[2] : e[1]) || {}
2590
- ], ri = () => ge(Ya, lt(Qa)), oi = (e) => (t, n, r) => e(t, n && ((...a) => {
2591
- const [s] = en(t), [, , , l] = ae.get(oo);
2592
- if (s.startsWith(Xa))
2593
- return n(...a);
2594
- const c = l[s];
2595
- return R(c) ? n(...a) : (delete l[s], c);
2596
- }), r), ai = ei.concat(oi), ii = (e) => function(...n) {
2597
- const r = ri(), [o, a, s] = ni(n), l = Ja(r, s);
2598
- let c = e;
2599
- const { use: d } = l, f = (d || []).concat(ai);
2600
- for (let i = f.length; i--; )
2601
- c = f[i](c);
2602
- return c(o, a || l.fetcher || null, l);
2603
- }, si = (e, t, n) => {
2604
- const r = t[e] || (t[e] = []);
2605
- return r.push(n), () => {
2606
- const o = r.indexOf(n);
2607
- o >= 0 && (r[o] = r[r.length - 1], r.pop());
2608
- };
2609
- };
2610
- ti();
2611
- const Bn = ct.use || ((e) => {
2612
- if (e.status === "pending")
2613
- throw e;
2614
- if (e.status === "fulfilled")
2615
- return e.value;
2616
- throw e.status === "rejected" ? e.reason : (e.status = "pending", e.then((t) => {
2617
- e.status = "fulfilled", e.value = t;
2618
- }, (t) => {
2619
- e.status = "rejected", e.reason = t;
2620
- }), e);
2621
- }), Tt = {
2622
- dedupe: !0
2623
- }, li = (e, t, n) => {
2624
- const { cache: r, compare: o, suspense: a, fallbackData: s, revalidateOnMount: l, revalidateIfStale: c, refreshInterval: d, refreshWhenHidden: f, refreshWhenOffline: i, keepPreviousData: p } = n, [y, _, h, C] = ae.get(r), [g, E] = en(e), S = q(!1), v = q(!1), b = q(g), m = q(t), k = q(n), x = () => k.current, T = () => x().isVisible() && x().isOnline(), [O, U, K, H] = Xr(r, g), ue = q({}).current, qe = R(s) ? n.fallback[g] : s, tn = (D, A) => {
2625
- for (const $ in ue) {
2626
- const M = $;
2627
- if (M === "data") {
2628
- if (!o(D[M], A[M]) && (!R(D[M]) || !o(Ke, A[M])))
2629
- return !1;
2630
- } else if (A[M] !== D[M])
2631
- return !1;
2632
- }
2633
- return !0;
2634
- }, nn = be(() => {
2635
- const D = (() => !g || !t ? !1 : R(l) ? x().isPaused() || a ? !1 : R(c) ? !0 : c : l)(), A = (F) => {
2636
- const ne = ge(F);
2637
- return delete ne._k, D ? {
2638
- isValidating: !0,
2639
- isLoading: !0,
2640
- ...ne
2641
- } : ne;
2642
- }, $ = O(), M = H(), Z = A($), Re = $ === M ? Z : A(M);
2643
- let V = Z;
2644
- return [
2645
- () => {
2646
- const F = A(O());
2647
- return tn(F, V) ? (V.data = F.data, V.isLoading = F.isLoading, V.isValidating = F.isValidating, V.error = F.error, V) : (V = F, F);
2648
- },
2649
- () => Re
2650
- ];
2651
- }, [
2652
- r,
2653
- g
2654
- ]), Te = Aa.useSyncExternalStore(je(
2655
- (D) => K(g, (A, $) => {
2656
- tn($, A) || D();
2657
- }),
2658
- // eslint-disable-next-line react-hooks/exhaustive-deps
2659
- [
2660
- r,
2661
- g
2662
- ]
2663
- ), nn[0], nn[1]), rn = !S.current, yo = y[g] && y[g].length > 0, ke = Te.data, Oe = R(ke) ? qe : ke, Ge = Te.error, on = q(Oe), Ke = p ? R(ke) ? on.current : ke : Oe, an = (() => yo && !R(Ge) ? !1 : rn && !R(l) ? l : x().isPaused() ? !1 : a ? R(Oe) ? !1 : c : R(Oe) || c)(), sn = !!(g && t && rn && an), go = R(Te.isValidating) ? sn : Te.isValidating, vo = R(Te.isLoading) ? sn : Te.isLoading, Ae = je(
2664
- async (D) => {
2665
- const A = m.current;
2666
- if (!g || !A || v.current || x().isPaused())
2667
- return !1;
2668
- let $, M, Z = !0;
2669
- const Re = D || {}, V = !h[g] || !Re.dedupe, F = () => Fn ? !v.current && g === b.current && S.current : g === b.current, ne = {
2670
- isValidating: !1,
2671
- isLoading: !1
2672
- }, cn = () => {
2673
- U(ne);
2674
- }, un = () => {
2675
- const B = h[g];
2676
- B && B[1] === M && delete h[g];
2677
- }, dn = {
2678
- isValidating: !0
2679
- };
2680
- R(O().data) && (dn.isLoading = !0);
2681
- try {
2682
- if (V && (U(dn), n.loadingTimeout && R(O().data) && setTimeout(() => {
2683
- Z && F() && x().onLoadingSlow(g, n);
2684
- }, n.loadingTimeout), h[g] = [
2685
- A(E),
2686
- $t()
2687
- ]), [$, M] = h[g], $ = await $, V && setTimeout(un, n.dedupingInterval), !h[g] || h[g][1] !== M)
2688
- return V && F() && x().onDiscarded(g), !1;
2689
- ne.error = W;
2690
- const B = _[g];
2691
- if (!R(B) && // case 1
2692
- (M <= B[0] || // case 2
2693
- M <= B[1] || // case 3
2694
- B[1] === 0))
2695
- return cn(), V && F() && x().onDiscarded(g), !1;
2696
- const re = O().data;
2697
- ne.data = o(re, $) ? re : $, V && F() && x().onSuccess($, g, n);
2698
- } catch (B) {
2699
- un();
2700
- const re = x(), { shouldRetryOnError: ft } = re;
2701
- re.isPaused() || (ne.error = B, V && F() && (re.onError(B, g, re), (ft === !0 || Q(ft) && ft(B)) && (!x().revalidateOnFocus || !x().revalidateOnReconnect || T()) && re.onErrorRetry(B, g, re, (mo) => {
2702
- const _t = y[g];
2703
- _t && _t[0] && _t[0](Ie.ERROR_REVALIDATE_EVENT, mo);
2704
- }, {
2705
- retryCount: (Re.retryCount || 0) + 1,
2706
- dedupe: !0
2707
- })));
2708
- }
2709
- return Z = !1, cn(), !0;
2710
- },
2711
- // `setState` is immutable, and `eventsCallback`, `fnArg`, and
2712
- // `keyValidating` are depending on `key`, so we can exclude them from
2713
- // the deps array.
2714
- //
2715
- // FIXME:
2716
- // `fn` and `config` might be changed during the lifecycle,
2717
- // but they might be changed every render like this.
2718
- // `useSWR('key', () => fetch('/api/'), { suspense: true })`
2719
- // So we omit the values from the deps array
2720
- // even though it might cause unexpected behaviors.
2721
- // eslint-disable-next-line react-hooks/exhaustive-deps
2722
- [
2723
- g,
2724
- r
2725
- ]
2726
- ), ln = je(
2727
- // Use callback to make sure `keyRef.current` returns latest result every time
2728
- (...D) => ro(r, b.current, ...D),
2729
- // eslint-disable-next-line react-hooks/exhaustive-deps
2730
- []
2731
- );
2732
- if (Ct(() => {
2733
- m.current = t, k.current = n, R(ke) || (on.current = ke);
2734
- }), Ct(() => {
2735
- if (!g)
2736
- return;
2737
- const D = Ae.bind(W, Tt);
2738
- let A = 0;
2739
- const M = si(g, y, (Z, Re = {}) => {
2740
- if (Z == Ie.FOCUS_EVENT) {
2741
- const V = Date.now();
2742
- x().revalidateOnFocus && V > A && T() && (A = V + x().focusThrottleInterval, D());
2743
- } else if (Z == Ie.RECONNECT_EVENT)
2744
- x().revalidateOnReconnect && T() && D();
2745
- else {
2746
- if (Z == Ie.MUTATE_EVENT)
2747
- return Ae();
2748
- if (Z == Ie.ERROR_REVALIDATE_EVENT)
2749
- return Ae(Re);
2750
- }
2751
- });
2752
- return v.current = !1, b.current = g, S.current = !0, U({
2753
- _k: E
2754
- }), an && (R(Oe) || Fe ? D() : Wa(D)), () => {
2755
- v.current = !0, M();
2756
- };
2757
- }, [
2758
- g
2759
- ]), Ct(() => {
2760
- let D;
2761
- function A() {
2762
- const M = Q(d) ? d(O().data) : d;
2763
- M && D !== -1 && (D = setTimeout($, M));
2764
- }
2765
- function $() {
2766
- !O().error && (f || x().isVisible()) && (i || x().isOnline()) ? Ae(Tt).then(A) : A();
2767
- }
2768
- return A(), () => {
2769
- D && (clearTimeout(D), D = -1);
2770
- };
2771
- }, [
2772
- d,
2773
- f,
2774
- i,
2775
- g
2776
- ]), qt(Ke), a && R(Oe) && g) {
2777
- if (!Fn && Fe)
2778
- throw new Error("Fallback data is required when using suspense in SSR.");
2779
- m.current = t, k.current = n, v.current = !1;
2780
- const D = C[g];
2781
- if (!R(D)) {
2782
- const A = ln(D);
2783
- Bn(A);
2784
- }
2785
- if (R(Ge)) {
2786
- const A = Ae(Tt);
2787
- R(Ke) || (A.status = "fulfilled", A.value = !0), Bn(A);
2788
- } else
2789
- throw Ge;
2790
- }
2791
- return {
2792
- mutate: ln,
2793
- get data() {
2794
- return ue.data = !0, Ke;
2795
- },
2796
- get error() {
2797
- return ue.error = !0, Ge;
2798
- },
2799
- get isValidating() {
2800
- return ue.isValidating = !0, go;
2801
- },
2802
- get isLoading() {
2803
- return ue.isLoading = !0, vo;
2804
- }
2805
- };
2806
- }, ci = ii(li), We = te({
2807
- base: "block fr font-style-tag font-family-tag font-weight-tag",
2808
- variants: {
2809
- variant: {
2810
- neutralWeak: "text-tag-neutral-weak-copy bg-tag-neutral-weak-bg border-solid border-px border-tag-neutral-weak-stroke",
2811
- neutralStrong: "text-tag-neutral-strong-copy bg-tag-neutral-strong-bg border-solid border-px border-tag-neutral-strong-stroke",
2812
- accentStrong: "text-tag-accent-strong-copy bg-tag-accent-strong-bg border-solid border-px border-tag-accent-strong-stroke",
2813
- monetaryWeak: "text-tag-monetary-weak-copy bg-tag-monetary-weak-bg border-solid border-px border-tag-monetary-weak-stroke"
2814
- },
2815
- interactive: {
2816
- true: "ease-expo-out rounded-interactive transition-all duration-snappy",
2817
- false: "rounded-tag"
2818
- },
2819
- size: {
2820
- xs: "px-2 py-0.5 text-style-tag",
2821
- sm: "px-3 py-1.5 text-style-tag",
2822
- lg: "px-5 py-2.5 text-style-tag",
2823
- unsized: ""
2824
- },
2825
- disabled: {
2826
- true: "opacity-25 pointer-events-none",
2827
- false: ""
2828
- }
2829
- },
2830
- compoundVariants: [{ disabled: !1, interactive: !0, class: "cursor-pointer active:scale-[0.975]" }],
2831
- defaultVariants: {
2832
- variant: "neutralWeak",
2833
- size: "sm",
2834
- disabled: !1,
2835
- interactive: !1
2836
- }
2837
- }), ui = ({ query: e, property: t, selectedValues: n }) => {
2838
- switch (e.queryState) {
2839
- case "idle":
2840
- case "error":
2841
- case "loading":
2842
- return null;
2843
- case "loaded":
2844
- case "revalidating": {
2845
- const o = (e.data[t.key] ?? []).filter((a) => n.includes(a.value));
2846
- switch (o.length) {
2847
- case 0:
2848
- return null;
2849
- case 1: {
2850
- const a = o[0];
2851
- return wo(a), /* @__PURE__ */ u("span", { class: We({ size: "sm", variant: "accentStrong", interactive: !0, class: "truncate" }), children: a.label });
2852
- }
2853
- default:
2854
- return /* @__PURE__ */ u(
2855
- "span",
2856
- {
2857
- class: We({
2858
- size: "sm",
2859
- variant: "accentStrong",
2860
- interactive: !0,
2861
- class: "ijs-filter-current max-w-full truncate tabular-nums"
2862
- }),
2863
- children: o.length
2864
- }
2865
- );
2866
- }
2867
- }
2868
- default:
2869
- Qe(e);
2870
- }
2871
- }, di = 44, fi = 6, _i = 12, pi = 8, dt = te({
2872
- base: "fr bg-lowest caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral placeholder:opacity-30 ring-width-section ease-expo-out duration-snappy transition-all disabled:opacity-50 rounded-input font-style-input text-style-input font-weight-input",
2873
- variants: {
2874
- hasValue: {
2875
- false: "text-copy-neutral ring-job-card-stroke",
2876
- true: "text-interactive-accent-text ring-job-card-stroke"
2877
- },
2878
- size: {
2879
- md: "py-2 px-4",
2880
- unsized: ""
2881
- }
2882
- },
2883
- defaultVariants: {
2884
- size: "md",
2885
- hasValue: !1
2886
- }
2887
- }), io = te({
2888
- base: "gutter-stable pointer-fine:flex-wrap pointer-fine:p-2 pointer-fine:bg-app pointer-fine:rounded-section pointer-coarse:overflow-x-auto flex max-w-full overflow-y-auto px-4",
2889
- variants: {
2890
- type: {
2891
- short: "gap-2 pointer-coarse:max-h-[var(--maxHeight)]",
2892
- long: "pointer-fine:flex-nowrap items-stretch pointer-fine:flex-col overflow-y-auto max-h-[var(--maxHeight)]"
2893
- },
2894
- ring: {
2895
- default: "pointer-fine:ring-width-section ring-section-weak-stroke",
2896
- unset: ""
2897
- }
2898
- },
2899
- defaultVariants: {
2900
- type: "short",
2901
- ring: "default"
2902
- }
2903
- }), so = te({
2904
- base: "max-w-full origin-top group/tag ease-expo-out transition-all duration-snappy",
2905
- variants: {
2906
- type: {
2907
- pill: "",
2908
- line: "[&:not(:last-child)]:border-b-px border-neutral-2 has-[[data-current-value=true]]:border-b-accent-3"
2909
- }
2910
- }
2911
- }), lo = te({
2912
- base: "cursor-pointer flex fr gap-2 font-style-tag group-[&:first-child]/tag:rounded-t-tag group-[&:last-child]/tag:rounded-b-tag py-2.5 px-2.5 font-family-tag font-weight-tag text-style-tag focus:relative w-full justify-between",
2913
- variants: {
2914
- active: {
2915
- true: "bg-accent-2 text-accent-11",
2916
- false: "text-neutral-11"
2917
- },
2918
- disabled: {
2919
- true: "opacity-25 pointer-events-none",
2920
- false: ""
2921
- }
2922
- },
2923
- compoundVariants: [
2924
- {
2925
- disabled: !1,
2926
- active: !1,
2927
- class: "hover:bg-neutral-2"
2928
- }
2929
- ],
2930
- defaultVariants: {
2931
- disabled: !1,
2932
- active: !1
2933
- }
2934
- }), hi = te({
2935
- base: "rounded-job-tag inline-block px-1 border-solid border-px ease-expo-out transition-all duration-snappy",
2936
- variants: {
2937
- colorScheme: {
2938
- accentStrong: "text-accent-11 bg-accent-4 border-tag-accent-strong-stroke",
2939
- neutralStrong: "text-neutral-11 bg-neutral-2 border-tag-neutral-strong-stroke"
2940
- }
2941
- }
2942
- }), yi = ({
2943
- children: e,
2944
- colorScheme: t
2945
- }) => /* @__PURE__ */ u("span", { class: hi({ colorScheme: t }), children: /* @__PURE__ */ u("span", { class: "block w-[3ch] text-center tabular-nums", children: e }) }), gi = (e, t) => {
2946
- const n = e.indexOf(t);
2947
- return n === -1 ? [...e, t] : e.filter((r, o) => o !== n);
2948
- }, qn = (e) => {
2949
- var n;
2950
- const t = Number((n = e.match(/\d/g)) == null ? void 0 : n.join(""));
2951
- return Number.isNaN(t) ? 0 : t;
2952
- }, vi = (e, t = {
2953
- by: "results-count",
2954
- order: "descending"
2955
- }) => {
2956
- const n = [...e];
2957
- switch (t.by) {
2958
- case "results-count":
2959
- n.sort((r, o) => r.jobs - o.jobs);
2960
- break;
2961
- case "alphabetically":
2962
- n.sort((r, o) => r.label.localeCompare(o.label));
2963
- break;
2964
- case "numerically":
2965
- n.sort((r, o) => {
2966
- const a = qn(r.value), s = qn(o.value);
2967
- return a - s;
2968
- });
2969
- break;
2970
- }
2971
- return t.order === "descending" && n.reverse(), n;
2972
- }, mi = (e, t) => {
2973
- if (e === null)
2974
- return !1;
2975
- const n = e[t.value];
2976
- return n === void 0 ? !0 : n === 0;
2977
- }, bi = (e, t) => {
2978
- const n = (r) => r > 99 ? "99+" : r.toString();
2979
- return n(e === null ? t.jobs : e[t.value] ?? 0);
2980
- }, Ei = ({
2981
- value: e,
2982
- property: t,
2983
- onSkip: n,
2984
- useQuery: r,
2985
- onValueChange: o,
2986
- unfilteredQuery: a,
2987
- onRender: s
2988
- }) => {
2989
- const { t: l } = xe(), c = Sr(r()), d = be(() => {
2990
- switch (c.queryState) {
2991
- case "error":
2992
- case "idle":
2993
- case "loading":
2994
- return null;
2995
- case "loaded":
2996
- case "revalidating": {
2997
- const h = c.data[t.key] ?? [];
2998
- return Object.fromEntries(h.map((C) => [C.value, C.jobs]));
2999
- }
3000
- default:
3001
- Qe(c);
3002
- }
3003
- }, [c, t.key]), f = co(e), i = f.length > 0, [p, y] = j(), _ = _a("(pointer: coarse)");
3004
- return ee(() => {
3005
- s();
3006
- }), c.queryState === "error" ? /* @__PURE__ */ u(
3007
- Nn,
3008
- {
3009
- error: new Error(l("filters_loading_error"), { cause: c.error }),
3010
- resetError: () => c.swr.mutate()
3011
- }
3012
- ) : /* @__PURE__ */ u("div", { class: "animate-slide-in-bottom flex w-full flex-col gap-2 pt-1", children: [
3013
- t.searchable && /* @__PURE__ */ u("div", { class: "top-0 px-4 py-1", children: /* @__PURE__ */ u(
3014
- "input",
3015
- {
3016
- type: "search",
3017
- class: dt(),
3018
- value: p,
3019
- onInput: (h) => y(h.currentTarget.value),
3020
- placeholder: l("type_to_search")
3021
- }
3022
- ) }),
3023
- (() => {
3024
- switch (a.queryState) {
3025
- case "error":
3026
- return /* @__PURE__ */ u(
3027
- Nn,
3028
- {
3029
- error: new Error(l("filters_loading_error"), {
3030
- cause: a.error
3031
- }),
3032
- resetError: () => a.swr.mutate()
3033
- }
3034
- );
3035
- case "idle":
3036
- case "loading":
3037
- return /* @__PURE__ */ u("div", { class: "flex px-4", children: /* @__PURE__ */ u(
3038
- "div",
3039
- {
3040
- "aria-hidden": !0,
3041
- class: We({
3042
- size: "lg",
3043
- variant: "neutralStrong",
3044
- interactive: !0,
3045
- class: "animate-skeleton cursor-default opacity-20 active:-scale-100"
3046
- }),
3047
- children: /* @__PURE__ */ u("span", { class: "inline-block w-[10ch]" })
3048
- }
3049
- ) });
3050
- case "revalidating":
3051
- case "loaded": {
3052
- const h = a.data[t.key] ?? [], C = p && p.length > 1 ? h.filter((b) => b.label.toLowerCase().includes(p.toLowerCase())) : h, g = [];
3053
- for (const b of C) {
3054
- if (b.label.length < 1)
3055
- continue;
3056
- const m = {
3057
- ...b,
3058
- results: bi(d, b),
3059
- disabled: mi(d, b)
3060
- };
3061
- switch (t.results) {
3062
- case "only-available":
3063
- m.disabled === !1 && g.push(m);
3064
- break;
3065
- default:
3066
- g.push(m);
3067
- }
3068
- }
3069
- if (!g.find((b) => !b.disabled))
3070
- return /* @__PURE__ */ u("p", { class: "font-style-tag text-style-tag font-weight-tag border-px w-full border-transparent px-4 py-2 text-center", children: l("no_filter_options_available") });
3071
- const v = (h.length > _i || h.some((b) => b.label.length > 24)) && !_;
3072
- return /* @__PURE__ */ u("div", { class: "pointer-fine:px-4", children: /* @__PURE__ */ u(
3073
- "ul",
3074
- {
3075
- style: {
3076
- "--maxHeight": `${di * (fi + 0.5) + 2 * pi}px`
3077
- },
3078
- class: io({
3079
- type: v ? "long" : "short"
3080
- }),
3081
- children: vi(g, t.sortSuggestions).map((b) => {
3082
- const m = f.includes(b.value);
3083
- return /* @__PURE__ */ u(
3084
- "li",
3085
- {
3086
- class: so({
3087
- type: v ? "line" : "pill"
3088
- }),
3089
- children: /* @__PURE__ */ u(
3090
- "button",
3091
- {
3092
- type: "button",
3093
- disabled: b.disabled,
3094
- "data-filter": !0,
3095
- "data-current-value": m ? "true" : void 0,
3096
- onClick: () => {
3097
- switch (e.select) {
3098
- case "many": {
3099
- const k = gi(f, b.value);
3100
- o({
3101
- select: "many",
3102
- value: k
3103
- });
3104
- break;
3105
- }
3106
- case "one":
3107
- o({
3108
- select: "one",
3109
- value: b.value
3110
- });
3111
- break;
3112
- default:
3113
- Qe(e);
3114
- }
3115
- },
3116
- class: v ? lo({
3117
- active: m,
3118
- disabled: b.disabled
3119
- }) : We({
3120
- size: "lg",
3121
- variant: m ? "accentStrong" : "neutralStrong",
3122
- interactive: !0,
3123
- disabled: b.disabled,
3124
- class: "ijs-filter-tag flex max-w-full gap-3 overflow-hidden pr-2.5"
3125
- }),
3126
- children: [
3127
- /* @__PURE__ */ u("span", { class: "max-w-full truncate", children: b.label }),
3128
- " ",
3129
- /* @__PURE__ */ u(yi, { colorScheme: m ? "accentStrong" : "neutralStrong", children: b.results })
3130
- ]
3131
- }
3132
- )
3133
- },
3134
- b.value
3135
- );
3136
- })
3137
- }
3138
- ) });
3139
- }
3140
- default:
3141
- Qe(a);
3142
- }
3143
- })(),
3144
- /* @__PURE__ */ u("footer", { class: "flex justify-end p-2", children: [
3145
- /* @__PURE__ */ u("div", { class: "flex-1", children: i && /* @__PURE__ */ u(
3146
- "button",
3147
- {
3148
- type: "button",
3149
- class: Ue({ variant: "neutral", icon: "left" }),
3150
- onClick: () => {
3151
- o(void 0);
3152
- },
3153
- children: [
3154
- /* @__PURE__ */ u(ye, { "aria-hidden": !0, name: "x" }),
3155
- " ",
3156
- l("clear")
3157
- ]
3158
- }
3159
- ) }),
3160
- e.select === "many" && /* @__PURE__ */ u("div", { class: "flex items-center overflow-hidden", children: /* @__PURE__ */ u("p", { class: "font-style-default text-style-tag font-weight-default flex-grow select-none truncate text-center", children: [
3161
- f.length,
3162
- " ",
3163
- l("selected")
3164
- ] }) }),
3165
- /* @__PURE__ */ u("div", { class: "flex-1", children: /* @__PURE__ */ u(
3166
- "button",
3167
- {
3168
- type: "button",
3169
- class: Ue({
3170
- variant: i ? "accent" : "neutral",
3171
- icon: "right",
3172
- class: "ml-auto"
3173
- }),
3174
- onClick: n,
3175
- children: [
3176
- l(i ? "done" : "skip"),
3177
- " ",
3178
- /* @__PURE__ */ u(ye, { name: "chevron-right" })
3179
- ]
3180
- },
3181
- i ? "done" : "skip"
3182
- ) })
3183
- ] })
3184
- ] });
3185
- }, Gn = {
3186
- contract_type: "clock",
3187
- title: "magnifier",
3188
- city: "mapPin",
3189
- town: "mapPin",
3190
- country: "mapPin",
3191
- company_name: "briefcase",
3192
- category: "briefcase",
3193
- pay: "pay",
3194
- pay_currency: "pay",
3195
- pay_mask: "pay",
3196
- pay_display: "pay",
3197
- pay_max: "pay",
3198
- pay_min: "pay",
3199
- pay_type: "pay"
3200
- }, wi = te({
3201
- base: "group ijs-filter flex min-w-0 fr overflow-hidden rounded-section text-copy-neutral-lowcontrast ring-width-section transition-all duration-medium ease-expo-out fr-parent [&:has(.fr-child:active)]:scale-[0.975] origin-[50%_1.75rem]",
3202
- variants: {
3203
- hasValue: {
3204
- false: "bg-section-weak-bg ring-section-weak-stroke",
3205
- true: "bg-section-strong-bg ring-section-strong-stroke"
3206
- }
3207
- }
3208
- }), Si = te({
3209
- base: "font-style-filter font-family-filter font-weight-filter text-style-filter truncate duration-snappy outline-none",
3210
- variants: {
3211
- state: {
3212
- default: "text-copy-neutral-lowcontrast pointer-fine:group-hover:text-copy-neutral",
3213
- filled: "text-copy-neutral",
3214
- active: "text-copy-neutral"
3215
- }
3216
- }
3217
- }), Ci = te({
3218
- base: "flex-none text-copy-neutral-icon pointer-fine:group-hover:text-copy-neutral duration-snappy ease-expo-out"
3219
- }), xi = (e) => {
3220
- const t = q(null), [n, r] = j(0), o = () => {
3221
- var a;
3222
- return r(((a = t.current) == null ? void 0 : a.clientHeight) ?? 0);
3223
- };
3224
- return Ce(() => (o(), window.addEventListener("resize", o), () => window.removeEventListener("resize", o)), e), { height: n, ref: t, updateHeight: o };
3225
- }, co = (e) => typeof e.value == "string" ? [e.value] : e.value ?? [], tl = ({
3226
- active: e,
3227
- value: t,
3228
- onActiveChange: n,
3229
- property: r,
3230
- onSkip: o,
3231
- onValueChange: a,
3232
- unfilteredQuery: s,
3233
- useQuery: l
3234
- }) => {
3235
- const c = So(r.key, Gn) ? Gn[r.key] : void 0, d = r.icon ?? c ?? "filter", f = co(t), { height: i, ref: p, updateHeight: y } = xi([e]), _ = f.length > 0;
3236
- return /* @__PURE__ */ u(
3237
- "section",
3238
- {
3239
- "data-filter-key": r.key,
3240
- "aria-label": r.label,
3241
- "aria-selected": e ? "true" : void 0,
3242
- class: wi({ hasValue: _ }),
3243
- onTouchStart: Ti,
3244
- children: [
3245
- /* @__PURE__ */ u("div", { class: "min-w-0 max-w-full shrink-0 flex-grow", children: [
3246
- /* @__PURE__ */ u(
3247
- "button",
3248
- {
3249
- "aria-label": e ? "Close filter" : "Open filter",
3250
- class: Si({
3251
- state: e ? "active" : _ ? "filled" : "default",
3252
- class: "ijs-filter-heading rounded-section fr-child flex w-full cursor-pointer select-none items-center gap-2 py-4 pl-4"
3253
- }),
3254
- onClick: () => n(!e),
3255
- children: [
3256
- /* @__PURE__ */ u(ye, { "aria-hidden": !0, class: "flex-none", name: d }),
3257
- /* @__PURE__ */ u("p", { children: r.label })
3258
- ]
3259
- }
3260
- ),
3261
- /* @__PURE__ */ u("div", { class: "ease-expo-out duration-snappy relative overflow-hidden transition-all", style: { height: i }, children: /* @__PURE__ */ u("div", { class: "w-full", ref: p, children: e && /* @__PURE__ */ u(
3262
- Ei,
3263
- {
3264
- useQuery: l,
3265
- onRender: y,
3266
- onSkip: o,
3267
- onValueChange: a,
3268
- unfilteredQuery: s,
3269
- property: r,
3270
- value: t
3271
- }
3272
- ) }) })
3273
- ] }),
3274
- !e && /* @__PURE__ */ u(
3275
- "button",
3276
- {
3277
- tabIndex: -1,
3278
- class: "fr-child flex flex-shrink flex-grow cursor-pointer select-none items-center justify-end gap-2 overflow-hidden pl-2 pr-3 focus:outline-none",
3279
- onClick: () => n(!0),
3280
- children: [
3281
- /* @__PURE__ */ u("div", { "aria-label": "Current value", class: "flex max-w-full gap-1 overflow-hidden", children: /* @__PURE__ */ u(ui, { property: r, query: s, selectedValues: f }) }),
3282
- /* @__PURE__ */ u(ye, { "aria-hidden": !0, class: Ci(), name: "chevron-right" })
3283
- ]
3284
- }
3285
- )
3286
- ]
3287
- }
3288
- );
3289
- };
3290
- function Ti() {
3291
- }
3292
- function ki(e) {
3293
- var t = typeof e;
3294
- return e != null && (t == "object" || t == "function");
3295
- }
3296
- var uo = ki, Oi = typeof Ze == "object" && Ze && Ze.Object === Object && Ze, Ri = Oi, Li = Ri, Ni = typeof self == "object" && self && self.Object === Object && self, Di = Li || Ni || Function("return this")(), fo = Di, Ai = fo, Ii = function() {
3297
- return Ai.Date.now();
3298
- }, Mi = Ii, Pi = /\s/;
3299
- function ji(e) {
3300
- for (var t = e.length; t-- && Pi.test(e.charAt(t)); )
3301
- ;
3302
- return t;
3303
- }
3304
- var Vi = ji, $i = Vi, Ui = /^\s+/;
3305
- function Hi(e) {
3306
- return e && e.slice(0, $i(e) + 1).replace(Ui, "");
3307
- }
3308
- var Fi = Hi, Wi = fo, zi = Wi.Symbol, _o = zi, Kn = _o, po = Object.prototype, Bi = po.hasOwnProperty, qi = po.toString, Me = Kn ? Kn.toStringTag : void 0;
3309
- function Gi(e) {
3310
- var t = Bi.call(e, Me), n = e[Me];
3311
- try {
3312
- e[Me] = void 0;
3313
- var r = !0;
3314
- } catch {
3315
- }
3316
- var o = qi.call(e);
3317
- return r && (t ? e[Me] = n : delete e[Me]), o;
3318
- }
3319
- var Ki = Gi, Zi = Object.prototype, Yi = Zi.toString;
3320
- function Ji(e) {
3321
- return Yi.call(e);
3322
- }
3323
- var Qi = Ji, Zn = _o, Xi = Ki, es = Qi, ts = "[object Null]", ns = "[object Undefined]", Yn = Zn ? Zn.toStringTag : void 0;
3324
- function rs(e) {
3325
- return e == null ? e === void 0 ? ns : ts : Yn && Yn in Object(e) ? Xi(e) : es(e);
3326
- }
3327
- var os = rs;
3328
- function as(e) {
3329
- return e != null && typeof e == "object";
3330
- }
3331
- var is = as, ss = os, ls = is, cs = "[object Symbol]";
3332
- function us(e) {
3333
- return typeof e == "symbol" || ls(e) && ss(e) == cs;
3334
- }
3335
- var ds = us, fs = Fi, Jn = uo, _s = ds, Qn = 0 / 0, ps = /^[-+]0x[0-9a-f]+$/i, hs = /^0b[01]+$/i, ys = /^0o[0-7]+$/i, gs = parseInt;
3336
- function vs(e) {
3337
- if (typeof e == "number")
3338
- return e;
3339
- if (_s(e))
3340
- return Qn;
3341
- if (Jn(e)) {
3342
- var t = typeof e.valueOf == "function" ? e.valueOf() : e;
3343
- e = Jn(t) ? t + "" : t;
3344
- }
3345
- if (typeof e != "string")
3346
- return e === 0 ? e : +e;
3347
- e = fs(e);
3348
- var n = hs.test(e);
3349
- return n || ys.test(e) ? gs(e.slice(2), n ? 2 : 8) : ps.test(e) ? Qn : +e;
3350
- }
3351
- var ms = vs, bs = uo, kt = Mi, Xn = ms, Es = "Expected a function", ws = Math.max, Ss = Math.min;
3352
- function Cs(e, t, n) {
3353
- var r, o, a, s, l, c, d = 0, f = !1, i = !1, p = !0;
3354
- if (typeof e != "function")
3355
- throw new TypeError(Es);
3356
- t = Xn(t) || 0, bs(n) && (f = !!n.leading, i = "maxWait" in n, a = i ? ws(Xn(n.maxWait) || 0, t) : a, p = "trailing" in n ? !!n.trailing : p);
3357
- function y(m) {
3358
- var k = r, x = o;
3359
- return r = o = void 0, d = m, s = e.apply(x, k), s;
3360
- }
3361
- function _(m) {
3362
- return d = m, l = setTimeout(g, t), f ? y(m) : s;
3363
- }
3364
- function h(m) {
3365
- var k = m - c, x = m - d, T = t - k;
3366
- return i ? Ss(T, a - x) : T;
3367
- }
3368
- function C(m) {
3369
- var k = m - c, x = m - d;
3370
- return c === void 0 || k >= t || k < 0 || i && x >= a;
3371
- }
3372
- function g() {
3373
- var m = kt();
3374
- if (C(m))
3375
- return E(m);
3376
- l = setTimeout(g, h(m));
3377
- }
3378
- function E(m) {
3379
- return l = void 0, p && r ? y(m) : (r = o = void 0, s);
3380
- }
3381
- function S() {
3382
- l !== void 0 && clearTimeout(l), d = 0, r = c = o = l = void 0;
3383
- }
3384
- function v() {
3385
- return l === void 0 ? s : E(kt());
3386
- }
3387
- function b() {
3388
- var m = kt(), k = C(m);
3389
- if (r = arguments, o = this, c = m, k) {
3390
- if (l === void 0)
3391
- return _(c);
3392
- if (i)
3393
- return clearTimeout(l), l = setTimeout(g, t), y(c);
3394
- }
3395
- return l === void 0 && (l = setTimeout(g, t)), s;
3396
- }
3397
- return b.cancel = S, b.flush = v, b;
3398
- }
3399
- var xs = Cs;
3400
- const Ts = /* @__PURE__ */ Ra(xs), nl = (e, t) => {
3401
- const n = structuredClone(e);
3402
- return n.forEach((r) => {
3403
- if (t.has(r.key)) {
3404
- const o = t.get(r.key);
3405
- if (!o)
3406
- return;
3407
- r.defaultValue = o.includes(",") ? o.split(",") : o;
3408
- }
3409
- }), n;
3410
- }, rl = (e) => {
3411
- const t = e.get("lat"), n = e.get("lng"), r = e.get("radius");
3412
- return {
3413
- type: "provided",
3414
- coords: t && n ? { lat: Number(t), lng: Number(n) } : void 0,
3415
- radius: r ? Number(r) : Ut(ho)
3416
- };
3417
- }, ks = (e, t = 1e3) => {
3418
- const [n, r] = j(e), o = be(() => Ts((a) => r(a), t), [t]);
3419
- return ee(() => {
3420
- o(e);
3421
- }, [e, o]), n;
3422
- }, Os = Zt(
3423
- ({
3424
- disabled: e,
3425
- error: t,
3426
- name: n,
3427
- inputPlaceholder: r,
3428
- items: o,
3429
- onItemSelect: a,
3430
- onQueryChange: s,
3431
- onBlur: l,
3432
- onFocus: c,
3433
- inputProps: d,
3434
- menuProps: f,
3435
- query: i
3436
- }, p) => {
3437
- const [y, _] = j(!1), [h, C] = j(), { t: g } = xe(), E = q();
3438
- ee(() => {
3439
- var v;
3440
- C((v = o[0]) == null ? void 0 : v.id);
3441
- }, [o]);
3442
- const S = (v) => {
3443
- a(v), _(!1);
3444
- };
3445
- return /* @__PURE__ */ u("div", { class: "relative h-full", children: [
3446
- /* @__PURE__ */ u(
3447
- "input",
3448
- {
3449
- name: n,
3450
- ref: p,
3451
- disabled: e,
3452
- "data-active": y ? "true" : void 0,
3453
- "aria-controls": `ijs-${n}-menu`,
3454
- placeholder: r,
3455
- class: dt({ size: "md" }),
3456
- onFocus: () => {
3457
- c == null || c(), _(!0);
3458
- },
3459
- onBlur: () => {
3460
- E.current = window.setTimeout(() => {
3461
- l == null || l(), _(!1);
3462
- }, 100);
3463
- },
3464
- value: i,
3465
- onChange: (v) => s(v.currentTarget.value),
3466
- onKeyDown: (v) => {
3467
- switch (_(!0), v.key) {
3468
- case "ArrowDown":
3469
- case "ArrowUp": {
3470
- const b = v.key === "ArrowDown" ? 1 : -1;
3471
- v.preventDefault();
3472
- const m = o.findIndex((x) => x.id === h);
3473
- if (m === -1)
3474
- return;
3475
- const k = o[m + b] ?? o[v.key === "ArrowDown" ? 0 : o.length - 1];
3476
- if (!k)
3477
- return;
3478
- C(k.id);
3479
- break;
3480
- }
3481
- case "Enter": {
3482
- if (v.preventDefault(), !h)
3483
- return;
3484
- a(h);
3485
- }
3486
- }
3487
- },
3488
- ...d
3489
- }
3490
- ),
3491
- !t && y && !e && o.length > 0 ? /* @__PURE__ */ u(
3492
- "ul",
3493
- {
3494
- className: io({
3495
- type: "long",
3496
- ring: "unset",
3497
- className: "ring-width-section ring-job-card-stroke absolute left-0 right-0 top-12 z-50 w-full shadow-sm"
3498
- }),
3499
- id: `ijs-${n}-menu`,
3500
- onMouseDown: () => {
3501
- E.current && clearTimeout(E.current);
3502
- },
3503
- ...f,
3504
- children: t ? /* @__PURE__ */ u("div", { role: "alert", children: g("geo_suggestions_error") }) : o.map((v) => /* @__PURE__ */ u(
3505
- "li",
3506
- {
3507
- class: so({
3508
- type: "line",
3509
- className: "group/tag"
3510
- }),
3511
- children: /* @__PURE__ */ u(
3512
- "button",
3513
- {
3514
- type: "button",
3515
- onMouseEnter: () => C(v.id),
3516
- class: lo({
3517
- active: v.id === h,
3518
- className: "line-clamp-1 overflow-hidden truncate"
3519
- }),
3520
- onClick: () => S(v.id),
3521
- onKeyDown: (b) => {
3522
- b.key === "Enter" && S(v.id);
3523
- },
3524
- children: v.label
3525
- }
3526
- )
3527
- },
3528
- v.id
3529
- ))
3530
- }
3531
- ) : null
3532
- ] });
3533
- }
3534
- ), Rs = (e = {}) => new Promise((t, n) => {
3535
- var r, o;
3536
- if ((r = e.signal) != null && r.aborted) {
3537
- n(new DOMException("Aborted", "AbortError"));
3538
- return;
3539
- }
3540
- navigator.geolocation.getCurrentPosition(
3541
- (a) => t(a.coords),
3542
- (a) => n(a),
3543
- e
3544
- ), (o = e.signal) == null || o.addEventListener(
3545
- "abort",
3546
- () => {
3547
- n(new DOMException("Aborted", "AbortError"));
3548
- },
3549
- { once: !0 }
3550
- );
3551
- }), Ls = {
3552
- 1: "geo_error_permission_denied",
3553
- 2: "geo_error_position_unavailable",
3554
- 3: "geo_error_timeout"
3555
- }, er = typeof window < "u" && "geolocation" in navigator && window.isSecureContext, Ns = ({
3556
- onLocate: e,
3557
- onError: t,
3558
- signal: n
3559
- }) => {
3560
- const [r, o] = j("idle"), [a, s] = j(null), { t: l } = xe(), c = (d) => {
3561
- o("idle"), s(d), e(d);
3562
- };
3563
- return /* @__PURE__ */ u(
3564
- "button",
3565
- {
3566
- "aria-label": l(r === "loading" ? "geo_locating" : "geo_my_location"),
3567
- type: "button",
3568
- onClick: () => {
3569
- if (er) {
3570
- if (o("loading"), a)
3571
- return c(a);
3572
- Rs({ signal: n }).then((d) => {
3573
- const f = { lat: d.latitude, lng: d.longitude };
3574
- c(f);
3575
- }).catch((d) => {
3576
- if (d instanceof DOMException && d.name === "AbortError")
3577
- return o("idle");
3578
- o("error");
3579
- const f = Ls[d.code];
3580
- if (!f)
3581
- return;
3582
- const i = l(f);
3583
- t(i);
3584
- });
3585
- }
3586
- },
3587
- "data-state": r,
3588
- class: Ue({
3589
- variant: "accent",
3590
- size: "lg",
3591
- icon: "only",
3592
- className: "data-[state=loading]:animate-pulse"
3593
- }),
3594
- disabled: !er || r === "error",
3595
- children: /* @__PURE__ */ u(ye, { name: "target-location" })
3596
- }
3597
- );
3598
- }, Ds = "https://api.mapbox.com/search/geocode/v6/forward", As = "ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==", Is = (e) => atob(e).split("").reverse().join(""), Ms = se({
3599
- features: Wt(
3600
- _e(
3601
- se({
3602
- properties: se({
3603
- mapbox_id: L(),
3604
- place_formatted: fe(L()),
3605
- name_preferred: fe(L(), "Untitled location"),
3606
- coordinates: _e(
3607
- se({
3608
- latitude: de(),
3609
- longitude: de()
3610
- }),
3611
- ({ latitude: e, longitude: t }) => ({ lat: e, lng: t })
3612
- )
3613
- })
3614
- }),
3615
- (e) => e.properties
3616
- )
3617
- )
3618
- }), Ps = (e, t) => Array.from(new Map(e.map((n) => [typeof t == "function" ? t(n) : n[t], n])).values()), js = async (e) => {
3619
- if (!e)
3620
- return [];
3621
- const t = new URL(Ds);
3622
- t.searchParams.set("q", e), t.searchParams.set("proximity", "ip"), t.searchParams.set("access_token", Is(As));
3623
- const n = await fetch(t);
3624
- if (!n.ok)
3625
- throw new Error("Failed to get address details");
3626
- const r = zt(Ms, await n.json());
3627
- if (r.success === !1)
3628
- throw console.error(r.issues), new Error("Invalid data");
3629
- const { features: o } = r.output;
3630
- return Ps(o, (a) => a.name_preferred + a.place_formatted);
3631
- }, Vs = ({
3632
- onSelect: e,
3633
- onValueChange: t,
3634
- coords: n,
3635
- radius: r,
3636
- onError: o
3637
- }) => {
3638
- const { t: a } = xe(), [s, l] = j(""), [c, d] = j(), f = ks(s, 500), [i, p] = j(new AbortController()), y = ci(f, js, {
3639
- keepPreviousData: !1,
3640
- revalidateIfStale: !1,
3641
- revalidateOnFocus: !1
3642
- }), { data: _, queryState: h, error: C } = Sr(y), [g, E] = j("view"), S = q(null);
3643
- return ee(() => {
3644
- if (g === "edit") {
3645
- if (!S.current)
3646
- return;
3647
- S.current.focus();
3648
- }
3649
- }, [g]), /* @__PURE__ */ u("div", { class: "relative flex-1", children: [
3650
- g === "view" && n ? /* @__PURE__ */ u(
3651
- "button",
3652
- {
3653
- "aria-label": a("geo_search_placeholder"),
3654
- type: "button",
3655
- class: dt({
3656
- size: "unsized",
3657
- className: "flex h-10 w-full cursor-text items-stretch px-1 py-1"
3658
- }),
3659
- onClick: () => {
3660
- E("edit");
3661
- },
3662
- children: /* @__PURE__ */ u("div", { class: We({ size: "sm", variant: "accentStrong", interactive: !0, class: "truncate" }), children: c ?? a("location_provided") })
3663
- }
3664
- ) : /* @__PURE__ */ u(
3665
- Os,
3666
- {
3667
- ref: S,
3668
- error: C,
3669
- query: s,
3670
- name: "location-search",
3671
- onQueryChange: l,
3672
- onFocus: () => {
3673
- i.abort(), p(new AbortController());
3674
- },
3675
- onBlur: () => {
3676
- E("view"), l("");
3677
- },
3678
- onItemSelect: (v) => {
3679
- if (h !== "loaded")
3680
- return;
3681
- const b = _.find((m) => m.mapbox_id === v);
3682
- b && (e(b.coordinates), E("view"), d(b.name_preferred));
3683
- },
3684
- inputPlaceholder: a("geo_search_placeholder"),
3685
- items: (_ == null ? void 0 : _.map((v) => ({
3686
- id: v.mapbox_id,
3687
- label: /* @__PURE__ */ u("div", { class: "flex min-w-0 max-w-full gap-2 overflow-hidden", children: [
3688
- /* @__PURE__ */ u("strong", { class: "truncate", children: v.name_preferred }),
3689
- " ",
3690
- /* @__PURE__ */ u("span", { class: "flex-1 truncate opacity-50", children: v.place_formatted })
3691
- ] })
3692
- }))) ?? []
3693
- }
3694
- ),
3695
- /* @__PURE__ */ u("div", { class: "absolute bottom-0 right-0 top-0 flex items-center", children: !s && !n ? /* @__PURE__ */ u(
3696
- Ns,
3697
- {
3698
- onLocate: (v) => {
3699
- E("view"), d(a("geo_my_location")), t({
3700
- type: "provided",
3701
- coords: v,
3702
- radius: r
3703
- });
3704
- },
3705
- onError: o,
3706
- signal: i.signal
3707
- }
3708
- ) : /* @__PURE__ */ u(
3709
- "button",
3710
- {
3711
- type: "button",
3712
- "aria-label": a("geo_clear_search"),
3713
- onClick: () => {
3714
- l(""), d(void 0), t({ radius: r, type: "provided" }), E("edit"), S.current && (S.current.value = "", S.current.focus());
3715
- },
3716
- class: Ue({
3717
- variant: "neutral",
3718
- size: "lg",
3719
- icon: "only"
3720
- }),
3721
- children: /* @__PURE__ */ u(ye, { name: "x" })
3722
- }
3723
- ) })
3724
- ] });
3725
- }, $s = [0.25, 0.5, 1, 3, 5, 10, 15, 20, 30, 40], ho = 20, Ut = (e) => e * 1609.34, Us = new Intl.NumberFormat(void 0, {
3726
- style: "unit",
3727
- unit: "mile",
3728
- unitDisplay: "long",
3729
- maximumFractionDigits: 1,
3730
- // @ts-expect-error - CI/CD is not happy with this, though locally it works
3731
- trailingZeroDisplay: "stripIfInteger"
3732
- }), Hs = _e(
3733
- se({
3734
- type: oe("provided"),
3735
- lat: fe(_e(L(), (e) => Number(e))),
3736
- lng: fe(_e(L(), (e) => Number(e))),
3737
- radius: _e(L(), (e) => Number(e))
3738
- }),
3739
- (e) => ({
3740
- radius: e.radius,
3741
- type: e.type,
3742
- coords: e.lat && e.lng ? { lat: e.lat, lng: e.lng } : void 0
3743
- })
3744
- ), ol = ({
3745
- value: e,
3746
- onValueChange: t,
3747
- logger: n
3748
- }) => {
3749
- const { t: r } = xe(), o = Gt(), a = (e == null ? void 0 : e.type) === "provided" ? e.radius : Ut(ho), [s, l] = j();
3750
- return /* @__PURE__ */ u("div", { class: "flex flex-col gap-2", children: [
3751
- /* @__PURE__ */ u(
3752
- "form",
3753
- {
3754
- onChange: (c) => {
3755
- const d = new FormData(c.currentTarget), f = zt(Hs, Object.fromEntries(d.entries()));
3756
- if (!f.success) {
3757
- n.error(f.issues), l(f.issues[0].message);
3758
- return;
3759
- }
3760
- t(f.output);
3761
- },
3762
- class: "flex flex-col gap-2 md:flex-row",
3763
- children: [
3764
- /* @__PURE__ */ u("input", { type: "hidden", name: "type", value: "provided" }),
3765
- (e == null ? void 0 : e.type) === "provided" && e.coords ? /* @__PURE__ */ u(I, { children: [
3766
- /* @__PURE__ */ u("input", { type: "hidden", name: "lat", value: e.coords.lat }),
3767
- /* @__PURE__ */ u("input", { type: "hidden", name: "lng", value: e.coords.lng })
3768
- ] }) : null,
3769
- /* @__PURE__ */ u(
3770
- Vs,
3771
- {
3772
- coords: (e == null ? void 0 : e.type) === "provided" ? e.coords : void 0,
3773
- radius: a,
3774
- onValueChange: t,
3775
- onSelect: (c) => {
3776
- l(void 0), t({
3777
- type: "provided",
3778
- radius: a,
3779
- coords: c
3780
- });
3781
- },
3782
- onError: l
3783
- }
3784
- ),
3785
- /* @__PURE__ */ u("div", { class: "relative", children: [
3786
- /* @__PURE__ */ u("label", { class: "sr-only", for: o, children: r("geo_range_label") }),
3787
- /* @__PURE__ */ u(
3788
- "select",
3789
- {
3790
- id: o,
3791
- name: "radius",
3792
- class: dt({
3793
- size: "unsized",
3794
- className: "w-full appearance-none truncate py-2 pl-3 pr-10"
3795
- }),
3796
- value: a,
3797
- onChange: (c) => {
3798
- l(void 0), t({
3799
- type: "provided",
3800
- coords: (e == null ? void 0 : e.type) === "provided" ? e.coords : void 0,
3801
- radius: Number(c.currentTarget.value)
3802
- });
3803
- },
3804
- children: $s.map((c) => /* @__PURE__ */ u("option", { value: Ut(c), class: "truncate", children: Us.format(c) }, c))
3805
- }
3806
- ),
3807
- /* @__PURE__ */ u("div", { class: "text-copy-neutral-lowcontrast pointer-events-none absolute bottom-0 right-0 top-0 flex w-10 items-center justify-center", children: /* @__PURE__ */ u(ye, { name: "chevron-right", class: "h-6 w-6 rotate-90" }) })
3808
- ] })
3809
- ]
3810
- }
3811
- ),
3812
- s ? /* @__PURE__ */ u(
3813
- "div",
3814
- {
3815
- role: "alert",
3816
- class: "text-pretty text-copy-neutral font-style-tag font-weight-tag text-style-tag flex gap-1",
3817
- children: [
3818
- /* @__PURE__ */ u(ye, { name: "warning", class: "animate-appear-tag size-[1lh] flex-none" }),
3819
- s
3820
- ]
3821
- }
3822
- ) : null
3823
- ] });
3824
- };
3825
- export {
3826
- el as A,
3827
- Ks as B,
3828
- _r as C,
3829
- $e as D,
3830
- Nn as E,
3831
- be as F,
3832
- ol as G,
3833
- Gs as H,
3834
- ye as I,
3835
- Ws as J,
3836
- Xs as K,
3837
- nl as L,
3838
- rl as M,
3839
- Yo as P,
3840
- qs as S,
3841
- je as T,
3842
- Js as U,
3843
- q as _,
3844
- ci as a,
3845
- zs as b,
3846
- Qs as c,
3847
- tl as d,
3848
- Qe as e,
3849
- aa as f,
3850
- Sr as g,
3851
- j as h,
3852
- dt as i,
3853
- Ue as j,
3854
- I as k,
3855
- w as l,
3856
- ds as m,
3857
- os as n,
3858
- u as o,
3859
- ee as p,
3860
- uo as q,
3861
- fo as r,
3862
- _o as s,
3863
- We as t,
3864
- xe as u,
3865
- Ra as v,
3866
- te as w,
3867
- Bs as x,
3868
- X as y,
3869
- wo as z
3870
- };