@inploi/plugin-job-search 8.4.1 → 8.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { l as u, _ as y, k as U, J as ao, g as xo, c as yo, K as ko, a as _o, i as zo, T as So, b as Yo, I as Do, d as Fo, U as Ao, E as Eo, e as $o } from "./utils-c371d06a.js";
2
- import { f as rr } from "./utils-c371d06a.js";
1
+ import { l as f, _ as x, k as M, J as ao, g as xo, c as yo, K as ko, a as _o, i as zo, T as So, b as Yo, I as Do, d as Eo, U as Fo, E as Ao, e as $o } from "./utils-2660f1a0.js";
2
+ import { f as rr } from "./utils-2660f1a0.js";
3
3
  import { createPlugin as Co } from "@inploi/sdk";
4
- var Lo = "diffed", no = "__c", G = "__s", P = "__c", vo = "__k", V = "__d", C = "__s", so = /[\s\n\\/='"\0<>]/, lo = /^(xlink|xmlns|xml)([A-Z])/, Uo = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/, Po = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/, To = /* @__PURE__ */ new Set(["draggable", "spellcheck"]);
4
+ var Lo = "diffed", no = "__c", G = "__s", I = "__c", vo = "__k", V = "__d", P = "__s", so = /[\s\n\\/='"\0<>]/, lo = /^(xlink|xmlns|xml)([A-Z])/, Uo = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/, Po = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/, To = /* @__PURE__ */ new Set(["draggable", "spellcheck"]);
5
5
  function fo(o) {
6
6
  o.__g !== void 0 ? o.__g |= 8 : o[V] = !0;
7
7
  }
@@ -15,144 +15,144 @@ var Io = /["&<]/;
15
15
  function H(o) {
16
16
  if (o.length === 0 || Io.test(o) === !1)
17
17
  return o;
18
- for (var t = 0, e = 0, i = "", l = ""; e < o.length; e++) {
18
+ for (var i = 0, e = 0, a = "", s = ""; e < o.length; e++) {
19
19
  switch (o.charCodeAt(e)) {
20
20
  case 34:
21
- l = "&quot;";
21
+ s = "&quot;";
22
22
  break;
23
23
  case 38:
24
- l = "&amp;";
24
+ s = "&amp;";
25
25
  break;
26
26
  case 60:
27
- l = "&lt;";
27
+ s = "&lt;";
28
28
  break;
29
29
  default:
30
30
  continue;
31
31
  }
32
- e !== t && (i += o.slice(t, e)), i += l, t = e + 1;
32
+ e !== i && (a += o.slice(i, e)), a += s, i = e + 1;
33
33
  }
34
- return e !== t && (i += o.slice(t, e)), i;
34
+ return e !== i && (a += o.slice(i, e)), a;
35
35
  }
36
36
  var po = {}, Xo = /* @__PURE__ */ new Set(["animation-iteration-count", "border-image-outset", "border-image-slice", "border-image-width", "box-flex", "box-flex-group", "box-ordinal-group", "column-count", "fill-opacity", "flex", "flex-grow", "flex-negative", "flex-order", "flex-positive", "flex-shrink", "flood-opacity", "font-weight", "grid-column", "grid-row", "line-clamp", "line-height", "opacity", "order", "orphans", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-miterlimit", "stroke-opacity", "stroke-width", "tab-size", "widows", "z-index", "zoom"]), Zo = /[A-Z]/g;
37
37
  function Ro(o) {
38
- var t = "";
38
+ var i = "";
39
39
  for (var e in o) {
40
- var i = o[e];
41
- if (i != null && i !== "") {
42
- var l = e[0] == "-" ? e : po[e] || (po[e] = e.replace(Zo, "-$&").toLowerCase()), p = ";";
43
- typeof i != "number" || l.startsWith("--") || Xo.has(l) || (p = "px;"), t = t + l + ":" + i + p;
40
+ var a = o[e];
41
+ if (a != null && a !== "") {
42
+ var s = e[0] == "-" ? e : po[e] || (po[e] = e.replace(Zo, "-$&").toLowerCase()), c = ";";
43
+ typeof a != "number" || s.startsWith("--") || Xo.has(s) || (c = "px;"), i = i + s + ":" + a + c;
44
44
  }
45
45
  }
46
- return t || void 0;
46
+ return i || void 0;
47
47
  }
48
48
  function ho() {
49
49
  this.__d = !0;
50
50
  }
51
- function Wo(o, t) {
52
- return { __v: o, context: t, props: o.props, setState: ho, forceUpdate: ho, __d: !0, __h: new Array(0) };
51
+ function Wo(o, i) {
52
+ return { __v: o, context: i, props: o.props, setState: ho, forceUpdate: ho, __d: !0, __h: new Array(0) };
53
53
  }
54
- var Q, F, X, I, oo = {}, wo = [], L = Array.isArray, K = Object.assign, g = "", q = "<!--$s-->", B = "<!--/$s-->";
55
- function Ho(o, t, e) {
56
- var i = u[G];
57
- u[G] = !0, Q = u.__b, F = u[Lo], X = u.__r, I = u.unmount;
58
- var l = y(U, null);
59
- l[vo] = [o];
54
+ var Q, $, R, Z, oo = {}, wo = [], T = Array.isArray, K = Object.assign, g = "", q = "<!--$s-->", B = "<!--/$s-->";
55
+ function Ho(o, i, e) {
56
+ var a = f[G];
57
+ f[G] = !0, Q = f.__b, $ = f[Lo], R = f.__r, Z = f.unmount;
58
+ var s = x(M, null);
59
+ s[vo] = [o];
60
60
  try {
61
- var p = k(o, t || oo, !1, void 0, l, !1, e);
62
- return L(p) ? p.join(g) : p;
61
+ var c = k(o, i || oo, !1, void 0, s, !1, e);
62
+ return T(c) ? c.join(g) : c;
63
63
  } catch (r) {
64
64
  throw r.then ? new Error('Use "renderToStringAsync" for suspenseful rendering.') : r;
65
65
  } finally {
66
- u[no] && u[no](o, wo), u[G] = i, wo.length = 0;
66
+ f[no] && f[no](o, wo), f[G] = a, wo.length = 0;
67
67
  }
68
68
  }
69
- function bo(o, t) {
70
- var e, i = o.type, l = !0;
71
- return o[P] ? (l = !1, (e = o[P]).state = e[C]) : e = new i(o.props, t), o[P] = e, e.__v = o, e.props = o.props, e.context = t, fo(e), e.state == null && (e.state = oo), e[C] == null && (e[C] = e.state), i.getDerivedStateFromProps ? e.state = K({}, e.state, i.getDerivedStateFromProps(e.props, e.state)) : l && e.componentWillMount ? (e.componentWillMount(), e.state = e[C] !== e.state ? e[C] : e.state) : !l && e.componentWillUpdate && e.componentWillUpdate(), X && X(o), e.render(e.props, e.state, t);
69
+ function bo(o, i) {
70
+ var e, a = o.type, s = !0;
71
+ return o[I] ? (s = !1, (e = o[I]).state = e[P]) : e = new a(o.props, i), o[I] = e, e.__v = o, e.props = o.props, e.context = i, fo(e), e.state == null && (e.state = oo), e[P] == null && (e[P] = e.state), a.getDerivedStateFromProps ? e.state = K({}, e.state, a.getDerivedStateFromProps(e.props, e.state)) : s && e.componentWillMount ? (e.componentWillMount(), e.state = e[P] !== e.state ? e[P] : e.state) : !s && e.componentWillUpdate && e.componentWillUpdate(), R && R(o), e.render(e.props, e.state, i);
72
72
  }
73
- function k(o, t, e, i, l, p, r) {
73
+ function k(o, i, e, a, s, c, r) {
74
74
  if (o == null || o === !0 || o === !1 || o === g)
75
75
  return g;
76
76
  var m = typeof o;
77
77
  if (m != "object")
78
78
  return m == "function" ? g : m == "string" ? H(o) : o + g;
79
- if (L(o)) {
80
- var d, v = g;
81
- l[vo] = o;
82
- for (var Y = o.length, _ = 0; _ < Y; _++) {
83
- var f = o[_];
84
- if (f != null && typeof f != "boolean") {
85
- var A, j = k(f, t, e, i, l, p, r);
86
- typeof j == "string" ? v += j : (d || (d = new Array(Y)), v && d.push(v), v = g, L(j) ? (A = d).push.apply(A, j) : d.push(j));
79
+ if (T(o)) {
80
+ var h, u = g;
81
+ s[vo] = o;
82
+ for (var y = o.length, _ = 0; _ < y; _++) {
83
+ var z = o[_];
84
+ if (z != null && typeof z != "boolean") {
85
+ var v, S = k(z, i, e, a, s, c, r);
86
+ typeof S == "string" ? u += S : (h || (h = new Array(y)), u && h.push(u), u = g, T(S) ? (v = h).push.apply(v, S) : h.push(S));
87
87
  }
88
88
  }
89
- return d ? (v && d.push(v), d) : v;
89
+ return h ? (u && h.push(u), h) : u;
90
90
  }
91
91
  if (o.constructor !== void 0)
92
92
  return g;
93
- o.__ = l, Q && Q(o);
94
- var h = o.type, a = o.props;
95
- if (typeof h == "function") {
96
- var T, n, w, Z = t;
97
- if (h === U) {
98
- if ("tpl" in a) {
99
- for (var R = g, M = 0; M < a.tpl.length; M++)
100
- if (R += a.tpl[M], a.exprs && M < a.exprs.length) {
101
- var E = a.exprs[M];
102
- if (E == null)
93
+ o.__ = s, Q && Q(o);
94
+ var p = o.type, d = o.props;
95
+ if (typeof p == "function") {
96
+ var C, t, w, E = i;
97
+ if (p === M) {
98
+ if ("tpl" in d) {
99
+ for (var F = g, X = 0; X < d.tpl.length; X++)
100
+ if (F += d.tpl[X], d.exprs && X < d.exprs.length) {
101
+ var L = d.exprs[X];
102
+ if (L == null)
103
103
  continue;
104
- typeof E != "object" || E.constructor !== void 0 && !L(E) ? R += E : R += k(E, t, e, i, o, p, r);
104
+ typeof L != "object" || L.constructor !== void 0 && !T(L) ? F += L : F += k(L, i, e, a, o, c, r);
105
105
  }
106
- return R;
106
+ return F;
107
107
  }
108
- if ("UNSTABLE_comment" in a)
109
- return "<!--" + H(a.UNSTABLE_comment) + "-->";
110
- n = a.children;
108
+ if ("UNSTABLE_comment" in d)
109
+ return "<!--" + H(d.UNSTABLE_comment) + "-->";
110
+ t = d.children;
111
111
  } else {
112
- if ((T = h.contextType) != null) {
113
- var ro = t[T.__c];
114
- Z = ro ? ro.props.value : T.__;
112
+ if ((C = p.contextType) != null) {
113
+ var ro = i[C.__c];
114
+ E = ro ? ro.props.value : C.__;
115
115
  }
116
- var eo = h.prototype && typeof h.prototype.render == "function";
116
+ var eo = p.prototype && typeof p.prototype.render == "function";
117
117
  if (eo)
118
- n = /**#__NOINLINE__**/
119
- bo(o, Z), w = o[P];
118
+ t = /**#__NOINLINE__**/
119
+ bo(o, E), w = o[I];
120
120
  else {
121
- o[P] = w = /**#__NOINLINE__**/
122
- Wo(o, Z);
121
+ o[I] = w = /**#__NOINLINE__**/
122
+ Wo(o, E);
123
123
  for (var uo = 0; co(w) && uo++ < 25; ) {
124
- Mo(w), X && X(o);
124
+ Mo(w), R && R(o);
125
125
  try {
126
- n = h.call(w, a, Z);
126
+ t = p.call(w, d, E);
127
127
  } catch (b) {
128
- throw p && b && typeof b.then == "function" && (o._suspended = !0), b;
128
+ throw c && b && typeof b.then == "function" && (o._suspended = !0), b;
129
129
  }
130
130
  }
131
131
  fo(w);
132
132
  }
133
- if (w.getChildContext != null && (t = K({}, t, w.getChildContext())), eo && u.errorBoundaries && (h.getDerivedStateFromError || w.componentDidCatch)) {
134
- n = n != null && n.type === U && n.key == null && n.props.tpl == null ? n.props.children : n;
133
+ if (w.getChildContext != null && (i = K({}, i, w.getChildContext())), eo && f.errorBoundaries && (p.getDerivedStateFromError || w.componentDidCatch)) {
134
+ t = t != null && t.type === M && t.key == null && t.props.tpl == null ? t.props.children : t;
135
135
  try {
136
- return k(n, t, e, i, o, p, !1);
136
+ return k(t, i, e, a, o, c, !1);
137
137
  } catch (b) {
138
- return h.getDerivedStateFromError && (w[C] = h.getDerivedStateFromError(b)), w.componentDidCatch && w.componentDidCatch(b, oo), co(w) ? (n = bo(o, t), (w = o[P]).getChildContext != null && (t = K({}, t, w.getChildContext())), k(n = n != null && n.type === U && n.key == null && n.props.tpl == null ? n.props.children : n, t, e, i, o, p, r)) : g;
138
+ return p.getDerivedStateFromError && (w[P] = p.getDerivedStateFromError(b)), w.componentDidCatch && w.componentDidCatch(b, oo), co(w) ? (t = bo(o, i), (w = o[I]).getChildContext != null && (i = K({}, i, w.getChildContext())), k(t = t != null && t.type === M && t.key == null && t.props.tpl == null ? t.props.children : t, i, e, a, o, c, r)) : g;
139
139
  } finally {
140
- F && F(o), I && I(o);
140
+ $ && $(o), Z && Z(o);
141
141
  }
142
142
  }
143
143
  }
144
- n = n != null && n.type === U && n.key == null && n.props.tpl == null ? n.props.children : n;
144
+ t = t != null && t.type === M && t.key == null && t.props.tpl == null ? t.props.children : t;
145
145
  try {
146
- var z = k(n, t, e, i, o, p, r);
147
- return F && F(o), u.unmount && u.unmount(o), o._suspended ? typeof z == "string" ? q + z + B : L(z) ? (z.unshift(q), z.push(B), z) : z.then(function(b) {
146
+ var Y = k(t, i, e, a, o, c, r);
147
+ return $ && $(o), f.unmount && f.unmount(o), o._suspended ? typeof Y == "string" ? q + Y + B : T(Y) ? (Y.unshift(q), Y.push(B), Y) : Y.then(function(b) {
148
148
  return q + b + B;
149
- }) : z;
149
+ }) : Y;
150
150
  } catch (b) {
151
- if (!p && r && r.onError) {
151
+ if (!c && r && r.onError) {
152
152
  var to = function O(W) {
153
- return r.onError(W, o, function($, mo) {
153
+ return r.onError(W, o, function(U, mo) {
154
154
  try {
155
- return k($, t, e, i, mo, p, r);
155
+ return k(U, i, e, a, mo, c, r);
156
156
  } catch (jo) {
157
157
  return O(jo);
158
158
  }
@@ -160,30 +160,30 @@ function k(o, t, e, i, l, p, r) {
160
160
  }(b);
161
161
  if (to !== void 0)
162
162
  return to;
163
- var io = u.__e;
163
+ var io = f.__e;
164
164
  return io && io(b, o), g;
165
165
  }
166
- if (!p || !b || typeof b.then != "function")
166
+ if (!c || !b || typeof b.then != "function")
167
167
  throw b;
168
168
  return b.then(function O() {
169
169
  try {
170
- var W = k(n, t, e, i, o, p, r);
170
+ var W = k(t, i, e, a, o, c, r);
171
171
  return o._suspended ? q + W + B : W;
172
- } catch ($) {
173
- if (!$ || typeof $.then != "function")
174
- throw $;
175
- return $.then(O);
172
+ } catch (U) {
173
+ if (!U || typeof U.then != "function")
174
+ throw U;
175
+ return U.then(O);
176
176
  }
177
177
  });
178
178
  }
179
179
  }
180
- var S, D = "<" + h, x = g;
181
- for (var s in a) {
182
- var c = a[s];
183
- if (typeof (c = Bo(c) ? c.value : c) != "function" || s === "class" || s === "className") {
184
- switch (s) {
180
+ var D, A = "<" + p, j = g;
181
+ for (var n in d) {
182
+ var l = d[n];
183
+ if (typeof (l = Bo(l) ? l.value : l) != "function" || n === "class" || n === "className") {
184
+ switch (n) {
185
185
  case "children":
186
- S = c;
186
+ D = l;
187
187
  continue;
188
188
  case "key":
189
189
  case "ref":
@@ -191,64 +191,64 @@ function k(o, t, e, i, l, p, r) {
191
191
  case "__source":
192
192
  continue;
193
193
  case "htmlFor":
194
- if ("for" in a)
194
+ if ("for" in d)
195
195
  continue;
196
- s = "for";
196
+ n = "for";
197
197
  break;
198
198
  case "className":
199
- if ("class" in a)
199
+ if ("class" in d)
200
200
  continue;
201
- s = "class";
201
+ n = "class";
202
202
  break;
203
203
  case "defaultChecked":
204
- s = "checked";
204
+ n = "checked";
205
205
  break;
206
206
  case "defaultSelected":
207
- s = "selected";
207
+ n = "selected";
208
208
  break;
209
209
  case "defaultValue":
210
210
  case "value":
211
- switch (s = "value", h) {
211
+ switch (n = "value", p) {
212
212
  case "textarea":
213
- S = c;
213
+ D = l;
214
214
  continue;
215
215
  case "select":
216
- i = c;
216
+ a = l;
217
217
  continue;
218
218
  case "option":
219
- i != c || "selected" in a || (D += " selected");
219
+ a != l || "selected" in d || (A += " selected");
220
220
  }
221
221
  break;
222
222
  case "dangerouslySetInnerHTML":
223
- x = c && c.__html;
223
+ j = l && l.__html;
224
224
  continue;
225
225
  case "style":
226
- typeof c == "object" && (c = Ro(c));
226
+ typeof l == "object" && (l = Ro(l));
227
227
  break;
228
228
  case "acceptCharset":
229
- s = "accept-charset";
229
+ n = "accept-charset";
230
230
  break;
231
231
  case "httpEquiv":
232
- s = "http-equiv";
232
+ n = "http-equiv";
233
233
  break;
234
234
  default:
235
- if (lo.test(s))
236
- s = s.replace(lo, "$1:$2").toLowerCase();
235
+ if (lo.test(n))
236
+ n = n.replace(lo, "$1:$2").toLowerCase();
237
237
  else {
238
- if (so.test(s))
238
+ if (so.test(n))
239
239
  continue;
240
- s[4] !== "-" && !To.has(s) || c == null ? e ? Po.test(s) && (s = s === "panose1" ? "panose-1" : s.replace(/([A-Z])/g, "-$1").toLowerCase()) : Uo.test(s) && (s = s.toLowerCase()) : c += g;
240
+ n[4] !== "-" && !To.has(n) || l == null ? e ? Po.test(n) && (n = n === "panose1" ? "panose-1" : n.replace(/([A-Z])/g, "-$1").toLowerCase()) : Uo.test(n) && (n = n.toLowerCase()) : l += g;
241
241
  }
242
242
  }
243
- c != null && c !== !1 && (D = c === !0 || c === g ? D + " " + s : D + " " + s + '="' + (typeof c == "string" ? H(c) : c + g) + '"');
243
+ l != null && l !== !1 && (A = l === !0 || l === g ? A + " " + n : A + " " + n + '="' + (typeof l == "string" ? H(l) : l + g) + '"');
244
244
  }
245
245
  }
246
- if (so.test(h))
247
- throw new Error(h + " is not a valid HTML tag name in " + D + ">");
248
- if (x || (typeof S == "string" ? x = H(S) : S != null && S !== !1 && S !== !0 && (x = k(S, t, h === "svg" || h !== "foreignObject" && e, i, o, p, r))), F && F(o), I && I(o), !x && qo.has(h))
249
- return D + "/>";
250
- var J = "</" + h + ">", N = D + ">";
251
- return L(x) ? [N].concat(x, [J]) : typeof x != "string" ? [N, x, J] : N + x + J;
246
+ if (so.test(p))
247
+ throw new Error(p + " is not a valid HTML tag name in " + A + ">");
248
+ if (j || (typeof D == "string" ? j = H(D) : D != null && D !== !1 && D !== !0 && (j = k(D, i, p === "svg" || p !== "foreignObject" && e, a, o, c, r))), $ && $(o), Z && Z(o), !j && qo.has(p))
249
+ return A + "/>";
250
+ var J = "</" + p + ">", N = A + ">";
251
+ return T(j) ? [N].concat(j, [J]) : typeof j != "string" ? [N, j, J] : N + j + J;
252
252
  }
253
253
  var qo = /* @__PURE__ */ new Set(["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
254
254
  function Bo(o) {
@@ -276,36 +276,36 @@ const Jo = `.inploi-job-search{font-size:16px}.inploi-job-search *,.inploi-job-s
276
276
  "contract_type",
277
277
  "pay_display"
278
278
  ], No = (o) => ({
279
- getRenderTargetElement: (t) => {
280
- const e = t ? `[data-widget-id="${t}"]` : "", i = document.body.querySelectorAll(`*[data-widget=${ao}]${e}`);
281
- if (i.length > 1)
279
+ getRenderTargetElement: (i) => {
280
+ const e = i ? `[data-widget-id="${i}"]` : "", a = document.body.querySelectorAll(`*[data-widget=${ao}]${e}`);
281
+ if (a.length > 1)
282
282
  throw o.error(
283
283
  "Please ensure there is only one instance of the widget or provide a data-widget-id attribute to the widget."
284
284
  ), new Error("More than one job search widget found on the page.");
285
- const l = i[0];
286
- if (!l)
285
+ const s = a[0];
286
+ if (!s)
287
287
  throw o.error(
288
288
  `Please ensure there is an element with the properties data-widget="${ao}" ${e}`
289
289
  ), new Error("Job search widget didn’t find element");
290
- return l;
290
+ return s;
291
291
  }
292
- }), Ko = () => Co(({ apiClient: o, rpcClient: t, logger: e, analytics: i }) => {
293
- const l = No(e), p = ({
292
+ }), Ko = () => Co(({ apiClient: o, rpcClient: i, logger: e, analytics: a }) => {
293
+ const s = No(e), c = ({
294
294
  params: r
295
295
  }) => {
296
- var m, d;
297
- return y(Eo, { Fallback: Ao }, [
298
- y(So, {
296
+ var m, h;
297
+ return x(Ao, { Fallback: Fo }, [
298
+ x(So, {
299
299
  terms: r.terms,
300
- locale: ((m = r.i18n) == null ? void 0 : m.locale) ?? ((d = r.i18n) == null ? void 0 : d.fallbackLocale),
300
+ locale: ((m = r.i18n) == null ? void 0 : m.locale) ?? ((h = r.i18n) == null ? void 0 : h.fallbackLocale),
301
301
  children: [
302
- y("style", { id: "inploi-job-search-styles" }, Jo),
303
- y("style", { id: "inploi-job-search-theme" }, Yo(r)),
304
- y(Do, { theme: r.theme }),
305
- y(Fo, {
302
+ x("style", { id: "inploi-job-search-styles" }, Jo),
303
+ x("style", { id: "inploi-job-search-theme" }, Yo(r)),
304
+ x(Do, { theme: r.theme }),
305
+ x(Eo, {
306
306
  properties: r.properties,
307
- rpcClient: t,
308
- analytics: i,
307
+ rpcClient: i,
308
+ analytics: a,
309
309
  initialData: r.initialData,
310
310
  onStateChange: r.onStateChange,
311
311
  params: r
@@ -319,92 +319,92 @@ const Jo = `.inploi-job-search{font-size:16px}.inploi-job-search *,.inploi-job-s
319
319
  * Useful when server-side rendering to avoid CLS.
320
320
  */
321
321
  prerender: async (r) => {
322
- var v, Y, _, f, A;
323
- const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState, d = r.withData ? await xo({
322
+ var u, y, _, z, v;
323
+ const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState, h = r.withData ? await xo({
324
324
  state: m,
325
- rpcClient: t,
325
+ rpcClient: i,
326
326
  t: yo({
327
327
  overrides: r.terms ?? {},
328
- locale: ((v = r.i18n) == null ? void 0 : v.locale) ?? ((Y = r.i18n) == null ? void 0 : Y.fallbackLocale)
328
+ locale: ((u = r.i18n) == null ? void 0 : u.locale) ?? ((y = r.i18n) == null ? void 0 : y.fallbackLocale)
329
329
  }),
330
330
  prioritySegment: (_ = r.results) == null ? void 0 : _.prioritySegment,
331
- locale: (f = r.i18n) == null ? void 0 : f.locale,
332
- fallbackLocale: (A = r.i18n) == null ? void 0 : A.fallbackLocale
333
- }).then((j) => ({ jobs: j })).catch(() => {
331
+ locale: (z = r.i18n) == null ? void 0 : z.locale,
332
+ fallbackLocale: (v = r.i18n) == null ? void 0 : v.fallbackLocale
333
+ }).then((S) => ({ jobs: S })).catch(() => {
334
334
  }) : void 0;
335
335
  return {
336
336
  html: Ho(
337
- y(
338
- U,
337
+ x(
338
+ M,
339
339
  {},
340
- y(p, {
340
+ x(c, {
341
341
  params: {
342
342
  ...r,
343
- initialData: d
343
+ initialData: h
344
344
  }
345
345
  })
346
346
  )
347
347
  ),
348
- data: d
348
+ data: h
349
349
  };
350
350
  },
351
351
  /** Renders the Job Search Plugin inside the container element. */
352
352
  render: async (r) => {
353
- var j, h;
353
+ var p, d, C;
354
354
  const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState;
355
- let d = { filters: m.filters, geo: m.geo };
356
- const v = () => {
357
- var a;
358
- return $o(d, ((a = r.geolocation) == null ? void 0 : a.distanceUnit) ?? "miles");
359
- }, Y = r.initialData ? ko : _o, _ = l.getRenderTargetElement(r.widgetId);
355
+ let h = { filters: m.filters, geo: m.geo };
356
+ const u = document.documentElement.lang.trim() || ((p = r.i18n) == null ? void 0 : p.locale), y = () => {
357
+ var t;
358
+ return $o(h, ((t = r.geolocation) == null ? void 0 : t.distanceUnit) ?? "miles", u);
359
+ }, _ = r.initialData ? ko : _o, z = s.getRenderTargetElement(r.widgetId);
360
360
  zo(
361
361
  typeof window < "u",
362
362
  "the `render` method of JobSearch cannot be called in non-browser environments. Use `prerender` instead."
363
363
  );
364
- let f;
365
- if (Y(y(p, { params: { ...r, onStateChange: (a) => {
366
- r.onStateChange(a), !(!a.filters && !("geo" in a)) && (d = {
367
- filters: a.filters ?? d.filters,
368
- geo: "geo" in a ? a.geo : d.geo
369
- }, f == null || f.setFilters(v()));
370
- } } }), _), r.feedback)
364
+ let v;
365
+ if (_(x(c, { params: { ...r, onStateChange: (t) => {
366
+ r.onStateChange(t), !(!t.filters && !("geo" in t)) && (h = {
367
+ filters: t.filters ?? h.filters,
368
+ geo: "geo" in t ? t.geo : h.geo
369
+ }, v == null || v.setFilters(y()));
370
+ } } }), z), r.feedback)
371
371
  if (r.feedback.plugin instanceof Promise)
372
- r.feedback.plugin.then(({ feedbackPlugin: a }) => {
373
- var n, w;
372
+ r.feedback.plugin.then(({ feedbackPlugin: t }) => {
373
+ var E, F;
374
374
  if (!r.feedback)
375
375
  return;
376
- const T = a()({ apiClient: o, rpcClient: t, logger: e, analytics: i });
376
+ const w = t()({ apiClient: o, rpcClient: i, logger: e, analytics: a });
377
377
  go({
378
- instance: T,
378
+ instance: w,
379
379
  theme: {
380
380
  ...r.theme,
381
- ...(n = r.feedback.params) == null ? void 0 : n.theme
381
+ ...(E = r.feedback.params) == null ? void 0 : E.theme
382
382
  },
383
- terms: ((w = r.feedback.params) == null ? void 0 : w.terms) ?? {}
383
+ terms: ((F = r.feedback.params) == null ? void 0 : F.terms) ?? {}
384
384
  });
385
385
  });
386
386
  else {
387
- const a = r.feedback.plugin({ apiClient: o, rpcClient: t, logger: e, analytics: i });
387
+ const t = r.feedback.plugin({ apiClient: o, rpcClient: i, logger: e, analytics: a });
388
388
  go({
389
- instance: a,
389
+ instance: t,
390
390
  theme: {
391
391
  ...r.theme,
392
- ...(j = r.feedback.params) == null ? void 0 : j.theme
392
+ ...(d = r.feedback.params) == null ? void 0 : d.theme
393
393
  },
394
- terms: ((h = r.feedback.params) == null ? void 0 : h.terms) ?? {}
394
+ terms: ((C = r.feedback.params) == null ? void 0 : C.terms) ?? {}
395
395
  });
396
396
  }
397
- r.alerts && (r.alerts.plugin instanceof Promise ? r.alerts.plugin.then(({ jobAlertsPlugin: a }) => {
398
- r.alerts && (f = a()({ apiClient: o, rpcClient: t, logger: e, analytics: i }), f.render({
397
+ r.alerts && (r.alerts.plugin instanceof Promise ? r.alerts.plugin.then(({ jobAlertsPlugin: t }) => {
398
+ r.alerts && (v = t()({ apiClient: o, rpcClient: i, logger: e, analytics: a }), v.render({
399
399
  config: r.alerts.params.config,
400
400
  terms: r.alerts.params.terms,
401
- initialFilters: v(),
401
+ initialFilters: y(),
402
402
  theme: r.theme
403
403
  }));
404
- }) : (f = r.alerts.plugin({ apiClient: o, rpcClient: t, logger: e, analytics: i }), f.render({
404
+ }) : (v = r.alerts.plugin({ apiClient: o, rpcClient: i, logger: e, analytics: a }), v.render({
405
405
  config: r.alerts.params.config,
406
406
  terms: r.alerts.params.terms,
407
- initialFilters: v(),
407
+ initialFilters: y(),
408
408
  theme: r.theme
409
409
  })));
410
410
  }