@inploi/plugin-chatbot 14.10.4 → 14.10.5

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 CHANGED
@@ -1,9 +1,9 @@
1
- var rh=Object.defineProperty;var nh=(be,ze,Je)=>ze in be?rh(be,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):be[ze]=Je;var pe=(be,ze,Je)=>(nh(be,typeof ze!="symbol"?ze+"":ze,Je),Je);(function(){"use strict";var be;function ze(e){return{lang:(e==null?void 0:e.lang)??(be==null?void 0:be.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(be==null?void 0:be.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(be==null?void 0:be.abortPipeEarly)}}var Je;function Ys(e){return Je==null?void 0:Je.get(e)}var cr;function Js(e){return cr==null?void 0:cr.get(e)}var dr;function Zs(e,t){var i;return(i=dr==null?void 0:dr.get(e))==null?void 0:i.get(t)}function Bn(e){var i,r;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Le(e,t,i,r,n){let a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Bn(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:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Zs(e.reference,l.lang)??(u?Js(l.lang):null)??r.message??Ys(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function ke(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ze())}}}function Xs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Qs(e,t){let i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function zn(e){return{kind:"transformation",type:"transform",reference:zn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function el(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function ur(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function Un(){return{kind:"schema",type:"any",reference:Un,expects:"any",async:!1,get"~standard"(){return ke(this)},"~run"(e){return e.typed=!0,e}}}function Hn(e,t){return{kind:"schema",type:"array",reference:Hn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ke(this)},"~run"(i,r){var a;let n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){let u={type:"array",origin:"value",input:n,key:o,value:s};for(let p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Le(this,"type",i,r);return i}}}function fr(e){return{kind:"schema",type:"boolean",reference:fr,expects:"boolean",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Le(this,"type",t,i),t}}}function St(e,t){return{kind:"schema",type:"literal",reference:St,expects:Bn(e),async:!1,literal:e,message:t,get"~standard"(){return ke(this)},"~run"(i,r){return i.value===this.literal?i.typed=!0:Le(this,"type",i,r),i}}}function qn(e){return{kind:"schema",type:"null",reference:qn,expects:"null",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,i){return t.value===null?t.typed=!0:Le(this,"type",t,i),t}}}function Si(e,t){return{kind:"schema",type:"nullable",reference:Si,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Ci(e){return{kind:"schema",type:"number",reference:Ci,expects:"number",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Le(this,"type",t,i),t}}}function ne(e,t){return{kind:"schema",type:"object",reference:ne,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ke(this)},"~run"(i,r){var a;let n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(let o in this.entries){let s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in n?n[o]:ur(s),u=s["~run"]({value:l},r);if(u.issues){let p={type:"object",origin:"value",input:n,key:o,value:l};for(let d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=el(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Le(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Le(this,"type",i,r);return i}}}function Se(e,t){return{kind:"schema",type:"optional",reference:Se,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Wn(e,t,i){return{kind:"schema",type:"record",reference:Wn,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return ke(this)},"~run"(r,n){var o,s;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let l in a)if(Xs(a,l)){let u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){let h={type:"object",origin:"key",input:a,key:l,value:u};for(let g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}let d=this.value["~run"]({value:u},n);if(d.issues){let h={type:"object",origin:"value",input:a,key:l,value:u};for(let g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!d.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=d.value)}}else Le(this,"type",r,n);return r}}}function Fe(e){return{kind:"schema",type:"string",reference:Fe,expects:"string",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Le(this,"type",t,i),t}}}function Kn(e){let t;if(e)for(let i of e)t?t.push(...i.issues):t=i.issues;return t}function pr(e,t){return{kind:"schema",type:"union",reference:pr,expects:Qs(e.map(i=>i.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return ke(this)},"~run"(i,r){let n,a,o;for(let s of this.options){let l=s["~run"]({value:i.value},r);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(a){if(a.length===1)return a[0];Le(this,"type",i,r,{issues:Kn(a)}),i.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Le(this,"type",i,r,{issues:Kn(o)})}return i}}}function Qt(){return{kind:"schema",type:"unknown",reference:Qt,expects:"unknown",async:!1,get"~standard"(){return ke(this)},"~run"(e){return e.typed=!0,e}}}function tl(...e){return{...e[0],pipe:e,get"~standard"(){return ke(this)},"~run"(t,i){for(let r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function $i(e,t,i){let r=e["~run"]({value:t},ze(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var il=e=>({ok:!0,err:!1,val:e}),rl=e=>({err:!0,ok:!1,val:e}),hr=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function gr(e,t,i){var o,s;let r=e.find(l=>l.type==="pre-apply-result");if(!r)return;let n=(o=t[r.data.participationKey])==null?void 0:o.value,a={};if(n===!0)for(let l of hr(e)){let u=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(u)&&u.length===1&&(u=u[0]),(typeof u=="boolean"||typeof u=="string")&&(a[l.data.key]=u)}return{node_id:r.id,flow_session_id:i,participation:n,answers:a}}function nl(e,t){let i=gr(e,t,""),r=hr(e).map(a=>{let o=a.data.preApply,s=i==null?void 0:i.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(u=>u.value===s);return{key:a.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),n=(i==null?void 0:i.participation)===!1?"skipped":(i==null?void 0:i.participation)===!0&&r.length>0&&r.every(a=>a.valid)?"completed":"unavailable";return{status:n,hasHardConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="advisory"):null,answers:n==="completed"?r:[]}}function al(e,t){let i=new Set(hr(e).map(r=>r.data.key));for(let r of e)r.type==="pre-apply-result"&&(i.add(r.data.key),i.add(r.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([r])=>!i.has(r)))}var ot=class extends Error{constructor(){super("Aborted")}},ei=(e,t)=>{if(t.length===0)return;let i=e;for(let r of t){if(i==null||typeof i!="object")return;i=i[r]}return i},ol=(e,t="all")=>{let i={},r=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(r&&!r.has(n)||(i[n]=a.value))}return i},Gn=(e,t)=>{let i=new Set(e.flatMap(r=>r.type==="add-submission"?[r.data.key]:[]));return Object.entries(t).some(([r,n])=>n!==void 0&&n.type!=="integration"&&!i.has(r))},sl=({key:e,submissions:t})=>{var r;let i=(r=t[e])==null?void 0:r.value;if(typeof i!="string"&&typeof i!="number")throw new Error(`Submission at “${e}” is not a string or number`);return i},Yn=({key:e,path:t,submissions:i,context:r})=>{if(e==="$context"){if(!t)return;let n=ei(r,t);switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${t.join(".")}`,n);return}}return i[e]},ll=e=>{let t=e.split(".").pop();return t?il(t?"."+t:""):rl("No file extension found")},Jn=(e,t)=>{if(t.length===0)return!0;let i=t.map(r=>r.toLowerCase());return e.every(r=>{let n=ll(r.name);return n.ok&&i.includes(n.val.toLowerCase())})},Lt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Ei=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,cl=ne({integration_response:ne({data:ne({redirect_url:Fe(),message:Se(Si(Fe())),button_text:Se(Si(Fe()))})})}),br=e=>$i(cl,e).success,dl=ne({integration_response:ne({status:Se(Qt()),error:ne({message:Fe(),data:Se(Qt())})})}),Zn=e=>$i(dl,e).success,ul=ne({success:St(!0),integration_response:ne({data:ne({outcome:St("pending"),message:Se(Qt())}),error:Se(qn())})}),vr=e=>{let t=$i(ul,e);if(!t.success||br(e))return;let{message:i}=t.output.integration_response.data;return typeof i=="string"&&i.trim()?{message:i}:{}};ne({success:St(!1),message:Se(Qt())});var fl=ne({error:St("Validation failed"),messages:ne({})}),pl=(e,t)=>t===422&&$i(fl,e).success,Xn=(e,t)=>{if(!Zn(e))return;let i=e.integration_response,r=i.error.data,n=typeof r=="object"&&r!==null?r:{},a=v=>typeof n[v]=="string"?n[v]:void 0,o=v=>typeof n[v]=="boolean"?n[v]:void 0,s=v=>{let y=n[v];return Number.isSafeInteger(y)&&y>=0?y:void 0},l=v=>{let y=a(v),k=y===void 0?NaN:Date.parse(y);return Number.isFinite(k)?k:void 0},u=typeof i.status=="number"?i.status:t,p=a("phase"),d=a("verdict"),h=a("code"),g=u===409&&p==="submit"&&d==="confirmed"?"duplicate":u===410&&h==="job_closed"?"closed":p==="submit"&&d==="unknown"?"unknown":void 0;return{message:i.error.message,status:u,phase:p,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:d,code:h,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:g}},Qn=3e4,hl=2e4,gl=6e4,wr=12e4,ea=6*60*6e4,bl=60*6e4,ta=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,i=t===void 0?0:t-Date.now();return i>0&&i<=ea?t:void 0},vl=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=ta(e);return t===void 0?{}:{until:t}},ia=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),wl=(e,t)=>{let i=ta(t);if(i!==void 0)return{waitMs:i-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:Qn};let r=(e??0)+1,n=Math.min(r*hl,gl),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(n,a),wr),throttles:r}},ra=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",ml=e=>{if(!Zn(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},yl=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",_l=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",xl=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,kl=e=>{if(typeof e!="object"||e===null)return null;let t=e.integration_response;if(typeof t!="object"||t===null)return null;let i=t;if(typeof i.status!="number"||i.service!==void 0&&typeof i.service!="string")return null;let r="data"in i,n=i.error,a=typeof n=="object"&&n!==null&&typeof n.message=="string"&&"data"in n;if(!r&&!a)return null;let o=r?i.data:n.data??null;return{service:i.service??"INVALID_SERVICE",response:{status:i.status,payload:o},...vr(e)&&{outcome:"pending"}}},Sl=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},Cl=(e,t)=>{if(!Sl(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},$l=({context:e,schema:t,logger:i})=>{if(t)for(let r in t){let n=t[r];if(!n)continue;let a=ei(e,r.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${r} is required`;throw i.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${r} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${r} is not a string`);break;default:n.type}}};let Ze;function na(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)}}let mr;function El(e){return mr==null?void 0:mr.get(e)}let yr;function Il(e){return yr==null?void 0:yr.get(e)}let _r;function Al(e,t){var i;return(i=_r==null?void 0:_r.get(e))==null?void 0:i.get(t)}function aa(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Ue(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??aa(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:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Al(e.reference,l.lang)??(u?Il(l.lang):null)??r.message??El(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function De(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},na())}}}function Tl(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Fl(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function xr(e,t){return{kind:"validation",type:"max_length",reference:xr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Ii(e,t){return{kind:"validation",type:"min_length",reference:Ii,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function kr(){return{kind:"transformation",type:"trim",reference:kr,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Dl(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function Ai(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function oa(e,t){return{kind:"schema",type:"array",reference:oa,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return De(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Ue(this,"type",i,r);return i}}}function Sr(e){return{kind:"schema",type:"boolean",reference:Sr,expects:"boolean",async:!1,message:e,get"~standard"(){return De(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Ue(this,"type",t,i),t}}}function Y(e,t){return{kind:"schema",type:"nullable",reference:Y,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=Ai(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function ti(e,t){return{kind:"schema",type:"nullish",reference:ti,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(i,r){return(i.value===null||i.value===void 0)&&(this.default!==void 0&&(i.value=Ai(this,i,r)),i.value===null||i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Ct(e){return{kind:"schema",type:"number",reference:Ct,expects:"number",async:!1,message:e,get"~standard"(){return De(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ue(this,"type",t,i),t}}}function Me(e,t){return{kind:"schema",type:"object",reference:Me,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return De(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:Ai(s),u=s["~run"]({value:l},r);if(u.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=Dl(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ue(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Ue(this,"type",i,r);return i}}}function sa(e,t){return{kind:"schema",type:"optional",reference:sa,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return De(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=Ai(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Vt(e,t){return{kind:"schema",type:"picklist",reference:Vt,expects:Fl(e.map(aa),"|"),async:!1,options:e,message:t,get"~standard"(){return De(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:Ue(this,"type",i,r),i}}}function Cr(e,t,i){return{kind:"schema",type:"record",reference:Cr,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return De(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(Tl(a,l)){const u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}const d=this.value["~run"]({value:u},n);if(d.issues){const h={type:"object",origin:"value",input:a,key:l,value:u};for(const g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!d.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=d.value)}}else Ue(this,"type",r,n);return r}}}function R(e){return{kind:"schema",type:"string",reference:R,expects:"string",async:!1,message:e,get"~standard"(){return De(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Ue(this,"type",t,i),t}}}function la(){return{kind:"schema",type:"unknown",reference:la,expects:"unknown",async:!1,get"~standard"(){return De(this)},"~run"(e){return e.typed=!0,e}}}function $r(...e){return{...e[0],pipe:e,get"~standard"(){return De(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Er(e,t,i){const r=e["~run"]({value:t},na(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var Ml=e=>e,Nl={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Ll(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function ah(e){return e}var Vl=["agent","sdk","form","integration","migration"],Ol=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],Pl=["screening","cv_match","interview","overall"],Rl=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],jl=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],ca=Vt(Vl),Bl=Vt(Ol),zl=$r(R(),kr(),Ii(1),xr(100)),Ul=Vt(Pl),Hl=Vt(Rl),ql=$r(R(),kr(),Ii(1),xr(100)),Wl=Vt(jl),da=Me({id:R(),email:Y(R()),firstName:Y(R()),lastName:Y(R()),phone:Y(R()),source:Y(ca),identifiedAt:Y(R()),createdAt:R(),updatedAt:R()}),ua=$r(R(),Ii(1)),Ir=Cr(R(),la()),Kl=Me({id:R(),applicationId:R(),status:Hl,scheduledAt:Y(R()),completedAt:Y(R()),meta:Y(Ir),createdAt:R(),updatedAt:R()}),Gl=Me({score:Ct(),reason:R(),confidence:Ct()}),fa=Me({id:R(),candidateId:R(),jobId:Ct(),stage:zl,stageGroup:Bl,stageEnteredAt:R(),rating:Y(Ct()),disqualifiedAt:Y(R()),disqualificationReason:Y(ql),disqualificationNote:Y(R()),source:Wl,sourceDetail:Y(R()),sessionId:Y(Ct()),externalApplicationId:Y(R()),meta:Y(Ir),context:Y(Ir),scoredAt:Y(R()),createdAt:R(),updatedAt:R()}),Yl=Me({id:R(),applicationId:R(),scoreType:Ul,score:Y(Ct()),reason:Y(R()),categories:Y(Cr(R(),Gl)),scoredBy:Y(R()),createdAt:R()});({...fa.entries},{...da.entries});var Jl=Me({anonymousId:ua,email:ua,firstName:ti(R()),lastName:ti(R()),phone:ti(R()),source:ti(ca)}),Zl=Me({candidateId:R(),isNew:Sr()}),Xl=Me({id:R(),stageGroup:R(),createdAt:R()}),Ql=Me({isDuplicate:Sr(),existingApplication:sa(Xl)}),ec=({environment:e,publishableKey:t,logger:i})=>{let r=Nl[e];return{async checkDuplicate(n){try{let a=new URLSearchParams({email:n.email,scope:n.scope});n.scope==="job"&&n.jobId!=null&&a.set("job_id",String(n.jobId));let o=await fetch(`${r}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return i.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Er(Ql,s);return l.success?l.output:(i.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 i.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return i.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:n.email,firstName:n.firstName,lastName:n.lastName,phone:n.phone,anonymousId:n.anonymousId,source:n.source??"sdk"},o=Er(Jl,a);if(!o.success)return i.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${r}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return i.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Er(Zl,await s.json());return l.success?l.output:(i.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return i.error("[TalentBankClient] identify failed:",a),null}}}},pa=tl(pr([Fe(),Ci()]),zn(String)),ha=ne({id:pa,version:Ci(),build:Ci(),nodes:Hn(Un()),context_schema:Se(Si(Wn(Fe(),ne({required:fr(),type:pr([St("string"),St("number")])}))))}),tc=ne({flow:ha}),ic=ne({company:ne({name:Fe()}),flow:ha,job:ne({id:pa,title:Fe()}),user:Se(ne({city:Se(Fe()),country:Se(Fe()),isEU:Se(fr()),continent:Se(Fe())}))}),rc=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),nc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Ll(),response:ic}},ac={pathname:"/flow/id/:id",method:"GET",schema:{response:tc}},ii,F,ga,ba,$t,va,wa,Ar,ma,Ot={},ya=[],oc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ti=Array.isArray;function Xe(e,t){for(var i in t)e[i]=t[i];return e}function _a(e){var t=e.parentNode;t&&t.removeChild(e)}function Ie(e,t,i){var r,n,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?ii.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return ri(e,o,r,n,null)}function ri(e,t,i,r,n){var a={type:e,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++ga};return n==null&&F.vnode!=null&&F.vnode(a),a}function sc(){return{current:null}}function ae(e){return e.children}function Ve(e,t){this.props=e,this.context=t}function Fi(e,t){if(t==null)return e.__?Fi(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?Fi(e):null}function xa(e){var t,i;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null){e.__e=e.__c.base=i.__e;break}return xa(e)}}function Tr(e){(!e.__d&&(e.__d=!0)&&$t.push(e)&&!Di.__r++||va!==F.debounceRendering)&&((va=F.debounceRendering)||wa)(Di)}function Di(){var e,t,i,r,n,a,o,s,l;for($t.sort(Ar);e=$t.shift();)e.__d&&(t=$t.length,r=void 0,n=void 0,a=void 0,s=(o=(i=e).__v).__e,(l=i.__P)&&(r=[],n=[],(a=Xe({},o)).__v=o.__v+1,Fr(l,o,a,i.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s??Fi(o),o.__h,n),Aa(r,o,n),o.__e!=s&&xa(o)),$t.length>t&&$t.sort(Ar));Di.__r=0}function ka(e,t,i,r,n,a,o,s,l,u,p){var d,h,g,v,y,k,_,w,x,I,E=0,T=r&&r.__k||ya,L=T.length,z=L,V=t.length;for(i.__k=[],d=0;d<V;d++)(v=i.__k[d]=(v=t[d])==null||typeof v=="boolean"||typeof v=="function"?null:typeof v=="string"||typeof v=="number"||typeof v=="bigint"?ri(null,v,null,null,v):Ti(v)?ri(ae,{children:v},null,null,null):v.__b>0?ri(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null&&(v.__=i,v.__b=i.__b+1,(w=lc(v,T,_=d+E,z))===-1?g=Ot:(g=T[w]||Ot,T[w]=void 0,z--),Fr(e,v,g,n,a,o,s,l,u,p),y=v.__e,(h=v.ref)&&g.ref!=h&&(g.ref&&Dr(g.ref,null,v),p.push(h,v.__c||y,v)),y!=null&&(k==null&&(k=y),I=!(x=g===Ot||g.__v===null)&&w===_,x?w==-1&&E--:w!==_&&(w===_+1?(E++,I=!0):w>_?z>V-_?(E+=w-_,I=!0):E--:E=w<_&&w==_-1?w-_:0),_=d+E,I=I||w==d&&!x,typeof v.type!="function"||w===_&&g.__k!==v.__k?typeof v.type=="function"||I?v.__d!==void 0?(l=v.__d,v.__d=void 0):l=y.nextSibling:l=Ca(e,y,l):l=Sa(v,l,e),typeof i.type=="function"&&(i.__d=l)));for(i.__e=k,d=L;d--;)T[d]!=null&&(typeof i.type=="function"&&T[d].__e!=null&&T[d].__e==i.__d&&(i.__d=T[d].__e.nextSibling),Ta(T[d],T[d]))}function Sa(e,t,i){for(var r,n=e.__k,a=0;n&&a<n.length;a++)(r=n[a])&&(r.__=e,t=typeof r.type=="function"?Sa(r,t,i):Ca(i,r.__e,t));return t}function Qe(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ti(e)?e.some(function(i){Qe(i,t)}):t.push(e)),t}function Ca(e,t,i){return i==null||i.parentNode!==e?e.insertBefore(t,null):t==i&&t.parentNode!=null||e.insertBefore(t,i),t.nextSibling}function lc(e,t,i,r){var n=e.key,a=e.type,o=i-1,s=i+1,l=t[i];if(l===null||l&&n==l.key&&a===l.type)return i;if(r>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&n==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&n==l.key&&a===l.type)return s;s++}}return-1}function cc(e,t,i,r,n){var a;for(a in i)a==="children"||a==="key"||a in t||Mi(e,a,null,i[a],r);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||i[a]===t[a]||Mi(e,a,t[a],i[a],r)}function $a(e,t,i){t[0]==="-"?e.setProperty(t,i??""):e[t]=i==null?"":typeof i!="number"||oc.test(t)?i:i+"px"}function Mi(e,t,i,r,n){var a;e:if(t==="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)i&&t in i||$a(e.style,t,"");if(i)for(t in i)r&&i[t]===r[t]||$a(e.style,t,i[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]=i,i?r||e.addEventListener(t,a?Ia:Ea,a):e.removeEventListener(t,a?Ia:Ea,a);else if(t!=="dangerouslySetInnerHTML"){if(n)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]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,i))}}function Ea(e){return this.l[e.type+!1](F.event?F.event(e):e)}function Ia(e){return this.l[e.type+!0](F.event?F.event(e):e)}function Fr(e,t,i,r,n,a,o,s,l,u){var p,d,h,g,v,y,k,_,w,x,I,E,T,L,z,V=t.type;if(t.constructor!==void 0)return null;i.__h!=null&&(l=i.__h,s=t.__e=i.__e,t.__h=null,a=[s]),(p=F.__b)&&p(t);try{e:if(typeof V=="function"){if(_=t.props,w=(p=V.contextType)&&r[p.__c],x=p?w?w.props.value:p.__:r,i.__c?k=(d=t.__c=i.__c).__=d.__E:("prototype"in V&&V.prototype.render?t.__c=d=new V(_,x):(t.__c=d=new Ve(_,x),d.constructor=V,d.render=uc),w&&w.sub(d),d.props=_,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),V.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Xe({},d.__s)),Xe(d.__s,V.getDerivedStateFromProps(_,d.__s))),g=d.props,v=d.state,d.__v=t,h)V.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(V.getDerivedStateFromProps==null&&_!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,x),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(_,d.__s,x)===!1||t.__v===i.__v)){for(t.__v!==i.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.forEach(function(P){P&&(P.__=t)}),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,x),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,v,y)})}if(d.context=x,d.props=_,d.__P=e,d.__e=!1,E=F.__r,T=0,"prototype"in V&&V.prototype.render){for(d.state=d.__s,d.__d=!1,E&&E(t),p=d.render(d.props,d.state,d.context),L=0;L<d._sb.length;L++)d.__h.push(d._sb[L]);d._sb=[]}else do d.__d=!1,E&&E(t),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++T<25);d.state=d.__s,d.getChildContext!=null&&(r=Xe(Xe({},r),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(y=d.getSnapshotBeforeUpdate(g,v)),ka(e,Ti(z=p!=null&&p.type===ae&&p.key==null?p.props.children:p)?z:[z],t,i,r,n,a,o,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),k&&(d.__E=d.__=null)}else a==null&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=dc(i.__e,t,i,r,n,a,o,l,u);(p=F.diffed)&&p(t)}catch(P){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),F.__e(P,t,i)}}function Aa(e,t,i){for(var r=0;r<i.length;r++)Dr(i[r],i[++r],i[++r]);F.__c&&F.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){F.__e(a,n.__v)}})}function dc(e,t,i,r,n,a,o,s,l){var u,p,d,h=i.props,g=t.props,v=t.type,y=0;if(v==="svg"&&(n=!0),a!=null){for(;y<a.length;y++)if((u=a[y])&&"setAttribute"in u==!!v&&(v?u.localName===v:u.nodeType===3)){e=u,a[y]=null;break}}if(e==null){if(v===null)return document.createTextNode(g);e=n?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,g.is&&g),a=null,s=!1}if(v===null)h===g||s&&e.data===g||(e.data=g);else{if(a=a&&ii.call(e.childNodes),p=(h=i.props||Ot).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},y=0;y<e.attributes.length;y++)h[e.attributes[y].name]=e.attributes[y].value;(d||p)&&(d&&(p&&d.__html==p.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(cc(e,g,h,n,s),d)t.__k=[];else if(ka(e,Ti(y=t.props.children)?y:[y],t,i,r,n&&v!=="foreignObject",a,o,a?a[0]:i.__k&&Fi(i,0),s,l),a!=null)for(y=a.length;y--;)a[y]!=null&&_a(a[y]);s||("value"in g&&(y=g.value)!==void 0&&(y!==e.value||v==="progress"&&!y||v==="option"&&y!==h.value)&&Mi(e,"value",y,h.value,!1),"checked"in g&&(y=g.checked)!==void 0&&y!==e.checked&&Mi(e,"checked",y,h.checked,!1))}return e}function Dr(e,t,i){try{typeof e=="function"?e(t):e.current=t}catch(r){F.__e(r,i)}}function Ta(e,t,i){var r,n;if(F.unmount&&F.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Dr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){F.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&Ta(r[n],t,i||typeof e.type!="function");i||e.__e==null||_a(e.__e),e.__=e.__e=e.__d=void 0}function uc(e,t,i){return this.constructor(e,i)}function Et(e,t,i){var r,n,a,o;F.__&&F.__(e,t),n=(r=typeof i=="function")?null:i&&i.__k||t.__k,a=[],o=[],Fr(t,e=(!r&&i||t).__k=Ie(ae,null,[e]),n||Ot,Ot,t.ownerSVGElement!==void 0,!r&&i?[i]:n?null:t.firstChild?ii.call(t.childNodes):null,a,!r&&i?i:n?n.__e:t.firstChild,r,o),Aa(a,e,o)}function Fa(e,t){Et(e,t,Fa)}function fc(e,t,i){var r,n,a,o,s=Xe({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?n=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ii.call(arguments,2):i),ri(e.type,s,r||e.key,n||e.ref,null)}function Da(e,t){var i={__c:t="__cC"+ma++,__:e,Consumer:function(r,n){return r.children(n)},Provider:function(r){var n,a;return this.getChildContext||(n=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Tr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),r.children}};return i.Provider.__=i.Consumer.contextType=i}ii=ya.slice,F={__e:function(e,t,i,r){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,r||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},ga=0,ba=function(e){return e!=null&&e.constructor===void 0},Ve.prototype.setState=function(e,t){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xe({},this.state),typeof e=="function"&&(e=e(Xe({},i),this.props)),e&&Xe(i,e),e!=null&&this.__v&&(t&&this._sb.push(t),Tr(this))},Ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Tr(this))},Ve.prototype.render=ae,$t=[],wa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(e,t){return e.__v.__b-t.__v.__b},Di.__r=0,ma=0;function Ma(e){var t,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(i=Ma(e[t]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function et(){for(var e,t,i=0,r="",n=arguments.length;i<n;i++)(e=arguments[i])&&(t=Ma(e))&&(r&&(r+=" "),r+=t);return r}const Na=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,La=et,It=(e,t)=>i=>{var r;if((t==null?void 0:t.variants)==null)return La(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(u=>{const p=i==null?void 0:i[u],d=a==null?void 0:a[u];if(p===null)return null;const h=Na(p)||Na(d);return n[u][h]}),s=i&&Object.entries(i).reduce((u,p)=>{let[d,h]=p;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:d,className:h,...g}=p;return Object.entries(g).every(v=>{let[y,k]=v;return Array.isArray(k)?k.includes({...a,...s}[y]):{...a,...s}[y]===k})?[...u,d,h]:u},[]);return La(e,o,l,i==null?void 0:i.class,i==null?void 0:i.className)};var st,X,Mr,Va,Pt=0,Oa=[],Ni=[],Pa=F.__b,Ra=F.__r,ja=F.diffed,Ba=F.__c,za=F.unmount;function Rt(e,t){F.__h&&F.__h(X,e,Pt||t),Pt=0;var i=X.__H||(X.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:Ni}),i.__[e]}function Oe(e){return Pt=1,Ua(Wa,e)}function Ua(e,t,i){var r=Rt(st++,2);if(r.t=e,!r.__c&&(r.__=[i?i(t):Wa(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,s);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=X,!X.u)){var n=function(s,l,u){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,s,l,u);var d=!1;return p.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(d=!0)}}),!(!d&&r.__c.props===s)&&(!a||a.call(this,s,l,u))};X.u=!0;var a=X.shouldComponentUpdate,o=X.componentWillUpdate;X.componentWillUpdate=function(s,l,u){if(this.__e){var p=a;a=void 0,n(s,l,u),a=p}o&&o.call(this,s,l,u)},X.shouldComponentUpdate=n}return r.__N||r.__}function Li(e,t){var i=Rt(st++,3);!F.__s&&Lr(i.__H,t)&&(i.__=e,i.i=t,X.__H.__h.push(i))}function Ce(e,t){var i=Rt(st++,4);!F.__s&&Lr(i.__H,t)&&(i.__=e,i.i=t,X.__h.push(i))}function ve(e){return Pt=5,lt(function(){return{current:e}},[])}function pc(e,t,i){Pt=6,Ce(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},i==null?i:i.concat(e))}function lt(e,t){var i=Rt(st++,7);return Lr(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function hc(e,t){return Pt=8,lt(function(){return e},t)}function Ha(e){var t=X.context[e.__c],i=Rt(st++,9);return i.c=e,t?(i.__==null&&(i.__=!0,t.sub(X)),t.props.value):e.__}function gc(e,t){F.useDebugValue&&F.useDebugValue(t?t(e):e)}function bc(){var e=Rt(st++,11);if(!e.__){for(var t=X.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var i=t.__m||(t.__m=[0,0]);e.__="P"+i[0]+"-"+i[1]++}return e.__}function vc(){for(var e;e=Oa.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Vi),e.__H.__h.forEach(Nr),e.__H.__h=[]}catch(t){e.__H.__h=[],F.__e(t,e.__v)}}F.__b=function(e){X=null,Pa&&Pa(e)},F.__r=function(e){Ra&&Ra(e),st=0;var t=(X=e.__c).__H;t&&(Mr===X?(t.__h=[],X.__h=[],t.__.forEach(function(i){i.__N&&(i.__=i.__N),i.__V=Ni,i.__N=i.i=void 0})):(t.__h.forEach(Vi),t.__h.forEach(Nr),t.__h=[],st=0)),Mr=X},F.diffed=function(e){ja&&ja(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Oa.push(t)!==1&&Va===F.requestAnimationFrame||((Va=F.requestAnimationFrame)||wc)(vc)),t.__H.__.forEach(function(i){i.i&&(i.__H=i.i),i.__V!==Ni&&(i.__=i.__V),i.i=void 0,i.__V=Ni})),Mr=X=null},F.__c=function(e,t){t.some(function(i){try{i.__h.forEach(Vi),i.__h=i.__h.filter(function(r){return!r.__||Nr(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],F.__e(r,i.__v)}}),Ba&&Ba(e,t)},F.unmount=function(e){za&&za(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach(function(r){try{Vi(r)}catch(n){t=n}}),i.__H=void 0,t&&F.__e(t,i.__v))};var qa=typeof requestAnimationFrame=="function";function wc(e){var t,i=function(){clearTimeout(r),qa&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(i,100);qa&&(t=requestAnimationFrame(i))}function Vi(e){var t=X,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),X=t}function Nr(e){var t=X;e.__c=e.__(),X=t}function Lr(e,t){return!e||e.length!==t.length||t.some(function(i,r){return i!==e[r]})}function Wa(e,t){return typeof t=="function"?t(e):t}function Ka(e,t){for(var i in t)e[i]=t[i];return e}function Vr(e,t){for(var i in e)if(i!=="__source"&&!(i in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Pr(e){this.props=e}function mc(e,t){function i(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,n)||!o:Vr(this.props,n)}function r(n){return this.shouldComponentUpdate=i,Ie(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Pr.prototype=new Ve).isPureReactComponent=!0,Pr.prototype.shouldComponentUpdate=function(e,t){return Vr(this.props,e)||Vr(this.state,t)};var Ga=F.__b;F.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ga&&Ga(e)};var yc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(e){function t(i){var r=Ka({},i);return delete r.ref,e(r,i.ref||null)}return t.$$typeof=yc,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ya=function(e,t){return e==null?null:Qe(Qe(e).map(t))},_c={map:Ya,forEach:Ya,count:function(e){return e?Qe(e).length:0},only:function(e){var t=Qe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Qe},xc=F.__e;F.__e=function(e,t,i,r){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=i.__e,t.__k=i.__k),n.__c(e,t)}xc(e,t,i,r)};var Ja=F.unmount;function Za(e,t,i){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Ka({},e)).__c!=null&&(e.__c.__P===i&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Za(r,t,i)})),e}function Xa(e,t,i){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Xa(r,t,i)}),e.__c&&e.__c.__P===t&&(e.__e&&i.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=i)),e}function ni(){this.__u=0,this.t=null,this.__b=null}function Qa(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function eo(e){var t,i,r;function n(a){if(t||(t=e()).then(function(o){i=o.default||o},function(o){r=o}),r)throw r;if(!i)throw t;return Ie(i,a)}return n.displayName="Lazy",n.__f=!0,n}function ai(){this.u=null,this.o=null}F.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ja&&Ja(e)},(ni.prototype=new Ve).__c=function(e,t){var i=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(i);var n=Qa(r.__v),a=!1,o=function(){a||(a=!0,i.__R=null,n?n(s):s())};i.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Xa(u,u.__c.__P,u.__c.__O)}var p;for(r.setState({__a:r.__b=null});p=r.t.pop();)p.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ni.prototype.componentWillUnmount=function(){this.t=[]},ni.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Za(this.__b,i,r.__O=r.__P)}this.__b=null}var n=t.__a&&Ie(ae,null,e.fallback);return n&&(n.__h=null),[Ie(ae,null,t.__a?null:e.children),n]};var to=function(e,t,i){if(++i[1]===i[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(i=e.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;e.u=i=i[2]}};function kc(e){return this.getChildContext=function(){return e.context},e.children}function Sc(e){var t=this,i=e.i;t.componentWillUnmount=function(){Et(null,t.l),t.l=null,t.i=null},t.i&&t.i!==i&&t.componentWillUnmount(),e.__v?(t.l||(t.i=i,t.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,n){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Et(Ie(kc,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Cc(e,t){var i=Ie(Sc,{__v:e,i:t});return i.containerInfo=t,i}(ai.prototype=new Ve).__a=function(e){var t=this,i=Qa(t.__v),r=t.o.get(e);return r[0]++,function(n){var a=function(){t.props.revealOrder?(r.push(n),to(t,e,r)):n()};i?i(a):a()}},ai.prototype.render=function(e){this.u=null,this.o=new Map;var t=Qe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var i=t.length;i--;)this.o.set(t[i],this.u=[1,0,this.u]);return e.children},ai.prototype.componentDidUpdate=ai.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,i){to(e,i,t)})};var io=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,$c=/^(?: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]/,Ec=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ic=/[A-Z0-9]/g,Ac=typeof document<"u",Tc=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Fc(e,t,i){return t.__k==null&&(t.textContent=""),Et(e,t),typeof i=="function"&&i(),e?e.__c:null}function Dc(e,t,i){return Fa(e,t),typeof i=="function"&&i(),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 ro=F.event;function Mc(){}function Nc(){return this.cancelBubble}function Lc(){return this.defaultPrevented}F.event=function(e){return ro&&(e=ro(e)),e.persist=Mc,e.isPropagationStopped=Nc,e.isDefaultPrevented=Lc,e.nativeEvent=e};var jr,Vc={enumerable:!1,configurable:!0,get:function(){return this.class}},no=F.vnode;F.vnode=function(e){typeof e.type=="string"&&function(t){var i=t.props,r=t.type,n={};for(var a in i){var o=i[a];if(!(a==="value"&&"defaultValue"in i&&o==null||Ac&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in i&&i.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||r!=="input"&&r!=="textarea"||Tc(i.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Ec.test(a)?a=s:r.indexOf("-")===-1&&$c.test(a)?a=a.replace(Ic,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}r=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),r=="select"&&n.defaultValue!=null&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),i.class&&!i.className?(n.class=i.class,Object.defineProperty(n,"className",Vc)):(i.className&&!i.class||i.class&&i.className)&&(n.class=n.className=i.className),t.props=n}(e),e.$$typeof=io,no&&no(e)};var ao=F.__r;F.__r=function(e){ao&&ao(e),jr=e.__c};var oo=F.diffed;F.diffed=function(e){oo&&oo(e);var t=e.props,i=e.__e;i!=null&&e.type==="textarea"&&"value"in t&&t.value!==i.value&&(i.value=t.value==null?"":t.value),jr=null};var Oc={ReactCurrentDispatcher:{current:{readContext:function(e){return jr.__n[e.__c].props.value}}}};function Pc(e){return Ie.bind(null,e)}function so(e){return!!e&&e.$$typeof===io}function Rc(e){return so(e)?fc.apply(null,arguments):e}function jc(e){return!!e.__k&&(Et(null,e),!0)}function Bc(e){return e&&(e.base||e.nodeType===1&&e)||null}var zc=function(e,t){return e(t)},Uc=function(e,t){return e(t)},Hc=ae;function lo(e){e()}function qc(e){return e}function Wc(){return[!1,lo]}var Kc=Ce;function Gc(e,t){var i=t(),r=Oe({h:{__:i,v:t}}),n=r[0].h,a=r[1];return Ce(function(){n.__=i,n.v=t,Or(n.__,t())||a({h:n})},[e,i,t]),Li(function(){return Or(n.__,n.v())||a({h:n}),e(function(){Or(n.__,n.v())||a({h:n})})},[e]),i}var we={useState:Oe,useId:bc,useReducer:Ua,useEffect:Li,useLayoutEffect:Ce,useInsertionEffect:Kc,useTransition:Wc,useDeferredValue:qc,useSyncExternalStore:Gc,startTransition:lo,useRef:ve,useImperativeHandle:pc,useMemo:lt,useCallback:hc,useContext:Ha,useDebugValue:gc,version:"17.0.2",Children:_c,render:Fc,hydrate:Dc,unmountComponentAtNode:jc,createPortal:Cc,createElement:Ie,createContext:Da,createFactory:Pc,cloneElement:Rc,createRef:sc,Fragment:ae,isValidElement:so,findDOMNode:Bc,Component:Ve,PureComponent:Pr,memo:mc,forwardRef:Rr,flushSync:Uc,unstable_batchedUpdates:zc,StrictMode:Hc,Suspense:ni,SuspenseList:ai,lazy:eo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Oc};const me=Symbol.for("@ts-pattern/matcher"),co=Symbol.for("@ts-pattern/isVariadic"),Oi="@ts-pattern/anonymous-select-key",Br=e=>!!(e&&typeof e=="object"),Pi=e=>e&&!!e[me],oe=(e,t,i)=>{if(Pi(e)){const r=e[me](),{matched:n,selections:a}=r.match(t);return n&&a&&Object.keys(a).forEach(o=>i(o,a[o])),n}if(Br(e)){if(!Br(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],n=[],a=[];for(const o of e.keys()){const s=e[o];Pi(s)&&s[co]?a.push(s):a.length?n.push(s):r.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<r.length+n.length)return!1;const o=t.slice(0,r.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(r.length,n.length===0?1/0:-n.length);return r.every((u,p)=>oe(u,o[p],i))&&n.every((u,p)=>oe(u,s[p],i))&&(a.length===0||oe(a[0],l,i))}return e.length===t.length&&e.every((o,s)=>oe(o,t[s],i))}return Reflect.ownKeys(e).every(r=>{const n=e[r];return(r in t||Pi(a=n)&&a[me]().matcherType==="optional")&&oe(n,t[r],i);var a})}return Object.is(t,e)},ye=e=>{var t,i,r;return Br(e)?Pi(e)?(t=(i=(r=e[me]()).getSelectionKeys)==null?void 0:i.call(r))!=null?t:[]:Array.isArray(e)?oi(e,ye):oi(Object.values(e),ye):[]},oi=(e,t)=>e.reduce((i,r)=>i.concat(t(r)),[]);function Yc(...e){if(e.length===1){const[t]=e;return i=>oe(t,i,()=>{})}if(e.length===2){const[t,i]=e;return oe(t,i,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ue(e){return Object.assign(e,{optional:()=>Ur(e),and:t=>Q(e,t),or:t=>uo(e,t),select:t=>t===void 0?si(e):si(t,e)})}function zr(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let i=0;const r=[{value:Object.assign(t,{[co]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=r[i++])!=null?n:r.at(-1)}}}}))(e),{optional:()=>zr(Ur(e)),select:t=>zr(t===void 0?si(e):si(t,e))})}function Ur(e){return ue({[me]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return t===void 0?(ye(e).forEach(n=>r(n,void 0)),{matched:!0,selections:i}):{matched:oe(e,t,r),selections:i}},getSelectionKeys:()=>ye(e),matcherType:"optional"})})}const Jc=(e,t)=>{for(const i of e)if(!t(i))return!1;return!0},Zc=(e,t)=>{for(const[i,r]of e.entries())if(!t(r,i))return!1;return!0},Xc=(e,t)=>{const i=Reflect.ownKeys(e);for(const r of i)if(!t(r,e[r]))return!1;return!0};function Q(...e){return ue({[me]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return{matched:e.every(n=>oe(n,t,r)),selections:i}},getSelectionKeys:()=>oi(e,ye),matcherType:"and"})})}function uo(...e){return ue({[me]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return oi(e,ye).forEach(n=>r(n,void 0)),{matched:e.some(n=>oe(n,t,r)),selections:i}},getSelectionKeys:()=>oi(e,ye),matcherType:"or"})})}function U(e){return{[me]:()=>({match:t=>({matched:!!e(t)})})}}function si(...e){const t=typeof e[0]=="string"?e[0]:void 0,i=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ue({[me]:()=>({match:r=>{let n={[t??Oi]:r};return{matched:i===void 0||oe(i,r,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??Oi].concat(i===void 0?[]:ye(i))})})}function fo(e){return!0}function He(e){return typeof e=="number"}function ct(e){return typeof e=="string"}function dt(e){return typeof e=="bigint"}const po=ue(U(fo)),Qc=ue(U(fo)),ed=po,ut=e=>Object.assign(ue(e),{startsWith:t=>{return ut(Q(e,(i=t,U(r=>ct(r)&&r.startsWith(i)))));var i},endsWith:t=>{return ut(Q(e,(i=t,U(r=>ct(r)&&r.endsWith(i)))));var i},minLength:t=>ut(Q(e,(i=>U(r=>ct(r)&&r.length>=i))(t))),length:t=>ut(Q(e,(i=>U(r=>ct(r)&&r.length===i))(t))),maxLength:t=>ut(Q(e,(i=>U(r=>ct(r)&&r.length<=i))(t))),includes:t=>{return ut(Q(e,(i=t,U(r=>ct(r)&&r.includes(i)))));var i},regex:t=>{return ut(Q(e,(i=t,U(r=>ct(r)&&!!r.match(i)))));var i}}),ho=ut(U(ct)),qe=e=>Object.assign(ue(e),{between:(t,i)=>qe(Q(e,((r,n)=>U(a=>He(a)&&r<=a&&n>=a))(t,i))),lt:t=>qe(Q(e,(i=>U(r=>He(r)&&r<i))(t))),gt:t=>qe(Q(e,(i=>U(r=>He(r)&&r>i))(t))),lte:t=>qe(Q(e,(i=>U(r=>He(r)&&r<=i))(t))),gte:t=>qe(Q(e,(i=>U(r=>He(r)&&r>=i))(t))),int:()=>qe(Q(e,U(t=>He(t)&&Number.isInteger(t)))),finite:()=>qe(Q(e,U(t=>He(t)&&Number.isFinite(t)))),positive:()=>qe(Q(e,U(t=>He(t)&&t>0))),negative:()=>qe(Q(e,U(t=>He(t)&&t<0)))}),td=qe(U(He)),ft=e=>Object.assign(ue(e),{between:(t,i)=>ft(Q(e,((r,n)=>U(a=>dt(a)&&r<=a&&n>=a))(t,i))),lt:t=>ft(Q(e,(i=>U(r=>dt(r)&&r<i))(t))),gt:t=>ft(Q(e,(i=>U(r=>dt(r)&&r>i))(t))),lte:t=>ft(Q(e,(i=>U(r=>dt(r)&&r<=i))(t))),gte:t=>ft(Q(e,(i=>U(r=>dt(r)&&r>=i))(t))),positive:()=>ft(Q(e,U(t=>dt(t)&&t>0))),negative:()=>ft(Q(e,U(t=>dt(t)&&t<0)))}),id=ft(U(dt)),rd=ue(U(function(e){return typeof e=="boolean"})),nd=ue(U(function(e){return typeof e=="symbol"})),ad=ue(U(function(e){return e==null})),od=ue(U(function(e){return e!=null}));var li={__proto__:null,matcher:me,optional:Ur,array:function(...e){return zr({[me]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const i=e[0];let r={};if(t.length===0)return ye(i).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>oe(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ye(e[0])})})},set:function(...e){return ue({[me]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};if(e.length===0)return{matched:!0};const r=(a,o)=>{i[a]=(i[a]||[]).concat([o])},n=e[0];return{matched:Jc(t,a=>oe(n,a,r)),selections:i}},getSelectionKeys:()=>e.length===0?[]:ye(e[0])})})},map:function(...e){return ue({[me]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};const r=(s,l)=>{i[s]=(i[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var n;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);const[a,o]=e;return{matched:Zc(t,(s,l)=>{const u=oe(a,l,r),p=oe(o,s,r);return u&&p}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[...ye(e[0]),...ye(e[1])]})})},record:function(...e){return ue({[me]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var i;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);let r={};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])},[a,o]=e.length===1?[ho,e[0]]:e;return{matched:Xc(t,(s,l)=>{const u=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=u!==null&&oe(a,u,n),d=oe(a,s,n),h=oe(o,l,n);return(d||p)&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ye(e[0]),...ye(e[1])]})})},intersection:Q,union:uo,not:function(e){return ue({[me]:()=>({match:t=>({matched:!oe(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:U,select:si,any:po,unknown:Qc,_:ed,string:ho,number:td,bigint:id,boolean:rd,symbol:nd,nullish:ad,nonNullable:od,instanceOf:function(e){return ue(U(function(t){return i=>i instanceof t}(e)))},shape:function(e){return ue(U(Yc(e)))}};class sd extends Error{constructor(t){let i;try{i=JSON.stringify(t)}catch{i=t}super(`Pattern matching error: no pattern matches value ${i}`),this.input=void 0,this.input=t}}const Hr={matched:!1,value:void 0};function Ri(e){return new ld(e,Hr)}let ld=class jn{constructor(t,i){this.input=void 0,this.state=void 0,this.input=t,this.state=i}with(...t){if(this.state.matched)return this;const i=t[t.length-1],r=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(u,p)=>{a=!0,o[u]=p},l=!r.some(u=>oe(u,this.input,s))||n&&!n(this.input)?Hr:{matched:!0,value:i(a?Oi in o?o[Oi]:o:this.input,this.input)};return new jn(this.input,l)}when(t,i){if(this.state.matched)return this;const r=!!t(this.input);return new jn(this.input,r?{matched:!0,value:i(this.input,this.input)}:Hr)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=cd){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function cd(e){throw new sd(e)}var dd=["other","few","many","two","one","zero"],go=({terms:e,overrides:t,locale:i})=>{const r=new Intl.PluralRules(i);function n(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,u)=>{var p;return((p=o==null?void 0:o[u])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=r.select(o.count);if(!(l in s)){const u=dd.find(p=>p in s);if(!u)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=u}return s[l].replace(/{{(\w+)}}/g,(u,p)=>{var d;return((d=o==null?void 0:o[p])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},ud=0;function c(e,t,i,r,n,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var u={type:e,props:l,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ud,__source:n,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return F.vnode&&F.vnode(u),u}var bo=Da(null),vo=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:i,locale:r})=>{const n=lt(()=>go({locale:r,terms:e,overrides:t}),[t,r]);return c(bo.Provider,{value:{t:n,locale:r},children:i})},useTranslation:()=>{const t=Ha(bo);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:i})=>go({terms:e,overrides:t,locale:i})}),{TranslationProvider:oh,useTranslation:sh,createTFunction:lh,defaultTerms:fd}=vo({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",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}}. Your answers are saved, so you can come back after then and submit your application. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Your answers are saved, so you can come back after then and submit your application. 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_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:pd,useTranslation:se,createTFunction:hd}=vo({...fd,error_heading:"Something unexpected happened",undo:"Change answer",conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"This role is no longer accepting applications.",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_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_retryable:"We couldn't submit your application. Please try again.",submission_failed:"We couldn't submit your application. Choose Restart to 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.",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:"Still working — the employer's application system is taking a little longer than usual. Please keep this window 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.",maximize:"Maximise",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",file_more:{one:"+{{count}} file",other:"+{{count}} files"},loading:"Loading",minimize:"Minimise"}),ch="";function tt(e,t){if(!e)throw new Error(t)}var qr=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(qr):Object.keys(e).sort().reduce((t,i)=>(t[i]=qr(e[i]),t),{}),gd=e=>{let t=JSON.stringify(qr(e)),i=5381;for(let r=0;r<t.length;r++)i=i*33^t.charCodeAt(r);return(i>>>0).toString(36)},bd=Symbol.for("preact-signals");function Wr(){if(jt>1)jt--;else{for(var e,t=!1;ci!==void 0;){var i=ci;for(ci=void 0,Kr++;i!==void 0;){var r=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&mo(i))try{i.c()}catch(n){t||(e=n,t=!0)}i=r}}if(Kr=0,jt--,t)throw e}}var J=void 0,ci=void 0,jt=0,Kr=0,ji=0;function wo(e){if(J!==void 0){var t=e.n;if(t===void 0||t.t!==J)return t={i:0,S:e,p:J.s,n:void 0,t:J,e:void 0,x:void 0,r:t},J.s!==void 0&&(J.s.n=t),J.s=t,e.n=t,32&J.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=J.s,t.n=void 0,J.s.n=t,J.s=t),t}}function he(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}he.prototype.brand=bd,he.prototype.h=function(){return!0},he.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)},he.prototype.U=function(e){if(this.t!==void 0){var t=e.e,i=e.x;t!==void 0&&(t.x=i,e.e=void 0),i!==void 0&&(i.e=t,e.x=void 0),e===this.t&&(this.t=i)}},he.prototype.subscribe=function(e){var t=this;return Yr(function(){var i=t.value,r=J;J=void 0;try{e(i)}finally{J=r}})},he.prototype.valueOf=function(){return this.value},he.prototype.toString=function(){return this.value+""},he.prototype.toJSON=function(){return this.value},he.prototype.peek=function(){var e=J;J=void 0;try{return this.value}finally{J=e}},Object.defineProperty(he.prototype,"value",{get:function(){var e=wo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Kr>100)throw new Error("Cycle detected");this.v=e,this.i++,ji++,jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Wr()}}}});function Pe(e){return new he(e)}function mo(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 yo(e){for(var t=e.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function _o(e){for(var t=e.s,i=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=i}function Bt(e){he.call(this,void 0),this.x=e,this.s=void 0,this.g=ji-1,this.f=4}(Bt.prototype=new he).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ji))return!0;if(this.g=ji,this.f|=1,this.i>0&&!mo(this))return this.f&=-2,!0;var e=J;try{yo(this),J=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return J=e,_o(this),this.f&=-2,!0},Bt.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)}he.prototype.S.call(this,e)},Bt.prototype.U=function(e){if(this.t!==void 0&&(he.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)}},Bt.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(Bt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=wo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function vd(e){return new Bt(e)}function xo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){jt++;var i=J;J=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Gr(e),r}finally{J=i,Wr()}}}function Gr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,xo(e)}function wd(e){if(J!==this)throw new Error("Out-of-order effect");_o(this),J=e,this.f&=-2,8&this.f&&Gr(this),Wr()}function di(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}di.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()}},di.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,xo(this),yo(this),jt++;var e=J;return J=this,wd.bind(this,e)},di.prototype.N=function(){2&this.f||(this.f|=2,this.o=ci,ci=this)},di.prototype.d=function(){this.f|=8,1&this.f||Gr(this)};function Yr(e){var t=new di(e);try{t.c()}catch(i){throw t.d(),i}return t.d.bind(t)}var Jr;function zt(e,t){F[e]=t.bind(null,F[e]||function(){})}function Bi(e){Jr&&Jr(),Jr=e&&e.S()}function ko(e){var t=this,i=e.data,r=yd(i);r.value=i;var n=lt(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!ba(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},vd(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}ko.displayName="_st",Object.defineProperties(he.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ko},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),zt("__b",function(e,t){if(typeof t.type=="string"){var i,r=t.props;for(var n in r)if(n!=="children"){var a=r[n];a instanceof he&&(i||(t.__np=i={}),i[n]=a,r[n]=a.peek())}}e(t)}),zt("__r",function(e,t){Bi();var i,r=t.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(n){var a;return Yr(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),Bi(i),e(t)}),zt("__e",function(e,t,i,r){Bi(),e(t,i,r)}),zt("diffed",function(e,t){Bi();var i;if(typeof t.type=="string"&&(i=t.__e)){var r=t.__np,n=t.props;if(r){var a=i.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in r)&&(s.d(),a[o]=void 0)}else i.U=a={};for(var l in r){var u=a[l],p=r[l];u===void 0?(u=md(i,l,p,n),a[l]=u):u.o(p,n)}}}e(t)});function md(e,t,i,r){var n=t in e&&e.ownerSVGElement===void 0,a=Pe(i);return{o:function(o,s){a.value=o,r=s},d:Yr(function(){var o=a.value.value;r[t]!==o&&(r[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}zt("unmount",function(e,t){if(typeof t.type=="string"){var i=t.__e;if(i){var r=i.U;if(r){i.U=void 0;for(var n in r){var a=r[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),zt("__h",function(e,t,i,r){(r<3||r===9)&&(t.__$f|=2),e(t,i,r)}),Ve.prototype.shouldComponentUpdate=function(e,t){var i=this.__$u;if(!(i&&i.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var n in e)if(n!=="__source"&&e[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function yd(e){return lt(function(){return Pe(e)},[])}const Zr=(e,t)=>t.some(i=>e instanceof i);let So,Co;function _d(){return So||(So=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function xd(){return Co||(Co=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xr=new WeakMap,Qr=new WeakMap,zi=new WeakMap;function kd(e){const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{i(At(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return zi.set(t,e),t}function Sd(e){if(Xr.has(e))return;const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{i(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Xr.set(e,t)}let en={get(e,t,i){if(e instanceof IDBTransaction){if(t==="done")return Xr.get(e);if(t==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return At(e[t])},set(e,t,i){return e[t]=i,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function $o(e){en=e(en)}function Cd(e){return xd().includes(e)?function(...t){return e.apply(tn(this),t),At(this.request)}:function(...t){return At(e.apply(tn(this),t))}}function $d(e){return typeof e=="function"?Cd(e):(e instanceof IDBTransaction&&Sd(e),Zr(e,_d())?new Proxy(e,en):e)}function At(e){if(e instanceof IDBRequest)return kd(e);if(Qr.has(e))return Qr.get(e);const t=$d(e);return t!==e&&(Qr.set(e,t),zi.set(t,e)),t}const tn=e=>zi.get(e);function Ed(e,t,{blocked:i,upgrade:r,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=At(o);return r&&o.addEventListener("upgradeneeded",l=>{r(At(o.result),l.oldVersion,l.newVersion,At(o.transaction),l)}),i&&o.addEventListener("blocked",l=>i(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),n&&l.addEventListener("versionchange",u=>n(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Id=["get","getKey","getAll","getAllKeys","count"],Ad=["put","add","delete","clear"],rn=new Map;function Eo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(rn.get(t))return rn.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,n=Ad.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!(n||Id.includes(i)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(s.shift())),(await Promise.all([u[i](...s),n&&l.done]))[0]};return rn.set(t,a),a}$o(e=>({...e,get:(t,i,r)=>Eo(t,i)||e.get(t,i,r),has:(t,i)=>!!Eo(t,i)||e.has(t,i)}));const Td=["continue","continuePrimaryKey","advance"],Io={},nn=new WeakMap,Ao=new WeakMap,Fd={get(e,t){if(!Td.includes(t))return e[t];let i=Io[t];return i||(i=Io[t]=function(...r){nn.set(this,Ao.get(this)[t](...r))}),i}};async function*Dd(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const i=new Proxy(t,Fd);for(Ao.set(i,t),zi.set(i,tn(t));t;)yield i,t=await(nn.get(i)||t.continue()),nn.delete(i)}function To(e,t){return t===Symbol.asyncIterator&&Zr(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Zr(e,[IDBIndex,IDBObjectStore])}$o(e=>({...e,get(t,i,r){return To(t,i)?Dd:e.get(t,i,r)},has(t,i){return To(t,i)||e.has(t,i)}}));const Ui=typeof indexedDB>"u"?void 0:Ed("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Md=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:i,...r}=t;return r})});let Hi,an,ui;const Fo=()=>{if(!Hi)return ui;const e=Hi;Hi=void 0;const t=Wi(e),i=Ui==null?void 0:Ui.then(r=>r.put("state",Md(e.data),t)).finally(()=>{ui===i&&(ui=void 0)});return ui=i,ui},Ne={getStateData:async(e,t,i)=>{var n;const r=Wi({...e,flowKeys:t,context:i});return(n=await Ui)==null?void 0:n.get("state",r)},setStateData:e=>{Hi=e,clearTimeout(an),an=setTimeout(()=>void Fo(),1e3)},flushStateData:()=>(clearTimeout(an),Fo()??Promise.resolve())},Ut=e=>t=>t?t.type===e:!1,Nd=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Do=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Nd()}),Ld=e=>Ri(e).with({nativeEvent:{submitter:li.select(li.union(li.instanceOf(HTMLButtonElement),li.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),qi=(e,t,i,r=0)=>{if(!t.nextId)return i(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const n=e.find(u=>u.id===t.nextId);if(n===void 0)return{stepsMade:r,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(u=>u.id===a),s=t.type.includes("question")?1:0;if(o){const u=s+Math.max(qi(e,n,i,r+s).remainingSteps,qi(e,o,i,r+s).remainingSteps);return i(t.id,{stepsMade:r,remainingSteps:u}),{stepsMade:r,remainingSteps:u}}const l=s+qi(e,n,i,r+s).remainingSteps;return i(t.id,{stepsMade:r,remainingSteps:l}),{stepsMade:r,remainingSteps:l}},Vd=e=>{const t={},i=e.find(r=>r.isHead);return i&&qi(e,i,(r,n)=>{t[r]=n}),t},Wi=e=>[...e.flowKeys,e.id,e.version,e.build,gd(e.context)].join("/"),Od=({data:e,nodes:t})=>{const i=e.startedWriteNodeIds===void 0?t.some(r=>r.type==="integration-application-submit"&&e.nodeHistory.includes(r.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!i&&Gn(t,e.submissions)},Pd=({data:e,nodes:t})=>{var i;return!e.isFinished&&((((i=e.startedWriteNodeIds)==null?void 0:i.length)??0)>0||Gn(t,e.submissions))},We=Pe({state:"idle"}),on=new Set,Tt=e=>{const{state:t,flow:i}=We.value;if(t!=="loaded")return;tt(i,"No flow to update");const r=e(i.data);i.data=r,We.value={state:t,flow:i},Ne.setStateData(i)},M={current$:We,viewState$:Pe("closed"),prepareFlow:async({flow:e,context:t={},flowKeys:i,title:r,analytics:n,job:a,locationOrigin:o})=>{await Ne.flushStateData().catch(()=>{});const s=await Ne.getStateData(e,i,t),l=s??Do(),u=Wi({...e,flowKeys:i,context:t}),p=s!==void 0&&!on.has(u)&&Od({data:l,nodes:e.nodes});return p||on.add(u),{data:l,offerResume:p,startedAt:new Date,nodeIdToProgress:Vd(e.nodes),flowKeys:i,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:r,analytics:n,job:a,locationOrigin:o}},commitFlow:e=>{We.value={state:"loaded",flow:e},Ne.setStateData(e)},settleResume:e=>{e.offerResume=!1,on.add(Wi(e))},cancelCurrentFlow:()=>{We.value={state:"idle"},M.viewState$.value="closed"},markAsFinished:()=>Tt(e=>({...e,isFinished:!0})),markAsInteracted:()=>Tt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Tt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Tt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Ne.flushStateData()},restart:()=>{const{state:e,flow:t}=We.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const i={...Do(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},r={...t,data:i,startedAt:new Date,offerResume:!1};We.value={state:e,flow:r},Ne.setStateData(r)},addMessage:(e,t)=>{const i={...e,groupId:t};return Tt(r=>(r.messages.push(i),r))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:i}=We.value;tt(t==="loaded","Application not loaded");const r=i.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));i.data.messages=r,Ne.setStateData(i)},setSubmission:(e,t)=>Tt(i=>(t===null?delete i.submissions[e]:i.submissions[e]=t,i)),setInput:e=>Tt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{We.peek().flow===e&&(We.value={state:"loaded",flow:e}),Ne.setStateData(e),await Ne.flushStateData()}},Rd=({message:e})=>{const{t}=se();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("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:[c("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"}),c("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"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-11 text-sm",children:e})]})]})},Ki=e=>{const{t}=se();return c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:t("loading")}),c("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)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("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"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("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"})})})]})},Mo=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Ki,{class:"text-neutral-6 h-8 w-8"})}),jd=e=>{const i=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-i,r))*100)}%`},Bd=It("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"}}),fi=({class:e,children:t,variant:i,...r})=>c("button",{class:et(Bd({variant:i}),e),...r,children:c("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})}),No=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),zd=()=>{if(M.current$.value.state!=="loaded")return null;const e=M.current$.value.flow.nodeIdToProgress,t=M.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const i=e[t];if(i===void 0)return null;const r=100*(i.stepsMade/(i.remainingSteps+i.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:jd(r)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Ud=({children:e,params:t})=>{const{t:i}=se(),r=M.viewState$;return c(ae,{children:c("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:[c("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:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{"aria-label":i("minimize"),onClick:()=>{r.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:sn,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:et({hidden:M.current$.value.state!=="loaded"||r.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,M.current$.value.state==="loaded"&&c(fi,{class:"mx-1","aria-label":i("restart"),onClick:()=>{M.restart()},children:[c("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"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(fi,{class:"view-switch mx-1",onTouchStart:sn,"aria-label":i("minimize"),onClick:()=>r.value="minimised",children:c(No,{})},"minmax")]})]}),c(zd,{})]})})};function sn(){}const Hd=eo(()=>Promise.resolve().then(()=>Qp).then(e=>e.ChatbotBody)),Lo=It("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"}}}),Vo=It("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"}}}),qd=({open:e,...t})=>{const i=ve(null);return Ce(()=>{const r=i.current;r&&(e?r.showModal():r.close())},[e]),c("dialog",{ref:i,...t})},Wd=({logger:e,apiClient:t,analytics:i,talentBankClient:r,params:n})=>{const{state:a,flow:o,error:s}=M.current$.value,l=M.viewState$.value,u=a!=="idle"&&l==="maximised",p=ve(null),d=o?[...o.data.nodeHistory].reverse().map(h=>o.nodes.find(g=>g.id===h)).find(h=>(h==null?void 0:h.type)==="flow-section"):void 0;return c(pd,{terms:n.terms,locale:void 0,children:[c(qd,{open:u,onClose:()=>M.viewState$.value="minimised",children:c("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Lo({view:"maximised"}),children:c("div",{class:Vo({view:"maximised"}),children:[c(Ud,{params:n,children:d?c(ae,{children:[c("span",{class:"block",children:d.data.title}),c("span",{class:"block truncate text-xs font-normal",children:o==null?void 0:o.title})]}):o==null?void 0:o.title}),Ri({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Mo,{},"loading")).with({state:"loaded"},()=>c(ni,{fallback:c(Mo,{},"loading"),children:c(Hd,{analytics:i,apiClient:t,logger:e,talentBankClient:r})})).with({state:"error"},()=>c(Rd,{message:s})).exhaustive()]})})}),l==="minimised"?c(Kd,{flow:o}):null]})},Kd=({flow:e})=>{const{t}=se();return c("div",{class:Lo({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Vo({view:"minimised"}),children:[c("button",{onClick:()=>{M.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:sn,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),c("div",{class:"flex items-center px-0.5",children:c(fi,{class:"mx-1","aria-label":t("close_application"),onClick:M.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Gd=`[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-\\[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}}
2
- `,Oo="inploi-chatbot",ln=`[data-widget='${Oo}']`,Yd=()=>({getChatbotElement:()=>document.querySelector(ln),getOrCreateChatbotElement:()=>{const e=document.querySelector(ln);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Oo,t}}),Jd=25,Po=Pe(()=>{}),Ro=["wheel","touchmove","keydown"],Zd=(e,t)=>new Promise((i,r)=>{if(t!=null&&t.aborted)return r(new ot);const n=setTimeout(i,e);t==null||t.addEventListener("abort",()=>{clearTimeout(n),r(new ot)},{once:!0})}),ee={onSubmitSuccessFn$:Pe(()=>{}),onInteractionFn$:Pe(()=>{}),isBotTyping$:Pe(!1),captchaVisible$:Pe(!1),themeMode$:Pe("light"),isReadingHistory$:Pe(!1),scrollToEnd:()=>Po.value()},Xd=()=>{const e=ve(null),t=ve(-1/0);Ce(()=>{const r=e.current;if(!r)return;const n=()=>{ee.isReadingHistory$.value=!1,r.scrollTo({top:r.scrollHeight,behavior:"instant"})};Po.value=n;const a=()=>t.current=performance.now(),o=()=>{r.scrollHeight-r.scrollTop-r.clientHeight<=24?ee.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ee.isReadingHistory$.value=!0)};r.addEventListener("scroll",o,{passive:!0});for(const l of Ro)r.addEventListener(l,a,{passive:!0});const s=new ResizeObserver(()=>{ee.isReadingHistory$.peek()||n()});return s.observe(r),r.firstElementChild&&s.observe(r.firstElementChild),()=>{r.removeEventListener("scroll",o);for(const l of Ro)r.removeEventListener(l,a);s.disconnect()}},[]);const i=lt(()=>({setSubmission:(n,a)=>M.setSubmission(n,a),captcha:{container:()=>{var n;return((n=e.current)==null?void 0:n.querySelector("[data-captcha-slot]"))??null},get theme(){return ee.themeMode$.peek()},reveal:n=>{ee.captchaVisible$.value=n,n&&requestAnimationFrame(()=>{var a,o;(o=(a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))==null||o.focus(),ee.scrollToEnd()})}},send:async({message:n,signal:a,groupId:o})=>{if(await Ri(n).with({author:"bot",type:"text"},async s=>{if(a!=null&&a.aborted)throw new ot;ee.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Jd;try{await Zd(l,a)}finally{ee.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new ot;M.addMessage(n,o)},input:({input:n,signal:a})=>{if(a!=null&&a.aborted)throw new ot;return M.setInput(n),new Promise(o=>{const s=l=>{if(a!=null&&a.aborted)throw new ot;t.current=-1/0,M.setInput(void 0),n.key&&M.setSubmission(n.key,l),o(l)};ee.onSubmitSuccessFn$.value=s})}}),[]);return{chatRef:e,chatService:i}};var Qd=["1","2","3","4","5","6","7","8","9","10","11","12"],eu={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]}},tu=(e,t=1,i)=>r=>{const[n,a]=eu[i][r];return"oklch("+n+"% "+a*t+" "+e+")"},cn=e=>{const t=tu(e.hue,e.chroma,e.mode);return Object.fromEntries(Qd.map(i=>[e.prefix+i,e.transform(t(i))]))},dn=e=>e,iu=e=>{const t=Object.keys(e).flatMap(i=>{const r=e[i];return typeof r=="object"&&r!==null?Object.keys(r).map(n=>{const a=r[n];return[`${String(i)}.${n}`,a]}):[[i,r]]});return Object.fromEntries(t)},Gi=e=>!!e&&typeof e=="object"&&!Array.isArray(e),un=(e,...t)=>{if(!t.length)return e;const i=t.shift();if(Gi(e)&&Gi(i))for(const r in i){const n=i[r];if(Gi(n)){e[r]||Object.assign(e,{[r]:{}});const a=e[r];Gi(a)&&un(a,n)}else Object.assign(e,{[r]:i[r]})}return un(e,...t)},ru=e=>{function t(i,r){const n=[e.prefix,r.toString().replace(/\./g,"-")].join("");return i==="declaration"?`--${n}`:`var(--${n})`}return t},nu=()=>({core:e=>({semantic:t=>({component:i=>({from:r=>{const{theme:n,getToken:a}=r,o=h=>a("reference",h.toString()),s=e({theme:n}),l=t({theme:n,core:o,raw:{core:s}}),u=i({theme:n,core:o,semantic:o,raw:{core:s,semantic:l}}),p=iu(un(s,l,u)),d=([h,g],v)=>{const y=[v,h].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(k=>d(k,y)):[[r.getToken("declaration",y),g]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(h=>d(h))),ref:h=>a("reference",h.toString())}}})})})});const[fn,pn,jo]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],au=nu().core(({theme:e})=>({color:{black:fn,white:pn,lowest:e.mode==="light"?pn:fn,highest:e.mode==="light"?fn:pn,...cn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:dn}),...cn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:dn}),...cn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:dn})},typography:{}})).semantic(({core:e,raw:t,theme:i})=>{const r=(n,a)=>t.core.color[n].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:r("n-8",i.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:jo,"bg-hover":r("n-10",.2),"bg-active":r("n-10",.3)}}}).component(({raw:e,theme:t,semantic:i,core:r})=>{const n=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":i("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":jo,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":r(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),ou=ru({prefix:"i-"}),su=e=>{const t=au.from({theme:e,getToken:ou}),i=Object.entries(t.declarations).map(([r,n])=>`${r}: ${n};`);return`${ln} {
1
+ var nh=Object.defineProperty;var ah=(ge,ze,Je)=>ze in ge?nh(ge,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ge[ze]=Je;var fe=(ge,ze,Je)=>(ah(ge,typeof ze!="symbol"?ze+"":ze,Je),Je);(function(){"use strict";var ge;function ze(e){return{lang:(e==null?void 0:e.lang)??(ge==null?void 0:ge.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(ge==null?void 0:ge.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(ge==null?void 0:ge.abortPipeEarly)}}var Je;function Ys(e){return Je==null?void 0:Je.get(e)}var cr;function Js(e){return cr==null?void 0:cr.get(e)}var dr;function Zs(e,t){var i;return(i=dr==null?void 0:dr.get(e))==null?void 0:i.get(t)}function Bn(e){var i,r;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Ne(e,t,i,r,n){let a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Bn(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:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Zs(e.reference,l.lang)??(u?Js(l.lang):null)??r.message??Ys(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function xe(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ze())}}}function Xs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Qs(e,t){let i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function zn(e){return{kind:"transformation",type:"transform",reference:zn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function el(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function ur(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function Un(){return{kind:"schema",type:"any",reference:Un,expects:"any",async:!1,get"~standard"(){return xe(this)},"~run"(e){return e.typed=!0,e}}}function Hn(e,t){return{kind:"schema",type:"array",reference:Hn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return xe(this)},"~run"(i,r){var a;let n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){let u={type:"array",origin:"value",input:n,key:o,value:s};for(let p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Ne(this,"type",i,r);return i}}}function fr(e){return{kind:"schema",type:"boolean",reference:fr,expects:"boolean",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Ne(this,"type",t,i),t}}}function _t(e,t){return{kind:"schema",type:"literal",reference:_t,expects:Bn(e),async:!1,literal:e,message:t,get"~standard"(){return xe(this)},"~run"(i,r){return i.value===this.literal?i.typed=!0:Ne(this,"type",i,r),i}}}function qn(e){return{kind:"schema",type:"null",reference:qn,expects:"null",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,i){return t.value===null?t.typed=!0:Ne(this,"type",t,i),t}}}function Ei(e,t){return{kind:"schema",type:"nullable",reference:Ei,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return xe(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Ii(e){return{kind:"schema",type:"number",reference:Ii,expects:"number",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ne(this,"type",t,i),t}}}function ne(e,t){return{kind:"schema",type:"object",reference:ne,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return xe(this)},"~run"(i,r){var a;let n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(let o in this.entries){let s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in n?n[o]:ur(s),u=s["~run"]({value:l},r);if(u.issues){let p={type:"object",origin:"value",input:n,key:o,value:l};for(let d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=el(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ne(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Ne(this,"type",i,r);return i}}}function ke(e,t){return{kind:"schema",type:"optional",reference:ke,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return xe(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Wn(e,t,i){return{kind:"schema",type:"record",reference:Wn,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return xe(this)},"~run"(r,n){var o,s;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let l in a)if(Xs(a,l)){let u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){let h={type:"object",origin:"key",input:a,key:l,value:u};for(let g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}let d=this.value["~run"]({value:u},n);if(d.issues){let h={type:"object",origin:"value",input:a,key:l,value:u};for(let g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!d.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=d.value)}}else Ne(this,"type",r,n);return r}}}function Te(e){return{kind:"schema",type:"string",reference:Te,expects:"string",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Ne(this,"type",t,i),t}}}function Kn(e){let t;if(e)for(let i of e)t?t.push(...i.issues):t=i.issues;return t}function pr(e,t){return{kind:"schema",type:"union",reference:pr,expects:Qs(e.map(i=>i.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return xe(this)},"~run"(i,r){let n,a,o;for(let s of this.options){let l=s["~run"]({value:i.value},r);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(a){if(a.length===1)return a[0];Ne(this,"type",i,r,{issues:Kn(a)}),i.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ne(this,"type",i,r,{issues:Kn(o)})}return i}}}function Xt(){return{kind:"schema",type:"unknown",reference:Xt,expects:"unknown",async:!1,get"~standard"(){return xe(this)},"~run"(e){return e.typed=!0,e}}}function tl(...e){return{...e[0],pipe:e,get"~standard"(){return xe(this)},"~run"(t,i){for(let r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Ai(e,t,i){let r=e["~run"]({value:t},ze(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var il=e=>({ok:!0,err:!1,val:e}),rl=e=>({err:!0,ok:!1,val:e}),hr=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function gr(e,t,i){var o,s;let r=e.find(l=>l.type==="pre-apply-result");if(!r)return;let n=(o=t[r.data.participationKey])==null?void 0:o.value,a={};if(n===!0)for(let l of hr(e)){let u=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(u)&&u.length===1&&(u=u[0]),(typeof u=="boolean"||typeof u=="string")&&(a[l.data.key]=u)}return{node_id:r.id,flow_session_id:i,participation:n,answers:a}}function nl(e,t){let i=gr(e,t,""),r=hr(e).map(a=>{let o=a.data.preApply,s=i==null?void 0:i.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(u=>u.value===s);return{key:a.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),n=(i==null?void 0:i.participation)===!1?"skipped":(i==null?void 0:i.participation)===!0&&r.length>0&&r.every(a=>a.valid)?"completed":"unavailable";return{status:n,hasHardConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="advisory"):null,answers:n==="completed"?r:[]}}function al(e,t){let i=new Set(hr(e).map(r=>r.data.key));for(let r of e)r.type==="pre-apply-result"&&(i.add(r.data.key),i.add(r.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([r])=>!i.has(r)))}var ot=class extends Error{constructor(){super("Aborted")}},Qt=(e,t)=>{if(t.length===0)return;let i=e;for(let r of t){if(i==null||typeof i!="object")return;i=i[r]}return i},ol=(e,t="all")=>{let i={},r=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(r&&!r.has(n)||(i[n]=a.value))}return i},Gn=(e,t)=>{let i=new Set(e.flatMap(r=>r.type==="add-submission"?[r.data.key]:[]));return Object.entries(t).some(([r,n])=>n!==void 0&&n.type!=="integration"&&!i.has(r))},sl=({key:e,submissions:t})=>{var r;let i=(r=t[e])==null?void 0:r.value;if(typeof i!="string"&&typeof i!="number")throw new Error(`Submission at “${e}” is not a string or number`);return i},Yn=({key:e,path:t,submissions:i,context:r})=>{if(e==="$context"){if(!t)return;let n=Qt(r,t);switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${t.join(".")}`,n);return}}return i[e]},ll=e=>{let t=e.split(".").pop();return t?il(t?"."+t:""):rl("No file extension found")},Jn=(e,t)=>{if(t.length===0)return!0;let i=t.map(r=>r.toLowerCase());return e.every(r=>{let n=ll(r.name);return n.ok&&i.includes(n.val.toLowerCase())})},Lt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Ti=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,cl=ne({integration_response:ne({data:ne({redirect_url:Te(),message:ke(Ei(Te())),button_text:ke(Ei(Te()))})})}),br=e=>Ai(cl,e).success,dl=ne({integration_response:ne({status:ke(Xt()),error:ne({message:Te(),data:ke(Xt())})})}),Zn=e=>Ai(dl,e).success,ul=ne({success:_t(!0),integration_response:ne({data:ne({outcome:_t("pending"),message:ke(Xt())}),error:ke(qn())})}),vr=e=>{let t=Ai(ul,e);if(!t.success||br(e))return;let{message:i}=t.output.integration_response.data;return typeof i=="string"&&i.trim()?{message:i}:{}};ne({success:_t(!1),message:ke(Xt())});var fl=ne({error:_t("Validation failed"),messages:ne({})}),pl=(e,t)=>t===422&&Ai(fl,e).success,Xn=(e,t)=>{if(!Zn(e))return;let i=e.integration_response,r=i.error.data,n=typeof r=="object"&&r!==null?r:{},a=w=>typeof n[w]=="string"?n[w]:void 0,o=w=>typeof n[w]=="boolean"?n[w]:void 0,s=w=>{let y=n[w];return Number.isSafeInteger(y)&&y>=0?y:void 0},l=w=>{let y=a(w),x=y===void 0?NaN:Date.parse(y);return Number.isFinite(x)?x:void 0},u=typeof i.status=="number"?i.status:t,p=a("phase"),d=a("verdict"),h=a("code"),g=u===409&&p==="submit"&&d==="confirmed"?"duplicate":u===410&&h==="job_closed"?"closed":p==="submit"&&d==="unknown"?"unknown":void 0;return{message:i.error.message,status:u,phase:p,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:d,code:h,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:g}},Qn=3e4,hl=2e4,gl=6e4,wr=12e4,ea=6*60*6e4,bl=60*6e4,ta=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,i=t===void 0?0:t-Date.now();return i>0&&i<=ea?t:void 0},vl=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=ta(e);return t===void 0?{}:{until:t}},ia=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),wl=(e,t)=>{let i=ta(t);if(i!==void 0)return{waitMs:i-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:Qn};let r=(e??0)+1,n=Math.min(r*hl,gl),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(n,a),wr),throttles:r}},ra=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",ml=e=>{if(!Zn(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},yl=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",_l=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",xl=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,kl=e=>{if(typeof e!="object"||e===null)return null;let t=e.integration_response;if(typeof t!="object"||t===null)return null;let i=t;if(typeof i.status!="number"||i.service!==void 0&&typeof i.service!="string")return null;let r="data"in i,n=i.error,a=typeof n=="object"&&n!==null&&typeof n.message=="string"&&"data"in n;if(!r&&!a)return null;let o=r?i.data:n.data??null;return{service:i.service??"INVALID_SERVICE",response:{status:i.status,payload:o},...vr(e)&&{outcome:"pending"}}},Sl=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},Cl=(e,t)=>{if(!Sl(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},$l=({context:e,schema:t,logger:i})=>{if(t)for(let r in t){let n=t[r];if(!n)continue;let a=Qt(e,r.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${r} is required`;throw i.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${r} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${r} is not a string`);break;default:n.type}}};let Ze;function na(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)}}let mr;function El(e){return mr==null?void 0:mr.get(e)}let yr;function Il(e){return yr==null?void 0:yr.get(e)}let _r;function Al(e,t){var i;return(i=_r==null?void 0:_r.get(e))==null?void 0:i.get(t)}function aa(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Ue(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??aa(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:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Al(e.reference,l.lang)??(u?Il(l.lang):null)??r.message??El(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Fe(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},na())}}}function Tl(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Fl(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function xr(e,t){return{kind:"validation",type:"max_length",reference:xr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Fi(e,t){return{kind:"validation",type:"min_length",reference:Fi,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function kr(){return{kind:"transformation",type:"trim",reference:kr,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Dl(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function Di(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function oa(e,t){return{kind:"schema",type:"array",reference:oa,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Fe(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Ue(this,"type",i,r);return i}}}function Sr(e){return{kind:"schema",type:"boolean",reference:Sr,expects:"boolean",async:!1,message:e,get"~standard"(){return Fe(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Ue(this,"type",t,i),t}}}function K(e,t){return{kind:"schema",type:"nullable",reference:K,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Fe(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=Di(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function ei(e,t){return{kind:"schema",type:"nullish",reference:ei,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Fe(this)},"~run"(i,r){return(i.value===null||i.value===void 0)&&(this.default!==void 0&&(i.value=Di(this,i,r)),i.value===null||i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function xt(e){return{kind:"schema",type:"number",reference:xt,expects:"number",async:!1,message:e,get"~standard"(){return Fe(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ue(this,"type",t,i),t}}}function De(e,t){return{kind:"schema",type:"object",reference:De,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Fe(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:Di(s),u=s["~run"]({value:l},r);if(u.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=Dl(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ue(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Ue(this,"type",i,r);return i}}}function sa(e,t){return{kind:"schema",type:"optional",reference:sa,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Fe(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=Di(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Nt(e,t){return{kind:"schema",type:"picklist",reference:Nt,expects:Fl(e.map(aa),"|"),async:!1,options:e,message:t,get"~standard"(){return Fe(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:Ue(this,"type",i,r),i}}}function Cr(e,t,i){return{kind:"schema",type:"record",reference:Cr,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Fe(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(Tl(a,l)){const u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}const d=this.value["~run"]({value:u},n);if(d.issues){const h={type:"object",origin:"value",input:a,key:l,value:u};for(const g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!d.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=d.value)}}else Ue(this,"type",r,n);return r}}}function R(e){return{kind:"schema",type:"string",reference:R,expects:"string",async:!1,message:e,get"~standard"(){return Fe(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Ue(this,"type",t,i),t}}}function la(){return{kind:"schema",type:"unknown",reference:la,expects:"unknown",async:!1,get"~standard"(){return Fe(this)},"~run"(e){return e.typed=!0,e}}}function $r(...e){return{...e[0],pipe:e,get"~standard"(){return Fe(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Er(e,t,i){const r=e["~run"]({value:t},na(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var Ml=e=>e,Ll={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Nl(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function oh(e){return e}var Vl=["agent","sdk","form","integration","migration"],Ol=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],Pl=["screening","cv_match","interview","overall"],Rl=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],jl=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],ca=Nt(Vl),Bl=Nt(Ol),zl=$r(R(),kr(),Fi(1),xr(100)),Ul=Nt(Pl),Hl=Nt(Rl),ql=$r(R(),kr(),Fi(1),xr(100)),Wl=Nt(jl),da=De({id:R(),email:K(R()),firstName:K(R()),lastName:K(R()),phone:K(R()),source:K(ca),identifiedAt:K(R()),createdAt:R(),updatedAt:R()}),ua=$r(R(),Fi(1)),Ir=Cr(R(),la()),Kl=De({id:R(),applicationId:R(),status:Hl,scheduledAt:K(R()),completedAt:K(R()),meta:K(Ir),createdAt:R(),updatedAt:R()}),Gl=De({score:xt(),reason:R(),confidence:xt()}),fa=De({id:R(),candidateId:R(),jobId:xt(),stage:zl,stageGroup:Bl,stageEnteredAt:R(),rating:K(xt()),disqualifiedAt:K(R()),disqualificationReason:K(ql),disqualificationNote:K(R()),source:Wl,sourceDetail:K(R()),sessionId:K(xt()),externalApplicationId:K(R()),meta:K(Ir),context:K(Ir),scoredAt:K(R()),createdAt:R(),updatedAt:R()}),Yl=De({id:R(),applicationId:R(),scoreType:Ul,score:K(xt()),reason:K(R()),categories:K(Cr(R(),Gl)),scoredBy:K(R()),createdAt:R()});({...fa.entries},{...da.entries});var Jl=De({anonymousId:ua,email:ua,firstName:ei(R()),lastName:ei(R()),phone:ei(R()),source:ei(ca)}),Zl=De({candidateId:R(),isNew:Sr()}),Xl=De({id:R(),stageGroup:R(),createdAt:R()}),Ql=De({isDuplicate:Sr(),existingApplication:sa(Xl)}),ec=({environment:e,publishableKey:t,logger:i})=>{let r=Ll[e];return{async checkDuplicate(n){try{let a=new URLSearchParams({email:n.email,scope:n.scope});n.scope==="job"&&n.jobId!=null&&a.set("job_id",String(n.jobId));let o=await fetch(`${r}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return i.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Er(Ql,s);return l.success?l.output:(i.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 i.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return i.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:n.email,firstName:n.firstName,lastName:n.lastName,phone:n.phone,anonymousId:n.anonymousId,source:n.source??"sdk"},o=Er(Jl,a);if(!o.success)return i.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${r}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return i.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Er(Zl,await s.json());return l.success?l.output:(i.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return i.error("[TalentBankClient] identify failed:",a),null}}}},pa=tl(pr([Te(),Ii()]),zn(String)),ha=ne({id:pa,version:Ii(),build:Ii(),nodes:Hn(Un()),context_schema:ke(Ei(Wn(Te(),ne({required:fr(),type:pr([_t("string"),_t("number")])}))))}),tc=ne({flow:ha}),ic=ne({company:ne({name:Te()}),flow:ha,job:ne({id:pa,title:Te()}),user:ke(ne({city:ke(Te()),country:ke(Te()),isEU:ke(fr()),continent:ke(Te())}))}),rc=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),nc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Nl(),response:ic}},ac={pathname:"/flow/id/:id",method:"GET",schema:{response:tc}},ti,T,ga,ba,kt,va,wa,Ar,ma,Vt={},ya=[],oc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mi=Array.isArray;function Xe(e,t){for(var i in t)e[i]=t[i];return e}function _a(e){var t=e.parentNode;t&&t.removeChild(e)}function Ee(e,t,i){var r,n,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?ti.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return ii(e,o,r,n,null)}function ii(e,t,i,r,n){var a={type:e,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++ga};return n==null&&T.vnode!=null&&T.vnode(a),a}function sc(){return{current:null}}function ae(e){return e.children}function Ve(e,t){this.props=e,this.context=t}function Li(e,t){if(t==null)return e.__?Li(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?Li(e):null}function xa(e){var t,i;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null){e.__e=e.__c.base=i.__e;break}return xa(e)}}function Tr(e){(!e.__d&&(e.__d=!0)&&kt.push(e)&&!Ni.__r++||va!==T.debounceRendering)&&((va=T.debounceRendering)||wa)(Ni)}function Ni(){var e,t,i,r,n,a,o,s,l;for(kt.sort(Ar);e=kt.shift();)e.__d&&(t=kt.length,r=void 0,n=void 0,a=void 0,s=(o=(i=e).__v).__e,(l=i.__P)&&(r=[],n=[],(a=Xe({},o)).__v=o.__v+1,Fr(l,o,a,i.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s??Li(o),o.__h,n),Aa(r,o,n),o.__e!=s&&xa(o)),kt.length>t&&kt.sort(Ar));Ni.__r=0}function ka(e,t,i,r,n,a,o,s,l,u,p){var d,h,g,w,y,x,_,v,C,$,A=0,L=r&&r.__k||ya,B=L.length,N=B,j=t.length;for(i.__k=[],d=0;d<j;d++)(w=i.__k[d]=(w=t[d])==null||typeof w=="boolean"||typeof w=="function"?null:typeof w=="string"||typeof w=="number"||typeof w=="bigint"?ii(null,w,null,null,w):Mi(w)?ii(ae,{children:w},null,null,null):w.__b>0?ii(w.type,w.props,w.key,w.ref?w.ref:null,w.__v):w)!=null&&(w.__=i,w.__b=i.__b+1,(v=lc(w,L,_=d+A,N))===-1?g=Vt:(g=L[v]||Vt,L[v]=void 0,N--),Fr(e,w,g,n,a,o,s,l,u,p),y=w.__e,(h=w.ref)&&g.ref!=h&&(g.ref&&Dr(g.ref,null,w),p.push(h,w.__c||y,w)),y!=null&&(x==null&&(x=y),$=!(C=g===Vt||g.__v===null)&&v===_,C?v==-1&&A--:v!==_&&(v===_+1?(A++,$=!0):v>_?N>j-_?(A+=v-_,$=!0):A--:A=v<_&&v==_-1?v-_:0),_=d+A,$=$||v==d&&!C,typeof w.type!="function"||v===_&&g.__k!==w.__k?typeof w.type=="function"||$?w.__d!==void 0?(l=w.__d,w.__d=void 0):l=y.nextSibling:l=Ca(e,y,l):l=Sa(w,l,e),typeof i.type=="function"&&(i.__d=l)));for(i.__e=x,d=B;d--;)L[d]!=null&&(typeof i.type=="function"&&L[d].__e!=null&&L[d].__e==i.__d&&(i.__d=L[d].__e.nextSibling),Ta(L[d],L[d]))}function Sa(e,t,i){for(var r,n=e.__k,a=0;n&&a<n.length;a++)(r=n[a])&&(r.__=e,t=typeof r.type=="function"?Sa(r,t,i):Ca(i,r.__e,t));return t}function Qe(e,t){return t=t||[],e==null||typeof e=="boolean"||(Mi(e)?e.some(function(i){Qe(i,t)}):t.push(e)),t}function Ca(e,t,i){return i==null||i.parentNode!==e?e.insertBefore(t,null):t==i&&t.parentNode!=null||e.insertBefore(t,i),t.nextSibling}function lc(e,t,i,r){var n=e.key,a=e.type,o=i-1,s=i+1,l=t[i];if(l===null||l&&n==l.key&&a===l.type)return i;if(r>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&n==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&n==l.key&&a===l.type)return s;s++}}return-1}function cc(e,t,i,r,n){var a;for(a in i)a==="children"||a==="key"||a in t||Vi(e,a,null,i[a],r);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||i[a]===t[a]||Vi(e,a,t[a],i[a],r)}function $a(e,t,i){t[0]==="-"?e.setProperty(t,i??""):e[t]=i==null?"":typeof i!="number"||oc.test(t)?i:i+"px"}function Vi(e,t,i,r,n){var a;e:if(t==="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)i&&t in i||$a(e.style,t,"");if(i)for(t in i)r&&i[t]===r[t]||$a(e.style,t,i[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]=i,i?r||e.addEventListener(t,a?Ia:Ea,a):e.removeEventListener(t,a?Ia:Ea,a);else if(t!=="dangerouslySetInnerHTML"){if(n)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]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,i))}}function Ea(e){return this.l[e.type+!1](T.event?T.event(e):e)}function Ia(e){return this.l[e.type+!0](T.event?T.event(e):e)}function Fr(e,t,i,r,n,a,o,s,l,u){var p,d,h,g,w,y,x,_,v,C,$,A,L,B,N,j=t.type;if(t.constructor!==void 0)return null;i.__h!=null&&(l=i.__h,s=t.__e=i.__e,t.__h=null,a=[s]),(p=T.__b)&&p(t);try{e:if(typeof j=="function"){if(_=t.props,v=(p=j.contextType)&&r[p.__c],C=p?v?v.props.value:p.__:r,i.__c?x=(d=t.__c=i.__c).__=d.__E:("prototype"in j&&j.prototype.render?t.__c=d=new j(_,C):(t.__c=d=new Ve(_,C),d.constructor=j,d.render=uc),v&&v.sub(d),d.props=_,d.state||(d.state={}),d.context=C,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),j.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Xe({},d.__s)),Xe(d.__s,j.getDerivedStateFromProps(_,d.__s))),g=d.props,w=d.state,d.__v=t,h)j.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(j.getDerivedStateFromProps==null&&_!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,C),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(_,d.__s,C)===!1||t.__v===i.__v)){for(t.__v!==i.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.forEach(function(V){V&&(V.__=t)}),$=0;$<d._sb.length;$++)d.__h.push(d._sb[$]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,C),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,w,y)})}if(d.context=C,d.props=_,d.__P=e,d.__e=!1,A=T.__r,L=0,"prototype"in j&&j.prototype.render){for(d.state=d.__s,d.__d=!1,A&&A(t),p=d.render(d.props,d.state,d.context),B=0;B<d._sb.length;B++)d.__h.push(d._sb[B]);d._sb=[]}else do d.__d=!1,A&&A(t),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++L<25);d.state=d.__s,d.getChildContext!=null&&(r=Xe(Xe({},r),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(y=d.getSnapshotBeforeUpdate(g,w)),ka(e,Mi(N=p!=null&&p.type===ae&&p.key==null?p.props.children:p)?N:[N],t,i,r,n,a,o,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),x&&(d.__E=d.__=null)}else a==null&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=dc(i.__e,t,i,r,n,a,o,l,u);(p=T.diffed)&&p(t)}catch(V){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),T.__e(V,t,i)}}function Aa(e,t,i){for(var r=0;r<i.length;r++)Dr(i[r],i[++r],i[++r]);T.__c&&T.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){T.__e(a,n.__v)}})}function dc(e,t,i,r,n,a,o,s,l){var u,p,d,h=i.props,g=t.props,w=t.type,y=0;if(w==="svg"&&(n=!0),a!=null){for(;y<a.length;y++)if((u=a[y])&&"setAttribute"in u==!!w&&(w?u.localName===w:u.nodeType===3)){e=u,a[y]=null;break}}if(e==null){if(w===null)return document.createTextNode(g);e=n?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,g.is&&g),a=null,s=!1}if(w===null)h===g||s&&e.data===g||(e.data=g);else{if(a=a&&ti.call(e.childNodes),p=(h=i.props||Vt).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},y=0;y<e.attributes.length;y++)h[e.attributes[y].name]=e.attributes[y].value;(d||p)&&(d&&(p&&d.__html==p.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(cc(e,g,h,n,s),d)t.__k=[];else if(ka(e,Mi(y=t.props.children)?y:[y],t,i,r,n&&w!=="foreignObject",a,o,a?a[0]:i.__k&&Li(i,0),s,l),a!=null)for(y=a.length;y--;)a[y]!=null&&_a(a[y]);s||("value"in g&&(y=g.value)!==void 0&&(y!==e.value||w==="progress"&&!y||w==="option"&&y!==h.value)&&Vi(e,"value",y,h.value,!1),"checked"in g&&(y=g.checked)!==void 0&&y!==e.checked&&Vi(e,"checked",y,h.checked,!1))}return e}function Dr(e,t,i){try{typeof e=="function"?e(t):e.current=t}catch(r){T.__e(r,i)}}function Ta(e,t,i){var r,n;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Dr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){T.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&Ta(r[n],t,i||typeof e.type!="function");i||e.__e==null||_a(e.__e),e.__=e.__e=e.__d=void 0}function uc(e,t,i){return this.constructor(e,i)}function St(e,t,i){var r,n,a,o;T.__&&T.__(e,t),n=(r=typeof i=="function")?null:i&&i.__k||t.__k,a=[],o=[],Fr(t,e=(!r&&i||t).__k=Ee(ae,null,[e]),n||Vt,Vt,t.ownerSVGElement!==void 0,!r&&i?[i]:n?null:t.firstChild?ti.call(t.childNodes):null,a,!r&&i?i:n?n.__e:t.firstChild,r,o),Aa(a,e,o)}function Fa(e,t){St(e,t,Fa)}function fc(e,t,i){var r,n,a,o,s=Xe({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?n=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ti.call(arguments,2):i),ii(e.type,s,r||e.key,n||e.ref,null)}function Da(e,t){var i={__c:t="__cC"+ma++,__:e,Consumer:function(r,n){return r.children(n)},Provider:function(r){var n,a;return this.getChildContext||(n=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Tr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),r.children}};return i.Provider.__=i.Consumer.contextType=i}ti=ya.slice,T={__e:function(e,t,i,r){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,r||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},ga=0,ba=function(e){return e!=null&&e.constructor===void 0},Ve.prototype.setState=function(e,t){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xe({},this.state),typeof e=="function"&&(e=e(Xe({},i),this.props)),e&&Xe(i,e),e!=null&&this.__v&&(t&&this._sb.push(t),Tr(this))},Ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Tr(this))},Ve.prototype.render=ae,kt=[],wa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(e,t){return e.__v.__b-t.__v.__b},Ni.__r=0,ma=0;function Ma(e){var t,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(i=Ma(e[t]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function et(){for(var e,t,i=0,r="",n=arguments.length;i<n;i++)(e=arguments[i])&&(t=Ma(e))&&(r&&(r+=" "),r+=t);return r}const La=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Na=et,Ct=(e,t)=>i=>{var r;if((t==null?void 0:t.variants)==null)return Na(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(u=>{const p=i==null?void 0:i[u],d=a==null?void 0:a[u];if(p===null)return null;const h=La(p)||La(d);return n[u][h]}),s=i&&Object.entries(i).reduce((u,p)=>{let[d,h]=p;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:d,className:h,...g}=p;return Object.entries(g).every(w=>{let[y,x]=w;return Array.isArray(x)?x.includes({...a,...s}[y]):{...a,...s}[y]===x})?[...u,d,h]:u},[]);return Na(e,o,l,i==null?void 0:i.class,i==null?void 0:i.className)};var st,Q,Mr,Va,Ot=0,Oa=[],Oi=[],Pa=T.__b,Ra=T.__r,ja=T.diffed,Ba=T.__c,za=T.unmount;function Pt(e,t){T.__h&&T.__h(Q,e,Ot||t),Ot=0;var i=Q.__H||(Q.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:Oi}),i.__[e]}function Oe(e){return Ot=1,Ua(Wa,e)}function Ua(e,t,i){var r=Pt(st++,2);if(r.t=e,!r.__c&&(r.__=[i?i(t):Wa(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,s);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.u)){var n=function(s,l,u){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,s,l,u);var d=!1;return p.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(d=!0)}}),!(!d&&r.__c.props===s)&&(!a||a.call(this,s,l,u))};Q.u=!0;var a=Q.shouldComponentUpdate,o=Q.componentWillUpdate;Q.componentWillUpdate=function(s,l,u){if(this.__e){var p=a;a=void 0,n(s,l,u),a=p}o&&o.call(this,s,l,u)},Q.shouldComponentUpdate=n}return r.__N||r.__}function Pi(e,t){var i=Pt(st++,3);!T.__s&&Nr(i.__H,t)&&(i.__=e,i.i=t,Q.__H.__h.push(i))}function Se(e,t){var i=Pt(st++,4);!T.__s&&Nr(i.__H,t)&&(i.__=e,i.i=t,Q.__h.push(i))}function be(e){return Ot=5,lt(function(){return{current:e}},[])}function pc(e,t,i){Ot=6,Se(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},i==null?i:i.concat(e))}function lt(e,t){var i=Pt(st++,7);return Nr(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function hc(e,t){return Ot=8,lt(function(){return e},t)}function Ha(e){var t=Q.context[e.__c],i=Pt(st++,9);return i.c=e,t?(i.__==null&&(i.__=!0,t.sub(Q)),t.props.value):e.__}function gc(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function bc(){var e=Pt(st++,11);if(!e.__){for(var t=Q.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var i=t.__m||(t.__m=[0,0]);e.__="P"+i[0]+"-"+i[1]++}return e.__}function vc(){for(var e;e=Oa.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ri),e.__H.__h.forEach(Lr),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){Q=null,Pa&&Pa(e)},T.__r=function(e){Ra&&Ra(e),st=0;var t=(Q=e.__c).__H;t&&(Mr===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(i){i.__N&&(i.__=i.__N),i.__V=Oi,i.__N=i.i=void 0})):(t.__h.forEach(Ri),t.__h.forEach(Lr),t.__h=[],st=0)),Mr=Q},T.diffed=function(e){ja&&ja(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Oa.push(t)!==1&&Va===T.requestAnimationFrame||((Va=T.requestAnimationFrame)||wc)(vc)),t.__H.__.forEach(function(i){i.i&&(i.__H=i.i),i.__V!==Oi&&(i.__=i.__V),i.i=void 0,i.__V=Oi})),Mr=Q=null},T.__c=function(e,t){t.some(function(i){try{i.__h.forEach(Ri),i.__h=i.__h.filter(function(r){return!r.__||Lr(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],T.__e(r,i.__v)}}),Ba&&Ba(e,t)},T.unmount=function(e){za&&za(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach(function(r){try{Ri(r)}catch(n){t=n}}),i.__H=void 0,t&&T.__e(t,i.__v))};var qa=typeof requestAnimationFrame=="function";function wc(e){var t,i=function(){clearTimeout(r),qa&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(i,100);qa&&(t=requestAnimationFrame(i))}function Ri(e){var t=Q,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),Q=t}function Lr(e){var t=Q;e.__c=e.__(),Q=t}function Nr(e,t){return!e||e.length!==t.length||t.some(function(i,r){return i!==e[r]})}function Wa(e,t){return typeof t=="function"?t(e):t}function Ka(e,t){for(var i in t)e[i]=t[i];return e}function Vr(e,t){for(var i in e)if(i!=="__source"&&!(i in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Pr(e){this.props=e}function mc(e,t){function i(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,n)||!o:Vr(this.props,n)}function r(n){return this.shouldComponentUpdate=i,Ee(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Pr.prototype=new Ve).isPureReactComponent=!0,Pr.prototype.shouldComponentUpdate=function(e,t){return Vr(this.props,e)||Vr(this.state,t)};var Ga=T.__b;T.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ga&&Ga(e)};var yc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(e){function t(i){var r=Ka({},i);return delete r.ref,e(r,i.ref||null)}return t.$$typeof=yc,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ya=function(e,t){return e==null?null:Qe(Qe(e).map(t))},_c={map:Ya,forEach:Ya,count:function(e){return e?Qe(e).length:0},only:function(e){var t=Qe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Qe},xc=T.__e;T.__e=function(e,t,i,r){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=i.__e,t.__k=i.__k),n.__c(e,t)}xc(e,t,i,r)};var Ja=T.unmount;function Za(e,t,i){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Ka({},e)).__c!=null&&(e.__c.__P===i&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Za(r,t,i)})),e}function Xa(e,t,i){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Xa(r,t,i)}),e.__c&&e.__c.__P===t&&(e.__e&&i.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=i)),e}function ri(){this.__u=0,this.t=null,this.__b=null}function Qa(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function eo(e){var t,i,r;function n(a){if(t||(t=e()).then(function(o){i=o.default||o},function(o){r=o}),r)throw r;if(!i)throw t;return Ee(i,a)}return n.displayName="Lazy",n.__f=!0,n}function ni(){this.u=null,this.o=null}T.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ja&&Ja(e)},(ri.prototype=new Ve).__c=function(e,t){var i=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(i);var n=Qa(r.__v),a=!1,o=function(){a||(a=!0,i.__R=null,n?n(s):s())};i.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Xa(u,u.__c.__P,u.__c.__O)}var p;for(r.setState({__a:r.__b=null});p=r.t.pop();)p.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ri.prototype.componentWillUnmount=function(){this.t=[]},ri.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Za(this.__b,i,r.__O=r.__P)}this.__b=null}var n=t.__a&&Ee(ae,null,e.fallback);return n&&(n.__h=null),[Ee(ae,null,t.__a?null:e.children),n]};var to=function(e,t,i){if(++i[1]===i[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(i=e.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;e.u=i=i[2]}};function kc(e){return this.getChildContext=function(){return e.context},e.children}function Sc(e){var t=this,i=e.i;t.componentWillUnmount=function(){St(null,t.l),t.l=null,t.i=null},t.i&&t.i!==i&&t.componentWillUnmount(),e.__v?(t.l||(t.i=i,t.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,n){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),St(Ee(kc,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Cc(e,t){var i=Ee(Sc,{__v:e,i:t});return i.containerInfo=t,i}(ni.prototype=new Ve).__a=function(e){var t=this,i=Qa(t.__v),r=t.o.get(e);return r[0]++,function(n){var a=function(){t.props.revealOrder?(r.push(n),to(t,e,r)):n()};i?i(a):a()}},ni.prototype.render=function(e){this.u=null,this.o=new Map;var t=Qe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var i=t.length;i--;)this.o.set(t[i],this.u=[1,0,this.u]);return e.children},ni.prototype.componentDidUpdate=ni.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,i){to(e,i,t)})};var io=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,$c=/^(?: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]/,Ec=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ic=/[A-Z0-9]/g,Ac=typeof document<"u",Tc=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Fc(e,t,i){return t.__k==null&&(t.textContent=""),St(e,t),typeof i=="function"&&i(),e?e.__c:null}function Dc(e,t,i){return Fa(e,t),typeof i=="function"&&i(),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 ro=T.event;function Mc(){}function Lc(){return this.cancelBubble}function Nc(){return this.defaultPrevented}T.event=function(e){return ro&&(e=ro(e)),e.persist=Mc,e.isPropagationStopped=Lc,e.isDefaultPrevented=Nc,e.nativeEvent=e};var jr,Vc={enumerable:!1,configurable:!0,get:function(){return this.class}},no=T.vnode;T.vnode=function(e){typeof e.type=="string"&&function(t){var i=t.props,r=t.type,n={};for(var a in i){var o=i[a];if(!(a==="value"&&"defaultValue"in i&&o==null||Ac&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in i&&i.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||r!=="input"&&r!=="textarea"||Tc(i.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Ec.test(a)?a=s:r.indexOf("-")===-1&&$c.test(a)?a=a.replace(Ic,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}r=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),r=="select"&&n.defaultValue!=null&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),i.class&&!i.className?(n.class=i.class,Object.defineProperty(n,"className",Vc)):(i.className&&!i.class||i.class&&i.className)&&(n.class=n.className=i.className),t.props=n}(e),e.$$typeof=io,no&&no(e)};var ao=T.__r;T.__r=function(e){ao&&ao(e),jr=e.__c};var oo=T.diffed;T.diffed=function(e){oo&&oo(e);var t=e.props,i=e.__e;i!=null&&e.type==="textarea"&&"value"in t&&t.value!==i.value&&(i.value=t.value==null?"":t.value),jr=null};var Oc={ReactCurrentDispatcher:{current:{readContext:function(e){return jr.__n[e.__c].props.value}}}};function Pc(e){return Ee.bind(null,e)}function so(e){return!!e&&e.$$typeof===io}function Rc(e){return so(e)?fc.apply(null,arguments):e}function jc(e){return!!e.__k&&(St(null,e),!0)}function Bc(e){return e&&(e.base||e.nodeType===1&&e)||null}var zc=function(e,t){return e(t)},Uc=function(e,t){return e(t)},Hc=ae;function lo(e){e()}function qc(e){return e}function Wc(){return[!1,lo]}var Kc=Se;function Gc(e,t){var i=t(),r=Oe({h:{__:i,v:t}}),n=r[0].h,a=r[1];return Se(function(){n.__=i,n.v=t,Or(n.__,t())||a({h:n})},[e,i,t]),Pi(function(){return Or(n.__,n.v())||a({h:n}),e(function(){Or(n.__,n.v())||a({h:n})})},[e]),i}var ve={useState:Oe,useId:bc,useReducer:Ua,useEffect:Pi,useLayoutEffect:Se,useInsertionEffect:Kc,useTransition:Wc,useDeferredValue:qc,useSyncExternalStore:Gc,startTransition:lo,useRef:be,useImperativeHandle:pc,useMemo:lt,useCallback:hc,useContext:Ha,useDebugValue:gc,version:"17.0.2",Children:_c,render:Fc,hydrate:Dc,unmountComponentAtNode:jc,createPortal:Cc,createElement:Ee,createContext:Da,createFactory:Pc,cloneElement:Rc,createRef:sc,Fragment:ae,isValidElement:so,findDOMNode:Bc,Component:Ve,PureComponent:Pr,memo:mc,forwardRef:Rr,flushSync:Uc,unstable_batchedUpdates:zc,StrictMode:Hc,Suspense:ri,SuspenseList:ni,lazy:eo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Oc};const we=Symbol.for("@ts-pattern/matcher"),co=Symbol.for("@ts-pattern/isVariadic"),ji="@ts-pattern/anonymous-select-key",Br=e=>!!(e&&typeof e=="object"),Bi=e=>e&&!!e[we],oe=(e,t,i)=>{if(Bi(e)){const r=e[we](),{matched:n,selections:a}=r.match(t);return n&&a&&Object.keys(a).forEach(o=>i(o,a[o])),n}if(Br(e)){if(!Br(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],n=[],a=[];for(const o of e.keys()){const s=e[o];Bi(s)&&s[co]?a.push(s):a.length?n.push(s):r.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<r.length+n.length)return!1;const o=t.slice(0,r.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(r.length,n.length===0?1/0:-n.length);return r.every((u,p)=>oe(u,o[p],i))&&n.every((u,p)=>oe(u,s[p],i))&&(a.length===0||oe(a[0],l,i))}return e.length===t.length&&e.every((o,s)=>oe(o,t[s],i))}return Reflect.ownKeys(e).every(r=>{const n=e[r];return(r in t||Bi(a=n)&&a[we]().matcherType==="optional")&&oe(n,t[r],i);var a})}return Object.is(t,e)},me=e=>{var t,i,r;return Br(e)?Bi(e)?(t=(i=(r=e[we]()).getSelectionKeys)==null?void 0:i.call(r))!=null?t:[]:Array.isArray(e)?ai(e,me):ai(Object.values(e),me):[]},ai=(e,t)=>e.reduce((i,r)=>i.concat(t(r)),[]);function Yc(...e){if(e.length===1){const[t]=e;return i=>oe(t,i,()=>{})}if(e.length===2){const[t,i]=e;return oe(t,i,()=>{})}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:()=>Ur(e),and:t=>ee(e,t),or:t=>uo(e,t),select:t=>t===void 0?oi(e):oi(t,e)})}function zr(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let i=0;const r=[{value:Object.assign(t,{[co]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=r[i++])!=null?n:r.at(-1)}}}}))(e),{optional:()=>zr(Ur(e)),select:t=>zr(t===void 0?oi(e):oi(t,e))})}function Ur(e){return de({[we]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return t===void 0?(me(e).forEach(n=>r(n,void 0)),{matched:!0,selections:i}):{matched:oe(e,t,r),selections:i}},getSelectionKeys:()=>me(e),matcherType:"optional"})})}const Jc=(e,t)=>{for(const i of e)if(!t(i))return!1;return!0},Zc=(e,t)=>{for(const[i,r]of e.entries())if(!t(r,i))return!1;return!0},Xc=(e,t)=>{const i=Reflect.ownKeys(e);for(const r of i)if(!t(r,e[r]))return!1;return!0};function ee(...e){return de({[we]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return{matched:e.every(n=>oe(n,t,r)),selections:i}},getSelectionKeys:()=>ai(e,me),matcherType:"and"})})}function uo(...e){return de({[we]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return ai(e,me).forEach(n=>r(n,void 0)),{matched:e.some(n=>oe(n,t,r)),selections:i}},getSelectionKeys:()=>ai(e,me),matcherType:"or"})})}function U(e){return{[we]:()=>({match:t=>({matched:!!e(t)})})}}function oi(...e){const t=typeof e[0]=="string"?e[0]:void 0,i=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return de({[we]:()=>({match:r=>{let n={[t??ji]:r};return{matched:i===void 0||oe(i,r,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??ji].concat(i===void 0?[]:me(i))})})}function fo(e){return!0}function He(e){return typeof e=="number"}function ct(e){return typeof e=="string"}function dt(e){return typeof e=="bigint"}const po=de(U(fo)),Qc=de(U(fo)),ed=po,ut=e=>Object.assign(de(e),{startsWith:t=>{return ut(ee(e,(i=t,U(r=>ct(r)&&r.startsWith(i)))));var i},endsWith:t=>{return ut(ee(e,(i=t,U(r=>ct(r)&&r.endsWith(i)))));var i},minLength:t=>ut(ee(e,(i=>U(r=>ct(r)&&r.length>=i))(t))),length:t=>ut(ee(e,(i=>U(r=>ct(r)&&r.length===i))(t))),maxLength:t=>ut(ee(e,(i=>U(r=>ct(r)&&r.length<=i))(t))),includes:t=>{return ut(ee(e,(i=t,U(r=>ct(r)&&r.includes(i)))));var i},regex:t=>{return ut(ee(e,(i=t,U(r=>ct(r)&&!!r.match(i)))));var i}}),ho=ut(U(ct)),qe=e=>Object.assign(de(e),{between:(t,i)=>qe(ee(e,((r,n)=>U(a=>He(a)&&r<=a&&n>=a))(t,i))),lt:t=>qe(ee(e,(i=>U(r=>He(r)&&r<i))(t))),gt:t=>qe(ee(e,(i=>U(r=>He(r)&&r>i))(t))),lte:t=>qe(ee(e,(i=>U(r=>He(r)&&r<=i))(t))),gte:t=>qe(ee(e,(i=>U(r=>He(r)&&r>=i))(t))),int:()=>qe(ee(e,U(t=>He(t)&&Number.isInteger(t)))),finite:()=>qe(ee(e,U(t=>He(t)&&Number.isFinite(t)))),positive:()=>qe(ee(e,U(t=>He(t)&&t>0))),negative:()=>qe(ee(e,U(t=>He(t)&&t<0)))}),td=qe(U(He)),ft=e=>Object.assign(de(e),{between:(t,i)=>ft(ee(e,((r,n)=>U(a=>dt(a)&&r<=a&&n>=a))(t,i))),lt:t=>ft(ee(e,(i=>U(r=>dt(r)&&r<i))(t))),gt:t=>ft(ee(e,(i=>U(r=>dt(r)&&r>i))(t))),lte:t=>ft(ee(e,(i=>U(r=>dt(r)&&r<=i))(t))),gte:t=>ft(ee(e,(i=>U(r=>dt(r)&&r>=i))(t))),positive:()=>ft(ee(e,U(t=>dt(t)&&t>0))),negative:()=>ft(ee(e,U(t=>dt(t)&&t<0)))}),id=ft(U(dt)),rd=de(U(function(e){return typeof e=="boolean"})),nd=de(U(function(e){return typeof e=="symbol"})),ad=de(U(function(e){return e==null})),od=de(U(function(e){return e!=null}));var si={__proto__:null,matcher:we,optional:Ur,array:function(...e){return zr({[we]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const i=e[0];let r={};if(t.length===0)return me(i).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>oe(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:me(e[0])})})},set:function(...e){return de({[we]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};if(e.length===0)return{matched:!0};const r=(a,o)=>{i[a]=(i[a]||[]).concat([o])},n=e[0];return{matched:Jc(t,a=>oe(n,a,r)),selections:i}},getSelectionKeys:()=>e.length===0?[]:me(e[0])})})},map:function(...e){return de({[we]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};const r=(s,l)=>{i[s]=(i[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var n;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);const[a,o]=e;return{matched:Zc(t,(s,l)=>{const u=oe(a,l,r),p=oe(o,s,r);return u&&p}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[...me(e[0]),...me(e[1])]})})},record:function(...e){return de({[we]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var i;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);let r={};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])},[a,o]=e.length===1?[ho,e[0]]:e;return{matched:Xc(t,(s,l)=>{const u=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=u!==null&&oe(a,u,n),d=oe(a,s,n),h=oe(o,l,n);return(d||p)&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...me(e[0]),...me(e[1])]})})},intersection:ee,union:uo,not:function(e){return de({[we]:()=>({match:t=>({matched:!oe(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:U,select:oi,any:po,unknown:Qc,_:ed,string:ho,number:td,bigint:id,boolean:rd,symbol:nd,nullish:ad,nonNullable:od,instanceOf:function(e){return de(U(function(t){return i=>i instanceof t}(e)))},shape:function(e){return de(U(Yc(e)))}};class sd extends Error{constructor(t){let i;try{i=JSON.stringify(t)}catch{i=t}super(`Pattern matching error: no pattern matches value ${i}`),this.input=void 0,this.input=t}}const Hr={matched:!1,value:void 0};function zi(e){return new ld(e,Hr)}let ld=class jn{constructor(t,i){this.input=void 0,this.state=void 0,this.input=t,this.state=i}with(...t){if(this.state.matched)return this;const i=t[t.length-1],r=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(u,p)=>{a=!0,o[u]=p},l=!r.some(u=>oe(u,this.input,s))||n&&!n(this.input)?Hr:{matched:!0,value:i(a?ji in o?o[ji]:o:this.input,this.input)};return new jn(this.input,l)}when(t,i){if(this.state.matched)return this;const r=!!t(this.input);return new jn(this.input,r?{matched:!0,value:i(this.input,this.input)}:Hr)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=cd){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function cd(e){throw new sd(e)}var dd=["other","few","many","two","one","zero"],go=({terms:e,overrides:t,locale:i})=>{const r=new Intl.PluralRules(i);function n(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,u)=>{var p;return((p=o==null?void 0:o[u])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=r.select(o.count);if(!(l in s)){const u=dd.find(p=>p in s);if(!u)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=u}return s[l].replace(/{{(\w+)}}/g,(u,p)=>{var d;return((d=o==null?void 0:o[p])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},ud=0;function c(e,t,i,r,n,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var u={type:e,props:l,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ud,__source:n,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return T.vnode&&T.vnode(u),u}var bo=Da(null),vo=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:i,locale:r})=>{const n=lt(()=>go({locale:r,terms:e,overrides:t}),[t,r]);return c(bo.Provider,{value:{t:n,locale:r},children:i})},useTranslation:()=>{const t=Ha(bo);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:i})=>go({terms:e,overrides:t,locale:i})}),{TranslationProvider:sh,useTranslation:lh,createTFunction:ch,defaultTerms:fd}=vo({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",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}}. Your answers are saved, so you can come back after then and submit your application. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Your answers are saved, so you can come back after then and submit your application. 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_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:pd,useTranslation:se,createTFunction:dh}=vo({...fd,error_heading:"Something unexpected happened",undo:"Change answer",conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"This role is no longer accepting applications.",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_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_retryable:"We couldn't submit your application. Please try again.",submission_failed:"We couldn't submit your application. Choose Restart to 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.",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:"Still working — the employer's application system is taking a little longer than usual. Please keep this window 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.",maximize:"Maximise",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",file_more:{one:"+{{count}} file",other:"+{{count}} files"},loading:"Loading",minimize:"Minimise"}),uh="";function tt(e,t){if(!e)throw new Error(t)}var qr=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(qr):Object.keys(e).sort().reduce((t,i)=>(t[i]=qr(e[i]),t),{}),hd=e=>{let t=JSON.stringify(qr(e)),i=5381;for(let r=0;r<t.length;r++)i=i*33^t.charCodeAt(r);return(i>>>0).toString(36)},gd=Symbol.for("preact-signals");function Wr(){if(Rt>1)Rt--;else{for(var e,t=!1;li!==void 0;){var i=li;for(li=void 0,Kr++;i!==void 0;){var r=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&mo(i))try{i.c()}catch(n){t||(e=n,t=!0)}i=r}}if(Kr=0,Rt--,t)throw e}}var G=void 0,li=void 0,Rt=0,Kr=0,Ui=0;function wo(e){if(G!==void 0){var t=e.n;if(t===void 0||t.t!==G)return t={i:0,S:e,p:G.s,n:void 0,t:G,e:void 0,x:void 0,r:t},G.s!==void 0&&(G.s.n=t),G.s=t,e.n=t,32&G.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=G.s,t.n=void 0,G.s.n=t,G.s=t),t}}function pe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}pe.prototype.brand=gd,pe.prototype.h=function(){return!0},pe.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)},pe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,i=e.x;t!==void 0&&(t.x=i,e.e=void 0),i!==void 0&&(i.e=t,e.x=void 0),e===this.t&&(this.t=i)}},pe.prototype.subscribe=function(e){var t=this;return Yr(function(){var i=t.value,r=G;G=void 0;try{e(i)}finally{G=r}})},pe.prototype.valueOf=function(){return this.value},pe.prototype.toString=function(){return this.value+""},pe.prototype.toJSON=function(){return this.value},pe.prototype.peek=function(){var e=G;G=void 0;try{return this.value}finally{G=e}},Object.defineProperty(pe.prototype,"value",{get:function(){var e=wo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Kr>100)throw new Error("Cycle detected");this.v=e,this.i++,Ui++,Rt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Wr()}}}});function Pe(e){return new pe(e)}function mo(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 yo(e){for(var t=e.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function _o(e){for(var t=e.s,i=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=i}function jt(e){pe.call(this,void 0),this.x=e,this.s=void 0,this.g=Ui-1,this.f=4}(jt.prototype=new pe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ui))return!0;if(this.g=Ui,this.f|=1,this.i>0&&!mo(this))return this.f&=-2,!0;var e=G;try{yo(this),G=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return G=e,_o(this),this.f&=-2,!0},jt.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)}pe.prototype.S.call(this,e)},jt.prototype.U=function(e){if(this.t!==void 0&&(pe.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)}},jt.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(jt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=wo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function bd(e){return new jt(e)}function xo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Rt++;var i=G;G=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Gr(e),r}finally{G=i,Wr()}}}function Gr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,xo(e)}function vd(e){if(G!==this)throw new Error("Out-of-order effect");_o(this),G=e,this.f&=-2,8&this.f&&Gr(this),Wr()}function ci(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}ci.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()}},ci.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,xo(this),yo(this),Rt++;var e=G;return G=this,vd.bind(this,e)},ci.prototype.N=function(){2&this.f||(this.f|=2,this.o=li,li=this)},ci.prototype.d=function(){this.f|=8,1&this.f||Gr(this)};function Yr(e){var t=new ci(e);try{t.c()}catch(i){throw t.d(),i}return t.d.bind(t)}var Jr;function Bt(e,t){T[e]=t.bind(null,T[e]||function(){})}function Hi(e){Jr&&Jr(),Jr=e&&e.S()}function ko(e){var t=this,i=e.data,r=md(i);r.value=i;var n=lt(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!ba(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},bd(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}ko.displayName="_st",Object.defineProperties(pe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ko},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Bt("__b",function(e,t){if(typeof t.type=="string"){var i,r=t.props;for(var n in r)if(n!=="children"){var a=r[n];a instanceof pe&&(i||(t.__np=i={}),i[n]=a,r[n]=a.peek())}}e(t)}),Bt("__r",function(e,t){Hi();var i,r=t.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(n){var a;return Yr(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),Hi(i),e(t)}),Bt("__e",function(e,t,i,r){Hi(),e(t,i,r)}),Bt("diffed",function(e,t){Hi();var i;if(typeof t.type=="string"&&(i=t.__e)){var r=t.__np,n=t.props;if(r){var a=i.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in r)&&(s.d(),a[o]=void 0)}else i.U=a={};for(var l in r){var u=a[l],p=r[l];u===void 0?(u=wd(i,l,p,n),a[l]=u):u.o(p,n)}}}e(t)});function wd(e,t,i,r){var n=t in e&&e.ownerSVGElement===void 0,a=Pe(i);return{o:function(o,s){a.value=o,r=s},d:Yr(function(){var o=a.value.value;r[t]!==o&&(r[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Bt("unmount",function(e,t){if(typeof t.type=="string"){var i=t.__e;if(i){var r=i.U;if(r){i.U=void 0;for(var n in r){var a=r[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Bt("__h",function(e,t,i,r){(r<3||r===9)&&(t.__$f|=2),e(t,i,r)}),Ve.prototype.shouldComponentUpdate=function(e,t){var i=this.__$u;if(!(i&&i.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var n in e)if(n!=="__source"&&e[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function md(e){return lt(function(){return Pe(e)},[])}const Zr=(e,t)=>t.some(i=>e instanceof i);let So,Co;function yd(){return So||(So=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function _d(){return Co||(Co=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xr=new WeakMap,Qr=new WeakMap,qi=new WeakMap;function xd(e){const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{i($t(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return qi.set(t,e),t}function kd(e){if(Xr.has(e))return;const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{i(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Xr.set(e,t)}let en={get(e,t,i){if(e instanceof IDBTransaction){if(t==="done")return Xr.get(e);if(t==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return $t(e[t])},set(e,t,i){return e[t]=i,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function $o(e){en=e(en)}function Sd(e){return _d().includes(e)?function(...t){return e.apply(tn(this),t),$t(this.request)}:function(...t){return $t(e.apply(tn(this),t))}}function Cd(e){return typeof e=="function"?Sd(e):(e instanceof IDBTransaction&&kd(e),Zr(e,yd())?new Proxy(e,en):e)}function $t(e){if(e instanceof IDBRequest)return xd(e);if(Qr.has(e))return Qr.get(e);const t=Cd(e);return t!==e&&(Qr.set(e,t),qi.set(t,e)),t}const tn=e=>qi.get(e);function $d(e,t,{blocked:i,upgrade:r,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=$t(o);return r&&o.addEventListener("upgradeneeded",l=>{r($t(o.result),l.oldVersion,l.newVersion,$t(o.transaction),l)}),i&&o.addEventListener("blocked",l=>i(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),n&&l.addEventListener("versionchange",u=>n(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Ed=["get","getKey","getAll","getAllKeys","count"],Id=["put","add","delete","clear"],rn=new Map;function Eo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(rn.get(t))return rn.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,n=Id.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!(n||Ed.includes(i)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(s.shift())),(await Promise.all([u[i](...s),n&&l.done]))[0]};return rn.set(t,a),a}$o(e=>({...e,get:(t,i,r)=>Eo(t,i)||e.get(t,i,r),has:(t,i)=>!!Eo(t,i)||e.has(t,i)}));const Ad=["continue","continuePrimaryKey","advance"],Io={},nn=new WeakMap,Ao=new WeakMap,Td={get(e,t){if(!Ad.includes(t))return e[t];let i=Io[t];return i||(i=Io[t]=function(...r){nn.set(this,Ao.get(this)[t](...r))}),i}};async function*Fd(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const i=new Proxy(t,Td);for(Ao.set(i,t),qi.set(i,tn(t));t;)yield i,t=await(nn.get(i)||t.continue()),nn.delete(i)}function To(e,t){return t===Symbol.asyncIterator&&Zr(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Zr(e,[IDBIndex,IDBObjectStore])}$o(e=>({...e,get(t,i,r){return To(t,i)?Fd:e.get(t,i,r)},has(t,i){return To(t,i)||e.has(t,i)}}));const Wi=typeof indexedDB>"u"?void 0:$d("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Dd=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:i,...r}=t;return r})});let Ki,an,di;const Fo=()=>{if(!Ki)return di;const e=Ki;Ki=void 0;const t=Yi(e),i=Wi==null?void 0:Wi.then(r=>r.put("state",Dd(e.data),t)).finally(()=>{di===i&&(di=void 0)});return di=i,di},Me={getStateData:async(e,t,i)=>{var n;const r=Yi({...e,flowKeys:t,context:i});return(n=await Wi)==null?void 0:n.get("state",r)},setStateData:e=>{Ki=e,clearTimeout(an),an=setTimeout(()=>void Fo(),1e3)},flushStateData:()=>(clearTimeout(an),Fo()??Promise.resolve())},zt=e=>t=>t?t.type===e:!1,Md=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Do=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Md()}),Ld=e=>zi(e).with({nativeEvent:{submitter:si.select(si.union(si.instanceOf(HTMLButtonElement),si.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Gi=(e,t,i,r=0)=>{if(!t.nextId)return i(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const n=e.find(u=>u.id===t.nextId);if(n===void 0)return{stepsMade:r,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(u=>u.id===a),s=t.type.includes("question")?1:0;if(o){const u=s+Math.max(Gi(e,n,i,r+s).remainingSteps,Gi(e,o,i,r+s).remainingSteps);return i(t.id,{stepsMade:r,remainingSteps:u}),{stepsMade:r,remainingSteps:u}}const l=s+Gi(e,n,i,r+s).remainingSteps;return i(t.id,{stepsMade:r,remainingSteps:l}),{stepsMade:r,remainingSteps:l}},Nd=e=>{const t={},i=e.find(r=>r.isHead);return i&&Gi(e,i,(r,n)=>{t[r]=n}),t},Yi=e=>[...e.flowKeys,e.id,e.version,e.build,hd(e.context)].join("/"),Vd=({data:e,nodes:t})=>{const i=e.startedWriteNodeIds===void 0?t.some(r=>r.type==="integration-application-submit"&&e.nodeHistory.includes(r.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!i&&Gn(t,e.submissions)},Od=({data:e,nodes:t})=>{var i;return!e.isFinished&&((((i=e.startedWriteNodeIds)==null?void 0:i.length)??0)>0||Gn(t,e.submissions))},We=Pe({state:"idle"}),on=new Set,Et=e=>{const{state:t,flow:i}=We.value;if(t!=="loaded")return;tt(i,"No flow to update");const r=e(i.data);i.data=r,We.value={state:t,flow:i},Me.setStateData(i)},D={current$:We,viewState$:Pe("closed"),prepareFlow:async({flow:e,context:t={},flowKeys:i,title:r,analytics:n,job:a,locationOrigin:o})=>{await Me.flushStateData().catch(()=>{});const s=await Me.getStateData(e,i,t),l=s??Do(),u=Yi({...e,flowKeys:i,context:t}),p=s!==void 0&&!on.has(u)&&Vd({data:l,nodes:e.nodes});return p||on.add(u),{data:l,offerResume:p,startedAt:new Date,nodeIdToProgress:Nd(e.nodes),flowKeys:i,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:r,analytics:n,job:a,locationOrigin:o}},commitFlow:e=>{We.value={state:"loaded",flow:e},Me.setStateData(e)},settleResume:e=>{e.offerResume=!1,on.add(Yi(e))},cancelCurrentFlow:()=>{We.value={state:"idle"},D.viewState$.value="closed"},markAsFinished:()=>Et(e=>({...e,isFinished:!0})),markAsInteracted:()=>Et(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Et(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{Et(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Me.flushStateData()},restart:()=>{const{state:e,flow:t}=We.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const i={...Do(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},r={...t,data:i,startedAt:new Date,offerResume:!1};We.value={state:e,flow:r},Me.setStateData(r)},addMessage:(e,t)=>{const i={...e,groupId:t};return Et(r=>(r.messages.push(i),r))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:i}=We.value;tt(t==="loaded","Application not loaded");const r=i.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));i.data.messages=r,Me.setStateData(i)},setSubmission:(e,t)=>Et(i=>(t===null?delete i.submissions[e]:i.submissions[e]=t,i)),setInput:e=>Et(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{We.peek().flow===e&&(We.value={state:"loaded",flow:e}),Me.setStateData(e),await Me.flushStateData()}},Pd=()=>{const{t:e}=se();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("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:[c("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"}),c("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"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:c("p",{class:"text-error-11 font-bold",children:e("error_heading")})})]})},Ji=e=>{const{t}=se();return c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:t("loading")}),c("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)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("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"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("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"})})})]})},Mo=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Ji,{class:"text-neutral-6 h-8 w-8"})}),Rd=e=>{const i=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-i,r))*100)}%`},jd=Ct("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"}}),ui=({class:e,children:t,variant:i,...r})=>c("button",{class:et(jd({variant:i}),e),...r,children:c("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})}),Lo=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Bd=()=>{if(D.current$.value.state!=="loaded")return null;const e=D.current$.value.flow.nodeIdToProgress,t=D.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const i=e[t];if(i===void 0)return null;const r=100*(i.stepsMade/(i.remainingSteps+i.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Rd(r)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},zd=({children:e,params:t})=>{const{t:i}=se(),r=D.viewState$;return c(ae,{children:c("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:[c("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:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{"aria-label":i("minimize"),onClick:()=>{r.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:sn,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:et({hidden:D.current$.value.state!=="loaded"||r.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,D.current$.value.state==="loaded"&&c(ui,{class:"mx-1","aria-label":i("restart"),onClick:()=>{D.restart()},children:[c("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"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(ui,{class:"view-switch mx-1",onTouchStart:sn,"aria-label":i("minimize"),onClick:()=>r.value="minimised",children:c(Lo,{})},"minmax")]})]}),c(Bd,{})]})})};function sn(){}const Ud=eo(()=>Promise.resolve().then(()=>eh).then(e=>e.ChatbotBody)),No=Ct("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"}}}),Vo=Ct("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"}}}),Hd=({open:e,...t})=>{const i=be(null);return Se(()=>{const r=i.current;r&&(e?r.showModal():r.close())},[e]),c("dialog",{ref:i,...t})},qd=({logger:e,apiClient:t,analytics:i,talentBankClient:r,params:n})=>{const{state:a,flow:o}=D.current$.value,s=D.viewState$.value,l=a!=="idle"&&s==="maximised",u=be(null),p=o?[...o.data.nodeHistory].reverse().map(d=>o.nodes.find(h=>h.id===d)).find(d=>(d==null?void 0:d.type)==="flow-section"):void 0;return c(pd,{terms:n.terms,locale:void 0,children:[c(Hd,{open:l,onClose:()=>D.viewState$.value="minimised",children:c("div",{ref:u,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:No({view:"maximised"}),children:c("div",{class:Vo({view:"maximised"}),children:[c(zd,{params:n,children:p?c(ae,{children:[c("span",{class:"block",children:p.data.title}),c("span",{class:"block truncate text-xs font-normal",children:o==null?void 0:o.title})]}):o==null?void 0:o.title}),zi({state:a,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Mo,{},"loading")).with({state:"loaded"},()=>c(ri,{fallback:c(Mo,{},"loading"),children:c(Ud,{analytics:i,apiClient:t,logger:e,talentBankClient:r})})).with({state:"error"},()=>c(Pd,{})).exhaustive()]})})}),s==="minimised"?c(Wd,{flow:o}):null]})},Wd=({flow:e})=>{const{t}=se();return c("div",{class:No({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Vo({view:"minimised"}),children:[c("button",{onClick:()=>{D.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:sn,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),c("div",{class:"flex items-center px-0.5",children:c(ui,{class:"mx-1","aria-label":t("close_application"),onClick:D.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Kd=`[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-\\[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}}
2
+ `,Oo="inploi-chatbot",ln=`[data-widget='${Oo}']`,Gd=()=>({getChatbotElement:()=>document.querySelector(ln),getOrCreateChatbotElement:()=>{const e=document.querySelector(ln);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Oo,t}}),Yd=25,Po=Pe(()=>{}),Ro=["wheel","touchmove","keydown"],Jd=(e,t)=>new Promise((i,r)=>{if(t!=null&&t.aborted)return r(new ot);const n=setTimeout(i,e);t==null||t.addEventListener("abort",()=>{clearTimeout(n),r(new ot)},{once:!0})}),te={onSubmitSuccessFn$:Pe(()=>{}),onInteractionFn$:Pe(()=>{}),isBotTyping$:Pe(!1),captchaVisible$:Pe(!1),themeMode$:Pe("light"),isReadingHistory$:Pe(!1),scrollToEnd:()=>Po.value()},Zd=()=>{const e=be(null),t=be(-1/0);Se(()=>{const r=e.current;if(!r)return;const n=()=>{te.isReadingHistory$.value=!1,r.scrollTo({top:r.scrollHeight,behavior:"instant"})};Po.value=n;const a=()=>t.current=performance.now(),o=()=>{r.scrollHeight-r.scrollTop-r.clientHeight<=24?te.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(te.isReadingHistory$.value=!0)};r.addEventListener("scroll",o,{passive:!0});for(const l of Ro)r.addEventListener(l,a,{passive:!0});const s=new ResizeObserver(()=>{te.isReadingHistory$.peek()||n()});return s.observe(r),r.firstElementChild&&s.observe(r.firstElementChild),()=>{r.removeEventListener("scroll",o);for(const l of Ro)r.removeEventListener(l,a);s.disconnect()}},[]);const i=lt(()=>({setSubmission:(n,a)=>D.setSubmission(n,a),captcha:{container:()=>{var n;return((n=e.current)==null?void 0:n.querySelector("[data-captcha-slot]"))??null},get theme(){return te.themeMode$.peek()},reveal:n=>{te.captchaVisible$.value=n,n&&requestAnimationFrame(()=>{var a,o;(o=(a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))==null||o.focus(),te.scrollToEnd()})}},send:async({message:n,signal:a,groupId:o})=>{if(await zi(n).with({author:"bot",type:"text"},async s=>{if(a!=null&&a.aborted)throw new ot;te.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Yd;try{await Jd(l,a)}finally{te.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new ot;D.addMessage(n,o)},input:({input:n,signal:a})=>{if(a!=null&&a.aborted)throw new ot;return D.setInput(n),new Promise(o=>{const s=l=>{if(a!=null&&a.aborted)throw new ot;t.current=-1/0,D.setInput(void 0),n.key&&D.setSubmission(n.key,l),o(l)};te.onSubmitSuccessFn$.value=s})}}),[]);return{chatRef:e,chatService:i}};var Xd=["1","2","3","4","5","6","7","8","9","10","11","12"],Qd={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]}},eu=(e,t=1,i)=>r=>{const[n,a]=Qd[i][r];return"oklch("+n+"% "+a*t+" "+e+")"},cn=e=>{const t=eu(e.hue,e.chroma,e.mode);return Object.fromEntries(Xd.map(i=>[e.prefix+i,e.transform(t(i))]))},dn=e=>e,tu=e=>{const t=Object.keys(e).flatMap(i=>{const r=e[i];return typeof r=="object"&&r!==null?Object.keys(r).map(n=>{const a=r[n];return[`${String(i)}.${n}`,a]}):[[i,r]]});return Object.fromEntries(t)},Zi=e=>!!e&&typeof e=="object"&&!Array.isArray(e),un=(e,...t)=>{if(!t.length)return e;const i=t.shift();if(Zi(e)&&Zi(i))for(const r in i){const n=i[r];if(Zi(n)){e[r]||Object.assign(e,{[r]:{}});const a=e[r];Zi(a)&&un(a,n)}else Object.assign(e,{[r]:i[r]})}return un(e,...t)},iu=e=>{function t(i,r){const n=[e.prefix,r.toString().replace(/\./g,"-")].join("");return i==="declaration"?`--${n}`:`var(--${n})`}return t},ru=()=>({core:e=>({semantic:t=>({component:i=>({from:r=>{const{theme:n,getToken:a}=r,o=h=>a("reference",h.toString()),s=e({theme:n}),l=t({theme:n,core:o,raw:{core:s}}),u=i({theme:n,core:o,semantic:o,raw:{core:s,semantic:l}}),p=tu(un(s,l,u)),d=([h,g],w)=>{const y=[w,h].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(x=>d(x,y)):[[r.getToken("declaration",y),g]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(h=>d(h))),ref:h=>a("reference",h.toString())}}})})})});const[fn,pn,jo]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],nu=ru().core(({theme:e})=>({color:{black:fn,white:pn,lowest:e.mode==="light"?pn:fn,highest:e.mode==="light"?fn:pn,...cn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:dn}),...cn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:dn}),...cn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:dn})},typography:{}})).semantic(({core:e,raw:t,theme:i})=>{const r=(n,a)=>t.core.color[n].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:r("n-8",i.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:jo,"bg-hover":r("n-10",.2),"bg-active":r("n-10",.3)}}}).component(({raw:e,theme:t,semantic:i,core:r})=>{const n=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":i("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":jo,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":r(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),au=iu({prefix:"i-"}),ou=e=>{const t=nu.from({theme:e,getToken:au}),i=Object.entries(t.declarations).map(([r,n])=>`${r}: ${n};`);return`${ln} {
3
3
  ${i.concat(i).join(`
4
4
  `)}
5
- }`},lu=({_internal_domManager:e=Yd(),theme:t,terms:i,feedback:r})=>Ml(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:u})=>{let p=!1,d=0;const h=hd({locale:void 0,overrides:i??{}}),g=l&&u?ec({environment:u,publishableKey:l,logger:o}):void 0,v=w=>w===d,y=()=>{if(typeof window>"u")return;d++,Ne.flushStateData().catch(()=>{}),M.cancelCurrentFlow(),ee.isBotTyping$.value=!1;const w=e.getChatbotElement();w&&(Et(null,w),w.remove()),p=!1,o.info("Chatbot plugin destroyed")},k=()=>{if(typeof window>"u")return;const w=d,x=[Ie("style",{id:"inploi-chatbot-styles"},Gd),Ie("style",{id:"inploi-chatbot-theme"},su(t))],I=e.getOrCreateChatbotElement();if(ee.themeMode$.value=t.mode,Et(Ie(ae,{},[x,Ie(Wd,{apiClient:n,logger:o,analytics:s,talentBankClient:g,params:{theme:t,terms:i,feedback:r}})]),I),r){const E=T=>{var z,V;if(!v(w))return;const L=(z=e.getChatbotElement())==null?void 0:z.querySelector("dialog");L&&cu({instance:T({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((V=r.params)==null?void 0:V.terms)??{},host:L})};r.plugin instanceof Promise?r.plugin.then(({feedbackPlugin:T})=>{E(T())}).catch(T=>{o.error("Error preparing feedback plugin",T)}):E(r.plugin)}p=!0},_=async(w,x)=>{if(!v(x))return;$l({context:w.context||{},schema:w.flow.context_schema,logger:o});const I=await M.prepareFlow(w);v(x)&&M.commitFlow(I)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;k(),o.info("Chatbot plugin prepared")}catch(w){o.error("Error preparing chatbot plugin",w)}},fetchFlowByJobId:async(w,x)=>{const I=(x==null?void 0:x.idType)==="inploi"?"internal":"external";return a.request(nc,{params:{id:w},searchParams:{id_type:I}}).then(E=>({flow:E.flow,title:E.job.title,flowKeys:[E.job.id,...(x==null?void 0:x.flowKeys)??[]],job:rc(E,{id:w,idType:I}),...x,context:{user:E.user,...x==null?void 0:x.context}}))},fetchFlowById:async(w,x)=>a.request(ac,{params:{id:w}}).then(I=>{var E;return{flow:I.flow,title:"Chatbot",flowKeys:(x==null?void 0:x.flowKeys)??[],...x,analytics:{customProperties:{flow_id:I.flow.id,flow_version:I.flow.version,...(E=x==null?void 0:x.analytics)==null?void 0:E.customProperties}}}}),open:async w=>{if(!(typeof window>"u"))try{M.cancelCurrentFlow(),M.viewState$.value="maximised",p||k();const x=d;w instanceof Promise?(M.current$.value={state:"loading"},w.then(I=>_(I,x)).catch(I=>{if(!v(x))return;const E=I instanceof Error?I.message:h("unknown_error");M.current$.value={state:"error",error:E}})):await _(w,x)}catch(x){o.error("Error starting flow",x)}},hasApplicationInProgress:async w=>{const x=await Ne.getStateData(w.flow,w.flowKeys,w.context??{});return x!==void 0&&Pd({data:x,nodes:w.flow.nodes})},close:async()=>{typeof window>"u"||(M.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:y}});function cu({instance:e,terms:t,theme:i,host:r}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:i.chroma??1,hue:i.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:i.mode,corners:"rounded",highlights:"stroke"},terms:t,host:r})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=lu;var du="9.8.2",Bo=`https://sdk.inploi.com/@inploi/flows@${du}/cdn/captcha/index.html`,uu=new URL(Bo).origin,zo=3e4,fu=5*6e4,pu=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",hn=new WeakMap,hu=e=>{let t=hn.get(e);return t||(t=e.fetch("/flow/captcha").then(i=>{let r=i==null?void 0:i.site_key;return typeof r=="string"&&r!==""?r:void 0}).catch(i=>{throw hn.delete(e),i}),hn.set(e,t)),t},gu=(e,t={})=>new Promise((i,r)=>{let{signal:n,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,u=()=>{},p=y=>{l||(l=!0,clearTimeout(g),n==null||n.removeEventListener("abort",h),u(),y())},d=y=>p(()=>r(new Error(y))),h=()=>d("Captcha aborted"),g,v=y=>{clearTimeout(g),g=setTimeout(()=>d("Captcha timed out"),y)};if(v(zo),n==null?void 0:n.aborted)return h();n==null||n.addEventListener("abort",h),(async()=>{let y=await hu(e);if(y===void 0)return p(()=>i(void 0));if(l)return;let k=document.createElement("iframe");k.src=`${Bo}?${new URLSearchParams({sitekey:y,origin:window.location.origin,...o&&{theme:o}}).toString()}`,k.title="Cloudflare security check",k.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(k):(k.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(k));let _=!1,w=x=>{if(!k.contentWindow||x.source!==k.contentWindow||x.origin!==uu||!pu(x.data))return;let I=x.data;switch(I.type){case"token":return p(()=>i(I.token));case"resize":k.style.height=`${Math.max(0,Math.ceil(I.height))}px`;return;case"before-interactive":return _=!0,v(fu),s==null?void 0:s();case"after-interactive":return _=!1,v(zo);case"error":!_&&!I.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",w),u=()=>{window.removeEventListener("message",w),k.remove()}})().catch(y=>p(()=>r(y)))}),Uo=({condition:e,context:t,submissions:i,ifBlock:r})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=Yn({context:t,key:n,path:a,submissions:i});if(!o)return!1;switch(o.type){case"address":{let s=ei(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=ei(o.value,a),l={...r,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return pi(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return pi(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return pi(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(u=>typeof u=="string")?pi(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"?Ei(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 ${r.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}},pi=(e,{context:t,submissions:i})=>{let r="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of r)if(Uo({condition:n,context:t,submissions:i,ifBlock:e}))return!0;return!1}else{for(let n of r)if(!Uo({condition:n,context:t,submissions:i,ifBlock:e}))return!1;return!0}},bu=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,vu=(e,{context:t,submissions:i})=>e.replace(bu,(r,n,a="")=>{let[o,...s]=n.trim().split("."),l=Yn({key:o,path:s,submissions:i,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${Lt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return Ei(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let u=ei(l.value,s);switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(p=>typeof p=="string"))return u.join(", ")}break}}return a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function wu(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function gn(e,t,i=""){const r=wu(e),n=e==null?void 0:e.length,a=t!==void 0;if(!r||a&&n!==t){const o=i&&`"${i}" `,s=a?` of length ${t}`:"",l=r?`length=${n}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Ho(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 mu(e,t){gn(e,void 0,"digestInto() output");const i=t.outputLen;if(e.length<i)throw new Error('"digestInto() output" expected to be of length >='+i)}function bn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function vn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ke(e,t){return e<<32-t|e>>>t}const yu=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),_u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function xu(e){if(gn(e),yu)return e.toHex();let t="";for(let i=0;i<e.length;i++)t+=_u[e[i]];return t}function ku(e,t={}){const i=(n,a)=>e(a).update(n).digest(),r=e(void 0);return i.outputLen=r.outputLen,i.blockLen=r.blockLen,i.create=n=>e(n),Object.assign(i,t),Object.freeze(i)}const Su=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Cu(e,t,i){return e&t^~e&i}function $u(e,t,i){return e&t^e&i^t&i}class Eu{constructor(t,i,r,n){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=i,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(t),this.view=vn(this.buffer)}update(t){Ho(this),gn(t);const{view:i,buffer:r,blockLen:n}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(n-this.pos,a-o);if(s===n){const l=vn(t);for(;n<=a-o;o+=n)this.process(l,o);continue}r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(i,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ho(this),mu(t,this),this.finished=!0;const{buffer:i,view:r,blockLen:n,isLE:a}=this;let{pos:o}=this;i[o++]=128,bn(this.buffer.subarray(o)),this.padOffset>n-o&&(this.process(r,0),o=0);for(let d=o;d<n;d++)i[d]=0;r.setBigUint64(n-8,BigInt(this.length*8),a),this.process(r,0);const s=vn(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const u=l/4,p=this.get();if(u>p.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)s.setUint32(4*d,p[d],a)}digest(){const{buffer:t,outputLen:i}=this;this.digestInto(t);const r=t.slice(0,i);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:i,buffer:r,length:n,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=n,t.pos=s,n%i&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const pt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Iu=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]),ht=new Uint32Array(64);class Au extends Eu{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:i,C:r,D:n,E:a,F:o,G:s,H:l}=this;return[t,i,r,n,a,o,s,l]}set(t,i,r,n,a,o,s,l){this.A=t|0,this.B=i|0,this.C=r|0,this.D=n|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,i){for(let d=0;d<16;d++,i+=4)ht[d]=t.getUint32(i,!1);for(let d=16;d<64;d++){const h=ht[d-15],g=ht[d-2],v=Ke(h,7)^Ke(h,18)^h>>>3,y=Ke(g,17)^Ke(g,19)^g>>>10;ht[d]=y+ht[d-7]+v+ht[d-16]|0}let{A:r,B:n,C:a,D:o,E:s,F:l,G:u,H:p}=this;for(let d=0;d<64;d++){const h=Ke(s,6)^Ke(s,11)^Ke(s,25),g=p+h+Cu(s,l,u)+Iu[d]+ht[d]|0,y=(Ke(r,2)^Ke(r,13)^Ke(r,22))+$u(r,n,a)|0;p=u,u=l,l=s,s=o+g|0,o=a,a=n,n=r,r=g+y|0}r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,u=u+this.G|0,p=p+this.H|0,this.set(r,n,a,o,s,l,u,p)}roundClean(){bn(ht)}destroy(){this.set(0,0,0,0,0,0,0,0),bn(this.buffer)}}class Tu extends Au{constructor(){super(32);pe(this,"A",pt[0]|0);pe(this,"B",pt[1]|0);pe(this,"C",pt[2]|0);pe(this,"D",pt[3]|0);pe(this,"E",pt[4]|0);pe(this,"F",pt[5]|0);pe(this,"G",pt[6]|0);pe(this,"H",pt[7]|0)}}const Fu=ku(()=>new Tu,Su(1));var qo=e=>{let t=e.find(i=>i.isHead);if(!t)throw new Error("No head node found");return t},wn=e=>{var t,i;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(i=[...e.data.messages].reverse().find(r=>r.groupId&&e.nodes.some(n=>n.id===r.groupId&&n.type.startsWith("question-"))&&(r.type==="system"||"author"in r&&r.author==="user")))==null?void 0:i.groupId},mn=e=>Array.isArray(e)?e.map(mn):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[i])=>t.localeCompare(i)).map(([t,i])=>[t,mn(i)])):typeof e=="function"?void 0:e,Du=e=>xu(Fu(new TextEncoder().encode(JSON.stringify(mn(e)))));function Mu(e,t,i,r){var n;if(r!=null&&r.aborted)return;let a=Du(i),o=(n=e.data).preApplyFingerprints??(n.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(i)}).catch(()=>{let u=o.indexOf(a);u!==-1&&o.splice(u,1)}).finally(()=>{clearTimeout(l)})}var Wo=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Re=(e,t)=>vu(e,Wo(t)),Nu=(e,t)=>pi(e,Wo(t)),Ko=({node:e,nodes:t,stopWhen:i})=>{if((i==null?void 0:i(e))===!0)return e;let r=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(r)return Ko({node:r,nodes:t,stopWhen:i})},Lu=({childNode:e,nodes:t})=>{let i=t.filter(r=>r.type==="if-block").find(r=>{if(!r.branchId)return!1;let n=t.find(o=>o.id===r.branchId);if(!n)return!1;let a=Ko({node:n,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(i!=null&&i.nextId)return t.find(r=>r.id===i.nextId)},Vu=3,Ou=({flow:e,analytics:t,logger:i,talentBankClient:r,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:u,persistWriteBarrier:p,onSubmitNetworkError:d,closedRoleBehaviour:h,dateEchoLocale:g,onFlowEnd:v,onInterpret:y,forceSubmitConfirmation:k,t:_})=>{var w;let x=new AbortController,I={submitAccepted:!1};(w=e.data).startedWriteNodeIds??(w.startedWriteNodeIds=e.nodes.flatMap(L=>{var V,P;if(L.type!=="integration-application-submit"||!e.data.nodeHistory.includes(L.id))return[];let z=L.data.key?(V=o())==null?void 0:V[L.data.key]:void 0;return(z==null?void 0:z.type)==="integration"&&((P=Xn(z.value))==null?void 0:P.verdict)==="not_submitted"?[]:[L.id]}));let E={...t.service,log:L=>t.service.log({...L,customProperties:{...L.customProperties,...t.customProperties}})},T=async(L,z)=>{let V=x.signal;if(V.aborted)return;let P=o(),G=s(),O=(G==null?void 0:G.submitNodeId)===L.id?e.nodes.find(D=>{var B;return D.id===G.fileQuestionNodeId&&D.type==="question-file"&&((B=P==null?void 0:P[D.data.key])==null?void 0:B.type)!=="file"}):void 0;if(O)return T(O,z);y==null||y(L,z);try{await Pu({flow:e,analytics:E,logger:i,talentBankClient:r,apiClient:a,context:n,node:L,submissions:P,applicationRecovery:G,setApplicationRecovery:async D=>{if(!V.aborted)try{await l(D)}catch(B){i.error("Failed to persist application recovery",B)}},forceSubmitConfirmation:k||(G==null?void 0:G.submitNodeId)===L.id,run:I,persistWriteBarrier:p,onSubmitNetworkError:d,closedRoleBehaviour:h,dateEchoLocale:g,signal:V,t:_,chat:{sendMessage:async D=>u.send({groupId:L.id,message:D,signal:V}),userInput:async D=>u.input({input:D,signal:V}),setSubmission:(D,B)=>{V.aborted||u.setSubmission(D,B)},captcha:u.captcha},next:D=>{if(V.aborted)return;let B=(G==null?void 0:G.fileQuestionNodeId)===L.id?G.submitNodeId:D,q=B?e.nodes.find(te=>te.id===B):Lu({childNode:L,nodes:e.nodes});return q?T(q,L):v==null?void 0:v(L)},end:()=>{V.aborted||(v==null||v(L))}})}catch(D){if(D instanceof ot)return;throw D}};return{interpret:async L=>{let z=e.nodes.find(V=>V.id===L)??qo(e.nodes);return T(z)},undo:L=>{var B;if(delete e.data.reviewReplay,((B=e.data.startedWriteNodeIds)==null?void 0:B.length)||e.data.isFinished)return{removed:0};let z=wn(e),V=z?L.lastIndexOf(z):-1,P=e.nodes.find(q=>q.id===z);if(V===-1||!P)return{removed:0};let G=e.nodes.find(q=>q.id===L[L.length-1]);x.abort();let O=L.splice(V);e.data.messages=e.data.messages.filter(q=>!q.groupId||!O.includes(q.groupId)),e.data.currentInput=null;let D=o();for(let q of O.slice(1)){let te=e.nodes.find(de=>de.id===q);if(!(!te||!D||te.id===z)&&("key"in te.data&&te.data.key&&delete D[te.data.key],"keys"in te.data))for(let de of Object.values(te.data.keys))typeof de=="string"&&delete D[de]}return x=new AbortController,T(P,G),{removed:O.length}},abort:()=>{x.abort()}}};async function Pu(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 of({...e,node:t});case"text":return Yu({...e,node:t});case"image":return Ju({...e,node:t});case"question-text":return Zu({...e,node:t});case"question-enum":return ef({...e,node:t});case"question-number":return Xu({...e,node:t});case"question-phone":return Qu({...e,node:t});case"question-boolean":return tf({...e,node:t});case"question-file":return nf({...e,node:t});case"question-address":return rf({...e,node:t});case"end-flow":return af({...e,node:t});case"if-block":return Gu({...e,node:t});case"jump":return Bu({...e,node:t});case"link":return Ku({...e,node:t});case"integration-application-submit":return Wu({...e,node:t});case"add-submission":return zu({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return ju({...e,node:t});case"feedback":return Ru({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Ru({next:e,node:t}){e(t.nextId)}async function ju({next:e,node:t,talentBankClient:i,submissions:r,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(r&&i){let u=t.data.scope==="job"?(l=n.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||u!=null)try{s=await i.checkDuplicate({email:sl({key:t.data.email,submissions:r}).toString(),jobId:u,scope:t.data.scope})}catch(p){a.error("[check-duplicate]",p)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Bu({next:e,node:t}){e(t.data.targetId)}async function zu({next:e,node:t,logger:i,submissions:r,context:n}){if(!r){i.error("Submissions not found");return}r[t.data.key]={type:"string",value:Re(t.data.value,{submissions:r,context:n})},e(t.nextId)}var Uu=5e3,Hu=(e,t,i)=>{let{waitMs:r,throttles:n,maintenance:a}=wl(t==null?void 0:t.throttles,i);return{key:e,until:Date.now()+r,...n!==void 0&&{throttles:n},...a&&{maintenance:a}}},qu=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Go=e=>e instanceof Error&&qu.includes(e.name)?e:void 0,Yo=e=>{let t=Go(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Wu({chat:e,next:t,end:i,node:r,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:u,setApplicationRecovery:p,forceSubmitConfirmation:d,run:h,persistWriteBarrier:g,signal:v,onSubmitNetworkError:y,closedRoleBehaviour:k,t:_}){var L,z;let w=async({redirect_url:V,message:P,button_text:G})=>{let{anonymous_id:O,session_id:D}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:P??_("submission_redirect_message")});try{let B=new URL(V);O&&!B.searchParams.has("anonymous_id")&&B.searchParams.set("anonymous_id",O),await e.sendMessage({type:"link",href:B.toString(),text:G??_("complete_submission"),onClick:()=>{if(!D){n.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:D,flow_version:l.version,href:B.toString(),job:l.job}})}})}catch(B){n.error(`Invalid redirect URL: ${V}`,B),e.sendMessage({type:"system",variant:"error",text:_("redirect_url_error")})}};if((L=l.data.startedWriteNodeIds)!=null&&L.includes(r.id)&&(u==null?void 0:u.submitNodeId)!==r.id){let V=(z=l.data.submitRedirects)==null?void 0:z[r.id];return V?(await w(V),t(r.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:_("submission_unknown")}),i())}let x=l.job?`${r.id}@${l.job.id_type}:${l.job.id}`:r.id,I=0,E=h.submitAccepted&&r.data.skipConfirmation===!0&&(u==null?void 0:u.submitNodeId)!==r.id,T=async V=>{var ar,_i,or,xi,ki,sr,lr,On;let P=((ar=l.data.submitCooldown)==null?void 0:ar.key)===x?l.data.submitCooldown:void 0;P&&(P.until=Math.min(P.until,Date.now()+(P.maintenance?ea:P.throttles?wr:Qn)));let G=P==null?void 0:P.until;(l.data.reviewRequiresSend===!0&&!E||V!==!0||G!==void 0&&G>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel,...G!==void 0&&{availableAt:G}}}),E=!1;let O;if(r.data.captcha){let j=e.captcha,f=!0;try{O=await gu(a,{signal:v,container:(j==null?void 0:j.container())??null,theme:j==null?void 0:j.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:_("captcha_check")}).catch(()=>{}).then(()=>{f&&(j==null||j.reveal(!0))})}})}catch(b){if(n.error("Captcha check failed",b),v.aborted)return}finally{f=!1,j==null||j.reveal(!1)}}await e.sendMessage({type:"loading",text:_("submitting")});let{anonymous_id:D,session_id:B}=s.getSessionInfo();if(v.aborted)return;let q=((_i=l.data.startedWriteNodeIds)==null?void 0:_i.includes(r.id))===!0;if((u==null?void 0:u.submitNodeId)===r.id&&await p(void 0),q||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],r.id]),await g().catch(j=>n.error("Failed to persist application write barrier",j)),v.aborted)return;let te,de=setTimeout(()=>{te=(async()=>{await e.sendMessage({type:"text",author:"bot",text:_("submission_still_working")}),await e.sendMessage({type:"loading",text:_("submitting")})})().catch(j=>n.error("Failed to send submission progress message",j))},Uu),Te,re=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:D,session_id:B,job:l.job,flow_build:l.build,...O!==void 0&&{captcha_token:O},submissions:al(l.nodes,ol(o||{},r.data.submitKeys)),pre_apply:gr(l.nodes,o||{},l.data.flowSessionId)})}).catch(j=>{Te=j;let f=Yo(j);return(f==null?void 0:f.data)!==void 0?f.data:j});if(clearTimeout(de),await te,v.aborted)return;if(Te!==void 0&&!Go(Te)&&y)return await y(Te,v),T(!0);r.data.key&&e.setSubmission(r.data.key,{type:"integration",value:re});let wt=(or=Yo(Te))==null?void 0:or.status,yi=typeof wt=="number"?wt:void 0,H=Xn(re,yi),Mt=l.data.failedAttemptAt,mt=Mt==null?void 0:Mt[x];Mt&&mt!==void 0&&mt>Date.now()&&(mt=Mt[x]=Date.now());let rr=mt!==void 0&&Date.now()-mt<bl||((xi=l.data.unconfirmedAttemptKeys)==null?void 0:xi.includes(x))===!0,yt=kl(re);yt&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:yt.service,response:yt.response,flow_type:"CHATBOT_DRAWER",job:l.job,...(H==null?void 0:H.outcome)==="duplicate"&&{outcome:rr?"duplicate_after_own_attempt":"duplicate"},...yt.outcome&&{outcome:yt.outcome}}});let nr=br(re)||(re==null?void 0:re.success)===!0;if((nr||vr(re))&&(h.submitAccepted=!0),nr&&((ki=l.data.submitCooldown)==null?void 0:ki.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(j=>n.error("Failed to persist submit cooldown reset",j))),br(re)){let{redirect_url:j,message:f,button_text:b}=re.integration_response.data,m={redirect_url:j,message:f,button_text:b};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[r.id]:m},await g().catch($=>n.error("Failed to persist submit redirect",$)),await w(m),t(r.nextId))}let Zt=vr(re);if(Zt)return await e.sendMessage({type:"system",variant:"success",text:Zt.message??_("submission_pending")}),t(r.nextId);if((re==null?void 0:re.success)===!0)return r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:_("submission_completed")}),t(r.nextId);let Xt=xl(H),_t=Xt!==void 0&&((sr=o==null?void 0:o[Xt])==null?void 0:sr.type)==="file"?Xt:void 0,xt=_t===void 0?void 0:l.nodes.find(j=>j.type==="question-file"&&j.data.key===_t);if(!xt&&!(k==="terminal"&&(H==null?void 0:H.outcome)==="closed")&&!ra(H)&&(l.data.submitCooldown=Hu(x,P,H)),(H==null?void 0:H.outcome)!=="duplicate"&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[x]:Date.now()},(lr=l.data.unconfirmedAttemptKeys)!=null&&lr.includes(x)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(j=>j!==x))),(H==null?void 0:H.verdict)==="not_submitted"||(H==null?void 0:H.outcome)==="duplicate"||(H==null?void 0:H.outcome)==="closed"||pl(re,yi)?(q||(l.data.startedWriteNodeIds=(On=l.data.startedWriteNodeIds)==null?void 0:On.filter(j=>j!==r.id)),(u==null?void 0:u.submitNodeId)===r.id&&await p(u),await g().catch(j=>n.error("Failed to persist application write barrier release",j))):await g().catch(j=>n.error("Failed to persist submit cooldown",j)),H){if(n.error(Te??H.message),xt&&_t!==void 0)return e.setSubmission(_t,null),await p({fileQuestionNodeId:xt.id,submitNodeId:r.id}),await e.sendMessage({type:"system",variant:"error",text:_("submission_unreadable_document")}),t(xt.id);if(H.outcome==="duplicate")return await e.sendMessage({type:"system",variant:"info",text:_(rr?"submission_duplicate_earlier_attempt":"submission_duplicate")}),T(!1);if(H.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",text:_("submission_closed")}),k==="terminal"?(delete l.data.submitCooldown,i()):T(!1);let j=vl(H);return j?(await e.sendMessage({type:"system",variant:"warning",text:j.until===void 0?_("submission_provider_maintenance_later"):_("submission_provider_maintenance",{time:ia(j.until,void 0)})}),T(!1)):H.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:_(_l(H)?"submission_unknown_do_not_resubmit":"submission_unknown")}),T(!1)):ra(H)?ml(re)?(await e.sendMessage({type:"text",author:"bot",text:H.message}),T(!1)):(I===0&&await e.sendMessage({type:"system",variant:"warning",text:_("captcha_failed")}),I++,T(I<=Vu)):yl(H)?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),T(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),i())}return n.error(Te??re),await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),i()};await T(d===!0&&!E?!1:r.data.skipConfirmation)}async function Ku({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({type:"link",href:Re(i.data.href,{submissions:r,context:n}),text:Re(i.data.cta,{submissions:r,context:n})}),t(i.nextId)}async function Gu({submissions:e,next:t,node:i,context:r}){t(Nu(i,{submissions:e,context:r})?i.branchId:i.nextId)}async function Yu({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.text,{submissions:r,context:n})}),t(i.nextId)}async function Ju({chat:e,next:t,node:i}){await e.sendMessage({author:"bot",type:"image",url:i.data.url,height:i.data.height,width:i.data.width}),t(i.nextId)}async function Zu({chat:e,next:t,node:i,submissions:r,context:n,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let s=i.data.format==="phone"?await e.userInput({key:i.data.key,type:"phone",config:{optional:i.data.optional,placeholder:i.data.placeholder,minChars:i.data.minChars,maxChars:i.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:i.data.key,type:"text",config:{optional:i.data.optional,placeholder:i.data.placeholder,format:i.data.format,maxChars:i.data.maxChars,minChars:i.data.minChars,multiline:i.data.format==="text"&&i.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"?Ei(s.value):i.data.format==="date"&&o!==void 0?Cl(s.value,o):s.value}),t(i.nextId)}async function Xu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"number",config:{max:i.data.max,min:i.data.min,optional:i.data.optional,placeholder:i.data.placeholder,decimalCases:i.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(i.nextId)}async function Qu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"phone",config:{minChars:i.data.minChars,defaultValue:{countryCode:i.data.defaultCountryCode},placeholder:i.data.placeholder,submissionFormat:"phone",optional:i.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"?Ei(o.value):o.value}),t(i.nextId)}async function ef({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"multiple-choice",config:i.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:i.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(i.nextId)}async function tf({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"boolean",config:{optional:i.data.optional,labels:{true:i.data.trueLabel,false:i.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?i.data.trueLabel:i.data.falseLabel}),t(i.nextId)}async function rf({chat:e,next:t,node:i,t:r}){await e.sendMessage({author:"bot",type:"text",text:i.data.question});let n=await e.userInput({type:"address",key:i.data.key,config:{optional:i.data.optional,keys:i.data.keys,line2Required:i.data.line2Required,placeholder:i.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:r("skipped")});else{let a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(i.nextId)}async function nf({node:e,chat:t,next:i,submissions:r,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Re(e.data.question,{submissions:r,context:n})});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 i(e.nextId)}async function af({chat:e,end:t,node:i}){await e.sendMessage({type:"system",variant:"info",text:i.data.systemMessage}),t()}async function of({node:e,flow:t,submissions:i,chat:r,next:n,apiClient:a,analytics:o,signal:s,context:l}){let u=nl(t.nodes,i||{}),{answers:p,...d}=u;if(r.setSubmission(e.data.key,{type:"integration",value:d}),Mu(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:gr(t.nodes,i||{},t.data.flowSessionId)},s),u.status!=="skipped"){let h=[u.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":u.hasHardConcerns?e.data.messages.hard:u.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let g of["hard","advisory"]){let v=p.filter(y=>!y.matched&&y.severity===g);v.length&&h.push((g==="hard"?"Role requirements":"Other things to consider")+`
6
- `+v.map(y=>`• ${y.message}`).join(`
5
+ }`},su=({_internal_domManager:e=Gd(),theme:t,terms:i,feedback:r})=>Ml(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:u})=>{let p=!1,d=0;const h=l&&u?ec({environment:u,publishableKey:l,logger:o}):void 0,g=_=>_===d,w=()=>{if(typeof window>"u")return;d++,Me.flushStateData().catch(()=>{}),D.cancelCurrentFlow(),te.isBotTyping$.value=!1;const _=e.getChatbotElement();_&&(St(null,_),_.remove()),p=!1,o.info("Chatbot plugin destroyed")},y=()=>{if(typeof window>"u")return;const _=d,v=[Ee("style",{id:"inploi-chatbot-styles"},Kd),Ee("style",{id:"inploi-chatbot-theme"},ou(t))],C=e.getOrCreateChatbotElement();if(te.themeMode$.value=t.mode,St(Ee(ae,{},[v,Ee(qd,{apiClient:n,logger:o,analytics:s,talentBankClient:h,params:{theme:t,terms:i,feedback:r}})]),C),r){const $=A=>{var B,N;if(!g(_))return;const L=(B=e.getChatbotElement())==null?void 0:B.querySelector("dialog");L&&lu({instance:A({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((N=r.params)==null?void 0:N.terms)??{},host:L})};r.plugin instanceof Promise?r.plugin.then(({feedbackPlugin:A})=>{$(A())}).catch(A=>{o.error("Error preparing feedback plugin",A)}):$(r.plugin)}p=!0},x=async(_,v)=>{if(!g(v))return;$l({context:_.context||{},schema:_.flow.context_schema,logger:o});const C=await D.prepareFlow(_);g(v)&&D.commitFlow(C)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;y(),o.info("Chatbot plugin prepared")}catch(_){o.error("Error preparing chatbot plugin",_)}},fetchFlowByJobId:async(_,v)=>{const C=(v==null?void 0:v.idType)==="inploi"?"internal":"external";return a.request(nc,{params:{id:_},searchParams:{id_type:C}}).then($=>({flow:$.flow,title:$.job.title,flowKeys:[$.job.id,...(v==null?void 0:v.flowKeys)??[]],job:rc($,{id:_,idType:C}),...v,context:{user:$.user,...v==null?void 0:v.context}}))},fetchFlowById:async(_,v)=>a.request(ac,{params:{id:_}}).then(C=>{var $;return{flow:C.flow,title:"Chatbot",flowKeys:(v==null?void 0:v.flowKeys)??[],...v,analytics:{customProperties:{flow_id:C.flow.id,flow_version:C.flow.version,...($=v==null?void 0:v.analytics)==null?void 0:$.customProperties}}}}),open:async _=>{if(!(typeof window>"u"))try{D.cancelCurrentFlow(),D.viewState$.value="maximised",p||y();const v=d;_ instanceof Promise?(D.current$.value={state:"loading"},_.then(C=>x(C,v)).catch(C=>{g(v)&&(o.error("Error loading flow",C),D.current$.value={state:"error"})})):await x(_,v)}catch(v){o.error("Error starting flow",v)}},hasApplicationInProgress:async _=>{const v=await Me.getStateData(_.flow,_.flowKeys,_.context??{});return v!==void 0&&Od({data:v,nodes:_.flow.nodes})},close:async()=>{typeof window>"u"||(D.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:w}});function lu({instance:e,terms:t,theme:i,host:r}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:i.chroma??1,hue:i.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:i.mode,corners:"rounded",highlights:"stroke"},terms:t,host:r})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=su;var cu="9.8.2",Bo=`https://sdk.inploi.com/@inploi/flows@${cu}/cdn/captcha/index.html`,du=new URL(Bo).origin,zo=3e4,uu=5*6e4,fu=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",hn=new WeakMap,pu=e=>{let t=hn.get(e);return t||(t=e.fetch("/flow/captcha").then(i=>{let r=i==null?void 0:i.site_key;return typeof r=="string"&&r!==""?r:void 0}).catch(i=>{throw hn.delete(e),i}),hn.set(e,t)),t},hu=(e,t={})=>new Promise((i,r)=>{let{signal:n,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,u=()=>{},p=y=>{l||(l=!0,clearTimeout(g),n==null||n.removeEventListener("abort",h),u(),y())},d=y=>p(()=>r(new Error(y))),h=()=>d("Captcha aborted"),g,w=y=>{clearTimeout(g),g=setTimeout(()=>d("Captcha timed out"),y)};if(w(zo),n==null?void 0:n.aborted)return h();n==null||n.addEventListener("abort",h),(async()=>{let y=await pu(e);if(y===void 0)return p(()=>i(void 0));if(l)return;let x=document.createElement("iframe");x.src=`${Bo}?${new URLSearchParams({sitekey:y,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 _=!1,v=C=>{if(!x.contentWindow||C.source!==x.contentWindow||C.origin!==du||!fu(C.data))return;let $=C.data;switch($.type){case"token":return p(()=>i($.token));case"resize":x.style.height=`${Math.max(0,Math.ceil($.height))}px`;return;case"before-interactive":return _=!0,w(uu),s==null?void 0:s();case"after-interactive":return _=!1,w(zo);case"error":!_&&!$.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",v),u=()=>{window.removeEventListener("message",v),x.remove()}})().catch(y=>p(()=>r(y)))}),Uo=({condition:e,context:t,submissions:i,ifBlock:r})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=Yn({context:t,key:n,path:a,submissions:i});if(!o)return!1;switch(o.type){case"address":{let s=Qt(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=Qt(o.value,a),l={...r,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return fi(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return fi(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return fi(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(u=>typeof u=="string")?fi(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"?Ti(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 ${r.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}},fi=(e,{context:t,submissions:i})=>{let r="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of r)if(Uo({condition:n,context:t,submissions:i,ifBlock:e}))return!0;return!1}else{for(let n of r)if(!Uo({condition:n,context:t,submissions:i,ifBlock:e}))return!1;return!0}},gu=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,bu=(e,{context:t,submissions:i})=>e.replace(gu,(r,n,a="")=>{let[o,...s]=n.trim().split("."),l=Yn({key:o,path:s,submissions:i,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${Lt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return Ti(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let u=Qt(l.value,s);switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(p=>typeof p=="string"))return u.join(", ")}break}}return a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function vu(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function gn(e,t,i=""){const r=vu(e),n=e==null?void 0:e.length,a=t!==void 0;if(!r||a&&n!==t){const o=i&&`"${i}" `,s=a?` of length ${t}`:"",l=r?`length=${n}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Ho(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 wu(e,t){gn(e,void 0,"digestInto() output");const i=t.outputLen;if(e.length<i)throw new Error('"digestInto() output" expected to be of length >='+i)}function bn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function vn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ke(e,t){return e<<32-t|e>>>t}const mu=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),yu=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _u(e){if(gn(e),mu)return e.toHex();let t="";for(let i=0;i<e.length;i++)t+=yu[e[i]];return t}function xu(e,t={}){const i=(n,a)=>e(a).update(n).digest(),r=e(void 0);return i.outputLen=r.outputLen,i.blockLen=r.blockLen,i.create=n=>e(n),Object.assign(i,t),Object.freeze(i)}const ku=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function Su(e,t,i){return e&t^~e&i}function Cu(e,t,i){return e&t^e&i^t&i}class $u{constructor(t,i,r,n){fe(this,"blockLen");fe(this,"outputLen");fe(this,"padOffset");fe(this,"isLE");fe(this,"buffer");fe(this,"view");fe(this,"finished",!1);fe(this,"length",0);fe(this,"pos",0);fe(this,"destroyed",!1);this.blockLen=t,this.outputLen=i,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(t),this.view=vn(this.buffer)}update(t){Ho(this),gn(t);const{view:i,buffer:r,blockLen:n}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(n-this.pos,a-o);if(s===n){const l=vn(t);for(;n<=a-o;o+=n)this.process(l,o);continue}r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(i,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ho(this),wu(t,this),this.finished=!0;const{buffer:i,view:r,blockLen:n,isLE:a}=this;let{pos:o}=this;i[o++]=128,bn(this.buffer.subarray(o)),this.padOffset>n-o&&(this.process(r,0),o=0);for(let d=o;d<n;d++)i[d]=0;r.setBigUint64(n-8,BigInt(this.length*8),a),this.process(r,0);const s=vn(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const u=l/4,p=this.get();if(u>p.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)s.setUint32(4*d,p[d],a)}digest(){const{buffer:t,outputLen:i}=this;this.digestInto(t);const r=t.slice(0,i);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:i,buffer:r,length:n,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=n,t.pos=s,n%i&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const pt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Eu=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]),ht=new Uint32Array(64);class Iu extends $u{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:i,C:r,D:n,E:a,F:o,G:s,H:l}=this;return[t,i,r,n,a,o,s,l]}set(t,i,r,n,a,o,s,l){this.A=t|0,this.B=i|0,this.C=r|0,this.D=n|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,i){for(let d=0;d<16;d++,i+=4)ht[d]=t.getUint32(i,!1);for(let d=16;d<64;d++){const h=ht[d-15],g=ht[d-2],w=Ke(h,7)^Ke(h,18)^h>>>3,y=Ke(g,17)^Ke(g,19)^g>>>10;ht[d]=y+ht[d-7]+w+ht[d-16]|0}let{A:r,B:n,C:a,D:o,E:s,F:l,G:u,H:p}=this;for(let d=0;d<64;d++){const h=Ke(s,6)^Ke(s,11)^Ke(s,25),g=p+h+Su(s,l,u)+Eu[d]+ht[d]|0,y=(Ke(r,2)^Ke(r,13)^Ke(r,22))+Cu(r,n,a)|0;p=u,u=l,l=s,s=o+g|0,o=a,a=n,n=r,r=g+y|0}r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,u=u+this.G|0,p=p+this.H|0,this.set(r,n,a,o,s,l,u,p)}roundClean(){bn(ht)}destroy(){this.set(0,0,0,0,0,0,0,0),bn(this.buffer)}}class Au extends Iu{constructor(){super(32);fe(this,"A",pt[0]|0);fe(this,"B",pt[1]|0);fe(this,"C",pt[2]|0);fe(this,"D",pt[3]|0);fe(this,"E",pt[4]|0);fe(this,"F",pt[5]|0);fe(this,"G",pt[6]|0);fe(this,"H",pt[7]|0)}}const Tu=xu(()=>new Au,ku(1));var qo=e=>{let t=e.find(i=>i.isHead);if(!t)throw new Error("No head node found");return t},wn=e=>{var t,i;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(i=[...e.data.messages].reverse().find(r=>r.groupId&&e.nodes.some(n=>n.id===r.groupId&&n.type.startsWith("question-"))&&(r.type==="system"||"author"in r&&r.author==="user")))==null?void 0:i.groupId},mn=e=>Array.isArray(e)?e.map(mn):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[i])=>t.localeCompare(i)).map(([t,i])=>[t,mn(i)])):typeof e=="function"?void 0:e,Fu=e=>_u(Tu(new TextEncoder().encode(JSON.stringify(mn(e)))));function Du(e,t,i,r){var n;if(r!=null&&r.aborted)return;let a=Fu(i),o=(n=e.data).preApplyFingerprints??(n.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(i)}).catch(()=>{let u=o.indexOf(a);u!==-1&&o.splice(u,1)}).finally(()=>{clearTimeout(l)})}var Wo=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Re=(e,t)=>bu(e,Wo(t)),Mu=(e,t)=>fi(e,Wo(t)),Ko=({node:e,nodes:t,stopWhen:i})=>{if((i==null?void 0:i(e))===!0)return e;let r=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(r)return Ko({node:r,nodes:t,stopWhen:i})},Lu=({childNode:e,nodes:t})=>{let i=t.filter(r=>r.type==="if-block").find(r=>{if(!r.branchId)return!1;let n=t.find(o=>o.id===r.branchId);if(!n)return!1;let a=Ko({node:n,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(i!=null&&i.nextId)return t.find(r=>r.id===i.nextId)},Nu=3,Vu=({flow:e,analytics:t,logger:i,talentBankClient:r,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:u,persistWriteBarrier:p,onSubmitNetworkError:d,closedRoleBehaviour:h,dateEchoLocale:g,onFlowEnd:w,onInterpret:y,forceSubmitConfirmation:x,flowType:_,t:v})=>{var C;let $=new AbortController,A={submitAccepted:!1};(C=e.data).startedWriteNodeIds??(C.startedWriteNodeIds=e.nodes.flatMap(N=>{var V,J;if(N.type!=="integration-application-submit"||!e.data.nodeHistory.includes(N.id))return[];let j=N.data.key?(V=o())==null?void 0:V[N.data.key]:void 0;return(j==null?void 0:j.type)==="integration"&&((J=Xn(j.value))==null?void 0:J.verdict)==="not_submitted"?[]:[N.id]}));let L={...t.service,log:N=>t.service.log({...N,customProperties:{...N.customProperties,...t.customProperties}})},B=async(N,j)=>{let V=$.signal;if(V.aborted)return;let J=o(),F=s(),P=(F==null?void 0:F.submitNodeId)===N.id?e.nodes.find(O=>{var z;return O.id===F.fileQuestionNodeId&&O.type==="question-file"&&((z=J==null?void 0:J[O.data.key])==null?void 0:z.type)!=="file"}):void 0;if(P)return B(P,j);y==null||y(N,j);try{await Ou({flow:e,analytics:L,logger:i,talentBankClient:r,apiClient:a,context:n,node:N,submissions:J,applicationRecovery:F,setApplicationRecovery:async O=>{if(!V.aborted)try{await l(O)}catch(z){i.error("Failed to persist application recovery",z)}},forceSubmitConfirmation:x||(F==null?void 0:F.submitNodeId)===N.id,run:A,persistWriteBarrier:p,onSubmitNetworkError:d,closedRoleBehaviour:h,dateEchoLocale:g,flowType:_,signal:V,t:v,chat:{sendMessage:async O=>u.send({groupId:N.id,message:O,signal:V}),userInput:async O=>u.input({input:O,signal:V}),setSubmission:(O,z)=>{V.aborted||u.setSubmission(O,z)},captcha:u.captcha},next:O=>{if(V.aborted)return;let z=(F==null?void 0:F.fileQuestionNodeId)===N.id?F.submitNodeId:O,Z=z?e.nodes.find(X=>X.id===z):Lu({childNode:N,nodes:e.nodes});return Z?B(Z,N):w==null?void 0:w(N)},end:()=>{V.aborted||(w==null||w(N))}})}catch(O){if(O instanceof ot)return;throw O}};return{interpret:async N=>{let j=e.nodes.find(V=>V.id===N)??qo(e.nodes);return B(j)},undo:N=>{var z;if(delete e.data.reviewReplay,((z=e.data.startedWriteNodeIds)==null?void 0:z.length)||e.data.isFinished)return{removed:0};let j=wn(e),V=j?N.lastIndexOf(j):-1,J=e.nodes.find(Z=>Z.id===j);if(V===-1||!J)return{removed:0};let F=e.nodes.find(Z=>Z.id===N[N.length-1]);$.abort();let P=N.splice(V);e.data.messages=e.data.messages.filter(Z=>!Z.groupId||!P.includes(Z.groupId)),e.data.currentInput=null;let O=o();for(let Z of P.slice(1)){let X=e.nodes.find(Le=>Le.id===Z);if(!(!X||!O||X.id===j)&&("key"in X.data&&X.data.key&&delete O[X.data.key],"keys"in X.data))for(let Le of Object.values(X.data.keys))typeof Le=="string"&&delete O[Le]}return $=new AbortController,B(J,F),{removed:P.length}},abort:()=>{$.abort()}}};async function Ou(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 sf({...e,node:t});case"text":return Ju({...e,node:t});case"image":return Zu({...e,node:t});case"question-text":return Xu({...e,node:t});case"question-enum":return tf({...e,node:t});case"question-number":return Qu({...e,node:t});case"question-phone":return ef({...e,node:t});case"question-boolean":return rf({...e,node:t});case"question-file":return af({...e,node:t});case"question-address":return nf({...e,node:t});case"end-flow":return of({...e,node:t});case"if-block":return Yu({...e,node:t});case"jump":return ju({...e,node:t});case"link":return Gu({...e,node:t});case"integration-application-submit":return Ku({...e,node:t});case"add-submission":return Bu({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Ru({...e,node:t});case"feedback":return Pu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Pu({next:e,node:t}){e(t.nextId)}async function Ru({next:e,node:t,talentBankClient:i,submissions:r,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(r&&i){let u=t.data.scope==="job"?(l=n.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||u!=null)try{s=await i.checkDuplicate({email:sl({key:t.data.email,submissions:r}).toString(),jobId:u,scope:t.data.scope})}catch(p){a.error("[check-duplicate]",p)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function ju({next:e,node:t}){e(t.data.targetId)}async function Bu({next:e,node:t,logger:i,submissions:r,context:n}){if(!r){i.error("Submissions not found");return}r[t.data.key]={type:"string",value:Re(t.data.value,{submissions:r,context:n})},e(t.nextId)}var zu=5e3,Uu=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Hu=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?ea:e.throttles?wr:Qn)),qu=(e,t,i)=>{let{waitMs:r,throttles:n,maintenance:a}=wl(t==null?void 0:t.throttles,i);return{key:e,until:Date.now()+r,...n!==void 0&&{throttles:n},...a&&{maintenance:a}}},Wu=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Go=e=>e instanceof Error&&Wu.includes(e.name)?e:void 0,Yo=e=>{let t=Go(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Ku({chat:e,next:t,end:i,node:r,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:u,setApplicationRecovery:p,forceSubmitConfirmation:d,flowType:h,run:g,persistWriteBarrier:w,signal:y,onSubmitNetworkError:x,closedRoleBehaviour:_,t:v}){var N,j;let C=async({redirect_url:V,message:J,button_text:F})=>{let{anonymous_id:P,session_id:O}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:J??v("submission_redirect_message")});try{let z=new URL(V);P&&!z.searchParams.has("anonymous_id")&&z.searchParams.set("anonymous_id",P),await e.sendMessage({type:"link",href:z.toString(),text:F??v("complete_submission"),onClick:()=>{if(!O){n.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:O,flow_version:l.version,href:z.toString(),job:l.job}})}})}catch(z){n.error(`Invalid redirect URL: ${V}`,z),e.sendMessage({type:"system",variant:"error",text:v("redirect_url_error")})}};if((N=l.data.startedWriteNodeIds)!=null&&N.includes(r.id)&&(u==null?void 0:u.submitNodeId)!==r.id){let V=(j=l.data.submitRedirects)==null?void 0:j[r.id];return V?(await C(V),t(r.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:v("submission_unknown")}),i())}let $=Uu(r.id,l.job),A=0,L=g.submitAccepted&&r.data.skipConfirmation===!0&&(u==null?void 0:u.submitNodeId)!==r.id,B=async V=>{var ki,or,Si,Ci,sr,lr,On,$i;let J=((ki=l.data.submitCooldown)==null?void 0:ki.key)===$?l.data.submitCooldown:void 0;J&&(J.until=Hu(J));let F=J==null?void 0:J.until;(l.data.reviewRequiresSend===!0&&!L||V!==!0||F!==void 0&&F>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel,...F!==void 0&&{availableAt:F}}}),L=!1;let P;if(r.data.captcha){let f=e.captcha,b=!0;try{P=await hu(a,{signal:y,container:(f==null?void 0:f.container())??null,theme:f==null?void 0:f.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:v("captcha_check")}).catch(()=>{}).then(()=>{b&&(f==null||f.reveal(!0))})}})}catch(m){if(n.error("Captcha check failed",m),y.aborted)return}finally{b=!1,f==null||f.reveal(!1)}}await e.sendMessage({type:"loading",text:v("submitting")});let{anonymous_id:O,session_id:z}=s.getSessionInfo();if(y.aborted)return;let Z=((or=l.data.startedWriteNodeIds)==null?void 0:or.includes(r.id))===!0;if((u==null?void 0:u.submitNodeId)===r.id&&await p(void 0),Z||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],r.id]),await w().catch(f=>n.error("Failed to persist application write barrier",f)),y.aborted)return;let X,Le=setTimeout(()=>{X=(async()=>{await e.sendMessage({type:"text",author:"bot",text:v("submission_still_working")}),await e.sendMessage({type:"loading",text:v("submitting")})})().catch(f=>n.error("Failed to send submission progress message",f))},zu),Ae,re=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:O,session_id:z,job:l.job,flow_build:l.build,...P!==void 0&&{captcha_token:P},submissions:al(l.nodes,ol(o||{},r.data.submitKeys)),pre_apply:gr(l.nodes,o||{},l.data.flowSessionId)})}).catch(f=>{Ae=f;let b=Yo(f);return(b==null?void 0:b.data)!==void 0?b.data:f});if(clearTimeout(Le),await X,y.aborted)return;if(Ae!==void 0&&!Go(Ae)&&x)return await x(Ae,y),B(!0);r.data.key&&e.setSubmission(r.data.key,{type:"integration",value:re});let mi=(Si=Yo(Ae))==null?void 0:Si.status,yi=typeof mi=="number"?mi:void 0,H=Xn(re,yi),wt=l.data.failedAttemptAt,Tt=wt==null?void 0:wt[$];wt&&Tt!==void 0&&Tt>Date.now()&&(Tt=wt[$]=Date.now());let _i=Tt!==void 0&&Date.now()-Tt<bl||((Ci=l.data.unconfirmedAttemptKeys)==null?void 0:Ci.includes($))===!0,Ft=kl(re);Ft&&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:Ft.service,response:Ft.response,flow_type:(h==null?void 0:h())??"CHATBOT_DRAWER",job:l.job,...(H==null?void 0:H.outcome)==="duplicate"&&{outcome:_i?"duplicate_after_own_attempt":"duplicate"},...Ft.outcome&&{outcome:Ft.outcome}}});let Jt=br(re)||(re==null?void 0:re.success)===!0;if((Jt||vr(re))&&(g.submitAccepted=!0),Jt&&((sr=l.data.submitCooldown)==null?void 0:sr.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await w().catch(f=>n.error("Failed to persist submit cooldown reset",f))),br(re)){let{redirect_url:f,message:b,button_text:m}=re.integration_response.data,E={redirect_url:f,message:b,button_text:m};return y.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[r.id]:E},await w().catch(S=>n.error("Failed to persist submit redirect",S)),await C(E),t(r.nextId))}let xi=vr(re);if(xi)return await e.sendMessage({type:"system",variant:"success",text:xi.message??v("submission_pending")}),t(r.nextId);if((re==null?void 0:re.success)===!0)return r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:v("submission_completed")}),t(r.nextId);let Dt=xl(H),mt=Dt!==void 0&&((lr=o==null?void 0:o[Dt])==null?void 0:lr.type)==="file"?Dt:void 0,Zt=mt===void 0?void 0:l.nodes.find(f=>f.type==="question-file"&&f.data.key===mt);if(!Zt&&!(_==="terminal"&&(H==null?void 0:H.outcome)==="closed")&&!ra(H)&&(l.data.submitCooldown=qu($,J,H)),(H==null?void 0:H.outcome)!=="duplicate"&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[$]:Date.now()},(On=l.data.unconfirmedAttemptKeys)!=null&&On.includes($)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(f=>f!==$))),(H==null?void 0:H.verdict)==="not_submitted"||(H==null?void 0:H.outcome)==="duplicate"||(H==null?void 0:H.outcome)==="closed"||pl(re,yi)?(Z||(l.data.startedWriteNodeIds=($i=l.data.startedWriteNodeIds)==null?void 0:$i.filter(f=>f!==r.id)),(u==null?void 0:u.submitNodeId)===r.id&&await p(u),await w().catch(f=>n.error("Failed to persist application write barrier release",f))):await w().catch(f=>n.error("Failed to persist submit cooldown",f)),H){if(n.error(Ae??H.message),Zt&&mt!==void 0)return e.setSubmission(mt,null),await p({fileQuestionNodeId:Zt.id,submitNodeId:r.id}),await e.sendMessage({type:"system",variant:"error",text:v("submission_unreadable_document")}),t(Zt.id);if(H.outcome==="duplicate")return await e.sendMessage({type:"system",variant:"info",text:v(_i?"submission_duplicate_earlier_attempt":"submission_duplicate")}),B(!1);if(H.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",text:v("submission_closed")}),_==="terminal"?(delete l.data.submitCooldown,i()):B(!1);let f=vl(H);return f?(await e.sendMessage({type:"system",variant:"warning",text:f.until===void 0?v("submission_provider_maintenance_later"):v("submission_provider_maintenance",{time:ia(f.until,void 0)})}),B(!1)):H.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:v(_l(H)?"submission_unknown_do_not_resubmit":"submission_unknown")}),B(!1)):ra(H)?ml(re)?(await e.sendMessage({type:"text",author:"bot",text:H.message}),B(!1)):(A===0&&await e.sendMessage({type:"system",variant:"warning",text:v("captcha_failed")}),A++,B(A<=Nu)):yl(H)?(await e.sendMessage({type:"system",variant:"error",text:v("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:v("submission_failed")}),i())}return n.error(Ae??re),await e.sendMessage({type:"system",variant:"error",text:v("submission_failed")}),i()};await B(d===!0&&!L?!1:r.data.skipConfirmation)}async function Gu({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({type:"link",href:Re(i.data.href,{submissions:r,context:n}),text:Re(i.data.cta,{submissions:r,context:n})}),t(i.nextId)}async function Yu({submissions:e,next:t,node:i,context:r}){t(Mu(i,{submissions:e,context:r})?i.branchId:i.nextId)}async function Ju({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.text,{submissions:r,context:n})}),t(i.nextId)}async function Zu({chat:e,next:t,node:i}){await e.sendMessage({author:"bot",type:"image",url:i.data.url,height:i.data.height,width:i.data.width}),t(i.nextId)}async function Xu({chat:e,next:t,node:i,submissions:r,context:n,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let s=i.data.format==="phone"?await e.userInput({key:i.data.key,type:"phone",config:{optional:i.data.optional,placeholder:i.data.placeholder,minChars:i.data.minChars,maxChars:i.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:i.data.key,type:"text",config:{optional:i.data.optional,placeholder:i.data.placeholder,format:i.data.format,maxChars:i.data.maxChars,minChars:i.data.minChars,multiline:i.data.format==="text"&&i.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"?Ti(s.value):i.data.format==="date"&&o!==void 0?Cl(s.value,o):s.value}),t(i.nextId)}async function Qu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"number",config:{max:i.data.max,min:i.data.min,optional:i.data.optional,placeholder:i.data.placeholder,decimalCases:i.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(i.nextId)}async function ef({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"phone",config:{minChars:i.data.minChars,defaultValue:{countryCode:i.data.defaultCountryCode},placeholder:i.data.placeholder,submissionFormat:"phone",optional:i.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"?Ti(o.value):o.value}),t(i.nextId)}async function tf({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"multiple-choice",config:i.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:i.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(i.nextId)}async function rf({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Re(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"boolean",config:{optional:i.data.optional,labels:{true:i.data.trueLabel,false:i.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?i.data.trueLabel:i.data.falseLabel}),t(i.nextId)}async function nf({chat:e,next:t,node:i,t:r}){await e.sendMessage({author:"bot",type:"text",text:i.data.question});let n=await e.userInput({type:"address",key:i.data.key,config:{optional:i.data.optional,keys:i.data.keys,line2Required:i.data.line2Required,placeholder:i.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:r("skipped")});else{let a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(i.nextId)}async function af({node:e,chat:t,next:i,submissions:r,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Re(e.data.question,{submissions:r,context:n})});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 i(e.nextId)}async function of({chat:e,end:t,node:i}){await e.sendMessage({type:"system",variant:"info",text:i.data.systemMessage}),t()}async function sf({node:e,flow:t,submissions:i,chat:r,next:n,apiClient:a,analytics:o,signal:s,context:l}){let u=nl(t.nodes,i||{}),{answers:p,...d}=u;if(r.setSubmission(e.data.key,{type:"integration",value:d}),Du(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:gr(t.nodes,i||{},t.data.flowSessionId)},s),u.status!=="skipped"){let h=[u.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":u.hasHardConcerns?e.data.messages.hard:u.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let g of["hard","advisory"]){let w=p.filter(y=>!y.matched&&y.severity===g);w.length&&h.push((g==="hard"?"Role requirements":"Other things to consider")+`
6
+ `+w.map(y=>`• ${y.message}`).join(`
7
7
  `))}await r.sendMessage({type:"text",author:"bot",text:h.join(`
8
8
 
9
- `)}),u.hasHardConcerns&&e.data.alternativeLink&&await r.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await r.userInput({type:"submit",key:void 0,config:{label:Re(e.data.continueLabel,{submissions:i,context:l})}})}return n(e.nextId)}const Jo=(e,t,i)=>{var r;return e.log({event:i,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:(r=t.analytics)==null?void 0:r.customProperties})},yn="resume-prompt",sf=async({chatService:e,t,signal:i})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:yn,signal:i});const r=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:i});return M.removeMessagesSentByNodeIds([yn]),(r==null?void 0:r.value)!==!1},Ft=({class:e,...t})=>{const{t:i}=se();return c("button",{class:et("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:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:i("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var it;function Yi(e){return{lang:(e==null?void 0:e.lang)??(it==null?void 0:it.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(it==null?void 0:it.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(it==null?void 0:it.abortPipeEarly)}}var _n;function lf(e){return _n==null?void 0:_n.get(e)}var xn;function cf(e){return xn==null?void 0:xn.get(e)}var kn;function df(e,t){var i;return(i=kn==null?void 0:kn.get(e))==null?void 0:i.get(t)}function Ht(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function ge(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Ht(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:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??df(e.reference,l.lang)??(u?cf(l.lang):null)??r.message??lf(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Ge(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Yi())}}}function uf(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ff(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function pf(e){if(e.path){let t="";for(const i of e.path)if(typeof i.key=="string"||typeof i.key=="number")t?t+=`.${i.key}`:t+=i.key;else return null;return t}return null}var hf=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},gf=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Zo(e,t){return{kind:"validation",type:"check",reference:Zo,async:!1,expects:null,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement(i.value)&&ge(this,"input",i,r),i}}}function Xo(e){return{kind:"validation",type:"email",reference:Xo,expects:null,async:!1,requirement:gf,message:e,"~run"(t,i){return t.typed&&!this.requirement.test(t.value)&&ge(this,"email",t,i),t}}}function hi(e,t){return{kind:"validation",type:"max_length",reference:hi,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&ge(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Qo(e,t){return{kind:"validation",type:"max_value",reference:Qo,async:!1,expects:`<=${e instanceof Date?e.toJSON():Ht(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value<=this.requirement)&&ge(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():Ht(i.value)}),i}}}function qt(e,t){return{kind:"validation",type:"min_length",reference:qt,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&ge(this,"length",i,r,{received:`${i.value.length}`}),i}}}function es(e,t){return{kind:"validation",type:"min_value",reference:es,async:!1,expects:`>=${e instanceof Date?e.toJSON():Ht(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value>=this.requirement)&&ge(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():Ht(i.value)}),i}}}function Sn(e,t){return{kind:"validation",type:"regex",reference:Sn,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement.test(i.value)&&ge(this,"format",i,r),i}}}function Cn(e){return{kind:"transformation",type:"transform",reference:Cn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function ts(e){return{kind:"validation",type:"url",reference:ts,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,i){return t.typed&&!this.requirement(t.value)&&ge(this,"URL",t,i),t}}}function bf(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function is(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function rs(e,t){return{kind:"schema",type:"array",reference:rs,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else ge(this,"type",i,r);return i}}}function ns(e){return{kind:"schema",type:"boolean",reference:ns,expects:"boolean",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:ge(this,"type",t,i),t}}}function as(e){return{kind:"schema",type:"number",reference:as,expects:"number",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ge(this,"type",t,i),t}}}function rt(e,t){return{kind:"schema",type:"object",reference:rt,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:is(s),u=s["~run"]({value:l},r);if(u.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=bf(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(ge(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else ge(this,"type",i,r);return i}}}function Wt(e,t){return{kind:"schema",type:"optional",reference:Wt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ge(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=is(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function os(e,t){return{kind:"schema",type:"picklist",reference:os,expects:ff(e.map(Ht),"|"),async:!1,options:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:ge(this,"type",i,r),i}}}function ss(e,t,i){return{kind:"schema",type:"record",reference:ss,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Ge(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(uf(a,l)){const u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}const d=this.value["~run"]({value:u},n);if(d.issues){const h={type:"object",origin:"value",input:a,key:l,value:u};for(const g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!d.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=d.value)}}else ge(this,"type",r,n);return r}}}function $e(e){return{kind:"schema",type:"string",reference:$e,expects:"string",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:ge(this,"type",t,i),t}}}function vf(e,t,i){const r=e["~run"]({value:t},Yi(i));if(r.issues)throw new hf(r.issues);return r.value}function wf(e,t){const i={};for(const r in e.entries)i[r]=!t||t.includes(r)?Wt(e.entries[r]):e.entries[r];return{...e,entries:i,get"~standard"(){return Ge(this)}}}function gt(...e){return{...e[0],pipe:e,get"~standard"(){return Ge(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function mf(e,t,i){const r=e["~run"]({value:t},Yi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}async function yf(e,t,i){const r=await e["~run"]({value:t},Yi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}const Kt=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[c("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:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"break-words pr-1 text-sm",children:e.message})]}),bt=({class:e,...t})=>{const{t:i}=se();return c("button",{type:"button",class:et("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:[c("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:[c("title",{children:i("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),i("skip")]})};var $n={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"};const Gt=It("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}}),_f="https://api.mapbox.com/search/searchbox/v1/suggest",xf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",kf=e=>atob(e).split("").reverse().join(""),nt=rt({name:$e()}),Sf=rt({suggestions:rs(rt({feature_type:Wt($e()),full_address:Wt($e()),place_formatted:Wt($e()),name:Wt($e()),mapbox_id:$e(),context:wf(rt({address:nt,street:nt,neighborhood:nt,locality:nt,district:nt,place:nt,region:nt,postcode:nt,country:nt}))}))}),Cf=({logger:e,t})=>lt(()=>{var r;const i=(r=M.current$.peek().flow)==null?void 0:r.data.flowSessionId;return i?{enabled:!0,getPredictions:async n=>{var d;const a=new URL(_f);a.searchParams.set("q",n),a.searchParams.set("session_token",i);const o=(d=M.current$.peek().flow)==null?void 0:d.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&a.searchParams.set("proximity",`${o.lng},${o.lat}`),a.searchParams.set("access_token",kf(xf));const l=await fetch(a);if(!l.ok)return e.error("Failed to get address details",l),{ok:!1,error:t("address_error")};const u=mf(Sf,await l.json());if(u.success===!1)return e.error("Failed to parse address details",u.issues),{ok:!1,error:t("address_error")};const{suggestions:p}=u.output;return{ok:!0,data:p.map(h=>{var g,v,y,k,_,w,x,I,E;return{label:h.full_address??([h.name,h.place_formatted].filter(Boolean).join(", ")||h.mapbox_id),id:h.mapbox_id,address:{line1:((g=h.context.address)==null?void 0:g.name)??((v=h.context.street)==null?void 0:v.name),line2:void 0,line3:((y=h.context.neighborhood)==null?void 0:y.name)??((k=h.context.locality)==null?void 0:k.name),city:((_=h.context.place)==null?void 0:_.name)??((w=h.context.district)==null?void 0:w.name),state:(x=h.context.region)==null?void 0:x.name,postcode:((I=h.context.postcode)==null?void 0:I.name)??(h.feature_type==="postcode"?h.name:void 0),country:(E=h.context.country)==null?void 0:E.name}}})}}}:{enabled:!1}},[e,t]),ls=e=>{const{t}=se();return c("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:[c("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:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},$f=({input:e,onSubmitSuccess:t,logger:i})=>{const{t:r}=se(),[n,a]=Oe(),{enabled:o,getPredictions:s}=Cf({logger:i,t:r}),[l,u]=Oe(o?"query":"manual"),[p,d]=Oe(""),[h,g]=Oe(),v=ve(),y=ve(),k=w=>{var I;if(tt(o,"Query state should not be enabled"),w=w.trim(),w===((I=v.current)==null?void 0:I.query)||w===(h==null?void 0:h.query)&&h.status==="done")return;if(d(w),w===""){v.current=void 0,g(void 0);return}const x=v.current={query:w};g({query:w,status:"pending"}),s(w).then(E=>{v.current===x&&(v.current=void 0,g(E.ok?{query:w,status:"done",items:E.data}:{query:w,status:"failed",error:E.error}))},E=>{v.current===x&&(v.current=void 0,i.error("Failed to get address details",E),g({query:w,status:"failed",error:r("address_error")}))})},_=(w,x)=>{a(I=>({...I,[w]:x}))};switch(l){case"query":return tt(o,"Query state should not be enabled"),c(Ef,{input:e,onSkip:()=>t(null),onAddressSelect:w=>{if(w===""){v.current&&(v.current=void 0,g(void 0)),u("manual");return}const x=(h==null?void 0:h.status)==="done"?h.items.find(I=>I.id===w):void 0;x&&(y.current!==w&&a(x.address),y.current=w,u("details"))},onAddressSearch:k,lookup:h,query:p});case"details":return tt(n!==void 0),c(cs,{input:e,logger:i,onSubmitSuccess:t,addressFields:n,onFieldChange:_,actions:c(ls,{onClick:()=>{u("query")}})});case"manual":return c(cs,{logger:i,input:e,onSubmitSuccess:t,addressFields:n??{},onFieldChange:_,actions:o?c(ls,{onClick:()=>{u("query")}}):e.config.optional?c(bt,{onClick:()=>t(null)}):void 0})}},Ef=({input:e,onSkip:t,lookup:i,onAddressSelect:r,query:n,onAddressSearch:a})=>{const{t:o}=se(),s=ve(null);return Ce(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(ae,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const p=new FormData(l.currentTarget).get("address");typeof p=="string"&&a(p)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:n,class:Gt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("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:[c("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]})}),c("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&c(bt,{class:"relative",onClick:t})]}),(i==null?void 0:i.status)==="failed"?c(Kt,{error:{message:i.error}}):null,c("p",{role:"status",class:(i==null?void 0:i.status)==="pending"||(i==null?void 0:i.status)==="done"&&i.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(i==null?void 0:i.status)==="pending"?c(ae,{children:[c(Ki,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(i==null?void 0:i.status)==="done"&&i.items.length===0?o("address_no_results"):null}),c("ul",{children:[((i==null?void 0:i.status)==="done"?i.items:[]).map(l=>c("li",{children:c("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:()=>{r(l.id)},children:[c("span",{class:"flex-grow",children:l.label}),c("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:c("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),c("li",{children:c("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:()=>{r("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},En=["line1","line2","line3","city","state","postcode","country"],cs=({addressFields:e,onFieldChange:t,onSubmitSuccess:i,actions:r,input:n})=>{const a=ve(null);Ce(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys($n),{t:s}=se();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{const u=l.currentTarget,p=[...u.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of p){g.value="";const v=En.find(y=>n.config.keys[y]===g.name);v&&t(v,"")}if(p.length>0&&!u.checkValidity()){l.preventDefault(),u.reportValidity();return}const d=new FormData(u),h=Object.fromEntries(d.entries());i({type:"address",value:h})},children:[c("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:En.map((l,u)=>{const p=`isdk_${l}`,d=n.config.keys[l];return d?c(ae,{children:[c("label",{for:p,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)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?c("div",{class:"relative",children:[c("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:p,defaultValue:e[l],onChange:h=>t(l,h.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?c("option",{value:e[l],children:e[l]}):c("option",{value:"",children:s("select_country")}),o.map(h=>c("option",{value:h,children:h},h))]}),c("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:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:u===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:p,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:l==="line2"?n.config.line2Required===!0:l!=="line3"}),u===En.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[r,c(Ft,{class:"ml-auto"})]})]})},In=()=>{const e=ve(null);return Li(()=>{var t;(t=e.current)==null||t.focus()},[]),e},ds=["true","false"],If=os(ds),Af="answer",us="flex items-center flex-wrap gap-2 p-2.5",fs="min-w-0 max-w-full flex-auto",ps=Rr(({label:e,...t},i)=>c("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:i,children:c("p",{class:"text-center text-base",children:e})})),Tf=({input:e,onSubmitSuccess:t})=>{const i=In();return c("form",{noValidate:!0,class:"",onSubmit:r=>{r.preventDefault();const n=Ld(r).value,a=vf(If,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:us,children:ds.map((r,n)=>c("li",{class:fs,children:c(ps,{ref:n===0?i:null,type:"submit",name:Af,value:r,label:e.config.labels[r]},r)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(bt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Ff=e=>new Promise((t,i)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"||!r.result)return i(new Error("Invalid file"));t(r.result)},r.onerror=i,r.readAsDataURL(e)}),hs=e=>e.reduce((t,i)=>t+i.sizeKb,0),Df=Ut("file"),gs=3,Ji=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Mf=({file:e,class:t,...i})=>{const{t:r}=se(),[n,a]=Ji(e.name);return c("div",{class:et("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...i,children:[c("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"sr-only",children:[r("file_name"),": "]}),c("span",{class:"block truncate",children:n}),c("span",{children:a})]}),c("p",{class:"text-accent-11",children:[c("span",{class:"sr-only",children:[r("file_size"),": "]}),Lt(e.sizeKb)]})]})},bs=({class:e,...t})=>c("li",{class:et("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Nf=(e,t)=>{const[i,r]=Ji(e);return`${i.slice(0,t)}${r}`},vs=e=>({name:Nf(e.name,42),sizeKb:e.size/1e3}),Lf=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Vf=(e,t,i)=>{const r=Ji(t.name)[1].toLowerCase(),n=[...i.map(o=>o.toLowerCase()),...Lf],a=r===""?"none":n.includes(r)?r:"other";return`chatbot-file-refused:${e}:${a}`},Of=({input:e,onSubmitSuccess:t,analytics:i})=>{var k;const r=(k=M.current$.value.flow)==null?void 0:k.data.submissions[e.key],[n,a]=Oe(Df(r)&&r.value.length?{status:"ready",files:r.value}:{status:"empty"}),o=ve(0),s=n.status==="ready"?n.files:[],l=n.status==="ready"||n.status==="pending"?n.files:[],u=n.status==="error"?n.error:void 0,p=l.length-gs,d=hs(l),h=In(),{t:g}=se(),v=_=>{if(!_.length)return{reason:"required",error:{type:"required",message:g("validation_file")}};if(!Jn(_,e.config.extensions))return{reason:"type",file:_.find(w=>!Jn([w],e.config.extensions)),error:{type:"validate",message:g("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(_.some(w=>w.sizeKb===0))return{reason:"empty",file:_.find(w=>w.sizeKb===0),error:{type:"validate",message:g("validation_file_empty")}};if(e.config.fileSizeLimitKib&&hs(_)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:g("validation_file_size",{size:Lt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&_.length>1)return{reason:"count",error:{type:"invalid",message:g("validation_file_max",{count:1})}}},y=(_,w)=>{var x,I;return i.log({event:"INTERACTION",properties:{tag:Vf(_,w,e.config.extensions)},customProperties:(I=(x=M.current$.peek().flow)==null?void 0:x.analytics)==null?void 0:I.customProperties})};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:_=>{if(_.preventDefault(),n.status==="pending"||n.status==="error")return;const w=v(s);w?a({status:"error",error:w.error}):t({type:"file",value:s})},children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:h,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?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,gs).map(_=>{const[w,x]=Ji(_.name);return c(bs,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:w}),c("span",{children:x})]})}),p>0?c(bs,{children:g("file_more",{count:p})}):null]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("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:c("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"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:g("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-11 text-xs",children:["(",g("file_max_size",{size:Lt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:g("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(_=>c("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:_.replace(".","")}))})]})]}),c("p",{role:"status",class:et("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:n.status==="pending"?c(ae,{children:[c(Ki,{"aria-hidden":"true",class:"h-4 w-4"}),g("file_preparing",{count:l.length})]}):n.status==="ready"?c(ae,{children:[s.length>1?g("file_total_size",{size:Lt(d)}):Lt(d),c("span",{class:"sr-only",children:[". ",g("file_ready",{count:s.length})]})]}):null}),c("input",{id:"dropzone-file","aria-label":g("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async _=>{tt(_.target instanceof HTMLInputElement);const w=_.target.files?Array.from(_.target.files):[];_.target.value="";const[x]=w;if(!x)return;const I=++o.current,E=n.status==="ready",T=w.map(vs),L=v(T);if(L)return y(L.reason,L.file??x),a({status:"error",error:L.error});a({status:"pending",files:T});let z;try{const V=await Promise.all(w.map(async P=>{try{return{...vs(P),data:await Ff(P)}}catch(G){throw z??(z=P),G}}));o.current===I&&a({status:"ready",files:V})}catch{if(o.current!==I)return;y("unreadable",z??x),a({status:"error",error:{type:"invalid",message:g(E?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(Ft,{disabled:s.length===0}),e.config.optional&&c(bt,{class:"relative",onClick:()=>t(null)})]})]}),c(Kt,{error:u})]})};var gi=e=>e.type==="checkbox",Dt=e=>e instanceof Date,Ee=e=>e==null;const ws=e=>typeof e=="object";var le=e=>!Ee(e)&&!Array.isArray(e)&&ws(e)&&!Dt(e),Pf=e=>le(e)&&e.target?gi(e.target)?e.target.checked:e.target.value:e,Rf=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,jf=(e,t)=>e.has(Rf(t)),Bf=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},An=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function fe(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(An&&(e instanceof Blob||t))return e;const i=Array.isArray(e);if(!i&&!(le(e)&&Bf(e)))return e;const r=i?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=fe(e[n]));return r}var Zi=e=>/^\w*$/.test(e),ie=e=>e===void 0,Tn=e=>Array.isArray(e)?e.filter(Boolean):[],Fn=e=>Tn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),A=(e,t,i)=>{if(!t||!le(e))return i;const r=(Zi(t)?[t]:Fn(t)).reduce((n,a)=>Ee(n)?n:n[a],e);return ie(r)||r===e?ie(e[t])?i:e[t]:r},Ye=e=>typeof e=="boolean",je=e=>typeof e=="function",Z=(e,t,i)=>{let r=-1;const n=Zi(t)?[t]:Fn(t),a=n.length,o=a-1;for(;++r<a;){const s=n[r];let l=i;if(r!==o){const u=e[s];l=le(u)||Array.isArray(u)?u:isNaN(+n[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ms={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Be={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},at={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zf=we.createContext(null);zf.displayName="HookFormControlContext";var Uf=(e,t,i,r=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Be.all&&(t._proxyFormState[o]=!r||Be.all),i&&(i[o]=!0),e[o]}});return n};const Hf=typeof window<"u"?we.useLayoutEffect:we.useEffect;var Ae=e=>typeof e=="string",qf=(e,t,i,r,n)=>Ae(e)?(r&&t.watch.add(e),A(i,e,n)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),A(i,a))):(r&&(t.watchAll=!0),i),Dn=e=>Ee(e)||!ws(e);function vt(e,t,i=new WeakSet){if(Dn(e)||Dn(t))return Object.is(e,t);if(Dt(e)&&Dt(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(i.has(e)||i.has(t))return!0;i.add(e),i.add(t);for(const a of r){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(Dt(o)&&Dt(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!vt(o,s,i):!Object.is(o,s))return!1}}return!0}const Wf=we.createContext(null);Wf.displayName="HookFormContext";var ys=(e,t,i,r,n)=>t?{...i[e],types:{...i[e]&&i[e].types?i[e].types:{},[r]:n||!0}}:{},bi=e=>Array.isArray(e)?e:[e],_s=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function xs(e,t){const i={};for(const r in e)if(e.hasOwnProperty(r)){const n=e[r],a=t[r];if(n&&le(n)&&a){const o=xs(n,a);le(o)&&(i[r]=o)}else e[r]&&(i[r]=a)}return i}var _e=e=>le(e)&&!Object.keys(e).length,Mn=e=>e.type==="file",Xi=e=>{if(!An)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ks=e=>e.type==="select-multiple",Nn=e=>e.type==="radio",Kf=e=>Nn(e)||gi(e),Ln=e=>Xi(e)&&e.isConnected;function Gf(e,t){const i=t.slice(0,-1).length;let r=0;for(;r<i;)e=ie(e)?r++:e[t[r++]];return e}function Yf(e){for(const t in e)if(e.hasOwnProperty(t)&&!ie(e[t]))return!1;return!0}function ce(e,t){const i=Array.isArray(t)?t:Zi(t)?[t]:Fn(t),r=i.length===1?e:Gf(e,i),n=i.length-1,a=i[n];return r&&delete r[a],n!==0&&(le(r)&&_e(r)||Array.isArray(r)&&Yf(r))&&ce(e,i.slice(0,-1)),e}var Jf=e=>{for(const t in e)if(je(e[t]))return!0;return!1};function Ss(e){return Array.isArray(e)||le(e)&&!Jf(e)}function Vn(e,t={}){for(const i in e){const r=e[i];Ss(r)?(t[i]=Array.isArray(r)?[]:{},Vn(r,t[i])):ie(r)||(t[i]=!0)}return t}function Yt(e,t,i){i||(i=Vn(t));for(const r in e){const n=e[r];if(Ss(n))ie(t)||Dn(i[r])?i[r]=Vn(n,Array.isArray(n)?[]:{}):Yt(n,Ee(t)?{}:t[r],i[r]);else{const a=t[r];i[r]=!vt(n,a)}}return i}const Cs={value:!1,isValid:!1},$s={value:!0,isValid:!0};var Es=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.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===""?$s:{value:e[0].value,isValid:!0}:$s:Cs}return Cs},Is=(e,{valueAsNumber:t,valueAsDate:i,setValueAs:r})=>ie(e)?e:t?e===""?NaN:e&&+e:i&&Ae(e)?new Date(e):r?r(e):e;const As={isValid:!1,value:null};var Ts=e=>Array.isArray(e)?e.reduce((t,i)=>i&&i.checked&&!i.disabled?{isValid:!0,value:i.value}:t,As):As;function Fs(e){const t=e.ref;return Mn(t)?t.files:Nn(t)?Ts(e.refs).value:ks(t)?[...t.selectedOptions].map(({value:i})=>i):gi(t)?Es(e.refs).value:Is(ie(t.value)?e.ref.value:t.value,e)}var Zf=(e,t,i,r)=>{const n={};for(const a of e){const o=A(t,a);o&&Z(n,a,o._f)}return{criteriaMode:i,names:[...e],fields:n,shouldUseNativeValidation:r}},Qi=e=>e instanceof RegExp,vi=e=>ie(e)?e:Qi(e)?e.source:le(e)?Qi(e.value)?e.value.source:e.value:e,Ds=e=>({isOnSubmit:!e||e===Be.onSubmit,isOnBlur:e===Be.onBlur,isOnChange:e===Be.onChange,isOnAll:e===Be.all,isOnTouch:e===Be.onTouched});const Ms="AsyncFunction";var Xf=e=>!!e&&!!e.validate&&!!(je(e.validate)&&e.validate.constructor.name===Ms||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ms)),Qf=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ns=(e,t,i)=>!i&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const wi=(e,t,i,r)=>{for(const n of i||Object.keys(e)){const a=A(e,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(wi(s,t))break}else if(le(s)&&wi(s,t))break}}};function Ls(e,t,i){const r=A(e,i);if(r||Zi(i))return{error:r,name:i};const n=i.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),s=A(e,a);if(o&&!Array.isArray(o)&&i!==a)return{name:i};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};n.pop()}return{name:i}}var ep=(e,t,i,r)=>{i(e);const{name:n,...a}=e;return _e(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!r||Be.all))},tp=(e,t,i)=>!e||!t||e===t||bi(e).some(r=>r&&(i?r===t:r.startsWith(t)||t.startsWith(r))),ip=(e,t,i,r,n)=>n.isOnAll?!1:!i&&n.isOnTouch?!(t||e):(i?r.isOnBlur:n.isOnBlur)?!e:(i?r.isOnChange:n.isOnChange)?e:!0,rp=(e,t)=>!Tn(A(e,t)).length&&ce(e,t),np=(e,t,i)=>{const r=bi(A(e,i));return Z(r,"root",t[i]),Z(e,i,r),e};function Vs(e,t,i="validate"){if(Ae(e)||Array.isArray(e)&&e.every(Ae)||Ye(e)&&!e)return{type:i,message:Ae(e)?e:"",ref:t}}var Jt=e=>le(e)&&!Qi(e)?e:{value:e,message:""},Os=async(e,t,i,r,n,a)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:p,min:d,max:h,pattern:g,validate:v,name:y,valueAsNumber:k,mount:_}=e._f,w=A(i,y);if(!_||t.has(y))return{};const x=s?s[0]:o,I=O=>{n&&x.reportValidity&&(x.setCustomValidity(Ye(O)?"":O||""),x.reportValidity())},E={},T=Nn(o),L=gi(o),z=T||L,V=(k||Mn(o))&&ie(o.value)&&ie(w)||Xi(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,P=ys.bind(null,y,r,E),G=(O,D,B,q=at.maxLength,te=at.minLength)=>{const de=O?D:B;E[y]={type:O?q:te,message:de,ref:o,...P(O?q:te,de)}};if(a?!Array.isArray(w)||!w.length:l&&(!z&&(V||Ee(w))||Ye(w)&&!w||L&&!Es(s).isValid||T&&!Ts(s).isValid)){const{value:O,message:D}=Ae(l)?{value:!!l,message:l}:Jt(l);if(O&&(E[y]={type:at.required,message:D,ref:x,...P(at.required,D)},!r))return I(D),E}if(!V&&(!Ee(d)||!Ee(h))){let O,D;const B=Jt(h),q=Jt(d);if(!Ee(w)&&!isNaN(w)){const te=o.valueAsNumber||w&&+w;Ee(B.value)||(O=te>B.value),Ee(q.value)||(D=te<q.value)}else{const te=o.valueAsDate||new Date(w),de=wt=>new Date(new Date().toDateString()+" "+wt),Te=o.type=="time",re=o.type=="week";Ae(B.value)&&w&&(O=Te?de(w)>de(B.value):re?w>B.value:te>new Date(B.value)),Ae(q.value)&&w&&(D=Te?de(w)<de(q.value):re?w<q.value:te<new Date(q.value))}if((O||D)&&(G(!!O,B.message,q.message,at.max,at.min),!r))return I(E[y].message),E}if((u||p)&&!V&&(Ae(w)||a&&Array.isArray(w))){const O=Jt(u),D=Jt(p),B=!Ee(O.value)&&w.length>+O.value,q=!Ee(D.value)&&w.length<+D.value;if((B||q)&&(G(B,O.message,D.message),!r))return I(E[y].message),E}if(g&&!V&&Ae(w)){const{value:O,message:D}=Jt(g);if(Qi(O)&&!w.match(O)&&(E[y]={type:at.pattern,message:D,ref:o,...P(at.pattern,D)},!r))return I(D),E}if(v){if(je(v)){const O=await v(w,i),D=Vs(O,x);if(D&&(E[y]={...D,...P(at.validate,D.message)},!r))return I(D.message),E}else if(le(v)){let O={};for(const D in v){if(!_e(O)&&!r)break;const B=Vs(await v[D](w,i),x,D);B&&(O={...B,...P(D,B.message)},I(B.message),r&&(E[y]=O))}if(!_e(O)&&(E[y]={ref:x,...O},!r))return E}}return I(!0),E};const ap={mode:Be.onSubmit,reValidateMode:Be.onChange,shouldFocusError:!0};function op(e={}){let t={...ap,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:je(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},n=le(t.defaultValues)||le(t.values)?fe(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:fe(n),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,u=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...p};let h={...d};const g={array:_s(),state:_s()},v=t.criteriaMode===Be.all,y=f=>b=>{clearTimeout(u),u=setTimeout(f,b)},k=async f=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||f)){let b;t.resolver?(b=_e((await z()).errors),_()):b=await P(r,!0),b!==i.isValid&&g.state.next({isValid:b})}},_=(f,b)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((f||Array.from(s.mount)).forEach(m=>{m&&(b?Z(i.validatingFields,m,b):ce(i.validatingFields,m))}),g.state.next({validatingFields:i.validatingFields,isValidating:!_e(i.validatingFields)}))},w=(f,b=[],m,$,C=!0,S=!0)=>{if($&&m&&!t.disabled){if(o.action=!0,S&&Array.isArray(A(r,f))){const N=m(A(r,f),$.argA,$.argB);C&&Z(r,f,N)}if(S&&Array.isArray(A(i.errors,f))){const N=m(A(i.errors,f),$.argA,$.argB);C&&Z(i.errors,f,N),rp(i.errors,f)}if((d.touchedFields||h.touchedFields)&&S&&Array.isArray(A(i.touchedFields,f))){const N=m(A(i.touchedFields,f),$.argA,$.argB);C&&Z(i.touchedFields,f,N)}(d.dirtyFields||h.dirtyFields)&&(i.dirtyFields=Yt(n,a)),g.state.next({name:f,isDirty:O(f,b),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Z(a,f,b)},x=(f,b)=>{Z(i.errors,f,b),g.state.next({errors:i.errors})},I=f=>{i.errors=f,g.state.next({errors:i.errors,isValid:!1})},E=(f,b,m,$)=>{const C=A(r,f);if(C){const S=A(a,f,ie(m)?A(n,f):m);ie(S)||$&&$.defaultChecked||b?Z(a,f,b?S:Fs(C._f)):q(f,S),o.mount&&!o.action&&k()}},T=(f,b,m,$,C)=>{let S=!1,N=!1;const W={name:f};if(!t.disabled){if(!m||$){(d.isDirty||h.isDirty)&&(N=i.isDirty,i.isDirty=W.isDirty=O(),S=N!==W.isDirty);const K=vt(A(n,f),b);N=!!A(i.dirtyFields,f),K?ce(i.dirtyFields,f):Z(i.dirtyFields,f,!0),W.dirtyFields=i.dirtyFields,S=S||(d.dirtyFields||h.dirtyFields)&&N!==!K}if(m){const K=A(i.touchedFields,f);K||(Z(i.touchedFields,f,m),W.touchedFields=i.touchedFields,S=S||(d.touchedFields||h.touchedFields)&&K!==m)}S&&C&&g.state.next(W)}return S?W:{}},L=(f,b,m,$)=>{const C=A(i.errors,f),S=(d.isValid||h.isValid)&&Ye(b)&&i.isValid!==b;if(t.delayError&&m?(l=y(()=>x(f,m)),l(t.delayError)):(clearTimeout(u),l=null,m?Z(i.errors,f,m):ce(i.errors,f)),(m?!vt(C,m):C)||!_e($)||S){const N={...$,...S&&Ye(b)?{isValid:b}:{},errors:i.errors,name:f};i={...i,...N},g.state.next(N)}},z=async f=>(_(f,!0),await t.resolver(a,t.context,Zf(f||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),V=async f=>{const{errors:b}=await z(f);if(_(f),f)for(const m of f){const $=A(b,m);$?Z(i.errors,m,$):ce(i.errors,m)}else i.errors=b;return b},P=async(f,b,m={valid:!0})=>{for(const $ in f){const C=f[$];if(C){const{_f:S,...N}=C;if(S){const W=s.array.has(S.name),K=C._f&&Xf(C._f);K&&d.validatingFields&&_([S.name],!0);const xe=await Os(C,s.disabled,a,v,t.shouldUseNativeValidation&&!b,W);if(K&&d.validatingFields&&_([S.name]),xe[S.name]&&(m.valid=!1,b||e.shouldUseNativeValidation))break;!b&&(A(xe,S.name)?W?np(i.errors,xe,S.name):Z(i.errors,S.name,xe[S.name]):ce(i.errors,S.name))}!_e(N)&&await P(N,b,m)}}return m.valid},G=()=>{for(const f of s.unMount){const b=A(r,f);b&&(b._f.refs?b._f.refs.every(m=>!Ln(m)):!Ln(b._f.ref))&&Zt(f)}s.unMount=new Set},O=(f,b)=>!t.disabled&&(f&&b&&Z(a,f,b),!vt(yi(),n)),D=(f,b,m)=>qf(f,s,{...o.mount?a:ie(b)?n:Ae(f)?{[f]:b}:b},m,b),B=f=>Tn(A(o.mount?a:n,f,t.shouldUnregister?A(n,f,[]):[])),q=(f,b,m={})=>{const $=A(r,f);let C=b;if($){const S=$._f;S&&(!S.disabled&&Z(a,f,Is(b,S)),C=Xi(S.ref)&&Ee(b)?"":b,ks(S.ref)?[...S.ref.options].forEach(N=>N.selected=C.includes(N.value)):S.refs?gi(S.ref)?S.refs.forEach(N=>{(!N.defaultChecked||!N.disabled)&&(Array.isArray(C)?N.checked=!!C.find(W=>W===N.value):N.checked=C===N.value||!!C)}):S.refs.forEach(N=>N.checked=N.value===C):Mn(S.ref)?S.ref.value="":(S.ref.value=C,S.ref.type||g.state.next({name:f,values:fe(a)})))}(m.shouldDirty||m.shouldTouch)&&T(f,C,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&wt(f)},te=(f,b,m)=>{for(const $ in b){if(!b.hasOwnProperty($))return;const C=b[$],S=f+"."+$,N=A(r,S);(s.array.has(f)||le(C)||N&&!N._f)&&!Dt(C)?te(S,C,m):q(S,C,m)}},de=(f,b,m={})=>{const $=A(r,f),C=s.array.has(f),S=fe(b);Z(a,f,S),C?(g.array.next({name:f,values:fe(a)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&m.shouldDirty&&g.state.next({name:f,dirtyFields:Yt(n,a),isDirty:O(f,S)})):$&&!$._f&&!Ee(S)?te(f,S,m):q(f,S,m),Ns(f,s)?g.state.next({...i,name:f,values:fe(a)}):g.state.next({name:o.mount?f:void 0,values:fe(a)})},Te=async f=>{o.mount=!0;const b=f.target;let m=b.name,$=!0;const C=A(r,m),S=K=>{$=Number.isNaN(K)||Dt(K)&&isNaN(K.getTime())||vt(K,A(a,m,K))},N=Ds(t.mode),W=Ds(t.reValidateMode);if(C){let K,xe;const Nt=b.type?Fs(C._f):Pf(f),kt=f.type===ms.BLUR||f.type===ms.FOCUS_OUT,eh=!Qf(C._f)&&!t.resolver&&!A(i.errors,m)&&!C._f.deps||ip(kt,A(i.touchedFields,m),i.isSubmitted,W,N),Pn=Ns(m,s,kt);Z(a,m,Nt),kt?(!b||!b.readOnly)&&(C._f.onBlur&&C._f.onBlur(f),l&&l(0)):C._f.onChange&&C._f.onChange(f);const Rn=T(m,Nt,kt),th=!_e(Rn)||Pn;if(!kt&&g.state.next({name:m,type:f.type,values:fe(a)}),eh)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?kt&&k():kt||k()),th&&g.state.next({name:m,...Pn?{}:Rn});if(!kt&&Pn&&g.state.next({...i}),t.resolver){const{errors:Ks}=await z([m]);if(_([m]),S(Nt),$){const ih=Ls(i.errors,r,m),Gs=Ls(Ks,r,ih.name||m);K=Gs.error,m=Gs.name,xe=_e(Ks)}}else _([m],!0),K=(await Os(C,s.disabled,a,v,t.shouldUseNativeValidation))[m],_([m]),S(Nt),$&&(K?xe=!1:(d.isValid||h.isValid)&&(xe=await P(r,!0)));$&&(C._f.deps&&(!Array.isArray(C._f.deps)||C._f.deps.length>0)&&wt(C._f.deps),L(m,xe,K,Rn))}},re=(f,b)=>{if(A(i.errors,b)&&f.focus)return f.focus(),1},wt=async(f,b={})=>{let m,$;const C=bi(f);if(t.resolver){const S=await V(ie(f)?f:C);m=_e(S),$=f?!C.some(N=>A(S,N)):m}else f?($=(await Promise.all(C.map(async S=>{const N=A(r,S);return await P(N&&N._f?{[S]:N}:N)}))).every(Boolean),!(!$&&!i.isValid)&&k()):$=m=await P(r);return g.state.next({...!Ae(f)||(d.isValid||h.isValid)&&m!==i.isValid?{}:{name:f},...t.resolver||!f?{isValid:m}:{},errors:i.errors}),b.shouldFocus&&!$&&wi(r,re,f?C:s.mount),$},yi=(f,b)=>{let m={...o.mount?a:n};return b&&(m=xs(b.dirtyFields?i.dirtyFields:i.touchedFields,m)),ie(f)?m:Ae(f)?A(m,f):f.map($=>A(m,$))},H=(f,b)=>({invalid:!!A((b||i).errors,f),isDirty:!!A((b||i).dirtyFields,f),error:A((b||i).errors,f),isValidating:!!A(i.validatingFields,f),isTouched:!!A((b||i).touchedFields,f)}),Mt=f=>{const b=f?bi(f):void 0;b==null||b.forEach(m=>ce(i.errors,m)),b?b.forEach(m=>{g.state.next({name:m,errors:i.errors})}):g.state.next({errors:{}})},mt=(f,b,m)=>{const $=(A(r,f,{_f:{}})._f||{}).ref,C=A(i.errors,f)||{},{ref:S,message:N,type:W,...K}=C;Z(i.errors,f,{...K,...b,ref:$}),g.state.next({name:f,errors:i.errors,isValid:!1}),m&&m.shouldFocus&&$&&$.focus&&$.focus()},rr=(f,b)=>je(f)?g.state.subscribe({next:m=>"values"in m&&f(D(void 0,b),m)}):D(f,b,!0),yt=f=>g.state.subscribe({next:b=>{tp(f.name,b.name,f.exact)&&ep(b,f.formState||d,lr,f.reRenderRoot)&&f.callback({values:{...a},...i,...b,defaultValues:n})}}).unsubscribe,nr=f=>(o.mount=!0,h={...h,...f.formState},yt({...f,formState:{...p,...f.formState}})),Zt=(f,b={})=>{for(const m of f?bi(f):s.mount)s.mount.delete(m),s.array.delete(m),b.keepValue||(ce(r,m),ce(a,m)),!b.keepError&&ce(i.errors,m),!b.keepDirty&&ce(i.dirtyFields,m),!b.keepTouched&&ce(i.touchedFields,m),!b.keepIsValidating&&ce(i.validatingFields,m),!t.shouldUnregister&&!b.keepDefaultValue&&ce(n,m);g.state.next({values:fe(a)}),g.state.next({...i,...b.keepDirty?{isDirty:O()}:{}}),!b.keepIsValid&&k()},Xt=({disabled:f,name:b})=>{if(Ye(f)&&o.mount||f||s.disabled.has(b)){const C=s.disabled.has(b)!==!!f;f?s.disabled.add(b):s.disabled.delete(b),C&&o.mount&&!o.action&&k()}},_t=(f,b={})=>{let m=A(r,f);const $=Ye(b.disabled)||Ye(t.disabled);return Z(r,f,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:f}},name:f,mount:!0,...b}}),s.mount.add(f),m?Xt({disabled:Ye(b.disabled)?b.disabled:t.disabled,name:f}):E(f,!0,b.value),{...$?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:vi(b.min),max:vi(b.max),minLength:vi(b.minLength),maxLength:vi(b.maxLength),pattern:vi(b.pattern)}:{},name:f,onChange:Te,onBlur:Te,ref:C=>{if(C){_t(f,b),m=A(r,f);const S=ie(C.value)&&C.querySelectorAll&&C.querySelectorAll("input,select,textarea")[0]||C,N=Kf(S),W=m._f.refs||[];if(N?W.find(K=>K===S):S===m._f.ref)return;Z(r,f,{_f:{...m._f,...N?{refs:[...W.filter(Ln),S,...Array.isArray(A(n,f))?[{}]:[]],ref:{type:S.type,name:f}}:{ref:S}}}),E(f,!1,void 0,S)}else m=A(r,f,{}),m._f&&(m._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!(jf(s.array,f)&&o.action)&&s.unMount.add(f)}}},xt=()=>t.shouldFocusError&&wi(r,re,s.mount),ar=f=>{Ye(f)&&(g.state.next({disabled:f}),wi(r,(b,m)=>{const $=A(r,m);$&&(b.disabled=$._f.disabled||f,Array.isArray($._f.refs)&&$._f.refs.forEach(C=>{C.disabled=$._f.disabled||f}))},0,!1))},_i=(f,b)=>async m=>{let $;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let C=fe(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:S,values:N}=await z();_(),i.errors=S,C=fe(N)}else await P(r);if(s.disabled.size)for(const S of s.disabled)ce(C,S);if(ce(i.errors,"root"),_e(i.errors)){g.state.next({errors:{}});try{await f(C,m)}catch(S){$=S}}else b&&await b({...i.errors},m),xt(),setTimeout(xt);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_e(i.errors)&&!$,submitCount:i.submitCount+1,errors:i.errors}),$)throw $},or=(f,b={})=>{A(r,f)&&(ie(b.defaultValue)?de(f,fe(A(n,f))):(de(f,b.defaultValue),Z(n,f,fe(b.defaultValue))),b.keepTouched||ce(i.touchedFields,f),b.keepDirty||(ce(i.dirtyFields,f),i.isDirty=b.defaultValue?O(f,fe(A(n,f))):O()),b.keepError||(ce(i.errors,f),d.isValid&&k()),g.state.next({...i}))},xi=(f,b={})=>{const m=f?fe(f):n,$=fe(m),C=_e(f),S=C?n:$;if(b.keepDefaultValues||(n=m),!b.keepValues){if(b.keepDirtyValues){const N=new Set([...s.mount,...Object.keys(Yt(n,a))]);for(const W of Array.from(N)){const K=A(i.dirtyFields,W),xe=A(a,W),Nt=A(S,W);K&&!ie(xe)?Z(S,W,xe):!K&&!ie(Nt)&&de(W,Nt)}}else{if(An&&ie(f))for(const N of s.mount){const W=A(r,N);if(W&&W._f){const K=Array.isArray(W._f.refs)?W._f.refs[0]:W._f.ref;if(Xi(K)){const xe=K.closest("form");if(xe){xe.reset();break}}}}if(b.keepFieldsRef)for(const N of s.mount)de(N,A(S,N));else r={}}a=t.shouldUnregister?b.keepDefaultValues?fe(n):{}:fe(S),g.array.next({values:{...S}}),g.state.next({values:{...S}})}s={mount:b.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!b.keepIsValid||!!b.keepDirtyValues||!t.shouldUnregister&&!_e(S),o.watch=!!t.shouldUnregister,o.keepIsValid=!!b.keepIsValid,o.action=!1,b.keepErrors||(i.errors={}),g.state.next({submitCount:b.keepSubmitCount?i.submitCount:0,isDirty:C?!1:b.keepDirty?i.isDirty:!!(b.keepDefaultValues&&!vt(f,n)),isSubmitted:b.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:C?{}:b.keepDirtyValues?b.keepDefaultValues&&a?Yt(n,a):i.dirtyFields:b.keepDefaultValues&&f?Yt(n,f):b.keepDirty?i.dirtyFields:{},touchedFields:b.keepTouched?i.touchedFields:{},errors:b.keepErrors?i.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},ki=(f,b)=>xi(je(f)?f(a):f,{...t.resetOptions,...b}),sr=(f,b={})=>{const m=A(r,f),$=m&&m._f;if($){const C=$.refs?$.refs[0]:$.ref;C.focus&&setTimeout(()=>{C.focus(),b.shouldSelect&&je(C.select)&&C.select()})}},lr=f=>{i={...i,...f}},j={control:{register:_t,unregister:Zt,getFieldState:H,handleSubmit:_i,setError:mt,_subscribe:yt,_runSchema:z,_updateIsValidating:_,_focusError:xt,_getWatch:D,_getDirty:O,_setValid:k,_setFieldArray:w,_setDisabledField:Xt,_setErrors:I,_getFieldArray:B,_reset:xi,_resetDefaultValues:()=>je(t.defaultValues)&&t.defaultValues().then(f=>{ki(f,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:G,_disableForm:ar,_subjects:g,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(f){o=f},get _defaultValues(){return n},get _names(){return s},set _names(f){s=f},get _formState(){return i},get _options(){return t},set _options(f){t={...t,...f}}},subscribe:nr,trigger:wt,register:_t,handleSubmit:_i,watch:rr,setValue:de,getValues:yi,reset:ki,resetField:or,clearErrors:Mt,unregister:Zt,setError:mt,setFocus:sr,getFieldState:H};return{...j,formControl:j}}function er(e={}){const t=we.useRef(void 0),i=we.useRef(void 0),[r,n]=we.useState({isDirty:!1,isValidating:!1,isLoading:je(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:je(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!je(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=op(e);t.current={...s,formState:r}}const a=t.current.control;return a._options=e,Hf(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),we.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),we.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),we.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),we.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),we.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==r.isDirty&&a._subjects.state.next({isDirty:o})}},[a,r.isDirty]),we.useEffect(()=>{var o;e.values&&!vt(e.values,i.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),i.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),we.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=we.useMemo(()=>Uf(r,a),[a,r]),t.current}const Ps=(e,t,i)=>{if(e&&"reportValidity"in e){const r=A(i,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},sp=(e,t)=>{for(const i in t.fields){const r=t.fields[i];r&&r.ref&&"reportValidity"in r.ref?Ps(r.ref,i,e):r.refs&&r.refs.forEach(n=>Ps(n,i,e))}},lp=(e,t)=>{t.shouldUseNativeValidation&&sp(e,t);const i={};for(const r in e){const n=A(t.fields,r),a=Object.assign(e[r]||{},{ref:n&&n.ref});if(cp(t.names||Object.keys(e),r)){const o=Object.assign({},A(i,r));Z(o,"root",a),Z(i,r,o)}else Z(i,r,a)}return i},cp=(e,t)=>e.some(i=>i.startsWith(t+"."));var tr=function(e,t,i){return i===void 0&&(i={}),function(r,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(yf(e,r,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var u=s.issues[0],p=pf(u);if(p&&(l[p]||(l[p]={message:u.message,type:u.type}),o)){var d=l[p].types,h=d&&d[u.type];l[p]=ys(p,o,l,u.type,h?[].concat(h,u.message):u.message)}s.issues.shift()}return{values:{},errors:lp(l,a)}}return{values:i.raw?r:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Rs=27,js=12,Bs=10,dp=Ut("enum"),up=(e,t)=>{const i={min:e.minSelected??0,max:e.maxSelected??e.options.length};return tr(rt({checked:gt(ss($e(),ns()),Cn(r=>Object.entries(r).filter(([n,a])=>a).map(([n,a])=>n)),hi(i.max,t("validation_multiple_choice_max",{count:i.max})),qt(i.min,t("validation_multiple_choice_min",{count:i.min})))}))},fp=Rr(({option:e,...t},i)=>c(ae,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:i}),c("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})]})),zs=It("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:us}}}),pp=({input:e,onSubmitSuccess:t})=>{var p,d;const i=e.key?(p=M.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,r=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=r&&e.config.options.length===2,{t:a}=se(),{register:o,handleSubmit:s,formState:{errors:l}}=er({defaultValues:{checked:r?{}:dp(i)?Object.fromEntries(i.value.map(h=>[h,!0])):{}},resolver:up(e.config,a)}),u=In();return n?c("ul",{style:{maxHeight:6.5*Rs+5*js+2*Bs},class:zs({variant:"booleanLike"}),children:e.config.options.map((h,g)=>c("li",{class:fs,children:c(ps,{type:"submit",ref:v=>{v&&g===0&&(u.current=v)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}):c("form",{noValidate:!0,onSubmit:h=>s(g=>{const v=g.checked;t({type:"enum",value:v})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Rs+5*js+2*Bs},class:zs({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,g)=>{const v=`checked.${h.value}`,{ref:y,...k}=o(v);return c("li",{class:"relative",children:c(fp,{option:h,autoFocus:g===0,ref:_=>{_&&g===0&&(u.current=_),y(_)},id:v,...k,onClick:r?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[r?null:c(Ft,{}),e.config.minSelected===0&&c(bt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(Kt,{error:(d=l.checked)==null?void 0:d.root})})]})},hp=Ut("number"),gp=(e,t)=>{const i=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return tr(rt({number:gt(as(t("validation_number")),es(i,t("validation_number_min",{min:i})),Qo(r,t("validation_number_max",{max:r})),Zo(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},bp=({input:e,onSubmitSuccess:t})=>{var d;const i=e.config.defaultValue,r=e.key?(d=M.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:n}=se(),{register:a,handleSubmit:o,formState:{errors:s}}=er({defaultValues:{number:hp(r)?r.value:i?Number(i):void 0},resolver:gp(e.config,n)}),{ref:l,...u}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=ve();return Ce(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...u,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(p.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:Gt({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&&c(bt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(Ft,{})]}),c(Kt,{error:s.number})]})},vp=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries($n).find(n=>e.startsWith(n[1])),i=t?t[1]:"",r=e.replace(i,"");return/^\d+$/.test(r)?{countryCode:i,phoneNumber:r}:{countryCode:"",phoneNumber:""}},wp="44",mp=/^[0-9 ]+$/,yp=Ut("string"),_p=Ut("phone"),xp=e=>{const t=gt($e(e("validation_country_code")),Sn(mp,e("validation_country_code"))),i=gt($e(e("validation_phone")),qt(1,e("validation_phone")),Cn(r=>r.replace(/[^0-9]/g,"")));return tr(rt({countryCode:t,phoneNumber:i}))},kp=({input:e,onSubmitSuccess:t})=>{var y;const i=e.key?(y=M.current$.value.flow)==null?void 0:y.data.submissions[e.key]:void 0,{t:r}=se(),[n,a]=Oe(),o=yp(i)?vp(i.value):_p(i)?i.value:void 0,{register:s,handleSubmit:l,formState:{errors:u},watch:p}=er({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??wp,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:xp(r)}),{ref:d,...h}=s("phoneNumber",{required:!e.config.optional}),g=ve(),v=p("countryCode");return Ce(()=>{g.current&&(g.current.focus(),g.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(k=>{const _=k.phoneNumber.replace(/[^0-9]/g,""),w=k.countryCode.replace(/[^0-9]/g,"");a(void 0);const x=e.config.minChars??7,I=_.length+w.length;if(I<x)return a(r("validation_phone_min_chars",{count:x}));const E=e.config.maxChars;if(E!=null&&I>E)return a(r("validation_max_chars",{count:E}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:w,phoneNumber:_}}):t({type:"string",value:v+k.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("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:[c("span",{children:["+",v]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries($n).map(([k,_])=>c("option",{value:_,children:[k," (+",_,")"]},k))})]}),c("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(g.current=k),d(k)},class:Gt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(bt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(Ft,{})]}),c(Kt,{error:u.countryCode||u.phoneNumber||{message:n}})]})},ir=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Us=(e,t,i,r)=>i!==void 0&&r*1e3>wr?e("submission_available_at",{time:ia(i,t)}):e("submission_cooldown",{count:r}),Sp=({input:e,onSubmitSuccess:t})=>{const{t:i,locale:r}=se(),{availableAt:n}=e.config,[a,o]=Oe(()=>ir(n)),[s,l]=Oe("");Li(()=>{const p=ir(n);if(o(p),p===0)return;l(Us(i,r,n,p));const d=setInterval(()=>{const h=ir(n);o(h),!(h>0)&&(clearInterval(d),l(i("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[n,r,i]);const u=a>0;return c("div",{class:"flex flex-col items-center gap-2 py-3",children:[c("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":u,"aria-describedby":u?"submit-cooldown":void 0,onClick:()=>{ir(n)>0||t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("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:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})}),u&&c("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Us(i,r,n,a)}),c("p",{role:"status",class:"sr-only",children:s})]})},Cp=160,Hs=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Cp)}px`},$p={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Ep=Ut("string"),Ip=(e,t)=>{const i={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return tr(rt({text:{date:gt($e(t("validation_date")),Sn(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:gt($e(t("validation_email")),Xo(t("validation_email")),qt(e.minChars??1,i.minLength),hi(e.maxChars??1/0,i.maxLength)),text:gt($e(),qt(e.minChars??1,i.minLength),hi(e.maxChars??1/0,i.maxLength)),url:gt($e(t("validation_url")),ts(t("validation_url")),qt(e.minChars??1,i.minLength),hi(e.maxChars??1/0,i.maxLength))}[e.format]}))},Ap={text:({input:e,onSubmitSuccess:t})=>{var y;const{t:i}=se(),r=e.key?(y=M.current$.value.flow)==null?void 0:y.data.submissions[e.key]:void 0,n=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:u}}=er({defaultValues:{text:Ep(r)?r.value:n??""},resolver:Ip(e.config,i)}),{ref:p,...d}=o("text",{required:!e.config.optional}),h=ve();Ce(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&Hs(h.current),h.current.focus(),h.current.select())},[]);const g=e.config.maxChars,v=a&&g!==void 0?l("text").length:void 0;return c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(k=>{t({type:"string",value:k.text})}),children:[c("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[a?c("textarea",{id:"chat-input",...d,rows:2,maxLength:g,autoFocus:!0,"aria-describedby":v!==void 0?"chat-input-count":void 0,onInput:k=>Hs(k.currentTarget),onKeyDown:k=>{var _;k.key==="Enter"&&(k.ctrlKey||k.metaKey)&&(k.preventDefault(),(_=k.currentTarget.form)==null||_.requestSubmit())},ref:k=>{k&&(h.current=k),p(k)},placeholder:e.config.placeholder,class:Gt({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):c("input",{id:"chat-input",...d,...$p[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(h.current=k),p(k)},placeholder:e.config.placeholder,class:Gt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(bt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(Ft,{})]}),v!==void 0&&g!==void 0&&c("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[v,"/",g]}),c(Kt,{error:u.text})]})},phone:kp,"multiple-choice":pp,boolean:Tf,file:Of,submit:Sp,address:$f,number:bp},Tp=({logger:e,analytics:t})=>{var a;const i=(a=M.current$.value.flow)==null?void 0:a.data.currentInput,r=ve(null),n=()=>ee.onInteractionFn$.value();return Ce(()=>{var o;(o=r.current)==null||o.scrollTo({top:0})},[i]),c("div",{ref:r,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:c("div",{class:"flex flex-col",onPointerDownCapture:i?n:void 0,onKeyDownCapture:i?n:void 0,children:i?(()=>{const o=Ap[i.type];return c(o,{logger:e,analytics:t,onSubmitSuccess:ee.onSubmitSuccessFn$.value,input:i})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Gt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(Ft,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Fp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dp=function(e){return e instanceof RegExp},Mp=function(t){var i=/[\\^$.*+?()[\]{}|]/g,r=RegExp(i.source);return t&&r.test(t)?t.replace(i,"\\$&"):t},qs=function(e){return typeof e=="string"},Np=function(e){var t=[];return e.forEach(function(i){Array.isArray(i)?t=t.concat(i):t.push(i)}),t};function Lp(e,t,i){var r=0,n=0;if(e==="")return e;if(!e||!qs(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Dp(a)||(a=new RegExp("("+Mp(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}n=o[s].length,r+=o[s-1].length,o[s]=i(o[s],s,r),r+=n}return o}var Vp=function(t,i,r){return Array.isArray(t)||(t=[t]),Np(t.map(function(n){return qs(n)?Lp(n,i,r):n}))};const mi=Fp(Vp),Op=/(\[[^\]]+\]\([^)]+\))/g,Pp=/\[([^\]]+)\]\(([^)]+)\)/,Rp=/(https?:\/\/[^\s]+)/g,jp=/_(.*?)_/g,Bp=/\*\*(.*?)\*\*/g,zp=/(\\n|\n)/g,Ws="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Up=e=>{const t=mi(e,Op,(s,l)=>{const[,u,p]=s.match(Pp)??[];return p?c("a",{class:Ws,href:p,children:u??p},p+l):c("span",{children:"INVALID LINK"})}),i=mi(t,Rp,(s,l)=>c("a",{class:Ws,href:s,children:s},s+l)),r=mi(i,jp,(s,l)=>c("em",{children:s},s+l)),n=mi(r,Bp,(s,l)=>c("strong",{children:s},s+l));let a=0;return mi(n,zp,()=>c("br",{},`br-${a++}`))},Hp=It("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"}}),qp=({children:e,className:t,animate:i,side:r,...n})=>c("p",{style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:Hp({className:t,side:r,animate:i}),...n,children:e}),Wp=({message:e})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("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,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("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"})})]})}),Kp=({className:e,...t})=>c("div",{"aria-hidden":!0,children:ee.isBotTyping$.value===!0?c("div",{"data-testid":"typing-indicator",class:et("flex gap-1 p-4",e),...t,children:Array.from({length:3},(i,r)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}):void 0}),Gp={bot:"left",user:"right"},Yp=It("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"}}}),Jp=({lastSentMessageFooter:e})=>{const{t}=se(),i=M.current$.value.flow,r=(i==null?void 0:i.data.messages)??[],n=i?wn(i):void 0;return c("ol",{"aria-label":t("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[r.map((a,o)=>c(ae,{children:c("li",{class:"flex",tabIndex:o===r.length-1?-1:void 0,children:[n&&a.groupId===n&&!r.slice(o+1).some(s=>s.groupId===n)?e:null,Ri(a).with({type:"system"},s=>c("p",{class:Yp({variant:s.variant}),children:s.text})).with({type:"text",author:li.union("bot","user")},s=>{const l=o===r.length-1,u=s.author==="bot"?Up(s.text):s.text;return c(ae,{children:c(qp,{animate:l,side:Gp[s.author],children:u},o)})}).with({type:"link"},s=>c(Wp,{message:s})).with({type:"image"},s=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:s.url,style:{aspectRatio:s.width/s.height}})).with({type:"file"},s=>c(Mf,{class:s.author==="bot"?void 0:"ml-auto",file:{name:s.fileName,sizeKb:s.fileSizeKb}})).with({type:"loading"},s=>{const l=r[r.length-1];return!(s===l)||ee.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[c(Ki,{"aria-hidden":s.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),s.text?c("p",{role:"status",class:"text-neutral-11 text-sm",children:s.text}):null]})}).exhaustive()]})},o)),c("li",{class:ee.captchaVisible$.value?"flex":"hidden",children:c("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":t("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),c(Kp,{},"typing")]})},Zp=({logger:e,apiClient:t,analytics:i,talentBankClient:r})=>{const{flow:n}=M.current$.value;tt(n,"Flow is required to exist to show chatbot body");const a=M.viewState$.value,{chatRef:o,chatService:s}=Xd(),{t:l}=se(),[u,p]=Oe();return Ce(()=>{a==="maximised"&&ee.scrollToEnd()},[a]),Ce(()=>{var E;const{state:d,flow:h}=M.current$.peek();if(d!=="loaded")throw new Error(l("invalid_state"));let g=h.data.nodeHistory.at(-1);if(ee.scrollToEnd(),M.setInput(void 0),h.data.isFinished)return;const v=()=>{const T=M.current$.peek().flow;!T||T.data.hasInteracted||(M.markAsInteracted(),Jo(i,T,"FLOW_INTERACT"))};ee.onInteractionFn$.value=v,g===void 0?(g=qo(n.nodes).id,M.setCurrentNodeId(g),Jo(i,h,"FLOW_START")):M.removeMessagesSentByNodeIds([g,yn]);const{interpret:y,abort:k,undo:_}=Ou({context:n.context,analytics:{service:i,customProperties:(E=n.analytics)==null?void 0:E.customProperties},apiClient:t,logger:e,talentBankClient:r,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var T;return(T=M.current$.peek().flow)==null?void 0:T.data.applicationRecovery},setApplicationRecovery:M.setApplicationRecovery,persistWriteBarrier:()=>M.persistWriteBarrier(h),getSubmissions:()=>{var T;return(T=M.current$.peek().flow)==null?void 0:T.data.submissions},onInterpret:T=>M.setCurrentNodeId(T.id),onFlowEnd:async()=>{var L;M.markAsFinished();const T=M.current$.peek().flow;tt(T),i.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:T.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(L=n.analytics)==null?void 0:L.customProperties})}}),w=g,x=()=>{p(()=>_),y(w)},I=new AbortController;return h.offerResume?sf({chatService:s,t:l,signal:I.signal}).then(T=>(M.settleResume(h),T?x():(M.restart(),Ne.flushStateData()))).catch(T=>{T instanceof ot||e.error("Resume prompt failed",T)}):x(),()=>{I.abort(),ee.onInteractionFn$.value===v&&(ee.onInteractionFn$.value=()=>{}),k()}},[i,t,s,e,n,r,l]),c(ae,{children:[c("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[c("div",{ref:o,role:"region","aria-label":l("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:c(Jp,{lastSentMessageFooter:!wn(n)||!u?null:c(Xp,{undoFn:u})})}),ee.isReadingHistory$.value&&!n.data.isFinished&&!ee.isBotTyping$.value&&c("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:c(fi,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":l("jump_to_current"),onClick:()=>{var h,g;ee.scrollToEnd(),(g=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||g.focus({preventScroll:!0})},children:c(No,{})})})]}),c(Tp,{logger:e,analytics:i})]})},Xp=({undoFn:e})=>{const{t}=se();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(fi,{"aria-label":t("undo"),onClick:async()=>{const{flow:i}=M.current$.peek();tt(i),e(i.data.nodeHistory)},children:c("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"})})})},Qp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Zp},Symbol.toStringTag,{value:"Module"}))})();
9
+ `)}),u.hasHardConcerns&&e.data.alternativeLink&&await r.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await r.userInput({type:"submit",key:void 0,config:{label:Re(e.data.continueLabel,{submissions:i,context:l})}})}return n(e.nextId)}const Jo=(e,t,i)=>{var r;return e.log({event:i,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:(r=t.analytics)==null?void 0:r.customProperties})},yn="resume-prompt",lf=async({chatService:e,t,signal:i})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:yn,signal:i});const r=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:i});return D.removeMessagesSentByNodeIds([yn]),(r==null?void 0:r.value)!==!1},It=({class:e,...t})=>{const{t:i}=se();return c("button",{class:et("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:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:i("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var it;function Xi(e){return{lang:(e==null?void 0:e.lang)??(it==null?void 0:it.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(it==null?void 0:it.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(it==null?void 0:it.abortPipeEarly)}}var _n;function cf(e){return _n==null?void 0:_n.get(e)}var xn;function df(e){return xn==null?void 0:xn.get(e)}var kn;function uf(e,t){var i;return(i=kn==null?void 0:kn.get(e))==null?void 0:i.get(t)}function Ut(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function he(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Ut(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:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??uf(e.reference,l.lang)??(u?df(l.lang):null)??r.message??cf(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Ge(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Xi())}}}function ff(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function pf(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function hf(e){if(e.path){let t="";for(const i of e.path)if(typeof i.key=="string"||typeof i.key=="number")t?t+=`.${i.key}`:t+=i.key;else return null;return t}return null}var gf=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},bf=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Zo(e,t){return{kind:"validation",type:"check",reference:Zo,async:!1,expects:null,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement(i.value)&&he(this,"input",i,r),i}}}function Xo(e){return{kind:"validation",type:"email",reference:Xo,expects:null,async:!1,requirement:bf,message:e,"~run"(t,i){return t.typed&&!this.requirement.test(t.value)&&he(this,"email",t,i),t}}}function pi(e,t){return{kind:"validation",type:"max_length",reference:pi,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&he(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Qo(e,t){return{kind:"validation",type:"max_value",reference:Qo,async:!1,expects:`<=${e instanceof Date?e.toJSON():Ut(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value<=this.requirement)&&he(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():Ut(i.value)}),i}}}function Ht(e,t){return{kind:"validation",type:"min_length",reference:Ht,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&he(this,"length",i,r,{received:`${i.value.length}`}),i}}}function es(e,t){return{kind:"validation",type:"min_value",reference:es,async:!1,expects:`>=${e instanceof Date?e.toJSON():Ut(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value>=this.requirement)&&he(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():Ut(i.value)}),i}}}function Sn(e,t){return{kind:"validation",type:"regex",reference:Sn,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement.test(i.value)&&he(this,"format",i,r),i}}}function Cn(e){return{kind:"transformation",type:"transform",reference:Cn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function ts(e){return{kind:"validation",type:"url",reference:ts,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,i){return t.typed&&!this.requirement(t.value)&&he(this,"URL",t,i),t}}}function vf(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function is(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function rs(e,t){return{kind:"schema",type:"array",reference:rs,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(u):p.path=[u],(a=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else he(this,"type",i,r);return i}}}function ns(e){return{kind:"schema",type:"boolean",reference:ns,expects:"boolean",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:he(this,"type",t,i),t}}}function as(e){return{kind:"schema",type:"number",reference:as,expects:"number",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:he(this,"type",t,i),t}}}function rt(e,t){return{kind:"schema",type:"object",reference:rt,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:is(s),u=s["~run"]({value:l},r);if(u.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(p):d.path=[p],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=vf(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(he(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else he(this,"type",i,r);return i}}}function qt(e,t){return{kind:"schema",type:"optional",reference:qt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ge(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=is(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function os(e,t){return{kind:"schema",type:"picklist",reference:os,expects:pf(e.map(Ut),"|"),async:!1,options:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:he(this,"type",i,r),i}}}function ss(e,t,i){return{kind:"schema",type:"record",reference:ss,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Ge(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(ff(a,l)){const u=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}const d=this.value["~run"]({value:u},n);if(d.issues){const h={type:"object",origin:"value",input:a,key:l,value:u};for(const g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!d.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=d.value)}}else he(this,"type",r,n);return r}}}function Ce(e){return{kind:"schema",type:"string",reference:Ce,expects:"string",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:he(this,"type",t,i),t}}}function wf(e,t,i){const r=e["~run"]({value:t},Xi(i));if(r.issues)throw new gf(r.issues);return r.value}function mf(e,t){const i={};for(const r in e.entries)i[r]=!t||t.includes(r)?qt(e.entries[r]):e.entries[r];return{...e,entries:i,get"~standard"(){return Ge(this)}}}function gt(...e){return{...e[0],pipe:e,get"~standard"(){return Ge(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function yf(e,t,i){const r=e["~run"]({value:t},Xi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}async function _f(e,t,i){const r=await e["~run"]({value:t},Xi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}const Wt=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[c("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:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"break-words pr-1 text-sm",children:e.message})]}),bt=({class:e,...t})=>{const{t:i}=se();return c("button",{type:"button",class:et("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:[c("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:[c("title",{children:i("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),i("skip")]})};var $n={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"};const Kt=Ct("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}}),xf="https://api.mapbox.com/search/searchbox/v1/suggest",kf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Sf=e=>atob(e).split("").reverse().join(""),nt=rt({name:Ce()}),Cf=rt({suggestions:rs(rt({feature_type:qt(Ce()),full_address:qt(Ce()),place_formatted:qt(Ce()),name:qt(Ce()),mapbox_id:Ce(),context:mf(rt({address:nt,street:nt,neighborhood:nt,locality:nt,district:nt,place:nt,region:nt,postcode:nt,country:nt}))}))}),$f=({logger:e,t})=>lt(()=>{var r;const i=(r=D.current$.peek().flow)==null?void 0:r.data.flowSessionId;return i?{enabled:!0,getPredictions:async n=>{var d;const a=new URL(xf);a.searchParams.set("q",n),a.searchParams.set("session_token",i);const o=(d=D.current$.peek().flow)==null?void 0:d.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&a.searchParams.set("proximity",`${o.lng},${o.lat}`),a.searchParams.set("access_token",Sf(kf));const l=await fetch(a);if(!l.ok)return e.error("Failed to get address details",l),{ok:!1,error:t("address_error")};const u=yf(Cf,await l.json());if(u.success===!1)return e.error("Failed to parse address details",u.issues),{ok:!1,error:t("address_error")};const{suggestions:p}=u.output;return{ok:!0,data:p.map(h=>{var g,w,y,x,_,v,C,$,A;return{label:h.full_address??([h.name,h.place_formatted].filter(Boolean).join(", ")||h.mapbox_id),id:h.mapbox_id,address:{line1:((g=h.context.address)==null?void 0:g.name)??((w=h.context.street)==null?void 0:w.name),line2:void 0,line3:((y=h.context.neighborhood)==null?void 0:y.name)??((x=h.context.locality)==null?void 0:x.name),city:((_=h.context.place)==null?void 0:_.name)??((v=h.context.district)==null?void 0:v.name),state:(C=h.context.region)==null?void 0:C.name,postcode:(($=h.context.postcode)==null?void 0:$.name)??(h.feature_type==="postcode"?h.name:void 0),country:(A=h.context.country)==null?void 0:A.name}}})}}}:{enabled:!1}},[e,t]),ls=e=>{const{t}=se();return c("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:[c("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:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},Ef=({input:e,onSubmitSuccess:t,logger:i})=>{const{t:r}=se(),[n,a]=Oe(),{enabled:o,getPredictions:s}=$f({logger:i,t:r}),[l,u]=Oe(o?"query":"manual"),[p,d]=Oe(""),[h,g]=Oe(),w=be(),y=be(),x=v=>{var $;if(tt(o,"Query state should not be enabled"),v=v.trim(),v===(($=w.current)==null?void 0:$.query)||v===(h==null?void 0:h.query)&&h.status==="done")return;if(d(v),v===""){w.current=void 0,g(void 0);return}const C=w.current={query:v};g({query:v,status:"pending"}),s(v).then(A=>{w.current===C&&(w.current=void 0,g(A.ok?{query:v,status:"done",items:A.data}:{query:v,status:"failed",error:A.error}))},A=>{w.current===C&&(w.current=void 0,i.error("Failed to get address details",A),g({query:v,status:"failed",error:r("address_error")}))})},_=(v,C)=>{a($=>({...$,[v]:C}))};switch(l){case"query":return tt(o,"Query state should not be enabled"),c(If,{input:e,onSkip:()=>t(null),onAddressSelect:v=>{if(v===""){w.current&&(w.current=void 0,g(void 0)),u("manual");return}const C=(h==null?void 0:h.status)==="done"?h.items.find($=>$.id===v):void 0;C&&(y.current!==v&&a(C.address),y.current=v,u("details"))},onAddressSearch:x,lookup:h,query:p});case"details":return tt(n!==void 0),c(cs,{input:e,logger:i,onSubmitSuccess:t,addressFields:n,onFieldChange:_,actions:c(ls,{onClick:()=>{u("query")}})});case"manual":return c(cs,{logger:i,input:e,onSubmitSuccess:t,addressFields:n??{},onFieldChange:_,actions:o?c(ls,{onClick:()=>{u("query")}}):e.config.optional?c(bt,{onClick:()=>t(null)}):void 0})}},If=({input:e,onSkip:t,lookup:i,onAddressSelect:r,query:n,onAddressSearch:a})=>{const{t:o}=se(),s=be(null);return Se(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(ae,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const p=new FormData(l.currentTarget).get("address");typeof p=="string"&&a(p)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:n,class:Kt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("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:[c("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]})}),c("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&c(bt,{class:"relative",onClick:t})]}),(i==null?void 0:i.status)==="failed"?c(Wt,{error:{message:i.error}}):null,c("p",{role:"status",class:(i==null?void 0:i.status)==="pending"||(i==null?void 0:i.status)==="done"&&i.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(i==null?void 0:i.status)==="pending"?c(ae,{children:[c(Ji,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(i==null?void 0:i.status)==="done"&&i.items.length===0?o("address_no_results"):null}),c("ul",{children:[((i==null?void 0:i.status)==="done"?i.items:[]).map(l=>c("li",{children:c("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:()=>{r(l.id)},children:[c("span",{class:"flex-grow",children:l.label}),c("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:c("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),c("li",{children:c("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:()=>{r("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},En=["line1","line2","line3","city","state","postcode","country"],cs=({addressFields:e,onFieldChange:t,onSubmitSuccess:i,actions:r,input:n})=>{const a=be(null);Se(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys($n),{t:s}=se();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{l.preventDefault();const u=l.currentTarget,p=[...u.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of p){g.value="";const w=En.find(y=>n.config.keys[y]===g.name);w&&t(w,"")}if(p.length>0&&!u.checkValidity()){u.reportValidity();return}const d=new FormData(u),h=Object.fromEntries(d.entries());i({type:"address",value:h})},children:[c("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:En.map((l,u)=>{const p=`isdk_${l}`,d=n.config.keys[l];return d?c(ae,{children:[c("label",{for:p,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)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?c("div",{class:"relative",children:[c("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:p,defaultValue:e[l],onChange:h=>t(l,h.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?c("option",{value:e[l],children:e[l]}):c("option",{value:"",children:s("select_country")}),o.map(h=>c("option",{value:h,children:h},h))]}),c("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:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:u===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:p,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:l==="line2"?n.config.line2Required===!0:l!=="line3"}),u===En.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[r,c(It,{class:"ml-auto"})]})]})},In=()=>{const e=be(null);return Pi(()=>{var t;(t=e.current)==null||t.focus()},[]),e},ds=["true","false"],Af=os(ds),Tf="answer",us="flex items-center flex-wrap gap-2 p-2.5",fs="min-w-0 max-w-full flex-auto",ps=Rr(({label:e,...t},i)=>c("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:i,children:c("p",{class:"text-center text-base",children:e})})),Ff=({input:e,onSubmitSuccess:t})=>{const i=In();return c("form",{noValidate:!0,class:"",onSubmit:r=>{r.preventDefault();const n=Ld(r).value,a=wf(Af,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:us,children:ds.map((r,n)=>c("li",{class:fs,children:c(ps,{ref:n===0?i:null,type:"submit",name:Tf,value:r,label:e.config.labels[r]},r)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(bt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Df=e=>new Promise((t,i)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"||!r.result)return i(new Error("Invalid file"));t(r.result)},r.onerror=i,r.readAsDataURL(e)}),hs=e=>e.reduce((t,i)=>t+i.sizeKb,0),Mf=zt("file"),gs=3,Qi=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Lf=({file:e,class:t,...i})=>{const{t:r}=se(),[n,a]=Qi(e.name);return c("div",{class:et("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...i,children:[c("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"sr-only",children:[r("file_name"),": "]}),c("span",{class:"block truncate",children:n}),c("span",{children:a})]}),c("p",{class:"text-accent-11",children:[c("span",{class:"sr-only",children:[r("file_size"),": "]}),Lt(e.sizeKb)]})]})},bs=({class:e,...t})=>c("li",{class:et("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Nf=(e,t)=>{const[i,r]=Qi(e);return`${i.slice(0,t)}${r}`},vs=e=>({name:Nf(e.name,42),sizeKb:e.size/1e3}),Vf=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Of=(e,t,i)=>{const r=Qi(t.name)[1].toLowerCase(),n=[...i.map(o=>o.toLowerCase()),...Vf],a=r===""?"none":n.includes(r)?r:"other";return`chatbot-file-refused:${e}:${a}`},Pf=({input:e,onSubmitSuccess:t,analytics:i})=>{var x;const r=(x=D.current$.value.flow)==null?void 0:x.data.submissions[e.key],[n,a]=Oe(Mf(r)&&r.value.length?{status:"ready",files:r.value}:{status:"empty"}),o=be(0),s=n.status==="ready"?n.files:[],l=n.status==="ready"||n.status==="pending"?n.files:[],u=n.status==="error"?n.error:void 0,p=l.length-gs,d=hs(l),h=In(),{t:g}=se(),w=_=>{if(!_.length)return{reason:"required",error:{type:"required",message:g("validation_file")}};if(!Jn(_,e.config.extensions))return{reason:"type",file:_.find(v=>!Jn([v],e.config.extensions)),error:{type:"validate",message:g("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(_.some(v=>v.sizeKb===0))return{reason:"empty",file:_.find(v=>v.sizeKb===0),error:{type:"validate",message:g("validation_file_empty")}};if(e.config.fileSizeLimitKib&&hs(_)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:g("validation_file_size",{size:Lt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&_.length>1)return{reason:"count",error:{type:"invalid",message:g("validation_file_max",{count:1})}}},y=(_,v)=>{var C,$;return i.log({event:"INTERACTION",properties:{tag:Of(_,v,e.config.extensions)},customProperties:($=(C=D.current$.peek().flow)==null?void 0:C.analytics)==null?void 0:$.customProperties})};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:_=>{if(_.preventDefault(),n.status==="pending"||n.status==="error")return;const v=w(s);v?a({status:"error",error:v.error}):t({type:"file",value:s})},children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:h,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?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,gs).map(_=>{const[v,C]=Qi(_.name);return c(bs,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:C})]})}),p>0?c(bs,{children:g("file_more",{count:p})}):null]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("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:c("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"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:g("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-11 text-xs",children:["(",g("file_max_size",{size:Lt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:g("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(_=>c("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:_.replace(".","")}))})]})]}),c("p",{role:"status",class:et("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:n.status==="pending"?c(ae,{children:[c(Ji,{"aria-hidden":"true",class:"h-4 w-4"}),g("file_preparing",{count:l.length})]}):n.status==="ready"?c(ae,{children:[s.length>1?g("file_total_size",{size:Lt(d)}):Lt(d),c("span",{class:"sr-only",children:[". ",g("file_ready",{count:s.length})]})]}):null}),c("input",{id:"dropzone-file","aria-label":g("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async _=>{tt(_.target instanceof HTMLInputElement);const v=_.target.files?Array.from(_.target.files):[];_.target.value="";const[C]=v;if(!C)return;const $=++o.current,A=n.status==="ready",L=v.map(vs),B=w(L);if(B)return y(B.reason,B.file??C),a({status:"error",error:B.error});a({status:"pending",files:L});let N;try{const j=await Promise.all(v.map(async V=>{try{return{...vs(V),data:await Df(V)}}catch(J){throw N??(N=V),J}}));o.current===$&&a({status:"ready",files:j})}catch{if(o.current!==$)return;y("unreadable",N??C),a({status:"error",error:{type:"invalid",message:g(A?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(It,{disabled:s.length===0}),e.config.optional&&c(bt,{class:"relative",onClick:()=>t(null)})]})]}),c(Wt,{error:u})]})};var hi=e=>e.type==="checkbox",At=e=>e instanceof Date,$e=e=>e==null;const ws=e=>typeof e=="object";var le=e=>!$e(e)&&!Array.isArray(e)&&ws(e)&&!At(e),Rf=e=>le(e)&&e.target?hi(e.target)?e.target.checked:e.target.value:e,jf=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bf=(e,t)=>e.has(jf(t)),zf=e=>{const t=e.constructor&&e.constructor.prototype;return le(t)&&t.hasOwnProperty("isPrototypeOf")},An=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(An&&(e instanceof Blob||t))return e;const i=Array.isArray(e);if(!i&&!(le(e)&&zf(e)))return e;const r=i?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=ue(e[n]));return r}var er=e=>/^\w*$/.test(e),ie=e=>e===void 0,Tn=e=>Array.isArray(e)?e.filter(Boolean):[],Fn=e=>Tn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),I=(e,t,i)=>{if(!t||!le(e))return i;const r=(er(t)?[t]:Fn(t)).reduce((n,a)=>$e(n)?n:n[a],e);return ie(r)||r===e?ie(e[t])?i:e[t]:r},Ye=e=>typeof e=="boolean",je=e=>typeof e=="function",Y=(e,t,i)=>{let r=-1;const n=er(t)?[t]:Fn(t),a=n.length,o=a-1;for(;++r<a;){const s=n[r];let l=i;if(r!==o){const u=e[s];l=le(u)||Array.isArray(u)?u:isNaN(+n[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ms={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Be={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},at={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Uf=ve.createContext(null);Uf.displayName="HookFormControlContext";var Hf=(e,t,i,r=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Be.all&&(t._proxyFormState[o]=!r||Be.all),i&&(i[o]=!0),e[o]}});return n};const qf=typeof window<"u"?ve.useLayoutEffect:ve.useEffect;var Ie=e=>typeof e=="string",Wf=(e,t,i,r,n)=>Ie(e)?(r&&t.watch.add(e),I(i,e,n)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),I(i,a))):(r&&(t.watchAll=!0),i),Dn=e=>$e(e)||!ws(e);function vt(e,t,i=new WeakSet){if(Dn(e)||Dn(t))return Object.is(e,t);if(At(e)&&At(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(i.has(e)||i.has(t))return!0;i.add(e),i.add(t);for(const a of r){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(At(o)&&At(s)||le(o)&&le(s)||Array.isArray(o)&&Array.isArray(s)?!vt(o,s,i):!Object.is(o,s))return!1}}return!0}const Kf=ve.createContext(null);Kf.displayName="HookFormContext";var ys=(e,t,i,r,n)=>t?{...i[e],types:{...i[e]&&i[e].types?i[e].types:{},[r]:n||!0}}:{},gi=e=>Array.isArray(e)?e:[e],_s=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function xs(e,t){const i={};for(const r in e)if(e.hasOwnProperty(r)){const n=e[r],a=t[r];if(n&&le(n)&&a){const o=xs(n,a);le(o)&&(i[r]=o)}else e[r]&&(i[r]=a)}return i}var ye=e=>le(e)&&!Object.keys(e).length,Mn=e=>e.type==="file",tr=e=>{if(!An)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ks=e=>e.type==="select-multiple",Ln=e=>e.type==="radio",Gf=e=>Ln(e)||hi(e),Nn=e=>tr(e)&&e.isConnected;function Yf(e,t){const i=t.slice(0,-1).length;let r=0;for(;r<i;)e=ie(e)?r++:e[t[r++]];return e}function Jf(e){for(const t in e)if(e.hasOwnProperty(t)&&!ie(e[t]))return!1;return!0}function ce(e,t){const i=Array.isArray(t)?t:er(t)?[t]:Fn(t),r=i.length===1?e:Yf(e,i),n=i.length-1,a=i[n];return r&&delete r[a],n!==0&&(le(r)&&ye(r)||Array.isArray(r)&&Jf(r))&&ce(e,i.slice(0,-1)),e}var Zf=e=>{for(const t in e)if(je(e[t]))return!0;return!1};function Ss(e){return Array.isArray(e)||le(e)&&!Zf(e)}function Vn(e,t={}){for(const i in e){const r=e[i];Ss(r)?(t[i]=Array.isArray(r)?[]:{},Vn(r,t[i])):ie(r)||(t[i]=!0)}return t}function Gt(e,t,i){i||(i=Vn(t));for(const r in e){const n=e[r];if(Ss(n))ie(t)||Dn(i[r])?i[r]=Vn(n,Array.isArray(n)?[]:{}):Gt(n,$e(t)?{}:t[r],i[r]);else{const a=t[r];i[r]=!vt(n,a)}}return i}const Cs={value:!1,isValid:!1},$s={value:!0,isValid:!0};var Es=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.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===""?$s:{value:e[0].value,isValid:!0}:$s:Cs}return Cs},Is=(e,{valueAsNumber:t,valueAsDate:i,setValueAs:r})=>ie(e)?e:t?e===""?NaN:e&&+e:i&&Ie(e)?new Date(e):r?r(e):e;const As={isValid:!1,value:null};var Ts=e=>Array.isArray(e)?e.reduce((t,i)=>i&&i.checked&&!i.disabled?{isValid:!0,value:i.value}:t,As):As;function Fs(e){const t=e.ref;return Mn(t)?t.files:Ln(t)?Ts(e.refs).value:ks(t)?[...t.selectedOptions].map(({value:i})=>i):hi(t)?Es(e.refs).value:Is(ie(t.value)?e.ref.value:t.value,e)}var Xf=(e,t,i,r)=>{const n={};for(const a of e){const o=I(t,a);o&&Y(n,a,o._f)}return{criteriaMode:i,names:[...e],fields:n,shouldUseNativeValidation:r}},ir=e=>e instanceof RegExp,bi=e=>ie(e)?e:ir(e)?e.source:le(e)?ir(e.value)?e.value.source:e.value:e,Ds=e=>({isOnSubmit:!e||e===Be.onSubmit,isOnBlur:e===Be.onBlur,isOnChange:e===Be.onChange,isOnAll:e===Be.all,isOnTouch:e===Be.onTouched});const Ms="AsyncFunction";var Qf=e=>!!e&&!!e.validate&&!!(je(e.validate)&&e.validate.constructor.name===Ms||le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ms)),ep=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ls=(e,t,i)=>!i&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const vi=(e,t,i,r)=>{for(const n of i||Object.keys(e)){const a=I(e,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(vi(s,t))break}else if(le(s)&&vi(s,t))break}}};function Ns(e,t,i){const r=I(e,i);if(r||er(i))return{error:r,name:i};const n=i.split(".");for(;n.length;){const a=n.join("."),o=I(t,a),s=I(e,a);if(o&&!Array.isArray(o)&&i!==a)return{name:i};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};n.pop()}return{name:i}}var tp=(e,t,i,r)=>{i(e);const{name:n,...a}=e;return ye(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!r||Be.all))},ip=(e,t,i)=>!e||!t||e===t||gi(e).some(r=>r&&(i?r===t:r.startsWith(t)||t.startsWith(r))),rp=(e,t,i,r,n)=>n.isOnAll?!1:!i&&n.isOnTouch?!(t||e):(i?r.isOnBlur:n.isOnBlur)?!e:(i?r.isOnChange:n.isOnChange)?e:!0,np=(e,t)=>!Tn(I(e,t)).length&&ce(e,t),ap=(e,t,i)=>{const r=gi(I(e,i));return Y(r,"root",t[i]),Y(e,i,r),e};function Vs(e,t,i="validate"){if(Ie(e)||Array.isArray(e)&&e.every(Ie)||Ye(e)&&!e)return{type:i,message:Ie(e)?e:"",ref:t}}var Yt=e=>le(e)&&!ir(e)?e:{value:e,message:""},Os=async(e,t,i,r,n,a)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:p,min:d,max:h,pattern:g,validate:w,name:y,valueAsNumber:x,mount:_}=e._f,v=I(i,y);if(!_||t.has(y))return{};const C=s?s[0]:o,$=F=>{n&&C.reportValidity&&(C.setCustomValidity(Ye(F)?"":F||""),C.reportValidity())},A={},L=Ln(o),B=hi(o),N=L||B,j=(x||Mn(o))&&ie(o.value)&&ie(v)||tr(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,V=ys.bind(null,y,r,A),J=(F,P,O,z=at.maxLength,Z=at.minLength)=>{const X=F?P:O;A[y]={type:F?z:Z,message:X,ref:o,...V(F?z:Z,X)}};if(a?!Array.isArray(v)||!v.length:l&&(!N&&(j||$e(v))||Ye(v)&&!v||B&&!Es(s).isValid||L&&!Ts(s).isValid)){const{value:F,message:P}=Ie(l)?{value:!!l,message:l}:Yt(l);if(F&&(A[y]={type:at.required,message:P,ref:C,...V(at.required,P)},!r))return $(P),A}if(!j&&(!$e(d)||!$e(h))){let F,P;const O=Yt(h),z=Yt(d);if(!$e(v)&&!isNaN(v)){const Z=o.valueAsNumber||v&&+v;$e(O.value)||(F=Z>O.value),$e(z.value)||(P=Z<z.value)}else{const Z=o.valueAsDate||new Date(v),X=re=>new Date(new Date().toDateString()+" "+re),Le=o.type=="time",Ae=o.type=="week";Ie(O.value)&&v&&(F=Le?X(v)>X(O.value):Ae?v>O.value:Z>new Date(O.value)),Ie(z.value)&&v&&(P=Le?X(v)<X(z.value):Ae?v<z.value:Z<new Date(z.value))}if((F||P)&&(J(!!F,O.message,z.message,at.max,at.min),!r))return $(A[y].message),A}if((u||p)&&!j&&(Ie(v)||a&&Array.isArray(v))){const F=Yt(u),P=Yt(p),O=!$e(F.value)&&v.length>+F.value,z=!$e(P.value)&&v.length<+P.value;if((O||z)&&(J(O,F.message,P.message),!r))return $(A[y].message),A}if(g&&!j&&Ie(v)){const{value:F,message:P}=Yt(g);if(ir(F)&&!v.match(F)&&(A[y]={type:at.pattern,message:P,ref:o,...V(at.pattern,P)},!r))return $(P),A}if(w){if(je(w)){const F=await w(v,i),P=Vs(F,C);if(P&&(A[y]={...P,...V(at.validate,P.message)},!r))return $(P.message),A}else if(le(w)){let F={};for(const P in w){if(!ye(F)&&!r)break;const O=Vs(await w[P](v,i),C,P);O&&(F={...O,...V(P,O.message)},$(O.message),r&&(A[y]=F))}if(!ye(F)&&(A[y]={ref:C,...F},!r))return A}}return $(!0),A};const op={mode:Be.onSubmit,reValidateMode:Be.onChange,shouldFocusError:!0};function sp(e={}){let t={...op,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:je(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},n=le(t.defaultValues)||le(t.values)?ue(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ue(n),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,u=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...p};let h={...d};const g={array:_s(),state:_s()},w=t.criteriaMode===Be.all,y=f=>b=>{clearTimeout(u),u=setTimeout(f,b)},x=async f=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||f)){let b;t.resolver?(b=ye((await N()).errors),_()):b=await V(r,!0),b!==i.isValid&&g.state.next({isValid:b})}},_=(f,b)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((f||Array.from(s.mount)).forEach(m=>{m&&(b?Y(i.validatingFields,m,b):ce(i.validatingFields,m))}),g.state.next({validatingFields:i.validatingFields,isValidating:!ye(i.validatingFields)}))},v=(f,b=[],m,E,S=!0,k=!0)=>{if(E&&m&&!t.disabled){if(o.action=!0,k&&Array.isArray(I(r,f))){const M=m(I(r,f),E.argA,E.argB);S&&Y(r,f,M)}if(k&&Array.isArray(I(i.errors,f))){const M=m(I(i.errors,f),E.argA,E.argB);S&&Y(i.errors,f,M),np(i.errors,f)}if((d.touchedFields||h.touchedFields)&&k&&Array.isArray(I(i.touchedFields,f))){const M=m(I(i.touchedFields,f),E.argA,E.argB);S&&Y(i.touchedFields,f,M)}(d.dirtyFields||h.dirtyFields)&&(i.dirtyFields=Gt(n,a)),g.state.next({name:f,isDirty:F(f,b),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Y(a,f,b)},C=(f,b)=>{Y(i.errors,f,b),g.state.next({errors:i.errors})},$=f=>{i.errors=f,g.state.next({errors:i.errors,isValid:!1})},A=(f,b,m,E)=>{const S=I(r,f);if(S){const k=I(a,f,ie(m)?I(n,f):m);ie(k)||E&&E.defaultChecked||b?Y(a,f,b?k:Fs(S._f)):z(f,k),o.mount&&!o.action&&x()}},L=(f,b,m,E,S)=>{let k=!1,M=!1;const q={name:f};if(!t.disabled){if(!m||E){(d.isDirty||h.isDirty)&&(M=i.isDirty,i.isDirty=q.isDirty=F(),k=M!==q.isDirty);const W=vt(I(n,f),b);M=!!I(i.dirtyFields,f),W?ce(i.dirtyFields,f):Y(i.dirtyFields,f,!0),q.dirtyFields=i.dirtyFields,k=k||(d.dirtyFields||h.dirtyFields)&&M!==!W}if(m){const W=I(i.touchedFields,f);W||(Y(i.touchedFields,f,m),q.touchedFields=i.touchedFields,k=k||(d.touchedFields||h.touchedFields)&&W!==m)}k&&S&&g.state.next(q)}return k?q:{}},B=(f,b,m,E)=>{const S=I(i.errors,f),k=(d.isValid||h.isValid)&&Ye(b)&&i.isValid!==b;if(t.delayError&&m?(l=y(()=>C(f,m)),l(t.delayError)):(clearTimeout(u),l=null,m?Y(i.errors,f,m):ce(i.errors,f)),(m?!vt(S,m):S)||!ye(E)||k){const M={...E,...k&&Ye(b)?{isValid:b}:{},errors:i.errors,name:f};i={...i,...M},g.state.next(M)}},N=async f=>(_(f,!0),await t.resolver(a,t.context,Xf(f||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),j=async f=>{const{errors:b}=await N(f);if(_(f),f)for(const m of f){const E=I(b,m);E?Y(i.errors,m,E):ce(i.errors,m)}else i.errors=b;return b},V=async(f,b,m={valid:!0})=>{for(const E in f){const S=f[E];if(S){const{_f:k,...M}=S;if(k){const q=s.array.has(k.name),W=S._f&&Qf(S._f);W&&d.validatingFields&&_([k.name],!0);const _e=await Os(S,s.disabled,a,w,t.shouldUseNativeValidation&&!b,q);if(W&&d.validatingFields&&_([k.name]),_e[k.name]&&(m.valid=!1,b||e.shouldUseNativeValidation))break;!b&&(I(_e,k.name)?q?ap(i.errors,_e,k.name):Y(i.errors,k.name,_e[k.name]):ce(i.errors,k.name))}!ye(M)&&await V(M,b,m)}}return m.valid},J=()=>{for(const f of s.unMount){const b=I(r,f);b&&(b._f.refs?b._f.refs.every(m=>!Nn(m)):!Nn(b._f.ref))&&Jt(f)}s.unMount=new Set},F=(f,b)=>!t.disabled&&(f&&b&&Y(a,f,b),!vt(mi(),n)),P=(f,b,m)=>Wf(f,s,{...o.mount?a:ie(b)?n:Ie(f)?{[f]:b}:b},m,b),O=f=>Tn(I(o.mount?a:n,f,t.shouldUnregister?I(n,f,[]):[])),z=(f,b,m={})=>{const E=I(r,f);let S=b;if(E){const k=E._f;k&&(!k.disabled&&Y(a,f,Is(b,k)),S=tr(k.ref)&&$e(b)?"":b,ks(k.ref)?[...k.ref.options].forEach(M=>M.selected=S.includes(M.value)):k.refs?hi(k.ref)?k.refs.forEach(M=>{(!M.defaultChecked||!M.disabled)&&(Array.isArray(S)?M.checked=!!S.find(q=>q===M.value):M.checked=S===M.value||!!S)}):k.refs.forEach(M=>M.checked=M.value===S):Mn(k.ref)?k.ref.value="":(k.ref.value=S,k.ref.type||g.state.next({name:f,values:ue(a)})))}(m.shouldDirty||m.shouldTouch)&&L(f,S,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&re(f)},Z=(f,b,m)=>{for(const E in b){if(!b.hasOwnProperty(E))return;const S=b[E],k=f+"."+E,M=I(r,k);(s.array.has(f)||le(S)||M&&!M._f)&&!At(S)?Z(k,S,m):z(k,S,m)}},X=(f,b,m={})=>{const E=I(r,f),S=s.array.has(f),k=ue(b);Y(a,f,k),S?(g.array.next({name:f,values:ue(a)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&m.shouldDirty&&g.state.next({name:f,dirtyFields:Gt(n,a),isDirty:F(f,k)})):E&&!E._f&&!$e(k)?Z(f,k,m):z(f,k,m),Ls(f,s)?g.state.next({...i,name:f,values:ue(a)}):g.state.next({name:o.mount?f:void 0,values:ue(a)})},Le=async f=>{o.mount=!0;const b=f.target;let m=b.name,E=!0;const S=I(r,m),k=W=>{E=Number.isNaN(W)||At(W)&&isNaN(W.getTime())||vt(W,I(a,m,W))},M=Ds(t.mode),q=Ds(t.reValidateMode);if(S){let W,_e;const Mt=b.type?Fs(S._f):Rf(f),yt=f.type===ms.BLUR||f.type===ms.FOCUS_OUT,th=!ep(S._f)&&!t.resolver&&!I(i.errors,m)&&!S._f.deps||rp(yt,I(i.touchedFields,m),i.isSubmitted,q,M),Pn=Ls(m,s,yt);Y(a,m,Mt),yt?(!b||!b.readOnly)&&(S._f.onBlur&&S._f.onBlur(f),l&&l(0)):S._f.onChange&&S._f.onChange(f);const Rn=L(m,Mt,yt),ih=!ye(Rn)||Pn;if(!yt&&g.state.next({name:m,type:f.type,values:ue(a)}),th)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?yt&&x():yt||x()),ih&&g.state.next({name:m,...Pn?{}:Rn});if(!yt&&Pn&&g.state.next({...i}),t.resolver){const{errors:Ks}=await N([m]);if(_([m]),k(Mt),E){const rh=Ns(i.errors,r,m),Gs=Ns(Ks,r,rh.name||m);W=Gs.error,m=Gs.name,_e=ye(Ks)}}else _([m],!0),W=(await Os(S,s.disabled,a,w,t.shouldUseNativeValidation))[m],_([m]),k(Mt),E&&(W?_e=!1:(d.isValid||h.isValid)&&(_e=await V(r,!0)));E&&(S._f.deps&&(!Array.isArray(S._f.deps)||S._f.deps.length>0)&&re(S._f.deps),B(m,_e,W,Rn))}},Ae=(f,b)=>{if(I(i.errors,b)&&f.focus)return f.focus(),1},re=async(f,b={})=>{let m,E;const S=gi(f);if(t.resolver){const k=await j(ie(f)?f:S);m=ye(k),E=f?!S.some(M=>I(k,M)):m}else f?(E=(await Promise.all(S.map(async k=>{const M=I(r,k);return await V(M&&M._f?{[k]:M}:M)}))).every(Boolean),!(!E&&!i.isValid)&&x()):E=m=await V(r);return g.state.next({...!Ie(f)||(d.isValid||h.isValid)&&m!==i.isValid?{}:{name:f},...t.resolver||!f?{isValid:m}:{},errors:i.errors}),b.shouldFocus&&!E&&vi(r,Ae,f?S:s.mount),E},mi=(f,b)=>{let m={...o.mount?a:n};return b&&(m=xs(b.dirtyFields?i.dirtyFields:i.touchedFields,m)),ie(f)?m:Ie(f)?I(m,f):f.map(E=>I(m,E))},yi=(f,b)=>({invalid:!!I((b||i).errors,f),isDirty:!!I((b||i).dirtyFields,f),error:I((b||i).errors,f),isValidating:!!I(i.validatingFields,f),isTouched:!!I((b||i).touchedFields,f)}),H=f=>{const b=f?gi(f):void 0;b==null||b.forEach(m=>ce(i.errors,m)),b?b.forEach(m=>{g.state.next({name:m,errors:i.errors})}):g.state.next({errors:{}})},wt=(f,b,m)=>{const E=(I(r,f,{_f:{}})._f||{}).ref,S=I(i.errors,f)||{},{ref:k,message:M,type:q,...W}=S;Y(i.errors,f,{...W,...b,ref:E}),g.state.next({name:f,errors:i.errors,isValid:!1}),m&&m.shouldFocus&&E&&E.focus&&E.focus()},Tt=(f,b)=>je(f)?g.state.subscribe({next:m=>"values"in m&&f(P(void 0,b),m)}):P(f,b,!0),_i=f=>g.state.subscribe({next:b=>{ip(f.name,b.name,f.exact)&&tp(b,f.formState||d,lr,f.reRenderRoot)&&f.callback({values:{...a},...i,...b,defaultValues:n})}}).unsubscribe,Ft=f=>(o.mount=!0,h={...h,...f.formState},_i({...f,formState:{...p,...f.formState}})),Jt=(f,b={})=>{for(const m of f?gi(f):s.mount)s.mount.delete(m),s.array.delete(m),b.keepValue||(ce(r,m),ce(a,m)),!b.keepError&&ce(i.errors,m),!b.keepDirty&&ce(i.dirtyFields,m),!b.keepTouched&&ce(i.touchedFields,m),!b.keepIsValidating&&ce(i.validatingFields,m),!t.shouldUnregister&&!b.keepDefaultValue&&ce(n,m);g.state.next({values:ue(a)}),g.state.next({...i,...b.keepDirty?{isDirty:F()}:{}}),!b.keepIsValid&&x()},xi=({disabled:f,name:b})=>{if(Ye(f)&&o.mount||f||s.disabled.has(b)){const S=s.disabled.has(b)!==!!f;f?s.disabled.add(b):s.disabled.delete(b),S&&o.mount&&!o.action&&x()}},Dt=(f,b={})=>{let m=I(r,f);const E=Ye(b.disabled)||Ye(t.disabled);return Y(r,f,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:f}},name:f,mount:!0,...b}}),s.mount.add(f),m?xi({disabled:Ye(b.disabled)?b.disabled:t.disabled,name:f}):A(f,!0,b.value),{...E?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:bi(b.min),max:bi(b.max),minLength:bi(b.minLength),maxLength:bi(b.maxLength),pattern:bi(b.pattern)}:{},name:f,onChange:Le,onBlur:Le,ref:S=>{if(S){Dt(f,b),m=I(r,f);const k=ie(S.value)&&S.querySelectorAll&&S.querySelectorAll("input,select,textarea")[0]||S,M=Gf(k),q=m._f.refs||[];if(M?q.find(W=>W===k):k===m._f.ref)return;Y(r,f,{_f:{...m._f,...M?{refs:[...q.filter(Nn),k,...Array.isArray(I(n,f))?[{}]:[]],ref:{type:k.type,name:f}}:{ref:k}}}),A(f,!1,void 0,k)}else m=I(r,f,{}),m._f&&(m._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!(Bf(s.array,f)&&o.action)&&s.unMount.add(f)}}},mt=()=>t.shouldFocusError&&vi(r,Ae,s.mount),Zt=f=>{Ye(f)&&(g.state.next({disabled:f}),vi(r,(b,m)=>{const E=I(r,m);E&&(b.disabled=E._f.disabled||f,Array.isArray(E._f.refs)&&E._f.refs.forEach(S=>{S.disabled=E._f.disabled||f}))},0,!1))},ki=(f,b)=>async m=>{let E;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let S=ue(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:k,values:M}=await N();_(),i.errors=k,S=ue(M)}else await V(r);if(s.disabled.size)for(const k of s.disabled)ce(S,k);if(ce(i.errors,"root"),ye(i.errors)){g.state.next({errors:{}});try{await f(S,m)}catch(k){E=k}}else b&&await b({...i.errors},m),mt(),setTimeout(mt);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ye(i.errors)&&!E,submitCount:i.submitCount+1,errors:i.errors}),E)throw E},or=(f,b={})=>{I(r,f)&&(ie(b.defaultValue)?X(f,ue(I(n,f))):(X(f,b.defaultValue),Y(n,f,ue(b.defaultValue))),b.keepTouched||ce(i.touchedFields,f),b.keepDirty||(ce(i.dirtyFields,f),i.isDirty=b.defaultValue?F(f,ue(I(n,f))):F()),b.keepError||(ce(i.errors,f),d.isValid&&x()),g.state.next({...i}))},Si=(f,b={})=>{const m=f?ue(f):n,E=ue(m),S=ye(f),k=S?n:E;if(b.keepDefaultValues||(n=m),!b.keepValues){if(b.keepDirtyValues){const M=new Set([...s.mount,...Object.keys(Gt(n,a))]);for(const q of Array.from(M)){const W=I(i.dirtyFields,q),_e=I(a,q),Mt=I(k,q);W&&!ie(_e)?Y(k,q,_e):!W&&!ie(Mt)&&X(q,Mt)}}else{if(An&&ie(f))for(const M of s.mount){const q=I(r,M);if(q&&q._f){const W=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(tr(W)){const _e=W.closest("form");if(_e){_e.reset();break}}}}if(b.keepFieldsRef)for(const M of s.mount)X(M,I(k,M));else r={}}a=t.shouldUnregister?b.keepDefaultValues?ue(n):{}:ue(k),g.array.next({values:{...k}}),g.state.next({values:{...k}})}s={mount:b.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!b.keepIsValid||!!b.keepDirtyValues||!t.shouldUnregister&&!ye(k),o.watch=!!t.shouldUnregister,o.keepIsValid=!!b.keepIsValid,o.action=!1,b.keepErrors||(i.errors={}),g.state.next({submitCount:b.keepSubmitCount?i.submitCount:0,isDirty:S?!1:b.keepDirty?i.isDirty:!!(b.keepDefaultValues&&!vt(f,n)),isSubmitted:b.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:S?{}:b.keepDirtyValues?b.keepDefaultValues&&a?Gt(n,a):i.dirtyFields:b.keepDefaultValues&&f?Gt(n,f):b.keepDirty?i.dirtyFields:{},touchedFields:b.keepTouched?i.touchedFields:{},errors:b.keepErrors?i.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Ci=(f,b)=>Si(je(f)?f(a):f,{...t.resetOptions,...b}),sr=(f,b={})=>{const m=I(r,f),E=m&&m._f;if(E){const S=E.refs?E.refs[0]:E.ref;S.focus&&setTimeout(()=>{S.focus(),b.shouldSelect&&je(S.select)&&S.select()})}},lr=f=>{i={...i,...f}},$i={control:{register:Dt,unregister:Jt,getFieldState:yi,handleSubmit:ki,setError:wt,_subscribe:_i,_runSchema:N,_updateIsValidating:_,_focusError:mt,_getWatch:P,_getDirty:F,_setValid:x,_setFieldArray:v,_setDisabledField:xi,_setErrors:$,_getFieldArray:O,_reset:Si,_resetDefaultValues:()=>je(t.defaultValues)&&t.defaultValues().then(f=>{Ci(f,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:J,_disableForm:Zt,_subjects:g,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(f){o=f},get _defaultValues(){return n},get _names(){return s},set _names(f){s=f},get _formState(){return i},get _options(){return t},set _options(f){t={...t,...f}}},subscribe:Ft,trigger:re,register:Dt,handleSubmit:ki,watch:Tt,setValue:X,getValues:mi,reset:Ci,resetField:or,clearErrors:H,unregister:Jt,setError:wt,setFocus:sr,getFieldState:yi};return{...$i,formControl:$i}}function rr(e={}){const t=ve.useRef(void 0),i=ve.useRef(void 0),[r,n]=ve.useState({isDirty:!1,isValidating:!1,isLoading:je(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:je(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!je(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=sp(e);t.current={...s,formState:r}}const a=t.current.control;return a._options=e,qf(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),ve.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),ve.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),ve.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),ve.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),ve.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==r.isDirty&&a._subjects.state.next({isDirty:o})}},[a,r.isDirty]),ve.useEffect(()=>{var o;e.values&&!vt(e.values,i.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),i.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),ve.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=ve.useMemo(()=>Hf(r,a),[a,r]),t.current}const Ps=(e,t,i)=>{if(e&&"reportValidity"in e){const r=I(i,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},lp=(e,t)=>{for(const i in t.fields){const r=t.fields[i];r&&r.ref&&"reportValidity"in r.ref?Ps(r.ref,i,e):r.refs&&r.refs.forEach(n=>Ps(n,i,e))}},cp=(e,t)=>{t.shouldUseNativeValidation&&lp(e,t);const i={};for(const r in e){const n=I(t.fields,r),a=Object.assign(e[r]||{},{ref:n&&n.ref});if(dp(t.names||Object.keys(e),r)){const o=Object.assign({},I(i,r));Y(o,"root",a),Y(i,r,o)}else Y(i,r,a)}return i},dp=(e,t)=>e.some(i=>i.startsWith(t+"."));var nr=function(e,t,i){return i===void 0&&(i={}),function(r,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(_f(e,r,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var u=s.issues[0],p=hf(u);if(p&&(l[p]||(l[p]={message:u.message,type:u.type}),o)){var d=l[p].types,h=d&&d[u.type];l[p]=ys(p,o,l,u.type,h?[].concat(h,u.message):u.message)}s.issues.shift()}return{values:{},errors:cp(l,a)}}return{values:i.raw?r:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Rs=27,js=12,Bs=10,up=zt("enum"),fp=(e,t)=>{const i={min:e.minSelected??0,max:e.maxSelected??e.options.length};return nr(rt({checked:gt(ss(Ce(),ns()),Cn(r=>Object.entries(r).filter(([n,a])=>a).map(([n,a])=>n)),pi(i.max,t("validation_multiple_choice_max",{count:i.max})),Ht(i.min,t("validation_multiple_choice_min",{count:i.min})))}))},pp=Rr(({option:e,...t},i)=>c(ae,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:i}),c("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})]})),zs=Ct("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:us}}}),hp=({input:e,onSubmitSuccess:t})=>{var p,d;const i=e.key?(p=D.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,r=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=r&&e.config.options.length===2,{t:a}=se(),{register:o,handleSubmit:s,formState:{errors:l}}=rr({defaultValues:{checked:r?{}:up(i)?Object.fromEntries(i.value.map(h=>[h,!0])):{}},resolver:fp(e.config,a)}),u=In();return n?c("ul",{style:{maxHeight:6.5*Rs+5*js+2*Bs},class:zs({variant:"booleanLike"}),children:e.config.options.map((h,g)=>c("li",{class:fs,children:c(ps,{type:"submit",ref:w=>{w&&g===0&&(u.current=w)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}):c("form",{noValidate:!0,onSubmit:h=>s(g=>{const w=g.checked;t({type:"enum",value:w})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Rs+5*js+2*Bs},class:zs({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,g)=>{const w=`checked.${h.value}`,{ref:y,...x}=o(w);return c("li",{class:"relative",children:c(pp,{option:h,autoFocus:g===0,ref:_=>{_&&g===0&&(u.current=_),y(_)},id:w,...x,onClick:r?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[r?null:c(It,{}),e.config.minSelected===0&&c(bt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(Wt,{error:(d=l.checked)==null?void 0:d.root})})]})},gp=zt("number"),bp=(e,t)=>{const i=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return nr(rt({number:gt(as(t("validation_number")),es(i,t("validation_number_min",{min:i})),Qo(r,t("validation_number_max",{max:r})),Zo(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},vp=({input:e,onSubmitSuccess:t})=>{var d;const i=e.config.defaultValue,r=e.key?(d=D.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:n}=se(),{register:a,handleSubmit:o,formState:{errors:s}}=rr({defaultValues:{number:gp(r)?r.value:i?Number(i):void 0},resolver:bp(e.config,n)}),{ref:l,...u}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=be();return Se(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...u,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(p.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:Kt({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&&c(bt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(It,{})]}),c(Wt,{error:s.number})]})},wp=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries($n).find(n=>e.startsWith(n[1])),i=t?t[1]:"",r=e.replace(i,"");return/^\d+$/.test(r)?{countryCode:i,phoneNumber:r}:{countryCode:"",phoneNumber:""}},mp="44",yp=/^[0-9 ]+$/,_p=zt("string"),xp=zt("phone"),kp=e=>{const t=gt(Ce(e("validation_country_code")),Sn(yp,e("validation_country_code"))),i=gt(Ce(e("validation_phone")),Ht(1,e("validation_phone")),Cn(r=>r.replace(/[^0-9]/g,"")));return nr(rt({countryCode:t,phoneNumber:i}))},Sp=({input:e,onSubmitSuccess:t})=>{var y;const i=e.key?(y=D.current$.value.flow)==null?void 0:y.data.submissions[e.key]:void 0,{t:r}=se(),[n,a]=Oe(),o=_p(i)?wp(i.value):xp(i)?i.value:void 0,{register:s,handleSubmit:l,formState:{errors:u},watch:p}=rr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??mp,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:kp(r)}),{ref:d,...h}=s("phoneNumber",{required:!e.config.optional}),g=be(),w=p("countryCode");return Se(()=>{g.current&&(g.current.focus(),g.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(x=>{const _=x.phoneNumber.replace(/[^0-9]/g,""),v=x.countryCode.replace(/[^0-9]/g,"");a(void 0);const C=e.config.minChars??7,$=_.length+v.length;if($<C)return a(r("validation_phone_min_chars",{count:C}));const A=e.config.maxChars;if(A!=null&&$>A)return a(r("validation_max_chars",{count:A}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:v,phoneNumber:_}}):t({type:"string",value:w+x.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("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:[c("span",{children:["+",w]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries($n).map(([x,_])=>c("option",{value:_,children:[x," (+",_,")"]},x))})]}),c("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(g.current=x),d(x)},class:Kt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(bt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(It,{})]}),c(Wt,{error:u.countryCode||u.phoneNumber||{message:n}})]})},ar=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Us=(e,t,i,r)=>i!==void 0&&r*1e3>wr?e("submission_available_at",{time:ia(i,t)}):e("submission_cooldown",{count:r}),Cp=({input:e,onSubmitSuccess:t})=>{const{t:i,locale:r}=se(),{availableAt:n}=e.config,[a,o]=Oe(()=>ar(n)),[s,l]=Oe("");Pi(()=>{const p=ar(n);if(o(p),p===0)return;l(Us(i,r,n,p));const d=setInterval(()=>{const h=ar(n);o(h),!(h>0)&&(clearInterval(d),l(i("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[n,r,i]);const u=a>0;return c("div",{class:"flex flex-col items-center gap-2 py-3",children:[c("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":u,"aria-describedby":u?"submit-cooldown":void 0,onClick:()=>{ar(n)>0||t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("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:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})}),u&&c("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Us(i,r,n,a)}),c("p",{role:"status",class:"sr-only",children:s})]})},$p=160,Hs=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,$p)}px`},Ep={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Ip=zt("string"),Ap=(e,t)=>{const i={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return nr(rt({text:{date:gt(Ce(t("validation_date")),Sn(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:gt(Ce(t("validation_email")),Xo(t("validation_email")),Ht(e.minChars??1,i.minLength),pi(e.maxChars??1/0,i.maxLength)),text:gt(Ce(),Ht(e.minChars??1,i.minLength),pi(e.maxChars??1/0,i.maxLength)),url:gt(Ce(t("validation_url")),ts(t("validation_url")),Ht(e.minChars??1,i.minLength),pi(e.maxChars??1/0,i.maxLength))}[e.format]}))},Tp={text:({input:e,onSubmitSuccess:t})=>{var y;const{t:i}=se(),r=e.key?(y=D.current$.value.flow)==null?void 0:y.data.submissions[e.key]:void 0,n=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:u}}=rr({defaultValues:{text:Ip(r)?r.value:n??""},resolver:Ap(e.config,i)}),{ref:p,...d}=o("text",{required:!e.config.optional}),h=be();Se(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&Hs(h.current),h.current.focus(),h.current.select())},[]);const g=e.config.maxChars,w=a&&g!==void 0?l("text").length:void 0;return c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(x=>{t({type:"string",value:x.text})}),children:[c("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[a?c("textarea",{id:"chat-input",...d,rows:2,maxLength:g,autoFocus:!0,"aria-describedby":w!==void 0?"chat-input-count":void 0,onInput:x=>Hs(x.currentTarget),onKeyDown:x=>{var _;x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&(x.preventDefault(),(_=x.currentTarget.form)==null||_.requestSubmit())},ref:x=>{x&&(h.current=x),p(x)},placeholder:e.config.placeholder,class:Kt({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):c("input",{id:"chat-input",...d,...Ep[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:x=>{x&&(h.current=x),p(x)},placeholder:e.config.placeholder,class:Kt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(bt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(It,{})]}),w!==void 0&&g!==void 0&&c("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[w,"/",g]}),c(Wt,{error:u.text})]})},phone:Sp,"multiple-choice":hp,boolean:Ff,file:Pf,submit:Cp,address:Ef,number:vp},Fp=({logger:e,analytics:t})=>{var a;const i=(a=D.current$.value.flow)==null?void 0:a.data.currentInput,r=be(null),n=()=>te.onInteractionFn$.value();return Se(()=>{var o;(o=r.current)==null||o.scrollTo({top:0})},[i]),c("div",{ref:r,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:c("div",{class:"flex flex-col",onPointerDownCapture:i?n:void 0,onKeyDownCapture:i?n:void 0,children:i?(()=>{const o=Tp[i.type];return c(o,{logger:e,analytics:t,onSubmitSuccess:te.onSubmitSuccessFn$.value,input:i})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Kt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(It,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Dp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mp=function(e){return e instanceof RegExp},Lp=function(t){var i=/[\\^$.*+?()[\]{}|]/g,r=RegExp(i.source);return t&&r.test(t)?t.replace(i,"\\$&"):t},qs=function(e){return typeof e=="string"},Np=function(e){var t=[];return e.forEach(function(i){Array.isArray(i)?t=t.concat(i):t.push(i)}),t};function Vp(e,t,i){var r=0,n=0;if(e==="")return e;if(!e||!qs(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Mp(a)||(a=new RegExp("("+Lp(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}n=o[s].length,r+=o[s-1].length,o[s]=i(o[s],s,r),r+=n}return o}var Op=function(t,i,r){return Array.isArray(t)||(t=[t]),Np(t.map(function(n){return qs(n)?Vp(n,i,r):n}))};const wi=Dp(Op),Pp=/(\[[^\]]+\]\([^)]+\))/g,Rp=/\[([^\]]+)\]\(([^)]+)\)/,jp=/(https?:\/\/[^\s]+)/g,Bp=/_(.*?)_/g,zp=/\*\*(.*?)\*\*/g,Up=/(\\n|\n)/g,Ws="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Hp=e=>{const t=wi(e,Pp,(s,l)=>{const[,u,p]=s.match(Rp)??[];return p?c("a",{class:Ws,href:p,children:u??p},p+l):c("span",{children:"INVALID LINK"})}),i=wi(t,jp,(s,l)=>c("a",{class:Ws,href:s,children:s},s+l)),r=wi(i,Bp,(s,l)=>c("em",{children:s},s+l)),n=wi(r,zp,(s,l)=>c("strong",{children:s},s+l));let a=0;return wi(n,Up,()=>c("br",{},`br-${a++}`))},qp=Ct("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"}}),Wp=({children:e,className:t,animate:i,side:r,...n})=>c("p",{style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:qp({className:t,side:r,animate:i}),...n,children:e}),Kp=({message:e})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("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,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("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"})})]})}),Gp=({className:e,...t})=>c("div",{"aria-hidden":!0,children:te.isBotTyping$.value===!0?c("div",{"data-testid":"typing-indicator",class:et("flex gap-1 p-4",e),...t,children:Array.from({length:3},(i,r)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}):void 0}),Yp={bot:"left",user:"right"},Jp=Ct("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"}}}),Zp=({lastSentMessageFooter:e})=>{const{t}=se(),i=D.current$.value.flow,r=(i==null?void 0:i.data.messages)??[],n=i?wn(i):void 0;return c("ol",{"aria-label":t("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[r.map((a,o)=>c(ae,{children:c("li",{class:"flex",tabIndex:o===r.length-1?-1:void 0,children:[n&&a.groupId===n&&!r.slice(o+1).some(s=>s.groupId===n)?e:null,zi(a).with({type:"system"},s=>c("p",{class:Jp({variant:s.variant}),children:s.text})).with({type:"text",author:si.union("bot","user")},s=>{const l=o===r.length-1,u=s.author==="bot"?Hp(s.text):s.text;return c(ae,{children:c(Wp,{animate:l,side:Yp[s.author],children:u},o)})}).with({type:"link"},s=>c(Kp,{message:s})).with({type:"image"},s=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:s.url,style:{aspectRatio:s.width/s.height}})).with({type:"file"},s=>c(Lf,{class:s.author==="bot"?void 0:"ml-auto",file:{name:s.fileName,sizeKb:s.fileSizeKb}})).with({type:"loading"},s=>{const l=r[r.length-1];return!(s===l)||te.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[c(Ji,{"aria-hidden":s.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),s.text?c("p",{role:"status",class:"text-neutral-11 text-sm",children:s.text}):null]})}).exhaustive()]})},o)),c("li",{class:te.captchaVisible$.value?"flex":"hidden",children:c("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":t("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),c(Gp,{},"typing")]})},Xp=({logger:e,apiClient:t,analytics:i,talentBankClient:r})=>{const{flow:n}=D.current$.value;tt(n,"Flow is required to exist to show chatbot body");const a=D.viewState$.value,{chatRef:o,chatService:s}=Zd(),{t:l}=se(),[u,p]=Oe();return Se(()=>{a==="maximised"&&te.scrollToEnd()},[a]),Se(()=>{var A;const{state:d,flow:h}=D.current$.peek();if(d!=="loaded")throw new Error(l("invalid_state"));let g=h.data.nodeHistory.at(-1);if(te.scrollToEnd(),D.setInput(void 0),h.data.isFinished)return;const w=()=>{const L=D.current$.peek().flow;!L||L.data.hasInteracted||(D.markAsInteracted(),Jo(i,L,"FLOW_INTERACT"))};te.onInteractionFn$.value=w,g===void 0?(g=qo(n.nodes).id,D.setCurrentNodeId(g),Jo(i,h,"FLOW_START")):D.removeMessagesSentByNodeIds([g,yn]);const{interpret:y,abort:x,undo:_}=Vu({context:n.context,analytics:{service:i,customProperties:(A=n.analytics)==null?void 0:A.customProperties},apiClient:t,logger:e,talentBankClient:r,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var L;return(L=D.current$.peek().flow)==null?void 0:L.data.applicationRecovery},setApplicationRecovery:D.setApplicationRecovery,persistWriteBarrier:()=>D.persistWriteBarrier(h),getSubmissions:()=>{var L;return(L=D.current$.peek().flow)==null?void 0:L.data.submissions},onInterpret:L=>D.setCurrentNodeId(L.id),onFlowEnd:async()=>{var B;D.markAsFinished();const L=D.current$.peek().flow;tt(L),i.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:L.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(B=n.analytics)==null?void 0:B.customProperties})}}),v=g,C=()=>{p(()=>_),y(v)},$=new AbortController;return h.offerResume?lf({chatService:s,t:l,signal:$.signal}).then(L=>(D.settleResume(h),L?C():(D.restart(),Me.flushStateData()))).catch(L=>{L instanceof ot||e.error("Resume prompt failed",L)}):C(),()=>{$.abort(),te.onInteractionFn$.value===w&&(te.onInteractionFn$.value=()=>{}),x()}},[i,t,s,e,n,r,l]),c(ae,{children:[c("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[c("div",{ref:o,role:"region","aria-label":l("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:c(Zp,{lastSentMessageFooter:!wn(n)||!u?null:c(Qp,{undoFn:u})})}),te.isReadingHistory$.value&&!n.data.isFinished&&!te.isBotTyping$.value&&c("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:c(ui,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":l("jump_to_current"),onClick:()=>{var h,g;te.scrollToEnd(),(g=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||g.focus({preventScroll:!0})},children:c(Lo,{})})})]}),c(Fp,{logger:e,analytics:i})]})},Qp=({undoFn:e})=>{const{t}=se();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(ui,{"aria-label":t("undo"),onClick:async()=>{const{flow:i}=D.current$.peek();tt(i),e(i.data.nodeHistory)},children:c("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"})})})},eh=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Xp},Symbol.toStringTag,{value:"Module"}))})();