@inploi/plugin-chatbot 14.0.0 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-7aaddd89.cjs"),Gt=require("@inploi/sdk"),vt=(e,r,t)=>{var s;return e.log({event:t,properties:{flow_id:r.id,flow_version:r.version,flow_session_id:r.data.flowSessionId,flow_build:r.build,flow_type:"CHATBOT_DRAWER",job:r.job},customProperties:(s=r.analytics)==null?void 0:s.customProperties})};var xt=({condition:e,context:r,submissions:t,ifBlock:s})=>{let[i,...a]=e.compareKey.split(".");if(!i)return!1;let o=n.D({context:r,key:i,path:a,submissions:t});if(!o)return!1;switch(o.type){case"address":{let l=n.S(o.value,a);switch(e.compare){case"equals":return l===e.compareValue;case"contains":return typeof l!="string"?!1:l.includes(e.compareValue);case"notEquals":return l!==e.compareValue;case"notContains":return typeof l!="string"?!0:!l.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let l=n.S(o.value,a),d={...s,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof l){case"boolean":return Fe(d,{submissions:{_temp:{value:l,type:"boolean"}},context:r});case"string":return Fe(d,{submissions:{_temp:{value:l,type:"string"}},context:r});case"number":return Fe(d,{submissions:{_temp:{value:l,type:"number"}},context:r});case"object":return Array.isArray(l)&&l.every(p=>typeof p=="string")?Fe(d,{submissions:{_temp:{value:l,type:"enum"}},context:r}):!1}break}case"boolean":{let l=e.compareValue==="true";switch(e.compare){case"equals":return o.value===l;case"notEquals":return o.value!==l}break}case"phone":case"string":{let l=o.type==="phone"?n.B(o.value):o.value;switch(e.compare){case"equals":return l===e.compareValue;case"contains":return l?l.includes(e.compareValue):!1;case"notEquals":return l!==e.compareValue;case"notContains":return l?!l.includes(e.compareValue):!0}break}case"number":{try{let l=Number(e.compareValue);switch(e.compare){case"equals":return o.value===l;case"notEquals":return o.value!==l;case"greaterThan":return o.value>l;case"greaterThanOrEqualTo":return o.value>=l;case"lessThan":return o.value<l;case"lessThanOrEqualTo":return o.value<=l}}catch{return console.error(`Failed to parse number in if-block ${s.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}},Fe=(e,{context:r,submissions:t})=>{let s="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let i of s)if(xt({condition:i,context:r,submissions:t,ifBlock:e}))return!0;return!1}else{for(let i of s)if(!xt({condition:i,context:r,submissions:t,ifBlock:e}))return!1;return!0}},Ar=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Er=(e,{context:r,submissions:t})=>e.replace(Ar,(s,i,a="")=>{let[o,...l]=i.trim().split("."),d=n.D({key:o,path:l,submissions:t,context:r});if(!d)return a;switch(d.type){case"boolean":return d.value===!0?"true":"false";case"file":return d.value.map(p=>`${p.name} (${n.V(p.sizeKb)})`).join(", ");case"enum":return d.value.join(", ");case"address":return Object.values(d.value).filter(p=>p&&p.trim().length>0).join(", ");case"number":case"string":return d.value?d.value.toString():a;case"phone":return n.B(d.value);case"integration":{if(typeof d.value!="object"||Array.isArray(d.value))break;let p=n.S(d.value,l);switch(typeof p){case"boolean":return p===!0?"true":"false";case"string":return p;case"number":return p.toString();case"object":if(Array.isArray(p)&&p.every(g=>typeof g=="string"))return p.join(", ")}break}}return a});const Wt=({context:e,submissions:r})=>({context:e,submissions:r??{}}),ie=(e,r)=>Er(e,Wt(r)),Mr=(e,r)=>Fe(e,Wt(r)),Ht=({node:e,nodes:r,stopWhen:t})=>{if((t==null?void 0:t(e))===!0)return e;const s=e.nextId?r.find(i=>i.id===e.nextId):void 0;if(s)return Ht({node:s,nodes:r,stopWhen:t})},Nr=({childNode:e,nodes:r})=>{const s=r.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const a=r.find(l=>l.id===i.branchId);if(!a)return!1;const o=Ht({node:a,nodes:r,stopWhen:l=>l.id===e.id});return!(!o||o.id!==e.id)});if(s!=null&&s.nextId)return r.find(i=>i.id===s.nextId)},Lr=({flow:e,analytics:r,logger:t,talentBankClient:s,context:i,apiClient:a,getSubmissions:o,getApplicationRecovery:l,setApplicationRecovery:d,chatService:p,onFlowEnd:g,onInterpret:x,t:h})=>{let y=new AbortController;const F={...r.service,log:w=>r.service.log({...w,customProperties:{...w.customProperties,...r.customProperties}})},I=async(w,A)=>{if(y.signal.aborted)return;const v=o(),C=l(),E=(C==null?void 0:C.submitNodeId)===w.id?e.nodes.find(S=>{var M;return S.id===C.fileQuestionNodeId&&S.type==="question-file"&&((M=v==null?void 0:v[S.data.key])==null?void 0:M.type)!=="file"}):void 0;if(E)return I(E,A);x==null||x(w,A);try{await Tr({flow:e,analytics:F,logger:t,talentBankClient:s,apiClient:a,context:i,node:w,submissions:v,applicationRecovery:C,setApplicationRecovery:async S=>{if(!y.signal.aborted)try{await d(S)}catch(M){t.error("Failed to persist application recovery",M)}},forceSubmitConfirmation:(C==null?void 0:C.submitNodeId)===w.id,t:h,chat:{sendMessage:async S=>p.send({groupId:w.id,message:S,signal:y.signal}),userInput:async S=>p.input({input:S,signal:y.signal}),setSubmission:(S,M)=>{y.signal.aborted||p.setSubmission(S,M)}},next:S=>{const M=(C==null?void 0:C.fileQuestionNodeId)===w.id?C.submitNodeId:S,Y=M?e.nodes.find(B=>B.id===M):Nr({childNode:w,nodes:e.nodes});return Y?I(Y,w):g==null?void 0:g(w)},end:()=>g==null?void 0:g(w)})}catch(S){if(S instanceof n.AbortedError)return;throw S}};return{interpret:async w=>{const A=e.nodes.find(v=>v.id===w)??n.getHeadOrThrow(e.nodes);return I(A)},undo:w=>{let A=1;const v=e.nodes.find(E=>E.id===w[w.length-1]);for(let E=w.length-2;E>0;E--){const S=w[E],M=e.nodes.find(Y=>Y.id===S);if(!M||(A++,M.type.startsWith("question-")))break}y.abort(),y=new AbortController;const C=e.nodes.find(E=>E.id===w[w.length-A]);return n.invariant(C,"Undo failed: new start node not found"),I(C,v),{removed:A}},abort:()=>{y.abort()}}};async function Tr(e){const r=e.node;switch(r.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:r.data.title}),e.next(r.nextId);case"pre-apply-result":return Qr({...e,node:r});case"text":return Ur({...e,node:r});case"image":return zr({...e,node:r});case"question-text":return Kr({...e,node:r});case"question-enum":return Hr({...e,node:r});case"question-number":return Gr({...e,node:r});case"question-phone":return Wr({...e,node:r});case"question-boolean":return Jr({...e,node:r});case"question-file":return Xr({...e,node:r});case"question-address":return Zr({...e,node:r});case"end-flow":return Yr({...e,node:r});case"if-block":return qr({...e,node:r});case"jump":return Rr({...e,node:r});case"link":return jr({...e,node:r});case"integration-application-submit":return $r({...e,node:r});case"add-submission":return Br({...e,node:r});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Or({...e,node:r});case"feedback":return Dr({...e,node:r});default:throw new Error(`Unknown node: ${JSON.stringify(r)}`)}}async function Dr({next:e,node:r}){e(r.nextId)}async function Or({next:e,node:r,talentBankClient:t,submissions:s,flow:i,logger:a,chat:o}){var d;let l={isDuplicate:!1};if(s&&t){const p=r.data.scope==="job"?(d=i.job)==null?void 0:d.id:void 0;if(r.data.scope==="company"||p!=null)try{l=await t.checkDuplicate({email:n.M({key:r.data.email,submissions:s}).toString(),jobId:p,scope:r.data.scope})}catch(g){a.error("[check-duplicate]",g)}}o.setSubmission(r.data.key,{type:"integration",value:l}),e(r.nextId)}async function Rr({next:e,node:r}){e(r.data.targetId)}async function Br({next:e,node:r,logger:t,submissions:s,context:i}){if(!s){t.error("Submissions not found");return}s[r.data.key]={type:"string",value:ie(r.data.value,{submissions:s,context:i})},e(r.nextId)}async function $r({chat:e,next:r,end:t,node:s,logger:i,apiClient:a,submissions:o,analytics:l,flow:d,applicationRecovery:p,setApplicationRecovery:g,forceSubmitConfirmation:x,t:h}){const y=async()=>{(p==null?void 0:p.submitNodeId)===s.id&&await g(void 0)},F=async w=>{const A=w();return await y(),A},I=async w=>{var Y;w!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:s.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:A,session_id:v}=l.getSessionInfo();let C;const E=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:s.data.integrationId,anonymous_id:A,session_id:v,job:d.job,flow_build:d.build,submissions:n.E(d.nodes,n.$(o||{},s.data.submitKeys)),pre_apply:n.k(d.nodes,o||{},d.data.flowSessionId)})}).catch(B=>(C=B,Gt.isApiErrorWithData(B)?B.data:B));s.data.key&&e.setSubmission(s.data.key,{type:"integration",value:E});const S=n.H(E);if(S&&l.log({event:"FLOW_SUBMIT",properties:{flow_id:d.id,flow_version:d.version,flow_session_id:d.data.flowSessionId,flow_build:d.build,service:S.service,response:S.response,flow_type:"CHATBOT_DRAWER",job:d.job}}),n.K(E)){const{redirect_url:B,message:Q,button_text:U}=E.integration_response.data;await e.sendMessage({type:"text",author:"bot",text:Q??h("submission_redirect_message")});try{const ee=new URL(B);A&&!ee.searchParams.has("anonymous_id")&&ee.searchParams.set("anonymous_id",A),await e.sendMessage({type:"link",href:ee.toString(),text:U??h("complete_submission"),onClick:()=>{if(!v){i.error("session_id not set, cannot log FLOW_REDIRECT event");return}l.log({event:"FLOW_REDIRECT",properties:{flow_build:d.build,flow_id:d.id,flow_session_id:v,flow_version:d.version,href:ee.toString(),job:d.job}})}})}catch(ee){i.error(`Invalid redirect URL: ${B}`,ee),e.sendMessage({type:"system",variant:"error",text:h("redirect_url_error")})}return F(()=>r(s.nextId))}if((E==null?void 0:E.success)===!0)return s.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:h("submission_completed")}),F(()=>r(s.nextId));const M=Pr(E,C);if(M){i.error(C??M.message);const B=M.phase==="submit"&&M.verdict==="confirmed"&&M.code==="unreadable_document"&&typeof M.field=="string"&&M.status!==void 0&&M.status>=400&&M.status<500&&((Y=o==null?void 0:o[M.field])==null?void 0:Y.type)==="file"?M.field:void 0,Q=B===void 0?void 0:d.nodes.find(U=>U.type==="question-file"&&U.data.key===B);return Q&&B!==void 0?(e.setSubmission(B,null),await g({fileQuestionNodeId:Q.id,submitNodeId:s.id}),await e.sendMessage({type:"system",variant:"error",text:h("submission_unreadable_document")}),r(Q.id)):M.status===409&&M.phase==="submit"&&M.verdict==="confirmed"?(await e.sendMessage({type:"system",variant:"info",text:h("submission_duplicate")}),F(t)):M.status===410&&M.code==="job_closed"?(await e.sendMessage({type:"system",variant:"info",text:h("submission_closed")}),F(t)):M.phase==="submit"&&M.verdict==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:h("submission_unknown")}),F(t)):M.phase==="workflow"&&M.retryable===!0&&M.verdict==="not_submitted"?(await e.sendMessage({type:"system",variant:"error",text:h("submission_retryable")}),I(!1)):(await e.sendMessage({type:"system",variant:"error",text:h("submission_failed")}),F(t))}return i.error(C??E),await e.sendMessage({type:"system",variant:"error",text:h("submission_failed")}),F(t)};await I(x===!0?!1:s.data.skipConfirmation)}const Pr=(e,r)=>{if(!n.z(e))return;const t=e.integration_response;if(typeof t!="object"||t===null)return;const s=t.error;if(typeof s!="object"||s===null)return;const i=s.data,a=typeof i=="object"&&i!==null?i:{},o=p=>typeof a[p]=="string"?a[p]:void 0,l=p=>typeof a[p]=="boolean"?a[p]:void 0,d=t.status;return{message:e.integration_response.error.message,status:typeof d=="number"?d:r instanceof Gt.ApiError?r.status:void 0,phase:o("phase"),retryable:l("retryable"),verdict:o("verdict"),code:o("code"),field:o("field")}};async function jr({chat:e,next:r,node:t,submissions:s,context:i}){await e.sendMessage({type:"link",href:ie(t.data.href,{submissions:s,context:i}),text:ie(t.data.cta,{submissions:s,context:i})}),r(t.nextId)}async function qr({submissions:e,next:r,node:t,context:s}){r(Mr(t,{submissions:e,context:s})?t.branchId:t.nextId)}async function Ur({chat:e,next:r,node:t,submissions:s,context:i}){await e.sendMessage({author:"bot",type:"text",text:ie(t.data.text,{submissions:s,context:i})}),r(t.nextId)}async function zr({chat:e,next:r,node:t}){await e.sendMessage({author:"bot",type:"image",url:t.data.url,height:t.data.height,width:t.data.width}),r(t.nextId)}async function Kr({chat:e,next:r,node:t,submissions:s,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ie(t.data.question,{submissions:s,context:i})});const o=t.data.format==="phone"?await e.userInput({key:t.data.key,type:"phone",config:{optional:t.data.optional,placeholder:t.data.placeholder,minChars:t.data.minChars,maxChars:t.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:t.data.key,type:"text",config:{optional:t.data.optional,placeholder:t.data.placeholder,format:t.data.format,maxChars:t.data.maxChars,minChars:t.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?n.B(o.value):o.value}),r(t.nextId)}async function Gr({chat:e,next:r,node:t,submissions:s,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ie(t.data.question,{submissions:s,context:i})});const o=await e.userInput({key:t.data.key,type:"number",config:{max:t.data.max,min:t.data.min,optional:t.data.optional,placeholder:t.data.placeholder,decimalCases:t.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),r(t.nextId)}async function Wr({chat:e,next:r,node:t,submissions:s,context:i}){await e.sendMessage({author:"bot",type:"text",text:ie(t.data.question,{submissions:s,context:i})});const a=await e.userInput({key:t.data.key,type:"phone",config:{minChars:t.data.minChars,defaultValue:{countryCode:t.data.defaultCountryCode},placeholder:t.data.placeholder,submissionFormat:"phone",optional:t.data.optional}});a===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:a.type==="phone"?n.B(a.value):a.value}),r(t.nextId)}async function Hr({chat:e,next:r,node:t,submissions:s,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ie(t.data.question,{submissions:s,context:i})});const o=await e.userInput({key:t.data.key,type:"multiple-choice",config:t.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:t.data.options.filter(l=>o.value.includes(l.value)).map(l=>l.label).join(", ")}),r(t.nextId)}async function Jr({chat:e,next:r,node:t,submissions:s,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:ie(t.data.question,{submissions:s,context:i})});const o=await e.userInput({key:t.data.key,type:"boolean",config:{optional:t.data.optional,labels:{true:t.data.trueLabel,false:t.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?t.data.trueLabel:t.data.falseLabel}),r(t.nextId)}async function Zr({chat:e,next:r,node:t,t:s}){await e.sendMessage({author:"bot",type:"text",text:t.data.question});const i=await e.userInput({type:"address",key:t.data.key,config:{optional:t.data.optional,keys:t.data.keys,placeholder:t.data.placeholder}});if(i===null)await e.sendMessage({type:"system",variant:"info",text:s("skipped")});else{const a=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return r(t.nextId)}async function Xr({node:e,chat:r,next:t,submissions:s,context:i,t:a}){await r.sendMessage({author:"bot",type:"text",text:ie(e.data.question,{submissions:s,context:i})});const o=await r.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 r.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const l of o.value)await r.sendMessage({author:"user",type:"file",fileName:l.name,fileSizeKb:l.sizeKb});return t(e.nextId)}async function Yr({chat:e,end:r,node:t}){await e.sendMessage({type:"system",variant:"info",text:t.data.systemMessage}),r()}async function Qr({node:e,flow:r,submissions:t,chat:s,next:i,apiClient:a,analytics:o}){const l=n.R(r.nodes,t||{}),{answers:d,...p}=l;s.setSubmission(e.data.key,{type:"integration",value:p});const g=new AbortController,x=setTimeout(()=>g.abort(),5e3);if(a.fetch("/flow/pre-apply",{method:"POST",signal:g.signal,body:JSON.stringify({...o.getSessionInfo(),job:r.job,flow_build:r.build,pre_apply:n.k(r.nodes,t||{},r.data.flowSessionId)})}).catch(()=>{}).finally(()=>clearTimeout(x)),l.status!=="skipped"){const y=[l.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":l.hasHardConcerns?e.data.messages.hard:l.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(const F of["hard","advisory"]){const I=d.filter(w=>!w.matched&&w.severity===F);I.length&&y.push((F==="hard"?"Role requirements":"Other things to consider")+`
2
- `+I.map(w=>`• ${w.message}`).join(`
3
- `))}await s.sendMessage({type:"text",author:"bot",text:y.join(`
4
-
5
- `)}),l.hasHardConcerns&&e.data.alternativeLink&&await s.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await s.userInput({type:"submit",key:void 0,config:{label:e.data.continueLabel}})}return i(e.nextId)}const me=({class:e,...r})=>{const{t}=n.useTranslation();return n.o("button",{class:n.clsx("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",...r,children:n.o("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[n.o("title",{children:t("send")}),n.o("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),n.o("path",{d:"M8 4V13"})]})})};var oe;function Re(e){return{lang:(e==null?void 0:e.lang)??(oe==null?void 0:oe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(oe==null?void 0:oe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(oe==null?void 0:oe.abortPipeEarly)}}var Ge;function es(e){return Ge==null?void 0:Ge.get(e)}var We;function ts(e){return We==null?void 0:We.get(e)}var He;function rs(e,r){var t;return(t=He==null?void 0:He.get(e))==null?void 0:t.get(r)}function we(e){var t,s;const r=typeof e;return r==="string"?`"${e}"`:r==="number"||r==="bigint"||r==="boolean"?`${e}`:r==="object"||r==="function"?(e&&((s=(t=Object.getPrototypeOf(e))==null?void 0:t.constructor)==null?void 0:s.name))??"null":r}function K(e,r,t,s,i){const a=i&&"input"in i?i.input:t.value,o=(i==null?void 0:i.expected)??e.expects??null,l=(i==null?void 0:i.received)??we(a),d={kind:e.kind,type:e.type,input:a,expected:o,received:l,message:`Invalid ${r}: ${o?`Expected ${o} but r`:"R"}eceived ${l}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},p=e.kind==="schema",g=(i==null?void 0:i.message)??e.message??rs(e.reference,d.lang)??(p?ts(d.lang):null)??s.message??es(d.lang);g!==void 0&&(d.message=typeof g=="function"?g(d):g),p&&(t.typed=!1),t.issues?t.issues.push(d):t.issues=[d]}function ae(e){return{version:1,vendor:"valibot",validate(r){return e["~run"]({value:r},Re())}}}function ss(e,r){return Object.hasOwn(e,r)&&r!=="__proto__"&&r!=="prototype"&&r!=="constructor"}function ns(e,r){const t=[...new Set(e)];return t.length>1?`(${t.join(` ${r} `)})`:t[0]??"never"}function is(e){if(e.path){let r="";for(const t of e.path)if(typeof t.key=="string"||typeof t.key=="number")r?r+=`.${t.key}`:r+=t.key;else return null;return r}return null}var as=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},os=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Jt(e,r){return{kind:"validation",type:"check",reference:Jt,async:!1,expects:null,requirement:e,message:r,"~run"(t,s){return t.typed&&!this.requirement(t.value)&&K(this,"input",t,s),t}}}function Zt(e){return{kind:"validation",type:"email",reference:Zt,expects:null,async:!1,requirement:os,message:e,"~run"(r,t){return r.typed&&!this.requirement.test(r.value)&&K(this,"email",r,t),r}}}function Ae(e,r){return{kind:"validation",type:"max_length",reference:Ae,async:!1,expects:`<=${e}`,requirement:e,message:r,"~run"(t,s){return t.typed&&t.value.length>this.requirement&&K(this,"length",t,s,{received:`${t.value.length}`}),t}}}function Xt(e,r){return{kind:"validation",type:"max_value",reference:Xt,async:!1,expects:`<=${e instanceof Date?e.toJSON():we(e)}`,requirement:e,message:r,"~run"(t,s){return t.typed&&!(t.value<=this.requirement)&&K(this,"value",t,s,{received:t.value instanceof Date?t.value.toJSON():we(t.value)}),t}}}function xe(e,r){return{kind:"validation",type:"min_length",reference:xe,async:!1,expects:`>=${e}`,requirement:e,message:r,"~run"(t,s){return t.typed&&t.value.length<this.requirement&&K(this,"length",t,s,{received:`${t.value.length}`}),t}}}function Yt(e,r){return{kind:"validation",type:"min_value",reference:Yt,async:!1,expects:`>=${e instanceof Date?e.toJSON():we(e)}`,requirement:e,message:r,"~run"(t,s){return t.typed&&!(t.value>=this.requirement)&&K(this,"value",t,s,{received:t.value instanceof Date?t.value.toJSON():we(t.value)}),t}}}function Ye(e,r){return{kind:"validation",type:"regex",reference:Ye,async:!1,expects:`${e}`,requirement:e,message:r,"~run"(t,s){return t.typed&&!this.requirement.test(t.value)&&K(this,"format",t,s),t}}}function Qe(e){return{kind:"transformation",type:"transform",reference:Qe,async:!1,operation:e,"~run"(r){return r.value=this.operation(r.value),r}}}function Qt(e){return{kind:"validation",type:"url",reference:Qt,async:!1,expects:null,requirement(r){try{return new URL(r),!0}catch{return!1}},message:e,"~run"(r,t){return r.typed&&!this.requirement(r.value)&&K(this,"URL",r,t),r}}}function ls(e,r,t){return typeof e.fallback=="function"?e.fallback(r,t):e.fallback}function er(e,r,t){return typeof e.default=="function"?e.default(r,t):e.default}function tr(e,r){return{kind:"schema",type:"array",reference:tr,expects:"Array",async:!1,item:e,message:r,get"~standard"(){return ae(this)},"~run"(t,s){var a;const i=t.value;if(Array.isArray(i)){t.typed=!0,t.value=[];for(let o=0;o<i.length;o++){const l=i[o],d=this.item["~run"]({value:l},s);if(d.issues){const p={type:"array",origin:"value",input:i,key:o,value:l};for(const g of d.issues)g.path?g.path.unshift(p):g.path=[p],(a=t.issues)==null||a.push(g);if(t.issues||(t.issues=d.issues),s.abortEarly){t.typed=!1;break}}d.typed||(t.typed=!1),t.value.push(d.value)}}else K(this,"type",t,s);return t}}}function rr(e){return{kind:"schema",type:"boolean",reference:rr,expects:"boolean",async:!1,message:e,get"~standard"(){return ae(this)},"~run"(r,t){return typeof r.value=="boolean"?r.typed=!0:K(this,"type",r,t),r}}}function sr(e){return{kind:"schema",type:"number",reference:sr,expects:"number",async:!1,message:e,get"~standard"(){return ae(this)},"~run"(r,t){return typeof r.value=="number"&&!isNaN(r.value)?r.typed=!0:K(this,"type",r,t),r}}}function ce(e,r){return{kind:"schema",type:"object",reference:ce,expects:"Object",async:!1,entries:e,message:r,get"~standard"(){return ae(this)},"~run"(t,s){var a;const i=t.value;if(i&&typeof i=="object"){t.typed=!0,t.value={};for(const o in this.entries){const l=this.entries[o];if(o in i||(l.type==="exact_optional"||l.type==="optional"||l.type==="nullish")&&l.default!==void 0){const d=o in i?i[o]:er(l),p=l["~run"]({value:d},s);if(p.issues){const g={type:"object",origin:"value",input:i,key:o,value:d};for(const x of p.issues)x.path?x.path.unshift(g):x.path=[g],(a=t.issues)==null||a.push(x);if(t.issues||(t.issues=p.issues),s.abortEarly){t.typed=!1;break}}p.typed||(t.typed=!1),t.value[o]=p.value}else if(l.fallback!==void 0)t.value[o]=ls(l);else if(l.type!=="exact_optional"&&l.type!=="optional"&&l.type!=="nullish"&&(K(this,"key",t,s,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),s.abortEarly))break}}else K(this,"type",t,s);return t}}}function Ee(e,r){return{kind:"schema",type:"optional",reference:Ee,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:r,get"~standard"(){return ae(this)},"~run"(t,s){return t.value===void 0&&(this.default!==void 0&&(t.value=er(this,t,s)),t.value===void 0)?(t.typed=!0,t):this.wrapped["~run"](t,s)}}}function nr(e,r){return{kind:"schema",type:"picklist",reference:nr,expects:ns(e.map(we),"|"),async:!1,options:e,message:r,get"~standard"(){return ae(this)},"~run"(t,s){return this.options.includes(t.value)?t.typed=!0:K(this,"type",t,s),t}}}function ir(e,r,t){return{kind:"schema",type:"record",reference:ir,expects:"Object",async:!1,key:e,value:r,message:t,get"~standard"(){return ae(this)},"~run"(s,i){var o,l;const a=s.value;if(a&&typeof a=="object"){s.typed=!0,s.value={};for(const d in a)if(ss(a,d)){const p=a[d],g=this.key["~run"]({value:d},i);if(g.issues){const h={type:"object",origin:"key",input:a,key:d,value:p};for(const y of g.issues)y.path=[h],(o=s.issues)==null||o.push(y);if(s.issues||(s.issues=g.issues),i.abortEarly){s.typed=!1;break}}const x=this.value["~run"]({value:p},i);if(x.issues){const h={type:"object",origin:"value",input:a,key:d,value:p};for(const y of x.issues)y.path?y.path.unshift(h):y.path=[h],(l=s.issues)==null||l.push(y);if(s.issues||(s.issues=x.issues),i.abortEarly){s.typed=!1;break}}(!g.typed||!x.typed)&&(s.typed=!1),g.typed&&(s.value[g.value]=x.value)}}else K(this,"type",s,i);return s}}}function X(e){return{kind:"schema",type:"string",reference:X,expects:"string",async:!1,message:e,get"~standard"(){return ae(this)},"~run"(r,t){return typeof r.value=="string"?r.typed=!0:K(this,"type",r,t),r}}}function us(e,r,t){const s=e["~run"]({value:r},Re(t));if(s.issues)throw new as(s.issues);return s.value}function cs(e,r){const t={};for(const s in e.entries)t[s]=!r||r.includes(s)?Ee(e.entries[s]):e.entries[s];return{...e,entries:t,get"~standard"(){return ae(this)}}}function he(...e){return{...e[0],pipe:e,get"~standard"(){return ae(this)},"~run"(r,t){for(const s of e)if(s.kind!=="metadata"){if(r.issues&&(s.kind==="schema"||s.kind==="transformation")){r.typed=!1;break}(!r.issues||!t.abortEarly&&!t.abortPipeEarly)&&(r=s["~run"](r,t))}return r}}}function ds(e,r,t){const s=e["~run"]({value:r},Re(t));return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}async function fs(e,r,t){const s=await e["~run"]({value:r},Re(t));return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}const _e=({error:e})=>!e||!e.message?null:n.o("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[n.o("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:[n.o("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),n.o("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),n.o("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),n.o("p",{class:"break-words pr-1 text-sm",children:e.message})]}),ge=({class:e,...r})=>{const{t}=n.useTranslation();return n.o("button",{type:"button",class:n.clsx("fr touch-hitbox text-neutral-10 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),...r,children:[n.o("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:[n.o("title",{children:t("skip")}),n.o("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),n.o("path",{d:"M13.25 4.5V8.25H9.5"})]}),t("skip")]})};var et={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 Le=n.cva("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}}),hs="https://api.mapbox.com/search/searchbox/v1/suggest",ps="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",ys=e=>atob(e).split("").reverse().join(""),le=ce({name:X()}),ms=ce({suggestions:tr(ce({full_address:Ee(X()),place_formatted:Ee(X()),name:Ee(X()),mapbox_id:X(),context:cs(ce({address:le,street:le,neighborhood:le,locality:le,district:le,place:le,region:le,postcode:le,country:le}))}))}),gs=({logger:e,t:r})=>n.F(()=>{var s;const t=(s=n.store.current$.peek().flow)==null?void 0:s.data.flowSessionId;return t?{enabled:!0,getPredictions:async i=>{var x;const a=new URL(hs);a.searchParams.set("q",i),a.searchParams.set("session_token",t);const o=(x=n.store.current$.peek().flow)==null?void 0:x.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",ys(ps));const d=await fetch(a);if(!d.ok)return e.error("Failed to get address details",d),{ok:!1,error:r("address_error")};const p=ds(ms,await d.json());if(p.success===!1)return e.error("Failed to parse address details",p.issues),{ok:!1,error:r("address_error")};const{suggestions:g}=p.output;return{ok:!0,data:g.map(h=>{var y,F,I,w,A,v,C,E,S;return{label:h.full_address??h.place_formatted??h.name??h.mapbox_id,id:h.mapbox_id,address:{line1:((y=h.context.address)==null?void 0:y.name)??((F=h.context.street)==null?void 0:F.name),line2:void 0,line3:((I=h.context.neighborhood)==null?void 0:I.name)??((w=h.context.locality)==null?void 0:w.name),city:((A=h.context.place)==null?void 0:A.name)??((v=h.context.district)==null?void 0:v.name),state:(C=h.context.region)==null?void 0:C.name,postcode:(E=h.context.postcode)==null?void 0:E.name,country:(S=h.context.country)==null?void 0:S.name}}})}}}:{enabled:!1}},[e,r]),wt=e=>{const{t:r}=n.useTranslation();return n.o("button",{type:"button",class:"touch-hitbox text-neutral-10 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:[n.o("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:n.o("path",{d:"M10 3L5 8L10 13"})}),n.o("span",{children:r("back")})]})},bs=({input:e,onSubmitSuccess:r,logger:t})=>{const{t:s}=n.useTranslation(),[i,a]=n.h(),{enabled:o,getPredictions:l}=gs({logger:t,t:s}),[d,p]=n.h(o?"query":"manual"),[g,x]=n.h(""),[h,y]=n.h(),F=n._(),I=n._(),w=v=>{var E;if(n.invariant(o,"Query state should not be enabled"),v=v.trim(),v===((E=F.current)==null?void 0:E.query)||v===(h==null?void 0:h.query)&&h.status==="done")return;if(x(v),v===""){F.current=void 0,y(void 0);return}const C=F.current={query:v};y({query:v,status:"pending"}),l(v).then(S=>{F.current===C&&(F.current=void 0,y(S.ok?{query:v,status:"done",items:S.data}:{query:v,status:"failed",error:S.error}))},S=>{F.current===C&&(F.current=void 0,t.error("Failed to get address details",S),y({query:v,status:"failed",error:s("address_error")}))})},A=(v,C)=>{a(E=>({...E,[v]:C}))};switch(d){case"query":return n.invariant(o,"Query state should not be enabled"),n.o(vs,{input:e,onSkip:()=>r(null),onAddressSelect:v=>{if(v===""){F.current&&(F.current=void 0,y(void 0)),p("manual");return}const C=(h==null?void 0:h.status)==="done"?h.items.find(E=>E.id===v):void 0;C&&(I.current!==v&&a(C.address),I.current=v,p("details"))},onAddressSearch:w,lookup:h,query:g});case"details":return n.invariant(i!==void 0),n.o(kt,{input:e,logger:t,onSubmitSuccess:r,addressFields:i,onFieldChange:A,actions:n.o(wt,{onClick:()=>{p("query")}})});case"manual":return n.o(kt,{logger:t,input:e,onSubmitSuccess:r,addressFields:i??{},onFieldChange:A,actions:o?n.o(wt,{onClick:()=>{p("query")}}):void 0})}},vs=({input:e,onSkip:r,lookup:t,onAddressSelect:s,query:i,onAddressSearch:a})=>{const{t:o}=n.useTranslation(),l=n._(null);return n.y(()=>{l.current&&(l.current.focus(),l.current.select())},[]),n.o(n.k$1,{children:[n.o("form",{noValidate:!0,onSubmit:d=>{d.preventDefault();const g=new FormData(d.currentTarget).get("address");typeof g=="string"&&a(g)},class:"flex gap-2 p-2.5",children:[n.o("div",{class:"group relative flex-1",children:[n.o("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:i,class:Le({optional:!!e.config.optional,className:"w-full rounded-full"})}),n.o("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:[n.o("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.o("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[n.o("circle",{cx:"7",cy:"7",r:"4"}),n.o("path",{d:"M10 10L13 13"})]})}),n.o("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&n.o(ge,{class:"relative",onClick:r})]}),(t==null?void 0:t.status)==="failed"?n.o(_e,{error:{message:t.error}}):null,n.o("p",{role:"status",class:(t==null?void 0:t.status)==="pending"||(t==null?void 0:t.status)==="done"&&t.items.length===0?"text-neutral-10 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(t==null?void 0:t.status)==="pending"?n.o(n.k$1,{children:[n.o(n.LoadingIndicator,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(t==null?void 0:t.status)==="done"&&t.items.length===0?o("address_no_results"):null}),n.o("ul",{children:[((t==null?void 0:t.status)==="done"?t.items:[]).map(d=>n.o("li",{children:n.o("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:()=>{s(d.id)},children:[n.o("span",{class:"flex-grow",children:d.label}),n.o("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:n.o("path",{d:"M6 3L11 8L6 13"})})]})},d.id)),n.o("li",{children:n.o("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:()=>{s("")},children:n.o("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},_t=["line1","line2","line3","city","state","postcode","country"],kt=({addressFields:e,onFieldChange:r,onSubmitSuccess:t,actions:s,input:i})=>{const a=n._(null);n.y(()=>{if(a.current){const d=a.current.querySelector("input");d&&(d.focus(),d.select())}},[]);const o=Object.keys(et),{t:l}=n.useTranslation();return n.o("form",{class:"flex flex-col px-2 pt-2",onSubmit:d=>{const p=new FormData(d.currentTarget),g=Object.fromEntries(p.entries());t({type:"address",value:g})},children:[n.o("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:_t.map((d,p)=>{const g=`isdk_${d}`,x=i.config.keys[d];return x?n.o(n.k$1,{children:[n.o("label",{for:g,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:l(d)}),n.o("div",{class:"flex flex-col items-stretch gap-1.5",children:[d==="country"?n.o("div",{class:"relative",children:[n.o("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:x,id:g,defaultValue:e[d],onChange:h=>r(d,h.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?n.o("option",{value:e[d],children:e[d]}):n.o("option",{value:"",children:l("select_country")}),o.map(h=>n.o("option",{value:h,children:h},h))]}),n.o("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:n.o("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):n.o("input",{autoFocus:p===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:x,id:g,defaultValue:e[d],onInput:h=>r(d,h.currentTarget.value),required:!0}),p===_t.length-1?n.o("hr",{class:"m-0 w-full border-b border-b-transparent"}):n.o("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),n.o("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[s,n.o(me,{class:"ml-auto"})]})]})},tt=()=>{const e=n._(null);return n.p(()=>{var r;(r=e.current)==null||r.focus()},[]),e},ar=["true","false"],xs=nr(ar),ws="answer",or="flex items-center flex-wrap gap-2 p-2.5",lr="min-w-0 max-w-full flex-auto",ur=n.k$2(({label:e,...r},t)=>n.o("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",...r,ref:t,children:n.o("p",{class:"text-center text-base",children:e})})),_s=({input:e,onSubmitSuccess:r})=>{const t=tt();return n.o("form",{noValidate:!0,class:"",onSubmit:s=>{s.preventDefault();const i=n.getFormSubmitter(s).value,a=us(xs,i);r({type:"boolean",value:a==="true"})},children:[n.o("ul",{class:or,children:ar.map((s,i)=>n.o("li",{class:lr,children:n.o(ur,{ref:i===0?t:null,type:"submit",name:ws,value:s,label:e.config.labels[s]},s)}))}),e.config.optional&&n.o("div",{class:"px-2 pb-2",children:n.o(ge,{class:"relative w-full",type:"button",onClick:()=>r(null)})})]})},ks=e=>new Promise((r,t)=>{const s=new FileReader;s.onload=()=>{if(typeof s.result!="string"||!s.result)return t(new Error("Invalid file"));r(s.result)},s.onerror=t,s.readAsDataURL(e)}),Ct=e=>e.reduce((r,t)=>r+t.sizeKb,0),Cs=n.isSubmissionOfType("file"),St=3,rt=e=>{const r=e.lastIndexOf(".");return r===-1?[e,""]:[e.slice(0,r),e.slice(r)]},Ss=({file:e,class:r,...t})=>{const[s,i]=rt(e.name);return n.o("div",{class:n.clsx("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",r),...t,children:[n.o("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[n.o("span",{class:"block truncate",children:s}),n.o("span",{children:i})]}),n.o("p",{"aria-label":"File size",class:"text-accent-11",children:n.V(e.sizeKb)})]})},Vt=({class:e,...r})=>n.o("li",{class:n.clsx("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...r}),Vs=(e,r)=>{const[t,s]=rt(e);return`${t.slice(0,r)}${s}`},It=e=>({name:Vs(e.name,42),sizeKb:e.size/1e3}),Is=({input:e,onSubmitSuccess:r})=>{var F;const t=(F=n.store.current$.value.flow)==null?void 0:F.data.submissions[e.key],[s,i]=n.h(Cs(t)&&t.value.length?{status:"ready",files:t.value}:{status:"empty"}),a=n._(0),o=s.status==="ready"?s.files:[],l=s.status==="ready"||s.status==="pending"?s.files:[],d=s.status==="error"?s.error:void 0,p=l.length-St,g=Ct(l),x=tt(),{t:h}=n.useTranslation(),y=I=>{if(!I.length)return{type:"required",message:h("validation_file")};if(!n.U(I,e.config.extensions))return{type:"validate",message:h("validation_file_ext",{ext:e.config.extensions.join(", ")})};if(e.config.fileSizeLimitKib&&Ct(I)>e.config.fileSizeLimitKib)return{type:"max",message:h("validation_file_size",{size:n.V(e.config.fileSizeLimitKib)})};if(!e.config.allowMultiple&&I.length>1)return{type:"invalid",message:h("validation_file_max",{count:1})}};return n.o("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:I=>{if(I.preventDefault(),s.status==="pending"||s.status==="error")return;const w=y(o);w?i({status:"error",error:w}):r({type:"file",value:o})},children:[n.o("div",{class:"flex items-center gap-2",children:[n.o("label",{ref:x,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?n.o("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,St).map(I=>{const[w,A]=rt(I.name);return n.o(Vt,{class:"flex overflow-hidden",children:[n.o("span",{class:"block truncate",children:w}),n.o("span",{children:A})]})}),p>0?n.o(Vt,{children:["+",p," file",p!==1?"s":""]}):null]}):n.o("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[n.o("header",{class:"flex flex-col items-center gap-0",children:[n.o("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:n.o("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"})}),n.o("p",{class:"text-neutral-12 tracking-[-0.01em]",children:h("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?n.o("p",{class:"text-neutral-10 text-xs",children:["(",h("file_max_size",{size:n.V(e.config.fileSizeLimitKib)}),")"]}):null]}),n.o("aside",{class:"flex flex-col items-center gap-2",children:[n.o("p",{id:"accepted-filetypes",class:"sr-only",children:h("file_extensions")}),n.o("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(I=>n.o("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:I.replace(".","")}))})]})]}),n.o("p",{role:"status",class:n.clsx("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:s.status==="pending"?n.o(n.k$1,{children:[n.o(n.LoadingIndicator,{"aria-hidden":"true",class:"h-4 w-4"}),h("file_preparing",{count:l.length})]}):s.status==="ready"?n.o(n.k$1,{children:[n.V(g)," ",o.length>1?"total":"",n.o("span",{class:"sr-only",children:[". ",h("file_ready",{count:o.length})]})]}):null}),n.o("input",{id:"dropzone-file",onInput:async I=>{n.invariant(I.target instanceof HTMLInputElement);const w=I.target.files?Array.from(I.target.files):[];if(I.target.value="",!w.length)return;const A=++a.current,v=s.status==="ready",C=w.map(It),E=y(C);if(E)return i({status:"error",error:E});i({status:"pending",files:C});try{const S=await Promise.all(w.map(async M=>({...It(M),data:await ks(M)})));a.current===A&&i({status:"ready",files:S})}catch{a.current===A&&i({status:"error",error:{type:"invalid",message:h(v?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),n.o("div",{class:"flex h-full flex-col items-center gap-2",children:[n.o(me,{disabled:o.length===0}),e.config.optional&&n.o(ge,{class:"relative",onClick:()=>r(null)})]})]}),n.o(_e,{error:d})]})};var Te=e=>e.type==="checkbox",ye=e=>e instanceof Date,H=e=>e==null;const cr=e=>typeof e=="object";var P=e=>!H(e)&&!Array.isArray(e)&&cr(e)&&!ye(e),Fs=e=>P(e)&&e.target?Te(e.target)?e.target.checked:e.target.value:e,As=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Es=(e,r)=>e.has(As(r)),Ms=e=>{const r=e.constructor&&e.constructor.prototype;return P(r)&&r.hasOwnProperty("isPrototypeOf")},st=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function q(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(st&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(P(e)&&Ms(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(s[i]=q(e[i]));return s}var Be=e=>/^\w*$/.test(e),R=e=>e===void 0,nt=e=>Array.isArray(e)?e.filter(Boolean):[],it=e=>nt(e.replace(/["|']|\]/g,"").split(/\.|\[/)),k=(e,r,t)=>{if(!r||!P(e))return t;const s=(Be(r)?[r]:it(r)).reduce((i,a)=>H(i)?i:i[a],e);return R(s)||s===e?R(e[r])?t:e[r]:s},ne=e=>typeof e=="boolean",re=e=>typeof e=="function",O=(e,r,t)=>{let s=-1;const i=Be(r)?[r]:it(r),a=i.length,o=a-1;for(;++s<a;){const l=i[s];let d=t;if(s!==o){const p=e[l];d=P(p)||Array.isArray(p)?p:isNaN(+i[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const Ft={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},se={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ue={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ns=n.Cn.createContext(null);Ns.displayName="HookFormControlContext";var Ls=(e,r,t,s=!0)=>{const i={defaultValues:r._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return r._proxyFormState[o]!==se.all&&(r._proxyFormState[o]=!s||se.all),t&&(t[o]=!0),e[o]}});return i};const Ts=typeof window<"u"?n.Cn.useLayoutEffect:n.Cn.useEffect;var Z=e=>typeof e=="string",Ds=(e,r,t,s,i)=>Z(e)?(s&&r.watch.add(e),k(t,e,i)):Array.isArray(e)?e.map(a=>(s&&r.watch.add(a),k(t,a))):(s&&(r.watchAll=!0),t),Ze=e=>H(e)||!cr(e);function fe(e,r,t=new WeakSet){if(Ze(e)||Ze(r))return Object.is(e,r);if(ye(e)&&ye(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),i=Object.keys(r);if(s.length!==i.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const a of s){const o=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const l=r[a];if(ye(o)&&ye(l)||P(o)&&P(l)||Array.isArray(o)&&Array.isArray(l)?!fe(o,l,t):!Object.is(o,l))return!1}}return!0}const Os=n.Cn.createContext(null);Os.displayName="HookFormContext";var dr=(e,r,t,s,i)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:i||!0}}:{},Me=e=>Array.isArray(e)?e:[e],At=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}};function fr(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const i=e[s],a=r[s];if(i&&P(i)&&a){const o=fr(i,a);P(o)&&(t[s]=o)}else e[s]&&(t[s]=a)}return t}var W=e=>P(e)&&!Object.keys(e).length,at=e=>e.type==="file",De=e=>{if(!st)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},hr=e=>e.type==="select-multiple",ot=e=>e.type==="radio",Rs=e=>ot(e)||Te(e),Je=e=>De(e)&&e.isConnected;function Bs(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=R(e)?s++:e[r[s++]];return e}function $s(e){for(const r in e)if(e.hasOwnProperty(r)&&!R(e[r]))return!1;return!0}function $(e,r){const t=Array.isArray(r)?r:Be(r)?[r]:it(r),s=t.length===1?e:Bs(e,t),i=t.length-1,a=t[i];return s&&delete s[a],i!==0&&(P(s)&&W(s)||Array.isArray(s)&&$s(s))&&$(e,t.slice(0,-1)),e}var Ps=e=>{for(const r in e)if(re(e[r]))return!0;return!1};function pr(e){return Array.isArray(e)||P(e)&&!Ps(e)}function Xe(e,r={}){for(const t in e){const s=e[t];pr(s)?(r[t]=Array.isArray(s)?[]:{},Xe(s,r[t])):R(s)||(r[t]=!0)}return r}function ve(e,r,t){t||(t=Xe(r));for(const s in e){const i=e[s];if(pr(i))R(r)||Ze(t[s])?t[s]=Xe(i,Array.isArray(i)?[]:{}):ve(i,H(r)?{}:r[s],t[s]);else{const a=r[s];t[s]=!fe(i,a)}}return t}const Et={value:!1,isValid:!1},Mt={value:!0,isValid:!0};var yr=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!R(e[0].attributes.value)?R(e[0].value)||e[0].value===""?Mt:{value:e[0].value,isValid:!0}:Mt:Et}return Et},mr=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>R(e)?e:r?e===""?NaN:e&&+e:t&&Z(e)?new Date(e):s?s(e):e;const Nt={isValid:!1,value:null};var gr=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Nt):Nt;function Lt(e){const r=e.ref;return at(r)?r.files:ot(r)?gr(e.refs).value:hr(r)?[...r.selectedOptions].map(({value:t})=>t):Te(r)?yr(e.refs).value:mr(R(r.value)?e.ref.value:r.value,e)}var js=(e,r,t,s)=>{const i={};for(const a of e){const o=k(r,a);o&&O(i,a,o._f)}return{criteriaMode:t,names:[...e],fields:i,shouldUseNativeValidation:s}},Oe=e=>e instanceof RegExp,Ve=e=>R(e)?e:Oe(e)?e.source:P(e)?Oe(e.value)?e.value.source:e.value:e,Tt=e=>({isOnSubmit:!e||e===se.onSubmit,isOnBlur:e===se.onBlur,isOnChange:e===se.onChange,isOnAll:e===se.all,isOnTouch:e===se.onTouched});const Dt="AsyncFunction";var qs=e=>!!e&&!!e.validate&&!!(re(e.validate)&&e.validate.constructor.name===Dt||P(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Dt)),Us=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ot=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ne=(e,r,t,s)=>{for(const i of t||Object.keys(e)){const a=k(e,i);if(a){const{_f:o,...l}=a;if(o){if(o.refs&&o.refs[0]&&r(o.refs[0],i)&&!s)return!0;if(o.ref&&r(o.ref,o.name)&&!s)return!0;if(Ne(l,r))break}else if(P(l)&&Ne(l,r))break}}};function Rt(e,r,t){const s=k(e,t);if(s||Be(t))return{error:s,name:t};const i=t.split(".");for(;i.length;){const a=i.join("."),o=k(r,a),l=k(e,a);if(o&&!Array.isArray(o)&&t!==a)return{name:t};if(l&&l.type)return{name:a,error:l};if(l&&l.root&&l.root.type)return{name:`${a}.root`,error:l.root};i.pop()}return{name:t}}var zs=(e,r,t,s)=>{t(e);const{name:i,...a}=e;return W(a)||Object.keys(a).length>=Object.keys(r).length||Object.keys(a).find(o=>r[o]===(!s||se.all))},Ks=(e,r,t)=>!e||!r||e===r||Me(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Gs=(e,r,t,s,i)=>i.isOnAll?!1:!t&&i.isOnTouch?!(r||e):(t?s.isOnBlur:i.isOnBlur)?!e:(t?s.isOnChange:i.isOnChange)?e:!0,Ws=(e,r)=>!nt(k(e,r)).length&&$(e,r),Hs=(e,r,t)=>{const s=Me(k(e,t));return O(s,"root",r[t]),O(e,t,s),e};function Bt(e,r,t="validate"){if(Z(e)||Array.isArray(e)&&e.every(Z)||ne(e)&&!e)return{type:t,message:Z(e)?e:"",ref:r}}var be=e=>P(e)&&!Oe(e)?e:{value:e,message:""},$t=async(e,r,t,s,i,a)=>{const{ref:o,refs:l,required:d,maxLength:p,minLength:g,min:x,max:h,pattern:y,validate:F,name:I,valueAsNumber:w,mount:A}=e._f,v=k(t,I);if(!A||r.has(I))return{};const C=l?l[0]:o,E=N=>{i&&C.reportValidity&&(C.setCustomValidity(ne(N)?"":N||""),C.reportValidity())},S={},M=ot(o),Y=Te(o),B=M||Y,Q=(w||at(o))&&R(o.value)&&R(v)||De(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,U=dr.bind(null,I,s,S),ee=(N,L,j,z=ue.maxLength,te=ue.minLength)=>{const J=N?L:j;S[I]={type:N?z:te,message:J,ref:o,...U(N?z:te,J)}};if(a?!Array.isArray(v)||!v.length:d&&(!B&&(Q||H(v))||ne(v)&&!v||Y&&!yr(l).isValid||M&&!gr(l).isValid)){const{value:N,message:L}=Z(d)?{value:!!d,message:d}:be(d);if(N&&(S[I]={type:ue.required,message:L,ref:C,...U(ue.required,L)},!s))return E(L),S}if(!Q&&(!H(x)||!H(h))){let N,L;const j=be(h),z=be(x);if(!H(v)&&!isNaN(v)){const te=o.valueAsNumber||v&&+v;H(j.value)||(N=te>j.value),H(z.value)||(L=te<z.value)}else{const te=o.valueAsDate||new Date(v),J=Se=>new Date(new Date().toDateString()+" "+Se),ke=o.type=="time",Ce=o.type=="week";Z(j.value)&&v&&(N=ke?J(v)>J(j.value):Ce?v>j.value:te>new Date(j.value)),Z(z.value)&&v&&(L=ke?J(v)<J(z.value):Ce?v<z.value:te<new Date(z.value))}if((N||L)&&(ee(!!N,j.message,z.message,ue.max,ue.min),!s))return E(S[I].message),S}if((p||g)&&!Q&&(Z(v)||a&&Array.isArray(v))){const N=be(p),L=be(g),j=!H(N.value)&&v.length>+N.value,z=!H(L.value)&&v.length<+L.value;if((j||z)&&(ee(j,N.message,L.message),!s))return E(S[I].message),S}if(y&&!Q&&Z(v)){const{value:N,message:L}=be(y);if(Oe(N)&&!v.match(N)&&(S[I]={type:ue.pattern,message:L,ref:o,...U(ue.pattern,L)},!s))return E(L),S}if(F){if(re(F)){const N=await F(v,t),L=Bt(N,C);if(L&&(S[I]={...L,...U(ue.validate,L.message)},!s))return E(L.message),S}else if(P(F)){let N={};for(const L in F){if(!W(N)&&!s)break;const j=Bt(await F[L](v,t),C,L);j&&(N={...j,...U(L,j.message)},E(j.message),s&&(S[I]=N))}if(!W(N)&&(S[I]={ref:C,...N},!s))return S}}return E(!0),S};const Js={mode:se.onSubmit,reValidateMode:se.onChange,shouldFocusError:!0};function Zs(e={}){let r={...Js,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:re(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},i=P(r.defaultValues)||P(r.values)?q(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:q(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,p=0;const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},x={...g};let h={...x};const y={array:At(),state:At()},F=r.criteriaMode===se.all,I=u=>c=>{clearTimeout(p),p=setTimeout(u,c)},w=async u=>{if(!o.keepIsValid&&!r.disabled&&(x.isValid||h.isValid||u)){let c;r.resolver?(c=W((await B()).errors),A()):c=await U(s,!0),c!==t.isValid&&y.state.next({isValid:c})}},A=(u,c)=>{!r.disabled&&(x.isValidating||x.validatingFields||h.isValidating||h.validatingFields)&&((u||Array.from(l.mount)).forEach(f=>{f&&(c?O(t.validatingFields,f,c):$(t.validatingFields,f))}),y.state.next({validatingFields:t.validatingFields,isValidating:!W(t.validatingFields)}))},v=(u,c=[],f,_,b=!0,m=!0)=>{if(_&&f&&!r.disabled){if(o.action=!0,m&&Array.isArray(k(s,u))){const V=f(k(s,u),_.argA,_.argB);b&&O(s,u,V)}if(m&&Array.isArray(k(t.errors,u))){const V=f(k(t.errors,u),_.argA,_.argB);b&&O(t.errors,u,V),Ws(t.errors,u)}if((x.touchedFields||h.touchedFields)&&m&&Array.isArray(k(t.touchedFields,u))){const V=f(k(t.touchedFields,u),_.argA,_.argB);b&&O(t.touchedFields,u,V)}(x.dirtyFields||h.dirtyFields)&&(t.dirtyFields=ve(i,a)),y.state.next({name:u,isDirty:N(u,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else O(a,u,c)},C=(u,c)=>{O(t.errors,u,c),y.state.next({errors:t.errors})},E=u=>{t.errors=u,y.state.next({errors:t.errors,isValid:!1})},S=(u,c,f,_)=>{const b=k(s,u);if(b){const m=k(a,u,R(f)?k(i,u):f);R(m)||_&&_.defaultChecked||c?O(a,u,c?m:Lt(b._f)):z(u,m),o.mount&&!o.action&&w()}},M=(u,c,f,_,b)=>{let m=!1,V=!1;const T={name:u};if(!r.disabled){if(!f||_){(x.isDirty||h.isDirty)&&(V=t.isDirty,t.isDirty=T.isDirty=N(),m=V!==T.isDirty);const D=fe(k(i,u),c);V=!!k(t.dirtyFields,u),D?$(t.dirtyFields,u):O(t.dirtyFields,u,!0),T.dirtyFields=t.dirtyFields,m=m||(x.dirtyFields||h.dirtyFields)&&V!==!D}if(f){const D=k(t.touchedFields,u);D||(O(t.touchedFields,u,f),T.touchedFields=t.touchedFields,m=m||(x.touchedFields||h.touchedFields)&&D!==f)}m&&b&&y.state.next(T)}return m?T:{}},Y=(u,c,f,_)=>{const b=k(t.errors,u),m=(x.isValid||h.isValid)&&ne(c)&&t.isValid!==c;if(r.delayError&&f?(d=I(()=>C(u,f)),d(r.delayError)):(clearTimeout(p),d=null,f?O(t.errors,u,f):$(t.errors,u)),(f?!fe(b,f):b)||!W(_)||m){const V={..._,...m&&ne(c)?{isValid:c}:{},errors:t.errors,name:u};t={...t,...V},y.state.next(V)}},B=async u=>(A(u,!0),await r.resolver(a,r.context,js(u||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation))),Q=async u=>{const{errors:c}=await B(u);if(A(u),u)for(const f of u){const _=k(c,f);_?O(t.errors,f,_):$(t.errors,f)}else t.errors=c;return c},U=async(u,c,f={valid:!0})=>{for(const _ in u){const b=u[_];if(b){const{_f:m,...V}=b;if(m){const T=l.array.has(m.name),D=b._f&&qs(b._f);D&&x.validatingFields&&A([m.name],!0);const G=await $t(b,l.disabled,a,F,r.shouldUseNativeValidation&&!c,T);if(D&&x.validatingFields&&A([m.name]),G[m.name]&&(f.valid=!1,c||e.shouldUseNativeValidation))break;!c&&(k(G,m.name)?T?Hs(t.errors,G,m.name):O(t.errors,m.name,G[m.name]):$(t.errors,m.name))}!W(V)&&await U(V,c,f)}}return f.valid},ee=()=>{for(const u of l.unMount){const c=k(s,u);c&&(c._f.refs?c._f.refs.every(f=>!Je(f)):!Je(c._f.ref))&&je(u)}l.unMount=new Set},N=(u,c)=>!r.disabled&&(u&&c&&O(a,u,c),!fe(lt(),i)),L=(u,c,f)=>Ds(u,l,{...o.mount?a:R(c)?i:Z(u)?{[u]:c}:c},f,c),j=u=>nt(k(o.mount?a:i,u,r.shouldUnregister?k(i,u,[]):[])),z=(u,c,f={})=>{const _=k(s,u);let b=c;if(_){const m=_._f;m&&(!m.disabled&&O(a,u,mr(c,m)),b=De(m.ref)&&H(c)?"":c,hr(m.ref)?[...m.ref.options].forEach(V=>V.selected=b.includes(V.value)):m.refs?Te(m.ref)?m.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(b)?V.checked=!!b.find(T=>T===V.value):V.checked=b===V.value||!!b)}):m.refs.forEach(V=>V.checked=V.value===b):at(m.ref)?m.ref.value="":(m.ref.value=b,m.ref.type||y.state.next({name:u,values:q(a)})))}(f.shouldDirty||f.shouldTouch)&&M(u,b,f.shouldTouch,f.shouldDirty,!0),f.shouldValidate&&Se(u)},te=(u,c,f)=>{for(const _ in c){if(!c.hasOwnProperty(_))return;const b=c[_],m=u+"."+_,V=k(s,m);(l.array.has(u)||P(b)||V&&!V._f)&&!ye(b)?te(m,b,f):z(m,b,f)}},J=(u,c,f={})=>{const _=k(s,u),b=l.array.has(u),m=q(c);O(a,u,m),b?(y.array.next({name:u,values:q(a)}),(x.isDirty||x.dirtyFields||h.isDirty||h.dirtyFields)&&f.shouldDirty&&y.state.next({name:u,dirtyFields:ve(i,a),isDirty:N(u,m)})):_&&!_._f&&!H(m)?te(u,m,f):z(u,m,f),Ot(u,l)?y.state.next({...t,name:u,values:q(a)}):y.state.next({name:o.mount?u:void 0,values:q(a)})},ke=async u=>{o.mount=!0;const c=u.target;let f=c.name,_=!0;const b=k(s,f),m=D=>{_=Number.isNaN(D)||ye(D)&&isNaN(D.getTime())||fe(D,k(a,f,D))},V=Tt(r.mode),T=Tt(r.reValidateMode);if(b){let D,G;const pe=c.type?Lt(b._f):Fs(u),de=u.type===Ft.BLUR||u.type===Ft.FOCUS_OUT,Vr=!Us(b._f)&&!r.resolver&&!k(t.errors,f)&&!b._f.deps||Gs(de,k(t.touchedFields,f),t.isSubmitted,T,V),ze=Ot(f,l,de);O(a,f,pe),de?(!c||!c.readOnly)&&(b._f.onBlur&&b._f.onBlur(u),d&&d(0)):b._f.onChange&&b._f.onChange(u);const Ke=M(f,pe,de),Ir=!W(Ke)||ze;if(!de&&y.state.next({name:f,type:u.type,values:q(a)}),Vr)return(x.isValid||h.isValid)&&(r.mode==="onBlur"?de&&w():de||w()),Ir&&y.state.next({name:f,...ze?{}:Ke});if(!de&&ze&&y.state.next({...t}),r.resolver){const{errors:gt}=await B([f]);if(A([f]),m(pe),_){const Fr=Rt(t.errors,s,f),bt=Rt(gt,s,Fr.name||f);D=bt.error,f=bt.name,G=W(gt)}}else A([f],!0),D=(await $t(b,l.disabled,a,F,r.shouldUseNativeValidation))[f],A([f]),m(pe),_&&(D?G=!1:(x.isValid||h.isValid)&&(G=await U(s,!0)));_&&(b._f.deps&&(!Array.isArray(b._f.deps)||b._f.deps.length>0)&&Se(b._f.deps),Y(f,G,D,Ke))}},Ce=(u,c)=>{if(k(t.errors,c)&&u.focus)return u.focus(),1},Se=async(u,c={})=>{let f,_;const b=Me(u);if(r.resolver){const m=await Q(R(u)?u:b);f=W(m),_=u?!b.some(V=>k(m,V)):f}else u?(_=(await Promise.all(b.map(async m=>{const V=k(s,m);return await U(V&&V._f?{[m]:V}:V)}))).every(Boolean),!(!_&&!t.isValid)&&w()):_=f=await U(s);return y.state.next({...!Z(u)||(x.isValid||h.isValid)&&f!==t.isValid?{}:{name:u},...r.resolver||!u?{isValid:f}:{},errors:t.errors}),c.shouldFocus&&!_&&Ne(s,Ce,u?b:l.mount),_},lt=(u,c)=>{let f={...o.mount?a:i};return c&&(f=fr(c.dirtyFields?t.dirtyFields:t.touchedFields,f)),R(u)?f:Z(u)?k(f,u):u.map(_=>k(f,_))},ut=(u,c)=>({invalid:!!k((c||t).errors,u),isDirty:!!k((c||t).dirtyFields,u),error:k((c||t).errors,u),isValidating:!!k(t.validatingFields,u),isTouched:!!k((c||t).touchedFields,u)}),vr=u=>{const c=u?Me(u):void 0;c==null||c.forEach(f=>$(t.errors,f)),c?c.forEach(f=>{y.state.next({name:f,errors:t.errors})}):y.state.next({errors:{}})},ct=(u,c,f)=>{const _=(k(s,u,{_f:{}})._f||{}).ref,b=k(t.errors,u)||{},{ref:m,message:V,type:T,...D}=b;O(t.errors,u,{...D,...c,ref:_}),y.state.next({name:u,errors:t.errors,isValid:!1}),f&&f.shouldFocus&&_&&_.focus&&_.focus()},xr=(u,c)=>re(u)?y.state.subscribe({next:f=>"values"in f&&u(L(void 0,c),f)}):L(u,c,!0),dt=u=>y.state.subscribe({next:c=>{Ks(u.name,c.name,u.exact)&&zs(c,u.formState||x,Sr,u.reRenderRoot)&&u.callback({values:{...a},...t,...c,defaultValues:i})}}).unsubscribe,wr=u=>(o.mount=!0,h={...h,...u.formState},dt({...u,formState:{...g,...u.formState}})),je=(u,c={})=>{for(const f of u?Me(u):l.mount)l.mount.delete(f),l.array.delete(f),c.keepValue||($(s,f),$(a,f)),!c.keepError&&$(t.errors,f),!c.keepDirty&&$(t.dirtyFields,f),!c.keepTouched&&$(t.touchedFields,f),!c.keepIsValidating&&$(t.validatingFields,f),!r.shouldUnregister&&!c.keepDefaultValue&&$(i,f);y.state.next({values:q(a)}),y.state.next({...t,...c.keepDirty?{isDirty:N()}:{}}),!c.keepIsValid&&w()},ft=({disabled:u,name:c})=>{if(ne(u)&&o.mount||u||l.disabled.has(c)){const b=l.disabled.has(c)!==!!u;u?l.disabled.add(c):l.disabled.delete(c),b&&o.mount&&!o.action&&w()}},qe=(u,c={})=>{let f=k(s,u);const _=ne(c.disabled)||ne(r.disabled);return O(s,u,{...f||{},_f:{...f&&f._f?f._f:{ref:{name:u}},name:u,mount:!0,...c}}),l.mount.add(u),f?ft({disabled:ne(c.disabled)?c.disabled:r.disabled,name:u}):S(u,!0,c.value),{..._?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:Ve(c.min),max:Ve(c.max),minLength:Ve(c.minLength),maxLength:Ve(c.maxLength),pattern:Ve(c.pattern)}:{},name:u,onChange:ke,onBlur:ke,ref:b=>{if(b){qe(u,c),f=k(s,u);const m=R(b.value)&&b.querySelectorAll&&b.querySelectorAll("input,select,textarea")[0]||b,V=Rs(m),T=f._f.refs||[];if(V?T.find(D=>D===m):m===f._f.ref)return;O(s,u,{_f:{...f._f,...V?{refs:[...T.filter(Je),m,...Array.isArray(k(i,u))?[{}]:[]],ref:{type:m.type,name:u}}:{ref:m}}}),S(u,!1,void 0,m)}else f=k(s,u,{}),f._f&&(f._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(Es(l.array,u)&&o.action)&&l.unMount.add(u)}}},Ue=()=>r.shouldFocusError&&Ne(s,Ce,l.mount),_r=u=>{ne(u)&&(y.state.next({disabled:u}),Ne(s,(c,f)=>{const _=k(s,f);_&&(c.disabled=_._f.disabled||u,Array.isArray(_._f.refs)&&_._f.refs.forEach(b=>{b.disabled=_._f.disabled||u}))},0,!1))},ht=(u,c)=>async f=>{let _;f&&(f.preventDefault&&f.preventDefault(),f.persist&&f.persist());let b=q(a);if(y.state.next({isSubmitting:!0}),r.resolver){const{errors:m,values:V}=await B();A(),t.errors=m,b=q(V)}else await U(s);if(l.disabled.size)for(const m of l.disabled)$(b,m);if($(t.errors,"root"),W(t.errors)){y.state.next({errors:{}});try{await u(b,f)}catch(m){_=m}}else c&&await c({...t.errors},f),Ue(),setTimeout(Ue);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:W(t.errors)&&!_,submitCount:t.submitCount+1,errors:t.errors}),_)throw _},kr=(u,c={})=>{k(s,u)&&(R(c.defaultValue)?J(u,q(k(i,u))):(J(u,c.defaultValue),O(i,u,q(c.defaultValue))),c.keepTouched||$(t.touchedFields,u),c.keepDirty||($(t.dirtyFields,u),t.isDirty=c.defaultValue?N(u,q(k(i,u))):N()),c.keepError||($(t.errors,u),x.isValid&&w()),y.state.next({...t}))},pt=(u,c={})=>{const f=u?q(u):i,_=q(f),b=W(u),m=b?i:_;if(c.keepDefaultValues||(i=f),!c.keepValues){if(c.keepDirtyValues){const V=new Set([...l.mount,...Object.keys(ve(i,a))]);for(const T of Array.from(V)){const D=k(t.dirtyFields,T),G=k(a,T),pe=k(m,T);D&&!R(G)?O(m,T,G):!D&&!R(pe)&&J(T,pe)}}else{if(st&&R(u))for(const V of l.mount){const T=k(s,V);if(T&&T._f){const D=Array.isArray(T._f.refs)?T._f.refs[0]:T._f.ref;if(De(D)){const G=D.closest("form");if(G){G.reset();break}}}}if(c.keepFieldsRef)for(const V of l.mount)J(V,k(m,V));else s={}}a=r.shouldUnregister?c.keepDefaultValues?q(i):{}:q(m),y.array.next({values:{...m}}),y.state.next({values:{...m}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!x.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!W(m),o.watch=!!r.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(t.errors={}),y.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:b?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!fe(u,i)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:b?{}:c.keepDirtyValues?c.keepDefaultValues&&a?ve(i,a):t.dirtyFields:c.keepDefaultValues&&u?ve(i,u):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},yt=(u,c)=>pt(re(u)?u(a):u,{...r.resetOptions,...c}),Cr=(u,c={})=>{const f=k(s,u),_=f&&f._f;if(_){const b=_.refs?_.refs[0]:_.ref;b.focus&&setTimeout(()=>{b.focus(),c.shouldSelect&&re(b.select)&&b.select()})}},Sr=u=>{t={...t,...u}},mt={control:{register:qe,unregister:je,getFieldState:ut,handleSubmit:ht,setError:ct,_subscribe:dt,_runSchema:B,_updateIsValidating:A,_focusError:Ue,_getWatch:L,_getDirty:N,_setValid:w,_setFieldArray:v,_setDisabledField:ft,_setErrors:E,_getFieldArray:j,_reset:pt,_resetDefaultValues:()=>re(r.defaultValues)&&r.defaultValues().then(u=>{yt(u,r.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:ee,_disableForm:_r,_subjects:y,_proxyFormState:x,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(u){o=u},get _defaultValues(){return i},get _names(){return l},set _names(u){l=u},get _formState(){return t},get _options(){return r},set _options(u){r={...r,...u}}},subscribe:wr,trigger:Se,register:qe,handleSubmit:ht,watch:xr,setValue:J,getValues:lt,reset:yt,resetField:kr,clearErrors:vr,unregister:je,setError:ct,setFocus:Cr,getFieldState:ut};return{...mt,formControl:mt}}function $e(e={}){const r=n.Cn.useRef(void 0),t=n.Cn.useRef(void 0),[s,i]=n.Cn.useState({isDirty:!1,isValidating:!1,isLoading:re(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:re(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!re(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...l}=Zs(e);r.current={...l,formState:s}}const a=r.current.control;return a._options=e,Ts(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(l=>({...l,isReady:!0})),a._formState.isReady=!0,o},[a]),n.Cn.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),n.Cn.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),n.Cn.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),n.Cn.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),n.Cn.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),n.Cn.useEffect(()=>{var o;e.values&&!fe(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),t.current=e.values,i(l=>({...l}))):a._resetDefaultValues()},[a,e.values]),n.Cn.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()}),r.current.formState=n.Cn.useMemo(()=>Ls(s,a),[a,s]),r.current}const Pt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=k(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Xs=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Pt(s.ref,t,e):s.refs&&s.refs.forEach(i=>Pt(i,t,e))}},Ys=(e,r)=>{r.shouldUseNativeValidation&&Xs(e,r);const t={};for(const s in e){const i=k(r.fields,s),a=Object.assign(e[s]||{},{ref:i&&i.ref});if(Qs(r.names||Object.keys(e),s)){const o=Object.assign({},k(t,s));O(o,"root",a),O(t,s,o)}else O(t,s,a)}return t},Qs=(e,r)=>e.some(t=>t.startsWith(r+"."));var Pe=function(e,r,t){return t===void 0&&(t={}),function(s,i,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(fs(e,s,Object.assign({},r,{abortPipeEarly:!o}))).then(function(l){if(l.issues){for(var d={};l.issues.length;){var p=l.issues[0],g=is(p);if(g&&(d[g]||(d[g]={message:p.message,type:p.type}),o)){var x=d[g].types,h=x&&x[p.type];d[g]=dr(g,o,d,p.type,h?[].concat(h,p.message):p.message)}l.issues.shift()}return{values:{},errors:Ys(d,a)}}return{values:t.raw?s:l.output,errors:{}}})}catch(l){return Promise.reject(l)}}};const jt=27,qt=12,Ut=10,en=n.isSubmissionOfType("enum"),tn=(e,r)=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Pe(ce({checked:he(ir(X(),rr()),Qe(s=>Object.entries(s).filter(([i,a])=>a).map(([i,a])=>i)),Ae(t.max,r("validation_multiple_choice_max",{count:t.max})),xe(t.min,r("validation_multiple_choice_min",{count:t.min})))}))},rn=n.k$2(({option:e,...r},t)=>n.o(n.k$1,{children:[n.o("input",{class:"peer sr-only h-full",type:"checkbox",...r,ref:t}),n.o("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:r.id,children:e.label})]})),zt=n.cva("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:or}}}),sn=({input:e,onSubmitSuccess:r})=>{var g,x;const t=e.key?(g=n.store.current$.value.flow)==null?void 0:g.data.submissions[e.key]:void 0,s=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,i=s&&e.config.options.length===2,{t:a}=n.useTranslation(),{register:o,handleSubmit:l,formState:{errors:d}}=$e({defaultValues:{checked:s?{}:en(t)?Object.fromEntries(t.value.map(h=>[h,!0])):{}},resolver:tn(e.config,a)}),p=tt();return i?n.o("ul",{style:{maxHeight:6.5*jt+5*qt+2*Ut},class:zt({variant:"booleanLike"}),children:e.config.options.map((h,y)=>n.o("li",{class:lr,children:n.o(ur,{type:"submit",ref:F=>{F&&y===0&&(p.current=F)},label:h.label,value:"true",onClick:()=>r({type:"enum",value:[h.value]})})},h.value))}):n.o("form",{noValidate:!0,onSubmit:h=>l(y=>{const F=y.checked;r({type:"enum",value:F})})(h),children:[n.o("div",{class:"flex items-center gap-1",children:[n.o("ul",{style:{maxHeight:6.5*jt+5*qt+2*Ut},class:zt({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,y)=>{const F=`checked.${h.value}`,{ref:I,...w}=o(F);return n.o("li",{class:"relative",children:n.o(rn,{option:h,autoFocus:y===0,ref:A=>{A&&y===0&&(p.current=A),I(A)},id:F,...w,onClick:s?()=>r({type:"enum",value:[h.value]}):void 0})},h.value)})}),n.o("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[s?null:n.o(me,{}),e.config.minSelected===0&&n.o(ge,{class:"relative",type:"button",onClick:()=>r({type:"enum",value:[]})})]})]}),n.o("div",{class:"px-1",children:n.o(_e,{error:(x=d.checked)==null?void 0:x.root})})]})},nn=n.isSubmissionOfType("number"),an=(e,r)=>{const t=e.min??Number.MIN_SAFE_INTEGER,s=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return Pe(ce({number:he(sr(r("validation_number")),Yt(t,r("validation_number_min",{min:t})),Xt(s,r("validation_number_max",{max:s})),Jt(a=>a===Number(a.toFixed(i)),r("validation_number_decimal_cases",{count:i})))}))},on=({input:e,onSubmitSuccess:r})=>{var x;const t=e.config.defaultValue,s=e.key?(x=n.store.current$.value.flow)==null?void 0:x.data.submissions[e.key]:void 0,{t:i}=n.useTranslation(),{register:a,handleSubmit:o,formState:{errors:l}}=$e({defaultValues:{number:t?Number(t):nn(s)?s.value:void 0},resolver:an(e.config,i)}),{ref:d,...p}=a("number",{required:!e.config.optional,valueAsNumber:!0}),g=n._();return n.y(()=>{g.current&&(g.current.focus(),g.current.select())},[]),n.o("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&r({type:"number",value:h.number})}),children:[n.o("div",{class:"flex items-center gap-2",children:[n.o("div",{class:"relative min-w-0 flex-grow",children:[n.o("input",{...p,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(g.current=h),d(h)},type:"text",min:e.config.min,max:e.config.max,class:Le({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&&n.o(ge,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>r(null)})]}),n.o(me,{})]}),n.o(_e,{error:l.number})]})},ln=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const r=Object.entries(et).find(i=>e.startsWith(i[1])),t=r?r[1]:"",s=e.replace(t,"");return/^\d+$/.test(s)?{countryCode:t,phoneNumber:s}:{countryCode:"",phoneNumber:""}},un="44",cn=/^[0-9 ]+$/,dn=n.isSubmissionOfType("string"),fn=n.isSubmissionOfType("phone"),hn=e=>{const r=he(X(e("validation_country_code")),Ye(cn,e("validation_country_code"))),t=he(X(e("validation_phone")),xe(1,e("validation_phone")),Qe(s=>s.replace(/[^0-9]/g,"")));return Pe(ce({countryCode:r,phoneNumber:t}))},pn=({input:e,onSubmitSuccess:r})=>{var I;const t=e.key?(I=n.store.current$.value.flow)==null?void 0:I.data.submissions[e.key]:void 0,{t:s}=n.useTranslation(),[i,a]=n.h(),o=dn(t)?ln(t.value):fn(t)?t.value:void 0,{register:l,handleSubmit:d,formState:{errors:p},watch:g}=$e({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??un,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:hn(s)}),{ref:x,...h}=l("phoneNumber",{required:!e.config.optional}),y=n._(),F=g("countryCode");return n.y(()=>{y.current&&(y.current.focus(),y.current.select())},[]),n.o("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:d(w=>{const A=w.phoneNumber.replace(/[^0-9]/g,""),v=w.countryCode.replace(/[^0-9]/g,"");a(void 0);const C=e.config.minChars??7,E=A.length+v.length;if(E<C)return a(s("validation_phone_min_chars",{count:C}));const S=e.config.maxChars;if(S!=null&&E>S)return a(s("validation_max_chars",{count:S}));e.config.submissionFormat==="phone"?r({type:"phone",value:{countryCode:v,phoneNumber:A}}):r({type:"string",value:F+w.phoneNumber})}),children:[n.o("div",{class:"flex items-center gap-2",children:[n.o("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[n.o("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:[n.o("span",{children:["+",F]}),n.o("select",{...l("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(et).map(([w,A])=>n.o("option",{value:A,children:[w," (+",A,")"]},w))})]}),n.o("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:w=>{w&&(y.current=w),x(w)},class:Le({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&n.o(ge,{class:"absolute bottom-0 right-1 top-0",onClick:()=>r(null)})]}),n.o(me,{})]}),n.o(_e,{error:p.countryCode||p.phoneNumber||{message:i}})]})},yn=({input:e,onSubmitSuccess:r})=>n.o("div",{class:"flex flex-col items-center py-3",children:n.o("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 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",name:e.key,onClick:()=>{r(null)},children:n.o("span",{class:"flex items-center gap-1.5",children:[n.o("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),n.o("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:[n.o("path",{d:"M4 8L8 4L12 8"}),n.o("path",{d:"M8 4V13"})]})]})})}),mn={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},gn=n.isSubmissionOfType("string"),bn=(e,r)=>{const t={maxLength:r("validation_max_chars",{count:e.maxChars??999}),minLength:r("validation_min_chars",{count:e.minChars??1})};return Pe(ce({text:{date:he(X(r("validation_date")),Ye(/^\d{4}-\d{2}-\d{2}$/,r("validation_date"))),email:he(X(r("validation_email")),Zt(r("validation_email")),xe(e.minChars??1,t.minLength),Ae(e.maxChars??1/0,t.maxLength)),text:he(X(),xe(e.minChars??1,t.minLength),Ae(e.maxChars??1/0,t.maxLength)),url:he(X(r("validation_url")),Qt(r("validation_url")),xe(e.minChars??1,t.minLength),Ae(e.maxChars??1/0,t.maxLength))}[e.format]}))},vn=({input:e,onSubmitSuccess:r})=>{var x;const{t}=n.useTranslation(),s=e.key?(x=n.store.current$.value.flow)==null?void 0:x.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:l}}=$e({defaultValues:{text:i||(gn(s)?s.value:"")},resolver:bn(e.config,t)}),{ref:d,...p}=a("text",{required:!e.config.optional}),g=n._();return n.y(()=>{g.current&&(g.current.focus(),g.current.select())},[]),n.o("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{r({type:"string",value:h.text})}),children:[n.o("div",{class:"flex items-center gap-2",children:[n.o("div",{class:"relative min-w-0 flex-1",children:[n.o("input",{id:"chat-input",...p,...mn[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(g.current=h),d(h)},placeholder:e.config.placeholder,class:Le({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&n.o(ge,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>r(null)})]}),n.o(me,{})]}),n.o(_e,{error:l.text})]})},xn={text:vn,phone:pn,"multiple-choice":sn,boolean:_s,file:Is,submit:yn,address:bs,number:on},wn=({logger:e})=>{var i;const r=(i=n.store.current$.value.flow)==null?void 0:i.data.currentInput,t=n._(null),s=()=>n.chatStore.onInteractionFn$.value();return n.y(()=>{var a;(a=t.current)==null||a.scrollTo({top:0})},[r]),n.o("div",{ref:t,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:n.o("div",{class:"flex flex-col",onPointerDownCapture:r?s:void 0,onKeyDownCapture:r?s:void 0,children:r?(()=>{const a=xn[r.type];return n.o(a,{logger:e,onSubmitSuccess:n.chatStore.onSubmitSuccessFn$.value,input:r})})():n.o("div",{class:"flex items-center gap-2 p-2.5",children:[n.o("input",{"aria-hidden":"true",id:"chat-input",class:Le({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),n.o(me,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function _n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kn=function(e){return e instanceof RegExp},Cn=function(r){var t=/[\\^$.*+?()[\]{}|]/g,s=RegExp(t.source);return r&&s.test(r)?r.replace(t,"\\$&"):r},br=function(e){return typeof e=="string"},Sn=function(e){var r=[];return e.forEach(function(t){Array.isArray(t)?r=r.concat(t):r.push(t)}),r};function Vn(e,r,t){var s=0,i=0;if(e==="")return e;if(!e||!br(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=r;kn(a)||(a=new RegExp("("+Cn(a)+")","gi"));for(var o=e.split(a),l=1,d=o.length;l<d;l+=2){if(o[l]===void 0||o[l-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[l].length,s+=o[l-1].length,o[l]=t(o[l],l,s),s+=i}return o}var In=function(r,t,s){return Array.isArray(r)||(r=[r]),Sn(r.map(function(i){return br(i)?Vn(i,t,s):i}))};const Ie=_n(In),Fn=/(\[[^\]]+\]\([^)]+\))/g,An=/\[([^\]]+)\]\(([^)]+)\)/,En=/(https?:\/\/[^\s]+)/g,Mn=/_(.*?)_/g,Nn=/\*\*(.*?)\*\*/g,Ln=/\\n|\n/g,Kt="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Tn=e=>{const r=Ie(e,Fn,(o,l)=>{const[,d,p]=o.match(An)??[];return p?n.o("a",{class:Kt,href:p,children:d??p},p+l):n.o("span",{children:"INVALID LINK"})}),t=Ie(r,En,(o,l)=>n.o("a",{class:Kt,href:o,children:o},o+l)),s=Ie(t,Mn,(o,l)=>n.o("em",{children:o},o+l)),i=Ie(s,Nn,(o,l)=>n.o("strong",{children:o},o+l));return Ie(i,Ln,(o,l)=>n.o("br",{},`br-${l}`))},Dn=n.cva("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"}}),On=({children:e,className:r,animate:t,side:s,...i})=>n.o("p",{style:{transformOrigin:s==="left"?"0% 50%":"100% 50%"},class:Dn({className:r,side:s,animate:t}),...i,children:e}),Rn=({message:e})=>n.o("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:n.o("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,n.o("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.o("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"})})]})}),Bn=({className:e,...r})=>n.o("div",{"aria-hidden":!0,children:n.chatStore.isBotTyping$.value===!0?n.o("div",{"aria-label":"Typing…",class:n.clsx("flex gap-1 p-4",e),...r,children:Array.from({length:3},(t,s)=>n.o("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-s*200}ms`}}))}):void 0}),$n={bot:"left",user:"right"},Pn=n.cva("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-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),jn=({lastSentMessageFooter:e})=>{var t;const r=((t=n.store.current$.value.flow)==null?void 0:t.data.messages)??[];return n.o("ol",{"aria-label":"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((s,i)=>n.o(n.k$1,{children:n.o("li",{class:"flex",tabIndex:i===r.length-1?-1:void 0,children:n.M$1(s).with({type:"system"},a=>n.o("p",{class:Pn({variant:a.variant}),children:a.text})).with({type:"text",author:n.z$1.union("bot","user")},a=>{const o=a.author==="user"&&!r.slice(i+1).some(p=>p.type==="text"&&p.author==="user"),l=i===r.length-1,d=a.author==="bot"?Tn(a.text):a.text;return n.o(n.k$1,{children:[o?e:null,n.o(On,{animate:l,side:$n[a.author],children:d},i)]})}).with({type:"link"},a=>n.o(Rn,{message:a})).with({type:"image"},a=>n.o("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:a.url,style:{aspectRatio:a.width/a.height}})).with({type:"file"},a=>n.o(Ss,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const o=r[r.length-1];return!(a===o)||n.chatStore.isBotTyping$.value?null:n.o("div",{class:"flex flex-grow flex-col items-center justify-center",children:n.o(n.LoadingIndicator,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),n.o(Bn,{},"typing")]})},qn=({logger:e,apiClient:r,analytics:t,talentBankClient:s})=>{const{flow:i}=n.store.current$.value;n.invariant(i,"Flow is required to exist to show chatbot body");const a=n.store.viewState$.value,{chatRef:o,chatService:l}=n.useChatService(),{t:d}=n.useTranslation(),[p,g]=n.h();return n.y(()=>{a==="maximised"&&n.chatStore.scrollToEnd()},[a]),n.y(()=>{var v;const{state:x,flow:h}=n.store.current$.peek();if(x!=="loaded")throw new Error(d("invalid_state"));let y=h.data.nodeHistory.at(-1);if(n.chatStore.scrollToEnd(),n.store.setInput(void 0),h.data.isFinished)return;const F=()=>{const C=n.store.current$.peek().flow;!C||C.data.hasInteracted||(n.store.markAsInteracted(),vt(t,C,"FLOW_INTERACT"))};n.chatStore.onInteractionFn$.value=F,y===void 0?(y=n.getHeadOrThrow(i.nodes).id,n.store.setCurrentNodeId(y),vt(t,h,"FLOW_START")):n.store.removeMessagesSentByNodeIds([y]);const{interpret:I,abort:w,undo:A}=Lr({context:i.context,analytics:{service:t,customProperties:(v=i.analytics)==null?void 0:v.customProperties},apiClient:r,logger:e,talentBankClient:s,flow:i,chatService:l,t:d,getApplicationRecovery:()=>{var C;return(C=n.store.current$.peek().flow)==null?void 0:C.data.applicationRecovery},setApplicationRecovery:n.store.setApplicationRecovery,getSubmissions:()=>{var C;return(C=n.store.current$.peek().flow)==null?void 0:C.data.submissions},onInterpret:C=>n.store.setCurrentNodeId(C.id),onFlowEnd:async()=>{var E;n.store.markAsFinished();const C=n.store.current$.peek().flow;n.invariant(C),t.log({event:"FLOW_END",properties:{flow_id:i.id,flow_version:i.version,flow_session_id:C.data.flowSessionId,flow_build:i.build,job:i.job},customProperties:(E=i.analytics)==null?void 0:E.customProperties})}});return g(()=>A),I(y),()=>{n.chatStore.onInteractionFn$.value===F&&(n.chatStore.onInteractionFn$.value=()=>{}),w()}},[t,r,l,e,i,s,d]),n.o(n.k$1,{children:[n.o("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[n.o("div",{ref:o,role:"region","aria-label":d("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:n.o(jn,{lastSentMessageFooter:i.data.isFinished||!p?null:n.o(zn,{undoFn:p})})}),n.chatStore.isReadingHistory$.value&&!i.data.isFinished&&!n.chatStore.isBotTyping$.value&&n.o("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:n.o(n.SvgIconButton,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":d("jump_to_current"),onClick:()=>{var h,y;n.chatStore.scrollToEnd(),(y=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||y.focus({preventScroll:!0})},children:n.o(n.ChevronDown,{})})})]}),n.o(wn,{logger:e})]})},Un=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(r=>typeof r=="string"):[],zn=({undoFn:e})=>{const{t:r}=n.useTranslation();return n.o("div",{class:"flex flex-1 items-center justify-end px-1",children:n.o(n.SvgIconButton,{"aria-label":r("undo"),onClick:async()=>{const{flow:t}=n.store.current$.peek();n.invariant(t);const{removed:s}=e(t.data.nodeHistory),i=t.data.nodeHistory.splice(-s);i.length!==0&&(n.store.removeMessagesSentByNodeIds(i),n.store.setInput(void 0),i.pop(),i.map(a=>t.nodes.find(o=>o.id===a)).filter(Boolean).flatMap(Un).forEach(a=>delete t.data.submissions[a]),n.store.current$.value={...n.store.current$.value})},children:n.o("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"})})})};exports.ChatbotBody=qn;
@@ -1,5 +0,0 @@
1
- "use strict";const St=require("@inploi/sdk");var q;function Ti(t){return{lang:(t==null?void 0:t.lang)??(q==null?void 0:q.lang),message:t==null?void 0:t.message,abortEarly:(t==null?void 0:t.abortEarly)??(q==null?void 0:q.abortEarly),abortPipeEarly:(t==null?void 0:t.abortPipeEarly)??(q==null?void 0:q.abortPipeEarly)}}var ie;function No(t){return ie==null?void 0:ie.get(t)}var oe;function Ao(t){return oe==null?void 0:oe.get(t)}var ae;function Bo(t,e){var i;return(i=ae==null?void 0:ae.get(t))==null?void 0:i.get(e)}function zi(t){var i,o;let e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&((o=(i=Object.getPrototypeOf(t))==null?void 0:i.constructor)==null?void 0:o.name))??"null":e}function K(t,e,i,o,a){let r=a&&"input"in a?a.input:i.value,n=(a==null?void 0:a.expected)??t.expects??null,l=(a==null?void 0:a.received)??zi(r),c={kind:t.kind,type:t.type,input:r,expected:n,received:l,message:`Invalid ${e}: ${n?`Expected ${n} but r`:"R"}eceived ${l}`,requirement:t.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:o.lang,abortEarly:o.abortEarly,abortPipeEarly:o.abortPipeEarly},d=t.kind==="schema",u=(a==null?void 0:a.message)??t.message??Bo(t.reference,c.lang)??(d?Ao(c.lang):null)??o.message??No(c.lang);u!==void 0&&(c.message=typeof u=="function"?u(c):u),d&&(i.typed=!1),i.issues?i.issues.push(c):i.issues=[c]}function F(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Ti())}}}function Fo(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Mo(t,e){let i=[...new Set(t)];return i.length>1?`(${i.join(` ${e} `)})`:i[0]??"never"}function Ii(t){return{kind:"transformation",type:"transform",reference:Ii,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function Lo(t,e,i){return typeof t.fallback=="function"?t.fallback(e,i):t.fallback}function je(t,e,i){return typeof t.default=="function"?t.default(e,i):t.default}function Oi(){return{kind:"schema",type:"any",reference:Oi,expects:"any",async:!1,get"~standard"(){return F(this)},"~run"(t){return t.typed=!0,t}}}function ji(t,e){return{kind:"schema",type:"array",reference:ji,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return F(this)},"~run"(i,o){var r;let a=i.value;if(Array.isArray(a)){i.typed=!0,i.value=[];for(let n=0;n<a.length;n++){let l=a[n],c=this.item["~run"]({value:l},o);if(c.issues){let d={type:"array",origin:"value",input:a,key:n,value:l};for(let u of c.issues)u.path?u.path.unshift(d):u.path=[d],(r=i.issues)==null||r.push(u);if(i.issues||(i.issues=c.issues),o.abortEarly){i.typed=!1;break}}c.typed||(i.typed=!1),i.value.push(c.value)}}else K(this,"type",i,o);return i}}}function De(t){return{kind:"schema",type:"boolean",reference:De,expects:"boolean",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,i){return typeof e.value=="boolean"?e.typed=!0:K(this,"type",e,i),e}}}function Mt(t,e){return{kind:"schema",type:"literal",reference:Mt,expects:zi(t),async:!1,literal:t,message:e,get"~standard"(){return F(this)},"~run"(i,o){return i.value===this.literal?i.typed=!0:K(this,"type",i,o),i}}}function Lt(t,e){return{kind:"schema",type:"nullable",reference:Lt,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,get"~standard"(){return F(this)},"~run"(i,o){return i.value===null&&(this.default!==void 0&&(i.value=je(this,i,o)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,o)}}}function Ht(t){return{kind:"schema",type:"number",reference:Ht,expects:"number",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,i){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:K(this,"type",e,i),e}}}function A(t,e){return{kind:"schema",type:"object",reference:A,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return F(this)},"~run"(i,o){var r;let a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(let n in this.entries){let l=this.entries[n];if(n in a||(l.type==="exact_optional"||l.type==="optional"||l.type==="nullish")&&l.default!==void 0){let c=n in a?a[n]:je(l),d=l["~run"]({value:c},o);if(d.issues){let u={type:"object",origin:"value",input:a,key:n,value:c};for(let s of d.issues)s.path?s.path.unshift(u):s.path=[u],(r=i.issues)==null||r.push(s);if(i.issues||(i.issues=d.issues),o.abortEarly){i.typed=!1;break}}d.typed||(i.typed=!1),i.value[n]=d.value}else if(l.fallback!==void 0)i.value[n]=Lo(l);else if(l.type!=="exact_optional"&&l.type!=="optional"&&l.type!=="nullish"&&(K(this,"key",i,o,{input:void 0,expected:`"${n}"`,path:[{type:"object",origin:"key",input:a,key:n,value:a[n]}]}),o.abortEarly))break}}else K(this,"type",i,o);return i}}}function Y(t,e){return{kind:"schema",type:"optional",reference:Y,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return F(this)},"~run"(i,o){return i.value===void 0&&(this.default!==void 0&&(i.value=je(this,i,o)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,o)}}}function Di(t,e,i){return{kind:"schema",type:"record",reference:Di,expects:"Object",async:!1,key:t,value:e,message:i,get"~standard"(){return F(this)},"~run"(o,a){var n,l;let r=o.value;if(r&&typeof r=="object"){o.typed=!0,o.value={};for(let c in r)if(Fo(r,c)){let d=r[c],u=this.key["~run"]({value:c},a);if(u.issues){let w={type:"object",origin:"key",input:r,key:c,value:d};for(let g of u.issues)g.path=[w],(n=o.issues)==null||n.push(g);if(o.issues||(o.issues=u.issues),a.abortEarly){o.typed=!1;break}}let s=this.value["~run"]({value:d},a);if(s.issues){let w={type:"object",origin:"value",input:r,key:c,value:d};for(let g of s.issues)g.path?g.path.unshift(w):g.path=[w],(l=o.issues)==null||l.push(g);if(o.issues||(o.issues=s.issues),a.abortEarly){o.typed=!1;break}}(!u.typed||!s.typed)&&(o.typed=!1),u.typed&&(o.value[u.value]=s.value)}}else K(this,"type",o,a);return o}}}function M(t){return{kind:"schema",type:"string",reference:M,expects:"string",async:!1,message:t,get"~standard"(){return F(this)},"~run"(e,i){return typeof e.value=="string"?e.typed=!0:K(this,"type",e,i),e}}}function Xe(t){let e;if(t)for(let i of t)e?e.push(...i.issues):e=i.issues;return e}function Ne(t,e){return{kind:"schema",type:"union",reference:Ne,expects:Mo(t.map(i=>i.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return F(this)},"~run"(i,o){let a,r,n;for(let l of this.options){let c=l["~run"]({value:i.value},o);if(c.typed)if(c.issues)r?r.push(c):r=[c];else{a=c;break}else n?n.push(c):n=[c]}if(a)return a;if(r){if(r.length===1)return r[0];K(this,"type",i,o,{issues:Xe(r)}),i.typed=!0}else{if((n==null?void 0:n.length)===1)return n[0];K(this,"type",i,o,{issues:Xe(n)})}return i}}}function Ni(){return{kind:"schema",type:"unknown",reference:Ni,expects:"unknown",async:!1,get"~standard"(){return F(this)},"~run"(t){return t.typed=!0,t}}}function Ho(...t){return{...t[0],pipe:t,get"~standard"(){return F(this)},"~run"(e,i){for(let o of t)if(o.kind!=="metadata"){if(e.issues&&(o.kind==="schema"||o.kind==="transformation")){e.typed=!1;break}(!e.issues||!i.abortEarly&&!i.abortPipeEarly)&&(e=o["~run"](e,i))}return e}}}function Ai(t,e,i){let o=t["~run"]({value:e},Ti(i));return{typed:o.typed,success:!o.issues,output:o.value,issues:o.issues}}var Ro=t=>({ok:!0,err:!1,val:t}),Uo=t=>({err:!0,ok:!1,val:t}),Ae=t=>t.filter(e=>(e.type==="question-boolean"||e.type==="question-enum")&&!!e.data.preApply);function Bi(t,e,i){var n,l;let o=t.find(c=>c.type==="pre-apply-result");if(!o)return;let a=(n=e[o.data.participationKey])==null?void 0:n.value,r={};if(a===!0)for(let c of Ae(t)){let d=(l=e[c.data.key])==null?void 0:l.value;Array.isArray(d)&&d.length===1&&(d=d[0]),(typeof d=="boolean"||typeof d=="string")&&(r[c.data.key]=d)}return{node_id:o.id,flow_session_id:i,participation:a,answers:r}}function Vo(t,e){let i=Bi(t,e,""),o=Ae(t).map(r=>{let n=r.data.preApply,l=i==null?void 0:i.answers[r.data.key],c=r.type==="question-boolean"?typeof l=="boolean":r.data.options.some(d=>d.value===l);return{key:r.data.key,severity:n.severity,message:n.mismatchMessage,matched:c&&l===n.expectedValue,valid:c}}),a=(i==null?void 0:i.participation)===!1?"skipped":(i==null?void 0:i.participation)===!0&&o.length>0&&o.every(r=>r.valid)?"completed":"unavailable";return{status:a,hasHardConcerns:a==="completed"?o.some(r=>!r.matched&&r.severity==="hard"):null,hasAdvisoryConcerns:a==="completed"?o.some(r=>!r.matched&&r.severity==="advisory"):null,answers:a==="completed"?o:[]}}function Wo(t,e){let i=new Set(Ae(t).map(o=>o.data.key));for(let o of t)o.type==="pre-apply-result"&&(i.add(o.data.key),i.add(o.data.participationKey));return Object.fromEntries(Object.entries(e).filter(([o])=>!i.has(o)))}var Be=(t,e)=>{if(e.length===0)return;let i=t;for(let o of e){if(i==null||typeof i!="object")return;i=i[o]}return i},Yo=(t,e="all")=>{let i={},o=e==="all"?null:new Set(e);for(let a in t){let r=t[a];r&&(o&&!o.has(a)||(i[a]=r.value))}return i},Ko=({key:t,submissions:e})=>{var o;let i=(o=e[t])==null?void 0:o.value;if(typeof i!="string"&&typeof i!="number")throw new Error(`Submission at “${t}” is not a string or number`);return i},qo=({key:t,path:e,submissions:i,context:o})=>{if(t==="$context"){if(!e)return;let a=Be(o,e);switch(typeof a){case"string":return{type:"string",value:a};case"number":return{type:"number",value:a};case"boolean":return{type:"boolean",value:a};default:console.warn(`Unexpected type for $context.${e.join(".")}`,a);return}}return i[t]},Xo=t=>{let e=t.split(".").pop();return e?Ro(e?"."+e:""):Uo("No file extension found")},Go=(t,e)=>{if(e.length===0)return!0;let i=e.map(o=>o.toLowerCase());return t.every(o=>{let a=Xo(o.name);return a.ok&&i.includes(a.val.toLowerCase())})},Zo=t=>t<=1e3?`${Math.round(t)}KB`:t<1e3*10?`${(t/1e3).toFixed(1)}MB`:`${Math.round(t/1e3)}MB`,Jo=t=>typeof t=="string"?t:`+${t.countryCode} ${t.phoneNumber}`,Qo=A({integration_response:A({data:A({redirect_url:M(),message:Y(Lt(M())),button_text:Y(Lt(M()))})})}),ta=t=>Ai(Qo,t).success,ea=A({integration_response:A({error:A({message:M()})})}),ia=t=>Ai(ea,t).success;A({success:Mt(!1),message:Y(Ni())});var oa=t=>{if(typeof t!="object"||t===null)return null;let e=t.integration_response;if(typeof e!="object"||e===null)return null;let i=e;if(typeof i.status!="number"||i.service!==void 0&&typeof i.service!="string")return null;let o="data"in i,a=i.error,r=typeof a=="object"&&a!==null&&typeof a.message=="string"&&"data"in a;if(!o&&!r)return null;let n=o?i.data:a.data??null;return{service:i.service??"INVALID_SERVICE",response:{status:i.status,payload:n}}},aa=({context:t,schema:e,logger:i})=>{if(e)for(let o in e){let a=e[o];if(!a)continue;let r=Be(t,o.split("."));if(a.required&&r==null){let n=`Configuration error in context: ${o} is required`;throw i.error(n),new Error(n)}if(r!=null)switch(a.type){case"number":if(typeof r!="number")throw new Error(`Configuration error in context: ${o} is not a number`);break;case"string":if(typeof r!="string")throw new Error(`Configuration error in context: ${o} is not a string`);break;default:a.type}}},Pt,h,Fi,Mi,st,Ge,Li,we,Hi,ht={},Ri=[],ra=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Gt=Array.isArray;function X(t,e){for(var i in e)t[i]=e[i];return t}function Ui(t){var e=t.parentNode;e&&e.removeChild(t)}function B(t,e,i){var o,a,r,n={};for(r in e)r=="key"?o=e[r]:r=="ref"?a=e[r]:n[r]=e[r];if(arguments.length>2&&(n.children=arguments.length>3?Pt.call(arguments,2):i),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)n[r]===void 0&&(n[r]=t.defaultProps[r]);return xt(t,n,o,a,null)}function xt(t,e,i,o,a){var r={type:t,props:e,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Fi};return a==null&&h.vnode!=null&&h.vnode(r),r}function na(){return{current:null}}function L(t){return t.children}function H(t,e){this.props=t,this.context=e}function Rt(t,e){if(e==null)return t.__?Rt(t.__,t.__.__k.indexOf(t)+1):null;for(var i;e<t.__k.length;e++)if((i=t.__k[e])!=null&&i.__e!=null)return i.__e;return typeof t.type=="function"?Rt(t):null}function Vi(t){var e,i;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((i=t.__k[e])!=null&&i.__e!=null){t.__e=t.__c.base=i.__e;break}return Vi(t)}}function ge(t){(!t.__d&&(t.__d=!0)&&st.push(t)&&!Ut.__r++||Ge!==h.debounceRendering)&&((Ge=h.debounceRendering)||Li)(Ut)}function Ut(){var t,e,i,o,a,r,n,l,c;for(st.sort(we);t=st.shift();)t.__d&&(e=st.length,o=void 0,a=void 0,r=void 0,l=(n=(i=t).__v).__e,(c=i.__P)&&(o=[],a=[],(r=X({},n)).__v=n.__v+1,Fe(c,n,r,i.__n,c.ownerSVGElement!==void 0,n.__h!=null?[l]:null,o,l??Rt(n),n.__h,a),qi(o,n,a),n.__e!=l&&Vi(n)),st.length>e&&st.sort(we));Ut.__r=0}function Wi(t,e,i,o,a,r,n,l,c,d,u){var s,w,g,f,b,j,x,v,_,y,E=0,T=o&&o.__k||Ri,R=T.length,U=R,I=e.length;for(i.__k=[],s=0;s<I;s++)(f=i.__k[s]=(f=e[s])==null||typeof f=="boolean"||typeof f=="function"?null:typeof f=="string"||typeof f=="number"||typeof f=="bigint"?xt(null,f,null,null,f):Gt(f)?xt(L,{children:f},null,null,null):f.__b>0?xt(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)!=null&&(f.__=i,f.__b=i.__b+1,(v=la(f,T,x=s+E,U))===-1?g=ht:(g=T[v]||ht,T[v]=void 0,U--),Fe(t,f,g,a,r,n,l,c,d,u),b=f.__e,(w=f.ref)&&g.ref!=w&&(g.ref&&Me(g.ref,null,f),u.push(w,f.__c||b,f)),b!=null&&(j==null&&(j=b),y=!(_=g===ht||g.__v===null)&&v===x,_?v==-1&&E--:v!==x&&(v===x+1?(E++,y=!0):v>x?U>I-x?(E+=v-x,y=!0):E--:E=v<x&&v==x-1?v-x:0),x=s+E,y=y||v==s&&!_,typeof f.type!="function"||v===x&&g.__k!==f.__k?typeof f.type=="function"||y?f.__d!==void 0?(c=f.__d,f.__d=void 0):c=b.nextSibling:c=Ki(t,b,c):c=Yi(f,c,t),typeof i.type=="function"&&(i.__d=c)));for(i.__e=j,s=R;s--;)T[s]!=null&&(typeof i.type=="function"&&T[s].__e!=null&&T[s].__e==i.__d&&(i.__d=T[s].__e.nextSibling),Xi(T[s],T[s]))}function Yi(t,e,i){for(var o,a=t.__k,r=0;a&&r<a.length;r++)(o=a[r])&&(o.__=t,e=typeof o.type=="function"?Yi(o,e,i):Ki(i,o.__e,e));return e}function Z(t,e){return e=e||[],t==null||typeof t=="boolean"||(Gt(t)?t.some(function(i){Z(i,e)}):e.push(t)),e}function Ki(t,e,i){return i==null||i.parentNode!==t?t.insertBefore(e,null):e==i&&e.parentNode!=null||t.insertBefore(e,i),e.nextSibling}function la(t,e,i,o){var a=t.key,r=t.type,n=i-1,l=i+1,c=e[i];if(c===null||c&&a==c.key&&r===c.type)return i;if(o>(c!=null?1:0))for(;n>=0||l<e.length;){if(n>=0){if((c=e[n])&&a==c.key&&r===c.type)return n;n--}if(l<e.length){if((c=e[l])&&a==c.key&&r===c.type)return l;l++}}return-1}function sa(t,e,i,o,a){var r;for(r in i)r==="children"||r==="key"||r in e||Vt(t,r,null,i[r],o);for(r in e)a&&typeof e[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||i[r]===e[r]||Vt(t,r,e[r],i[r],o)}function Ze(t,e,i){e[0]==="-"?t.setProperty(e,i??""):t[e]=i==null?"":typeof i!="number"||ra.test(e)?i:i+"px"}function Vt(t,e,i,o,a){var r;t:if(e==="style")if(typeof i=="string")t.style.cssText=i;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)i&&e in i||Ze(t.style,e,"");if(i)for(e in i)o&&i[e]===o[e]||Ze(t.style,e,i[e])}else if(e[0]==="o"&&e[1]==="n")r=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=i,i?o||t.addEventListener(e,r?Qe:Je,r):t.removeEventListener(e,r?Qe:Je,r);else if(e!=="dangerouslySetInnerHTML"){if(a)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=i??"";break t}catch{}typeof i=="function"||(i==null||i===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,i))}}function Je(t){return this.l[t.type+!1](h.event?h.event(t):t)}function Qe(t){return this.l[t.type+!0](h.event?h.event(t):t)}function Fe(t,e,i,o,a,r,n,l,c,d){var u,s,w,g,f,b,j,x,v,_,y,E,T,R,U,I=e.type;if(e.constructor!==void 0)return null;i.__h!=null&&(c=i.__h,l=e.__e=i.__e,e.__h=null,r=[l]),(u=h.__b)&&u(e);try{t:if(typeof I=="function"){if(x=e.props,v=(u=I.contextType)&&o[u.__c],_=u?v?v.props.value:u.__:o,i.__c?j=(s=e.__c=i.__c).__=s.__E:("prototype"in I&&I.prototype.render?e.__c=s=new I(x,_):(e.__c=s=new H(x,_),s.constructor=I,s.render=da),v&&v.sub(s),s.props=x,s.state||(s.state={}),s.context=_,s.__n=o,w=s.__d=!0,s.__h=[],s._sb=[]),s.__s==null&&(s.__s=s.state),I.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=X({},s.__s)),X(s.__s,I.getDerivedStateFromProps(x,s.__s))),g=s.props,f=s.state,s.__v=e,w)I.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(I.getDerivedStateFromProps==null&&x!==g&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(x,_),!s.__e&&(s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(x,s.__s,_)===!1||e.__v===i.__v)){for(e.__v!==i.__v&&(s.props=x,s.state=s.__s,s.__d=!1),e.__e=i.__e,e.__k=i.__k,e.__k.forEach(function(It){It&&(It.__=e)}),y=0;y<s._sb.length;y++)s.__h.push(s._sb[y]);s._sb=[],s.__h.length&&n.push(s);break t}s.componentWillUpdate!=null&&s.componentWillUpdate(x,s.__s,_),s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(g,f,b)})}if(s.context=_,s.props=x,s.__P=t,s.__e=!1,E=h.__r,T=0,"prototype"in I&&I.prototype.render){for(s.state=s.__s,s.__d=!1,E&&E(e),u=s.render(s.props,s.state,s.context),R=0;R<s._sb.length;R++)s.__h.push(s._sb[R]);s._sb=[]}else do s.__d=!1,E&&E(e),u=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++T<25);s.state=s.__s,s.getChildContext!=null&&(o=X(X({},o),s.getChildContext())),w||s.getSnapshotBeforeUpdate==null||(b=s.getSnapshotBeforeUpdate(g,f)),Wi(t,Gt(U=u!=null&&u.type===L&&u.key==null?u.props.children:u)?U:[U],e,i,o,a,r,n,l,c,d),s.base=e.__e,e.__h=null,s.__h.length&&n.push(s),j&&(s.__E=s.__=null)}else r==null&&e.__v===i.__v?(e.__k=i.__k,e.__e=i.__e):e.__e=ca(i.__e,e,i,o,a,r,n,c,d);(u=h.diffed)&&u(e)}catch(It){e.__v=null,(c||r!=null)&&(e.__e=l,e.__h=!!c,r[r.indexOf(l)]=null),h.__e(It,e,i)}}function qi(t,e,i){for(var o=0;o<i.length;o++)Me(i[o],i[++o],i[++o]);h.__c&&h.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(r){r.call(a)})}catch(r){h.__e(r,a.__v)}})}function ca(t,e,i,o,a,r,n,l,c){var d,u,s,w=i.props,g=e.props,f=e.type,b=0;if(f==="svg"&&(a=!0),r!=null){for(;b<r.length;b++)if((d=r[b])&&"setAttribute"in d==!!f&&(f?d.localName===f:d.nodeType===3)){t=d,r[b]=null;break}}if(t==null){if(f===null)return document.createTextNode(g);t=a?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,g.is&&g),r=null,l=!1}if(f===null)w===g||l&&t.data===g||(t.data=g);else{if(r=r&&Pt.call(t.childNodes),u=(w=i.props||ht).dangerouslySetInnerHTML,s=g.dangerouslySetInnerHTML,!l){if(r!=null)for(w={},b=0;b<t.attributes.length;b++)w[t.attributes[b].name]=t.attributes[b].value;(s||u)&&(s&&(u&&s.__html==u.__html||s.__html===t.innerHTML)||(t.innerHTML=s&&s.__html||""))}if(sa(t,g,w,a,l),s)e.__k=[];else if(Wi(t,Gt(b=e.props.children)?b:[b],e,i,o,a&&f!=="foreignObject",r,n,r?r[0]:i.__k&&Rt(i,0),l,c),r!=null)for(b=r.length;b--;)r[b]!=null&&Ui(r[b]);l||("value"in g&&(b=g.value)!==void 0&&(b!==t.value||f==="progress"&&!b||f==="option"&&b!==w.value)&&Vt(t,"value",b,w.value,!1),"checked"in g&&(b=g.checked)!==void 0&&b!==t.checked&&Vt(t,"checked",b,w.checked,!1))}return t}function Me(t,e,i){try{typeof t=="function"?t(e):t.current=e}catch(o){h.__e(o,i)}}function Xi(t,e,i){var o,a;if(h.unmount&&h.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||Me(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){h.__e(r,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(a=0;a<o.length;a++)o[a]&&Xi(o[a],e,i||typeof t.type!="function");i||t.__e==null||Ui(t.__e),t.__=t.__e=t.__d=void 0}function da(t,e,i){return this.constructor(t,i)}function ut(t,e,i){var o,a,r,n;h.__&&h.__(t,e),a=(o=typeof i=="function")?null:i&&i.__k||e.__k,r=[],n=[],Fe(e,t=(!o&&i||e).__k=B(L,null,[t]),a||ht,ht,e.ownerSVGElement!==void 0,!o&&i?[i]:a?null:e.firstChild?Pt.call(e.childNodes):null,r,!o&&i?i:a?a.__e:e.firstChild,o,n),qi(r,t,n)}function Gi(t,e){ut(t,e,Gi)}function ua(t,e,i){var o,a,r,n,l=X({},t.props);for(r in t.type&&t.type.defaultProps&&(n=t.type.defaultProps),e)r=="key"?o=e[r]:r=="ref"?a=e[r]:l[r]=e[r]===void 0&&n!==void 0?n[r]:e[r];return arguments.length>2&&(l.children=arguments.length>3?Pt.call(arguments,2):i),xt(t.type,l,o||t.key,a||t.ref,null)}function Zi(t,e){var i={__c:e="__cC"+Hi++,__:t,Consumer:function(o,a){return o.children(a)},Provider:function(o){var a,r;return this.getChildContext||(a=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&a.some(function(l){l.__e=!0,ge(l)})},this.sub=function(n){a.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){a.splice(a.indexOf(n),1),l&&l.call(n)}}),o.children}};return i.Provider.__=i.Consumer.contextType=i}Pt=Ri.slice,h={__e:function(t,e,i,o){for(var a,r,n;e=e.__;)if((a=e.__c)&&!a.__)try{if((r=a.constructor)&&r.getDerivedStateFromError!=null&&(a.setState(r.getDerivedStateFromError(t)),n=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(t,o||{}),n=a.__d),n)return a.__E=a}catch(l){t=l}throw t}},Fi=0,Mi=function(t){return t!=null&&t.constructor===void 0},H.prototype.setState=function(t,e){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=X({},this.state),typeof t=="function"&&(t=t(X({},i),this.props)),t&&X(i,t),t!=null&&this.__v&&(e&&this._sb.push(e),ge(this))},H.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ge(this))},H.prototype.render=L,st=[],Li=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,we=function(t,e){return t.__v.__b-e.__v.__b},Ut.__r=0,Hi=0;function Ji(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(i=Ji(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Zt(){for(var t,e,i=0,o="",a=arguments.length;i<a;i++)(t=arguments[i])&&(e=Ji(t))&&(o&&(o+=" "),o+=e);return o}const ti=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ei=Zt,Jt=(t,e)=>i=>{var o;if((e==null?void 0:e.variants)==null)return ei(t,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:a,defaultVariants:r}=e,n=Object.keys(a).map(d=>{const u=i==null?void 0:i[d],s=r==null?void 0:r[d];if(u===null)return null;const w=ti(u)||ti(s);return a[d][w]}),l=i&&Object.entries(i).reduce((d,u)=>{let[s,w]=u;return w===void 0||(d[s]=w),d},{}),c=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((d,u)=>{let{class:s,className:w,...g}=u;return Object.entries(g).every(f=>{let[b,j]=f;return Array.isArray(j)?j.includes({...r,...l}[b]):{...r,...l}[b]===j})?[...d,s,w]:d},[]);return ei(t,n,c,i==null?void 0:i.class,i==null?void 0:i.className)};var rt,C,re,ii,wt=0,Qi=[],jt=[],oi=h.__b,ai=h.__r,ri=h.diffed,ni=h.__c,li=h.unmount;function gt(t,e){h.__h&&h.__h(C,t,wt||e),wt=0;var i=C.__H||(C.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:jt}),i.__[t]}function Le(t){return wt=1,to(io,t)}function to(t,e,i){var o=gt(rt++,2);if(o.t=t,!o.__c&&(o.__=[i?i(e):io(void 0,e),function(l){var c=o.__N?o.__N[0]:o.__[0],d=o.t(c,l);c!==d&&(o.__N=[d,o.__[1]],o.__c.setState({}))}],o.__c=C,!C.u)){var a=function(l,c,d){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(w){return w.__c});if(u.every(function(w){return!w.__N}))return!r||r.call(this,l,c,d);var s=!1;return u.forEach(function(w){if(w.__N){var g=w.__[0];w.__=w.__N,w.__N=void 0,g!==w.__[0]&&(s=!0)}}),!(!s&&o.__c.props===l)&&(!r||r.call(this,l,c,d))};C.u=!0;var r=C.shouldComponentUpdate,n=C.componentWillUpdate;C.componentWillUpdate=function(l,c,d){if(this.__e){var u=r;r=void 0,a(l,c,d),r=u}n&&n.call(this,l,c,d)},C.shouldComponentUpdate=a}return o.__N||o.__}function He(t,e){var i=gt(rt++,3);!h.__s&&Re(i.__H,e)&&(i.__=t,i.i=e,C.__H.__h.push(i))}function pt(t,e){var i=gt(rt++,4);!h.__s&&Re(i.__H,e)&&(i.__=t,i.i=e,C.__h.push(i))}function Tt(t){return wt=5,nt(function(){return{current:t}},[])}function pa(t,e,i){wt=6,pt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},i==null?i:i.concat(t))}function nt(t,e){var i=gt(rt++,7);return Re(i.__H,e)?(i.__V=t(),i.i=e,i.__h=t,i.__V):i.__}function ha(t,e){return wt=8,nt(function(){return t},e)}function eo(t){var e=C.context[t.__c],i=gt(rt++,9);return i.c=t,e?(i.__==null&&(i.__=!0,e.sub(C)),e.props.value):t.__}function fa(t,e){h.useDebugValue&&h.useDebugValue(e?e(t):t)}function wa(){var t=gt(rt++,11);if(!t.__){for(var e=C.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var i=e.__m||(e.__m=[0,0]);t.__="P"+i[0]+"-"+i[1]++}return t.__}function ga(){for(var t;t=Qi.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Dt),t.__H.__h.forEach(be),t.__H.__h=[]}catch(e){t.__H.__h=[],h.__e(e,t.__v)}}h.__b=function(t){C=null,oi&&oi(t)},h.__r=function(t){ai&&ai(t),rt=0;var e=(C=t.__c).__H;e&&(re===C?(e.__h=[],C.__h=[],e.__.forEach(function(i){i.__N&&(i.__=i.__N),i.__V=jt,i.__N=i.i=void 0})):(e.__h.forEach(Dt),e.__h.forEach(be),e.__h=[],rt=0)),re=C},h.diffed=function(t){ri&&ri(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Qi.push(e)!==1&&ii===h.requestAnimationFrame||((ii=h.requestAnimationFrame)||ba)(ga)),e.__H.__.forEach(function(i){i.i&&(i.__H=i.i),i.__V!==jt&&(i.__=i.__V),i.i=void 0,i.__V=jt})),re=C=null},h.__c=function(t,e){e.some(function(i){try{i.__h.forEach(Dt),i.__h=i.__h.filter(function(o){return!o.__||be(o)})}catch(o){e.some(function(a){a.__h&&(a.__h=[])}),e=[],h.__e(o,i.__v)}}),ni&&ni(t,e)},h.unmount=function(t){li&&li(t);var e,i=t.__c;i&&i.__H&&(i.__H.__.forEach(function(o){try{Dt(o)}catch(a){e=a}}),i.__H=void 0,e&&h.__e(e,i.__v))};var si=typeof requestAnimationFrame=="function";function ba(t){var e,i=function(){clearTimeout(o),si&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(i,100);si&&(e=requestAnimationFrame(i))}function Dt(t){var e=C,i=t.__c;typeof i=="function"&&(t.__c=void 0,i()),C=e}function be(t){var e=C;t.__c=t.__(),C=e}function Re(t,e){return!t||t.length!==e.length||e.some(function(i,o){return i!==t[o]})}function io(t,e){return typeof e=="function"?e(t):e}function oo(t,e){for(var i in e)t[i]=e[i];return t}function ve(t,e){for(var i in t)if(i!=="__source"&&!(i in e))return!0;for(var o in e)if(o!=="__source"&&t[o]!==e[o])return!0;return!1}function ne(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function _e(t){this.props=t}function va(t,e){function i(a){var r=this.props.ref,n=r==a.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,a)||!n:ve(this.props,a)}function o(a){return this.shouldComponentUpdate=i,B(t,a)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(_e.prototype=new H).isPureReactComponent=!0,_e.prototype.shouldComponentUpdate=function(t,e){return ve(this.props,t)||ve(this.state,e)};var ci=h.__b;h.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ci&&ci(t)};var _a=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ao(t){function e(i){var o=oo({},i);return delete o.ref,t(o,i.ref||null)}return e.$$typeof=_a,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var di=function(t,e){return t==null?null:Z(Z(t).map(e))},ma={map:di,forEach:di,count:function(t){return t?Z(t).length:0},only:function(t){var e=Z(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Z},ya=h.__e;h.__e=function(t,e,i,o){if(t.then){for(var a,r=e;r=r.__;)if((a=r.__c)&&a.__c)return e.__e==null&&(e.__e=i.__e,e.__k=i.__k),a.__c(t,e)}ya(t,e,i,o)};var ui=h.unmount;function ro(t,e,i){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),t.__c.__H=null),(t=oo({},t)).__c!=null&&(t.__c.__P===i&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(o){return ro(o,e,i)})),t}function no(t,e,i){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return no(o,e,i)}),t.__c&&t.__c.__P===e&&(t.__e&&i.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=i)),t}function kt(){this.__u=0,this.t=null,this.__b=null}function lo(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function so(t){var e,i,o;function a(r){if(e||(e=t()).then(function(n){i=n.default||n},function(n){o=n}),o)throw o;if(!i)throw e;return B(i,r)}return a.displayName="Lazy",a.__f=!0,a}function mt(){this.u=null,this.o=null}h.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),ui&&ui(t)},(kt.prototype=new H).__c=function(t,e){var i=e.__c,o=this;o.t==null&&(o.t=[]),o.t.push(i);var a=lo(o.__v),r=!1,n=function(){r||(r=!0,i.__R=null,a?a(l):l())};i.__R=n;var l=function(){if(!--o.__u){if(o.state.__a){var d=o.state.__a;o.__v.__k[0]=no(d,d.__c.__P,d.__c.__O)}var u;for(o.setState({__a:o.__b=null});u=o.t.pop();)u.forceUpdate()}},c=e.__h===!0;o.__u++||c||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(n,n)},kt.prototype.componentWillUnmount=function(){this.t=[]},kt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=ro(this.__b,i,o.__O=o.__P)}this.__b=null}var a=e.__a&&B(L,null,t.fallback);return a&&(a.__h=null),[B(L,null,e.__a?null:t.children),a]};var pi=function(t,e,i){if(++i[1]===i[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(i=t.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;t.u=i=i[2]}};function xa(t){return this.getChildContext=function(){return t.context},t.children}function ka(t){var e=this,i=t.i;e.componentWillUnmount=function(){ut(null,e.l),e.l=null,e.i=null},e.i&&e.i!==i&&e.componentWillUnmount(),t.__v?(e.l||(e.i=i,e.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(o){this.childNodes.push(o),e.i.appendChild(o)},insertBefore:function(o,a){this.childNodes.push(o),e.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),e.i.removeChild(o)}}),ut(B(xa,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function $a(t,e){var i=B(ka,{__v:t,i:e});return i.containerInfo=e,i}(mt.prototype=new H).__a=function(t){var e=this,i=lo(e.__v),o=e.o.get(t);return o[0]++,function(a){var r=function(){e.props.revealOrder?(o.push(a),pi(e,t,o)):a()};i?i(r):r()}},mt.prototype.render=function(t){this.u=null,this.o=new Map;var e=Z(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var i=e.length;i--;)this.o.set(e[i],this.u=[1,0,this.u]);return t.children},mt.prototype.componentDidUpdate=mt.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,i){pi(t,i,e)})};var co=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Sa=/^(?: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]/,Ca=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ea=/[A-Z0-9]/g,Pa=typeof document<"u",Ta=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function za(t,e,i){return e.__k==null&&(e.textContent=""),ut(t,e),typeof i=="function"&&i(),t?t.__c:null}function Ia(t,e,i){return Gi(t,e),typeof i=="function"&&i(),t?t.__c:null}H.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(H.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var hi=h.event;function Oa(){}function ja(){return this.cancelBubble}function Da(){return this.defaultPrevented}h.event=function(t){return hi&&(t=hi(t)),t.persist=Oa,t.isPropagationStopped=ja,t.isDefaultPrevented=Da,t.nativeEvent=t};var Ue,Na={enumerable:!1,configurable:!0,get:function(){return this.class}},fi=h.vnode;h.vnode=function(t){typeof t.type=="string"&&function(e){var i=e.props,o=e.type,a={};for(var r in i){var n=i[r];if(!(r==="value"&&"defaultValue"in i&&n==null||Pa&&r==="children"&&o==="noscript"||r==="class"||r==="className")){var l=r.toLowerCase();r==="defaultValue"&&"value"in i&&i.value==null?r="value":r==="download"&&n===!0?n="":l==="ondoubleclick"?r="ondblclick":l!=="onchange"||o!=="input"&&o!=="textarea"||Ta(i.type)?l==="onfocus"?r="onfocusin":l==="onblur"?r="onfocusout":Ca.test(r)?r=l:o.indexOf("-")===-1&&Sa.test(r)?r=r.replace(Ea,"-$&").toLowerCase():n===null&&(n=void 0):l=r="oninput",l==="oninput"&&a[r=l]&&(r="oninputCapture"),a[r]=n}}o=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=Z(i.children).forEach(function(c){c.props.selected=a.value.indexOf(c.props.value)!=-1})),o=="select"&&a.defaultValue!=null&&(a.value=Z(i.children).forEach(function(c){c.props.selected=a.multiple?a.defaultValue.indexOf(c.props.value)!=-1:a.defaultValue==c.props.value})),i.class&&!i.className?(a.class=i.class,Object.defineProperty(a,"className",Na)):(i.className&&!i.class||i.class&&i.className)&&(a.class=a.className=i.className),e.props=a}(t),t.$$typeof=co,fi&&fi(t)};var wi=h.__r;h.__r=function(t){wi&&wi(t),Ue=t.__c};var gi=h.diffed;h.diffed=function(t){gi&&gi(t);var e=t.props,i=t.__e;i!=null&&t.type==="textarea"&&"value"in e&&e.value!==i.value&&(i.value=e.value==null?"":e.value),Ue=null};var Aa={ReactCurrentDispatcher:{current:{readContext:function(t){return Ue.__n[t.__c].props.value}}}};function Ba(t){return B.bind(null,t)}function uo(t){return!!t&&t.$$typeof===co}function Fa(t){return uo(t)?ua.apply(null,arguments):t}function Ma(t){return!!t.__k&&(ut(null,t),!0)}function La(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ha=function(t,e){return t(e)},Ra=function(t,e){return t(e)},Ua=L;function po(t){t()}function Va(t){return t}function Wa(){return[!1,po]}var Ya=pt;function Ka(t,e){var i=e(),o=Le({h:{__:i,v:e}}),a=o[0].h,r=o[1];return pt(function(){a.__=i,a.v=e,ne(a.__,e())||r({h:a})},[t,i,e]),He(function(){return ne(a.__,a.v())||r({h:a}),t(function(){ne(a.__,a.v())||r({h:a})})},[t]),i}var qa={useState:Le,useId:wa,useReducer:to,useEffect:He,useLayoutEffect:pt,useInsertionEffect:Ya,useTransition:Wa,useDeferredValue:Va,useSyncExternalStore:Ka,startTransition:po,useRef:Tt,useImperativeHandle:pa,useMemo:nt,useCallback:ha,useContext:eo,useDebugValue:fa,version:"17.0.2",Children:ma,render:za,hydrate:Ia,unmountComponentAtNode:Ma,createPortal:$a,createElement:B,createContext:Zi,createFactory:Ba,cloneElement:Fa,createRef:na,Fragment:L,isValidElement:uo,findDOMNode:La,Component:H,PureComponent:_e,memo:va,forwardRef:ao,flushSync:Ra,unstable_batchedUpdates:Ha,StrictMode:Ua,Suspense:kt,SuspenseList:mt,lazy:so,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Aa};const N=Symbol.for("@ts-pattern/matcher"),ho=Symbol.for("@ts-pattern/isVariadic"),Wt="@ts-pattern/anonymous-select-key",me=t=>!!(t&&typeof t=="object"),Nt=t=>t&&!!t[N],P=(t,e,i)=>{if(Nt(t)){const o=t[N](),{matched:a,selections:r}=o.match(e);return a&&r&&Object.keys(r).forEach(n=>i(n,r[n])),a}if(me(t)){if(!me(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let o=[],a=[],r=[];for(const n of t.keys()){const l=t[n];Nt(l)&&l[ho]?r.push(l):r.length?a.push(l):o.push(l)}if(r.length){if(r.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<o.length+a.length)return!1;const n=e.slice(0,o.length),l=a.length===0?[]:e.slice(-a.length),c=e.slice(o.length,a.length===0?1/0:-a.length);return o.every((d,u)=>P(d,n[u],i))&&a.every((d,u)=>P(d,l[u],i))&&(r.length===0||P(r[0],c,i))}return t.length===e.length&&t.every((n,l)=>P(n,e[l],i))}return Reflect.ownKeys(t).every(o=>{const a=t[o];return(o in e||Nt(r=a)&&r[N]().matcherType==="optional")&&P(a,e[o],i);var r})}return Object.is(e,t)},D=t=>{var e,i,o;return me(t)?Nt(t)?(e=(i=(o=t[N]()).getSelectionKeys)==null?void 0:i.call(o))!=null?e:[]:Array.isArray(t)?Ct(t,D):Ct(Object.values(t),D):[]},Ct=(t,e)=>t.reduce((i,o)=>i.concat(e(o)),[]);function Xa(...t){if(t.length===1){const[e]=t;return i=>P(e,i,()=>{})}if(t.length===2){const[e,i]=t;return P(e,i,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function z(t){return Object.assign(t,{optional:()=>Ve(t),and:e=>S(t,e),or:e=>fo(t,e),select:e=>e===void 0?Et(t):Et(e,t)})}function ye(t){return Object.assign((e=>Object.assign(e,{[Symbol.iterator](){let i=0;const o=[{value:Object.assign(e,{[ho]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=o[i++])!=null?a:o.at(-1)}}}}))(t),{optional:()=>ye(Ve(t)),select:e=>ye(e===void 0?Et(t):Et(e,t))})}function Ve(t){return z({[N]:()=>({match:e=>{let i={};const o=(a,r)=>{i[a]=r};return e===void 0?(D(t).forEach(a=>o(a,void 0)),{matched:!0,selections:i}):{matched:P(t,e,o),selections:i}},getSelectionKeys:()=>D(t),matcherType:"optional"})})}const Ga=(t,e)=>{for(const i of t)if(!e(i))return!1;return!0},Za=(t,e)=>{for(const[i,o]of t.entries())if(!e(o,i))return!1;return!0},Ja=(t,e)=>{const i=Reflect.ownKeys(t);for(const o of i)if(!e(o,t[o]))return!1;return!0};function S(...t){return z({[N]:()=>({match:e=>{let i={};const o=(a,r)=>{i[a]=r};return{matched:t.every(a=>P(a,e,o)),selections:i}},getSelectionKeys:()=>Ct(t,D),matcherType:"and"})})}function fo(...t){return z({[N]:()=>({match:e=>{let i={};const o=(a,r)=>{i[a]=r};return Ct(t,D).forEach(a=>o(a,void 0)),{matched:t.some(a=>P(a,e,o)),selections:i}},getSelectionKeys:()=>Ct(t,D),matcherType:"or"})})}function m(t){return{[N]:()=>({match:e=>({matched:!!t(e)})})}}function Et(...t){const e=typeof t[0]=="string"?t[0]:void 0,i=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return z({[N]:()=>({match:o=>{let a={[e??Wt]:o};return{matched:i===void 0||P(i,o,(r,n)=>{a[r]=n}),selections:a}},getSelectionKeys:()=>[e??Wt].concat(i===void 0?[]:D(i))})})}function wo(t){return!0}function V(t){return typeof t=="number"}function J(t){return typeof t=="string"}function Q(t){return typeof t=="bigint"}const go=z(m(wo)),Qa=z(m(wo)),tr=go,tt=t=>Object.assign(z(t),{startsWith:e=>{return tt(S(t,(i=e,m(o=>J(o)&&o.startsWith(i)))));var i},endsWith:e=>{return tt(S(t,(i=e,m(o=>J(o)&&o.endsWith(i)))));var i},minLength:e=>tt(S(t,(i=>m(o=>J(o)&&o.length>=i))(e))),length:e=>tt(S(t,(i=>m(o=>J(o)&&o.length===i))(e))),maxLength:e=>tt(S(t,(i=>m(o=>J(o)&&o.length<=i))(e))),includes:e=>{return tt(S(t,(i=e,m(o=>J(o)&&o.includes(i)))));var i},regex:e=>{return tt(S(t,(i=e,m(o=>J(o)&&!!o.match(i)))));var i}}),bi=tt(m(J)),W=t=>Object.assign(z(t),{between:(e,i)=>W(S(t,((o,a)=>m(r=>V(r)&&o<=r&&a>=r))(e,i))),lt:e=>W(S(t,(i=>m(o=>V(o)&&o<i))(e))),gt:e=>W(S(t,(i=>m(o=>V(o)&&o>i))(e))),lte:e=>W(S(t,(i=>m(o=>V(o)&&o<=i))(e))),gte:e=>W(S(t,(i=>m(o=>V(o)&&o>=i))(e))),int:()=>W(S(t,m(e=>V(e)&&Number.isInteger(e)))),finite:()=>W(S(t,m(e=>V(e)&&Number.isFinite(e)))),positive:()=>W(S(t,m(e=>V(e)&&e>0))),negative:()=>W(S(t,m(e=>V(e)&&e<0)))}),er=W(m(V)),et=t=>Object.assign(z(t),{between:(e,i)=>et(S(t,((o,a)=>m(r=>Q(r)&&o<=r&&a>=r))(e,i))),lt:e=>et(S(t,(i=>m(o=>Q(o)&&o<i))(e))),gt:e=>et(S(t,(i=>m(o=>Q(o)&&o>i))(e))),lte:e=>et(S(t,(i=>m(o=>Q(o)&&o<=i))(e))),gte:e=>et(S(t,(i=>m(o=>Q(o)&&o>=i))(e))),positive:()=>et(S(t,m(e=>Q(e)&&e>0))),negative:()=>et(S(t,m(e=>Q(e)&&e<0)))}),ir=et(m(Q)),or=z(m(function(t){return typeof t=="boolean"})),ar=z(m(function(t){return typeof t=="symbol"})),rr=z(m(function(t){return t==null})),nr=z(m(function(t){return t!=null}));var yt={__proto__:null,matcher:N,optional:Ve,array:function(...t){return ye({[N]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const i=t[0];let o={};if(e.length===0)return D(i).forEach(r=>{o[r]=[]}),{matched:!0,selections:o};const a=(r,n)=>{o[r]=(o[r]||[]).concat([n])};return{matched:e.every(r=>P(i,r,a)),selections:o}},getSelectionKeys:()=>t.length===0?[]:D(t[0])})})},set:function(...t){return z({[N]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let i={};if(e.size===0)return{matched:!0,selections:i};if(t.length===0)return{matched:!0};const o=(r,n)=>{i[r]=(i[r]||[]).concat([n])},a=t[0];return{matched:Ga(e,r=>P(a,r,o)),selections:i}},getSelectionKeys:()=>t.length===0?[]:D(t[0])})})},map:function(...t){return z({[N]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let i={};if(e.size===0)return{matched:!0,selections:i};const o=(l,c)=>{i[l]=(i[l]||[]).concat([c])};if(t.length===0)return{matched:!0};var a;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=t[0])==null?void 0:a.toString()}`);const[r,n]=t;return{matched:Za(e,(l,c)=>{const d=P(r,c,o),u=P(n,l,o);return d&&u}),selections:i}},getSelectionKeys:()=>t.length===0?[]:[...D(t[0]),...D(t[1])]})})},record:function(...t){return z({[N]:()=>({match:e=>{if(e===null||typeof e!="object"||Array.isArray(e))return{matched:!1};var i;if(t.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(i=t[0])==null?void 0:i.toString()}`);let o={};const a=(l,c)=>{o[l]=(o[l]||[]).concat([c])},[r,n]=t.length===1?[bi,t[0]]:t;return{matched:Ja(e,(l,c)=>{const d=typeof l!="string"||Number.isNaN(Number(l))?null:Number(l),u=d!==null&&P(r,d,a),s=P(r,l,a),w=P(n,c,a);return(s||u)&&w}),selections:o}},getSelectionKeys:()=>t.length===0?[]:[...D(t[0]),...D(t[1])]})})},intersection:S,union:fo,not:function(t){return z({[N]:()=>({match:e=>({matched:!P(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:m,select:Et,any:go,unknown:Qa,_:tr,string:bi,number:er,bigint:ir,boolean:or,symbol:ar,nullish:rr,nonNullable:nr,instanceOf:function(t){return z(m(function(e){return i=>i instanceof e}(t)))},shape:function(t){return z(m(Xa(t)))}};class lr extends Error{constructor(e){let i;try{i=JSON.stringify(e)}catch{i=e}super(`Pattern matching error: no pattern matches value ${i}`),this.input=void 0,this.input=e}}const xe={matched:!1,value:void 0};function Qt(t){return new Yt(t,xe)}class Yt{constructor(e,i){this.input=void 0,this.state=void 0,this.input=e,this.state=i}with(...e){if(this.state.matched)return this;const i=e[e.length-1],o=[e[0]];let a;e.length===3&&typeof e[1]=="function"?a=e[1]:e.length>2&&o.push(...e.slice(1,e.length-1));let r=!1,n={};const l=(d,u)=>{r=!0,n[d]=u},c=!o.some(d=>P(d,this.input,l))||a&&!a(this.input)?xe:{matched:!0,value:i(r?Wt in n?n[Wt]:n:this.input,this.input)};return new Yt(this.input,c)}when(e,i){if(this.state.matched)return this;const o=!!e(this.input);return new Yt(this.input,o?{matched:!0,value:i(this.input,this.input)}:xe)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=sr){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function sr(t){throw new lr(t)}var cr=["other","few","many","two","one","zero"],vi=({terms:t,overrides:e,locale:i})=>{const o=new Intl.PluralRules(i);function a(r,n){const l=(e==null?void 0:e[r])??t[r];switch(typeof l){case"string":return l.replace(/{{(\w+)}}/g,(c,d)=>{var u;return((u=n==null?void 0:n[d])==null?void 0:u.toString())??""});case"object":{if(typeof(n==null?void 0:n.count)!="number")throw new Error(`Missing count for translation key “${r.toString()}”`);let c=o.select(n.count);if(!(c in l)){const d=cr.find(u=>u in l);if(!d)throw new Error(`Missing plural rule for translation key “${r.toString()}”`);c=d}return l[c].replace(/{{(\w+)}}/g,(d,u)=>{var s;return((s=n==null?void 0:n[u])==null?void 0:s.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${r.toString()}”.`)}}return a},dr=0;function p(t,e,i,o,a,r){var n,l,c={};for(l in e)l=="ref"?n=e[l]:c[l]=e[l];var d={type:t,props:c,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--dr,__source:a,__self:r};if(typeof t=="function"&&(n=t.defaultProps))for(l in n)c[l]===void 0&&(c[l]=n[l]);return h.vnode&&h.vnode(d),d}var _i=Zi(null),bo=t=>({defaultTerms:t,TranslationProvider:({terms:e,children:i,locale:o})=>{const a=nt(()=>vi({locale:o,terms:t,overrides:e}),[e,o]);return p(_i.Provider,{value:{t:a,locale:o},children:i})},useTranslation:()=>{const e=eo(_i);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:i})=>vi({terms:t,overrides:e,locale:i})}),{TranslationProvider:hn,useTranslation:fn,createTFunction:wn,defaultTerms:ur}=bo({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",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_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:pr,useTranslation:te,createTFunction:hr}=bo({...ur,error_heading:"Something unexpected happened",undo:"Undo",conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",skip:"Skip",skipped:"Skipped",submission_closed:"This role is no longer accepting applications.",submission_duplicate:"It looks like you've already applied for this role.",submission_retryable:"We couldn't submit your application. Please try again.",submission_unknown:"We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",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",minimize:"Minimise"});function We(t,e){if(!t)throw new Error(e)}var ke=t=>t===null||typeof t!="object"?t:Array.isArray(t)?t.map(ke):Object.keys(t).sort().reduce((e,i)=>(e[i]=ke(t[i]),e),{}),fr=t=>{let e=JSON.stringify(ke(t)),i=5381;for(let o=0;o<e.length;o++)i=i*33^e.charCodeAt(o);return(i>>>0).toString(36)},wr=Symbol.for("preact-signals");function Ye(){if(ft>1)ft--;else{for(var t,e=!1;$t!==void 0;){var i=$t;for($t=void 0,$e++;i!==void 0;){var o=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&_o(i))try{i.c()}catch(a){e||(t=a,e=!0)}i=o}}if($e=0,ft--,e)throw t}}var k=void 0,$t=void 0,ft=0,$e=0,Kt=0;function vo(t){if(k!==void 0){var e=t.n;if(e===void 0||e.t!==k)return e={i:0,S:t,p:k.s,n:void 0,t:k,e:void 0,x:void 0,r:e},k.s!==void 0&&(k.s.n=e),k.s=e,t.n=e,32&k.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=k.s,e.n=void 0,k.s.n=e,k.s=e),e}}function O(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}O.prototype.brand=wr;O.prototype.h=function(){return!0};O.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};O.prototype.U=function(t){if(this.t!==void 0){var e=t.e,i=t.x;e!==void 0&&(e.x=i,t.e=void 0),i!==void 0&&(i.e=e,t.x=void 0),t===this.t&&(this.t=i)}};O.prototype.subscribe=function(t){var e=this;return qe(function(){var i=e.value,o=k;k=void 0;try{t(i)}finally{k=o}})};O.prototype.valueOf=function(){return this.value};O.prototype.toString=function(){return this.value+""};O.prototype.toJSON=function(){return this.value};O.prototype.peek=function(){var t=k;k=void 0;try{return this.value}finally{k=t}};Object.defineProperty(O.prototype,"value",{get:function(){var t=vo(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if($e>100)throw new Error("Cycle detected");this.v=t,this.i++,Kt++,ft++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Ye()}}}});function G(t){return new O(t)}function _o(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function mo(t){for(var e=t.s;e!==void 0;e=e.n){var i=e.S.n;if(i!==void 0&&(e.r=i),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function yo(t){for(var e=t.s,i=void 0;e!==void 0;){var o=e.p;e.i===-1?(e.S.U(e),o!==void 0&&(o.n=e.n),e.n!==void 0&&(e.n.p=o)):i=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=o}t.s=i}function bt(t){O.call(this,void 0),this.x=t,this.s=void 0,this.g=Kt-1,this.f=4}(bt.prototype=new O).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Kt))return!0;if(this.g=Kt,this.f|=1,this.i>0&&!_o(this))return this.f&=-2,!0;var t=k;try{mo(this),k=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return k=t,yo(this),this.f&=-2,!0};bt.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}O.prototype.S.call(this,t)};bt.prototype.U=function(t){if(this.t!==void 0&&(O.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};bt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(bt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=vo(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function gr(t){return new bt(t)}function xo(t){var e=t.u;if(t.u=void 0,typeof e=="function"){ft++;var i=k;k=void 0;try{e()}catch(o){throw t.f&=-2,t.f|=8,Ke(t),o}finally{k=i,Ye()}}}function Ke(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,xo(t)}function br(t){if(k!==this)throw new Error("Out-of-order effect");yo(this),k=t,this.f&=-2,8&this.f&&Ke(this),Ye()}function zt(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};zt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,xo(this),mo(this),ft++;var t=k;return k=this,br.bind(this,t)};zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=$t,$t=this)};zt.prototype.d=function(){this.f|=8,1&this.f||Ke(this)};function qe(t){var e=new zt(t);try{e.c()}catch(i){throw e.d(),i}return e.d.bind(e)}var le;function vt(t,e){h[t]=e.bind(null,h[t]||function(){})}function qt(t){le&&le(),le=t&&t.S()}function ko(t){var e=this,i=t.data,o=_r(i);o.value=i;var a=nt(function(){for(var r=e.__v;r=r.__;)if(r.__c){r.__c.__$f|=4;break}return e.__$u.c=function(){var n;!Mi(a.peek())&&((n=e.base)==null?void 0:n.nodeType)===3?e.base.data=a.peek():(e.__$f|=1,e.setState({}))},gr(function(){var n=o.value.value;return n===0?0:n===!0?"":n||""})},[]);return a.value}ko.displayName="_st";Object.defineProperties(O.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}});vt("__b",function(t,e){if(typeof e.type=="string"){var i,o=e.props;for(var a in o)if(a!=="children"){var r=o[a];r instanceof O&&(i||(e.__np=i={}),i[a]=r,o[a]=r.peek())}}t(e)});vt("__r",function(t,e){qt();var i,o=e.__c;o&&(o.__$f&=-2,(i=o.__$u)===void 0&&(o.__$u=i=function(a){var r;return qe(function(){r=this}),r.c=function(){o.__$f|=1,o.setState({})},r}())),qt(i),t(e)});vt("__e",function(t,e,i,o){qt(),t(e,i,o)});vt("diffed",function(t,e){qt();var i;if(typeof e.type=="string"&&(i=e.__e)){var o=e.__np,a=e.props;if(o){var r=i.U;if(r)for(var n in r){var l=r[n];l!==void 0&&!(n in o)&&(l.d(),r[n]=void 0)}else i.U=r={};for(var c in o){var d=r[c],u=o[c];d===void 0?(d=vr(i,c,u,a),r[c]=d):d.o(u,a)}}}t(e)});function vr(t,e,i,o){var a=e in t&&t.ownerSVGElement===void 0,r=G(i);return{o:function(n,l){r.value=n,o=l},d:qe(function(){var n=r.value.value;o[e]!==n&&(o[e]=n,a?t[e]=n:n?t.setAttribute(e,n):t.removeAttribute(e))})}}vt("unmount",function(t,e){if(typeof e.type=="string"){var i=e.__e;if(i){var o=i.U;if(o){i.U=void 0;for(var a in o){var r=o[a];r&&r.d()}}}}else{var n=e.__c;if(n){var l=n.__$u;l&&(n.__$u=void 0,l.d())}}t(e)});vt("__h",function(t,e,i,o){(o<3||o===9)&&(e.__$f|=2),t(e,i,o)});H.prototype.shouldComponentUpdate=function(t,e){var i=this.__$u;if(!(i&&i.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var o in e)return!0;for(var a in t)if(a!=="__source"&&t[a]!==this.props[a])return!0;for(var r in this.props)if(!(r in t))return!0;return!1};function _r(t){return nt(function(){return G(t)},[])}const Se=(t,e)=>e.some(i=>t instanceof i);let mi,yi;function mr(){return mi||(mi=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function yr(){return yi||(yi=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Ce=new WeakMap,se=new WeakMap,ee=new WeakMap;function xr(t){const e=new Promise((i,o)=>{const a=()=>{t.removeEventListener("success",r),t.removeEventListener("error",n)},r=()=>{i(dt(t.result)),a()},n=()=>{o(t.error),a()};t.addEventListener("success",r),t.addEventListener("error",n)});return ee.set(e,t),e}function kr(t){if(Ce.has(t))return;const e=new Promise((i,o)=>{const a=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",n),t.removeEventListener("abort",n)},r=()=>{i(),a()},n=()=>{o(t.error||new DOMException("AbortError","AbortError")),a()};t.addEventListener("complete",r),t.addEventListener("error",n),t.addEventListener("abort",n)});Ce.set(t,e)}let Ee={get(t,e,i){if(t instanceof IDBTransaction){if(e==="done")return Ce.get(t);if(e==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return dt(t[e])},set(t,e,i){return t[e]=i,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function $o(t){Ee=t(Ee)}function $r(t){return yr().includes(t)?function(...e){return t.apply(Pe(this),e),dt(this.request)}:function(...e){return dt(t.apply(Pe(this),e))}}function Sr(t){return typeof t=="function"?$r(t):(t instanceof IDBTransaction&&kr(t),Se(t,mr())?new Proxy(t,Ee):t)}function dt(t){if(t instanceof IDBRequest)return xr(t);if(se.has(t))return se.get(t);const e=Sr(t);return e!==t&&(se.set(t,e),ee.set(e,t)),e}const Pe=t=>ee.get(t);function Cr(t,e,{blocked:i,upgrade:o,blocking:a,terminated:r}={}){const n=indexedDB.open(t,e),l=dt(n);return o&&n.addEventListener("upgradeneeded",c=>{o(dt(n.result),c.oldVersion,c.newVersion,dt(n.transaction),c)}),i&&n.addEventListener("blocked",c=>i(c.oldVersion,c.newVersion,c)),l.then(c=>{r&&c.addEventListener("close",()=>r()),a&&c.addEventListener("versionchange",d=>a(d.oldVersion,d.newVersion,d))}).catch(()=>{}),l}const Er=["get","getKey","getAll","getAllKeys","count"],Pr=["put","add","delete","clear"],ce=new Map;function xi(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(ce.get(e))return ce.get(e);const i=e.replace(/FromIndex$/,""),o=e!==i,a=Pr.includes(i);if(!(i in(o?IDBIndex:IDBObjectStore).prototype)||!(a||Er.includes(i)))return;const r=async function(n,...l){const c=this.transaction(n,a?"readwrite":"readonly");let d=c.store;return o&&(d=d.index(l.shift())),(await Promise.all([d[i](...l),a&&c.done]))[0]};return ce.set(e,r),r}$o(t=>({...t,get:(e,i,o)=>xi(e,i)||t.get(e,i,o),has:(e,i)=>!!xi(e,i)||t.has(e,i)}));const Tr=["continue","continuePrimaryKey","advance"],ki={},Te=new WeakMap,So=new WeakMap,zr={get(t,e){if(!Tr.includes(e))return t[e];let i=ki[e];return i||(i=ki[e]=function(...o){Te.set(this,So.get(this)[e](...o))}),i}};async function*Ir(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const i=new Proxy(e,zr);for(So.set(i,e),ee.set(i,Pe(e));e;)yield i,e=await(Te.get(i)||e.continue()),Te.delete(i)}function $i(t,e){return e===Symbol.asyncIterator&&Se(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Se(t,[IDBIndex,IDBObjectStore])}$o(t=>({...t,get(e,i,o){return $i(e,i)?Ir:t.get(e,i,o)},has(e,i){return $i(e,i)||t.has(e,i)}}));const At=typeof indexedDB>"u"?void 0:Cr("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}});let Bt,de,_t;const Si=()=>{if(!Bt)return _t;const t=Bt;Bt=void 0;const e=Co(t),i=At==null?void 0:At.then(o=>o.put("state",t.data,e)).finally(()=>{_t===i&&(_t=void 0)});return _t=i,_t},it={getStateData:async(t,e,i)=>{var a;const o=Co({...t,flowKeys:e,context:i});return(a=await At)==null?void 0:a.get("state",o)},setStateData:t=>{Bt=t,clearTimeout(de),de=setTimeout(()=>void Si(),1e3)},flushStateData:()=>(clearTimeout(de),Si()??Promise.resolve())},Or=t=>{const e=t.find(i=>i.isHead);if(!e)throw new Error("No head node found");return e},jr=t=>e=>e?e.type===t:!1;class ct extends Error{constructor(){super("Aborted")}}const Dr=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ci=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Dr()}),Nr=t=>Qt(t).with({nativeEvent:{submitter:yt.select(yt.union(yt.instanceOf(HTMLButtonElement),yt.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),Ft=(t,e,i,o=0)=>{if(!e.nextId)return i(e.id,{stepsMade:o,remainingSteps:0}),{stepsMade:o,remainingSteps:0};const a=t.find(d=>d.id===e.nextId);if(a===void 0)return{stepsMade:o,remainingSteps:0};const r=e.type==="if-block"?e.branchId:void 0,n=t.find(d=>d.id===r),l=e.type.includes("question")?1:0;if(n){const d=l+Math.max(Ft(t,a,i,o+l).remainingSteps,Ft(t,n,i,o+l).remainingSteps);return i(e.id,{stepsMade:o,remainingSteps:d}),{stepsMade:o,remainingSteps:d}}const c=l+Ft(t,a,i,o+l).remainingSteps;return i(e.id,{stepsMade:o,remainingSteps:c}),{stepsMade:o,remainingSteps:c}},Ar=t=>{const e={},i=t.find(o=>o.isHead);return i&&Ft(t,i,(o,a)=>{e[o]=a}),e},Co=t=>[...t.flowKeys,t.id,t.version,t.build,fr(t.context)].join("/"),ot=G({state:"idle"}),lt=t=>{const{state:e,flow:i}=ot.value;if(e!=="loaded")return;We(i,"No flow to update");const o=t(i.data);i.data=o,ot.value={state:e,flow:i},it.setStateData(i)},$={current$:ot,viewState$:G("closed"),prepareFlow:async({flow:t,context:e={},flowKeys:i,title:o,analytics:a,job:r,locationOrigin:n})=>(await it.flushStateData().catch(()=>{}),{data:await it.getStateData(t,i,e)??Ci(),startedAt:new Date,nodeIdToProgress:Ar(t.nodes),flowKeys:i,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:o,analytics:a,job:r,locationOrigin:n}),commitFlow:t=>{ot.value={state:"loaded",flow:t},it.setStateData(t)},cancelCurrentFlow:()=>{ot.value={state:"idle"},$.viewState$.value="closed"},markAsFinished:()=>lt(t=>({...t,isFinished:!0})),markAsInteracted:()=>lt(t=>({...t,hasInteracted:!0})),setCurrentNodeId:t=>lt(e=>(e.nodeHistory.push(t),e)),setApplicationRecovery:async t=>{lt(e=>(t?e.applicationRecovery=t:delete e.applicationRecovery,e)),await it.flushStateData()},restart:()=>{const{state:t,flow:e}=ot.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const i=Ci(),o={...e,data:i,startedAt:new Date};ot.value={state:t,flow:o},it.setStateData(o)},addMessage:(t,e)=>{const i={...t,groupId:e};return lt(o=>(o.messages.push(i),o))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:i}=ot.value;We(e==="loaded","Application not loaded");const o=i.data.messages.filter(a=>!a.groupId||!t.includes(a.groupId));i.data.messages=o,it.setStateData(i)},setSubmission:(t,e)=>lt(i=>(e===null?delete i.submissions[t]:i.submissions[t]=e,i)),setInput:t=>lt(e=>({...e,currentInput:t??null}))},Br=({message:t})=>{const{t:e}=te();return p("div",{class:"flex flex-grow flex-col items-center justify-center",children:[p("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:[p("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"}),p("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"}),p("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),p("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),p("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),p("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),p("path",{d:"M38 56h19"})]}),p("div",{class:"flex flex-col gap-2 text-center",children:[p("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&p("p",{class:"text-neutral-9 text-sm",children:t})]})]})},Eo=t=>p("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[p("title",{children:"Loading"}),p("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)}}"}),p("g",{id:"s1",transform:"translate(12,0)",children:p("g",{id:"s2",transform:"scale(0,0)",children:p("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),p("g",{id:"s3",transform:"translate(12,12)",children:p("g",{id:"s4",transform:"scale(1,1)",children:p("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),p("g",{id:"s5",transform:"translate(12,0)",children:p("g",{id:"s6",transform:"scale(0,0)",children:p("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"})})}),p("g",{id:"s7",transform:"translate(12,0)",children:p("g",{id:"s8",transform:"scale(0,0)",children:p("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"})})})]}),Ei=()=>p("div",{class:"flex flex-grow flex-col items-center justify-center",children:p(Eo,{class:"text-neutral-6 h-8 w-8"})}),Fr=t=>{const i=t/100,o=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-i,o))*100)}%`},Mr=Jt("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"}}),Xt=({class:t,children:e,variant:i,...o})=>p("button",{class:Zt(Mr({variant:i}),t),...o,children:p("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:e})}),Po=()=>p("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Lr=()=>{if($.current$.value.state!=="loaded")return null;const t=$.current$.value.flow.nodeIdToProgress,e=$.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const i=t[e];if(i===void 0)return null;const o=100*(i.stepsMade/(i.remainingSteps+i.stepsMade));return p("div",{class:"bg-accent-3",children:p("div",{style:{width:Fr(o)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Hr=({children:t,params:e})=>{const{t:i}=te(),o=$.viewState$;return p(L,{children:p("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:[p("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:[p("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),p("button",{onClick:()=>{o.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ze,children:p("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),p("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?p("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:Zt({hidden:$.current$.value.state!=="loaded"||o.value!=="maximised"}),children:p("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,$.current$.value.state==="loaded"&&p(Xt,{class:"mx-1","aria-label":"Restart",onClick:()=>{$.restart()},children:[p("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"}),p("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),p(Xt,{class:"view-switch mx-1",onTouchStart:ze,"aria-label":i("minimize"),onClick:()=>o.value="minimised",children:p(Po,{})},"minmax")]})]}),p(Lr,{})]})})};function ze(){}const Rr=so(()=>Promise.resolve().then(()=>require("./chatbot-body-90cadbb9.cjs")).then(t=>t.ChatbotBody)),To=Jt("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"}}}),zo=Jt("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"}}}),Ur=({open:t,...e})=>{const i=Tt(null);return pt(()=>{const o=i.current;o&&(t?o.showModal():o.close())},[t]),p("dialog",{ref:i,...e})},Vr=({logger:t,apiClient:e,analytics:i,talentBankClient:o,params:a})=>{const{state:r,flow:n,error:l}=$.current$.value,c=$.viewState$.value,d=r!=="idle"&&c==="maximised",u=Tt(null),s=n?[...n.data.nodeHistory].reverse().map(w=>n.nodes.find(g=>g.id===w)).find(w=>(w==null?void 0:w.type)==="flow-section"):void 0;return p(pr,{terms:a.terms,locale:void 0,children:[p(Ur,{open:d,onClose:()=>$.viewState$.value="minimised",children:p("div",{ref:u,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:To({view:"maximised"}),children:p("div",{class:zo({view:"maximised"}),children:[p(Hr,{params:a,children:s?p(L,{children:[p("span",{class:"block",children:s.data.title}),p("span",{class:"block truncate text-xs font-normal",children:n==null?void 0:n.title})]}):n==null?void 0:n.title}),Qt({state:r,view:c}).with({state:"idle"},()=>null).with({state:"loading"},()=>p(Ei,{},"loading")).with({state:"loaded"},()=>p(kt,{fallback:p(Ei,{},"loading"),children:p(Rr,{analytics:i,apiClient:e,logger:t,talentBankClient:o})})).with({state:"error"},()=>p(Br,{message:l})).exhaustive()]})})}),c==="minimised"?p(Wr,{flow:n}):null]})},Wr=({flow:t})=>{const{t:e}=te();return p("div",{class:To({view:"minimised",class:"z-100 isolate"}),children:p("div",{class:zo({view:"minimised"}),children:[p("button",{onClick:()=>{$.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ze,children:p("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:t==null?void 0:t.title})}),p("div",{class:"flex items-center px-0.5",children:p(Xt,{class:"mx-1","aria-label":e("close_application"),onClick:$.cancelCurrentFlow,variant:"white",children:p("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Yr=`[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}[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-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-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-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-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-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[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-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[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-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] .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-11:has(+*>input:focus){color:var(--i-color-n-11)}[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)}
2
- `,Io="inploi-chatbot",Ie=`[data-widget='${Io}']`,Kr=()=>({getChatbotElement:()=>document.querySelector(Ie),getOrCreateChatbotElement:()=>{const t=document.querySelector(Ie);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=Io,e}}),qr=25,Oo=G(()=>{}),Xr=(t,e)=>new Promise((i,o)=>{if(e!=null&&e.aborted)return o(new ct);const a=setTimeout(i,t);e==null||e.addEventListener("abort",()=>{clearTimeout(a),o(new ct)},{once:!0})}),at={onSubmitSuccessFn$:G(()=>{}),onInteractionFn$:G(()=>{}),isBotTyping$:G(!1),isReadingHistory$:G(!1),scrollToEnd:()=>Oo.value()},Gr=()=>{const t=Tt(null);pt(()=>{const i=t.current;if(!i)return;const o=()=>{at.isReadingHistory$.value=!1,i.scrollTo({top:i.scrollHeight,behavior:"instant"})};Oo.value=o;const a=()=>{at.isReadingHistory$.value=i.scrollHeight-i.scrollTop-i.clientHeight>2};i.addEventListener("scroll",a,{passive:!0});const r=new ResizeObserver(()=>{at.isReadingHistory$.peek()||o()});return r.observe(i),i.firstElementChild&&r.observe(i.firstElementChild),()=>{i.removeEventListener("scroll",a),r.disconnect()}},[]);const e=nt(()=>({setSubmission:(o,a)=>$.setSubmission(o,a),send:async({message:o,signal:a,groupId:r})=>{if(await Qt(o).with({author:"bot",type:"text"},async n=>{if(a!=null&&a.aborted)throw new ct;at.isBotTyping$.value=!0;const l=Math.min(Math.max(20,n.text.length),100)*qr;try{await Xr(l,a)}finally{at.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new ct;$.addMessage(o,r)},input:({input:o,signal:a})=>{if(a!=null&&a.aborted)throw new ct;return $.setInput(o),new Promise(r=>{const n=l=>{if(a!=null&&a.aborted)throw new ct;$.setInput(void 0),o.key&&$.setSubmission(o.key,l),r(l)};at.onSubmitSuccessFn$.value=n})}}),[]);return{chatRef:t,chatService:e}};var jo=Ho(Ne([M(),Ht()]),Ii(String)),Do=A({id:jo,version:Ht(),build:Ht(),nodes:ji(Oi()),context_schema:Y(Lt(Di(M(),A({required:De(),type:Ne([Mt("string"),Mt("number")])}))))}),Zr=A({flow:Do}),Jr=A({company:A({name:M()}),flow:Do,job:A({id:jo,title:M()}),user:Y(A({city:Y(M()),country:Y(M()),isEU:Y(De()),continent:Y(M())}))}),Qr=St.endpoint({pathname:"/flow/job/:id",method:"GET",schema:{searchParams:St.typed(),response:Jr}}),tn=St.endpoint({pathname:"/flow/id/:id",method:"GET",schema:{response:Zr}}),en=["1","2","3","4","5","6","7","8","9","10","11","12"],on={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]}},an=(t,e=1,i)=>o=>{const[a,r]=on[i][o];return"oklch("+a+"% "+r*e+" "+t+")"},ue=t=>{const e=an(t.hue,t.chroma,t.mode);return Object.fromEntries(en.map(i=>[t.prefix+i,t.transform(e(i))]))},pe=t=>t,rn=t=>{const e=Object.keys(t).flatMap(i=>{const o=t[i];return typeof o=="object"&&o!==null?Object.keys(o).map(a=>{const r=o[a];return[`${String(i)}.${a}`,r]}):[[i,o]]});return Object.fromEntries(e)},Ot=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Oe=(t,...e)=>{if(!e.length)return t;const i=e.shift();if(Ot(t)&&Ot(i))for(const o in i){const a=i[o];if(Ot(a)){t[o]||Object.assign(t,{[o]:{}});const r=t[o];Ot(r)&&Oe(r,a)}else Object.assign(t,{[o]:i[o]})}return Oe(t,...e)},nn=t=>{function e(i,o){const a=[t.prefix,o.toString().replace(/\./g,"-")].join("");return i==="declaration"?`--${a}`:`var(--${a})`}return e},ln=()=>({core:t=>({semantic:e=>({component:i=>({from:o=>{const{theme:a,getToken:r}=o,n=w=>r("reference",w.toString()),l=t({theme:a}),c=e({theme:a,core:n,raw:{core:l}}),d=i({theme:a,core:n,semantic:n,raw:{core:l,semantic:c}}),u=rn(Oe(l,c,d)),s=([w,g],f)=>{const b=[f,w].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(j=>s(j,b)):[[o.getToken("declaration",b),g]]};return{values:u,declarations:Object.fromEntries(Object.entries(u).flatMap(w=>s(w))),ref:w=>r("reference",w.toString())}}})})})});const[he,fe,Pi]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],sn=ln().core(({theme:t})=>({color:{black:he,white:fe,lowest:t.mode==="light"?fe:he,highest:t.mode==="light"?he:fe,...ue({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:pe}),...ue({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:pe}),...ue({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:pe})},typography:{}})).semantic(({core:t,raw:e,theme:i})=>{const o=(a,r)=>e.core.color[a].replace(")",` / ${r})`);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:o("n-8",i.mode==="dark"?.4:.2)},"copy-body":t("color.n-12"),"copy-headings":t("color.n-12"),interactive:{copy:t("color.n-11"),"copy-hover":t("color.n-12"),"copy-active":t("color.n-12"),bg:Pi,"bg-hover":o("n-10",.2),"bg-active":o("n-10",.3)}}}).component(({raw:t,theme:e,semantic:i,core:o})=>{const a=(r,n)=>t.core.color[r].replace(")",` / ${n})`);return{app:{bg:o(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":o(e.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":i("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Pi,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":o(e.mode==="dark"?"color.a-8":"color.a-11")}}}),cn=nn({prefix:"i-"}),dn=t=>{const e=sn.from({theme:t,getToken:cn}),i=Object.entries(e.declarations).map(([o,a])=>`${o}: ${a};`);return`${Ie} {
3
- ${i.concat(i).join(`
4
- `)}
5
- }`},un=({_internal_domManager:t=Kr(),theme:e,terms:i,feedback:o})=>St.createPlugin(({apiClient:a,rpcClient:r,logger:n,analytics:l,publishableKey:c,env:d})=>{let u=!1,s=0;const w=hr({locale:void 0,overrides:i??{}}),g=c&&d?St.createTalentBankClient({environment:d,publishableKey:c,logger:n}):void 0,f=v=>v===s,b=()=>{if(typeof window>"u")return;s++,it.flushStateData().catch(()=>{}),$.cancelCurrentFlow(),at.isBotTyping$.value=!1;const v=t.getChatbotElement();v&&(ut(null,v),v.remove()),u=!1,n.info("Chatbot plugin destroyed")},j=()=>{if(typeof window>"u")return;const v=s,_=[B("style",{id:"inploi-chatbot-styles"},Yr),B("style",{id:"inploi-chatbot-theme"},dn(e))],y=t.getOrCreateChatbotElement();if(ut(B(L,{},[_,B(Vr,{apiClient:a,logger:n,analytics:l,talentBankClient:g,params:{theme:e,terms:i,feedback:o}})]),y),o){const E=T=>{var U,I;if(!f(v))return;const R=(U=t.getChatbotElement())==null?void 0:U.querySelector("dialog");R&&pn({instance:T({rpcClient:r,apiClient:a,logger:n,analytics:l}),theme:e,terms:((I=o.params)==null?void 0:I.terms)??{},host:R})};o.plugin instanceof Promise?o.plugin.then(({feedbackPlugin:T})=>{E(T())}).catch(T=>{n.error("Error preparing feedback plugin",T)}):E(o.plugin)}u=!0},x=async(v,_)=>{if(!f(_))return;aa({context:v.context||{},schema:v.flow.context_schema,logger:n});const y=await $.prepareFlow(v);f(_)&&$.commitFlow(y)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(u)return;j(),n.info("Chatbot plugin prepared")}catch(v){n.error("Error preparing chatbot plugin",v)}},fetchFlowByJobId:async(v,_)=>r.request(Qr,{params:{id:v},searchParams:{id_type:(_==null?void 0:_.idType)==="inploi"?"internal":"external"}}).then(y=>({flow:y.flow,title:y.job.title,flowKeys:[y.job.id,...(_==null?void 0:_.flowKeys)??[]],job:{id:y.job.id,id_type:"external"},..._,context:{user:y.user,..._==null?void 0:_.context}})),fetchFlowById:async(v,_)=>r.request(tn,{params:{id:v}}).then(y=>{var E;return{flow:y.flow,title:"Chatbot",flowKeys:(_==null?void 0:_.flowKeys)??[],..._,analytics:{customProperties:{flow_id:y.flow.id,flow_version:y.flow.version,...(E=_==null?void 0:_.analytics)==null?void 0:E.customProperties}}}}),open:async v=>{if(!(typeof window>"u"))try{$.cancelCurrentFlow(),$.viewState$.value="maximised",u||j();const _=s;v instanceof Promise?($.current$.value={state:"loading"},v.then(y=>x(y,_)).catch(y=>{if(!f(_))return;const E=y instanceof Error?y.message:w("unknown_error");$.current$.value={state:"error",error:E}})):await x(v,_)}catch(_){n.error("Error starting flow",_)}},close:async()=>{typeof window>"u"||($.cancelCurrentFlow(),n.info("Closed flow from an external source"))},destroy:b}});function pn({instance:t,terms:e,theme:i,host:o}){t.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:e,host:o})}exports.$=Yo;exports.AbortedError=ct;exports.B=Jo;exports.ChevronDown=Po;exports.Cn=qa;exports.D=qo;exports.E=Wo;exports.F=nt;exports.H=oa;exports.K=ta;exports.LoadingIndicator=Eo;exports.M=Ko;exports.M$1=Qt;exports.R=Vo;exports.S=Be;exports.SvgIconButton=Xt;exports.U=Go;exports.V=Zo;exports._=Tt;exports.chatStore=at;exports.chatbotPlugin=un;exports.clsx=Zt;exports.cva=Jt;exports.getFormSubmitter=Nr;exports.getHeadOrThrow=Or;exports.h=Le;exports.invariant=We;exports.isSubmissionOfType=jr;exports.k=Bi;exports.k$1=L;exports.k$2=ao;exports.o=p;exports.p=He;exports.store=$;exports.useChatService=Gr;exports.useTranslation=te;exports.y=pt;exports.z=ia;exports.z$1=yt;