@inploi/plugin-chatbot 14.18.0 → 14.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +10 -11
- package/cdn/style.css +1 -1
- package/dist/chatbot-body-B9-4nZ6I.cjs +5 -0
- package/dist/chatbot-body-nYJfLJVU.js +4343 -0
- package/dist/index-BQAeBeON.cjs +21 -0
- package/dist/index-DZr-JCDW.js +3214 -0
- package/dist/index.d.cts +547 -0
- package/dist/index.d.ts +547 -2
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +2 -3
- package/dist/style.css +1 -1
- package/package.json +17 -12
- package/dist/accessible-labels.test.d.ts +0 -1
- package/dist/chatbot-body-568f8bdb.cjs +0 -5
- package/dist/chatbot-body-b81136fe.cjs +0 -5
- package/dist/chatbot-body-c8f256af.js +0 -4637
- package/dist/chatbot-body-e611f2c7.js +0 -4637
- package/dist/chatbot.analytics.d.ts +0 -37
- package/dist/chatbot.analytics.test.d.ts +0 -1
- package/dist/chatbot.api.d.ts +0 -26
- package/dist/chatbot.beacon.d.ts +0 -40
- package/dist/chatbot.beacon.test.d.ts +0 -1
- package/dist/chatbot.constants.d.ts +0 -2
- package/dist/chatbot.context.test.d.ts +0 -1
- package/dist/chatbot.d.ts +0 -104
- package/dist/chatbot.dom.d.ts +0 -5
- package/dist/chatbot.idb.d.ts +0 -73
- package/dist/chatbot.lifecycle.test.d.ts +0 -1
- package/dist/chatbot.resume.d.ts +0 -15
- package/dist/chatbot.resume.test.d.ts +0 -1
- package/dist/chatbot.state.d.ts +0 -78
- package/dist/chatbot.state.test.d.ts +0 -1
- package/dist/chatbot.storage.test.d.ts +0 -1
- package/dist/chatbot.utils.d.ts +0 -8
- package/dist/components/chat-bubble.d.ts +0 -11
- package/dist/components/chat-error.d.ts +0 -3
- package/dist/components/chat-input/chat-input.address-countries.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.address-geo.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.address.d.ts +0 -5
- package/dist/components/chat-input/chat-input.address.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.boolean.d.ts +0 -11
- package/dist/components/chat-input/chat-input.constants.d.ts +0 -1
- package/dist/components/chat-input/chat-input.d.ts +0 -12
- package/dist/components/chat-input/chat-input.file.d.ts +0 -8
- package/dist/components/chat-input/chat-input.file.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.multiple-choice.d.ts +0 -4
- package/dist/components/chat-input/chat-input.multiple-choice.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.number.d.ts +0 -4
- package/dist/components/chat-input/chat-input.phone-number.d.ts +0 -4
- package/dist/components/chat-input/chat-input.submit.d.ts +0 -4
- package/dist/components/chat-input/chat-input.submit.test.d.ts +0 -1
- package/dist/components/chat-input/chat-input.text.d.ts +0 -5
- package/dist/components/chat-input/chat-input.text.test.d.ts +0 -1
- package/dist/components/chat-input/input-style.d.ts +0 -3
- package/dist/components/chat-loading.d.ts +0 -1
- package/dist/components/chatbot-body.d.ts +0 -12
- package/dist/components/chatbot-body.lifecycle.test.d.ts +0 -1
- package/dist/components/chatbot.d.ts +0 -17
- package/dist/components/conversation.d.ts +0 -8
- package/dist/components/correction.test.d.ts +0 -1
- package/dist/components/input-error.d.ts +0 -5
- package/dist/components/job-alerts-offer.d.ts +0 -13
- package/dist/components/job-alerts-offer.test.d.ts +0 -1
- package/dist/components/job-alerts-privacy-line.test.d.ts +0 -1
- package/dist/components/loading-indicator.d.ts +0 -3
- package/dist/components/message.link.d.ts +0 -5
- package/dist/components/palette-debugger.d.ts +0 -1
- package/dist/components/send-button.d.ts +0 -3
- package/dist/components/skip-button.d.ts +0 -3
- package/dist/components/status-bar.d.ts +0 -22
- package/dist/components/status-bar.test.d.ts +0 -1
- package/dist/components/transition.d.ts +0 -1
- package/dist/components/typing-indicator.d.ts +0 -3
- package/dist/components/useChatService.d.ts +0 -17
- package/dist/components/useChatService.test.d.ts +0 -1
- package/dist/components/useFocus.d.ts +0 -1
- package/dist/i18n.d.ts +0 -776
- package/dist/index-0fbc8442.js +0 -3756
- package/dist/index-19a00d2c.js +0 -3757
- package/dist/index-495ec66b.cjs +0 -22
- package/dist/index-90fa15a1.cjs +0 -22
- package/dist/index.cdn.d.ts +0 -9
- package/dist/index.dev.d.ts +0 -8
- package/dist/interpreter.test.d.ts +0 -1
- package/dist/md.d.ts +0 -1
- package/dist/md.test.d.ts +0 -1
- package/dist/mocks/browser.d.ts +0 -1
- package/dist/mocks/flows.mocks.d.ts +0 -77
- package/dist/mocks/handlers.d.ts +0 -14
- package/dist/mocks/mocks.utils.d.ts +0 -5
- package/dist/mocks/pre-apply.mock.d.ts +0 -296
- package/dist/phone.test.d.ts +0 -1
- package/dist/progress.d.ts +0 -12
- package/dist/progress.test.d.ts +0 -1
- package/dist/rpc.d.ts +0 -1
- package/dist/style/theme.d.ts +0 -3
- package/dist/style/theme.utils.d.ts +0 -6
- package/dist/style/tokens.d.ts +0 -86
- package/dist/widget-version.d.ts +0 -9
- package/dist/widget-version.test.d.ts +0 -1
- /package/dist/{common.geo-transport-CJGUJXTA-1d0a086a.js → common.geo-transport-CJGUJXTA-BsgnqoTX.js} +0 -0
- /package/dist/{common.geo-transport-CJGUJXTA-2b8bbb52.cjs → common.geo-transport-CJGUJXTA-DQyNyTXw.cjs} +0 -0
package/cdn/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var bb=Object.defineProperty;var mb=(Xe,Re,Ut)=>Re in Xe?bb(Xe,Re,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Xe[Re]=Ut;var ge=(Xe,Re,Ut)=>mb(Xe,typeof Re!="symbol"?Re+"":Re,Ut);(function(){"use strict";var Xe=typeof document<"u"?document.currentScript:null,Re=new Set(["Error","TypeError","RangeError","ReferenceError","SyntaxError","URIError","EvalError","AggregateError","AbortError","TimeoutError","NetworkError","NotAllowedError","NotFoundError","NotSupportedError","InvalidStateError","QuotaExceededError","SecurityError","DataCloneError","ChunkLoadError"]),Ut=[/^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\.)$/],Hl=`IDBDatabase IDBObjectStore IDBTransaction IDBFactory IDBRequest IDBOpenDBRequest IDBIndex IDBCursor IDBKeyRange
|
|
2
2
|
Storage StorageManager Window Document Element HTMLElement HTMLIFrameElement HTMLMediaElement HTMLFormElement
|
|
3
3
|
HTMLInputElement Node EventTarget Navigator Clipboard ServiceWorkerContainer ServiceWorkerRegistration Response
|
|
4
4
|
Request Headers URL URLSearchParams Blob File FileReader FormData MessagePort Worker Cache CacheStorage History
|
|
@@ -12,9 +12,9 @@ var ag=Object.defineProperty;var og=(ut,Re,Et)=>Re in ut?ag(ut,Re,{enumerable:!0
|
|
|
12
12
|
getRegistration requestStorageAccess focus blur scrollTo scrollIntoView setAttribute getAttribute
|
|
13
13
|
getBoundingClientRect attachShadow define pushState replaceState assign replace reload send close abort
|
|
14
14
|
requestAnimationFrame matchMedia getComputedStyle createElement structuredClone localStorage sessionStorage
|
|
15
|
-
indexedDB serviceWorker clipboard cookie`,
|
|
16
|
-
`,1e3).length:0}}}catch{return r}},
|
|
17
|
-
`,60)){let p=b.indexOf(t),g=p!==-1&&(p===0||" (@".includes(b[p-1])),v=g?Jl.exec(b.slice(p+t.length).trim()):null;v?c.push([v[1],v[2],v[3]].filter(Boolean).join(":")):g?f.add("build"):Hl.test(b)&&f.add(Yl(b))}c.splice(10);let d={name:n,message:l,stack:c,foreign:[...f].sort(),thrown:o};for(;JSON.stringify(d).length>1400&&d.stack.length;)d.stack.pop();return d},ca="inploi-candidate-beacon-seed",rc=()=>{try{return typeof sessionStorage>"u"?void 0:sessionStorage}catch{return}},nc=()=>({host:"s2811583.eu-central-1a.betterstackdata.com",token:"LHJqsZXu82MrkgUP44JHAwvU",sampleRate:Math.min(1,Math.max(0,1))}),da=e=>{let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);t=Math.imul(t^i,2654435761),r=Math.imul(r^i,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&r)+(t>>>0)},ic=(e,t)=>{try{let r=e==null?void 0:e.getItem(ca);if(r)return r;let n=t();return e==null||e.setItem(ca,n),n}catch{return t()}},ac=[["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\//]],oc=[["ios",/\b(?:iPhone|iPad|iPod)\b/],["android",/\bAndroid\b/],["windows",/\bWindows\b/],["chromeos",/\bCrOS\b/],["mac",/\bMacintosh\b/],["linux",/\bLinux\b/]],sc=e=>{var n,i;let t=ac.find(([,a])=>a.test(e)),r=(n=t==null?void 0:t[1].exec(e))==null?void 0:n[1];return{browser:t?[t[0],r].filter(Boolean).join(" "):"other",platform:((i=oc.find(([,a])=>a.test(e)))==null?void 0:i[0])??"other"}},lc=(e=typeof document>"u"?void 0:document)=>{var a,o;let t=()=>typeof performance>"u"?0:Math.round(performance.now()),r=(e==null?void 0:e.visibilityState)==="hidden"?t():null,n=null,i=!1;return e==null||e.addEventListener("visibilitychange",()=>{e.visibilityState==="hidden"?r=t():r!==null&&(n=t())}),(a=e==null?void 0:e.defaultView)==null||a.addEventListener("pagehide",()=>i=!0),(o=e==null?void 0:e.defaultView)==null||o.addEventListener("pageshow",()=>i=!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:(e==null?void 0:e.visibilityState)??"unknown",was_hidden:r!==null,hidden_at_ms:r,shown_at_ms:n,unloading:i,online:typeof(s==null?void 0:s.onLine)=="boolean"?s.onLine:null,connection:typeof l=="string"?l.slice(0,8):null,...sc((s==null?void 0:s.userAgent)??""),page_ms:t()}}},cc=new Set(["boot_failed","fatal","submit_blocked"]),dc=(e,t,r)=>{if(t.unloading||t.visibility==="hidden")return!0;if(e!=="boot_failed"||t.hidden_at_ms===null)return!1;if(r.elapsed_ms===void 0)return!0;let n=t.page_ms-r.elapsed_ms;return t.hidden_at_ms>=n||t.shown_at_ms!==null&&t.shown_at_ms>=n},uc=(e,t,r,n,i)=>{var o;if(t)return"abandoned";if(i.online===!1)return"offline";let a=[n.phase,n.stage,r==null?void 0:r.slice(0,40),n.http_status??((o=n.error)==null?void 0:o.name)];return[...new Set(a.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||e},fc=({config:e,version:t,env:r,seed:n,automated:i=typeof navigator<"u"&&navigator.webdriver===!0,company:a,page:o=lc(),now:s=Date.now,post:l=(c,f)=>fetch(c,f)})=>{let c=da(n),f=s(),d=e!==void 0&&c%1e4<e.sampleRate*1e4,b=new Set;return{send:(p,g,v={})=>{if(!e||!d||!t)return;let x=o(),C=cc.has(p),_=C&&dc(p,x,v),M=_?`${p}:abandoned`:p;if(b.has(M))return;b.add(M);let{error:D,...j}=v,z={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:p,version:t,company_slug:(a==null?void 0:a())??null,env:r==="production"?"production":"staging",mode:i?"test":"live",seed_hash:c.toString(36),sample_rate:e.sampleRate,...g&&{reason:g.slice(0,40)},...C&&{abandoned:_,cause:uc(p,_,g,v,x).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-f)),...x,...j,...D&&{error:D,error_message:D.message,error_frame:D.stack[0]??null}};l(`https://${e.host}`,{method:"POST",keepalive:!0,headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(z)}).catch(()=>{})}}},Ze;function ua(e){return{lang:(e==null?void 0:e.lang)??(Ze==null?void 0:Ze.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ze==null?void 0:Ze.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ze==null?void 0:Ze.abortPipeEarly)}}var _n;function pc(e){return _n==null?void 0:_n.get(e)}var xn;function hc(e){return xn==null?void 0:xn.get(e)}var kn;function bc(e,t){var r;return(r=kn==null?void 0:kn.get(e))==null?void 0:r.get(t)}function Sn(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function $e(e,t,r,n,i){let a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Sn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??bc(e.reference,l.lang)??(c?hc(l.lang):null)??n.message??pc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function we(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ua())}}}function gc(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Cn(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function fa(e){return{kind:"transformation",type:"transform",reference:fa,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function mc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function En(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function pa(){return{kind:"schema",type:"any",reference:pa,expects:"any",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function ha(e,t){return{kind:"schema",type:"array",reference:ha,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var a;let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){let s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:i,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(c):f.path=[c],(a=r.issues)==null||a.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else $e(this,"type",r,n);return r}}}function $n(e){return{kind:"schema",type:"boolean",reference:$n,expects:"boolean",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:$e(this,"type",t,r),t}}}function Ae(e,t){return{kind:"schema",type:"literal",reference:Ae,expects:Sn(e),async:!1,literal:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:$e(this,"type",r,n),r}}}function ba(e){return{kind:"schema",type:"null",reference:ba,expects:"null",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return t.value===null?t.typed=!0:$e(this,"type",t,r),t}}}function $t(e,t){return{kind:"schema",type:"nullable",reference:$t,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=En(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Pr(e){return{kind:"schema",type:"number",reference:Pr,expects:"number",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:$e(this,"type",t,r),t}}}function ee(e,t){return{kind:"schema",type:"object",reference:ee,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){var a;let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in i?i[o]:En(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:i,key:o,value:l};for(let d of c.issues)d.path?d.path.unshift(f):d.path=[f],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=mc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&($e(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else $e(this,"type",r,n);return r}}}function _e(e,t){return{kind:"schema",type:"optional",reference:_e,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return we(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=En(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ga(e,t){return{kind:"schema",type:"picklist",reference:ga,expects:Cn(e.map(Sn),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:$e(this,"type",r,n),r}}}function An(e,t,r){return{kind:"schema",type:"record",reference:An,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return we(this)},"~run"(n,i){var o,s;let a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(let l in a)if(gc(a,l)){let c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){let b={type:"object",origin:"key",input:a,key:l,value:c};for(let p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}let d=this.value["~run"]({value:c},i);if(d.issues){let b={type:"object",origin:"value",input:a,key:l,value:c};for(let p of d.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else $e(this,"type",n,i);return n}}}function ge(e){return{kind:"schema",type:"string",reference:ge,expects:"string",async:!1,message:e,get"~standard"(){return we(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:$e(this,"type",t,r),t}}}function ma(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function In(e,t){return{kind:"schema",type:"union",reference:In,expects:Cn(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return we(this)},"~run"(r,n){let i,a,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];$e(this,"type",r,n,{issues:ma(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];$e(this,"type",r,n,{issues:ma(o)})}return r}}}function Bt(){return{kind:"schema",type:"unknown",reference:Bt,expects:"unknown",async:!1,get"~standard"(){return we(this)},"~run"(e){return e.typed=!0,e}}}function va(e,t,r){return{kind:"schema",type:"variant",reference:va,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return we(this)},"~run"(n,i){let a=n.value;if(a&&typeof a=="object"){let o,s=0,l=this.key,c=[],f=(d,b)=>{for(let p of d.options){if(p.type==="variant")f(p,new Set(b).add(p.key));else{let g=!0,v=0;for(let x of b){let C=p.entries[x];if(x in a?C["~run"]({typed:!1,value:a[x]},{abortEarly:!0}).issues:C.type!=="exact_optional"&&C.type!=="optional"&&C.type!=="nullish"){g=!1,l!==x&&(s<v||s===v&&x in a&&!(l in a))&&(s=v,l=x,c=[]),l===x&&c.push(p.entries[x].expects);break}v++}if(g){let x=p["~run"]({value:a},i);(!o||!o.typed&&x.typed)&&(o=x)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;$e(this,"type",n,i,{input:a[l],expected:Cn(c,"|"),path:[{type:"object",origin:"value",input:a,key:l,value:a[l]}]})}else $e(this,"type",n,i);return n}}}function vc(...e){return{...e[0],pipe:e,get"~standard"(){return we(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function fr(e,t,r){let n=e["~run"]({value:t},ua(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var wc=e=>({ok:!0,err:!1,val:e}),yc=e=>({err:!0,ok:!1,val:e}),Tn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function jn(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let i=(o=t[n.data.participationKey])==null?void 0:o.value,a={};if(i===!0)for(let l of Tn(e)){let c=(s=t[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:n.id,flow_session_id:r,participation:i,answers:a}}function _c(e,t){let r=jn(e,t,""),n=Tn(e).map(a=>{let o=a.data.preApply,s=r==null?void 0:r.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:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),i=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(a=>a.valid)?"completed":"unavailable";return{status:i,hasHardConcerns:i==="completed"?n.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:i==="completed"?n.some(a=>!a.matched&&a.severity==="advisory"):null,answers:i==="completed"?n:[]}}function xc(e,t){let r=new Set(Tn(e).map(n=>n.data.key));for(let n of e)n.type==="pre-apply-result"&&(r.add(n.data.key),r.add(n.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([n])=>!r.has(n)))}var ft=class extends Error{constructor(){super("Aborted")}},pr=(e,t)=>{if(t.length===0)return;let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n]}return r},kc=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let i in e){let a=e[i];a&&(n&&!n.has(i)||(r[i]=a.value))}return r},wa=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,i])=>i!==void 0&&i.type!=="integration"&&!r.has(n))},Sc=({key:e,submissions:t})=>{var n;let r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},ya=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let i=pr(n,t);switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r[e]},Cc=e=>{let t=e.split(".").pop();return t?wc(t?"."+t:""):yc("No file extension found")},_a=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let i=Cc(n.name);return i.ok&&r.includes(i.val.toLowerCase())})},zt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Vr=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,Ec=ee({integration_response:ee({data:ee({redirect_url:ge(),message:_e($t(ge())),button_text:_e($t(ge()))})})}),Dn=e=>fr(Ec,e).success,$c=ee({integration_response:ee({status:_e(Bt()),error:ee({message:ge(),data:_e(Bt())})})}),xa=e=>fr($c,e).success,Ac=ee({success:Ae(!0),integration_response:ee({data:ee({outcome:Ae("pending"),message:_e(Bt())}),error:_e(ba())})}),Mn=e=>{let t=fr(Ac,e);if(!t.success||Dn(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};ee({success:Ae(!1),message:_e(Bt())});var Ic=ee({error:Ae("Validation failed"),messages:ee({})}),Tc=(e,t)=>t===422&&fr(Ic,e).success,ka=(e,t)=>{if(!xa(e))return;let r=e.integration_response,n=r.error.data,i=typeof n=="object"&&n!==null?n:{},a=g=>typeof i[g]=="string"?i[g]:void 0,o=g=>typeof i[g]=="boolean"?i[g]:void 0,s=g=>{let v=i[g];return Number.isSafeInteger(v)&&v>=0?v:void 0},l=g=>{let v=a(g),x=v===void 0?NaN:Date.parse(v);return Number.isFinite(x)?x:void 0},c=typeof r.status=="number"?r.status:t,f=a("phase"),d=a("verdict"),b=a("code"),p=c===409&&f==="submit"&&d==="confirmed"?"duplicate":c===410&&b==="job_closed"?"closed":f==="submit"&&d==="unknown"?"unknown":void 0;return{message:r.error.message,status:c,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:d,code:b,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:p}},jc=va("reason",[ee({outcome:Ae("sent"),reason:Ae("sandbox"),ats_label:$t(ge())}),ee({outcome:Ae("held"),reason:ga(["production_connection","no_sandbox_known","company_hold"]),ats_label:$t(ge())}),ee({outcome:Ae("internal"),reason:Ae("internal"),ats_label:$t(ge())}),ee({outcome:Ae("held"),reason:Ae("redirect"),ats_label:ge()})]),Dc=e=>{let t=fr(ee({staging_destination:jc}),e);if(!t.success)return;let r=t.output.staging_destination;switch(r.reason){case"sandbox":return`Staging: sent to ${r.ats_label===null?"the ATS":r.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 ${r.ats_label}`}},Sa=3e4,Mc=2e4,Oc=6e4,On=12e4,Ca=6*60*6e4,Lc=60*6e4,Ea=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,r=t===void 0?0:t-Date.now();return r>0&&r<=Ca?t:void 0},Fc=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Ea(e);return t===void 0?{}:{until:t}},$a=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Nc=(e,t)=>{let r=Ea(t);if(r!==void 0)return{waitMs:r-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:Sa};let n=(e??0)+1,i=Math.min(n*Mc,Oc),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(i,a),On),throttles:n}},Aa=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Rc=e=>{if(!xa(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Pc=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",Vc=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",Bc=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,zc=(e,t)=>{if(typeof e!="object"||e===null)return null;let r=e.integration_response;if(typeof r!="object"||r===null){if(t===void 0)return null;let l="code"in e&&typeof e.code=="string"?e.code:void 0;return{service:"API",response:{status:t,payload:l===void 0?{}:{code:l}}}}let n=r;if(typeof n.status!="number"||n.service!==void 0&&typeof n.service!="string")return null;let i="data"in n,a=n.error,o=typeof a=="object"&&a!==null&&typeof a.message=="string"&&"data"in a;if(!i&&!o)return null;let s=i?n.data:a.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...Mn(e)&&{outcome:"pending"}}},Uc=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},qc=(e,t)=>{if(!Uc(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},Wc=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{if(typeof n.result!="string"||!n.result)return r(new Error("Invalid file"));t(n.result)},n.onerror=r,n.readAsDataURL(e)}),Ia=e=>typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Ln=(e,t)=>e?{...e,...Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>{let i=e[r];return[r,Ia(i)&&Ia(n)?Ln(i,n):n]}))}:t,Hc=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let i=t[n];if(!i)continue;let a=pr(e,n.split("."));if(i.required&&a==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(i.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},Ta={uk:"gb","great britain":"gb",england:"gb",scotland:"gb",wales:"gb","northern ireland":"gb",lincolnshire:"gb",surrey:"gb","republic of ireland":"ie",eire:"ie","hong kong sar":"hk","united states of america":"us",turkey:"tr","czech republic":"cz",burma:"mm",kosovo:"xk",xk:"xk"},Kc=`adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel
|
|
15
|
+
indexedDB serviceWorker clipboard cookie`,Wl=["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"],Kl=/^Failed to (?:execute|read|set|construct) (?:the )?'([\w$]{1,40})'(?: (?:on|property (?:from|on)|from) '([\w$]{1,40})')?(?:: (.*))?$/,di,Gl=e=>{let{apis:t,sentences:r}=di??(di={apis:new Set(Hl.split(/\s+/)),sentences:new Set(Wl)});if(r.has(e))return e;let n=Kl.exec(e);if(!n)return"";let[,a,i,o]=n;return t.has(a)&&(i===void 0||t.has(i))&&(o===void 0||r.has(o))?e:""},Yl=/^\s*at\s|@(?:[a-z][\w+.-]*:\/\/|\[native code\])/i,Jl=/\b(?:chrome|moz|safari|safari-web|ms-browser)-extension:\/\//,Zl=/\[native code\]|<anonymous>|\(native\)/,Xl=e=>Jl.test(e)?"extension":Zl.test(e)?"native":"script",fi=/^(Failed to fetch dynamically imported module|error loading dynamically imported module)/,Ql=/^((?:[\w-]{1,20}\/){0,3}[\w.-]{1,80}\.js)(?:\?retry=\d{1,3})?:(\d{1,7})(?::(\d{1,7}))?\)?$/,ec=/^ResizeObserver loop (?:completed with undelivered notifications\.|limit exceeded)$/,tc=({error:e,message:t})=>e==null&&ec.test(t),Pr=e=>e instanceof Error?Re.has(e.name)?e.name:"Error":typeof e,rc=new Set(["DOMException","Object","Array","Promise","Event","ErrorEvent","PromiseRejectionEvent","ProgressEvent","CloseEvent","MessageEvent","Response","Request","XMLHttpRequest"]),nc=e=>{var n,a;let t=e===null?"null":typeof e,r={message:"",stack:"",thrown:{type:t,ctor:"",keys:0,message_length:0,stack_lines:0}};if(typeof e=="string")return{...r,thrown:{...r.thrown,message_length:e.length}};if(typeof e!="object"||e===null)return r;try{let{message:i,stack:o}=e,s=(a=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor)==null?void 0:a.name,l=typeof s!="string"?"":Re.has(s)||rc.has(s)?s:"other",c=typeof i=="string"?i:"",f=typeof o=="string"?o:"";return{message:e instanceof Error||Re.has(l)||l==="DOMException"?c:"",stack:f,thrown:{type:t,ctor:l,keys:Object.keys(e).length,message_length:c.length,stack_lines:f?f.split(`
|
|
16
|
+
`,1e3).length:0}}}catch{return r}},ac=(e,t,r="")=>{let n=Pr(e),{message:a,stack:i,thrown:o}=nc(e),s=(e==null?r:a).slice(0,300),l=Ut.some(g=>g.test(s))?s:fi.test(s)?fi.exec(s)[1]:Gl(s),c=[],f=new Set;for(let g of i.split(`
|
|
17
|
+
`,60)){let p=g.indexOf(t),b=p!==-1&&(p===0||" (@".includes(g[p-1])),v=b?Ql.exec(g.slice(p+t.length).trim()):null;v?c.push([v[1],v[2],v[3]].filter(Boolean).join(":")):b?f.add("build"):Yl.test(g)&&f.add(Xl(g))}c.splice(10);let u={name:n,message:l,stack:c,foreign:[...f].sort(),thrown:o};for(;JSON.stringify(u).length>1400&&u.stack.length;)u.stack.pop();return u},pi="inploi-candidate-beacon-seed",ic=()=>{try{return typeof sessionStorage>"u"?void 0:sessionStorage}catch{return}},oc=()=>({host:"s2811583.eu-central-1a.betterstackdata.com",token:"LHJqsZXu82MrkgUP44JHAwvU",sampleRate:Math.min(1,Math.max(0,1))}),hi=e=>{let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=Math.imul(t^a,2654435761),r=Math.imul(r^a,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&r)+(t>>>0)},sc=(e,t)=>{try{let r=e==null?void 0:e.getItem(pi);if(r)return r;let n=t();return e==null||e.setItem(pi,n),n}catch{return t()}},lc=[["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\//]],cc=[["ios",/\b(?:iPhone|iPad|iPod)\b/],["android",/\bAndroid\b/],["windows",/\bWindows\b/],["chromeos",/\bCrOS\b/],["mac",/\bMacintosh\b/],["linux",/\bLinux\b/]],uc=e=>{var n,a;let t=lc.find(([,i])=>i.test(e)),r=(n=t==null?void 0:t[1].exec(e))==null?void 0:n[1];return{browser:t?[t[0],r].filter(Boolean).join(" "):"other",platform:((a=cc.find(([,i])=>i.test(e)))==null?void 0:a[0])??"other"}},dc=(e=typeof document>"u"?void 0:document)=>{var i,o;let t=()=>typeof performance>"u"?0:Math.round(performance.now()),r=(e==null?void 0:e.visibilityState)==="hidden"?t():null,n=null,a=!1;return e==null||e.addEventListener("visibilitychange",()=>{e.visibilityState==="hidden"?r=t():r!==null&&(n=t())}),(i=e==null?void 0:e.defaultView)==null||i.addEventListener("pagehide",()=>a=!0),(o=e==null?void 0:e.defaultView)==null||o.addEventListener("pageshow",()=>a=!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:(e==null?void 0:e.visibilityState)??"unknown",was_hidden:r!==null,hidden_at_ms:r,shown_at_ms:n,unloading:a,online:typeof(s==null?void 0:s.onLine)=="boolean"?s.onLine:null,connection:typeof l=="string"?l.slice(0,8):null,...uc((s==null?void 0:s.userAgent)??""),page_ms:t()}}},fc=new Set(["boot_failed","fatal","submit_blocked"]),pc=(e,t,r)=>{if(t.unloading||t.visibility==="hidden")return!0;if(e!=="boot_failed"||t.hidden_at_ms===null)return!1;if(r.elapsed_ms===void 0)return!0;let n=t.page_ms-r.elapsed_ms;return t.hidden_at_ms>=n||t.shown_at_ms!==null&&t.shown_at_ms>=n},hc=(e,t,r,n,a)=>{var o;if(t)return"abandoned";if(a.online===!1)return"offline";let i=[n.phase,n.stage,r==null?void 0:r.slice(0,40),n.http_status??((o=n.error)==null?void 0:o.name)];return[...new Set(i.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||e},gc=({config:e,version:t,env:r,seed:n,automated:a=typeof navigator<"u"&&navigator.webdriver===!0,company:i,page:o=dc(),now:s=Date.now,post:l=(c,f)=>fetch(c,f)})=>{let c=hi(n),f=s(),u=e!==void 0&&c%1e4<e.sampleRate*1e4,g=new Set;return{send:(p,b,v={})=>{if(!e||!u||!t)return;let x=o(),S=fc.has(p),_=S&&pc(p,x,v),j=_?`${p}:abandoned`:p;if(g.has(j))return;g.add(j);let{error:O,...M}=v,B={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:p,version:t,company_slug:(i==null?void 0:i())??null,env:r==="production"?"production":"staging",mode:a?"test":"live",seed_hash:c.toString(36),sample_rate:e.sampleRate,...b&&{reason:b.slice(0,40)},...S&&{abandoned:_,cause:hc(p,_,b,v,x).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-f)),...x,...M,...O&&{error:O,error_message:O.message,error_frame:O.stack[0]??null}};l(`https://${e.host}`,{method:"POST",keepalive:!0,headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(B)}).catch(()=>{})}}},Qe;function gi(e){return{lang:(e==null?void 0:e.lang)??(Qe==null?void 0:Qe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Qe==null?void 0:Qe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Qe==null?void 0:Qe.abortPipeEarly)}}var kn;function bc(e){return kn==null?void 0:kn.get(e)}var Sn;function mc(e){return Sn==null?void 0:Sn.get(e)}var $n;function vc(e,t){var r;return(r=$n==null?void 0:$n.get(e))==null?void 0:r.get(t)}function Cn(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Ae(e,t,r,n,a){let i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??Cn(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??vc(e.reference,l.lang)??(c?mc(l.lang):null)??n.message??bc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function _e(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},gi())}}}function wc(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function En(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function bi(e){return{kind:"transformation",type:"transform",reference:bi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function yc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function An(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function mi(){return{kind:"schema",type:"any",reference:mi,expects:"any",async:!1,get"~standard"(){return _e(this)},"~run"(e){return e.typed=!0,e}}}function vi(e,t){return{kind:"schema",type:"array",reference:vi,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return _e(this)},"~run"(r,n){var i;let a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){let s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:a,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ae(this,"type",r,n);return r}}}function In(e){return{kind:"schema",type:"boolean",reference:In,expects:"boolean",async:!1,message:e,get"~standard"(){return _e(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ae(this,"type",t,r),t}}}function Ie(e,t){return{kind:"schema",type:"literal",reference:Ie,expects:Cn(e),async:!1,literal:e,message:t,get"~standard"(){return _e(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ae(this,"type",r,n),r}}}function wi(e){return{kind:"schema",type:"null",reference:wi,expects:"null",async:!1,message:e,get"~standard"(){return _e(this)},"~run"(t,r){return t.value===null?t.typed=!0:Ae(this,"type",t,r),t}}}function Et(e,t){return{kind:"schema",type:"nullable",reference:Et,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return _e(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=An(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Rr(e){return{kind:"schema",type:"number",reference:Rr,expects:"number",async:!1,message:e,get"~standard"(){return _e(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ae(this,"type",t,r),t}}}function te(e,t){return{kind:"schema",type:"object",reference:te,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return _e(this)},"~run"(r,n){var i;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in a?a[o]:An(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:a,key:o,value:l};for(let u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=yc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ae(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else Ae(this,"type",r,n);return r}}}function ke(e,t){return{kind:"schema",type:"optional",reference:ke,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return _e(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=An(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function yi(e,t){return{kind:"schema",type:"picklist",reference:yi,expects:En(e.map(Cn),"|"),async:!1,options:e,message:t,get"~standard"(){return _e(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ae(this,"type",r,n),r}}}function Tn(e,t,r){return{kind:"schema",type:"record",reference:Tn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return _e(this)},"~run"(n,a){var o,s;let i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(let l in i)if(wc(i,l)){let c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){let g={type:"object",origin:"key",input:i,key:l,value:c};for(let p of f.issues)p.path=[g],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}let u=this.value["~run"]({value:c},a);if(u.issues){let g={type:"object",origin:"value",input:i,key:l,value:c};for(let p of u.issues)p.path?p.path.unshift(g):p.path=[g],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else Ae(this,"type",n,a);return n}}}function ve(e){return{kind:"schema",type:"string",reference:ve,expects:"string",async:!1,message:e,get"~standard"(){return _e(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ae(this,"type",t,r),t}}}function _i(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function Dn(e,t){return{kind:"schema",type:"union",reference:Dn,expects:En(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return _e(this)},"~run"(r,n){let a,i,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];Ae(this,"type",r,n,{issues:_i(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ae(this,"type",r,n,{issues:_i(o)})}return r}}}function qt(){return{kind:"schema",type:"unknown",reference:qt,expects:"unknown",async:!1,get"~standard"(){return _e(this)},"~run"(e){return e.typed=!0,e}}}function xi(e,t,r){return{kind:"schema",type:"variant",reference:xi,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return _e(this)},"~run"(n,a){let i=n.value;if(i&&typeof i=="object"){let o,s=0,l=this.key,c=[],f=(u,g)=>{for(let p of u.options){if(p.type==="variant")f(p,new Set(g).add(p.key));else{let b=!0,v=0;for(let x of g){let S=p.entries[x];if(x in i?S["~run"]({typed:!1,value:i[x]},{abortEarly:!0}).issues:S.type!=="exact_optional"&&S.type!=="optional"&&S.type!=="nullish"){b=!1,l!==x&&(s<v||s===v&&x in i&&!(l in i))&&(s=v,l=x,c=[]),l===x&&c.push(p.entries[x].expects);break}v++}if(b){let x=p["~run"]({value:i},a);(!o||!o.typed&&x.typed)&&(o=x)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;Ae(this,"type",n,a,{input:i[l],expected:En(c,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else Ae(this,"type",n,a);return n}}}function _c(...e){return{...e[0],pipe:e,get"~standard"(){return _e(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function cr(e,t,r){let n=e["~run"]({value:t},gi(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var xc=e=>({ok:!0,err:!1,val:e}),kc=e=>({err:!0,ok:!1,val:e}),jn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Mn(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let a=(o=t[n.data.participationKey])==null?void 0:o.value,i={};if(a===!0)for(let l of jn(e)){let c=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(c)&&c.length===1&&(c=c[0]),(typeof c=="boolean"||typeof c=="string")&&(i[l.data.key]=c)}return{node_id:n.id,flow_session_id:r,participation:a,answers:i}}function Sc(e,t){let r=Mn(e,t,""),n=jn(e).map(i=>{let o=i.data.preApply,s=r==null?void 0:r.answers[i.data.key],l=i.type==="question-boolean"?typeof s=="boolean":i.data.options.some(c=>c.value===s);return{key:i.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),a=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(i=>i.valid)?"completed":"unavailable";return{status:a,hasHardConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="hard"):null,hasAdvisoryConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="advisory"):null,answers:a==="completed"?n:[]}}function $c(e,t){let r=new Set(jn(e).map(n=>n.data.key));for(let n of e)n.type==="pre-apply-result"&&(r.add(n.data.key),r.add(n.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([n])=>!r.has(n)))}var Cc=()=>{try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return typeof e=="string"&&e.length>0?e:void 0}catch{return}},ht=class extends Error{constructor(){super("Aborted")}},ur=(e,t)=>{if(t.length===0)return;let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n]}return r},Ec=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let a in e){let i=e[a];i&&(n&&!n.has(a)||(r[a]=i.value))}return r},ki=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,a])=>a!==void 0&&a.type!=="integration"&&!r.has(n))},Ac=({key:e,submissions:t})=>{var n;let r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},Si=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let a=ur(n,t);switch(typeof a){case"string":return{type:"string",value:a};case"number":return{type:"number",value:a};case"boolean":return{type:"boolean",value:a};default:console.warn(`Unexpected type for $context.${t.join(".")}`,a);return}}return r[e]},Ic=e=>{let t=e.split(".").pop();return t?xc(t?"."+t:""):kc("No file extension found")},Vr=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let a=Ic(n.name);return a.ok&&r.includes(a.val.toLowerCase())})},Ln={".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"},Tc=e=>[...new Set([...e,...e.map(t=>Ln[t.toLowerCase()]).filter(t=>t!==void 0)])].join(","),Dc=64*1024,jc=1024,Mc=[208,207,17,224,161,177,26,225],Lc=[80,75,3,4],On=(e,t)=>t.every((r,n)=>e[n]===r),$i=(e,t,r=e.length)=>{let n=Array.from(t,i=>i.charCodeAt(0)),a=Math.min(r,e.length)-n.length;for(let i=0;i<=a;i++)if(On(e.subarray(i),n))return!0;return!1},Oc=e=>{if($i(e,"%PDF-",jc))return".pdf";if(On(e,Mc))return".doc";if(On(e,Lc)&&$i(e,"word/"))return".docx"},Fc=async(e,t)=>{if(Vr([e],t))return e;let r=e.name.lastIndexOf(".");if((r===-1?"":e.name.slice(r).toLowerCase())in Ln)return e;let n=Oc(new Uint8Array(await e.slice(0,Dc).arrayBuffer()));return!n||!t.some(a=>a.toLowerCase()===n)?e:new File([e],`${e.name}${n}`,{type:Ln[n],lastModified:e.lastModified})},Ht=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Br=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,Nc=te({integration_response:te({data:te({redirect_url:ve(),message:ke(Et(ve())),button_text:ke(Et(ve()))})})}),Fn=e=>cr(Nc,e).success,Pc=te({integration_response:te({status:ke(qt()),error:te({message:ve(),data:ke(qt())})})}),Ci=e=>cr(Pc,e).success,Rc=te({success:Ie(!0),integration_response:te({data:te({outcome:Ie("pending"),message:ke(qt())}),error:ke(wi())})}),Nn=e=>{let t=cr(Rc,e);if(!t.success||Fn(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};te({success:Ie(!1),message:ke(qt())});var Vc=te({error:Ie("Validation failed"),messages:te({})}),Bc=(e,t)=>t===422&&cr(Vc,e).success,Ei=(e,t)=>{if(!Ci(e))return;let r=e.integration_response,n=r.error.data,a=typeof n=="object"&&n!==null?n:{},i=b=>typeof a[b]=="string"?a[b]:void 0,o=b=>typeof a[b]=="boolean"?a[b]:void 0,s=b=>{let v=a[b];return Number.isSafeInteger(v)&&v>=0?v:void 0},l=b=>{let v=i(b),x=v===void 0?NaN:Date.parse(v);return Number.isFinite(x)?x:void 0},c=typeof r.status=="number"?r.status:t,f=i("phase"),u=i("verdict"),g=i("code"),p=c===409&&f==="submit"&&u==="confirmed"?"duplicate":c===410&&g==="job_closed"?"closed":f==="submit"&&u==="unknown"?"unknown":void 0;return{message:r.error.message,status:c,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:u,code:g,reason:i("reason"),maintenanceUntil:l("maintenance_until"),field:i("field"),outcome:p}},zc=xi("reason",[te({outcome:Ie("sent"),reason:Ie("sandbox"),ats_label:Et(ve())}),te({outcome:Ie("held"),reason:yi(["production_connection","no_sandbox_known","company_hold"]),ats_label:Et(ve())}),te({outcome:Ie("internal"),reason:Ie("internal"),ats_label:Et(ve())}),te({outcome:Ie("held"),reason:Ie("redirect"),ats_label:ve()})]),Uc=e=>{let t=cr(te({staging_destination:zc}),e);if(!t.success)return;let r=t.output.staging_destination;switch(r.reason){case"sandbox":return`Staging: sent to ${r.ats_label===null?"the ATS":r.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 ${r.ats_label}`}},Ai=3e4,qc=2e4,Hc=6e4,Pn=12e4,Ii=360*6e4,Wc=60*6e4,Ti=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,r=t===void 0?0:t-Date.now();return r>0&&r<=Ii?t:void 0},Kc=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Ti(e);return t===void 0?{}:{until:t}},Di=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Gc=(e,t)=>{let r=Ti(t);if(r!==void 0)return{waitMs:r-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:Ai};let n=(e??0)+1,a=Math.min(n*qc,Hc),i=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(a,i),Pn),throttles:n}},ji=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Yc=e=>{if(!Ci(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Jc=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",Zc=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",Xc=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,Qc=(e,t)=>{if(typeof e!="object"||e===null)return null;let r=e.integration_response;if(typeof r!="object"||r===null){if(t===void 0)return null;let l="code"in e&&typeof e.code=="string"?e.code:void 0;return{service:"API",response:{status:t,payload:l===void 0?{}:{code:l}}}}let n=r;if(typeof n.status!="number"||n.service!==void 0&&typeof n.service!="string")return null;let a="data"in n,i=n.error,o=typeof i=="object"&&i!==null&&typeof i.message=="string"&&"data"in i;if(!a&&!o)return null;let s=a?n.data:i.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...Nn(e)&&{outcome:"pending"}}},eu=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},tu=(e,t)=>{if(!eu(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},ru=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{if(typeof n.result!="string"||!n.result)return r(new Error("Invalid file"));t(n.result)},n.onerror=r,n.readAsDataURL(e)}),Mi=e=>typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Rn=(e,t)=>e?{...e,...Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>{let a=e[r];return[r,Mi(a)&&Mi(n)?Rn(a,n):n]}))}:t,nu=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let a=t[n];if(!a)continue;let i=ur(e,n.split("."));if(a.required&&i==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(i!=null)switch(a.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:a.type}}},Li={uk:"gb","great britain":"gb",england:"gb",scotland:"gb",wales:"gb","northern ireland":"gb",lincolnshire:"gb",surrey:"gb","republic of ireland":"ie",eire:"ie","hong kong sar":"hk","united states of america":"us",turkey:"tr","czech republic":"cz",burma:"mm",kosovo:"xk",xk:"xk"},au=`adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel
|
|
18
18
|
bfbfa bgbgr bhbhr bibdi bjben blblm bmbmu bnbrn bobol bqbes brbra bsbhs btbtn bvbvt bwbwa byblr bzblz cacan cccck cdcod
|
|
19
19
|
cfcaf cgcog chche ciciv ckcok clchl cmcmr cnchn cocol crcri cucub cvcpv cwcuw cxcxr cycyp czcze dedeu djdji dkdnk dmdma
|
|
20
20
|
dodom dzdza ececu eeest egegy ehesh ereri esesp eteth fifin fjfji fkflk fmfsm fofro frfra gagab gbgbr gdgrd gegeo gfguf
|
|
@@ -26,13 +26,12 @@ ncncl nener nfnfk ngnga ninic nlnld nonor npnpl nrnru nuniu nznzl omomn papan pe
|
|
|
26
26
|
pnpcn prpri pspse ptprt pwplw pypry qaqat rereu rorou rssrb rurus rwrwa sasau sbslb scsyc sdsdn seswe sgsgp shshn sisvn
|
|
27
27
|
sjsjm sksvk slsle smsmr snsen sosom srsur ssssd ststp svslv sxsxm sysyr szswz tctca tdtcd tfatf tgtgo ththa tjtjk tktkl
|
|
28
28
|
tltls tmtkm tntun toton trtur tttto tvtuv twtwn tztza uaukr uguga umumi ususa uyury uzuzb vavat vcvct veven vgvgb vivir
|
|
29
|
-
vnvnm vuvut wfwlf wswsm yeyem ytmyt zazaf zmzmb zwzwe`,At,Gc=()=>{if(At)return At;At=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t of Kc.split(/\s+/)){let r=t.slice(0,2),n=e.of(r.toUpperCase());n&&At.set(n.toLowerCase(),r),At.set(r,r),At.set(t.slice(2),r)}return At},Yc=e=>{let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(Ta,t))return Ta[t];let r=/^[a-z]{2}-[a-z0-9]{1,3}$/.test(t)?t.slice(0,2):t;return Gc().get(r)},Jc=e=>[...new Set(e.flatMap(t=>Yc(t)??[]))].sort();let Xe;function ja(e){return{lang:(e==null?void 0:e.lang)??(Xe==null?void 0:Xe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Xe==null?void 0:Xe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Xe==null?void 0:Xe.abortPipeEarly)}}let Fn;function Zc(e){return Fn==null?void 0:Fn.get(e)}let Nn;function Xc(e){return Nn==null?void 0:Nn.get(e)}let Rn;function Qc(e,t){var r;return(r=Rn==null?void 0:Rn.get(e))==null?void 0:r.get(t)}function Pn(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Ie(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Pn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??Qc(e.reference,l.lang)??(c?Xc(l.lang):null)??n.message??Zc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Te(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ja())}}}function ed(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Da(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}const td=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Ma(e){return{kind:"validation",type:"email",reference:Ma,expects:null,async:!1,requirement:td,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&Ie(this,"email",t,r),t}}}function Vn(e,t){return{kind:"validation",type:"max_length",reference:Vn,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&Ie(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Br(e,t){return{kind:"validation",type:"min_length",reference:Br,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&Ie(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Oa(e){return{kind:"transformation",type:"transform",reference:Oa,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Bn(){return{kind:"transformation",type:"trim",reference:Bn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function rd(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function zr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ur(e,t){return{kind:"schema",type:"array",reference:Ur,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:i,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(a=r.issues)==null||a.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ie(this,"type",r,n);return r}}}function zn(e){return{kind:"schema",type:"boolean",reference:zn,expects:"boolean",async:!1,message:e,get"~standard"(){return Te(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ie(this,"type",t,r),t}}}function La(e,t){return{kind:"schema",type:"literal",reference:La,expects:Pn(e),async:!1,literal:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Ie(this,"type",r,n),r}}}function J(e,t){return{kind:"schema",type:"nullable",reference:J,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Te(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Qe(e,t){return{kind:"schema",type:"nullish",reference:Qe,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Te(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Pe(e){return{kind:"schema",type:"number",reference:Pe,expects:"number",async:!1,message:e,get"~standard"(){return Te(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ie(this,"type",t,r),t}}}function he(e,t){return{kind:"schema",type:"object",reference:he,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:zr(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const d of c.issues)d.path?d.path.unshift(f):d.path=[f],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=rd(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ie(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else Ie(this,"type",r,n);return r}}}function et(e,t){return{kind:"schema",type:"optional",reference:et,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Te(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function pt(e,t){return{kind:"schema",type:"picklist",reference:pt,expects:Da(e.map(Pn),"|"),async:!1,options:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Ie(this,"type",r,n),r}}}function qr(e,t,r){return{kind:"schema",type:"record",reference:qr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Te(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(ed(a,l)){const c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const b={type:"object",origin:"key",input:a,key:l,value:c};for(const p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}const d=this.value["~run"]({value:c},i);if(d.issues){const b={type:"object",origin:"value",input:a,key:l,value:c};for(const p of d.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else Ie(this,"type",n,i);return n}}}function N(e){return{kind:"schema",type:"string",reference:N,expects:"string",async:!1,message:e,get"~standard"(){return Te(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ie(this,"type",t,r),t}}}function Fa(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function Na(e,t){return{kind:"schema",type:"union",reference:Na,expects:Da(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Te(this)},"~run"(r,n){let i,a,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];Ie(this,"type",r,n,{issues:Fa(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ie(this,"type",r,n,{issues:Fa(o)})}return r}}}function Ra(){return{kind:"schema",type:"unknown",reference:Ra,expects:"unknown",async:!1,get"~standard"(){return Te(this)},"~run"(e){return e.typed=!0,e}}}function Ut(...e){return{...e[0],pipe:e,get"~standard"(){return Te(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Un(e,t,r){const n=e["~run"]({value:t},ja(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var nd=e=>e,id=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},ad=class extends id{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},od={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},sd=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16));function qn(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function sg(e){return e}var ld=["agent","sdk","form","integration","migration"],cd=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],dd=["screening","cv_match","interview","overall"],ud=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],fd=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Pa=pt(ld),pd=pt(cd),hd=Ut(N(),Bn(),Br(1),Vn(100)),bd=pt(dd),gd=pt(ud),md=Ut(N(),Bn(),Br(1),Vn(100)),vd=pt(fd),Va=he({id:N(),email:J(N()),firstName:J(N()),lastName:J(N()),phone:J(N()),source:J(Pa),identifiedAt:J(N()),createdAt:N(),updatedAt:N()}),Ba=Ut(N(),Br(1)),Wn=qr(N(),Ra()),wd=he({id:N(),applicationId:N(),status:gd,scheduledAt:J(N()),completedAt:J(N()),meta:J(Wn),createdAt:N(),updatedAt:N()}),yd=he({score:Pe(),reason:N(),confidence:Pe()}),za=he({id:N(),candidateId:N(),jobId:Pe(),stage:hd,stageGroup:pd,stageEnteredAt:N(),rating:J(Pe()),disqualifiedAt:J(N()),disqualificationReason:J(md),disqualificationNote:J(N()),source:vd,sourceDetail:J(N()),sessionId:J(Pe()),externalApplicationId:J(N()),meta:J(Wn),context:J(Wn),scoredAt:J(N()),createdAt:N(),updatedAt:N()}),_d=he({id:N(),applicationId:N(),scoreType:bd,score:J(Pe()),reason:J(N()),categories:J(qr(N(),yd)),scoredBy:J(N()),createdAt:N()});({...za.entries},{...Va.entries});var xd=he({anonymousId:Ba,email:Ba,firstName:Qe(N()),lastName:Qe(N()),phone:Qe(N()),source:Qe(Pa)}),kd=he({candidateId:N(),isNew:zn()}),Sd=he({id:N(),stageGroup:N(),createdAt:N()}),Cd=he({isDuplicate:zn(),existingApplication:et(Sd)}),Ed=({environment:e,publishableKey:t,logger:r})=>{let n=od[e];return{async checkDuplicate(i){try{let a=new URLSearchParams({email:i.email,scope:i.scope});i.scope==="job"&&i.jobId!=null&&a.set("job_id",String(i.jobId));let o=await fetch(`${n}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Un(Cd,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(i){try{if(!i.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:i.email,firstName:i.firstName,lastName:i.lastName,phone:i.phone,anonymousId:i.anonymousId,source:i.source??"sdk"},o=Un(xd,a);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Un(kd,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},$d=["DAILY","WEEKLY","MONTHLY"],Ad=qr(N(),Na([N(),Ur(N()),he({type:La("provided"),lat:Pe(),lng:Pe(),radius:Pe(),unit:et(pt(["miles","km"])),label:et(N())})])),Id={pathname:"/job/:id",method:"GET",schema:{response:he({id:Pe(),external_id:Qe(N()),city:Qe(N()),town:Qe(N()),category:Qe(N())})}};async function Td(e,{contact:t,job:r}){var i;let n={};if(r){let a=await e.request(Id,{params:{id:r.id}});if((r.id_type==="internal"?String(a.id):a.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(i=a[o])==null?void 0:i.trim();s&&(n[o]=[s])}}await e.request(jd,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var jd={pathname:"/search/save",method:"POST",schema:{response:qn(),body:he({contact:he({email:Ut(et(N()),N(),Ma()),first_name:et(N()),last_name:et(N())}),alerts:Ut(et(N()),N(),pt($d)),filters:Ad})}},Dd=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:Ut(he({country:et(Ur(he({value:N()})),[])}),Oa(({country:r})=>r.map(({value:n})=>n))),searchParams:qn()}};return e.request(t,{searchParams:{filters:{country:null}}})},Wr=new WeakMap,Ua=e=>(Wr.has(e)||(Wr.set(e,void 0),Dd(e).then(async t=>{let{jobCountryCodes:r}=await Promise.resolve().then(()=>np);Wr.set(e,r(t).join(",")||void 0)}).catch(()=>{})),Wr.get(e)),Md=(e,t)=>{let r=new Set,n=[];for(let i=0;i<Math.max(e.length,t.length);i++)for(let a of[e[i],t[i]]){if(!a)continue;let o=a.mapbox_id||a.full_address||[a.name,a.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(a),n.length===5))return n}return n},Od=600,Ld=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,i)=>{let a,o,s,l=!1,c=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{c(),i(r==null?void 0:r.reason)},d=()=>{c(),(a==null?void 0:a.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Md(a.value,o.value)):(a==null?void 0:a.status)==="fulfilled"?n(a.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(a==null?void 0:a.status)==="rejected"&&i(a.reason)},b=(p,g)=>{l||(p?a=g:o=g,a&&o?d():g.status==="fulfilled"&&g.value.length>0&&(s=setTimeout(d,Od)))};r==null||r.addEventListener("abort",f,{once:!0});for(let p of[!0,!1])e(p?t:void 0).then(g=>b(p,{status:"fulfilled",value:g}),g=>b(p,{status:"rejected",reason:g}))})},qa=vc(In([ge(),Pr()]),fa(String)),Wa=ee({id:qa,version:Pr(),build:Pr(),nodes:ha(pa()),context_schema:_e($t(An(ge(),ee({required:$n(),type:In([Ae("string"),Ae("number")])}))))}),Fd=ee({flow:Wa}),Nd=ee({company:ee({name:ge()}),context:_e(An(ge(),Bt())),flow:Wa,job:ee({id:qa,title:ge()}),user:_e(ee({city:_e(ge()),country:_e(ge()),isEU:_e($n()),continent:_e(ge())}))}),Rd=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),Pd={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:qn(),response:Nd}},Vd={pathname:"/flow/id/:id",method:"GET",schema:{response:Fd}},hr,L,Ha,Ka,It,Ga,Ya,Hn,Ja,qt={},Za=[],Bd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Hr=Array.isArray;function tt(e,t){for(var r in t)e[r]=t[r];return e}function Xa(e){var t=e.parentNode;t&&t.removeChild(e)}function Oe(e,t,r){var n,i,a,o={};for(a in t)a=="key"?n=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?hr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return br(e,o,n,i,null)}function br(e,t,r,n,i){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Ha};return i==null&&L.vnode!=null&&L.vnode(a),a}function zd(){return{current:null}}function ae(e){return e.children}function Ve(e,t){this.props=e,this.context=t}function Kr(e,t){if(t==null)return e.__?Kr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Kr(e):null}function Qa(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Qa(e)}}function Kn(e){(!e.__d&&(e.__d=!0)&&It.push(e)&&!Gr.__r++||Ga!==L.debounceRendering)&&((Ga=L.debounceRendering)||Ya)(Gr)}function Gr(){var e,t,r,n,i,a,o,s,l;for(It.sort(Hn);e=It.shift();)e.__d&&(t=It.length,n=void 0,i=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(a=tt({},o)).__v=o.__v+1,Gn(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Kr(o),o.__h,i),oo(n,o,i),o.__e!=s&&Qa(o)),It.length>t&&It.sort(Hn));Gr.__r=0}function eo(e,t,r,n,i,a,o,s,l,c,f){var d,b,p,g,v,x,C,_,M,D,j=0,z=n&&n.__k||Za,A=z.length,S=A,k=t.length;for(r.__k=[],d=0;d<k;d++)(g=r.__k[d]=(g=t[d])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?br(null,g,null,null,g):Hr(g)?br(ae,{children:g},null,null,null):g.__b>0?br(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(_=Ud(g,z,C=d+j,S))===-1?p=qt:(p=z[_]||qt,z[_]=void 0,S--),Gn(e,g,p,i,a,o,s,l,c,f),v=g.__e,(b=g.ref)&&p.ref!=b&&(p.ref&&Yn(p.ref,null,g),f.push(b,g.__c||v,g)),v!=null&&(x==null&&(x=v),D=!(M=p===qt||p.__v===null)&&_===C,M?_==-1&&j--:_!==C&&(_===C+1?(j++,D=!0):_>C?S>k-C?(j+=_-C,D=!0):j--:j=_<C&&_==C-1?_-C:0),C=d+j,D=D||_==d&&!M,typeof g.type!="function"||_===C&&p.__k!==g.__k?typeof g.type=="function"||D?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=v.nextSibling:l=ro(e,v,l):l=to(g,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=x,d=A;d--;)z[d]!=null&&(typeof r.type=="function"&&z[d].__e!=null&&z[d].__e==r.__d&&(r.__d=z[d].__e.nextSibling),so(z[d],z[d]))}function to(e,t,r){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,t=typeof n.type=="function"?to(n,t,r):ro(r,n.__e,t));return t}function rt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Hr(e)?e.some(function(r){rt(r,t)}):t.push(e)),t}function ro(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function Ud(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&a===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&i==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&i==l.key&&a===l.type)return s;s++}}return-1}function qd(e,t,r,n,i){var a;for(a in r)a==="children"||a==="key"||a in t||Yr(e,a,null,r[a],n);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||Yr(e,a,t[a],r[a],n)}function no(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Bd.test(t)?r:r+"px"}function Yr(e,t,r,n,i){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||no(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||no(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n||e.addEventListener(t,a?ao:io,a):e.removeEventListener(t,a?ao:io,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function io(e){return this.l[e.type+!1](L.event?L.event(e):e)}function ao(e){return this.l[e.type+!0](L.event?L.event(e):e)}function Gn(e,t,r,n,i,a,o,s,l,c){var f,d,b,p,g,v,x,C,_,M,D,j,z,A,S,k=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(f=L.__b)&&f(t);try{e:if(typeof k=="function"){if(C=t.props,_=(f=k.contextType)&&n[f.__c],M=f?_?_.props.value:f.__:n,r.__c?x=(d=t.__c=r.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(C,M):(t.__c=d=new Ve(C,M),d.constructor=k,d.render=Hd),_&&_.sub(d),d.props=C,d.state||(d.state={}),d.context=M,d.__n=n,b=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),k.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=tt({},d.__s)),tt(d.__s,k.getDerivedStateFromProps(C,d.__s))),p=d.props,g=d.state,d.__v=t,b)k.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(k.getDerivedStateFromProps==null&&C!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(C,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(C,d.__s,M)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=C,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function($){$&&($.__=t)}),D=0;D<d._sb.length;D++)d.__h.push(d._sb[D]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(C,d.__s,M),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,g,v)})}if(d.context=M,d.props=C,d.__P=e,d.__e=!1,j=L.__r,z=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,j&&j(t),f=d.render(d.props,d.state,d.context),A=0;A<d._sb.length;A++)d.__h.push(d._sb[A]);d._sb=[]}else do d.__d=!1,j&&j(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++z<25);d.state=d.__s,d.getChildContext!=null&&(n=tt(tt({},n),d.getChildContext())),b||d.getSnapshotBeforeUpdate==null||(v=d.getSnapshotBeforeUpdate(p,g)),eo(e,Hr(S=f!=null&&f.type===ae&&f.key==null?f.props.children:f)?S:[S],t,r,n,i,a,o,s,l,c),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),x&&(d.__E=d.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Wd(r.__e,t,r,n,i,a,o,l,c);(f=L.diffed)&&f(t)}catch($){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),L.__e($,t,r)}}function oo(e,t,r){for(var n=0;n<r.length;n++)Yn(r[n],r[++n],r[++n]);L.__c&&L.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){L.__e(a,i.__v)}})}function Wd(e,t,r,n,i,a,o,s,l){var c,f,d,b=r.props,p=t.props,g=t.type,v=0;if(g==="svg"&&(i=!0),a!=null){for(;v<a.length;v++)if((c=a[v])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,a[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),a=null,s=!1}if(g===null)b===p||s&&e.data===p||(e.data=p);else{if(a=a&&hr.call(e.childNodes),f=(b=r.props||qt).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!s){if(a!=null)for(b={},v=0;v<e.attributes.length;v++)b[e.attributes[v].name]=e.attributes[v].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(qd(e,p,b,i,s),d)t.__k=[];else if(eo(e,Hr(v=t.props.children)?v:[v],t,r,n,i&&g!=="foreignObject",a,o,a?a[0]:r.__k&&Kr(r,0),s,l),a!=null)for(v=a.length;v--;)a[v]!=null&&Xa(a[v]);s||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==b.value)&&Yr(e,"value",v,b.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Yr(e,"checked",v,b.checked,!1))}return e}function Yn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){L.__e(n,r)}}function so(e,t,r){var n,i;if(L.unmount&&L.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Yn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){L.__e(a,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&so(n[i],t,r||typeof e.type!="function");r||e.__e==null||Xa(e.__e),e.__=e.__e=e.__d=void 0}function Hd(e,t,r){return this.constructor(e,r)}function Tt(e,t,r){var n,i,a,o;L.__&&L.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Gn(t,e=(!n&&r||t).__k=Oe(ae,null,[e]),i||qt,qt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?hr.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),oo(a,e,o)}function lo(e,t){Tt(e,t,lo)}function Kd(e,t,r){var n,i,a,o,s=tt({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?n=t[a]:a=="ref"?i=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?hr.call(arguments,2):r),br(e.type,s,n||e.key,i||e.ref,null)}function co(e,t){var r={__c:t="__cC"+Ja++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Kn(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}hr=Za.slice,L={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},Ha=0,Ka=function(e){return e!=null&&e.constructor===void 0},Ve.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=tt({},this.state),typeof e=="function"&&(e=e(tt({},r),this.props)),e&&tt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Kn(this))},Ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Kn(this))},Ve.prototype.render=ae,It=[],Ya=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hn=function(e,t){return e.__v.__b-t.__v.__b},Gr.__r=0,Ja=0;var ht,te,Jn,uo,Wt=0,fo=[],Jr=[],po=L.__b,ho=L.__r,bo=L.diffed,go=L.__c,mo=L.unmount;function Ht(e,t){L.__h&&L.__h(te,e,Wt||t),Wt=0;var r=te.__H||(te.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Jr}),r.__[e]}function Be(e){return Wt=1,vo(_o,e)}function vo(e,t,r){var n=Ht(ht++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):_o(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=te,!te.u)){var i=function(s,l,c){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(b){return b.__c});if(f.every(function(b){return!b.__N}))return!a||a.call(this,s,l,c);var d=!1;return f.forEach(function(b){if(b.__N){var p=b.__[0];b.__=b.__N,b.__N=void 0,p!==b.__[0]&&(d=!0)}}),!(!d&&n.__c.props===s)&&(!a||a.call(this,s,l,c))};te.u=!0;var a=te.shouldComponentUpdate,o=te.componentWillUpdate;te.componentWillUpdate=function(s,l,c){if(this.__e){var f=a;a=void 0,i(s,l,c),a=f}o&&o.call(this,s,l,c)},te.shouldComponentUpdate=i}return n.__N||n.__}function jt(e,t){var r=Ht(ht++,3);!L.__s&&Xn(r.__H,t)&&(r.__=e,r.i=t,te.__H.__h.push(r))}function je(e,t){var r=Ht(ht++,4);!L.__s&&Xn(r.__H,t)&&(r.__=e,r.i=t,te.__h.push(r))}function be(e){return Wt=5,bt(function(){return{current:e}},[])}function Gd(e,t,r){Wt=6,je(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function bt(e,t){var r=Ht(ht++,7);return Xn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Yd(e,t){return Wt=8,bt(function(){return e},t)}function wo(e){var t=te.context[e.__c],r=Ht(ht++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(te)),t.props.value):e.__}function Jd(e,t){L.useDebugValue&&L.useDebugValue(t?t(e):e)}function Zd(){var e=Ht(ht++,11);if(!e.__){for(var t=te.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Xd(){for(var e;e=fo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Zr),e.__H.__h.forEach(Zn),e.__H.__h=[]}catch(t){e.__H.__h=[],L.__e(t,e.__v)}}L.__b=function(e){te=null,po&&po(e)},L.__r=function(e){ho&&ho(e),ht=0;var t=(te=e.__c).__H;t&&(Jn===te?(t.__h=[],te.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Jr,r.__N=r.i=void 0})):(t.__h.forEach(Zr),t.__h.forEach(Zn),t.__h=[],ht=0)),Jn=te},L.diffed=function(e){bo&&bo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fo.push(t)!==1&&uo===L.requestAnimationFrame||((uo=L.requestAnimationFrame)||Qd)(Xd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Jr&&(r.__=r.__V),r.i=void 0,r.__V=Jr})),Jn=te=null},L.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Zr),r.__h=r.__h.filter(function(n){return!n.__||Zn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],L.__e(n,r.__v)}}),go&&go(e,t)},L.unmount=function(e){mo&&mo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Zr(n)}catch(i){t=i}}),r.__H=void 0,t&&L.__e(t,r.__v))};var yo=typeof requestAnimationFrame=="function";function Qd(e){var t,r=function(){clearTimeout(n),yo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);yo&&(t=requestAnimationFrame(r))}function Zr(e){var t=te,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),te=t}function Zn(e){var t=te;e.__c=e.__(),te=t}function Xn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function _o(e,t){return typeof t=="function"?t(e):t}var eu=Symbol.for("preact-signals");function Qn(){if(Kt>1)Kt--;else{for(var e,t=!1;gr!==void 0;){var r=gr;for(gr=void 0,ei++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ko(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(ei=0,Kt--,t)throw e}}var Z=void 0,gr=void 0,Kt=0,ei=0,Xr=0;function xo(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function me(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}me.prototype.brand=eu,me.prototype.h=function(){return!0},me.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},me.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},me.prototype.subscribe=function(e){var t=this;return ri(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},me.prototype.valueOf=function(){return this.value},me.prototype.toString=function(){return this.value+""},me.prototype.toJSON=function(){return this.value},me.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(me.prototype,"value",{get:function(){var e=xo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ei>100)throw new Error("Cycle detected");this.v=e,this.i++,Xr++,Kt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Qn()}}}});function Le(e){return new me(e)}function ko(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function So(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Co(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Gt(e){me.call(this,void 0),this.x=e,this.s=void 0,this.g=Xr-1,this.f=4}(Gt.prototype=new me).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Xr))return!0;if(this.g=Xr,this.f|=1,this.i>0&&!ko(this))return this.f&=-2,!0;var e=Z;try{So(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,Co(this),this.f&=-2,!0},Gt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}me.prototype.S.call(this,e)},Gt.prototype.U=function(e){if(this.t!==void 0&&(me.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Gt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Gt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=xo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function tu(e){return new Gt(e)}function Eo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Kt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,ti(e),n}finally{Z=r,Qn()}}}function ti(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Eo(e)}function ru(e){if(Z!==this)throw new Error("Out-of-order effect");Co(this),Z=e,this.f&=-2,8&this.f&&ti(this),Qn()}function mr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}mr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},mr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Eo(this),So(this),Kt++;var e=Z;return Z=this,ru.bind(this,e)},mr.prototype.N=function(){2&this.f||(this.f|=2,this.o=gr,gr=this)},mr.prototype.d=function(){this.f|=8,1&this.f||ti(this)};function ri(e){var t=new mr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var ni;function Yt(e,t){L[e]=t.bind(null,L[e]||function(){})}function Qr(e){ni&&ni(),ni=e&&e.S()}function $o(e){var t=this,r=e.data,n=iu(r);n.value=r;var i=bt(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Ka(i.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},tu(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}$o.displayName="_st",Object.defineProperties(me.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:$o},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Yt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var a=n[i];a instanceof me&&(r||(t.__np=r={}),r[i]=a,n[i]=a.peek())}}e(t)}),Yt("__r",function(e,t){Qr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var a;return ri(function(){a=this}),a.c=function(){n.__$f|=1,n.setState({})},a}())),Qr(r),e(t)}),Yt("__e",function(e,t,r,n){Qr(),e(t,r,n)}),Yt("diffed",function(e,t){Qr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in n)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in n){var c=a[l],f=n[l];c===void 0?(c=nu(r,l,f,i),a[l]=c):c.o(f,i)}}}e(t)});function nu(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,a=Le(r);return{o:function(o,s){a.value=o,n=s},d:ri(function(){var o=a.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Yt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var a=n[i];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Yt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Ve.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function iu(e){return bt(function(){return Le(e)},[])}const xe=Symbol.for("@ts-pattern/matcher"),Ao=Symbol.for("@ts-pattern/isVariadic"),en="@ts-pattern/anonymous-select-key",ii=e=>!!(e&&typeof e=="object"),tn=e=>e&&!!e[xe],se=(e,t,r)=>{if(tn(e)){const n=e[xe](),{matched:i,selections:a}=n.match(t);return i&&a&&Object.keys(a).forEach(o=>r(o,a[o])),i}if(ii(e)){if(!ii(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],a=[];for(const o of e.keys()){const s=e[o];tn(s)&&s[Ao]?a.push(s):a.length?i.push(s):n.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(t.length<n.length+i.length)return!1;const o=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((c,f)=>se(c,o[f],r))&&i.every((c,f)=>se(c,s[f],r))&&(a.length===0||se(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>se(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const i=e[n];return(n in t||tn(a=i)&&a[xe]().matcherType==="optional")&&se(i,t[n],r);var a})}return Object.is(t,e)},ke=e=>{var t,r,n;return ii(e)?tn(e)?(t=(r=(n=e[xe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?vr(e,ke):vr(Object.values(e),ke):[]},vr=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Io(...e){if(e.length===1){const[t]=e;return r=>se(t,r,()=>{})}if(e.length===2){const[t,r]=e;return se(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function de(e){return Object.assign(e,{optional:()=>oi(e),and:t=>re(e,t),or:t=>To(e,t),select:t=>t===void 0?wr(e):wr(t,e)})}function ai(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[Ao]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=n[r++])!=null?i:n.at(-1)}}}}))(e),{optional:()=>ai(oi(e)),select:t=>ai(t===void 0?wr(e):wr(t,e))})}function oi(e){return de({[xe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return t===void 0?(ke(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:se(e,t,n),selections:r}},getSelectionKeys:()=>ke(e),matcherType:"optional"})})}const au=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},ou=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},su=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function re(...e){return de({[xe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return{matched:e.every(i=>se(i,t,n)),selections:r}},getSelectionKeys:()=>vr(e,ke),matcherType:"and"})})}function To(...e){return de({[xe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return vr(e,ke).forEach(i=>n(i,void 0)),{matched:e.some(i=>se(i,t,n)),selections:r}},getSelectionKeys:()=>vr(e,ke),matcherType:"or"})})}function W(e){return{[xe]:()=>({match:t=>({matched:!!e(t)})})}}function wr(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return de({[xe]:()=>({match:n=>{let i={[t??en]:n};return{matched:r===void 0||se(r,n,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??en].concat(r===void 0?[]:ke(r))})})}function jo(e){return!0}function We(e){return typeof e=="number"}function gt(e){return typeof e=="string"}function mt(e){return typeof e=="bigint"}const Do=de(W(jo)),lu=de(W(jo)),cu=Do,vt=e=>Object.assign(de(e),{startsWith:t=>{return vt(re(e,(r=t,W(n=>gt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return vt(re(e,(r=t,W(n=>gt(n)&&n.endsWith(r)))));var r},minLength:t=>vt(re(e,(r=>W(n=>gt(n)&&n.length>=r))(t))),length:t=>vt(re(e,(r=>W(n=>gt(n)&&n.length===r))(t))),maxLength:t=>vt(re(e,(r=>W(n=>gt(n)&&n.length<=r))(t))),includes:t=>{return vt(re(e,(r=t,W(n=>gt(n)&&n.includes(r)))));var r},regex:t=>{return vt(re(e,(r=t,W(n=>gt(n)&&!!n.match(r)))));var r}}),Mo=vt(W(gt)),He=e=>Object.assign(de(e),{between:(t,r)=>He(re(e,((n,i)=>W(a=>We(a)&&n<=a&&i>=a))(t,r))),lt:t=>He(re(e,(r=>W(n=>We(n)&&n<r))(t))),gt:t=>He(re(e,(r=>W(n=>We(n)&&n>r))(t))),lte:t=>He(re(e,(r=>W(n=>We(n)&&n<=r))(t))),gte:t=>He(re(e,(r=>W(n=>We(n)&&n>=r))(t))),int:()=>He(re(e,W(t=>We(t)&&Number.isInteger(t)))),finite:()=>He(re(e,W(t=>We(t)&&Number.isFinite(t)))),positive:()=>He(re(e,W(t=>We(t)&&t>0))),negative:()=>He(re(e,W(t=>We(t)&&t<0)))}),du=He(W(We)),wt=e=>Object.assign(de(e),{between:(t,r)=>wt(re(e,((n,i)=>W(a=>mt(a)&&n<=a&&i>=a))(t,r))),lt:t=>wt(re(e,(r=>W(n=>mt(n)&&n<r))(t))),gt:t=>wt(re(e,(r=>W(n=>mt(n)&&n>r))(t))),lte:t=>wt(re(e,(r=>W(n=>mt(n)&&n<=r))(t))),gte:t=>wt(re(e,(r=>W(n=>mt(n)&&n>=r))(t))),positive:()=>wt(re(e,W(t=>mt(t)&&t>0))),negative:()=>wt(re(e,W(t=>mt(t)&&t<0)))}),uu=wt(W(mt)),fu=de(W(function(e){return typeof e=="boolean"})),pu=de(W(function(e){return typeof e=="symbol"})),hu=de(W(function(e){return e==null})),bu=de(W(function(e){return e!=null}));var Dt={__proto__:null,matcher:xe,optional:oi,array:function(...e){return ai({[xe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return ke(r).forEach(a=>{n[a]=[]}),{matched:!0,selections:n};const i=(a,o)=>{n[a]=(n[a]||[]).concat([o])};return{matched:t.every(a=>se(r,a,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ke(e[0])})})},set:function(...e){return de({[xe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])},i=e[0];return{matched:au(t,a=>se(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ke(e[0])})})},map:function(...e){return de({[xe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:ou(t,(s,l)=>{const c=se(a,l,n),f=se(o,s,n);return c&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ke(e[0]),...ke(e[1])]})})},record:function(...e){return de({[xe]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const i=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[a,o]=e.length===1?[Mo,e[0]]:e;return{matched:su(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&se(a,c,i),d=se(a,s,i),b=se(o,l,i);return(d||f)&&b}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...ke(e[0]),...ke(e[1])]})})},intersection:re,union:To,not:function(e){return de({[xe]:()=>({match:t=>({matched:!se(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:W,select:wr,any:Do,unknown:lu,_:cu,string:Mo,number:du,bigint:uu,boolean:fu,symbol:pu,nullish:hu,nonNullable:bu,instanceOf:function(e){return de(W(function(t){return r=>r instanceof t}(e)))},shape:function(e){return de(W(Io(e)))}};let gu=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const si={matched:!1,value:void 0};function rn(e){return new mu(e,si)}let mu=class oa{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(c,f)=>{a=!0,o[c]=f},l=!n.some(c=>se(c,this.input,s))||i&&!i(this.input)?si:{matched:!0,value:r(a?en in o?o[en]:o:this.input,this.input)};return new oa(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new oa(this.input,n?{matched:!0,value:r(this.input,this.input)}:si)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=vu){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function vu(e){throw new gu(e)}function Oo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Oo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function nt(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Oo(e))&&(n&&(n+=" "),n+=t);return n}const Lo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fo=nt,Mt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Fo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(c=>{const f=r==null?void 0:r[c],d=a==null?void 0:a[c];if(f===null)return null;const b=Lo(f)||Lo(d);return i[c][b]}),s=r&&Object.entries(r).reduce((c,f)=>{let[d,b]=f;return b===void 0||(c[d]=b),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:d,className:b,...p}=f;return Object.entries(p).every(g=>{let[v,x]=g;return Array.isArray(x)?x.includes({...a,...s}[v]):{...a,...s}[v]===x})?[...c,d,b]:c},[]);return Fo(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function No(e,t){for(var r in t)e[r]=t[r];return e}function li(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ci(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function di(e){this.props=e}function wu(e,t){function r(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:li(this.props,i)}function n(i){return this.shouldComponentUpdate=r,Oe(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(di.prototype=new Ve).isPureReactComponent=!0,di.prototype.shouldComponentUpdate=function(e,t){return li(this.props,e)||li(this.state,t)};var Ro=L.__b;L.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ro&&Ro(e)};var yu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ui(e){function t(r){var n=No({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=yu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Po=function(e,t){return e==null?null:rt(rt(e).map(t))},_u={map:Po,forEach:Po,count:function(e){return e?rt(e).length:0},only:function(e){var t=rt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:rt},xu=L.__e;L.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}xu(e,t,r,n)};var Vo=L.unmount;function Bo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=No({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Bo(n,t,r)})),e}function zo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return zo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function yr(){this.__u=0,this.t=null,this.__b=null}function Uo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function qo(e){var t,r,n;function i(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return Oe(r,a)}return i.displayName="Lazy",i.__f=!0,i}function _r(){this.u=null,this.o=null}L.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Vo&&Vo(e)},(yr.prototype=new Ve).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Uo(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=zo(c,c.__c.__P,c.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},yr.prototype.componentWillUnmount=function(){this.t=[]},yr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Bo(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&Oe(ae,null,e.fallback);return i&&(i.__h=null),[Oe(ae,null,t.__a?null:e.children),i]};var Wo=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function ku(e){return this.getChildContext=function(){return e.context},e.children}function Su(e){var t=this,r=e.i;t.componentWillUnmount=function(){Tt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Tt(Oe(ku,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Cu(e,t){var r=Oe(Su,{__v:e,i:t});return r.containerInfo=t,r}(_r.prototype=new Ve).__a=function(e){var t=this,r=Uo(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),Wo(t,e,n)):i()};r?r(a):a()}},_r.prototype.render=function(e){this.u=null,this.o=new Map;var t=rt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},_r.prototype.componentDidUpdate=_r.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Wo(e,r,t)})};var Ho=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Eu=/^(?: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]/,$u=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Au=/[A-Z0-9]/g,Iu=typeof document<"u",Tu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function ju(e,t,r){return t.__k==null&&(t.textContent=""),Tt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Du(e,t,r){return lo(e,t),typeof r=="function"&&r(),e?e.__c:null}Ve.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ve.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ko=L.event;function Mu(){}function Ou(){return this.cancelBubble}function Lu(){return this.defaultPrevented}L.event=function(e){return Ko&&(e=Ko(e)),e.persist=Mu,e.isPropagationStopped=Ou,e.isDefaultPrevented=Lu,e.nativeEvent=e};var fi,Fu={enumerable:!1,configurable:!0,get:function(){return this.class}},Go=L.vnode;L.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Iu&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Tu(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":$u.test(a)?a=s:n.indexOf("-")===-1&&Eu.test(a)?a=a.replace(Au,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&i[a=s]&&(a="oninputCapture"),i[a]=o}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=rt(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=rt(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",Fu)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Ho,Go&&Go(e)};var Yo=L.__r;L.__r=function(e){Yo&&Yo(e),fi=e.__c};var Jo=L.diffed;L.diffed=function(e){Jo&&Jo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),fi=null};var Nu={ReactCurrentDispatcher:{current:{readContext:function(e){return fi.__n[e.__c].props.value}}}};function Ru(e){return Oe.bind(null,e)}function Zo(e){return!!e&&e.$$typeof===Ho}function Pu(e){return Zo(e)?Kd.apply(null,arguments):e}function Vu(e){return!!e.__k&&(Tt(null,e),!0)}function Bu(e){return e&&(e.base||e.nodeType===1&&e)||null}var zu=function(e,t){return e(t)},Uu=function(e,t){return e(t)},qu=ae;function Xo(e){e()}function Wu(e){return e}function Hu(){return[!1,Xo]}var Ku=je;function Gu(e,t){var r=t(),n=Be({h:{__:r,v:t}}),i=n[0].h,a=n[1];return je(function(){i.__=r,i.v=t,ci(i.__,t())||a({h:i})},[e,r,t]),jt(function(){return ci(i.__,i.v())||a({h:i}),e(function(){ci(i.__,i.v())||a({h:i})})},[e]),r}var Se={useState:Be,useId:Zd,useReducer:vo,useEffect:jt,useLayoutEffect:je,useInsertionEffect:Ku,useTransition:Hu,useDeferredValue:Wu,useSyncExternalStore:Gu,startTransition:Xo,useRef:be,useImperativeHandle:Gd,useMemo:bt,useCallback:Yd,useContext:wo,useDebugValue:Jd,version:"17.0.2",Children:_u,render:ju,hydrate:Du,unmountComponentAtNode:Vu,createPortal:Cu,createElement:Oe,createContext:co,createFactory:Ru,cloneElement:Pu,createRef:zd,Fragment:ae,isValidElement:Zo,findDOMNode:Bu,Component:Ve,PureComponent:di,memo:wu,forwardRef:ui,flushSync:Uu,unstable_batchedUpdates:zu,StrictMode:qu,Suspense:yr,SuspenseList:_r,lazy:qo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Nu},Yu=["other","few","many","two","one","zero"],Qo=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function i(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,c)=>{var f;return((f=o==null?void 0:o[c])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=n.select(o.count);if(!(l in s)){const c=Yu.find(f=>f in s);if(!c)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=c}return s[l].replace(/{{(\w+)}}/g,(c,f)=>{var d;return((d=o==null?void 0:o[f])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return i},Ju=0;function u(e,t,r,n,i,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Ju,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return L.vnode&&L.vnode(c),c}var es=co(null),ts=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const i=bt(()=>Qo({locale:n,terms:e,overrides:t}),[t,n]);return u(es.Provider,{value:{t:i,locale:n},children:r})},useTranslation:()=>{const t=wo(es);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>Qo({terms:e,overrides:t,locale:r})}),Zu={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"},{TranslationProvider:lg,useTranslation:cg,createTFunction:dg,defaultTerms:Xu}=ts({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:Qu,useTranslation:oe,createTFunction:ef}=ts({...Xu,...Zu,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"}}),ug="";function it(e,t){if(!e)throw new Error(t)}var xr=/\b(?:GIR\s*0AA|[a-z]{1,2}\d[\da-z]?\s*\d[a-z]{2}|[a-z](?:\d{2}|\d[a-z])\s*[\da-z]{4})\b/i,rs=/^(?:GIR0AA|[A-Z]{1,2}\d[\dA-Z]?\d[A-Z]{2})$/,ns=/^[A-Z](?:\d{2}|\d[A-Z])[\dA-Z]{4}$/,is=({postcode:e,label:t="",state:r,country:n})=>{var s,l,c;const i=((e==null?void 0:e.trim())||((s=t.match(xr))==null?void 0:s[0])||"").replace(/\s/g,"").toUpperCase();if(rs.test(i))return i.startsWith("BT")?"ni":"gb";if(ns.test(i))return"ie";const a=f=>f.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim();if(a(r??"")==="northern ireland"||t.split(",").some(f=>a(f)==="northern ireland"))return"ni";const o=(c=(n==null?void 0:n.trim())||((l=t.split(",").at(-1))==null?void 0:l.trim()))==null?void 0:c.toLowerCase();return o==="united kingdom"||o==="gb"?"gb":o==="ireland"||o==="ie"?"ie":null},tf="https://maps.inploi.com/address",rf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),as=e=>e.split(",").map(t=>rf(t).replace(/^\d+[a-z]?(?:\s*[-/]\s*\d+[a-z]?)?(?:\s+|$)/,"").trim()),os=e=>rs.test(e)?`gb:${e.slice(0,-3)}`:ns.test(e)?`ie:${e.slice(0,3)}`:null,nf=(e,t,r)=>{const[n="",i=""]=as(e),a=os(t),o=i.replace(xr,"").trim(),s=o&&!["united kingdom","ireland","england","scotland","wales","northern ireland"].includes(o);if(!n||!a&&!s)return null;const l=r.slice(0,3).findIndex(c=>{var p;const f=as(c);if(!f.includes(n))return!1;const d=((p=c.match(xr))==null?void 0:p[0].replace(/\s/g,"").toUpperCase())??"",b=os(d);return a&&b?a===b:!!(s&&f.some(g=>g.replace(xr,"").trim()===o))});return l===-1?null:l+1},af=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:i,pickedState:a,log:o})=>{var l,c,f;if(!t||!t.split(",").every(d=>/^(gb|ie)$/i.test(d.trim())))return;let s;try{const d=new AbortController;s=setTimeout(()=>d.abort(),1500);const b=new URL(tf);b.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const p=await fetch(b.href,{signal:d.signal});if(!p.ok)return;const g=await p.json();if(typeof g!="object"||g===null||!("results"in g)||!Array.isArray(g.results)||!("source"in g)||g.source!=="photon"&&g.source!=="mapbox")return;const v=g.results,x=[];for(const A of v){if(typeof A!="object"||A===null||!("label"in A)||typeof A.label!="string")return;x.push(A.label)}const C=((n==null?void 0:n.trim())||((l=r.match(xr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),_=nf(r,C,x),M=(f=(c=p.headers.get("Server-Timing"))==null?void 0:c.match(/(?:^|,)\s*lookup\s*;\s*dur=([\d.]+)/))==null?void 0:f[1],D=M===void 0?null:Number(M),j=p.headers.get("X-Geo-Fallback"),z=is({postcode:n,label:r,state:a,country:i});await o({hit:_!==null,rank:_,results:x.length,source:g.source,fallback:j&&/^[a-z0-9_-]{1,64}$/i.test(j)?j:null,ms:D!==null&&Number.isFinite(D)?D:null,region:z})}catch{}finally{clearTimeout(s)}},of="https://maps.inploi.com",sf=async(e,t,r=Date.now()+2500)=>{t==null||t.throwIfAborted();const n=new AbortController,i=()=>n.abort(t==null?void 0:t.reason);t==null||t.addEventListener("abort",i,{once:!0});let a;try{const o=new Promise((l,c)=>{n.signal.addEventListener("abort",()=>c(n.signal.reason),{once:!0}),a=setTimeout(()=>n.abort(),Math.max(0,r-Date.now()))}),s=await Promise.race([e(n.signal),o]);return t==null||t.throwIfAborted(),s}catch{t==null||t.throwIfAborted();return}finally{clearTimeout(a),t==null||t.removeEventListener("abort",i)}},lf=async(e,t,r)=>await sf(async i=>{const{lookupAddress:a}=await Promise.resolve().then(()=>cp);return i.throwIfAborted(),a({...e,signal:i})},e.signal,r)??{results:await t(),arm:"direct",source:"direct"},cf=e=>{try{const t=new URL("/outcome",of);t.search=new URLSearchParams({kind:e.kind,surface:e.surface,arm:e.arm,picked:e.picked?"1":"0"}).toString(),t.searchParams.set("source",e.source),e.picked&&e.edited!==void 0&&t.searchParams.set("edited",e.edited?"1":"0"),e.region&&t.searchParams.set("region",e.region),fetch(t.href,{keepalive:!0}).catch(()=>{})}catch{}},pi=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(pi):Object.keys(e).sort().reduce((t,r)=>(t[r]=pi(e[r]),t),{}),df=e=>{let t=JSON.stringify(pi(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const hi=(e,t)=>t.some(r=>e instanceof r);let ss,ls;function uf(){return ss||(ss=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ff(){return ls||(ls=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bi=new WeakMap,gi=new WeakMap,nn=new WeakMap;function pf(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(Ot(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return nn.set(t,e),t}function hf(e){if(bi.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});bi.set(e,t)}let mi={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return bi.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ot(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function cs(e){mi=e(mi)}function bf(e){return ff().includes(e)?function(...t){return e.apply(vi(this),t),Ot(this.request)}:function(...t){return Ot(e.apply(vi(this),t))}}function gf(e){return typeof e=="function"?bf(e):(e instanceof IDBTransaction&&hf(e),hi(e,uf())?new Proxy(e,mi):e)}function Ot(e){if(e instanceof IDBRequest)return pf(e);if(gi.has(e))return gi.get(e);const t=gf(e);return t!==e&&(gi.set(e,t),nn.set(t,e)),t}const vi=e=>nn.get(e);function mf(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Ot(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ot(o.result),l.oldVersion,l.newVersion,Ot(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const vf=["get","getKey","getAll","getAllKeys","count"],wf=["put","add","delete","clear"],wi=new Map;function ds(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(wi.get(t))return wi.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=wf.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||vf.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),i&&l.done]))[0]};return wi.set(t,a),a}cs(e=>({...e,get:(t,r,n)=>ds(t,r)||e.get(t,r,n),has:(t,r)=>!!ds(t,r)||e.has(t,r)}));const yf=["continue","continuePrimaryKey","advance"],us={},yi=new WeakMap,fs=new WeakMap,_f={get(e,t){if(!yf.includes(t))return e[t];let r=us[t];return r||(r=us[t]=function(...n){yi.set(this,fs.get(this)[t](...n))}),r}};async function*xf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,_f);for(fs.set(r,t),nn.set(r,vi(t));t;)yield r,t=await(yi.get(r)||t.continue()),yi.delete(r)}function ps(e,t){return t===Symbol.asyncIterator&&hi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&hi(e,[IDBIndex,IDBObjectStore])}cs(e=>({...e,get(t,r,n){return ps(t,r)?xf:e.get(t,r,n)},has(t,r){return ps(t,r)||e.has(t,r)}}));const kr=typeof indexedDB>"u"?void 0:mf("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),kf=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let an,_i,Sr;const hs=()=>{if(!an)return Sr;const e=an;an=void 0;const t=sn(e),r=kr==null?void 0:kr.then(n=>n.put("state",kf(e.data),t)).finally(()=>{Sr===r&&(Sr=void 0)});return Sr=r,Sr},Fe={getStateData:async(e,t,r)=>{var i;const n=sn({...e,flowKeys:t,context:r});return(i=await kr)==null?void 0:i.get("state",n)},getAllStateData:async()=>{var e;return((e=await kr)==null?void 0:e.getAll("state"))??[]},setStateData:e=>{an=e,clearTimeout(_i),_i=setTimeout(()=>void hs(),1e3)},flushStateData:()=>(clearTimeout(_i),hs()??Promise.resolve())},Jt=e=>t=>t?t.type===e:!1,Sf=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),bs=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Sf()}),Cf=e=>rn(e).with({nativeEvent:{submitter:Dt.select(Dt.union(Dt.instanceOf(HTMLButtonElement),Dt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),on=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(c=>c.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(c=>c.id===a),s=t.type.includes("question")?1:0;if(o){const c=s+Math.max(on(e,i,r,n+s).remainingSteps,on(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}}const l=s+on(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Ef=e=>{const t={},r=e.find(n=>n.isHead);return r&&on(e,r,(n,i)=>{t[n]=i}),t},sn=e=>[...e.flowKeys,e.id,e.version,e.build,df(e.hostContext??e.context)].join("/"),$f=({data:e,nodes:t})=>{const r=e.startedWriteNodeIds===void 0?t.some(n=>n.type==="integration-application-submit"&&e.nodeHistory.includes(n.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!r&&wa(t,e.submissions)},gs=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||wa(t,e.submissions))},Ke=Le({state:"idle"}),xi=new Set,Lt=e=>{const{state:t,flow:r}=Ke.value;if(t!=="loaded")return;it(r,"No flow to update");const n=e(r.data);r.data=n,Ke.value={state:t,flow:r},Fe.setStateData(r)},R={current$:Ke,viewState$:Le("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:i,title:a,analytics:o,job:s,employer:l,locationOrigin:c})=>{await Fe.flushStateData().catch(()=>{});const f=await Fe.getStateData(t,i,r),d=f??bs(),b=sn({...t,flowKeys:i,context:r}),p=f!==void 0&&!xi.has(b)&&$f({data:d,nodes:t.nodes});return p||xi.add(b),{jobAlerts:e,data:d,offerResume:p,startedAt:new Date,nodeIdToProgress:Ef(t.nodes),flowKeys:i,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:n===void 0?r:Ln(n,r),hostContext:n===void 0?void 0:r,title:a,analytics:o,job:s,employer:l,locationOrigin:c}},commitFlow:e=>{Ke.value={state:"loaded",flow:e},Fe.setStateData(e)},settleResume:e=>{e.offerResume=!1,xi.add(sn(e))},cancelCurrentFlow:()=>{Ke.value={state:"idle"},R.viewState$.value="closed"},markAsFinished:()=>Lt(e=>({...e,isFinished:!0})),markAsInteracted:()=>Lt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Lt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Lt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Fe.flushStateData()},restart:()=>{const{state:e,flow:t}=Ke.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r={...bs(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},n={...t,data:r,startedAt:new Date,offerResume:!1};Ke.value={state:e,flow:n},Fe.setStateData(n)},addMessage:(e,t)=>{const r={...e,groupId:t};return Lt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ke.value;it(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,Fe.setStateData(r)},setSubmission:(e,t)=>Lt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Lt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Ke.peek().flow===e&&(Ke.value={state:"loaded",flow:e}),Fe.setStateData(e),await Fe.flushStateData()}},ms=({heading:e})=>{const{t}=oe();return u("div",{class:"flex flex-grow flex-col items-center justify-center",children:[u("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:[u("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"}),u("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"}),u("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),u("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),u("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),u("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),u("path",{d:"M38 56h19"})]}),u("div",{class:"flex flex-col gap-2 text-center",children:u("p",{class:"text-error-11 font-bold",children:t(e)})})]})},ln=e=>{const{t}=oe();return u("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[u("title",{children:t("loading")}),u("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)}}"}),u("g",{id:"s1",transform:"translate(12,0)",children:u("g",{id:"s2",transform:"scale(0,0)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s3",transform:"translate(12,12)",children:u("g",{id:"s4",transform:"scale(1,1)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s5",transform:"translate(12,0)",children:u("g",{id:"s6",transform:"scale(0,0)",children:u("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"})})}),u("g",{id:"s7",transform:"translate(12,0)",children:u("g",{id:"s8",transform:"scale(0,0)",children:u("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"})})})]})},vs=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(ln,{class:"text-neutral-6 h-8 w-8"})}),Af=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},If=Mt("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"}}),Cr=({class:e,children:t,variant:r,...n})=>u("button",{class:nt(If({variant:r}),e),...n,children:u("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:t})}),ws=()=>u("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Tf=()=>{if(R.current$.value.state!=="loaded")return null;const e=R.current$.value.flow.nodeIdToProgress,t=R.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return u("div",{class:"bg-accent-3",children:u("div",{style:{width:Af(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},jf=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:i}=oe(),a=R.viewState$,o=!!t.feedback&&R.current$.value.state==="loaded"&&a.value==="maximised",s=o&&n.value,l=be(!1);return jt(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=R.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),u(ae,{children:u("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:[u("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:[u("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),u("button",{"aria-label":i("minimize"),onClick:()=>{a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ki,children:u("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),u("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?u("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:nt({hidden:!o}),children:u("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,R.current$.value.state==="loaded"&&u(Cr,{class:"mx-1","aria-label":i("restart"),onClick:()=>{R.restart()},children:[u("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"}),u("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),u(Cr,{class:"view-switch mx-1",onTouchStart:ki,"aria-label":i("minimize"),onClick:()=>a.value="minimised",children:u(ws,{})},"minmax")]})]}),u(Tf,{})]})})};function ki(){}const Df=qo(()=>Promise.resolve().then(()=>tg).then(e=>e.ChatbotBody)),ys=Mt("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"}}}),_s=Mt("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"}}}),Mf=({open:e,...t})=>{const r=be(null);return je(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),u("dialog",{ref:r,...t})},Of=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:i,talentBankClient:a,params:o,feedbackReady:s})=>{const{state:l,flow:c}=R.current$.value,f=R.viewState$.value,d=l!=="idle"&&f==="maximised",b=be(null),p=c?[...c.data.nodeHistory].reverse().map(g=>c.nodes.find(v=>v.id===g)).find(g=>(g==null?void 0:g.type)==="flow-section"):void 0;return u(Qu,{terms:o.terms,locale:void 0,children:[u(Mf,{open:d,onClose:()=>R.viewState$.value="minimised",children:u("div",{ref:b,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ys({view:"maximised"}),children:u("div",{class:_s({view:"maximised"}),children:[u(jf,{params:o,analytics:i,feedbackReady:s,children:p?u(ae,{children:[u("span",{class:"block",children:p.data.title}),u("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),rn({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>u(vs,{},"loading")).with({state:"loaded"},()=>u(yr,{fallback:u(vs,{},"loading"),children:u(Df,{env:e,rpcClient:n,analytics:i,apiClient:r,logger:t,talentBankClient:a})})).with({state:"closed"},()=>u(ms,{heading:"flow_closed"})).with({state:"error"},()=>u(ms,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?u(Lf,{flow:c}):null]})},Lf=({flow:e})=>{const{t}=oe();return u("div",{class:ys({view:"minimised",class:"z-100 isolate"}),children:u("div",{class:_s({view:"minimised"}),children:[u("button",{onClick:()=>{R.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ki,children:u("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),u("div",{class:"flex items-center px-0.5",children:u(Cr,{class:"mx-1","aria-label":t("close_application"),onClick:R.cancelCurrentFlow,variant:"white",children:u("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},xs="14.18.0",Ff=(e,t=xs)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const i=new Headers(n==null?void 0:n.headers);return i.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(i.entries())})}};let Er,ks,cn;const Nf=e=>{const t=e.slice(0,e.lastIndexOf("/")+1);return/^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(t)?t:void 0},Ss=(e,t,r)=>{const n=tc(e,t??`
|
|
30
|
-
`,r);return{...n,stack:n.stack.filter(i=>i.startsWith("index.js:"))}},Si=e=>Ss(e,cn),Cs=e=>typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"?e.status:void 0,Zt=(e,t,r={})=>Er==null?void 0:Er.send(e,t,{...r,message:"Chatbot widget beacon",widget:"chatbot",key_hash:ks}),Rf=e=>{const t=(r,n,i)=>{if(R.viewState$.value==="closed")return;const a=Ss(n,e,i);a.stack.length&&Zt("fatal",Rr(n),{phase:"render",error:{...a,via:r}})};window.addEventListener("error",r=>{Xl(r)||t("error",r.error,r.message)}),window.addEventListener("unhandledrejection",r=>t("rejection",r.reason))},Pf=(e,t,r=ut&&ut.src||new URL("index.js",document.baseURI).href)=>{const n=nc();Er||!n||!e||(ks=t?da(t).toString(36):void 0,Er=fc({config:n,version:xs,env:e,seed:ic(rc(),sd)}),cn=Nf(r),cn&&Rf(cn))},Vf=e=>{let t={application:void 0,attempts:0,blocked:!1};return{fetch:async(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const i=R.current$.value.flow;i!==t.application&&(t={application:i,attempts:0,blocked:!1});const a=t,o=++a.attempts,s=performance.now(),l=await e.fetch(r,n).catch(c=>{throw Cs(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(a.blocked=!0,Zt("submit_blocked",Rr(c),{phase:"submit",error:Si(c),endpoint:"flow_submit",attempt:o,elapsed_ms:Math.round(performance.now()-s),body_kb:typeof(n==null?void 0:n.body)=="string"?Math.round(n.body.length/1024):void 0})),c});return a.blocked&&Zt("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:o}),l}}},Bf=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .\\!visible{visibility:visible!important}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-1{bottom:4px}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[44px\\]{min-height:44px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-none{resize:none}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-end{align-items:flex-end}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[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] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}
|
|
31
|
-
`,Es="inploi-chatbot",Ci=`[data-widget='${Es}']`,zf=()=>({getChatbotElement:()=>document.querySelector(Ci),getOrCreateChatbotElement:()=>{const e=document.querySelector(Ci);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Es,t}}),Uf=25,$s=Le(()=>{}),As=["wheel","touchmove","keydown"],qf=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new ft);const i=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(i),n(new ft)},{once:!0})}),ne={onSubmitSuccessFn$:Le(()=>{}),onInteractionFn$:Le(()=>{}),isBotTyping$:Le(!1),captchaVisible$:Le(!1),themeMode$:Le("light"),isReadingHistory$:Le(!1),scrollToEnd:()=>$s.value()},Wf=()=>{const e=be(null),t=be(-1/0);je(()=>{const n=e.current;if(!n)return;const i=()=>{ne.isReadingHistory$.value=!1,n.scrollTo({top:n.scrollHeight,behavior:"instant"})};$s.value=i;const a=()=>t.current=performance.now(),o=()=>{n.scrollHeight-n.scrollTop-n.clientHeight<=24?ne.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ne.isReadingHistory$.value=!0)};n.addEventListener("scroll",o,{passive:!0});for(const l of As)n.addEventListener(l,a,{passive:!0});const s=new ResizeObserver(()=>{ne.isReadingHistory$.peek()||i()});return s.observe(n),n.firstElementChild&&s.observe(n.firstElementChild),()=>{n.removeEventListener("scroll",o);for(const l of As)n.removeEventListener(l,a);s.disconnect()}},[]);const r=bt(()=>({setSubmission:(i,a)=>R.setSubmission(i,a),captcha:{container:()=>{var i;return((i=e.current)==null?void 0:i.querySelector("[data-captcha-slot]"))??null},get theme(){return ne.themeMode$.peek()},reveal:i=>{ne.captchaVisible$.value=i,i&&requestAnimationFrame(()=>{var a,o;(o=(a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))==null||o.focus(),ne.scrollToEnd()})}},send:async({message:i,signal:a,groupId:o})=>{if(await rn(i).with({author:"bot",type:"text"},async s=>{if(a!=null&&a.aborted)throw new ft;ne.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Uf;try{await qf(l,a)}finally{ne.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new ft;R.addMessage(i,o)},input:({input:i,signal:a})=>{if(a!=null&&a.aborted)throw new ft;return R.setInput(i),new Promise(o=>{const s=l=>{if(a!=null&&a.aborted)throw new ft;t.current=-1/0,R.setInput(void 0),i.key&&R.setSubmission(i.key,l),o(l)};ne.onSubmitSuccessFn$.value=s})}}),[]);return{chatRef:e,chatService:r}};var Hf=["1","2","3","4","5","6","7","8","9","10","11","12"],Kf={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]}},Gf=(e,t=1,r)=>n=>{const[i,a]=Kf[r][n];return"oklch("+i+"% "+a*t+" "+e+")"},Ei=e=>{const t=Gf(e.hue,e.chroma,e.mode);return Object.fromEntries(Hf.map(r=>[e.prefix+r,e.transform(t(r))]))},$i=e=>e,Yf=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const a=n[i];return[`${String(r)}.${i}`,a]}):[[r,n]]});return Object.fromEntries(t)},dn=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Ai=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(dn(e)&&dn(r))for(const n in r){const i=r[n];if(dn(i)){e[n]||Object.assign(e,{[n]:{}});const a=e[n];dn(a)&&Ai(a,i)}else Object.assign(e,{[n]:r[n]})}return Ai(e,...t)},Jf=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},Zf=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:a}=n,o=b=>a("reference",b.toString()),s=e({theme:i}),l=t({theme:i,core:o,raw:{core:s}}),c=r({theme:i,core:o,semantic:o,raw:{core:s,semantic:l}}),f=Yf(Ai(s,l,c)),d=([b,p],g)=>{const v=[g,b].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(x=>d(x,v)):[[n.getToken("declaration",v),p]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(b=>d(b))),ref:b=>a("reference",b.toString())}}})})})});const[Ii,Ti,Is]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Xf=Zf().core(({theme:e})=>({color:{black:Ii,white:Ti,lowest:e.mode==="light"?Ti:Ii,highest:e.mode==="light"?Ii:Ti,...Ei({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:$i}),...Ei({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:$i}),...Ei({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:$i})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(i,a)=>t.core.color[i].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:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Is,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const i=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":Is,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),Qf=Jf({prefix:"i-"}),ep=e=>{const t=Xf.from({theme:e,getToken:Qf}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`${Ci} {
|
|
29
|
+
vnvnm vuvut wfwlf wswsm yeyem ytmyt zazaf zmzmb zwzwe`,At,iu=()=>{if(At)return At;At=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t of au.split(/\s+/)){let r=t.slice(0,2),n=e.of(r.toUpperCase());n&&At.set(n.toLowerCase(),r),At.set(r,r),At.set(t.slice(2),r)}return At},ou=e=>{let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(Li,t))return Li[t];let r=/^[a-z]{2}-[a-z0-9]{1,3}$/.test(t)?t.slice(0,2):t;return iu().get(r)},su=e=>[...new Set(e.flatMap(t=>ou(t)??[]))].sort();let et;function Oi(e){return{lang:(e==null?void 0:e.lang)??(et==null?void 0:et.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(et==null?void 0:et.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(et==null?void 0:et.abortPipeEarly)}}let Vn;function lu(e){return Vn==null?void 0:Vn.get(e)}let Bn;function cu(e){return Bn==null?void 0:Bn.get(e)}let zn;function uu(e,t){var r;return(r=zn==null?void 0:zn.get(e))==null?void 0:r.get(t)}function Un(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Te(e,t,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??Un(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??uu(e.reference,l.lang)??(c?cu(l.lang):null)??n.message??lu(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function De(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Oi())}}}function du(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Fi(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}const fu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Ni(e){return{kind:"validation",type:"email",reference:Ni,expects:null,async:!1,requirement:fu,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&Te(this,"email",t,r),t}}}function qn(e,t){return{kind:"validation",type:"max_length",reference:qn,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&Te(this,"length",r,n,{received:`${r.value.length}`}),r}}}function zr(e,t){return{kind:"validation",type:"min_length",reference:zr,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&Te(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Pi(e){return{kind:"transformation",type:"transform",reference:Pi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Hn(){return{kind:"transformation",type:"trim",reference:Hn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function pu(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Ur(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function qr(e,t){return{kind:"schema",type:"array",reference:qr,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:a,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Te(this,"type",r,n);return r}}}function Wn(e){return{kind:"schema",type:"boolean",reference:Wn,expects:"boolean",async:!1,message:e,get"~standard"(){return De(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Te(this,"type",t,r),t}}}function Ri(e,t){return{kind:"schema",type:"literal",reference:Ri,expects:Un(e),async:!1,literal:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Te(this,"type",r,n),r}}}function J(e,t){return{kind:"schema",type:"nullable",reference:J,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=Ur(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function tt(e,t){return{kind:"schema",type:"nullish",reference:tt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=Ur(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Ve(e){return{kind:"schema",type:"number",reference:Ve,expects:"number",async:!1,message:e,get"~standard"(){return De(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Te(this,"type",t,r),t}}}function be(e,t){return{kind:"schema",type:"object",reference:be,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:Ur(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:a,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=pu(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Te(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else Te(this,"type",r,n);return r}}}function rt(e,t){return{kind:"schema",type:"optional",reference:rt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Ur(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function gt(e,t){return{kind:"schema",type:"picklist",reference:gt,expects:Fi(e.map(Un),"|"),async:!1,options:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Te(this,"type",r,n),r}}}function Hr(e,t,r){return{kind:"schema",type:"record",reference:Hr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return De(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(du(i,l)){const c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){const g={type:"object",origin:"key",input:i,key:l,value:c};for(const p of f.issues)p.path=[g],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},a);if(u.issues){const g={type:"object",origin:"value",input:i,key:l,value:c};for(const p of u.issues)p.path?p.path.unshift(g):p.path=[g],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else Te(this,"type",n,a);return n}}}function R(e){return{kind:"schema",type:"string",reference:R,expects:"string",async:!1,message:e,get"~standard"(){return De(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Te(this,"type",t,r),t}}}function Vi(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function Bi(e,t){return{kind:"schema",type:"union",reference:Bi,expects:Fi(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return De(this)},"~run"(r,n){let a,i,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];Te(this,"type",r,n,{issues:Vi(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Te(this,"type",r,n,{issues:Vi(o)})}return r}}}function zi(){return{kind:"schema",type:"unknown",reference:zi,expects:"unknown",async:!1,get"~standard"(){return De(this)},"~run"(e){return e.typed=!0,e}}}function Wt(...e){return{...e[0],pipe:e,get"~standard"(){return De(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Kn(e,t,r){const n=e["~run"]({value:t},Oi(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var hu=e=>e,gu=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},bu=class extends gu{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},mu={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},vu=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16));function Gn(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function vb(e){return e}var wu=["agent","sdk","form","integration","migration"],yu=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],_u=["screening","cv_match","interview","overall"],xu=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],ku=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Ui=gt(wu),Su=gt(yu),$u=Wt(R(),Hn(),zr(1),qn(100)),Cu=gt(_u),Eu=gt(xu),Au=Wt(R(),Hn(),zr(1),qn(100)),Iu=gt(ku),qi=be({id:R(),email:J(R()),firstName:J(R()),lastName:J(R()),phone:J(R()),source:J(Ui),identifiedAt:J(R()),createdAt:R(),updatedAt:R()}),Hi=Wt(R(),zr(1)),Yn=Hr(R(),zi()),Tu=be({id:R(),applicationId:R(),status:Eu,scheduledAt:J(R()),completedAt:J(R()),meta:J(Yn),createdAt:R(),updatedAt:R()}),Du=be({score:Ve(),reason:R(),confidence:Ve()}),Wi=be({id:R(),candidateId:R(),jobId:Ve(),stage:$u,stageGroup:Su,stageEnteredAt:R(),rating:J(Ve()),disqualifiedAt:J(R()),disqualificationReason:J(Au),disqualificationNote:J(R()),source:Iu,sourceDetail:J(R()),sessionId:J(Ve()),externalApplicationId:J(R()),meta:J(Yn),context:J(Yn),scoredAt:J(R()),createdAt:R(),updatedAt:R()}),ju=be({id:R(),applicationId:R(),scoreType:Cu,score:J(Ve()),reason:J(R()),categories:J(Hr(R(),Du)),scoredBy:J(R()),createdAt:R()});({...Wi.entries},{...qi.entries});var Mu=be({anonymousId:Hi,email:Hi,firstName:tt(R()),lastName:tt(R()),phone:tt(R()),source:tt(Ui)}),Lu=be({candidateId:R(),isNew:Wn()}),Ou=be({id:R(),stageGroup:R(),createdAt:R()}),Fu=be({isDuplicate:Wn(),existingApplication:rt(Ou)}),Nu=({environment:e,publishableKey:t,logger:r})=>{let n=mu[e];return{async checkDuplicate(a){try{let i=new URLSearchParams({email:a.email,scope:a.scope});a.scope==="job"&&a.jobId!=null&&i.set("job_id",String(a.jobId));let o=await fetch(`${n}/applications/check-duplicate?${i}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Kn(Fu,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(i){return r.error("[TalentBankClient] checkDuplicate failed:",i),{isDuplicate:!1}}},async identify(a){try{if(!a.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let i={email:a.email,firstName:a.firstName,lastName:a.lastName,phone:a.phone,anonymousId:a.anonymousId,source:a.source??"sdk"},o=Kn(Mu,i);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Kn(Lu,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(i){return r.error("[TalentBankClient] identify failed:",i),null}}}},Pu=["DAILY","WEEKLY","MONTHLY"],Ru=Hr(R(),Bi([R(),qr(R()),be({type:Ri("provided"),lat:Ve(),lng:Ve(),radius:Ve(),unit:rt(gt(["miles","km"])),label:rt(R())})])),Vu={pathname:"/job/:id",method:"GET",schema:{response:be({id:Ve(),external_id:tt(R()),city:tt(R()),town:tt(R()),category:tt(R())})}};async function Bu(e,{contact:t,job:r}){var a;let n={};if(r){let i=await e.request(Vu,{params:{id:r.id}});if((r.id_type==="internal"?String(i.id):i.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(a=i[o])==null?void 0:a.trim();s&&(n[o]=[s])}}await e.request(zu,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var zu={pathname:"/search/save",method:"POST",schema:{response:Gn(),body:be({contact:be({email:Wt(rt(R()),R(),Ni()),first_name:rt(R()),last_name:rt(R())}),alerts:Wt(rt(R()),R(),gt(Pu)),filters:Ru})}},Uu=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:Wt(be({country:rt(qr(be({value:R()})),[])}),Pi(({country:r})=>r.map(({value:n})=>n))),searchParams:Gn()}};return e.request(t,{searchParams:{filters:{country:null}}})},Wr=new WeakMap,Ki=e=>(Wr.has(e)||(Wr.set(e,void 0),Uu(e).then(async t=>{let{jobCountryCodes:r}=await Promise.resolve().then(()=>hp);Wr.set(e,r(t).join(",")||void 0)}).catch(()=>{})),Wr.get(e)),qu=(e,t)=>{let r=new Set,n=[];for(let a=0;a<Math.max(e.length,t.length);a++)for(let i of[e[a],t[a]]){if(!i)continue;let o=i.mapbox_id||i.full_address||[i.name,i.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(i),n.length===5))return n}return n},Hu=600,Wu=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,a)=>{let i,o,s,l=!1,c=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{c(),a(r==null?void 0:r.reason)},u=()=>{c(),(i==null?void 0:i.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(qu(i.value,o.value)):(i==null?void 0:i.status)==="fulfilled"?n(i.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(i==null?void 0:i.status)==="rejected"&&a(i.reason)},g=(p,b)=>{l||(p?i=b:o=b,i&&o?u():b.status==="fulfilled"&&b.value.length>0&&(s=setTimeout(u,Hu)))};r==null||r.addEventListener("abort",f,{once:!0});for(let p of[!0,!1])e(p?t:void 0).then(b=>g(p,{status:"fulfilled",value:b}),b=>g(p,{status:"rejected",reason:b}))})},Gi=_c(Dn([ve(),Rr()]),bi(String)),Yi=te({id:Gi,version:Rr(),build:Rr(),nodes:vi(mi()),context_schema:ke(Et(Tn(ve(),te({required:In(),type:Dn([Ie("string"),Ie("number")])}))))}),Ku=te({flow:Yi}),Gu=te({company:te({name:ve()}),context:ke(Tn(ve(),qt())),flow:Yi,job:te({id:Gi,title:ve()}),user:ke(te({city:ke(ve()),country:ke(ve()),isEU:ke(In()),continent:ke(ve())}))}),Yu=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),Ju={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Gn(),response:Gu}},Zu={pathname:"/flow/id/:id",method:"GET",schema:{response:Ku}},dr,P,Ji,Zi,It,Xi,Qi,Jn,eo,Kt={},to=[],Xu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Kr=Array.isArray;function nt(e,t){for(var r in t)e[r]=t[r];return e}function ro(e){var t=e.parentNode;t&&t.removeChild(e)}function Oe(e,t,r){var n,a,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?dr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return fr(e,o,n,a,null)}function fr(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Ji};return a==null&&P.vnode!=null&&P.vnode(i),i}function Qu(){return{current:null}}function le(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Gr(e,t){if(t==null)return e.__?Gr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Gr(e):null}function no(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return no(e)}}function Zn(e){(!e.__d&&(e.__d=!0)&&It.push(e)&&!Yr.__r++||Xi!==P.debounceRendering)&&((Xi=P.debounceRendering)||Qi)(Yr)}function Yr(){var e,t,r,n,a,i,o,s,l;for(It.sort(Jn);e=It.shift();)e.__d&&(t=It.length,n=void 0,a=void 0,i=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],a=[],(i=nt({},o)).__v=o.__v+1,Xn(l,o,i,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Gr(o),o.__h,a),uo(n,o,a),o.__e!=s&&no(o)),It.length>t&&It.sort(Jn));Yr.__r=0}function ao(e,t,r,n,a,i,o,s,l,c,f){var u,g,p,b,v,x,S,_,j,O,M=0,B=n&&n.__k||to,I=B.length,k=I,$=t.length;for(r.__k=[],u=0;u<$;u++)(b=r.__k[u]=(b=t[u])==null||typeof b=="boolean"||typeof b=="function"?null:typeof b=="string"||typeof b=="number"||typeof b=="bigint"?fr(null,b,null,null,b):Kr(b)?fr(le,{children:b},null,null,null):b.__b>0?fr(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)!=null&&(b.__=r,b.__b=r.__b+1,(_=ed(b,B,S=u+M,k))===-1?p=Kt:(p=B[_]||Kt,B[_]=void 0,k--),Xn(e,b,p,a,i,o,s,l,c,f),v=b.__e,(g=b.ref)&&p.ref!=g&&(p.ref&&Qn(p.ref,null,b),f.push(g,b.__c||v,b)),v!=null&&(x==null&&(x=v),O=!(j=p===Kt||p.__v===null)&&_===S,j?_==-1&&M--:_!==S&&(_===S+1?(M++,O=!0):_>S?k>$-S?(M+=_-S,O=!0):M--:M=_<S&&_==S-1?_-S:0),S=u+M,O=O||_==u&&!j,typeof b.type!="function"||_===S&&p.__k!==b.__k?typeof b.type=="function"||O?b.__d!==void 0?(l=b.__d,b.__d=void 0):l=v.nextSibling:l=oo(e,v,l):l=io(b,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=x,u=I;u--;)B[u]!=null&&(typeof r.type=="function"&&B[u].__e!=null&&B[u].__e==r.__d&&(r.__d=B[u].__e.nextSibling),fo(B[u],B[u]))}function io(e,t,r){for(var n,a=e.__k,i=0;a&&i<a.length;i++)(n=a[i])&&(n.__=e,t=typeof n.type=="function"?io(n,t,r):oo(r,n.__e,t));return t}function at(e,t){return t=t||[],e==null||typeof e=="boolean"||(Kr(e)?e.some(function(r){at(r,t)}):t.push(e)),t}function oo(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function ed(e,t,r,n){var a=e.key,i=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&a==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&a==l.key&&i===l.type)return o;o--}if(s<t.length){if((l=t[s])&&a==l.key&&i===l.type)return s;s++}}return-1}function td(e,t,r,n,a){var i;for(i in r)i==="children"||i==="key"||i in t||Jr(e,i,null,r[i],n);for(i in t)a&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||Jr(e,i,t[i],r[i],n)}function so(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Xu.test(t)?r:r+"px"}function Jr(e,t,r,n,a){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||so(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||so(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?co:lo,i):e.removeEventListener(t,i?co:lo,i);else if(t!=="dangerouslySetInnerHTML"){if(a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function lo(e){return this.l[e.type+!1](P.event?P.event(e):e)}function co(e){return this.l[e.type+!0](P.event?P.event(e):e)}function Xn(e,t,r,n,a,i,o,s,l,c){var f,u,g,p,b,v,x,S,_,j,O,M,B,I,k,$=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=P.__b)&&f(t);try{e:if(typeof $=="function"){if(S=t.props,_=(f=$.contextType)&&n[f.__c],j=f?_?_.props.value:f.__:n,r.__c?x=(u=t.__c=r.__c).__=u.__E:("prototype"in $&&$.prototype.render?t.__c=u=new $(S,j):(t.__c=u=new Be(S,j),u.constructor=$,u.render=nd),_&&_.sub(u),u.props=S,u.state||(u.state={}),u.context=j,u.__n=n,g=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),$.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=nt({},u.__s)),nt(u.__s,$.getDerivedStateFromProps(S,u.__s))),p=u.props,b=u.state,u.__v=t,g)$.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if($.getDerivedStateFromProps==null&&S!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,j),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,j)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(C){C&&(C.__=t)}),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,j),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,b,v)})}if(u.context=j,u.props=S,u.__P=e,u.__e=!1,M=P.__r,B=0,"prototype"in $&&$.prototype.render){for(u.state=u.__s,u.__d=!1,M&&M(t),f=u.render(u.props,u.state,u.context),I=0;I<u._sb.length;I++)u.__h.push(u._sb[I]);u._sb=[]}else do u.__d=!1,M&&M(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++B<25);u.state=u.__s,u.getChildContext!=null&&(n=nt(nt({},n),u.getChildContext())),g||u.getSnapshotBeforeUpdate==null||(v=u.getSnapshotBeforeUpdate(p,b)),ao(e,Kr(k=f!=null&&f.type===le&&f.key==null?f.props.children:f)?k:[k],t,r,n,a,i,o,s,l,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),x&&(u.__E=u.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=rd(r.__e,t,r,n,a,i,o,l,c);(f=P.diffed)&&f(t)}catch(C){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),P.__e(C,t,r)}}function uo(e,t,r){for(var n=0;n<r.length;n++)Qn(r[n],r[++n],r[++n]);P.__c&&P.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){P.__e(i,a.__v)}})}function rd(e,t,r,n,a,i,o,s,l){var c,f,u,g=r.props,p=t.props,b=t.type,v=0;if(b==="svg"&&(a=!0),i!=null){for(;v<i.length;v++)if((c=i[v])&&"setAttribute"in c==!!b&&(b?c.localName===b:c.nodeType===3)){e=c,i[v]=null;break}}if(e==null){if(b===null)return document.createTextNode(p);e=a?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,p.is&&p),i=null,s=!1}if(b===null)g===p||s&&e.data===p||(e.data=p);else{if(i=i&&dr.call(e.childNodes),f=(g=r.props||Kt).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(i!=null)for(g={},v=0;v<e.attributes.length;v++)g[e.attributes[v].name]=e.attributes[v].value;(u||f)&&(u&&(f&&u.__html==f.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(td(e,p,g,a,s),u)t.__k=[];else if(ao(e,Kr(v=t.props.children)?v:[v],t,r,n,a&&b!=="foreignObject",i,o,i?i[0]:r.__k&&Gr(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&ro(i[v]);s||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||b==="progress"&&!v||b==="option"&&v!==g.value)&&Jr(e,"value",v,g.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Jr(e,"checked",v,g.checked,!1))}return e}function Qn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){P.__e(n,r)}}function fo(e,t,r){var n,a;if(P.unmount&&P.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Qn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){P.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&fo(n[a],t,r||typeof e.type!="function");r||e.__e==null||ro(e.__e),e.__=e.__e=e.__d=void 0}function nd(e,t,r){return this.constructor(e,r)}function Tt(e,t,r){var n,a,i,o;P.__&&P.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],Xn(t,e=(!n&&r||t).__k=Oe(le,null,[e]),a||Kt,Kt,t.ownerSVGElement!==void 0,!n&&r?[r]:a?null:t.firstChild?dr.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,o),uo(i,e,o)}function po(e,t){Tt(e,t,po)}function ad(e,t,r){var n,a,i,o,s=nt({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?dr.call(arguments,2):r),fr(e.type,s,n||e.key,a||e.ref,null)}function ho(e,t){var r={__c:t="__cC"+eo++,__:e,Consumer:function(n,a){return n.children(a)},Provider:function(n){var a,i;return this.getChildContext||(a=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&a.some(function(s){s.__e=!0,Zn(s)})},this.sub=function(o){a.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){a.splice(a.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}dr=to.slice,P={__e:function(e,t,r,n){for(var a,i,o;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),o=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),o=a.__d),o)return a.__E=a}catch(s){e=s}throw e}},Ji=0,Zi=function(e){return e!=null&&e.constructor===void 0},Be.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=nt({},this.state),typeof e=="function"&&(e=e(nt({},r),this.props)),e&&nt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Zn(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Zn(this))},Be.prototype.render=le,It=[],Qi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Jn=function(e,t){return e.__v.__b-t.__v.__b},Yr.__r=0,eo=0;var bt,re,ea,go,Gt=0,bo=[],Zr=[],mo=P.__b,vo=P.__r,wo=P.diffed,yo=P.__c,_o=P.unmount;function Yt(e,t){P.__h&&P.__h(re,e,Gt||t),Gt=0;var r=re.__H||(re.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Zr}),r.__[e]}function ze(e){return Gt=1,xo($o,e)}function xo(e,t,r){var n=Yt(bt++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):$o(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=re,!re.u)){var a=function(s,l,c){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(g){return g.__c});if(f.every(function(g){return!g.__N}))return!i||i.call(this,s,l,c);var u=!1;return f.forEach(function(g){if(g.__N){var p=g.__[0];g.__=g.__N,g.__N=void 0,p!==g.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!i||i.call(this,s,l,c))};re.u=!0;var i=re.shouldComponentUpdate,o=re.componentWillUpdate;re.componentWillUpdate=function(s,l,c){if(this.__e){var f=i;i=void 0,a(s,l,c),i=f}o&&o.call(this,s,l,c)},re.shouldComponentUpdate=a}return n.__N||n.__}function Dt(e,t){var r=Yt(bt++,3);!P.__s&&ra(r.__H,t)&&(r.__=e,r.i=t,re.__H.__h.push(r))}function je(e,t){var r=Yt(bt++,4);!P.__s&&ra(r.__H,t)&&(r.__=e,r.i=t,re.__h.push(r))}function me(e){return Gt=5,mt(function(){return{current:e}},[])}function id(e,t,r){Gt=6,je(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function mt(e,t){var r=Yt(bt++,7);return ra(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function od(e,t){return Gt=8,mt(function(){return e},t)}function ko(e){var t=re.context[e.__c],r=Yt(bt++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(re)),t.props.value):e.__}function sd(e,t){P.useDebugValue&&P.useDebugValue(t?t(e):e)}function ld(){var e=Yt(bt++,11);if(!e.__){for(var t=re.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function cd(){for(var e;e=bo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Xr),e.__H.__h.forEach(ta),e.__H.__h=[]}catch(t){e.__H.__h=[],P.__e(t,e.__v)}}P.__b=function(e){re=null,mo&&mo(e)},P.__r=function(e){vo&&vo(e),bt=0;var t=(re=e.__c).__H;t&&(ea===re?(t.__h=[],re.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Zr,r.__N=r.i=void 0})):(t.__h.forEach(Xr),t.__h.forEach(ta),t.__h=[],bt=0)),ea=re},P.diffed=function(e){wo&&wo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(bo.push(t)!==1&&go===P.requestAnimationFrame||((go=P.requestAnimationFrame)||ud)(cd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Zr&&(r.__=r.__V),r.i=void 0,r.__V=Zr})),ea=re=null},P.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Xr),r.__h=r.__h.filter(function(n){return!n.__||ta(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],P.__e(n,r.__v)}}),yo&&yo(e,t)},P.unmount=function(e){_o&&_o(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Xr(n)}catch(a){t=a}}),r.__H=void 0,t&&P.__e(t,r.__v))};var So=typeof requestAnimationFrame=="function";function ud(e){var t,r=function(){clearTimeout(n),So&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);So&&(t=requestAnimationFrame(r))}function Xr(e){var t=re,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),re=t}function ta(e){var t=re;e.__c=e.__(),re=t}function ra(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function $o(e,t){return typeof t=="function"?t(e):t}var dd=Symbol.for("preact-signals");function na(){if(Jt>1)Jt--;else{for(var e,t=!1;pr!==void 0;){var r=pr;for(pr=void 0,aa++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Eo(r))try{r.c()}catch(a){t||(e=a,t=!0)}r=n}}if(aa=0,Jt--,t)throw e}}var Z=void 0,pr=void 0,Jt=0,aa=0,Qr=0;function Co(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function we(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}we.prototype.brand=dd,we.prototype.h=function(){return!0},we.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},we.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},we.prototype.subscribe=function(e){var t=this;return oa(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},we.prototype.valueOf=function(){return this.value},we.prototype.toString=function(){return this.value+""},we.prototype.toJSON=function(){return this.value},we.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(we.prototype,"value",{get:function(){var e=Co(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(aa>100)throw new Error("Cycle detected");this.v=e,this.i++,Qr++,Jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{na()}}}});function Fe(e){return new we(e)}function Eo(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ao(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Io(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Zt(e){we.call(this,void 0),this.x=e,this.s=void 0,this.g=Qr-1,this.f=4}(Zt.prototype=new we).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Qr))return!0;if(this.g=Qr,this.f|=1,this.i>0&&!Eo(this))return this.f&=-2,!0;var e=Z;try{Ao(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,Io(this),this.f&=-2,!0},Zt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}we.prototype.S.call(this,e)},Zt.prototype.U=function(e){if(this.t!==void 0&&(we.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Zt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Zt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Co(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function fd(e){return new Zt(e)}function To(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Jt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,ia(e),n}finally{Z=r,na()}}}function ia(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,To(e)}function pd(e){if(Z!==this)throw new Error("Out-of-order effect");Io(this),Z=e,this.f&=-2,8&this.f&&ia(this),na()}function hr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}hr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},hr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,To(this),Ao(this),Jt++;var e=Z;return Z=this,pd.bind(this,e)},hr.prototype.N=function(){2&this.f||(this.f|=2,this.o=pr,pr=this)},hr.prototype.d=function(){this.f|=8,1&this.f||ia(this)};function oa(e){var t=new hr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var sa;function Xt(e,t){P[e]=t.bind(null,P[e]||function(){})}function en(e){sa&&sa(),sa=e&&e.S()}function Do(e){var t=this,r=e.data,n=gd(r);n.value=r;var a=mt(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Zi(a.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=a.peek():(t.__$f|=1,t.setState({}))},fd(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return a.value}Do.displayName="_st",Object.defineProperties(we.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Do},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Xt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var a in n)if(a!=="children"){var i=n[a];i instanceof we&&(r||(t.__np=r={}),r[a]=i,n[a]=i.peek())}}e(t)}),Xt("__r",function(e,t){en();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(a){var i;return oa(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),en(r),e(t)}),Xt("__e",function(e,t,r,n){en(),e(t,r,n)}),Xt("diffed",function(e,t){en();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,a=t.props;if(n){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in n)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var l in n){var c=i[l],f=n[l];c===void 0?(c=hd(r,l,f,a),i[l]=c):c.o(f,a)}}}e(t)});function hd(e,t,r,n){var a=t in e&&e.ownerSVGElement===void 0,i=Fe(r);return{o:function(o,s){i.value=o,n=s},d:oa(function(){var o=i.value.value;n[t]!==o&&(n[t]=o,a?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Xt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var a in n){var i=n[a];i&&i.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Xt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Be.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function gd(e){return mt(function(){return Fe(e)},[])}const Se=Symbol.for("@ts-pattern/matcher"),jo=Symbol.for("@ts-pattern/isVariadic"),tn="@ts-pattern/anonymous-select-key",la=e=>!!(e&&typeof e=="object"),rn=e=>e&&!!e[Se],ue=(e,t,r)=>{if(rn(e)){const n=e[Se](),{matched:a,selections:i}=n.match(t);return a&&i&&Object.keys(i).forEach(o=>r(o,i[o])),a}if(la(e)){if(!la(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],a=[],i=[];for(const o of e.keys()){const s=e[o];rn(s)&&s[jo]?i.push(s):i.length?a.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+a.length)return!1;const o=t.slice(0,n.length),s=a.length===0?[]:t.slice(-a.length),l=t.slice(n.length,a.length===0?1/0:-a.length);return n.every((c,f)=>ue(c,o[f],r))&&a.every((c,f)=>ue(c,s[f],r))&&(i.length===0||ue(i[0],l,r))}return e.length===t.length&&e.every((o,s)=>ue(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const a=e[n];return(n in t||rn(i=a)&&i[Se]().matcherType==="optional")&&ue(a,t[n],r);var i})}return Object.is(t,e)},$e=e=>{var t,r,n;return la(e)?rn(e)?(t=(r=(n=e[Se]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?gr(e,$e):gr(Object.values(e),$e):[]},gr=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Mo(...e){if(e.length===1){const[t]=e;return r=>ue(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ue(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function pe(e){return Object.assign(e,{optional:()=>ua(e),and:t=>ne(e,t),or:t=>Lo(e,t),select:t=>t===void 0?br(e):br(t,e)})}function ca(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[jo]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=n[r++])!=null?a:n.at(-1)}}}}))(e),{optional:()=>ca(ua(e)),select:t=>ca(t===void 0?br(e):br(t,e))})}function ua(e){return pe({[Se]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return t===void 0?($e(e).forEach(a=>n(a,void 0)),{matched:!0,selections:r}):{matched:ue(e,t,n),selections:r}},getSelectionKeys:()=>$e(e),matcherType:"optional"})})}const bd=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},md=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},vd=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function ne(...e){return pe({[Se]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return{matched:e.every(a=>ue(a,t,n)),selections:r}},getSelectionKeys:()=>gr(e,$e),matcherType:"and"})})}function Lo(...e){return pe({[Se]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return gr(e,$e).forEach(a=>n(a,void 0)),{matched:e.some(a=>ue(a,t,n)),selections:r}},getSelectionKeys:()=>gr(e,$e),matcherType:"or"})})}function H(e){return{[Se]:()=>({match:t=>({matched:!!e(t)})})}}function br(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return pe({[Se]:()=>({match:n=>{let a={[t??tn]:n};return{matched:r===void 0||ue(r,n,(i,o)=>{a[i]=o}),selections:a}},getSelectionKeys:()=>[t??tn].concat(r===void 0?[]:$e(r))})})}function Oo(e){return!0}function We(e){return typeof e=="number"}function vt(e){return typeof e=="string"}function wt(e){return typeof e=="bigint"}const Fo=pe(H(Oo)),wd=pe(H(Oo)),yd=Fo,yt=e=>Object.assign(pe(e),{startsWith:t=>{return yt(ne(e,(r=t,H(n=>vt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return yt(ne(e,(r=t,H(n=>vt(n)&&n.endsWith(r)))));var r},minLength:t=>yt(ne(e,(r=>H(n=>vt(n)&&n.length>=r))(t))),length:t=>yt(ne(e,(r=>H(n=>vt(n)&&n.length===r))(t))),maxLength:t=>yt(ne(e,(r=>H(n=>vt(n)&&n.length<=r))(t))),includes:t=>{return yt(ne(e,(r=t,H(n=>vt(n)&&n.includes(r)))));var r},regex:t=>{return yt(ne(e,(r=t,H(n=>vt(n)&&!!n.match(r)))));var r}}),No=yt(H(vt)),Ke=e=>Object.assign(pe(e),{between:(t,r)=>Ke(ne(e,((n,a)=>H(i=>We(i)&&n<=i&&a>=i))(t,r))),lt:t=>Ke(ne(e,(r=>H(n=>We(n)&&n<r))(t))),gt:t=>Ke(ne(e,(r=>H(n=>We(n)&&n>r))(t))),lte:t=>Ke(ne(e,(r=>H(n=>We(n)&&n<=r))(t))),gte:t=>Ke(ne(e,(r=>H(n=>We(n)&&n>=r))(t))),int:()=>Ke(ne(e,H(t=>We(t)&&Number.isInteger(t)))),finite:()=>Ke(ne(e,H(t=>We(t)&&Number.isFinite(t)))),positive:()=>Ke(ne(e,H(t=>We(t)&&t>0))),negative:()=>Ke(ne(e,H(t=>We(t)&&t<0)))}),_d=Ke(H(We)),_t=e=>Object.assign(pe(e),{between:(t,r)=>_t(ne(e,((n,a)=>H(i=>wt(i)&&n<=i&&a>=i))(t,r))),lt:t=>_t(ne(e,(r=>H(n=>wt(n)&&n<r))(t))),gt:t=>_t(ne(e,(r=>H(n=>wt(n)&&n>r))(t))),lte:t=>_t(ne(e,(r=>H(n=>wt(n)&&n<=r))(t))),gte:t=>_t(ne(e,(r=>H(n=>wt(n)&&n>=r))(t))),positive:()=>_t(ne(e,H(t=>wt(t)&&t>0))),negative:()=>_t(ne(e,H(t=>wt(t)&&t<0)))}),xd=_t(H(wt)),kd=pe(H(function(e){return typeof e=="boolean"})),Sd=pe(H(function(e){return typeof e=="symbol"})),$d=pe(H(function(e){return e==null})),Cd=pe(H(function(e){return e!=null}));var jt={__proto__:null,matcher:Se,optional:ua,array:function(...e){return ca({[Se]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return $e(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const a=(i,o)=>{n[i]=(n[i]||[]).concat([o])};return{matched:t.every(i=>ue(r,i,a)),selections:n}},getSelectionKeys:()=>e.length===0?[]:$e(e[0])})})},set:function(...e){return pe({[Se]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,o)=>{r[i]=(r[i]||[]).concat([o])},a=e[0];return{matched:bd(t,i=>ue(a,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:$e(e[0])})})},map:function(...e){return pe({[Se]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var a;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=e[0])==null?void 0:a.toString()}`);const[i,o]=e;return{matched:md(t,(s,l)=>{const c=ue(i,l,n),f=ue(o,s,n);return c&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...$e(e[0]),...$e(e[1])]})})},record:function(...e){return pe({[Se]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const a=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[i,o]=e.length===1?[No,e[0]]:e;return{matched:vd(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&ue(i,c,a),u=ue(i,s,a),g=ue(o,l,a);return(u||f)&&g}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...$e(e[0]),...$e(e[1])]})})},intersection:ne,union:Lo,not:function(e){return pe({[Se]:()=>({match:t=>({matched:!ue(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:H,select:br,any:Fo,unknown:wd,_:yd,string:No,number:_d,bigint:xd,boolean:kd,symbol:Sd,nullish:$d,nonNullable:Cd,instanceOf:function(e){return pe(H((function(t){return r=>r instanceof t})(e)))},shape:function(e){return pe(H(Mo(e)))}};let Ed=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const da={matched:!1,value:void 0};function nn(e){return new Ad(e,da)}let Ad=class ui{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let a;t.length===3&&typeof t[1]=="function"?a=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,o={};const s=(c,f)=>{i=!0,o[c]=f},l=!n.some(c=>ue(c,this.input,s))||a&&!a(this.input)?da:{matched:!0,value:r(i?tn in o?o[tn]:o:this.input,this.input)};return new ui(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new ui(this.input,n?{matched:!0,value:r(this.input,this.input)}:da)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=Id){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function Id(e){throw new Ed(e)}var Td=0;function d(e,t,r,n,a,i){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Td,__source:a,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return P.vnode&&P.vnode(c),c}function Po(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Po(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Po(e))&&(n&&(n+=" "),n+=t);return n}const Ro=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vo=it,Mt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Vo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(c=>{const f=r==null?void 0:r[c],u=i==null?void 0:i[c];if(f===null)return null;const g=Ro(f)||Ro(u);return a[c][g]}),s=r&&Object.entries(r).reduce((c,f)=>{let[u,g]=f;return g===void 0||(c[u]=g),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:u,className:g,...p}=f;return Object.entries(p).every(b=>{let[v,x]=b;return Array.isArray(x)?x.includes({...i,...s}[v]):{...i,...s}[v]===x})?[...c,u,g]:c},[]);return Vo(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Bo(e,t){for(var r in t)e[r]=t[r];return e}function fa(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function pa(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ha(e){this.props=e}function Dd(e,t){function r(a){var i=this.props.ref,o=i==a.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,a)||!o:fa(this.props,a)}function n(a){return this.shouldComponentUpdate=r,Oe(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ha.prototype=new Be).isPureReactComponent=!0,ha.prototype.shouldComponentUpdate=function(e,t){return fa(this.props,e)||fa(this.state,t)};var zo=P.__b;P.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),zo&&zo(e)};var jd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ga(e){function t(r){var n=Bo({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=jd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Uo=function(e,t){return e==null?null:at(at(e).map(t))},Md={map:Uo,forEach:Uo,count:function(e){return e?at(e).length:0},only:function(e){var t=at(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:at},Ld=P.__e;P.__e=function(e,t,r,n){if(e.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),a.__c(e,t)}Ld(e,t,r,n)};var qo=P.unmount;function Ho(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Bo({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ho(n,t,r)})),e}function Wo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Wo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function mr(){this.__u=0,this.t=null,this.__b=null}function Ko(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Go(e){var t,r,n;function a(i){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return Oe(r,i)}return a.displayName="Lazy",a.__f=!0,a}function vr(){this.u=null,this.o=null}P.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),qo&&qo(e)},(mr.prototype=new Be).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var a=Ko(n.__v),i=!1,o=function(){i||(i=!0,r.__R=null,a?a(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=Wo(c,c.__c.__P,c.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},mr.prototype.componentWillUnmount=function(){this.t=[]},mr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Ho(this.__b,r,n.__O=n.__P)}this.__b=null}var a=t.__a&&Oe(le,null,e.fallback);return a&&(a.__h=null),[Oe(le,null,t.__a?null:e.children),a]};var Yo=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Od(e){return this.getChildContext=function(){return e.context},e.children}function Fd(e){var t=this,r=e.i;t.componentWillUnmount=function(){Tt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Tt(Oe(Od,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Nd(e,t){var r=Oe(Fd,{__v:e,i:t});return r.containerInfo=t,r}(vr.prototype=new Be).__a=function(e){var t=this,r=Ko(t.__v),n=t.o.get(e);return n[0]++,function(a){var i=function(){t.props.revealOrder?(n.push(a),Yo(t,e,n)):a()};r?r(i):i()}},vr.prototype.render=function(e){this.u=null,this.o=new Map;var t=at(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},vr.prototype.componentDidUpdate=vr.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Yo(e,r,t)})};var Jo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Pd=/^(?: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]/,Rd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Vd=/[A-Z0-9]/g,Bd=typeof document<"u",zd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ud(e,t,r){return t.__k==null&&(t.textContent=""),Tt(e,t),typeof r=="function"&&r(),e?e.__c:null}function qd(e,t,r){return po(e,t),typeof r=="function"&&r(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Zo=P.event;function Hd(){}function Wd(){return this.cancelBubble}function Kd(){return this.defaultPrevented}P.event=function(e){return Zo&&(e=Zo(e)),e.persist=Hd,e.isPropagationStopped=Wd,e.isDefaultPrevented=Kd,e.nativeEvent=e};var ba,Gd={enumerable:!1,configurable:!0,get:function(){return this.class}},Xo=P.vnode;P.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,a={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Bd&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||zd(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Rd.test(i)?i=s:n.indexOf("-")===-1&&Pd.test(i)?i=i.replace(Vd,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&a[i=s]&&(i="oninputCapture"),a[i]=o}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.value.indexOf(l.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.multiple?a.defaultValue.indexOf(l.props.value)!=-1:a.defaultValue==l.props.value})),r.class&&!r.className?(a.class=r.class,Object.defineProperty(a,"className",Gd)):(r.className&&!r.class||r.class&&r.className)&&(a.class=a.className=r.className),t.props=a})(e),e.$$typeof=Jo,Xo&&Xo(e)};var Qo=P.__r;P.__r=function(e){Qo&&Qo(e),ba=e.__c};var es=P.diffed;P.diffed=function(e){es&&es(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),ba=null};var Yd={ReactCurrentDispatcher:{current:{readContext:function(e){return ba.__n[e.__c].props.value}}}};function Jd(e){return Oe.bind(null,e)}function ts(e){return!!e&&e.$$typeof===Jo}function Zd(e){return ts(e)?ad.apply(null,arguments):e}function Xd(e){return!!e.__k&&(Tt(null,e),!0)}function Qd(e){return e&&(e.base||e.nodeType===1&&e)||null}var ef=function(e,t){return e(t)},tf=function(e,t){return e(t)},rf=le;function rs(e){e()}function nf(e){return e}function af(){return[!1,rs]}var of=je;function sf(e,t){var r=t(),n=ze({h:{__:r,v:t}}),a=n[0].h,i=n[1];return je(function(){a.__=r,a.v=t,pa(a.__,t())||i({h:a})},[e,r,t]),Dt(function(){return pa(a.__,a.v())||i({h:a}),e(function(){pa(a.__,a.v())||i({h:a})})},[e]),r}var Ce={useState:ze,useId:ld,useReducer:xo,useEffect:Dt,useLayoutEffect:je,useInsertionEffect:of,useTransition:af,useDeferredValue:nf,useSyncExternalStore:sf,startTransition:rs,useRef:me,useImperativeHandle:id,useMemo:mt,useCallback:od,useContext:ko,useDebugValue:sd,version:"17.0.2",Children:Md,render:Ud,hydrate:qd,unmountComponentAtNode:Xd,createPortal:Nd,createElement:Oe,createContext:ho,createFactory:Jd,cloneElement:Zd,createRef:Qu,Fragment:le,isValidElement:ts,findDOMNode:Qd,Component:Be,PureComponent:ha,memo:Dd,forwardRef:ga,flushSync:tf,unstable_batchedUpdates:ef,StrictMode:rf,Suspense:mr,SuspenseList:vr,lazy:Go,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yd},lf=["other","few","many","two","one","zero"],ns=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function a(i,o){const s=(t==null?void 0:t[i])??e[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,c)=>{var f;return((f=o==null?void 0:o[c])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let l=n.select(o.count);if(!(l in s)){const c=lf.find(f=>f in s);if(!c)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);l=c}return s[l].replace(/{{(\w+)}}/g,(c,f)=>{var u;return((u=o==null?void 0:o[f])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${i.toString()}”.`)}}return a},as=ho(null),is=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const a=mt(()=>ns({locale:n,terms:e,overrides:t}),[t,n]);return d(as.Provider,{value:{t:a,locale:n},children:r})},useTranslation:()=>{const t=ko(as);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>ns({terms:e,overrides:t,locale:r})}),cf={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:uf}=is({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:df,useTranslation:ce,createTFunction:ff}=is({...uf,...cf,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 ot(e,t){if(!e)throw new Error(t)}var wr=/\b(?:GIR\s*0AA|[a-z]{1,2}\d[\da-z]?\s*\d[a-z]{2}|[a-z](?:\d{2}|\d[a-z])\s*[\da-z]{4})\b/i,os=/^(?:GIR0AA|[A-Z]{1,2}\d[\dA-Z]?\d[A-Z]{2})$/,ss=/^[A-Z](?:\d{2}|\d[A-Z])[\dA-Z]{4}$/,ls=({postcode:e,label:t="",state:r,country:n})=>{var s,l,c;const a=((e==null?void 0:e.trim())||((s=t.match(wr))==null?void 0:s[0])||"").replace(/\s/g,"").toUpperCase();if(os.test(a))return a.startsWith("BT")?"ni":"gb";if(ss.test(a))return"ie";const i=f=>f.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim();if(i(r??"")==="northern ireland"||t.split(",").some(f=>i(f)==="northern ireland"))return"ni";const o=(c=(n==null?void 0:n.trim())||((l=t.split(",").at(-1))==null?void 0:l.trim()))==null?void 0:c.toLowerCase();return o==="united kingdom"||o==="gb"?"gb":o==="ireland"||o==="ie"?"ie":null},pf="https://maps.inploi.com/address",hf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),cs=e=>e.split(",").map(t=>hf(t).replace(/^\d+[a-z]?(?:\s*[-/]\s*\d+[a-z]?)?(?:\s+|$)/,"").trim()),us=e=>os.test(e)?`gb:${e.slice(0,-3)}`:ss.test(e)?`ie:${e.slice(0,3)}`:null,gf=(e,t,r)=>{const[n="",a=""]=cs(e),i=us(t),o=a.replace(wr,"").trim(),s=o&&!["united kingdom","ireland","england","scotland","wales","northern ireland"].includes(o);if(!n||!i&&!s)return null;const l=r.slice(0,3).findIndex(c=>{var p;const f=cs(c);if(!f.includes(n))return!1;const u=((p=c.match(wr))==null?void 0:p[0].replace(/\s/g,"").toUpperCase())??"",g=us(u);return i&&g?i===g:!!(s&&f.some(b=>b.replace(wr,"").trim()===o))});return l===-1?null:l+1},bf=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:a,pickedState:i,log:o})=>{var l,c,f;if(!t||!t.split(",").every(u=>/^(gb|ie)$/i.test(u.trim())))return;let s;try{const u=new AbortController;s=setTimeout(()=>u.abort(),1500);const g=new URL(pf);g.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const p=await fetch(g.href,{signal:u.signal});if(!p.ok)return;const b=await p.json();if(typeof b!="object"||b===null||!("results"in b)||!Array.isArray(b.results)||!("source"in b)||b.source!=="photon"&&b.source!=="mapbox")return;const v=b.results,x=[];for(const I of v){if(typeof I!="object"||I===null||!("label"in I)||typeof I.label!="string")return;x.push(I.label)}const S=((n==null?void 0:n.trim())||((l=r.match(wr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),_=gf(r,S,x),j=(f=(c=p.headers.get("Server-Timing"))==null?void 0:c.match(/(?:^|,)\s*lookup\s*;\s*dur=([\d.]+)/))==null?void 0:f[1],O=j===void 0?null:Number(j),M=p.headers.get("X-Geo-Fallback"),B=ls({postcode:n,label:r,state:i,country:a});await o({hit:_!==null,rank:_,results:x.length,source:b.source,fallback:M&&/^[a-z0-9_-]{1,64}$/i.test(M)?M:null,ms:O!==null&&Number.isFinite(O)?O:null,region:B})}catch{}finally{clearTimeout(s)}},mf="https://maps.inploi.com",vf=async(e,t,r=Date.now()+2500)=>{t==null||t.throwIfAborted();const n=new AbortController,a=()=>n.abort(t==null?void 0:t.reason);t==null||t.addEventListener("abort",a,{once:!0});let i;try{const o=new Promise((l,c)=>{n.signal.addEventListener("abort",()=>c(n.signal.reason),{once:!0}),i=setTimeout(()=>n.abort(),Math.max(0,r-Date.now()))}),s=await Promise.race([e(n.signal),o]);return t==null||t.throwIfAborted(),s}catch{t==null||t.throwIfAborted();return}finally{clearTimeout(i),t==null||t.removeEventListener("abort",a)}},wf=async(e,t,r)=>await vf(async a=>{const{lookupAddress:i}=await Promise.resolve().then(()=>yp);return a.throwIfAborted(),i({...e,signal:a})},e.signal,r)??{results:await t(),arm:"direct",source:"direct"},yf=e=>{try{const t=new URL("/outcome",mf);t.search=new URLSearchParams({kind:e.kind,surface:e.surface,arm:e.arm,picked:e.picked?"1":"0"}).toString(),t.searchParams.set("source",e.source),e.picked&&e.edited!==void 0&&t.searchParams.set("edited",e.edited?"1":"0"),e.region&&t.searchParams.set("region",e.region),fetch(t.href,{keepalive:!0}).catch(()=>{})}catch{}},ma=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(ma):Object.keys(e).sort().reduce((t,r)=>(t[r]=ma(e[r]),t),{}),_f=e=>{let t=JSON.stringify(ma(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const va=(e,t)=>t.some(r=>e instanceof r);let ds,fs;function xf(){return ds||(ds=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function kf(){return fs||(fs=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const wa=new WeakMap,ya=new WeakMap,an=new WeakMap;function Sf(e){const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{r(Lt(e.result)),a()},o=()=>{n(e.error),a()};e.addEventListener("success",i),e.addEventListener("error",o)});return an.set(t,e),t}function $f(e){if(wa.has(e))return;const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{r(),a()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),a()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});wa.set(e,t)}let _a={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return wa.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Lt(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function ps(e){_a=e(_a)}function Cf(e){return kf().includes(e)?function(...t){return e.apply(xa(this),t),Lt(this.request)}:function(...t){return Lt(e.apply(xa(this),t))}}function Ef(e){return typeof e=="function"?Cf(e):(e instanceof IDBTransaction&&$f(e),va(e,xf())?new Proxy(e,_a):e)}function Lt(e){if(e instanceof IDBRequest)return Sf(e);if(ya.has(e))return ya.get(e);const t=Ef(e);return t!==e&&(ya.set(e,t),an.set(t,e)),t}const xa=e=>an.get(e);function Af(e,t,{blocked:r,upgrade:n,blocking:a,terminated:i}={}){const o=indexedDB.open(e,t),s=Lt(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Lt(o.result),l.oldVersion,l.newVersion,Lt(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),a&&l.addEventListener("versionchange",c=>a(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const If=["get","getKey","getAll","getAllKeys","count"],Tf=["put","add","delete","clear"],ka=new Map;function hs(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ka.get(t))return ka.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,a=Tf.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(a||If.includes(r)))return;const i=async function(o,...s){const l=this.transaction(o,a?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),a&&l.done]))[0]};return ka.set(t,i),i}ps(e=>({...e,get:(t,r,n)=>hs(t,r)||e.get(t,r,n),has:(t,r)=>!!hs(t,r)||e.has(t,r)}));const Df=["continue","continuePrimaryKey","advance"],gs={},Sa=new WeakMap,bs=new WeakMap,jf={get(e,t){if(!Df.includes(t))return e[t];let r=gs[t];return r||(r=gs[t]=function(...n){Sa.set(this,bs.get(this)[t](...n))}),r}};async function*Mf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,jf);for(bs.set(r,t),an.set(r,xa(t));t;)yield r,t=await(Sa.get(r)||t.continue()),Sa.delete(r)}function ms(e,t){return t===Symbol.asyncIterator&&va(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&va(e,[IDBIndex,IDBObjectStore])}ps(e=>({...e,get(t,r,n){return ms(t,r)?Mf:e.get(t,r,n)},has(t,r){return ms(t,r)||e.has(t,r)}}));const yr=typeof indexedDB>"u"?void 0:Af("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Lf=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let on,$a,_r;const vs=()=>{if(!on)return _r;const e=on;on=void 0;const t=ln(e),r=yr==null?void 0:yr.then(n=>n.put("state",Lf(e.data),t)).finally(()=>{_r===r&&(_r=void 0)});return _r=r,_r},Ne={getStateData:async(e,t,r)=>{var a;const n=ln({...e,flowKeys:t,context:r});return(a=await yr)==null?void 0:a.get("state",n)},getAllStateData:async()=>{var e;return((e=await yr)==null?void 0:e.getAll("state"))??[]},setStateData:e=>{on=e,clearTimeout($a),$a=setTimeout(()=>void vs(),1e3)},flushStateData:()=>(clearTimeout($a),vs()??Promise.resolve())},Qt=e=>t=>t?t.type===e:!1,Of=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),ws=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Of()}),Ff=e=>nn(e).with({nativeEvent:{submitter:jt.select(jt.union(jt.instanceOf(HTMLButtonElement),jt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),sn=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const a=e.find(c=>c.id===t.nextId);if(a===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,o=e.find(c=>c.id===i),s=t.type.includes("question")?1:0;if(o){const c=s+Math.max(sn(e,a,r,n+s).remainingSteps,sn(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}}const l=s+sn(e,a,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Nf=e=>{const t={},r=e.find(n=>n.isHead);return r&&sn(e,r,(n,a)=>{t[n]=a}),t},ln=e=>[...e.flowKeys,e.id,e.version,e.build,_f(e.hostContext??e.context)].join("/"),Pf=({data:e,nodes:t})=>{const r=e.startedWriteNodeIds===void 0?t.some(n=>n.type==="integration-application-submit"&&e.nodeHistory.includes(n.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!r&&ki(t,e.submissions)},ys=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||ki(t,e.submissions))},Ge=Fe({state:"idle"}),Ca=new Set,Ot=e=>{const{state:t,flow:r}=Ge.value;if(t!=="loaded")return;ot(r,"No flow to update");const n=e(r.data);r.data=n,Ge.value={state:t,flow:r},Ne.setStateData(r)},V={current$:Ge,viewState$:Fe("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:a,title:i,analytics:o,job:s,employer:l,locationOrigin:c})=>{await Ne.flushStateData().catch(()=>{});const f=await Ne.getStateData(t,a,r),u=f??ws(),g=ln({...t,flowKeys:a,context:r}),p=f!==void 0&&!Ca.has(g)&&Pf({data:u,nodes:t.nodes});return p||Ca.add(g),{jobAlerts:e,data:u,offerResume:p,startedAt:new Date,nodeIdToProgress:Nf(t.nodes),flowKeys:a,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:n===void 0?r:Rn(n,r),hostContext:n===void 0?void 0:r,title:i,analytics:o,job:s,employer:l,locationOrigin:c}},commitFlow:e=>{Ge.value={state:"loaded",flow:e},Ne.setStateData(e)},settleResume:e=>{e.offerResume=!1,Ca.add(ln(e))},cancelCurrentFlow:()=>{Ge.value={state:"idle"},V.viewState$.value="closed"},markAsFinished:()=>Ot(e=>({...e,isFinished:!0})),markAsInteracted:()=>Ot(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Ot(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Ot(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Ne.flushStateData()},restart:()=>{const{state:e,flow:t}=Ge.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r={...ws(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},n={...t,data:r,startedAt:new Date,offerResume:!1};Ge.value={state:e,flow:n},Ne.setStateData(n)},addMessage:(e,t)=>{const r={...e,groupId:t};return Ot(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ge.value;ot(t==="loaded","Application not loaded");const n=r.data.messages.filter(a=>!a.groupId||!e.includes(a.groupId));r.data.messages=n,Ne.setStateData(r)},setSubmission:(e,t)=>Ot(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Ot(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Ge.peek().flow===e&&(Ge.value={state:"loaded",flow:e}),Ne.setStateData(e),await Ne.flushStateData()}},_s=({heading:e})=>{const{t}=ce();return d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("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:[d("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"}),d("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"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:d("p",{class:"text-error-11 font-bold",children:t(e)})})]})},cn=e=>{const{t}=ce();return d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:t("loading")}),d("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)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("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"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("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"})})})]})},xs=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(cn,{class:"text-neutral-6 h-8 w-8"})}),Rf=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Vf=Mt("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"}}),xr=({class:e,children:t,variant:r,...n})=>d("button",{class:it(Vf({variant:r}),e),...n,children:d("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:t})}),ks=()=>d("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Bf=()=>{if(V.current$.value.state!=="loaded")return null;const e=V.current$.value.flow.nodeIdToProgress,t=V.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:Rf(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},zf=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:a}=ce(),i=V.viewState$,o=!!t.feedback&&V.current$.value.state==="loaded"&&i.value==="maximised",s=o&&n.value,l=me(!1);return Dt(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=V.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),d(le,{children:d("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:[d("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:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{"aria-label":a("minimize"),onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ea,children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?d("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:it({hidden:!o}),children:d("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,V.current$.value.state==="loaded"&&d(xr,{class:"mx-1","aria-label":a("restart"),onClick:()=>{V.restart()},children:[d("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"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(xr,{class:"view-switch mx-1",onTouchStart:Ea,"aria-label":a("minimize"),onClick:()=>i.value="minimised",children:d(ks,{})},"minmax")]})]}),d(Bf,{})]})})};function Ea(){}const Uf=Go(()=>Promise.resolve().then(()=>fb).then(e=>e.ChatbotBody)),Ss=Mt("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"}}}),$s=Mt("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"}}}),qf=({open:e,...t})=>{const r=me(null);return je(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),d("dialog",{ref:r,...t})},Hf=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:a,talentBankClient:i,params:o,feedbackReady:s})=>{const{state:l,flow:c}=V.current$.value,f=V.viewState$.value,u=l!=="idle"&&f==="maximised",g=me(null),p=c?[...c.data.nodeHistory].reverse().map(b=>c.nodes.find(v=>v.id===b)).find(b=>(b==null?void 0:b.type)==="flow-section"):void 0;return d(df,{terms:o.terms,locale:void 0,children:[d(qf,{open:u,onClose:()=>V.viewState$.value="minimised",children:d("div",{ref:g,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Ss({view:"maximised"}),children:d("div",{class:$s({view:"maximised"}),children:[d(zf,{params:o,analytics:a,feedbackReady:s,children:p?d(le,{children:[d("span",{class:"block",children:p.data.title}),d("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),nn({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>d(xs,{},"loading")).with({state:"loaded"},()=>d(mr,{fallback:d(xs,{},"loading"),children:d(Uf,{env:e,rpcClient:n,analytics:a,apiClient:r,logger:t,talentBankClient:i})})).with({state:"closed"},()=>d(_s,{heading:"flow_closed"})).with({state:"error"},()=>d(_s,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?d(Wf,{flow:c}):null]})},Wf=({flow:e})=>{const{t}=ce();return d("div",{class:Ss({view:"minimised",class:"z-100 isolate"}),children:d("div",{class:$s({view:"minimised"}),children:[d("button",{onClick:()=>{V.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ea,children:d("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),d("div",{class:"flex items-center px-0.5",children:d(xr,{class:"mx-1","aria-label":t("close_application"),onClick:V.cancelCurrentFlow,variant:"white",children:d("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Cs="14.18.2",Kf=(e,t=Cs)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=new Headers(n==null?void 0:n.headers);return a.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(a.entries())})}};let kr,Es,un;const Gf=e=>{const t=e.slice(0,e.lastIndexOf("/")+1);return/^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(t)?t:void 0},As=(e,t,r)=>{const n=ac(e,t??`
|
|
30
|
+
`,r);return{...n,stack:n.stack.filter(a=>a.startsWith("index.js:"))}},Aa=e=>As(e,un),Is=e=>typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"?e.status:void 0,er=(e,t,r={})=>kr==null?void 0:kr.send(e,t,{...r,message:"Chatbot widget beacon",widget:"chatbot",key_hash:Es}),Yf=e=>{const t=(r,n,a)=>{if(V.viewState$.value==="closed")return;const i=As(n,e,a);i.stack.length&&er("fatal",Pr(n),{phase:"render",error:{...i,via:r}})};window.addEventListener("error",r=>{tc(r)||t("error",r.error,r.message)}),window.addEventListener("unhandledrejection",r=>t("rejection",r.reason))},Jf=(e,t,r=Xe&&Xe.tagName.toUpperCase()==="SCRIPT"&&Xe.src||new URL("index.js",document.baseURI).href)=>{const n=oc();kr||!n||!e||(Es=t?hi(t).toString(36):void 0,kr=gc({config:n,version:Cs,env:e,seed:sc(ic(),vu)}),un=Gf(r),un&&Yf(un))},Zf=e=>{let t={application:void 0,attempts:0,blocked:!1};return{fetch:async(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=V.current$.value.flow;a!==t.application&&(t={application:a,attempts:0,blocked:!1});const i=t,o=++i.attempts,s=performance.now(),l=await e.fetch(r,n).catch(c=>{throw Is(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(i.blocked=!0,er("submit_blocked",Pr(c),{phase:"submit",error:Aa(c),endpoint:"flow_submit",attempt:o,elapsed_ms:Math.round(performance.now()-s),body_kb:typeof(n==null?void 0:n.body)=="string"?Math.round(n.body.length/1024):void 0})),c});return i.blocked&&er("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:o}),l}}},Xf='[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height: calc(100vh - 64px) ;--content-height: calc(100svh - 64px) }@media screen and (min-width:768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px) );--content-height: min(640px, calc(100svh - 16px) ) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media(min-width:640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media(min-width:768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media(min-width:1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media(min-width:1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media(min-width:1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .\\!visible{visibility:visible!important}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-1{bottom:4px}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[44px\\]{min-height:44px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-none{resize:none}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-end{align-items:flex-end}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media(pointer:coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}',Ts="inploi-chatbot",Ia=`[data-widget='${Ts}']`,Qf=()=>({getChatbotElement:()=>document.querySelector(Ia),getOrCreateChatbotElement:()=>{const e=document.querySelector(Ia);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Ts,t}}),ep=25,Ds=Fe(()=>{}),js=["wheel","touchmove","keydown"],tp=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new ht);const a=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(a),n(new ht)},{once:!0})}),ae={onSubmitSuccessFn$:Fe(()=>{}),onInteractionFn$:Fe(()=>{}),isBotTyping$:Fe(!1),captchaVisible$:Fe(!1),themeMode$:Fe("light"),isReadingHistory$:Fe(!1),scrollToEnd:()=>Ds.value()},rp=()=>{const e=me(null),t=me(-1/0);je(()=>{const n=e.current;if(!n)return;const a=()=>{ae.isReadingHistory$.value=!1,n.scrollTo({top:n.scrollHeight,behavior:"instant"})};Ds.value=a;const i=()=>t.current=performance.now(),o=()=>{n.scrollHeight-n.scrollTop-n.clientHeight<=24?ae.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ae.isReadingHistory$.value=!0)};n.addEventListener("scroll",o,{passive:!0});for(const l of js)n.addEventListener(l,i,{passive:!0});const s=new ResizeObserver(()=>{ae.isReadingHistory$.peek()||a()});return s.observe(n),n.firstElementChild&&s.observe(n.firstElementChild),()=>{n.removeEventListener("scroll",o);for(const l of js)n.removeEventListener(l,i);s.disconnect()}},[]);const r=mt(()=>({setSubmission:(a,i)=>V.setSubmission(a,i),captcha:{container:()=>{var a;return((a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))??null},get theme(){return ae.themeMode$.peek()},reveal:a=>{ae.captchaVisible$.value=a,a&&requestAnimationFrame(()=>{var i,o;(o=(i=e.current)==null?void 0:i.querySelector("[data-captcha-slot]"))==null||o.focus(),ae.scrollToEnd()})}},send:async({message:a,signal:i,groupId:o})=>{if(await nn(a).with({author:"bot",type:"text"},async s=>{if(i!=null&&i.aborted)throw new ht;ae.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*ep;try{await tp(l,i)}finally{ae.isBotTyping$.value=!1}}).otherwise(async()=>{}),i!=null&&i.aborted)throw new ht;V.addMessage(a,o)},input:(({input:a,signal:i})=>{if(i!=null&&i.aborted)throw new ht;return V.setInput(a),new Promise(o=>{const s=l=>{if(i!=null&&i.aborted)throw new ht;t.current=-1/0,V.setInput(void 0),a.key&&V.setSubmission(a.key,l),o(l)};ae.onSubmitSuccessFn$.value=s})})}),[]);return{chatRef:e,chatService:r}};var np=["1","2","3","4","5","6","7","8","9","10","11","12"],ap={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]}},ip=(e,t=1,r)=>n=>{const[a,i]=ap[r][n];return"oklch("+a+"% "+i*t+" "+e+")"},Ta=e=>{const t=ip(e.hue,e.chroma,e.mode);return Object.fromEntries(np.map(r=>[e.prefix+r,e.transform(t(r))]))},Da=e=>e,op=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(a=>{const i=n[a];return[`${String(r)}.${a}`,i]}):[[r,n]]});return Object.fromEntries(t)},dn=e=>!!e&&typeof e=="object"&&!Array.isArray(e),ja=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(dn(e)&&dn(r))for(const n in r){const a=r[n];if(dn(a)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];dn(i)&&ja(i,a)}else Object.assign(e,{[n]:r[n]})}return ja(e,...t)},sp=e=>{function t(r,n){const a=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${a}`:`var(--${a})`}return t},lp=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:a,getToken:i}=n,o=g=>i("reference",g.toString()),s=e({theme:a}),l=t({theme:a,core:o,raw:{core:s}}),c=r({theme:a,core:o,semantic:o,raw:{core:s,semantic:l}}),f=op(ja(s,l,c)),u=([g,p],b)=>{const v=[b,g].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(x=>u(x,v)):[[n.getToken("declaration",v),p]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(g=>u(g))),ref:g=>i("reference",g.toString())}}})})})});const[Ma,La,Ms]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],cp=lp().core(({theme:e})=>({color:{black:Ma,white:La,lowest:e.mode==="light"?La:Ma,highest:e.mode==="light"?Ma:La,...Ta({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Da}),...Ta({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Da}),...Ta({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Da})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(a,i)=>t.core.color[a].replace(")",` / ${i})`);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:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Ms,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const a=(i,o)=>e.core.color[i].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Ms,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),up=sp({prefix:"i-"}),dp=e=>{const t=cp.from({theme:e,getToken:up}),r=Object.entries(t.declarations).map(([n,a])=>`${n}: ${a};`);return`${Ia} {
|
|
32
31
|
${r.concat(r).join(`
|
|
33
32
|
`)}
|
|
34
|
-
}`};class Ts extends ad{}const tp=({_internal_domManager:e=zf(),theme:t,terms:r,feedback:n,jobAlerts:i})=>nd(({apiClient:a,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let d=!1,b=0;Pf(f,c);const p=Vf(Ff(a));let g=0;const v=new WeakMap,x=(A,S)=>{const k=++g,$=performance.now();return S.catch(F=>{throw typeof F=="object"&&F!==null&&v.set(F,{endpoint:A,attempt:k,elapsed_ms:Math.round(performance.now()-$)}),F})},C=(A,S)=>{const k=Cs(A);k===404||k===410||Zt("fatal","application_unavailable",{phase:"flow",stage:S,error:Si(A),http_status:k,...S==="flow_fetch"&&typeof A=="object"&&A!==null&&v.get(A)})},_=c&&f?Ed({environment:f,publishableKey:c,logger:s}):void 0,M=A=>A===b,D=()=>{if(typeof window>"u")return;b++,Fe.flushStateData().catch(()=>{}),R.cancelCurrentFlow(),ne.isBotTyping$.value=!1;const A=e.getChatbotElement();A&&(Tt(null,A),A.remove()),d=!1,s.info("Chatbot plugin destroyed")},j=()=>{if(typeof window>"u")return;const A=b,S=[Oe("style",{id:"inploi-chatbot-styles"},Bf),Oe("style",{id:"inploi-chatbot-theme"},ep(t))],k=e.getOrCreateChatbotElement();ne.themeMode$.value=t.mode;const $=Le(!1);if(Tt(Oe(ae,{},[S,Oe(Of,{env:f,rpcClient:o,apiClient:p,logger:s,analytics:l,talentBankClient:_,params:{theme:t,terms:r,feedback:n},feedbackReady:$})]),k),n){const F=I=>{var q,B;if(!M(A))return;const V=(q=e.getChatbotElement())==null?void 0:q.querySelector("dialog");V&&rp({instance:I({rpcClient:o,apiClient:a,logger:s,analytics:l}),theme:t,terms:((B=n.params)==null?void 0:B.terms)??{},host:V}).then(()=>void($.value=!0),G=>s.error("Error rendering feedback plugin",G))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:I})=>{F(I())}).catch(I=>{s.error("Error preparing feedback plugin",I)}):F(n.plugin)}d=!0},z=async(A,S)=>{if(!M(S))return;Hc({context:Ln(A.jobContext,A.context||{}),schema:A.flow.context_schema,logger:s});const k=await R.prepareFlow({...A,jobAlerts:A.jobAlerts??i});M(S)&&R.commitFlow(k)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(d)return;j(),s.info("Chatbot plugin prepared")}catch(A){s.error("Error preparing chatbot plugin",A)}},fetchFlowByJobId:async(A,S)=>{const k=(S==null?void 0:S.idType)==="inploi"?"internal":"external";return x("flow_by_job",o.request(Pd,{params:{id:A},searchParams:{id_type:k}})).catch($=>{throw Io({name:"ApiError",message:Dt.string,status:410,data:Dt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},$)?new Ts($.message,$.status,$.data):$}).then($=>({flow:$.flow,title:$.job.title,flowKeys:[$.job.id,...(S==null?void 0:S.flowKeys)??[]],job:Rd($,{id:A,idType:k}),employer:$.company.name,...S,jobContext:$.context,context:{user:$.user,...S==null?void 0:S.context}}))},fetchFlowById:async(A,S)=>x("flow_by_id",o.request(Vd,{params:{id:A}})).then(k=>{var $;return{flow:k.flow,title:"Chatbot",flowKeys:(S==null?void 0:S.flowKeys)??[],...S,analytics:{customProperties:{flow_id:k.flow.id,flow_version:k.flow.version,...($=S==null?void 0:S.analytics)==null?void 0:$.customProperties}}}}),open:async A=>{if(typeof window>"u")return;const S=performance.now();try{R.cancelCurrentFlow(),R.viewState$.value="maximised",d||j()}catch($){s.error("Error starting flow",$),Zt("boot_failed",Rr($),{phase:"config",error:Si($),elapsed_ms:Math.round(performance.now()-S)});return}Zt("boot");const k=b;if(A instanceof Promise){R.current$.value={state:"loading"};const $=F=>I=>{M(k)&&(s.error("Error loading flow",I),R.current$.value={state:I instanceof Ts?"closed":"error"},C(I,F))};A.then(F=>z(F,k).catch($("create")),$("flow_fetch"))}else await z(A,k).catch($=>{s.error("Error starting flow",$),C($,"create")})},hasApplicationInProgress:async A=>{const S=await Fe.getStateData(A.flow,A.flowKeys,A.context??{});return S!==void 0&&gs({data:S,nodes:A.flow.nodes})},hasAnyApplicationInProgress:async()=>(await Fe.getAllStateData()).some(A=>gs({data:A,nodes:[]})),close:async()=>{typeof window>"u"||(R.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:D}});function rp({instance:e,terms:t,theme:r,host:n}){return e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=tp;const np=Object.freeze(Object.defineProperty({__proto__:null,jobCountryCodes:Jc},Symbol.toStringTag,{value:"Module"}));var ip="https://maps.inploi.com",ap=(e,t)=>{const r=new URL(`/${e}`,ip);return r.search=new URLSearchParams({q:t.query,limit:"5",surface:t.surface,seed:t.seed}).toString(),t.country&&r.searchParams.set("country",t.country),r},ji=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),op=e=>{if(!ji(e)||typeof e.label!="string"||!ji(e.address)||e.country!==void 0&&typeof e.country!="string")return;const t={};for(const r of["line1","line2","line3","city","state","postcode","country"]){const n=e.address[r];if(n!==void 0&&typeof n!="string")return;n!==void 0&&(t[r]=n)}return{id:e.label,label:e.label,country:e.country,address:t}},sp=async(e,t,r)=>{const n=await fetch(e.href,{signal:r});if(!n.ok)return;const i=n.headers.get("X-Geo-Arm"),a=await n.json();if(i!=="inploi"&&i!=="mapbox"||!ji(a)||!Array.isArray(a.results)||a.source!=="photon"&&a.source!=="mapbox"&&a.source!=="places"||typeof a.attribution!="string")return;const o=[];for(const s of a.results){const l=t(s);if(l===void 0)return;o.push(l)}return{results:o,arm:i,source:a.source}},lp=e=>{const t=ap("address",{...e,seed:e.session});return t.searchParams.set("session",e.session),e.lat!==void 0&&e.lng!==void 0&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&e.lat>=-90&&e.lat<=90&&e.lng>=-180&&e.lng<=180&&(t.searchParams.set("lat",String(e.lat)),t.searchParams.set("lng",String(e.lng))),sp(t,op,e.signal)};const cp=Object.freeze(Object.defineProperty({__proto__:null,lookupAddress:lp},Symbol.toStringTag,{value:"Module"}));var dp="9.13.0",js=`https://sdk.inploi.com/@inploi/flows@${dp}/cdn/captcha/index.html`,up=new URL(js).origin,Ds=3e4,fp=5*6e4,pp=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",Di=new WeakMap,hp=e=>{let t=Di.get(e);return t||(t=e.fetch("/flow/captcha").then(r=>{let n=r==null?void 0:r.site_key;return typeof n=="string"&&n!==""?n:void 0}).catch(r=>{throw Di.delete(e),r}),Di.set(e,t)),t},bp=(e,t={})=>new Promise((r,n)=>{let{signal:i,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,c=()=>{},f=v=>{l||(l=!0,clearTimeout(p),i==null||i.removeEventListener("abort",b),c(),v())},d=v=>f(()=>n(new Error(v))),b=()=>d("Captcha aborted"),p,g=v=>{clearTimeout(p),p=setTimeout(()=>d("Captcha timed out"),v)};if(g(Ds),i==null?void 0:i.aborted)return b();i==null||i.addEventListener("abort",b),(async()=>{let v=await hp(e);if(v===void 0)return f(()=>r(void 0));if(l)return;let x=document.createElement("iframe");x.src=`${js}?${new URLSearchParams({sitekey:v,origin:window.location.origin,...o&&{theme:o}}).toString()}`,x.title="Cloudflare security check",x.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(x):(x.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(x));let C=!1,_=M=>{if(!x.contentWindow||M.source!==x.contentWindow||M.origin!==up||!pp(M.data))return;let D=M.data;switch(D.type){case"token":return f(()=>r(D.token));case"resize":x.style.height=`${Math.max(0,Math.ceil(D.height))}px`;return;case"before-interactive":return C=!0,g(fp),s==null?void 0:s();case"after-interactive":return C=!1,g(Ds);case"error":!C&&!D.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",_),c=()=>{window.removeEventListener("message",_),x.remove()}})().catch(v=>f(()=>n(v)))}),Ms=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[i,...a]=e.compareKey.split(".");if(!i)return!1;let o=ya({context:t,key:i,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=pr(o.value,a);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=pr(o.value,a),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return $r(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return $r(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return $r(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(c=>typeof c=="string")?$r(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?Vr(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},$r=(e,{context:t,submissions:r})=>{let n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let i of n)if(Ms({condition:i,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let i of n)if(!Ms({condition:i,context:t,submissions:r,ifBlock:e}))return!1;return!0}},gp=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,mp=(e,{context:t,submissions:r})=>e.replace(gp,(n,i,a="")=>{let[o,...s]=i.trim().split("."),l=ya({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${zt(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 Vr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=pr(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(f=>typeof f=="string"))return c.join(", ")}break}}return a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function vp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Mi(e,t,r=""){const n=vp(e),i=e==null?void 0:e.length,a=t!==void 0;if(!n||a&&i!==t){const o=r&&`"${r}" `,s=a?` of length ${t}`:"",l=n?`length=${i}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Os(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function wp(e,t){Mi(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function Oi(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Li(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ge(e,t){return e<<32-t|e>>>t}const yp=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),_p=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function xp(e){if(Mi(e),yp)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=_p[e[r]];return t}function kp(e,t={}){const r=(i,a)=>e(a).update(i).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=i=>e(i),Object.assign(r,t),Object.freeze(r)}const Sp=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Cp(e,t,r){return e&t^~e&r}function Ep(e,t,r){return e&t^e&r^t&r}class $p{constructor(t,r,n,i){pe(this,"blockLen");pe(this,"outputLen");pe(this,"padOffset");pe(this,"isLE");pe(this,"buffer");pe(this,"view");pe(this,"finished",!1);pe(this,"length",0);pe(this,"pos",0);pe(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(t),this.view=Li(this.buffer)}update(t){Os(this),Mi(t);const{view:r,buffer:n,blockLen:i}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(i-this.pos,a-o);if(s===i){const l=Li(t);for(;i<=a-o;o+=i)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Os(this),wp(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:o}=this;r[o++]=128,Oi(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;n.setBigUint64(i-8,BigInt(this.length*8),a),this.process(n,0);const s=Li(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<c;d++)s.setUint32(4*d,f[d],a)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=i,t.pos=s,i%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ap=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]),_t=new Uint32Array(64);class Ip extends $p{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:i,E:a,F:o,G:s,H:l}=this;return[t,r,n,i,a,o,s,l]}set(t,r,n,i,a,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,r){for(let d=0;d<16;d++,r+=4)_t[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const b=_t[d-15],p=_t[d-2],g=Ge(b,7)^Ge(b,18)^b>>>3,v=Ge(p,17)^Ge(p,19)^p>>>10;_t[d]=v+_t[d-7]+g+_t[d-16]|0}let{A:n,B:i,C:a,D:o,E:s,F:l,G:c,H:f}=this;for(let d=0;d<64;d++){const b=Ge(s,6)^Ge(s,11)^Ge(s,25),p=f+b+Cp(s,l,c)+Ap[d]+_t[d]|0,v=(Ge(n,2)^Ge(n,13)^Ge(n,22))+Ep(n,i,a)|0;f=c,c=l,l=s,s=o+p|0,o=a,a=i,i=n,n=p+v|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,i,a,o,s,l,c,f)}roundClean(){Oi(_t)}destroy(){this.set(0,0,0,0,0,0,0,0),Oi(this.buffer)}}class Tp extends Ip{constructor(){super(32);pe(this,"A",yt[0]|0);pe(this,"B",yt[1]|0);pe(this,"C",yt[2]|0);pe(this,"D",yt[3]|0);pe(this,"E",yt[4]|0);pe(this,"F",yt[5]|0);pe(this,"G",yt[6]|0);pe(this,"H",yt[7]|0)}}const jp=kp(()=>new Tp,Sp(1));var Ls=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Fi=e=>{var t,r;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(r=[...e.data.messages].reverse().find(n=>n.groupId&&e.nodes.some(i=>i.id===n.groupId&&i.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},Ni=e=>Array.isArray(e)?e.map(Ni):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,Ni(r)])):typeof e=="function"?void 0:e,Dp=e=>xp(jp(new TextEncoder().encode(JSON.stringify(Ni(e)))));function Mp(e,t,r,n){var i;if(n!=null&&n.aborted)return;let a=Dp(r),o=(i=e.data).preApplyFingerprints??(i.preApplyFingerprints=[]);if(o.includes(a))return;o.push(a);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let c=o.indexOf(a);c!==-1&&o.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Fs=({context:e,submissions:t})=>({context:e,submissions:t??{}}),ze=(e,t)=>mp(e,Fs(t)),Op=(e,t)=>$r(e,Fs(t)),Ns=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;let n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Ns({node:n,nodes:t,stopWhen:r})},Lp=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let i=t.find(o=>o.id===n.branchId);if(!i)return!1;let a=Ns({node:i,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},Fp=3,Np=({flow:e,analytics:t,logger:r,talentBankClient:n,context:i,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:d,closedRoleBehaviour:b,settledOutcomes:p=b,dateEchoLocale:g,onFlowEnd:v,onInterpret:x,forceSubmitConfirmation:C,flowType:_,t:M})=>{var D;let j=new AbortController,z={submitAccepted:!1};(D=e.data).startedWriteNodeIds??(D.startedWriteNodeIds=e.nodes.flatMap(k=>{var F,I;if(k.type!=="integration-application-submit"||!e.data.nodeHistory.includes(k.id))return[];let $=k.data.key?(F=o())==null?void 0:F[k.data.key]:void 0;return($==null?void 0:$.type)==="integration"&&((I=ka($.value))==null?void 0:I.verdict)==="not_submitted"?[]:[k.id]}));let A={...t.service,log:k=>t.service.log({...k,customProperties:{...k.customProperties,...t.customProperties}})},S=async(k,$)=>{let F=j.signal;if(F.aborted)return;let I=o(),V=s(),q=(V==null?void 0:V.submitNodeId)===k.id?e.nodes.find(B=>{var G;return B.id===V.fileQuestionNodeId&&B.type==="question-file"&&((G=I==null?void 0:I[B.data.key])==null?void 0:G.type)!=="file"}):void 0;if(q)return S(q,$);x==null||x(k,$);try{await Rp({flow:e,analytics:A,logger:r,talentBankClient:n,apiClient:a,context:i,node:k,submissions:I,applicationRecovery:V,setApplicationRecovery:async B=>{if(!F.aborted)try{await l(B)}catch(G){r.error("Failed to persist application recovery",G)}},forceSubmitConfirmation:C||(V==null?void 0:V.submitNodeId)===k.id,run:z,persistWriteBarrier:f,onSubmitNetworkError:d,settledOutcomes:p,dateEchoLocale:g,flowType:_,signal:F,t:M,chat:{sendMessage:async B=>c.send({groupId:k.id,message:B,signal:F}),userInput:async B=>c.input({input:B,signal:F}),setSubmission:(B,G)=>{F.aborted||c.setSubmission(B,G)},captcha:c.captcha},next:B=>{if(F.aborted)return;let G=(V==null?void 0:V.fileQuestionNodeId)===k.id?V.submitNodeId:B,Y=G?e.nodes.find(ve=>ve.id===G):Lp({childNode:k,nodes:e.nodes});return Y?S(Y,k):v==null?void 0:v(k)},end:()=>{F.aborted||(v==null||v(k))}})}catch(B){if(B instanceof ft)return;throw B}};return{interpret:async k=>{let $=e.nodes.find(F=>F.id===k)??Ls(e.nodes);return S($)},undo:k=>{var G;if(delete e.data.reviewReplay,((G=e.data.startedWriteNodeIds)==null?void 0:G.length)||e.data.isFinished)return{removed:0};let $=Fi(e),F=$?k.lastIndexOf($):-1,I=e.nodes.find(Y=>Y.id===$);if(F===-1||!I)return{removed:0};let V=e.nodes.find(Y=>Y.id===k[k.length-1]);j.abort();let q=k.splice(F);e.data.messages=e.data.messages.filter(Y=>!Y.groupId||!q.includes(Y.groupId)),e.data.currentInput=null;let B=o();for(let Y of q.slice(1)){let ve=e.nodes.find(fe=>fe.id===Y);if(!(!ve||!B||ve.id===$)&&("key"in ve.data&&ve.data.key&&delete B[ve.data.key],"keys"in ve.data))for(let fe of Object.values(ve.data.keys))typeof fe=="string"&&delete B[fe]}return j=new AbortController,S(I,V),{removed:q.length}},abort:()=>{j.abort()}}};async function Rp(e){let t=e.node;switch(t.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:t.data.title}),e.next(t.nextId);case"pre-apply-result":return ch({...e,node:t});case"text":return Qp({...e,node:t});case"image":return eh({...e,node:t});case"question-text":return th({...e,node:t});case"question-enum":return ih({...e,node:t});case"question-number":return rh({...e,node:t});case"question-phone":return nh({...e,node:t});case"question-boolean":return ah({...e,node:t});case"question-file":return sh({...e,node:t});case"question-address":return oh({...e,node:t});case"end-flow":return lh({...e,node:t});case"if-block":return Xp({...e,node:t});case"jump":return Bp({...e,node:t});case"link":return Zp({...e,node:t});case"integration-application-submit":return Gp({...e,node:t});case"add-submission":return zp({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Vp({...e,node:t});case"feedback":return Pp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Pp({next:e,node:t}){e(t.nextId)}async function Vp({next:e,node:t,talentBankClient:r,submissions:n,flow:i,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let c=t.data.scope==="job"?(l=i.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||c!=null)try{s=await r.checkDuplicate({email:Sc({key:t.data.email,submissions:n}).toString(),jobId:c,scope:t.data.scope})}catch(f){a.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Bp({next:e,node:t}){e(t.data.targetId)}async function zp({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:ze(t.data.value,{submissions:n,context:i})},e(t.nextId)}var Up=5e3,qp=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Wp=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?Ca:e.throttles?On:Sa)),Hp=(e,t,r)=>{let{waitMs:n,throttles:i,maintenance:a}=Nc(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...i!==void 0&&{throttles:i},...a&&{maintenance:a}}},Kp=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Ri=e=>e instanceof Error&&Kp.includes(e.name)?e:void 0,Rs=e=>{let t=Ri(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Gp({chat:e,next:t,end:r,node:n,logger:i,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:d,flowType:b,run:p,persistWriteBarrier:g,signal:v,onSubmitNetworkError:x,settledOutcomes:C,t:_}){var S,k;let M=async({redirect_url:$,message:F,button_text:I})=>{let{anonymous_id:V,session_id:q}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:F??_("submission_redirect_message")});try{let B=new URL($);V&&!B.searchParams.has("anonymous_id")&&B.searchParams.set("anonymous_id",V),await e.sendMessage({type:"link",href:B.toString(),text:I??_("complete_submission"),onClick:()=>{if(!q){i.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:q,flow_version:l.version,href:B.toString(),job:l.job}})}})}catch(B){i.error(`Invalid redirect URL: ${$}`,B),e.sendMessage({type:"system",variant:"error",text:_("redirect_url_error")})}};if((S=l.data.startedWriteNodeIds)!=null&&S.includes(n.id)&&(c==null?void 0:c.submitNodeId)!==n.id){let $=(k=l.data.submitRedirects)==null?void 0:k[n.id];return $?(await M($),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:_("submission_unknown")}),r())}let D=qp(n.id,l.job),j=0,z=p.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,A=async $=>{var Fr,wn,yn,na,Nr,h,m,w,T;let F=((Fr=l.data.submitCooldown)==null?void 0:Fr.key)===D?l.data.submitCooldown:void 0;F&&(F.until=Wp(F));let I=F==null?void 0:F.until;(l.data.reviewRequiresSend===!0&&!z||$!==!0||I!==void 0&&I>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:n.data.submitLabel,...I!==void 0&&{availableAt:I}}}),z=!1;let V;if(n.data.captcha){let y=e.captcha,E=!0;try{V=await bp(a,{signal:v,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:_("captcha_check")}).catch(()=>{}).then(()=>{E&&(y==null||y.reveal(!0))})}})}catch(P){if(i.error("Captcha check failed",P),v.aborted)return}finally{E=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:_("submitting")});let{anonymous_id:q,session_id:B}=s.getSessionInfo();if(v.aborted)return;let G=((wn=l.data.startedWriteNodeIds)==null?void 0:wn.includes(n.id))===!0;if((c==null?void 0:c.submitNodeId)===n.id&&await f(void 0),G||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await g().catch(y=>i.error("Failed to persist application write barrier",y)),v.aborted)return;let Y,ve=setTimeout(()=>{Y=e.sendMessage({type:"loading",semantic:"submission-still-working",text:_("submission_still_working")}).catch(y=>i.error("Failed to send submission progress message",y))},Up),fe,Q=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:n.data.integrationId,anonymous_id:q,session_id:B,job:l.job,flow_build:l.build,...V!==void 0&&{captcha_token:V},submissions:xc(l.nodes,kc(o||{},n.data.submitKeys)),pre_apply:jn(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{fe=y;let E=Rs(y);return(E==null?void 0:E.data)!==void 0?E.data:y});if(clearTimeout(ve),await Y,v.aborted)return;if(fe!==void 0&&!Ri(fe)&&x)return await x(fe,v),A(!0);l.data.stagingDestination=Dc(Q),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:Q});let Or=(yn=Rs(fe))==null?void 0:yn.status,ar=typeof Or=="number"?Or:void 0,U=ka(Q,ar),or=U===void 0&&ar===429,sr=C==="terminal"&&((U==null?void 0:U.outcome)==="closed"||(U==null?void 0:U.outcome)==="duplicate"),St=l.data.failedAttemptAt,Rt=St==null?void 0:St[D];St&&Rt!==void 0&&Rt>Date.now()&&(Rt=St[D]=Date.now());let lr=Rt!==void 0&&Date.now()-Rt<Lc||((na=l.data.unconfirmedAttemptKeys)==null?void 0:na.includes(D))===!0,Lr=(Nr=Ri(fe))==null?void 0:Nr.status,dt=zc(Q,typeof Lr=="number"?Lr:void 0);dt&&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:dt.service,response:dt.response,captured:(Q==null?void 0:Q.captured)===!0,flow_type:(b==null?void 0:b())??"CHATBOT_DRAWER",job:l.job,...(U==null?void 0:U.outcome)==="duplicate"&&{outcome:lr?"duplicate_after_own_attempt":"duplicate"},...dt.outcome&&{outcome:dt.outcome}}});let cr=Dn(Q)||(Q==null?void 0:Q.success)===!0;if((cr||Mn(Q))&&(p.submitAccepted=!0),cr&&((h=l.data.submitCooldown)==null?void 0:h.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(y=>i.error("Failed to persist submit cooldown reset",y))),Dn(Q)){let{redirect_url:y,message:E,button_text:P}=Q.integration_response.data,H={redirect_url:y,message:E,button_text:P};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:H},await g().catch(K=>i.error("Failed to persist submit redirect",K)),await M(H),t(n.nextId))}let vn=Mn(Q);if(vn)return await e.sendMessage({type:"system",variant:"success",text:vn.message??_("submission_pending")}),t(n.nextId);if((Q==null?void 0:Q.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:_("submission_completed")}),t(n.nextId);let dr=Bc(U),ur=dr!==void 0&&((m=o==null?void 0:o[dr])==null?void 0:m.type)==="file"?dr:void 0,Pt=ur===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===ur);if(!Pt&&!sr&&!Aa(U)&&(l.data.submitCooldown=Hp(D,F,U)),(U==null?void 0:U.outcome)!=="duplicate"&&!or&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[D]:Date.now()},(w=l.data.unconfirmedAttemptKeys)!=null&&w.includes(D)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==D))),(U==null?void 0:U.verdict)==="not_submitted"||(U==null?void 0:U.outcome)==="duplicate"||(U==null?void 0:U.outcome)==="closed"||or||Tc(Q,ar)?(G||(l.data.startedWriteNodeIds=(T=l.data.startedWriteNodeIds)==null?void 0:T.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await g().catch(y=>i.error("Failed to persist application write barrier release",y))):await g().catch(y=>i.error("Failed to persist submit cooldown",y)),U){if(i.error(fe??U.message),Pt&&ur!==void 0)return e.setSubmission(ur,null),await f({fileQuestionNodeId:Pt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:_("submission_unreadable_document")}),t(Pt.id);if(U.outcome==="duplicate")return await e.sendMessage({type:"system",variant:sr?"success":"info",semantic:"submission-duplicate",text:_(lr?"submission_duplicate_earlier_attempt":"submission_duplicate")}),sr?(delete l.data.submitCooldown,r()):A(!1);if(U.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:_("submission_closed")}),sr?(delete l.data.submitCooldown,r()):A(!1);let y=Fc(U);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?_("submission_provider_maintenance_later"):_("submission_provider_maintenance",{time:$a(y.until,void 0)})}),A(!1)):U.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:_(Vc(U)?"submission_unknown_do_not_resubmit":"submission_unknown")}),A(!1)):Aa(U)?Rc(Q)?(await e.sendMessage({type:"text",author:"bot",text:U.message}),A(!1)):(j===0&&await e.sendMessage({type:"system",variant:"warning",text:_("captcha_failed")}),j++,A(j<=Fp)):Pc(U)?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),A(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())}return i.error(fe??Q),or?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),A(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())};await A(d===!0&&!z?!1:n.data.skipConfirmation)}var Yp=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Jp=(e,t)=>{if(!Yp.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Zp({chat:e,next:t,node:r,submissions:n,context:i,analytics:a,flow:o}){let s=ze(r.data.href,{submissions:n,context:i}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:ze(r.data.cta,{submissions:n,context:i}),...Jp(r.data.href,s)&&{onClick:()=>{a.log({event:"FLOW_REDIRECT",properties:{flow_build:o.build,flow_id:o.id,flow_session_id:l,flow_version:o.version,href:s,job:o.job}})}}}),t(r.nextId)}async function Xp({submissions:e,next:t,node:r,context:n}){t(Op(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Qp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function eh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function th({chat:e,next:t,node:r,submissions:n,context:i,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});let s=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars,multiline:r.data.format==="text"&&r.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Vr(s.value):r.data.format==="date"&&o!==void 0?qc(s.value,o):s.value}),t(r.nextId)}async function rh({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});let o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function nh({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});let o=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Vr(o.value):o.value}),t(r.nextId)}async function ih({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});let o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function ah({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ze(r.data.question,{submissions:n,context:i})});let o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function oh({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let i=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,line2Required:r.data.line2Required,placeholder:r.data.placeholder}});if(i===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let a=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function sh({node:e,chat:t,next:r,submissions:n,context:i,t:a}){await t.sendMessage({author:"bot",type:"text",text:ze(e.data.question,{submissions:n,context:i})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function lh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function ch({node:e,flow:t,submissions:r,chat:n,next:i,apiClient:a,analytics:o,signal:s,context:l}){let c=_c(t.nodes,r||{}),{answers:f,...d}=c;if(n.setSubmission(e.data.key,{type:"integration",value:d}),Mp(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:jn(t.nodes,r||{},t.data.flowSessionId)},s),c.status!=="skipped"){let b=[c.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":c.hasHardConcerns?e.data.messages.hard:c.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let p of["hard","advisory"]){let g=f.filter(v=>!v.matched&&v.severity===p);g.length&&b.push((p==="hard"?"Role requirements":"Other things to consider")+`
|
|
35
|
-
`+
|
|
36
|
-
`))}await n.sendMessage({type:"text",author:"bot",text:
|
|
33
|
+
}`};class Ls extends bu{}const fp=({_internal_domManager:e=Qf(),theme:t,terms:r,feedback:n,jobAlerts:a})=>hu(({apiClient:i,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let u=!1,g=0;Jf(f,c);const p=Zf(Kf(i));let b=0;const v=new WeakMap,x=(I,k)=>{const $=++b,C=performance.now();return k.catch(T=>{throw typeof T=="object"&&T!==null&&v.set(T,{endpoint:I,attempt:$,elapsed_ms:Math.round(performance.now()-C)}),T})},S=(I,k)=>{const $=Is(I);$===404||$===410||er("fatal","application_unavailable",{phase:"flow",stage:k,error:Aa(I),http_status:$,...k==="flow_fetch"&&typeof I=="object"&&I!==null&&v.get(I)})},_=c&&f?Nu({environment:f,publishableKey:c,logger:s}):void 0,j=I=>I===g,O=()=>{if(typeof window>"u")return;g++,Ne.flushStateData().catch(()=>{}),V.cancelCurrentFlow(),ae.isBotTyping$.value=!1;const I=e.getChatbotElement();I&&(Tt(null,I),I.remove()),u=!1,s.info("Chatbot plugin destroyed")},M=()=>{if(typeof window>"u")return;const I=g,k=[Oe("style",{id:"inploi-chatbot-styles"},Xf),Oe("style",{id:"inploi-chatbot-theme"},dp(t))],$=e.getOrCreateChatbotElement();ae.themeMode$.value=t.mode;const C=Fe(!1);if(Tt(Oe(le,{},[k,Oe(Hf,{env:f,rpcClient:o,apiClient:p,logger:s,analytics:l,talentBankClient:_,params:{theme:t,terms:r,feedback:n},feedbackReady:C})]),$),n){const T=E=>{var z,U;if(!j(I))return;const L=(z=e.getChatbotElement())==null?void 0:z.querySelector("dialog");L&&pp({instance:E({rpcClient:o,apiClient:i,logger:s,analytics:l}),theme:t,terms:((U=n.params)==null?void 0:U.terms)??{},host:L}).then(()=>void(C.value=!0),W=>s.error("Error rendering feedback plugin",W))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:E})=>{T(E())}).catch(E=>{s.error("Error preparing feedback plugin",E)}):T(n.plugin)}u=!0},B=async(I,k)=>{if(!j(k))return;nu({context:Rn(I.jobContext,I.context||{}),schema:I.flow.context_schema,logger:s});const $=await V.prepareFlow({...I,jobAlerts:I.jobAlerts??a});j(k)&&V.commitFlow($)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(u)return;M(),s.info("Chatbot plugin prepared")}catch(I){s.error("Error preparing chatbot plugin",I)}},fetchFlowByJobId:async(I,k)=>{const $=(k==null?void 0:k.idType)==="inploi"?"internal":"external";return x("flow_by_job",o.request(Ju,{params:{id:I},searchParams:{id_type:$}})).catch(C=>{throw Mo({name:"ApiError",message:jt.string,status:410,data:jt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},C)?new Ls(C.message,C.status,C.data):C}).then(C=>({flow:C.flow,title:C.job.title,flowKeys:[C.job.id,...(k==null?void 0:k.flowKeys)??[]],job:Yu(C,{id:I,idType:$}),employer:C.company.name,...k,jobContext:C.context,context:{user:C.user,...k==null?void 0:k.context}}))},fetchFlowById:async(I,k)=>x("flow_by_id",o.request(Zu,{params:{id:I}})).then($=>{var C;return{flow:$.flow,title:"Chatbot",flowKeys:(k==null?void 0:k.flowKeys)??[],...k,analytics:{customProperties:{flow_id:$.flow.id,flow_version:$.flow.version,...(C=k==null?void 0:k.analytics)==null?void 0:C.customProperties}}}}),open:async I=>{if(typeof window>"u")return;const k=performance.now();try{V.cancelCurrentFlow(),V.viewState$.value="maximised",u||M()}catch(C){s.error("Error starting flow",C),er("boot_failed",Pr(C),{phase:"config",error:Aa(C),elapsed_ms:Math.round(performance.now()-k)});return}er("boot");const $=g;if(I instanceof Promise){V.current$.value={state:"loading"};const C=T=>E=>{j($)&&(s.error("Error loading flow",E),V.current$.value={state:E instanceof Ls?"closed":"error"},S(E,T))};I.then(T=>B(T,$).catch(C("create")),C("flow_fetch"))}else await B(I,$).catch(C=>{s.error("Error starting flow",C),S(C,"create")})},hasApplicationInProgress:async I=>{const k=await Ne.getStateData(I.flow,I.flowKeys,I.context??{});return k!==void 0&&ys({data:k,nodes:I.flow.nodes})},hasAnyApplicationInProgress:async()=>(await Ne.getAllStateData()).some(I=>ys({data:I,nodes:[]})),close:async()=>{typeof window>"u"||(V.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:O}});function pp({instance:e,terms:t,theme:r,host:n}){return e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=fp;const hp=Object.freeze(Object.defineProperty({__proto__:null,jobCountryCodes:su},Symbol.toStringTag,{value:"Module"}));var gp="https://maps.inploi.com",bp=(e,t)=>{const r=new URL(`/${e}`,gp);return r.search=new URLSearchParams({q:t.query,limit:"5",surface:t.surface,seed:t.seed}).toString(),t.country&&r.searchParams.set("country",t.country),r},Oa=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),mp=e=>{if(!Oa(e)||typeof e.label!="string"||!Oa(e.address)||e.country!==void 0&&typeof e.country!="string")return;const t={};for(const r of["line1","line2","line3","city","state","postcode","country"]){const n=e.address[r];if(n!==void 0&&typeof n!="string")return;n!==void 0&&(t[r]=n)}return{id:e.label,label:e.label,country:e.country,address:t}},vp=async(e,t,r)=>{const n=await fetch(e.href,{signal:r});if(!n.ok)return;const a=n.headers.get("X-Geo-Arm"),i=await n.json();if(a!=="inploi"&&a!=="mapbox"||!Oa(i)||!Array.isArray(i.results)||i.source!=="photon"&&i.source!=="mapbox"&&i.source!=="places"||typeof i.attribution!="string")return;const o=[];for(const s of i.results){const l=t(s);if(l===void 0)return;o.push(l)}return{results:o,arm:a,source:i.source}},wp=e=>{const t=bp("address",{...e,seed:e.session});return t.searchParams.set("session",e.session),e.lat!==void 0&&e.lng!==void 0&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&e.lat>=-90&&e.lat<=90&&e.lng>=-180&&e.lng<=180&&(t.searchParams.set("lat",String(e.lat)),t.searchParams.set("lng",String(e.lng))),vp(t,mp,e.signal)};const yp=Object.freeze(Object.defineProperty({__proto__:null,lookupAddress:wp},Symbol.toStringTag,{value:"Module"}));var _p="9.14.1",Os=`https://sdk.inploi.com/@inploi/flows@${_p}/cdn/captcha/index.html`,xp=new URL(Os).origin,Fs=3e4,kp=5*6e4,Sp=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",Fa=new WeakMap,$p=e=>{let t=Fa.get(e);return t||(t=e.fetch("/flow/captcha").then(r=>{let n=r==null?void 0:r.site_key;return typeof n=="string"&&n!==""?n:void 0}).catch(r=>{throw Fa.delete(e),r}),Fa.set(e,t)),t},Cp=(e,t={})=>new Promise((r,n)=>{let{signal:a,container:i=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,c=()=>{},f=v=>{l||(l=!0,clearTimeout(p),a==null||a.removeEventListener("abort",g),c(),v())},u=v=>f(()=>n(new Error(v))),g=()=>u("Captcha aborted"),p,b=v=>{clearTimeout(p),p=setTimeout(()=>u("Captcha timed out"),v)};if(b(Fs),a==null?void 0:a.aborted)return g();a==null||a.addEventListener("abort",g),(async()=>{let v=await $p(e);if(v===void 0)return f(()=>r(void 0));if(l)return;let x=document.createElement("iframe");x.src=`${Os}?${new URLSearchParams({sitekey:v,origin:window.location.origin,...o&&{theme:o}}).toString()}`,x.title="Cloudflare security check",x.style.cssText=`display:block;border:0;width:${i?"100%":"300px"};height:0;color-scheme:normal`,i?i.appendChild(x):(x.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(x));let S=!1,_=j=>{if(!x.contentWindow||j.source!==x.contentWindow||j.origin!==xp||!Sp(j.data))return;let O=j.data;switch(O.type){case"token":return f(()=>r(O.token));case"resize":x.style.height=`${Math.max(0,Math.ceil(O.height))}px`;return;case"before-interactive":return S=!0,b(kp),s==null?void 0:s();case"after-interactive":return S=!1,b(Fs);case"error":!S&&!O.interactive&&u("Captcha failed");return;case"expired":return u("Captcha expired");case"timeout":return u("Captcha timed out")}};window.addEventListener("message",_),c=()=>{window.removeEventListener("message",_),x.remove()}})().catch(v=>f(()=>n(v)))}),Ns=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[a,...i]=e.compareKey.split(".");if(!a)return!1;let o=Si({context:t,key:a,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=ur(o.value,i);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=ur(o.value,i),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return Sr(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Sr(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Sr(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(c=>typeof c=="string")?Sr(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?Br(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},Sr=(e,{context:t,submissions:r})=>{let n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let a of n)if(Ns({condition:a,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let a of n)if(!Ns({condition:a,context:t,submissions:r,ifBlock:e}))return!1;return!0}},Ep=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Ap=(e,{context:t,submissions:r})=>e.replace(Ep,(n,a,i="")=>{let[o,...s]=a.trim().split("."),l=Si({key:o,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${Ht(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():i;case"phone":return Br(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=ur(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(f=>typeof f=="string"))return c.join(", ")}break}}return i});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ip(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Na(e,t,r=""){const n=Ip(e),a=e==null?void 0:e.length;if(!n||t!==void 0){const o=r&&`"${r}" `,s="",l=n?`length=${a}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Ps(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Tp(e,t){Na(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function Pa(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ra(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ye(e,t){return e<<32-t|e>>>t}const Dp=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",jp=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Mp(e){if(Na(e),Dp)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=jp[e[r]];return t}function Lp(e,t={}){const r=(a,i)=>e(i).update(a).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=a=>e(a),Object.assign(r,t),Object.freeze(r)}const Op=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Fp(e,t,r){return e&t^~e&r}function Np(e,t,r){return e&t^e&r^t&r}class Pp{constructor(t,r,n,a){ge(this,"blockLen");ge(this,"outputLen");ge(this,"padOffset");ge(this,"isLE");ge(this,"buffer");ge(this,"view");ge(this,"finished",!1);ge(this,"length",0);ge(this,"pos",0);ge(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=a,this.buffer=new Uint8Array(t),this.view=Ra(this.buffer)}update(t){Ps(this),Na(t);const{view:r,buffer:n,blockLen:a}=this,i=t.length;for(let o=0;o<i;){const s=Math.min(a-this.pos,i-o);if(s===a){const l=Ra(t);for(;a<=i-o;o+=a)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===a&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ps(this),Tp(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:a,isLE:i}=this;let{pos:o}=this;r[o++]=128,Pa(this.buffer.subarray(o)),this.padOffset>a-o&&(this.process(n,0),o=0);for(let u=o;u<a;u++)r[u]=0;n.setBigUint64(a-8,BigInt(this.length*8),i),this.process(n,0);const s=Ra(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<c;u++)s.setUint32(4*u,f[u],i)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:a,finished:i,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=i,t.length=a,t.pos=s,a%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const xt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Rp=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]),kt=new Uint32Array(64);class Vp extends Pp{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:a,E:i,F:o,G:s,H:l}=this;return[t,r,n,a,i,o,s,l]}set(t,r,n,a,i,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=a|0,this.E=i|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,r){for(let u=0;u<16;u++,r+=4)kt[u]=t.getUint32(r,!1);for(let u=16;u<64;u++){const g=kt[u-15],p=kt[u-2],b=Ye(g,7)^Ye(g,18)^g>>>3,v=Ye(p,17)^Ye(p,19)^p>>>10;kt[u]=v+kt[u-7]+b+kt[u-16]|0}let{A:n,B:a,C:i,D:o,E:s,F:l,G:c,H:f}=this;for(let u=0;u<64;u++){const g=Ye(s,6)^Ye(s,11)^Ye(s,25),p=f+g+Fp(s,l,c)+Rp[u]+kt[u]|0,v=(Ye(n,2)^Ye(n,13)^Ye(n,22))+Np(n,a,i)|0;f=c,c=l,l=s,s=o+p|0,o=i,i=a,a=n,n=p+v|0}n=n+this.A|0,a=a+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,a,i,o,s,l,c,f)}roundClean(){Pa(kt)}destroy(){this.set(0,0,0,0,0,0,0,0),Pa(this.buffer)}}class Bp extends Vp{constructor(){super(32);ge(this,"A",xt[0]|0);ge(this,"B",xt[1]|0);ge(this,"C",xt[2]|0);ge(this,"D",xt[3]|0);ge(this,"E",xt[4]|0);ge(this,"F",xt[5]|0);ge(this,"G",xt[6]|0);ge(this,"H",xt[7]|0)}}const zp=Lp(()=>new Bp,Op(1));var Rs=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Va=e=>{var t,r;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(r=[...e.data.messages].reverse().find(n=>n.groupId&&e.nodes.some(a=>a.id===n.groupId&&a.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},Ba=e=>Array.isArray(e)?e.map(Ba):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,Ba(r)])):typeof e=="function"?void 0:e,Up=e=>Mp(zp(new TextEncoder().encode(JSON.stringify(Ba(e)))));function qp(e,t,r,n){var a;if(n!=null&&n.aborted)return;let i=Up(r),o=(a=e.data).preApplyFingerprints??(a.preApplyFingerprints=[]);if(o.includes(i))return;o.push(i);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let c=o.indexOf(i);c!==-1&&o.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Vs=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Ue=(e,t)=>Ap(e,Vs(t)),Hp=(e,t)=>Sr(e,Vs(t)),Bs=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;let n=e.nextId?t.find(a=>a.id===e.nextId):void 0;if(n)return Bs({node:n,nodes:t,stopWhen:r})},Wp=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let a=t.find(o=>o.id===n.branchId);if(!a)return!1;let i=Bs({node:a,nodes:t,stopWhen:o=>o.id===e.id});return!(!i||i.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},Kp=3,Gp=({flow:e,analytics:t,logger:r,talentBankClient:n,context:a,apiClient:i,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:u,closedRoleBehaviour:g,settledOutcomes:p=g,dateEchoLocale:b,onFlowEnd:v,onInterpret:x,holdBefore:S,forceSubmitConfirmation:_,flowType:j,t:O})=>{var M;let B=new AbortController,I={submitAccepted:!1};(M=e.data).startedWriteNodeIds??(M.startedWriteNodeIds=e.nodes.flatMap(T=>{var L,z;if(T.type!=="integration-application-submit"||!e.data.nodeHistory.includes(T.id))return[];let E=T.data.key?(L=o())==null?void 0:L[T.data.key]:void 0;return(E==null?void 0:E.type)==="integration"&&((z=Ei(E.value))==null?void 0:z.verdict)==="not_submitted"?[]:[T.id]}));let k={...t.service,log:T=>t.service.log({...T,customProperties:{...T.customProperties,...t.customProperties}})},$=(T,E)=>{if(E.aborted)return;let L=S==null?void 0:S(void 0);return L?L.then(()=>{if(!E.aborted)return v==null?void 0:v(T)}):v==null?void 0:v(T)},C=async(T,E)=>{let L=B.signal;if(L.aborted)return;let z=S==null?void 0:S(T);if(z&&(await z,L.aborted))return;let U=o(),W=s(),se=(W==null?void 0:W.submitNodeId)===T.id?e.nodes.find(Q=>{var ee;return Q.id===W.fileQuestionNodeId&&Q.type==="question-file"&&((ee=U==null?void 0:U[Q.data.key])==null?void 0:ee.type)!=="file"}):void 0;if(se)return C(se,E);x==null||x(T,E);try{await Yp({flow:e,analytics:k,logger:r,talentBankClient:n,apiClient:i,context:a,node:T,submissions:U,applicationRecovery:W,setApplicationRecovery:async Q=>{if(!L.aborted)try{await l(Q)}catch(ee){r.error("Failed to persist application recovery",ee)}},forceSubmitConfirmation:_||(W==null?void 0:W.submitNodeId)===T.id,run:I,persistWriteBarrier:f,onSubmitNetworkError:u,settledOutcomes:p,dateEchoLocale:b,flowType:j,signal:L,t:O,chat:{sendMessage:async Q=>c.send({groupId:T.id,message:Q,signal:L}),userInput:async Q=>c.input({input:Q,signal:L}),setSubmission:(Q,ee)=>{L.aborted||c.setSubmission(Q,ee)},captcha:c.captcha},next:Q=>{if(L.aborted)return;let ee=(W==null?void 0:W.fileQuestionNodeId)===T.id?W.submitNodeId:Q,ie=ee?e.nodes.find(Y=>Y.id===ee):Wp({childNode:T,nodes:e.nodes});return ie?C(ie,T):$(T,L)},end:()=>{$(T,L)}})}catch(Q){if(Q instanceof ht)return;throw Q}};return{interpret:async T=>{let E=e.nodes.find(L=>L.id===T)??Rs(e.nodes);return C(E)},undo:T=>{var Q;if(delete e.data.reviewReplay,((Q=e.data.startedWriteNodeIds)==null?void 0:Q.length)||e.data.isFinished)return{removed:0};let E=Va(e),L=E?T.lastIndexOf(E):-1,z=e.nodes.find(ee=>ee.id===E);if(L===-1||!z)return{removed:0};let U=e.nodes.find(ee=>ee.id===T[T.length-1]);B.abort();let W=T.splice(L);e.data.messages=e.data.messages.filter(ee=>!ee.groupId||!W.includes(ee.groupId)),e.data.currentInput=null;let se=o();for(let ee of W.slice(1)){let ie=e.nodes.find(Y=>Y.id===ee);if(!(!ie||!se||ie.id===E)&&("key"in ie.data&&ie.data.key&&delete se[ie.data.key],"keys"in ie.data))for(let Y of Object.values(ie.data.keys))typeof Y=="string"&&delete se[Y]}return B=new AbortController,C(z,U),{removed:W.length}},abort:()=>{B.abort()}}};async function Yp(e){let t=e.node;switch(t.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:t.data.title}),e.next(t.nextId);case"pre-apply-result":return yh({...e,node:t});case"text":return uh({...e,node:t});case"image":return dh({...e,node:t});case"question-text":return fh({...e,node:t});case"question-enum":return gh({...e,node:t});case"question-number":return ph({...e,node:t});case"question-phone":return hh({...e,node:t});case"question-boolean":return bh({...e,node:t});case"question-file":return vh({...e,node:t});case"question-address":return mh({...e,node:t});case"end-flow":return wh({...e,node:t});case"if-block":return ch({...e,node:t});case"jump":return Xp({...e,node:t});case"link":return lh({...e,node:t});case"integration-application-submit":return ih({...e,node:t});case"add-submission":return Qp({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Zp({...e,node:t});case"feedback":return Jp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Jp({next:e,node:t}){e(t.nextId)}async function Zp({next:e,node:t,talentBankClient:r,submissions:n,flow:a,logger:i,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let c=t.data.scope==="job"?(l=a.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||c!=null)try{s=await r.checkDuplicate({email:Ac({key:t.data.email,submissions:n}).toString(),jobId:c,scope:t.data.scope})}catch(f){i.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Xp({next:e,node:t}){e(t.data.targetId)}async function Qp({next:e,node:t,logger:r,submissions:n,context:a}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Ue(t.data.value,{submissions:n,context:a})},e(t.nextId)}var eh=5e3,th=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,rh=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?Ii:e.throttles?Pn:Ai)),nh=(e,t,r)=>{let{waitMs:n,throttles:a,maintenance:i}=Gc(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...a!==void 0&&{throttles:a},...i&&{maintenance:i}}},ah=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],za=e=>e instanceof Error&&ah.includes(e.name)?e:void 0,zs=e=>{let t=za(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function ih({chat:e,next:t,end:r,node:n,logger:a,apiClient:i,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:u,flowType:g,run:p,persistWriteBarrier:b,signal:v,onSubmitNetworkError:x,settledOutcomes:S,t:_}){var k,$;let j=async({redirect_url:C,message:T,button_text:E})=>{let{anonymous_id:L,session_id:z}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:T??_("submission_redirect_message")});try{let U=new URL(C);L&&!U.searchParams.has("anonymous_id")&&U.searchParams.set("anonymous_id",L),await e.sendMessage({type:"link",href:U.toString(),text:E??_("complete_submission"),onClick:()=>{if(!z){a.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:U.toString(),job:l.job}})}})}catch(U){a.error(`Invalid redirect URL: ${C}`,U),e.sendMessage({type:"system",variant:"error",text:_("redirect_url_error")})}};if((k=l.data.startedWriteNodeIds)!=null&&k.includes(n.id)&&(c==null?void 0:c.submitNodeId)!==n.id){let C=($=l.data.submitRedirects)==null?void 0:$[n.id];return C?(await j(C),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:_("submission_unknown")}),r())}let O=th(n.id,l.job),M=0,B=p.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,I=async C=>{var _n,xn,si,Nr,h,m,w,D,A;let T=((_n=l.data.submitCooldown)==null?void 0:_n.key)===O?l.data.submitCooldown:void 0;T&&(T.until=rh(T));let E=T==null?void 0:T.until;(l.data.reviewRequiresSend===!0&&!B||C!==!0||E!==void 0&&E>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:n.data.submitLabel,...E!==void 0&&{availableAt:E}}}),B=!1;let L;if(n.data.captcha){let y=e.captcha,N=!0;try{L=await Cp(i,{signal:v,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:_("captcha_check")}).catch(()=>{}).then(()=>{N&&(y==null||y.reveal(!0))})}})}catch(K){if(a.error("Captcha check failed",K),v.aborted)return}finally{N=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:_("submitting")});let{anonymous_id:z,session_id:U}=s.getSessionInfo();if(v.aborted)return;let W=((xn=l.data.startedWriteNodeIds)==null?void 0:xn.includes(n.id))===!0;if((c==null?void 0:c.submitNodeId)===n.id&&await f(void 0),W||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await b().catch(y=>a.error("Failed to persist application write barrier",y)),v.aborted)return;let se,Q=setTimeout(()=>{se=e.sendMessage({type:"loading",semantic:"submission-still-working",text:_("submission_still_working")}).catch(y=>a.error("Failed to send submission progress message",y))},eh),ee=Cc(),ie,Y=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({...ee!==void 0&&{browser_timezone:ee},log_submit:!1,integration_id:n.data.integrationId,anonymous_id:z,session_id:U,job:l.job,flow_build:l.build,...L!==void 0&&{captcha_token:L},submissions:$c(l.nodes,Ec(o||{},n.data.submitKeys)),pre_apply:Mn(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{ie=y;let N=zs(y);return(N==null?void 0:N.data)!==void 0?N.data:y});if(clearTimeout(Q),await se,v.aborted)return;if(ie!==void 0&&!za(ie)&&x)return await x(ie,v),I(!0);l.data.stagingDestination=Uc(Y),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:Y});let Dr=(si=zs(ie))==null?void 0:si.status,jr=typeof Dr=="number"?Dr:void 0,q=Ei(Y,jr),Mr=q===void 0&&jr===429,Pt=S==="terminal"&&((q==null?void 0:q.outcome)==="closed"||(q==null?void 0:q.outcome)==="duplicate"),Rt=l.data.failedAttemptAt,ft=Rt==null?void 0:Rt[O];Rt&&ft!==void 0&&ft>Date.now()&&(ft=Rt[O]=Date.now());let Lr=ft!==void 0&&Date.now()-ft<Wc||((Nr=l.data.unconfirmedAttemptKeys)==null?void 0:Nr.includes(O))===!0,lr=(h=za(ie))==null?void 0:h.status,pt=Qc(Y,typeof lr=="number"?lr:void 0);pt&&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:pt.service,response:pt.response,captured:(Y==null?void 0:Y.captured)===!0,flow_type:(g==null?void 0:g())??"CHATBOT_DRAWER",job:l.job,...(q==null?void 0:q.outcome)==="duplicate"&&{outcome:Lr?"duplicate_after_own_attempt":"duplicate"},...pt.outcome&&{outcome:pt.outcome}}});let yn=Fn(Y)||(Y==null?void 0:Y.success)===!0;if((yn||Nn(Y))&&(p.submitAccepted=!0),yn&&((m=l.data.submitCooldown)==null?void 0:m.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await b().catch(y=>a.error("Failed to persist submit cooldown reset",y))),Fn(Y)){let{redirect_url:y,message:N,button_text:K}=Y.integration_response.data,G={redirect_url:y,message:N,button_text:K};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:G},await b().catch(ye=>a.error("Failed to persist submit redirect",ye)),await j(G),t(n.nextId))}let Or=Nn(Y);if(Or)return await e.sendMessage({type:"system",variant:"success",text:Or.message??_("submission_pending")}),t(n.nextId);if((Y==null?void 0:Y.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:_("submission_completed")}),t(n.nextId);let Fr=Xc(q),Vt=Fr!==void 0&&((w=o==null?void 0:o[Fr])==null?void 0:w.type)==="file"?Fr:void 0,Bt=Vt===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===Vt);if(!Bt&&!Pt&&!ji(q)&&(l.data.submitCooldown=nh(O,T,q)),(q==null?void 0:q.outcome)!=="duplicate"&&!Mr&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[O]:Date.now()},(D=l.data.unconfirmedAttemptKeys)!=null&&D.includes(O)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==O))),(q==null?void 0:q.verdict)==="not_submitted"||(q==null?void 0:q.outcome)==="duplicate"||(q==null?void 0:q.outcome)==="closed"||Mr||Bc(Y,jr)?(W||(l.data.startedWriteNodeIds=(A=l.data.startedWriteNodeIds)==null?void 0:A.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await b().catch(y=>a.error("Failed to persist application write barrier release",y))):await b().catch(y=>a.error("Failed to persist submit cooldown",y)),q){if(a.error(ie??q.message),Bt&&Vt!==void 0)return e.setSubmission(Vt,null),await f({fileQuestionNodeId:Bt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:_("submission_unreadable_document")}),t(Bt.id);if(q.outcome==="duplicate")return await e.sendMessage({type:"system",variant:Pt?"success":"info",semantic:"submission-duplicate",text:_(Lr?"submission_duplicate_earlier_attempt":"submission_duplicate")}),Pt?(delete l.data.submitCooldown,r()):I(!1);if(q.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:_("submission_closed")}),Pt?(delete l.data.submitCooldown,r()):I(!1);let y=Kc(q);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?_("submission_provider_maintenance_later"):_("submission_provider_maintenance",{time:Di(y.until,void 0)})}),I(!1)):q.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:_(Zc(q)?"submission_unknown_do_not_resubmit":"submission_unknown")}),I(!1)):ji(q)?Yc(Y)?(await e.sendMessage({type:"text",author:"bot",text:q.message}),I(!1)):(M===0&&await e.sendMessage({type:"system",variant:"warning",text:_("captcha_failed")}),M++,I(M<=Kp)):Jc(q)?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),I(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())}return a.error(ie??Y),Mr?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),I(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),r())};await I(u===!0&&!B?!1:n.data.skipConfirmation)}var oh=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,sh=(e,t)=>{if(!oh.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function lh({chat:e,next:t,node:r,submissions:n,context:a,analytics:i,flow:o}){let s=Ue(r.data.href,{submissions:n,context:a}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:Ue(r.data.cta,{submissions:n,context:a}),...sh(r.data.href,s)&&{onClick:()=>{i.log({event:"FLOW_REDIRECT",properties:{flow_build:o.build,flow_id:o.id,flow_session_id:l,flow_version:o.version,href:s,job:o.job}})}}}),t(r.nextId)}async function ch({submissions:e,next:t,node:r,context:n}){t(Hp(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function uh({chat:e,next:t,node:r,submissions:n,context:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.text,{submissions:n,context:a})}),t(r.nextId)}async function dh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function fh({chat:e,next:t,node:r,submissions:n,context:a,t:i,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let s=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars,multiline:r.data.format==="text"&&r.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Br(s.value):r.data.format==="date"&&o!==void 0?tu(s.value,o):s.value}),t(r.nextId)}async function ph({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function hh({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Br(o.value):o.value}),t(r.nextId)}async function gh({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function bh({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function mh({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let a=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,line2Required:r.data.line2Required,placeholder:r.data.placeholder}});if(a===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let i=Object.values(a.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function vh({node:e,chat:t,next:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Ue(e.data.question,{submissions:n,context:a})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function wh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function yh({node:e,flow:t,submissions:r,chat:n,next:a,apiClient:i,analytics:o,signal:s,context:l}){let c=Sc(t.nodes,r||{}),{answers:f,...u}=c;if(n.setSubmission(e.data.key,{type:"integration",value:u}),qp(t,i,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Mn(t.nodes,r||{},t.data.flowSessionId)},s),c.status!=="skipped"){let g=[c.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":c.hasHardConcerns?e.data.messages.hard:c.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let p of["hard","advisory"]){let b=f.filter(v=>!v.matched&&v.severity===p);b.length&&g.push((p==="hard"?"Role requirements":"Other things to consider")+`
|
|
34
|
+
`+b.map(v=>`• ${v.message}`).join(`
|
|
35
|
+
`))}await n.sendMessage({type:"text",author:"bot",text:g.join(`
|
|
37
36
|
|
|
38
|
-
`)}),c.hasHardConcerns&&e.data.alternativeLink&&await n.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await n.userInput({type:"submit",key:void 0,config:{label:ze(e.data.continueLabel,{submissions:r,context:l})}})}return i(e.nextId)}const Ps=(e,t,r)=>{var n;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(n=t.analytics)==null?void 0:n.customProperties})},Pi="resume-prompt",dh=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:Pi,signal:r});const n=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:r});return R.removeMessagesSentByNodeIds([Pi]),(n==null?void 0:n.value)!==!1},Ft=({class:e,...t})=>{const{t:r}=oe();return u("button",{class:nt("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[u("title",{children:r("send")}),u("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),u("path",{d:"M8 4V13"})]})})};var at;function Vi(e){return{lang:(e==null?void 0:e.lang)??(at==null?void 0:at.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(at==null?void 0:at.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(at==null?void 0:at.abortPipeEarly)}}var Bi;function uh(e){return Bi==null?void 0:Bi.get(e)}var zi;function fh(e){return zi==null?void 0:zi.get(e)}var Ui;function ph(e,t){var r;return(r=Ui==null?void 0:Ui.get(e))==null?void 0:r.get(t)}function Xt(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function ye(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Xt(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??ph(e.reference,l.lang)??(c?fh(l.lang):null)??n.message??uh(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Ye(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Vi())}}}function hh(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function bh(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function gh(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Vs=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},mh=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Bs(e,t){return{kind:"validation",type:"check",reference:Bs,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&ye(this,"input",r,n),r}}}function zs(e){return{kind:"validation",type:"email",reference:zs,expects:null,async:!1,requirement:mh,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&ye(this,"email",t,r),t}}}function Ar(e,t){return{kind:"validation",type:"max_length",reference:Ar,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ye(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Us(e,t){return{kind:"validation",type:"max_value",reference:Us,async:!1,expects:`<=${e instanceof Date?e.toJSON():Xt(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&ye(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Xt(r.value)}),r}}}function Qt(e,t){return{kind:"validation",type:"min_length",reference:Qt,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ye(this,"length",r,n,{received:`${r.value.length}`}),r}}}function qs(e,t){return{kind:"validation",type:"min_value",reference:qs,async:!1,expects:`>=${e instanceof Date?e.toJSON():Xt(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&ye(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Xt(r.value)}),r}}}function qi(e,t){return{kind:"validation",type:"regex",reference:qi,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&ye(this,"format",r,n),r}}}function Wi(e){return{kind:"transformation",type:"transform",reference:Wi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Ws(e){return{kind:"validation",type:"url",reference:Ws,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&ye(this,"URL",t,r),t}}}function vh(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Hs(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ks(e,t){return{kind:"schema",type:"array",reference:Ks,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ye(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:i,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(a=r.issues)==null||a.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else ye(this,"type",r,n);return r}}}function Gs(e){return{kind:"schema",type:"boolean",reference:Gs,expects:"boolean",async:!1,message:e,get"~standard"(){return Ye(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ye(this,"type",t,r),t}}}function Ys(e){return{kind:"schema",type:"number",reference:Ys,expects:"number",async:!1,message:e,get"~standard"(){return Ye(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ye(this,"type",t,r),t}}}function ot(e,t){return{kind:"schema",type:"object",reference:ot,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ye(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:Hs(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const d of c.issues)d.path?d.path.unshift(f):d.path=[f],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=vh(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(ye(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else ye(this,"type",r,n);return r}}}function er(e,t){return{kind:"schema",type:"optional",reference:er,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ye(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Hs(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Js(e,t){return{kind:"schema",type:"picklist",reference:Js,expects:bh(e.map(Xt),"|"),async:!1,options:e,message:t,get"~standard"(){return Ye(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ye(this,"type",r,n),r}}}function Zs(e,t,r){return{kind:"schema",type:"record",reference:Zs,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Ye(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(hh(a,l)){const c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const b={type:"object",origin:"key",input:a,key:l,value:c};for(const p of f.issues)p.path=[b],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}const d=this.value["~run"]({value:c},i);if(d.issues){const b={type:"object",origin:"value",input:a,key:l,value:c};for(const p of d.issues)p.path?p.path.unshift(b):p.path=[b],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else ye(this,"type",n,i);return n}}}function De(e){return{kind:"schema",type:"string",reference:De,expects:"string",async:!1,message:e,get"~standard"(){return Ye(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ye(this,"type",t,r),t}}}function Xs(e,t,r){const n=e["~run"]({value:t},Vi(r));if(n.issues)throw new Vs(n.issues);return n.value}function wh(e,t){const r={};for(const n in e.entries)r[n]=!t||t.includes(n)?er(e.entries[n]):e.entries[n];return{...e,entries:r,get"~standard"(){return Ye(this)}}}function xt(...e){return{...e[0],pipe:e,get"~standard"(){return Ye(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}async function yh(e,t,r){const n=await e["~run"]({value:t},Vi(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const tr=({error:e})=>!e||!e.message?null:u("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[u("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),u("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),u("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),u("p",{class:"break-words pr-1 text-sm",children:e.message})]}),st=({class:e,...t})=>{const{t:r}=oe();return u("button",{type:"button",class:nt("fr touch-hitbox text-neutral-11 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[u("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[u("title",{children:r("skip")}),u("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),u("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Hi={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},_h=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Hi).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const rr=Mt("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),xh="https://api.mapbox.com/search/searchbox/v1/suggest",kh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Sh=e=>atob(e).split("").reverse().join(""),lt=ot({name:De()}),Ch=ot({suggestions:Ks(ot({feature_type:er(De()),full_address:er(De()),place_formatted:er(De()),name:er(De()),mapbox_id:De(),context:wh(ot({address:lt,street:lt,neighborhood:lt,locality:lt,district:lt,place:lt,region:lt,postcode:lt,country:lt}))}))}),Eh=e=>(jt(()=>{e&&Ua(e)},[e]),bt(()=>{var r;const t=(r=R.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,i)=>{var c;const a=e&&Ua(e),o=(c=R.current$.peek().flow)==null?void 0:c.locationOrigin,s=o&&o.lat!==void 0&&o.lng!==void 0&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180;return{...await lf({query:n,country:a,session:t,surface:"chatbot",...s?{lat:o.lat,lng:o.lng}:{},signal:i},async()=>{const f=new URL(xh);return f.searchParams.set("q",n),f.searchParams.set("session_token",t),f.searchParams.set("limit","5"),s&&f.searchParams.set("proximity",`${o.lng},${o.lat}`),f.searchParams.set("access_token",Sh(kh)),(await Ld(async p=>{const g=new URL(f);p&&g.searchParams.set("country",p);const v=await fetch(g.href,{signal:i});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return Xs(Ch,await v.json()).suggestions},a,i)).map(p=>{var g,v,x,C,_,M,D,j,z;return{country:a,label:p.full_address??([p.name,p.place_formatted].filter(Boolean).join(", ")||p.mapbox_id),id:p.mapbox_id,address:{line1:((g=p.context.address)==null?void 0:g.name)??((v=p.context.street)==null?void 0:v.name),line2:void 0,line3:((x=p.context.neighborhood)==null?void 0:x.name)??((C=p.context.locality)==null?void 0:C.name),city:((_=p.context.place)==null?void 0:_.name)??((M=p.context.district)==null?void 0:M.name),state:(D=p.context.region)==null?void 0:D.name,postcode:((j=p.context.postcode)==null?void 0:j.name)??(p.feature_type==="postcode"?p.name:void 0),country:(z=p.context.country)==null?void 0:z.name}}})}),country:a}}}:{enabled:!1}},[e])),Qs=e=>{const{t}=oe();return u("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M10 3L5 8L10 13"})}),u("span",{children:t("back")})]})},$h=({input:e,onSubmitSuccess:t,logger:r,analytics:n,rpcClient:i})=>{const{t:a}=oe(),[o,s]=Be(),{enabled:l,getPredictions:c}=Eh(i),[f,d]=Be(l?"query":"manual"),[b,p]=Be(""),[g,v]=Be(),x=be(),C=()=>{var S;(S=x.current)==null||S.controller.abort(),x.current=void 0};jt(()=>C,[]);const _=be(),M=be(),D=be(!1),j=S=>{const k=S!==null?_.current:void 0,$=(k==null?void 0:k.lookup)??M.current;if($&&!D.current){D.current=!0;const F=q=>{const B=e.config.keys[q];return S&&B?S.value[B]:void 0},I=F("country")??(k==null?void 0:k.suggestion.address.country)??(k==null?void 0:k.suggestion.country),V=S&&is({postcode:F("postcode")??(k!=null&&k.edited||o==null?void 0:o.postcode),label:k!=null&&k.edited||k==null?void 0:k.suggestion.label,state:F("state")??(k!=null&&k.edited||o==null?void 0:o.state),country:I});cf({kind:"address",surface:"chatbot",...$,picked:!!k,...k?{edited:k.edited}:{},region:V??(I!=null&&I.trim()?"other":null)})}t(S)},z=S=>{var $;if(it(l,"Query state should not be enabled"),S=S.trim(),S===(($=x.current)==null?void 0:$.query)||S===(g==null?void 0:g.query)&&g.status==="done")return;if(C(),p(S),S===""){v(void 0);return}const k=x.current={query:S,controller:new AbortController};v({query:S,status:"pending"}),c(S,k.controller.signal).then(F=>{x.current===k&&(x.current=void 0,M.current={arm:F.arm,source:F.source},v({query:S,status:"done",items:F.results,...M.current,country:F.country}))},F=>{x.current===k&&(x.current=void 0,M.current={arm:"direct",source:"direct"},r.error("Failed to get address details",F instanceof Vs?"Unexpected response":F),v({query:S,status:"failed",error:a("address_error")}))})},A=(S,k)=>{_.current&&(o==null?void 0:o[S])!==k&&(_.current.edited=!0),s($=>({...$,[S]:k}))};switch(f){case"query":return it(l,"Query state should not be enabled"),u(Ah,{input:e,onSkip:()=>j(null),onAddressSelect:(S,k)=>{var F;if(S===""){x.current&&(C(),v(void 0)),d("manual");return}if((g==null?void 0:g.status)!=="done")return;const $=g.items.find(I=>I.id===S);$&&(g.arm!=="inploi"&&af({query:k,country:g.country,pickedLabel:$.label,pickedPostcode:$.address.postcode,pickedCountry:$.address.country,pickedState:$.address.state,log:I=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:I})}),((F=_.current)==null?void 0:F.suggestion.id)!==S?(s($.address),_.current={suggestion:$,lookup:{arm:g.arm,source:g.source},edited:!1}):_.current.lookup={arm:g.arm,source:g.source},d("details"))},onAddressSearch:z,lookup:g,query:b});case"details":return it(o!==void 0),u(el,{input:e,logger:r,onSubmitSuccess:j,addressFields:o,onFieldChange:A,actions:u(Qs,{onClick:()=>{d("query")}})});case"manual":return u(el,{logger:r,input:e,onSubmitSuccess:j,addressFields:o??{},onFieldChange:A,actions:l?u(Qs,{onClick:()=>{d("query")}}):e.config.optional?u(st,{onClick:()=>j(null)}):void 0})}},Ah=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:i,onAddressSearch:a})=>{const{t:o}=oe(),s=be(null);return je(()=>{s.current&&(s.current.focus(),s.current.select())},[]),u(ae,{children:[u("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&a(f)},class:"flex gap-2 p-2.5",children:[u("div",{class:"group relative flex-1",children:[u("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:i,class:rr({optional:!!e.config.optional,className:"w-full rounded-full"})}),u("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[u("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[u("circle",{cx:"7",cy:"7",r:"4"}),u("path",{d:"M10 10L13 13"})]})}),u("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&u(st,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?u(tr,{error:{message:r.error}}):null,u("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?u(ae,{children:[u(ln,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),u("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var c;n(l.id,((c=s.current)==null?void 0:c.value)??i??"")},children:[u("span",{class:"flex-grow",children:l.label}),u("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var l;n("",((l=s.current)==null?void 0:l.value)??i??"")},children:u("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},Ki=["line1","line2","line3","city","state","postcode","country"],el=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:i})=>{const a=be(null);je(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(Hi),{t:s}=oe();return u("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const c=l.currentTarget,f=[...c.querySelectorAll("input")].filter(p=>p.value!==""&&!p.value.trim());for(const p of f){p.value="";const g=Ki.find(v=>i.config.keys[v]===p.name);g&&t(g,"")}if(f.length>0&&!c.checkValidity()){c.reportValidity();return}const d=new FormData(c),b=Object.fromEntries(d.entries());r({type:"address",value:b})},children:[u("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:Ki.map((l,c)=>{const f=`isdk_${l}`,d=i.config.keys[l];return d?u(ae,{children:[u("label",{for:f,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?u("div",{class:"relative",children:[u("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:d,id:f,defaultValue:e[l],onChange:b=>t(l,b.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?u("option",{value:e[l],children:e[l]}):u("option",{value:"",children:s("select_country")}),o.map(b=>u("option",{value:b,children:b},b))]}),u("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):u("input",{autoFocus:c===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:d,id:f,defaultValue:e[l],onInput:b=>t(l,b.currentTarget.value),required:l==="line2"?i.config.line2Required===!0:l!=="line3"}),c===Ki.length-1?u("hr",{class:"m-0 w-full border-b border-b-transparent"}):u("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),u("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,u(Ft,{class:"ml-auto"})]})]})},Gi=()=>{const e=be(null);return jt(()=>{var t;(t=e.current)==null||t.focus()},[]),e},tl=["true","false"],Ih=Js(tl),Th="answer",rl="flex items-center flex-wrap gap-2 p-2.5",nl="min-w-0 max-w-full flex-auto",il=ui(({label:e,...t},r)=>u("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:u("p",{class:"text-center text-base",children:e})})),jh=({input:e,onSubmitSuccess:t})=>{const r=Gi();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=Cf(n).value,a=Xs(Ih,i);t({type:"boolean",value:a==="true"})},children:[u("ul",{class:rl,children:tl.map((n,i)=>u("li",{class:nl,children:u(il,{ref:i===0?r:null,type:"submit",name:Th,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&u("div",{class:"px-2 pb-2",children:u(st,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},al=e=>e.reduce((t,r)=>t+r.sizeKb,0),Dh=Jt("file"),ol=3,un=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Mh=({file:e,class:t,...r})=>{const{t:n}=oe(),[i,a]=un(e.name);return u("div",{class:nt("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[u("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[u("span",{class:"sr-only",children:[n("file_name"),": "]}),u("span",{class:"block truncate",children:i}),u("span",{children:a})]}),u("p",{class:"text-accent-11",children:[u("span",{class:"sr-only",children:[n("file_size"),": "]}),zt(e.sizeKb)]})]})},sl=({class:e,...t})=>u("li",{class:nt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Oh=(e,t)=>{const[r,n]=un(e);return`${r.slice(0,t)}${n}`},ll=e=>({name:Oh(e.name,42),sizeKb:e.size/1e3}),Lh=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Fh=(e,t,r)=>{const n=un(t.name)[1].toLowerCase(),i=[...r.map(o=>o.toLowerCase()),...Lh],a=n===""?"none":i.includes(n)?n:"other";return`chatbot-file-refused:${e}:${a}`},Nh=({input:e,onSubmitSuccess:t,analytics:r})=>{var x;const n=(x=R.current$.value.flow)==null?void 0:x.data.submissions[e.key],[i,a]=Be(Dh(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=be(0),s=i.status==="ready"?i.files:[],l=i.status==="ready"||i.status==="pending"?i.files:[],c=i.status==="error"?i.error:void 0,f=l.length-ol,d=al(l),b=Gi(),{t:p}=oe(),g=C=>{if(!C.length)return{reason:"required",error:{type:"required",message:p("validation_file")}};if(!_a(C,e.config.extensions))return{reason:"type",file:C.find(_=>!_a([_],e.config.extensions)),error:{type:"validate",message:p("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(C.some(_=>_.sizeKb===0))return{reason:"empty",file:C.find(_=>_.sizeKb===0),error:{type:"validate",message:p("validation_file_empty")}};if(e.config.fileSizeLimitKib&&al(C)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:p("validation_file_size",{size:zt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&C.length>1)return{reason:"count",error:{type:"invalid",message:p("validation_file_max",{count:1})}}},v=(C,_)=>{var M,D;return r.log({event:"INTERACTION",properties:{tag:Fh(C,_,e.config.extensions)},customProperties:(D=(M=R.current$.peek().flow)==null?void 0:M.analytics)==null?void 0:D.customProperties})};return u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:C=>{if(C.preventDefault(),i.status==="pending"||i.status==="error")return;const _=g(s);_?a({status:"error",error:_.error}):t({type:"file",value:s})},children:[u("div",{class:"flex items-center gap-2",children:[u("label",{ref:b,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?u("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,ol).map(C=>{const[_,M]=un(C.name);return u(sl,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:_}),u("span",{children:M})]})}),f>0?u(sl,{children:p("file_more",{count:f})}):null]}):u("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[u("header",{class:"flex flex-col items-center gap-0",children:[u("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),u("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?u("p",{class:"text-neutral-11 text-xs",children:["(",p("file_max_size",{size:zt(e.config.fileSizeLimitKib)}),")"]}):null]}),u("aside",{class:"flex flex-col items-center gap-2",children:[u("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),u("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(C=>u("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:C.replace(".","")}))})]})]}),u("p",{role:"status",class:nt("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:i.status==="pending"?u(ae,{children:[u(ln,{"aria-hidden":"true",class:"h-4 w-4"}),p("file_preparing",{count:l.length})]}):i.status==="ready"?u(ae,{children:[s.length>1?p("file_total_size",{size:zt(d)}):zt(d),u("span",{class:"sr-only",children:[". ",p("file_ready",{count:s.length})]})]}):null}),u("input",{id:"dropzone-file","aria-label":p("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async C=>{it(C.target instanceof HTMLInputElement);const _=C.target.files?Array.from(C.target.files):[];C.target.value="";const[M]=_;if(!M)return;const D=++o.current,j=i.status==="ready",z=_.map(ll),A=g(z);if(A)return v(A.reason,A.file??M),a({status:"error",error:A.error});a({status:"pending",files:z});let S;try{const k=await Promise.all(_.map(async $=>{try{return{...ll($),data:await Wc($)}}catch(F){throw S??(S=$),F}}));o.current===D&&a({status:"ready",files:k})}catch{if(o.current!==D)return;v("unreadable",S??M),a({status:"error",error:{type:"invalid",message:p(j?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(Ft,{disabled:s.length===0}),e.config.optional&&u(st,{class:"relative",onClick:()=>t(null)})]})]}),u(tr,{error:c})]})};var Ir=e=>e.type==="checkbox",Nt=e=>e instanceof Date,Me=e=>e==null;const cl=e=>typeof e=="object";var le=e=>!Me(e)&&!Array.isArray(e)&&cl(e)&&!Nt(e),Rh=e=>le(e)&&e.target?Ir(e.target)?e.target.checked:e.target.value:e,Ph=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vh=(e,t)=>e.has(Ph(t)),Bh=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},Yi=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ue(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Yi&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(le(e)&&Bh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=ue(e[i]));return n}var fn=e=>/^\w*$/.test(e),ie=e=>e===void 0,Ji=e=>Array.isArray(e)?e.filter(Boolean):[],Zi=e=>Ji(e.replace(/["|']|\]/g,"").split(/\.|\[/)),O=(e,t,r)=>{if(!t||!le(e))return r;const n=(fn(t)?[t]:Zi(t)).reduce((i,a)=>Me(i)?i:i[a],e);return ie(n)||n===e?ie(e[t])?r:e[t]:n},Je=e=>typeof e=="boolean",Ue=e=>typeof e=="function",X=(e,t,r)=>{let n=-1;const i=fn(t)?[t]:Zi(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const c=e[s];l=le(c)||Array.isArray(c)?c:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const dl={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},qe={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ct={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zh=Se.createContext(null);zh.displayName="HookFormControlContext";var Uh=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==qe.all&&(t._proxyFormState[o]=!n||qe.all),r&&(r[o]=!0),e[o]}});return i};const qh=typeof window<"u"?Se.useLayoutEffect:Se.useEffect;var Ne=e=>typeof e=="string",Wh=(e,t,r,n,i)=>Ne(e)?(n&&t.watch.add(e),O(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),O(r,a))):(n&&(t.watchAll=!0),r),Xi=e=>Me(e)||!cl(e);function kt(e,t,r=new WeakSet){if(Xi(e)||Xi(t))return Object.is(e,t);if(Nt(e)&&Nt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const o=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const s=t[a];if(Nt(o)&&Nt(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!kt(o,s,r):!Object.is(o,s))return!1}}return!0}const Hh=Se.createContext(null);Hh.displayName="HookFormContext";var ul=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Tr=e=>Array.isArray(e)?e:[e],fl=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}};function pl(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t[n];if(i&&le(i)&&a){const o=pl(i,a);le(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var Ce=e=>le(e)&&!Object.keys(e).length,Qi=e=>e.type==="file",pn=e=>{if(!Yi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hl=e=>e.type==="select-multiple",ea=e=>e.type==="radio",Kh=e=>ea(e)||Ir(e),ta=e=>pn(e)&&e.isConnected;function Gh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=ie(e)?n++:e[t[n++]];return e}function Yh(e){for(const t in e)if(e.hasOwnProperty(t)&&!ie(e[t]))return!1;return!0}function ce(e,t){const r=Array.isArray(t)?t:fn(t)?[t]:Zi(t),n=r.length===1?e:Gh(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(le(n)&&Ce(n)||Array.isArray(n)&&Yh(n))&&ce(e,r.slice(0,-1)),e}var Jh=e=>{for(const t in e)if(Ue(e[t]))return!0;return!1};function bl(e){return Array.isArray(e)||le(e)&&!Jh(e)}function ra(e,t={}){for(const r in e){const n=e[r];bl(n)?(t[r]=Array.isArray(n)?[]:{},ra(n,t[r])):ie(n)||(t[r]=!0)}return t}function nr(e,t,r){r||(r=ra(t));for(const n in e){const i=e[n];if(bl(i))ie(t)||Xi(r[n])?r[n]=ra(i,Array.isArray(i)?[]:{}):nr(i,Me(t)?{}:t[n],r[n]);else{const a=t[n];r[n]=!kt(i,a)}}return r}const gl={value:!1,isValid:!1},ml={value:!0,isValid:!0};var vl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ie(e[0].attributes.value)?ie(e[0].value)||e[0].value===""?ml:{value:e[0].value,isValid:!0}:ml:gl}return gl},wl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ie(e)?e:t?e===""?NaN:e&&+e:r&&Ne(e)?new Date(e):n?n(e):e;const yl={isValid:!1,value:null};var _l=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,yl):yl;function xl(e){const t=e.ref;return Qi(t)?t.files:ea(t)?_l(e.refs).value:hl(t)?[...t.selectedOptions].map(({value:r})=>r):Ir(t)?vl(e.refs).value:wl(ie(t.value)?e.ref.value:t.value,e)}var Zh=(e,t,r,n)=>{const i={};for(const a of e){const o=O(t,a);o&&X(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},hn=e=>e instanceof RegExp,jr=e=>ie(e)?e:hn(e)?e.source:le(e)?hn(e.value)?e.value.source:e.value:e,kl=e=>({isOnSubmit:!e||e===qe.onSubmit,isOnBlur:e===qe.onBlur,isOnChange:e===qe.onChange,isOnAll:e===qe.all,isOnTouch:e===qe.onTouched});const Sl="AsyncFunction";var Xh=e=>!!e&&!!e.validate&&!!(Ue(e.validate)&&e.validate.constructor.name===Sl||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Sl)),Qh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Cl=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Dr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=O(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Dr(s,t))break}else if(le(s)&&Dr(s,t))break}}};function El(e,t,r){const n=O(e,r);if(n||fn(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=O(t,a),s=O(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var eb=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Ce(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||qe.all))},tb=(e,t,r)=>!e||!t||e===t||Tr(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),rb=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,nb=(e,t)=>!Ji(O(e,t)).length&&ce(e,t),ib=(e,t,r)=>{const n=Tr(O(e,r));return X(n,"root",t[r]),X(e,r,n),e};function $l(e,t,r="validate"){if(Ne(e)||Array.isArray(e)&&e.every(Ne)||Je(e)&&!e)return{type:r,message:Ne(e)?e:"",ref:t}}var ir=e=>le(e)&&!hn(e)?e:{value:e,message:""},Al=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:d,max:b,pattern:p,validate:g,name:v,valueAsNumber:x,mount:C}=e._f,_=O(r,v);if(!C||t.has(v))return{};const M=s?s[0]:o,D=I=>{i&&M.reportValidity&&(M.setCustomValidity(Je(I)?"":I||""),M.reportValidity())},j={},z=ea(o),A=Ir(o),S=z||A,k=(x||Qi(o))&&ie(o.value)&&ie(_)||pn(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,$=ul.bind(null,v,n,j),F=(I,V,q,B=ct.maxLength,G=ct.minLength)=>{const Y=I?V:q;j[v]={type:I?B:G,message:Y,ref:o,...$(I?B:G,Y)}};if(a?!Array.isArray(_)||!_.length:l&&(!S&&(k||Me(_))||Je(_)&&!_||A&&!vl(s).isValid||z&&!_l(s).isValid)){const{value:I,message:V}=Ne(l)?{value:!!l,message:l}:ir(l);if(I&&(j[v]={type:ct.required,message:V,ref:M,...$(ct.required,V)},!n))return D(V),j}if(!k&&(!Me(d)||!Me(b))){let I,V;const q=ir(b),B=ir(d);if(!Me(_)&&!isNaN(_)){const G=o.valueAsNumber||_&&+_;Me(q.value)||(I=G>q.value),Me(B.value)||(V=G<B.value)}else{const G=o.valueAsDate||new Date(_),Y=Q=>new Date(new Date().toDateString()+" "+Q),ve=o.type=="time",fe=o.type=="week";Ne(q.value)&&_&&(I=ve?Y(_)>Y(q.value):fe?_>q.value:G>new Date(q.value)),Ne(B.value)&&_&&(V=ve?Y(_)<Y(B.value):fe?_<B.value:G<new Date(B.value))}if((I||V)&&(F(!!I,q.message,B.message,ct.max,ct.min),!n))return D(j[v].message),j}if((c||f)&&!k&&(Ne(_)||a&&Array.isArray(_))){const I=ir(c),V=ir(f),q=!Me(I.value)&&_.length>+I.value,B=!Me(V.value)&&_.length<+V.value;if((q||B)&&(F(q,I.message,V.message),!n))return D(j[v].message),j}if(p&&!k&&Ne(_)){const{value:I,message:V}=ir(p);if(hn(I)&&!_.match(I)&&(j[v]={type:ct.pattern,message:V,ref:o,...$(ct.pattern,V)},!n))return D(V),j}if(g){if(Ue(g)){const I=await g(_,r),V=$l(I,M);if(V&&(j[v]={...V,...$(ct.validate,V.message)},!n))return D(V.message),j}else if(le(g)){let I={};for(const V in g){if(!Ce(I)&&!n)break;const q=$l(await g[V](_,r),M,V);q&&(I={...q,...$(V,q.message)},D(q.message),n&&(j[v]=I))}if(!Ce(I)&&(j[v]={ref:M,...I},!n))return j}}return D(!0),j};const ab={mode:qe.onSubmit,reValidateMode:qe.onChange,shouldFocusError:!0};function ob(e={}){let t={...ab,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ue(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=le(t.defaultValues)||le(t.values)?ue(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ue(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...f};let b={...d};const p={array:fl(),state:fl()},g=t.criteriaMode===qe.all,v=h=>m=>{clearTimeout(c),c=setTimeout(h,m)},x=async h=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||b.isValid||h)){let m;t.resolver?(m=Ce((await S()).errors),C()):m=await $(n,!0),m!==r.isValid&&p.state.next({isValid:m})}},C=(h,m)=>{!t.disabled&&(d.isValidating||d.validatingFields||b.isValidating||b.validatingFields)&&((h||Array.from(s.mount)).forEach(w=>{w&&(m?X(r.validatingFields,w,m):ce(r.validatingFields,w))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Ce(r.validatingFields)}))},_=(h,m=[],w,T,y=!0,E=!0)=>{if(T&&w&&!t.disabled){if(o.action=!0,E&&Array.isArray(O(n,h))){const P=w(O(n,h),T.argA,T.argB);y&&X(n,h,P)}if(E&&Array.isArray(O(r.errors,h))){const P=w(O(r.errors,h),T.argA,T.argB);y&&X(r.errors,h,P),nb(r.errors,h)}if((d.touchedFields||b.touchedFields)&&E&&Array.isArray(O(r.touchedFields,h))){const P=w(O(r.touchedFields,h),T.argA,T.argB);y&&X(r.touchedFields,h,P)}(d.dirtyFields||b.dirtyFields)&&(r.dirtyFields=nr(i,a)),p.state.next({name:h,isDirty:I(h,m),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else X(a,h,m)},M=(h,m)=>{X(r.errors,h,m),p.state.next({errors:r.errors})},D=h=>{r.errors=h,p.state.next({errors:r.errors,isValid:!1})},j=(h,m,w,T)=>{const y=O(n,h);if(y){const E=O(a,h,ie(w)?O(i,h):w);ie(E)||T&&T.defaultChecked||m?X(a,h,m?E:xl(y._f)):B(h,E),o.mount&&!o.action&&x()}},z=(h,m,w,T,y)=>{let E=!1,P=!1;const H={name:h};if(!t.disabled){if(!w||T){(d.isDirty||b.isDirty)&&(P=r.isDirty,r.isDirty=H.isDirty=I(),E=P!==H.isDirty);const K=kt(O(i,h),m);P=!!O(r.dirtyFields,h),K?ce(r.dirtyFields,h):X(r.dirtyFields,h,!0),H.dirtyFields=r.dirtyFields,E=E||(d.dirtyFields||b.dirtyFields)&&P!==!K}if(w){const K=O(r.touchedFields,h);K||(X(r.touchedFields,h,w),H.touchedFields=r.touchedFields,E=E||(d.touchedFields||b.touchedFields)&&K!==w)}E&&y&&p.state.next(H)}return E?H:{}},A=(h,m,w,T)=>{const y=O(r.errors,h),E=(d.isValid||b.isValid)&&Je(m)&&r.isValid!==m;if(t.delayError&&w?(l=v(()=>M(h,w)),l(t.delayError)):(clearTimeout(c),l=null,w?X(r.errors,h,w):ce(r.errors,h)),(w?!kt(y,w):y)||!Ce(T)||E){const P={...T,...E&&Je(m)?{isValid:m}:{},errors:r.errors,name:h};r={...r,...P},p.state.next(P)}},S=async h=>(C(h,!0),await t.resolver(a,t.context,Zh(h||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),k=async h=>{const{errors:m}=await S(h);if(C(h),h)for(const w of h){const T=O(m,w);T?X(r.errors,w,T):ce(r.errors,w)}else r.errors=m;return m},$=async(h,m,w={valid:!0})=>{for(const T in h){const y=h[T];if(y){const{_f:E,...P}=y;if(E){const H=s.array.has(E.name),K=y._f&&Xh(y._f);K&&d.validatingFields&&C([E.name],!0);const Ee=await Al(y,s.disabled,a,g,t.shouldUseNativeValidation&&!m,H);if(K&&d.validatingFields&&C([E.name]),Ee[E.name]&&(w.valid=!1,m||e.shouldUseNativeValidation))break;!m&&(O(Ee,E.name)?H?ib(r.errors,Ee,E.name):X(r.errors,E.name,Ee[E.name]):ce(r.errors,E.name))}!Ce(P)&&await $(P,m,w)}}return w.valid},F=()=>{for(const h of s.unMount){const m=O(n,h);m&&(m._f.refs?m._f.refs.every(w=>!ta(w)):!ta(m._f.ref))&&lr(h)}s.unMount=new Set},I=(h,m)=>!t.disabled&&(h&&m&&X(a,h,m),!kt(Or(),i)),V=(h,m,w)=>Wh(h,s,{...o.mount?a:ie(m)?i:Ne(h)?{[h]:m}:m},w,m),q=h=>Ji(O(o.mount?a:i,h,t.shouldUnregister?O(i,h,[]):[])),B=(h,m,w={})=>{const T=O(n,h);let y=m;if(T){const E=T._f;E&&(!E.disabled&&X(a,h,wl(m,E)),y=pn(E.ref)&&Me(m)?"":m,hl(E.ref)?[...E.ref.options].forEach(P=>P.selected=y.includes(P.value)):E.refs?Ir(E.ref)?E.refs.forEach(P=>{(!P.defaultChecked||!P.disabled)&&(Array.isArray(y)?P.checked=!!y.find(H=>H===P.value):P.checked=y===P.value||!!y)}):E.refs.forEach(P=>P.checked=P.value===y):Qi(E.ref)?E.ref.value="":(E.ref.value=y,E.ref.type||p.state.next({name:h,values:ue(a)})))}(w.shouldDirty||w.shouldTouch)&&z(h,y,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Q(h)},G=(h,m,w)=>{for(const T in m){if(!m.hasOwnProperty(T))return;const y=m[T],E=h+"."+T,P=O(n,E);(s.array.has(h)||le(y)||P&&!P._f)&&!Nt(y)?G(E,y,w):B(E,y,w)}},Y=(h,m,w={})=>{const T=O(n,h),y=s.array.has(h),E=ue(m);X(a,h,E),y?(p.array.next({name:h,values:ue(a)}),(d.isDirty||d.dirtyFields||b.isDirty||b.dirtyFields)&&w.shouldDirty&&p.state.next({name:h,dirtyFields:nr(i,a),isDirty:I(h,E)})):T&&!T._f&&!Me(E)?G(h,E,w):B(h,E,w),Cl(h,s)?p.state.next({...r,name:h,values:ue(a)}):p.state.next({name:o.mount?h:void 0,values:ue(a)})},ve=async h=>{o.mount=!0;const m=h.target;let w=m.name,T=!0;const y=O(n,w),E=K=>{T=Number.isNaN(K)||Nt(K)&&isNaN(K.getTime())||kt(K,O(a,w,K))},P=kl(t.mode),H=kl(t.reValidateMode);if(y){let K,Ee;const Vt=m.type?xl(y._f):Rh(h),Ct=h.type===dl.BLUR||h.type===dl.FOCUS_OUT,rg=!Qh(y._f)&&!t.resolver&&!O(r.errors,w)&&!y._f.deps||rb(Ct,O(r.touchedFields,w),r.isSubmitted,H,P),ia=Cl(w,s,Ct);X(a,w,Vt),Ct?(!m||!m.readOnly)&&(y._f.onBlur&&y._f.onBlur(h),l&&l(0)):y._f.onChange&&y._f.onChange(h);const aa=z(w,Vt,Ct),ng=!Ce(aa)||ia;if(!Ct&&p.state.next({name:w,type:h.type,values:ue(a)}),rg)return(d.isValid||b.isValid)&&(t.mode==="onBlur"?Ct&&x():Ct||x()),ng&&p.state.next({name:w,...ia?{}:aa});if(!Ct&&ia&&p.state.next({...r}),t.resolver){const{errors:Vl}=await S([w]);if(C([w]),E(Vt),T){const ig=El(r.errors,n,w),Bl=El(Vl,n,ig.name||w);K=Bl.error,w=Bl.name,Ee=Ce(Vl)}}else C([w],!0),K=(await Al(y,s.disabled,a,g,t.shouldUseNativeValidation))[w],C([w]),E(Vt),T&&(K?Ee=!1:(d.isValid||b.isValid)&&(Ee=await $(n,!0)));T&&(y._f.deps&&(!Array.isArray(y._f.deps)||y._f.deps.length>0)&&Q(y._f.deps),A(w,Ee,K,aa))}},fe=(h,m)=>{if(O(r.errors,m)&&h.focus)return h.focus(),1},Q=async(h,m={})=>{let w,T;const y=Tr(h);if(t.resolver){const E=await k(ie(h)?h:y);w=Ce(E),T=h?!y.some(P=>O(E,P)):w}else h?(T=(await Promise.all(y.map(async E=>{const P=O(n,E);return await $(P&&P._f?{[E]:P}:P)}))).every(Boolean),!(!T&&!r.isValid)&&x()):T=w=await $(n);return p.state.next({...!Ne(h)||(d.isValid||b.isValid)&&w!==r.isValid?{}:{name:h},...t.resolver||!h?{isValid:w}:{},errors:r.errors}),m.shouldFocus&&!T&&Dr(n,fe,h?y:s.mount),T},Or=(h,m)=>{let w={...o.mount?a:i};return m&&(w=pl(m.dirtyFields?r.dirtyFields:r.touchedFields,w)),ie(h)?w:Ne(h)?O(w,h):h.map(T=>O(w,T))},ar=(h,m)=>({invalid:!!O((m||r).errors,h),isDirty:!!O((m||r).dirtyFields,h),error:O((m||r).errors,h),isValidating:!!O(r.validatingFields,h),isTouched:!!O((m||r).touchedFields,h)}),U=h=>{const m=h?Tr(h):void 0;m==null||m.forEach(w=>ce(r.errors,w)),m?m.forEach(w=>{p.state.next({name:w,errors:r.errors})}):p.state.next({errors:{}})},or=(h,m,w)=>{const T=(O(n,h,{_f:{}})._f||{}).ref,y=O(r.errors,h)||{},{ref:E,message:P,type:H,...K}=y;X(r.errors,h,{...K,...m,ref:T}),p.state.next({name:h,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&T&&T.focus&&T.focus()},sr=(h,m)=>Ue(h)?p.state.subscribe({next:w=>"values"in w&&h(V(void 0,m),w)}):V(h,m,!0),St=h=>p.state.subscribe({next:m=>{tb(h.name,m.name,h.exact)&&eb(m,h.formState||d,yn,h.reRenderRoot)&&h.callback({values:{...a},...r,...m,defaultValues:i})}}).unsubscribe,Rt=h=>(o.mount=!0,b={...b,...h.formState},St({...h,formState:{...f,...h.formState}})),lr=(h,m={})=>{for(const w of h?Tr(h):s.mount)s.mount.delete(w),s.array.delete(w),m.keepValue||(ce(n,w),ce(a,w)),!m.keepError&&ce(r.errors,w),!m.keepDirty&&ce(r.dirtyFields,w),!m.keepTouched&&ce(r.touchedFields,w),!m.keepIsValidating&&ce(r.validatingFields,w),!t.shouldUnregister&&!m.keepDefaultValue&&ce(i,w);p.state.next({values:ue(a)}),p.state.next({...r,...m.keepDirty?{isDirty:I()}:{}}),!m.keepIsValid&&x()},Lr=({disabled:h,name:m})=>{if(Je(h)&&o.mount||h||s.disabled.has(m)){const y=s.disabled.has(m)!==!!h;h?s.disabled.add(m):s.disabled.delete(m),y&&o.mount&&!o.action&&x()}},dt=(h,m={})=>{let w=O(n,h);const T=Je(m.disabled)||Je(t.disabled);return X(n,h,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:h}},name:h,mount:!0,...m}}),s.mount.add(h),w?Lr({disabled:Je(m.disabled)?m.disabled:t.disabled,name:h}):j(h,!0,m.value),{...T?{disabled:m.disabled||t.disabled}:{},...t.progressive?{required:!!m.required,min:jr(m.min),max:jr(m.max),minLength:jr(m.minLength),maxLength:jr(m.maxLength),pattern:jr(m.pattern)}:{},name:h,onChange:ve,onBlur:ve,ref:y=>{if(y){dt(h,m),w=O(n,h);const E=ie(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,P=Kh(E),H=w._f.refs||[];if(P?H.find(K=>K===E):E===w._f.ref)return;X(n,h,{_f:{...w._f,...P?{refs:[...H.filter(ta),E,...Array.isArray(O(i,h))?[{}]:[]],ref:{type:E.type,name:h}}:{ref:E}}}),j(h,!1,void 0,E)}else w=O(n,h,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||m.shouldUnregister)&&!(Vh(s.array,h)&&o.action)&&s.unMount.add(h)}}},cr=()=>t.shouldFocusError&&Dr(n,fe,s.mount),vn=h=>{Je(h)&&(p.state.next({disabled:h}),Dr(n,(m,w)=>{const T=O(n,w);T&&(m.disabled=T._f.disabled||h,Array.isArray(T._f.refs)&&T._f.refs.forEach(y=>{y.disabled=T._f.disabled||h}))},0,!1))},dr=(h,m)=>async w=>{let T;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let y=ue(a);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:E,values:P}=await S();C(),r.errors=E,y=ue(P)}else await $(n);if(s.disabled.size)for(const E of s.disabled)ce(y,E);if(ce(r.errors,"root"),Ce(r.errors)){p.state.next({errors:{}});try{await h(y,w)}catch(E){T=E}}else m&&await m({...r.errors},w),cr(),setTimeout(cr);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ce(r.errors)&&!T,submitCount:r.submitCount+1,errors:r.errors}),T)throw T},ur=(h,m={})=>{O(n,h)&&(ie(m.defaultValue)?Y(h,ue(O(i,h))):(Y(h,m.defaultValue),X(i,h,ue(m.defaultValue))),m.keepTouched||ce(r.touchedFields,h),m.keepDirty||(ce(r.dirtyFields,h),r.isDirty=m.defaultValue?I(h,ue(O(i,h))):I()),m.keepError||(ce(r.errors,h),d.isValid&&x()),p.state.next({...r}))},Pt=(h,m={})=>{const w=h?ue(h):i,T=ue(w),y=Ce(h),E=y?i:T;if(m.keepDefaultValues||(i=w),!m.keepValues){if(m.keepDirtyValues){const P=new Set([...s.mount,...Object.keys(nr(i,a))]);for(const H of Array.from(P)){const K=O(r.dirtyFields,H),Ee=O(a,H),Vt=O(E,H);K&&!ie(Ee)?X(E,H,Ee):!K&&!ie(Vt)&&Y(H,Vt)}}else{if(Yi&&ie(h))for(const P of s.mount){const H=O(n,P);if(H&&H._f){const K=Array.isArray(H._f.refs)?H._f.refs[0]:H._f.ref;if(pn(K)){const Ee=K.closest("form");if(Ee){Ee.reset();break}}}}if(m.keepFieldsRef)for(const P of s.mount)Y(P,O(E,P));else n={}}a=t.shouldUnregister?m.keepDefaultValues?ue(i):{}:ue(E),p.array.next({values:{...E}}),p.state.next({values:{...E}})}s={mount:m.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!m.keepIsValid||!!m.keepDirtyValues||!t.shouldUnregister&&!Ce(E),o.watch=!!t.shouldUnregister,o.keepIsValid=!!m.keepIsValid,o.action=!1,m.keepErrors||(r.errors={}),p.state.next({submitCount:m.keepSubmitCount?r.submitCount:0,isDirty:y?!1:m.keepDirty?r.isDirty:!!(m.keepDefaultValues&&!kt(h,i)),isSubmitted:m.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:y?{}:m.keepDirtyValues?m.keepDefaultValues&&a?nr(i,a):r.dirtyFields:m.keepDefaultValues&&h?nr(i,h):m.keepDirty?r.dirtyFields:{},touchedFields:m.keepTouched?r.touchedFields:{},errors:m.keepErrors?r.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Fr=(h,m)=>Pt(Ue(h)?h(a):h,{...t.resetOptions,...m}),wn=(h,m={})=>{const w=O(n,h),T=w&&w._f;if(T){const y=T.refs?T.refs[0]:T.ref;y.focus&&setTimeout(()=>{y.focus(),m.shouldSelect&&Ue(y.select)&&y.select()})}},yn=h=>{r={...r,...h}},Nr={control:{register:dt,unregister:lr,getFieldState:ar,handleSubmit:dr,setError:or,_subscribe:St,_runSchema:S,_updateIsValidating:C,_focusError:cr,_getWatch:V,_getDirty:I,_setValid:x,_setFieldArray:_,_setDisabledField:Lr,_setErrors:D,_getFieldArray:q,_reset:Pt,_resetDefaultValues:()=>Ue(t.defaultValues)&&t.defaultValues().then(h=>{Fr(h,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:F,_disableForm:vn,_subjects:p,_proxyFormState:d,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(h){o=h},get _defaultValues(){return i},get _names(){return s},set _names(h){s=h},get _formState(){return r},get _options(){return t},set _options(h){t={...t,...h}}},subscribe:Rt,trigger:Q,register:dt,handleSubmit:dr,watch:sr,setValue:Y,getValues:Or,reset:Fr,resetField:ur,clearErrors:U,unregister:lr,setError:or,setFocus:wn,getFieldState:ar};return{...Nr,formControl:Nr}}function bn(e={}){const t=Se.useRef(void 0),r=Se.useRef(void 0),[n,i]=Se.useState({isDirty:!1,isValidating:!1,isLoading:Ue(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ue(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ue(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=ob(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,qh(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),Se.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),Se.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),Se.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),Se.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),Se.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),Se.useEffect(()=>{var o;e.values&&!kt(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),Se.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=Se.useMemo(()=>Uh(n,a),[a,n]),t.current}const Il=(e,t,r)=>{if(e&&"reportValidity"in e){const n=O(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},sb=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Il(n.ref,r,e):n.refs&&n.refs.forEach(i=>Il(i,r,e))}},lb=(e,t)=>{t.shouldUseNativeValidation&&sb(e,t);const r={};for(const n in e){const i=O(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(cb(t.names||Object.keys(e),n)){const o=Object.assign({},O(r,n));X(o,"root",a),X(r,n,o)}else X(r,n,a)}return r},cb=(e,t)=>e.some(r=>r.startsWith(t+"."));var gn=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(yh(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var c=s.issues[0],f=gh(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var d=l[f].types,b=d&&d[c.type];l[f]=ul(f,o,l,c.type,b?[].concat(b,c.message):c.message)}s.issues.shift()}return{values:{},errors:lb(l,a)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Tl=27,jl=12,Dl=10,db=Jt("enum"),ub=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return gn(ot({checked:xt(Zs(De(),Gs()),Wi(n=>Object.entries(n).filter(([i,a])=>a).map(([i,a])=>i)),Ar(r.max,t("validation_multiple_choice_max",{count:r.max})),Qt(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},fb=ui(({option:e,...t},r)=>u(ae,{children:[u("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),u("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Ml=Mt("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:rl}}}),pb=({input:e,onSubmitSuccess:t})=>{var f,d;const r=e.key?(f=R.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,i=n&&e.config.options.length===2,{t:a}=oe(),{register:o,handleSubmit:s,formState:{errors:l}}=bn({defaultValues:{checked:n?{}:db(r)?Object.fromEntries(r.value.map(b=>[b,!0])):{}},resolver:ub(e.config,a)}),c=Gi();return i?u(ae,{children:[u("ul",{style:{maxHeight:6.5*Tl+5*jl+2*Dl},class:Ml({variant:"booleanLike"}),children:e.config.options.map((b,p)=>u("li",{class:nl,children:u(il,{type:"submit",ref:g=>{g&&p===0&&(c.current=g)},label:b.label,value:"true",onClick:()=>t({type:"enum",value:[b.value]})})},b.value))}),e.config.minSelected===0&&u("div",{class:"px-2 pb-2",children:u(st,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):u("form",{noValidate:!0,onSubmit:b=>s(p=>{const g=p.checked;t({type:"enum",value:g})})(b),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*Tl+5*jl+2*Dl},class:Ml({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((b,p)=>{const g=`checked.${b.value}`,{ref:v,...x}=o(g);return u("li",{class:"relative",children:u(fb,{option:b,autoFocus:p===0,ref:C=>{C&&p===0&&(c.current=C),v(C)},id:g,...x,onClick:n?()=>t({type:"enum",value:[b.value]}):void 0})},b.value)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(Ft,{}),e.config.minSelected===0&&u(st,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(tr,{error:(d=l.checked)==null?void 0:d.root})})]})},hb=Jt("number"),bb=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return gn(ot({number:xt(Ys(t("validation_number")),qs(r,t("validation_number_min",{min:r})),Us(n,t("validation_number_max",{max:n})),Bs(a=>a===Number(a.toFixed(i)),t("validation_number_decimal_cases",{count:i})))}))},gb=({input:e,onSubmitSuccess:t})=>{var d;const r=e.config.defaultValue,n=e.key?(d=R.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:i}=oe(),{register:a,handleSubmit:o,formState:{errors:s}}=bn({defaultValues:{number:hb(n)?n.value:r?Number(r):void 0},resolver:bb(e.config,i)}),{ref:l,...c}=a("number",{required:!e.config.optional,valueAsNumber:!0}),f=be();return je(()=>{f.current&&(f.current.focus(),f.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(b=>{b.number!==void 0&&t({type:"number",value:b.number})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-grow",children:[u("input",{...c,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:b=>{b&&(f.current=b),l(b)},type:"text",min:e.config.min,max:e.config.max,class:rr({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&u(st,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),u(Ft,{})]}),u(tr,{error:s.number})]})},mb="44",vb=/^[0-9 ]+$/,wb=Jt("string"),yb=Jt("phone"),_b=e=>{const t=xt(De(e("validation_country_code")),qi(vb,e("validation_country_code"))),r=xt(De(e("validation_phone")),Qt(1,e("validation_phone")),Wi(n=>n.replace(/[^0-9]/g,"")));return gn(ot({countryCode:t,phoneNumber:r}))},xb=({input:e,onSubmitSuccess:t})=>{var v;const r=e.key?(v=R.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:n}=oe(),[i,a]=Be(),o=wb(r)?_h(r.value):yb(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:c},watch:f}=bn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??mb,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:_b(n)}),{ref:d,...b}=s("phoneNumber",{required:!e.config.optional}),p=be(),g=f("countryCode");return je(()=>{p.current&&(p.current.focus(),p.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(x=>{const C=x.phoneNumber.replace(/[^0-9]/g,""),_=x.countryCode.replace(/[^0-9]/g,"");a(void 0);const M=e.config.minChars??7,D=C.length+_.length;if(D<M)return a(n("validation_phone_min_chars",{count:M}));const j=e.config.maxChars;if(j!=null&&D>j)return a(n("validation_max_chars",{count:j}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:_,phoneNumber:C}}):t({type:"string",value:g+x.phoneNumber})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[u("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[u("span",{children:["+",g]}),u("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Hi).map(([x,C])=>u("option",{value:C,children:[x," (+",C,")"]},x))})]}),u("input",{...b,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(p.current=x),d(x)},class:rr({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&u(st,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),u(Ft,{})]}),u(tr,{error:c.countryCode||c.phoneNumber||{message:i}})]})},mn=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Ol=(e,t,r,n)=>r!==void 0&&n*1e3>On?e("submission_available_at",{time:$a(r,t)}):e("submission_cooldown",{count:n}),kb=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},Sb=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=oe(),{availableAt:i}=e.config,[a,o]=Be(()=>mn(i)),[s,l]=Be("");jt(()=>{const f=mn(i);if(o(f),f===0)return;l(Ol(r,n,i,f));const d=setInterval(()=>{const b=mn(i);o(b),!(b>0)&&(clearInterval(d),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[i,n,r]);const c=a>0;return u("div",{class:"flex flex-col items-center gap-2 py-3",children:[u("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":c,"aria-describedby":c?"submit-cooldown":void 0,onClick:()=>{mn(i)>0||t(null)},children:u("span",{class:"flex items-center gap-1.5",children:[u("span",{class:"inline-flex items-center text-sm font-medium",children:kb(e.config.label,r)}),u("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{d:"M4 8L8 4L12 8"}),u("path",{d:"M8 4V13"})]})]})}),c&&u("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Ol(r,n,i,a)}),u("p",{role:"status",class:"sr-only",children:s})]})},Cb=160,Ll=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Cb)}px`},Eb={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},$b=Jt("string"),Ab=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return gn(ot({text:{date:xt(De(t("validation_date")),qi(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:xt(De(t("validation_email")),zs(t("validation_email")),Qt(e.minChars??1,r.minLength),Ar(e.maxChars??1/0,r.maxLength)),text:xt(De(),Qt(e.minChars??1,r.minLength),Ar(e.maxChars??1/0,r.maxLength)),url:xt(De(t("validation_url")),Ws(t("validation_url")),Qt(e.minChars??1,r.minLength),Ar(e.maxChars??1/0,r.maxLength))}[e.format]}))},Ib={text:({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=oe(),n=e.key?(v=R.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,i=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:c}}=bn({defaultValues:{text:$b(n)?n.value:i??""},resolver:Ab(e.config,r)}),{ref:f,...d}=o("text",{required:!e.config.optional}),b=be();je(()=>{b.current&&(b.current instanceof HTMLTextAreaElement&&Ll(b.current),b.current.focus(),b.current.select())},[]);const p=e.config.maxChars,g=a&&p!==void 0?l("text").length:void 0;return u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(x=>{t({type:"string",value:x.text})}),children:[u("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[a?u("textarea",{id:"chat-input",...d,rows:2,maxLength:p,autoFocus:!0,"aria-describedby":g!==void 0?"chat-input-count":void 0,onInput:x=>Ll(x.currentTarget),onKeyDown:x=>{var C;x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&(x.preventDefault(),(C=x.currentTarget.form)==null||C.requestSubmit())},ref:x=>{x&&(b.current=x),f(x)},placeholder:e.config.placeholder,class:rr({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):u("input",{id:"chat-input",...d,...Eb[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(b.current=x),f(x)},placeholder:e.config.placeholder,class:rr({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&u(st,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),u(Ft,{})]}),g!==void 0&&p!==void 0&&u("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[g,"/",p]}),u(tr,{error:c.text})]})},phone:xb,"multiple-choice":pb,boolean:jh,file:Nh,submit:Sb,address:$h,number:gb},Tb=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=R.current$.value.flow)==null?void 0:o.data.currentInput,i=be(null),a=()=>ne.onInteractionFn$.value();return je(()=>{var s;(s=i.current)==null||s.scrollTo({top:0})},[n]),u("div",{ref:i,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:u("div",{class:"flex flex-col",onPointerDownCapture:n?a:void 0,onKeyDownCapture:n?a:void 0,children:n?(()=>{const s=Ib[n.type];return u(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:ne.onSubmitSuccessFn$.value,input:n})})():u("div",{class:"flex items-center gap-2 p-2.5",children:[u("input",{"aria-hidden":"true",id:"chat-input",class:rr({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),u(Ft,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function jb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Db=function(e){return e instanceof RegExp},Mb=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Fl=function(e){return typeof e=="string"},Ob=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Lb(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Fl(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Db(a)||(a=new RegExp("("+Mb(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=i}return o}var Fb=function(t,r,n){return Array.isArray(t)||(t=[t]),Ob(t.map(function(i){return Fl(i)?Lb(i,r,n):i}))};const Mr=jb(Fb),Nb=/(\[[^\]]+\]\([^)]+\))/g,Rb=/\[([^\]]+)\]\(([^)]+)\)/,Pb=/(https?:\/\/[^\s]+)/g,Vb=/_(.*?)_/g,Bb=/\*\*(.*?)\*\*/g,zb=/(\\n|\n)/g,Nl="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Ub=e=>{const t=Mr(e,Nb,(s,l)=>{const[,c,f]=s.match(Rb)??[];return f?u("a",{class:Nl,href:f,children:c??f},f+l):u("span",{children:"INVALID LINK"})}),r=Mr(t,Pb,(s,l)=>u("a",{class:Nl,href:s,children:s},s+l)),n=Mr(r,Vb,(s,l)=>u("em",{children:s},s+l)),i=Mr(n,Bb,(s,l)=>u("strong",{children:s},s+l));let a=0;return Mr(i,zb,()=>u("br",{},`br-${a++}`))},qb=Mt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Wb=({children:e,className:t,animate:r,side:n,...i})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:qb({className:t,side:n,animate:r}),...i,children:e}),Rl=new Map,Pl=ef({overrides:{},locale:void 0}),Hb=(e,t)=>{const r=t==null?void 0:t.trim();if(!r)return e("job_alerts_privacy");const n=e("job_alerts_privacy_sender",{employer:r});return e("job_alerts_privacy")!==Pl("job_alerts_privacy")&&n===Pl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},Kb=({flow:e,rpcClient:t})=>{const{t:r}=oe(),n=e.data.flowSessionId,i=Rl.get(n)??Le("offer");Rl.set(n,i);const a=l=>{const c=e.data.submissions[l];return(c==null?void 0:c.type)==="string"?c.value.trim():void 0},o=a("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[a(l.data.key)]:[]).find(l=>!!l);if(!o||i.value==="declined")return null;if(i.value==="success")return u("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(i.value!=="offer"&&i.value!=="error")){i.value="saving";try{await Td(t,{contact:{email:o,first_name:a("first_name"),last_name:a("last_name")},job:e.job}),i.value="success"}catch{i.value="error"}}};return u("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[u("p",{children:r("job_alerts_offer",{email:o})}),i.value==="error"?u("p",{role:"alert",children:r("job_alerts_error")}):null,u("div",{class:"flex gap-2",children:[u("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:i.value==="saving",onClick:s,children:r("job_alerts_accept")}),u("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:i.value==="saving",onClick:()=>{i.value!=="offer"&&i.value!=="error"||(i.value="declined")},children:r("job_alerts_decline")})]}),u("p",{class:"text-xs",children:Hb(r,e.employer)})]})},Gb=({message:e})=>u("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:u("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,u("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Yb=({className:e,...t})=>u("div",{"aria-hidden":!0,children:ne.isBotTyping$.value===!0?u("div",{"data-testid":"typing-indicator",class:nt("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>u("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),Jb={bot:"left",user:"right"},Zb=Mt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),Xb=({env:e,lastSentMessageFooter:t,rpcClient:r})=>{const{t:n}=oe(),i=R.current$.value.flow,a=(i==null?void 0:i.data.messages)??[],o=a.findIndex(l=>l.type==="system"&&l.semantic==="submission-closed"),s=i?Fi(i):void 0;return u("ol",{"aria-label":n("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[a.map((l,c)=>u(ae,{children:[u("li",{class:"flex",tabIndex:c===a.length-1?-1:void 0,children:[s&&l.groupId===s&&!a.slice(c+1).some(f=>f.groupId===s)?t:null,rn(l).with({type:"system"},f=>u("p",{class:Zb({variant:f.variant}),children:f.text})).with({type:"text",author:Dt.union("bot","user")},f=>{const d=c===a.length-1,b=f.author==="bot"?Ub(f.text):f.text;return u(ae,{children:u(Wb,{animate:d,side:Jb[f.author],children:b},c)})}).with({type:"link"},f=>u(Gb,{message:f})).with({type:"image"},f=>u("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:f.url,style:{aspectRatio:f.width/f.height}})).with({type:"file"},f=>u(Mh,{class:f.author==="bot"?void 0:"ml-auto",file:{name:f.fileName,sizeKb:f.fileSizeKb}})).with({type:"loading"},f=>{const d=a[a.length-1];return!(f===d)||ne.isBotTyping$.value||i!=null&&i.data.isFinished?null:u("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[u(ln,{"aria-hidden":f.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),f.text?u("p",{role:"status",class:"text-neutral-11 text-sm",children:f.text}):null]})}).exhaustive()]}),c===o&&(i!=null&&i.jobAlerts)&&r?u("li",{children:u(Kb,{flow:i,rpcClient:r},i.data.flowSessionId)}):null]},c)),e&&e!=="production"&&(i==null?void 0:i.data.isFinished)&&i.data.stagingDestination&&u("li",{class:"text-neutral-11 text-center text-xs",children:i.data.stagingDestination}),u("li",{class:ne.captchaVisible$.value?"flex":"hidden",children:u("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":n("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),u(Yb,{},"typing")]})},Qb=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:i,env:a})=>{const{flow:o}=R.current$.value;it(o,"Flow is required to exist to show chatbot body");const s=R.viewState$.value,{chatRef:l,chatService:c}=Wf(),{t:f}=oe(),[d,b]=Be();return je(()=>{s==="maximised"&&ne.scrollToEnd()},[s]),je(()=>{var A;const{state:p,flow:g}=R.current$.peek();if(p!=="loaded")throw new Error(f("invalid_state"));let v=g.data.nodeHistory.at(-1);if(ne.scrollToEnd(),R.setInput(void 0),g.data.isFinished)return;const x=()=>{const S=R.current$.peek().flow;!S||S.data.hasInteracted||(R.markAsInteracted(),Ps(n,S,"FLOW_INTERACT"))};ne.onInteractionFn$.value=x,v===void 0?(v=Ls(o.nodes).id,R.setCurrentNodeId(v),Ps(n,g,"FLOW_START")):R.removeMessagesSentByNodeIds([v,Pi]);const{interpret:C,abort:_,undo:M}=Np({context:o.context,analytics:{service:n,customProperties:(A=o.analytics)==null?void 0:A.customProperties},apiClient:t,logger:e,talentBankClient:i,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var S;return(S=R.current$.peek().flow)==null?void 0:S.data.applicationRecovery},setApplicationRecovery:R.setApplicationRecovery,persistWriteBarrier:()=>R.persistWriteBarrier(g),getSubmissions:()=>{var S;return(S=R.current$.peek().flow)==null?void 0:S.data.submissions},onInterpret:S=>R.setCurrentNodeId(S.id),onFlowEnd:async()=>{var k;R.markAsFinished();const S=R.current$.peek().flow;it(S),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:S.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(k=o.analytics)==null?void 0:k.customProperties})}}),D=v,j=()=>{b(()=>M),C(D)},z=new AbortController;return g.offerResume?dh({chatService:c,t:f,signal:z.signal}).then(S=>(R.settleResume(g),S?j():(R.restart(),Fe.flushStateData()))).catch(S=>{S instanceof ft||e.error("Resume prompt failed",S)}):j(),()=>{z.abort(),ne.onInteractionFn$.value===x&&(ne.onInteractionFn$.value=()=>{}),_()}},[n,t,c,e,o,i,f]),u(ae,{children:[u("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[u("div",{ref:l,role:"region","aria-label":f("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:u(Xb,{env:a,rpcClient:r,lastSentMessageFooter:!Fi(o)||!d?null:u(eg,{undoFn:d})})}),ne.isReadingHistory$.value&&!o.data.isFinished&&!ne.isBotTyping$.value&&u("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:u(Cr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var g,v;ne.scrollToEnd(),(v=((g=l.current)==null?void 0:g.querySelector('li[tabindex="-1"]'))??l.current)==null||v.focus({preventScroll:!0})},children:u(ws,{})})})]}),u(Tb,{logger:e,analytics:n,rpcClient:r})]})},eg=({undoFn:e})=>{const{t}=oe();return u("div",{class:"flex flex-1 items-center justify-end px-1",children:u(Cr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=R.current$.peek();it(r),e(r.data.nodeHistory)},children:u("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},tg=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Qb},Symbol.toStringTag,{value:"Module"}))})();
|
|
37
|
+
`)}),c.hasHardConcerns&&e.data.alternativeLink&&await n.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await n.userInput({type:"submit",key:void 0,config:{label:Ue(e.data.continueLabel,{submissions:r,context:l})}})}return a(e.nextId)}const Us=(e,t,r)=>{var n;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(n=t.analytics)==null?void 0:n.customProperties})},Ua="resume-prompt",_h=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:Ua,signal:r});const n=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:r});return V.removeMessagesSentByNodeIds([Ua]),(n==null?void 0:n.value)!==!1},Ft=({class:e,...t})=>{const{t:r}=ce();return d("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:r("send")}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})})};var st;function qa(e){return{lang:(e==null?void 0:e.lang)??(st==null?void 0:st.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(st==null?void 0:st.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(st==null?void 0:st.abortPipeEarly)}}var Ha;function xh(e){return Ha==null?void 0:Ha.get(e)}var Wa;function kh(e){return Wa==null?void 0:Wa.get(e)}var Ka;function Sh(e,t){var r;return(r=Ka==null?void 0:Ka.get(e))==null?void 0:r.get(t)}function tr(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function xe(e,t,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??tr(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??Sh(e.reference,l.lang)??(c?kh(l.lang):null)??n.message??xh(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Je(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},qa())}}}function $h(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Ch(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function Eh(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var qs=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},Ah=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Hs(e,t){return{kind:"validation",type:"check",reference:Hs,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&xe(this,"input",r,n),r}}}function Ws(e){return{kind:"validation",type:"email",reference:Ws,expects:null,async:!1,requirement:Ah,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&xe(this,"email",t,r),t}}}function $r(e,t){return{kind:"validation",type:"max_length",reference:$r,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&xe(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Ks(e,t){return{kind:"validation",type:"max_value",reference:Ks,async:!1,expects:`<=${e instanceof Date?e.toJSON():tr(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&xe(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():tr(r.value)}),r}}}function rr(e,t){return{kind:"validation",type:"min_length",reference:rr,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&xe(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Gs(e,t){return{kind:"validation",type:"min_value",reference:Gs,async:!1,expects:`>=${e instanceof Date?e.toJSON():tr(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&xe(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():tr(r.value)}),r}}}function Ga(e,t){return{kind:"validation",type:"regex",reference:Ga,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&xe(this,"format",r,n),r}}}function Ya(e){return{kind:"transformation",type:"transform",reference:Ya,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Ys(e){return{kind:"validation",type:"url",reference:Ys,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&xe(this,"URL",t,r),t}}}function Ih(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Js(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Zs(e,t){return{kind:"schema",type:"array",reference:Zs,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:a,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else xe(this,"type",r,n);return r}}}function Xs(e){return{kind:"schema",type:"boolean",reference:Xs,expects:"boolean",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:xe(this,"type",t,r),t}}}function Qs(e){return{kind:"schema",type:"number",reference:Qs,expects:"number",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:xe(this,"type",t,r),t}}}function lt(e,t){return{kind:"schema",type:"object",reference:lt,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:Js(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:a,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=Ih(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(xe(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else xe(this,"type",r,n);return r}}}function nr(e,t){return{kind:"schema",type:"optional",reference:nr,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Je(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Js(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function el(e,t){return{kind:"schema",type:"picklist",reference:el,expects:Ch(e.map(tr),"|"),async:!1,options:e,message:t,get"~standard"(){return Je(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:xe(this,"type",r,n),r}}}function tl(e,t,r){return{kind:"schema",type:"record",reference:tl,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Je(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if($h(i,l)){const c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){const g={type:"object",origin:"key",input:i,key:l,value:c};for(const p of f.issues)p.path=[g],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},a);if(u.issues){const g={type:"object",origin:"value",input:i,key:l,value:c};for(const p of u.issues)p.path?p.path.unshift(g):p.path=[g],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else xe(this,"type",n,a);return n}}}function Me(e){return{kind:"schema",type:"string",reference:Me,expects:"string",async:!1,message:e,get"~standard"(){return Je(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:xe(this,"type",t,r),t}}}function rl(e,t,r){const n=e["~run"]({value:t},qa(r));if(n.issues)throw new qs(n.issues);return n.value}function Th(e,t){const r={};for(const n in e.entries)r[n]=nr(e.entries[n]);return{...e,entries:r,get"~standard"(){return Je(this)}}}function St(...e){return{...e[0],pipe:e,get"~standard"(){return Je(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}async function Dh(e,t,r){const n=await e["~run"]({value:t},qa(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const ar=({error:e})=>!e||!e.message?null:d("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[d("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"break-words pr-1 text-sm",children:e.message})]}),ct=({class:e,...t})=>{const{t:r}=ce();return d("button",{type:"button",class:it("fr touch-hitbox text-neutral-11 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[d("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:r("skip")}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Ja={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},jh=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Ja).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const ir=Mt("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Mh="https://api.mapbox.com/search/searchbox/v1/suggest",Lh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Oh=e=>atob(e).split("").reverse().join(""),ut=lt({name:Me()}),Fh=lt({suggestions:Zs(lt({feature_type:nr(Me()),full_address:nr(Me()),place_formatted:nr(Me()),name:nr(Me()),mapbox_id:Me(),context:Th(lt({address:ut,street:ut,neighborhood:ut,locality:ut,district:ut,place:ut,region:ut,postcode:ut,country:ut}))}))}),Nh=e=>(Dt(()=>{e&&Ki(e)},[e]),mt(()=>{var r;const t=(r=V.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,a)=>{var c;const i=e&&Ki(e),o=(c=V.current$.peek().flow)==null?void 0:c.locationOrigin,s=o&&o.lat!==void 0&&o.lng!==void 0&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180;return{...await wf({query:n,country:i,session:t,surface:"chatbot",...s?{lat:o.lat,lng:o.lng}:{},signal:a},async()=>{const f=new URL(Mh);return f.searchParams.set("q",n),f.searchParams.set("session_token",t),f.searchParams.set("limit","5"),s&&f.searchParams.set("proximity",`${o.lng},${o.lat}`),f.searchParams.set("access_token",Oh(Lh)),(await Wu(async p=>{const b=new URL(f);p&&b.searchParams.set("country",p);const v=await fetch(b.href,{signal:a});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return rl(Fh,await v.json()).suggestions},i,a)).map(p=>{var b,v,x,S,_,j,O,M,B;return{country:i,label:p.full_address??([p.name,p.place_formatted].filter(Boolean).join(", ")||p.mapbox_id),id:p.mapbox_id,address:{line1:((b=p.context.address)==null?void 0:b.name)??((v=p.context.street)==null?void 0:v.name),line2:void 0,line3:((x=p.context.neighborhood)==null?void 0:x.name)??((S=p.context.locality)==null?void 0:S.name),city:((_=p.context.place)==null?void 0:_.name)??((j=p.context.district)==null?void 0:j.name),state:(O=p.context.region)==null?void 0:O.name,postcode:((M=p.context.postcode)==null?void 0:M.name)??(p.feature_type==="postcode"?p.name:void 0),country:(B=p.context.country)==null?void 0:B.name}}})}),country:i}}}:{enabled:!1}},[e])),nl=e=>{const{t}=ce();return d("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:t("back")})]})},Ph=({input:e,onSubmitSuccess:t,logger:r,analytics:n,rpcClient:a})=>{const{t:i}=ce(),[o,s]=ze(),{enabled:l,getPredictions:c}=Nh(a),[f,u]=ze(l?"query":"manual"),[g,p]=ze(""),[b,v]=ze(),x=me(),S=()=>{var k;(k=x.current)==null||k.controller.abort(),x.current=void 0};Dt(()=>S,[]);const _=me(),j=me(),O=me(!1),M=k=>{const $=k!==null?_.current:void 0,C=($==null?void 0:$.lookup)??j.current;if(C&&!O.current){O.current=!0;const T=z=>{const U=e.config.keys[z];return k&&U?k.value[U]:void 0},E=T("country")??($==null?void 0:$.suggestion.address.country)??($==null?void 0:$.suggestion.country),L=k&&ls({postcode:T("postcode")??($!=null&&$.edited||o==null?void 0:o.postcode),label:$!=null&&$.edited||$==null?void 0:$.suggestion.label,state:T("state")??($!=null&&$.edited||o==null?void 0:o.state),country:E});yf({kind:"address",surface:"chatbot",...C,picked:!!$,...$?{edited:$.edited}:{},region:L??(E!=null&&E.trim()?"other":null)})}t(k)},B=k=>{var C;if(ot(l,"Query state should not be enabled"),k=k.trim(),k===((C=x.current)==null?void 0:C.query)||k===(b==null?void 0:b.query)&&b.status==="done")return;if(S(),p(k),k===""){v(void 0);return}const $=x.current={query:k,controller:new AbortController};v({query:k,status:"pending"}),c(k,$.controller.signal).then(T=>{x.current===$&&(x.current=void 0,j.current={arm:T.arm,source:T.source},v({query:k,status:"done",items:T.results,...j.current,country:T.country}))},T=>{x.current===$&&(x.current=void 0,j.current={arm:"direct",source:"direct"},r.error("Failed to get address details",T instanceof qs?"Unexpected response":T),v({query:k,status:"failed",error:i("address_error")}))})},I=(k,$)=>{_.current&&(o==null?void 0:o[k])!==$&&(_.current.edited=!0),s(C=>({...C,[k]:$}))};switch(f){case"query":return ot(l,"Query state should not be enabled"),d(Rh,{input:e,onSkip:()=>M(null),onAddressSelect:(k,$)=>{var T;if(k===""){x.current&&(S(),v(void 0)),u("manual");return}if((b==null?void 0:b.status)!=="done")return;const C=b.items.find(E=>E.id===k);C&&(b.arm!=="inploi"&&bf({query:$,country:b.country,pickedLabel:C.label,pickedPostcode:C.address.postcode,pickedCountry:C.address.country,pickedState:C.address.state,log:E=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:E})}),((T=_.current)==null?void 0:T.suggestion.id)!==k?(s(C.address),_.current={suggestion:C,lookup:{arm:b.arm,source:b.source},edited:!1}):_.current.lookup={arm:b.arm,source:b.source},u("details"))},onAddressSearch:B,lookup:b,query:g});case"details":return ot(o!==void 0),d(al,{input:e,logger:r,onSubmitSuccess:M,addressFields:o,onFieldChange:I,actions:d(nl,{onClick:()=>{u("query")}})});case"manual":return d(al,{logger:r,input:e,onSubmitSuccess:M,addressFields:o??{},onFieldChange:I,actions:l?d(nl,{onClick:()=>{u("query")}}):e.config.optional?d(ct,{onClick:()=>M(null)}):void 0})}},Rh=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:a,onAddressSearch:i})=>{const{t:o}=ce(),s=me(null);return je(()=>{s.current&&(s.current.focus(),s.current.select())},[]),d(le,{children:[d("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&i(f)},class:"flex gap-2 p-2.5",children:[d("div",{class:"group relative flex-1",children:[d("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:a,class:ir({optional:!!e.config.optional,className:"w-full rounded-full"})}),d("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[d("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[d("circle",{cx:"7",cy:"7",r:"4"}),d("path",{d:"M10 10L13 13"})]})}),d("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&d(ct,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?d(ar,{error:{message:r.error}}):null,d("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?d(le,{children:[d(cn,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),d("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var c;n(l.id,((c=s.current)==null?void 0:c.value)??a??"")},children:[d("span",{class:"flex-grow",children:l.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var l;n("",((l=s.current)==null?void 0:l.value)??a??"")},children:d("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},Za=["line1","line2","line3","city","state","postcode","country"],al=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:a})=>{const i=me(null);je(()=>{if(i.current){const l=i.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(Ja),{t:s}=ce();return d("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const c=l.currentTarget,f=[...c.querySelectorAll("input")].filter(p=>p.value!==""&&!p.value.trim());for(const p of f){p.value="";const b=Za.find(v=>a.config.keys[v]===p.name);b&&t(b,"")}if(f.length>0&&!c.checkValidity()){c.reportValidity();return}const u=new FormData(c),g=Object.fromEntries(u.entries());r({type:"address",value:g})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:Za.map((l,c)=>{const f=`isdk_${l}`,u=a.config.keys[l];return u?d(le,{children:[d("label",{for:f,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:u,id:f,defaultValue:e[l],onChange:g=>t(l,g.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?d("option",{value:e[l],children:e[l]}):d("option",{value:"",children:s("select_country")}),o.map(g=>d("option",{value:g,children:g},g))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:c===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:u,id:f,defaultValue:e[l],onInput:g=>t(l,g.currentTarget.value),required:l==="line2"?a.config.line2Required===!0:l!=="line3"}),c===Za.length-1?d("hr",{class:"m-0 w-full border-b border-b-transparent"}):d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),d("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,d(Ft,{class:"ml-auto"})]})]})},Xa=()=>{const e=me(null);return Dt(()=>{var t;(t=e.current)==null||t.focus()},[]),e},il=["true","false"],Vh=el(il),Bh="answer",ol="flex items-center flex-wrap gap-2 p-2.5",sl="min-w-0 max-w-full flex-auto",ll=ga(({label:e,...t},r)=>d("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:d("p",{class:"text-center text-base",children:e})})),zh=({input:e,onSubmitSuccess:t})=>{const r=Xa();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const a=Ff(n).value,i=rl(Vh,a);t({type:"boolean",value:i==="true"})},children:[d("ul",{class:ol,children:il.map((n,a)=>d("li",{class:sl,children:d(ll,{ref:a===0?r:null,type:"submit",name:Bh,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(ct,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},cl=e=>e.reduce((t,r)=>t+r.sizeKb,0),Uh=Qt("file"),ul=3,fn=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},qh=({file:e,class:t,...r})=>{const{t:n}=ce(),[a,i]=fn(e.name);return d("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"sr-only",children:[n("file_name"),": "]}),d("span",{class:"block truncate",children:a}),d("span",{children:i})]}),d("p",{class:"text-accent-11",children:[d("span",{class:"sr-only",children:[n("file_size"),": "]}),Ht(e.sizeKb)]})]})},dl=({class:e,...t})=>d("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Hh=(e,t)=>{const[r,n]=fn(e);return`${r.slice(0,t)}${n}`},pn=e=>({name:Hh(e.name,42),sizeKb:e.size/1e3}),Wh=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Kh=(e,t,r)=>{const n=fn(t.name)[1].toLowerCase(),a=[...r.map(o=>o.toLowerCase()),...Wh],i=n===""?"none":a.includes(n)?n:"other";return`chatbot-file-refused:${e}:${i}`},Gh=({input:e,onSubmitSuccess:t,analytics:r})=>{var x;const n=(x=V.current$.value.flow)==null?void 0:x.data.submissions[e.key],[a,i]=ze(Uh(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=me(0),s=a.status==="ready"?a.files:[],l=a.status==="ready"||a.status==="pending"?a.files:[],c=a.status==="error"?a.error:void 0,f=l.length-ul,u=cl(l),g=Xa(),{t:p}=ce(),b=(S,_=e.config.extensions)=>{if(!S.length)return{reason:"required",error:{type:"required",message:p("validation_file")}};if(!Vr(S,_))return{reason:"type",file:S.find(j=>!Vr([j],_)),error:{type:"validate",message:p("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(S.some(j=>j.sizeKb===0))return{reason:"empty",file:S.find(j=>j.sizeKb===0),error:{type:"validate",message:p("validation_file_empty")}};if(e.config.fileSizeLimitKib&&cl(S)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:p("validation_file_size",{size:Ht(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&S.length>1)return{reason:"count",error:{type:"invalid",message:p("validation_file_max",{count:1})}}},v=(S,_)=>{var j,O;return r.log({event:"INTERACTION",properties:{tag:Kh(S,_,e.config.extensions)},customProperties:(O=(j=V.current$.peek().flow)==null?void 0:j.analytics)==null?void 0:O.customProperties})};return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:S=>{if(S.preventDefault(),a.status==="pending"||a.status==="error")return;const _=b(s);_?i({status:"error",error:_.error}):t({type:"file",value:s})},children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:g,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,ul).map(S=>{const[_,j]=fn(S.name);return d(dl,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:_}),d("span",{children:j})]})}),f>0?d(dl,{children:p("file_more",{count:f})}):null]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-11 text-xs",children:["(",p("file_max_size",{size:Ht(e.config.fileSizeLimitKib)}),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(S=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:S.replace(".","")}))})]})]}),d("p",{role:"status",class:it("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:a.status==="pending"?d(le,{children:[d(cn,{"aria-hidden":"true",class:"h-4 w-4"}),p("file_preparing",{count:l.length})]}):a.status==="ready"?d(le,{children:[s.length>1?p("file_total_size",{size:Ht(u)}):Ht(u),d("span",{class:"sr-only",children:[". ",p("file_ready",{count:s.length})]})]}):null}),d("input",{id:"dropzone-file","aria-label":p("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async S=>{ot(S.target instanceof HTMLInputElement);const _=S.target.files?Array.from(S.target.files):[];if(S.target.value="",!_[0])return;const j=++o.current,O=a.status==="ready";let M=_;if(!Vr(_,e.config.extensions)){const C=b(_.map(pn),[]);if(C)return v(C.reason,C.file??_[0]),i({status:"error",error:C.error});i({status:"pending",files:_.map(pn)});let T;try{M=await Promise.all(_.map(E=>Fc(E,e.config.extensions).catch(L=>{throw T??(T=E),L})))}catch{return o.current!==j?void 0:(v("unreadable",T??_[0]),i({status:"error",error:{type:"invalid",message:p(O?"file_read_error_replacement":"file_read_error")}}))}}const[B]=M;if(!B||o.current!==j)return;const I=M.map(pn),k=b(I);if(k)return v(k.reason,k.file??B),i({status:"error",error:k.error});i({status:"pending",files:I});let $;try{const C=await Promise.all(M.map(async T=>{try{return{...pn(T),data:await ru(T)}}catch(E){throw $??($=T),E}}));o.current===j&&i({status:"ready",files:C})}catch{if(o.current!==j)return;v("unreadable",$??B),i({status:"error",error:{type:"invalid",message:p(O?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:Tc(e.config.extensions),type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(Ft,{disabled:s.length===0}),e.config.optional&&d(ct,{class:"relative",onClick:()=>t(null)})]})]}),d(ar,{error:c})]})};var Cr=e=>e.type==="checkbox",Nt=e=>e instanceof Date,Le=e=>e==null;const fl=e=>typeof e=="object";var de=e=>!Le(e)&&!Array.isArray(e)&&fl(e)&&!Nt(e),Yh=e=>de(e)&&e.target?Cr(e.target)?e.target.checked:e.target.value:e,Jh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Zh=(e,t)=>e.has(Jh(t)),Xh=e=>{const t=e.constructor&&e.constructor.prototype;return de(t)&&t.hasOwnProperty("isPrototypeOf")},Qa=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function he(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Qa&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(de(e)&&Xh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=he(e[a]));return n}var hn=e=>/^\w*$/.test(e),oe=e=>e===void 0,ei=e=>Array.isArray(e)?e.filter(Boolean):[],ti=e=>ei(e.replace(/["|']|\]/g,"").split(/\.|\[/)),F=(e,t,r)=>{if(!t||!de(e))return r;const n=(hn(t)?[t]:ti(t)).reduce((a,i)=>Le(a)?a:a[i],e);return oe(n)||n===e?oe(e[t])?r:e[t]:n},Ze=e=>typeof e=="boolean",qe=e=>typeof e=="function",X=(e,t,r)=>{let n=-1;const a=hn(t)?[t]:ti(t),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=r;if(n!==o){const c=e[s];l=de(c)||Array.isArray(c)?c:isNaN(+a[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const pl={BLUR:"blur",FOCUS_OUT:"focusout"},He={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Qh=Ce.createContext(null);Qh.displayName="HookFormControlContext";var eg=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==He.all&&(t._proxyFormState[o]=!n||He.all),e[o]}});return a};const tg=typeof window<"u"?Ce.useLayoutEffect:Ce.useEffect;var Pe=e=>typeof e=="string",rg=(e,t,r,n,a)=>Pe(e)?(n&&t.watch.add(e),F(r,e,a)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),F(r,i))):(n&&(t.watchAll=!0),r),ri=e=>Le(e)||!fl(e);function $t(e,t,r=new WeakSet){if(ri(e)||ri(t))return Object.is(e,t);if(Nt(e)&&Nt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const o=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Nt(o)&&Nt(s)||de(o)&&de(s)||Array.isArray(o)&&Array.isArray(s)?!$t(o,s,r):!Object.is(o,s))return!1}}return!0}const ng=Ce.createContext(null);ng.displayName="HookFormContext";var hl=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},Er=e=>Array.isArray(e)?e:[e],gl=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function bl(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const a=e[n],i=t[n];if(a&&de(a)&&i){const o=bl(a,i);de(o)&&(r[n]=o)}else e[n]&&(r[n]=i)}return r}var Ee=e=>de(e)&&!Object.keys(e).length,ni=e=>e.type==="file",gn=e=>{if(!Qa)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ml=e=>e.type==="select-multiple",ai=e=>e.type==="radio",ag=e=>ai(e)||Cr(e),ii=e=>gn(e)&&e.isConnected;function ig(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=oe(e)?n++:e[t[n++]];return e}function og(e){for(const t in e)if(e.hasOwnProperty(t)&&!oe(e[t]))return!1;return!0}function fe(e,t){const r=Array.isArray(t)?t:hn(t)?[t]:ti(t),n=r.length===1?e:ig(e,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(de(n)&&Ee(n)||Array.isArray(n)&&og(n))&&fe(e,r.slice(0,-1)),e}var sg=e=>{for(const t in e)if(qe(e[t]))return!0;return!1};function vl(e){return Array.isArray(e)||de(e)&&!sg(e)}function oi(e,t={}){for(const r in e){const n=e[r];vl(n)?(t[r]=Array.isArray(n)?[]:{},oi(n,t[r])):oe(n)||(t[r]=!0)}return t}function or(e,t,r){r||(r=oi(t));for(const n in e){const a=e[n];if(vl(a))oe(t)||ri(r[n])?r[n]=oi(a,Array.isArray(a)?[]:{}):or(a,Le(t)?{}:t[n],r[n]);else{const i=t[n];r[n]=!$t(a,i)}}return r}const wl={value:!1,isValid:!1},yl={value:!0,isValid:!0};var _l=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!oe(e[0].attributes.value)?oe(e[0].value)||e[0].value===""?yl:{value:e[0].value,isValid:!0}:yl:wl}return wl},xl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>oe(e)?e:t?e===""?NaN:e&&+e:r&&Pe(e)?new Date(e):n?n(e):e;const kl={isValid:!1,value:null};var Sl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,kl):kl;function $l(e){const t=e.ref;return ni(t)?t.files:ai(t)?Sl(e.refs).value:ml(t)?[...t.selectedOptions].map(({value:r})=>r):Cr(t)?_l(e.refs).value:xl(oe(t.value)?e.ref.value:t.value,e)}var lg=(e,t,r,n)=>{const a={};for(const i of e){const o=F(t,i);o&&X(a,i,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}},bn=e=>e instanceof RegExp,Ar=e=>oe(e)?e:bn(e)?e.source:de(e)?bn(e.value)?e.value.source:e.value:e,Cl=e=>({isOnSubmit:!e||e===He.onSubmit,isOnBlur:e===He.onBlur,isOnChange:e===He.onChange,isOnAll:e===He.all,isOnTouch:e===He.onTouched});const El="AsyncFunction";var cg=e=>!!e&&!!e.validate&&!!(qe(e.validate)&&e.validate.constructor.name===El||de(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===El)),ug=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Al=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ir=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const i=F(e,a);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Ir(s,t))break}else if(de(s)&&Ir(s,t))break}}};function Il(e,t,r){const n=F(e,r);if(n||hn(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=F(t,i),s=F(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};a.pop()}return{name:r}}var dg=(e,t,r,n)=>{r(e);const{name:a,...i}=e;return Ee(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||He.all))},fg=(e,t,r)=>!e||!t||e===t||Er(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),pg=(e,t,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:(r?n.isOnChange:a.isOnChange)?e:!0,hg=(e,t)=>!ei(F(e,t)).length&&fe(e,t),gg=(e,t,r)=>{const n=Er(F(e,r));return X(n,"root",t[r]),X(e,r,n),e};function Tl(e,t,r="validate"){if(Pe(e)||Array.isArray(e)&&e.every(Pe)||Ze(e)&&!e)return{type:r,message:Pe(e)?e:"",ref:t}}var sr=e=>de(e)&&!bn(e)?e:{value:e,message:""},Dl=async(e,t,r,n,a,i)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:u,max:g,pattern:p,validate:b,name:v,valueAsNumber:x,mount:S}=e._f,_=F(r,v);if(!S||t.has(v))return{};const j=s?s[0]:o,O=E=>{a&&j.reportValidity&&(j.setCustomValidity(Ze(E)?"":E||""),j.reportValidity())},M={},B=ai(o),I=Cr(o),k=B||I,$=(x||ni(o))&&oe(o.value)&&oe(_)||gn(o)&&o.value===""||_===""||Array.isArray(_)&&!_.length,C=hl.bind(null,v,n,M),T=(E,L,z,U=dt.maxLength,W=dt.minLength)=>{const se=E?L:z;M[v]={type:E?U:W,message:se,ref:o,...C(E?U:W,se)}};if(i?!Array.isArray(_)||!_.length:l&&(!k&&($||Le(_))||Ze(_)&&!_||I&&!_l(s).isValid||B&&!Sl(s).isValid)){const{value:E,message:L}=Pe(l)?{value:!!l,message:l}:sr(l);if(E&&(M[v]={type:dt.required,message:L,ref:j,...C(dt.required,L)},!n))return O(L),M}if(!$&&(!Le(u)||!Le(g))){let E,L;const z=sr(g),U=sr(u);if(!Le(_)&&!isNaN(_)){const W=o.valueAsNumber||_&&+_;Le(z.value)||(E=W>z.value),Le(U.value)||(L=W<U.value)}else{const W=o.valueAsDate||new Date(_),se=ie=>new Date(new Date().toDateString()+" "+ie),Q=o.type=="time",ee=o.type=="week";Pe(z.value)&&_&&(E=Q?se(_)>se(z.value):ee?_>z.value:W>new Date(z.value)),Pe(U.value)&&_&&(L=Q?se(_)<se(U.value):ee?_<U.value:W<new Date(U.value))}if((E||L)&&(T(!!E,z.message,U.message,dt.max,dt.min),!n))return O(M[v].message),M}if((c||f)&&!$&&(Pe(_)||i&&Array.isArray(_))){const E=sr(c),L=sr(f),z=!Le(E.value)&&_.length>+E.value,U=!Le(L.value)&&_.length<+L.value;if((z||U)&&(T(z,E.message,L.message),!n))return O(M[v].message),M}if(p&&!$&&Pe(_)){const{value:E,message:L}=sr(p);if(bn(E)&&!_.match(E)&&(M[v]={type:dt.pattern,message:L,ref:o,...C(dt.pattern,L)},!n))return O(L),M}if(b){if(qe(b)){const E=await b(_,r),L=Tl(E,j);if(L&&(M[v]={...L,...C(dt.validate,L.message)},!n))return O(L.message),M}else if(de(b)){let E={};for(const L in b){if(!Ee(E)&&!n)break;const z=Tl(await b[L](_,r),j,L);z&&(E={...z,...C(L,z.message)},O(z.message),n&&(M[v]=E))}if(!Ee(E)&&(M[v]={ref:j,...E},!n))return M}}return O(!0),M};const bg={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function mg(e={}){let t={...bg,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:qe(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},a=de(t.defaultValues)||de(t.values)?he(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:he(a),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...f};let g={...u};const p={array:gl(),state:gl()},b=t.criteriaMode===He.all,v=h=>m=>{clearTimeout(c),c=setTimeout(h,m)},x=async h=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||g.isValid||h)){let m;t.resolver?(m=Ee((await k()).errors),S()):m=await C(n,!0),m!==r.isValid&&p.state.next({isValid:m})}},S=(h,m)=>{!t.disabled&&(u.isValidating||u.validatingFields||g.isValidating||g.validatingFields)&&((h||Array.from(s.mount)).forEach(w=>{w&&(m?X(r.validatingFields,w,m):fe(r.validatingFields,w))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Ee(r.validatingFields)}))},_=(h,m=[],w,D,A=!0,y=!0)=>{if(D&&w&&!t.disabled){if(o.action=!0,y&&Array.isArray(F(n,h))){const N=w(F(n,h),D.argA,D.argB);A&&X(n,h,N)}if(y&&Array.isArray(F(r.errors,h))){const N=w(F(r.errors,h),D.argA,D.argB);A&&X(r.errors,h,N),hg(r.errors,h)}if((u.touchedFields||g.touchedFields)&&y&&Array.isArray(F(r.touchedFields,h))){const N=w(F(r.touchedFields,h),D.argA,D.argB);A&&X(r.touchedFields,h,N)}(u.dirtyFields||g.dirtyFields)&&(r.dirtyFields=or(a,i)),p.state.next({name:h,isDirty:E(h,m),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else X(i,h,m)},j=(h,m)=>{X(r.errors,h,m),p.state.next({errors:r.errors})},O=h=>{r.errors=h,p.state.next({errors:r.errors,isValid:!1})},M=(h,m,w,D)=>{const A=F(n,h);if(A){const y=F(i,h,oe(w)?F(a,h):w);oe(y)||D&&D.defaultChecked||m?X(i,h,m?y:$l(A._f)):U(h,y),o.mount&&!o.action&&x()}},B=(h,m,w,D,A)=>{let y=!1,N=!1;const K={name:h};if(!t.disabled){if(!w||D){(u.isDirty||g.isDirty)&&(N=r.isDirty,r.isDirty=K.isDirty=E(),y=N!==K.isDirty);const G=$t(F(a,h),m);N=!!F(r.dirtyFields,h),G?fe(r.dirtyFields,h):X(r.dirtyFields,h,!0),K.dirtyFields=r.dirtyFields,y=y||(u.dirtyFields||g.dirtyFields)&&N!==!G}if(w){const G=F(r.touchedFields,h);G||(X(r.touchedFields,h,w),K.touchedFields=r.touchedFields,y=y||(u.touchedFields||g.touchedFields)&&G!==w)}y&&A&&p.state.next(K)}return y?K:{}},I=(h,m,w,D)=>{const A=F(r.errors,h),y=(u.isValid||g.isValid)&&Ze(m)&&r.isValid!==m;if(t.delayError&&w?(l=v(()=>j(h,w)),l(t.delayError)):(clearTimeout(c),l=null,w?X(r.errors,h,w):fe(r.errors,h)),(w?!$t(A,w):A)||!Ee(D)||y){const N={...D,...y&&Ze(m)?{isValid:m}:{},errors:r.errors,name:h};r={...r,...N},p.state.next(N)}},k=async h=>(S(h,!0),await t.resolver(i,t.context,lg(h||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),$=async h=>{const{errors:m}=await k(h);if(S(h),h)for(const w of h){const D=F(m,w);D?X(r.errors,w,D):fe(r.errors,w)}else r.errors=m;return m},C=async(h,m,w={valid:!0})=>{for(const D in h){const A=h[D];if(A){const{_f:y,...N}=A;if(y){const K=s.array.has(y.name),G=A._f&&cg(A._f);G&&u.validatingFields&&S([y.name],!0);const ye=await Dl(A,s.disabled,i,b,t.shouldUseNativeValidation&&!m,K);if(G&&u.validatingFields&&S([y.name]),ye[y.name]&&(w.valid=!1,m||e.shouldUseNativeValidation))break;!m&&(F(ye,y.name)?K?gg(r.errors,ye,y.name):X(r.errors,y.name,ye[y.name]):fe(r.errors,y.name))}!Ee(N)&&await C(N,m,w)}}return w.valid},T=()=>{for(const h of s.unMount){const m=F(n,h);m&&(m._f.refs?m._f.refs.every(w=>!ii(w)):!ii(m._f.ref))&&ft(h)}s.unMount=new Set},E=(h,m)=>!t.disabled&&(h&&m&&X(i,h,m),!$t(Y(),a)),L=(h,m,w)=>rg(h,s,{...o.mount?i:oe(m)?a:Pe(h)?{[h]:m}:m},w,m),z=h=>ei(F(o.mount?i:a,h,t.shouldUnregister?F(a,h,[]):[])),U=(h,m,w={})=>{const D=F(n,h);let A=m;if(D){const y=D._f;y&&(!y.disabled&&X(i,h,xl(m,y)),A=gn(y.ref)&&Le(m)?"":m,ml(y.ref)?[...y.ref.options].forEach(N=>N.selected=A.includes(N.value)):y.refs?Cr(y.ref)?y.refs.forEach(N=>{(!N.defaultChecked||!N.disabled)&&(Array.isArray(A)?N.checked=!!A.find(K=>K===N.value):N.checked=A===N.value||!!A)}):y.refs.forEach(N=>N.checked=N.value===A):ni(y.ref)?y.ref.value="":(y.ref.value=A,y.ref.type||p.state.next({name:h,values:he(i)})))}(w.shouldDirty||w.shouldTouch)&&B(h,A,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&ie(h)},W=(h,m,w)=>{for(const D in m){if(!m.hasOwnProperty(D))return;const A=m[D],y=h+"."+D,N=F(n,y);(s.array.has(h)||de(A)||N&&!N._f)&&!Nt(A)?W(y,A,w):U(y,A,w)}},se=(h,m,w={})=>{const D=F(n,h),A=s.array.has(h),y=he(m);X(i,h,y),A?(p.array.next({name:h,values:he(i)}),(u.isDirty||u.dirtyFields||g.isDirty||g.dirtyFields)&&w.shouldDirty&&p.state.next({name:h,dirtyFields:or(a,i),isDirty:E(h,y)})):D&&!D._f&&!Le(y)?W(h,y,w):U(h,y,w),Al(h,s)?p.state.next({...r,name:h,values:he(i)}):p.state.next({name:o.mount?h:void 0,values:he(i)})},Q=async h=>{o.mount=!0;const m=h.target;let w=m.name,D=!0;const A=F(n,w),y=G=>{D=Number.isNaN(G)||Nt(G)&&isNaN(G.getTime())||$t(G,F(i,w,G))},N=Cl(t.mode),K=Cl(t.reValidateMode);if(A){let G,ye;const zt=m.type?$l(A._f):Yh(h),Ct=h.type===pl.BLUR||h.type===pl.FOCUS_OUT,pb=!ug(A._f)&&!t.resolver&&!F(r.errors,w)&&!A._f.deps||pg(Ct,F(r.touchedFields,w),r.isSubmitted,K,N),li=Al(w,s,Ct);X(i,w,zt),Ct?(!m||!m.readOnly)&&(A._f.onBlur&&A._f.onBlur(h),l&&l(0)):A._f.onChange&&A._f.onChange(h);const ci=B(w,zt,Ct),hb=!Ee(ci)||li;if(!Ct&&p.state.next({name:w,type:h.type,values:he(i)}),pb)return(u.isValid||g.isValid)&&(t.mode==="onBlur"?Ct&&x():Ct||x()),hb&&p.state.next({name:w,...li?{}:ci});if(!Ct&&li&&p.state.next({...r}),t.resolver){const{errors:Ul}=await k([w]);if(S([w]),y(zt),D){const gb=Il(r.errors,n,w),ql=Il(Ul,n,gb.name||w);G=ql.error,w=ql.name,ye=Ee(Ul)}}else S([w],!0),G=(await Dl(A,s.disabled,i,b,t.shouldUseNativeValidation))[w],S([w]),y(zt),D&&(G?ye=!1:(u.isValid||g.isValid)&&(ye=await C(n,!0)));D&&(A._f.deps&&(!Array.isArray(A._f.deps)||A._f.deps.length>0)&&ie(A._f.deps),I(w,ye,G,ci))}},ee=(h,m)=>{if(F(r.errors,m)&&h.focus)return h.focus(),1},ie=async(h,m={})=>{let w,D;const A=Er(h);if(t.resolver){const y=await $(oe(h)?h:A);w=Ee(y),D=h?!A.some(N=>F(y,N)):w}else h?(D=(await Promise.all(A.map(async y=>{const N=F(n,y);return await C(N&&N._f?{[y]:N}:N)}))).every(Boolean),!(!D&&!r.isValid)&&x()):D=w=await C(n);return p.state.next({...!Pe(h)||(u.isValid||g.isValid)&&w!==r.isValid?{}:{name:h},...t.resolver||!h?{isValid:w}:{},errors:r.errors}),m.shouldFocus&&!D&&Ir(n,ee,h?A:s.mount),D},Y=(h,m)=>{let w={...o.mount?i:a};return m&&(w=bl(m.dirtyFields?r.dirtyFields:r.touchedFields,w)),oe(h)?w:Pe(h)?F(w,h):h.map(D=>F(w,D))},Dr=(h,m)=>({invalid:!!F((m||r).errors,h),isDirty:!!F((m||r).dirtyFields,h),error:F((m||r).errors,h),isValidating:!!F(r.validatingFields,h),isTouched:!!F((m||r).touchedFields,h)}),jr=h=>{const m=h?Er(h):void 0;m==null||m.forEach(w=>fe(r.errors,w)),m?m.forEach(w=>{p.state.next({name:w,errors:r.errors})}):p.state.next({errors:{}})},q=(h,m,w)=>{const D=(F(n,h,{_f:{}})._f||{}).ref,A=F(r.errors,h)||{},{ref:y,message:N,type:K,...G}=A;X(r.errors,h,{...G,...m,ref:D}),p.state.next({name:h,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&D&&D.focus&&D.focus()},Mr=(h,m)=>qe(h)?p.state.subscribe({next:w=>"values"in w&&h(L(void 0,m),w)}):L(h,m,!0),Pt=h=>p.state.subscribe({next:m=>{fg(h.name,m.name,h.exact)&&dg(m,h.formState||u,xn,h.reRenderRoot)&&h.callback({values:{...i},...r,...m,defaultValues:a})}}).unsubscribe,Rt=h=>(o.mount=!0,g={...g,...h.formState},Pt({...h,formState:{...f,...h.formState}})),ft=(h,m={})=>{for(const w of h?Er(h):s.mount)s.mount.delete(w),s.array.delete(w),m.keepValue||(fe(n,w),fe(i,w)),!m.keepError&&fe(r.errors,w),!m.keepDirty&&fe(r.dirtyFields,w),!m.keepTouched&&fe(r.touchedFields,w),!m.keepIsValidating&&fe(r.validatingFields,w),!t.shouldUnregister&&!m.keepDefaultValue&&fe(a,w);p.state.next({values:he(i)}),p.state.next({...r,...m.keepDirty?{isDirty:E()}:{}}),!m.keepIsValid&&x()},Lr=({disabled:h,name:m})=>{if(Ze(h)&&o.mount||h||s.disabled.has(m)){const A=s.disabled.has(m)!==!!h;h?s.disabled.add(m):s.disabled.delete(m),A&&o.mount&&!o.action&&x()}},lr=(h,m={})=>{let w=F(n,h);const D=Ze(m.disabled)||Ze(t.disabled);return X(n,h,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:h}},name:h,mount:!0,...m}}),s.mount.add(h),w?Lr({disabled:Ze(m.disabled)?m.disabled:t.disabled,name:h}):M(h,!0,m.value),{...D?{disabled:m.disabled||t.disabled}:{},...t.progressive?{required:!!m.required,min:Ar(m.min),max:Ar(m.max),minLength:Ar(m.minLength),maxLength:Ar(m.maxLength),pattern:Ar(m.pattern)}:{},name:h,onChange:Q,onBlur:Q,ref:A=>{if(A){lr(h,m),w=F(n,h);const y=oe(A.value)&&A.querySelectorAll&&A.querySelectorAll("input,select,textarea")[0]||A,N=ag(y),K=w._f.refs||[];if(N?K.find(G=>G===y):y===w._f.ref)return;X(n,h,{_f:{...w._f,...N?{refs:[...K.filter(ii),y,...Array.isArray(F(a,h))?[{}]:[]],ref:{type:y.type,name:h}}:{ref:y}}}),M(h,!1,void 0,y)}else w=F(n,h,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||m.shouldUnregister)&&!(Zh(s.array,h)&&o.action)&&s.unMount.add(h)}}},pt=()=>t.shouldFocusError&&Ir(n,ee,s.mount),yn=h=>{Ze(h)&&(p.state.next({disabled:h}),Ir(n,(m,w)=>{const D=F(n,w);D&&(m.disabled=D._f.disabled||h,Array.isArray(D._f.refs)&&D._f.refs.forEach(A=>{A.disabled=D._f.disabled||h}))},0,!1))},Or=(h,m)=>async w=>{let D;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let A=he(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:y,values:N}=await k();S(),r.errors=y,A=he(N)}else await C(n);if(s.disabled.size)for(const y of s.disabled)fe(A,y);if(fe(r.errors,"root"),Ee(r.errors)){p.state.next({errors:{}});try{await h(A,w)}catch(y){D=y}}else m&&await m({...r.errors},w),pt(),setTimeout(pt);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ee(r.errors)&&!D,submitCount:r.submitCount+1,errors:r.errors}),D)throw D},Fr=(h,m={})=>{F(n,h)&&(oe(m.defaultValue)?se(h,he(F(a,h))):(se(h,m.defaultValue),X(a,h,he(m.defaultValue))),m.keepTouched||fe(r.touchedFields,h),m.keepDirty||(fe(r.dirtyFields,h),r.isDirty=m.defaultValue?E(h,he(F(a,h))):E()),m.keepError||(fe(r.errors,h),u.isValid&&x()),p.state.next({...r}))},Vt=(h,m={})=>{const w=h?he(h):a,D=he(w),A=Ee(h),y=A?a:D;if(m.keepDefaultValues||(a=w),!m.keepValues){if(m.keepDirtyValues){const N=new Set([...s.mount,...Object.keys(or(a,i))]);for(const K of Array.from(N)){const G=F(r.dirtyFields,K),ye=F(i,K),zt=F(y,K);G&&!oe(ye)?X(y,K,ye):!G&&!oe(zt)&&se(K,zt)}}else{if(Qa&&oe(h))for(const N of s.mount){const K=F(n,N);if(K&&K._f){const G=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(gn(G)){const ye=G.closest("form");if(ye){ye.reset();break}}}}if(m.keepFieldsRef)for(const N of s.mount)se(N,F(y,N));else n={}}i=t.shouldUnregister?m.keepDefaultValues?he(a):{}:he(y),p.array.next({values:{...y}}),p.state.next({values:{...y}})}s={mount:m.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!m.keepIsValid||!!m.keepDirtyValues||!t.shouldUnregister&&!Ee(y),o.watch=!!t.shouldUnregister,o.keepIsValid=!!m.keepIsValid,o.action=!1,m.keepErrors||(r.errors={}),p.state.next({submitCount:m.keepSubmitCount?r.submitCount:0,isDirty:A?!1:m.keepDirty?r.isDirty:!!(m.keepDefaultValues&&!$t(h,a)),isSubmitted:m.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:A?{}:m.keepDirtyValues?m.keepDefaultValues&&i?or(a,i):r.dirtyFields:m.keepDefaultValues&&h?or(a,h):m.keepDirty?r.dirtyFields:{},touchedFields:m.keepTouched?r.touchedFields:{},errors:m.keepErrors?r.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Bt=(h,m)=>Vt(qe(h)?h(i):h,{...t.resetOptions,...m}),_n=(h,m={})=>{const w=F(n,h),D=w&&w._f;if(D){const A=D.refs?D.refs[0]:D.ref;A.focus&&setTimeout(()=>{A.focus(),m.shouldSelect&&qe(A.select)&&A.select()})}},xn=h=>{r={...r,...h}},Nr={control:{register:lr,unregister:ft,getFieldState:Dr,handleSubmit:Or,setError:q,_subscribe:Pt,_runSchema:k,_updateIsValidating:S,_focusError:pt,_getWatch:L,_getDirty:E,_setValid:x,_setFieldArray:_,_setDisabledField:Lr,_setErrors:O,_getFieldArray:z,_reset:Vt,_resetDefaultValues:()=>qe(t.defaultValues)&&t.defaultValues().then(h=>{Bt(h,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:T,_disableForm:yn,_subjects:p,_proxyFormState:u,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(h){o=h},get _defaultValues(){return a},get _names(){return s},set _names(h){s=h},get _formState(){return r},get _options(){return t},set _options(h){t={...t,...h}}},subscribe:Rt,trigger:ie,register:lr,handleSubmit:Or,watch:Mr,setValue:se,getValues:Y,reset:Bt,resetField:Fr,clearErrors:jr,unregister:ft,setError:q,setFocus:_n,getFieldState:Dr};return{...Nr,formControl:Nr}}function mn(e={}){const t=Ce.useRef(void 0),r=Ce.useRef(void 0),[n,a]=Ce.useState({isDirty:!1,isValidating:!1,isLoading:qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:qe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!qe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=mg(e);t.current={...s,formState:n}}const i=t.current.control;return i._options=e,tg(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(s=>({...s,isReady:!0})),i._formState.isReady=!0,o},[i]),Ce.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Ce.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),Ce.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),Ce.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),Ce.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),Ce.useEffect(()=>{var o;e.values&&!$t(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((o=i._options.resetOptions)===null||o===void 0)&&o.keepIsValid||i._setValid(),r.current=e.values,a(s=>({...s}))):i._resetDefaultValues()},[i,e.values]),Ce.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Ce.useMemo(()=>eg(n,i),[i,n]),t.current}const jl=(e,t,r)=>{if(e&&"reportValidity"in e){const n=F(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},vg=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?jl(n.ref,r,e):n.refs&&n.refs.forEach(a=>jl(a,r,e))}},wg=(e,t)=>{t.shouldUseNativeValidation&&vg(e,t);const r={};for(const n in e){const a=F(t.fields,n),i=Object.assign(e[n]||{},{ref:a&&a.ref});if(yg(t.names||Object.keys(e),n)){const o=Object.assign({},F(r,n));X(o,"root",i),X(r,n,o)}else X(r,n,i)}return r},yg=(e,t)=>e.some(r=>r.startsWith(t+"."));var vn=function(e,t,r){return r===void 0&&(r={}),function(n,a,i){try{var o=!i.shouldUseNativeValidation&&i.criteriaMode==="all";return Promise.resolve(Dh(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var c=s.issues[0],f=Eh(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var u=l[f].types,g=u&&u[c.type];l[f]=hl(f,o,l,c.type,g?[].concat(g,c.message):c.message)}s.issues.shift()}return{values:{},errors:wg(l,i)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Ml=27,Ll=12,Ol=10,_g=Qt("enum"),xg=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return vn(lt({checked:St(tl(Me(),Xs()),Ya(n=>Object.entries(n).filter(([a,i])=>i).map(([a,i])=>a)),$r(r.max,t("validation_multiple_choice_max",{count:r.max})),rr(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},kg=ga(({option:e,...t},r)=>d(le,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Fl=Mt("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:ol}}}),Sg=({input:e,onSubmitSuccess:t})=>{var f,u;const r=e.key?(f=V.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,a=n&&e.config.options.length===2,{t:i}=ce(),{register:o,handleSubmit:s,formState:{errors:l}}=mn({defaultValues:{checked:n?{}:_g(r)?Object.fromEntries(r.value.map(g=>[g,!0])):{}},resolver:xg(e.config,i)}),c=Xa();return a?d(le,{children:[d("ul",{style:{maxHeight:6.5*Ml+5*Ll+2*Ol},class:Fl({variant:"booleanLike"}),children:e.config.options.map((g,p)=>d("li",{class:sl,children:d(ll,{type:"submit",ref:b=>{b&&p===0&&(c.current=b)},label:g.label,value:"true",onClick:()=>t({type:"enum",value:[g.value]})})},g.value))}),e.config.minSelected===0&&d("div",{class:"px-2 pb-2",children:d(ct,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):d("form",{noValidate:!0,onSubmit:g=>s(p=>{const b=p.checked;t({type:"enum",value:b})})(g),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*Ml+5*Ll+2*Ol},class:Fl({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((g,p)=>{const b=`checked.${g.value}`,{ref:v,...x}=o(b);return d("li",{class:"relative",children:d(kg,{option:g,autoFocus:p===0,ref:S=>{S&&p===0&&(c.current=S),v(S)},id:b,...x,onClick:n?()=>t({type:"enum",value:[g.value]}):void 0})},g.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(Ft,{}),e.config.minSelected===0&&d(ct,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(ar,{error:(u=l.checked)==null?void 0:u.root})})]})},$g=Qt("number"),Cg=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,a=e.decimalCases??0;return vn(lt({number:St(Qs(t("validation_number")),Gs(r,t("validation_number_min",{min:r})),Ks(n,t("validation_number_max",{max:n})),Hs(i=>i===Number(i.toFixed(a)),t("validation_number_decimal_cases",{count:a})))}))},Eg=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,n=e.key?(u=V.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:a}=ce(),{register:i,handleSubmit:o,formState:{errors:s}}=mn({defaultValues:{number:$g(n)?n.value:r?Number(r):void 0},resolver:Cg(e.config,a)}),{ref:l,...c}=i("number",{required:!e.config.optional,valueAsNumber:!0}),f=me();return je(()=>{f.current&&(f.current.focus(),f.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(g=>{g.number!==void 0&&t({type:"number",value:g.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...c,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:g=>{g&&(f.current=g),l(g)},type:"text",min:e.config.min,max:e.config.max,class:ir({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&d(ct,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),d(ar,{error:s.number})]})},Ag="44",Ig=/^[0-9 ]+$/,Tg=Qt("string"),Dg=Qt("phone"),jg=e=>{const t=St(Me(e("validation_country_code")),Ga(Ig,e("validation_country_code"))),r=St(Me(e("validation_phone")),rr(1,e("validation_phone")),Ya(n=>n.replace(/[^0-9]/g,"")));return vn(lt({countryCode:t,phoneNumber:r}))},Mg=({input:e,onSubmitSuccess:t})=>{var v;const r=e.key?(v=V.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:n}=ce(),[a,i]=ze(),o=Tg(r)?jh(r.value):Dg(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:c},watch:f}=mn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??Ag,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:jg(n)}),{ref:u,...g}=s("phoneNumber",{required:!e.config.optional}),p=me(),b=f("countryCode");return je(()=>{p.current&&(p.current.focus(),p.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(x=>{const S=x.phoneNumber.replace(/[^0-9]/g,""),_=x.countryCode.replace(/[^0-9]/g,"");i(void 0);const j=e.config.minChars??7,O=S.length+_.length;if(O<j)return i(n("validation_phone_min_chars",{count:j}));const M=e.config.maxChars;if(M!=null&&O>M)return i(n("validation_max_chars",{count:M}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:_,phoneNumber:S}}):t({type:"string",value:b+x.phoneNumber})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[d("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[d("span",{children:["+",b]}),d("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Ja).map(([x,S])=>d("option",{value:S,children:[x," (+",S,")"]},x))})]}),d("input",{...g,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(p.current=x),u(x)},class:ir({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&d(ct,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),d(ar,{error:c.countryCode||c.phoneNumber||{message:a}})]})},wn=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Nl=(e,t,r,n)=>r!==void 0&&n*1e3>Pn?e("submission_available_at",{time:Di(r,t)}):e("submission_cooldown",{count:n}),Lg=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},Og=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=ce(),{availableAt:a}=e.config,[i,o]=ze(()=>wn(a)),[s,l]=ze("");Dt(()=>{const f=wn(a);if(o(f),f===0)return;l(Nl(r,n,a,f));const u=setInterval(()=>{const g=wn(a);o(g),!(g>0)&&(clearInterval(u),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(u)},[a,n,r]);const c=i>0;return d("div",{class:"flex flex-col items-center gap-2 py-3",children:[d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":c,"aria-describedby":c?"submit-cooldown":void 0,onClick:()=>{wn(a)>0||t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:Lg(e.config.label,r)}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})}),c&&d("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Nl(r,n,a,i)}),d("p",{role:"status",class:"sr-only",children:s})]})},Fg=160,Pl=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Fg)}px`},Ng={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Pg=Qt("string"),Rg=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return vn(lt({text:{date:St(Me(t("validation_date")),Ga(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:St(Me(t("validation_email")),Ws(t("validation_email")),rr(e.minChars??1,r.minLength),$r(e.maxChars??1/0,r.maxLength)),text:St(Me(),rr(e.minChars??1,r.minLength),$r(e.maxChars??1/0,r.maxLength)),url:St(Me(t("validation_url")),Ys(t("validation_url")),rr(e.minChars??1,r.minLength),$r(e.maxChars??1/0,r.maxLength))}[e.format]}))},Vg={text:({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=ce(),n=e.key?(v=V.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,a=e.config.defaultValue,i=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:c}}=mn({defaultValues:{text:Pg(n)?n.value:a??""},resolver:Rg(e.config,r)}),{ref:f,...u}=o("text",{required:!e.config.optional}),g=me();je(()=>{g.current&&(g.current instanceof HTMLTextAreaElement&&Pl(g.current),g.current.focus(),g.current.select())},[]);const p=e.config.maxChars,b=i&&p!==void 0?l("text").length:void 0;return d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(x=>{t({type:"string",value:x.text})}),children:[d("div",{class:i?"flex items-end gap-2":"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-1",children:[i?d("textarea",{id:"chat-input",...u,rows:2,maxLength:p,autoFocus:!0,"aria-describedby":b!==void 0?"chat-input-count":void 0,onInput:x=>Pl(x.currentTarget),onKeyDown:x=>{var S;x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&(x.preventDefault(),(S=x.currentTarget.form)==null||S.requestSubmit())},ref:x=>{x&&(g.current=x),f(x)},placeholder:e.config.placeholder,class:ir({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):d("input",{id:"chat-input",...u,...Ng[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(g.current=x),f(x)},placeholder:e.config.placeholder,class:ir({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&d(ct,{class:i?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Ft,{})]}),b!==void 0&&p!==void 0&&d("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[b,"/",p]}),d(ar,{error:c.text})]})},phone:Mg,"multiple-choice":Sg,boolean:zh,file:Gh,submit:Og,address:Ph,number:Eg},Bg=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=V.current$.value.flow)==null?void 0:o.data.currentInput,a=me(null),i=()=>ae.onInteractionFn$.value();return je(()=>{var s;(s=a.current)==null||s.scrollTo({top:0})},[n]),d("div",{ref:a,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:d("div",{class:"flex flex-col",onPointerDownCapture:n?i:void 0,onKeyDownCapture:n?i:void 0,children:n?(()=>{const s=Vg[n.type];return d(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:ae.onSubmitSuccessFn$.value,input:n})})():d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:ir({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),d(Ft,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function zg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ug=function(e){return e instanceof RegExp},qg=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Rl=function(e){return typeof e=="string"},Hg=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Wg(e,t,r){var n=0,a=0;if(e==="")return e;if(!e||!Rl(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=t;Ug(i)||(i=new RegExp("("+qg(i)+")","gi"));for(var o=e.split(i),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}a=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=a}return o}var Kg=function(t,r,n){return Array.isArray(t)||(t=[t]),Hg(t.map(function(a){return Rl(a)?Wg(a,r,n):a}))};const Tr=zg(Kg),Gg=/(\[[^\]]+\]\([^)]+\))/g,Yg=/\[([^\]]+)\]\(([^)]+)\)/,Jg=/(https?:\/\/[^\s]+)/g,Zg=/_(.*?)_/g,Xg=/\*\*(.*?)\*\*/g,Qg=/(\\n|\n)/g,Vl="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",eb=e=>{const t=Tr(e,Gg,(s,l)=>{const[,c,f]=s.match(Yg)??[];return f?d("a",{class:Vl,href:f,children:c??f},f+l):d("span",{children:"INVALID LINK"})}),r=Tr(t,Jg,(s,l)=>d("a",{class:Vl,href:s,children:s},s+l)),n=Tr(r,Zg,(s,l)=>d("em",{children:s},s+l)),a=Tr(n,Xg,(s,l)=>d("strong",{children:s},s+l));let i=0;return Tr(a,Qg,()=>d("br",{},`br-${i++}`))},tb=Mt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),rb=({children:e,className:t,animate:r,side:n,...a})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:tb({className:t,side:n,animate:r}),...a,children:e}),Bl=new Map,zl=ff({overrides:{},locale:void 0}),nb=(e,t)=>{const r=t==null?void 0:t.trim();if(!r)return e("job_alerts_privacy");const n=e("job_alerts_privacy_sender",{employer:r});return e("job_alerts_privacy")!==zl("job_alerts_privacy")&&n===zl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},ab=({flow:e,rpcClient:t})=>{const{t:r}=ce(),n=e.data.flowSessionId,a=Bl.get(n)??Fe("offer");Bl.set(n,a);const i=l=>{const c=e.data.submissions[l];return(c==null?void 0:c.type)==="string"?c.value.trim():void 0},o=i("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[i(l.data.key)]:[]).find(l=>!!l);if(!o||a.value==="declined")return null;if(a.value==="success")return d("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(a.value!=="offer"&&a.value!=="error")){a.value="saving";try{await Bu(t,{contact:{email:o,first_name:i("first_name"),last_name:i("last_name")},job:e.job}),a.value="success"}catch{a.value="error"}}};return d("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[d("p",{children:r("job_alerts_offer",{email:o})}),a.value==="error"?d("p",{role:"alert",children:r("job_alerts_error")}):null,d("div",{class:"flex gap-2",children:[d("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:a.value==="saving",onClick:s,children:r("job_alerts_accept")}),d("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:a.value==="saving",onClick:()=>{a.value!=="offer"&&a.value!=="error"||(a.value="declined")},children:r("job_alerts_decline")})]}),d("p",{class:"text-xs",children:nb(r,e.employer)})]})},ib=({message:e})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),ob=({className:e,...t})=>d("div",{"aria-hidden":!0,children:ae.isBotTyping$.value===!0?d("div",{"data-testid":"typing-indicator",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),sb={bot:"left",user:"right"},lb=Mt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),cb=({env:e,lastSentMessageFooter:t,rpcClient:r})=>{const{t:n}=ce(),a=V.current$.value.flow,i=(a==null?void 0:a.data.messages)??[],o=i.findIndex(l=>l.type==="system"&&l.semantic==="submission-closed"),s=a?Va(a):void 0;return d("ol",{"aria-label":n("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[i.map((l,c)=>d(le,{children:[d("li",{class:"flex",tabIndex:c===i.length-1?-1:void 0,children:[s&&l.groupId===s&&!i.slice(c+1).some(f=>f.groupId===s)?t:null,nn(l).with({type:"system"},f=>d("p",{class:lb({variant:f.variant}),children:f.text})).with({type:"text",author:jt.union("bot","user")},f=>{const u=c===i.length-1,g=f.author==="bot"?eb(f.text):f.text;return d(le,{children:d(rb,{animate:u,side:sb[f.author],children:g},c)})}).with({type:"link"},f=>d(ib,{message:f})).with({type:"image"},f=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:f.url,style:{aspectRatio:f.width/f.height}})).with({type:"file"},f=>d(qh,{class:f.author==="bot"?void 0:"ml-auto",file:{name:f.fileName,sizeKb:f.fileSizeKb}})).with({type:"loading"},f=>{const u=i[i.length-1];return!(f===u)||ae.isBotTyping$.value||a!=null&&a.data.isFinished?null:d("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[d(cn,{"aria-hidden":f.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),f.text?d("p",{role:"status",class:"text-neutral-11 text-sm",children:f.text}):null]})}).exhaustive()]}),c===o&&(a!=null&&a.jobAlerts)&&r?d("li",{children:d(ab,{flow:a,rpcClient:r},a.data.flowSessionId)}):null]},c)),e&&e!=="production"&&(a==null?void 0:a.data.isFinished)&&a.data.stagingDestination&&d("li",{class:"text-neutral-11 text-center text-xs",children:a.data.stagingDestination}),d("li",{class:ae.captchaVisible$.value?"flex":"hidden",children:d("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":n("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),d(ob,{},"typing")]})},ub=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:a,env:i})=>{const{flow:o}=V.current$.value;ot(o,"Flow is required to exist to show chatbot body");const s=V.viewState$.value,{chatRef:l,chatService:c}=rp(),{t:f}=ce(),[u,g]=ze();return je(()=>{s==="maximised"&&ae.scrollToEnd()},[s]),je(()=>{var I;const{state:p,flow:b}=V.current$.peek();if(p!=="loaded")throw new Error(f("invalid_state"));let v=b.data.nodeHistory.at(-1);if(ae.scrollToEnd(),V.setInput(void 0),b.data.isFinished)return;const x=()=>{const k=V.current$.peek().flow;!k||k.data.hasInteracted||(V.markAsInteracted(),Us(n,k,"FLOW_INTERACT"))};ae.onInteractionFn$.value=x,v===void 0?(v=Rs(o.nodes).id,V.setCurrentNodeId(v),Us(n,b,"FLOW_START")):V.removeMessagesSentByNodeIds([v,Ua]);const{interpret:S,abort:_,undo:j}=Gp({context:o.context,analytics:{service:n,customProperties:(I=o.analytics)==null?void 0:I.customProperties},apiClient:t,logger:e,talentBankClient:a,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var k;return(k=V.current$.peek().flow)==null?void 0:k.data.applicationRecovery},setApplicationRecovery:V.setApplicationRecovery,persistWriteBarrier:()=>V.persistWriteBarrier(b),getSubmissions:()=>{var k;return(k=V.current$.peek().flow)==null?void 0:k.data.submissions},onInterpret:k=>V.setCurrentNodeId(k.id),onFlowEnd:async()=>{var $;V.markAsFinished();const k=V.current$.peek().flow;ot(k),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:k.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:($=o.analytics)==null?void 0:$.customProperties})}}),O=v,M=()=>{g(()=>j),S(O)},B=new AbortController;return b.offerResume?_h({chatService:c,t:f,signal:B.signal}).then(k=>(V.settleResume(b),k?M():(V.restart(),Ne.flushStateData()))).catch(k=>{k instanceof ht||e.error("Resume prompt failed",k)}):M(),()=>{B.abort(),ae.onInteractionFn$.value===x&&(ae.onInteractionFn$.value=()=>{}),_()}},[n,t,c,e,o,a,f]),d(le,{children:[d("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[d("div",{ref:l,role:"region","aria-label":f("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:d(cb,{env:i,rpcClient:r,lastSentMessageFooter:!Va(o)||!u?null:d(db,{undoFn:u})})}),ae.isReadingHistory$.value&&!o.data.isFinished&&!ae.isBotTyping$.value&&d("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:d(xr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var b,v;ae.scrollToEnd(),(v=((b=l.current)==null?void 0:b.querySelector('li[tabindex="-1"]'))??l.current)==null||v.focus({preventScroll:!0})},children:d(ks,{})})})]}),d(Bg,{logger:e,analytics:n,rpcClient:r})]})},db=({undoFn:e})=>{const{t}=ce();return d("div",{class:"flex flex-1 items-center justify-end px-1",children:d(xr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=V.current$.peek();ot(r),e(r.data.nodeHistory)},children:d("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},fb=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:ub},Symbol.toStringTag,{value:"Module"}))})();
|