@inploi/plugin-chatbot 14.19.0 → 14.19.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.
@@ -1,4132 +0,0 @@
1
- var Dn = Object.defineProperty;
2
- var Pn = (t, e, a) => e in t ? Dn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
3
- var V = (t, e, a) => Pn(t, typeof e != "symbol" ? e + "" : e, a);
4
- import { endpoint as po, typed as Ln, generateUUID as Nn, createPlugin as Rn, createTalentBankClient as Bn, ApiError as Fn } from "@inploi/sdk";
5
- var aa = /* @__PURE__ */ new Set(["Error", "TypeError", "RangeError", "ReferenceError", "SyntaxError", "URIError", "EvalError", "AggregateError", "AbortError", "TimeoutError", "NetworkError", "NotAllowedError", "NotFoundError", "NotSupportedError", "InvalidStateError", "QuotaExceededError", "SecurityError", "DataCloneError", "ChunkLoadError"]), zn = [/^Cannot (?:read|set) properties of (?:undefined|null) \((?:reading|setting) '[\w$]{1,40}'\)$/, /^[\w$.]{1,60} is (?:not a function|not iterable|not defined|not a constructor|undefined|null)$/, /^(?:undefined|null) is not an object \(evaluating '[\w$.]{1,60}'\)$/, /^can't access property "[\w$]{1,40}", [\w$.]{1,60} is (?:undefined|null)$/, /^(?:Script error\.|Assignment to constant variable\.|Maximum call stack size exceeded|Invalid array length|Invalid time value|Failed to fetch|Load failed|Importing a module script failed\.|NetworkError when attempting to fetch resource\.)$/], Hn = `IDBDatabase IDBObjectStore IDBTransaction IDBFactory IDBRequest IDBOpenDBRequest IDBIndex IDBCursor IDBKeyRange
6
- Storage StorageManager Window Document Element HTMLElement HTMLIFrameElement HTMLMediaElement HTMLFormElement
7
- HTMLInputElement Node EventTarget Navigator Clipboard ServiceWorkerContainer ServiceWorkerRegistration Response
8
- Request Headers URL URLSearchParams Blob File FileReader FormData MessagePort Worker Cache CacheStorage History
9
- Location CustomElementRegistry ReadableStream WritableStream AbortSignal Performance Crypto SubtleCrypto
10
- MediaDevices ResizeObserver IntersectionObserver MutationObserver Notification Permissions LockManager
11
- DOMTokenList ShadowRoot Selection Range TextDecoder TextEncoder WebSocket XMLHttpRequest
12
- transaction objectStore createObjectStore deleteObjectStore createIndex index put get getAll getKey delete add
13
- clear count openCursor open deleteDatabase setItem getItem removeItem key postMessage fetch json text arrayBuffer
14
- blob formData querySelector querySelectorAll appendChild removeChild insertBefore replaceChild append prepend
15
- remove contains observe unobserve disconnect play pause writeText readText write read share register
16
- getRegistration requestStorageAccess focus blur scrollTo scrollIntoView setAttribute getAttribute
17
- getBoundingClientRect attachShadow define pushState replaceState assign replace reload send close abort
18
- requestAnimationFrame matchMedia getComputedStyle createElement structuredClone localStorage sessionStorage
19
- indexedDB serviceWorker clipboard cookie`, Wn = ["The operation is insecure.", "The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.", "The user aborted a request.", "The operation was aborted.", "signal is aborted without reason", "Fetch is aborted", "The quota has been exceeded.", "The object is in an invalid state.", "The string did not match the expected pattern.", "The object can not be found here.", "The operation is not supported.", "The database connection is closing.", "The transaction has finished.", "The transaction is not active.", "The transaction was aborted, so the request cannot be fulfilled.", "One of the specified object stores was not found.", "Connection to Indexed Database server lost. Refresh the page to try again", "Attempt to get a record from database without an in-progress transaction", "Database deleted by request of the user", "An internal error was encountered in the Indexed Database server", "Internal error opening backing store for indexedDB.open.", "Access is denied for this document.", "Access to the IndexedDB API is denied in this context.", "The document is sandboxed and lacks the 'allow-same-origin' flag.", "The play() request was interrupted by a call to pause().", "The play() request was interrupted because the media was removed from the document.", "play() failed because the user didn't interact with the document first.", "The network connection was lost.", "The request timed out.", "The Internet connection appears to be offline.", "A server with the specified hostname could not be found.", "Network request failed", "Illegal invocation", "cancelled"], qn = /^Failed to (?:execute|read|set|construct) (?:the )?'([\w$]{1,40})'(?: (?:on|property (?:from|on)|from) '([\w$]{1,40})')?(?:: (.*))?$/, fi, Un = (t) => {
20
- let { apis: e, sentences: a } = fi ?? (fi = { apis: new Set(Hn.split(/\s+/)), sentences: new Set(Wn) });
21
- if (a.has(t)) return t;
22
- let i = qn.exec(t);
23
- if (!i) return "";
24
- let [, o, n, r] = i;
25
- return e.has(o) && (n === void 0 || e.has(n)) && (r === void 0 || a.has(r)) ? t : "";
26
- }, Vn = /^\s*at\s|@(?:[a-z][\w+.-]*:\/\/|\[native code\])/i, Yn = /\b(?:chrome|moz|safari|safari-web|ms-browser)-extension:\/\//, Kn = /\[native code\]|<anonymous>|\(native\)/, Jn = (t) => Yn.test(t) ? "extension" : Kn.test(t) ? "native" : "script", wi = /^(Failed to fetch dynamically imported module|error loading dynamically imported module)/, Gn = /^((?:[\w-]{1,20}\/){0,3}[\w.-]{1,80}\.js)(?:\?retry=\d{1,3})?:(\d{1,7})(?::(\d{1,7}))?\)?$/, Xn = /^ResizeObserver loop (?:completed with undelivered notifications\.|limit exceeded)$/, Zn = ({ error: t, message: e }) => t == null && Xn.test(e), Te = (t) => t instanceof Error ? aa.has(t.name) ? t.name : "Error" : typeof t, Qn = /* @__PURE__ */ new Set(["DOMException", "Object", "Array", "Promise", "Event", "ErrorEvent", "PromiseRejectionEvent", "ProgressEvent", "CloseEvent", "MessageEvent", "Response", "Request", "XMLHttpRequest"]), tr = (t) => {
27
- var i, o;
28
- let e = t === null ? "null" : typeof t, a = { message: "", stack: "", thrown: { type: e, ctor: "", keys: 0, message_length: 0, stack_lines: 0 } };
29
- if (typeof t == "string") return { ...a, thrown: { ...a.thrown, message_length: t.length } };
30
- if (typeof t != "object" || t === null) return a;
31
- try {
32
- let { message: n, stack: r } = t, s = (o = (i = Object.getPrototypeOf(t)) == null ? void 0 : i.constructor) == null ? void 0 : o.name, l = typeof s != "string" ? "" : aa.has(s) || Qn.has(s) ? s : "other", c = typeof n == "string" ? n : "", u = typeof r == "string" ? r : "";
33
- return { message: t instanceof Error || aa.has(l) || l === "DOMException" ? c : "", stack: u, thrown: { type: e, ctor: l, keys: Object.keys(t).length, message_length: c.length, stack_lines: u ? u.split(`
34
- `, 1e3).length : 0 } };
35
- } catch {
36
- return a;
37
- }
38
- }, er = (t, e, a = "") => {
39
- let i = Te(t), { message: o, stack: n, thrown: r } = tr(t), s = (t == null ? a : o).slice(0, 300), l = zn.some((p) => p.test(s)) ? s : wi.test(s) ? wi.exec(s)[1] : Un(s), c = [], u = /* @__PURE__ */ new Set();
40
- for (let p of n.split(`
41
- `, 60)) {
42
- let f = p.indexOf(e), h = f !== -1 && (f === 0 || " (@".includes(p[f - 1])), w = h ? Gn.exec(p.slice(f + e.length).trim()) : null;
43
- w ? c.push([w[1], w[2], w[3]].filter(Boolean).join(":")) : h ? u.add("build") : Vn.test(p) && u.add(Jn(p));
44
- }
45
- c.splice(10);
46
- let d = { name: i, message: l, stack: c, foreign: [...u].sort(), thrown: r };
47
- for (; JSON.stringify(d).length > 1400 && d.stack.length; ) d.stack.pop();
48
- return d;
49
- }, bi = "inploi-candidate-beacon-seed", ar = () => {
50
- try {
51
- return typeof sessionStorage > "u" ? void 0 : sessionStorage;
52
- } catch {
53
- return;
54
- }
55
- }, ir = () => ({ host: "s2811583.eu-central-1a.betterstackdata.com", token: "LHJqsZXu82MrkgUP44JHAwvU", sampleRate: Math.min(1, Math.max(0, 1)) }), ho = (t) => {
56
- let e = 3735928559, a = 1103547991;
57
- for (let i = 0; i < t.length; i++) {
58
- let o = t.charCodeAt(i);
59
- e = Math.imul(e ^ o, 2654435761), a = Math.imul(a ^ o, 1597334677);
60
- }
61
- return e = Math.imul(e ^ e >>> 16, 2246822507) ^ Math.imul(a ^ a >>> 13, 3266489909), a = Math.imul(a ^ a >>> 16, 2246822507) ^ Math.imul(e ^ e >>> 13, 3266489909), 4294967296 * (2097151 & a) + (e >>> 0);
62
- }, or = (t, e) => {
63
- try {
64
- let a = t == null ? void 0 : t.getItem(bi);
65
- if (a) return a;
66
- let i = e();
67
- return t == null || t.setItem(bi, i), i;
68
- } catch {
69
- return e();
70
- }
71
- }, nr = [["facebook", /\bFB(?:AN|AV|_IAB)\b/], ["instagram", /\bInstagram (\d+)/], ["linkedin", /\bLinkedInApp\b/], ["tiktok", /\b(?:musical_ly|BytedanceWebview|TikTok)\b/], ["samsung", /\bSamsungBrowser\/(\d+)/], ["edge", /\bEdg(?:e|A|iOS)?\/(\d+)/], ["opera", /\bOPR\/(\d+)/], ["firefox", /\b(?:Firefox|FxiOS)\/(\d+)/], ["chrome", /\b(?:Chrome|CriOS)\/(\d+)/], ["safari", /\bVersion\/(\d+)[\d.]* (?:Mobile\/\S+ )?Safari\//]], rr = [["ios", /\b(?:iPhone|iPad|iPod)\b/], ["android", /\bAndroid\b/], ["windows", /\bWindows\b/], ["chromeos", /\bCrOS\b/], ["mac", /\bMacintosh\b/], ["linux", /\bLinux\b/]], sr = (t) => {
72
- var i, o;
73
- let e = nr.find(([, n]) => n.test(t)), a = (i = e == null ? void 0 : e[1].exec(t)) == null ? void 0 : i[1];
74
- return { browser: e ? [e[0], a].filter(Boolean).join(" ") : "other", platform: ((o = rr.find(([, n]) => n.test(t))) == null ? void 0 : o[0]) ?? "other" };
75
- }, lr = (t = typeof document > "u" ? void 0 : document) => {
76
- var n, r;
77
- let e = () => typeof performance > "u" ? 0 : Math.round(performance.now()), a = (t == null ? void 0 : t.visibilityState) === "hidden" ? e() : null, i = null, o = !1;
78
- return t == null || t.addEventListener("visibilitychange", () => {
79
- t.visibilityState === "hidden" ? a = e() : a !== null && (i = e());
80
- }), (n = t == null ? void 0 : t.defaultView) == null || n.addEventListener("pagehide", () => o = !0), (r = t == null ? void 0 : t.defaultView) == null || r.addEventListener("pageshow", () => o = !1), () => {
81
- var c;
82
- let s = typeof navigator > "u" ? void 0 : navigator, l = (c = s == null ? void 0 : s.connection) == null ? void 0 : c.effectiveType;
83
- return { visibility: (t == null ? void 0 : t.visibilityState) ?? "unknown", was_hidden: a !== null, hidden_at_ms: a, shown_at_ms: i, unloading: o, online: typeof (s == null ? void 0 : s.onLine) == "boolean" ? s.onLine : null, connection: typeof l == "string" ? l.slice(0, 8) : null, ...sr((s == null ? void 0 : s.userAgent) ?? ""), page_ms: e() };
84
- };
85
- }, cr = /* @__PURE__ */ new Set(["boot_failed", "fatal", "submit_blocked"]), dr = (t, e, a) => {
86
- if (e.unloading || e.visibility === "hidden") return !0;
87
- if (t !== "boot_failed" || e.hidden_at_ms === null) return !1;
88
- if (a.elapsed_ms === void 0) return !0;
89
- let i = e.page_ms - a.elapsed_ms;
90
- return e.hidden_at_ms >= i || e.shown_at_ms !== null && e.shown_at_ms >= i;
91
- }, ur = (t, e, a, i, o) => {
92
- var r;
93
- if (e) return "abandoned";
94
- if (o.online === !1) return "offline";
95
- let n = [i.phase, i.stage, a == null ? void 0 : a.slice(0, 40), i.http_status ?? ((r = i.error) == null ? void 0 : r.name)];
96
- return [...new Set(n.filter((s) => s !== void 0 && s !== "").map(String))].join(":") || t;
97
- }, pr = ({ config: t, version: e, env: a, seed: i, automated: o = typeof navigator < "u" && navigator.webdriver === !0, company: n, page: r = lr(), now: s = Date.now, post: l = (c, u) => fetch(c, u) }) => {
98
- let c = ho(i), u = s(), d = t !== void 0 && c % 1e4 < t.sampleRate * 1e4, p = /* @__PURE__ */ new Set();
99
- return { send: (f, h, w = {}) => {
100
- if (!t || !d || !e) return;
101
- let m = r(), k = cr.has(f), y = k && dr(f, m, w), O = y ? `${f}:abandoned` : f;
102
- if (p.has(O)) return;
103
- p.add(O);
104
- let { error: C, ...B } = w, D = { dt: new Date(s()).toISOString(), message: "Candidate widget beacon", kind: f, version: e, company_slug: (n == null ? void 0 : n()) ?? null, env: a === "production" ? "production" : "staging", mode: o ? "test" : "live", seed_hash: c.toString(36), sample_rate: t.sampleRate, ...h && { reason: h.slice(0, 40) }, ...k && { abandoned: y, cause: ur(f, y, h, w, m).slice(0, 60) }, since_start_ms: Math.max(0, Math.round(s() - u)), ...m, ...B, ...C && { error: C, error_message: C.message, error_frame: C.stack[0] ?? null } };
105
- l(`https://${t.host}`, { method: "POST", keepalive: !0, headers: { Authorization: `Bearer ${t.token}`, "Content-Type": "application/json" }, body: JSON.stringify(D) }).catch(() => {
106
- });
107
- } };
108
- }, pt, hr = { lang: void 0, message: void 0, abortEarly: void 0, abortPipeEarly: void 0 };
109
- function fo(t) {
110
- return !t && !pt ? hr : { lang: (t == null ? void 0 : t.lang) ?? (pt == null ? void 0 : pt.lang), message: t == null ? void 0 : t.message, abortEarly: (t == null ? void 0 : t.abortEarly) ?? (pt == null ? void 0 : pt.abortEarly), abortPipeEarly: (t == null ? void 0 : t.abortPipeEarly) ?? (pt == null ? void 0 : pt.abortPipeEarly) };
111
- }
112
- var Fe;
113
- function fr(t) {
114
- return Fe == null ? void 0 : Fe.get(t);
115
- }
116
- var ze;
117
- function wr(t) {
118
- return ze == null ? void 0 : ze.get(t);
119
- }
120
- var He;
121
- function br(t, e) {
122
- var a;
123
- return (a = He == null ? void 0 : He.get(t)) == null ? void 0 : a.get(e);
124
- }
125
- function Ma(t) {
126
- var a, i;
127
- let e = typeof t;
128
- return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && ((i = (a = Object.getPrototypeOf(t)) == null ? void 0 : a.constructor) == null ? void 0 : i.name)) ?? "null" : e;
129
- }
130
- function ot(t, e, a, i, o) {
131
- let n = o && "input" in o ? o.input : a.value, r = (o == null ? void 0 : o.expected) ?? t.expects ?? null, s = (o == null ? void 0 : o.received) ?? Ma(n), l = { kind: t.kind, type: t.type, input: n, expected: r, received: s, message: `Invalid ${e}: ${r ? `Expected ${r} but r` : "R"}eceived ${s}`, requirement: t.requirement, path: o == null ? void 0 : o.path, issues: o == null ? void 0 : o.issues, lang: i.lang, abortEarly: i.abortEarly, abortPipeEarly: i.abortPipeEarly }, c = t.kind === "schema", u = (o == null ? void 0 : o.message) ?? t.message ?? br(t.reference, l.lang) ?? (c ? wr(l.lang) : null) ?? i.message ?? fr(l.lang);
132
- u !== void 0 && (l.message = typeof u == "function" ? u(l) : u), c && (a.typed = !1), a.issues ? a.issues.push(l) : a.issues = [l];
133
- }
134
- var gi = /* @__PURE__ */ new WeakMap();
135
- function Z(t) {
136
- let e = gi.get(t);
137
- return e || (e = { version: 1, vendor: "valibot", validate(a) {
138
- return t["~run"]({ value: a }, fo());
139
- } }, gi.set(t, e)), e;
140
- }
141
- function gr(t, e) {
142
- return Object.prototype.hasOwnProperty.call(t, e) && e !== "__proto__" && e !== "prototype" && e !== "constructor";
143
- }
144
- function ja(t, e) {
145
- let a = [...new Set(t)];
146
- return a.length > 1 ? `(${a.join(` ${e} `)})` : a[0] ?? "never";
147
- }
148
- function wo(t) {
149
- return { kind: "transformation", type: "transform", reference: wo, async: !1, operation: t, "~run"(e) {
150
- return e.value = this.operation(e.value), e;
151
- } };
152
- }
153
- var vr = { abortEarly: !0 };
154
- function mr(t, e, a) {
155
- return typeof t.fallback == "function" ? t.fallback(e, a) : t.fallback;
156
- }
157
- function Oa(t, e, a) {
158
- return typeof t.default == "function" ? t.default(e, a) : t.default;
159
- }
160
- function bo() {
161
- return { kind: "schema", type: "any", reference: bo, expects: "any", async: !1, get "~standard"() {
162
- return Z(this);
163
- }, "~run"(t) {
164
- return t.typed = !0, t;
165
- } };
166
- }
167
- function go(t, e) {
168
- return { kind: "schema", type: "array", reference: go, expects: "Array", async: !1, item: t, message: e, get "~standard"() {
169
- return Z(this);
170
- }, "~run"(a, i) {
171
- var n;
172
- let o = a.value;
173
- if (Array.isArray(o)) {
174
- a.typed = !0, a.value = [];
175
- for (let r = 0; r < o.length; r++) {
176
- let s = o[r], l = this.item["~run"]({ value: s }, i);
177
- if (l.issues) {
178
- let c = { type: "array", origin: "value", input: o, key: r, value: s };
179
- for (let u of l.issues) u.path ? u.path.unshift(c) : u.path = [c], (n = a.issues) == null || n.push(u);
180
- if (a.issues || (a.issues = l.issues), i.abortEarly) {
181
- a.typed = !1;
182
- break;
183
- }
184
- }
185
- l.typed || (a.typed = !1), a.value.push(l.value);
186
- }
187
- } else ot(this, "type", a, i);
188
- return a;
189
- } };
190
- }
191
- function Da(t) {
192
- return { kind: "schema", type: "boolean", reference: Da, expects: "boolean", async: !1, message: t, get "~standard"() {
193
- return Z(this);
194
- }, "~run"(e, a) {
195
- return typeof e.value == "boolean" ? e.typed = !0 : ot(this, "type", e, a), e;
196
- } };
197
- }
198
- function it(t, e) {
199
- return { kind: "schema", type: "literal", reference: it, expects: Ma(t), async: !1, literal: t, message: e, get "~standard"() {
200
- return Z(this);
201
- }, "~run"(a, i) {
202
- return a.value === this.literal ? a.typed = !0 : ot(this, "type", a, i), a;
203
- } };
204
- }
205
- function vo(t) {
206
- return { kind: "schema", type: "null", reference: vo, expects: "null", async: !1, message: t, get "~standard"() {
207
- return Z(this);
208
- }, "~run"(e, a) {
209
- return e.value === null ? e.typed = !0 : ot(this, "type", e, a), e;
210
- } };
211
- }
212
- function Tt(t, e) {
213
- return { kind: "schema", type: "nullable", reference: Tt, expects: `(${t.expects} | null)`, async: !1, wrapped: t, default: e, get "~standard"() {
214
- return Z(this);
215
- }, "~run"(a, i) {
216
- return a.value === null && (this.default !== void 0 && (a.value = Oa(this, a, i)), a.value === null) ? (a.typed = !0, a) : this.wrapped["~run"](a, i);
217
- } };
218
- }
219
- function me(t) {
220
- return { kind: "schema", type: "number", reference: me, expects: "number", async: !1, message: t, get "~standard"() {
221
- return Z(this);
222
- }, "~run"(e, a) {
223
- return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : ot(this, "type", e, a), e;
224
- } };
225
- }
226
- function R(t, e) {
227
- return { kind: "schema", type: "object", reference: R, expects: "Object", async: !1, entries: t, message: e, get "~standard"() {
228
- return Z(this);
229
- }, "~run"(a, i) {
230
- var n;
231
- let o = a.value;
232
- if (o && typeof o == "object") {
233
- a.typed = !0, a.value = {};
234
- for (let r in this.entries) {
235
- let s = this.entries[r];
236
- if (r in o || (s.type === "exact_optional" || s.type === "optional" || s.type === "nullish") && s.default !== void 0) {
237
- let l = r in o ? o[r] : Oa(s), c = s["~run"]({ value: l }, i);
238
- if (c.issues) {
239
- let u = { type: "object", origin: "value", input: o, key: r, value: l };
240
- for (let d of c.issues) d.path ? d.path.unshift(u) : d.path = [u], (n = a.issues) == null || n.push(d);
241
- if (a.issues || (a.issues = c.issues), i.abortEarly) {
242
- a.typed = !1;
243
- break;
244
- }
245
- }
246
- c.typed || (a.typed = !1), a.value[r] = c.value;
247
- } else if (s.fallback !== void 0) a.value[r] = mr(s);
248
- else if (s.type !== "exact_optional" && s.type !== "optional" && s.type !== "nullish" && (ot(this, "key", a, i, { input: void 0, expected: `"${r}"`, path: [{ type: "object", origin: "key", input: o, key: r, value: o[r] }] }), i.abortEarly)) break;
249
- }
250
- } else ot(this, "type", a, i);
251
- return a;
252
- } };
253
- }
254
- function et(t, e) {
255
- return { kind: "schema", type: "optional", reference: et, expects: `(${t.expects} | undefined)`, async: !1, wrapped: t, default: e, get "~standard"() {
256
- return Z(this);
257
- }, "~run"(a, i) {
258
- return a.value === void 0 && (this.default !== void 0 && (a.value = Oa(this, a, i)), a.value === void 0) ? (a.typed = !0, a) : this.wrapped["~run"](a, i);
259
- } };
260
- }
261
- function mo(t, e) {
262
- return { kind: "schema", type: "picklist", reference: mo, expects: ja(t.map(Ma), "|"), async: !1, options: t, message: e, get "~standard"() {
263
- return Z(this);
264
- }, "~run"(a, i) {
265
- return this.options.includes(a.value) ? a.typed = !0 : ot(this, "type", a, i), a;
266
- } };
267
- }
268
- function Pa(t, e, a) {
269
- return { kind: "schema", type: "record", reference: Pa, expects: "Object", async: !1, key: t, value: e, message: a, get "~standard"() {
270
- return Z(this);
271
- }, "~run"(i, o) {
272
- var r, s;
273
- let n = i.value;
274
- if (n && typeof n == "object") {
275
- i.typed = !0, i.value = {};
276
- for (let l in n) if (gr(n, l)) {
277
- let c = n[l], u = this.key["~run"]({ value: l }, o);
278
- if (u.issues) {
279
- let p = { type: "object", origin: "key", input: n, key: l, value: c };
280
- for (let f of u.issues) f.path = [p], (r = i.issues) == null || r.push(f);
281
- if (i.issues || (i.issues = u.issues), o.abortEarly) {
282
- i.typed = !1;
283
- break;
284
- }
285
- }
286
- let d = this.value["~run"]({ value: c }, o);
287
- if (d.issues) {
288
- let p = { type: "object", origin: "value", input: n, key: l, value: c };
289
- for (let f of d.issues) f.path ? f.path.unshift(p) : f.path = [p], (s = i.issues) == null || s.push(f);
290
- if (i.issues || (i.issues = d.issues), o.abortEarly) {
291
- i.typed = !1;
292
- break;
293
- }
294
- }
295
- (!u.typed || !d.typed) && (i.typed = !1), u.typed && (i.value[u.value] = d.value);
296
- }
297
- } else ot(this, "type", i, o);
298
- return i;
299
- } };
300
- }
301
- function J(t) {
302
- return { kind: "schema", type: "string", reference: J, expects: "string", async: !1, message: t, get "~standard"() {
303
- return Z(this);
304
- }, "~run"(e, a) {
305
- return typeof e.value == "string" ? e.typed = !0 : ot(this, "type", e, a), e;
306
- } };
307
- }
308
- function vi(t) {
309
- let e;
310
- if (t) for (let a of t) if (e) for (let i of a.issues) e.push(i);
311
- else e = a.issues;
312
- return e;
313
- }
314
- function La(t, e) {
315
- return { kind: "schema", type: "union", reference: La, expects: ja(t.map((a) => a.expects), "|"), async: !1, options: t, message: e, get "~standard"() {
316
- return Z(this);
317
- }, "~run"(a, i) {
318
- let o, n, r;
319
- for (let s of this.options) {
320
- let l = s["~run"]({ value: a.value }, i);
321
- if (l.typed) if (l.issues) n ? n.push(l) : n = [l];
322
- else {
323
- o = l;
324
- break;
325
- }
326
- else r ? r.push(l) : r = [l];
327
- }
328
- if (o) return o;
329
- if (n) {
330
- if (n.length === 1) return n[0];
331
- ot(this, "type", a, i, { issues: vi(n) }), a.typed = !0;
332
- } else {
333
- if ((r == null ? void 0 : r.length) === 1) return r[0];
334
- ot(this, "type", a, i, { issues: vi(r) });
335
- }
336
- return a;
337
- } };
338
- }
339
- function Rt() {
340
- return { kind: "schema", type: "unknown", reference: Rt, expects: "unknown", async: !1, get "~standard"() {
341
- return Z(this);
342
- }, "~run"(t) {
343
- return t.typed = !0, t;
344
- } };
345
- }
346
- function _o(t, e, a) {
347
- return { kind: "schema", type: "variant", reference: _o, expects: "Object", async: !1, key: t, options: e, message: a, get "~standard"() {
348
- return Z(this);
349
- }, "~run"(i, o) {
350
- let n = i.value;
351
- if (n && typeof n == "object") {
352
- let r, s = 0, l = this.key, c = [], u = (d, p) => {
353
- for (let f of d.options) {
354
- if (f.type === "variant") u(f, new Set(p).add(f.key));
355
- else {
356
- let h = !0, w = 0;
357
- for (let m of p) {
358
- let k = f.entries[m];
359
- if (m in n ? k["~run"]({ typed: !1, value: n[m] }, vr).issues : k.type !== "exact_optional" && k.type !== "optional" && k.type !== "nullish") {
360
- h = !1, l !== m && (s < w || s === w && m in n && !(l in n)) && (s = w, l = m, c = []), l === m && c.push(f.entries[m].expects);
361
- break;
362
- }
363
- w++;
364
- }
365
- if (h) {
366
- let m = f["~run"]({ value: n }, o);
367
- (!r || !r.typed && m.typed) && (r = m);
368
- }
369
- }
370
- if (r && !r.issues) break;
371
- }
372
- };
373
- if (u(this, /* @__PURE__ */ new Set([this.key])), r) return r;
374
- ot(this, "type", i, o, { input: n[l], expected: ja(c, "|"), path: [{ type: "object", origin: "value", input: n, key: l, value: n[l] }] });
375
- } else ot(this, "type", i, o);
376
- return i;
377
- } };
378
- }
379
- function _r(...t) {
380
- return { ...t[0], pipe: t, get "~standard"() {
381
- return Z(this);
382
- }, "~run"(e, a) {
383
- for (let i of t) if (i.kind !== "metadata") {
384
- if (e.issues && (i.kind === "schema" || i.kind === "transformation")) {
385
- e.typed = !1;
386
- break;
387
- }
388
- (!e.issues || !a.abortEarly && !a.abortPipeEarly) && (e = i["~run"](e, a));
389
- }
390
- return e;
391
- } };
392
- }
393
- function ne(t, e, a) {
394
- let i = t["~run"]({ value: e }, fo(a));
395
- return { typed: i.typed, success: !i.issues, output: i.value, issues: i.issues };
396
- }
397
- var yr = (t) => ({ ok: !0, err: !1, val: t }), xr = (t) => ({ err: !0, ok: !1, val: t }), Na = (t) => t.filter((e) => (e.type === "question-boolean" || e.type === "question-enum") && !!e.data.preApply);
398
- function Ra(t, e, a) {
399
- var r, s;
400
- let i = t.find((l) => l.type === "pre-apply-result");
401
- if (!i) return;
402
- let o = (r = e[i.data.participationKey]) == null ? void 0 : r.value, n = {};
403
- if (o === !0) for (let l of Na(t)) {
404
- let c = (s = e[l.data.key]) == null ? void 0 : s.value;
405
- Array.isArray(c) && c.length === 1 && (c = c[0]), (typeof c == "boolean" || typeof c == "string") && (n[l.data.key] = c);
406
- }
407
- return { node_id: i.id, flow_session_id: a, participation: o, answers: n };
408
- }
409
- function kr(t, e) {
410
- let a = Ra(t, e, ""), i = Na(t).map((n) => {
411
- let r = n.data.preApply, s = a == null ? void 0 : a.answers[n.data.key], l = n.type === "question-boolean" ? typeof s == "boolean" : n.data.options.some((c) => c.value === s);
412
- return { key: n.data.key, severity: r.severity, message: r.mismatchMessage, matched: l && s === r.expectedValue, valid: l };
413
- }), o = (a == null ? void 0 : a.participation) === !1 ? "skipped" : (a == null ? void 0 : a.participation) === !0 && i.length > 0 && i.every((n) => n.valid) ? "completed" : "unavailable";
414
- return { status: o, hasHardConcerns: o === "completed" ? i.some((n) => !n.matched && n.severity === "hard") : null, hasAdvisoryConcerns: o === "completed" ? i.some((n) => !n.matched && n.severity === "advisory") : null, answers: o === "completed" ? i : [] };
415
- }
416
- function $r(t, e) {
417
- let a = new Set(Na(t).map((i) => i.data.key));
418
- for (let i of t) i.type === "pre-apply-result" && (a.add(i.data.key), a.add(i.data.participationKey));
419
- return Object.fromEntries(Object.entries(e).filter(([i]) => !a.has(i)));
420
- }
421
- var Sr = () => {
422
- try {
423
- let t = Intl.DateTimeFormat().resolvedOptions().timeZone;
424
- return typeof t == "string" && t.length > 0 ? t : void 0;
425
- } catch {
426
- return;
427
- }
428
- }, At = class extends Error {
429
- constructor() {
430
- super("Aborted");
431
- }
432
- }, ae = (t, e) => {
433
- if (e.length === 0) return;
434
- let a = t;
435
- for (let i of e) {
436
- if (a == null || typeof a != "object") return;
437
- a = a[i];
438
- }
439
- return a;
440
- }, Er = (t, e = "all") => {
441
- let a = {}, i = e === "all" ? null : new Set(e);
442
- for (let o in t) {
443
- let n = t[o];
444
- n && (i && !i.has(o) || (a[o] = n.value));
445
- }
446
- return a;
447
- }, yo = (t, e) => {
448
- let a = new Set(t.flatMap((i) => i.type === "add-submission" ? [i.data.key] : []));
449
- return Object.entries(e).some(([i, o]) => o !== void 0 && o.type !== "integration" && !a.has(i));
450
- }, Cr = ({ key: t, submissions: e }) => {
451
- var i;
452
- let a = (i = e[t]) == null ? void 0 : i.value;
453
- if (typeof a != "string" && typeof a != "number") throw new Error(`Submission at “${t}” is not a string or number`);
454
- return a;
455
- }, xo = ({ key: t, path: e, submissions: a, context: i }) => {
456
- if (t === "$context") {
457
- if (!e) return;
458
- let o = ae(i, e);
459
- switch (typeof o) {
460
- case "string":
461
- return { type: "string", value: o };
462
- case "number":
463
- return { type: "number", value: o };
464
- case "boolean":
465
- return { type: "boolean", value: o };
466
- default:
467
- console.warn(`Unexpected type for $context.${e.join(".")}`, o);
468
- return;
469
- }
470
- }
471
- return a[t];
472
- }, Ir = (t) => {
473
- let e = t.split(".").pop();
474
- return e ? yr(e ? "." + e : "") : xr("No file extension found");
475
- }, Ar = (t, e) => {
476
- if (e.length === 0) return !0;
477
- let a = e.map((i) => i.toLowerCase());
478
- return t.every((i) => {
479
- let o = Ir(i.name);
480
- return o.ok && a.includes(o.val.toLowerCase());
481
- });
482
- }, ia = { ".pdf": "application/pdf", ".doc": "application/msword", ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".rtf": "application/rtf", ".odt": "application/vnd.oasis.opendocument.text", ".txt": "text/plain", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".png": "image/png" }, xd = (t) => [.../* @__PURE__ */ new Set([...t, ...t.map((e) => ia[e.toLowerCase()]).filter((e) => e !== void 0)])].join(","), Tr = 64 * 1024, Mr = 1024, jr = [208, 207, 17, 224, 161, 177, 26, 225], Or = [80, 75, 3, 4], oa = (t, e) => e.every((a, i) => t[i] === a), mi = (t, e, a = t.length) => {
483
- let i = Array.from(e, (n) => n.charCodeAt(0)), o = Math.min(a, t.length) - i.length;
484
- for (let n = 0; n <= o; n++) if (oa(t.subarray(n), i)) return !0;
485
- return !1;
486
- }, Dr = (t) => {
487
- if (mi(t, "%PDF-", Mr)) return ".pdf";
488
- if (oa(t, jr)) return ".doc";
489
- if (oa(t, Or) && mi(t, "word/")) return ".docx";
490
- }, kd = async (t, e) => {
491
- if (Ar([t], e)) return t;
492
- let a = t.name.lastIndexOf(".");
493
- if ((a === -1 ? "" : t.name.slice(a).toLowerCase()) in ia) return t;
494
- let i = Dr(new Uint8Array(await t.slice(0, Tr).arrayBuffer()));
495
- return !i || !e.some((o) => o.toLowerCase() === i) ? t : new File([t], `${t.name}${i}`, { type: ia[i], lastModified: t.lastModified });
496
- }, Pr = (t) => t <= 1e3 ? `${Math.round(t)}KB` : t < 1e3 * 10 ? `${(t / 1e3).toFixed(1)}MB` : `${Math.round(t / 1e3)}MB`, Me = (t) => typeof t == "string" ? t : `+${t.countryCode} ${t.phoneNumber}`, Lr = R({ integration_response: R({ data: R({ redirect_url: J(), message: et(Tt(J())), button_text: et(Tt(J())) }) }) }), _e = (t) => ne(Lr, t).success, Nr = R({ integration_response: R({ status: et(Rt()), error: R({ message: J(), data: et(Rt()) }) }) }), ko = (t) => ne(Nr, t).success, Rr = R({ success: it(!0), integration_response: R({ data: R({ outcome: it("pending"), message: et(Rt()) }), error: et(vo()) }) }), ye = (t) => {
497
- let e = ne(Rr, t);
498
- if (!e.success || _e(t)) return;
499
- let { message: a } = e.output.integration_response.data;
500
- return typeof a == "string" && a.trim() ? { message: a } : {};
501
- };
502
- R({ success: it(!1), message: et(Rt()) });
503
- var Br = R({ error: it("Validation failed"), messages: R({}) }), Fr = (t, e) => e === 422 && ne(Br, t).success, Ba = (t, e) => {
504
- if (!ko(t)) return;
505
- let a = t.integration_response, i = a.error.data, o = typeof i == "object" && i !== null ? i : {}, n = (h) => typeof o[h] == "string" ? o[h] : void 0, r = (h) => typeof o[h] == "boolean" ? o[h] : void 0, s = (h) => {
506
- let w = o[h];
507
- return Number.isSafeInteger(w) && w >= 0 ? w : void 0;
508
- }, l = (h) => {
509
- let w = n(h), m = w === void 0 ? NaN : Date.parse(w);
510
- return Number.isFinite(m) ? m : void 0;
511
- }, c = typeof a.status == "number" ? a.status : e, u = n("phase"), d = n("verdict"), p = n("code"), f = c === 409 && u === "submit" && d === "confirmed" ? "duplicate" : c === 410 && p === "job_closed" ? "closed" : u === "submit" && d === "unknown" ? "unknown" : void 0;
512
- return { message: a.error.message, status: c, phase: u, providerStatus: s("provider_status"), retryAfterSeconds: s("retry_after_seconds"), retryable: r("retryable"), verdict: d, code: p, reason: n("reason"), maintenanceUntil: l("maintenance_until"), field: n("field"), outcome: f };
513
- }, zr = _o("reason", [R({ outcome: it("sent"), reason: it("sandbox"), ats_label: Tt(J()) }), R({ outcome: it("held"), reason: mo(["production_connection", "no_sandbox_known", "company_hold"]), ats_label: Tt(J()) }), R({ outcome: it("internal"), reason: it("internal"), ats_label: Tt(J()) }), R({ outcome: it("held"), reason: it("redirect"), ats_label: J() })]), Hr = (t) => {
514
- let e = ne(R({ staging_destination: zr }), t);
515
- if (!e.success) return;
516
- let a = e.output.staging_destination;
517
- switch (a.reason) {
518
- case "sandbox":
519
- return `Staging: sent to ${a.ats_label === null ? "the ATS" : a.ats_label} sandbox`;
520
- case "production_connection":
521
- return "Staging: held, production connection";
522
- case "no_sandbox_known":
523
- return "Staging: held, no sandbox known";
524
- case "company_hold":
525
- return "Staging: held, company set to hold all";
526
- case "internal":
527
- return "Staging: saved in inploi (no ATS)";
528
- case "redirect":
529
- return `Staging: held, redirect to ${a.ats_label}`;
530
- }
531
- }, $o = 3e4, Wr = 2e4, qr = 6e4, So = 12e4, Eo = 360 * 6e4, Co = 60 * 6e4, Io = (t) => {
532
- let e = (t == null ? void 0 : t.reason) === "provider_maintenance" ? t.maintenanceUntil : void 0, a = e === void 0 ? 0 : e - Date.now();
533
- return a > 0 && a <= Eo ? e : void 0;
534
- }, Ur = (t) => {
535
- if ((t == null ? void 0 : t.reason) !== "provider_maintenance" || t.outcome === "unknown") return;
536
- let e = Io(t);
537
- return e === void 0 ? {} : { until: e };
538
- }, Vr = (t, e) => new Intl.DateTimeFormat(e, { hour: "numeric", minute: "2-digit" }).format(t), Yr = (t, e) => {
539
- let a = Io(e);
540
- if (a !== void 0) return { waitMs: a - Date.now(), throttles: (t ?? 0) + 1, maintenance: !0 };
541
- if (!((e == null ? void 0 : e.reason) === "provider_maintenance" || (e == null ? void 0 : e.retryable) === !0 && (e.providerStatus === 429 || e.providerStatus !== void 0 && e.providerStatus >= 500 || e.phase === "workflow" && e.verdict === "not_submitted"))) return { waitMs: $o };
542
- let i = (t ?? 0) + 1, o = Math.min(i * Wr, qr), n = (e.retryAfterSeconds ?? 0) * 1e3;
543
- return { waitMs: Math.min(Math.max(o, n), So), throttles: i };
544
- }, _i = (t) => (t == null ? void 0 : t.code) === "captcha_failed" && t.verdict === "not_submitted", Kr = (t) => {
545
- if (!ko(t)) return !1;
546
- let e = t.integration_response.error.data;
547
- return typeof e == "object" && e !== null && "fallback" in e && e.fallback === "contact";
548
- }, Jr = (t) => ((t == null ? void 0 : t.phase) === "workflow" || (t == null ? void 0 : t.phase) === "authentication" || (t == null ? void 0 : t.code) === "captcha_failed") && t.retryable === !0 && t.verdict === "not_submitted", Gr = (t) => (t == null ? void 0 : t.outcome) === "unknown" && t.code === "repeatable_provider_crash", Xr = (t) => (t == null ? void 0 : t.phase) === "submit" && t.verdict === "confirmed" && t.code === "unreadable_document" && typeof t.field == "string" && t.status !== void 0 && t.status >= 400 && t.status < 500 ? t.field : void 0, Zr = (t, e) => {
549
- if (typeof t != "object" || t === null) return null;
550
- let a = t.integration_response;
551
- if (typeof a != "object" || a === null) {
552
- if (e === void 0) return null;
553
- let l = "code" in t && typeof t.code == "string" ? t.code : void 0;
554
- return { service: "API", response: { status: e, payload: l === void 0 ? {} : { code: l } } };
555
- }
556
- let i = a;
557
- if (typeof i.status != "number" || i.service !== void 0 && typeof i.service != "string") return null;
558
- let o = "data" in i, n = i.error, r = typeof n == "object" && n !== null && typeof n.message == "string" && "data" in n;
559
- if (!o && !r) return null;
560
- let s = o ? i.data : n.data ?? null;
561
- return { service: i.service ?? "INVALID_SERVICE", response: { status: i.status, payload: s }, ...ye(t) && { outcome: "pending" } };
562
- }, Qr = (t) => {
563
- if (!/^\d{4}-\d{2}-\d{2}$/.test(t)) return !1;
564
- let e = /* @__PURE__ */ new Date(`${t}T00:00:00Z`);
565
- return Number.isFinite(e.getTime()) && e.toISOString().slice(0, 10) === t;
566
- }, ts = (t, e) => {
567
- if (!Qr(t)) throw new RangeError("Invalid ISO calendar date");
568
- return new Intl.DateTimeFormat(e, { dateStyle: "long", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`${t}T00:00:00Z`));
569
- }, $d = (t) => new Promise((e, a) => {
570
- let i = new FileReader();
571
- i.onload = () => {
572
- if (typeof i.result != "string" || !i.result) return a(new Error("Invalid file"));
573
- e(i.result);
574
- }, i.onerror = a, i.readAsDataURL(t);
575
- }), yi = (t) => typeof t == "object" && t !== null && (Object.getPrototypeOf(t) === Object.prototype || Object.getPrototypeOf(t) === null), Fa = (t, e) => t ? { ...t, ...Object.fromEntries(Object.entries(e).filter(([, a]) => a !== void 0).map(([a, i]) => {
576
- let o = t[a];
577
- return [a, yi(o) && yi(i) ? Fa(o, i) : i];
578
- })) } : e, es = ({ context: t, schema: e, logger: a }) => {
579
- if (e) for (let i in e) {
580
- let o = e[i];
581
- if (!o) continue;
582
- let n = ae(t, i.split("."));
583
- if (o.required && n == null) {
584
- let r = `Configuration error in context: ${i} is required`;
585
- throw a.error(r), new Error(r);
586
- }
587
- if (n != null) switch (o.type) {
588
- case "number":
589
- if (typeof n != "number") throw new Error(`Configuration error in context: ${i} is not a number`);
590
- break;
591
- case "string":
592
- if (typeof n != "string") throw new Error(`Configuration error in context: ${i} is not a string`);
593
- break;
594
- default:
595
- o.type;
596
- }
597
- }
598
- }, Ao = _r(La([J(), me()]), wo(String)), To = R({ id: Ao, version: me(), build: me(), nodes: go(bo()), context_schema: et(Tt(Pa(J(), R({ required: Da(), type: La([it("string"), it("number")]) })))) }), as = R({ flow: To }), is = R({ company: R({ name: J() }), context: et(Pa(J(), Rt())), flow: To, job: R({ id: Ao, title: J() }), user: et(R({ city: et(J()), country: et(J()), isEU: et(Da()), continent: et(J()) })) }), os = (t, e) => ({ id: t.job.id, id_type: (e == null ? void 0 : e.idType) === "internal" && e.id === t.job.id ? "internal" : "external" }), ns = po({ pathname: "/flow/job/:id", method: "GET", schema: { searchParams: Ln(), response: is } }), rs = po({ pathname: "/flow/id/:id", method: "GET", schema: { response: as } }), re, v, Mo, jo, It, xi, Oo, na, Do, Pt = {}, Po = [], ss = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, je = Array.isArray;
599
- function vt(t, e) {
600
- for (var a in e) t[a] = e[a];
601
- return t;
602
- }
603
- function Lo(t) {
604
- var e = t.parentNode;
605
- e && e.removeChild(t);
606
- }
607
- function nt(t, e, a) {
608
- var i, o, n, r = {};
609
- for (n in e) n == "key" ? i = e[n] : n == "ref" ? o = e[n] : r[n] = e[n];
610
- if (arguments.length > 2 && (r.children = arguments.length > 3 ? re.call(arguments, 2) : a), typeof t == "function" && t.defaultProps != null) for (n in t.defaultProps) r[n] === void 0 && (r[n] = t.defaultProps[n]);
611
- return Zt(t, r, i, o, null);
612
- }
613
- function Zt(t, e, a, i, o) {
614
- var n = { type: t, props: e, key: a, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: o ?? ++Mo };
615
- return o == null && v.vnode != null && v.vnode(n), n;
616
- }
617
- function ls() {
618
- return { current: null };
619
- }
620
- function dt(t) {
621
- return t.children;
622
- }
623
- function ct(t, e) {
624
- this.props = t, this.context = e;
625
- }
626
- function xe(t, e) {
627
- if (e == null) return t.__ ? xe(t.__, t.__.__k.indexOf(t) + 1) : null;
628
- for (var a; e < t.__k.length; e++) if ((a = t.__k[e]) != null && a.__e != null) return a.__e;
629
- return typeof t.type == "function" ? xe(t) : null;
630
- }
631
- function No(t) {
632
- var e, a;
633
- if ((t = t.__) != null && t.__c != null) {
634
- for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((a = t.__k[e]) != null && a.__e != null) {
635
- t.__e = t.__c.base = a.__e;
636
- break;
637
- }
638
- return No(t);
639
- }
640
- }
641
- function ra(t) {
642
- (!t.__d && (t.__d = !0) && It.push(t) && !ke.__r++ || xi !== v.debounceRendering) && ((xi = v.debounceRendering) || Oo)(ke);
643
- }
644
- function ke() {
645
- var t, e, a, i, o, n, r, s, l;
646
- for (It.sort(na); t = It.shift(); ) t.__d && (e = It.length, i = void 0, o = void 0, n = void 0, s = (r = (a = t).__v).__e, (l = a.__P) && (i = [], o = [], (n = vt({}, r)).__v = r.__v + 1, za(l, r, n, a.__n, l.ownerSVGElement !== void 0, r.__h != null ? [s] : null, i, s ?? xe(r), r.__h, o), zo(i, r, o), r.__e != s && No(r)), It.length > e && It.sort(na));
647
- ke.__r = 0;
648
- }
649
- function Ro(t, e, a, i, o, n, r, s, l, c, u) {
650
- var d, p, f, h, w, m, k, y, O, C, B = 0, D = i && i.__k || Po, F = D.length, x = F, _ = e.length;
651
- for (a.__k = [], d = 0; d < _; d++) (h = a.__k[d] = (h = e[d]) == null || typeof h == "boolean" || typeof h == "function" ? null : typeof h == "string" || typeof h == "number" || typeof h == "bigint" ? Zt(null, h, null, null, h) : je(h) ? Zt(dt, { children: h }, null, null, null) : h.__b > 0 ? Zt(h.type, h.props, h.key, h.ref ? h.ref : null, h.__v) : h) != null && (h.__ = a, h.__b = a.__b + 1, (y = cs(h, D, k = d + B, x)) === -1 ? f = Pt : (f = D[y] || Pt, D[y] = void 0, x--), za(t, h, f, o, n, r, s, l, c, u), w = h.__e, (p = h.ref) && f.ref != p && (f.ref && Ha(f.ref, null, h), u.push(p, h.__c || w, h)), w != null && (m == null && (m = w), C = !(O = f === Pt || f.__v === null) && y === k, O ? y == -1 && B-- : y !== k && (y === k + 1 ? (B++, C = !0) : y > k ? x > _ - k ? (B += y - k, C = !0) : B-- : B = y < k && y == k - 1 ? y - k : 0), k = d + B, C = C || y == d && !O, typeof h.type != "function" || y === k && f.__k !== h.__k ? typeof h.type == "function" || C ? h.__d !== void 0 ? (l = h.__d, h.__d = void 0) : l = w.nextSibling : l = Fo(t, w, l) : l = Bo(h, l, t), typeof a.type == "function" && (a.__d = l)));
652
- for (a.__e = m, d = F; d--; ) D[d] != null && (typeof a.type == "function" && D[d].__e != null && D[d].__e == a.__d && (a.__d = D[d].__e.nextSibling), Ho(D[d], D[d]));
653
- }
654
- function Bo(t, e, a) {
655
- for (var i, o = t.__k, n = 0; o && n < o.length; n++) (i = o[n]) && (i.__ = t, e = typeof i.type == "function" ? Bo(i, e, a) : Fo(a, i.__e, e));
656
- return e;
657
- }
658
- function mt(t, e) {
659
- return e = e || [], t == null || typeof t == "boolean" || (je(t) ? t.some(function(a) {
660
- mt(a, e);
661
- }) : e.push(t)), e;
662
- }
663
- function Fo(t, e, a) {
664
- return a == null || a.parentNode !== t ? t.insertBefore(e, null) : e == a && e.parentNode != null || t.insertBefore(e, a), e.nextSibling;
665
- }
666
- function cs(t, e, a, i) {
667
- var o = t.key, n = t.type, r = a - 1, s = a + 1, l = e[a];
668
- if (l === null || l && o == l.key && n === l.type) return a;
669
- if (i > (l != null ? 1 : 0)) for (; r >= 0 || s < e.length; ) {
670
- if (r >= 0) {
671
- if ((l = e[r]) && o == l.key && n === l.type) return r;
672
- r--;
673
- }
674
- if (s < e.length) {
675
- if ((l = e[s]) && o == l.key && n === l.type) return s;
676
- s++;
677
- }
678
- }
679
- return -1;
680
- }
681
- function ds(t, e, a, i, o) {
682
- var n;
683
- for (n in a) n === "children" || n === "key" || n in e || $e(t, n, null, a[n], i);
684
- for (n in e) o && typeof e[n] != "function" || n === "children" || n === "key" || n === "value" || n === "checked" || a[n] === e[n] || $e(t, n, e[n], a[n], i);
685
- }
686
- function ki(t, e, a) {
687
- e[0] === "-" ? t.setProperty(e, a ?? "") : t[e] = a == null ? "" : typeof a != "number" || ss.test(e) ? a : a + "px";
688
- }
689
- function $e(t, e, a, i, o) {
690
- var n;
691
- t: if (e === "style") if (typeof a == "string") t.style.cssText = a;
692
- else {
693
- if (typeof i == "string" && (t.style.cssText = i = ""), i) for (e in i) a && e in a || ki(t.style, e, "");
694
- if (a) for (e in a) i && a[e] === i[e] || ki(t.style, e, a[e]);
695
- }
696
- else if (e[0] === "o" && e[1] === "n") n = e !== (e = e.replace(/Capture$/, "")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + n] = a, a ? i || t.addEventListener(e, n ? Si : $i, n) : t.removeEventListener(e, n ? Si : $i, n);
697
- else if (e !== "dangerouslySetInnerHTML") {
698
- if (o) e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
699
- else if (e !== "width" && e !== "height" && e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e !== "rowSpan" && e !== "colSpan" && e in t) try {
700
- t[e] = a ?? "";
701
- break t;
702
- } catch {
703
- }
704
- typeof a == "function" || (a == null || a === !1 && e[4] !== "-" ? t.removeAttribute(e) : t.setAttribute(e, a));
705
- }
706
- }
707
- function $i(t) {
708
- return this.l[t.type + !1](v.event ? v.event(t) : t);
709
- }
710
- function Si(t) {
711
- return this.l[t.type + !0](v.event ? v.event(t) : t);
712
- }
713
- function za(t, e, a, i, o, n, r, s, l, c) {
714
- var u, d, p, f, h, w, m, k, y, O, C, B, D, F, x, _ = e.type;
715
- if (e.constructor !== void 0) return null;
716
- a.__h != null && (l = a.__h, s = e.__e = a.__e, e.__h = null, n = [s]), (u = v.__b) && u(e);
717
- try {
718
- t: if (typeof _ == "function") {
719
- if (k = e.props, y = (u = _.contextType) && i[u.__c], O = u ? y ? y.props.value : u.__ : i, a.__c ? m = (d = e.__c = a.__c).__ = d.__E : ("prototype" in _ && _.prototype.render ? e.__c = d = new _(k, O) : (e.__c = d = new ct(k, O), d.constructor = _, d.render = ps), y && y.sub(d), d.props = k, d.state || (d.state = {}), d.context = O, d.__n = i, p = d.__d = !0, d.__h = [], d._sb = []), d.__s == null && (d.__s = d.state), _.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = vt({}, d.__s)), vt(d.__s, _.getDerivedStateFromProps(k, d.__s))), f = d.props, h = d.state, d.__v = e, p) _.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), d.componentDidMount != null && d.__h.push(d.componentDidMount);
720
- else {
721
- if (_.getDerivedStateFromProps == null && k !== f && d.componentWillReceiveProps != null && d.componentWillReceiveProps(k, O), !d.__e && (d.shouldComponentUpdate != null && d.shouldComponentUpdate(k, d.__s, O) === !1 || e.__v === a.__v)) {
722
- for (e.__v !== a.__v && (d.props = k, d.state = d.__s, d.__d = !1), e.__e = a.__e, e.__k = a.__k, e.__k.forEach(function(S) {
723
- S && (S.__ = e);
724
- }), C = 0; C < d._sb.length; C++) d.__h.push(d._sb[C]);
725
- d._sb = [], d.__h.length && r.push(d);
726
- break t;
727
- }
728
- d.componentWillUpdate != null && d.componentWillUpdate(k, d.__s, O), d.componentDidUpdate != null && d.__h.push(function() {
729
- d.componentDidUpdate(f, h, w);
730
- });
731
- }
732
- if (d.context = O, d.props = k, d.__P = t, d.__e = !1, B = v.__r, D = 0, "prototype" in _ && _.prototype.render) {
733
- for (d.state = d.__s, d.__d = !1, B && B(e), u = d.render(d.props, d.state, d.context), F = 0; F < d._sb.length; F++) d.__h.push(d._sb[F]);
734
- d._sb = [];
735
- } else do
736
- d.__d = !1, B && B(e), u = d.render(d.props, d.state, d.context), d.state = d.__s;
737
- while (d.__d && ++D < 25);
738
- d.state = d.__s, d.getChildContext != null && (i = vt(vt({}, i), d.getChildContext())), p || d.getSnapshotBeforeUpdate == null || (w = d.getSnapshotBeforeUpdate(f, h)), Ro(t, je(x = u != null && u.type === dt && u.key == null ? u.props.children : u) ? x : [x], e, a, i, o, n, r, s, l, c), d.base = e.__e, e.__h = null, d.__h.length && r.push(d), m && (d.__E = d.__ = null);
739
- } else n == null && e.__v === a.__v ? (e.__k = a.__k, e.__e = a.__e) : e.__e = us(a.__e, e, a, i, o, n, r, l, c);
740
- (u = v.diffed) && u(e);
741
- } catch (S) {
742
- e.__v = null, (l || n != null) && (e.__e = s, e.__h = !!l, n[n.indexOf(s)] = null), v.__e(S, e, a);
743
- }
744
- }
745
- function zo(t, e, a) {
746
- for (var i = 0; i < a.length; i++) Ha(a[i], a[++i], a[++i]);
747
- v.__c && v.__c(e, t), t.some(function(o) {
748
- try {
749
- t = o.__h, o.__h = [], t.some(function(n) {
750
- n.call(o);
751
- });
752
- } catch (n) {
753
- v.__e(n, o.__v);
754
- }
755
- });
756
- }
757
- function us(t, e, a, i, o, n, r, s, l) {
758
- var c, u, d, p = a.props, f = e.props, h = e.type, w = 0;
759
- if (h === "svg" && (o = !0), n != null) {
760
- for (; w < n.length; w++) if ((c = n[w]) && "setAttribute" in c == !!h && (h ? c.localName === h : c.nodeType === 3)) {
761
- t = c, n[w] = null;
762
- break;
763
- }
764
- }
765
- if (t == null) {
766
- if (h === null) return document.createTextNode(f);
767
- t = o ? document.createElementNS("http://www.w3.org/2000/svg", h) : document.createElement(h, f.is && f), n = null, s = !1;
768
- }
769
- if (h === null) p === f || s && t.data === f || (t.data = f);
770
- else {
771
- if (n = n && re.call(t.childNodes), u = (p = a.props || Pt).dangerouslySetInnerHTML, d = f.dangerouslySetInnerHTML, !s) {
772
- if (n != null) for (p = {}, w = 0; w < t.attributes.length; w++) p[t.attributes[w].name] = t.attributes[w].value;
773
- (d || u) && (d && (u && d.__html == u.__html || d.__html === t.innerHTML) || (t.innerHTML = d && d.__html || ""));
774
- }
775
- if (ds(t, f, p, o, s), d) e.__k = [];
776
- else if (Ro(t, je(w = e.props.children) ? w : [w], e, a, i, o && h !== "foreignObject", n, r, n ? n[0] : a.__k && xe(a, 0), s, l), n != null) for (w = n.length; w--; ) n[w] != null && Lo(n[w]);
777
- s || ("value" in f && (w = f.value) !== void 0 && (w !== t.value || h === "progress" && !w || h === "option" && w !== p.value) && $e(t, "value", w, p.value, !1), "checked" in f && (w = f.checked) !== void 0 && w !== t.checked && $e(t, "checked", w, p.checked, !1));
778
- }
779
- return t;
780
- }
781
- function Ha(t, e, a) {
782
- try {
783
- typeof t == "function" ? t(e) : t.current = e;
784
- } catch (i) {
785
- v.__e(i, a);
786
- }
787
- }
788
- function Ho(t, e, a) {
789
- var i, o;
790
- if (v.unmount && v.unmount(t), (i = t.ref) && (i.current && i.current !== t.__e || Ha(i, null, e)), (i = t.__c) != null) {
791
- if (i.componentWillUnmount) try {
792
- i.componentWillUnmount();
793
- } catch (n) {
794
- v.__e(n, e);
795
- }
796
- i.base = i.__P = null, t.__c = void 0;
797
- }
798
- if (i = t.__k) for (o = 0; o < i.length; o++) i[o] && Ho(i[o], e, a || typeof t.type != "function");
799
- a || t.__e == null || Lo(t.__e), t.__ = t.__e = t.__d = void 0;
800
- }
801
- function ps(t, e, a) {
802
- return this.constructor(t, a);
803
- }
804
- function jt(t, e, a) {
805
- var i, o, n, r;
806
- v.__ && v.__(t, e), o = (i = typeof a == "function") ? null : a && a.__k || e.__k, n = [], r = [], za(e, t = (!i && a || e).__k = nt(dt, null, [t]), o || Pt, Pt, e.ownerSVGElement !== void 0, !i && a ? [a] : o ? null : e.firstChild ? re.call(e.childNodes) : null, n, !i && a ? a : o ? o.__e : e.firstChild, i, r), zo(n, t, r);
807
- }
808
- function Wo(t, e) {
809
- jt(t, e, Wo);
810
- }
811
- function hs(t, e, a) {
812
- var i, o, n, r, s = vt({}, t.props);
813
- for (n in t.type && t.type.defaultProps && (r = t.type.defaultProps), e) n == "key" ? i = e[n] : n == "ref" ? o = e[n] : s[n] = e[n] === void 0 && r !== void 0 ? r[n] : e[n];
814
- return arguments.length > 2 && (s.children = arguments.length > 3 ? re.call(arguments, 2) : a), Zt(t.type, s, i || t.key, o || t.ref, null);
815
- }
816
- function qo(t, e) {
817
- var a = { __c: e = "__cC" + Do++, __: t, Consumer: function(i, o) {
818
- return i.children(o);
819
- }, Provider: function(i) {
820
- var o, n;
821
- return this.getChildContext || (o = [], (n = {})[e] = this, this.getChildContext = function() {
822
- return n;
823
- }, this.shouldComponentUpdate = function(r) {
824
- this.props.value !== r.value && o.some(function(s) {
825
- s.__e = !0, ra(s);
826
- });
827
- }, this.sub = function(r) {
828
- o.push(r);
829
- var s = r.componentWillUnmount;
830
- r.componentWillUnmount = function() {
831
- o.splice(o.indexOf(r), 1), s && s.call(r);
832
- };
833
- }), i.children;
834
- } };
835
- return a.Provider.__ = a.Consumer.contextType = a;
836
- }
837
- re = Po.slice, v = { __e: function(t, e, a, i) {
838
- for (var o, n, r; e = e.__; ) if ((o = e.__c) && !o.__) try {
839
- if ((n = o.constructor) && n.getDerivedStateFromError != null && (o.setState(n.getDerivedStateFromError(t)), r = o.__d), o.componentDidCatch != null && (o.componentDidCatch(t, i || {}), r = o.__d), r) return o.__E = o;
840
- } catch (s) {
841
- t = s;
842
- }
843
- throw t;
844
- } }, Mo = 0, jo = function(t) {
845
- return t != null && t.constructor === void 0;
846
- }, ct.prototype.setState = function(t, e) {
847
- var a;
848
- a = this.__s != null && this.__s !== this.state ? this.__s : this.__s = vt({}, this.state), typeof t == "function" && (t = t(vt({}, a), this.props)), t && vt(a, t), t != null && this.__v && (e && this._sb.push(e), ra(this));
849
- }, ct.prototype.forceUpdate = function(t) {
850
- this.__v && (this.__e = !0, t && this.__h.push(t), ra(this));
851
- }, ct.prototype.render = dt, It = [], Oo = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, na = function(t, e) {
852
- return t.__v.__b - e.__v.__b;
853
- }, ke.__r = 0, Do = 0;
854
- var Et, N, We, Ei, Bt = 0, Uo = [], he = [], Ci = v.__b, Ii = v.__r, Ai = v.diffed, Ti = v.__c, Mi = v.unmount;
855
- function zt(t, e) {
856
- v.__h && v.__h(N, t, Bt || e), Bt = 0;
857
- var a = N.__H || (N.__H = { __: [], __h: [] });
858
- return t >= a.__.length && a.__.push({ __V: he }), a.__[t];
859
- }
860
- function Vo(t) {
861
- return Bt = 1, Yo(Jo, t);
862
- }
863
- function Yo(t, e, a) {
864
- var i = zt(Et++, 2);
865
- if (i.t = t, !i.__c && (i.__ = [a ? a(e) : Jo(void 0, e), function(s) {
866
- var l = i.__N ? i.__N[0] : i.__[0], c = i.t(l, s);
867
- l !== c && (i.__N = [c, i.__[1]], i.__c.setState({}));
868
- }], i.__c = N, !N.u)) {
869
- var o = function(s, l, c) {
870
- if (!i.__c.__H) return !0;
871
- var u = i.__c.__H.__.filter(function(p) {
872
- return p.__c;
873
- });
874
- if (u.every(function(p) {
875
- return !p.__N;
876
- })) return !n || n.call(this, s, l, c);
877
- var d = !1;
878
- return u.forEach(function(p) {
879
- if (p.__N) {
880
- var f = p.__[0];
881
- p.__ = p.__N, p.__N = void 0, f !== p.__[0] && (d = !0);
882
- }
883
- }), !(!d && i.__c.props === s) && (!n || n.call(this, s, l, c));
884
- };
885
- N.u = !0;
886
- var n = N.shouldComponentUpdate, r = N.componentWillUpdate;
887
- N.componentWillUpdate = function(s, l, c) {
888
- if (this.__e) {
889
- var u = n;
890
- n = void 0, o(s, l, c), n = u;
891
- }
892
- r && r.call(this, s, l, c);
893
- }, N.shouldComponentUpdate = o;
894
- }
895
- return i.__N || i.__;
896
- }
897
- function Wa(t, e) {
898
- var a = zt(Et++, 3);
899
- !v.__s && qa(a.__H, e) && (a.__ = t, a.i = e, N.__H.__h.push(a));
900
- }
901
- function Ht(t, e) {
902
- var a = zt(Et++, 4);
903
- !v.__s && qa(a.__H, e) && (a.__ = t, a.i = e, N.__h.push(a));
904
- }
905
- function Ft(t) {
906
- return Bt = 5, Ot(function() {
907
- return { current: t };
908
- }, []);
909
- }
910
- function fs(t, e, a) {
911
- Bt = 6, Ht(function() {
912
- return typeof t == "function" ? (t(e()), function() {
913
- return t(null);
914
- }) : t ? (t.current = e(), function() {
915
- return t.current = null;
916
- }) : void 0;
917
- }, a == null ? a : a.concat(t));
918
- }
919
- function Ot(t, e) {
920
- var a = zt(Et++, 7);
921
- return qa(a.__H, e) ? (a.__V = t(), a.i = e, a.__h = t, a.__V) : a.__;
922
- }
923
- function ws(t, e) {
924
- return Bt = 8, Ot(function() {
925
- return t;
926
- }, e);
927
- }
928
- function Ko(t) {
929
- var e = N.context[t.__c], a = zt(Et++, 9);
930
- return a.c = t, e ? (a.__ == null && (a.__ = !0, e.sub(N)), e.props.value) : t.__;
931
- }
932
- function bs(t, e) {
933
- v.useDebugValue && v.useDebugValue(e ? e(t) : t);
934
- }
935
- function gs() {
936
- var t = zt(Et++, 11);
937
- if (!t.__) {
938
- for (var e = N.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
939
- var a = e.__m || (e.__m = [0, 0]);
940
- t.__ = "P" + a[0] + "-" + a[1]++;
941
- }
942
- return t.__;
943
- }
944
- function vs() {
945
- for (var t; t = Uo.shift(); ) if (t.__P && t.__H) try {
946
- t.__H.__h.forEach(fe), t.__H.__h.forEach(sa), t.__H.__h = [];
947
- } catch (e) {
948
- t.__H.__h = [], v.__e(e, t.__v);
949
- }
950
- }
951
- v.__b = function(t) {
952
- N = null, Ci && Ci(t);
953
- }, v.__r = function(t) {
954
- Ii && Ii(t), Et = 0;
955
- var e = (N = t.__c).__H;
956
- e && (We === N ? (e.__h = [], N.__h = [], e.__.forEach(function(a) {
957
- a.__N && (a.__ = a.__N), a.__V = he, a.__N = a.i = void 0;
958
- })) : (e.__h.forEach(fe), e.__h.forEach(sa), e.__h = [], Et = 0)), We = N;
959
- }, v.diffed = function(t) {
960
- Ai && Ai(t);
961
- var e = t.__c;
962
- e && e.__H && (e.__H.__h.length && (Uo.push(e) !== 1 && Ei === v.requestAnimationFrame || ((Ei = v.requestAnimationFrame) || ms)(vs)), e.__H.__.forEach(function(a) {
963
- a.i && (a.__H = a.i), a.__V !== he && (a.__ = a.__V), a.i = void 0, a.__V = he;
964
- })), We = N = null;
965
- }, v.__c = function(t, e) {
966
- e.some(function(a) {
967
- try {
968
- a.__h.forEach(fe), a.__h = a.__h.filter(function(i) {
969
- return !i.__ || sa(i);
970
- });
971
- } catch (i) {
972
- e.some(function(o) {
973
- o.__h && (o.__h = []);
974
- }), e = [], v.__e(i, a.__v);
975
- }
976
- }), Ti && Ti(t, e);
977
- }, v.unmount = function(t) {
978
- Mi && Mi(t);
979
- var e, a = t.__c;
980
- a && a.__H && (a.__H.__.forEach(function(i) {
981
- try {
982
- fe(i);
983
- } catch (o) {
984
- e = o;
985
- }
986
- }), a.__H = void 0, e && v.__e(e, a.__v));
987
- };
988
- var ji = typeof requestAnimationFrame == "function";
989
- function ms(t) {
990
- var e, a = function() {
991
- clearTimeout(i), ji && cancelAnimationFrame(e), setTimeout(t);
992
- }, i = setTimeout(a, 100);
993
- ji && (e = requestAnimationFrame(a));
994
- }
995
- function fe(t) {
996
- var e = N, a = t.__c;
997
- typeof a == "function" && (t.__c = void 0, a()), N = e;
998
- }
999
- function sa(t) {
1000
- var e = N;
1001
- t.__c = t.__(), N = e;
1002
- }
1003
- function qa(t, e) {
1004
- return !t || t.length !== e.length || e.some(function(a, i) {
1005
- return a !== t[i];
1006
- });
1007
- }
1008
- function Jo(t, e) {
1009
- return typeof e == "function" ? e(t) : e;
1010
- }
1011
- var _s = /* @__PURE__ */ Symbol.for("preact-signals");
1012
- function Ua() {
1013
- if (Lt > 1)
1014
- Lt--;
1015
- else {
1016
- for (var t, e = !1; Qt !== void 0; ) {
1017
- var a = Qt;
1018
- for (Qt = void 0, la++; a !== void 0; ) {
1019
- var i = a.o;
1020
- if (a.o = void 0, a.f &= -3, !(8 & a.f) && Xo(a)) try {
1021
- a.c();
1022
- } catch (o) {
1023
- e || (t = o, e = !0);
1024
- }
1025
- a = i;
1026
- }
1027
- }
1028
- if (la = 0, Lt--, e) throw t;
1029
- }
1030
- }
1031
- var P = void 0, Qt = void 0, Lt = 0, la = 0, Se = 0;
1032
- function Go(t) {
1033
- if (P !== void 0) {
1034
- var e = t.n;
1035
- if (e === void 0 || e.t !== P)
1036
- return e = { i: 0, S: t, p: P.s, n: void 0, t: P, e: void 0, x: void 0, r: e }, P.s !== void 0 && (P.s.n = e), P.s = e, t.n = e, 32 & P.f && t.S(e), e;
1037
- if (e.i === -1)
1038
- return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = P.s, e.n = void 0, P.s.n = e, P.s = e), e;
1039
- }
1040
- }
1041
- function G(t) {
1042
- this.v = t, this.i = 0, this.n = void 0, this.t = void 0;
1043
- }
1044
- G.prototype.brand = _s;
1045
- G.prototype.h = function() {
1046
- return !0;
1047
- };
1048
- G.prototype.S = function(t) {
1049
- this.t !== t && t.e === void 0 && (t.x = this.t, this.t !== void 0 && (this.t.e = t), this.t = t);
1050
- };
1051
- G.prototype.U = function(t) {
1052
- if (this.t !== void 0) {
1053
- var e = t.e, a = t.x;
1054
- e !== void 0 && (e.x = a, t.e = void 0), a !== void 0 && (a.e = e, t.x = void 0), t === this.t && (this.t = a);
1055
- }
1056
- };
1057
- G.prototype.subscribe = function(t) {
1058
- var e = this;
1059
- return Oe(function() {
1060
- var a = e.value, i = P;
1061
- P = void 0;
1062
- try {
1063
- t(a);
1064
- } finally {
1065
- P = i;
1066
- }
1067
- });
1068
- };
1069
- G.prototype.valueOf = function() {
1070
- return this.value;
1071
- };
1072
- G.prototype.toString = function() {
1073
- return this.value + "";
1074
- };
1075
- G.prototype.toJSON = function() {
1076
- return this.value;
1077
- };
1078
- G.prototype.peek = function() {
1079
- var t = P;
1080
- P = void 0;
1081
- try {
1082
- return this.value;
1083
- } finally {
1084
- P = t;
1085
- }
1086
- };
1087
- Object.defineProperty(G.prototype, "value", { get: function() {
1088
- var t = Go(this);
1089
- return t !== void 0 && (t.i = this.i), this.v;
1090
- }, set: function(t) {
1091
- if (t !== this.v) {
1092
- if (la > 100) throw new Error("Cycle detected");
1093
- this.v = t, this.i++, Se++, Lt++;
1094
- try {
1095
- for (var e = this.t; e !== void 0; e = e.x) e.t.N();
1096
- } finally {
1097
- Ua();
1098
- }
1099
- }
1100
- } });
1101
- function st(t) {
1102
- return new G(t);
1103
- }
1104
- function Xo(t) {
1105
- for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
1106
- return !1;
1107
- }
1108
- function Zo(t) {
1109
- for (var e = t.s; e !== void 0; e = e.n) {
1110
- var a = e.S.n;
1111
- if (a !== void 0 && (e.r = a), e.S.n = e, e.i = -1, e.n === void 0) {
1112
- t.s = e;
1113
- break;
1114
- }
1115
- }
1116
- }
1117
- function Qo(t) {
1118
- for (var e = t.s, a = void 0; e !== void 0; ) {
1119
- var i = e.p;
1120
- e.i === -1 ? (e.S.U(e), i !== void 0 && (i.n = e.n), e.n !== void 0 && (e.n.p = i)) : a = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
1121
- }
1122
- t.s = a;
1123
- }
1124
- function Wt(t) {
1125
- G.call(this, void 0), this.x = t, this.s = void 0, this.g = Se - 1, this.f = 4;
1126
- }
1127
- (Wt.prototype = new G()).h = function() {
1128
- if (this.f &= -3, 1 & this.f) return !1;
1129
- if ((36 & this.f) == 32 || (this.f &= -5, this.g === Se)) return !0;
1130
- if (this.g = Se, this.f |= 1, this.i > 0 && !Xo(this))
1131
- return this.f &= -2, !0;
1132
- var t = P;
1133
- try {
1134
- Zo(this), P = this;
1135
- var e = this.x();
1136
- (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
1137
- } catch (a) {
1138
- this.v = a, this.f |= 16, this.i++;
1139
- }
1140
- return P = t, Qo(this), this.f &= -2, !0;
1141
- };
1142
- Wt.prototype.S = function(t) {
1143
- if (this.t === void 0) {
1144
- this.f |= 36;
1145
- for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
1146
- }
1147
- G.prototype.S.call(this, t);
1148
- };
1149
- Wt.prototype.U = function(t) {
1150
- if (this.t !== void 0 && (G.prototype.U.call(this, t), this.t === void 0)) {
1151
- this.f &= -33;
1152
- for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
1153
- }
1154
- };
1155
- Wt.prototype.N = function() {
1156
- if (!(2 & this.f)) {
1157
- this.f |= 6;
1158
- for (var t = this.t; t !== void 0; t = t.x) t.t.N();
1159
- }
1160
- };
1161
- Object.defineProperty(Wt.prototype, "value", { get: function() {
1162
- if (1 & this.f) throw new Error("Cycle detected");
1163
- var t = Go(this);
1164
- if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
1165
- return this.v;
1166
- } });
1167
- function ys(t) {
1168
- return new Wt(t);
1169
- }
1170
- function tn(t) {
1171
- var e = t.u;
1172
- if (t.u = void 0, typeof e == "function") {
1173
- Lt++;
1174
- var a = P;
1175
- P = void 0;
1176
- try {
1177
- e();
1178
- } catch (i) {
1179
- throw t.f &= -2, t.f |= 8, Va(t), i;
1180
- } finally {
1181
- P = a, Ua();
1182
- }
1183
- }
1184
- }
1185
- function Va(t) {
1186
- for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
1187
- t.x = void 0, t.s = void 0, tn(t);
1188
- }
1189
- function xs(t) {
1190
- if (P !== this) throw new Error("Out-of-order effect");
1191
- Qo(this), P = t, this.f &= -2, 8 & this.f && Va(this), Ua();
1192
- }
1193
- function se(t) {
1194
- this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
1195
- }
1196
- se.prototype.c = function() {
1197
- var t = this.S();
1198
- try {
1199
- if (8 & this.f || this.x === void 0) return;
1200
- var e = this.x();
1201
- typeof e == "function" && (this.u = e);
1202
- } finally {
1203
- t();
1204
- }
1205
- };
1206
- se.prototype.S = function() {
1207
- if (1 & this.f) throw new Error("Cycle detected");
1208
- this.f |= 1, this.f &= -9, tn(this), Zo(this), Lt++;
1209
- var t = P;
1210
- return P = this, xs.bind(this, t);
1211
- };
1212
- se.prototype.N = function() {
1213
- 2 & this.f || (this.f |= 2, this.o = Qt, Qt = this);
1214
- };
1215
- se.prototype.d = function() {
1216
- this.f |= 8, 1 & this.f || Va(this);
1217
- };
1218
- function Oe(t) {
1219
- var e = new se(t);
1220
- try {
1221
- e.c();
1222
- } catch (a) {
1223
- throw e.d(), a;
1224
- }
1225
- return e.d.bind(e);
1226
- }
1227
- var qe;
1228
- function qt(t, e) {
1229
- v[t] = e.bind(null, v[t] || function() {
1230
- });
1231
- }
1232
- function Ee(t) {
1233
- qe && qe(), qe = t && t.S();
1234
- }
1235
- function en(t) {
1236
- var e = this, a = t.data, i = $s(a);
1237
- i.value = a;
1238
- var o = Ot(function() {
1239
- for (var n = e.__v; n = n.__; ) if (n.__c) {
1240
- n.__c.__$f |= 4;
1241
- break;
1242
- }
1243
- return e.__$u.c = function() {
1244
- var r;
1245
- !jo(o.peek()) && ((r = e.base) == null ? void 0 : r.nodeType) === 3 ? e.base.data = o.peek() : (e.__$f |= 1, e.setState({}));
1246
- }, ys(function() {
1247
- var r = i.value.value;
1248
- return r === 0 ? 0 : r === !0 ? "" : r || "";
1249
- });
1250
- }, []);
1251
- return o.value;
1252
- }
1253
- en.displayName = "_st";
1254
- Object.defineProperties(G.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: en }, props: { configurable: !0, get: function() {
1255
- return { data: this };
1256
- } }, __b: { configurable: !0, value: 1 } });
1257
- qt("__b", function(t, e) {
1258
- if (typeof e.type == "string") {
1259
- var a, i = e.props;
1260
- for (var o in i) if (o !== "children") {
1261
- var n = i[o];
1262
- n instanceof G && (a || (e.__np = a = {}), a[o] = n, i[o] = n.peek());
1263
- }
1264
- }
1265
- t(e);
1266
- });
1267
- qt("__r", function(t, e) {
1268
- Ee();
1269
- var a, i = e.__c;
1270
- i && (i.__$f &= -2, (a = i.__$u) === void 0 && (i.__$u = a = (function(o) {
1271
- var n;
1272
- return Oe(function() {
1273
- n = this;
1274
- }), n.c = function() {
1275
- i.__$f |= 1, i.setState({});
1276
- }, n;
1277
- })())), Ee(a), t(e);
1278
- });
1279
- qt("__e", function(t, e, a, i) {
1280
- Ee(), t(e, a, i);
1281
- });
1282
- qt("diffed", function(t, e) {
1283
- Ee();
1284
- var a;
1285
- if (typeof e.type == "string" && (a = e.__e)) {
1286
- var i = e.__np, o = e.props;
1287
- if (i) {
1288
- var n = a.U;
1289
- if (n) for (var r in n) {
1290
- var s = n[r];
1291
- s !== void 0 && !(r in i) && (s.d(), n[r] = void 0);
1292
- }
1293
- else a.U = n = {};
1294
- for (var l in i) {
1295
- var c = n[l], u = i[l];
1296
- c === void 0 ? (c = ks(a, l, u, o), n[l] = c) : c.o(u, o);
1297
- }
1298
- }
1299
- }
1300
- t(e);
1301
- });
1302
- function ks(t, e, a, i) {
1303
- var o = e in t && t.ownerSVGElement === void 0, n = st(a);
1304
- return { o: function(r, s) {
1305
- n.value = r, i = s;
1306
- }, d: Oe(function() {
1307
- var r = n.value.value;
1308
- i[e] !== r && (i[e] = r, o ? t[e] = r : r ? t.setAttribute(e, r) : t.removeAttribute(e));
1309
- }) };
1310
- }
1311
- qt("unmount", function(t, e) {
1312
- if (typeof e.type == "string") {
1313
- var a = e.__e;
1314
- if (a) {
1315
- var i = a.U;
1316
- if (i) {
1317
- a.U = void 0;
1318
- for (var o in i) {
1319
- var n = i[o];
1320
- n && n.d();
1321
- }
1322
- }
1323
- }
1324
- } else {
1325
- var r = e.__c;
1326
- if (r) {
1327
- var s = r.__$u;
1328
- s && (r.__$u = void 0, s.d());
1329
- }
1330
- }
1331
- t(e);
1332
- });
1333
- qt("__h", function(t, e, a, i) {
1334
- (i < 3 || i === 9) && (e.__$f |= 2), t(e, a, i);
1335
- });
1336
- ct.prototype.shouldComponentUpdate = function(t, e) {
1337
- var a = this.__$u;
1338
- if (!(a && a.s !== void 0 || 4 & this.__$f) || 3 & this.__$f) return !0;
1339
- for (var i in e) return !0;
1340
- for (var o in t) if (o !== "__source" && t[o] !== this.props[o]) return !0;
1341
- for (var n in this.props) if (!(n in t)) return !0;
1342
- return !1;
1343
- };
1344
- function $s(t) {
1345
- return Ot(function() {
1346
- return st(t);
1347
- }, []);
1348
- }
1349
- const at = /* @__PURE__ */ Symbol.for("@ts-pattern/matcher"), an = /* @__PURE__ */ Symbol.for("@ts-pattern/isVariadic"), Ce = "@ts-pattern/anonymous-select-key", ca = (t) => !!(t && typeof t == "object"), we = (t) => t && !!t[at], q = (t, e, a) => {
1350
- if (we(t)) {
1351
- const i = t[at](), { matched: o, selections: n } = i.match(e);
1352
- return o && n && Object.keys(n).forEach((r) => a(r, n[r])), o;
1353
- }
1354
- if (ca(t)) {
1355
- if (!ca(e)) return !1;
1356
- if (Array.isArray(t)) {
1357
- if (!Array.isArray(e)) return !1;
1358
- let i = [], o = [], n = [];
1359
- for (const r of t.keys()) {
1360
- const s = t[r];
1361
- we(s) && s[an] ? n.push(s) : n.length ? o.push(s) : i.push(s);
1362
- }
1363
- if (n.length) {
1364
- if (n.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
1365
- if (e.length < i.length + o.length) return !1;
1366
- const r = e.slice(0, i.length), s = o.length === 0 ? [] : e.slice(-o.length), l = e.slice(i.length, o.length === 0 ? 1 / 0 : -o.length);
1367
- return i.every((c, u) => q(c, r[u], a)) && o.every((c, u) => q(c, s[u], a)) && (n.length === 0 || q(n[0], l, a));
1368
- }
1369
- return t.length === e.length && t.every((r, s) => q(r, e[s], a));
1370
- }
1371
- return Reflect.ownKeys(t).every((i) => {
1372
- const o = t[i];
1373
- return (i in e || we(n = o) && n[at]().matcherType === "optional") && q(o, e[i], a);
1374
- var n;
1375
- });
1376
- }
1377
- return Object.is(e, t);
1378
- }, tt = (t) => {
1379
- var e, a, i;
1380
- return ca(t) ? we(t) ? (e = (a = (i = t[at]()).getSelectionKeys) == null ? void 0 : a.call(i)) != null ? e : [] : Array.isArray(t) ? ie(t, tt) : ie(Object.values(t), tt) : [];
1381
- }, ie = (t, e) => t.reduce((a, i) => a.concat(e(i)), []);
1382
- function on(...t) {
1383
- if (t.length === 1) {
1384
- const [e] = t;
1385
- return (a) => q(e, a, () => {
1386
- });
1387
- }
1388
- if (t.length === 2) {
1389
- const [e, a] = t;
1390
- return q(e, a, () => {
1391
- });
1392
- }
1393
- throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`);
1394
- }
1395
- function Y(t) {
1396
- return Object.assign(t, { optional: () => Ya(t), and: (e) => L(t, e), or: (e) => nn(t, e), select: (e) => e === void 0 ? oe(t) : oe(e, t) });
1397
- }
1398
- function da(t) {
1399
- return Object.assign(((e) => Object.assign(e, { [Symbol.iterator]() {
1400
- let a = 0;
1401
- const i = [{ value: Object.assign(e, { [an]: !0 }), done: !1 }, { done: !0, value: void 0 }];
1402
- return { next: () => {
1403
- var o;
1404
- return (o = i[a++]) != null ? o : i.at(-1);
1405
- } };
1406
- } }))(t), { optional: () => da(Ya(t)), select: (e) => da(e === void 0 ? oe(t) : oe(e, t)) });
1407
- }
1408
- function Ya(t) {
1409
- return Y({ [at]: () => ({ match: (e) => {
1410
- let a = {};
1411
- const i = (o, n) => {
1412
- a[o] = n;
1413
- };
1414
- return e === void 0 ? (tt(t).forEach((o) => i(o, void 0)), { matched: !0, selections: a }) : { matched: q(t, e, i), selections: a };
1415
- }, getSelectionKeys: () => tt(t), matcherType: "optional" }) });
1416
- }
1417
- const Ss = (t, e) => {
1418
- for (const a of t) if (!e(a)) return !1;
1419
- return !0;
1420
- }, Es = (t, e) => {
1421
- for (const [a, i] of t.entries()) if (!e(i, a)) return !1;
1422
- return !0;
1423
- }, Cs = (t, e) => {
1424
- const a = Reflect.ownKeys(t);
1425
- for (const i of a) if (!e(i, t[i])) return !1;
1426
- return !0;
1427
- };
1428
- function L(...t) {
1429
- return Y({ [at]: () => ({ match: (e) => {
1430
- let a = {};
1431
- const i = (o, n) => {
1432
- a[o] = n;
1433
- };
1434
- return { matched: t.every((o) => q(o, e, i)), selections: a };
1435
- }, getSelectionKeys: () => ie(t, tt), matcherType: "and" }) });
1436
- }
1437
- function nn(...t) {
1438
- return Y({ [at]: () => ({ match: (e) => {
1439
- let a = {};
1440
- const i = (o, n) => {
1441
- a[o] = n;
1442
- };
1443
- return ie(t, tt).forEach((o) => i(o, void 0)), { matched: t.some((o) => q(o, e, i)), selections: a };
1444
- }, getSelectionKeys: () => ie(t, tt), matcherType: "or" }) });
1445
- }
1446
- function T(t) {
1447
- return { [at]: () => ({ match: (e) => ({ matched: !!t(e) }) }) };
1448
- }
1449
- function oe(...t) {
1450
- const e = typeof t[0] == "string" ? t[0] : void 0, a = t.length === 2 ? t[1] : typeof t[0] == "string" ? void 0 : t[0];
1451
- return Y({ [at]: () => ({ match: (i) => {
1452
- let o = { [e ?? Ce]: i };
1453
- return { matched: a === void 0 || q(a, i, (n, r) => {
1454
- o[n] = r;
1455
- }), selections: o };
1456
- }, getSelectionKeys: () => [e ?? Ce].concat(a === void 0 ? [] : tt(a)) }) });
1457
- }
1458
- function rn(t) {
1459
- return !0;
1460
- }
1461
- function ft(t) {
1462
- return typeof t == "number";
1463
- }
1464
- function xt(t) {
1465
- return typeof t == "string";
1466
- }
1467
- function kt(t) {
1468
- return typeof t == "bigint";
1469
- }
1470
- const sn = Y(T(rn)), Is = Y(T(rn)), As = sn, $t = (t) => Object.assign(Y(t), { startsWith: (e) => {
1471
- return $t(L(t, (a = e, T((i) => xt(i) && i.startsWith(a)))));
1472
- var a;
1473
- }, endsWith: (e) => {
1474
- return $t(L(t, (a = e, T((i) => xt(i) && i.endsWith(a)))));
1475
- var a;
1476
- }, minLength: (e) => $t(L(t, ((a) => T((i) => xt(i) && i.length >= a))(e))), length: (e) => $t(L(t, ((a) => T((i) => xt(i) && i.length === a))(e))), maxLength: (e) => $t(L(t, ((a) => T((i) => xt(i) && i.length <= a))(e))), includes: (e) => {
1477
- return $t(L(t, (a = e, T((i) => xt(i) && i.includes(a)))));
1478
- var a;
1479
- }, regex: (e) => {
1480
- return $t(L(t, (a = e, T((i) => xt(i) && !!i.match(a)))));
1481
- var a;
1482
- } }), Oi = $t(T(xt)), wt = (t) => Object.assign(Y(t), { between: (e, a) => wt(L(t, ((i, o) => T((n) => ft(n) && i <= n && o >= n))(e, a))), lt: (e) => wt(L(t, ((a) => T((i) => ft(i) && i < a))(e))), gt: (e) => wt(L(t, ((a) => T((i) => ft(i) && i > a))(e))), lte: (e) => wt(L(t, ((a) => T((i) => ft(i) && i <= a))(e))), gte: (e) => wt(L(t, ((a) => T((i) => ft(i) && i >= a))(e))), int: () => wt(L(t, T((e) => ft(e) && Number.isInteger(e)))), finite: () => wt(L(t, T((e) => ft(e) && Number.isFinite(e)))), positive: () => wt(L(t, T((e) => ft(e) && e > 0))), negative: () => wt(L(t, T((e) => ft(e) && e < 0))) }), Ts = wt(T(ft)), St = (t) => Object.assign(Y(t), { between: (e, a) => St(L(t, ((i, o) => T((n) => kt(n) && i <= n && o >= n))(e, a))), lt: (e) => St(L(t, ((a) => T((i) => kt(i) && i < a))(e))), gt: (e) => St(L(t, ((a) => T((i) => kt(i) && i > a))(e))), lte: (e) => St(L(t, ((a) => T((i) => kt(i) && i <= a))(e))), gte: (e) => St(L(t, ((a) => T((i) => kt(i) && i >= a))(e))), positive: () => St(L(t, T((e) => kt(e) && e > 0))), negative: () => St(L(t, T((e) => kt(e) && e < 0))) }), Ms = St(T(kt)), js = Y(T(function(t) {
1483
- return typeof t == "boolean";
1484
- })), Os = Y(T(function(t) {
1485
- return typeof t == "symbol";
1486
- })), Ds = Y(T(function(t) {
1487
- return t == null;
1488
- })), Ps = Y(T(function(t) {
1489
- return t != null;
1490
- }));
1491
- var Dt = { __proto__: null, matcher: at, optional: Ya, array: function(...t) {
1492
- return da({ [at]: () => ({ match: (e) => {
1493
- if (!Array.isArray(e)) return { matched: !1 };
1494
- if (t.length === 0) return { matched: !0 };
1495
- const a = t[0];
1496
- let i = {};
1497
- if (e.length === 0) return tt(a).forEach((n) => {
1498
- i[n] = [];
1499
- }), { matched: !0, selections: i };
1500
- const o = (n, r) => {
1501
- i[n] = (i[n] || []).concat([r]);
1502
- };
1503
- return { matched: e.every((n) => q(a, n, o)), selections: i };
1504
- }, getSelectionKeys: () => t.length === 0 ? [] : tt(t[0]) }) });
1505
- }, set: function(...t) {
1506
- return Y({ [at]: () => ({ match: (e) => {
1507
- if (!(e instanceof Set)) return { matched: !1 };
1508
- let a = {};
1509
- if (e.size === 0) return { matched: !0, selections: a };
1510
- if (t.length === 0) return { matched: !0 };
1511
- const i = (n, r) => {
1512
- a[n] = (a[n] || []).concat([r]);
1513
- }, o = t[0];
1514
- return { matched: Ss(e, (n) => q(o, n, i)), selections: a };
1515
- }, getSelectionKeys: () => t.length === 0 ? [] : tt(t[0]) }) });
1516
- }, map: function(...t) {
1517
- return Y({ [at]: () => ({ match: (e) => {
1518
- if (!(e instanceof Map)) return { matched: !1 };
1519
- let a = {};
1520
- if (e.size === 0) return { matched: !0, selections: a };
1521
- const i = (s, l) => {
1522
- a[s] = (a[s] || []).concat([l]);
1523
- };
1524
- if (t.length === 0) return { matched: !0 };
1525
- var o;
1526
- if (t.length === 1) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o = t[0]) == null ? void 0 : o.toString()}`);
1527
- const [n, r] = t;
1528
- return { matched: Es(e, (s, l) => {
1529
- const c = q(n, l, i), u = q(r, s, i);
1530
- return c && u;
1531
- }), selections: a };
1532
- }, getSelectionKeys: () => t.length === 0 ? [] : [...tt(t[0]), ...tt(t[1])] }) });
1533
- }, record: function(...t) {
1534
- return Y({ [at]: () => ({ match: (e) => {
1535
- if (e === null || typeof e != "object" || Array.isArray(e)) return { matched: !1 };
1536
- var a;
1537
- if (t.length === 0) throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(a = t[0]) == null ? void 0 : a.toString()}`);
1538
- let i = {};
1539
- const o = (s, l) => {
1540
- i[s] = (i[s] || []).concat([l]);
1541
- }, [n, r] = t.length === 1 ? [Oi, t[0]] : t;
1542
- return { matched: Cs(e, (s, l) => {
1543
- const c = typeof s != "string" || Number.isNaN(Number(s)) ? null : Number(s), u = c !== null && q(n, c, o), d = q(n, s, o), p = q(r, l, o);
1544
- return (d || u) && p;
1545
- }), selections: i };
1546
- }, getSelectionKeys: () => t.length === 0 ? [] : [...tt(t[0]), ...tt(t[1])] }) });
1547
- }, intersection: L, union: nn, not: function(t) {
1548
- return Y({ [at]: () => ({ match: (e) => ({ matched: !q(t, e, () => {
1549
- }) }), getSelectionKeys: () => [], matcherType: "not" }) });
1550
- }, when: T, select: oe, any: sn, unknown: Is, _: As, string: Oi, number: Ts, bigint: Ms, boolean: js, symbol: Os, nullish: Ds, nonNullable: Ps, instanceOf: function(t) {
1551
- return Y(T(/* @__PURE__ */ (function(e) {
1552
- return (a) => a instanceof e;
1553
- })(t)));
1554
- }, shape: function(t) {
1555
- return Y(T(on(t)));
1556
- } };
1557
- let Ls = class extends Error {
1558
- constructor(e) {
1559
- let a;
1560
- try {
1561
- a = JSON.stringify(e);
1562
- } catch {
1563
- a = e;
1564
- }
1565
- super(`Pattern matching error: no pattern matches value ${a}`), this.input = void 0, this.input = e;
1566
- }
1567
- };
1568
- const ua = { matched: !1, value: void 0 };
1569
- function Ka(t) {
1570
- return new Ns(t, ua);
1571
- }
1572
- let Ns = class pa {
1573
- constructor(e, a) {
1574
- this.input = void 0, this.state = void 0, this.input = e, this.state = a;
1575
- }
1576
- with(...e) {
1577
- if (this.state.matched) return this;
1578
- const a = e[e.length - 1], i = [e[0]];
1579
- let o;
1580
- e.length === 3 && typeof e[1] == "function" ? o = e[1] : e.length > 2 && i.push(...e.slice(1, e.length - 1));
1581
- let n = !1, r = {};
1582
- const s = (c, u) => {
1583
- n = !0, r[c] = u;
1584
- }, l = !i.some((c) => q(c, this.input, s)) || o && !o(this.input) ? ua : { matched: !0, value: a(n ? Ce in r ? r[Ce] : r : this.input, this.input) };
1585
- return new pa(this.input, l);
1586
- }
1587
- when(e, a) {
1588
- if (this.state.matched) return this;
1589
- const i = !!e(this.input);
1590
- return new pa(this.input, i ? { matched: !0, value: a(this.input, this.input) } : ua);
1591
- }
1592
- otherwise(e) {
1593
- return this.state.matched ? this.state.value : e(this.input);
1594
- }
1595
- exhaustive(e = Rs) {
1596
- return this.state.matched ? this.state.value : e(this.input);
1597
- }
1598
- run() {
1599
- return this.exhaustive();
1600
- }
1601
- returnType() {
1602
- return this;
1603
- }
1604
- narrow() {
1605
- return this;
1606
- }
1607
- };
1608
- function Rs(t) {
1609
- throw new Ls(t);
1610
- }
1611
- var Bs = 0;
1612
- function g(t, e, a, i, o, n) {
1613
- var r, s, l = {};
1614
- for (s in e) s == "ref" ? r = e[s] : l[s] = e[s];
1615
- var c = { type: t, props: l, key: a, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --Bs, __source: o, __self: n };
1616
- if (typeof t == "function" && (r = t.defaultProps)) for (s in r) l[s] === void 0 && (l[s] = r[s]);
1617
- return v.vnode && v.vnode(c), c;
1618
- }
1619
- function ln(t) {
1620
- var e, a, i = "";
1621
- if (typeof t == "string" || typeof t == "number") i += t;
1622
- else if (typeof t == "object") if (Array.isArray(t)) {
1623
- var o = t.length;
1624
- for (e = 0; e < o; e++) t[e] && (a = ln(t[e])) && (i && (i += " "), i += a);
1625
- } else for (a in t) t[a] && (i && (i += " "), i += a);
1626
- return i;
1627
- }
1628
- function Ja() {
1629
- for (var t, e, a = 0, i = "", o = arguments.length; a < o; a++) (t = arguments[a]) && (e = ln(t)) && (i && (i += " "), i += e);
1630
- return i;
1631
- }
1632
- const Di = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Pi = Ja, Ga = (t, e) => (a) => {
1633
- var i;
1634
- if ((e == null ? void 0 : e.variants) == null) return Pi(t, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
1635
- const { variants: o, defaultVariants: n } = e, r = Object.keys(o).map((c) => {
1636
- const u = a == null ? void 0 : a[c], d = n == null ? void 0 : n[c];
1637
- if (u === null) return null;
1638
- const p = Di(u) || Di(d);
1639
- return o[c][p];
1640
- }), s = a && Object.entries(a).reduce((c, u) => {
1641
- let [d, p] = u;
1642
- return p === void 0 || (c[d] = p), c;
1643
- }, {}), l = e == null || (i = e.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((c, u) => {
1644
- let { class: d, className: p, ...f } = u;
1645
- return Object.entries(f).every((h) => {
1646
- let [w, m] = h;
1647
- return Array.isArray(m) ? m.includes({
1648
- ...n,
1649
- ...s
1650
- }[w]) : {
1651
- ...n,
1652
- ...s
1653
- }[w] === m;
1654
- }) ? [
1655
- ...c,
1656
- d,
1657
- p
1658
- ] : c;
1659
- }, []);
1660
- return Pi(t, r, l, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
1661
- };
1662
- function cn(t, e) {
1663
- for (var a in e) t[a] = e[a];
1664
- return t;
1665
- }
1666
- function ha(t, e) {
1667
- for (var a in t) if (a !== "__source" && !(a in e)) return !0;
1668
- for (var i in e) if (i !== "__source" && t[i] !== e[i]) return !0;
1669
- return !1;
1670
- }
1671
- function Ue(t, e) {
1672
- return t === e && (t !== 0 || 1 / t == 1 / e) || t != t && e != e;
1673
- }
1674
- function fa(t) {
1675
- this.props = t;
1676
- }
1677
- function Fs(t, e) {
1678
- function a(o) {
1679
- var n = this.props.ref, r = n == o.ref;
1680
- return !r && n && (n.call ? n(null) : n.current = null), e ? !e(this.props, o) || !r : ha(this.props, o);
1681
- }
1682
- function i(o) {
1683
- return this.shouldComponentUpdate = a, nt(t, o);
1684
- }
1685
- return i.displayName = "Memo(" + (t.displayName || t.name) + ")", i.prototype.isReactComponent = !0, i.__f = !0, i;
1686
- }
1687
- (fa.prototype = new ct()).isPureReactComponent = !0, fa.prototype.shouldComponentUpdate = function(t, e) {
1688
- return ha(this.props, t) || ha(this.state, e);
1689
- };
1690
- var Li = v.__b;
1691
- v.__b = function(t) {
1692
- t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), Li && Li(t);
1693
- };
1694
- var zs = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
1695
- function Hs(t) {
1696
- function e(a) {
1697
- var i = cn({}, a);
1698
- return delete i.ref, t(i, a.ref || null);
1699
- }
1700
- return e.$$typeof = zs, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
1701
- }
1702
- var Ni = function(t, e) {
1703
- return t == null ? null : mt(mt(t).map(e));
1704
- }, Ws = { map: Ni, forEach: Ni, count: function(t) {
1705
- return t ? mt(t).length : 0;
1706
- }, only: function(t) {
1707
- var e = mt(t);
1708
- if (e.length !== 1) throw "Children.only";
1709
- return e[0];
1710
- }, toArray: mt }, qs = v.__e;
1711
- v.__e = function(t, e, a, i) {
1712
- if (t.then) {
1713
- for (var o, n = e; n = n.__; ) if ((o = n.__c) && o.__c) return e.__e == null && (e.__e = a.__e, e.__k = a.__k), o.__c(t, e);
1714
- }
1715
- qs(t, e, a, i);
1716
- };
1717
- var Ri = v.unmount;
1718
- function dn(t, e, a) {
1719
- return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(i) {
1720
- typeof i.__c == "function" && i.__c();
1721
- }), t.__c.__H = null), (t = cn({}, t)).__c != null && (t.__c.__P === a && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(i) {
1722
- return dn(i, e, a);
1723
- })), t;
1724
- }
1725
- function un(t, e, a) {
1726
- return t && (t.__v = null, t.__k = t.__k && t.__k.map(function(i) {
1727
- return un(i, e, a);
1728
- }), t.__c && t.__c.__P === e && (t.__e && a.insertBefore(t.__e, t.__d), t.__c.__e = !0, t.__c.__P = a)), t;
1729
- }
1730
- function te() {
1731
- this.__u = 0, this.t = null, this.__b = null;
1732
- }
1733
- function pn(t) {
1734
- var e = t.__.__c;
1735
- return e && e.__a && e.__a(t);
1736
- }
1737
- function hn(t) {
1738
- var e, a, i;
1739
- function o(n) {
1740
- if (e || (e = t()).then(function(r) {
1741
- a = r.default || r;
1742
- }, function(r) {
1743
- i = r;
1744
- }), i) throw i;
1745
- if (!a) throw e;
1746
- return nt(a, n);
1747
- }
1748
- return o.displayName = "Lazy", o.__f = !0, o;
1749
- }
1750
- function Jt() {
1751
- this.u = null, this.o = null;
1752
- }
1753
- v.unmount = function(t) {
1754
- var e = t.__c;
1755
- e && e.__R && e.__R(), e && t.__h === !0 && (t.type = null), Ri && Ri(t);
1756
- }, (te.prototype = new ct()).__c = function(t, e) {
1757
- var a = e.__c, i = this;
1758
- i.t == null && (i.t = []), i.t.push(a);
1759
- var o = pn(i.__v), n = !1, r = function() {
1760
- n || (n = !0, a.__R = null, o ? o(s) : s());
1761
- };
1762
- a.__R = r;
1763
- var s = function() {
1764
- if (!--i.__u) {
1765
- if (i.state.__a) {
1766
- var c = i.state.__a;
1767
- i.__v.__k[0] = un(c, c.__c.__P, c.__c.__O);
1768
- }
1769
- var u;
1770
- for (i.setState({ __a: i.__b = null }); u = i.t.pop(); ) u.forceUpdate();
1771
- }
1772
- }, l = e.__h === !0;
1773
- i.__u++ || l || i.setState({ __a: i.__b = i.__v.__k[0] }), t.then(r, r);
1774
- }, te.prototype.componentWillUnmount = function() {
1775
- this.t = [];
1776
- }, te.prototype.render = function(t, e) {
1777
- if (this.__b) {
1778
- if (this.__v.__k) {
1779
- var a = document.createElement("div"), i = this.__v.__k[0].__c;
1780
- this.__v.__k[0] = dn(this.__b, a, i.__O = i.__P);
1781
- }
1782
- this.__b = null;
1783
- }
1784
- var o = e.__a && nt(dt, null, t.fallback);
1785
- return o && (o.__h = null), [nt(dt, null, e.__a ? null : t.children), o];
1786
- };
1787
- var Bi = function(t, e, a) {
1788
- if (++a[1] === a[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size)) for (a = t.u; a; ) {
1789
- for (; a.length > 3; ) a.pop()();
1790
- if (a[1] < a[0]) break;
1791
- t.u = a = a[2];
1792
- }
1793
- };
1794
- function Us(t) {
1795
- return this.getChildContext = function() {
1796
- return t.context;
1797
- }, t.children;
1798
- }
1799
- function Vs(t) {
1800
- var e = this, a = t.i;
1801
- e.componentWillUnmount = function() {
1802
- jt(null, e.l), e.l = null, e.i = null;
1803
- }, e.i && e.i !== a && e.componentWillUnmount(), t.__v ? (e.l || (e.i = a, e.l = { nodeType: 1, parentNode: a, childNodes: [], appendChild: function(i) {
1804
- this.childNodes.push(i), e.i.appendChild(i);
1805
- }, insertBefore: function(i, o) {
1806
- this.childNodes.push(i), e.i.appendChild(i);
1807
- }, removeChild: function(i) {
1808
- this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.i.removeChild(i);
1809
- } }), jt(nt(Us, { context: e.context }, t.__v), e.l)) : e.l && e.componentWillUnmount();
1810
- }
1811
- function Ys(t, e) {
1812
- var a = nt(Vs, { __v: t, i: e });
1813
- return a.containerInfo = e, a;
1814
- }
1815
- (Jt.prototype = new ct()).__a = function(t) {
1816
- var e = this, a = pn(e.__v), i = e.o.get(t);
1817
- return i[0]++, function(o) {
1818
- var n = function() {
1819
- e.props.revealOrder ? (i.push(o), Bi(e, t, i)) : o();
1820
- };
1821
- a ? a(n) : n();
1822
- };
1823
- }, Jt.prototype.render = function(t) {
1824
- this.u = null, this.o = /* @__PURE__ */ new Map();
1825
- var e = mt(t.children);
1826
- t.revealOrder && t.revealOrder[0] === "b" && e.reverse();
1827
- for (var a = e.length; a--; ) this.o.set(e[a], this.u = [1, 0, this.u]);
1828
- return t.children;
1829
- }, Jt.prototype.componentDidUpdate = Jt.prototype.componentDidMount = function() {
1830
- var t = this;
1831
- this.o.forEach(function(e, a) {
1832
- Bi(t, a, e);
1833
- });
1834
- };
1835
- var fn = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, Ks = /^(?: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]/, Js = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Gs = /[A-Z0-9]/g, Xs = typeof document < "u", Zs = function(t) {
1836
- return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
1837
- };
1838
- function Qs(t, e, a) {
1839
- return e.__k == null && (e.textContent = ""), jt(t, e), typeof a == "function" && a(), t ? t.__c : null;
1840
- }
1841
- function tl(t, e, a) {
1842
- return Wo(t, e), typeof a == "function" && a(), t ? t.__c : null;
1843
- }
1844
- ct.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
1845
- Object.defineProperty(ct.prototype, t, { configurable: !0, get: function() {
1846
- return this["UNSAFE_" + t];
1847
- }, set: function(e) {
1848
- Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
1849
- } });
1850
- });
1851
- var Fi = v.event;
1852
- function el() {
1853
- }
1854
- function al() {
1855
- return this.cancelBubble;
1856
- }
1857
- function il() {
1858
- return this.defaultPrevented;
1859
- }
1860
- v.event = function(t) {
1861
- return Fi && (t = Fi(t)), t.persist = el, t.isPropagationStopped = al, t.isDefaultPrevented = il, t.nativeEvent = t;
1862
- };
1863
- var Xa, ol = { enumerable: !1, configurable: !0, get: function() {
1864
- return this.class;
1865
- } }, zi = v.vnode;
1866
- v.vnode = function(t) {
1867
- typeof t.type == "string" && (function(e) {
1868
- var a = e.props, i = e.type, o = {};
1869
- for (var n in a) {
1870
- var r = a[n];
1871
- if (!(n === "value" && "defaultValue" in a && r == null || Xs && n === "children" && i === "noscript" || n === "class" || n === "className")) {
1872
- var s = n.toLowerCase();
1873
- n === "defaultValue" && "value" in a && a.value == null ? n = "value" : n === "download" && r === !0 ? r = "" : s === "ondoubleclick" ? n = "ondblclick" : s !== "onchange" || i !== "input" && i !== "textarea" || Zs(a.type) ? s === "onfocus" ? n = "onfocusin" : s === "onblur" ? n = "onfocusout" : Js.test(n) ? n = s : i.indexOf("-") === -1 && Ks.test(n) ? n = n.replace(Gs, "-$&").toLowerCase() : r === null && (r = void 0) : s = n = "oninput", s === "oninput" && o[n = s] && (n = "oninputCapture"), o[n] = r;
1874
- }
1875
- }
1876
- i == "select" && o.multiple && Array.isArray(o.value) && (o.value = mt(a.children).forEach(function(l) {
1877
- l.props.selected = o.value.indexOf(l.props.value) != -1;
1878
- })), i == "select" && o.defaultValue != null && (o.value = mt(a.children).forEach(function(l) {
1879
- l.props.selected = o.multiple ? o.defaultValue.indexOf(l.props.value) != -1 : o.defaultValue == l.props.value;
1880
- })), a.class && !a.className ? (o.class = a.class, Object.defineProperty(o, "className", ol)) : (a.className && !a.class || a.class && a.className) && (o.class = o.className = a.className), e.props = o;
1881
- })(t), t.$$typeof = fn, zi && zi(t);
1882
- };
1883
- var Hi = v.__r;
1884
- v.__r = function(t) {
1885
- Hi && Hi(t), Xa = t.__c;
1886
- };
1887
- var Wi = v.diffed;
1888
- v.diffed = function(t) {
1889
- Wi && Wi(t);
1890
- var e = t.props, a = t.__e;
1891
- a != null && t.type === "textarea" && "value" in e && e.value !== a.value && (a.value = e.value == null ? "" : e.value), Xa = null;
1892
- };
1893
- var nl = { ReactCurrentDispatcher: { current: { readContext: function(t) {
1894
- return Xa.__n[t.__c].props.value;
1895
- } } } };
1896
- function rl(t) {
1897
- return nt.bind(null, t);
1898
- }
1899
- function wn(t) {
1900
- return !!t && t.$$typeof === fn;
1901
- }
1902
- function sl(t) {
1903
- return wn(t) ? hs.apply(null, arguments) : t;
1904
- }
1905
- function ll(t) {
1906
- return !!t.__k && (jt(null, t), !0);
1907
- }
1908
- function cl(t) {
1909
- return t && (t.base || t.nodeType === 1 && t) || null;
1910
- }
1911
- var dl = function(t, e) {
1912
- return t(e);
1913
- }, ul = function(t, e) {
1914
- return t(e);
1915
- }, pl = dt;
1916
- function bn(t) {
1917
- t();
1918
- }
1919
- function hl(t) {
1920
- return t;
1921
- }
1922
- function fl() {
1923
- return [!1, bn];
1924
- }
1925
- var wl = Ht;
1926
- function bl(t, e) {
1927
- var a = e(), i = Vo({ h: { __: a, v: e } }), o = i[0].h, n = i[1];
1928
- return Ht(function() {
1929
- o.__ = a, o.v = e, Ue(o.__, e()) || n({ h: o });
1930
- }, [t, a, e]), Wa(function() {
1931
- return Ue(o.__, o.v()) || n({ h: o }), t(function() {
1932
- Ue(o.__, o.v()) || n({ h: o });
1933
- });
1934
- }, [t]), a;
1935
- }
1936
- var Ed = { useState: Vo, useId: gs, useReducer: Yo, useEffect: Wa, useLayoutEffect: Ht, useInsertionEffect: wl, useTransition: fl, useDeferredValue: hl, useSyncExternalStore: bl, startTransition: bn, useRef: Ft, useImperativeHandle: fs, useMemo: Ot, useCallback: ws, useContext: Ko, useDebugValue: bs, version: "17.0.2", Children: Ws, render: Qs, hydrate: tl, unmountComponentAtNode: ll, createPortal: Ys, createElement: nt, createContext: qo, createFactory: rl, cloneElement: sl, createRef: ls, Fragment: dt, isValidElement: wn, findDOMNode: cl, Component: ct, PureComponent: fa, memo: Fs, forwardRef: Hs, flushSync: ul, unstable_batchedUpdates: dl, StrictMode: pl, Suspense: te, SuspenseList: Jt, lazy: hn, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: nl }, gl = ["other", "few", "many", "two", "one", "zero"], qi = ({
1937
- terms: t,
1938
- overrides: e,
1939
- locale: a
1940
- }) => {
1941
- const i = new Intl.PluralRules(a);
1942
- function o(n, r) {
1943
- const s = (e == null ? void 0 : e[n]) ?? t[n];
1944
- switch (typeof s) {
1945
- case "string":
1946
- return s.replace(/{{(\w+)}}/g, (l, c) => {
1947
- var u;
1948
- return ((u = r == null ? void 0 : r[c]) == null ? void 0 : u.toString()) ?? "";
1949
- });
1950
- case "object": {
1951
- if (typeof (r == null ? void 0 : r.count) != "number")
1952
- throw new Error(`Missing count for translation key “${n.toString()}”`);
1953
- let l = i.select(r.count);
1954
- if (!(l in s)) {
1955
- const c = gl.find((u) => u in s);
1956
- if (!c)
1957
- throw new Error(`Missing plural rule for translation key “${n.toString()}”`);
1958
- l = c;
1959
- }
1960
- return s[l].replace(/{{(\w+)}}/g, (c, u) => {
1961
- var d;
1962
- return ((d = r == null ? void 0 : r[u]) == null ? void 0 : d.toString()) ?? "";
1963
- });
1964
- }
1965
- default:
1966
- throw new Error(`Invalid translation value in dictionary for key “${n.toString()}”.`);
1967
- }
1968
- }
1969
- return o;
1970
- }, Ui = qo(null), gn = (t) => ({
1971
- defaultTerms: t,
1972
- TranslationProvider: ({ terms: e, children: a, locale: i }) => {
1973
- const o = Ot(() => qi({ locale: i, terms: t, overrides: e }), [e, i]);
1974
- return /* @__PURE__ */ g(Ui.Provider, { value: { t: o, locale: i }, children: a });
1975
- },
1976
- useTranslation: () => {
1977
- const e = Ko(Ui);
1978
- if (e === null)
1979
- throw new Error("Please wrap useTranslation in a TranslationProvider");
1980
- return { t: e.t, locale: e.locale };
1981
- },
1982
- createTFunction: ({
1983
- overrides: e,
1984
- locale: a
1985
- }) => qi({ terms: t, overrides: e, locale: a })
1986
- }), vl = { conversation_history: "Conversation history", jump_to_current: "Jump to current question", send: "Send", submitting: "Sending your application…", skip: "Skip", skipped: "Skipped", submission_closed: "Sorry, this role closed while you were applying.", submission_duplicate_earlier_attempt: "You've already applied for this role. If that doesn't sound right, it's most likely a hiccup from your earlier attempt — don't worry, we have your application.", submission_failed: "We couldn't submit your application. Choose Restart to try again.", submission_unknown_do_not_resubmit: "We couldn't confirm whether your application went through, and submitting it again won't help. Please don't keep resubmitting — check your email for a confirmation, or contact the employer if nothing arrives.", submission_unreadable_document: "We couldn't read that file. Please upload a different one.", submission_cooldown: { one: "Submit will be available again in {{count}} second.", other: "Submit will be available again in {{count}} seconds." }, submission_cooldown_ready: "Submit is available again.", captcha_check: "One quick check before we send your application", submission_still_working: "Sending your application, this can take up to a minute. Please keep this page open.", file_preparing: { one: "Preparing your file…", other: "Preparing your files…" }, file_ready: { one: "Your file is ready to send", other: "Your files are ready to send" }, file_read_error: "We couldn't read this file. Select it again or choose another file.", file_read_error_replacement: "We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.", address_error: "We couldn't search for that address. Try again, or fill it in manually.", address_searching: "Searching addresses…", address_no_results: "We couldn't find that address. Check the spelling or postcode, or fill it in manually.", restart: "Restart", chat_messages: "Chat messages", file_name: "File name", file_size: "File size", file_total_size: "{{size}} total", loading: "Loading", minimize: "Minimise" }, { defaultTerms: ml } = gn({ submission_redirect_message: "One last step: finish your application on the employer's site.", complete_submission: "Continue on the employer's site", submission_completed: "Submission completed!", submission_pending: "Thanks, we've received your application and are processing it.", submission_failed: "Failed to submit", submission_provider_maintenance: "Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.", submission_provider_maintenance_later: "Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.", submission_available_at: "Submit will be available again at {{time}}.", resume_prompt: "You have an unfinished application for this role. Continue where you left off?", resume_continue: "Continue", resume_start_again: "Start again", captcha_failed: "Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.", close_application: "Close application", invalid_state: "Invalid application state", redirect_url_error: "Couldn’t get the redirect URL.", upload_file: { one: "Select file to upload", other: "Select files to upload" }, file_max_size: "max {{size}}", file_extensions: "Accepted file extensions", address_error: "Something went wrong! Plase continue manually", address_search: "Type and search for places…", address_manual: "Fill in manually", back: "Back", search: "Search", unknown_error: "An error occurred", line1: "Line 1", line2: "Line 2", line3: "Line 3", city: "City", state: "State", postcode: "Postcode", country: "Country", select_country: "Select a country", validation_empty: "Please enter a value", validation_date: "Please enter a valid date (YYYY-MM-DD)", validation_email: "That doesn’t look like a valid email address", validation_url: "That doesn’t look like a valid URL", validation_max_chars: "Please enter no more than {{count}} characters", validation_min_chars: "Please enter {{count}} or more characters", validation_phone: "Please enter a valid phone number", validation_phone_min_chars: "Your phone number must be at least {{count}} digits long", validation_country_code: "Please select a country code", validation_number: "Please enter a valid number", validation_number_min: "Please enter a number greater than or equal to {{min}}", validation_number_max: "Please enter a number less than or equal to {{max}}", validation_number_whole: "Enter a whole number", validation_number_decimal_cases: "Please enter a number with at most {{count}} decimal cases", validation_file: "Please select a file", validation_file_ext: "Please only upload {{ext}} files", validation_file_min: { one: "Please upload at least one file", other: "Please only upload at least {{count}} files" }, validation_file_max: { one: "Please only upload one file", other: "Please only upload up to {{count}} files" }, validation_file_size: "Your file is too big. Please upload a file smaller than {{size}}", validation_file_empty: "This file is empty. If it’s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.", validation_required: "This field is required.", validation_multiple_choice_min: { one: "Please select at least {{count}} option", other: "Please select at least {{count}} options" }, validation_multiple_choice_max: { one: "Please select at most {{count}} option", other: "Please select at most {{count}} options" }, optional: "optional" });
1987
- const { TranslationProvider: _l, useTranslation: De, createTFunction: Cd } = gn({
1988
- ...ml,
1989
- ...vl,
1990
- error_heading: "Something unexpected happened",
1991
- flow_closed: "This role is no longer accepting applications.",
1992
- undo: "Change answer",
1993
- job_alerts_offer: "Want to hear about similar roles? We can email you at {{email}} when new ones open.",
1994
- job_alerts_accept: "Get job alerts",
1995
- job_alerts_decline: "No thanks",
1996
- job_alerts_privacy: "We'll use your email only for these alerts. You can unsubscribe at any time.",
1997
- job_alerts_privacy_sender: "{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.",
1998
- job_alerts_success: "Done. We'll email you about similar roles.",
1999
- job_alerts_error: "Sorry, we couldn't set that up. Please try again later.",
2000
- submission_duplicate: "You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.",
2001
- submission_retryable: "We couldn't submit your application. Please try again.",
2002
- submission_unknown: "We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.",
2003
- maximize: "Maximise",
2004
- submit: "Submit",
2005
- file_more: { one: "+{{count}} file", other: "+{{count}} files" }
2006
- });
2007
- function vn(t, e) {
2008
- if (!t)
2009
- throw new Error(e);
2010
- }
2011
- var wa = (t) => t === null || typeof t != "object" ? t : Array.isArray(t) ? t.map(wa) : Object.keys(t).sort().reduce((e, a) => (e[a] = wa(t[a]), e), {}), yl = (t) => {
2012
- let e = JSON.stringify(wa(t)), a = 5381;
2013
- for (let i = 0; i < e.length; i++) a = a * 33 ^ e.charCodeAt(i);
2014
- return (a >>> 0).toString(36);
2015
- };
2016
- const ba = (t, e) => e.some((a) => t instanceof a);
2017
- let Vi, Yi;
2018
- function xl() {
2019
- return Vi || (Vi = [
2020
- IDBDatabase,
2021
- IDBObjectStore,
2022
- IDBIndex,
2023
- IDBCursor,
2024
- IDBTransaction
2025
- ]);
2026
- }
2027
- function kl() {
2028
- return Yi || (Yi = [
2029
- IDBCursor.prototype.advance,
2030
- IDBCursor.prototype.continue,
2031
- IDBCursor.prototype.continuePrimaryKey
2032
- ]);
2033
- }
2034
- const ga = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap();
2035
- function $l(t) {
2036
- const e = new Promise((a, i) => {
2037
- const o = () => {
2038
- t.removeEventListener("success", n), t.removeEventListener("error", r);
2039
- }, n = () => {
2040
- a(Mt(t.result)), o();
2041
- }, r = () => {
2042
- i(t.error), o();
2043
- };
2044
- t.addEventListener("success", n), t.addEventListener("error", r);
2045
- });
2046
- return Pe.set(e, t), e;
2047
- }
2048
- function Sl(t) {
2049
- if (ga.has(t))
2050
- return;
2051
- const e = new Promise((a, i) => {
2052
- const o = () => {
2053
- t.removeEventListener("complete", n), t.removeEventListener("error", r), t.removeEventListener("abort", r);
2054
- }, n = () => {
2055
- a(), o();
2056
- }, r = () => {
2057
- i(t.error || new DOMException("AbortError", "AbortError")), o();
2058
- };
2059
- t.addEventListener("complete", n), t.addEventListener("error", r), t.addEventListener("abort", r);
2060
- });
2061
- ga.set(t, e);
2062
- }
2063
- let va = {
2064
- get(t, e, a) {
2065
- if (t instanceof IDBTransaction) {
2066
- if (e === "done")
2067
- return ga.get(t);
2068
- if (e === "store")
2069
- return a.objectStoreNames[1] ? void 0 : a.objectStore(a.objectStoreNames[0]);
2070
- }
2071
- return Mt(t[e]);
2072
- },
2073
- set(t, e, a) {
2074
- return t[e] = a, !0;
2075
- },
2076
- has(t, e) {
2077
- return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
2078
- }
2079
- };
2080
- function mn(t) {
2081
- va = t(va);
2082
- }
2083
- function El(t) {
2084
- return kl().includes(t) ? function(...e) {
2085
- return t.apply(ma(this), e), Mt(this.request);
2086
- } : function(...e) {
2087
- return Mt(t.apply(ma(this), e));
2088
- };
2089
- }
2090
- function Cl(t) {
2091
- return typeof t == "function" ? El(t) : (t instanceof IDBTransaction && Sl(t), ba(t, xl()) ? new Proxy(t, va) : t);
2092
- }
2093
- function Mt(t) {
2094
- if (t instanceof IDBRequest)
2095
- return $l(t);
2096
- if (Ve.has(t))
2097
- return Ve.get(t);
2098
- const e = Cl(t);
2099
- return e !== t && (Ve.set(t, e), Pe.set(e, t)), e;
2100
- }
2101
- const ma = (t) => Pe.get(t);
2102
- function Il(t, e, { blocked: a, upgrade: i, blocking: o, terminated: n } = {}) {
2103
- const r = indexedDB.open(t, e), s = Mt(r);
2104
- return i && r.addEventListener("upgradeneeded", (l) => {
2105
- i(Mt(r.result), l.oldVersion, l.newVersion, Mt(r.transaction), l);
2106
- }), a && r.addEventListener("blocked", (l) => a(
2107
- // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
2108
- l.oldVersion,
2109
- l.newVersion,
2110
- l
2111
- )), s.then((l) => {
2112
- n && l.addEventListener("close", () => n()), o && l.addEventListener("versionchange", (c) => o(c.oldVersion, c.newVersion, c));
2113
- }).catch(() => {
2114
- }), s;
2115
- }
2116
- const Al = ["get", "getKey", "getAll", "getAllKeys", "count"], Tl = ["put", "add", "delete", "clear"], Ye = /* @__PURE__ */ new Map();
2117
- function Ki(t, e) {
2118
- if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
2119
- return;
2120
- if (Ye.get(e))
2121
- return Ye.get(e);
2122
- const a = e.replace(/FromIndex$/, ""), i = e !== a, o = Tl.includes(a);
2123
- if (
2124
- // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
2125
- !(a in (i ? IDBIndex : IDBObjectStore).prototype) || !(o || Al.includes(a))
2126
- )
2127
- return;
2128
- const n = async function(r, ...s) {
2129
- const l = this.transaction(r, o ? "readwrite" : "readonly");
2130
- let c = l.store;
2131
- return i && (c = c.index(s.shift())), (await Promise.all([
2132
- c[a](...s),
2133
- o && l.done
2134
- ]))[0];
2135
- };
2136
- return Ye.set(e, n), n;
2137
- }
2138
- mn((t) => ({
2139
- ...t,
2140
- get: (e, a, i) => Ki(e, a) || t.get(e, a, i),
2141
- has: (e, a) => !!Ki(e, a) || t.has(e, a)
2142
- }));
2143
- const Ml = ["continue", "continuePrimaryKey", "advance"], Ji = {}, _a = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), jl = {
2144
- get(t, e) {
2145
- if (!Ml.includes(e))
2146
- return t[e];
2147
- let a = Ji[e];
2148
- return a || (a = Ji[e] = function(...i) {
2149
- _a.set(this, _n.get(this)[e](...i));
2150
- }), a;
2151
- }
2152
- };
2153
- async function* Ol(...t) {
2154
- let e = this;
2155
- if (e instanceof IDBCursor || (e = await e.openCursor(...t)), !e)
2156
- return;
2157
- e = e;
2158
- const a = new Proxy(e, jl);
2159
- for (_n.set(a, e), Pe.set(a, ma(e)); e; )
2160
- yield a, e = await (_a.get(a) || e.continue()), _a.delete(a);
2161
- }
2162
- function Gi(t, e) {
2163
- return e === Symbol.asyncIterator && ba(t, [IDBIndex, IDBObjectStore, IDBCursor]) || e === "iterate" && ba(t, [IDBIndex, IDBObjectStore]);
2164
- }
2165
- mn((t) => ({
2166
- ...t,
2167
- get(e, a, i) {
2168
- return Gi(e, a) ? Ol : t.get(e, a, i);
2169
- },
2170
- has(e, a) {
2171
- return Gi(e, a) || t.has(e, a);
2172
- }
2173
- }));
2174
- const Xi = () => Il("inploi-chatbot", 3, {
2175
- upgrade(t) {
2176
- try {
2177
- t.deleteObjectStore("state");
2178
- } catch {
2179
- }
2180
- t.createObjectStore("state");
2181
- }
2182
- });
2183
- let ue;
2184
- const ya = async (t) => {
2185
- if (typeof indexedDB > "u") return;
2186
- const e = ue ?? (ue = Xi());
2187
- try {
2188
- return await t(await e);
2189
- } catch (a) {
2190
- if (!(a instanceof Error && a.name === "InvalidStateError")) throw a;
2191
- return ue === e && (ue = Xi()), t(await ue);
2192
- }
2193
- }, Dl = (t) => ({
2194
- ...t,
2195
- messages: t.messages.map((e) => {
2196
- if (e.type !== "link") return e;
2197
- const { onClick: a, ...i } = e;
2198
- return i;
2199
- })
2200
- });
2201
- let be, Ke, Kt;
2202
- const Zi = () => {
2203
- if (!be) return Kt;
2204
- const t = be;
2205
- be = void 0;
2206
- const e = Ie(t), a = ya((i) => i.put("state", Dl(t.data), e)).finally(() => {
2207
- Kt === a && (Kt = void 0);
2208
- });
2209
- return Kt = a, Kt;
2210
- }, Q = {
2211
- getStateData: async (t, e, a) => {
2212
- const i = Ie({ ...t, flowKeys: e, context: a });
2213
- return ya((o) => o.get("state", i));
2214
- },
2215
- /** Every application saved in this browser, whatever its job or flow. */
2216
- getAllStateData: async () => await ya((t) => t.getAll("state")) ?? [],
2217
- setStateData: (t) => {
2218
- be = t, clearTimeout(Ke), Ke = setTimeout(() => {
2219
- Zi();
2220
- }, 1e3);
2221
- },
2222
- flushStateData: () => (clearTimeout(Ke), Zi() ?? Promise.resolve())
2223
- }, Id = (t) => (e) => e ? e.type === t : !1, Pl = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : Math.random().toString(36).slice(2), Qi = () => ({
2224
- messages: [],
2225
- submissions: {},
2226
- currentInput: null,
2227
- nodeHistory: [],
2228
- startedWriteNodeIds: [],
2229
- isFinished: !1,
2230
- hasInteracted: !1,
2231
- sequence: 0,
2232
- flowSessionId: Pl()
2233
- }), Ad = (t) => (
2234
- /** nativeEvent is a hidden property not exposed by JSX's typings */
2235
- Ka(t).with(
2236
- {
2237
- nativeEvent: {
2238
- submitter: Dt.select(Dt.union(Dt.instanceOf(HTMLButtonElement), Dt.instanceOf(HTMLInputElement)))
2239
- }
2240
- },
2241
- (e) => e
2242
- ).otherwise(() => {
2243
- throw new Error("invalid submitter");
2244
- })
2245
- ), ge = (t, e, a, i = 0) => {
2246
- if (!e.nextId)
2247
- return a(e.id, { stepsMade: i, remainingSteps: 0 }), { stepsMade: i, remainingSteps: 0 };
2248
- const o = t.find((c) => c.id === e.nextId);
2249
- if (o === void 0)
2250
- return { stepsMade: i, remainingSteps: 0 };
2251
- const n = e.type === "if-block" ? e.branchId : void 0, r = t.find((c) => c.id === n), s = e.type.includes("question") ? 1 : 0;
2252
- if (r) {
2253
- const c = s + Math.max(
2254
- ge(t, o, a, i + s).remainingSteps,
2255
- ge(t, r, a, i + s).remainingSteps
2256
- );
2257
- return a(e.id, { stepsMade: i, remainingSteps: c }), { stepsMade: i, remainingSteps: c };
2258
- }
2259
- const l = s + ge(t, o, a, i + s).remainingSteps;
2260
- return a(e.id, { stepsMade: i, remainingSteps: l }), { stepsMade: i, remainingSteps: l };
2261
- }, Ll = (t) => {
2262
- const e = {}, a = t.find((i) => i.isHead);
2263
- return a && ge(t, a, (i, o) => {
2264
- e[i] = o;
2265
- }), e;
2266
- }, Ie = (t) => [...t.flowKeys, t.id, t.version, t.build, yl(t.hostContext ?? t.context)].join("/"), Nl = ({ data: t, nodes: e }) => {
2267
- const a = t.startedWriteNodeIds === void 0 ? e.some((i) => i.type === "integration-application-submit" && t.nodeHistory.includes(i.id)) : t.startedWriteNodeIds.length > 0;
2268
- return !t.isFinished && !a && yo(e, t.submissions);
2269
- }, to = ({ data: t, nodes: e }) => {
2270
- var a;
2271
- return !t.isFinished && ((((a = t.startedWriteNodeIds) == null ? void 0 : a.length) ?? 0) > 0 || yo(e, t.submissions));
2272
- }, bt = st({ state: "idle" }), Je = /* @__PURE__ */ new Set(), Ct = (t) => {
2273
- const { state: e, flow: a } = bt.value;
2274
- if (e !== "loaded") return;
2275
- vn(a, "No flow to update");
2276
- const i = t(a.data);
2277
- a.data = i, bt.value = { state: e, flow: a }, Q.setStateData(a);
2278
- }, M = {
2279
- current$: bt,
2280
- viewState$: st("closed"),
2281
- prepareFlow: async ({
2282
- jobAlerts: t,
2283
- flow: e,
2284
- context: a = {},
2285
- jobContext: i,
2286
- flowKeys: o,
2287
- title: n,
2288
- analytics: r,
2289
- job: s,
2290
- employer: l,
2291
- locationOrigin: c
2292
- }) => {
2293
- await Q.flushStateData().catch(() => {
2294
- });
2295
- const u = await Q.getStateData(e, o, a), d = u ?? Qi(), p = Ie({ ...e, flowKeys: o, context: a }), f = u !== void 0 && !Je.has(p) && Nl({ data: d, nodes: e.nodes });
2296
- return f || Je.add(p), {
2297
- jobAlerts: t,
2298
- data: d,
2299
- offerResume: f,
2300
- startedAt: /* @__PURE__ */ new Date(),
2301
- nodeIdToProgress: Ll(e.nodes),
2302
- flowKeys: o,
2303
- id: e.id,
2304
- version: e.version,
2305
- nodes: e.nodes,
2306
- build: e.build,
2307
- context: i === void 0 ? a : Fa(i, a),
2308
- hostContext: i === void 0 ? void 0 : a,
2309
- title: n,
2310
- analytics: r,
2311
- job: s,
2312
- employer: l,
2313
- locationOrigin: c
2314
- };
2315
- },
2316
- commitFlow: (t) => {
2317
- bt.value = { state: "loaded", flow: t }, Q.setStateData(t);
2318
- },
2319
- /** The candidate chose to continue or start again, so this page does not ask about this application again. */
2320
- settleResume: (t) => {
2321
- t.offerResume = !1, Je.add(Ie(t));
2322
- },
2323
- cancelCurrentFlow: () => {
2324
- bt.value = { state: "idle" }, M.viewState$.value = "closed";
2325
- },
2326
- markAsFinished: () => Ct((t) => ({ ...t, isFinished: !0 })),
2327
- markAsInteracted: () => Ct((t) => ({ ...t, hasInteracted: !0 })),
2328
- setCurrentNodeId: (t) => Ct((e) => (e.nodeHistory.push(t), e)),
2329
- setApplicationRecovery: async (t) => {
2330
- Ct((e) => (t ? e.applicationRecovery = t : delete e.applicationRecovery, e)), await Q.flushStateData();
2331
- },
2332
- restart: () => {
2333
- const { state: t, flow: e } = bt.value;
2334
- if (t !== "loaded") throw new Error("Flow cannot be restarted: not in valid state");
2335
- const a = {
2336
- ...Qi(),
2337
- failedAttemptAt: e.data.failedAttemptAt,
2338
- unconfirmedAttemptKeys: e.data.unconfirmedAttemptKeys,
2339
- submitCooldown: e.data.submitCooldown
2340
- }, i = { ...e, data: a, startedAt: /* @__PURE__ */ new Date(), offerResume: !1 };
2341
- bt.value = { state: t, flow: i }, Q.setStateData(i);
2342
- },
2343
- addMessage: (t, e) => {
2344
- const a = { ...t, groupId: e };
2345
- return Ct((i) => (i.messages.push(a), i));
2346
- },
2347
- /** Removes messages from nodeId, all the messages that have the groupId passed, until it reaches one that doesn't */
2348
- removeMessagesSentByNodeIds: (t) => {
2349
- const { state: e, flow: a } = bt.value;
2350
- vn(e === "loaded", "Application not loaded");
2351
- const i = a.data.messages.filter((o) => !o.groupId || !t.includes(o.groupId));
2352
- a.data.messages = i, Q.setStateData(a);
2353
- },
2354
- setSubmission: (t, e) => Ct((a) => (e === null ? delete a.submissions[t] : a.submissions[t] = e, a)),
2355
- setInput: (t) => Ct((e) => ({ ...e, currentInput: t ?? null })),
2356
- persistWriteBarrier: async (t) => {
2357
- bt.peek().flow === t && (bt.value = { state: "loaded", flow: t }), Q.setStateData(t), await Q.flushStateData();
2358
- }
2359
- }, eo = ({ heading: t }) => {
2360
- const { t: e } = De();
2361
- return /* @__PURE__ */ g("div", { class: "flex flex-grow flex-col items-center justify-center", children: [
2362
- /* @__PURE__ */ g(
2363
- "svg",
2364
- {
2365
- class: "text-error-9 h-16 w-16",
2366
- fill: "none",
2367
- xmlns: "http://www.w3.org/2000/svg",
2368
- "stroke-width": "2",
2369
- stroke: "currentColor",
2370
- "stroke-linecap": "round",
2371
- viewBox: "0 0 96 96",
2372
- children: [
2373
- /* @__PURE__ */ g("path", { d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z", fill: "#fff" }),
2374
- /* @__PURE__ */ g("path", { d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z" }),
2375
- /* @__PURE__ */ g("line", { x1: "36.7", y1: "39.3", x2: "44.8", y2: "47.4" }),
2376
- /* @__PURE__ */ g("line", { x1: "52.2", y1: "39.3", x2: "60.3", y2: "47.4" }),
2377
- /* @__PURE__ */ g("line", { x1: "44.7", y1: "39.2", x2: "36.6", y2: "47.3" }),
2378
- /* @__PURE__ */ g("line", { x1: "60.2", y1: "39.2", x2: "52.1", y2: "47.3" }),
2379
- /* @__PURE__ */ g("path", { d: "M38 56h19" })
2380
- ]
2381
- }
2382
- ),
2383
- /* @__PURE__ */ g("div", { class: "flex flex-col gap-2 text-center", children: /* @__PURE__ */ g("p", { class: "text-error-11 font-bold", children: e(t) }) })
2384
- ] });
2385
- }, Rl = (t) => {
2386
- const { t: e } = De();
2387
- return /* @__PURE__ */ g("svg", { role: "img", viewBox: "0 0 24 24", ...t, children: [
2388
- /* @__PURE__ */ g("title", { children: e("loading") }),
2389
- /* @__PURE__ */ g("style", { children: "#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}" }),
2390
- /* @__PURE__ */ g("g", { id: "s1", transform: "translate(12,0)", children: /* @__PURE__ */ g("g", { id: "s2", transform: "scale(0,0)", children: /* @__PURE__ */ g("circle", { r: "6.5", transform: "translate(0,0)", fill: "currentColor" }) }) }),
2391
- /* @__PURE__ */ g("g", { id: "s3", transform: "translate(12,12)", children: /* @__PURE__ */ g("g", { id: "s4", transform: "scale(1,1)", children: /* @__PURE__ */ g("circle", { r: "6.5", transform: "translate(0,0)", fill: "currentColor" }) }) }),
2392
- /* @__PURE__ */ g("g", { id: "s5", transform: "translate(12,0)", children: /* @__PURE__ */ g("g", { id: "s6", transform: "scale(0,0)", children: /* @__PURE__ */ g(
2393
- "path",
2394
- {
2395
- d: "M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",
2396
- transform: "translate(-6.5,-6.5)",
2397
- "clip-rule": "evenodd",
2398
- fill: "currentColor",
2399
- "fill-rule": "evenodd"
2400
- }
2401
- ) }) }),
2402
- /* @__PURE__ */ g("g", { id: "s7", transform: "translate(12,0)", children: /* @__PURE__ */ g("g", { id: "s8", transform: "scale(0,0)", children: /* @__PURE__ */ g(
2403
- "path",
2404
- {
2405
- d: "M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",
2406
- transform: "translate(-6.5,-9.25)",
2407
- fill: "currentColor"
2408
- }
2409
- ) }) })
2410
- ] });
2411
- }, ao = () => /* @__PURE__ */ g("div", { class: "flex flex-grow flex-col items-center justify-center", children: /* @__PURE__ */ g(Rl, { class: "text-neutral-6 h-8 w-8" }) }), Bl = (t) => {
2412
- const a = t / 100, i = 1.3;
2413
- return t < 0 ? "0%" : t > 100 ? "100%" : `${Math.round((1 - (1 - 0.1) * Math.pow(1 - a, i)) * 100)}%`;
2414
- }, Fl = Ga("touch-hitbox fr relative flex-none rounded-full p-2 transition-all", {
2415
- variants: {
2416
- variant: {
2417
- neutral: "text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",
2418
- white: "text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"
2419
- }
2420
- },
2421
- defaultVariants: {
2422
- variant: "neutral"
2423
- }
2424
- }), xa = ({
2425
- class: t,
2426
- children: e,
2427
- variant: a,
2428
- ...i
2429
- }) => /* @__PURE__ */ g("button", { class: Ja(Fl({ variant: a }), t), ...i, children: /* @__PURE__ */ g(
2430
- "svg",
2431
- {
2432
- class: "block",
2433
- width: "16",
2434
- height: "16",
2435
- viewBox: "0 0 16 16",
2436
- fill: "none",
2437
- stroke: "currentColor",
2438
- "stroke-width": "1.5",
2439
- "stroke-linecap": "round",
2440
- xmlns: "http://www.w3.org/2000/svg",
2441
- children: e
2442
- }
2443
- ) }), zl = () => /* @__PURE__ */ g("path", { d: "M12.5 6.5L8 11L3.5 6.5" }), Hl = () => {
2444
- if (M.current$.value.state !== "loaded") return null;
2445
- const t = M.current$.value.flow.nodeIdToProgress, e = M.current$.value.flow.data.nodeHistory.at(-1);
2446
- if (e === void 0) return null;
2447
- const a = t[e];
2448
- if (a === void 0) return null;
2449
- const i = 100 * (a.stepsMade / (a.remainingSteps + a.stepsMade));
2450
- return /* @__PURE__ */ g("div", { class: "bg-accent-3", children: /* @__PURE__ */ g(
2451
- "div",
2452
- {
2453
- style: { width: Bl(i) },
2454
- class: "bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"
2455
- }
2456
- ) });
2457
- }, Wl = ({
2458
- children: t,
2459
- params: e,
2460
- analytics: a,
2461
- feedbackReady: i
2462
- }) => {
2463
- const { t: o } = De(), n = M.viewState$, r = !!e.feedback && M.current$.value.state === "loaded" && n.value === "maximised", s = r && i.value, l = Ft(!1);
2464
- return Wa(() => {
2465
- var c, u;
2466
- !s || l.current || (l.current = !0, a.log({
2467
- event: "INTERACTION",
2468
- properties: { tag: "feedback_shown" },
2469
- customProperties: (u = (c = M.current$.peek().flow) == null ? void 0 : c.analytics) == null ? void 0 : u.customProperties
2470
- }));
2471
- }, [s, a]), /* @__PURE__ */ g(dt, { children: /* @__PURE__ */ g("header", { class: "ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150", children: [
2472
- /* @__PURE__ */ g("div", { class: "ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1", children: [
2473
- /* @__PURE__ */ g("p", { id: "chatbot-status-bar", class: "sr-only", children: t }),
2474
- /* @__PURE__ */ g(
2475
- "button",
2476
- {
2477
- "aria-label": o("minimize"),
2478
- onClick: () => {
2479
- n.value = "minimised";
2480
- },
2481
- class: "view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",
2482
- onTouchStart: ka,
2483
- children: /* @__PURE__ */ g("p", { "aria-hidden": !0, class: "text-neutral-12 truncate text-sm font-bold tracking-tight", children: t })
2484
- }
2485
- ),
2486
- /* @__PURE__ */ g("div", { class: "flex flex-shrink-0 items-center gap-3 p-1.5", children: [
2487
- e.feedback ? /* @__PURE__ */ g("div", { "data-widget": "inploi-feedback", "data-key": "chatbot-header", class: Ja({ hidden: !r }), children: /* @__PURE__ */ g("div", { class: "ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1" }) }) : null,
2488
- M.current$.value.state === "loaded" && /* @__PURE__ */ g(
2489
- xa,
2490
- {
2491
- class: "mx-1",
2492
- "aria-label": o("restart"),
2493
- onClick: () => {
2494
- M.restart();
2495
- },
2496
- children: [
2497
- /* @__PURE__ */ g("path", { d: "M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9" }),
2498
- /* @__PURE__ */ g("path", { d: "M8 7L10 4.5L8 2.5" })
2499
- ]
2500
- },
2501
- "restart"
2502
- ),
2503
- /* @__PURE__ */ g(
2504
- xa,
2505
- {
2506
- class: "view-switch mx-1",
2507
- onTouchStart: ka,
2508
- "aria-label": o("minimize"),
2509
- onClick: () => n.value = "minimised",
2510
- children: /* @__PURE__ */ g(zl, {})
2511
- },
2512
- "minmax"
2513
- )
2514
- ] })
2515
- ] }),
2516
- /* @__PURE__ */ g(Hl, {})
2517
- ] }) });
2518
- };
2519
- function ka() {
2520
- }
2521
- const ql = hn(() => import("./chatbot-body-B75cUCyM.js").then((t) => t.ChatbotBody)), yn = Ga(
2522
- "selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",
2523
- {
2524
- variants: {
2525
- view: {
2526
- closed: "hidden",
2527
- minimised: "max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",
2528
- maximised: "max-w-[450px] h-[var(--content-height)] animate-maximise"
2529
- }
2530
- }
2531
- }
2532
- ), xn = Ga("relative flex h-full overflow-hidden rounded-3xl outline outline-1", {
2533
- variants: {
2534
- view: {
2535
- closed: "hidden",
2536
- minimised: "outline-accent-10 bg-accent-9",
2537
- maximised: "outline-neutral-3 bg-neutral-1 flex-col"
2538
- }
2539
- }
2540
- }), Ul = ({ open: t, ...e }) => {
2541
- const a = Ft(null);
2542
- return Ht(() => {
2543
- const i = a.current;
2544
- i && (t ? i.showModal() : i.close());
2545
- }, [t]), /* @__PURE__ */ g("dialog", { ref: a, ...e });
2546
- }, Vl = ({
2547
- env: t,
2548
- logger: e,
2549
- apiClient: a,
2550
- rpcClient: i,
2551
- analytics: o,
2552
- talentBankClient: n,
2553
- params: r,
2554
- feedbackReady: s
2555
- }) => {
2556
- const { state: l, flow: c } = M.current$.value, u = M.viewState$.value, d = l !== "idle" && u === "maximised", p = Ft(null), f = c ? [...c.data.nodeHistory].reverse().map((h) => c.nodes.find((w) => w.id === h)).find((h) => (h == null ? void 0 : h.type) === "flow-section") : void 0;
2557
- return /* @__PURE__ */ g(_l, { terms: r.terms, locale: void 0, children: [
2558
- /* @__PURE__ */ g(Ul, { open: d, onClose: () => M.viewState$.value = "minimised", children: /* @__PURE__ */ g(
2559
- "div",
2560
- {
2561
- ref: p,
2562
- "aria-modal": "true",
2563
- role: "dialog",
2564
- "aria-labelledby": "chatbot-status-bar",
2565
- class: yn({ view: "maximised" }),
2566
- children: /* @__PURE__ */ g("div", { class: xn({ view: "maximised" }), children: [
2567
- /* @__PURE__ */ g(Wl, { params: r, analytics: o, feedbackReady: s, children: f ? /* @__PURE__ */ g(dt, { children: [
2568
- /* @__PURE__ */ g("span", { class: "block", children: f.data.title }),
2569
- /* @__PURE__ */ g("span", { class: "block truncate text-xs font-normal", children: c == null ? void 0 : c.title })
2570
- ] }) : c == null ? void 0 : c.title }),
2571
- Ka({ state: l, view: u }).with({ state: "idle" }, () => null).with({ state: "loading" }, () => /* @__PURE__ */ g(ao, {}, "loading")).with({ state: "loaded" }, () => /* @__PURE__ */ g(te, { fallback: /* @__PURE__ */ g(ao, {}, "loading"), children: /* @__PURE__ */ g(
2572
- ql,
2573
- {
2574
- env: t,
2575
- rpcClient: i,
2576
- analytics: o,
2577
- apiClient: a,
2578
- logger: e,
2579
- talentBankClient: n
2580
- }
2581
- ) })).with({ state: "closed" }, () => /* @__PURE__ */ g(eo, { heading: "flow_closed" })).with({ state: "error" }, () => /* @__PURE__ */ g(eo, { heading: "error_heading" })).exhaustive()
2582
- ] })
2583
- }
2584
- ) }),
2585
- u === "minimised" ? /* @__PURE__ */ g(Yl, { flow: c }) : null
2586
- ] });
2587
- }, Yl = ({ flow: t }) => {
2588
- const { t: e } = De();
2589
- return /* @__PURE__ */ g("div", { class: yn({ view: "minimised", class: "z-100 isolate" }), children: /* @__PURE__ */ g("div", { class: xn({ view: "minimised" }), children: [
2590
- /* @__PURE__ */ g(
2591
- "button",
2592
- {
2593
- onClick: () => {
2594
- M.viewState$.value = "maximised";
2595
- },
2596
- class: "view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",
2597
- onTouchStart: ka,
2598
- children: /* @__PURE__ */ g("p", { "aria-hidden": !0, class: "truncate text-sm font-bold tracking-tight text-white", children: t == null ? void 0 : t.title })
2599
- }
2600
- ),
2601
- /* @__PURE__ */ g("div", { class: "flex items-center px-0.5", children: /* @__PURE__ */ g(
2602
- xa,
2603
- {
2604
- class: "mx-1",
2605
- "aria-label": e("close_application"),
2606
- onClick: M.cancelCurrentFlow,
2607
- variant: "white",
2608
- children: /* @__PURE__ */ g("path", { d: "M12 12L4 4M12 4L4 12" })
2609
- },
2610
- "close"
2611
- ) })
2612
- ] }) });
2613
- }, kn = "14.19.0", Kl = (t, e = kn) => e === void 0 ? t : {
2614
- fetch: (a, i) => {
2615
- if (a !== "/flow/submit") return t.fetch(a, i);
2616
- const o = new Headers(i == null ? void 0 : i.headers);
2617
- return o.set("x-inploi-widget-version", e), t.fetch(a, { ...i, headers: Object.fromEntries(o.entries()) });
2618
- }
2619
- };
2620
- let ee, $n, ve;
2621
- const Jl = (t) => {
2622
- const e = t.slice(0, t.lastIndexOf("/") + 1);
2623
- return /^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(e) ? e : void 0;
2624
- }, Sn = (t, e, a) => {
2625
- const i = er(t, e ?? `
2626
- `, a);
2627
- return { ...i, stack: i.stack.filter((o) => o.startsWith("index.js:")) };
2628
- }, $a = (t) => Sn(t, ve), En = (t) => typeof t == "object" && t !== null && "status" in t && typeof t.status == "number" ? t.status : void 0, Nt = (t, e, a = {}) => ee == null ? void 0 : ee.send(t, e, { ...a, message: "Chatbot widget beacon", widget: "chatbot", key_hash: $n }), Gl = (t) => {
2629
- const e = (a, i, o) => {
2630
- if (M.viewState$.value === "closed") return;
2631
- const n = Sn(i, t, o);
2632
- n.stack.length && Nt("fatal", Te(i), { phase: "render", error: { ...n, via: a } });
2633
- };
2634
- window.addEventListener("error", (a) => {
2635
- Zn(a) || e("error", a.error, a.message);
2636
- }), window.addEventListener("unhandledrejection", (a) => e("rejection", a.reason));
2637
- }, Xl = (t, e, a = import.meta.url) => {
2638
- const i = ir();
2639
- ee || !i || !t || ($n = e ? ho(e).toString(36) : void 0, ee = pr({ config: i, version: kn, env: t, seed: or(ar(), Nn) }), ve = Jl(a), ve && Gl(ve));
2640
- }, Zl = (t) => {
2641
- let e = { application: void 0, attempts: 0, blocked: !1 };
2642
- return {
2643
- fetch: async (a, i) => {
2644
- if (a !== "/flow/submit") return t.fetch(a, i);
2645
- const o = M.current$.value.flow;
2646
- o !== e.application && (e = { application: o, attempts: 0, blocked: !1 });
2647
- const n = e, r = ++n.attempts, s = performance.now(), l = await t.fetch(a, i).catch((c) => {
2648
- throw En(c) === void 0 && !(c instanceof Error && c.name === "AbortError") && (n.blocked = !0, Nt("submit_blocked", Te(c), {
2649
- phase: "submit",
2650
- error: $a(c),
2651
- endpoint: "flow_submit",
2652
- attempt: r,
2653
- elapsed_ms: Math.round(performance.now() - s),
2654
- body_kb: typeof (i == null ? void 0 : i.body) == "string" ? Math.round(i.body.length / 1024) : void 0
2655
- })), c;
2656
- });
2657
- return n.blocked && Nt("submit_recovered", void 0, { phase: "submit", endpoint: "flow_submit", attempt: r }), l;
2658
- }
2659
- };
2660
- }, Ql = '[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height: calc(100vh - 64px) ;--content-height: calc(100svh - 64px) }@media screen and (min-width:768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px) );--content-height: min(640px, calc(100svh - 16px) ) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media(min-width:640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media(min-width:768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media(min-width:1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media(min-width:1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media(min-width:1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .\\!visible{visibility:visible!important}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-1{bottom:4px}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[44px\\]{min-height:44px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-none{resize:none}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-end{align-items:flex-end}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media(pointer:coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}', Cn = "inploi-chatbot", Sa = `[data-widget='${Cn}']`, tc = () => ({
2661
- getChatbotElement: () => document.querySelector(Sa),
2662
- getOrCreateChatbotElement: () => {
2663
- const t = document.querySelector(Sa);
2664
- if (t)
2665
- return document.body.appendChild(t), t;
2666
- const e = document.createElement("div");
2667
- return document.body.appendChild(e), e.dataset.widget = Cn, e;
2668
- }
2669
- });
2670
- var ec = "9.15.0", In = `https://sdk.inploi.com/@inploi/flows@${ec}/cdn/captcha/index.html`, ac = new URL(In).origin, io = 3e4, ic = 5 * 6e4, oc = (t) => typeof t == "object" && t !== null && t.source === "inploi-captcha", Ge = /* @__PURE__ */ new WeakMap(), nc = (t) => {
2671
- let e = Ge.get(t);
2672
- return e || (e = t.fetch("/flow/captcha").then((a) => {
2673
- let i = a == null ? void 0 : a.site_key;
2674
- return typeof i == "string" && i !== "" ? i : void 0;
2675
- }).catch((a) => {
2676
- throw Ge.delete(t), a;
2677
- }), Ge.set(t, e)), e;
2678
- }, rc = (t, e = {}) => new Promise((a, i) => {
2679
- let { signal: o, container: n = null, theme: r, onInteractive: s } = e instanceof AbortSignal ? { signal: e } : e, l = !1, c = () => {
2680
- }, u = (w) => {
2681
- l || (l = !0, clearTimeout(f), o == null || o.removeEventListener("abort", p), c(), w());
2682
- }, d = (w) => u(() => i(new Error(w))), p = () => d("Captcha aborted"), f, h = (w) => {
2683
- clearTimeout(f), f = setTimeout(() => d("Captcha timed out"), w);
2684
- };
2685
- if (h(io), o == null ? void 0 : o.aborted) return p();
2686
- o == null || o.addEventListener("abort", p), (async () => {
2687
- let w = await nc(t);
2688
- if (w === void 0) return u(() => a(void 0));
2689
- if (l) return;
2690
- let m = document.createElement("iframe");
2691
- m.src = `${In}?${new URLSearchParams({ sitekey: w, origin: window.location.origin, ...r && { theme: r } }).toString()}`, m.title = "Cloudflare security check", m.style.cssText = `display:block;border:0;width:${n ? "100%" : "300px"};height:0;color-scheme:normal`, n ? n.appendChild(m) : (m.style.cssText += ";position:fixed;bottom:16px;right:16px;z-index:2147483647", document.body.appendChild(m));
2692
- let k = !1, y = (O) => {
2693
- if (!m.contentWindow || O.source !== m.contentWindow || O.origin !== ac || !oc(O.data)) return;
2694
- let C = O.data;
2695
- switch (C.type) {
2696
- case "token":
2697
- return u(() => a(C.token));
2698
- case "resize":
2699
- m.style.height = `${Math.max(0, Math.ceil(C.height))}px`;
2700
- return;
2701
- case "before-interactive":
2702
- return k = !0, h(ic), s == null ? void 0 : s();
2703
- case "after-interactive":
2704
- return k = !1, h(io);
2705
- case "error":
2706
- !k && !C.interactive && d("Captcha failed");
2707
- return;
2708
- case "expired":
2709
- return d("Captcha expired");
2710
- case "timeout":
2711
- return d("Captcha timed out");
2712
- }
2713
- };
2714
- window.addEventListener("message", y), c = () => {
2715
- window.removeEventListener("message", y), m.remove();
2716
- };
2717
- })().catch((w) => u(() => i(w)));
2718
- }), oo = ({ condition: t, context: e, submissions: a, ifBlock: i }) => {
2719
- let [o, ...n] = t.compareKey.split(".");
2720
- if (!o) return !1;
2721
- let r = xo({ context: e, key: o, path: n, submissions: a });
2722
- if (!r) return !1;
2723
- switch (r.type) {
2724
- case "address": {
2725
- let s = ae(r.value, n);
2726
- switch (t.compare) {
2727
- case "equals":
2728
- return s === t.compareValue;
2729
- case "contains":
2730
- return typeof s != "string" ? !1 : s.includes(t.compareValue);
2731
- case "notEquals":
2732
- return s !== t.compareValue;
2733
- case "notContains":
2734
- return typeof s != "string" ? !0 : !s.includes(t.compareValue);
2735
- }
2736
- break;
2737
- }
2738
- case "integration": {
2739
- if (typeof r.value != "object" || Array.isArray(r.value)) return !1;
2740
- let s = ae(r.value, n), l = { ...i, data: { compareKey: "_temp", compare: t.compare, compareValue: t.compareValue } };
2741
- switch (typeof s) {
2742
- case "boolean":
2743
- return Gt(l, { submissions: { _temp: { value: s, type: "boolean" } }, context: e });
2744
- case "string":
2745
- return Gt(l, { submissions: { _temp: { value: s, type: "string" } }, context: e });
2746
- case "number":
2747
- return Gt(l, { submissions: { _temp: { value: s, type: "number" } }, context: e });
2748
- case "object":
2749
- return Array.isArray(s) && s.every((c) => typeof c == "string") ? Gt(l, { submissions: { _temp: { value: s, type: "enum" } }, context: e }) : !1;
2750
- }
2751
- break;
2752
- }
2753
- case "boolean": {
2754
- let s = t.compareValue === "true";
2755
- switch (t.compare) {
2756
- case "equals":
2757
- return r.value === s;
2758
- case "notEquals":
2759
- return r.value !== s;
2760
- }
2761
- break;
2762
- }
2763
- case "phone":
2764
- case "string": {
2765
- let s = r.type === "phone" ? Me(r.value) : r.value;
2766
- switch (t.compare) {
2767
- case "equals":
2768
- return s === t.compareValue;
2769
- case "contains":
2770
- return s ? s.includes(t.compareValue) : !1;
2771
- case "notEquals":
2772
- return s !== t.compareValue;
2773
- case "notContains":
2774
- return s ? !s.includes(t.compareValue) : !0;
2775
- }
2776
- break;
2777
- }
2778
- case "number": {
2779
- try {
2780
- let s = Number(t.compareValue);
2781
- switch (t.compare) {
2782
- case "equals":
2783
- return r.value === s;
2784
- case "notEquals":
2785
- return r.value !== s;
2786
- case "greaterThan":
2787
- return r.value > s;
2788
- case "greaterThanOrEqualTo":
2789
- return r.value >= s;
2790
- case "lessThan":
2791
- return r.value < s;
2792
- case "lessThanOrEqualTo":
2793
- return r.value <= s;
2794
- }
2795
- } catch {
2796
- return console.error(`Failed to parse number in if-block ${i.id}`, r.value), !1;
2797
- }
2798
- break;
2799
- }
2800
- case "enum":
2801
- switch (t.compare) {
2802
- case "equals":
2803
- return r.value.length === 1 && r.value[0] === t.compareValue;
2804
- case "notEquals":
2805
- return r.value.length === 1 && r.value[0] !== t.compareValue;
2806
- case "contains":
2807
- return r.value.includes(t.compareValue);
2808
- case "notContains":
2809
- return !r.value.includes(t.compareValue);
2810
- }
2811
- break;
2812
- }
2813
- }, Gt = (t, { context: e, submissions: a }) => {
2814
- let i = "combinator" in t.data ? t.data.conditions : [t.data];
2815
- if (("combinator" in t.data ? t.data.combinator : "and") === "or") {
2816
- for (let o of i) if (oo({ condition: o, context: e, submissions: a, ifBlock: t })) return !0;
2817
- return !1;
2818
- } else {
2819
- for (let o of i) if (!oo({ condition: o, context: e, submissions: a, ifBlock: t })) return !1;
2820
- return !0;
2821
- }
2822
- }, sc = /{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g, lc = (t, { context: e, submissions: a }) => t.replace(sc, (i, o, n = "") => {
2823
- let [r, ...s] = o.trim().split("."), l = xo({ key: r, path: s, submissions: a, context: e });
2824
- if (!l) return n;
2825
- switch (l.type) {
2826
- case "boolean":
2827
- return l.value === !0 ? "true" : "false";
2828
- case "file":
2829
- return l.value.map((c) => `${c.name} (${Pr(c.sizeKb)})`).join(", ");
2830
- case "enum":
2831
- return l.value.join(", ");
2832
- case "address":
2833
- return Object.values(l.value).filter((c) => c && c.trim().length > 0).join(", ");
2834
- case "number":
2835
- case "string":
2836
- return l.value ? l.value.toString() : n;
2837
- case "phone":
2838
- return Me(l.value);
2839
- case "integration": {
2840
- if (typeof l.value != "object" || Array.isArray(l.value)) break;
2841
- let c = ae(l.value, s);
2842
- switch (typeof c) {
2843
- case "boolean":
2844
- return c === !0 ? "true" : "false";
2845
- case "string":
2846
- return c;
2847
- case "number":
2848
- return c.toString();
2849
- case "object":
2850
- if (Array.isArray(c) && c.every((u) => typeof u == "string")) return c.join(", ");
2851
- }
2852
- break;
2853
- }
2854
- }
2855
- return n;
2856
- });
2857
- function cc(t) {
2858
- return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
2859
- }
2860
- function Za(t, e, a = "") {
2861
- const i = cc(t), o = t == null ? void 0 : t.length;
2862
- if (!i || e !== void 0) {
2863
- const r = a && `"${a}" `, s = "", l = i ? `length=${o}` : `type=${typeof t}`;
2864
- throw new Error(r + "expected Uint8Array" + s + ", got " + l);
2865
- }
2866
- return t;
2867
- }
2868
- function no(t, e = !0) {
2869
- if (t.destroyed)
2870
- throw new Error("Hash instance has been destroyed");
2871
- if (e && t.finished)
2872
- throw new Error("Hash#digest() has already been called");
2873
- }
2874
- function dc(t, e) {
2875
- Za(t, void 0, "digestInto() output");
2876
- const a = e.outputLen;
2877
- if (t.length < a)
2878
- throw new Error('"digestInto() output" expected to be of length >=' + a);
2879
- }
2880
- function Ea(...t) {
2881
- for (let e = 0; e < t.length; e++)
2882
- t[e].fill(0);
2883
- }
2884
- function Xe(t) {
2885
- return new DataView(t.buffer, t.byteOffset, t.byteLength);
2886
- }
2887
- function ht(t, e) {
2888
- return t << 32 - e | t >>> e;
2889
- }
2890
- const uc = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", pc = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
2891
- function hc(t) {
2892
- if (Za(t), uc)
2893
- return t.toHex();
2894
- let e = "";
2895
- for (let a = 0; a < t.length; a++)
2896
- e += pc[t[a]];
2897
- return e;
2898
- }
2899
- function fc(t, e = {}) {
2900
- const a = (o, n) => t(n).update(o).digest(), i = t(void 0);
2901
- return a.outputLen = i.outputLen, a.blockLen = i.blockLen, a.create = (o) => t(o), Object.assign(a, e), Object.freeze(a);
2902
- }
2903
- const wc = (t) => ({
2904
- oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t])
2905
- });
2906
- function bc(t, e, a) {
2907
- return t & e ^ ~t & a;
2908
- }
2909
- function gc(t, e, a) {
2910
- return t & e ^ t & a ^ e & a;
2911
- }
2912
- class vc {
2913
- constructor(e, a, i, o) {
2914
- V(this, "blockLen");
2915
- V(this, "outputLen");
2916
- V(this, "padOffset");
2917
- V(this, "isLE");
2918
- // For partial updates less than block size
2919
- V(this, "buffer");
2920
- V(this, "view");
2921
- V(this, "finished", !1);
2922
- V(this, "length", 0);
2923
- V(this, "pos", 0);
2924
- V(this, "destroyed", !1);
2925
- this.blockLen = e, this.outputLen = a, this.padOffset = i, this.isLE = o, this.buffer = new Uint8Array(e), this.view = Xe(this.buffer);
2926
- }
2927
- update(e) {
2928
- no(this), Za(e);
2929
- const { view: a, buffer: i, blockLen: o } = this, n = e.length;
2930
- for (let r = 0; r < n; ) {
2931
- const s = Math.min(o - this.pos, n - r);
2932
- if (s === o) {
2933
- const l = Xe(e);
2934
- for (; o <= n - r; r += o)
2935
- this.process(l, r);
2936
- continue;
2937
- }
2938
- i.set(e.subarray(r, r + s), this.pos), this.pos += s, r += s, this.pos === o && (this.process(a, 0), this.pos = 0);
2939
- }
2940
- return this.length += e.length, this.roundClean(), this;
2941
- }
2942
- digestInto(e) {
2943
- no(this), dc(e, this), this.finished = !0;
2944
- const { buffer: a, view: i, blockLen: o, isLE: n } = this;
2945
- let { pos: r } = this;
2946
- a[r++] = 128, Ea(this.buffer.subarray(r)), this.padOffset > o - r && (this.process(i, 0), r = 0);
2947
- for (let d = r; d < o; d++)
2948
- a[d] = 0;
2949
- i.setBigUint64(o - 8, BigInt(this.length * 8), n), this.process(i, 0);
2950
- const s = Xe(e), l = this.outputLen;
2951
- if (l % 4)
2952
- throw new Error("_sha2: outputLen must be aligned to 32bit");
2953
- const c = l / 4, u = this.get();
2954
- if (c > u.length)
2955
- throw new Error("_sha2: outputLen bigger than state");
2956
- for (let d = 0; d < c; d++)
2957
- s.setUint32(4 * d, u[d], n);
2958
- }
2959
- digest() {
2960
- const { buffer: e, outputLen: a } = this;
2961
- this.digestInto(e);
2962
- const i = e.slice(0, a);
2963
- return this.destroy(), i;
2964
- }
2965
- _cloneInto(e) {
2966
- e || (e = new this.constructor()), e.set(...this.get());
2967
- const { blockLen: a, buffer: i, length: o, finished: n, destroyed: r, pos: s } = this;
2968
- return e.destroyed = r, e.finished = n, e.length = o, e.pos = s, o % a && e.buffer.set(i), e;
2969
- }
2970
- clone() {
2971
- return this._cloneInto();
2972
- }
2973
- }
2974
- const _t = /* @__PURE__ */ Uint32Array.from([
2975
- 1779033703,
2976
- 3144134277,
2977
- 1013904242,
2978
- 2773480762,
2979
- 1359893119,
2980
- 2600822924,
2981
- 528734635,
2982
- 1541459225
2983
- ]), mc = /* @__PURE__ */ Uint32Array.from([
2984
- 1116352408,
2985
- 1899447441,
2986
- 3049323471,
2987
- 3921009573,
2988
- 961987163,
2989
- 1508970993,
2990
- 2453635748,
2991
- 2870763221,
2992
- 3624381080,
2993
- 310598401,
2994
- 607225278,
2995
- 1426881987,
2996
- 1925078388,
2997
- 2162078206,
2998
- 2614888103,
2999
- 3248222580,
3000
- 3835390401,
3001
- 4022224774,
3002
- 264347078,
3003
- 604807628,
3004
- 770255983,
3005
- 1249150122,
3006
- 1555081692,
3007
- 1996064986,
3008
- 2554220882,
3009
- 2821834349,
3010
- 2952996808,
3011
- 3210313671,
3012
- 3336571891,
3013
- 3584528711,
3014
- 113926993,
3015
- 338241895,
3016
- 666307205,
3017
- 773529912,
3018
- 1294757372,
3019
- 1396182291,
3020
- 1695183700,
3021
- 1986661051,
3022
- 2177026350,
3023
- 2456956037,
3024
- 2730485921,
3025
- 2820302411,
3026
- 3259730800,
3027
- 3345764771,
3028
- 3516065817,
3029
- 3600352804,
3030
- 4094571909,
3031
- 275423344,
3032
- 430227734,
3033
- 506948616,
3034
- 659060556,
3035
- 883997877,
3036
- 958139571,
3037
- 1322822218,
3038
- 1537002063,
3039
- 1747873779,
3040
- 1955562222,
3041
- 2024104815,
3042
- 2227730452,
3043
- 2361852424,
3044
- 2428436474,
3045
- 2756734187,
3046
- 3204031479,
3047
- 3329325298
3048
- ]), yt = /* @__PURE__ */ new Uint32Array(64);
3049
- class _c extends vc {
3050
- constructor(e) {
3051
- super(64, e, 8, !1);
3052
- }
3053
- get() {
3054
- const { A: e, B: a, C: i, D: o, E: n, F: r, G: s, H: l } = this;
3055
- return [e, a, i, o, n, r, s, l];
3056
- }
3057
- // prettier-ignore
3058
- set(e, a, i, o, n, r, s, l) {
3059
- this.A = e | 0, this.B = a | 0, this.C = i | 0, this.D = o | 0, this.E = n | 0, this.F = r | 0, this.G = s | 0, this.H = l | 0;
3060
- }
3061
- process(e, a) {
3062
- for (let d = 0; d < 16; d++, a += 4)
3063
- yt[d] = e.getUint32(a, !1);
3064
- for (let d = 16; d < 64; d++) {
3065
- const p = yt[d - 15], f = yt[d - 2], h = ht(p, 7) ^ ht(p, 18) ^ p >>> 3, w = ht(f, 17) ^ ht(f, 19) ^ f >>> 10;
3066
- yt[d] = w + yt[d - 7] + h + yt[d - 16] | 0;
3067
- }
3068
- let { A: i, B: o, C: n, D: r, E: s, F: l, G: c, H: u } = this;
3069
- for (let d = 0; d < 64; d++) {
3070
- const p = ht(s, 6) ^ ht(s, 11) ^ ht(s, 25), f = u + p + bc(s, l, c) + mc[d] + yt[d] | 0, w = (ht(i, 2) ^ ht(i, 13) ^ ht(i, 22)) + gc(i, o, n) | 0;
3071
- u = c, c = l, l = s, s = r + f | 0, r = n, n = o, o = i, i = f + w | 0;
3072
- }
3073
- i = i + this.A | 0, o = o + this.B | 0, n = n + this.C | 0, r = r + this.D | 0, s = s + this.E | 0, l = l + this.F | 0, c = c + this.G | 0, u = u + this.H | 0, this.set(i, o, n, r, s, l, c, u);
3074
- }
3075
- roundClean() {
3076
- Ea(yt);
3077
- }
3078
- destroy() {
3079
- this.set(0, 0, 0, 0, 0, 0, 0, 0), Ea(this.buffer);
3080
- }
3081
- }
3082
- class yc extends _c {
3083
- constructor() {
3084
- super(32);
3085
- // We cannot use array here since array allows indexing by variable
3086
- // which means optimizer/compiler cannot use registers.
3087
- V(this, "A", _t[0] | 0);
3088
- V(this, "B", _t[1] | 0);
3089
- V(this, "C", _t[2] | 0);
3090
- V(this, "D", _t[3] | 0);
3091
- V(this, "E", _t[4] | 0);
3092
- V(this, "F", _t[5] | 0);
3093
- V(this, "G", _t[6] | 0);
3094
- V(this, "H", _t[7] | 0);
3095
- }
3096
- }
3097
- const xc = /* @__PURE__ */ fc(
3098
- () => new yc(),
3099
- /* @__PURE__ */ wc(1)
3100
- );
3101
- var kc = (t) => {
3102
- let e = t.find((a) => a.isHead);
3103
- if (!e) throw new Error("No head node found");
3104
- return e;
3105
- }, $c = (t) => {
3106
- var e, a;
3107
- if (!(t.data.isFinished || (e = t.data.startedWriteNodeIds) != null && e.length)) return (a = [...t.data.messages].reverse().find((i) => i.groupId && t.nodes.some((o) => o.id === i.groupId && o.type.startsWith("question-")) && (i.type === "system" || "author" in i && i.author === "user"))) == null ? void 0 : a.groupId;
3108
- }, Ca = (t) => Array.isArray(t) ? t.map(Ca) : t !== null && typeof t == "object" ? Object.fromEntries(Object.entries(t).sort(([e], [a]) => e.localeCompare(a)).map(([e, a]) => [e, Ca(a)])) : typeof t == "function" ? void 0 : t, Sc = (t) => hc(xc(new TextEncoder().encode(JSON.stringify(Ca(t)))));
3109
- function Ec(t, e, a, i) {
3110
- var o;
3111
- if (i != null && i.aborted) return;
3112
- let n = Sc(a), r = (o = t.data).preApplyFingerprints ?? (o.preApplyFingerprints = []);
3113
- if (r.includes(n)) return;
3114
- r.push(n);
3115
- let s = new AbortController(), l = setTimeout(() => s.abort(), 5e3);
3116
- e.fetch("/flow/pre-apply", { method: "POST", signal: s.signal, body: JSON.stringify(a) }).catch(() => {
3117
- let c = r.indexOf(n);
3118
- c !== -1 && r.splice(c, 1);
3119
- }).finally(() => {
3120
- clearTimeout(l);
3121
- });
3122
- }
3123
- var An = ({ context: t, submissions: e }) => ({ context: t, submissions: e ?? {} }), ut = (t, e) => lc(t, An(e)), Cc = (t, e) => Gt(t, An(e)), Tn = ({ node: t, nodes: e, stopWhen: a }) => {
3124
- if ((a == null ? void 0 : a(t)) === !0) return t;
3125
- let i = t.nextId ? e.find((o) => o.id === t.nextId) : void 0;
3126
- if (i) return Tn({ node: i, nodes: e, stopWhen: a });
3127
- }, Ic = ({ childNode: t, nodes: e }) => {
3128
- let a = e.filter((i) => i.type === "if-block").find((i) => {
3129
- if (!i.branchId) return !1;
3130
- let o = e.find((r) => r.id === i.branchId);
3131
- if (!o) return !1;
3132
- let n = Tn({ node: o, nodes: e, stopWhen: (r) => r.id === t.id });
3133
- return !(!n || n.id !== t.id);
3134
- });
3135
- if (a != null && a.nextId) return e.find((i) => i.id === a.nextId);
3136
- }, Ac = 3, Td = ({ flow: t, analytics: e, logger: a, talentBankClient: i, context: o, apiClient: n, getSubmissions: r, getApplicationRecovery: s, setApplicationRecovery: l, chatService: c, persistWriteBarrier: u, onSubmitNetworkError: d, closedRoleBehaviour: p, settledOutcomes: f = p, dateEchoLocale: h, onFlowEnd: w, onInterpret: m, holdBefore: k, forceSubmitConfirmation: y, flowType: O, t: C }) => {
3137
- var B;
3138
- let D = new AbortController(), F = { submitAccepted: !1 };
3139
- (B = t.data).startedWriteNodeIds ?? (B.startedWriteNodeIds = t.nodes.flatMap((b) => {
3140
- var E, X;
3141
- if (b.type !== "integration-application-submit" || !t.data.nodeHistory.includes(b.id)) return [];
3142
- let I = b.data.key ? (E = r()) == null ? void 0 : E[b.data.key] : void 0;
3143
- return (I == null ? void 0 : I.type) === "integration" && ((X = Ba(I.value)) == null ? void 0 : X.verdict) === "not_submitted" ? [] : [b.id];
3144
- }));
3145
- let x = { ...e.service, log: (b) => e.service.log({ ...b, customProperties: { ...b.customProperties, ...e.customProperties } }) }, _ = (b, I) => {
3146
- if (I.aborted) return;
3147
- let E = k == null ? void 0 : k(void 0);
3148
- return E ? E.then(() => {
3149
- if (!I.aborted) return w == null ? void 0 : w(b);
3150
- }) : w == null ? void 0 : w(b);
3151
- }, S = async (b, I) => {
3152
- let E = D.signal;
3153
- if (E.aborted) return;
3154
- let X = k == null ? void 0 : k(b);
3155
- if (X && (await X, E.aborted)) return;
3156
- let K = r(), z = s(), lt = (z == null ? void 0 : z.submitNodeId) === b.id ? t.nodes.find((H) => {
3157
- var W;
3158
- return H.id === z.fileQuestionNodeId && H.type === "question-file" && ((W = K == null ? void 0 : K[H.data.key]) == null ? void 0 : W.type) !== "file";
3159
- }) : void 0;
3160
- if (lt) return S(lt, I);
3161
- m == null || m(b, I);
3162
- try {
3163
- await Tc({ flow: t, analytics: x, logger: a, talentBankClient: i, apiClient: n, context: o, node: b, submissions: K, applicationRecovery: z, setApplicationRecovery: async (H) => {
3164
- if (!E.aborted) try {
3165
- await l(H);
3166
- } catch (W) {
3167
- a.error("Failed to persist application recovery", W);
3168
- }
3169
- }, forceSubmitConfirmation: y || (z == null ? void 0 : z.submitNodeId) === b.id, run: F, persistWriteBarrier: u, onSubmitNetworkError: d, settledOutcomes: f, dateEchoLocale: h, flowType: O, signal: E, t: C, chat: { sendMessage: async (H) => c.send({ groupId: b.id, message: H, signal: E }), userInput: async (H) => c.input({ input: H, signal: E }), setSubmission: (H, W) => {
3170
- E.aborted || c.setSubmission(H, W);
3171
- }, captcha: c.captcha }, next: (H) => {
3172
- if (E.aborted) return;
3173
- let W = (z == null ? void 0 : z.fileQuestionNodeId) === b.id ? z.submitNodeId : H, U = W ? t.nodes.find((j) => j.id === W) : Ic({ childNode: b, nodes: t.nodes });
3174
- return U ? S(U, b) : _(b, E);
3175
- }, end: () => {
3176
- _(b, E);
3177
- } });
3178
- } catch (H) {
3179
- if (H instanceof At) return;
3180
- throw H;
3181
- }
3182
- };
3183
- return { interpret: async (b) => {
3184
- let I = t.nodes.find((E) => E.id === b) ?? kc(t.nodes);
3185
- return S(I);
3186
- }, undo: (b) => {
3187
- var H;
3188
- if (delete t.data.reviewReplay, ((H = t.data.startedWriteNodeIds) == null ? void 0 : H.length) || t.data.isFinished) return { removed: 0 };
3189
- let I = $c(t), E = I ? b.lastIndexOf(I) : -1, X = t.nodes.find((W) => W.id === I);
3190
- if (E === -1 || !X) return { removed: 0 };
3191
- let K = t.nodes.find((W) => W.id === b[b.length - 1]);
3192
- D.abort();
3193
- let z = b.splice(E);
3194
- t.data.messages = t.data.messages.filter((W) => !W.groupId || !z.includes(W.groupId)), t.data.currentInput = null;
3195
- let lt = r();
3196
- for (let W of z.slice(1)) {
3197
- let U = t.nodes.find((j) => j.id === W);
3198
- if (!(!U || !lt || U.id === I) && ("key" in U.data && U.data.key && delete lt[U.data.key], "keys" in U.data)) for (let j of Object.values(U.data.keys)) typeof j == "string" && delete lt[j];
3199
- }
3200
- return D = new AbortController(), S(X, K), { removed: z.length };
3201
- }, abort: () => {
3202
- D.abort();
3203
- } };
3204
- };
3205
- async function Tc(t) {
3206
- let e = t.node;
3207
- switch (e.type) {
3208
- case "flow-section":
3209
- return await t.chat.sendMessage({ type: "system", variant: "info", text: e.data.title }), t.next(e.nextId);
3210
- case "pre-apply-result":
3211
- return td({ ...t, node: e });
3212
- case "text":
3213
- return qc({ ...t, node: e });
3214
- case "image":
3215
- return Uc({ ...t, node: e });
3216
- case "question-text":
3217
- return Vc({ ...t, node: e });
3218
- case "question-enum":
3219
- return Jc({ ...t, node: e });
3220
- case "question-number":
3221
- return Yc({ ...t, node: e });
3222
- case "question-phone":
3223
- return Kc({ ...t, node: e });
3224
- case "question-boolean":
3225
- return Gc({ ...t, node: e });
3226
- case "question-file":
3227
- return Zc({ ...t, node: e });
3228
- case "question-address":
3229
- return Xc({ ...t, node: e });
3230
- case "end-flow":
3231
- return Qc({ ...t, node: e });
3232
- case "if-block":
3233
- return Wc({ ...t, node: e });
3234
- case "jump":
3235
- return Oc({ ...t, node: e });
3236
- case "link":
3237
- return Hc({ ...t, node: e });
3238
- case "integration-application-submit":
3239
- return Bc({ ...t, node: e });
3240
- case "add-submission":
3241
- return Dc({ ...t, node: e });
3242
- case "integration-workflow-get":
3243
- throw Error("Workflow should be unreachable");
3244
- case "check-duplicate":
3245
- return jc({ ...t, node: e });
3246
- case "feedback":
3247
- return Mc({ ...t, node: e });
3248
- default:
3249
- throw new Error(`Unknown node: ${JSON.stringify(e)}`);
3250
- }
3251
- }
3252
- async function Mc({ next: t, node: e }) {
3253
- t(e.nextId);
3254
- }
3255
- async function jc({ next: t, node: e, talentBankClient: a, submissions: i, flow: o, logger: n, chat: r }) {
3256
- var l;
3257
- let s = { isDuplicate: !1 };
3258
- if (i && a) {
3259
- let c = e.data.scope === "job" ? (l = o.job) == null ? void 0 : l.id : void 0;
3260
- if (e.data.scope === "company" || c != null) try {
3261
- s = await a.checkDuplicate({ email: Cr({ key: e.data.email, submissions: i }).toString(), jobId: c, scope: e.data.scope });
3262
- } catch (u) {
3263
- n.error("[check-duplicate]", u);
3264
- }
3265
- }
3266
- r.setSubmission(e.data.key, { type: "integration", value: s }), t(e.nextId);
3267
- }
3268
- async function Oc({ next: t, node: e }) {
3269
- t(e.data.targetId);
3270
- }
3271
- async function Dc({ next: t, node: e, logger: a, submissions: i, context: o }) {
3272
- if (!i) {
3273
- a.error("Submissions not found");
3274
- return;
3275
- }
3276
- i[e.data.key] = { type: "string", value: ut(e.data.value, { submissions: i, context: o }) }, t(e.nextId);
3277
- }
3278
- var Pc = 5e3, Mn = (t, e) => e ? `${t}@${e.id_type}:${e.id}` : t, Lc = (t, e = Date.now()) => Math.min(t.until, e + (t.maintenance ? Eo : t.throttles ? So : $o)), Nc = (t, e, a) => {
3279
- let { waitMs: i, throttles: o, maintenance: n } = Yr(e == null ? void 0 : e.throttles, a);
3280
- return { key: t, until: Date.now() + i, ...o !== void 0 && { throttles: o }, ...n && { maintenance: n } };
3281
- }, Rc = ["ApiError", "NotFoundError", "UnauthorisedError", "SchemaValidationError", "ParsingError"], Ia = (t) => t instanceof Error && Rc.includes(t.name) ? t : void 0, ro = (t) => {
3282
- let e = Ia(t);
3283
- return (e == null ? void 0 : e.name) === "ApiError" ? e : void 0;
3284
- };
3285
- async function Bc({ chat: t, next: e, end: a, node: i, logger: o, apiClient: n, submissions: r, analytics: s, flow: l, applicationRecovery: c, setApplicationRecovery: u, forceSubmitConfirmation: d, flowType: p, run: f, persistWriteBarrier: h, signal: w, onSubmitNetworkError: m, settledOutcomes: k, t: y }) {
3286
- var x, _;
3287
- let O = async ({ redirect_url: S, message: b, button_text: I }) => {
3288
- let { anonymous_id: E, session_id: X } = s.getSessionInfo();
3289
- await t.sendMessage({ type: "text", author: "bot", text: b ?? y("submission_redirect_message") });
3290
- try {
3291
- let K = new URL(S);
3292
- E && !K.searchParams.has("anonymous_id") && K.searchParams.set("anonymous_id", E), await t.sendMessage({ type: "link", href: K.toString(), text: I ?? y("complete_submission"), onClick: () => {
3293
- if (!X) {
3294
- o.error("session_id not set, cannot log FLOW_REDIRECT event");
3295
- return;
3296
- }
3297
- s.log({ event: "FLOW_REDIRECT", properties: { flow_build: l.build, flow_id: l.id, flow_session_id: X, flow_version: l.version, href: K.toString(), job: l.job } });
3298
- } });
3299
- } catch (K) {
3300
- o.error(`Invalid redirect URL: ${S}`, K), t.sendMessage({ type: "system", variant: "error", text: y("redirect_url_error") });
3301
- }
3302
- };
3303
- if ((x = l.data.startedWriteNodeIds) != null && x.includes(i.id) && (c == null ? void 0 : c.submitNodeId) !== i.id) {
3304
- let S = (_ = l.data.submitRedirects) == null ? void 0 : _[i.id];
3305
- return S ? (await O(S), e(i.nextId)) : (await t.sendMessage({ type: "system", variant: "warning", text: y("submission_unknown") }), a());
3306
- }
3307
- let C = Mn(i.id, l.job), B = 0, D = f.submitAccepted && i.data.skipConfirmation === !0 && (c == null ? void 0 : c.submitNodeId) !== i.id, F = async (S) => {
3308
- var oi, ni, ri, si, li, ci, di, ui, pi;
3309
- let b = ((oi = l.data.submitCooldown) == null ? void 0 : oi.key) === C ? l.data.submitCooldown : void 0;
3310
- b && (b.until = Lc(b));
3311
- let I = b == null ? void 0 : b.until;
3312
- (l.data.reviewRequiresSend === !0 && !D || S !== !0 || I !== void 0 && I > Date.now()) && await t.userInput({ type: "submit", key: void 0, config: { label: i.data.submitLabel, ...I !== void 0 && { availableAt: I } } }), D = !1;
3313
- let E;
3314
- if (i.data.captcha) {
3315
- let $ = t.captcha, gt = !0;
3316
- try {
3317
- E = await rc(n, { signal: w, container: ($ == null ? void 0 : $.container()) ?? null, theme: $ == null ? void 0 : $.theme, onInteractive: () => {
3318
- t.sendMessage({ type: "text", author: "bot", text: y("captcha_check") }).catch(() => {
3319
- }).then(() => {
3320
- gt && ($ == null || $.reveal(!0));
3321
- });
3322
- } });
3323
- } catch (Be) {
3324
- if (o.error("Captcha check failed", Be), w.aborted) return;
3325
- } finally {
3326
- gt = !1, $ == null || $.reveal(!1);
3327
- }
3328
- }
3329
- await t.sendMessage({ type: "loading", text: y("submitting") });
3330
- let { anonymous_id: X, session_id: K } = s.getSessionInfo();
3331
- if (w.aborted) return;
3332
- let z = ((ni = l.data.startedWriteNodeIds) == null ? void 0 : ni.includes(i.id)) === !0;
3333
- if ((c == null ? void 0 : c.submitNodeId) === i.id && await u(void 0), z || (l.data.startedWriteNodeIds = [...l.data.startedWriteNodeIds ?? [], i.id]), await h().catch(($) => o.error("Failed to persist application write barrier", $)), w.aborted) return;
3334
- let lt, H = setTimeout(() => {
3335
- lt = t.sendMessage({ type: "loading", semantic: "submission-still-working", text: y("submission_still_working") }).catch(($) => o.error("Failed to send submission progress message", $));
3336
- }, Pc), W = Sr(), U, j = await n.fetch("/flow/submit", { method: "POST", body: JSON.stringify({ ...W !== void 0 && { browser_timezone: W }, log_submit: !1, integration_id: i.data.integrationId, anonymous_id: X, session_id: K, job: l.job, flow_build: l.build, ...E !== void 0 && { captcha_token: E }, submissions: $r(l.nodes, Er(r || {}, i.data.submitKeys)), pre_apply: Ra(l.nodes, r || {}, l.data.flowSessionId) }) }).catch(($) => {
3337
- U = $;
3338
- let gt = ro($);
3339
- return (gt == null ? void 0 : gt.data) !== void 0 ? gt.data : $;
3340
- });
3341
- if (clearTimeout(H), await lt, w.aborted) return;
3342
- if (U !== void 0 && !Ia(U) && m) return await m(U, w), F(!0);
3343
- l.data.stagingDestination = Hr(j), i.data.key && t.setSubmission(i.data.key, { type: "integration", value: j });
3344
- let Qa = (ri = ro(U)) == null ? void 0 : ri.status, Le = typeof Qa == "number" ? Qa : void 0, A = Ba(j, Le), Ne = A === void 0 && Le === 429, le = k === "terminal" && ((A == null ? void 0 : A.outcome) === "closed" || (A == null ? void 0 : A.outcome) === "duplicate"), Ut = l.data.failedAttemptAt, Vt = Ut == null ? void 0 : Ut[C];
3345
- Ut && Vt !== void 0 && Vt > Date.now() && (Vt = Ut[C] = Date.now());
3346
- let ti = Vt !== void 0 && Date.now() - Vt < Co || ((si = l.data.unconfirmedAttemptKeys) == null ? void 0 : si.includes(C)) === !0, ei = (li = Ia(U)) == null ? void 0 : li.status, Yt = Zr(j, typeof ei == "number" ? ei : void 0);
3347
- Yt && s.log({ event: "FLOW_SUBMIT", properties: { flow_id: l.id, flow_version: l.version, flow_session_id: l.data.flowSessionId, flow_build: l.build, service: Yt.service, response: Yt.response, captured: (j == null ? void 0 : j.captured) === !0, flow_type: (p == null ? void 0 : p()) ?? "CHATBOT_DRAWER", job: l.job, ...(A == null ? void 0 : A.outcome) === "duplicate" && { outcome: ti ? "duplicate_after_own_attempt" : "duplicate" }, ...Yt.outcome && { outcome: Yt.outcome } } });
3348
- let ai = _e(j) || (j == null ? void 0 : j.success) === !0;
3349
- if ((ai || ye(j)) && (f.submitAccepted = !0), ai && ((ci = l.data.submitCooldown) == null ? void 0 : ci.throttles) !== void 0 && (delete l.data.submitCooldown.throttles, await h().catch(($) => o.error("Failed to persist submit cooldown reset", $))), _e(j)) {
3350
- let { redirect_url: $, message: gt, button_text: Be } = j.integration_response.data, hi = { redirect_url: $, message: gt, button_text: Be };
3351
- return w.aborted ? void 0 : (l.data.submitRedirects = { ...l.data.submitRedirects, [i.id]: hi }, await h().catch((On) => o.error("Failed to persist submit redirect", On)), await O(hi), e(i.nextId));
3352
- }
3353
- let ii = ye(j);
3354
- if (ii) return await t.sendMessage({ type: "system", variant: "success", text: ii.message ?? y("submission_pending") }), e(i.nextId);
3355
- if ((j == null ? void 0 : j.success) === !0) return i.data.skipConfirmation !== !0 && await t.sendMessage({ type: "system", variant: "success", text: y("submission_completed") }), e(i.nextId);
3356
- let Re = Xr(A), ce = Re !== void 0 && ((di = r == null ? void 0 : r[Re]) == null ? void 0 : di.type) === "file" ? Re : void 0, de = ce === void 0 ? void 0 : l.nodes.find(($) => $.type === "question-file" && $.data.key === ce);
3357
- if (!de && !le && !_i(A) && (l.data.submitCooldown = Nc(C, b, A)), (A == null ? void 0 : A.outcome) !== "duplicate" && !Ne && (l.data.failedAttemptAt = { ...l.data.failedAttemptAt, [C]: Date.now() }, (ui = l.data.unconfirmedAttemptKeys) != null && ui.includes(C) && (l.data.unconfirmedAttemptKeys = l.data.unconfirmedAttemptKeys.filter(($) => $ !== C))), (A == null ? void 0 : A.verdict) === "not_submitted" || (A == null ? void 0 : A.outcome) === "duplicate" || (A == null ? void 0 : A.outcome) === "closed" || Ne || Fr(j, Le) ? (z || (l.data.startedWriteNodeIds = (pi = l.data.startedWriteNodeIds) == null ? void 0 : pi.filter(($) => $ !== i.id)), (c == null ? void 0 : c.submitNodeId) === i.id && await u(c), await h().catch(($) => o.error("Failed to persist application write barrier release", $))) : await h().catch(($) => o.error("Failed to persist submit cooldown", $)), A) {
3358
- if (o.error(U ?? A.message), de && ce !== void 0) return t.setSubmission(ce, null), await u({ fileQuestionNodeId: de.id, submitNodeId: i.id }), await t.sendMessage({ type: "system", variant: "error", text: y("submission_unreadable_document") }), e(de.id);
3359
- if (A.outcome === "duplicate") return await t.sendMessage({ type: "system", variant: le ? "success" : "info", semantic: "submission-duplicate", text: y(ti ? "submission_duplicate_earlier_attempt" : "submission_duplicate") }), le ? (delete l.data.submitCooldown, a()) : F(!1);
3360
- if (A.outcome === "closed") return await t.sendMessage({ type: "system", variant: "info", semantic: "submission-closed", text: y("submission_closed") }), le ? (delete l.data.submitCooldown, a()) : F(!1);
3361
- let $ = Ur(A);
3362
- return $ ? (await t.sendMessage({ type: "system", variant: "warning", text: $.until === void 0 ? y("submission_provider_maintenance_later") : y("submission_provider_maintenance", { time: Vr($.until, void 0) }) }), F(!1)) : A.outcome === "unknown" ? (await t.sendMessage({ type: "system", variant: "warning", text: y(Gr(A) ? "submission_unknown_do_not_resubmit" : "submission_unknown") }), F(!1)) : _i(A) ? Kr(j) ? (await t.sendMessage({ type: "text", author: "bot", text: A.message }), F(!1)) : (B === 0 && await t.sendMessage({ type: "system", variant: "warning", text: y("captcha_failed") }), B++, F(B <= Ac)) : Jr(A) ? (await t.sendMessage({ type: "system", variant: "error", text: y("submission_retryable") }), F(!1)) : (await t.sendMessage({ type: "system", variant: "error", text: y("submission_failed") }), a());
3363
- }
3364
- return o.error(U ?? j), Ne ? (await t.sendMessage({ type: "system", variant: "error", text: y("submission_retryable") }), F(!1)) : (await t.sendMessage({ type: "system", variant: "error", text: y("submission_failed") }), a());
3365
- };
3366
- await F(d === !0 && !D ? !1 : i.data.skipConfirmation);
3367
- }
3368
- var Fc = /{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/, zc = (t, e) => {
3369
- if (!Fc.test(t)) return !1;
3370
- try {
3371
- let { protocol: a } = new URL(e);
3372
- return a === "https:" || a === "http:";
3373
- } catch {
3374
- return !1;
3375
- }
3376
- };
3377
- async function Hc({ chat: t, next: e, node: a, submissions: i, context: o, analytics: n, flow: r }) {
3378
- let s = ut(a.data.href, { submissions: i, context: o }), { flowSessionId: l } = r.data;
3379
- await t.sendMessage({ type: "link", href: s, text: ut(a.data.cta, { submissions: i, context: o }), ...zc(a.data.href, s) && { onClick: () => {
3380
- n.log({ event: "FLOW_REDIRECT", properties: { flow_build: r.build, flow_id: r.id, flow_session_id: l, flow_version: r.version, href: s, job: r.job } });
3381
- } } }), e(a.nextId);
3382
- }
3383
- async function Wc({ submissions: t, next: e, node: a, context: i }) {
3384
- e(Cc(a, { submissions: t, context: i }) ? a.branchId : a.nextId);
3385
- }
3386
- async function qc({ chat: t, next: e, node: a, submissions: i, context: o }) {
3387
- await t.sendMessage({ author: "bot", type: "text", text: ut(a.data.text, { submissions: i, context: o }) }), e(a.nextId);
3388
- }
3389
- async function Uc({ chat: t, next: e, node: a }) {
3390
- await t.sendMessage({ author: "bot", type: "image", url: a.data.url, height: a.data.height, width: a.data.width }), e(a.nextId);
3391
- }
3392
- async function Vc({ chat: t, next: e, node: a, submissions: i, context: o, t: n, dateEchoLocale: r }) {
3393
- await t.sendMessage({ author: "bot", type: "text", text: ut(a.data.question, { submissions: i, context: o }) });
3394
- let s = a.data.format === "phone" ? await t.userInput({ key: a.data.key, type: "phone", config: { optional: a.data.optional, placeholder: a.data.placeholder, minChars: a.data.minChars, maxChars: a.data.maxChars, submissionFormat: "text", defaultValue: {} } }) : await t.userInput({ key: a.data.key, type: "text", config: { optional: a.data.optional, placeholder: a.data.placeholder, format: a.data.format, maxChars: a.data.maxChars, minChars: a.data.minChars, multiline: a.data.format === "text" && a.data.multiline === !0 } });
3395
- s === null ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: n("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: s.type === "phone" ? Me(s.value) : a.data.format === "date" && r !== void 0 ? ts(s.value, r) : s.value }), e(a.nextId);
3396
- }
3397
- async function Yc({ chat: t, next: e, node: a, submissions: i, context: o, t: n }) {
3398
- await t.sendMessage({ author: "bot", type: "text", text: ut(a.data.question, { submissions: i, context: o }) });
3399
- let r = await t.userInput({ key: a.data.key, type: "number", config: { max: a.data.max, min: a.data.min, optional: a.data.optional, placeholder: a.data.placeholder, decimalCases: a.data.decimalCases } });
3400
- r === null ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: n("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: r.value.toString() }), e(a.nextId);
3401
- }
3402
- async function Kc({ chat: t, next: e, node: a, submissions: i, context: o, t: n }) {
3403
- await t.sendMessage({ author: "bot", type: "text", text: ut(a.data.question, { submissions: i, context: o }) });
3404
- let r = await t.userInput({ key: a.data.key, type: "phone", config: { minChars: a.data.minChars, defaultValue: { countryCode: a.data.defaultCountryCode }, placeholder: a.data.placeholder, submissionFormat: "phone", optional: a.data.optional } });
3405
- r === null ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: n("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: r.type === "phone" ? Me(r.value) : r.value }), e(a.nextId);
3406
- }
3407
- async function Jc({ chat: t, next: e, node: a, submissions: i, context: o, t: n }) {
3408
- await t.sendMessage({ author: "bot", type: "text", text: ut(a.data.question, { submissions: i, context: o }) });
3409
- let r = await t.userInput({ key: a.data.key, type: "multiple-choice", config: a.data });
3410
- r.value.length === 0 ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: n("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: a.data.options.filter((s) => r.value.includes(s.value)).map((s) => s.label).join(", ") }), e(a.nextId);
3411
- }
3412
- async function Gc({ chat: t, next: e, node: a, submissions: i, context: o, t: n }) {
3413
- await t.sendMessage({ author: "bot", type: "text", text: ut(a.data.question, { submissions: i, context: o }) });
3414
- let r = await t.userInput({ key: a.data.key, type: "boolean", config: { optional: a.data.optional, labels: { true: a.data.trueLabel, false: a.data.falseLabel } } });
3415
- r === null ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: n("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: r.value === !0 ? a.data.trueLabel : a.data.falseLabel }), e(a.nextId);
3416
- }
3417
- async function Xc({ chat: t, next: e, node: a, t: i }) {
3418
- await t.sendMessage({ author: "bot", type: "text", text: a.data.question });
3419
- let o = await t.userInput({ type: "address", key: a.data.key, config: { optional: a.data.optional, keys: a.data.keys, line2Required: a.data.line2Required, placeholder: a.data.placeholder } });
3420
- if (o === null) await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: i("skipped") });
3421
- else {
3422
- let n = Object.values(o.value).filter((r) => r && r.trim().length > 0).join(", ");
3423
- await t.sendMessage({ author: "user", type: "text", text: n });
3424
- }
3425
- return e(a.nextId);
3426
- }
3427
- async function Zc({ node: t, chat: e, next: a, submissions: i, context: o, t: n }) {
3428
- await e.sendMessage({ author: "bot", type: "text", text: ut(t.data.question, { submissions: i, context: o }) });
3429
- let r = await e.userInput({ key: t.data.key, type: "file", config: { optional: t.data.optional, extensions: t.data.extensions, fileSizeLimitKib: t.data.maxSizeKb ?? 10 * 1024, allowMultiple: t.data.multiple === !0 } });
3430
- if (r === null) await e.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: n("skipped") });
3431
- else for (let s of r.value) await e.sendMessage({ author: "user", type: "file", fileName: s.name, fileSizeKb: s.sizeKb });
3432
- return a(t.nextId);
3433
- }
3434
- async function Qc({ chat: t, end: e, node: a }) {
3435
- await t.sendMessage({ type: "system", variant: "info", text: a.data.systemMessage }), e();
3436
- }
3437
- async function td({ node: t, flow: e, submissions: a, chat: i, next: o, apiClient: n, analytics: r, signal: s, context: l }) {
3438
- let c = kr(e.nodes, a || {}), { answers: u, ...d } = c;
3439
- if (i.setSubmission(t.data.key, { type: "integration", value: d }), Ec(e, n, { ...r.getSessionInfo(), job: e.job, flow_build: e.build, pre_apply: Ra(e.nodes, a || {}, e.data.flowSessionId) }, s), c.status !== "skipped") {
3440
- let p = [c.status === "unavailable" ? "We could not prepare your pre-apply summary. You can still continue to your application." : c.hasHardConcerns ? t.data.messages.hard : c.hasAdvisoryConcerns ? t.data.messages.advisory : t.data.messages.matched];
3441
- for (let f of ["hard", "advisory"]) {
3442
- let h = u.filter((w) => !w.matched && w.severity === f);
3443
- h.length && p.push((f === "hard" ? "Role requirements" : "Other things to consider") + `
3444
- ` + h.map((w) => `• ${w.message}`).join(`
3445
- `));
3446
- }
3447
- await i.sendMessage({ type: "text", author: "bot", text: p.join(`
3448
-
3449
- `) }), c.hasHardConcerns && t.data.alternativeLink && await i.sendMessage({ type: "link", href: t.data.alternativeLink.href, text: t.data.alternativeLink.label }), await i.userInput({ type: "submit", key: void 0, config: { label: ut(t.data.continueLabel, { submissions: a, context: l }) } });
3450
- }
3451
- return o(t.nextId);
3452
- }
3453
- var ed = new TextEncoder(), Aa = (t) => {
3454
- if (t == null) return 2;
3455
- if (typeof t == "boolean") return 4;
3456
- if (typeof t == "number") return Number.isInteger(t) ? 3 + String(t).length : 3 + String(t).length + 17;
3457
- if (typeof t == "string") {
3458
- let a = ed.encode(t).length;
3459
- return 6 + String(a).length + a;
3460
- }
3461
- let e = Array.isArray(t) ? t.map((a, i) => [i, a]) : Object.entries(t);
3462
- return 5 + String(e.length).length + e.reduce((a, [i, o]) => a + Aa(i) + Aa(o), 0);
3463
- }, ad = (t) => {
3464
- let e = t;
3465
- for (; e.length > 1 && Aa(e) > 8e3; ) e = e.slice(1);
3466
- return { steps: e.map((a) => ({ ...a })), omitted: t.length - e.length };
3467
- }, id = () => {
3468
- let t = typeof screen > "u" ? 0 : screen.width;
3469
- return { pointer: typeof matchMedia == "function" && matchMedia("(pointer: coarse)").matches ? "coarse" : "fine", width: t < 480 ? "xs" : t < 768 ? "s" : t < 1024 ? "m" : "l" };
3470
- }, od = (t, e = Date.now, a, i) => {
3471
- let o = () => {
3472
- var p;
3473
- return (p = t()).path ?? (p.path = { steps: [], attempts: 0 });
3474
- }, n, r = e(), s, l = () => {
3475
- o().unsent = !0, a == null || a();
3476
- }, c = () => {
3477
- r = e(), l();
3478
- }, u = () => {
3479
- let p = o().steps.at(-1);
3480
- return p && p.o === void 0 ? p : void 0;
3481
- }, d = (p, f) => {
3482
- let h = o();
3483
- if (!h.unsent) return;
3484
- let { steps: w, omitted: m } = ad(h.steps);
3485
- return { trigger: p, steps: w, ...m > 0 && { steps_omitted: m }, ...f !== void 0 && { to_node_id: f }, idle_ms: e() - r, submit_attempts: h.attempts, ...h.result !== void 0 && { submit_result: h.result }, ...h.cv && { cv: h.cv }, device: id(), ...h.redirect };
3486
- };
3487
- return { shown: (p) => {
3488
- var h;
3489
- if (n = e(), ((h = u()) == null ? void 0 : h.k) === p.key) return;
3490
- let { steps: f } = o();
3491
- f.push({ k: p.key, i: f.length + 1, t: p.inputType }), l();
3492
- }, answered: (p, f) => {
3493
- let h = u();
3494
- !h || f !== void 0 && h.k !== f || (h.o = p ? "s" : "a", n !== void 0 && (h.ms = e() - n), c());
3495
- }, refused: () => {
3496
- let p = u();
3497
- p && (p.e = (p.e ?? 0) + 1, c());
3498
- }, revised: (p) => {
3499
- let f = p === void 0 ? void 0 : o().steps.findLast((h) => h.k === p);
3500
- f && (f.r = (f.r ?? 0) + 1, c());
3501
- }, active: () => {
3502
- r = e();
3503
- }, cv: (p) => {
3504
- let f = o();
3505
- f.cv === p || f.cv === "attached" || (f.cv = p, p === "attached" ? c() : l());
3506
- }, submitted: (p) => {
3507
- let f = o();
3508
- f.attempts++, f.result = p, p === "redirect" && (s = e()), l();
3509
- }, redirected: () => {
3510
- let p = s === void 0, f = o();
3511
- f.redirect || (f.redirect = { redirect_clicked: !0, ...p ? { redirect_revisit: !0 } : s !== void 0 && { redirect_ms: e() - s } }, c());
3512
- }, summary: (p, f) => {
3513
- let h = d(p, f);
3514
- return delete o().unsent, h;
3515
- }, peek: d, reset: () => {
3516
- t().path = { steps: [], attempts: 0 }, n = void 0, s = void 0, r = e();
3517
- } };
3518
- };
3519
- const so = /* @__PURE__ */ new WeakMap(), Ae = (t) => {
3520
- let e = so.get(t);
3521
- return e || (e = od(
3522
- () => t.data,
3523
- Date.now,
3524
- () => Q.setStateData(t)
3525
- ), so.set(t, e)), e;
3526
- }, Xt = (t, e, a) => {
3527
- var o;
3528
- const i = Ae(e).summary(a, e.data.nodeHistory.at(-1));
3529
- if (i) {
3530
- try {
3531
- t.log({
3532
- event: "FLOW_NODE",
3533
- properties: {
3534
- flow_id: e.id,
3535
- flow_version: e.version,
3536
- flow_build: e.build,
3537
- flow_session_id: e.data.flowSessionId,
3538
- flow_type: "CHATBOT_DRAWER",
3539
- job: e.job,
3540
- ...i
3541
- },
3542
- customProperties: (o = e.analytics) == null ? void 0 : o.customProperties,
3543
- ...(a === "hidden" || a === "pagehide" || a === "redirect") && { keepalive: !0 }
3544
- }).catch(() => {
3545
- });
3546
- } catch {
3547
- }
3548
- Q.setStateData(e);
3549
- }
3550
- }, nd = (t) => {
3551
- let e, a;
3552
- const i = Oe(() => {
3553
- const n = M.current$.value.flow, r = M.viewState$.value;
3554
- e && e !== n ? Xt(t, e, "restart") : n && r === "minimised" && a !== r && Xt(t, n, "minimise"), e = n, a = r;
3555
- }), o = (n) => {
3556
- const r = M.current$.peek().flow;
3557
- r && (n.type === "pagehide" ? Xt(t, r, "pagehide") : document.visibilityState === "hidden" && Xt(t, r, "hidden"), Q.flushStateData().catch(() => {
3558
- }));
3559
- };
3560
- return document.addEventListener("visibilitychange", o), window.addEventListener("pagehide", o), () => {
3561
- i(), document.removeEventListener("visibilitychange", o), window.removeEventListener("pagehide", o);
3562
- };
3563
- }, Md = (t, e, a) => ({
3564
- fetch: async (i, o) => {
3565
- if (i !== "/flow/submit") return t.fetch(i, o);
3566
- const n = a.data.nodeHistory.at(-1), r = n === void 0 ? void 0 : Mn(n, a.job), s = (l, c, u = !1) => {
3567
- var w, m, k;
3568
- if ((w = o == null ? void 0 : o.signal) != null && w.aborted || M.current$.peek().flow !== a) return;
3569
- const d = Ba(l, c), p = r === void 0 || (m = a.data.failedAttemptAt) == null ? void 0 : m[r], f = p !== void 0 && Date.now() - Math.min(p, Date.now()) < Co || r !== void 0 && ((k = a.data.unconfirmedAttemptKeys) == null ? void 0 : k.includes(r)) === !0, h = u ? "network_error" : _e(l) ? "redirect" : ye(l) ? "pending" : typeof l == "object" && l !== null && "success" in l && l.success === !0 ? "success" : (d == null ? void 0 : d.outcome) === "duplicate" ? f ? "duplicate_after_own_attempt" : "duplicate" : (d == null ? void 0 : d.outcome) ?? "failed";
3570
- Ae(a).submitted(h), Xt(e, a, "submit");
3571
- };
3572
- try {
3573
- const l = await t.fetch(i, o);
3574
- return s(l), l;
3575
- } catch (l) {
3576
- if (!(l instanceof Error && l.name === "AbortError")) {
3577
- const c = typeof l == "object" && l !== null && "status" in l && typeof l.status == "number" ? l.status : void 0, u = typeof l == "object" && l !== null && "data" in l ? l.data : void 0;
3578
- s(u, c, c === void 0);
3579
- }
3580
- throw l;
3581
- }
3582
- }
3583
- });
3584
- var rd = (t) => t.type.startsWith("question-");
3585
- const sd = 25, jn = st(() => {
3586
- }), lo = ["wheel", "touchmove", "keydown"], ld = (t, e) => new Promise((a, i) => {
3587
- if (e != null && e.aborted) return i(new At());
3588
- const o = setTimeout(a, t);
3589
- e == null || e.addEventListener(
3590
- "abort",
3591
- () => {
3592
- clearTimeout(o), i(new At());
3593
- },
3594
- { once: !0 }
3595
- );
3596
- }), rt = {
3597
- onSubmitSuccessFn$: st(() => {
3598
- }),
3599
- onInteractionFn$: st(() => {
3600
- }),
3601
- isBotTyping$: st(!1),
3602
- /** A Turnstile challenge is waiting for the candidate in the conversation (PROD-7320). */
3603
- captchaVisible$: st(!1),
3604
- themeMode$: st("light"),
3605
- isReadingHistory$: st(!1),
3606
- scrollToEnd: () => jn.value()
3607
- }, jd = () => {
3608
- const t = Ft(null), e = Ft(-1 / 0);
3609
- Ht(() => {
3610
- const i = t.current;
3611
- if (!i) return;
3612
- const o = () => {
3613
- rt.isReadingHistory$.value = !1, i.scrollTo({ top: i.scrollHeight, behavior: "instant" });
3614
- };
3615
- jn.value = o;
3616
- const n = () => e.current = performance.now(), r = () => {
3617
- i.scrollHeight - i.scrollTop - i.clientHeight <= 24 ? rt.isReadingHistory$.value = !1 : performance.now() - e.current < 1e3 && (rt.isReadingHistory$.value = !0);
3618
- };
3619
- i.addEventListener("scroll", r, { passive: !0 });
3620
- for (const l of lo) i.addEventListener(l, n, { passive: !0 });
3621
- const s = new ResizeObserver(() => {
3622
- rt.isReadingHistory$.peek() || o();
3623
- });
3624
- return s.observe(i), i.firstElementChild && s.observe(i.firstElementChild), () => {
3625
- i.removeEventListener("scroll", r);
3626
- for (const l of lo) i.removeEventListener(l, n);
3627
- s.disconnect();
3628
- };
3629
- }, []);
3630
- const a = Ot(() => ({
3631
- setSubmission: (o, n) => M.setSubmission(o, n),
3632
- captcha: {
3633
- container: () => {
3634
- var o;
3635
- return ((o = t.current) == null ? void 0 : o.querySelector("[data-captcha-slot]")) ?? null;
3636
- },
3637
- get theme() {
3638
- return rt.themeMode$.peek();
3639
- },
3640
- reveal: (o) => {
3641
- rt.captchaVisible$.value = o, o && requestAnimationFrame(() => {
3642
- var n, r;
3643
- (r = (n = t.current) == null ? void 0 : n.querySelector("[data-captcha-slot]")) == null || r.focus(), rt.scrollToEnd();
3644
- });
3645
- }
3646
- },
3647
- send: async ({ message: o, signal: n, groupId: r }) => {
3648
- if (await Ka(o).with({ author: "bot", type: "text" }, async (s) => {
3649
- if (n != null && n.aborted) throw new At();
3650
- rt.isBotTyping$.value = !0;
3651
- const l = Math.min(Math.max(20, s.text.length), 100) * sd;
3652
- try {
3653
- await ld(l, n);
3654
- } finally {
3655
- rt.isBotTyping$.value = !1;
3656
- }
3657
- }).otherwise(async () => {
3658
- }), n != null && n.aborted) throw new At();
3659
- M.addMessage(o, r);
3660
- },
3661
- input: (({ input: o, signal: n }) => {
3662
- if (n != null && n.aborted) throw new At();
3663
- const r = M.current$.peek().flow, s = r == null ? void 0 : r.nodes.find((c) => c.id === r.data.nodeHistory.at(-1)), l = r && s && rd(s) && s.data.key === o.key ? s : void 0;
3664
- return r && l && Ae(r).shown({ key: l.data.key, inputType: l.type.slice(9) }), M.setInput(o), new Promise((c) => {
3665
- const u = (d) => {
3666
- if (n != null && n.aborted) throw new At();
3667
- r && l && Ae(r).answered(
3668
- d === null || d.type === "enum" && d.value.length === 0
3669
- ), e.current = -1 / 0, M.setInput(void 0), o.key && M.setSubmission(o.key, d), c(d);
3670
- };
3671
- rt.onSubmitSuccessFn$.value = u;
3672
- });
3673
- })
3674
- }), []);
3675
- return {
3676
- chatRef: t,
3677
- chatService: a
3678
- };
3679
- };
3680
- var cd = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], dd = {
3681
- light: {
3682
- 1: [98.8, 0.015],
3683
- 2: [97.8, 0.018],
3684
- 3: [95.8, 0.025],
3685
- 4: [92, 0.04],
3686
- 5: [89, 0.05],
3687
- 6: [85, 0.07],
3688
- 7: [80.5, 0.08],
3689
- 8: [74, 0.11],
3690
- 9: [60, 0.22],
3691
- 10: [56, 0.23],
3692
- 11: [50, 0.19],
3693
- 12: [25, 0.18]
3694
- },
3695
- dark: {
3696
- 1: [19, 0.015],
3697
- 2: [21, 0.018],
3698
- 3: [25.5, 0.055],
3699
- 4: [29.3, 0.084],
3700
- 5: [33.5, 0.098],
3701
- 6: [39.05, 0.107],
3702
- 7: [45, 0.11],
3703
- 8: [55, 0.13],
3704
- 9: [60, 0.22],
3705
- 10: [67, 0.18],
3706
- 11: [79.3, 0.12],
3707
- 12: [95, 0.04]
3708
- }
3709
- }, ud = (t, e = 1, a) => (i) => {
3710
- const [o, n] = dd[a][i];
3711
- return "oklch(" + o + "% " + n * e + " " + t + ")";
3712
- }, Ze = (t) => {
3713
- const e = ud(t.hue, t.chroma, t.mode);
3714
- return Object.fromEntries(
3715
- cd.map((a) => [t.prefix + a, t.transform(e(a))])
3716
- );
3717
- }, Qe = (t) => t, pd = (t) => {
3718
- const e = Object.keys(t).flatMap((a) => {
3719
- const i = t[a];
3720
- return typeof i == "object" && i !== null ? Object.keys(i).map((o) => {
3721
- const n = i[o];
3722
- return [`${String(a)}.${o}`, n];
3723
- }) : [[a, i]];
3724
- });
3725
- return Object.fromEntries(e);
3726
- }, pe = (t) => !!t && typeof t == "object" && !Array.isArray(t), Ta = (t, ...e) => {
3727
- if (!e.length)
3728
- return t;
3729
- const a = e.shift();
3730
- if (pe(t) && pe(a))
3731
- for (const i in a) {
3732
- const o = a[i];
3733
- if (pe(o)) {
3734
- t[i] || Object.assign(t, { [i]: {} });
3735
- const n = t[i];
3736
- pe(n) && Ta(n, o);
3737
- } else
3738
- Object.assign(t, { [i]: a[i] });
3739
- }
3740
- return Ta(t, ...e);
3741
- }, hd = (t) => {
3742
- function e(a, i) {
3743
- const o = [t.prefix, i.toString().replace(/\./g, "-")].join("");
3744
- return a === "declaration" ? `--${o}` : `var(--${o})`;
3745
- }
3746
- return e;
3747
- }, fd = () => ({
3748
- core: (t) => ({
3749
- semantic: (e) => ({
3750
- component: (a) => ({
3751
- from: (i) => {
3752
- const { theme: o, getToken: n } = i, r = (p) => n("reference", p.toString()), s = t({ theme: o }), l = e({ theme: o, core: r, raw: { core: s } }), c = a({
3753
- theme: o,
3754
- core: r,
3755
- semantic: r,
3756
- raw: { core: s, semantic: l }
3757
- }), u = pd(Ta(s, l, c)), d = ([p, f], h) => {
3758
- const w = [h, p].filter(Boolean).join(".");
3759
- return typeof f == "object" ? Object.entries(f).flatMap((m) => d(m, w)) : [[i.getToken("declaration", w), f]];
3760
- };
3761
- return {
3762
- values: u,
3763
- declarations: Object.fromEntries(Object.entries(u).flatMap((p) => d(p))),
3764
- ref: (p) => n("reference", p.toString())
3765
- };
3766
- }
3767
- })
3768
- })
3769
- })
3770
- });
3771
- const [ta, ea, co] = ["oklch(0% 0 0)", "oklch(100% 0 0)", "transparent"], wd = fd().core(({ theme: t }) => ({
3772
- color: {
3773
- black: ta,
3774
- white: ea,
3775
- lowest: t.mode === "light" ? ea : ta,
3776
- highest: t.mode === "light" ? ta : ea,
3777
- ...Ze({
3778
- prefix: "a-",
3779
- hue: t.hue,
3780
- chroma: t.chroma,
3781
- mode: t.mode,
3782
- transform: Qe
3783
- }),
3784
- ...Ze({
3785
- prefix: "n-",
3786
- hue: t.hue,
3787
- chroma: 0.05,
3788
- mode: t.mode,
3789
- transform: Qe
3790
- }),
3791
- ...Ze({
3792
- prefix: "e-",
3793
- hue: 20,
3794
- chroma: t.chroma,
3795
- mode: t.mode,
3796
- transform: Qe
3797
- })
3798
- },
3799
- typography: {}
3800
- })).semantic(({ core: t, raw: e, theme: a }) => {
3801
- const i = (o, n) => e.core.color[o].replace(")", ` / ${n})`);
3802
- return {
3803
- "font-family": {
3804
- body: "inherit",
3805
- headings: "inherit"
3806
- },
3807
- "font-style": {
3808
- body: "normal",
3809
- headings: "normal"
3810
- },
3811
- "font-weight-body": "normal",
3812
- "font-weight-headings": "normal",
3813
- "radius-app": "1.5rem",
3814
- "radius-interactive": "1.5rem",
3815
- color: {
3816
- divider: i("n-8", a.mode === "dark" ? 0.4 : 0.2)
3817
- },
3818
- "copy-body": t("color.n-12"),
3819
- "copy-headings": t("color.n-12"),
3820
- interactive: {
3821
- copy: t("color.n-11"),
3822
- "copy-hover": t("color.n-12"),
3823
- "copy-active": t("color.n-12"),
3824
- bg: co,
3825
- "bg-hover": i("n-10", 0.2),
3826
- "bg-active": i("n-10", 0.3)
3827
- }
3828
- };
3829
- }).component(({ raw: t, theme: e, semantic: a, core: i }) => {
3830
- const o = (n, r) => t.core.color[n].replace(")", ` / ${r})`);
3831
- return {
3832
- app: {
3833
- bg: i(e.mode === "dark" ? "color.n-1" : "color.n-2")
3834
- },
3835
- overlay: {
3836
- bg: o("black", 0.4)
3837
- },
3838
- bubble: {
3839
- "weak-bg": i(e.mode === "dark" ? "color.n-3" : "color.lowest"),
3840
- "weak-outline": a("color.divider"),
3841
- "strong-shadow": o("a-9", 0.05)
3842
- },
3843
- "status-bar": {
3844
- bg: o("n-2", 0.8),
3845
- "bg-button": co,
3846
- "bg-button-hover": o("n-10", 0.4),
3847
- "bg-button-active": o("n-10", 0.5)
3848
- },
3849
- "submit-button": {
3850
- "bg-active": i(e.mode === "dark" ? "color.a-8" : "color.a-11")
3851
- },
3852
- // Small outcome text: the light-mode values keep 4.5:1 on white, the dark-mode ones on near-black.
3853
- "system-message": {
3854
- warning: e.mode === "dark" ? "#FFC107" : "#8A5A00",
3855
- success: e.mode === "dark" ? "#4CAF50" : "#2E7D32"
3856
- }
3857
- };
3858
- }), bd = hd({ prefix: "i-" }), gd = (t) => {
3859
- const e = wd.from({ theme: t, getToken: bd }), a = Object.entries(e.declarations).map(([i, o]) => `${i}: ${o};`);
3860
- return `${Sa} {
3861
- ${a.concat(a).join(`
3862
- `)}
3863
- }`;
3864
- };
3865
- class uo extends Fn {
3866
- }
3867
- const Od = ({
3868
- _internal_domManager: t = tc(),
3869
- theme: e,
3870
- terms: a,
3871
- feedback: i,
3872
- jobAlerts: o
3873
- }) => Rn(({ apiClient: n, rpcClient: r, logger: s, analytics: l, publishableKey: c, env: u }) => {
3874
- let d = !1, p = 0, f;
3875
- Xl(u, c);
3876
- const h = Zl(Kl(n));
3877
- let w = 0;
3878
- const m = /* @__PURE__ */ new WeakMap(), k = (x, _) => {
3879
- const S = ++w, b = performance.now();
3880
- return _.catch((I) => {
3881
- throw typeof I == "object" && I !== null && m.set(I, { endpoint: x, attempt: S, elapsed_ms: Math.round(performance.now() - b) }), I;
3882
- });
3883
- }, y = (x, _) => {
3884
- const S = En(x);
3885
- S === 404 || S === 410 || Nt("fatal", "application_unavailable", {
3886
- phase: "flow",
3887
- stage: _,
3888
- error: $a(x),
3889
- http_status: S,
3890
- ..._ === "flow_fetch" && typeof x == "object" && x !== null && m.get(x)
3891
- });
3892
- }, O = c && u ? Bn({ environment: u, publishableKey: c, logger: s }) : void 0, C = (x) => x === p, B = () => {
3893
- if (typeof window > "u") return;
3894
- p++, f == null || f(), f = void 0, Q.flushStateData().catch(() => {
3895
- }), M.cancelCurrentFlow(), rt.isBotTyping$.value = !1;
3896
- const x = t.getChatbotElement();
3897
- x && (jt(null, x), x.remove()), d = !1, s.info("Chatbot plugin destroyed");
3898
- }, D = () => {
3899
- if (typeof window > "u") return;
3900
- const x = p, _ = [
3901
- nt("style", { id: "inploi-chatbot-styles" }, Ql),
3902
- nt("style", { id: "inploi-chatbot-theme" }, gd(e))
3903
- ], S = t.getOrCreateChatbotElement();
3904
- rt.themeMode$.value = e.mode;
3905
- const b = st(!1);
3906
- if (jt(
3907
- nt(dt, {}, [
3908
- _,
3909
- nt(Vl, {
3910
- env: u,
3911
- rpcClient: r,
3912
- apiClient: h,
3913
- logger: s,
3914
- analytics: l,
3915
- talentBankClient: O,
3916
- params: { theme: e, terms: a, feedback: i },
3917
- feedbackReady: b
3918
- })
3919
- ]),
3920
- S
3921
- ), i) {
3922
- const I = (E) => {
3923
- var K, z;
3924
- if (!C(x)) return;
3925
- const X = (K = t.getChatbotElement()) == null ? void 0 : K.querySelector("dialog");
3926
- X && vd({
3927
- instance: E({ rpcClient: r, apiClient: n, logger: s, analytics: l }),
3928
- theme: e,
3929
- terms: ((z = i.params) == null ? void 0 : z.terms) ?? {},
3930
- host: X
3931
- }).then(
3932
- () => {
3933
- b.value = !0;
3934
- },
3935
- (lt) => s.error("Error rendering feedback plugin", lt)
3936
- );
3937
- };
3938
- i.plugin instanceof Promise ? i.plugin.then(({ feedbackPlugin: E }) => {
3939
- I(E());
3940
- }).catch((E) => {
3941
- s.error("Error preparing feedback plugin", E);
3942
- }) : I(i.plugin);
3943
- }
3944
- f ?? (f = nd(l)), d = !0;
3945
- }, F = async (x, _) => {
3946
- if (!C(_)) return;
3947
- es({
3948
- context: Fa(x.jobContext, x.context || {}),
3949
- schema: x.flow.context_schema,
3950
- logger: s
3951
- });
3952
- const S = await M.prepareFlow({ ...x, jobAlerts: x.jobAlerts ?? o });
3953
- C(_) && M.commitFlow(S);
3954
- };
3955
- return {
3956
- /** Optionally eagerly renders the interface ahead of needing the chatbot. */
3957
- prepare: async () => {
3958
- if (!(typeof window > "u"))
3959
- try {
3960
- if (d) return;
3961
- D(), s.info("Chatbot plugin prepared");
3962
- } catch (x) {
3963
- s.error("Error preparing chatbot plugin", x);
3964
- }
3965
- },
3966
- /** Fetches a flow by job ID.
3967
- * @param jobId - The job ID to fetch the flow for. This is the job ID according to the **ATS**, and not the inploi job ID.
3968
- */
3969
- fetchFlowByJobId: async (x, _) => {
3970
- const S = (_ == null ? void 0 : _.idType) === "inploi" ? "internal" : "external";
3971
- return k(
3972
- "flow_by_job",
3973
- r.request(ns, { params: { id: x }, searchParams: { id_type: S } })
3974
- ).catch((b) => {
3975
- throw on(
3976
- {
3977
- name: "ApiError",
3978
- message: Dt.string,
3979
- status: 410,
3980
- data: Dt.union(
3981
- { job: { status: "closed" } },
3982
- { integration_response: { error: { data: { code: "job_closed" } } } }
3983
- )
3984
- },
3985
- b
3986
- ) ? new uo(b.message, b.status, b.data) : b;
3987
- }).then((b) => ({
3988
- flow: b.flow,
3989
- title: b.job.title,
3990
- flowKeys: [b.job.id, ...(_ == null ? void 0 : _.flowKeys) ?? []],
3991
- job: os(b, { id: x, idType: S }),
3992
- employer: b.company.name,
3993
- ..._,
3994
- jobContext: b.context,
3995
- context: {
3996
- user: b.user,
3997
- ..._ == null ? void 0 : _.context
3998
- }
3999
- }));
4000
- },
4001
- fetchFlowById: async (x, _) => k("flow_by_id", r.request(rs, { params: { id: x } })).then(
4002
- (S) => {
4003
- var b;
4004
- return {
4005
- flow: S.flow,
4006
- title: "Chatbot",
4007
- flowKeys: (_ == null ? void 0 : _.flowKeys) ?? [],
4008
- ..._,
4009
- analytics: {
4010
- customProperties: {
4011
- flow_id: S.flow.id,
4012
- flow_version: S.flow.version,
4013
- ...(b = _ == null ? void 0 : _.analytics) == null ? void 0 : b.customProperties
4014
- }
4015
- }
4016
- };
4017
- }
4018
- ),
4019
- open: async (x) => {
4020
- if (typeof window > "u") return;
4021
- const _ = performance.now();
4022
- try {
4023
- M.cancelCurrentFlow(), M.viewState$.value = "maximised", d || D();
4024
- } catch (b) {
4025
- s.error("Error starting flow", b), Nt("boot_failed", Te(b), {
4026
- phase: "config",
4027
- error: $a(b),
4028
- elapsed_ms: Math.round(performance.now() - _)
4029
- });
4030
- return;
4031
- }
4032
- Nt("boot");
4033
- const S = p;
4034
- if (x instanceof Promise) {
4035
- M.current$.value = { state: "loading" };
4036
- const b = (I) => (E) => {
4037
- C(S) && (s.error("Error loading flow", E), M.current$.value = {
4038
- state: E instanceof uo ? "closed" : "error"
4039
- }, y(E, I));
4040
- };
4041
- x.then((I) => F(I, S).catch(b("create")), b("flow_fetch"));
4042
- } else
4043
- await F(x, S).catch((b) => {
4044
- s.error("Error starting flow", b), y(b, "create");
4045
- });
4046
- },
4047
- /**
4048
- * Whether this browser holds an application in progress that `open(params)` would load: the same saved state
4049
- * under the same key, unfinished, with an answer, including one whose submit started. The candidate loader
4050
- * keeps such a candidate on this chatbot rather than move them mid-application (PROD-7342).
4051
- */
4052
- hasApplicationInProgress: async (x) => {
4053
- const _ = await Q.getStateData(x.flow, x.flowKeys, x.context ?? {});
4054
- return _ !== void 0 && to({ data: _, nodes: x.flow.nodes });
4055
- },
4056
- /**
4057
- * Whether this browser holds an application in progress for any job: the candidate loader's question when it
4058
- * cannot load this page's flow to ask `hasApplicationInProgress` (CF-06). Without the flow's nodes, any saved
4059
- * answer counts.
4060
- */
4061
- hasAnyApplicationInProgress: async () => (await Q.getAllStateData()).some((x) => to({ data: x, nodes: [] })),
4062
- close: async () => {
4063
- typeof window > "u" || (M.cancelCurrentFlow(), s.info("Closed flow from an external source"));
4064
- },
4065
- destroy: B
4066
- };
4067
- });
4068
- function vd({
4069
- instance: t,
4070
- terms: e,
4071
- theme: a,
4072
- host: i
4073
- }) {
4074
- return t.render({
4075
- key: "chatbot-header",
4076
- size: "sm",
4077
- theme: {
4078
- accent: { chroma: a.chroma ?? 1, hue: a.hue },
4079
- positive: { hue: 180, chroma: 1 },
4080
- negative: { hue: 33, chroma: 1 },
4081
- mode: a.mode,
4082
- corners: "rounded",
4083
- highlights: "stroke"
4084
- },
4085
- terms: e,
4086
- host: i
4087
- });
4088
- }
4089
- export {
4090
- Td as A,
4091
- Ar as B,
4092
- Ed as C,
4093
- Q as D,
4094
- kc as E,
4095
- Ot as F,
4096
- At as G,
4097
- xa as H,
4098
- zl as I,
4099
- Md as J,
4100
- Od as K,
4101
- Rl as L,
4102
- Ka as M,
4103
- Vr as O,
4104
- Pr as S,
4105
- Ft as _,
4106
- Ae as a,
4107
- Ga as b,
4108
- Ja as c,
4109
- Hs as d,
4110
- xd as e,
4111
- kd as f,
4112
- Ad as g,
4113
- Vo as h,
4114
- vn as i,
4115
- Id as j,
4116
- dt as k,
4117
- So as l,
4118
- rt as m,
4119
- st as n,
4120
- g as o,
4121
- Wa as p,
4122
- $d as q,
4123
- Cd as r,
4124
- M as s,
4125
- zc as t,
4126
- De as u,
4127
- Xt as v,
4128
- $c as w,
4129
- jd as x,
4130
- Ht as y,
4131
- Dt as z
4132
- };