@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.
@@ -0,0 +1,4132 @@
1
+ var Do = Object.defineProperty;
2
+ var Po = (t, e, n) => e in t ? Do(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var V = (t, e, n) => Po(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { endpoint as pa, typed as Lo, generateUUID as No, createPlugin as Ro, createTalentBankClient as Bo, ApiError as Fo } from "@inploi/sdk";
5
+ var nn = /* @__PURE__ */ new Set(["Error", "TypeError", "RangeError", "ReferenceError", "SyntaxError", "URIError", "EvalError", "AggregateError", "AbortError", "TimeoutError", "NetworkError", "NotAllowedError", "NotFoundError", "NotSupportedError", "InvalidStateError", "QuotaExceededError", "SecurityError", "DataCloneError", "ChunkLoadError"]), Ho = [/^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\.)$/], Wo = `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`, zo = ["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"], qo = /^Failed to (?:execute|read|set|construct) (?:the )?'([\w$]{1,40})'(?: (?:on|property (?:from|on)|from) '([\w$]{1,40})')?(?:: (.*))?$/, bi, Uo = (t) => {
20
+ let { apis: e, sentences: n } = bi ?? (bi = { apis: new Set(Wo.split(/\s+/)), sentences: new Set(zo) });
21
+ if (n.has(t)) return t;
22
+ let i = qo.exec(t);
23
+ if (!i) return "";
24
+ let [, a, o, r] = i;
25
+ return e.has(a) && (o === void 0 || e.has(o)) && (r === void 0 || n.has(r)) ? t : "";
26
+ }, Vo = /^\s*at\s|@(?:[a-z][\w+.-]*:\/\/|\[native code\])/i, Ko = /\b(?:chrome|moz|safari|safari-web|ms-browser)-extension:\/\//, Yo = /\[native code\]|<anonymous>|\(native\)/, Jo = (t) => Ko.test(t) ? "extension" : Yo.test(t) ? "native" : "script", gi = /^(Failed to fetch dynamically imported module|error loading dynamically imported module)/, Go = /^((?:[\w-]{1,20}\/){0,3}[\w.-]{1,80}\.js)(?:\?retry=\d{1,3})?:(\d{1,7})(?::(\d{1,7}))?\)?$/, Zo = /^ResizeObserver loop (?:completed with undelivered notifications\.|limit exceeded)$/, Xo = ({ error: t, message: e }) => t == null && Zo.test(e), Te = (t) => t instanceof Error ? nn.has(t.name) ? t.name : "Error" : typeof t, Qo = /* @__PURE__ */ new Set(["DOMException", "Object", "Array", "Promise", "Event", "ErrorEvent", "PromiseRejectionEvent", "ProgressEvent", "CloseEvent", "MessageEvent", "Response", "Request", "XMLHttpRequest"]), tr = (t) => {
27
+ var i, a;
28
+ let e = t === null ? "null" : typeof t, n = { message: "", stack: "", thrown: { type: e, ctor: "", keys: 0, message_length: 0, stack_lines: 0 } };
29
+ if (typeof t == "string") return { ...n, thrown: { ...n.thrown, message_length: t.length } };
30
+ if (typeof t != "object" || t === null) return n;
31
+ try {
32
+ let { message: o, stack: r } = t, s = (a = (i = Object.getPrototypeOf(t)) == null ? void 0 : i.constructor) == null ? void 0 : a.name, l = typeof s != "string" ? "" : nn.has(s) || Qo.has(s) ? s : "other", c = typeof o == "string" ? o : "", u = typeof r == "string" ? r : "";
33
+ return { message: t instanceof Error || nn.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 n;
37
+ }
38
+ }, er = (t, e, n = "") => {
39
+ let i = Te(t), { message: a, stack: o, thrown: r } = tr(t), s = (t == null ? n : a).slice(0, 300), l = Ho.some((p) => p.test(s)) ? s : gi.test(s) ? gi.exec(s)[1] : Uo(s), c = [], u = /* @__PURE__ */ new Set();
40
+ for (let p of o.split(`
41
+ `, 60)) {
42
+ let h = p.indexOf(e), f = h !== -1 && (h === 0 || " (@".includes(p[h - 1])), b = f ? Go.exec(p.slice(h + e.length).trim()) : null;
43
+ b ? c.push([b[1], b[2], b[3]].filter(Boolean).join(":")) : f ? u.add("build") : Vo.test(p) && u.add(Jo(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
+ }, wi = "inploi-candidate-beacon-seed", nr = () => {
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)) }), fa = (t) => {
56
+ let e = 3735928559, n = 1103547991;
57
+ for (let i = 0; i < t.length; i++) {
58
+ let a = t.charCodeAt(i);
59
+ e = Math.imul(e ^ a, 2654435761), n = Math.imul(n ^ a, 1597334677);
60
+ }
61
+ return e = Math.imul(e ^ e >>> 16, 2246822507) ^ Math.imul(n ^ n >>> 13, 3266489909), n = Math.imul(n ^ n >>> 16, 2246822507) ^ Math.imul(e ^ e >>> 13, 3266489909), 4294967296 * (2097151 & n) + (e >>> 0);
62
+ }, ar = (t, e) => {
63
+ try {
64
+ let n = t == null ? void 0 : t.getItem(wi);
65
+ if (n) return n;
66
+ let i = e();
67
+ return t == null || t.setItem(wi, i), i;
68
+ } catch {
69
+ return e();
70
+ }
71
+ }, or = [["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, a;
73
+ let e = or.find(([, o]) => o.test(t)), n = (i = e == null ? void 0 : e[1].exec(t)) == null ? void 0 : i[1];
74
+ return { browser: e ? [e[0], n].filter(Boolean).join(" ") : "other", platform: ((a = rr.find(([, o]) => o.test(t))) == null ? void 0 : a[0]) ?? "other" };
75
+ }, lr = (t = typeof document > "u" ? void 0 : document) => {
76
+ var o, r;
77
+ let e = () => typeof performance > "u" ? 0 : Math.round(performance.now()), n = (t == null ? void 0 : t.visibilityState) === "hidden" ? e() : null, i = null, a = !1;
78
+ return t == null || t.addEventListener("visibilitychange", () => {
79
+ t.visibilityState === "hidden" ? n = e() : n !== null && (i = e());
80
+ }), (o = t == null ? void 0 : t.defaultView) == null || o.addEventListener("pagehide", () => a = !0), (r = t == null ? void 0 : t.defaultView) == null || r.addEventListener("pageshow", () => a = !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: n !== null, hidden_at_ms: n, shown_at_ms: i, unloading: a, 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, n) => {
86
+ if (e.unloading || e.visibility === "hidden") return !0;
87
+ if (t !== "boot_failed" || e.hidden_at_ms === null) return !1;
88
+ if (n.elapsed_ms === void 0) return !0;
89
+ let i = e.page_ms - n.elapsed_ms;
90
+ return e.hidden_at_ms >= i || e.shown_at_ms !== null && e.shown_at_ms >= i;
91
+ }, ur = (t, e, n, i, a) => {
92
+ var r;
93
+ if (e) return "abandoned";
94
+ if (a.online === !1) return "offline";
95
+ let o = [i.phase, i.stage, n == null ? void 0 : n.slice(0, 40), i.http_status ?? ((r = i.error) == null ? void 0 : r.name)];
96
+ return [...new Set(o.filter((s) => s !== void 0 && s !== "").map(String))].join(":") || t;
97
+ }, pr = ({ config: t, version: e, env: n, seed: i, automated: a = typeof navigator < "u" && navigator.webdriver === !0, company: o, page: r = lr(), now: s = Date.now, post: l = (c, u) => fetch(c, u) }) => {
98
+ let c = fa(i), u = s(), d = t !== void 0 && c % 1e4 < t.sampleRate * 1e4, p = /* @__PURE__ */ new Set();
99
+ return { send: (h, f, b = {}) => {
100
+ if (!t || !d || !e) return;
101
+ let v = r(), k = cr.has(h), y = k && dr(h, v, b), O = y ? `${h}:abandoned` : h;
102
+ if (p.has(O)) return;
103
+ p.add(O);
104
+ let { error: C, ...B } = b, D = { dt: new Date(s()).toISOString(), message: "Candidate widget beacon", kind: h, version: e, company_slug: (o == null ? void 0 : o()) ?? null, env: n === "production" ? "production" : "staging", mode: a ? "test" : "live", seed_hash: c.toString(36), sample_rate: t.sampleRate, ...f && { reason: f.slice(0, 40) }, ...k && { abandoned: y, cause: ur(h, y, f, b, v).slice(0, 60) }, since_start_ms: Math.max(0, Math.round(s() - u)), ...v, ...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, fr = { lang: void 0, message: void 0, abortEarly: void 0, abortPipeEarly: void 0 };
109
+ function ha(t) {
110
+ return !t && !pt ? fr : { 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 hr(t) {
114
+ return Fe == null ? void 0 : Fe.get(t);
115
+ }
116
+ var He;
117
+ function br(t) {
118
+ return He == null ? void 0 : He.get(t);
119
+ }
120
+ var We;
121
+ function gr(t, e) {
122
+ var n;
123
+ return (n = We == null ? void 0 : We.get(t)) == null ? void 0 : n.get(e);
124
+ }
125
+ function jn(t) {
126
+ var n, i;
127
+ let e = typeof t;
128
+ return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && ((i = (n = Object.getPrototypeOf(t)) == null ? void 0 : n.constructor) == null ? void 0 : i.name)) ?? "null" : e;
129
+ }
130
+ function at(t, e, n, i, a) {
131
+ let o = a && "input" in a ? a.input : n.value, r = (a == null ? void 0 : a.expected) ?? t.expects ?? null, s = (a == null ? void 0 : a.received) ?? jn(o), l = { kind: t.kind, type: t.type, input: o, expected: r, received: s, message: `Invalid ${e}: ${r ? `Expected ${r} but r` : "R"}eceived ${s}`, requirement: t.requirement, path: a == null ? void 0 : a.path, issues: a == null ? void 0 : a.issues, lang: i.lang, abortEarly: i.abortEarly, abortPipeEarly: i.abortPipeEarly }, c = t.kind === "schema", u = (a == null ? void 0 : a.message) ?? t.message ?? gr(t.reference, l.lang) ?? (c ? br(l.lang) : null) ?? i.message ?? hr(l.lang);
132
+ u !== void 0 && (l.message = typeof u == "function" ? u(l) : u), c && (n.typed = !1), n.issues ? n.issues.push(l) : n.issues = [l];
133
+ }
134
+ var mi = /* @__PURE__ */ new WeakMap();
135
+ function X(t) {
136
+ let e = mi.get(t);
137
+ return e || (e = { version: 1, vendor: "valibot", validate(n) {
138
+ return t["~run"]({ value: n }, ha());
139
+ } }, mi.set(t, e)), e;
140
+ }
141
+ function wr(t, e) {
142
+ return Object.prototype.hasOwnProperty.call(t, e) && e !== "__proto__" && e !== "prototype" && e !== "constructor";
143
+ }
144
+ function On(t, e) {
145
+ let n = [...new Set(t)];
146
+ return n.length > 1 ? `(${n.join(` ${e} `)})` : n[0] ?? "never";
147
+ }
148
+ function ba(t) {
149
+ return { kind: "transformation", type: "transform", reference: ba, async: !1, operation: t, "~run"(e) {
150
+ return e.value = this.operation(e.value), e;
151
+ } };
152
+ }
153
+ var mr = { abortEarly: !0 };
154
+ function vr(t, e, n) {
155
+ return typeof t.fallback == "function" ? t.fallback(e, n) : t.fallback;
156
+ }
157
+ function Dn(t, e, n) {
158
+ return typeof t.default == "function" ? t.default(e, n) : t.default;
159
+ }
160
+ function ga() {
161
+ return { kind: "schema", type: "any", reference: ga, expects: "any", async: !1, get "~standard"() {
162
+ return X(this);
163
+ }, "~run"(t) {
164
+ return t.typed = !0, t;
165
+ } };
166
+ }
167
+ function wa(t, e) {
168
+ return { kind: "schema", type: "array", reference: wa, expects: "Array", async: !1, item: t, message: e, get "~standard"() {
169
+ return X(this);
170
+ }, "~run"(n, i) {
171
+ var o;
172
+ let a = n.value;
173
+ if (Array.isArray(a)) {
174
+ n.typed = !0, n.value = [];
175
+ for (let r = 0; r < a.length; r++) {
176
+ let s = a[r], l = this.item["~run"]({ value: s }, i);
177
+ if (l.issues) {
178
+ let c = { type: "array", origin: "value", input: a, key: r, value: s };
179
+ for (let u of l.issues) u.path ? u.path.unshift(c) : u.path = [c], (o = n.issues) == null || o.push(u);
180
+ if (n.issues || (n.issues = l.issues), i.abortEarly) {
181
+ n.typed = !1;
182
+ break;
183
+ }
184
+ }
185
+ l.typed || (n.typed = !1), n.value.push(l.value);
186
+ }
187
+ } else at(this, "type", n, i);
188
+ return n;
189
+ } };
190
+ }
191
+ function Pn(t) {
192
+ return { kind: "schema", type: "boolean", reference: Pn, expects: "boolean", async: !1, message: t, get "~standard"() {
193
+ return X(this);
194
+ }, "~run"(e, n) {
195
+ return typeof e.value == "boolean" ? e.typed = !0 : at(this, "type", e, n), e;
196
+ } };
197
+ }
198
+ function it(t, e) {
199
+ return { kind: "schema", type: "literal", reference: it, expects: jn(t), async: !1, literal: t, message: e, get "~standard"() {
200
+ return X(this);
201
+ }, "~run"(n, i) {
202
+ return n.value === this.literal ? n.typed = !0 : at(this, "type", n, i), n;
203
+ } };
204
+ }
205
+ function ma(t) {
206
+ return { kind: "schema", type: "null", reference: ma, expects: "null", async: !1, message: t, get "~standard"() {
207
+ return X(this);
208
+ }, "~run"(e, n) {
209
+ return e.value === null ? e.typed = !0 : at(this, "type", e, n), 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 X(this);
215
+ }, "~run"(n, i) {
216
+ return n.value === null && (this.default !== void 0 && (n.value = Dn(this, n, i)), n.value === null) ? (n.typed = !0, n) : this.wrapped["~run"](n, i);
217
+ } };
218
+ }
219
+ function ve(t) {
220
+ return { kind: "schema", type: "number", reference: ve, expects: "number", async: !1, message: t, get "~standard"() {
221
+ return X(this);
222
+ }, "~run"(e, n) {
223
+ return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : at(this, "type", e, n), 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 X(this);
229
+ }, "~run"(n, i) {
230
+ var o;
231
+ let a = n.value;
232
+ if (a && typeof a == "object") {
233
+ n.typed = !0, n.value = {};
234
+ for (let r in this.entries) {
235
+ let s = this.entries[r];
236
+ if (r in a || (s.type === "exact_optional" || s.type === "optional" || s.type === "nullish") && s.default !== void 0) {
237
+ let l = r in a ? a[r] : Dn(s), c = s["~run"]({ value: l }, i);
238
+ if (c.issues) {
239
+ let u = { type: "object", origin: "value", input: a, key: r, value: l };
240
+ for (let d of c.issues) d.path ? d.path.unshift(u) : d.path = [u], (o = n.issues) == null || o.push(d);
241
+ if (n.issues || (n.issues = c.issues), i.abortEarly) {
242
+ n.typed = !1;
243
+ break;
244
+ }
245
+ }
246
+ c.typed || (n.typed = !1), n.value[r] = c.value;
247
+ } else if (s.fallback !== void 0) n.value[r] = vr(s);
248
+ else if (s.type !== "exact_optional" && s.type !== "optional" && s.type !== "nullish" && (at(this, "key", n, i, { input: void 0, expected: `"${r}"`, path: [{ type: "object", origin: "key", input: a, key: r, value: a[r] }] }), i.abortEarly)) break;
249
+ }
250
+ } else at(this, "type", n, i);
251
+ return n;
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 X(this);
257
+ }, "~run"(n, i) {
258
+ return n.value === void 0 && (this.default !== void 0 && (n.value = Dn(this, n, i)), n.value === void 0) ? (n.typed = !0, n) : this.wrapped["~run"](n, i);
259
+ } };
260
+ }
261
+ function va(t, e) {
262
+ return { kind: "schema", type: "picklist", reference: va, expects: On(t.map(jn), "|"), async: !1, options: t, message: e, get "~standard"() {
263
+ return X(this);
264
+ }, "~run"(n, i) {
265
+ return this.options.includes(n.value) ? n.typed = !0 : at(this, "type", n, i), n;
266
+ } };
267
+ }
268
+ function Ln(t, e, n) {
269
+ return { kind: "schema", type: "record", reference: Ln, expects: "Object", async: !1, key: t, value: e, message: n, get "~standard"() {
270
+ return X(this);
271
+ }, "~run"(i, a) {
272
+ var r, s;
273
+ let o = i.value;
274
+ if (o && typeof o == "object") {
275
+ i.typed = !0, i.value = {};
276
+ for (let l in o) if (wr(o, l)) {
277
+ let c = o[l], u = this.key["~run"]({ value: l }, a);
278
+ if (u.issues) {
279
+ let p = { type: "object", origin: "key", input: o, key: l, value: c };
280
+ for (let h of u.issues) h.path = [p], (r = i.issues) == null || r.push(h);
281
+ if (i.issues || (i.issues = u.issues), a.abortEarly) {
282
+ i.typed = !1;
283
+ break;
284
+ }
285
+ }
286
+ let d = this.value["~run"]({ value: c }, a);
287
+ if (d.issues) {
288
+ let p = { type: "object", origin: "value", input: o, key: l, value: c };
289
+ for (let h of d.issues) h.path ? h.path.unshift(p) : h.path = [p], (s = i.issues) == null || s.push(h);
290
+ if (i.issues || (i.issues = d.issues), a.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 at(this, "type", i, a);
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 X(this);
304
+ }, "~run"(e, n) {
305
+ return typeof e.value == "string" ? e.typed = !0 : at(this, "type", e, n), e;
306
+ } };
307
+ }
308
+ function vi(t) {
309
+ let e;
310
+ if (t) for (let n of t) if (e) for (let i of n.issues) e.push(i);
311
+ else e = n.issues;
312
+ return e;
313
+ }
314
+ function Nn(t, e) {
315
+ return { kind: "schema", type: "union", reference: Nn, expects: On(t.map((n) => n.expects), "|"), async: !1, options: t, message: e, get "~standard"() {
316
+ return X(this);
317
+ }, "~run"(n, i) {
318
+ let a, o, r;
319
+ for (let s of this.options) {
320
+ let l = s["~run"]({ value: n.value }, i);
321
+ if (l.typed) if (l.issues) o ? o.push(l) : o = [l];
322
+ else {
323
+ a = l;
324
+ break;
325
+ }
326
+ else r ? r.push(l) : r = [l];
327
+ }
328
+ if (a) return a;
329
+ if (o) {
330
+ if (o.length === 1) return o[0];
331
+ at(this, "type", n, i, { issues: vi(o) }), n.typed = !0;
332
+ } else {
333
+ if ((r == null ? void 0 : r.length) === 1) return r[0];
334
+ at(this, "type", n, i, { issues: vi(r) });
335
+ }
336
+ return n;
337
+ } };
338
+ }
339
+ function Rt() {
340
+ return { kind: "schema", type: "unknown", reference: Rt, expects: "unknown", async: !1, get "~standard"() {
341
+ return X(this);
342
+ }, "~run"(t) {
343
+ return t.typed = !0, t;
344
+ } };
345
+ }
346
+ function _a(t, e, n) {
347
+ return { kind: "schema", type: "variant", reference: _a, expects: "Object", async: !1, key: t, options: e, message: n, get "~standard"() {
348
+ return X(this);
349
+ }, "~run"(i, a) {
350
+ let o = i.value;
351
+ if (o && typeof o == "object") {
352
+ let r, s = 0, l = this.key, c = [], u = (d, p) => {
353
+ for (let h of d.options) {
354
+ if (h.type === "variant") u(h, new Set(p).add(h.key));
355
+ else {
356
+ let f = !0, b = 0;
357
+ for (let v of p) {
358
+ let k = h.entries[v];
359
+ if (v in o ? k["~run"]({ typed: !1, value: o[v] }, mr).issues : k.type !== "exact_optional" && k.type !== "optional" && k.type !== "nullish") {
360
+ f = !1, l !== v && (s < b || s === b && v in o && !(l in o)) && (s = b, l = v, c = []), l === v && c.push(h.entries[v].expects);
361
+ break;
362
+ }
363
+ b++;
364
+ }
365
+ if (f) {
366
+ let v = h["~run"]({ value: o }, a);
367
+ (!r || !r.typed && v.typed) && (r = v);
368
+ }
369
+ }
370
+ if (r && !r.issues) break;
371
+ }
372
+ };
373
+ if (u(this, /* @__PURE__ */ new Set([this.key])), r) return r;
374
+ at(this, "type", i, a, { input: o[l], expected: On(c, "|"), path: [{ type: "object", origin: "value", input: o, key: l, value: o[l] }] });
375
+ } else at(this, "type", i, a);
376
+ return i;
377
+ } };
378
+ }
379
+ function _r(...t) {
380
+ return { ...t[0], pipe: t, get "~standard"() {
381
+ return X(this);
382
+ }, "~run"(e, n) {
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 || !n.abortEarly && !n.abortPipeEarly) && (e = i["~run"](e, n));
389
+ }
390
+ return e;
391
+ } };
392
+ }
393
+ function oe(t, e, n) {
394
+ let i = t["~run"]({ value: e }, ha(n));
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 }), Rn = (t) => t.filter((e) => (e.type === "question-boolean" || e.type === "question-enum") && !!e.data.preApply);
398
+ function Bn(t, e, n) {
399
+ var r, s;
400
+ let i = t.find((l) => l.type === "pre-apply-result");
401
+ if (!i) return;
402
+ let a = (r = e[i.data.participationKey]) == null ? void 0 : r.value, o = {};
403
+ if (a === !0) for (let l of Rn(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") && (o[l.data.key] = c);
406
+ }
407
+ return { node_id: i.id, flow_session_id: n, participation: a, answers: o };
408
+ }
409
+ function kr(t, e) {
410
+ let n = Bn(t, e, ""), i = Rn(t).map((o) => {
411
+ let r = o.data.preApply, s = n == null ? void 0 : n.answers[o.data.key], l = o.type === "question-boolean" ? typeof s == "boolean" : o.data.options.some((c) => c.value === s);
412
+ return { key: o.data.key, severity: r.severity, message: r.mismatchMessage, matched: l && s === r.expectedValue, valid: l };
413
+ }), a = (n == null ? void 0 : n.participation) === !1 ? "skipped" : (n == null ? void 0 : n.participation) === !0 && i.length > 0 && i.every((o) => o.valid) ? "completed" : "unavailable";
414
+ return { status: a, hasHardConcerns: a === "completed" ? i.some((o) => !o.matched && o.severity === "hard") : null, hasAdvisoryConcerns: a === "completed" ? i.some((o) => !o.matched && o.severity === "advisory") : null, answers: a === "completed" ? i : [] };
415
+ }
416
+ function $r(t, e) {
417
+ let n = new Set(Rn(t).map((i) => i.data.key));
418
+ for (let i of t) i.type === "pre-apply-result" && (n.add(i.data.key), n.add(i.data.participationKey));
419
+ return Object.fromEntries(Object.entries(e).filter(([i]) => !n.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
+ }, ne = (t, e) => {
433
+ if (e.length === 0) return;
434
+ let n = t;
435
+ for (let i of e) {
436
+ if (n == null || typeof n != "object") return;
437
+ n = n[i];
438
+ }
439
+ return n;
440
+ }, Er = (t, e = "all") => {
441
+ let n = {}, i = e === "all" ? null : new Set(e);
442
+ for (let a in t) {
443
+ let o = t[a];
444
+ o && (i && !i.has(a) || (n[a] = o.value));
445
+ }
446
+ return n;
447
+ }, ya = (t, e) => {
448
+ let n = new Set(t.flatMap((i) => i.type === "add-submission" ? [i.data.key] : []));
449
+ return Object.entries(e).some(([i, a]) => a !== void 0 && a.type !== "integration" && !n.has(i));
450
+ }, Cr = ({ key: t, submissions: e }) => {
451
+ var i;
452
+ let n = (i = e[t]) == null ? void 0 : i.value;
453
+ if (typeof n != "string" && typeof n != "number") throw new Error(`Submission at “${t}” is not a string or number`);
454
+ return n;
455
+ }, xa = ({ key: t, path: e, submissions: n, context: i }) => {
456
+ if (t === "$context") {
457
+ if (!e) return;
458
+ let a = ne(i, e);
459
+ switch (typeof a) {
460
+ case "string":
461
+ return { type: "string", value: a };
462
+ case "number":
463
+ return { type: "number", value: a };
464
+ case "boolean":
465
+ return { type: "boolean", value: a };
466
+ default:
467
+ console.warn(`Unexpected type for $context.${e.join(".")}`, a);
468
+ return;
469
+ }
470
+ }
471
+ return n[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 n = e.map((i) => i.toLowerCase());
478
+ return t.every((i) => {
479
+ let a = Ir(i.name);
480
+ return a.ok && n.includes(a.val.toLowerCase());
481
+ });
482
+ }, an = { ".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) => an[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], on = (t, e) => e.every((n, i) => t[i] === n), _i = (t, e, n = t.length) => {
483
+ let i = Array.from(e, (o) => o.charCodeAt(0)), a = Math.min(n, t.length) - i.length;
484
+ for (let o = 0; o <= a; o++) if (on(t.subarray(o), i)) return !0;
485
+ return !1;
486
+ }, Dr = (t) => {
487
+ if (_i(t, "%PDF-", Mr)) return ".pdf";
488
+ if (on(t, jr)) return ".doc";
489
+ if (on(t, Or) && _i(t, "word/")) return ".docx";
490
+ }, kd = async (t, e) => {
491
+ if (Ar([t], e)) return t;
492
+ let n = t.name.lastIndexOf(".");
493
+ if ((n === -1 ? "" : t.name.slice(n).toLowerCase()) in an) return t;
494
+ let i = Dr(new Uint8Array(await t.slice(0, Tr).arrayBuffer()));
495
+ return !i || !e.some((a) => a.toLowerCase() === i) ? t : new File([t], `${t.name}${i}`, { type: an[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) => oe(Lr, t).success, Nr = R({ integration_response: R({ status: et(Rt()), error: R({ message: J(), data: et(Rt()) }) }) }), ka = (t) => oe(Nr, t).success, Rr = R({ success: it(!0), integration_response: R({ data: R({ outcome: it("pending"), message: et(Rt()) }), error: et(ma()) }) }), ye = (t) => {
497
+ let e = oe(Rr, t);
498
+ if (!e.success || _e(t)) return;
499
+ let { message: n } = e.output.integration_response.data;
500
+ return typeof n == "string" && n.trim() ? { message: n } : {};
501
+ };
502
+ R({ success: it(!1), message: et(Rt()) });
503
+ var Br = R({ error: it("Validation failed"), messages: R({}) }), Fr = (t, e) => e === 422 && oe(Br, t).success, Fn = (t, e) => {
504
+ if (!ka(t)) return;
505
+ let n = t.integration_response, i = n.error.data, a = typeof i == "object" && i !== null ? i : {}, o = (f) => typeof a[f] == "string" ? a[f] : void 0, r = (f) => typeof a[f] == "boolean" ? a[f] : void 0, s = (f) => {
506
+ let b = a[f];
507
+ return Number.isSafeInteger(b) && b >= 0 ? b : void 0;
508
+ }, l = (f) => {
509
+ let b = o(f), v = b === void 0 ? NaN : Date.parse(b);
510
+ return Number.isFinite(v) ? v : void 0;
511
+ }, c = typeof n.status == "number" ? n.status : e, u = o("phase"), d = o("verdict"), p = o("code"), h = c === 409 && u === "submit" && d === "confirmed" ? "duplicate" : c === 410 && p === "job_closed" ? "closed" : u === "submit" && d === "unknown" ? "unknown" : void 0;
512
+ return { message: n.error.message, status: c, phase: u, providerStatus: s("provider_status"), retryAfterSeconds: s("retry_after_seconds"), retryable: r("retryable"), verdict: d, code: p, reason: o("reason"), maintenanceUntil: l("maintenance_until"), field: o("field"), outcome: h };
513
+ }, Hr = _a("reason", [R({ outcome: it("sent"), reason: it("sandbox"), ats_label: Tt(J()) }), R({ outcome: it("held"), reason: va(["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() })]), Wr = (t) => {
514
+ let e = oe(R({ staging_destination: Hr }), t);
515
+ if (!e.success) return;
516
+ let n = e.output.staging_destination;
517
+ switch (n.reason) {
518
+ case "sandbox":
519
+ return `Staging: sent to ${n.ats_label === null ? "the ATS" : n.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 ${n.ats_label}`;
530
+ }
531
+ }, $a = 3e4, zr = 2e4, qr = 6e4, Sa = 12e4, Ea = 360 * 6e4, Ca = 60 * 6e4, Ia = (t) => {
532
+ let e = (t == null ? void 0 : t.reason) === "provider_maintenance" ? t.maintenanceUntil : void 0, n = e === void 0 ? 0 : e - Date.now();
533
+ return n > 0 && n <= Ea ? e : void 0;
534
+ }, Ur = (t) => {
535
+ if ((t == null ? void 0 : t.reason) !== "provider_maintenance" || t.outcome === "unknown") return;
536
+ let e = Ia(t);
537
+ return e === void 0 ? {} : { until: e };
538
+ }, Vr = (t, e) => new Intl.DateTimeFormat(e, { hour: "numeric", minute: "2-digit" }).format(t), Kr = (t, e) => {
539
+ let n = Ia(e);
540
+ if (n !== void 0) return { waitMs: n - 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: $a };
542
+ let i = (t ?? 0) + 1, a = Math.min(i * zr, qr), o = (e.retryAfterSeconds ?? 0) * 1e3;
543
+ return { waitMs: Math.min(Math.max(a, o), Sa), throttles: i };
544
+ }, yi = (t) => (t == null ? void 0 : t.code) === "captcha_failed" && t.verdict === "not_submitted", Yr = (t) => {
545
+ if (!ka(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", Zr = (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, Xr = (t, e) => {
549
+ if (typeof t != "object" || t === null) return null;
550
+ let n = t.integration_response;
551
+ if (typeof n != "object" || n === 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 = n;
557
+ if (typeof i.status != "number" || i.service !== void 0 && typeof i.service != "string") return null;
558
+ let a = "data" in i, o = i.error, r = typeof o == "object" && o !== null && typeof o.message == "string" && "data" in o;
559
+ if (!a && !r) return null;
560
+ let s = a ? i.data : o.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, n) => {
570
+ let i = new FileReader();
571
+ i.onload = () => {
572
+ if (typeof i.result != "string" || !i.result) return n(new Error("Invalid file"));
573
+ e(i.result);
574
+ }, i.onerror = n, i.readAsDataURL(t);
575
+ }), xi = (t) => typeof t == "object" && t !== null && (Object.getPrototypeOf(t) === Object.prototype || Object.getPrototypeOf(t) === null), Hn = (t, e) => t ? { ...t, ...Object.fromEntries(Object.entries(e).filter(([, n]) => n !== void 0).map(([n, i]) => {
576
+ let a = t[n];
577
+ return [n, xi(a) && xi(i) ? Hn(a, i) : i];
578
+ })) } : e, es = ({ context: t, schema: e, logger: n }) => {
579
+ if (e) for (let i in e) {
580
+ let a = e[i];
581
+ if (!a) continue;
582
+ let o = ne(t, i.split("."));
583
+ if (a.required && o == null) {
584
+ let r = `Configuration error in context: ${i} is required`;
585
+ throw n.error(r), new Error(r);
586
+ }
587
+ if (o != null) switch (a.type) {
588
+ case "number":
589
+ if (typeof o != "number") throw new Error(`Configuration error in context: ${i} is not a number`);
590
+ break;
591
+ case "string":
592
+ if (typeof o != "string") throw new Error(`Configuration error in context: ${i} is not a string`);
593
+ break;
594
+ default:
595
+ a.type;
596
+ }
597
+ }
598
+ }, Aa = _r(Nn([J(), ve()]), ba(String)), Ta = R({ id: Aa, version: ve(), build: ve(), nodes: wa(ga()), context_schema: et(Tt(Ln(J(), R({ required: Pn(), type: Nn([it("string"), it("number")]) })))) }), ns = R({ flow: Ta }), is = R({ company: R({ name: J() }), context: et(Ln(J(), Rt())), flow: Ta, job: R({ id: Aa, title: J() }), user: et(R({ city: et(J()), country: et(J()), isEU: et(Pn()), continent: et(J()) })) }), as = (t, e) => ({ id: t.job.id, id_type: (e == null ? void 0 : e.idType) === "internal" && e.id === t.job.id ? "internal" : "external" }), os = pa({ pathname: "/flow/job/:id", method: "GET", schema: { searchParams: Lo(), response: is } }), rs = pa({ pathname: "/flow/id/:id", method: "GET", schema: { response: ns } }), re, m, Ma, ja, It, ki, Oa, rn, Da, Pt = {}, Pa = [], ss = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, je = Array.isArray;
599
+ function mt(t, e) {
600
+ for (var n in e) t[n] = e[n];
601
+ return t;
602
+ }
603
+ function La(t) {
604
+ var e = t.parentNode;
605
+ e && e.removeChild(t);
606
+ }
607
+ function ot(t, e, n) {
608
+ var i, a, o, r = {};
609
+ for (o in e) o == "key" ? i = e[o] : o == "ref" ? a = e[o] : r[o] = e[o];
610
+ if (arguments.length > 2 && (r.children = arguments.length > 3 ? re.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (o in t.defaultProps) r[o] === void 0 && (r[o] = t.defaultProps[o]);
611
+ return Xt(t, r, i, a, null);
612
+ }
613
+ function Xt(t, e, n, i, a) {
614
+ var o = { type: t, props: e, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: a ?? ++Ma };
615
+ return a == null && m.vnode != null && m.vnode(o), o;
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 n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
629
+ return typeof t.type == "function" ? xe(t) : null;
630
+ }
631
+ function Na(t) {
632
+ var e, n;
633
+ if ((t = t.__) != null && t.__c != null) {
634
+ for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
635
+ t.__e = t.__c.base = n.__e;
636
+ break;
637
+ }
638
+ return Na(t);
639
+ }
640
+ }
641
+ function sn(t) {
642
+ (!t.__d && (t.__d = !0) && It.push(t) && !ke.__r++ || ki !== m.debounceRendering) && ((ki = m.debounceRendering) || Oa)(ke);
643
+ }
644
+ function ke() {
645
+ var t, e, n, i, a, o, r, s, l;
646
+ for (It.sort(rn); t = It.shift(); ) t.__d && (e = It.length, i = void 0, a = void 0, o = void 0, s = (r = (n = t).__v).__e, (l = n.__P) && (i = [], a = [], (o = mt({}, r)).__v = r.__v + 1, Wn(l, r, o, n.__n, l.ownerSVGElement !== void 0, r.__h != null ? [s] : null, i, s ?? xe(r), r.__h, a), Ha(i, r, a), r.__e != s && Na(r)), It.length > e && It.sort(rn));
647
+ ke.__r = 0;
648
+ }
649
+ function Ra(t, e, n, i, a, o, r, s, l, c, u) {
650
+ var d, p, h, f, b, v, k, y, O, C, B = 0, D = i && i.__k || Pa, F = D.length, x = F, _ = e.length;
651
+ for (n.__k = [], d = 0; d < _; d++) (f = n.__k[d] = (f = e[d]) == null || typeof f == "boolean" || typeof f == "function" ? null : typeof f == "string" || typeof f == "number" || typeof f == "bigint" ? Xt(null, f, null, null, f) : je(f) ? Xt(dt, { children: f }, null, null, null) : f.__b > 0 ? Xt(f.type, f.props, f.key, f.ref ? f.ref : null, f.__v) : f) != null && (f.__ = n, f.__b = n.__b + 1, (y = cs(f, D, k = d + B, x)) === -1 ? h = Pt : (h = D[y] || Pt, D[y] = void 0, x--), Wn(t, f, h, a, o, r, s, l, c, u), b = f.__e, (p = f.ref) && h.ref != p && (h.ref && zn(h.ref, null, f), u.push(p, f.__c || b, f)), b != null && (v == null && (v = b), C = !(O = h === Pt || h.__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 f.type != "function" || y === k && h.__k !== f.__k ? typeof f.type == "function" || C ? f.__d !== void 0 ? (l = f.__d, f.__d = void 0) : l = b.nextSibling : l = Fa(t, b, l) : l = Ba(f, l, t), typeof n.type == "function" && (n.__d = l)));
652
+ for (n.__e = v, d = F; d--; ) D[d] != null && (typeof n.type == "function" && D[d].__e != null && D[d].__e == n.__d && (n.__d = D[d].__e.nextSibling), Wa(D[d], D[d]));
653
+ }
654
+ function Ba(t, e, n) {
655
+ for (var i, a = t.__k, o = 0; a && o < a.length; o++) (i = a[o]) && (i.__ = t, e = typeof i.type == "function" ? Ba(i, e, n) : Fa(n, i.__e, e));
656
+ return e;
657
+ }
658
+ function vt(t, e) {
659
+ return e = e || [], t == null || typeof t == "boolean" || (je(t) ? t.some(function(n) {
660
+ vt(n, e);
661
+ }) : e.push(t)), e;
662
+ }
663
+ function Fa(t, e, n) {
664
+ return n == null || n.parentNode !== t ? t.insertBefore(e, null) : e == n && e.parentNode != null || t.insertBefore(e, n), e.nextSibling;
665
+ }
666
+ function cs(t, e, n, i) {
667
+ var a = t.key, o = t.type, r = n - 1, s = n + 1, l = e[n];
668
+ if (l === null || l && a == l.key && o === l.type) return n;
669
+ if (i > (l != null ? 1 : 0)) for (; r >= 0 || s < e.length; ) {
670
+ if (r >= 0) {
671
+ if ((l = e[r]) && a == l.key && o === l.type) return r;
672
+ r--;
673
+ }
674
+ if (s < e.length) {
675
+ if ((l = e[s]) && a == l.key && o === l.type) return s;
676
+ s++;
677
+ }
678
+ }
679
+ return -1;
680
+ }
681
+ function ds(t, e, n, i, a) {
682
+ var o;
683
+ for (o in n) o === "children" || o === "key" || o in e || $e(t, o, null, n[o], i);
684
+ for (o in e) a && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || n[o] === e[o] || $e(t, o, e[o], n[o], i);
685
+ }
686
+ function $i(t, e, n) {
687
+ e[0] === "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || ss.test(e) ? n : n + "px";
688
+ }
689
+ function $e(t, e, n, i, a) {
690
+ var o;
691
+ t: if (e === "style") if (typeof n == "string") t.style.cssText = n;
692
+ else {
693
+ if (typeof i == "string" && (t.style.cssText = i = ""), i) for (e in i) n && e in n || $i(t.style, e, "");
694
+ if (n) for (e in n) i && n[e] === i[e] || $i(t.style, e, n[e]);
695
+ }
696
+ else if (e[0] === "o" && e[1] === "n") o = e !== (e = e.replace(/Capture$/, "")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + o] = n, n ? i || t.addEventListener(e, o ? Ei : Si, o) : t.removeEventListener(e, o ? Ei : Si, o);
697
+ else if (e !== "dangerouslySetInnerHTML") {
698
+ if (a) 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] = n ?? "";
701
+ break t;
702
+ } catch {
703
+ }
704
+ typeof n == "function" || (n == null || n === !1 && e[4] !== "-" ? t.removeAttribute(e) : t.setAttribute(e, n));
705
+ }
706
+ }
707
+ function Si(t) {
708
+ return this.l[t.type + !1](m.event ? m.event(t) : t);
709
+ }
710
+ function Ei(t) {
711
+ return this.l[t.type + !0](m.event ? m.event(t) : t);
712
+ }
713
+ function Wn(t, e, n, i, a, o, r, s, l, c) {
714
+ var u, d, p, h, f, b, v, k, y, O, C, B, D, F, x, _ = e.type;
715
+ if (e.constructor !== void 0) return null;
716
+ n.__h != null && (l = n.__h, s = e.__e = n.__e, e.__h = null, o = [s]), (u = m.__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, n.__c ? v = (d = e.__c = n.__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 = mt({}, d.__s)), mt(d.__s, _.getDerivedStateFromProps(k, d.__s))), h = d.props, f = 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 !== h && d.componentWillReceiveProps != null && d.componentWillReceiveProps(k, O), !d.__e && (d.shouldComponentUpdate != null && d.shouldComponentUpdate(k, d.__s, O) === !1 || e.__v === n.__v)) {
722
+ for (e.__v !== n.__v && (d.props = k, d.state = d.__s, d.__d = !1), e.__e = n.__e, e.__k = n.__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(h, f, b);
730
+ });
731
+ }
732
+ if (d.context = O, d.props = k, d.__P = t, d.__e = !1, B = m.__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 = mt(mt({}, i), d.getChildContext())), p || d.getSnapshotBeforeUpdate == null || (b = d.getSnapshotBeforeUpdate(h, f)), Ra(t, je(x = u != null && u.type === dt && u.key == null ? u.props.children : u) ? x : [x], e, n, i, a, o, r, s, l, c), d.base = e.__e, e.__h = null, d.__h.length && r.push(d), v && (d.__E = d.__ = null);
739
+ } else o == null && e.__v === n.__v ? (e.__k = n.__k, e.__e = n.__e) : e.__e = us(n.__e, e, n, i, a, o, r, l, c);
740
+ (u = m.diffed) && u(e);
741
+ } catch (S) {
742
+ e.__v = null, (l || o != null) && (e.__e = s, e.__h = !!l, o[o.indexOf(s)] = null), m.__e(S, e, n);
743
+ }
744
+ }
745
+ function Ha(t, e, n) {
746
+ for (var i = 0; i < n.length; i++) zn(n[i], n[++i], n[++i]);
747
+ m.__c && m.__c(e, t), t.some(function(a) {
748
+ try {
749
+ t = a.__h, a.__h = [], t.some(function(o) {
750
+ o.call(a);
751
+ });
752
+ } catch (o) {
753
+ m.__e(o, a.__v);
754
+ }
755
+ });
756
+ }
757
+ function us(t, e, n, i, a, o, r, s, l) {
758
+ var c, u, d, p = n.props, h = e.props, f = e.type, b = 0;
759
+ if (f === "svg" && (a = !0), o != null) {
760
+ for (; b < o.length; b++) if ((c = o[b]) && "setAttribute" in c == !!f && (f ? c.localName === f : c.nodeType === 3)) {
761
+ t = c, o[b] = null;
762
+ break;
763
+ }
764
+ }
765
+ if (t == null) {
766
+ if (f === null) return document.createTextNode(h);
767
+ t = a ? document.createElementNS("http://www.w3.org/2000/svg", f) : document.createElement(f, h.is && h), o = null, s = !1;
768
+ }
769
+ if (f === null) p === h || s && t.data === h || (t.data = h);
770
+ else {
771
+ if (o = o && re.call(t.childNodes), u = (p = n.props || Pt).dangerouslySetInnerHTML, d = h.dangerouslySetInnerHTML, !s) {
772
+ if (o != null) for (p = {}, b = 0; b < t.attributes.length; b++) p[t.attributes[b].name] = t.attributes[b].value;
773
+ (d || u) && (d && (u && d.__html == u.__html || d.__html === t.innerHTML) || (t.innerHTML = d && d.__html || ""));
774
+ }
775
+ if (ds(t, h, p, a, s), d) e.__k = [];
776
+ else if (Ra(t, je(b = e.props.children) ? b : [b], e, n, i, a && f !== "foreignObject", o, r, o ? o[0] : n.__k && xe(n, 0), s, l), o != null) for (b = o.length; b--; ) o[b] != null && La(o[b]);
777
+ s || ("value" in h && (b = h.value) !== void 0 && (b !== t.value || f === "progress" && !b || f === "option" && b !== p.value) && $e(t, "value", b, p.value, !1), "checked" in h && (b = h.checked) !== void 0 && b !== t.checked && $e(t, "checked", b, p.checked, !1));
778
+ }
779
+ return t;
780
+ }
781
+ function zn(t, e, n) {
782
+ try {
783
+ typeof t == "function" ? t(e) : t.current = e;
784
+ } catch (i) {
785
+ m.__e(i, n);
786
+ }
787
+ }
788
+ function Wa(t, e, n) {
789
+ var i, a;
790
+ if (m.unmount && m.unmount(t), (i = t.ref) && (i.current && i.current !== t.__e || zn(i, null, e)), (i = t.__c) != null) {
791
+ if (i.componentWillUnmount) try {
792
+ i.componentWillUnmount();
793
+ } catch (o) {
794
+ m.__e(o, e);
795
+ }
796
+ i.base = i.__P = null, t.__c = void 0;
797
+ }
798
+ if (i = t.__k) for (a = 0; a < i.length; a++) i[a] && Wa(i[a], e, n || typeof t.type != "function");
799
+ n || t.__e == null || La(t.__e), t.__ = t.__e = t.__d = void 0;
800
+ }
801
+ function ps(t, e, n) {
802
+ return this.constructor(t, n);
803
+ }
804
+ function jt(t, e, n) {
805
+ var i, a, o, r;
806
+ m.__ && m.__(t, e), a = (i = typeof n == "function") ? null : n && n.__k || e.__k, o = [], r = [], Wn(e, t = (!i && n || e).__k = ot(dt, null, [t]), a || Pt, Pt, e.ownerSVGElement !== void 0, !i && n ? [n] : a ? null : e.firstChild ? re.call(e.childNodes) : null, o, !i && n ? n : a ? a.__e : e.firstChild, i, r), Ha(o, t, r);
807
+ }
808
+ function za(t, e) {
809
+ jt(t, e, za);
810
+ }
811
+ function fs(t, e, n) {
812
+ var i, a, o, r, s = mt({}, t.props);
813
+ for (o in t.type && t.type.defaultProps && (r = t.type.defaultProps), e) o == "key" ? i = e[o] : o == "ref" ? a = e[o] : s[o] = e[o] === void 0 && r !== void 0 ? r[o] : e[o];
814
+ return arguments.length > 2 && (s.children = arguments.length > 3 ? re.call(arguments, 2) : n), Xt(t.type, s, i || t.key, a || t.ref, null);
815
+ }
816
+ function qa(t, e) {
817
+ var n = { __c: e = "__cC" + Da++, __: t, Consumer: function(i, a) {
818
+ return i.children(a);
819
+ }, Provider: function(i) {
820
+ var a, o;
821
+ return this.getChildContext || (a = [], (o = {})[e] = this, this.getChildContext = function() {
822
+ return o;
823
+ }, this.shouldComponentUpdate = function(r) {
824
+ this.props.value !== r.value && a.some(function(s) {
825
+ s.__e = !0, sn(s);
826
+ });
827
+ }, this.sub = function(r) {
828
+ a.push(r);
829
+ var s = r.componentWillUnmount;
830
+ r.componentWillUnmount = function() {
831
+ a.splice(a.indexOf(r), 1), s && s.call(r);
832
+ };
833
+ }), i.children;
834
+ } };
835
+ return n.Provider.__ = n.Consumer.contextType = n;
836
+ }
837
+ re = Pa.slice, m = { __e: function(t, e, n, i) {
838
+ for (var a, o, r; e = e.__; ) if ((a = e.__c) && !a.__) try {
839
+ if ((o = a.constructor) && o.getDerivedStateFromError != null && (a.setState(o.getDerivedStateFromError(t)), r = a.__d), a.componentDidCatch != null && (a.componentDidCatch(t, i || {}), r = a.__d), r) return a.__E = a;
840
+ } catch (s) {
841
+ t = s;
842
+ }
843
+ throw t;
844
+ } }, Ma = 0, ja = function(t) {
845
+ return t != null && t.constructor === void 0;
846
+ }, ct.prototype.setState = function(t, e) {
847
+ var n;
848
+ n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = mt({}, this.state), typeof t == "function" && (t = t(mt({}, n), this.props)), t && mt(n, t), t != null && this.__v && (e && this._sb.push(e), sn(this));
849
+ }, ct.prototype.forceUpdate = function(t) {
850
+ this.__v && (this.__e = !0, t && this.__h.push(t), sn(this));
851
+ }, ct.prototype.render = dt, It = [], Oa = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, rn = function(t, e) {
852
+ return t.__v.__b - e.__v.__b;
853
+ }, ke.__r = 0, Da = 0;
854
+ var Et, N, ze, Ci, Bt = 0, Ua = [], fe = [], Ii = m.__b, Ai = m.__r, Ti = m.diffed, Mi = m.__c, ji = m.unmount;
855
+ function Ht(t, e) {
856
+ m.__h && m.__h(N, t, Bt || e), Bt = 0;
857
+ var n = N.__H || (N.__H = { __: [], __h: [] });
858
+ return t >= n.__.length && n.__.push({ __V: fe }), n.__[t];
859
+ }
860
+ function Va(t) {
861
+ return Bt = 1, Ka(Ja, t);
862
+ }
863
+ function Ka(t, e, n) {
864
+ var i = Ht(Et++, 2);
865
+ if (i.t = t, !i.__c && (i.__ = [n ? n(e) : Ja(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 a = 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 !o || o.call(this, s, l, c);
877
+ var d = !1;
878
+ return u.forEach(function(p) {
879
+ if (p.__N) {
880
+ var h = p.__[0];
881
+ p.__ = p.__N, p.__N = void 0, h !== p.__[0] && (d = !0);
882
+ }
883
+ }), !(!d && i.__c.props === s) && (!o || o.call(this, s, l, c));
884
+ };
885
+ N.u = !0;
886
+ var o = N.shouldComponentUpdate, r = N.componentWillUpdate;
887
+ N.componentWillUpdate = function(s, l, c) {
888
+ if (this.__e) {
889
+ var u = o;
890
+ o = void 0, a(s, l, c), o = u;
891
+ }
892
+ r && r.call(this, s, l, c);
893
+ }, N.shouldComponentUpdate = a;
894
+ }
895
+ return i.__N || i.__;
896
+ }
897
+ function qn(t, e) {
898
+ var n = Ht(Et++, 3);
899
+ !m.__s && Un(n.__H, e) && (n.__ = t, n.i = e, N.__H.__h.push(n));
900
+ }
901
+ function Wt(t, e) {
902
+ var n = Ht(Et++, 4);
903
+ !m.__s && Un(n.__H, e) && (n.__ = t, n.i = e, N.__h.push(n));
904
+ }
905
+ function Ft(t) {
906
+ return Bt = 5, Ot(function() {
907
+ return { current: t };
908
+ }, []);
909
+ }
910
+ function hs(t, e, n) {
911
+ Bt = 6, Wt(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
+ }, n == null ? n : n.concat(t));
918
+ }
919
+ function Ot(t, e) {
920
+ var n = Ht(Et++, 7);
921
+ return Un(n.__H, e) ? (n.__V = t(), n.i = e, n.__h = t, n.__V) : n.__;
922
+ }
923
+ function bs(t, e) {
924
+ return Bt = 8, Ot(function() {
925
+ return t;
926
+ }, e);
927
+ }
928
+ function Ya(t) {
929
+ var e = N.context[t.__c], n = Ht(Et++, 9);
930
+ return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(N)), e.props.value) : t.__;
931
+ }
932
+ function gs(t, e) {
933
+ m.useDebugValue && m.useDebugValue(e ? e(t) : t);
934
+ }
935
+ function ws() {
936
+ var t = Ht(Et++, 11);
937
+ if (!t.__) {
938
+ for (var e = N.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
939
+ var n = e.__m || (e.__m = [0, 0]);
940
+ t.__ = "P" + n[0] + "-" + n[1]++;
941
+ }
942
+ return t.__;
943
+ }
944
+ function ms() {
945
+ for (var t; t = Ua.shift(); ) if (t.__P && t.__H) try {
946
+ t.__H.__h.forEach(he), t.__H.__h.forEach(ln), t.__H.__h = [];
947
+ } catch (e) {
948
+ t.__H.__h = [], m.__e(e, t.__v);
949
+ }
950
+ }
951
+ m.__b = function(t) {
952
+ N = null, Ii && Ii(t);
953
+ }, m.__r = function(t) {
954
+ Ai && Ai(t), Et = 0;
955
+ var e = (N = t.__c).__H;
956
+ e && (ze === N ? (e.__h = [], N.__h = [], e.__.forEach(function(n) {
957
+ n.__N && (n.__ = n.__N), n.__V = fe, n.__N = n.i = void 0;
958
+ })) : (e.__h.forEach(he), e.__h.forEach(ln), e.__h = [], Et = 0)), ze = N;
959
+ }, m.diffed = function(t) {
960
+ Ti && Ti(t);
961
+ var e = t.__c;
962
+ e && e.__H && (e.__H.__h.length && (Ua.push(e) !== 1 && Ci === m.requestAnimationFrame || ((Ci = m.requestAnimationFrame) || vs)(ms)), e.__H.__.forEach(function(n) {
963
+ n.i && (n.__H = n.i), n.__V !== fe && (n.__ = n.__V), n.i = void 0, n.__V = fe;
964
+ })), ze = N = null;
965
+ }, m.__c = function(t, e) {
966
+ e.some(function(n) {
967
+ try {
968
+ n.__h.forEach(he), n.__h = n.__h.filter(function(i) {
969
+ return !i.__ || ln(i);
970
+ });
971
+ } catch (i) {
972
+ e.some(function(a) {
973
+ a.__h && (a.__h = []);
974
+ }), e = [], m.__e(i, n.__v);
975
+ }
976
+ }), Mi && Mi(t, e);
977
+ }, m.unmount = function(t) {
978
+ ji && ji(t);
979
+ var e, n = t.__c;
980
+ n && n.__H && (n.__H.__.forEach(function(i) {
981
+ try {
982
+ he(i);
983
+ } catch (a) {
984
+ e = a;
985
+ }
986
+ }), n.__H = void 0, e && m.__e(e, n.__v));
987
+ };
988
+ var Oi = typeof requestAnimationFrame == "function";
989
+ function vs(t) {
990
+ var e, n = function() {
991
+ clearTimeout(i), Oi && cancelAnimationFrame(e), setTimeout(t);
992
+ }, i = setTimeout(n, 100);
993
+ Oi && (e = requestAnimationFrame(n));
994
+ }
995
+ function he(t) {
996
+ var e = N, n = t.__c;
997
+ typeof n == "function" && (t.__c = void 0, n()), N = e;
998
+ }
999
+ function ln(t) {
1000
+ var e = N;
1001
+ t.__c = t.__(), N = e;
1002
+ }
1003
+ function Un(t, e) {
1004
+ return !t || t.length !== e.length || e.some(function(n, i) {
1005
+ return n !== t[i];
1006
+ });
1007
+ }
1008
+ function Ja(t, e) {
1009
+ return typeof e == "function" ? e(t) : e;
1010
+ }
1011
+ var _s = /* @__PURE__ */ Symbol.for("preact-signals");
1012
+ function Vn() {
1013
+ if (Lt > 1)
1014
+ Lt--;
1015
+ else {
1016
+ for (var t, e = !1; Qt !== void 0; ) {
1017
+ var n = Qt;
1018
+ for (Qt = void 0, cn++; n !== void 0; ) {
1019
+ var i = n.o;
1020
+ if (n.o = void 0, n.f &= -3, !(8 & n.f) && Za(n)) try {
1021
+ n.c();
1022
+ } catch (a) {
1023
+ e || (t = a, e = !0);
1024
+ }
1025
+ n = i;
1026
+ }
1027
+ }
1028
+ if (cn = 0, Lt--, e) throw t;
1029
+ }
1030
+ }
1031
+ var P = void 0, Qt = void 0, Lt = 0, cn = 0, Se = 0;
1032
+ function Ga(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, n = t.x;
1054
+ e !== void 0 && (e.x = n, t.e = void 0), n !== void 0 && (n.e = e, t.x = void 0), t === this.t && (this.t = n);
1055
+ }
1056
+ };
1057
+ G.prototype.subscribe = function(t) {
1058
+ var e = this;
1059
+ return Oe(function() {
1060
+ var n = e.value, i = P;
1061
+ P = void 0;
1062
+ try {
1063
+ t(n);
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 = Ga(this);
1089
+ return t !== void 0 && (t.i = this.i), this.v;
1090
+ }, set: function(t) {
1091
+ if (t !== this.v) {
1092
+ if (cn > 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
+ Vn();
1098
+ }
1099
+ }
1100
+ } });
1101
+ function st(t) {
1102
+ return new G(t);
1103
+ }
1104
+ function Za(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 Xa(t) {
1109
+ for (var e = t.s; e !== void 0; e = e.n) {
1110
+ var n = e.S.n;
1111
+ if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
1112
+ t.s = e;
1113
+ break;
1114
+ }
1115
+ }
1116
+ }
1117
+ function Qa(t) {
1118
+ for (var e = t.s, n = 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)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
1121
+ }
1122
+ t.s = n;
1123
+ }
1124
+ function zt(t) {
1125
+ G.call(this, void 0), this.x = t, this.s = void 0, this.g = Se - 1, this.f = 4;
1126
+ }
1127
+ (zt.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 && !Za(this))
1131
+ return this.f &= -2, !0;
1132
+ var t = P;
1133
+ try {
1134
+ Xa(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 (n) {
1138
+ this.v = n, this.f |= 16, this.i++;
1139
+ }
1140
+ return P = t, Qa(this), this.f &= -2, !0;
1141
+ };
1142
+ zt.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
+ zt.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
+ zt.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(zt.prototype, "value", { get: function() {
1162
+ if (1 & this.f) throw new Error("Cycle detected");
1163
+ var t = Ga(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 zt(t);
1169
+ }
1170
+ function to(t) {
1171
+ var e = t.u;
1172
+ if (t.u = void 0, typeof e == "function") {
1173
+ Lt++;
1174
+ var n = P;
1175
+ P = void 0;
1176
+ try {
1177
+ e();
1178
+ } catch (i) {
1179
+ throw t.f &= -2, t.f |= 8, Kn(t), i;
1180
+ } finally {
1181
+ P = n, Vn();
1182
+ }
1183
+ }
1184
+ }
1185
+ function Kn(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, to(t);
1188
+ }
1189
+ function xs(t) {
1190
+ if (P !== this) throw new Error("Out-of-order effect");
1191
+ Qa(this), P = t, this.f &= -2, 8 & this.f && Kn(this), Vn();
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, to(this), Xa(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 || Kn(this);
1217
+ };
1218
+ function Oe(t) {
1219
+ var e = new se(t);
1220
+ try {
1221
+ e.c();
1222
+ } catch (n) {
1223
+ throw e.d(), n;
1224
+ }
1225
+ return e.d.bind(e);
1226
+ }
1227
+ var qe;
1228
+ function qt(t, e) {
1229
+ m[t] = e.bind(null, m[t] || function() {
1230
+ });
1231
+ }
1232
+ function Ee(t) {
1233
+ qe && qe(), qe = t && t.S();
1234
+ }
1235
+ function eo(t) {
1236
+ var e = this, n = t.data, i = $s(n);
1237
+ i.value = n;
1238
+ var a = Ot(function() {
1239
+ for (var o = e.__v; o = o.__; ) if (o.__c) {
1240
+ o.__c.__$f |= 4;
1241
+ break;
1242
+ }
1243
+ return e.__$u.c = function() {
1244
+ var r;
1245
+ !ja(a.peek()) && ((r = e.base) == null ? void 0 : r.nodeType) === 3 ? e.base.data = a.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 a.value;
1252
+ }
1253
+ eo.displayName = "_st";
1254
+ Object.defineProperties(G.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: eo }, 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 n, i = e.props;
1260
+ for (var a in i) if (a !== "children") {
1261
+ var o = i[a];
1262
+ o instanceof G && (n || (e.__np = n = {}), n[a] = o, i[a] = o.peek());
1263
+ }
1264
+ }
1265
+ t(e);
1266
+ });
1267
+ qt("__r", function(t, e) {
1268
+ Ee();
1269
+ var n, i = e.__c;
1270
+ i && (i.__$f &= -2, (n = i.__$u) === void 0 && (i.__$u = n = (function(a) {
1271
+ var o;
1272
+ return Oe(function() {
1273
+ o = this;
1274
+ }), o.c = function() {
1275
+ i.__$f |= 1, i.setState({});
1276
+ }, o;
1277
+ })())), Ee(n), t(e);
1278
+ });
1279
+ qt("__e", function(t, e, n, i) {
1280
+ Ee(), t(e, n, i);
1281
+ });
1282
+ qt("diffed", function(t, e) {
1283
+ Ee();
1284
+ var n;
1285
+ if (typeof e.type == "string" && (n = e.__e)) {
1286
+ var i = e.__np, a = e.props;
1287
+ if (i) {
1288
+ var o = n.U;
1289
+ if (o) for (var r in o) {
1290
+ var s = o[r];
1291
+ s !== void 0 && !(r in i) && (s.d(), o[r] = void 0);
1292
+ }
1293
+ else n.U = o = {};
1294
+ for (var l in i) {
1295
+ var c = o[l], u = i[l];
1296
+ c === void 0 ? (c = ks(n, l, u, a), o[l] = c) : c.o(u, a);
1297
+ }
1298
+ }
1299
+ }
1300
+ t(e);
1301
+ });
1302
+ function ks(t, e, n, i) {
1303
+ var a = e in t && t.ownerSVGElement === void 0, o = st(n);
1304
+ return { o: function(r, s) {
1305
+ o.value = r, i = s;
1306
+ }, d: Oe(function() {
1307
+ var r = o.value.value;
1308
+ i[e] !== r && (i[e] = r, a ? 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 n = e.__e;
1314
+ if (n) {
1315
+ var i = n.U;
1316
+ if (i) {
1317
+ n.U = void 0;
1318
+ for (var a in i) {
1319
+ var o = i[a];
1320
+ o && o.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, n, i) {
1334
+ (i < 3 || i === 9) && (e.__$f |= 2), t(e, n, i);
1335
+ });
1336
+ ct.prototype.shouldComponentUpdate = function(t, e) {
1337
+ var n = this.__$u;
1338
+ if (!(n && n.s !== void 0 || 4 & this.__$f) || 3 & this.__$f) return !0;
1339
+ for (var i in e) return !0;
1340
+ for (var a in t) if (a !== "__source" && t[a] !== this.props[a]) return !0;
1341
+ for (var o in this.props) if (!(o in t)) return !0;
1342
+ return !1;
1343
+ };
1344
+ function $s(t) {
1345
+ return Ot(function() {
1346
+ return st(t);
1347
+ }, []);
1348
+ }
1349
+ const nt = /* @__PURE__ */ Symbol.for("@ts-pattern/matcher"), no = /* @__PURE__ */ Symbol.for("@ts-pattern/isVariadic"), Ce = "@ts-pattern/anonymous-select-key", dn = (t) => !!(t && typeof t == "object"), be = (t) => t && !!t[nt], q = (t, e, n) => {
1350
+ if (be(t)) {
1351
+ const i = t[nt](), { matched: a, selections: o } = i.match(e);
1352
+ return a && o && Object.keys(o).forEach((r) => n(r, o[r])), a;
1353
+ }
1354
+ if (dn(t)) {
1355
+ if (!dn(e)) return !1;
1356
+ if (Array.isArray(t)) {
1357
+ if (!Array.isArray(e)) return !1;
1358
+ let i = [], a = [], o = [];
1359
+ for (const r of t.keys()) {
1360
+ const s = t[r];
1361
+ be(s) && s[no] ? o.push(s) : o.length ? a.push(s) : i.push(s);
1362
+ }
1363
+ if (o.length) {
1364
+ if (o.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 + a.length) return !1;
1366
+ const r = e.slice(0, i.length), s = a.length === 0 ? [] : e.slice(-a.length), l = e.slice(i.length, a.length === 0 ? 1 / 0 : -a.length);
1367
+ return i.every((c, u) => q(c, r[u], n)) && a.every((c, u) => q(c, s[u], n)) && (o.length === 0 || q(o[0], l, n));
1368
+ }
1369
+ return t.length === e.length && t.every((r, s) => q(r, e[s], n));
1370
+ }
1371
+ return Reflect.ownKeys(t).every((i) => {
1372
+ const a = t[i];
1373
+ return (i in e || be(o = a) && o[nt]().matcherType === "optional") && q(a, e[i], n);
1374
+ var o;
1375
+ });
1376
+ }
1377
+ return Object.is(e, t);
1378
+ }, tt = (t) => {
1379
+ var e, n, i;
1380
+ return dn(t) ? be(t) ? (e = (n = (i = t[nt]()).getSelectionKeys) == null ? void 0 : n.call(i)) != null ? e : [] : Array.isArray(t) ? ie(t, tt) : ie(Object.values(t), tt) : [];
1381
+ }, ie = (t, e) => t.reduce((n, i) => n.concat(e(i)), []);
1382
+ function io(...t) {
1383
+ if (t.length === 1) {
1384
+ const [e] = t;
1385
+ return (n) => q(e, n, () => {
1386
+ });
1387
+ }
1388
+ if (t.length === 2) {
1389
+ const [e, n] = t;
1390
+ return q(e, n, () => {
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 K(t) {
1396
+ return Object.assign(t, { optional: () => Yn(t), and: (e) => L(t, e), or: (e) => ao(t, e), select: (e) => e === void 0 ? ae(t) : ae(e, t) });
1397
+ }
1398
+ function un(t) {
1399
+ return Object.assign(((e) => Object.assign(e, { [Symbol.iterator]() {
1400
+ let n = 0;
1401
+ const i = [{ value: Object.assign(e, { [no]: !0 }), done: !1 }, { done: !0, value: void 0 }];
1402
+ return { next: () => {
1403
+ var a;
1404
+ return (a = i[n++]) != null ? a : i.at(-1);
1405
+ } };
1406
+ } }))(t), { optional: () => un(Yn(t)), select: (e) => un(e === void 0 ? ae(t) : ae(e, t)) });
1407
+ }
1408
+ function Yn(t) {
1409
+ return K({ [nt]: () => ({ match: (e) => {
1410
+ let n = {};
1411
+ const i = (a, o) => {
1412
+ n[a] = o;
1413
+ };
1414
+ return e === void 0 ? (tt(t).forEach((a) => i(a, void 0)), { matched: !0, selections: n }) : { matched: q(t, e, i), selections: n };
1415
+ }, getSelectionKeys: () => tt(t), matcherType: "optional" }) });
1416
+ }
1417
+ const Ss = (t, e) => {
1418
+ for (const n of t) if (!e(n)) return !1;
1419
+ return !0;
1420
+ }, Es = (t, e) => {
1421
+ for (const [n, i] of t.entries()) if (!e(i, n)) return !1;
1422
+ return !0;
1423
+ }, Cs = (t, e) => {
1424
+ const n = Reflect.ownKeys(t);
1425
+ for (const i of n) if (!e(i, t[i])) return !1;
1426
+ return !0;
1427
+ };
1428
+ function L(...t) {
1429
+ return K({ [nt]: () => ({ match: (e) => {
1430
+ let n = {};
1431
+ const i = (a, o) => {
1432
+ n[a] = o;
1433
+ };
1434
+ return { matched: t.every((a) => q(a, e, i)), selections: n };
1435
+ }, getSelectionKeys: () => ie(t, tt), matcherType: "and" }) });
1436
+ }
1437
+ function ao(...t) {
1438
+ return K({ [nt]: () => ({ match: (e) => {
1439
+ let n = {};
1440
+ const i = (a, o) => {
1441
+ n[a] = o;
1442
+ };
1443
+ return ie(t, tt).forEach((a) => i(a, void 0)), { matched: t.some((a) => q(a, e, i)), selections: n };
1444
+ }, getSelectionKeys: () => ie(t, tt), matcherType: "or" }) });
1445
+ }
1446
+ function T(t) {
1447
+ return { [nt]: () => ({ match: (e) => ({ matched: !!t(e) }) }) };
1448
+ }
1449
+ function ae(...t) {
1450
+ const e = typeof t[0] == "string" ? t[0] : void 0, n = t.length === 2 ? t[1] : typeof t[0] == "string" ? void 0 : t[0];
1451
+ return K({ [nt]: () => ({ match: (i) => {
1452
+ let a = { [e ?? Ce]: i };
1453
+ return { matched: n === void 0 || q(n, i, (o, r) => {
1454
+ a[o] = r;
1455
+ }), selections: a };
1456
+ }, getSelectionKeys: () => [e ?? Ce].concat(n === void 0 ? [] : tt(n)) }) });
1457
+ }
1458
+ function oo(t) {
1459
+ return !0;
1460
+ }
1461
+ function ht(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 ro = K(T(oo)), Is = K(T(oo)), As = ro, $t = (t) => Object.assign(K(t), { startsWith: (e) => {
1471
+ return $t(L(t, (n = e, T((i) => xt(i) && i.startsWith(n)))));
1472
+ var n;
1473
+ }, endsWith: (e) => {
1474
+ return $t(L(t, (n = e, T((i) => xt(i) && i.endsWith(n)))));
1475
+ var n;
1476
+ }, minLength: (e) => $t(L(t, ((n) => T((i) => xt(i) && i.length >= n))(e))), length: (e) => $t(L(t, ((n) => T((i) => xt(i) && i.length === n))(e))), maxLength: (e) => $t(L(t, ((n) => T((i) => xt(i) && i.length <= n))(e))), includes: (e) => {
1477
+ return $t(L(t, (n = e, T((i) => xt(i) && i.includes(n)))));
1478
+ var n;
1479
+ }, regex: (e) => {
1480
+ return $t(L(t, (n = e, T((i) => xt(i) && !!i.match(n)))));
1481
+ var n;
1482
+ } }), Di = $t(T(xt)), bt = (t) => Object.assign(K(t), { between: (e, n) => bt(L(t, ((i, a) => T((o) => ht(o) && i <= o && a >= o))(e, n))), lt: (e) => bt(L(t, ((n) => T((i) => ht(i) && i < n))(e))), gt: (e) => bt(L(t, ((n) => T((i) => ht(i) && i > n))(e))), lte: (e) => bt(L(t, ((n) => T((i) => ht(i) && i <= n))(e))), gte: (e) => bt(L(t, ((n) => T((i) => ht(i) && i >= n))(e))), int: () => bt(L(t, T((e) => ht(e) && Number.isInteger(e)))), finite: () => bt(L(t, T((e) => ht(e) && Number.isFinite(e)))), positive: () => bt(L(t, T((e) => ht(e) && e > 0))), negative: () => bt(L(t, T((e) => ht(e) && e < 0))) }), Ts = bt(T(ht)), St = (t) => Object.assign(K(t), { between: (e, n) => St(L(t, ((i, a) => T((o) => kt(o) && i <= o && a >= o))(e, n))), lt: (e) => St(L(t, ((n) => T((i) => kt(i) && i < n))(e))), gt: (e) => St(L(t, ((n) => T((i) => kt(i) && i > n))(e))), lte: (e) => St(L(t, ((n) => T((i) => kt(i) && i <= n))(e))), gte: (e) => St(L(t, ((n) => T((i) => kt(i) && i >= n))(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 = K(T(function(t) {
1483
+ return typeof t == "boolean";
1484
+ })), Os = K(T(function(t) {
1485
+ return typeof t == "symbol";
1486
+ })), Ds = K(T(function(t) {
1487
+ return t == null;
1488
+ })), Ps = K(T(function(t) {
1489
+ return t != null;
1490
+ }));
1491
+ var Dt = { __proto__: null, matcher: nt, optional: Yn, array: function(...t) {
1492
+ return un({ [nt]: () => ({ match: (e) => {
1493
+ if (!Array.isArray(e)) return { matched: !1 };
1494
+ if (t.length === 0) return { matched: !0 };
1495
+ const n = t[0];
1496
+ let i = {};
1497
+ if (e.length === 0) return tt(n).forEach((o) => {
1498
+ i[o] = [];
1499
+ }), { matched: !0, selections: i };
1500
+ const a = (o, r) => {
1501
+ i[o] = (i[o] || []).concat([r]);
1502
+ };
1503
+ return { matched: e.every((o) => q(n, o, a)), selections: i };
1504
+ }, getSelectionKeys: () => t.length === 0 ? [] : tt(t[0]) }) });
1505
+ }, set: function(...t) {
1506
+ return K({ [nt]: () => ({ match: (e) => {
1507
+ if (!(e instanceof Set)) return { matched: !1 };
1508
+ let n = {};
1509
+ if (e.size === 0) return { matched: !0, selections: n };
1510
+ if (t.length === 0) return { matched: !0 };
1511
+ const i = (o, r) => {
1512
+ n[o] = (n[o] || []).concat([r]);
1513
+ }, a = t[0];
1514
+ return { matched: Ss(e, (o) => q(a, o, i)), selections: n };
1515
+ }, getSelectionKeys: () => t.length === 0 ? [] : tt(t[0]) }) });
1516
+ }, map: function(...t) {
1517
+ return K({ [nt]: () => ({ match: (e) => {
1518
+ if (!(e instanceof Map)) return { matched: !1 };
1519
+ let n = {};
1520
+ if (e.size === 0) return { matched: !0, selections: n };
1521
+ const i = (s, l) => {
1522
+ n[s] = (n[s] || []).concat([l]);
1523
+ };
1524
+ if (t.length === 0) return { matched: !0 };
1525
+ var a;
1526
+ if (t.length === 1) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a = t[0]) == null ? void 0 : a.toString()}`);
1527
+ const [o, r] = t;
1528
+ return { matched: Es(e, (s, l) => {
1529
+ const c = q(o, l, i), u = q(r, s, i);
1530
+ return c && u;
1531
+ }), selections: n };
1532
+ }, getSelectionKeys: () => t.length === 0 ? [] : [...tt(t[0]), ...tt(t[1])] }) });
1533
+ }, record: function(...t) {
1534
+ return K({ [nt]: () => ({ match: (e) => {
1535
+ if (e === null || typeof e != "object" || Array.isArray(e)) return { matched: !1 };
1536
+ var n;
1537
+ if (t.length === 0) throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(n = t[0]) == null ? void 0 : n.toString()}`);
1538
+ let i = {};
1539
+ const a = (s, l) => {
1540
+ i[s] = (i[s] || []).concat([l]);
1541
+ }, [o, r] = t.length === 1 ? [Di, 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(o, c, a), d = q(o, s, a), p = q(r, l, a);
1544
+ return (d || u) && p;
1545
+ }), selections: i };
1546
+ }, getSelectionKeys: () => t.length === 0 ? [] : [...tt(t[0]), ...tt(t[1])] }) });
1547
+ }, intersection: L, union: ao, not: function(t) {
1548
+ return K({ [nt]: () => ({ match: (e) => ({ matched: !q(t, e, () => {
1549
+ }) }), getSelectionKeys: () => [], matcherType: "not" }) });
1550
+ }, when: T, select: ae, any: ro, unknown: Is, _: As, string: Di, number: Ts, bigint: Ms, boolean: js, symbol: Os, nullish: Ds, nonNullable: Ps, instanceOf: function(t) {
1551
+ return K(T(/* @__PURE__ */ (function(e) {
1552
+ return (n) => n instanceof e;
1553
+ })(t)));
1554
+ }, shape: function(t) {
1555
+ return K(T(io(t)));
1556
+ } };
1557
+ let Ls = class extends Error {
1558
+ constructor(e) {
1559
+ let n;
1560
+ try {
1561
+ n = JSON.stringify(e);
1562
+ } catch {
1563
+ n = e;
1564
+ }
1565
+ super(`Pattern matching error: no pattern matches value ${n}`), this.input = void 0, this.input = e;
1566
+ }
1567
+ };
1568
+ const pn = { matched: !1, value: void 0 };
1569
+ function Jn(t) {
1570
+ return new Ns(t, pn);
1571
+ }
1572
+ let Ns = class fn {
1573
+ constructor(e, n) {
1574
+ this.input = void 0, this.state = void 0, this.input = e, this.state = n;
1575
+ }
1576
+ with(...e) {
1577
+ if (this.state.matched) return this;
1578
+ const n = e[e.length - 1], i = [e[0]];
1579
+ let a;
1580
+ e.length === 3 && typeof e[1] == "function" ? a = e[1] : e.length > 2 && i.push(...e.slice(1, e.length - 1));
1581
+ let o = !1, r = {};
1582
+ const s = (c, u) => {
1583
+ o = !0, r[c] = u;
1584
+ }, l = !i.some((c) => q(c, this.input, s)) || a && !a(this.input) ? pn : { matched: !0, value: n(o ? Ce in r ? r[Ce] : r : this.input, this.input) };
1585
+ return new fn(this.input, l);
1586
+ }
1587
+ when(e, n) {
1588
+ if (this.state.matched) return this;
1589
+ const i = !!e(this.input);
1590
+ return new fn(this.input, i ? { matched: !0, value: n(this.input, this.input) } : pn);
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 w(t, e, n, i, a, o) {
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: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --Bs, __source: a, __self: o };
1616
+ if (typeof t == "function" && (r = t.defaultProps)) for (s in r) l[s] === void 0 && (l[s] = r[s]);
1617
+ return m.vnode && m.vnode(c), c;
1618
+ }
1619
+ function so(t) {
1620
+ var e, n, i = "";
1621
+ if (typeof t == "string" || typeof t == "number") i += t;
1622
+ else if (typeof t == "object") if (Array.isArray(t)) {
1623
+ var a = t.length;
1624
+ for (e = 0; e < a; e++) t[e] && (n = so(t[e])) && (i && (i += " "), i += n);
1625
+ } else for (n in t) t[n] && (i && (i += " "), i += n);
1626
+ return i;
1627
+ }
1628
+ function Gn() {
1629
+ for (var t, e, n = 0, i = "", a = arguments.length; n < a; n++) (t = arguments[n]) && (e = so(t)) && (i && (i += " "), i += e);
1630
+ return i;
1631
+ }
1632
+ const Pi = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Li = Gn, Zn = (t, e) => (n) => {
1633
+ var i;
1634
+ if ((e == null ? void 0 : e.variants) == null) return Li(t, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
1635
+ const { variants: a, defaultVariants: o } = e, r = Object.keys(a).map((c) => {
1636
+ const u = n == null ? void 0 : n[c], d = o == null ? void 0 : o[c];
1637
+ if (u === null) return null;
1638
+ const p = Pi(u) || Pi(d);
1639
+ return a[c][p];
1640
+ }), s = n && Object.entries(n).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, ...h } = u;
1645
+ return Object.entries(h).every((f) => {
1646
+ let [b, v] = f;
1647
+ return Array.isArray(v) ? v.includes({
1648
+ ...o,
1649
+ ...s
1650
+ }[b]) : {
1651
+ ...o,
1652
+ ...s
1653
+ }[b] === v;
1654
+ }) ? [
1655
+ ...c,
1656
+ d,
1657
+ p
1658
+ ] : c;
1659
+ }, []);
1660
+ return Li(t, r, l, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
1661
+ };
1662
+ function lo(t, e) {
1663
+ for (var n in e) t[n] = e[n];
1664
+ return t;
1665
+ }
1666
+ function hn(t, e) {
1667
+ for (var n in t) if (n !== "__source" && !(n 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 bn(t) {
1675
+ this.props = t;
1676
+ }
1677
+ function Fs(t, e) {
1678
+ function n(a) {
1679
+ var o = this.props.ref, r = o == a.ref;
1680
+ return !r && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, a) || !r : hn(this.props, a);
1681
+ }
1682
+ function i(a) {
1683
+ return this.shouldComponentUpdate = n, ot(t, a);
1684
+ }
1685
+ return i.displayName = "Memo(" + (t.displayName || t.name) + ")", i.prototype.isReactComponent = !0, i.__f = !0, i;
1686
+ }
1687
+ (bn.prototype = new ct()).isPureReactComponent = !0, bn.prototype.shouldComponentUpdate = function(t, e) {
1688
+ return hn(this.props, t) || hn(this.state, e);
1689
+ };
1690
+ var Ni = m.__b;
1691
+ m.__b = function(t) {
1692
+ t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), Ni && Ni(t);
1693
+ };
1694
+ var Hs = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
1695
+ function Ws(t) {
1696
+ function e(n) {
1697
+ var i = lo({}, n);
1698
+ return delete i.ref, t(i, n.ref || null);
1699
+ }
1700
+ return e.$$typeof = Hs, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
1701
+ }
1702
+ var Ri = function(t, e) {
1703
+ return t == null ? null : vt(vt(t).map(e));
1704
+ }, zs = { map: Ri, forEach: Ri, count: function(t) {
1705
+ return t ? vt(t).length : 0;
1706
+ }, only: function(t) {
1707
+ var e = vt(t);
1708
+ if (e.length !== 1) throw "Children.only";
1709
+ return e[0];
1710
+ }, toArray: vt }, qs = m.__e;
1711
+ m.__e = function(t, e, n, i) {
1712
+ if (t.then) {
1713
+ for (var a, o = e; o = o.__; ) if ((a = o.__c) && a.__c) return e.__e == null && (e.__e = n.__e, e.__k = n.__k), a.__c(t, e);
1714
+ }
1715
+ qs(t, e, n, i);
1716
+ };
1717
+ var Bi = m.unmount;
1718
+ function co(t, e, n) {
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 = lo({}, t)).__c != null && (t.__c.__P === n && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(i) {
1722
+ return co(i, e, n);
1723
+ })), t;
1724
+ }
1725
+ function uo(t, e, n) {
1726
+ return t && (t.__v = null, t.__k = t.__k && t.__k.map(function(i) {
1727
+ return uo(i, e, n);
1728
+ }), t.__c && t.__c.__P === e && (t.__e && n.insertBefore(t.__e, t.__d), t.__c.__e = !0, t.__c.__P = n)), t;
1729
+ }
1730
+ function te() {
1731
+ this.__u = 0, this.t = null, this.__b = null;
1732
+ }
1733
+ function po(t) {
1734
+ var e = t.__.__c;
1735
+ return e && e.__a && e.__a(t);
1736
+ }
1737
+ function fo(t) {
1738
+ var e, n, i;
1739
+ function a(o) {
1740
+ if (e || (e = t()).then(function(r) {
1741
+ n = r.default || r;
1742
+ }, function(r) {
1743
+ i = r;
1744
+ }), i) throw i;
1745
+ if (!n) throw e;
1746
+ return ot(n, o);
1747
+ }
1748
+ return a.displayName = "Lazy", a.__f = !0, a;
1749
+ }
1750
+ function Jt() {
1751
+ this.u = null, this.o = null;
1752
+ }
1753
+ m.unmount = function(t) {
1754
+ var e = t.__c;
1755
+ e && e.__R && e.__R(), e && t.__h === !0 && (t.type = null), Bi && Bi(t);
1756
+ }, (te.prototype = new ct()).__c = function(t, e) {
1757
+ var n = e.__c, i = this;
1758
+ i.t == null && (i.t = []), i.t.push(n);
1759
+ var a = po(i.__v), o = !1, r = function() {
1760
+ o || (o = !0, n.__R = null, a ? a(s) : s());
1761
+ };
1762
+ n.__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] = uo(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 n = document.createElement("div"), i = this.__v.__k[0].__c;
1780
+ this.__v.__k[0] = co(this.__b, n, i.__O = i.__P);
1781
+ }
1782
+ this.__b = null;
1783
+ }
1784
+ var a = e.__a && ot(dt, null, t.fallback);
1785
+ return a && (a.__h = null), [ot(dt, null, e.__a ? null : t.children), a];
1786
+ };
1787
+ var Fi = function(t, e, n) {
1788
+ if (++n[1] === n[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size)) for (n = t.u; n; ) {
1789
+ for (; n.length > 3; ) n.pop()();
1790
+ if (n[1] < n[0]) break;
1791
+ t.u = n = n[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, n = t.i;
1801
+ e.componentWillUnmount = function() {
1802
+ jt(null, e.l), e.l = null, e.i = null;
1803
+ }, e.i && e.i !== n && e.componentWillUnmount(), t.__v ? (e.l || (e.i = n, e.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(i) {
1804
+ this.childNodes.push(i), e.i.appendChild(i);
1805
+ }, insertBefore: function(i, a) {
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(ot(Us, { context: e.context }, t.__v), e.l)) : e.l && e.componentWillUnmount();
1810
+ }
1811
+ function Ks(t, e) {
1812
+ var n = ot(Vs, { __v: t, i: e });
1813
+ return n.containerInfo = e, n;
1814
+ }
1815
+ (Jt.prototype = new ct()).__a = function(t) {
1816
+ var e = this, n = po(e.__v), i = e.o.get(t);
1817
+ return i[0]++, function(a) {
1818
+ var o = function() {
1819
+ e.props.revealOrder ? (i.push(a), Fi(e, t, i)) : a();
1820
+ };
1821
+ n ? n(o) : o();
1822
+ };
1823
+ }, Jt.prototype.render = function(t) {
1824
+ this.u = null, this.o = /* @__PURE__ */ new Map();
1825
+ var e = vt(t.children);
1826
+ t.revealOrder && t.revealOrder[0] === "b" && e.reverse();
1827
+ for (var n = e.length; n--; ) this.o.set(e[n], 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, n) {
1832
+ Fi(t, n, e);
1833
+ });
1834
+ };
1835
+ var ho = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, Ys = /^(?: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, Zs = typeof document < "u", Xs = 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, n) {
1839
+ return e.__k == null && (e.textContent = ""), jt(t, e), typeof n == "function" && n(), t ? t.__c : null;
1840
+ }
1841
+ function tl(t, e, n) {
1842
+ return za(t, e), typeof n == "function" && n(), 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 Hi = m.event;
1852
+ function el() {
1853
+ }
1854
+ function nl() {
1855
+ return this.cancelBubble;
1856
+ }
1857
+ function il() {
1858
+ return this.defaultPrevented;
1859
+ }
1860
+ m.event = function(t) {
1861
+ return Hi && (t = Hi(t)), t.persist = el, t.isPropagationStopped = nl, t.isDefaultPrevented = il, t.nativeEvent = t;
1862
+ };
1863
+ var Xn, al = { enumerable: !1, configurable: !0, get: function() {
1864
+ return this.class;
1865
+ } }, Wi = m.vnode;
1866
+ m.vnode = function(t) {
1867
+ typeof t.type == "string" && (function(e) {
1868
+ var n = e.props, i = e.type, a = {};
1869
+ for (var o in n) {
1870
+ var r = n[o];
1871
+ if (!(o === "value" && "defaultValue" in n && r == null || Zs && o === "children" && i === "noscript" || o === "class" || o === "className")) {
1872
+ var s = o.toLowerCase();
1873
+ o === "defaultValue" && "value" in n && n.value == null ? o = "value" : o === "download" && r === !0 ? r = "" : s === "ondoubleclick" ? o = "ondblclick" : s !== "onchange" || i !== "input" && i !== "textarea" || Xs(n.type) ? s === "onfocus" ? o = "onfocusin" : s === "onblur" ? o = "onfocusout" : Js.test(o) ? o = s : i.indexOf("-") === -1 && Ys.test(o) ? o = o.replace(Gs, "-$&").toLowerCase() : r === null && (r = void 0) : s = o = "oninput", s === "oninput" && a[o = s] && (o = "oninputCapture"), a[o] = r;
1874
+ }
1875
+ }
1876
+ i == "select" && a.multiple && Array.isArray(a.value) && (a.value = vt(n.children).forEach(function(l) {
1877
+ l.props.selected = a.value.indexOf(l.props.value) != -1;
1878
+ })), i == "select" && a.defaultValue != null && (a.value = vt(n.children).forEach(function(l) {
1879
+ l.props.selected = a.multiple ? a.defaultValue.indexOf(l.props.value) != -1 : a.defaultValue == l.props.value;
1880
+ })), n.class && !n.className ? (a.class = n.class, Object.defineProperty(a, "className", al)) : (n.className && !n.class || n.class && n.className) && (a.class = a.className = n.className), e.props = a;
1881
+ })(t), t.$$typeof = ho, Wi && Wi(t);
1882
+ };
1883
+ var zi = m.__r;
1884
+ m.__r = function(t) {
1885
+ zi && zi(t), Xn = t.__c;
1886
+ };
1887
+ var qi = m.diffed;
1888
+ m.diffed = function(t) {
1889
+ qi && qi(t);
1890
+ var e = t.props, n = t.__e;
1891
+ n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), Xn = null;
1892
+ };
1893
+ var ol = { ReactCurrentDispatcher: { current: { readContext: function(t) {
1894
+ return Xn.__n[t.__c].props.value;
1895
+ } } } };
1896
+ function rl(t) {
1897
+ return ot.bind(null, t);
1898
+ }
1899
+ function bo(t) {
1900
+ return !!t && t.$$typeof === ho;
1901
+ }
1902
+ function sl(t) {
1903
+ return bo(t) ? fs.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 go(t) {
1917
+ t();
1918
+ }
1919
+ function fl(t) {
1920
+ return t;
1921
+ }
1922
+ function hl() {
1923
+ return [!1, go];
1924
+ }
1925
+ var bl = Wt;
1926
+ function gl(t, e) {
1927
+ var n = e(), i = Va({ h: { __: n, v: e } }), a = i[0].h, o = i[1];
1928
+ return Wt(function() {
1929
+ a.__ = n, a.v = e, Ue(a.__, e()) || o({ h: a });
1930
+ }, [t, n, e]), qn(function() {
1931
+ return Ue(a.__, a.v()) || o({ h: a }), t(function() {
1932
+ Ue(a.__, a.v()) || o({ h: a });
1933
+ });
1934
+ }, [t]), n;
1935
+ }
1936
+ var Ed = { useState: Va, useId: ws, useReducer: Ka, useEffect: qn, useLayoutEffect: Wt, useInsertionEffect: bl, useTransition: hl, useDeferredValue: fl, useSyncExternalStore: gl, startTransition: go, useRef: Ft, useImperativeHandle: hs, useMemo: Ot, useCallback: bs, useContext: Ya, useDebugValue: gs, version: "17.0.2", Children: zs, render: Qs, hydrate: tl, unmountComponentAtNode: ll, createPortal: Ks, createElement: ot, createContext: qa, createFactory: rl, cloneElement: sl, createRef: ls, Fragment: dt, isValidElement: bo, findDOMNode: cl, Component: ct, PureComponent: bn, memo: Fs, forwardRef: Ws, flushSync: ul, unstable_batchedUpdates: dl, StrictMode: pl, Suspense: te, SuspenseList: Jt, lazy: fo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ol }, wl = ["other", "few", "many", "two", "one", "zero"], Ui = ({
1937
+ terms: t,
1938
+ overrides: e,
1939
+ locale: n
1940
+ }) => {
1941
+ const i = new Intl.PluralRules(n);
1942
+ function a(o, r) {
1943
+ const s = (e == null ? void 0 : e[o]) ?? t[o];
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 “${o.toString()}”`);
1953
+ let l = i.select(r.count);
1954
+ if (!(l in s)) {
1955
+ const c = wl.find((u) => u in s);
1956
+ if (!c)
1957
+ throw new Error(`Missing plural rule for translation key “${o.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 “${o.toString()}”.`);
1967
+ }
1968
+ }
1969
+ return a;
1970
+ }, Vi = qa(null), wo = (t) => ({
1971
+ defaultTerms: t,
1972
+ TranslationProvider: ({ terms: e, children: n, locale: i }) => {
1973
+ const a = Ot(() => Ui({ locale: i, terms: t, overrides: e }), [e, i]);
1974
+ return /* @__PURE__ */ w(Vi.Provider, { value: { t: a, locale: i }, children: n });
1975
+ },
1976
+ useTranslation: () => {
1977
+ const e = Ya(Vi);
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: n
1985
+ }) => Ui({ terms: t, overrides: e, locale: n })
1986
+ }), ml = { 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: vl } = wo({ 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 } = wo({
1988
+ ...vl,
1989
+ ...ml,
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 mo(t, e) {
2008
+ if (!t)
2009
+ throw new Error(e);
2010
+ }
2011
+ var gn = (t) => t === null || typeof t != "object" ? t : Array.isArray(t) ? t.map(gn) : Object.keys(t).sort().reduce((e, n) => (e[n] = gn(t[n]), e), {}), yl = (t) => {
2012
+ let e = JSON.stringify(gn(t)), n = 5381;
2013
+ for (let i = 0; i < e.length; i++) n = n * 33 ^ e.charCodeAt(i);
2014
+ return (n >>> 0).toString(36);
2015
+ };
2016
+ const wn = (t, e) => e.some((n) => t instanceof n);
2017
+ let Ki, Yi;
2018
+ function xl() {
2019
+ return Ki || (Ki = [
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 mn = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap();
2035
+ function $l(t) {
2036
+ const e = new Promise((n, i) => {
2037
+ const a = () => {
2038
+ t.removeEventListener("success", o), t.removeEventListener("error", r);
2039
+ }, o = () => {
2040
+ n(Mt(t.result)), a();
2041
+ }, r = () => {
2042
+ i(t.error), a();
2043
+ };
2044
+ t.addEventListener("success", o), t.addEventListener("error", r);
2045
+ });
2046
+ return Pe.set(e, t), e;
2047
+ }
2048
+ function Sl(t) {
2049
+ if (mn.has(t))
2050
+ return;
2051
+ const e = new Promise((n, i) => {
2052
+ const a = () => {
2053
+ t.removeEventListener("complete", o), t.removeEventListener("error", r), t.removeEventListener("abort", r);
2054
+ }, o = () => {
2055
+ n(), a();
2056
+ }, r = () => {
2057
+ i(t.error || new DOMException("AbortError", "AbortError")), a();
2058
+ };
2059
+ t.addEventListener("complete", o), t.addEventListener("error", r), t.addEventListener("abort", r);
2060
+ });
2061
+ mn.set(t, e);
2062
+ }
2063
+ let vn = {
2064
+ get(t, e, n) {
2065
+ if (t instanceof IDBTransaction) {
2066
+ if (e === "done")
2067
+ return mn.get(t);
2068
+ if (e === "store")
2069
+ return n.objectStoreNames[1] ? void 0 : n.objectStore(n.objectStoreNames[0]);
2070
+ }
2071
+ return Mt(t[e]);
2072
+ },
2073
+ set(t, e, n) {
2074
+ return t[e] = n, !0;
2075
+ },
2076
+ has(t, e) {
2077
+ return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
2078
+ }
2079
+ };
2080
+ function vo(t) {
2081
+ vn = t(vn);
2082
+ }
2083
+ function El(t) {
2084
+ return kl().includes(t) ? function(...e) {
2085
+ return t.apply(_n(this), e), Mt(this.request);
2086
+ } : function(...e) {
2087
+ return Mt(t.apply(_n(this), e));
2088
+ };
2089
+ }
2090
+ function Cl(t) {
2091
+ return typeof t == "function" ? El(t) : (t instanceof IDBTransaction && Sl(t), wn(t, xl()) ? new Proxy(t, vn) : 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 _n = (t) => Pe.get(t);
2102
+ function Il(t, e, { blocked: n, upgrade: i, blocking: a, terminated: o } = {}) {
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
+ }), n && r.addEventListener("blocked", (l) => n(
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
+ o && l.addEventListener("close", () => o()), a && l.addEventListener("versionchange", (c) => a(c.oldVersion, c.newVersion, c));
2113
+ }).catch(() => {
2114
+ }), s;
2115
+ }
2116
+ const Al = ["get", "getKey", "getAll", "getAllKeys", "count"], Tl = ["put", "add", "delete", "clear"], Ke = /* @__PURE__ */ new Map();
2117
+ function Ji(t, e) {
2118
+ if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
2119
+ return;
2120
+ if (Ke.get(e))
2121
+ return Ke.get(e);
2122
+ const n = e.replace(/FromIndex$/, ""), i = e !== n, a = Tl.includes(n);
2123
+ if (
2124
+ // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
2125
+ !(n in (i ? IDBIndex : IDBObjectStore).prototype) || !(a || Al.includes(n))
2126
+ )
2127
+ return;
2128
+ const o = async function(r, ...s) {
2129
+ const l = this.transaction(r, a ? "readwrite" : "readonly");
2130
+ let c = l.store;
2131
+ return i && (c = c.index(s.shift())), (await Promise.all([
2132
+ c[n](...s),
2133
+ a && l.done
2134
+ ]))[0];
2135
+ };
2136
+ return Ke.set(e, o), o;
2137
+ }
2138
+ vo((t) => ({
2139
+ ...t,
2140
+ get: (e, n, i) => Ji(e, n) || t.get(e, n, i),
2141
+ has: (e, n) => !!Ji(e, n) || t.has(e, n)
2142
+ }));
2143
+ const Ml = ["continue", "continuePrimaryKey", "advance"], Gi = {}, yn = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), jl = {
2144
+ get(t, e) {
2145
+ if (!Ml.includes(e))
2146
+ return t[e];
2147
+ let n = Gi[e];
2148
+ return n || (n = Gi[e] = function(...i) {
2149
+ yn.set(this, _o.get(this)[e](...i));
2150
+ }), n;
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 n = new Proxy(e, jl);
2159
+ for (_o.set(n, e), Pe.set(n, _n(e)); e; )
2160
+ yield n, e = await (yn.get(n) || e.continue()), yn.delete(n);
2161
+ }
2162
+ function Zi(t, e) {
2163
+ return e === Symbol.asyncIterator && wn(t, [IDBIndex, IDBObjectStore, IDBCursor]) || e === "iterate" && wn(t, [IDBIndex, IDBObjectStore]);
2164
+ }
2165
+ vo((t) => ({
2166
+ ...t,
2167
+ get(e, n, i) {
2168
+ return Zi(e, n) ? Ol : t.get(e, n, i);
2169
+ },
2170
+ has(e, n) {
2171
+ return Zi(e, n) || t.has(e, n);
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 xn = async (t) => {
2185
+ if (typeof indexedDB > "u") return;
2186
+ const e = ue ?? (ue = Xi());
2187
+ try {
2188
+ return await t(await e);
2189
+ } catch (n) {
2190
+ if (!(n instanceof Error && n.name === "InvalidStateError")) throw n;
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: n, ...i } = e;
2198
+ return i;
2199
+ })
2200
+ });
2201
+ let ge, Ye, Yt;
2202
+ const Qi = () => {
2203
+ if (!ge) return Yt;
2204
+ const t = ge;
2205
+ ge = void 0;
2206
+ const e = Ie(t), n = xn((i) => i.put("state", Dl(t.data), e)).finally(() => {
2207
+ Yt === n && (Yt = void 0);
2208
+ });
2209
+ return Yt = n, Yt;
2210
+ }, Q = {
2211
+ getStateData: async (t, e, n) => {
2212
+ const i = Ie({ ...t, flowKeys: e, context: n });
2213
+ return xn((a) => a.get("state", i));
2214
+ },
2215
+ /** Every application saved in this browser, whatever its job or flow. */
2216
+ getAllStateData: async () => await xn((t) => t.getAll("state")) ?? [],
2217
+ setStateData: (t) => {
2218
+ ge = t, clearTimeout(Ye), Ye = setTimeout(() => {
2219
+ Qi();
2220
+ }, 1e3);
2221
+ },
2222
+ flushStateData: () => (clearTimeout(Ye), Qi() ?? 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), ta = () => ({
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
+ Jn(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
+ ), we = (t, e, n, i = 0) => {
2246
+ if (!e.nextId)
2247
+ return n(e.id, { stepsMade: i, remainingSteps: 0 }), { stepsMade: i, remainingSteps: 0 };
2248
+ const a = t.find((c) => c.id === e.nextId);
2249
+ if (a === void 0)
2250
+ return { stepsMade: i, remainingSteps: 0 };
2251
+ const o = e.type === "if-block" ? e.branchId : void 0, r = t.find((c) => c.id === o), s = e.type.includes("question") ? 1 : 0;
2252
+ if (r) {
2253
+ const c = s + Math.max(
2254
+ we(t, a, n, i + s).remainingSteps,
2255
+ we(t, r, n, i + s).remainingSteps
2256
+ );
2257
+ return n(e.id, { stepsMade: i, remainingSteps: c }), { stepsMade: i, remainingSteps: c };
2258
+ }
2259
+ const l = s + we(t, a, n, i + s).remainingSteps;
2260
+ return n(e.id, { stepsMade: i, remainingSteps: l }), { stepsMade: i, remainingSteps: l };
2261
+ }, Ll = (t) => {
2262
+ const e = {}, n = t.find((i) => i.isHead);
2263
+ return n && we(t, n, (i, a) => {
2264
+ e[i] = a;
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 n = 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 && !n && ya(e, t.submissions);
2269
+ }, ea = ({ data: t, nodes: e }) => {
2270
+ var n;
2271
+ return !t.isFinished && ((((n = t.startedWriteNodeIds) == null ? void 0 : n.length) ?? 0) > 0 || ya(e, t.submissions));
2272
+ }, gt = st({ state: "idle" }), Je = /* @__PURE__ */ new Set(), Ct = (t) => {
2273
+ const { state: e, flow: n } = gt.value;
2274
+ if (e !== "loaded") return;
2275
+ mo(n, "No flow to update");
2276
+ const i = t(n.data);
2277
+ n.data = i, gt.value = { state: e, flow: n }, Q.setStateData(n);
2278
+ }, M = {
2279
+ current$: gt,
2280
+ viewState$: st("closed"),
2281
+ prepareFlow: async ({
2282
+ jobAlerts: t,
2283
+ flow: e,
2284
+ context: n = {},
2285
+ jobContext: i,
2286
+ flowKeys: a,
2287
+ title: o,
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, a, n), d = u ?? ta(), p = Ie({ ...e, flowKeys: a, context: n }), h = u !== void 0 && !Je.has(p) && Nl({ data: d, nodes: e.nodes });
2296
+ return h || Je.add(p), {
2297
+ jobAlerts: t,
2298
+ data: d,
2299
+ offerResume: h,
2300
+ startedAt: /* @__PURE__ */ new Date(),
2301
+ nodeIdToProgress: Ll(e.nodes),
2302
+ flowKeys: a,
2303
+ id: e.id,
2304
+ version: e.version,
2305
+ nodes: e.nodes,
2306
+ build: e.build,
2307
+ context: i === void 0 ? n : Hn(i, n),
2308
+ hostContext: i === void 0 ? void 0 : n,
2309
+ title: o,
2310
+ analytics: r,
2311
+ job: s,
2312
+ employer: l,
2313
+ locationOrigin: c
2314
+ };
2315
+ },
2316
+ commitFlow: (t) => {
2317
+ gt.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
+ gt.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 } = gt.value;
2334
+ if (t !== "loaded") throw new Error("Flow cannot be restarted: not in valid state");
2335
+ const n = {
2336
+ ...ta(),
2337
+ failedAttemptAt: e.data.failedAttemptAt,
2338
+ unconfirmedAttemptKeys: e.data.unconfirmedAttemptKeys,
2339
+ submitCooldown: e.data.submitCooldown
2340
+ }, i = { ...e, data: n, startedAt: /* @__PURE__ */ new Date(), offerResume: !1 };
2341
+ gt.value = { state: t, flow: i }, Q.setStateData(i);
2342
+ },
2343
+ addMessage: (t, e) => {
2344
+ const n = { ...t, groupId: e };
2345
+ return Ct((i) => (i.messages.push(n), 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: n } = gt.value;
2350
+ mo(e === "loaded", "Application not loaded");
2351
+ const i = n.data.messages.filter((a) => !a.groupId || !t.includes(a.groupId));
2352
+ n.data.messages = i, Q.setStateData(n);
2353
+ },
2354
+ setSubmission: (t, e) => Ct((n) => (e === null ? delete n.submissions[t] : n.submissions[t] = e, n)),
2355
+ setInput: (t) => Ct((e) => ({ ...e, currentInput: t ?? null })),
2356
+ persistWriteBarrier: async (t) => {
2357
+ gt.peek().flow === t && (gt.value = { state: "loaded", flow: t }), Q.setStateData(t), await Q.flushStateData();
2358
+ }
2359
+ }, na = ({ heading: t }) => {
2360
+ const { t: e } = De();
2361
+ return /* @__PURE__ */ w("div", { class: "flex flex-grow flex-col items-center justify-center", children: [
2362
+ /* @__PURE__ */ w(
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__ */ w("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__ */ w("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__ */ w("line", { x1: "36.7", y1: "39.3", x2: "44.8", y2: "47.4" }),
2376
+ /* @__PURE__ */ w("line", { x1: "52.2", y1: "39.3", x2: "60.3", y2: "47.4" }),
2377
+ /* @__PURE__ */ w("line", { x1: "44.7", y1: "39.2", x2: "36.6", y2: "47.3" }),
2378
+ /* @__PURE__ */ w("line", { x1: "60.2", y1: "39.2", x2: "52.1", y2: "47.3" }),
2379
+ /* @__PURE__ */ w("path", { d: "M38 56h19" })
2380
+ ]
2381
+ }
2382
+ ),
2383
+ /* @__PURE__ */ w("div", { class: "flex flex-col gap-2 text-center", children: /* @__PURE__ */ w("p", { class: "text-error-11 font-bold", children: e(t) }) })
2384
+ ] });
2385
+ }, Rl = (t) => {
2386
+ const { t: e } = De();
2387
+ return /* @__PURE__ */ w("svg", { role: "img", viewBox: "0 0 24 24", ...t, children: [
2388
+ /* @__PURE__ */ w("title", { children: e("loading") }),
2389
+ /* @__PURE__ */ w("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__ */ w("g", { id: "s1", transform: "translate(12,0)", children: /* @__PURE__ */ w("g", { id: "s2", transform: "scale(0,0)", children: /* @__PURE__ */ w("circle", { r: "6.5", transform: "translate(0,0)", fill: "currentColor" }) }) }),
2391
+ /* @__PURE__ */ w("g", { id: "s3", transform: "translate(12,12)", children: /* @__PURE__ */ w("g", { id: "s4", transform: "scale(1,1)", children: /* @__PURE__ */ w("circle", { r: "6.5", transform: "translate(0,0)", fill: "currentColor" }) }) }),
2392
+ /* @__PURE__ */ w("g", { id: "s5", transform: "translate(12,0)", children: /* @__PURE__ */ w("g", { id: "s6", transform: "scale(0,0)", children: /* @__PURE__ */ w(
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__ */ w("g", { id: "s7", transform: "translate(12,0)", children: /* @__PURE__ */ w("g", { id: "s8", transform: "scale(0,0)", children: /* @__PURE__ */ w(
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
+ }, ia = () => /* @__PURE__ */ w("div", { class: "flex flex-grow flex-col items-center justify-center", children: /* @__PURE__ */ w(Rl, { class: "text-neutral-6 h-8 w-8" }) }), Bl = (t) => {
2412
+ const n = t / 100, i = 1.3;
2413
+ return t < 0 ? "0%" : t > 100 ? "100%" : `${Math.round((1 - (1 - 0.1) * Math.pow(1 - n, i)) * 100)}%`;
2414
+ }, Fl = Zn("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
+ }), kn = ({
2425
+ class: t,
2426
+ children: e,
2427
+ variant: n,
2428
+ ...i
2429
+ }) => /* @__PURE__ */ w("button", { class: Gn(Fl({ variant: n }), t), ...i, children: /* @__PURE__ */ w(
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
+ ) }), Hl = () => /* @__PURE__ */ w("path", { d: "M12.5 6.5L8 11L3.5 6.5" }), Wl = () => {
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 n = t[e];
2448
+ if (n === void 0) return null;
2449
+ const i = 100 * (n.stepsMade / (n.remainingSteps + n.stepsMade));
2450
+ return /* @__PURE__ */ w("div", { class: "bg-accent-3", children: /* @__PURE__ */ w(
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
+ }, zl = ({
2458
+ children: t,
2459
+ params: e,
2460
+ analytics: n,
2461
+ feedbackReady: i
2462
+ }) => {
2463
+ const { t: a } = De(), o = M.viewState$, r = !!e.feedback && M.current$.value.state === "loaded" && o.value === "maximised", s = r && i.value, l = Ft(!1);
2464
+ return qn(() => {
2465
+ var c, u;
2466
+ !s || l.current || (l.current = !0, n.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, n]), /* @__PURE__ */ w(dt, { children: /* @__PURE__ */ w("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__ */ w("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__ */ w("p", { id: "chatbot-status-bar", class: "sr-only", children: t }),
2474
+ /* @__PURE__ */ w(
2475
+ "button",
2476
+ {
2477
+ "aria-label": a("minimize"),
2478
+ onClick: () => {
2479
+ o.value = "minimised";
2480
+ },
2481
+ class: "view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",
2482
+ onTouchStart: $n,
2483
+ children: /* @__PURE__ */ w("p", { "aria-hidden": !0, class: "text-neutral-12 truncate text-sm font-bold tracking-tight", children: t })
2484
+ }
2485
+ ),
2486
+ /* @__PURE__ */ w("div", { class: "flex flex-shrink-0 items-center gap-3 p-1.5", children: [
2487
+ e.feedback ? /* @__PURE__ */ w("div", { "data-widget": "inploi-feedback", "data-key": "chatbot-header", class: Gn({ hidden: !r }), children: /* @__PURE__ */ w("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__ */ w(
2489
+ kn,
2490
+ {
2491
+ class: "mx-1",
2492
+ "aria-label": a("restart"),
2493
+ onClick: () => {
2494
+ M.restart();
2495
+ },
2496
+ children: [
2497
+ /* @__PURE__ */ w("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__ */ w("path", { d: "M8 7L10 4.5L8 2.5" })
2499
+ ]
2500
+ },
2501
+ "restart"
2502
+ ),
2503
+ /* @__PURE__ */ w(
2504
+ kn,
2505
+ {
2506
+ class: "view-switch mx-1",
2507
+ onTouchStart: $n,
2508
+ "aria-label": a("minimize"),
2509
+ onClick: () => o.value = "minimised",
2510
+ children: /* @__PURE__ */ w(Hl, {})
2511
+ },
2512
+ "minmax"
2513
+ )
2514
+ ] })
2515
+ ] }),
2516
+ /* @__PURE__ */ w(Wl, {})
2517
+ ] }) });
2518
+ };
2519
+ function $n() {
2520
+ }
2521
+ const ql = fo(() => import("./chatbot-body-P5Ibik_l.js").then((t) => t.ChatbotBody)), yo = Zn(
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
+ ), xo = Zn("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 n = Ft(null);
2542
+ return Wt(() => {
2543
+ const i = n.current;
2544
+ i && (t ? i.showModal() : i.close());
2545
+ }, [t]), /* @__PURE__ */ w("dialog", { ref: n, ...e });
2546
+ }, Vl = ({
2547
+ env: t,
2548
+ logger: e,
2549
+ apiClient: n,
2550
+ rpcClient: i,
2551
+ analytics: a,
2552
+ talentBankClient: o,
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), h = c ? [...c.data.nodeHistory].reverse().map((f) => c.nodes.find((b) => b.id === f)).find((f) => (f == null ? void 0 : f.type) === "flow-section") : void 0;
2557
+ return /* @__PURE__ */ w(_l, { terms: r.terms, locale: void 0, children: [
2558
+ /* @__PURE__ */ w(Ul, { open: d, onClose: () => M.viewState$.value = "minimised", children: /* @__PURE__ */ w(
2559
+ "div",
2560
+ {
2561
+ ref: p,
2562
+ "aria-modal": "true",
2563
+ role: "dialog",
2564
+ "aria-labelledby": "chatbot-status-bar",
2565
+ class: yo({ view: "maximised" }),
2566
+ children: /* @__PURE__ */ w("div", { class: xo({ view: "maximised" }), children: [
2567
+ /* @__PURE__ */ w(zl, { params: r, analytics: a, feedbackReady: s, children: h ? /* @__PURE__ */ w(dt, { children: [
2568
+ /* @__PURE__ */ w("span", { class: "block", children: h.data.title }),
2569
+ /* @__PURE__ */ w("span", { class: "block truncate text-xs font-normal", children: c == null ? void 0 : c.title })
2570
+ ] }) : c == null ? void 0 : c.title }),
2571
+ Jn({ state: l, view: u }).with({ state: "idle" }, () => null).with({ state: "loading" }, () => /* @__PURE__ */ w(ia, {}, "loading")).with({ state: "loaded" }, () => /* @__PURE__ */ w(te, { fallback: /* @__PURE__ */ w(ia, {}, "loading"), children: /* @__PURE__ */ w(
2572
+ ql,
2573
+ {
2574
+ env: t,
2575
+ rpcClient: i,
2576
+ analytics: a,
2577
+ apiClient: n,
2578
+ logger: e,
2579
+ talentBankClient: o
2580
+ }
2581
+ ) })).with({ state: "closed" }, () => /* @__PURE__ */ w(na, { heading: "flow_closed" })).with({ state: "error" }, () => /* @__PURE__ */ w(na, { heading: "error_heading" })).exhaustive()
2582
+ ] })
2583
+ }
2584
+ ) }),
2585
+ u === "minimised" ? /* @__PURE__ */ w(Kl, { flow: c }) : null
2586
+ ] });
2587
+ }, Kl = ({ flow: t }) => {
2588
+ const { t: e } = De();
2589
+ return /* @__PURE__ */ w("div", { class: yo({ view: "minimised", class: "z-100 isolate" }), children: /* @__PURE__ */ w("div", { class: xo({ view: "minimised" }), children: [
2590
+ /* @__PURE__ */ w(
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: $n,
2598
+ children: /* @__PURE__ */ w("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__ */ w("div", { class: "flex items-center px-0.5", children: /* @__PURE__ */ w(
2602
+ kn,
2603
+ {
2604
+ class: "mx-1",
2605
+ "aria-label": e("close_application"),
2606
+ onClick: M.cancelCurrentFlow,
2607
+ variant: "white",
2608
+ children: /* @__PURE__ */ w("path", { d: "M12 12L4 4M12 4L4 12" })
2609
+ },
2610
+ "close"
2611
+ ) })
2612
+ ] }) });
2613
+ }, ko = "14.19.1", Yl = (t, e = ko) => e === void 0 ? t : {
2614
+ fetch: (n, i) => {
2615
+ if (n !== "/flow/submit") return t.fetch(n, i);
2616
+ const a = new Headers(i == null ? void 0 : i.headers);
2617
+ return a.set("x-inploi-widget-version", e), t.fetch(n, { ...i, headers: Object.fromEntries(a.entries()) });
2618
+ }
2619
+ };
2620
+ let ee, $o, me;
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
+ }, So = (t, e, n) => {
2625
+ const i = er(t, e ?? `
2626
+ `, n);
2627
+ return { ...i, stack: i.stack.filter((a) => a.startsWith("index.js:")) };
2628
+ }, Sn = (t) => So(t, me), Eo = (t) => typeof t == "object" && t !== null && "status" in t && typeof t.status == "number" ? t.status : void 0, Nt = (t, e, n = {}) => ee == null ? void 0 : ee.send(t, e, { ...n, message: "Chatbot widget beacon", widget: "chatbot", key_hash: $o }), Gl = (t) => {
2629
+ const e = (n, i, a) => {
2630
+ if (M.viewState$.value === "closed") return;
2631
+ const o = So(i, t, a);
2632
+ o.stack.length && Nt("fatal", Te(i), { phase: "render", error: { ...o, via: n } });
2633
+ };
2634
+ window.addEventListener("error", (n) => {
2635
+ Xo(n) || e("error", n.error, n.message);
2636
+ }), window.addEventListener("unhandledrejection", (n) => e("rejection", n.reason));
2637
+ }, Zl = (t, e, n = import.meta.url) => {
2638
+ const i = ir();
2639
+ ee || !i || !t || ($o = e ? fa(e).toString(36) : void 0, ee = pr({ config: i, version: ko, env: t, seed: ar(nr(), No) }), me = Jl(n), me && Gl(me));
2640
+ }, Xl = (t) => {
2641
+ let e = { application: void 0, attempts: 0, blocked: !1 };
2642
+ return {
2643
+ fetch: async (n, i) => {
2644
+ if (n !== "/flow/submit") return t.fetch(n, i);
2645
+ const a = M.current$.value.flow;
2646
+ a !== e.application && (e = { application: a, attempts: 0, blocked: !1 });
2647
+ const o = e, r = ++o.attempts, s = performance.now(), l = await t.fetch(n, i).catch((c) => {
2648
+ throw Eo(c) === void 0 && !(c instanceof Error && c.name === "AbortError") && (o.blocked = !0, Nt("submit_blocked", Te(c), {
2649
+ phase: "submit",
2650
+ error: Sn(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 o.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] .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] .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{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .hidden{display:none}[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-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] .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-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-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,[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow{flex-grow:1}[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] .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{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-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] .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-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-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-\\[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] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[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] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[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-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-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-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] .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] .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] .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] .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] .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] .\\[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] .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] .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\\: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\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[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\\: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}@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}}', Co = "inploi-chatbot", En = `[data-widget='${Co}']`, tc = () => ({
2661
+ getChatbotElement: () => document.querySelector(En),
2662
+ getOrCreateChatbotElement: () => {
2663
+ const t = document.querySelector(En);
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 = Co, e;
2668
+ }
2669
+ });
2670
+ var ec = "9.15.0", Io = `https://sdk.inploi.com/@inploi/flows@${ec}/cdn/captcha/index.html`, nc = new URL(Io).origin, aa = 3e4, ic = 5 * 6e4, ac = (t) => typeof t == "object" && t !== null && t.source === "inploi-captcha", Ge = /* @__PURE__ */ new WeakMap(), oc = (t) => {
2671
+ let e = Ge.get(t);
2672
+ return e || (e = t.fetch("/flow/captcha").then((n) => {
2673
+ let i = n == null ? void 0 : n.site_key;
2674
+ return typeof i == "string" && i !== "" ? i : void 0;
2675
+ }).catch((n) => {
2676
+ throw Ge.delete(t), n;
2677
+ }), Ge.set(t, e)), e;
2678
+ }, rc = (t, e = {}) => new Promise((n, i) => {
2679
+ let { signal: a, container: o = null, theme: r, onInteractive: s } = e instanceof AbortSignal ? { signal: e } : e, l = !1, c = () => {
2680
+ }, u = (b) => {
2681
+ l || (l = !0, clearTimeout(h), a == null || a.removeEventListener("abort", p), c(), b());
2682
+ }, d = (b) => u(() => i(new Error(b))), p = () => d("Captcha aborted"), h, f = (b) => {
2683
+ clearTimeout(h), h = setTimeout(() => d("Captcha timed out"), b);
2684
+ };
2685
+ if (f(aa), a == null ? void 0 : a.aborted) return p();
2686
+ a == null || a.addEventListener("abort", p), (async () => {
2687
+ let b = await oc(t);
2688
+ if (b === void 0) return u(() => n(void 0));
2689
+ if (l) return;
2690
+ let v = document.createElement("iframe");
2691
+ v.src = `${Io}?${new URLSearchParams({ sitekey: b, origin: window.location.origin, ...r && { theme: r } }).toString()}`, v.title = "Cloudflare security check", v.style.cssText = `display:block;border:0;width:${o ? "100%" : "300px"};height:0;color-scheme:normal`, o ? o.appendChild(v) : (v.style.cssText += ";position:fixed;bottom:16px;right:16px;z-index:2147483647", document.body.appendChild(v));
2692
+ let k = !1, y = (O) => {
2693
+ if (!v.contentWindow || O.source !== v.contentWindow || O.origin !== nc || !ac(O.data)) return;
2694
+ let C = O.data;
2695
+ switch (C.type) {
2696
+ case "token":
2697
+ return u(() => n(C.token));
2698
+ case "resize":
2699
+ v.style.height = `${Math.max(0, Math.ceil(C.height))}px`;
2700
+ return;
2701
+ case "before-interactive":
2702
+ return k = !0, f(ic), s == null ? void 0 : s();
2703
+ case "after-interactive":
2704
+ return k = !1, f(aa);
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), v.remove();
2716
+ };
2717
+ })().catch((b) => u(() => i(b)));
2718
+ }), oa = ({ condition: t, context: e, submissions: n, ifBlock: i }) => {
2719
+ let [a, ...o] = t.compareKey.split(".");
2720
+ if (!a) return !1;
2721
+ let r = xa({ context: e, key: a, path: o, submissions: n });
2722
+ if (!r) return !1;
2723
+ switch (r.type) {
2724
+ case "address": {
2725
+ let s = ne(r.value, o);
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 = ne(r.value, o), 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: n }) => {
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 a of i) if (oa({ condition: a, context: e, submissions: n, ifBlock: t })) return !0;
2817
+ return !1;
2818
+ } else {
2819
+ for (let a of i) if (!oa({ condition: a, context: e, submissions: n, ifBlock: t })) return !1;
2820
+ return !0;
2821
+ }
2822
+ }, sc = /{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g, lc = (t, { context: e, submissions: n }) => t.replace(sc, (i, a, o = "") => {
2823
+ let [r, ...s] = a.trim().split("."), l = xa({ key: r, path: s, submissions: n, context: e });
2824
+ if (!l) return o;
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() : o;
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 = ne(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 o;
2856
+ });
2857
+ function cc(t) {
2858
+ return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
2859
+ }
2860
+ function Qn(t, e, n = "") {
2861
+ const i = cc(t), a = t == null ? void 0 : t.length;
2862
+ if (!i || e !== void 0) {
2863
+ const r = n && `"${n}" `, s = "", l = i ? `length=${a}` : `type=${typeof t}`;
2864
+ throw new Error(r + "expected Uint8Array" + s + ", got " + l);
2865
+ }
2866
+ return t;
2867
+ }
2868
+ function ra(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
+ Qn(t, void 0, "digestInto() output");
2876
+ const n = e.outputLen;
2877
+ if (t.length < n)
2878
+ throw new Error('"digestInto() output" expected to be of length >=' + n);
2879
+ }
2880
+ function Cn(...t) {
2881
+ for (let e = 0; e < t.length; e++)
2882
+ t[e].fill(0);
2883
+ }
2884
+ function Ze(t) {
2885
+ return new DataView(t.buffer, t.byteOffset, t.byteLength);
2886
+ }
2887
+ function ft(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 fc(t) {
2892
+ if (Qn(t), uc)
2893
+ return t.toHex();
2894
+ let e = "";
2895
+ for (let n = 0; n < t.length; n++)
2896
+ e += pc[t[n]];
2897
+ return e;
2898
+ }
2899
+ function hc(t, e = {}) {
2900
+ const n = (a, o) => t(o).update(a).digest(), i = t(void 0);
2901
+ return n.outputLen = i.outputLen, n.blockLen = i.blockLen, n.create = (a) => t(a), Object.assign(n, e), Object.freeze(n);
2902
+ }
2903
+ const bc = (t) => ({
2904
+ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t])
2905
+ });
2906
+ function gc(t, e, n) {
2907
+ return t & e ^ ~t & n;
2908
+ }
2909
+ function wc(t, e, n) {
2910
+ return t & e ^ t & n ^ e & n;
2911
+ }
2912
+ class mc {
2913
+ constructor(e, n, i, a) {
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 = n, this.padOffset = i, this.isLE = a, this.buffer = new Uint8Array(e), this.view = Ze(this.buffer);
2926
+ }
2927
+ update(e) {
2928
+ ra(this), Qn(e);
2929
+ const { view: n, buffer: i, blockLen: a } = this, o = e.length;
2930
+ for (let r = 0; r < o; ) {
2931
+ const s = Math.min(a - this.pos, o - r);
2932
+ if (s === a) {
2933
+ const l = Ze(e);
2934
+ for (; a <= o - r; r += a)
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 === a && (this.process(n, 0), this.pos = 0);
2939
+ }
2940
+ return this.length += e.length, this.roundClean(), this;
2941
+ }
2942
+ digestInto(e) {
2943
+ ra(this), dc(e, this), this.finished = !0;
2944
+ const { buffer: n, view: i, blockLen: a, isLE: o } = this;
2945
+ let { pos: r } = this;
2946
+ n[r++] = 128, Cn(this.buffer.subarray(r)), this.padOffset > a - r && (this.process(i, 0), r = 0);
2947
+ for (let d = r; d < a; d++)
2948
+ n[d] = 0;
2949
+ i.setBigUint64(a - 8, BigInt(this.length * 8), o), this.process(i, 0);
2950
+ const s = Ze(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], o);
2958
+ }
2959
+ digest() {
2960
+ const { buffer: e, outputLen: n } = this;
2961
+ this.digestInto(e);
2962
+ const i = e.slice(0, n);
2963
+ return this.destroy(), i;
2964
+ }
2965
+ _cloneInto(e) {
2966
+ e || (e = new this.constructor()), e.set(...this.get());
2967
+ const { blockLen: n, buffer: i, length: a, finished: o, destroyed: r, pos: s } = this;
2968
+ return e.destroyed = r, e.finished = o, e.length = a, e.pos = s, a % n && 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
+ ]), vc = /* @__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 mc {
3050
+ constructor(e) {
3051
+ super(64, e, 8, !1);
3052
+ }
3053
+ get() {
3054
+ const { A: e, B: n, C: i, D: a, E: o, F: r, G: s, H: l } = this;
3055
+ return [e, n, i, a, o, r, s, l];
3056
+ }
3057
+ // prettier-ignore
3058
+ set(e, n, i, a, o, r, s, l) {
3059
+ this.A = e | 0, this.B = n | 0, this.C = i | 0, this.D = a | 0, this.E = o | 0, this.F = r | 0, this.G = s | 0, this.H = l | 0;
3060
+ }
3061
+ process(e, n) {
3062
+ for (let d = 0; d < 16; d++, n += 4)
3063
+ yt[d] = e.getUint32(n, !1);
3064
+ for (let d = 16; d < 64; d++) {
3065
+ const p = yt[d - 15], h = yt[d - 2], f = ft(p, 7) ^ ft(p, 18) ^ p >>> 3, b = ft(h, 17) ^ ft(h, 19) ^ h >>> 10;
3066
+ yt[d] = b + yt[d - 7] + f + yt[d - 16] | 0;
3067
+ }
3068
+ let { A: i, B: a, C: o, D: r, E: s, F: l, G: c, H: u } = this;
3069
+ for (let d = 0; d < 64; d++) {
3070
+ const p = ft(s, 6) ^ ft(s, 11) ^ ft(s, 25), h = u + p + gc(s, l, c) + vc[d] + yt[d] | 0, b = (ft(i, 2) ^ ft(i, 13) ^ ft(i, 22)) + wc(i, a, o) | 0;
3071
+ u = c, c = l, l = s, s = r + h | 0, r = o, o = a, a = i, i = h + b | 0;
3072
+ }
3073
+ i = i + this.A | 0, a = a + this.B | 0, o = o + 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, a, o, r, s, l, c, u);
3074
+ }
3075
+ roundClean() {
3076
+ Cn(yt);
3077
+ }
3078
+ destroy() {
3079
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), Cn(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__ */ hc(
3098
+ () => new yc(),
3099
+ /* @__PURE__ */ bc(1)
3100
+ );
3101
+ var kc = (t) => {
3102
+ let e = t.find((n) => n.isHead);
3103
+ if (!e) throw new Error("No head node found");
3104
+ return e;
3105
+ }, $c = (t) => {
3106
+ var e, n;
3107
+ if (!(t.data.isFinished || (e = t.data.startedWriteNodeIds) != null && e.length)) return (n = [...t.data.messages].reverse().find((i) => i.groupId && t.nodes.some((a) => a.id === i.groupId && a.type.startsWith("question-")) && (i.type === "system" || "author" in i && i.author === "user"))) == null ? void 0 : n.groupId;
3108
+ }, In = (t) => Array.isArray(t) ? t.map(In) : t !== null && typeof t == "object" ? Object.fromEntries(Object.entries(t).sort(([e], [n]) => e.localeCompare(n)).map(([e, n]) => [e, In(n)])) : typeof t == "function" ? void 0 : t, Sc = (t) => fc(xc(new TextEncoder().encode(JSON.stringify(In(t)))));
3109
+ function Ec(t, e, n, i) {
3110
+ var a;
3111
+ if (i != null && i.aborted) return;
3112
+ let o = Sc(n), r = (a = t.data).preApplyFingerprints ?? (a.preApplyFingerprints = []);
3113
+ if (r.includes(o)) return;
3114
+ r.push(o);
3115
+ let s = new AbortController(), l = setTimeout(() => s.abort(), 5e3);
3116
+ e.fetch("/flow/pre-apply", { method: "POST", signal: s.signal, body: JSON.stringify(n) }).catch(() => {
3117
+ let c = r.indexOf(o);
3118
+ c !== -1 && r.splice(c, 1);
3119
+ }).finally(() => {
3120
+ clearTimeout(l);
3121
+ });
3122
+ }
3123
+ var Ao = ({ context: t, submissions: e }) => ({ context: t, submissions: e ?? {} }), ut = (t, e) => lc(t, Ao(e)), Cc = (t, e) => Gt(t, Ao(e)), To = ({ node: t, nodes: e, stopWhen: n }) => {
3124
+ if ((n == null ? void 0 : n(t)) === !0) return t;
3125
+ let i = t.nextId ? e.find((a) => a.id === t.nextId) : void 0;
3126
+ if (i) return To({ node: i, nodes: e, stopWhen: n });
3127
+ }, Ic = ({ childNode: t, nodes: e }) => {
3128
+ let n = e.filter((i) => i.type === "if-block").find((i) => {
3129
+ if (!i.branchId) return !1;
3130
+ let a = e.find((r) => r.id === i.branchId);
3131
+ if (!a) return !1;
3132
+ let o = To({ node: a, nodes: e, stopWhen: (r) => r.id === t.id });
3133
+ return !(!o || o.id !== t.id);
3134
+ });
3135
+ if (n != null && n.nextId) return e.find((i) => i.id === n.nextId);
3136
+ }, Ac = 3, Td = ({ flow: t, analytics: e, logger: n, talentBankClient: i, context: a, apiClient: o, getSubmissions: r, getApplicationRecovery: s, setApplicationRecovery: l, chatService: c, persistWriteBarrier: u, onSubmitNetworkError: d, closedRoleBehaviour: p, settledOutcomes: h = p, dateEchoLocale: f, onFlowEnd: b, onInterpret: v, 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((g) => {
3140
+ var E, Z;
3141
+ if (g.type !== "integration-application-submit" || !t.data.nodeHistory.includes(g.id)) return [];
3142
+ let I = g.data.key ? (E = r()) == null ? void 0 : E[g.data.key] : void 0;
3143
+ return (I == null ? void 0 : I.type) === "integration" && ((Z = Fn(I.value)) == null ? void 0 : Z.verdict) === "not_submitted" ? [] : [g.id];
3144
+ }));
3145
+ let x = { ...e.service, log: (g) => e.service.log({ ...g, customProperties: { ...g.customProperties, ...e.customProperties } }) }, _ = (g, 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 b == null ? void 0 : b(g);
3150
+ }) : b == null ? void 0 : b(g);
3151
+ }, S = async (g, I) => {
3152
+ let E = D.signal;
3153
+ if (E.aborted) return;
3154
+ let Z = k == null ? void 0 : k(g);
3155
+ if (Z && (await Z, E.aborted)) return;
3156
+ let Y = r(), H = s(), lt = (H == null ? void 0 : H.submitNodeId) === g.id ? t.nodes.find((W) => {
3157
+ var z;
3158
+ return W.id === H.fileQuestionNodeId && W.type === "question-file" && ((z = Y == null ? void 0 : Y[W.data.key]) == null ? void 0 : z.type) !== "file";
3159
+ }) : void 0;
3160
+ if (lt) return S(lt, I);
3161
+ v == null || v(g, I);
3162
+ try {
3163
+ await Tc({ flow: t, analytics: x, logger: n, talentBankClient: i, apiClient: o, context: a, node: g, submissions: Y, applicationRecovery: H, setApplicationRecovery: async (W) => {
3164
+ if (!E.aborted) try {
3165
+ await l(W);
3166
+ } catch (z) {
3167
+ n.error("Failed to persist application recovery", z);
3168
+ }
3169
+ }, forceSubmitConfirmation: y || (H == null ? void 0 : H.submitNodeId) === g.id, run: F, persistWriteBarrier: u, onSubmitNetworkError: d, settledOutcomes: h, dateEchoLocale: f, flowType: O, signal: E, t: C, chat: { sendMessage: async (W) => c.send({ groupId: g.id, message: W, signal: E }), userInput: async (W) => c.input({ input: W, signal: E }), setSubmission: (W, z) => {
3170
+ E.aborted || c.setSubmission(W, z);
3171
+ }, captcha: c.captcha }, next: (W) => {
3172
+ if (E.aborted) return;
3173
+ let z = (H == null ? void 0 : H.fileQuestionNodeId) === g.id ? H.submitNodeId : W, U = z ? t.nodes.find((j) => j.id === z) : Ic({ childNode: g, nodes: t.nodes });
3174
+ return U ? S(U, g) : _(g, E);
3175
+ }, end: () => {
3176
+ _(g, E);
3177
+ } });
3178
+ } catch (W) {
3179
+ if (W instanceof At) return;
3180
+ throw W;
3181
+ }
3182
+ };
3183
+ return { interpret: async (g) => {
3184
+ let I = t.nodes.find((E) => E.id === g) ?? kc(t.nodes);
3185
+ return S(I);
3186
+ }, undo: (g) => {
3187
+ var W;
3188
+ if (delete t.data.reviewReplay, ((W = t.data.startedWriteNodeIds) == null ? void 0 : W.length) || t.data.isFinished) return { removed: 0 };
3189
+ let I = $c(t), E = I ? g.lastIndexOf(I) : -1, Z = t.nodes.find((z) => z.id === I);
3190
+ if (E === -1 || !Z) return { removed: 0 };
3191
+ let Y = t.nodes.find((z) => z.id === g[g.length - 1]);
3192
+ D.abort();
3193
+ let H = g.splice(E);
3194
+ t.data.messages = t.data.messages.filter((z) => !z.groupId || !H.includes(z.groupId)), t.data.currentInput = null;
3195
+ let lt = r();
3196
+ for (let z of H.slice(1)) {
3197
+ let U = t.nodes.find((j) => j.id === z);
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(Z, Y), { removed: H.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 Kc({ ...t, node: e });
3222
+ case "question-phone":
3223
+ return Yc({ ...t, node: e });
3224
+ case "question-boolean":
3225
+ return Gc({ ...t, node: e });
3226
+ case "question-file":
3227
+ return Xc({ ...t, node: e });
3228
+ case "question-address":
3229
+ return Zc({ ...t, node: e });
3230
+ case "end-flow":
3231
+ return Qc({ ...t, node: e });
3232
+ case "if-block":
3233
+ return zc({ ...t, node: e });
3234
+ case "jump":
3235
+ return Oc({ ...t, node: e });
3236
+ case "link":
3237
+ return Wc({ ...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: n, submissions: i, flow: a, logger: o, chat: r }) {
3256
+ var l;
3257
+ let s = { isDuplicate: !1 };
3258
+ if (i && n) {
3259
+ let c = e.data.scope === "job" ? (l = a.job) == null ? void 0 : l.id : void 0;
3260
+ if (e.data.scope === "company" || c != null) try {
3261
+ s = await n.checkDuplicate({ email: Cr({ key: e.data.email, submissions: i }).toString(), jobId: c, scope: e.data.scope });
3262
+ } catch (u) {
3263
+ o.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: n, submissions: i, context: a }) {
3272
+ if (!i) {
3273
+ n.error("Submissions not found");
3274
+ return;
3275
+ }
3276
+ i[e.data.key] = { type: "string", value: ut(e.data.value, { submissions: i, context: a }) }, t(e.nextId);
3277
+ }
3278
+ var Pc = 5e3, Mo = (t, e) => e ? `${t}@${e.id_type}:${e.id}` : t, Lc = (t, e = Date.now()) => Math.min(t.until, e + (t.maintenance ? Ea : t.throttles ? Sa : $a)), Nc = (t, e, n) => {
3279
+ let { waitMs: i, throttles: a, maintenance: o } = Kr(e == null ? void 0 : e.throttles, n);
3280
+ return { key: t, until: Date.now() + i, ...a !== void 0 && { throttles: a }, ...o && { maintenance: o } };
3281
+ }, Rc = ["ApiError", "NotFoundError", "UnauthorisedError", "SchemaValidationError", "ParsingError"], An = (t) => t instanceof Error && Rc.includes(t.name) ? t : void 0, sa = (t) => {
3282
+ let e = An(t);
3283
+ return (e == null ? void 0 : e.name) === "ApiError" ? e : void 0;
3284
+ };
3285
+ async function Bc({ chat: t, next: e, end: n, node: i, logger: a, apiClient: o, submissions: r, analytics: s, flow: l, applicationRecovery: c, setApplicationRecovery: u, forceSubmitConfirmation: d, flowType: p, run: h, persistWriteBarrier: f, signal: b, onSubmitNetworkError: v, settledOutcomes: k, t: y }) {
3286
+ var x, _;
3287
+ let O = async ({ redirect_url: S, message: g, button_text: I }) => {
3288
+ let { anonymous_id: E, session_id: Z } = s.getSessionInfo();
3289
+ await t.sendMessage({ type: "text", author: "bot", text: g ?? y("submission_redirect_message") });
3290
+ try {
3291
+ let Y = new URL(S);
3292
+ E && !Y.searchParams.has("anonymous_id") && Y.searchParams.set("anonymous_id", E), await t.sendMessage({ type: "link", href: Y.toString(), text: I ?? y("complete_submission"), onClick: () => {
3293
+ if (!Z) {
3294
+ a.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: Z, flow_version: l.version, href: Y.toString(), job: l.job } });
3298
+ } });
3299
+ } catch (Y) {
3300
+ a.error(`Invalid redirect URL: ${S}`, Y), 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") }), n());
3306
+ }
3307
+ let C = Mo(i.id, l.job), B = 0, D = h.submitAccepted && i.data.skipConfirmation === !0 && (c == null ? void 0 : c.submitNodeId) !== i.id, F = async (S) => {
3308
+ var oi, ri, si, li, ci, di, ui, pi, fi;
3309
+ let g = ((oi = l.data.submitCooldown) == null ? void 0 : oi.key) === C ? l.data.submitCooldown : void 0;
3310
+ g && (g.until = Lc(g));
3311
+ let I = g == null ? void 0 : g.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, wt = !0;
3316
+ try {
3317
+ E = await rc(o, { signal: b, 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
+ wt && ($ == null || $.reveal(!0));
3321
+ });
3322
+ } });
3323
+ } catch (Be) {
3324
+ if (a.error("Captcha check failed", Be), b.aborted) return;
3325
+ } finally {
3326
+ wt = !1, $ == null || $.reveal(!1);
3327
+ }
3328
+ }
3329
+ await t.sendMessage({ type: "loading", text: y("submitting") });
3330
+ let { anonymous_id: Z, session_id: Y } = s.getSessionInfo();
3331
+ if (b.aborted) return;
3332
+ let H = ((ri = l.data.startedWriteNodeIds) == null ? void 0 : ri.includes(i.id)) === !0;
3333
+ if ((c == null ? void 0 : c.submitNodeId) === i.id && await u(void 0), H || (l.data.startedWriteNodeIds = [...l.data.startedWriteNodeIds ?? [], i.id]), await f().catch(($) => a.error("Failed to persist application write barrier", $)), b.aborted) return;
3334
+ let lt, W = setTimeout(() => {
3335
+ lt = t.sendMessage({ type: "loading", semantic: "submission-still-working", text: y("submission_still_working") }).catch(($) => a.error("Failed to send submission progress message", $));
3336
+ }, Pc), z = Sr(), U, j = await o.fetch("/flow/submit", { method: "POST", body: JSON.stringify({ ...z !== void 0 && { browser_timezone: z }, log_submit: !1, integration_id: i.data.integrationId, anonymous_id: Z, session_id: Y, job: l.job, flow_build: l.build, ...E !== void 0 && { captcha_token: E }, submissions: $r(l.nodes, Er(r || {}, i.data.submitKeys)), pre_apply: Bn(l.nodes, r || {}, l.data.flowSessionId) }) }).catch(($) => {
3337
+ U = $;
3338
+ let wt = sa($);
3339
+ return (wt == null ? void 0 : wt.data) !== void 0 ? wt.data : $;
3340
+ });
3341
+ if (clearTimeout(W), await lt, b.aborted) return;
3342
+ if (U !== void 0 && !An(U) && v) return await v(U, b), F(!0);
3343
+ l.data.stagingDestination = Wr(j), i.data.key && t.setSubmission(i.data.key, { type: "integration", value: j });
3344
+ let ti = (si = sa(U)) == null ? void 0 : si.status, Le = typeof ti == "number" ? ti : void 0, A = Fn(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 ei = Vt !== void 0 && Date.now() - Vt < Ca || ((li = l.data.unconfirmedAttemptKeys) == null ? void 0 : li.includes(C)) === !0, ni = (ci = An(U)) == null ? void 0 : ci.status, Kt = Xr(j, typeof ni == "number" ? ni : void 0);
3347
+ Kt && 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: Kt.service, response: Kt.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: ei ? "duplicate_after_own_attempt" : "duplicate" }, ...Kt.outcome && { outcome: Kt.outcome } } });
3348
+ let ii = _e(j) || (j == null ? void 0 : j.success) === !0;
3349
+ if ((ii || ye(j)) && (h.submitAccepted = !0), ii && ((di = l.data.submitCooldown) == null ? void 0 : di.throttles) !== void 0 && (delete l.data.submitCooldown.throttles, await f().catch(($) => a.error("Failed to persist submit cooldown reset", $))), _e(j)) {
3350
+ let { redirect_url: $, message: wt, button_text: Be } = j.integration_response.data, hi = { redirect_url: $, message: wt, button_text: Be };
3351
+ return b.aborted ? void 0 : (l.data.submitRedirects = { ...l.data.submitRedirects, [i.id]: hi }, await f().catch((Oo) => a.error("Failed to persist submit redirect", Oo)), await O(hi), e(i.nextId));
3352
+ }
3353
+ let ai = ye(j);
3354
+ if (ai) return await t.sendMessage({ type: "system", variant: "success", text: ai.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 = Zr(A), ce = Re !== void 0 && ((ui = r == null ? void 0 : r[Re]) == null ? void 0 : ui.type) === "file" ? Re : void 0, de = ce === void 0 ? void 0 : l.nodes.find(($) => $.type === "question-file" && $.data.key === ce);
3357
+ if (!de && !le && !yi(A) && (l.data.submitCooldown = Nc(C, g, A)), (A == null ? void 0 : A.outcome) !== "duplicate" && !Ne && (l.data.failedAttemptAt = { ...l.data.failedAttemptAt, [C]: Date.now() }, (pi = l.data.unconfirmedAttemptKeys) != null && pi.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) ? (H || (l.data.startedWriteNodeIds = (fi = l.data.startedWriteNodeIds) == null ? void 0 : fi.filter(($) => $ !== i.id)), (c == null ? void 0 : c.submitNodeId) === i.id && await u(c), await f().catch(($) => a.error("Failed to persist application write barrier release", $))) : await f().catch(($) => a.error("Failed to persist submit cooldown", $)), A) {
3358
+ if (a.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(ei ? "submission_duplicate_earlier_attempt" : "submission_duplicate") }), le ? (delete l.data.submitCooldown, n()) : 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, n()) : 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)) : yi(A) ? Yr(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") }), n());
3363
+ }
3364
+ return a.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") }), n());
3365
+ };
3366
+ await F(d === !0 && !D ? !1 : i.data.skipConfirmation);
3367
+ }
3368
+ var Fc = /{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/, Hc = (t, e) => {
3369
+ if (!Fc.test(t)) return !1;
3370
+ try {
3371
+ let { protocol: n } = new URL(e);
3372
+ return n === "https:" || n === "http:";
3373
+ } catch {
3374
+ return !1;
3375
+ }
3376
+ };
3377
+ async function Wc({ chat: t, next: e, node: n, submissions: i, context: a, analytics: o, flow: r }) {
3378
+ let s = ut(n.data.href, { submissions: i, context: a }), { flowSessionId: l } = r.data;
3379
+ await t.sendMessage({ type: "link", href: s, text: ut(n.data.cta, { submissions: i, context: a }), ...Hc(n.data.href, s) && { onClick: () => {
3380
+ o.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(n.nextId);
3382
+ }
3383
+ async function zc({ submissions: t, next: e, node: n, context: i }) {
3384
+ e(Cc(n, { submissions: t, context: i }) ? n.branchId : n.nextId);
3385
+ }
3386
+ async function qc({ chat: t, next: e, node: n, submissions: i, context: a }) {
3387
+ await t.sendMessage({ author: "bot", type: "text", text: ut(n.data.text, { submissions: i, context: a }) }), e(n.nextId);
3388
+ }
3389
+ async function Uc({ chat: t, next: e, node: n }) {
3390
+ await t.sendMessage({ author: "bot", type: "image", url: n.data.url, height: n.data.height, width: n.data.width }), e(n.nextId);
3391
+ }
3392
+ async function Vc({ chat: t, next: e, node: n, submissions: i, context: a, t: o, dateEchoLocale: r }) {
3393
+ await t.sendMessage({ author: "bot", type: "text", text: ut(n.data.question, { submissions: i, context: a }) });
3394
+ let s = n.data.format === "phone" ? await t.userInput({ key: n.data.key, type: "phone", config: { optional: n.data.optional, placeholder: n.data.placeholder, minChars: n.data.minChars, maxChars: n.data.maxChars, submissionFormat: "text", defaultValue: {} } }) : await t.userInput({ key: n.data.key, type: "text", config: { optional: n.data.optional, placeholder: n.data.placeholder, format: n.data.format, maxChars: n.data.maxChars, minChars: n.data.minChars, multiline: n.data.format === "text" && n.data.multiline === !0 } });
3395
+ s === null ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: o("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: s.type === "phone" ? Me(s.value) : n.data.format === "date" && r !== void 0 ? ts(s.value, r) : s.value }), e(n.nextId);
3396
+ }
3397
+ async function Kc({ chat: t, next: e, node: n, submissions: i, context: a, t: o }) {
3398
+ await t.sendMessage({ author: "bot", type: "text", text: ut(n.data.question, { submissions: i, context: a }) });
3399
+ let r = await t.userInput({ key: n.data.key, type: "number", config: { max: n.data.max, min: n.data.min, optional: n.data.optional, placeholder: n.data.placeholder, decimalCases: n.data.decimalCases } });
3400
+ r === null ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: o("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: r.value.toString() }), e(n.nextId);
3401
+ }
3402
+ async function Yc({ chat: t, next: e, node: n, submissions: i, context: a, t: o }) {
3403
+ await t.sendMessage({ author: "bot", type: "text", text: ut(n.data.question, { submissions: i, context: a }) });
3404
+ let r = await t.userInput({ key: n.data.key, type: "phone", config: { minChars: n.data.minChars, defaultValue: { countryCode: n.data.defaultCountryCode }, placeholder: n.data.placeholder, submissionFormat: "phone", optional: n.data.optional } });
3405
+ r === null ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: o("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: r.type === "phone" ? Me(r.value) : r.value }), e(n.nextId);
3406
+ }
3407
+ async function Jc({ chat: t, next: e, node: n, submissions: i, context: a, t: o }) {
3408
+ await t.sendMessage({ author: "bot", type: "text", text: ut(n.data.question, { submissions: i, context: a }) });
3409
+ let r = await t.userInput({ key: n.data.key, type: "multiple-choice", config: n.data });
3410
+ r.value.length === 0 ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: o("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: n.data.options.filter((s) => r.value.includes(s.value)).map((s) => s.label).join(", ") }), e(n.nextId);
3411
+ }
3412
+ async function Gc({ chat: t, next: e, node: n, submissions: i, context: a, t: o }) {
3413
+ await t.sendMessage({ author: "bot", type: "text", text: ut(n.data.question, { submissions: i, context: a }) });
3414
+ let r = await t.userInput({ key: n.data.key, type: "boolean", config: { optional: n.data.optional, labels: { true: n.data.trueLabel, false: n.data.falseLabel } } });
3415
+ r === null ? await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: o("skipped") }) : await t.sendMessage({ author: "user", type: "text", text: r.value === !0 ? n.data.trueLabel : n.data.falseLabel }), e(n.nextId);
3416
+ }
3417
+ async function Zc({ chat: t, next: e, node: n, t: i }) {
3418
+ await t.sendMessage({ author: "bot", type: "text", text: n.data.question });
3419
+ let a = await t.userInput({ type: "address", key: n.data.key, config: { optional: n.data.optional, keys: n.data.keys, line2Required: n.data.line2Required, placeholder: n.data.placeholder } });
3420
+ if (a === null) await t.sendMessage({ type: "system", variant: "info", semantic: "question-skipped", text: i("skipped") });
3421
+ else {
3422
+ let o = Object.values(a.value).filter((r) => r && r.trim().length > 0).join(", ");
3423
+ await t.sendMessage({ author: "user", type: "text", text: o });
3424
+ }
3425
+ return e(n.nextId);
3426
+ }
3427
+ async function Xc({ node: t, chat: e, next: n, submissions: i, context: a, t: o }) {
3428
+ await e.sendMessage({ author: "bot", type: "text", text: ut(t.data.question, { submissions: i, context: a }) });
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: o("skipped") });
3431
+ else for (let s of r.value) await e.sendMessage({ author: "user", type: "file", fileName: s.name, fileSizeKb: s.sizeKb });
3432
+ return n(t.nextId);
3433
+ }
3434
+ async function Qc({ chat: t, end: e, node: n }) {
3435
+ await t.sendMessage({ type: "system", variant: "info", text: n.data.systemMessage }), e();
3436
+ }
3437
+ async function td({ node: t, flow: e, submissions: n, chat: i, next: a, apiClient: o, analytics: r, signal: s, context: l }) {
3438
+ let c = kr(e.nodes, n || {}), { answers: u, ...d } = c;
3439
+ if (i.setSubmission(t.data.key, { type: "integration", value: d }), Ec(e, o, { ...r.getSessionInfo(), job: e.job, flow_build: e.build, pre_apply: Bn(e.nodes, n || {}, 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 h of ["hard", "advisory"]) {
3442
+ let f = u.filter((b) => !b.matched && b.severity === h);
3443
+ f.length && p.push((h === "hard" ? "Role requirements" : "Other things to consider") + `
3444
+ ` + f.map((b) => `• ${b.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: n, context: l }) } });
3450
+ }
3451
+ return a(t.nextId);
3452
+ }
3453
+ var ed = new TextEncoder(), Tn = (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 n = ed.encode(t).length;
3459
+ return 6 + String(n).length + n;
3460
+ }
3461
+ let e = Array.isArray(t) ? t.map((n, i) => [i, n]) : Object.entries(t);
3462
+ return 5 + String(e.length).length + e.reduce((n, [i, a]) => n + Tn(i) + Tn(a), 0);
3463
+ }, nd = (t) => {
3464
+ let e = t;
3465
+ for (; e.length > 1 && Tn(e) > 8e3; ) e = e.slice(1);
3466
+ return { steps: e.map((n) => ({ ...n })), 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
+ }, ad = (t, e = Date.now, n, i) => {
3471
+ let a = () => {
3472
+ var p;
3473
+ return (p = t()).path ?? (p.path = { steps: [], attempts: 0 });
3474
+ }, o, r = e(), s, l = () => {
3475
+ a().unsent = !0, n == null || n();
3476
+ }, c = () => {
3477
+ r = e(), l();
3478
+ }, u = () => {
3479
+ let p = a().steps.at(-1);
3480
+ return p && p.o === void 0 ? p : void 0;
3481
+ }, d = (p, h) => {
3482
+ let f = a();
3483
+ if (!f.unsent) return;
3484
+ let { steps: b, omitted: v } = nd(f.steps);
3485
+ return { trigger: p, steps: b, ...v > 0 && { steps_omitted: v }, ...h !== void 0 && { to_node_id: h }, idle_ms: e() - r, submit_attempts: f.attempts, ...f.result !== void 0 && { submit_result: f.result }, ...f.cv && { cv: f.cv }, device: id(), ...f.redirect };
3486
+ };
3487
+ return { shown: (p) => {
3488
+ var f;
3489
+ if (o = e(), ((f = u()) == null ? void 0 : f.k) === p.key) return;
3490
+ let { steps: h } = a();
3491
+ h.push({ k: p.key, i: h.length + 1, t: p.inputType }), l();
3492
+ }, answered: (p, h) => {
3493
+ let f = u();
3494
+ !f || h !== void 0 && f.k !== h || (f.o = p ? "s" : "a", o !== void 0 && (f.ms = e() - o), c());
3495
+ }, refused: () => {
3496
+ let p = u();
3497
+ p && (p.e = (p.e ?? 0) + 1, c());
3498
+ }, revised: (p) => {
3499
+ let h = p === void 0 ? void 0 : a().steps.findLast((f) => f.k === p);
3500
+ h && (h.r = (h.r ?? 0) + 1, c());
3501
+ }, active: () => {
3502
+ r = e();
3503
+ }, cv: (p) => {
3504
+ let h = a();
3505
+ h.cv === p || h.cv === "attached" || (h.cv = p, p === "attached" ? c() : l());
3506
+ }, submitted: (p) => {
3507
+ let h = a();
3508
+ h.attempts++, h.result = p, p === "redirect" && (s = e()), l();
3509
+ }, redirected: () => {
3510
+ let p = s === void 0, h = a();
3511
+ h.redirect || (h.redirect = { redirect_clicked: !0, ...p ? { redirect_revisit: !0 } : s !== void 0 && { redirect_ms: e() - s } }, c());
3512
+ }, summary: (p, h) => {
3513
+ let f = d(p, h);
3514
+ return delete a().unsent, f;
3515
+ }, peek: d, reset: () => {
3516
+ t().path = { steps: [], attempts: 0 }, o = void 0, s = void 0, r = e();
3517
+ } };
3518
+ };
3519
+ const la = /* @__PURE__ */ new WeakMap(), Ae = (t) => {
3520
+ let e = la.get(t);
3521
+ return e || (e = ad(
3522
+ () => t.data,
3523
+ Date.now,
3524
+ () => Q.setStateData(t)
3525
+ ), la.set(t, e)), e;
3526
+ }, Zt = (t, e, n) => {
3527
+ var a;
3528
+ const i = Ae(e).summary(n, 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: (a = e.analytics) == null ? void 0 : a.customProperties,
3543
+ ...(n === "hidden" || n === "pagehide" || n === "redirect") && { keepalive: !0 }
3544
+ }).catch(() => {
3545
+ });
3546
+ } catch {
3547
+ }
3548
+ Q.setStateData(e);
3549
+ }
3550
+ }, od = (t) => {
3551
+ let e, n;
3552
+ const i = Oe(() => {
3553
+ const o = M.current$.value.flow, r = M.viewState$.value;
3554
+ e && e !== o ? Zt(t, e, "restart") : o && r === "minimised" && n !== r && Zt(t, o, "minimise"), e = o, n = r;
3555
+ }), a = (o) => {
3556
+ const r = M.current$.peek().flow;
3557
+ r && (o.type === "pagehide" ? Zt(t, r, "pagehide") : document.visibilityState === "hidden" && Zt(t, r, "hidden"), Q.flushStateData().catch(() => {
3558
+ }));
3559
+ };
3560
+ return document.addEventListener("visibilitychange", a), window.addEventListener("pagehide", a), () => {
3561
+ i(), document.removeEventListener("visibilitychange", a), window.removeEventListener("pagehide", a);
3562
+ };
3563
+ }, Md = (t, e, n) => ({
3564
+ fetch: async (i, a) => {
3565
+ if (i !== "/flow/submit") return t.fetch(i, a);
3566
+ const o = n.data.nodeHistory.at(-1), r = o === void 0 ? void 0 : Mo(o, n.job), s = (l, c, u = !1) => {
3567
+ var b, v, k;
3568
+ if ((b = a == null ? void 0 : a.signal) != null && b.aborted || M.current$.peek().flow !== n) return;
3569
+ const d = Fn(l, c), p = r === void 0 || (v = n.data.failedAttemptAt) == null ? void 0 : v[r], h = p !== void 0 && Date.now() - Math.min(p, Date.now()) < Ca || r !== void 0 && ((k = n.data.unconfirmedAttemptKeys) == null ? void 0 : k.includes(r)) === !0, f = 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" ? h ? "duplicate_after_own_attempt" : "duplicate" : (d == null ? void 0 : d.outcome) ?? "failed";
3570
+ Ae(n).submitted(f), Zt(e, n, "submit");
3571
+ };
3572
+ try {
3573
+ const l = await t.fetch(i, a);
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, jo = st(() => {
3586
+ }), ca = ["wheel", "touchmove", "keydown"], ld = (t, e) => new Promise((n, i) => {
3587
+ if (e != null && e.aborted) return i(new At());
3588
+ const a = setTimeout(n, t);
3589
+ e == null || e.addEventListener(
3590
+ "abort",
3591
+ () => {
3592
+ clearTimeout(a), 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: () => jo.value()
3607
+ }, jd = () => {
3608
+ const t = Ft(null), e = Ft(-1 / 0);
3609
+ Wt(() => {
3610
+ const i = t.current;
3611
+ if (!i) return;
3612
+ const a = () => {
3613
+ rt.isReadingHistory$.value = !1, i.scrollTo({ top: i.scrollHeight, behavior: "instant" });
3614
+ };
3615
+ jo.value = a;
3616
+ const o = () => 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 ca) i.addEventListener(l, o, { passive: !0 });
3621
+ const s = new ResizeObserver(() => {
3622
+ rt.isReadingHistory$.peek() || a();
3623
+ });
3624
+ return s.observe(i), i.firstElementChild && s.observe(i.firstElementChild), () => {
3625
+ i.removeEventListener("scroll", r);
3626
+ for (const l of ca) i.removeEventListener(l, o);
3627
+ s.disconnect();
3628
+ };
3629
+ }, []);
3630
+ const n = Ot(() => ({
3631
+ setSubmission: (a, o) => M.setSubmission(a, o),
3632
+ captcha: {
3633
+ container: () => {
3634
+ var a;
3635
+ return ((a = t.current) == null ? void 0 : a.querySelector("[data-captcha-slot]")) ?? null;
3636
+ },
3637
+ get theme() {
3638
+ return rt.themeMode$.peek();
3639
+ },
3640
+ reveal: (a) => {
3641
+ rt.captchaVisible$.value = a, a && requestAnimationFrame(() => {
3642
+ var o, r;
3643
+ (r = (o = t.current) == null ? void 0 : o.querySelector("[data-captcha-slot]")) == null || r.focus(), rt.scrollToEnd();
3644
+ });
3645
+ }
3646
+ },
3647
+ send: async ({ message: a, signal: o, groupId: r }) => {
3648
+ if (await Jn(a).with({ author: "bot", type: "text" }, async (s) => {
3649
+ if (o != null && o.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, o);
3654
+ } finally {
3655
+ rt.isBotTyping$.value = !1;
3656
+ }
3657
+ }).otherwise(async () => {
3658
+ }), o != null && o.aborted) throw new At();
3659
+ M.addMessage(a, r);
3660
+ },
3661
+ input: (({ input: a, signal: o }) => {
3662
+ if (o != null && o.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 === a.key ? s : void 0;
3664
+ return r && l && Ae(r).shown({ key: l.data.key, inputType: l.type.slice(9) }), M.setInput(a), new Promise((c) => {
3665
+ const u = (d) => {
3666
+ if (o != null && o.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), a.key && M.setSubmission(a.key, d), c(d);
3670
+ };
3671
+ rt.onSubmitSuccessFn$.value = u;
3672
+ });
3673
+ })
3674
+ }), []);
3675
+ return {
3676
+ chatRef: t,
3677
+ chatService: n
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, n) => (i) => {
3710
+ const [a, o] = dd[n][i];
3711
+ return "oklch(" + a + "% " + o * e + " " + t + ")";
3712
+ }, Xe = (t) => {
3713
+ const e = ud(t.hue, t.chroma, t.mode);
3714
+ return Object.fromEntries(
3715
+ cd.map((n) => [t.prefix + n, t.transform(e(n))])
3716
+ );
3717
+ }, Qe = (t) => t, pd = (t) => {
3718
+ const e = Object.keys(t).flatMap((n) => {
3719
+ const i = t[n];
3720
+ return typeof i == "object" && i !== null ? Object.keys(i).map((a) => {
3721
+ const o = i[a];
3722
+ return [`${String(n)}.${a}`, o];
3723
+ }) : [[n, i]];
3724
+ });
3725
+ return Object.fromEntries(e);
3726
+ }, pe = (t) => !!t && typeof t == "object" && !Array.isArray(t), Mn = (t, ...e) => {
3727
+ if (!e.length)
3728
+ return t;
3729
+ const n = e.shift();
3730
+ if (pe(t) && pe(n))
3731
+ for (const i in n) {
3732
+ const a = n[i];
3733
+ if (pe(a)) {
3734
+ t[i] || Object.assign(t, { [i]: {} });
3735
+ const o = t[i];
3736
+ pe(o) && Mn(o, a);
3737
+ } else
3738
+ Object.assign(t, { [i]: n[i] });
3739
+ }
3740
+ return Mn(t, ...e);
3741
+ }, fd = (t) => {
3742
+ function e(n, i) {
3743
+ const a = [t.prefix, i.toString().replace(/\./g, "-")].join("");
3744
+ return n === "declaration" ? `--${a}` : `var(--${a})`;
3745
+ }
3746
+ return e;
3747
+ }, hd = () => ({
3748
+ core: (t) => ({
3749
+ semantic: (e) => ({
3750
+ component: (n) => ({
3751
+ from: (i) => {
3752
+ const { theme: a, getToken: o } = i, r = (p) => o("reference", p.toString()), s = t({ theme: a }), l = e({ theme: a, core: r, raw: { core: s } }), c = n({
3753
+ theme: a,
3754
+ core: r,
3755
+ semantic: r,
3756
+ raw: { core: s, semantic: l }
3757
+ }), u = pd(Mn(s, l, c)), d = ([p, h], f) => {
3758
+ const b = [f, p].filter(Boolean).join(".");
3759
+ return typeof h == "object" ? Object.entries(h).flatMap((v) => d(v, b)) : [[i.getToken("declaration", b), h]];
3760
+ };
3761
+ return {
3762
+ values: u,
3763
+ declarations: Object.fromEntries(Object.entries(u).flatMap((p) => d(p))),
3764
+ ref: (p) => o("reference", p.toString())
3765
+ };
3766
+ }
3767
+ })
3768
+ })
3769
+ })
3770
+ });
3771
+ const [tn, en, da] = ["oklch(0% 0 0)", "oklch(100% 0 0)", "transparent"], bd = hd().core(({ theme: t }) => ({
3772
+ color: {
3773
+ black: tn,
3774
+ white: en,
3775
+ lowest: t.mode === "light" ? en : tn,
3776
+ highest: t.mode === "light" ? tn : en,
3777
+ ...Xe({
3778
+ prefix: "a-",
3779
+ hue: t.hue,
3780
+ chroma: t.chroma,
3781
+ mode: t.mode,
3782
+ transform: Qe
3783
+ }),
3784
+ ...Xe({
3785
+ prefix: "n-",
3786
+ hue: t.hue,
3787
+ chroma: 0.05,
3788
+ mode: t.mode,
3789
+ transform: Qe
3790
+ }),
3791
+ ...Xe({
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: n }) => {
3801
+ const i = (a, o) => e.core.color[a].replace(")", ` / ${o})`);
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", n.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: da,
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: n, core: i }) => {
3830
+ const a = (o, r) => t.core.color[o].replace(")", ` / ${r})`);
3831
+ return {
3832
+ app: {
3833
+ bg: i(e.mode === "dark" ? "color.n-1" : "color.n-2")
3834
+ },
3835
+ overlay: {
3836
+ bg: a("black", 0.4)
3837
+ },
3838
+ bubble: {
3839
+ "weak-bg": i(e.mode === "dark" ? "color.n-3" : "color.lowest"),
3840
+ "weak-outline": n("color.divider"),
3841
+ "strong-shadow": a("a-9", 0.05)
3842
+ },
3843
+ "status-bar": {
3844
+ bg: a("n-2", 0.8),
3845
+ "bg-button": da,
3846
+ "bg-button-hover": a("n-10", 0.4),
3847
+ "bg-button-active": a("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
+ }), gd = fd({ prefix: "i-" }), wd = (t) => {
3859
+ const e = bd.from({ theme: t, getToken: gd }), n = Object.entries(e.declarations).map(([i, a]) => `${i}: ${a};`);
3860
+ return `${En} {
3861
+ ${n.concat(n).join(`
3862
+ `)}
3863
+ }`;
3864
+ };
3865
+ class ua extends Fo {
3866
+ }
3867
+ const Od = ({
3868
+ _internal_domManager: t = tc(),
3869
+ theme: e,
3870
+ terms: n,
3871
+ feedback: i,
3872
+ jobAlerts: a
3873
+ }) => Ro(({ apiClient: o, rpcClient: r, logger: s, analytics: l, publishableKey: c, env: u }) => {
3874
+ let d = !1, p = 0, h;
3875
+ Zl(u, c);
3876
+ const f = Xl(Yl(o));
3877
+ let b = 0;
3878
+ const v = /* @__PURE__ */ new WeakMap(), k = (x, _) => {
3879
+ const S = ++b, g = performance.now();
3880
+ return _.catch((I) => {
3881
+ throw typeof I == "object" && I !== null && v.set(I, { endpoint: x, attempt: S, elapsed_ms: Math.round(performance.now() - g) }), I;
3882
+ });
3883
+ }, y = (x, _) => {
3884
+ const S = Eo(x);
3885
+ S === 404 || S === 410 || Nt("fatal", "application_unavailable", {
3886
+ phase: "flow",
3887
+ stage: _,
3888
+ error: Sn(x),
3889
+ http_status: S,
3890
+ ..._ === "flow_fetch" && typeof x == "object" && x !== null && v.get(x)
3891
+ });
3892
+ }, O = c && u ? Bo({ environment: u, publishableKey: c, logger: s }) : void 0, C = (x) => x === p, B = () => {
3893
+ if (typeof window > "u") return;
3894
+ p++, h == null || h(), h = 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
+ ot("style", { id: "inploi-chatbot-styles" }, Ql),
3902
+ ot("style", { id: "inploi-chatbot-theme" }, wd(e))
3903
+ ], S = t.getOrCreateChatbotElement();
3904
+ rt.themeMode$.value = e.mode;
3905
+ const g = st(!1);
3906
+ if (jt(
3907
+ ot(dt, {}, [
3908
+ _,
3909
+ ot(Vl, {
3910
+ env: u,
3911
+ rpcClient: r,
3912
+ apiClient: f,
3913
+ logger: s,
3914
+ analytics: l,
3915
+ talentBankClient: O,
3916
+ params: { theme: e, terms: n, feedback: i },
3917
+ feedbackReady: g
3918
+ })
3919
+ ]),
3920
+ S
3921
+ ), i) {
3922
+ const I = (E) => {
3923
+ var Y, H;
3924
+ if (!C(x)) return;
3925
+ const Z = (Y = t.getChatbotElement()) == null ? void 0 : Y.querySelector("dialog");
3926
+ Z && md({
3927
+ instance: E({ rpcClient: r, apiClient: o, logger: s, analytics: l }),
3928
+ theme: e,
3929
+ terms: ((H = i.params) == null ? void 0 : H.terms) ?? {},
3930
+ host: Z
3931
+ }).then(
3932
+ () => {
3933
+ g.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
+ h ?? (h = od(l)), d = !0;
3945
+ }, F = async (x, _) => {
3946
+ if (!C(_)) return;
3947
+ es({
3948
+ context: Hn(x.jobContext, x.context || {}),
3949
+ schema: x.flow.context_schema,
3950
+ logger: s
3951
+ });
3952
+ const S = await M.prepareFlow({ ...x, jobAlerts: x.jobAlerts ?? a });
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(os, { params: { id: x }, searchParams: { id_type: S } })
3974
+ ).catch((g) => {
3975
+ throw io(
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
+ g
3986
+ ) ? new ua(g.message, g.status, g.data) : g;
3987
+ }).then((g) => ({
3988
+ flow: g.flow,
3989
+ title: g.job.title,
3990
+ flowKeys: [g.job.id, ...(_ == null ? void 0 : _.flowKeys) ?? []],
3991
+ job: as(g, { id: x, idType: S }),
3992
+ employer: g.company.name,
3993
+ ..._,
3994
+ jobContext: g.context,
3995
+ context: {
3996
+ user: g.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 g;
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
+ ...(g = _ == null ? void 0 : _.analytics) == null ? void 0 : g.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 (g) {
4025
+ s.error("Error starting flow", g), Nt("boot_failed", Te(g), {
4026
+ phase: "config",
4027
+ error: Sn(g),
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 g = (I) => (E) => {
4037
+ C(S) && (s.error("Error loading flow", E), M.current$.value = {
4038
+ state: E instanceof ua ? "closed" : "error"
4039
+ }, y(E, I));
4040
+ };
4041
+ x.then((I) => F(I, S).catch(g("create")), g("flow_fetch"));
4042
+ } else
4043
+ await F(x, S).catch((g) => {
4044
+ s.error("Error starting flow", g), y(g, "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 && ea({ 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) => ea({ 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 md({
4069
+ instance: t,
4070
+ terms: e,
4071
+ theme: n,
4072
+ host: i
4073
+ }) {
4074
+ return t.render({
4075
+ key: "chatbot-header",
4076
+ size: "sm",
4077
+ theme: {
4078
+ accent: { chroma: n.chroma ?? 1, hue: n.hue },
4079
+ positive: { hue: 180, chroma: 1 },
4080
+ negative: { hue: 33, chroma: 1 },
4081
+ mode: n.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
+ kn as H,
4098
+ Hl as I,
4099
+ Md as J,
4100
+ Od as K,
4101
+ Rl as L,
4102
+ Jn as M,
4103
+ Vr as O,
4104
+ Pr as S,
4105
+ Ft as _,
4106
+ Ae as a,
4107
+ Zn as b,
4108
+ Gn as c,
4109
+ Ws as d,
4110
+ xd as e,
4111
+ kd as f,
4112
+ Ad as g,
4113
+ Va as h,
4114
+ mo as i,
4115
+ Id as j,
4116
+ dt as k,
4117
+ Sa as l,
4118
+ rt as m,
4119
+ st as n,
4120
+ w as o,
4121
+ qn as p,
4122
+ $d as q,
4123
+ Cd as r,
4124
+ M as s,
4125
+ Hc as t,
4126
+ De as u,
4127
+ Zt as v,
4128
+ $c as w,
4129
+ jd as x,
4130
+ Wt as y,
4131
+ Dt as z
4132
+ };