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