@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,25 @@
1
+ "use strict";var qa=Object.defineProperty;var Ua=(t,e,n)=>e in t?qa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var V=(t,e,n)=>Ua(t,typeof e!="symbol"?e+"":e,n);const Dt=require("@inploi/sdk");var Ve=typeof document<"u"?document.currentScript:null,dn=new Set(["Error","TypeError","RangeError","ReferenceError","SyntaxError","URIError","EvalError","AggregateError","AbortError","TimeoutError","NetworkError","NotAllowedError","NotFoundError","NotSupportedError","InvalidStateError","QuotaExceededError","SecurityError","DataCloneError","ChunkLoadError"]),Va=[/^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\.)$/],Ka=`IDBDatabase IDBObjectStore IDBTransaction IDBFactory IDBRequest IDBOpenDBRequest IDBIndex IDBCursor IDBKeyRange
2
+ Storage StorageManager Window Document Element HTMLElement HTMLIFrameElement HTMLMediaElement HTMLFormElement
3
+ HTMLInputElement Node EventTarget Navigator Clipboard ServiceWorkerContainer ServiceWorkerRegistration Response
4
+ Request Headers URL URLSearchParams Blob File FileReader FormData MessagePort Worker Cache CacheStorage History
5
+ Location CustomElementRegistry ReadableStream WritableStream AbortSignal Performance Crypto SubtleCrypto
6
+ MediaDevices ResizeObserver IntersectionObserver MutationObserver Notification Permissions LockManager
7
+ DOMTokenList ShadowRoot Selection Range TextDecoder TextEncoder WebSocket XMLHttpRequest
8
+ transaction objectStore createObjectStore deleteObjectStore createIndex index put get getAll getKey delete add
9
+ clear count openCursor open deleteDatabase setItem getItem removeItem key postMessage fetch json text arrayBuffer
10
+ blob formData querySelector querySelectorAll appendChild removeChild insertBefore replaceChild append prepend
11
+ remove contains observe unobserve disconnect play pause writeText readText write read share register
12
+ getRegistration requestStorageAccess focus blur scrollTo scrollIntoView setAttribute getAttribute
13
+ getBoundingClientRect attachShadow define pushState replaceState assign replace reload send close abort
14
+ requestAnimationFrame matchMedia getComputedStyle createElement structuredClone localStorage sessionStorage
15
+ indexedDB serviceWorker clipboard cookie`,Ya=["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"],Ja=/^Failed to (?:execute|read|set|construct) (?:the )?'([\w$]{1,40})'(?: (?:on|property (?:from|on)|from) '([\w$]{1,40})')?(?:: (.*))?$/,_i,Ga=t=>{let{apis:e,sentences:n}=_i??(_i={apis:new Set(Ka.split(/\s+/)),sentences:new Set(Ya)});if(n.has(t))return t;let i=Ja.exec(t);if(!i)return"";let[,o,a,r]=i;return e.has(o)&&(a===void 0||e.has(a))&&(r===void 0||n.has(r))?t:""},Za=/^\s*at\s|@(?:[a-z][\w+.-]*:\/\/|\[native code\])/i,Xa=/\b(?:chrome|moz|safari|safari-web|ms-browser)-extension:\/\//,Qa=/\[native code\]|<anonymous>|\(native\)/,tr=t=>Xa.test(t)?"extension":Qa.test(t)?"native":"script",yi=/^(Failed to fetch dynamically imported module|error loading dynamically imported module)/,er=/^((?:[\w-]{1,20}\/){0,3}[\w.-]{1,80}\.js)(?:\?retry=\d{1,3})?:(\d{1,7})(?::(\d{1,7}))?\)?$/,nr=/^ResizeObserver loop (?:completed with undelivered notifications\.|limit exceeded)$/,ir=({error:t,message:e})=>t==null&&nr.test(e),Oe=t=>t instanceof Error?dn.has(t.name)?t.name:"Error":typeof t,or=new Set(["DOMException","Object","Array","Promise","Event","ErrorEvent","PromiseRejectionEvent","ProgressEvent","CloseEvent","MessageEvent","Response","Request","XMLHttpRequest"]),ar=t=>{var i,o;let e=t===null?"null":typeof t,n={message:"",stack:"",thrown:{type:e,ctor:"",keys:0,message_length:0,stack_lines:0}};if(typeof t=="string")return{...n,thrown:{...n.thrown,message_length:t.length}};if(typeof t!="object"||t===null)return n;try{let{message:a,stack:r}=t,s=(o=(i=Object.getPrototypeOf(t))==null?void 0:i.constructor)==null?void 0:o.name,l=typeof s!="string"?"":dn.has(s)||or.has(s)?s:"other",c=typeof a=="string"?a:"",u=typeof r=="string"?r:"";return{message:t instanceof Error||dn.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(`
16
+ `,1e3).length:0}}}catch{return n}},rr=(t,e,n="")=>{let i=Oe(t),{message:o,stack:a,thrown:r}=ar(t),s=(t==null?n:o).slice(0,300),l=Va.some(p=>p.test(s))?s:yi.test(s)?yi.exec(s)[1]:Ga(s),c=[],u=new Set;for(let p of a.split(`
17
+ `,60)){let f=p.indexOf(e),h=f!==-1&&(f===0||" (@".includes(p[f-1])),b=h?er.exec(p.slice(f+e.length).trim()):null;b?c.push([b[1],b[2],b[3]].filter(Boolean).join(":")):h?u.add("build"):Za.test(p)&&u.add(tr(p))}c.splice(10);let d={name:i,message:l,stack:c,foreign:[...u].sort(),thrown:r};for(;JSON.stringify(d).length>1400&&d.stack.length;)d.stack.pop();return d},xi="inploi-candidate-beacon-seed",sr=()=>{try{return typeof sessionStorage>"u"?void 0:sessionStorage}catch{return}},lr=()=>({host:"s2811583.eu-central-1a.betterstackdata.com",token:"LHJqsZXu82MrkgUP44JHAwvU",sampleRate:Math.min(1,Math.max(0,1))}),mo=t=>{let e=3735928559,n=1103547991;for(let i=0;i<t.length;i++){let o=t.charCodeAt(i);e=Math.imul(e^o,2654435761),n=Math.imul(n^o,1597334677)}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)},cr=(t,e)=>{try{let n=t==null?void 0:t.getItem(xi);if(n)return n;let i=e();return t==null||t.setItem(xi,i),i}catch{return e()}},dr=[["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\//]],ur=[["ios",/\b(?:iPhone|iPad|iPod)\b/],["android",/\bAndroid\b/],["windows",/\bWindows\b/],["chromeos",/\bCrOS\b/],["mac",/\bMacintosh\b/],["linux",/\bLinux\b/]],pr=t=>{var i,o;let e=dr.find(([,a])=>a.test(t)),n=(i=e==null?void 0:e[1].exec(t))==null?void 0:i[1];return{browser:e?[e[0],n].filter(Boolean).join(" "):"other",platform:((o=ur.find(([,a])=>a.test(t)))==null?void 0:o[0])??"other"}},hr=(t=typeof document>"u"?void 0:document)=>{var a,r;let e=()=>typeof performance>"u"?0:Math.round(performance.now()),n=(t==null?void 0:t.visibilityState)==="hidden"?e():null,i=null,o=!1;return t==null||t.addEventListener("visibilitychange",()=>{t.visibilityState==="hidden"?n=e():n!==null&&(i=e())}),(a=t==null?void 0:t.defaultView)==null||a.addEventListener("pagehide",()=>o=!0),(r=t==null?void 0:t.defaultView)==null||r.addEventListener("pageshow",()=>o=!1),()=>{var c;let s=typeof navigator>"u"?void 0:navigator,l=(c=s==null?void 0:s.connection)==null?void 0:c.effectiveType;return{visibility:(t==null?void 0:t.visibilityState)??"unknown",was_hidden:n!==null,hidden_at_ms:n,shown_at_ms:i,unloading:o,online:typeof(s==null?void 0:s.onLine)=="boolean"?s.onLine:null,connection:typeof l=="string"?l.slice(0,8):null,...pr((s==null?void 0:s.userAgent)??""),page_ms:e()}}},fr=new Set(["boot_failed","fatal","submit_blocked"]),br=(t,e,n)=>{if(e.unloading||e.visibility==="hidden")return!0;if(t!=="boot_failed"||e.hidden_at_ms===null)return!1;if(n.elapsed_ms===void 0)return!0;let i=e.page_ms-n.elapsed_ms;return e.hidden_at_ms>=i||e.shown_at_ms!==null&&e.shown_at_ms>=i},gr=(t,e,n,i,o)=>{var r;if(e)return"abandoned";if(o.online===!1)return"offline";let a=[i.phase,i.stage,n==null?void 0:n.slice(0,40),i.http_status??((r=i.error)==null?void 0:r.name)];return[...new Set(a.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||t},wr=({config:t,version:e,env:n,seed:i,automated:o=typeof navigator<"u"&&navigator.webdriver===!0,company:a,page:r=hr(),now:s=Date.now,post:l=(c,u)=>fetch(c,u)})=>{let c=mo(i),u=s(),d=t!==void 0&&c%1e4<t.sampleRate*1e4,p=new Set;return{send:(f,h,b={})=>{if(!t||!d||!e)return;let v=r(),k=fr.has(f),y=k&&br(f,v,b),O=y?`${f}:abandoned`:f;if(p.has(O))return;p.add(O);let{error:C,...F}=b,D={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:f,version:e,company_slug:(a==null?void 0:a())??null,env:n==="production"?"production":"staging",mode:o?"test":"live",seed_hash:c.toString(36),sample_rate:t.sampleRate,...h&&{reason:h.slice(0,40)},...k&&{abandoned:y,cause:gr(f,y,h,b,v).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-u)),...v,...F,...C&&{error:C,error_message:C.message,error_frame:C.stack[0]??null}};l(`https://${t.host}`,{method:"POST",keepalive:!0,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json"},body:JSON.stringify(D)}).catch(()=>{})}}},pt,mr={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function vo(t){return!t&&!pt?mr:{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)}}var Ke;function vr(t){return Ke==null?void 0:Ke.get(t)}var Ye;function _r(t){return Ye==null?void 0:Ye.get(t)}var Je;function yr(t,e){var n;return(n=Je==null?void 0:Je.get(t))==null?void 0:n.get(e)}function Rn(t){var n,i;let e=typeof t;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}function ot(t,e,n,i,o){let a=o&&"input"in o?o.input:n.value,r=(o==null?void 0:o.expected)??t.expects??null,s=(o==null?void 0:o.received)??Rn(a),l={kind:t.kind,type:t.type,input:a,expected:r,received:s,message:`Invalid ${e}: ${r?`Expected ${r} but r`:"R"}eceived ${s}`,requirement:t.requirement,path:o==null?void 0:o.path,issues:o==null?void 0:o.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},c=t.kind==="schema",u=(o==null?void 0:o.message)??t.message??yr(t.reference,l.lang)??(c?_r(l.lang):null)??i.message??vr(l.lang);u!==void 0&&(l.message=typeof u=="function"?u(l):u),c&&(n.typed=!1),n.issues?n.issues.push(l):n.issues=[l]}var ki=new WeakMap;function Q(t){let e=ki.get(t);return e||(e={version:1,vendor:"valibot",validate(n){return t["~run"]({value:n},vo())}},ki.set(t,e)),e}function xr(t,e){return Object.prototype.hasOwnProperty.call(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Fn(t,e){let n=[...new Set(t)];return n.length>1?`(${n.join(` ${e} `)})`:n[0]??"never"}function _o(t){return{kind:"transformation",type:"transform",reference:_o,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}var kr={abortEarly:!0};function $r(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function Bn(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function yo(){return{kind:"schema",type:"any",reference:yo,expects:"any",async:!1,get"~standard"(){return Q(this)},"~run"(t){return t.typed=!0,t}}}function xo(t,e){return{kind:"schema",type:"array",reference:xo,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return Q(this)},"~run"(n,i){var a;let o=n.value;if(Array.isArray(o)){n.typed=!0,n.value=[];for(let r=0;r<o.length;r++){let s=o[r],l=this.item["~run"]({value:s},i);if(l.issues){let c={type:"array",origin:"value",input:o,key:r,value:s};for(let u of l.issues)u.path?u.path.unshift(c):u.path=[c],(a=n.issues)==null||a.push(u);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value.push(l.value)}}else ot(this,"type",n,i);return n}}}function Hn(t){return{kind:"schema",type:"boolean",reference:Hn,expects:"boolean",async:!1,message:t,get"~standard"(){return Q(this)},"~run"(e,n){return typeof e.value=="boolean"?e.typed=!0:ot(this,"type",e,n),e}}}function it(t,e){return{kind:"schema",type:"literal",reference:it,expects:Rn(t),async:!1,literal:t,message:e,get"~standard"(){return Q(this)},"~run"(n,i){return n.value===this.literal?n.typed=!0:ot(this,"type",n,i),n}}}function ko(t){return{kind:"schema",type:"null",reference:ko,expects:"null",async:!1,message:t,get"~standard"(){return Q(this)},"~run"(e,n){return e.value===null?e.typed=!0:ot(this,"type",e,n),e}}}function jt(t,e){return{kind:"schema",type:"nullable",reference:jt,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,get"~standard"(){return Q(this)},"~run"(n,i){return n.value===null&&(this.default!==void 0&&(n.value=Bn(this,n,i)),n.value===null)?(n.typed=!0,n):this.wrapped["~run"](n,i)}}}function xe(t){return{kind:"schema",type:"number",reference:xe,expects:"number",async:!1,message:t,get"~standard"(){return Q(this)},"~run"(e,n){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:ot(this,"type",e,n),e}}}function R(t,e){return{kind:"schema",type:"object",reference:R,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return Q(this)},"~run"(n,i){var a;let o=n.value;if(o&&typeof o=="object"){n.typed=!0,n.value={};for(let r in this.entries){let s=this.entries[r];if(r in o||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=r in o?o[r]:Bn(s),c=s["~run"]({value:l},i);if(c.issues){let u={type:"object",origin:"value",input:o,key:r,value:l};for(let d of c.issues)d.path?d.path.unshift(u):d.path=[u],(a=n.issues)==null||a.push(d);if(n.issues||(n.issues=c.issues),i.abortEarly){n.typed=!1;break}}c.typed||(n.typed=!1),n.value[r]=c.value}else if(s.fallback!==void 0)n.value[r]=$r(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(ot(this,"key",n,i,{input:void 0,expected:`"${r}"`,path:[{type:"object",origin:"key",input:o,key:r,value:o[r]}]}),i.abortEarly))break}}else ot(this,"type",n,i);return n}}}function et(t,e){return{kind:"schema",type:"optional",reference:et,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return Q(this)},"~run"(n,i){return n.value===void 0&&(this.default!==void 0&&(n.value=Bn(this,n,i)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,i)}}}function $o(t,e){return{kind:"schema",type:"picklist",reference:$o,expects:Fn(t.map(Rn),"|"),async:!1,options:t,message:e,get"~standard"(){return Q(this)},"~run"(n,i){return this.options.includes(n.value)?n.typed=!0:ot(this,"type",n,i),n}}}function Wn(t,e,n){return{kind:"schema",type:"record",reference:Wn,expects:"Object",async:!1,key:t,value:e,message:n,get"~standard"(){return Q(this)},"~run"(i,o){var r,s;let a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(let l in a)if(xr(a,l)){let c=a[l],u=this.key["~run"]({value:l},o);if(u.issues){let p={type:"object",origin:"key",input:a,key:l,value:c};for(let f of u.issues)f.path=[p],(r=i.issues)==null||r.push(f);if(i.issues||(i.issues=u.issues),o.abortEarly){i.typed=!1;break}}let d=this.value["~run"]({value:c},o);if(d.issues){let p={type:"object",origin:"value",input:a,key:l,value:c};for(let f of d.issues)f.path?f.path.unshift(p):f.path=[p],(s=i.issues)==null||s.push(f);if(i.issues||(i.issues=d.issues),o.abortEarly){i.typed=!1;break}}(!u.typed||!d.typed)&&(i.typed=!1),u.typed&&(i.value[u.value]=d.value)}}else ot(this,"type",i,o);return i}}}function J(t){return{kind:"schema",type:"string",reference:J,expects:"string",async:!1,message:t,get"~standard"(){return Q(this)},"~run"(e,n){return typeof e.value=="string"?e.typed=!0:ot(this,"type",e,n),e}}}function $i(t){let e;if(t)for(let n of t)if(e)for(let i of n.issues)e.push(i);else e=n.issues;return e}function zn(t,e){return{kind:"schema",type:"union",reference:zn,expects:Fn(t.map(n=>n.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return Q(this)},"~run"(n,i){let o,a,r;for(let s of this.options){let l=s["~run"]({value:n.value},i);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{o=l;break}else r?r.push(l):r=[l]}if(o)return o;if(a){if(a.length===1)return a[0];ot(this,"type",n,i,{issues:$i(a)}),n.typed=!0}else{if((r==null?void 0:r.length)===1)return r[0];ot(this,"type",n,i,{issues:$i(r)})}return n}}}function Wt(){return{kind:"schema",type:"unknown",reference:Wt,expects:"unknown",async:!1,get"~standard"(){return Q(this)},"~run"(t){return t.typed=!0,t}}}function So(t,e,n){return{kind:"schema",type:"variant",reference:So,expects:"Object",async:!1,key:t,options:e,message:n,get"~standard"(){return Q(this)},"~run"(i,o){let a=i.value;if(a&&typeof a=="object"){let r,s=0,l=this.key,c=[],u=(d,p)=>{for(let f of d.options){if(f.type==="variant")u(f,new Set(p).add(f.key));else{let h=!0,b=0;for(let v of p){let k=f.entries[v];if(v in a?k["~run"]({typed:!1,value:a[v]},kr).issues:k.type!=="exact_optional"&&k.type!=="optional"&&k.type!=="nullish"){h=!1,l!==v&&(s<b||s===b&&v in a&&!(l in a))&&(s=b,l=v,c=[]),l===v&&c.push(f.entries[v].expects);break}b++}if(h){let v=f["~run"]({value:a},o);(!r||!r.typed&&v.typed)&&(r=v)}}if(r&&!r.issues)break}};if(u(this,new Set([this.key])),r)return r;ot(this,"type",i,o,{input:a[l],expected:Fn(c,"|"),path:[{type:"object",origin:"value",input:a,key:l,value:a[l]}]})}else ot(this,"type",i,o);return i}}}function Sr(...t){return{...t[0],pipe:t,get"~standard"(){return Q(this)},"~run"(e,n){for(let i of t)if(i.kind!=="metadata"){if(e.issues&&(i.kind==="schema"||i.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=i["~run"](e,n))}return e}}}function se(t,e,n){let i=t["~run"]({value:e},vo(n));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}var Er=t=>({ok:!0,err:!1,val:t}),Cr=t=>({err:!0,ok:!1,val:t}),qn=t=>t.filter(e=>(e.type==="question-boolean"||e.type==="question-enum")&&!!e.data.preApply);function Un(t,e,n){var r,s;let i=t.find(l=>l.type==="pre-apply-result");if(!i)return;let o=(r=e[i.data.participationKey])==null?void 0:r.value,a={};if(o===!0)for(let l of qn(t)){let c=(s=e[l.data.key])==null?void 0:s.value;Array.isArray(c)&&c.length===1&&(c=c[0]),(typeof c=="boolean"||typeof c=="string")&&(a[l.data.key]=c)}return{node_id:i.id,flow_session_id:n,participation:o,answers:a}}function Ir(t,e){let n=Un(t,e,""),i=qn(t).map(a=>{let r=a.data.preApply,s=n==null?void 0:n.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(c=>c.value===s);return{key:a.data.key,severity:r.severity,message:r.mismatchMessage,matched:l&&s===r.expectedValue,valid:l}}),o=(n==null?void 0:n.participation)===!1?"skipped":(n==null?void 0:n.participation)===!0&&i.length>0&&i.every(a=>a.valid)?"completed":"unavailable";return{status:o,hasHardConcerns:o==="completed"?i.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:o==="completed"?i.some(a=>!a.matched&&a.severity==="advisory"):null,answers:o==="completed"?i:[]}}function Ar(t,e){let n=new Set(qn(t).map(i=>i.data.key));for(let i of t)i.type==="pre-apply-result"&&(n.add(i.data.key),n.add(i.data.participationKey));return Object.fromEntries(Object.entries(e).filter(([i])=>!n.has(i)))}var Tr=()=>{try{let t=Intl.DateTimeFormat().resolvedOptions().timeZone;return typeof t=="string"&&t.length>0?t:void 0}catch{return}},Et=class extends Error{constructor(){super("Aborted")}},ie=(t,e)=>{if(e.length===0)return;let n=t;for(let i of e){if(n==null||typeof n!="object")return;n=n[i]}return n},Mr=(t,e="all")=>{let n={},i=e==="all"?null:new Set(e);for(let o in t){let a=t[o];a&&(i&&!i.has(o)||(n[o]=a.value))}return n},Eo=(t,e)=>{let n=new Set(t.flatMap(i=>i.type==="add-submission"?[i.data.key]:[]));return Object.entries(e).some(([i,o])=>o!==void 0&&o.type!=="integration"&&!n.has(i))},jr=({key:t,submissions:e})=>{var i;let n=(i=e[t])==null?void 0:i.value;if(typeof n!="string"&&typeof n!="number")throw new Error(`Submission at “${t}” is not a string or number`);return n},Co=({key:t,path:e,submissions:n,context:i})=>{if(t==="$context"){if(!e)return;let o=ie(i,e);switch(typeof o){case"string":return{type:"string",value:o};case"number":return{type:"number",value:o};case"boolean":return{type:"boolean",value:o};default:console.warn(`Unexpected type for $context.${e.join(".")}`,o);return}}return n[t]},Or=t=>{let e=t.split(".").pop();return e?Er(e?"."+e:""):Cr("No file extension found")},Io=(t,e)=>{if(e.length===0)return!0;let n=e.map(i=>i.toLowerCase());return t.every(i=>{let o=Or(i.name);return o.ok&&n.includes(o.val.toLowerCase())})},un={".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"},Dr=t=>[...new Set([...t,...t.map(e=>un[e.toLowerCase()]).filter(e=>e!==void 0)])].join(","),Pr=64*1024,Lr=1024,Nr=[208,207,17,224,161,177,26,225],Rr=[80,75,3,4],pn=(t,e)=>e.every((n,i)=>t[i]===n),Si=(t,e,n=t.length)=>{let i=Array.from(e,a=>a.charCodeAt(0)),o=Math.min(n,t.length)-i.length;for(let a=0;a<=o;a++)if(pn(t.subarray(a),i))return!0;return!1},Fr=t=>{if(Si(t,"%PDF-",Lr))return".pdf";if(pn(t,Nr))return".doc";if(pn(t,Rr)&&Si(t,"word/"))return".docx"},Br=async(t,e)=>{if(Io([t],e))return t;let n=t.name.lastIndexOf(".");if((n===-1?"":t.name.slice(n).toLowerCase())in un)return t;let i=Fr(new Uint8Array(await t.slice(0,Pr).arrayBuffer()));return!i||!e.some(o=>o.toLowerCase()===i)?t:new File([t],`${t.name}${i}`,{type:un[i],lastModified:t.lastModified})},Ao=t=>t<=1e3?`${Math.round(t)}KB`:t<1e3*10?`${(t/1e3).toFixed(1)}MB`:`${Math.round(t/1e3)}MB`,De=t=>typeof t=="string"?t:`+${t.countryCode} ${t.phoneNumber}`,Hr=R({integration_response:R({data:R({redirect_url:J(),message:et(jt(J())),button_text:et(jt(J()))})})}),ke=t=>se(Hr,t).success,Wr=R({integration_response:R({status:et(Wt()),error:R({message:J(),data:et(Wt())})})}),To=t=>se(Wr,t).success,zr=R({success:it(!0),integration_response:R({data:R({outcome:it("pending"),message:et(Wt())}),error:et(ko())})}),$e=t=>{let e=se(zr,t);if(!e.success||ke(t))return;let{message:n}=e.output.integration_response.data;return typeof n=="string"&&n.trim()?{message:n}:{}};R({success:it(!1),message:et(Wt())});var qr=R({error:it("Validation failed"),messages:R({})}),Ur=(t,e)=>e===422&&se(qr,t).success,Vn=(t,e)=>{if(!To(t))return;let n=t.integration_response,i=n.error.data,o=typeof i=="object"&&i!==null?i:{},a=h=>typeof o[h]=="string"?o[h]:void 0,r=h=>typeof o[h]=="boolean"?o[h]:void 0,s=h=>{let b=o[h];return Number.isSafeInteger(b)&&b>=0?b:void 0},l=h=>{let b=a(h),v=b===void 0?NaN:Date.parse(b);return Number.isFinite(v)?v:void 0},c=typeof n.status=="number"?n.status:e,u=a("phase"),d=a("verdict"),p=a("code"),f=c===409&&u==="submit"&&d==="confirmed"?"duplicate":c===410&&p==="job_closed"?"closed":u==="submit"&&d==="unknown"?"unknown":void 0;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:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:f}},Vr=So("reason",[R({outcome:it("sent"),reason:it("sandbox"),ats_label:jt(J())}),R({outcome:it("held"),reason:$o(["production_connection","no_sandbox_known","company_hold"]),ats_label:jt(J())}),R({outcome:it("internal"),reason:it("internal"),ats_label:jt(J())}),R({outcome:it("held"),reason:it("redirect"),ats_label:J()})]),Kr=t=>{let e=se(R({staging_destination:Vr}),t);if(!e.success)return;let n=e.output.staging_destination;switch(n.reason){case"sandbox":return`Staging: sent to ${n.ats_label===null?"the ATS":n.ats_label} sandbox`;case"production_connection":return"Staging: held, production connection";case"no_sandbox_known":return"Staging: held, no sandbox known";case"company_hold":return"Staging: held, company set to hold all";case"internal":return"Staging: saved in inploi (no ATS)";case"redirect":return`Staging: held, redirect to ${n.ats_label}`}},Mo=3e4,Yr=2e4,Jr=6e4,Kn=12e4,jo=360*6e4,Oo=60*6e4,Do=t=>{let e=(t==null?void 0:t.reason)==="provider_maintenance"?t.maintenanceUntil:void 0,n=e===void 0?0:e-Date.now();return n>0&&n<=jo?e:void 0},Gr=t=>{if((t==null?void 0:t.reason)!=="provider_maintenance"||t.outcome==="unknown")return;let e=Do(t);return e===void 0?{}:{until:e}},Po=(t,e)=>new Intl.DateTimeFormat(e,{hour:"numeric",minute:"2-digit"}).format(t),Zr=(t,e)=>{let n=Do(e);if(n!==void 0)return{waitMs:n-Date.now(),throttles:(t??0)+1,maintenance:!0};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:Mo};let i=(t??0)+1,o=Math.min(i*Yr,Jr),a=(e.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(o,a),Kn),throttles:i}},Ei=t=>(t==null?void 0:t.code)==="captcha_failed"&&t.verdict==="not_submitted",Xr=t=>{if(!To(t))return!1;let e=t.integration_response.error.data;return typeof e=="object"&&e!==null&&"fallback"in e&&e.fallback==="contact"},Qr=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",ts=t=>(t==null?void 0:t.outcome)==="unknown"&&t.code==="repeatable_provider_crash",es=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,ns=(t,e)=>{if(typeof t!="object"||t===null)return null;let n=t.integration_response;if(typeof n!="object"||n===null){if(e===void 0)return null;let l="code"in t&&typeof t.code=="string"?t.code:void 0;return{service:"API",response:{status:e,payload:l===void 0?{}:{code:l}}}}let i=n;if(typeof i.status!="number"||i.service!==void 0&&typeof i.service!="string")return null;let o="data"in i,a=i.error,r=typeof a=="object"&&a!==null&&typeof a.message=="string"&&"data"in a;if(!o&&!r)return null;let s=o?i.data:a.data??null;return{service:i.service??"INVALID_SERVICE",response:{status:i.status,payload:s},...$e(t)&&{outcome:"pending"}}},is=t=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return!1;let e=new Date(`${t}T00:00:00Z`);return Number.isFinite(e.getTime())&&e.toISOString().slice(0,10)===t},os=(t,e)=>{if(!is(t))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(e,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${t}T00:00:00Z`))},as=t=>new Promise((e,n)=>{let i=new FileReader;i.onload=()=>{if(typeof i.result!="string"||!i.result)return n(new Error("Invalid file"));e(i.result)},i.onerror=n,i.readAsDataURL(t)}),Ci=t=>typeof t=="object"&&t!==null&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null),Yn=(t,e)=>t?{...t,...Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0).map(([n,i])=>{let o=t[n];return[n,Ci(o)&&Ci(i)?Yn(o,i):i]}))}:e,rs=({context:t,schema:e,logger:n})=>{if(e)for(let i in e){let o=e[i];if(!o)continue;let a=ie(t,i.split("."));if(o.required&&a==null){let r=`Configuration error in context: ${i} is required`;throw n.error(r),new Error(r)}if(a!=null)switch(o.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${i} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${i} is not a string`);break;default:o.type}}},Lo=Sr(zn([J(),xe()]),_o(String)),No=R({id:Lo,version:xe(),build:xe(),nodes:xo(yo()),context_schema:et(jt(Wn(J(),R({required:Hn(),type:zn([it("string"),it("number")])}))))}),ss=R({flow:No}),ls=R({company:R({name:J()}),context:et(Wn(J(),Wt())),flow:No,job:R({id:Lo,title:J()}),user:et(R({city:et(J()),country:et(J()),isEU:et(Hn()),continent:et(J())}))}),cs=(t,e)=>({id:t.job.id,id_type:(e==null?void 0:e.idType)==="internal"&&e.id===t.job.id?"internal":"external"}),ds=Dt.endpoint({pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Dt.typed(),response:ls}}),us=Dt.endpoint({pathname:"/flow/id/:id",method:"GET",schema:{response:ss}}),le,m,Ro,Fo,Tt,Ii,Bo,hn,Ho,Ft={},Wo=[],ps=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Pe=Array.isArray;function mt(t,e){for(var n in e)t[n]=e[n];return t}function zo(t){var e=t.parentNode;e&&e.removeChild(t)}function st(t,e,n){var i,o,a,r={};for(a in e)a=="key"?i=e[a]:a=="ref"?o=e[a]:r[a]=e[a];if(arguments.length>2&&(r.children=arguments.length>3?le.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)r[a]===void 0&&(r[a]=t.defaultProps[a]);return Qt(t,r,i,o,null)}function Qt(t,e,n,i,o){var a={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:o??++Ro};return o==null&&m.vnode!=null&&m.vnode(a),a}function hs(){return{current:null}}function lt(t){return t.children}function dt(t,e){this.props=t,this.context=e}function Se(t,e){if(e==null)return t.__?Se(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Se(t):null}function qo(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return qo(t)}}function fn(t){(!t.__d&&(t.__d=!0)&&Tt.push(t)&&!Ee.__r++||Ii!==m.debounceRendering)&&((Ii=m.debounceRendering)||Bo)(Ee)}function Ee(){var t,e,n,i,o,a,r,s,l;for(Tt.sort(hn);t=Tt.shift();)t.__d&&(e=Tt.length,i=void 0,o=void 0,a=void 0,s=(r=(n=t).__v).__e,(l=n.__P)&&(i=[],o=[],(a=mt({},r)).__v=r.__v+1,Jn(l,r,a,n.__n,l.ownerSVGElement!==void 0,r.__h!=null?[s]:null,i,s??Se(r),r.__h,o),Yo(i,r,o),r.__e!=s&&qo(r)),Tt.length>e&&Tt.sort(hn));Ee.__r=0}function Uo(t,e,n,i,o,a,r,s,l,c,u){var d,p,f,h,b,v,k,y,O,C,F=0,D=i&&i.__k||Wo,B=D.length,x=B,_=e.length;for(n.__k=[],d=0;d<_;d++)(h=n.__k[d]=(h=e[d])==null||typeof h=="boolean"||typeof h=="function"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"?Qt(null,h,null,null,h):Pe(h)?Qt(lt,{children:h},null,null,null):h.__b>0?Qt(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null&&(h.__=n,h.__b=n.__b+1,(y=fs(h,D,k=d+F,x))===-1?f=Ft:(f=D[y]||Ft,D[y]=void 0,x--),Jn(t,h,f,o,a,r,s,l,c,u),b=h.__e,(p=h.ref)&&f.ref!=p&&(f.ref&&Gn(f.ref,null,h),u.push(p,h.__c||b,h)),b!=null&&(v==null&&(v=b),C=!(O=f===Ft||f.__v===null)&&y===k,O?y==-1&&F--:y!==k&&(y===k+1?(F++,C=!0):y>k?x>_-k?(F+=y-k,C=!0):F--:F=y<k&&y==k-1?y-k:0),k=d+F,C=C||y==d&&!O,typeof h.type!="function"||y===k&&f.__k!==h.__k?typeof h.type=="function"||C?h.__d!==void 0?(l=h.__d,h.__d=void 0):l=b.nextSibling:l=Ko(t,b,l):l=Vo(h,l,t),typeof n.type=="function"&&(n.__d=l)));for(n.__e=v,d=B;d--;)D[d]!=null&&(typeof n.type=="function"&&D[d].__e!=null&&D[d].__e==n.__d&&(n.__d=D[d].__e.nextSibling),Jo(D[d],D[d]))}function Vo(t,e,n){for(var i,o=t.__k,a=0;o&&a<o.length;a++)(i=o[a])&&(i.__=t,e=typeof i.type=="function"?Vo(i,e,n):Ko(n,i.__e,e));return e}function vt(t,e){return e=e||[],t==null||typeof t=="boolean"||(Pe(t)?t.some(function(n){vt(n,e)}):e.push(t)),e}function Ko(t,e,n){return n==null||n.parentNode!==t?t.insertBefore(e,null):e==n&&e.parentNode!=null||t.insertBefore(e,n),e.nextSibling}function fs(t,e,n,i){var o=t.key,a=t.type,r=n-1,s=n+1,l=e[n];if(l===null||l&&o==l.key&&a===l.type)return n;if(i>(l!=null?1:0))for(;r>=0||s<e.length;){if(r>=0){if((l=e[r])&&o==l.key&&a===l.type)return r;r--}if(s<e.length){if((l=e[s])&&o==l.key&&a===l.type)return s;s++}}return-1}function bs(t,e,n,i,o){var a;for(a in n)a==="children"||a==="key"||a in e||Ce(t,a,null,n[a],i);for(a in e)o&&typeof e[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||n[a]===e[a]||Ce(t,a,e[a],n[a],i)}function Ai(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||ps.test(e)?n:n+"px"}function Ce(t,e,n,i,o){var a;t:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Ai(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||Ai(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")a=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+a]=n,n?i||t.addEventListener(e,a?Mi:Ti,a):t.removeEventListener(e,a?Mi:Ti,a);else if(e!=="dangerouslySetInnerHTML"){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,n))}}function Ti(t){return this.l[t.type+!1](m.event?m.event(t):t)}function Mi(t){return this.l[t.type+!0](m.event?m.event(t):t)}function Jn(t,e,n,i,o,a,r,s,l,c){var u,d,p,f,h,b,v,k,y,O,C,F,D,B,x,_=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,s=e.__e=n.__e,e.__h=null,a=[s]),(u=m.__b)&&u(e);try{t:if(typeof _=="function"){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 dt(k,O),d.constructor=_,d.render=ws),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))),f=d.props,h=d.state,d.__v=e,p)_.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(_.getDerivedStateFromProps==null&&k!==f&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(k,O),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(k,d.__s,O)===!1||e.__v===n.__v)){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){S&&(S.__=e)}),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[],d.__h.length&&r.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(k,d.__s,O),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(f,h,b)})}if(d.context=O,d.props=k,d.__P=t,d.__e=!1,F=m.__r,D=0,"prototype"in _&&_.prototype.render){for(d.state=d.__s,d.__d=!1,F&&F(e),u=d.render(d.props,d.state,d.context),B=0;B<d._sb.length;B++)d.__h.push(d._sb[B]);d._sb=[]}else do d.__d=!1,F&&F(e),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++D<25);d.state=d.__s,d.getChildContext!=null&&(i=mt(mt({},i),d.getChildContext())),p||d.getSnapshotBeforeUpdate==null||(b=d.getSnapshotBeforeUpdate(f,h)),Uo(t,Pe(x=u!=null&&u.type===lt&&u.key==null?u.props.children:u)?x:[x],e,n,i,o,a,r,s,l,c),d.base=e.__e,e.__h=null,d.__h.length&&r.push(d),v&&(d.__E=d.__=null)}else a==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=gs(n.__e,e,n,i,o,a,r,l,c);(u=m.diffed)&&u(e)}catch(S){e.__v=null,(l||a!=null)&&(e.__e=s,e.__h=!!l,a[a.indexOf(s)]=null),m.__e(S,e,n)}}function Yo(t,e,n){for(var i=0;i<n.length;i++)Gn(n[i],n[++i],n[++i]);m.__c&&m.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(a){a.call(o)})}catch(a){m.__e(a,o.__v)}})}function gs(t,e,n,i,o,a,r,s,l){var c,u,d,p=n.props,f=e.props,h=e.type,b=0;if(h==="svg"&&(o=!0),a!=null){for(;b<a.length;b++)if((c=a[b])&&"setAttribute"in c==!!h&&(h?c.localName===h:c.nodeType===3)){t=c,a[b]=null;break}}if(t==null){if(h===null)return document.createTextNode(f);t=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),a=null,s=!1}if(h===null)p===f||s&&t.data===f||(t.data=f);else{if(a=a&&le.call(t.childNodes),u=(p=n.props||Ft).dangerouslySetInnerHTML,d=f.dangerouslySetInnerHTML,!s){if(a!=null)for(p={},b=0;b<t.attributes.length;b++)p[t.attributes[b].name]=t.attributes[b].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(bs(t,f,p,o,s),d)e.__k=[];else if(Uo(t,Pe(b=e.props.children)?b:[b],e,n,i,o&&h!=="foreignObject",a,r,a?a[0]:n.__k&&Se(n,0),s,l),a!=null)for(b=a.length;b--;)a[b]!=null&&zo(a[b]);s||("value"in f&&(b=f.value)!==void 0&&(b!==t.value||h==="progress"&&!b||h==="option"&&b!==p.value)&&Ce(t,"value",b,p.value,!1),"checked"in f&&(b=f.checked)!==void 0&&b!==t.checked&&Ce(t,"checked",b,p.checked,!1))}return t}function Gn(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(i){m.__e(i,n)}}function Jo(t,e,n){var i,o;if(m.unmount&&m.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||Gn(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){m.__e(a,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&Jo(i[o],e,n||typeof t.type!="function");n||t.__e==null||zo(t.__e),t.__=t.__e=t.__d=void 0}function ws(t,e,n){return this.constructor(t,n)}function Pt(t,e,n){var i,o,a,r;m.__&&m.__(t,e),o=(i=typeof n=="function")?null:n&&n.__k||e.__k,a=[],r=[],Jn(e,t=(!i&&n||e).__k=st(lt,null,[t]),o||Ft,Ft,e.ownerSVGElement!==void 0,!i&&n?[n]:o?null:e.firstChild?le.call(e.childNodes):null,a,!i&&n?n:o?o.__e:e.firstChild,i,r),Yo(a,t,r)}function Go(t,e){Pt(t,e,Go)}function ms(t,e,n){var i,o,a,r,s=mt({},t.props);for(a in t.type&&t.type.defaultProps&&(r=t.type.defaultProps),e)a=="key"?i=e[a]:a=="ref"?o=e[a]:s[a]=e[a]===void 0&&r!==void 0?r[a]:e[a];return arguments.length>2&&(s.children=arguments.length>3?le.call(arguments,2):n),Qt(t.type,s,i||t.key,o||t.ref,null)}function Zo(t,e){var n={__c:e="__cC"+Ho++,__:t,Consumer:function(i,o){return i.children(o)},Provider:function(i){var o,a;return this.getChildContext||(o=[],(a={})[e]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(r){this.props.value!==r.value&&o.some(function(s){s.__e=!0,fn(s)})},this.sub=function(r){o.push(r);var s=r.componentWillUnmount;r.componentWillUnmount=function(){o.splice(o.indexOf(r),1),s&&s.call(r)}}),i.children}};return n.Provider.__=n.Consumer.contextType=n}le=Wo.slice,m={__e:function(t,e,n,i){for(var o,a,r;e=e.__;)if((o=e.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(t)),r=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,i||{}),r=o.__d),r)return o.__E=o}catch(s){t=s}throw t}},Ro=0,Fo=function(t){return t!=null&&t.constructor===void 0},dt.prototype.setState=function(t,e){var n;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),fn(this))},dt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),fn(this))},dt.prototype.render=lt,Tt=[],Bo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,hn=function(t,e){return t.__v.__b-e.__v.__b},Ee.__r=0,Ho=0;var Ct,N,Ge,ji,zt=0,Xo=[],ge=[],Oi=m.__b,Di=m.__r,Pi=m.diffed,Li=m.__c,Ni=m.unmount;function qt(t,e){m.__h&&m.__h(N,t,zt||e),zt=0;var n=N.__H||(N.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:ge}),n.__[t]}function Zn(t){return zt=1,Qo(ea,t)}function Qo(t,e,n){var i=qt(Ct++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):ea(void 0,e),function(s){var l=i.__N?i.__N[0]:i.__[0],c=i.t(l,s);l!==c&&(i.__N=[c,i.__[1]],i.__c.setState({}))}],i.__c=N,!N.u)){var o=function(s,l,c){if(!i.__c.__H)return!0;var u=i.__c.__H.__.filter(function(p){return p.__c});if(u.every(function(p){return!p.__N}))return!a||a.call(this,s,l,c);var d=!1;return u.forEach(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(d=!0)}}),!(!d&&i.__c.props===s)&&(!a||a.call(this,s,l,c))};N.u=!0;var a=N.shouldComponentUpdate,r=N.componentWillUpdate;N.componentWillUpdate=function(s,l,c){if(this.__e){var u=a;a=void 0,o(s,l,c),a=u}r&&r.call(this,s,l,c)},N.shouldComponentUpdate=o}return i.__N||i.__}function Le(t,e){var n=qt(Ct++,3);!m.__s&&Xn(n.__H,e)&&(n.__=t,n.i=e,N.__H.__h.push(n))}function Nt(t,e){var n=qt(Ct++,4);!m.__s&&Xn(n.__H,e)&&(n.__=t,n.i=e,N.__h.push(n))}function Lt(t){return zt=5,It(function(){return{current:t}},[])}function vs(t,e,n){zt=6,Nt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function It(t,e){var n=qt(Ct++,7);return Xn(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function _s(t,e){return zt=8,It(function(){return t},e)}function ta(t){var e=N.context[t.__c],n=qt(Ct++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(N)),e.props.value):t.__}function ys(t,e){m.useDebugValue&&m.useDebugValue(e?e(t):t)}function xs(){var t=qt(Ct++,11);if(!t.__){for(var e=N.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function ks(){for(var t;t=Xo.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(we),t.__H.__h.forEach(bn),t.__H.__h=[]}catch(e){t.__H.__h=[],m.__e(e,t.__v)}}m.__b=function(t){N=null,Oi&&Oi(t)},m.__r=function(t){Di&&Di(t),Ct=0;var e=(N=t.__c).__H;e&&(Ge===N?(e.__h=[],N.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=ge,n.__N=n.i=void 0})):(e.__h.forEach(we),e.__h.forEach(bn),e.__h=[],Ct=0)),Ge=N},m.diffed=function(t){Pi&&Pi(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Xo.push(e)!==1&&ji===m.requestAnimationFrame||((ji=m.requestAnimationFrame)||$s)(ks)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==ge&&(n.__=n.__V),n.i=void 0,n.__V=ge})),Ge=N=null},m.__c=function(t,e){e.some(function(n){try{n.__h.forEach(we),n.__h=n.__h.filter(function(i){return!i.__||bn(i)})}catch(i){e.some(function(o){o.__h&&(o.__h=[])}),e=[],m.__e(i,n.__v)}}),Li&&Li(t,e)},m.unmount=function(t){Ni&&Ni(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{we(i)}catch(o){e=o}}),n.__H=void 0,e&&m.__e(e,n.__v))};var Ri=typeof requestAnimationFrame=="function";function $s(t){var e,n=function(){clearTimeout(i),Ri&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);Ri&&(e=requestAnimationFrame(n))}function we(t){var e=N,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),N=e}function bn(t){var e=N;t.__c=t.__(),N=e}function Xn(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function ea(t,e){return typeof e=="function"?e(t):e}var Ss=Symbol.for("preact-signals");function Qn(){if(Bt>1)Bt--;else{for(var t,e=!1;te!==void 0;){var n=te;for(te=void 0,gn++;n!==void 0;){var i=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&ia(n))try{n.c()}catch(o){e||(t=o,e=!0)}n=i}}if(gn=0,Bt--,e)throw t}}var P=void 0,te=void 0,Bt=0,gn=0,Ie=0;function na(t){if(P!==void 0){var e=t.n;if(e===void 0||e.t!==P)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;if(e.i===-1)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}}function G(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}G.prototype.brand=Ss;G.prototype.h=function(){return!0};G.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};G.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;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)}};G.prototype.subscribe=function(t){var e=this;return Ne(function(){var n=e.value,i=P;P=void 0;try{t(n)}finally{P=i}})};G.prototype.valueOf=function(){return this.value};G.prototype.toString=function(){return this.value+""};G.prototype.toJSON=function(){return this.value};G.prototype.peek=function(){var t=P;P=void 0;try{return this.value}finally{P=t}};Object.defineProperty(G.prototype,"value",{get:function(){var t=na(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(gn>100)throw new Error("Cycle detected");this.v=t,this.i++,Ie++,Bt++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Qn()}}}});function rt(t){return new G(t)}function ia(t){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;return!1}function oa(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function aa(t){for(var e=t.s,n=void 0;e!==void 0;){var i=e.p;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}t.s=n}function Ut(t){G.call(this,void 0),this.x=t,this.s=void 0,this.g=Ie-1,this.f=4}(Ut.prototype=new G).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ie))return!0;if(this.g=Ie,this.f|=1,this.i>0&&!ia(this))return this.f&=-2,!0;var t=P;try{oa(this),P=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return P=t,aa(this),this.f&=-2,!0};Ut.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}G.prototype.S.call(this,t)};Ut.prototype.U=function(t){if(this.t!==void 0&&(G.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Ut.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Ut.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=na(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Es(t){return new Ut(t)}function ra(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Bt++;var n=P;P=void 0;try{e()}catch(i){throw t.f&=-2,t.f|=8,ti(t),i}finally{P=n,Qn()}}}function ti(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ra(t)}function Cs(t){if(P!==this)throw new Error("Out-of-order effect");aa(this),P=t,this.f&=-2,8&this.f&&ti(this),Qn()}function ce(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}ce.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};ce.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ra(this),oa(this),Bt++;var t=P;return P=this,Cs.bind(this,t)};ce.prototype.N=function(){2&this.f||(this.f|=2,this.o=te,te=this)};ce.prototype.d=function(){this.f|=8,1&this.f||ti(this)};function Ne(t){var e=new ce(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Ze;function Vt(t,e){m[t]=e.bind(null,m[t]||function(){})}function Ae(t){Ze&&Ze(),Ze=t&&t.S()}function sa(t){var e=this,n=t.data,i=As(n);i.value=n;var o=It(function(){for(var a=e.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return e.__$u.c=function(){var r;!Fo(o.peek())&&((r=e.base)==null?void 0:r.nodeType)===3?e.base.data=o.peek():(e.__$f|=1,e.setState({}))},Es(function(){var r=i.value.value;return r===0?0:r===!0?"":r||""})},[]);return o.value}sa.displayName="_st";Object.defineProperties(G.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:sa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Vt("__b",function(t,e){if(typeof e.type=="string"){var n,i=e.props;for(var o in i)if(o!=="children"){var a=i[o];a instanceof G&&(n||(e.__np=n={}),n[o]=a,i[o]=a.peek())}}t(e)});Vt("__r",function(t,e){Ae();var n,i=e.__c;i&&(i.__$f&=-2,(n=i.__$u)===void 0&&(i.__$u=n=(function(o){var a;return Ne(function(){a=this}),a.c=function(){i.__$f|=1,i.setState({})},a})())),Ae(n),t(e)});Vt("__e",function(t,e,n,i){Ae(),t(e,n,i)});Vt("diffed",function(t,e){Ae();var n;if(typeof e.type=="string"&&(n=e.__e)){var i=e.__np,o=e.props;if(i){var a=n.U;if(a)for(var r in a){var s=a[r];s!==void 0&&!(r in i)&&(s.d(),a[r]=void 0)}else n.U=a={};for(var l in i){var c=a[l],u=i[l];c===void 0?(c=Is(n,l,u,o),a[l]=c):c.o(u,o)}}}t(e)});function Is(t,e,n,i){var o=e in t&&t.ownerSVGElement===void 0,a=rt(n);return{o:function(r,s){a.value=r,i=s},d:Ne(function(){var r=a.value.value;i[e]!==r&&(i[e]=r,o?t[e]=r:r?t.setAttribute(e,r):t.removeAttribute(e))})}}Vt("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var i=n.U;if(i){n.U=void 0;for(var o in i){var a=i[o];a&&a.d()}}}}else{var r=e.__c;if(r){var s=r.__$u;s&&(r.__$u=void 0,s.d())}}t(e)});Vt("__h",function(t,e,n,i){(i<3||i===9)&&(e.__$f|=2),t(e,n,i)});dt.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var i in e)return!0;for(var o in t)if(o!=="__source"&&t[o]!==this.props[o])return!0;for(var a in this.props)if(!(a in t))return!0;return!1};function As(t){return It(function(){return rt(t)},[])}const nt=Symbol.for("@ts-pattern/matcher"),la=Symbol.for("@ts-pattern/isVariadic"),Te="@ts-pattern/anonymous-select-key",wn=t=>!!(t&&typeof t=="object"),me=t=>t&&!!t[nt],q=(t,e,n)=>{if(me(t)){const i=t[nt](),{matched:o,selections:a}=i.match(e);return o&&a&&Object.keys(a).forEach(r=>n(r,a[r])),o}if(wn(t)){if(!wn(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let i=[],o=[],a=[];for(const r of t.keys()){const s=t[r];me(s)&&s[la]?a.push(s):a.length?o.push(s):i.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<i.length+o.length)return!1;const r=e.slice(0,i.length),s=o.length===0?[]:e.slice(-o.length),l=e.slice(i.length,o.length===0?1/0:-o.length);return i.every((c,u)=>q(c,r[u],n))&&o.every((c,u)=>q(c,s[u],n))&&(a.length===0||q(a[0],l,n))}return t.length===e.length&&t.every((r,s)=>q(r,e[s],n))}return Reflect.ownKeys(t).every(i=>{const o=t[i];return(i in e||me(a=o)&&a[nt]().matcherType==="optional")&&q(o,e[i],n);var a})}return Object.is(e,t)},tt=t=>{var e,n,i;return wn(t)?me(t)?(e=(n=(i=t[nt]()).getSelectionKeys)==null?void 0:n.call(i))!=null?e:[]:Array.isArray(t)?oe(t,tt):oe(Object.values(t),tt):[]},oe=(t,e)=>t.reduce((n,i)=>n.concat(e(i)),[]);function ca(...t){if(t.length===1){const[e]=t;return n=>q(e,n,()=>{})}if(t.length===2){const[e,n]=t;return q(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function K(t){return Object.assign(t,{optional:()=>ei(t),and:e=>L(t,e),or:e=>da(t,e),select:e=>e===void 0?ae(t):ae(e,t)})}function mn(t){return Object.assign((e=>Object.assign(e,{[Symbol.iterator](){let n=0;const i=[{value:Object.assign(e,{[la]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var o;return(o=i[n++])!=null?o:i.at(-1)}}}}))(t),{optional:()=>mn(ei(t)),select:e=>mn(e===void 0?ae(t):ae(e,t))})}function ei(t){return K({[nt]:()=>({match:e=>{let n={};const i=(o,a)=>{n[o]=a};return e===void 0?(tt(t).forEach(o=>i(o,void 0)),{matched:!0,selections:n}):{matched:q(t,e,i),selections:n}},getSelectionKeys:()=>tt(t),matcherType:"optional"})})}const Ts=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},Ms=(t,e)=>{for(const[n,i]of t.entries())if(!e(i,n))return!1;return!0},js=(t,e)=>{const n=Reflect.ownKeys(t);for(const i of n)if(!e(i,t[i]))return!1;return!0};function L(...t){return K({[nt]:()=>({match:e=>{let n={};const i=(o,a)=>{n[o]=a};return{matched:t.every(o=>q(o,e,i)),selections:n}},getSelectionKeys:()=>oe(t,tt),matcherType:"and"})})}function da(...t){return K({[nt]:()=>({match:e=>{let n={};const i=(o,a)=>{n[o]=a};return oe(t,tt).forEach(o=>i(o,void 0)),{matched:t.some(o=>q(o,e,i)),selections:n}},getSelectionKeys:()=>oe(t,tt),matcherType:"or"})})}function T(t){return{[nt]:()=>({match:e=>({matched:!!t(e)})})}}function ae(...t){const e=typeof t[0]=="string"?t[0]:void 0,n=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return K({[nt]:()=>({match:i=>{let o={[e??Te]:i};return{matched:n===void 0||q(n,i,(a,r)=>{o[a]=r}),selections:o}},getSelectionKeys:()=>[e??Te].concat(n===void 0?[]:tt(n))})})}function ua(t){return!0}function ft(t){return typeof t=="number"}function xt(t){return typeof t=="string"}function kt(t){return typeof t=="bigint"}const pa=K(T(ua)),Os=K(T(ua)),Ds=pa,$t=t=>Object.assign(K(t),{startsWith:e=>{return $t(L(t,(n=e,T(i=>xt(i)&&i.startsWith(n)))));var n},endsWith:e=>{return $t(L(t,(n=e,T(i=>xt(i)&&i.endsWith(n)))));var n},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=>{return $t(L(t,(n=e,T(i=>xt(i)&&i.includes(n)))));var n},regex:e=>{return $t(L(t,(n=e,T(i=>xt(i)&&!!i.match(n)))));var n}}),Fi=$t(T(xt)),bt=t=>Object.assign(K(t),{between:(e,n)=>bt(L(t,((i,o)=>T(a=>ft(a)&&i<=a&&o>=a))(e,n))),lt:e=>bt(L(t,(n=>T(i=>ft(i)&&i<n))(e))),gt:e=>bt(L(t,(n=>T(i=>ft(i)&&i>n))(e))),lte:e=>bt(L(t,(n=>T(i=>ft(i)&&i<=n))(e))),gte:e=>bt(L(t,(n=>T(i=>ft(i)&&i>=n))(e))),int:()=>bt(L(t,T(e=>ft(e)&&Number.isInteger(e)))),finite:()=>bt(L(t,T(e=>ft(e)&&Number.isFinite(e)))),positive:()=>bt(L(t,T(e=>ft(e)&&e>0))),negative:()=>bt(L(t,T(e=>ft(e)&&e<0)))}),Ps=bt(T(ft)),St=t=>Object.assign(K(t),{between:(e,n)=>St(L(t,((i,o)=>T(a=>kt(a)&&i<=a&&o>=a))(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)))}),Ls=St(T(kt)),Ns=K(T(function(t){return typeof t=="boolean"})),Rs=K(T(function(t){return typeof t=="symbol"})),Fs=K(T(function(t){return t==null})),Bs=K(T(function(t){return t!=null}));var Mt={__proto__:null,matcher:nt,optional:ei,array:function(...t){return mn({[nt]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const n=t[0];let i={};if(e.length===0)return tt(n).forEach(a=>{i[a]=[]}),{matched:!0,selections:i};const o=(a,r)=>{i[a]=(i[a]||[]).concat([r])};return{matched:e.every(a=>q(n,a,o)),selections:i}},getSelectionKeys:()=>t.length===0?[]:tt(t[0])})})},set:function(...t){return K({[nt]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};if(t.length===0)return{matched:!0};const i=(a,r)=>{n[a]=(n[a]||[]).concat([r])},o=t[0];return{matched:Ts(e,a=>q(o,a,i)),selections:n}},getSelectionKeys:()=>t.length===0?[]:tt(t[0])})})},map:function(...t){return K({[nt]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};const i=(s,l)=>{n[s]=(n[s]||[]).concat([l])};if(t.length===0)return{matched:!0};var o;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=t[0])==null?void 0:o.toString()}`);const[a,r]=t;return{matched:Ms(e,(s,l)=>{const c=q(a,l,i),u=q(r,s,i);return c&&u}),selections:n}},getSelectionKeys:()=>t.length===0?[]:[...tt(t[0]),...tt(t[1])]})})},record:function(...t){return K({[nt]:()=>({match:e=>{if(e===null||typeof e!="object"||Array.isArray(e))return{matched:!1};var n;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()}`);let i={};const o=(s,l)=>{i[s]=(i[s]||[]).concat([l])},[a,r]=t.length===1?[Fi,t[0]]:t;return{matched:js(e,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),u=c!==null&&q(a,c,o),d=q(a,s,o),p=q(r,l,o);return(d||u)&&p}),selections:i}},getSelectionKeys:()=>t.length===0?[]:[...tt(t[0]),...tt(t[1])]})})},intersection:L,union:da,not:function(t){return K({[nt]:()=>({match:e=>({matched:!q(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:T,select:ae,any:pa,unknown:Os,_:Ds,string:Fi,number:Ps,bigint:Ls,boolean:Ns,symbol:Rs,nullish:Fs,nonNullable:Bs,instanceOf:function(t){return K(T((function(e){return n=>n instanceof e})(t)))},shape:function(t){return K(T(ca(t)))}};let Hs=class extends Error{constructor(e){let n;try{n=JSON.stringify(e)}catch{n=e}super(`Pattern matching error: no pattern matches value ${n}`),this.input=void 0,this.input=e}};const vn={matched:!1,value:void 0};function Re(t){return new Ws(t,vn)}let Ws=class _n{constructor(e,n){this.input=void 0,this.state=void 0,this.input=e,this.state=n}with(...e){if(this.state.matched)return this;const n=e[e.length-1],i=[e[0]];let o;e.length===3&&typeof e[1]=="function"?o=e[1]:e.length>2&&i.push(...e.slice(1,e.length-1));let a=!1,r={};const s=(c,u)=>{a=!0,r[c]=u},l=!i.some(c=>q(c,this.input,s))||o&&!o(this.input)?vn:{matched:!0,value:n(a?Te in r?r[Te]:r:this.input,this.input)};return new _n(this.input,l)}when(e,n){if(this.state.matched)return this;const i=!!e(this.input);return new _n(this.input,i?{matched:!0,value:n(this.input,this.input)}:vn)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=zs){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function zs(t){throw new Hs(t)}var qs=0;function g(t,e,n,i,o,a){var r,s,l={};for(s in e)s=="ref"?r=e[s]:l[s]=e[s];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:--qs,__source:o,__self:a};if(typeof t=="function"&&(r=t.defaultProps))for(s in r)l[s]===void 0&&(l[s]=r[s]);return m.vnode&&m.vnode(c),c}function ha(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=ha(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function Fe(){for(var t,e,n=0,i="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=ha(t))&&(i&&(i+=" "),i+=e);return i}const Bi=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Hi=Fe,Be=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return Hi(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=e,r=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=a==null?void 0:a[c];if(u===null)return null;const p=Bi(u)||Bi(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(h=>{let[b,v]=h;return Array.isArray(v)?v.includes({...a,...s}[b]):{...a,...s}[b]===v})?[...c,d,p]:c},[]);return Hi(t,r,l,n==null?void 0:n.class,n==null?void 0:n.className)};function fa(t,e){for(var n in e)t[n]=e[n];return t}function yn(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var i in e)if(i!=="__source"&&t[i]!==e[i])return!0;return!1}function Xe(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function xn(t){this.props=t}function Us(t,e){function n(o){var a=this.props.ref,r=a==o.ref;return!r&&a&&(a.call?a(null):a.current=null),e?!e(this.props,o)||!r:yn(this.props,o)}function i(o){return this.shouldComponentUpdate=n,st(t,o)}return i.displayName="Memo("+(t.displayName||t.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(xn.prototype=new dt).isPureReactComponent=!0,xn.prototype.shouldComponentUpdate=function(t,e){return yn(this.props,t)||yn(this.state,e)};var Wi=m.__b;m.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Wi&&Wi(t)};var Vs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ba(t){function e(n){var i=fa({},n);return delete i.ref,t(i,n.ref||null)}return e.$$typeof=Vs,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var zi=function(t,e){return t==null?null:vt(vt(t).map(e))},Ks={map:zi,forEach:zi,count:function(t){return t?vt(t).length:0},only:function(t){var e=vt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:vt},Ys=m.__e;m.__e=function(t,e,n,i){if(t.then){for(var o,a=e;a=a.__;)if((o=a.__c)&&o.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e)}Ys(t,e,n,i)};var qi=m.unmount;function ga(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),t.__c.__H=null),(t=fa({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(i){return ga(i,e,n)})),t}function wa(t,e,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(i){return wa(i,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function ee(){this.__u=0,this.t=null,this.__b=null}function ma(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function va(t){var e,n,i;function o(a){if(e||(e=t()).then(function(r){n=r.default||r},function(r){i=r}),i)throw i;if(!n)throw e;return st(n,a)}return o.displayName="Lazy",o.__f=!0,o}function Zt(){this.u=null,this.o=null}m.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),qi&&qi(t)},(ee.prototype=new dt).__c=function(t,e){var n=e.__c,i=this;i.t==null&&(i.t=[]),i.t.push(n);var o=ma(i.__v),a=!1,r=function(){a||(a=!0,n.__R=null,o?o(s):s())};n.__R=r;var s=function(){if(!--i.__u){if(i.state.__a){var c=i.state.__a;i.__v.__k[0]=wa(c,c.__c.__P,c.__c.__O)}var u;for(i.setState({__a:i.__b=null});u=i.t.pop();)u.forceUpdate()}},l=e.__h===!0;i.__u++||l||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(r,r)},ee.prototype.componentWillUnmount=function(){this.t=[]},ee.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=ga(this.__b,n,i.__O=i.__P)}this.__b=null}var o=e.__a&&st(lt,null,t.fallback);return o&&(o.__h=null),[st(lt,null,e.__a?null:t.children),o]};var Ui=function(t,e,n){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;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function Js(t){return this.getChildContext=function(){return t.context},t.children}function Gs(t){var e=this,n=t.i;e.componentWillUnmount=function(){Pt(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(i){this.childNodes.push(i),e.i.appendChild(i)},insertBefore:function(i,o){this.childNodes.push(i),e.i.appendChild(i)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.i.removeChild(i)}}),Pt(st(Js,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Zs(t,e){var n=st(Gs,{__v:t,i:e});return n.containerInfo=e,n}(Zt.prototype=new dt).__a=function(t){var e=this,n=ma(e.__v),i=e.o.get(t);return i[0]++,function(o){var a=function(){e.props.revealOrder?(i.push(o),Ui(e,t,i)):o()};n?n(a):a()}},Zt.prototype.render=function(t){this.u=null,this.o=new Map;var e=vt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Zt.prototype.componentDidUpdate=Zt.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){Ui(t,n,e)})};var _a=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Xs=/^(?: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]/,Qs=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,tl=/[A-Z0-9]/g,el=typeof document<"u",nl=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function il(t,e,n){return e.__k==null&&(e.textContent=""),Pt(t,e),typeof n=="function"&&n(),t?t.__c:null}function ol(t,e,n){return Go(t,e),typeof n=="function"&&n(),t?t.__c:null}dt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(dt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Vi=m.event;function al(){}function rl(){return this.cancelBubble}function sl(){return this.defaultPrevented}m.event=function(t){return Vi&&(t=Vi(t)),t.persist=al,t.isPropagationStopped=rl,t.isDefaultPrevented=sl,t.nativeEvent=t};var ni,ll={enumerable:!1,configurable:!0,get:function(){return this.class}},Ki=m.vnode;m.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,i=e.type,o={};for(var a in n){var r=n[a];if(!(a==="value"&&"defaultValue"in n&&r==null||el&&a==="children"&&i==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&r===!0?r="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||i!=="input"&&i!=="textarea"||nl(n.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Qs.test(a)?a=s:i.indexOf("-")===-1&&Xs.test(a)?a=a.replace(tl,"-$&").toLowerCase():r===null&&(r=void 0):s=a="oninput",s==="oninput"&&o[a=s]&&(a="oninputCapture"),o[a]=r}}i=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=vt(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),i=="select"&&o.defaultValue!=null&&(o.value=vt(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",ll)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),e.props=o})(t),t.$$typeof=_a,Ki&&Ki(t)};var Yi=m.__r;m.__r=function(t){Yi&&Yi(t),ni=t.__c};var Ji=m.diffed;m.diffed=function(t){Ji&&Ji(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),ni=null};var cl={ReactCurrentDispatcher:{current:{readContext:function(t){return ni.__n[t.__c].props.value}}}};function dl(t){return st.bind(null,t)}function ya(t){return!!t&&t.$$typeof===_a}function ul(t){return ya(t)?ms.apply(null,arguments):t}function pl(t){return!!t.__k&&(Pt(null,t),!0)}function hl(t){return t&&(t.base||t.nodeType===1&&t)||null}var fl=function(t,e){return t(e)},bl=function(t,e){return t(e)},gl=lt;function xa(t){t()}function wl(t){return t}function ml(){return[!1,xa]}var vl=Nt;function _l(t,e){var n=e(),i=Zn({h:{__:n,v:e}}),o=i[0].h,a=i[1];return Nt(function(){o.__=n,o.v=e,Xe(o.__,e())||a({h:o})},[t,n,e]),Le(function(){return Xe(o.__,o.v())||a({h:o}),t(function(){Xe(o.__,o.v())||a({h:o})})},[t]),n}var yl={useState:Zn,useId:xs,useReducer:Qo,useEffect:Le,useLayoutEffect:Nt,useInsertionEffect:vl,useTransition:ml,useDeferredValue:wl,useSyncExternalStore:_l,startTransition:xa,useRef:Lt,useImperativeHandle:vs,useMemo:It,useCallback:_s,useContext:ta,useDebugValue:ys,version:"17.0.2",Children:Ks,render:il,hydrate:ol,unmountComponentAtNode:pl,createPortal:Zs,createElement:st,createContext:Zo,createFactory:dl,cloneElement:ul,createRef:hs,Fragment:lt,isValidElement:ya,findDOMNode:hl,Component:dt,PureComponent:xn,memo:Us,forwardRef:ba,flushSync:bl,unstable_batchedUpdates:fl,StrictMode:gl,Suspense:ee,SuspenseList:Zt,lazy:va,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:cl},xl=["other","few","many","two","one","zero"],Gi=({terms:t,overrides:e,locale:n})=>{const i=new Intl.PluralRules(n);function o(a,r){const s=(e==null?void 0:e[a])??t[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,c)=>{var u;return((u=r==null?void 0:r[c])==null?void 0:u.toString())??""});case"object":{if(typeof(r==null?void 0:r.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=i.select(r.count);if(!(l in s)){const c=xl.find(u=>u in s);if(!c)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=c}return s[l].replace(/{{(\w+)}}/g,(c,u)=>{var d;return((d=r==null?void 0:r[u])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return o},Zi=Zo(null),ka=t=>({defaultTerms:t,TranslationProvider:({terms:e,children:n,locale:i})=>{const o=It(()=>Gi({locale:i,terms:t,overrides:e}),[e,i]);return g(Zi.Provider,{value:{t:o,locale:i},children:n})},useTranslation:()=>{const e=ta(Zi);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:n})=>Gi({terms:t,overrides:e,locale:n})}),kl={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:$l}=ka({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"});const{TranslationProvider:Sl,useTranslation:de,createTFunction:El}=ka({...$l,...kl,error_heading:"Something unexpected happened",flow_closed:"This role is no longer accepting applications.",undo:"Change answer",job_alerts_offer:"Want to hear about similar roles? We can email you at {{email}} when new ones open.",job_alerts_accept:"Get job alerts",job_alerts_decline:"No thanks",job_alerts_privacy:"We'll use your email only for these alerts. You can unsubscribe at any time.",job_alerts_privacy_sender:"{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.",job_alerts_success:"Done. We'll email you about similar roles.",job_alerts_error:"Sorry, we couldn't set that up. Please try again later.",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.",submission_retryable:"We couldn't submit your application. Please try again.",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.",maximize:"Maximise",submit:"Submit",file_more:{one:"+{{count}} file",other:"+{{count}} files"}});function ii(t,e){if(!t)throw new Error(e)}var kn=t=>t===null||typeof t!="object"?t:Array.isArray(t)?t.map(kn):Object.keys(t).sort().reduce((e,n)=>(e[n]=kn(t[n]),e),{}),Cl=t=>{let e=JSON.stringify(kn(t)),n=5381;for(let i=0;i<e.length;i++)n=n*33^e.charCodeAt(i);return(n>>>0).toString(36)};const $n=(t,e)=>e.some(n=>t instanceof n);let Xi,Qi;function Il(){return Xi||(Xi=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Al(){return Qi||(Qi=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Sn=new WeakMap,Qe=new WeakMap,He=new WeakMap;function Tl(t){const e=new Promise((n,i)=>{const o=()=>{t.removeEventListener("success",a),t.removeEventListener("error",r)},a=()=>{n(Ot(t.result)),o()},r=()=>{i(t.error),o()};t.addEventListener("success",a),t.addEventListener("error",r)});return He.set(e,t),e}function Ml(t){if(Sn.has(t))return;const e=new Promise((n,i)=>{const o=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",r),t.removeEventListener("abort",r)},a=()=>{n(),o()},r=()=>{i(t.error||new DOMException("AbortError","AbortError")),o()};t.addEventListener("complete",a),t.addEventListener("error",r),t.addEventListener("abort",r)});Sn.set(t,e)}let En={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Sn.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ot(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function $a(t){En=t(En)}function jl(t){return Al().includes(t)?function(...e){return t.apply(Cn(this),e),Ot(this.request)}:function(...e){return Ot(t.apply(Cn(this),e))}}function Ol(t){return typeof t=="function"?jl(t):(t instanceof IDBTransaction&&Ml(t),$n(t,Il())?new Proxy(t,En):t)}function Ot(t){if(t instanceof IDBRequest)return Tl(t);if(Qe.has(t))return Qe.get(t);const e=Ol(t);return e!==t&&(Qe.set(t,e),He.set(e,t)),e}const Cn=t=>He.get(t);function Dl(t,e,{blocked:n,upgrade:i,blocking:o,terminated:a}={}){const r=indexedDB.open(t,e),s=Ot(r);return i&&r.addEventListener("upgradeneeded",l=>{i(Ot(r.result),l.oldVersion,l.newVersion,Ot(r.transaction),l)}),n&&r.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),o&&l.addEventListener("versionchange",c=>o(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const Pl=["get","getKey","getAll","getAllKeys","count"],Ll=["put","add","delete","clear"],tn=new Map;function to(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(tn.get(e))return tn.get(e);const n=e.replace(/FromIndex$/,""),i=e!==n,o=Ll.includes(n);if(!(n in(i?IDBIndex:IDBObjectStore).prototype)||!(o||Pl.includes(n)))return;const a=async function(r,...s){const l=this.transaction(r,o?"readwrite":"readonly");let c=l.store;return i&&(c=c.index(s.shift())),(await Promise.all([c[n](...s),o&&l.done]))[0]};return tn.set(e,a),a}$a(t=>({...t,get:(e,n,i)=>to(e,n)||t.get(e,n,i),has:(e,n)=>!!to(e,n)||t.has(e,n)}));const Nl=["continue","continuePrimaryKey","advance"],eo={},In=new WeakMap,Sa=new WeakMap,Rl={get(t,e){if(!Nl.includes(e))return t[e];let n=eo[e];return n||(n=eo[e]=function(...i){In.set(this,Sa.get(this)[e](...i))}),n}};async function*Fl(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const n=new Proxy(e,Rl);for(Sa.set(n,e),He.set(n,Cn(e));e;)yield n,e=await(In.get(n)||e.continue()),In.delete(n)}function no(t,e){return e===Symbol.asyncIterator&&$n(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&$n(t,[IDBIndex,IDBObjectStore])}$a(t=>({...t,get(e,n,i){return no(e,n)?Fl:t.get(e,n,i)},has(e,n){return no(e,n)||t.has(e,n)}}));const io=()=>Dl("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}});let fe;const An=async t=>{if(typeof indexedDB>"u")return;const e=fe??(fe=io());try{return await t(await e)}catch(n){if(!(n instanceof Error&&n.name==="InvalidStateError"))throw n;return fe===e&&(fe=io()),t(await fe)}},Bl=t=>({...t,messages:t.messages.map(e=>{if(e.type!=="link")return e;const{onClick:n,...i}=e;return i})});let ve,en,Gt;const oo=()=>{if(!ve)return Gt;const t=ve;ve=void 0;const e=Me(t),n=An(i=>i.put("state",Bl(t.data),e)).finally(()=>{Gt===n&&(Gt=void 0)});return Gt=n,Gt},X={getStateData:async(t,e,n)=>{const i=Me({...t,flowKeys:e,context:n});return An(o=>o.get("state",i))},getAllStateData:async()=>await An(t=>t.getAll("state"))??[],setStateData:t=>{ve=t,clearTimeout(en),en=setTimeout(()=>{oo()},1e3)},flushStateData:()=>(clearTimeout(en),oo()??Promise.resolve())},Hl=t=>e=>e?e.type===t:!1,Wl=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),ao=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Wl()}),zl=t=>Re(t).with({nativeEvent:{submitter:Mt.select(Mt.union(Mt.instanceOf(HTMLButtonElement),Mt.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),_e=(t,e,n,i=0)=>{if(!e.nextId)return n(e.id,{stepsMade:i,remainingSteps:0}),{stepsMade:i,remainingSteps:0};const o=t.find(c=>c.id===e.nextId);if(o===void 0)return{stepsMade:i,remainingSteps:0};const a=e.type==="if-block"?e.branchId:void 0,r=t.find(c=>c.id===a),s=e.type.includes("question")?1:0;if(r){const c=s+Math.max(_e(t,o,n,i+s).remainingSteps,_e(t,r,n,i+s).remainingSteps);return n(e.id,{stepsMade:i,remainingSteps:c}),{stepsMade:i,remainingSteps:c}}const l=s+_e(t,o,n,i+s).remainingSteps;return n(e.id,{stepsMade:i,remainingSteps:l}),{stepsMade:i,remainingSteps:l}},ql=t=>{const e={},n=t.find(i=>i.isHead);return n&&_e(t,n,(i,o)=>{e[i]=o}),e},Me=t=>[...t.flowKeys,t.id,t.version,t.build,Cl(t.hostContext??t.context)].join("/"),Ul=({data:t,nodes:e})=>{const n=t.startedWriteNodeIds===void 0?e.some(i=>i.type==="integration-application-submit"&&t.nodeHistory.includes(i.id)):t.startedWriteNodeIds.length>0;return!t.isFinished&&!n&&Eo(e,t.submissions)},ro=({data:t,nodes:e})=>{var n;return!t.isFinished&&((((n=t.startedWriteNodeIds)==null?void 0:n.length)??0)>0||Eo(e,t.submissions))},gt=rt({state:"idle"}),nn=new Set,At=t=>{const{state:e,flow:n}=gt.value;if(e!=="loaded")return;ii(n,"No flow to update");const i=t(n.data);n.data=i,gt.value={state:e,flow:n},X.setStateData(n)},M={current$:gt,viewState$:rt("closed"),prepareFlow:async({jobAlerts:t,flow:e,context:n={},jobContext:i,flowKeys:o,title:a,analytics:r,job:s,employer:l,locationOrigin:c})=>{await X.flushStateData().catch(()=>{});const u=await X.getStateData(e,o,n),d=u??ao(),p=Me({...e,flowKeys:o,context:n}),f=u!==void 0&&!nn.has(p)&&Ul({data:d,nodes:e.nodes});return f||nn.add(p),{jobAlerts:t,data:d,offerResume:f,startedAt:new Date,nodeIdToProgress:ql(e.nodes),flowKeys:o,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:i===void 0?n:Yn(i,n),hostContext:i===void 0?void 0:n,title:a,analytics:r,job:s,employer:l,locationOrigin:c}},commitFlow:t=>{gt.value={state:"loaded",flow:t},X.setStateData(t)},settleResume:t=>{t.offerResume=!1,nn.add(Me(t))},cancelCurrentFlow:()=>{gt.value={state:"idle"},M.viewState$.value="closed"},markAsFinished:()=>At(t=>({...t,isFinished:!0})),markAsInteracted:()=>At(t=>({...t,hasInteracted:!0})),setCurrentNodeId:t=>At(e=>(e.nodeHistory.push(t),e)),setApplicationRecovery:async t=>{At(e=>(t?e.applicationRecovery=t:delete e.applicationRecovery,e)),await X.flushStateData()},restart:()=>{const{state:t,flow:e}=gt.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const n={...ao(),failedAttemptAt:e.data.failedAttemptAt,unconfirmedAttemptKeys:e.data.unconfirmedAttemptKeys,submitCooldown:e.data.submitCooldown},i={...e,data:n,startedAt:new Date,offerResume:!1};gt.value={state:t,flow:i},X.setStateData(i)},addMessage:(t,e)=>{const n={...t,groupId:e};return At(i=>(i.messages.push(n),i))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:n}=gt.value;ii(e==="loaded","Application not loaded");const i=n.data.messages.filter(o=>!o.groupId||!t.includes(o.groupId));n.data.messages=i,X.setStateData(n)},setSubmission:(t,e)=>At(n=>(e===null?delete n.submissions[t]:n.submissions[t]=e,n)),setInput:t=>At(e=>({...e,currentInput:t??null})),persistWriteBarrier:async t=>{gt.peek().flow===t&&(gt.value={state:"loaded",flow:t}),X.setStateData(t),await X.flushStateData()}},so=({heading:t})=>{const{t:e}=de();return g("div",{class:"flex flex-grow flex-col items-center justify-center",children:[g("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[g("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),g("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),g("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),g("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),g("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),g("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),g("path",{d:"M38 56h19"})]}),g("div",{class:"flex flex-col gap-2 text-center",children:g("p",{class:"text-error-11 font-bold",children:e(t)})})]})},Ea=t=>{const{t:e}=de();return g("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[g("title",{children:e("loading")}),g("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),g("g",{id:"s1",transform:"translate(12,0)",children:g("g",{id:"s2",transform:"scale(0,0)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s3",transform:"translate(12,12)",children:g("g",{id:"s4",transform:"scale(1,1)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s5",transform:"translate(12,0)",children:g("g",{id:"s6",transform:"scale(0,0)",children:g("path",{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",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),g("g",{id:"s7",transform:"translate(12,0)",children:g("g",{id:"s8",transform:"scale(0,0)",children:g("path",{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",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},lo=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(Ea,{class:"text-neutral-6 h-8 w-8"})}),Vl=t=>{const n=t/100,i=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-n,i))*100)}%`},Kl=Be("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),je=({class:t,children:e,variant:n,...i})=>g("button",{class:Fe(Kl({variant:n}),t),...i,children:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:e})}),Ca=()=>g("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Yl=()=>{if(M.current$.value.state!=="loaded")return null;const t=M.current$.value.flow.nodeIdToProgress,e=M.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const n=t[e];if(n===void 0)return null;const i=100*(n.stepsMade/(n.remainingSteps+n.stepsMade));return g("div",{class:"bg-accent-3",children:g("div",{style:{width:Vl(i)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Jl=({children:t,params:e,analytics:n,feedbackReady:i})=>{const{t:o}=de(),a=M.viewState$,r=!!e.feedback&&M.current$.value.state==="loaded"&&a.value==="maximised",s=r&&i.value,l=Lt(!1);return Le(()=>{var c,u;!s||l.current||(l.current=!0,n.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(u=(c=M.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:u.customProperties}))},[s,n]),g(lt,{children:g("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[g("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[g("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),g("button",{"aria-label":o("minimize"),onClick:()=>{a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Tn,children:g("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),g("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?g("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:Fe({hidden:!r}),children:g("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,M.current$.value.state==="loaded"&&g(je,{class:"mx-1","aria-label":o("restart"),onClick:()=>{M.restart()},children:[g("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),g("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),g(je,{class:"view-switch mx-1",onTouchStart:Tn,"aria-label":o("minimize"),onClick:()=>a.value="minimised",children:g(Ca,{})},"minmax")]})]}),g(Yl,{})]})})};function Tn(){}const Gl=va(()=>Promise.resolve().then(()=>require("./chatbot-body-6xpvcL2-.cjs")).then(t=>t.ChatbotBody)),Ia=Be("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",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),Aa=Be("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Zl=({open:t,...e})=>{const n=Lt(null);return Nt(()=>{const i=n.current;i&&(t?i.showModal():i.close())},[t]),g("dialog",{ref:n,...e})},Xl=({env:t,logger:e,apiClient:n,rpcClient:i,analytics:o,talentBankClient:a,params:r,feedbackReady:s})=>{const{state:l,flow:c}=M.current$.value,u=M.viewState$.value,d=l!=="idle"&&u==="maximised",p=Lt(null),f=c?[...c.data.nodeHistory].reverse().map(h=>c.nodes.find(b=>b.id===h)).find(h=>(h==null?void 0:h.type)==="flow-section"):void 0;return g(Sl,{terms:r.terms,locale:void 0,children:[g(Zl,{open:d,onClose:()=>M.viewState$.value="minimised",children:g("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Ia({view:"maximised"}),children:g("div",{class:Aa({view:"maximised"}),children:[g(Jl,{params:r,analytics:o,feedbackReady:s,children:f?g(lt,{children:[g("span",{class:"block",children:f.data.title}),g("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),Re({state:l,view:u}).with({state:"idle"},()=>null).with({state:"loading"},()=>g(lo,{},"loading")).with({state:"loaded"},()=>g(ee,{fallback:g(lo,{},"loading"),children:g(Gl,{env:t,rpcClient:i,analytics:o,apiClient:n,logger:e,talentBankClient:a})})).with({state:"closed"},()=>g(so,{heading:"flow_closed"})).with({state:"error"},()=>g(so,{heading:"error_heading"})).exhaustive()]})})}),u==="minimised"?g(Ql,{flow:c}):null]})},Ql=({flow:t})=>{const{t:e}=de();return g("div",{class:Ia({view:"minimised",class:"z-100 isolate"}),children:g("div",{class:Aa({view:"minimised"}),children:[g("button",{onClick:()=>{M.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Tn,children:g("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:t==null?void 0:t.title})}),g("div",{class:"flex items-center px-0.5",children:g(je,{class:"mx-1","aria-label":e("close_application"),onClick:M.cancelCurrentFlow,variant:"white",children:g("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Ta="14.19.1",tc=(t,e=Ta)=>e===void 0?t:{fetch:(n,i)=>{if(n!=="/flow/submit")return t.fetch(n,i);const o=new Headers(i==null?void 0:i.headers);return o.set("x-inploi-widget-version",e),t.fetch(n,{...i,headers:Object.fromEntries(o.entries())})}};let ne,Ma,ye;const ec=t=>{const e=t.slice(0,t.lastIndexOf("/")+1);return/^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(e)?e:void 0},ja=(t,e,n)=>{const i=rr(t,e??`
18
+ `,n);return{...i,stack:i.stack.filter(o=>o.startsWith("index.js:"))}},Mn=t=>ja(t,ye),Oa=t=>typeof t=="object"&&t!==null&&"status"in t&&typeof t.status=="number"?t.status:void 0,Ht=(t,e,n={})=>ne==null?void 0:ne.send(t,e,{...n,message:"Chatbot widget beacon",widget:"chatbot",key_hash:Ma}),nc=t=>{const e=(n,i,o)=>{if(M.viewState$.value==="closed")return;const a=ja(i,t,o);a.stack.length&&Ht("fatal",Oe(i),{phase:"render",error:{...a,via:n}})};window.addEventListener("error",n=>{ir(n)||e("error",n.error,n.message)}),window.addEventListener("unhandledrejection",n=>e("rejection",n.reason))},ic=(t,e,n=typeof document>"u"?require("url").pathToFileURL(__filename).href:Ve&&Ve.tagName.toUpperCase()==="SCRIPT"&&Ve.src||new URL("index-BYzXbN3_.cjs",document.baseURI).href)=>{const i=lr();ne||!i||!t||(Ma=e?mo(e).toString(36):void 0,ne=wr({config:i,version:Ta,env:t,seed:cr(sr(),Dt.generateUUID)}),ye=ec(n),ye&&nc(ye))},oc=t=>{let e={application:void 0,attempts:0,blocked:!1};return{fetch:async(n,i)=>{if(n!=="/flow/submit")return t.fetch(n,i);const o=M.current$.value.flow;o!==e.application&&(e={application:o,attempts:0,blocked:!1});const a=e,r=++a.attempts,s=performance.now(),l=await t.fetch(n,i).catch(c=>{throw Oa(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(a.blocked=!0,Ht("submit_blocked",Oe(c),{phase:"submit",error:Mn(c),endpoint:"flow_submit",attempt:r,elapsed_ms:Math.round(performance.now()-s),body_kb:typeof(i==null?void 0:i.body)=="string"?Math.round(i.body.length/1024):void 0})),c});return a.blocked&&Ht("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:r}),l}}},ac='[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}}',Da="inploi-chatbot",jn=`[data-widget='${Da}']`,rc=()=>({getChatbotElement:()=>document.querySelector(jn),getOrCreateChatbotElement:()=>{const t=document.querySelector(jn);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=Da,e}});var sc="9.15.0",Pa=`https://sdk.inploi.com/@inploi/flows@${sc}/cdn/captcha/index.html`,lc=new URL(Pa).origin,co=3e4,cc=5*6e4,dc=t=>typeof t=="object"&&t!==null&&t.source==="inploi-captcha",on=new WeakMap,uc=t=>{let e=on.get(t);return e||(e=t.fetch("/flow/captcha").then(n=>{let i=n==null?void 0:n.site_key;return typeof i=="string"&&i!==""?i:void 0}).catch(n=>{throw on.delete(t),n}),on.set(t,e)),e},pc=(t,e={})=>new Promise((n,i)=>{let{signal:o,container:a=null,theme:r,onInteractive:s}=e instanceof AbortSignal?{signal:e}:e,l=!1,c=()=>{},u=b=>{l||(l=!0,clearTimeout(f),o==null||o.removeEventListener("abort",p),c(),b())},d=b=>u(()=>i(new Error(b))),p=()=>d("Captcha aborted"),f,h=b=>{clearTimeout(f),f=setTimeout(()=>d("Captcha timed out"),b)};if(h(co),o==null?void 0:o.aborted)return p();o==null||o.addEventListener("abort",p),(async()=>{let b=await uc(t);if(b===void 0)return u(()=>n(void 0));if(l)return;let v=document.createElement("iframe");v.src=`${Pa}?${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:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(v):(v.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(v));let k=!1,y=O=>{if(!v.contentWindow||O.source!==v.contentWindow||O.origin!==lc||!dc(O.data))return;let C=O.data;switch(C.type){case"token":return u(()=>n(C.token));case"resize":v.style.height=`${Math.max(0,Math.ceil(C.height))}px`;return;case"before-interactive":return k=!0,h(cc),s==null?void 0:s();case"after-interactive":return k=!1,h(co);case"error":!k&&!C.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",y),c=()=>{window.removeEventListener("message",y),v.remove()}})().catch(b=>u(()=>i(b)))}),uo=({condition:t,context:e,submissions:n,ifBlock:i})=>{let[o,...a]=t.compareKey.split(".");if(!o)return!1;let r=Co({context:e,key:o,path:a,submissions:n});if(!r)return!1;switch(r.type){case"address":{let s=ie(r.value,a);switch(t.compare){case"equals":return s===t.compareValue;case"contains":return typeof s!="string"?!1:s.includes(t.compareValue);case"notEquals":return s!==t.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(t.compareValue)}break}case"integration":{if(typeof r.value!="object"||Array.isArray(r.value))return!1;let s=ie(r.value,a),l={...i,data:{compareKey:"_temp",compare:t.compare,compareValue:t.compareValue}};switch(typeof s){case"boolean":return Xt(l,{submissions:{_temp:{value:s,type:"boolean"}},context:e});case"string":return Xt(l,{submissions:{_temp:{value:s,type:"string"}},context:e});case"number":return Xt(l,{submissions:{_temp:{value:s,type:"number"}},context:e});case"object":return Array.isArray(s)&&s.every(c=>typeof c=="string")?Xt(l,{submissions:{_temp:{value:s,type:"enum"}},context:e}):!1}break}case"boolean":{let s=t.compareValue==="true";switch(t.compare){case"equals":return r.value===s;case"notEquals":return r.value!==s}break}case"phone":case"string":{let s=r.type==="phone"?De(r.value):r.value;switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"number":{try{let s=Number(t.compareValue);switch(t.compare){case"equals":return r.value===s;case"notEquals":return r.value!==s;case"greaterThan":return r.value>s;case"greaterThanOrEqualTo":return r.value>=s;case"lessThan":return r.value<s;case"lessThanOrEqualTo":return r.value<=s}}catch{return console.error(`Failed to parse number in if-block ${i.id}`,r.value),!1}break}case"enum":switch(t.compare){case"equals":return r.value.length===1&&r.value[0]===t.compareValue;case"notEquals":return r.value.length===1&&r.value[0]!==t.compareValue;case"contains":return r.value.includes(t.compareValue);case"notContains":return!r.value.includes(t.compareValue)}break}},Xt=(t,{context:e,submissions:n})=>{let i="combinator"in t.data?t.data.conditions:[t.data];if(("combinator"in t.data?t.data.combinator:"and")==="or"){for(let o of i)if(uo({condition:o,context:e,submissions:n,ifBlock:t}))return!0;return!1}else{for(let o of i)if(!uo({condition:o,context:e,submissions:n,ifBlock:t}))return!1;return!0}},hc=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,fc=(t,{context:e,submissions:n})=>t.replace(hc,(i,o,a="")=>{let[r,...s]=o.trim().split("."),l=Co({key:r,path:s,submissions:n,context:e});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${Ao(c.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(c=>c&&c.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return De(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=ie(l.value,s);switch(typeof c){case"boolean":return c===!0?"true":"false";case"string":return c;case"number":return c.toString();case"object":if(Array.isArray(c)&&c.every(u=>typeof u=="string"))return c.join(", ")}break}}return a});function bc(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function oi(t,e,n=""){const i=bc(t),o=t==null?void 0:t.length;if(!i||e!==void 0){const r=n&&`"${n}" `,s="",l=i?`length=${o}`:`type=${typeof t}`;throw new Error(r+"expected Uint8Array"+s+", got "+l)}return t}function po(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function gc(t,e){oi(t,void 0,"digestInto() output");const n=e.outputLen;if(t.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function On(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function an(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function ht(t,e){return t<<32-e|t>>>e}const wc=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",mc=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function vc(t){if(oi(t),wc)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=mc[t[n]];return e}function _c(t,e={}){const n=(o,a)=>t(a).update(o).digest(),i=t(void 0);return n.outputLen=i.outputLen,n.blockLen=i.blockLen,n.create=o=>t(o),Object.assign(n,e),Object.freeze(n)}const yc=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});function xc(t,e,n){return t&e^~t&n}function kc(t,e,n){return t&e^t&n^e&n}class $c{constructor(e,n,i,o){V(this,"blockLen");V(this,"outputLen");V(this,"padOffset");V(this,"isLE");V(this,"buffer");V(this,"view");V(this,"finished",!1);V(this,"length",0);V(this,"pos",0);V(this,"destroyed",!1);this.blockLen=e,this.outputLen=n,this.padOffset=i,this.isLE=o,this.buffer=new Uint8Array(e),this.view=an(this.buffer)}update(e){po(this),oi(e);const{view:n,buffer:i,blockLen:o}=this,a=e.length;for(let r=0;r<a;){const s=Math.min(o-this.pos,a-r);if(s===o){const l=an(e);for(;o<=a-r;r+=o)this.process(l,r);continue}i.set(e.subarray(r,r+s),this.pos),this.pos+=s,r+=s,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){po(this),gc(e,this),this.finished=!0;const{buffer:n,view:i,blockLen:o,isLE:a}=this;let{pos:r}=this;n[r++]=128,On(this.buffer.subarray(r)),this.padOffset>o-r&&(this.process(i,0),r=0);for(let d=r;d<o;d++)n[d]=0;i.setBigUint64(o-8,BigInt(this.length*8),a),this.process(i,0);const s=an(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<c;d++)s.setUint32(4*d,u[d],a)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const i=e.slice(0,n);return this.destroy(),i}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,buffer:i,length:o,finished:a,destroyed:r,pos:s}=this;return e.destroyed=r,e.finished=a,e.length=o,e.pos=s,o%n&&e.buffer.set(i),e}clone(){return this._cloneInto()}}const _t=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Sc=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),yt=new Uint32Array(64);class Ec extends $c{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:n,C:i,D:o,E:a,F:r,G:s,H:l}=this;return[e,n,i,o,a,r,s,l]}set(e,n,i,o,a,r,s,l){this.A=e|0,this.B=n|0,this.C=i|0,this.D=o|0,this.E=a|0,this.F=r|0,this.G=s|0,this.H=l|0}process(e,n){for(let d=0;d<16;d++,n+=4)yt[d]=e.getUint32(n,!1);for(let d=16;d<64;d++){const p=yt[d-15],f=yt[d-2],h=ht(p,7)^ht(p,18)^p>>>3,b=ht(f,17)^ht(f,19)^f>>>10;yt[d]=b+yt[d-7]+h+yt[d-16]|0}let{A:i,B:o,C:a,D:r,E:s,F:l,G:c,H:u}=this;for(let d=0;d<64;d++){const p=ht(s,6)^ht(s,11)^ht(s,25),f=u+p+xc(s,l,c)+Sc[d]+yt[d]|0,b=(ht(i,2)^ht(i,13)^ht(i,22))+kc(i,o,a)|0;u=c,c=l,l=s,s=r+f|0,r=a,a=o,o=i,i=f+b|0}i=i+this.A|0,o=o+this.B|0,a=a+this.C|0,r=r+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(i,o,a,r,s,l,c,u)}roundClean(){On(yt)}destroy(){this.set(0,0,0,0,0,0,0,0),On(this.buffer)}}class Cc extends Ec{constructor(){super(32);V(this,"A",_t[0]|0);V(this,"B",_t[1]|0);V(this,"C",_t[2]|0);V(this,"D",_t[3]|0);V(this,"E",_t[4]|0);V(this,"F",_t[5]|0);V(this,"G",_t[6]|0);V(this,"H",_t[7]|0)}}const Ic=_c(()=>new Cc,yc(1));var La=t=>{let e=t.find(n=>n.isHead);if(!e)throw new Error("No head node found");return e},Na=t=>{var e,n;if(!(t.data.isFinished||(e=t.data.startedWriteNodeIds)!=null&&e.length))return(n=[...t.data.messages].reverse().find(i=>i.groupId&&t.nodes.some(o=>o.id===i.groupId&&o.type.startsWith("question-"))&&(i.type==="system"||"author"in i&&i.author==="user")))==null?void 0:n.groupId},Dn=t=>Array.isArray(t)?t.map(Dn):t!==null&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>[e,Dn(n)])):typeof t=="function"?void 0:t,Ac=t=>vc(Ic(new TextEncoder().encode(JSON.stringify(Dn(t)))));function Tc(t,e,n,i){var o;if(i!=null&&i.aborted)return;let a=Ac(n),r=(o=t.data).preApplyFingerprints??(o.preApplyFingerprints=[]);if(r.includes(a))return;r.push(a);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);e.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(n)}).catch(()=>{let c=r.indexOf(a);c!==-1&&r.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Ra=({context:t,submissions:e})=>({context:t,submissions:e??{}}),ut=(t,e)=>fc(t,Ra(e)),Mc=(t,e)=>Xt(t,Ra(e)),Fa=({node:t,nodes:e,stopWhen:n})=>{if((n==null?void 0:n(t))===!0)return t;let i=t.nextId?e.find(o=>o.id===t.nextId):void 0;if(i)return Fa({node:i,nodes:e,stopWhen:n})},jc=({childNode:t,nodes:e})=>{let n=e.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;let o=e.find(r=>r.id===i.branchId);if(!o)return!1;let a=Fa({node:o,nodes:e,stopWhen:r=>r.id===t.id});return!(!a||a.id!==t.id)});if(n!=null&&n.nextId)return e.find(i=>i.id===n.nextId)},Oc=3,Dc=({flow:t,analytics:e,logger:n,talentBankClient:i,context:o,apiClient:a,getSubmissions:r,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:u,onSubmitNetworkError:d,closedRoleBehaviour:p,settledOutcomes:f=p,dateEchoLocale:h,onFlowEnd:b,onInterpret:v,holdBefore:k,forceSubmitConfirmation:y,flowType:O,t:C})=>{var F;let D=new AbortController,B={submitAccepted:!1};(F=t.data).startedWriteNodeIds??(F.startedWriteNodeIds=t.nodes.flatMap(w=>{var E,Z;if(w.type!=="integration-application-submit"||!t.data.nodeHistory.includes(w.id))return[];let I=w.data.key?(E=r())==null?void 0:E[w.data.key]:void 0;return(I==null?void 0:I.type)==="integration"&&((Z=Vn(I.value))==null?void 0:Z.verdict)==="not_submitted"?[]:[w.id]}));let x={...e.service,log:w=>e.service.log({...w,customProperties:{...w.customProperties,...e.customProperties}})},_=(w,I)=>{if(I.aborted)return;let E=k==null?void 0:k(void 0);return E?E.then(()=>{if(!I.aborted)return b==null?void 0:b(w)}):b==null?void 0:b(w)},S=async(w,I)=>{let E=D.signal;if(E.aborted)return;let Z=k==null?void 0:k(w);if(Z&&(await Z,E.aborted))return;let Y=r(),H=s(),ct=(H==null?void 0:H.submitNodeId)===w.id?t.nodes.find(W=>{var z;return W.id===H.fileQuestionNodeId&&W.type==="question-file"&&((z=Y==null?void 0:Y[W.data.key])==null?void 0:z.type)!=="file"}):void 0;if(ct)return S(ct,I);v==null||v(w,I);try{await Pc({flow:t,analytics:x,logger:n,talentBankClient:i,apiClient:a,context:o,node:w,submissions:Y,applicationRecovery:H,setApplicationRecovery:async W=>{if(!E.aborted)try{await l(W)}catch(z){n.error("Failed to persist application recovery",z)}},forceSubmitConfirmation:y||(H==null?void 0:H.submitNodeId)===w.id,run:B,persistWriteBarrier:u,onSubmitNetworkError:d,settledOutcomes:f,dateEchoLocale:h,flowType:O,signal:E,t:C,chat:{sendMessage:async W=>c.send({groupId:w.id,message:W,signal:E}),userInput:async W=>c.input({input:W,signal:E}),setSubmission:(W,z)=>{E.aborted||c.setSubmission(W,z)},captcha:c.captcha},next:W=>{if(E.aborted)return;let z=(H==null?void 0:H.fileQuestionNodeId)===w.id?H.submitNodeId:W,U=z?t.nodes.find(j=>j.id===z):jc({childNode:w,nodes:t.nodes});return U?S(U,w):_(w,E)},end:()=>{_(w,E)}})}catch(W){if(W instanceof Et)return;throw W}};return{interpret:async w=>{let I=t.nodes.find(E=>E.id===w)??La(t.nodes);return S(I)},undo:w=>{var W;if(delete t.data.reviewReplay,((W=t.data.startedWriteNodeIds)==null?void 0:W.length)||t.data.isFinished)return{removed:0};let I=Na(t),E=I?w.lastIndexOf(I):-1,Z=t.nodes.find(z=>z.id===I);if(E===-1||!Z)return{removed:0};let Y=t.nodes.find(z=>z.id===w[w.length-1]);D.abort();let H=w.splice(E);t.data.messages=t.data.messages.filter(z=>!z.groupId||!H.includes(z.groupId)),t.data.currentInput=null;let ct=r();for(let z of H.slice(1)){let U=t.nodes.find(j=>j.id===z);if(!(!U||!ct||U.id===I)&&("key"in U.data&&U.data.key&&delete ct[U.data.key],"keys"in U.data))for(let j of Object.values(U.data.keys))typeof j=="string"&&delete ct[j]}return D=new AbortController,S(Z,Y),{removed:H.length}},abort:()=>{D.abort()}}};async function Pc(t){let e=t.node;switch(e.type){case"flow-section":return await t.chat.sendMessage({type:"system",variant:"info",text:e.data.title}),t.next(e.nextId);case"pre-apply-result":return od({...t,node:e});case"text":return Yc({...t,node:e});case"image":return Jc({...t,node:e});case"question-text":return Gc({...t,node:e});case"question-enum":return Qc({...t,node:e});case"question-number":return Zc({...t,node:e});case"question-phone":return Xc({...t,node:e});case"question-boolean":return td({...t,node:e});case"question-file":return nd({...t,node:e});case"question-address":return ed({...t,node:e});case"end-flow":return id({...t,node:e});case"if-block":return Kc({...t,node:e});case"jump":return Rc({...t,node:e});case"link":return Vc({...t,node:e});case"integration-application-submit":return qc({...t,node:e});case"add-submission":return Fc({...t,node:e});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Nc({...t,node:e});case"feedback":return Lc({...t,node:e});default:throw new Error(`Unknown node: ${JSON.stringify(e)}`)}}async function Lc({next:t,node:e}){t(e.nextId)}async function Nc({next:t,node:e,talentBankClient:n,submissions:i,flow:o,logger:a,chat:r}){var l;let s={isDuplicate:!1};if(i&&n){let c=e.data.scope==="job"?(l=o.job)==null?void 0:l.id:void 0;if(e.data.scope==="company"||c!=null)try{s=await n.checkDuplicate({email:jr({key:e.data.email,submissions:i}).toString(),jobId:c,scope:e.data.scope})}catch(u){a.error("[check-duplicate]",u)}}r.setSubmission(e.data.key,{type:"integration",value:s}),t(e.nextId)}async function Rc({next:t,node:e}){t(e.data.targetId)}async function Fc({next:t,node:e,logger:n,submissions:i,context:o}){if(!i){n.error("Submissions not found");return}i[e.data.key]={type:"string",value:ut(e.data.value,{submissions:i,context:o})},t(e.nextId)}var Bc=5e3,Ba=(t,e)=>e?`${t}@${e.id_type}:${e.id}`:t,Hc=(t,e=Date.now())=>Math.min(t.until,e+(t.maintenance?jo:t.throttles?Kn:Mo)),Wc=(t,e,n)=>{let{waitMs:i,throttles:o,maintenance:a}=Zr(e==null?void 0:e.throttles,n);return{key:t,until:Date.now()+i,...o!==void 0&&{throttles:o},...a&&{maintenance:a}}},zc=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Pn=t=>t instanceof Error&&zc.includes(t.name)?t:void 0,ho=t=>{let e=Pn(t);return(e==null?void 0:e.name)==="ApiError"?e:void 0};async function qc({chat:t,next:e,end:n,node:i,logger:o,apiClient:a,submissions:r,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:u,forceSubmitConfirmation:d,flowType:p,run:f,persistWriteBarrier:h,signal:b,onSubmitNetworkError:v,settledOutcomes:k,t:y}){var x,_;let O=async({redirect_url:S,message:w,button_text:I})=>{let{anonymous_id:E,session_id:Z}=s.getSessionInfo();await t.sendMessage({type:"text",author:"bot",text:w??y("submission_redirect_message")});try{let Y=new URL(S);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:()=>{if(!Z){o.error("session_id not set, cannot log FLOW_REDIRECT event");return}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}})}})}catch(Y){o.error(`Invalid redirect URL: ${S}`,Y),t.sendMessage({type:"system",variant:"error",text:y("redirect_url_error")})}};if((x=l.data.startedWriteNodeIds)!=null&&x.includes(i.id)&&(c==null?void 0:c.submitNodeId)!==i.id){let S=(_=l.data.submitRedirects)==null?void 0:_[i.id];return S?(await O(S),e(i.nextId)):(await t.sendMessage({type:"system",variant:"warning",text:y("submission_unknown")}),n())}let C=Ba(i.id,l.job),F=0,D=f.submitAccepted&&i.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==i.id,B=async S=>{var di,ui,pi,hi,fi,bi,gi,wi,mi;let w=((di=l.data.submitCooldown)==null?void 0:di.key)===C?l.data.submitCooldown:void 0;w&&(w.until=Hc(w));let I=w==null?void 0:w.until;(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;let E;if(i.data.captcha){let $=t.captcha,wt=!0;try{E=await pc(a,{signal:b,container:($==null?void 0:$.container())??null,theme:$==null?void 0:$.theme,onInteractive:()=>{t.sendMessage({type:"text",author:"bot",text:y("captcha_check")}).catch(()=>{}).then(()=>{wt&&($==null||$.reveal(!0))})}})}catch(Ue){if(o.error("Captcha check failed",Ue),b.aborted)return}finally{wt=!1,$==null||$.reveal(!1)}}await t.sendMessage({type:"loading",text:y("submitting")});let{anonymous_id:Z,session_id:Y}=s.getSessionInfo();if(b.aborted)return;let H=((ui=l.data.startedWriteNodeIds)==null?void 0:ui.includes(i.id))===!0;if((c==null?void 0:c.submitNodeId)===i.id&&await u(void 0),H||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],i.id]),await h().catch($=>o.error("Failed to persist application write barrier",$)),b.aborted)return;let ct,W=setTimeout(()=>{ct=t.sendMessage({type:"loading",semantic:"submission-still-working",text:y("submission_still_working")}).catch($=>o.error("Failed to send submission progress message",$))},Bc),z=Tr(),U,j=await a.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:Ar(l.nodes,Mr(r||{},i.data.submitKeys)),pre_apply:Un(l.nodes,r||{},l.data.flowSessionId)})}).catch($=>{U=$;let wt=ho($);return(wt==null?void 0:wt.data)!==void 0?wt.data:$});if(clearTimeout(W),await ct,b.aborted)return;if(U!==void 0&&!Pn(U)&&v)return await v(U,b),B(!0);l.data.stagingDestination=Kr(j),i.data.key&&t.setSubmission(i.data.key,{type:"integration",value:j});let ai=(pi=ho(U))==null?void 0:pi.status,We=typeof ai=="number"?ai:void 0,A=Vn(j,We),ze=A===void 0&&We===429,ue=k==="terminal"&&((A==null?void 0:A.outcome)==="closed"||(A==null?void 0:A.outcome)==="duplicate"),Kt=l.data.failedAttemptAt,Yt=Kt==null?void 0:Kt[C];Kt&&Yt!==void 0&&Yt>Date.now()&&(Yt=Kt[C]=Date.now());let ri=Yt!==void 0&&Date.now()-Yt<Oo||((hi=l.data.unconfirmedAttemptKeys)==null?void 0:hi.includes(C))===!0,si=(fi=Pn(U))==null?void 0:fi.status,Jt=ns(j,typeof si=="number"?si:void 0);Jt&&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:Jt.service,response:Jt.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:ri?"duplicate_after_own_attempt":"duplicate"},...Jt.outcome&&{outcome:Jt.outcome}}});let li=ke(j)||(j==null?void 0:j.success)===!0;if((li||$e(j))&&(f.submitAccepted=!0),li&&((bi=l.data.submitCooldown)==null?void 0:bi.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await h().catch($=>o.error("Failed to persist submit cooldown reset",$))),ke(j)){let{redirect_url:$,message:wt,button_text:Ue}=j.integration_response.data,vi={redirect_url:$,message:wt,button_text:Ue};return b.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[i.id]:vi},await h().catch(za=>o.error("Failed to persist submit redirect",za)),await O(vi),e(i.nextId))}let ci=$e(j);if(ci)return await t.sendMessage({type:"system",variant:"success",text:ci.message??y("submission_pending")}),e(i.nextId);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);let qe=es(A),pe=qe!==void 0&&((gi=r==null?void 0:r[qe])==null?void 0:gi.type)==="file"?qe:void 0,he=pe===void 0?void 0:l.nodes.find($=>$.type==="question-file"&&$.data.key===pe);if(!he&&!ue&&!Ei(A)&&(l.data.submitCooldown=Wc(C,w,A)),(A==null?void 0:A.outcome)!=="duplicate"&&!ze&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[C]:Date.now()},(wi=l.data.unconfirmedAttemptKeys)!=null&&wi.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"||ze||Ur(j,We)?(H||(l.data.startedWriteNodeIds=(mi=l.data.startedWriteNodeIds)==null?void 0:mi.filter($=>$!==i.id)),(c==null?void 0:c.submitNodeId)===i.id&&await u(c),await h().catch($=>o.error("Failed to persist application write barrier release",$))):await h().catch($=>o.error("Failed to persist submit cooldown",$)),A){if(o.error(U??A.message),he&&pe!==void 0)return t.setSubmission(pe,null),await u({fileQuestionNodeId:he.id,submitNodeId:i.id}),await t.sendMessage({type:"system",variant:"error",text:y("submission_unreadable_document")}),e(he.id);if(A.outcome==="duplicate")return await t.sendMessage({type:"system",variant:ue?"success":"info",semantic:"submission-duplicate",text:y(ri?"submission_duplicate_earlier_attempt":"submission_duplicate")}),ue?(delete l.data.submitCooldown,n()):B(!1);if(A.outcome==="closed")return await t.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:y("submission_closed")}),ue?(delete l.data.submitCooldown,n()):B(!1);let $=Gr(A);return $?(await t.sendMessage({type:"system",variant:"warning",text:$.until===void 0?y("submission_provider_maintenance_later"):y("submission_provider_maintenance",{time:Po($.until,void 0)})}),B(!1)):A.outcome==="unknown"?(await t.sendMessage({type:"system",variant:"warning",text:y(ts(A)?"submission_unknown_do_not_resubmit":"submission_unknown")}),B(!1)):Ei(A)?Xr(j)?(await t.sendMessage({type:"text",author:"bot",text:A.message}),B(!1)):(F===0&&await t.sendMessage({type:"system",variant:"warning",text:y("captcha_failed")}),F++,B(F<=Oc)):Qr(A)?(await t.sendMessage({type:"system",variant:"error",text:y("submission_retryable")}),B(!1)):(await t.sendMessage({type:"system",variant:"error",text:y("submission_failed")}),n())}return o.error(U??j),ze?(await t.sendMessage({type:"system",variant:"error",text:y("submission_retryable")}),B(!1)):(await t.sendMessage({type:"system",variant:"error",text:y("submission_failed")}),n())};await B(d===!0&&!D?!1:i.data.skipConfirmation)}var Uc=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Ha=(t,e)=>{if(!Uc.test(t))return!1;try{let{protocol:n}=new URL(e);return n==="https:"||n==="http:"}catch{return!1}};async function Vc({chat:t,next:e,node:n,submissions:i,context:o,analytics:a,flow:r}){let s=ut(n.data.href,{submissions:i,context:o}),{flowSessionId:l}=r.data;await t.sendMessage({type:"link",href:s,text:ut(n.data.cta,{submissions:i,context:o}),...Ha(n.data.href,s)&&{onClick:()=>{a.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}})}}}),e(n.nextId)}async function Kc({submissions:t,next:e,node:n,context:i}){e(Mc(n,{submissions:t,context:i})?n.branchId:n.nextId)}async function Yc({chat:t,next:e,node:n,submissions:i,context:o}){await t.sendMessage({author:"bot",type:"text",text:ut(n.data.text,{submissions:i,context:o})}),e(n.nextId)}async function Jc({chat:t,next:e,node:n}){await t.sendMessage({author:"bot",type:"image",url:n.data.url,height:n.data.height,width:n.data.width}),e(n.nextId)}async function Gc({chat:t,next:e,node:n,submissions:i,context:o,t:a,dateEchoLocale:r}){await t.sendMessage({author:"bot",type:"text",text:ut(n.data.question,{submissions:i,context:o})});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}});s===null?await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await t.sendMessage({author:"user",type:"text",text:s.type==="phone"?De(s.value):n.data.format==="date"&&r!==void 0?os(s.value,r):s.value}),e(n.nextId)}async function Zc({chat:t,next:e,node:n,submissions:i,context:o,t:a}){await t.sendMessage({author:"bot",type:"text",text:ut(n.data.question,{submissions:i,context:o})});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}});r===null?await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await t.sendMessage({author:"user",type:"text",text:r.value.toString()}),e(n.nextId)}async function Xc({chat:t,next:e,node:n,submissions:i,context:o,t:a}){await t.sendMessage({author:"bot",type:"text",text:ut(n.data.question,{submissions:i,context:o})});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}});r===null?await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await t.sendMessage({author:"user",type:"text",text:r.type==="phone"?De(r.value):r.value}),e(n.nextId)}async function Qc({chat:t,next:e,node:n,submissions:i,context:o,t:a}){await t.sendMessage({author:"bot",type:"text",text:ut(n.data.question,{submissions:i,context:o})});let r=await t.userInput({key:n.data.key,type:"multiple-choice",config:n.data});r.value.length===0?await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("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)}async function td({chat:t,next:e,node:n,submissions:i,context:o,t:a}){await t.sendMessage({author:"bot",type:"text",text:ut(n.data.question,{submissions:i,context:o})});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}}});r===null?await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await t.sendMessage({author:"user",type:"text",text:r.value===!0?n.data.trueLabel:n.data.falseLabel}),e(n.nextId)}async function ed({chat:t,next:e,node:n,t:i}){await t.sendMessage({author:"bot",type:"text",text:n.data.question});let o=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}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")});else{let a=Object.values(o.value).filter(r=>r&&r.trim().length>0).join(", ");await t.sendMessage({author:"user",type:"text",text:a})}return e(n.nextId)}async function nd({node:t,chat:e,next:n,submissions:i,context:o,t:a}){await e.sendMessage({author:"bot",type:"text",text:ut(t.data.question,{submissions:i,context:o})});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}});if(r===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")});else for(let s of r.value)await e.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return n(t.nextId)}async function id({chat:t,end:e,node:n}){await t.sendMessage({type:"system",variant:"info",text:n.data.systemMessage}),e()}async function od({node:t,flow:e,submissions:n,chat:i,next:o,apiClient:a,analytics:r,signal:s,context:l}){let c=Ir(e.nodes,n||{}),{answers:u,...d}=c;if(i.setSubmission(t.data.key,{type:"integration",value:d}),Tc(e,a,{...r.getSessionInfo(),job:e.job,flow_build:e.build,pre_apply:Un(e.nodes,n||{},e.data.flowSessionId)},s),c.status!=="skipped"){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];for(let f of["hard","advisory"]){let h=u.filter(b=>!b.matched&&b.severity===f);h.length&&p.push((f==="hard"?"Role requirements":"Other things to consider")+`
19
+ `+h.map(b=>`• ${b.message}`).join(`
20
+ `))}await i.sendMessage({type:"text",author:"bot",text:p.join(`
21
+
22
+ `)}),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})}})}return o(t.nextId)}var ad=new TextEncoder,Ln=t=>{if(t==null)return 2;if(typeof t=="boolean")return 4;if(typeof t=="number")return Number.isInteger(t)?3+String(t).length:3+String(t).length+17;if(typeof t=="string"){let n=ad.encode(t).length;return 6+String(n).length+n}let e=Array.isArray(t)?t.map((n,i)=>[i,n]):Object.entries(t);return 5+String(e.length).length+e.reduce((n,[i,o])=>n+Ln(i)+Ln(o),0)},rd=t=>{let e=t;for(;e.length>1&&Ln(e)>8e3;)e=e.slice(1);return{steps:e.map(n=>({...n})),omitted:t.length-e.length}},sd=()=>{let t=typeof screen>"u"?0:screen.width;return{pointer:typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches?"coarse":"fine",width:t<480?"xs":t<768?"s":t<1024?"m":"l"}},ld=(t,e=Date.now,n,i)=>{let o=()=>{var p;return(p=t()).path??(p.path={steps:[],attempts:0})},a,r=e(),s,l=()=>{o().unsent=!0,n==null||n()},c=()=>{r=e(),l()},u=()=>{let p=o().steps.at(-1);return p&&p.o===void 0?p:void 0},d=(p,f)=>{let h=o();if(!h.unsent)return;let{steps:b,omitted:v}=rd(h.steps);return{trigger:p,steps:b,...v>0&&{steps_omitted:v},...f!==void 0&&{to_node_id:f},idle_ms:e()-r,submit_attempts:h.attempts,...h.result!==void 0&&{submit_result:h.result},...h.cv&&{cv:h.cv},device:sd(),...h.redirect}};return{shown:p=>{var h;if(a=e(),((h=u())==null?void 0:h.k)===p.key)return;let{steps:f}=o();f.push({k:p.key,i:f.length+1,t:p.inputType}),l()},answered:(p,f)=>{let h=u();!h||f!==void 0&&h.k!==f||(h.o=p?"s":"a",a!==void 0&&(h.ms=e()-a),c())},refused:()=>{let p=u();p&&(p.e=(p.e??0)+1,c())},revised:p=>{let f=p===void 0?void 0:o().steps.findLast(h=>h.k===p);f&&(f.r=(f.r??0)+1,c())},active:()=>{r=e()},cv:p=>{let f=o();f.cv===p||f.cv==="attached"||(f.cv=p,p==="attached"?c():l())},submitted:p=>{let f=o();f.attempts++,f.result=p,p==="redirect"&&(s=e()),l()},redirected:()=>{let p=s===void 0,f=o();f.redirect||(f.redirect={redirect_clicked:!0,...p?{redirect_revisit:!0}:s!==void 0&&{redirect_ms:e()-s}},c())},summary:(p,f)=>{let h=d(p,f);return delete o().unsent,h},peek:d,reset:()=>{t().path={steps:[],attempts:0},a=void 0,s=void 0,r=e()}}};const fo=new WeakMap,re=t=>{let e=fo.get(t);return e||(e=ld(()=>t.data,Date.now,()=>X.setStateData(t)),fo.set(t,e)),e},Rt=(t,e,n)=>{var o;const i=re(e).summary(n,e.data.nodeHistory.at(-1));if(i){try{t.log({event:"FLOW_NODE",properties:{flow_id:e.id,flow_version:e.version,flow_build:e.build,flow_session_id:e.data.flowSessionId,flow_type:"CHATBOT_DRAWER",job:e.job,...i},customProperties:(o=e.analytics)==null?void 0:o.customProperties,...(n==="hidden"||n==="pagehide"||n==="redirect")&&{keepalive:!0}}).catch(()=>{})}catch{}X.setStateData(e)}},cd=t=>{let e,n;const i=Ne(()=>{const a=M.current$.value.flow,r=M.viewState$.value;e&&e!==a?Rt(t,e,"restart"):a&&r==="minimised"&&n!==r&&Rt(t,a,"minimise"),e=a,n=r}),o=a=>{const r=M.current$.peek().flow;r&&(a.type==="pagehide"?Rt(t,r,"pagehide"):document.visibilityState==="hidden"&&Rt(t,r,"hidden"),X.flushStateData().catch(()=>{}))};return document.addEventListener("visibilitychange",o),window.addEventListener("pagehide",o),()=>{i(),document.removeEventListener("visibilitychange",o),window.removeEventListener("pagehide",o)}},dd=(t,e,n)=>({fetch:async(i,o)=>{if(i!=="/flow/submit")return t.fetch(i,o);const a=n.data.nodeHistory.at(-1),r=a===void 0?void 0:Ba(a,n.job),s=(l,c,u=!1)=>{var b,v,k;if((b=o==null?void 0:o.signal)!=null&&b.aborted||M.current$.peek().flow!==n)return;const d=Vn(l,c),p=r===void 0||(v=n.data.failedAttemptAt)==null?void 0:v[r],f=p!==void 0&&Date.now()-Math.min(p,Date.now())<Oo||r!==void 0&&((k=n.data.unconfirmedAttemptKeys)==null?void 0:k.includes(r))===!0,h=u?"network_error":ke(l)?"redirect":$e(l)?"pending":typeof l=="object"&&l!==null&&"success"in l&&l.success===!0?"success":(d==null?void 0:d.outcome)==="duplicate"?f?"duplicate_after_own_attempt":"duplicate":(d==null?void 0:d.outcome)??"failed";re(n).submitted(h),Rt(e,n,"submit")};try{const l=await t.fetch(i,o);return s(l),l}catch(l){if(!(l instanceof Error&&l.name==="AbortError")){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;s(u,c,c===void 0)}throw l}}});var ud=t=>t.type.startsWith("question-");const pd=25,Wa=rt(()=>{}),bo=["wheel","touchmove","keydown"],hd=(t,e)=>new Promise((n,i)=>{if(e!=null&&e.aborted)return i(new Et);const o=setTimeout(n,t);e==null||e.addEventListener("abort",()=>{clearTimeout(o),i(new Et)},{once:!0})}),at={onSubmitSuccessFn$:rt(()=>{}),onInteractionFn$:rt(()=>{}),isBotTyping$:rt(!1),captchaVisible$:rt(!1),themeMode$:rt("light"),isReadingHistory$:rt(!1),scrollToEnd:()=>Wa.value()},fd=()=>{const t=Lt(null),e=Lt(-1/0);Nt(()=>{const i=t.current;if(!i)return;const o=()=>{at.isReadingHistory$.value=!1,i.scrollTo({top:i.scrollHeight,behavior:"instant"})};Wa.value=o;const a=()=>e.current=performance.now(),r=()=>{i.scrollHeight-i.scrollTop-i.clientHeight<=24?at.isReadingHistory$.value=!1:performance.now()-e.current<1e3&&(at.isReadingHistory$.value=!0)};i.addEventListener("scroll",r,{passive:!0});for(const l of bo)i.addEventListener(l,a,{passive:!0});const s=new ResizeObserver(()=>{at.isReadingHistory$.peek()||o()});return s.observe(i),i.firstElementChild&&s.observe(i.firstElementChild),()=>{i.removeEventListener("scroll",r);for(const l of bo)i.removeEventListener(l,a);s.disconnect()}},[]);const n=It(()=>({setSubmission:(o,a)=>M.setSubmission(o,a),captcha:{container:()=>{var o;return((o=t.current)==null?void 0:o.querySelector("[data-captcha-slot]"))??null},get theme(){return at.themeMode$.peek()},reveal:o=>{at.captchaVisible$.value=o,o&&requestAnimationFrame(()=>{var a,r;(r=(a=t.current)==null?void 0:a.querySelector("[data-captcha-slot]"))==null||r.focus(),at.scrollToEnd()})}},send:async({message:o,signal:a,groupId:r})=>{if(await Re(o).with({author:"bot",type:"text"},async s=>{if(a!=null&&a.aborted)throw new Et;at.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*pd;try{await hd(l,a)}finally{at.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new Et;M.addMessage(o,r)},input:(({input:o,signal:a})=>{if(a!=null&&a.aborted)throw new Et;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&&ud(s)&&s.data.key===o.key?s:void 0;return r&&l&&re(r).shown({key:l.data.key,inputType:l.type.slice(9)}),M.setInput(o),new Promise(c=>{const u=d=>{if(a!=null&&a.aborted)throw new Et;r&&l&&re(r).answered(d===null||d.type==="enum"&&d.value.length===0),e.current=-1/0,M.setInput(void 0),o.key&&M.setSubmission(o.key,d),c(d)};at.onSubmitSuccessFn$.value=u})})}),[]);return{chatRef:t,chatService:n}};var bd=["1","2","3","4","5","6","7","8","9","10","11","12"],gd={light:{1:[98.8,.015],2:[97.8,.018],3:[95.8,.025],4:[92,.04],5:[89,.05],6:[85,.07],7:[80.5,.08],8:[74,.11],9:[60,.22],10:[56,.23],11:[50,.19],12:[25,.18]},dark:{1:[19,.015],2:[21,.018],3:[25.5,.055],4:[29.3,.084],5:[33.5,.098],6:[39.05,.107],7:[45,.11],8:[55,.13],9:[60,.22],10:[67,.18],11:[79.3,.12],12:[95,.04]}},wd=(t,e=1,n)=>i=>{const[o,a]=gd[n][i];return"oklch("+o+"% "+a*e+" "+t+")"},rn=t=>{const e=wd(t.hue,t.chroma,t.mode);return Object.fromEntries(bd.map(n=>[t.prefix+n,t.transform(e(n))]))},sn=t=>t,md=t=>{const e=Object.keys(t).flatMap(n=>{const i=t[n];return typeof i=="object"&&i!==null?Object.keys(i).map(o=>{const a=i[o];return[`${String(n)}.${o}`,a]}):[[n,i]]});return Object.fromEntries(e)},be=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Nn=(t,...e)=>{if(!e.length)return t;const n=e.shift();if(be(t)&&be(n))for(const i in n){const o=n[i];if(be(o)){t[i]||Object.assign(t,{[i]:{}});const a=t[i];be(a)&&Nn(a,o)}else Object.assign(t,{[i]:n[i]})}return Nn(t,...e)},vd=t=>{function e(n,i){const o=[t.prefix,i.toString().replace(/\./g,"-")].join("");return n==="declaration"?`--${o}`:`var(--${o})`}return e},_d=()=>({core:t=>({semantic:e=>({component:n=>({from:i=>{const{theme:o,getToken:a}=i,r=p=>a("reference",p.toString()),s=t({theme:o}),l=e({theme:o,core:r,raw:{core:s}}),c=n({theme:o,core:r,semantic:r,raw:{core:s,semantic:l}}),u=md(Nn(s,l,c)),d=([p,f],h)=>{const b=[h,p].filter(Boolean).join(".");return typeof f=="object"?Object.entries(f).flatMap(v=>d(v,b)):[[i.getToken("declaration",b),f]]};return{values:u,declarations:Object.fromEntries(Object.entries(u).flatMap(p=>d(p))),ref:p=>a("reference",p.toString())}}})})})});const[ln,cn,go]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],yd=_d().core(({theme:t})=>({color:{black:ln,white:cn,lowest:t.mode==="light"?cn:ln,highest:t.mode==="light"?ln:cn,...rn({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:sn}),...rn({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:sn}),...rn({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:sn})},typography:{}})).semantic(({core:t,raw:e,theme:n})=>{const i=(o,a)=>e.core.color[o].replace(")",` / ${a})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:i("n-8",n.mode==="dark"?.4:.2)},"copy-body":t("color.n-12"),"copy-headings":t("color.n-12"),interactive:{copy:t("color.n-11"),"copy-hover":t("color.n-12"),"copy-active":t("color.n-12"),bg:go,"bg-hover":i("n-10",.2),"bg-active":i("n-10",.3)}}}).component(({raw:t,theme:e,semantic:n,core:i})=>{const o=(a,r)=>t.core.color[a].replace(")",` / ${r})`);return{app:{bg:i(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:o("black",.4)},bubble:{"weak-bg":i(e.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":n("color.divider"),"strong-shadow":o("a-9",.05)},"status-bar":{bg:o("n-2",.8),"bg-button":go,"bg-button-hover":o("n-10",.4),"bg-button-active":o("n-10",.5)},"submit-button":{"bg-active":i(e.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:e.mode==="dark"?"#FFC107":"#8A5A00",success:e.mode==="dark"?"#4CAF50":"#2E7D32"}}}),xd=vd({prefix:"i-"}),kd=t=>{const e=yd.from({theme:t,getToken:xd}),n=Object.entries(e.declarations).map(([i,o])=>`${i}: ${o};`);return`${jn} {
23
+ ${n.concat(n).join(`
24
+ `)}
25
+ }`};class wo extends Dt.ApiError{}const $d=({_internal_domManager:t=rc(),theme:e,terms:n,feedback:i,jobAlerts:o})=>Dt.createPlugin(({apiClient:a,rpcClient:r,logger:s,analytics:l,publishableKey:c,env:u})=>{let d=!1,p=0,f;ic(u,c);const h=oc(tc(a));let b=0;const v=new WeakMap,k=(x,_)=>{const S=++b,w=performance.now();return _.catch(I=>{throw typeof I=="object"&&I!==null&&v.set(I,{endpoint:x,attempt:S,elapsed_ms:Math.round(performance.now()-w)}),I})},y=(x,_)=>{const S=Oa(x);S===404||S===410||Ht("fatal","application_unavailable",{phase:"flow",stage:_,error:Mn(x),http_status:S,..._==="flow_fetch"&&typeof x=="object"&&x!==null&&v.get(x)})},O=c&&u?Dt.createTalentBankClient({environment:u,publishableKey:c,logger:s}):void 0,C=x=>x===p,F=()=>{if(typeof window>"u")return;p++,f==null||f(),f=void 0,X.flushStateData().catch(()=>{}),M.cancelCurrentFlow(),at.isBotTyping$.value=!1;const x=t.getChatbotElement();x&&(Pt(null,x),x.remove()),d=!1,s.info("Chatbot plugin destroyed")},D=()=>{if(typeof window>"u")return;const x=p,_=[st("style",{id:"inploi-chatbot-styles"},ac),st("style",{id:"inploi-chatbot-theme"},kd(e))],S=t.getOrCreateChatbotElement();at.themeMode$.value=e.mode;const w=rt(!1);if(Pt(st(lt,{},[_,st(Xl,{env:u,rpcClient:r,apiClient:h,logger:s,analytics:l,talentBankClient:O,params:{theme:e,terms:n,feedback:i},feedbackReady:w})]),S),i){const I=E=>{var Y,H;if(!C(x))return;const Z=(Y=t.getChatbotElement())==null?void 0:Y.querySelector("dialog");Z&&Sd({instance:E({rpcClient:r,apiClient:a,logger:s,analytics:l}),theme:e,terms:((H=i.params)==null?void 0:H.terms)??{},host:Z}).then(()=>{w.value=!0},ct=>s.error("Error rendering feedback plugin",ct))};i.plugin instanceof Promise?i.plugin.then(({feedbackPlugin:E})=>{I(E())}).catch(E=>{s.error("Error preparing feedback plugin",E)}):I(i.plugin)}f??(f=cd(l)),d=!0},B=async(x,_)=>{if(!C(_))return;rs({context:Yn(x.jobContext,x.context||{}),schema:x.flow.context_schema,logger:s});const S=await M.prepareFlow({...x,jobAlerts:x.jobAlerts??o});C(_)&&M.commitFlow(S)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(d)return;D(),s.info("Chatbot plugin prepared")}catch(x){s.error("Error preparing chatbot plugin",x)}},fetchFlowByJobId:async(x,_)=>{const S=(_==null?void 0:_.idType)==="inploi"?"internal":"external";return k("flow_by_job",r.request(ds,{params:{id:x},searchParams:{id_type:S}})).catch(w=>{throw ca({name:"ApiError",message:Mt.string,status:410,data:Mt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},w)?new wo(w.message,w.status,w.data):w}).then(w=>({flow:w.flow,title:w.job.title,flowKeys:[w.job.id,...(_==null?void 0:_.flowKeys)??[]],job:cs(w,{id:x,idType:S}),employer:w.company.name,..._,jobContext:w.context,context:{user:w.user,..._==null?void 0:_.context}}))},fetchFlowById:async(x,_)=>k("flow_by_id",r.request(us,{params:{id:x}})).then(S=>{var w;return{flow:S.flow,title:"Chatbot",flowKeys:(_==null?void 0:_.flowKeys)??[],..._,analytics:{customProperties:{flow_id:S.flow.id,flow_version:S.flow.version,...(w=_==null?void 0:_.analytics)==null?void 0:w.customProperties}}}}),open:async x=>{if(typeof window>"u")return;const _=performance.now();try{M.cancelCurrentFlow(),M.viewState$.value="maximised",d||D()}catch(w){s.error("Error starting flow",w),Ht("boot_failed",Oe(w),{phase:"config",error:Mn(w),elapsed_ms:Math.round(performance.now()-_)});return}Ht("boot");const S=p;if(x instanceof Promise){M.current$.value={state:"loading"};const w=I=>E=>{C(S)&&(s.error("Error loading flow",E),M.current$.value={state:E instanceof wo?"closed":"error"},y(E,I))};x.then(I=>B(I,S).catch(w("create")),w("flow_fetch"))}else await B(x,S).catch(w=>{s.error("Error starting flow",w),y(w,"create")})},hasApplicationInProgress:async x=>{const _=await X.getStateData(x.flow,x.flowKeys,x.context??{});return _!==void 0&&ro({data:_,nodes:x.flow.nodes})},hasAnyApplicationInProgress:async()=>(await X.getAllStateData()).some(x=>ro({data:x,nodes:[]})),close:async()=>{typeof window>"u"||(M.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:F}});function Sd({instance:t,terms:e,theme:n,host:i}){return t.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:n.chroma??1,hue:n.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:n.mode,corners:"rounded",highlights:"stroke"},terms:e,host:i})}exports.B=Io;exports.Bt=Dc;exports.ChevronDown=Ca;exports.Cn=yl;exports.D=Et;exports.Ee=La;exports.F=It;exports.LoadingIndicator=Ea;exports.M=Re;exports.Oe=Po;exports.Oe$1=Na;exports.Se=Ao;exports.SvgIconButton=je;exports._=Lt;exports._e=Dr;exports.at=Ha;exports.chatStore=at;exports.chatbotPath=re;exports.chatbotPlugin=$d;exports.clsx=Fe;exports.createTFunction=El;exports.cva=Be;exports.d=rt;exports.getFormSubmitter=zl;exports.h=Zn;exports.idb=X;exports.ie=Kn;exports.invariant=ii;exports.isSubmissionOfType=Hl;exports.k=lt;exports.k$1=ba;exports.ke=Br;exports.o=g;exports.p=Le;exports.qe=as;exports.sendChatbotPath=Rt;exports.store=M;exports.useChatService=fd;exports.useTranslation=de;exports.withChatbotPathSubmissions=dd;exports.y=Nt;exports.z=Mt;