@inploi/plugin-chatbot 12.0.1 → 13.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.
- package/cdn/index.js +3 -3
- package/dist/chatbot-body-021bdaa2.cjs +1 -0
- package/dist/{chatbot-body-6bcdaff5.js → chatbot-body-8b03dd46.js} +1415 -1339
- package/dist/chatbot.idb.d.ts +2 -1
- package/dist/chatbot.state.d.ts +7 -1
- package/dist/chatbot.state.test.d.ts +1 -0
- package/dist/i18n.d.ts +30 -0
- package/dist/{index-8ab77244.js → index-1b786e36.js} +297 -289
- package/dist/index-4331f24f.cjs +5 -0
- package/dist/interpreter.d.ts +5 -3
- package/dist/mocks/mocks.utils.d.ts +2 -1
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +4 -4
- package/dist/chatbot-body-0a83b49f.cjs +0 -1
- package/dist/index-0295b2b0.cjs +0 -5
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(){"use strict";var Re;function ei(e){return{lang:(e==null?void 0:e.lang)??(Re==null?void 0:Re.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Re==null?void 0:Re.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Re==null?void 0:Re.abortPipeEarly)}}var Dr;function ns(e){return Dr==null?void 0:Dr.get(e)}var Vr;function is(e){return Vr==null?void 0:Vr.get(e)}var Lr;function as(e,t){var r;return(r=Lr==null?void 0:Lr.get(e))==null?void 0:r.get(t)}function ti(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Fe(e,t,r,n,i){let a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??ti(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},d=e.kind==="schema",p=(i==null?void 0:i.message)??e.message??as(e.reference,l.lang)??(d?is(l.lang):null)??n.message??ns(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ge(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ei())}}}function os(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ss(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function ri(e){return{kind:"transformation",type:"transform",reference:ri,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function ls(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Or(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function ni(){return{kind:"schema",type:"any",reference:ni,expects:"any",async:!1,get"~standard"(){return ge(this)},"~run"(e){return e.typed=!0,e}}}function ii(e,t){return{kind:"schema",type:"array",reference:ii,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ge(this)},"~run"(r,n){var a;let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){let s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){let d={type:"array",origin:"value",input:i,key:o,value:s};for(let p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Fe(this,"type",r,n);return r}}}function Mr(e){return{kind:"schema",type:"boolean",reference:Mr,expects:"boolean",async:!1,message:e,get"~standard"(){return ge(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Fe(this,"type",t,r),t}}}function rr(e,t){return{kind:"schema",type:"literal",reference:rr,expects:ti(e),async:!1,literal:e,message:t,get"~standard"(){return ge(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:Fe(this,"type",r,n),r}}}function nr(e,t){return{kind:"schema",type:"nullable",reference:nr,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ge(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=Or(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ir(e){return{kind:"schema",type:"number",reference:ir,expects:"number",async:!1,message:e,get"~standard"(){return ge(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Fe(this,"type",t,r),t}}}function le(e,t){return{kind:"schema",type:"object",reference:le,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ge(this)},"~run"(r,n){var a;let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in i?i[o]:Or(s),d=s["~run"]({value:l},n);if(d.issues){let p={type:"object",origin:"value",input:i,key:o,value:l};for(let u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=ls(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Fe(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else Fe(this,"type",r,n);return r}}}function Ne(e,t){return{kind:"schema",type:"optional",reference:Ne,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ge(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Or(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ai(e,t,r){return{kind:"schema",type:"record",reference:ai,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ge(this)},"~run"(n,i){var o,s;let a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(let l in a)if(os(a,l)){let d=a[l],p=this.key["~run"]({value:l},i);if(p.issues){let g={type:"object",origin:"key",input:a,key:l,value:d};for(let b of p.issues)b.path=[g],(o=n.issues)==null||o.push(b);if(n.issues||(n.issues=p.issues),i.abortEarly){n.typed=!1;break}}let u=this.value["~run"]({value:d},i);if(u.issues){let g={type:"object",origin:"value",input:a,key:l,value:d};for(let b of u.issues)b.path?b.path.unshift(g):b.path=[g],(s=n.issues)==null||s.push(b);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!p.typed||!u.typed)&&(n.typed=!1),p.typed&&(n.value[p.value]=u.value)}}else Fe(this,"type",n,i);return n}}}function xe(e){return{kind:"schema",type:"string",reference:xe,expects:"string",async:!1,message:e,get"~standard"(){return ge(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Fe(this,"type",t,r),t}}}function oi(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function Pr(e,t){return{kind:"schema",type:"union",reference:Pr,expects:ss(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return ge(this)},"~run"(r,n){let i,a,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];Fe(this,"type",r,n,{issues:oi(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Fe(this,"type",r,n,{issues:oi(o)})}return r}}}function si(){return{kind:"schema",type:"unknown",reference:si,expects:"unknown",async:!1,get"~standard"(){return ge(this)},"~run"(e){return e.typed=!0,e}}}function cs(...e){return{...e[0],pipe:e,get"~standard"(){return ge(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function li(e,t,r){let n=e["~run"]({value:t},ei(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var us=e=>({ok:!0,err:!1,val:e}),ds=e=>({err:!0,ok:!1,val:e}),Ft=(e,t)=>{if(t.length===0)return;let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n]}return r},fs=e=>{let t={};for(let r in e){let n=e[r];n&&(t[r]=n.value)}return t},ps=({key:e,submissions:t})=>{var n;let r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},ci=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let i=Ft(n,t);switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r[e]},hs=e=>{let t=e.split(".").pop();return t?us(t?"."+t:""):ds("No file extension found")},gs=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let i=hs(n.name);return i.ok&&r.includes(i.val.toLowerCase())})},Nt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,ar=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,bs=le({integration_response:le({data:le({redirect_url:xe(),message:Ne(nr(xe())),button_text:Ne(nr(xe()))})})}),vs=e=>li(bs,e).success,ws=le({integration_response:le({error:le({message:xe()})})}),ms=e=>li(ws,e).success;le({success:rr(!1),message:Ne(si())});var ys=e=>{if(typeof e!="object"||e===null)return null;let t=e.integration_response;if(typeof t!="object"||t===null)return null;let r=t;if(typeof r.status!="number"||r.service!==void 0&&typeof r.service!="string")return null;let n="data"in r,i=r.error,a=typeof i=="object"&&i!==null&&typeof i.message=="string"&&"data"in i;if(!n&&!a)return null;let o=n?r.data:i.data??null;return{service:r.service??"INVALID_SERVICE",response:{status:r.status,payload:o}}},_s=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let i=t[n];if(!i)continue;let a=Ft(e,n.split("."));if(i.required&&a==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(i.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}};let Be;function ui(e){return{lang:(e==null?void 0:e.lang)??(Be==null?void 0:Be.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Be==null?void 0:Be.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Be==null?void 0:Be.abortPipeEarly)}}let jr;function xs(e){return jr==null?void 0:jr.get(e)}let Rr;function ks(e){return Rr==null?void 0:Rr.get(e)}let Br;function Ss(e,t){var r;return(r=Br==null?void 0:Br.get(e))==null?void 0:r.get(t)}function di(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function De(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??di(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},d=e.kind==="schema",p=(i==null?void 0:i.message)??e.message??Ss(e.reference,l.lang)??(d?ks(l.lang):null)??n.message??xs(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ke(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ui())}}}function Cs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Es(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function zr(e,t){return{kind:"validation",type:"max_length",reference:zr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&De(this,"length",r,n,{received:`${r.value.length}`}),r}}}function or(e,t){return{kind:"validation",type:"min_length",reference:or,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&De(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Ur(){return{kind:"transformation",type:"trim",reference:Ur,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function $s(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function sr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function fi(e,t){return{kind:"schema",type:"array",reference:fi,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ke(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const d={type:"array",origin:"value",input:i,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else De(this,"type",r,n);return r}}}function Hr(e){return{kind:"schema",type:"boolean",reference:Hr,expects:"boolean",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:De(this,"type",t,r),t}}}function j(e,t){return{kind:"schema",type:"nullable",reference:j,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=sr(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Dt(e,t){return{kind:"schema",type:"nullish",reference:Dt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=sr(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ot(e){return{kind:"schema",type:"number",reference:ot,expects:"number",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:De(this,"type",t,r),t}}}function Se(e,t){return{kind:"schema",type:"object",reference:Se,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ke(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:sr(s),d=s["~run"]({value:l},n);if(d.issues){const p={type:"object",origin:"value",input:i,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=$s(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(De(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else De(this,"type",r,n);return r}}}function pi(e,t){return{kind:"schema",type:"optional",reference:pi,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=sr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function vt(e,t){return{kind:"schema",type:"picklist",reference:vt,expects:Es(e.map(di),"|"),async:!1,options:e,message:t,get"~standard"(){return ke(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:De(this,"type",r,n),r}}}function qr(e,t,r){return{kind:"schema",type:"record",reference:qr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ke(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(Cs(a,l)){const d=a[l],p=this.key["~run"]({value:l},i);if(p.issues){const g={type:"object",origin:"key",input:a,key:l,value:d};for(const b of p.issues)b.path=[g],(o=n.issues)==null||o.push(b);if(n.issues||(n.issues=p.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:d},i);if(u.issues){const g={type:"object",origin:"value",input:a,key:l,value:d};for(const b of u.issues)b.path?b.path.unshift(g):b.path=[g],(s=n.issues)==null||s.push(b);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!p.typed||!u.typed)&&(n.typed=!1),p.typed&&(n.value[p.value]=u.value)}}else De(this,"type",n,i);return n}}}function D(e){return{kind:"schema",type:"string",reference:D,expects:"string",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:De(this,"type",t,r),t}}}function hi(){return{kind:"schema",type:"unknown",reference:hi,expects:"unknown",async:!1,get"~standard"(){return ke(this)},"~run"(e){return e.typed=!0,e}}}function Wr(...e){return{...e[0],pipe:e,get"~standard"(){return ke(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Kr(e,t,r){const n=e["~run"]({value:t},ui(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const Is=["agent","sdk","form","integration","migration"],As=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],Ts=["screening","cv_match","interview","overall"],Fs=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],Ns=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],gi=vt(Is),Ds=vt(As),Vs=Wr(D(),Ur(),or(1),zr(100)),Ls=vt(Ts),Os=vt(Fs),Ms=Wr(D(),Ur(),or(1),zr(100)),Ps=vt(Ns),bi=Se({id:D(),email:j(D()),firstName:j(D()),lastName:j(D()),phone:j(D()),source:j(gi),identifiedAt:j(D()),createdAt:D(),updatedAt:D()}),vi=Wr(D(),or(1)),Gr=qr(D(),hi()),js=Se({id:D(),applicationId:D(),status:Os,scheduledAt:j(D()),completedAt:j(D()),meta:j(Gr),createdAt:D(),updatedAt:D()}),Rs=Se({score:ot(),reason:D(),confidence:ot()}),wi=Se({id:D(),candidateId:D(),jobId:ot(),stage:Vs,stageGroup:Ds,stageEnteredAt:D(),rating:j(ot()),disqualifiedAt:j(D()),disqualificationReason:j(Ms),disqualificationNote:j(D()),source:Ps,sourceDetail:j(D()),sessionId:j(ot()),externalApplicationId:j(D()),meta:j(Gr),context:j(Gr),scoredAt:j(D()),createdAt:D(),updatedAt:D()}),Bs=Se({id:D(),applicationId:D(),scoreType:Ls,score:j(ot()),reason:j(D()),categories:j(qr(D(),Rs)),scoredBy:j(D()),createdAt:D()});({...wi.entries},{...bi.entries});const zs=Se({anonymousId:vi,email:vi,firstName:Dt(D()),lastName:Dt(D()),phone:Dt(D()),source:Dt(gi)}),Us=Se({candidateId:D(),isNew:Hr()}),Hs=Se({isDuplicate:Hr(),existingApplication:pi(Se({id:D(),stageGroup:D(),createdAt:D()}))});var qs=e=>e,Ws=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},Ks=class extends Ws{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},Gs=e=>e instanceof Ks&&e.data!==void 0,Ys={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Js(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function Vf(e){return e}var Xs=({environment:e,publishableKey:t,logger:r})=>{let n=Ys[e];return{async checkDuplicate(i){try{let a=new URLSearchParams({email:i.email,scope:i.scope});i.scope==="job"&&i.jobId!=null&&a.set("job_id",String(i.jobId));let o=await fetch(`${n}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Kr(Hs,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(i){try{if(!i.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:i.email,firstName:i.firstName,lastName:i.lastName,phone:i.phone,anonymousId:i.anonymousId,source:i.source??"sdk"},o=Kr(zs,a);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Kr(Us,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},Vt,I,mi,yi,st,_i,xi,Yr,ki,wt={},Si=[],Zs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lr=Array.isArray;function ze(e,t){for(var r in t)e[r]=t[r];return e}function Ci(e){var t=e.parentNode;t&&t.removeChild(e)}function be(e,t,r){var n,i,a,o={};for(a in t)a=="key"?n=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Vt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Lt(e,o,n,i,null)}function Lt(e,t,r,n,i){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++mi};return i==null&&I.vnode!=null&&I.vnode(a),a}function Qs(){return{current:null}}function re(e){return e.children}function Ee(e,t){this.props=e,this.context=t}function cr(e,t){if(t==null)return e.__?cr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?cr(e):null}function Ei(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Ei(e)}}function Jr(e){(!e.__d&&(e.__d=!0)&&st.push(e)&&!ur.__r++||_i!==I.debounceRendering)&&((_i=I.debounceRendering)||xi)(ur)}function ur(){var e,t,r,n,i,a,o,s,l;for(st.sort(Yr);e=st.shift();)e.__d&&(t=st.length,n=void 0,i=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(a=ze({},o)).__v=o.__v+1,Xr(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??cr(o),o.__h,i),Di(n,o,i),o.__e!=s&&Ei(o)),st.length>t&&st.sort(Yr));ur.__r=0}function $i(e,t,r,n,i,a,o,s,l,d,p){var u,g,b,v,_,C,y,m,k,T,N=0,z=n&&n.__k||Si,ie=z.length,Z=ie,U=t.length;for(r.__k=[],u=0;u<U;u++)(v=r.__k[u]=(v=t[u])==null||typeof v=="boolean"||typeof v=="function"?null:typeof v=="string"||typeof v=="number"||typeof v=="bigint"?Lt(null,v,null,null,v):lr(v)?Lt(re,{children:v},null,null,null):v.__b>0?Lt(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null&&(v.__=r,v.__b=r.__b+1,(m=el(v,z,y=u+N,Z))===-1?b=wt:(b=z[m]||wt,z[m]=void 0,Z--),Xr(e,v,b,i,a,o,s,l,d,p),_=v.__e,(g=v.ref)&&b.ref!=g&&(b.ref&&Zr(b.ref,null,v),p.push(g,v.__c||_,v)),_!=null&&(C==null&&(C=_),T=!(k=b===wt||b.__v===null)&&m===y,k?m==-1&&N--:m!==y&&(m===y+1?(N++,T=!0):m>y?Z>U-y?(N+=m-y,T=!0):N--:N=m<y&&m==y-1?m-y:0),y=u+N,T=T||m==u&&!k,typeof v.type!="function"||m===y&&b.__k!==v.__k?typeof v.type=="function"||T?v.__d!==void 0?(l=v.__d,v.__d=void 0):l=_.nextSibling:l=Ai(e,_,l):l=Ii(v,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=C,u=ie;u--;)z[u]!=null&&(typeof r.type=="function"&&z[u].__e!=null&&z[u].__e==r.__d&&(r.__d=z[u].__e.nextSibling),Vi(z[u],z[u]))}function Ii(e,t,r){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,t=typeof n.type=="function"?Ii(n,t,r):Ai(r,n.__e,t));return t}function Ue(e,t){return t=t||[],e==null||typeof e=="boolean"||(lr(e)?e.some(function(r){Ue(r,t)}):t.push(e)),t}function Ai(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function el(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&a===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&i==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&i==l.key&&a===l.type)return s;s++}}return-1}function tl(e,t,r,n,i){var a;for(a in r)a==="children"||a==="key"||a in t||dr(e,a,null,r[a],n);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||dr(e,a,t[a],r[a],n)}function Ti(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Zs.test(t)?r:r+"px"}function dr(e,t,r,n,i){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ti(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Ti(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n||e.addEventListener(t,a?Ni:Fi,a):e.removeEventListener(t,a?Ni:Fi,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Fi(e){return this.l[e.type+!1](I.event?I.event(e):e)}function Ni(e){return this.l[e.type+!0](I.event?I.event(e):e)}function Xr(e,t,r,n,i,a,o,s,l,d){var p,u,g,b,v,_,C,y,m,k,T,N,z,ie,Z,U=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(p=I.__b)&&p(t);try{e:if(typeof U=="function"){if(y=t.props,m=(p=U.contextType)&&n[p.__c],k=p?m?m.props.value:p.__:n,r.__c?C=(u=t.__c=r.__c).__=u.__E:("prototype"in U&&U.prototype.render?t.__c=u=new U(y,k):(t.__c=u=new Ee(y,k),u.constructor=U,u.render=nl),m&&m.sub(u),u.props=y,u.state||(u.state={}),u.context=k,u.__n=n,g=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),U.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ze({},u.__s)),ze(u.__s,U.getDerivedStateFromProps(y,u.__s))),b=u.props,v=u.state,u.__v=t,g)U.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(U.getDerivedStateFromProps==null&&y!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,k),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,k)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(K){K&&(K.__=t)}),T=0;T<u._sb.length;T++)u.__h.push(u._sb[T]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,k),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,v,_)})}if(u.context=k,u.props=y,u.__P=e,u.__e=!1,N=I.__r,z=0,"prototype"in U&&U.prototype.render){for(u.state=u.__s,u.__d=!1,N&&N(t),p=u.render(u.props,u.state,u.context),ie=0;ie<u._sb.length;ie++)u.__h.push(u._sb[ie]);u._sb=[]}else do u.__d=!1,N&&N(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++z<25);u.state=u.__s,u.getChildContext!=null&&(n=ze(ze({},n),u.getChildContext())),g||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(b,v)),$i(e,lr(Z=p!=null&&p.type===re&&p.key==null?p.props.children:p)?Z:[Z],t,r,n,i,a,o,s,l,d),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),C&&(u.__E=u.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=rl(r.__e,t,r,n,i,a,o,l,d);(p=I.diffed)&&p(t)}catch(K){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),I.__e(K,t,r)}}function Di(e,t,r){for(var n=0;n<r.length;n++)Zr(r[n],r[++n],r[++n]);I.__c&&I.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){I.__e(a,i.__v)}})}function rl(e,t,r,n,i,a,o,s,l){var d,p,u,g=r.props,b=t.props,v=t.type,_=0;if(v==="svg"&&(i=!0),a!=null){for(;_<a.length;_++)if((d=a[_])&&"setAttribute"in d==!!v&&(v?d.localName===v:d.nodeType===3)){e=d,a[_]=null;break}}if(e==null){if(v===null)return document.createTextNode(b);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,b.is&&b),a=null,s=!1}if(v===null)g===b||s&&e.data===b||(e.data=b);else{if(a=a&&Vt.call(e.childNodes),p=(g=r.props||wt).dangerouslySetInnerHTML,u=b.dangerouslySetInnerHTML,!s){if(a!=null)for(g={},_=0;_<e.attributes.length;_++)g[e.attributes[_].name]=e.attributes[_].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(tl(e,b,g,i,s),u)t.__k=[];else if($i(e,lr(_=t.props.children)?_:[_],t,r,n,i&&v!=="foreignObject",a,o,a?a[0]:r.__k&&cr(r,0),s,l),a!=null)for(_=a.length;_--;)a[_]!=null&&Ci(a[_]);s||("value"in b&&(_=b.value)!==void 0&&(_!==e.value||v==="progress"&&!_||v==="option"&&_!==g.value)&&dr(e,"value",_,g.value,!1),"checked"in b&&(_=b.checked)!==void 0&&_!==e.checked&&dr(e,"checked",_,g.checked,!1))}return e}function Zr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){I.__e(n,r)}}function Vi(e,t,r){var n,i;if(I.unmount&&I.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Zr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){I.__e(a,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Vi(n[i],t,r||typeof e.type!="function");r||e.__e==null||Ci(e.__e),e.__=e.__e=e.__d=void 0}function nl(e,t,r){return this.constructor(e,r)}function lt(e,t,r){var n,i,a,o;I.__&&I.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Xr(t,e=(!n&&r||t).__k=be(re,null,[e]),i||wt,wt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?Vt.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),Di(a,e,o)}function Li(e,t){lt(e,t,Li)}function il(e,t,r){var n,i,a,o,s=ze({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?n=t[a]:a=="ref"?i=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Vt.call(arguments,2):r),Lt(e.type,s,n||e.key,i||e.ref,null)}function Oi(e,t){var r={__c:t="__cC"+ki++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Jr(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Vt=Si.slice,I={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},mi=0,yi=function(e){return e!=null&&e.constructor===void 0},Ee.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ze({},this.state),typeof e=="function"&&(e=e(ze({},r),this.props)),e&&ze(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Jr(this))},Ee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Jr(this))},Ee.prototype.render=re,st=[],xi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yr=function(e,t){return e.__v.__b-t.__v.__b},ur.__r=0,ki=0;function Mi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Mi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Je(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Mi(e))&&(n&&(n+=" "),n+=t);return n}const Pi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ji=Je,ct=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ji(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(d=>{const p=r==null?void 0:r[d],u=a==null?void 0:a[d];if(p===null)return null;const g=Pi(p)||Pi(u);return i[d][g]}),s=r&&Object.entries(r).reduce((d,p)=>{let[u,g]=p;return g===void 0||(d[u]=g),d},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:u,className:g,...b}=p;return Object.entries(b).every(v=>{let[_,C]=v;return Array.isArray(C)?C.includes({...a,...s}[_]):{...a,...s}[_]===C})?[...d,u,g]:d},[]);return ji(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var Xe,H,Qr,Ri,mt=0,Bi=[],fr=[],zi=I.__b,Ui=I.__r,Hi=I.diffed,qi=I.__c,Wi=I.unmount;function yt(e,t){I.__h&&I.__h(H,e,mt||t),mt=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:fr}),r.__[e]}function Ce(e){return mt=1,Ki(Ji,e)}function Ki(e,t,r){var n=yt(Xe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Ji(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=H,!H.u)){var i=function(s,l,d){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(g){return g.__c});if(p.every(function(g){return!g.__N}))return!a||a.call(this,s,l,d);var u=!1;return p.forEach(function(g){if(g.__N){var b=g.__[0];g.__=g.__N,g.__N=void 0,b!==g.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!a||a.call(this,s,l,d))};H.u=!0;var a=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(s,l,d){if(this.__e){var p=a;a=void 0,i(s,l,d),a=p}o&&o.call(this,s,l,d)},H.shouldComponentUpdate=i}return n.__N||n.__}function $e(e,t){var r=yt(Xe++,3);!I.__s&&tn(r.__H,t)&&(r.__=e,r.i=t,H.__H.__h.push(r))}function ve(e,t){var r=yt(Xe++,4);!I.__s&&tn(r.__H,t)&&(r.__=e,r.i=t,H.__h.push(r))}function we(e){return mt=5,He(function(){return{current:e}},[])}function al(e,t,r){mt=6,ve(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function He(e,t){var r=yt(Xe++,7);return tn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ol(e,t){return mt=8,He(function(){return e},t)}function Gi(e){var t=H.context[e.__c],r=yt(Xe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(H)),t.props.value):e.__}function sl(e,t){I.useDebugValue&&I.useDebugValue(t?t(e):e)}function ll(){var e=yt(Xe++,11);if(!e.__){for(var t=H.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function cl(){for(var e;e=Bi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pr),e.__H.__h.forEach(en),e.__H.__h=[]}catch(t){e.__H.__h=[],I.__e(t,e.__v)}}I.__b=function(e){H=null,zi&&zi(e)},I.__r=function(e){Ui&&Ui(e),Xe=0;var t=(H=e.__c).__H;t&&(Qr===H?(t.__h=[],H.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=fr,r.__N=r.i=void 0})):(t.__h.forEach(pr),t.__h.forEach(en),t.__h=[],Xe=0)),Qr=H},I.diffed=function(e){Hi&&Hi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Bi.push(t)!==1&&Ri===I.requestAnimationFrame||((Ri=I.requestAnimationFrame)||ul)(cl)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==fr&&(r.__=r.__V),r.i=void 0,r.__V=fr})),Qr=H=null},I.__c=function(e,t){t.some(function(r){try{r.__h.forEach(pr),r.__h=r.__h.filter(function(n){return!n.__||en(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],I.__e(n,r.__v)}}),qi&&qi(e,t)},I.unmount=function(e){Wi&&Wi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{pr(n)}catch(i){t=i}}),r.__H=void 0,t&&I.__e(t,r.__v))};var Yi=typeof requestAnimationFrame=="function";function ul(e){var t,r=function(){clearTimeout(n),Yi&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Yi&&(t=requestAnimationFrame(r))}function pr(e){var t=H,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),H=t}function en(e){var t=H;e.__c=e.__(),H=t}function tn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Ji(e,t){return typeof t=="function"?t(e):t}function Xi(e,t){for(var r in t)e[r]=t[r];return e}function rn(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function nn(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function an(e){this.props=e}function dl(e,t){function r(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:rn(this.props,i)}function n(i){return this.shouldComponentUpdate=r,be(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(an.prototype=new Ee).isPureReactComponent=!0,an.prototype.shouldComponentUpdate=function(e,t){return rn(this.props,e)||rn(this.state,t)};var Zi=I.__b;I.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Zi&&Zi(e)};var fl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function on(e){function t(r){var n=Xi({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=fl,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Qi=function(e,t){return e==null?null:Ue(Ue(e).map(t))},pl={map:Qi,forEach:Qi,count:function(e){return e?Ue(e).length:0},only:function(e){var t=Ue(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ue},hl=I.__e;I.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}hl(e,t,r,n)};var ea=I.unmount;function ta(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Xi({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return ta(n,t,r)})),e}function ra(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return ra(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function Ot(){this.__u=0,this.t=null,this.__b=null}function na(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ia(e){var t,r,n;function i(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return be(r,a)}return i.displayName="Lazy",i.__f=!0,i}function Mt(){this.u=null,this.o=null}I.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),ea&&ea(e)},(Ot.prototype=new Ee).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=na(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=ra(d,d.__c.__P,d.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.t.pop();)p.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},Ot.prototype.componentWillUnmount=function(){this.t=[]},Ot.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ta(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&be(re,null,e.fallback);return i&&(i.__h=null),[be(re,null,t.__a?null:e.children),i]};var aa=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function gl(e){return this.getChildContext=function(){return e.context},e.children}function bl(e){var t=this,r=e.i;t.componentWillUnmount=function(){lt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),lt(be(gl,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function vl(e,t){var r=be(bl,{__v:e,i:t});return r.containerInfo=t,r}(Mt.prototype=new Ee).__a=function(e){var t=this,r=na(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),aa(t,e,n)):i()};r?r(a):a()}},Mt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ue(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Mt.prototype.componentDidUpdate=Mt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){aa(e,r,t)})};var oa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,wl=/^(?: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]/,ml=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,yl=/[A-Z0-9]/g,_l=typeof document<"u",xl=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function kl(e,t,r){return t.__k==null&&(t.textContent=""),lt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Sl(e,t,r){return Li(e,t),typeof r=="function"&&r(),e?e.__c:null}Ee.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ee.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var sa=I.event;function Cl(){}function El(){return this.cancelBubble}function $l(){return this.defaultPrevented}I.event=function(e){return sa&&(e=sa(e)),e.persist=Cl,e.isPropagationStopped=El,e.isDefaultPrevented=$l,e.nativeEvent=e};var sn,Il={enumerable:!1,configurable:!0,get:function(){return this.class}},la=I.vnode;I.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||_l&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||xl(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":ml.test(a)?a=s:n.indexOf("-")===-1&&wl.test(a)?a=a.replace(yl,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&i[a=s]&&(a="oninputCapture"),i[a]=o}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Ue(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Ue(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",Il)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=oa,la&&la(e)};var ca=I.__r;I.__r=function(e){ca&&ca(e),sn=e.__c};var ua=I.diffed;I.diffed=function(e){ua&&ua(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),sn=null};var Al={ReactCurrentDispatcher:{current:{readContext:function(e){return sn.__n[e.__c].props.value}}}};function Tl(e){return be.bind(null,e)}function da(e){return!!e&&e.$$typeof===oa}function Fl(e){return da(e)?il.apply(null,arguments):e}function Nl(e){return!!e.__k&&(lt(null,e),!0)}function Dl(e){return e&&(e.base||e.nodeType===1&&e)||null}var Vl=function(e,t){return e(t)},Ll=function(e,t){return e(t)},Ol=re;function fa(e){e()}function Ml(e){return e}function Pl(){return[!1,fa]}var jl=ve;function Rl(e,t){var r=t(),n=Ce({h:{__:r,v:t}}),i=n[0].h,a=n[1];return ve(function(){i.__=r,i.v=t,nn(i.__,t())||a({h:i})},[e,r,t]),$e(function(){return nn(i.__,i.v())||a({h:i}),e(function(){nn(i.__,i.v())||a({h:i})})},[e]),r}var ce={useState:Ce,useId:ll,useReducer:Ki,useEffect:$e,useLayoutEffect:ve,useInsertionEffect:jl,useTransition:Pl,useDeferredValue:Ml,useSyncExternalStore:Rl,startTransition:fa,useRef:we,useImperativeHandle:al,useMemo:He,useCallback:ol,useContext:Gi,useDebugValue:sl,version:"17.0.2",Children:pl,render:kl,hydrate:Sl,unmountComponentAtNode:Nl,createPortal:vl,createElement:be,createContext:Oi,createFactory:Tl,cloneElement:Fl,createRef:Qs,Fragment:re,isValidElement:da,findDOMNode:Dl,Component:Ee,PureComponent:an,memo:dl,forwardRef:on,flushSync:Ll,unstable_batchedUpdates:Vl,StrictMode:Ol,Suspense:Ot,SuspenseList:Mt,lazy:ia,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Al};const ue=Symbol.for("@ts-pattern/matcher"),pa=Symbol.for("@ts-pattern/isVariadic"),hr="@ts-pattern/anonymous-select-key",ln=e=>!!(e&&typeof e=="object"),gr=e=>e&&!!e[ue],Y=(e,t,r)=>{if(gr(e)){const n=e[ue](),{matched:i,selections:a}=n.match(t);return i&&a&&Object.keys(a).forEach(o=>r(o,a[o])),i}if(ln(e)){if(!ln(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],a=[];for(const o of e.keys()){const s=e[o];gr(s)&&s[pa]?a.push(s):a.length?i.push(s):n.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const o=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((d,p)=>Y(d,o[p],r))&&i.every((d,p)=>Y(d,s[p],r))&&(a.length===0||Y(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>Y(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const i=e[n];return(n in t||gr(a=i)&&a[ue]().matcherType==="optional")&&Y(i,t[n],r);var a})}return Object.is(t,e)},de=e=>{var t,r,n;return ln(e)?gr(e)?(t=(r=(n=e[ue]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Pt(e,de):Pt(Object.values(e),de):[]},Pt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Bl(...e){if(e.length===1){const[t]=e;return r=>Y(t,r,()=>{})}if(e.length===2){const[t,r]=e;return Y(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function Q(e){return Object.assign(e,{optional:()=>un(e),and:t=>q(e,t),or:t=>ha(e,t),select:t=>t===void 0?jt(e):jt(t,e)})}function cn(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[pa]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=n[r++])!=null?i:n.at(-1)}}}}))(e),{optional:()=>cn(un(e)),select:t=>cn(t===void 0?jt(e):jt(t,e))})}function un(e){return Q({[ue]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return t===void 0?(de(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:Y(e,t,n),selections:r}},getSelectionKeys:()=>de(e),matcherType:"optional"})})}const zl=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Ul=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},Hl=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function q(...e){return Q({[ue]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return{matched:e.every(i=>Y(i,t,n)),selections:r}},getSelectionKeys:()=>Pt(e,de),matcherType:"and"})})}function ha(...e){return Q({[ue]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return Pt(e,de).forEach(i=>n(i,void 0)),{matched:e.some(i=>Y(i,t,n)),selections:r}},getSelectionKeys:()=>Pt(e,de),matcherType:"or"})})}function L(e){return{[ue]:()=>({match:t=>({matched:!!e(t)})})}}function jt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return Q({[ue]:()=>({match:n=>{let i={[t??hr]:n};return{matched:r===void 0||Y(r,n,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??hr].concat(r===void 0?[]:de(r))})})}function ga(e){return!0}function Ve(e){return typeof e=="number"}function Ze(e){return typeof e=="string"}function Qe(e){return typeof e=="bigint"}const ba=Q(L(ga)),ql=Q(L(ga)),Wl=ba,et=e=>Object.assign(Q(e),{startsWith:t=>{return et(q(e,(r=t,L(n=>Ze(n)&&n.startsWith(r)))));var r},endsWith:t=>{return et(q(e,(r=t,L(n=>Ze(n)&&n.endsWith(r)))));var r},minLength:t=>et(q(e,(r=>L(n=>Ze(n)&&n.length>=r))(t))),length:t=>et(q(e,(r=>L(n=>Ze(n)&&n.length===r))(t))),maxLength:t=>et(q(e,(r=>L(n=>Ze(n)&&n.length<=r))(t))),includes:t=>{return et(q(e,(r=t,L(n=>Ze(n)&&n.includes(r)))));var r},regex:t=>{return et(q(e,(r=t,L(n=>Ze(n)&&!!n.match(r)))));var r}}),va=et(L(Ze)),Le=e=>Object.assign(Q(e),{between:(t,r)=>Le(q(e,((n,i)=>L(a=>Ve(a)&&n<=a&&i>=a))(t,r))),lt:t=>Le(q(e,(r=>L(n=>Ve(n)&&n<r))(t))),gt:t=>Le(q(e,(r=>L(n=>Ve(n)&&n>r))(t))),lte:t=>Le(q(e,(r=>L(n=>Ve(n)&&n<=r))(t))),gte:t=>Le(q(e,(r=>L(n=>Ve(n)&&n>=r))(t))),int:()=>Le(q(e,L(t=>Ve(t)&&Number.isInteger(t)))),finite:()=>Le(q(e,L(t=>Ve(t)&&Number.isFinite(t)))),positive:()=>Le(q(e,L(t=>Ve(t)&&t>0))),negative:()=>Le(q(e,L(t=>Ve(t)&&t<0)))}),Kl=Le(L(Ve)),tt=e=>Object.assign(Q(e),{between:(t,r)=>tt(q(e,((n,i)=>L(a=>Qe(a)&&n<=a&&i>=a))(t,r))),lt:t=>tt(q(e,(r=>L(n=>Qe(n)&&n<r))(t))),gt:t=>tt(q(e,(r=>L(n=>Qe(n)&&n>r))(t))),lte:t=>tt(q(e,(r=>L(n=>Qe(n)&&n<=r))(t))),gte:t=>tt(q(e,(r=>L(n=>Qe(n)&&n>=r))(t))),positive:()=>tt(q(e,L(t=>Qe(t)&&t>0))),negative:()=>tt(q(e,L(t=>Qe(t)&&t<0)))}),Gl=tt(L(Qe)),Yl=Q(L(function(e){return typeof e=="boolean"})),Jl=Q(L(function(e){return typeof e=="symbol"})),Xl=Q(L(function(e){return e==null})),Zl=Q(L(function(e){return e!=null}));var Rt={__proto__:null,matcher:ue,optional:un,array:function(...e){return cn({[ue]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return de(r).forEach(a=>{n[a]=[]}),{matched:!0,selections:n};const i=(a,o)=>{n[a]=(n[a]||[]).concat([o])};return{matched:t.every(a=>Y(r,a,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:de(e[0])})})},set:function(...e){return Q({[ue]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])},i=e[0];return{matched:zl(t,a=>Y(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:de(e[0])})})},map:function(...e){return Q({[ue]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:Ul(t,(s,l)=>{const d=Y(a,l,n),p=Y(o,s,n);return d&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...de(e[0]),...de(e[1])]})})},record:function(...e){return Q({[ue]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const i=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[a,o]=e.length===1?[va,e[0]]:e;return{matched:Hl(t,(s,l)=>{const d=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=d!==null&&Y(a,d,i),u=Y(a,s,i),g=Y(o,l,i);return(u||p)&&g}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...de(e[0]),...de(e[1])]})})},intersection:q,union:ha,not:function(e){return Q({[ue]:()=>({match:t=>({matched:!Y(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:L,select:jt,any:ba,unknown:ql,_:Wl,string:va,number:Kl,bigint:Gl,boolean:Yl,symbol:Jl,nullish:Xl,nonNullable:Zl,instanceOf:function(e){return Q(L(function(t){return r=>r instanceof t}(e)))},shape:function(e){return Q(L(Bl(e)))}};class Ql extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}}const dn={matched:!1,value:void 0};function br(e){return new vr(e,dn)}class vr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(d,p)=>{a=!0,o[d]=p},l=!n.some(d=>Y(d,this.input,s))||i&&!i(this.input)?dn:{matched:!0,value:r(a?hr in o?o[hr]:o:this.input,this.input)};return new vr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new vr(this.input,n?{matched:!0,value:r(this.input,this.input)}:dn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=ec){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function ec(e){throw new Ql(e)}var tc=["other","few","many","two","one","zero"],wa=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function i(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,d)=>{var p;return((p=o==null?void 0:o[d])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=n.select(o.count);if(!(l in s)){const d=tc.find(p=>p in s);if(!d)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=d}return s[l].replace(/{{(\w+)}}/g,(d,p)=>{var u;return((u=o==null?void 0:o[p])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return i},rc=0;function c(e,t,r,n,i,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var d={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--rc,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return I.vnode&&I.vnode(d),d}var ma=Oi(null),ya=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const i=He(()=>wa({locale:n,terms:e,overrides:t}),[t,n]);return c(ma.Provider,{value:{t:i,locale:n},children:r})},useTranslation:()=>{const t=Gi(ma);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>wa({terms:e,overrides:t,locale:r})}),{TranslationProvider:Lf,useTranslation:Of,createTFunction:Mf,defaultTerms:nc}=ya({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:ic,useTranslation:ae,createTFunction:ac}=ya({...nc,error_heading:"Something unexpected happened",undo:"Undo",send:"Send",skip:"Skip",skipped:"Skipped",maximize:"Maximise",minimize:"Minimise"}),Pf="";function Oe(e,t){if(!e)throw new Error(t)}var fn=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(fn):Object.keys(e).sort().reduce((t,r)=>(t[r]=fn(e[r]),t),{}),oc=e=>{let t=JSON.stringify(fn(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)},sc=Symbol.for("preact-signals");function pn(){if(_t>1)_t--;else{for(var e,t=!1;Bt!==void 0;){var r=Bt;for(Bt=void 0,hn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&xa(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(hn=0,_t--,t)throw e}}var R=void 0,Bt=void 0,_t=0,hn=0,wr=0;function _a(e){if(R!==void 0){var t=e.n;if(t===void 0||t.t!==R)return t={i:0,S:e,p:R.s,n:void 0,t:R,e:void 0,x:void 0,r:t},R.s!==void 0&&(R.s.n=t),R.s=t,e.n=t,32&R.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=R.s,t.n=void 0,R.s.n=t,R.s=t),t}}function ne(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ne.prototype.brand=sc,ne.prototype.h=function(){return!0},ne.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ne.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ne.prototype.subscribe=function(e){var t=this;return bn(function(){var r=t.value,n=R;R=void 0;try{e(r)}finally{R=n}})},ne.prototype.valueOf=function(){return this.value},ne.prototype.toString=function(){return this.value+""},ne.prototype.toJSON=function(){return this.value},ne.prototype.peek=function(){var e=R;R=void 0;try{return this.value}finally{R=e}},Object.defineProperty(ne.prototype,"value",{get:function(){var e=_a(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(hn>100)throw new Error("Cycle detected");this.v=e,this.i++,wr++,_t++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{pn()}}}});function qe(e){return new ne(e)}function xa(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ka(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Sa(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function xt(e){ne.call(this,void 0),this.x=e,this.s=void 0,this.g=wr-1,this.f=4}(xt.prototype=new ne).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===wr))return!0;if(this.g=wr,this.f|=1,this.i>0&&!xa(this))return this.f&=-2,!0;var e=R;try{ka(this),R=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return R=e,Sa(this),this.f&=-2,!0},xt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ne.prototype.S.call(this,e)},xt.prototype.U=function(e){if(this.t!==void 0&&(ne.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},xt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(xt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=_a(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function lc(e){return new xt(e)}function Ca(e){var t=e.u;if(e.u=void 0,typeof t=="function"){_t++;var r=R;R=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,gn(e),n}finally{R=r,pn()}}}function gn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ca(e)}function cc(e){if(R!==this)throw new Error("Out-of-order effect");Sa(this),R=e,this.f&=-2,8&this.f&&gn(this),pn()}function zt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},zt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ca(this),ka(this),_t++;var e=R;return R=this,cc.bind(this,e)},zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Bt,Bt=this)},zt.prototype.d=function(){this.f|=8,1&this.f||gn(this)};function bn(e){var t=new zt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var vn;function kt(e,t){I[e]=t.bind(null,I[e]||function(){})}function mr(e){vn&&vn(),vn=e&&e.S()}function Ea(e){var t=this,r=e.data,n=dc(r);n.value=r;var i=He(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!yi(i.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},lc(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}Ea.displayName="_st",Object.defineProperties(ne.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ea},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),kt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var a=n[i];a instanceof ne&&(r||(t.__np=r={}),r[i]=a,n[i]=a.peek())}}e(t)}),kt("__r",function(e,t){mr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var a;return bn(function(){a=this}),a.c=function(){n.__$f|=1,n.setState({})},a}())),mr(r),e(t)}),kt("__e",function(e,t,r,n){mr(),e(t,r,n)}),kt("diffed",function(e,t){mr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in n)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in n){var d=a[l],p=n[l];d===void 0?(d=uc(r,l,p,i),a[l]=d):d.o(p,i)}}}e(t)});function uc(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,a=qe(r);return{o:function(o,s){a.value=o,n=s},d:bn(function(){var o=a.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}kt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var a=n[i];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),kt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Ee.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function dc(e){return He(function(){return qe(e)},[])}const wn=(e,t)=>t.some(r=>e instanceof r);let $a,Ia;function fc(){return $a||($a=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function pc(){return Ia||(Ia=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const mn=new WeakMap,yn=new WeakMap,yr=new WeakMap;function hc(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(ut(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return yr.set(t,e),t}function gc(e){if(mn.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});mn.set(e,t)}let _n={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return mn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ut(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Aa(e){_n=e(_n)}function bc(e){return pc().includes(e)?function(...t){return e.apply(xn(this),t),ut(this.request)}:function(...t){return ut(e.apply(xn(this),t))}}function vc(e){return typeof e=="function"?bc(e):(e instanceof IDBTransaction&&gc(e),wn(e,fc())?new Proxy(e,_n):e)}function ut(e){if(e instanceof IDBRequest)return hc(e);if(yn.has(e))return yn.get(e);const t=vc(e);return t!==e&&(yn.set(e,t),yr.set(t,e)),t}const xn=e=>yr.get(e);function wc(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=ut(o);return n&&o.addEventListener("upgradeneeded",l=>{n(ut(o.result),l.oldVersion,l.newVersion,ut(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const mc=["get","getKey","getAll","getAllKeys","count"],yc=["put","add","delete","clear"],kn=new Map;function Ta(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(kn.get(t))return kn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=yc.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||mc.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let d=l.store;return n&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),i&&l.done]))[0]};return kn.set(t,a),a}Aa(e=>({...e,get:(t,r,n)=>Ta(t,r)||e.get(t,r,n),has:(t,r)=>!!Ta(t,r)||e.has(t,r)}));const _c=["continue","continuePrimaryKey","advance"],Fa={},Sn=new WeakMap,Na=new WeakMap,xc={get(e,t){if(!_c.includes(t))return e[t];let r=Fa[t];return r||(r=Fa[t]=function(...n){Sn.set(this,Na.get(this)[t](...n))}),r}};async function*kc(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,xc);for(Na.set(r,t),yr.set(r,xn(t));t;)yield r,t=await(Sn.get(r)||t.continue()),Sn.delete(r)}function Da(e,t){return t===Symbol.asyncIterator&&wn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&wn(e,[IDBIndex,IDBObjectStore])}Aa(e=>({...e,get(t,r,n){return Da(t,r)?kc:e.get(t,r,n)},has(t,r){return Da(t,r)||e.has(t,r)}}));const _r=typeof indexedDB>"u"?void 0:wc("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let xr,Cn,Ut;const Va=()=>{if(!xr)return Ut;const e=xr;xr=void 0;const t=Ma(e),r=_r==null?void 0:_r.then(n=>n.put("state",e.data,t)).finally(()=>{Ut===r&&(Ut=void 0)});return Ut=r,Ut},dt={getStateData:async(e,t,r)=>{var i;const n=Ma({...e,flowKeys:t,context:r});return(i=await _r)==null?void 0:i.get("state",n)},setStateData:e=>{xr=e,clearTimeout(Cn),Cn=setTimeout(()=>void Va(),1e3)},flushStateData:()=>(clearTimeout(Cn),Va()??Promise.resolve())},La=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},St=e=>t=>t?t.type===e:!1;class ft extends Error{constructor(){super("Aborted")}}const Sc=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Oa=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Sc()}),Cc=e=>br(e).with({nativeEvent:{submitter:Rt.select(Rt.union(Rt.instanceOf(HTMLButtonElement),Rt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),kr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(d=>d.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(d=>d.id===a),s=t.type.includes("question")?1:0;if(o){const d=s+Math.max(kr(e,i,r,n+s).remainingSteps,kr(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:d}),{stepsMade:n,remainingSteps:d}}const l=s+kr(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Ec=e=>{const t={},r=e.find(n=>n.isHead);return r&&kr(e,r,(n,i)=>{t[n]=i}),t},Ma=e=>[...e.flowKeys,e.id,e.version,oc(e.context)].join("/"),rt=qe({state:"idle"}),Ct=e=>{const{state:t,flow:r}=rt.value;if(t!=="loaded")return;Oe(r,"No flow to update");const n=e(r.data);r.data=n,rt.value={state:t,flow:r},dt.setStateData(r)},A={current$:rt,viewState$:qe("closed"),inputHeight$:qe(53),prepareFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:i,job:a,locationOrigin:o})=>(await dt.flushStateData().catch(()=>{}),{data:await dt.getStateData(e,r,t)??Oa(),startedAt:new Date,nodeIdToProgress:Ec(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:i,job:a,locationOrigin:o}),commitFlow:e=>{rt.value={state:"loaded",flow:e},dt.setStateData(e)},cancelCurrentFlow:()=>{rt.value={state:"idle"},A.viewState$.value="closed"},markAsFinished:()=>Ct(e=>({...e,isFinished:!0})),markAsInteracted:()=>Ct(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>Ct(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=rt.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Oa();rt.value={state:e,flow:{...t,data:r,startedAt:new Date}},dt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Ct(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=rt.value;Oe(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,dt.setStateData(r)},setSubmission:(e,t)=>Ct(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Ct(t=>({...t,currentInput:e??null}))},$c=({message:e})=>{const{t}=ae();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-9 text-sm",children:e})]})]})},Pa=e=>c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:"Loading"}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),ja=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Pa,{class:"text-neutral-6 h-8 w-8"})}),Ic=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Ac=ct("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),Sr=({class:e,children:t,variant:r,...n})=>c("div",{class:"flex flex-1 items-center justify-end px-1",children:c("button",{class:Je(Ac({variant:r}),e),...n,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})})}),Tc=()=>{if(A.current$.value.state!=="loaded")return null;const e=A.current$.value.flow.nodeIdToProgress,t=A.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Ic(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Fc=({children:e,params:t})=>{const{t:r}=ae(),n=A.viewState$;return c(re,{children:c("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{onClick:()=>{n.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:En,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:Je({hidden:A.current$.value.state!=="loaded"||n.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,A.current$.value.state==="loaded"&&c(Sr,{"aria-label":"Restart",onClick:()=>{A.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(Sr,{class:"view-switch",onTouchStart:En,"aria-label":r("minimize"),onClick:()=>n.value="minimised",children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),c(Tc,{})]})})};function En(){}const Nc=ia(()=>Promise.resolve().then(()=>xf).then(e=>e.ChatbotBody)),Ra=ct("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),Ba=ct("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Dc=({open:e,...t})=>{const r=we(null);return ve(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),c("dialog",{ref:r,...t})},Vc=({logger:e,apiClient:t,analytics:r,talentBankClient:n,params:i})=>{const{state:a,flow:o,error:s}=A.current$.value,l=A.viewState$.value,d=a!=="idle"&&l==="maximised",p=we(null);return c(ic,{terms:i.terms,locale:void 0,children:[c(Dc,{open:d,onClose:()=>A.viewState$.value="minimised",children:c("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Ra({view:"maximised"}),children:c("div",{class:Ba({view:"maximised"}),children:[c(Fc,{params:i,children:o==null?void 0:o.title}),br({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(ja,{},"loading")).with({state:"loaded"},()=>c(Ot,{fallback:c(ja,{},"loading"),children:c(Nc,{analytics:r,apiClient:t,logger:e,talentBankClient:n})})).with({state:"error"},()=>c($c,{message:s})).exhaustive()]})})}),l==="minimised"?c(Lc,{flow:o}):null]})},Lc=({flow:e})=>{const{t}=ae();return c("div",{class:Ra({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Ba({view:"minimised"}),children:[c("button",{onClick:()=>{A.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:En,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),c("div",{class:"flex items-center px-0.5",children:c(Sr,{"aria-label":t("close_application"),onClick:A.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Oc=`[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-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-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-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\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[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] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[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] .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-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] .overflow-y-scroll{overflow-y:scroll}[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-b-3xl{border-bottom-right-radius:24px;border-bottom-left-radius:24px}[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\\.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-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-blur-xl{--tw-backdrop-blur: blur(24px);-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] .duration-700{transition-duration:.7s}[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-\\[height\\]{will-change:height}[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
|
-
`,
|
|
1
|
+
(function(){"use strict";var Be;function Qi(e){return{lang:(e==null?void 0:e.lang)??(Be==null?void 0:Be.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Be==null?void 0:Be.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Be==null?void 0:Be.abortPipeEarly)}}var Dr;function ns(e){return Dr==null?void 0:Dr.get(e)}var Vr;function as(e){return Vr==null?void 0:Vr.get(e)}var Mr;function os(e,t){var r;return(r=Mr==null?void 0:Mr.get(e))==null?void 0:r.get(t)}function en(e){var r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function Ne(e,t,r,i,n){let a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??en(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??os(e.reference,l.lang)??(d?as(l.lang):null)??i.message??ns(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ge(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Qi())}}}function ss(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ls(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function tn(e){return{kind:"transformation",type:"transform",reference:tn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function cs(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Lr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function rn(){return{kind:"schema",type:"any",reference:rn,expects:"any",async:!1,get"~standard"(){return ge(this)},"~run"(e){return e.typed=!0,e}}}function nn(e,t){return{kind:"schema",type:"array",reference:nn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ge(this)},"~run"(r,i){var a;let n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){let d={type:"array",origin:"value",input:n,key:o,value:s};for(let p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ne(this,"type",r,i);return r}}}function Or(e){return{kind:"schema",type:"boolean",reference:Or,expects:"boolean",async:!1,message:e,get"~standard"(){return ge(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ne(this,"type",t,r),t}}}function ir(e,t){return{kind:"schema",type:"literal",reference:ir,expects:en(e),async:!1,literal:e,message:t,get"~standard"(){return ge(this)},"~run"(r,i){return r.value===this.literal?r.typed=!0:Ne(this,"type",r,i),r}}}function nr(e,t){return{kind:"schema",type:"nullable",reference:nr,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ge(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=Lr(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function ar(e){return{kind:"schema",type:"number",reference:ar,expects:"number",async:!1,message:e,get"~standard"(){return ge(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ne(this,"type",t,r),t}}}function le(e,t){return{kind:"schema",type:"object",reference:le,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ge(this)},"~run"(r,i){var a;let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in n?n[o]:Lr(s),d=s["~run"]({value:l},i);if(d.issues){let p={type:"object",origin:"value",input:n,key:o,value:l};for(let u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=cs(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ne(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else Ne(this,"type",r,i);return r}}}function De(e,t){return{kind:"schema",type:"optional",reference:De,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ge(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=Lr(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function an(e,t,r){return{kind:"schema",type:"record",reference:an,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ge(this)},"~run"(i,n){var o,s;let a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(let l in a)if(ss(a,l)){let d=a[l],p=this.key["~run"]({value:l},n);if(p.issues){let h={type:"object",origin:"key",input:a,key:l,value:d};for(let b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}let u=this.value["~run"]({value:d},n);if(u.issues){let h={type:"object",origin:"value",input:a,key:l,value:d};for(let b of u.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=u.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!u.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=u.value)}}else Ne(this,"type",i,n);return i}}}function xe(e){return{kind:"schema",type:"string",reference:xe,expects:"string",async:!1,message:e,get"~standard"(){return ge(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ne(this,"type",t,r),t}}}function on(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function Pr(e,t){return{kind:"schema",type:"union",reference:Pr,expects:ls(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return ge(this)},"~run"(r,i){let n,a,o;for(let s of this.options){let l=s["~run"]({value:r.value},i);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(a){if(a.length===1)return a[0];Ne(this,"type",r,i,{issues:on(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Ne(this,"type",r,i,{issues:on(o)})}return r}}}function sn(){return{kind:"schema",type:"unknown",reference:sn,expects:"unknown",async:!1,get"~standard"(){return ge(this)},"~run"(e){return e.typed=!0,e}}}function us(...e){return{...e[0],pipe:e,get"~standard"(){return ge(this)},"~run"(t,r){for(let i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function ln(e,t,r){let i=e["~run"]({value:t},Qi(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}var ds=e=>({ok:!0,err:!1,val:e}),fs=e=>({err:!0,ok:!1,val:e}),Nt=(e,t)=>{if(t.length===0)return;let r=e;for(let i of t){if(r==null||typeof r!="object")return;r=r[i]}return r},ps=(e,t="all")=>{let r={},i=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(i&&!i.has(n)||(r[n]=a.value))}return r},hs=({key:e,submissions:t})=>{var i;let r=(i=t[e])==null?void 0:i.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},cn=({key:e,path:t,submissions:r,context:i})=>{if(e==="$context"){if(!t)return;let n=Nt(i,t);switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${t.join(".")}`,n);return}}return r[e]},gs=e=>{let t=e.split(".").pop();return t?ds(t?"."+t:""):fs("No file extension found")},bs=(e,t)=>{if(t.length===0)return!0;let r=t.map(i=>i.toLowerCase());return e.every(i=>{let n=gs(i.name);return n.ok&&r.includes(n.val.toLowerCase())})},Dt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,or=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,vs=le({integration_response:le({data:le({redirect_url:xe(),message:De(nr(xe())),button_text:De(nr(xe()))})})}),ws=e=>ln(vs,e).success,ms=le({integration_response:le({error:le({message:xe()})})}),ys=e=>ln(ms,e).success;le({success:ir(!1),message:De(sn())});var _s=e=>{if(typeof e!="object"||e===null)return null;let t=e.integration_response;if(typeof t!="object"||t===null)return null;let r=t;if(typeof r.status!="number"||r.service!==void 0&&typeof r.service!="string")return null;let i="data"in r,n=r.error,a=typeof n=="object"&&n!==null&&typeof n.message=="string"&&"data"in n;if(!i&&!a)return null;let o=i?r.data:n.data??null;return{service:r.service??"INVALID_SERVICE",response:{status:r.status,payload:o}}},xs=({context:e,schema:t,logger:r})=>{if(t)for(let i in t){let n=t[i];if(!n)continue;let a=Nt(e,i.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${i} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${i} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${i} is not a string`);break;default:n.type}}};let ze;function un(e){return{lang:(e==null?void 0:e.lang)??(ze==null?void 0:ze.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(ze==null?void 0:ze.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(ze==null?void 0:ze.abortPipeEarly)}}let jr;function ks(e){return jr==null?void 0:jr.get(e)}let Rr;function Ss(e){return Rr==null?void 0:Rr.get(e)}let Br;function Cs(e,t){var r;return(r=Br==null?void 0:Br.get(e))==null?void 0:r.get(t)}function dn(e){var r,i;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function Ve(e,t,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??dn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Cs(e.reference,l.lang)??(d?Ss(l.lang):null)??i.message??ks(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ke(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},un())}}}function Es(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function $s(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function zr(e,t){return{kind:"validation",type:"max_length",reference:zr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&Ve(this,"length",r,i,{received:`${r.value.length}`}),r}}}function sr(e,t){return{kind:"validation",type:"min_length",reference:sr,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&Ve(this,"length",r,i,{received:`${r.value.length}`}),r}}}function Ur(){return{kind:"transformation",type:"trim",reference:Ur,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Is(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function lr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function fn(e,t){return{kind:"schema",type:"array",reference:fn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){var a;const n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){const d={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Ve(this,"type",r,i);return r}}}function Hr(e){return{kind:"schema",type:"boolean",reference:Hr,expects:"boolean",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Ve(this,"type",t,r),t}}}function U(e,t){return{kind:"schema",type:"nullable",reference:U,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Vt(e,t){return{kind:"schema",type:"nullish",reference:Vt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function lt(e){return{kind:"schema",type:"number",reference:lt,expects:"number",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ve(this,"type",t,r),t}}}function Se(e,t){return{kind:"schema",type:"object",reference:Se,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){var a;const n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:lr(s),d=s["~run"]({value:l},i);if(d.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=Is(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ve(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else Ve(this,"type",r,i);return r}}}function pn(e,t){return{kind:"schema",type:"optional",reference:pn,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=lr(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function mt(e,t){return{kind:"schema",type:"picklist",reference:mt,expects:$s(e.map(dn),"|"),async:!1,options:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:Ve(this,"type",r,i),r}}}function qr(e,t,r){return{kind:"schema",type:"record",reference:qr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ke(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const l in a)if(Es(a,l)){const d=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:d};for(const b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}const u=this.value["~run"]({value:d},n);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:d};for(const b of u.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=u.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!u.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=u.value)}}else Ve(this,"type",i,n);return i}}}function V(e){return{kind:"schema",type:"string",reference:V,expects:"string",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Ve(this,"type",t,r),t}}}function hn(){return{kind:"schema",type:"unknown",reference:hn,expects:"unknown",async:!1,get"~standard"(){return ke(this)},"~run"(e){return e.typed=!0,e}}}function Wr(...e){return{...e[0],pipe:e,get"~standard"(){return ke(this)},"~run"(t,r){for(const i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function Kr(e,t,r){const i=e["~run"]({value:t},un(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}const As=["agent","sdk","form","integration","migration"],Ts=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],Fs=["screening","cv_match","interview","overall"],Ns=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],Ds=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],gn=mt(As),Vs=mt(Ts),Ms=Wr(V(),Ur(),sr(1),zr(100)),Ls=mt(Fs),Os=mt(Ns),Ps=Wr(V(),Ur(),sr(1),zr(100)),js=mt(Ds),bn=Se({id:V(),email:U(V()),firstName:U(V()),lastName:U(V()),phone:U(V()),source:U(gn),identifiedAt:U(V()),createdAt:V(),updatedAt:V()}),vn=Wr(V(),sr(1)),Gr=qr(V(),hn()),Rs=Se({id:V(),applicationId:V(),status:Os,scheduledAt:U(V()),completedAt:U(V()),meta:U(Gr),createdAt:V(),updatedAt:V()}),Bs=Se({score:lt(),reason:V(),confidence:lt()}),wn=Se({id:V(),candidateId:V(),jobId:lt(),stage:Ms,stageGroup:Vs,stageEnteredAt:V(),rating:U(lt()),disqualifiedAt:U(V()),disqualificationReason:U(Ps),disqualificationNote:U(V()),source:js,sourceDetail:U(V()),sessionId:U(lt()),externalApplicationId:U(V()),meta:U(Gr),context:U(Gr),scoredAt:U(V()),createdAt:V(),updatedAt:V()}),zs=Se({id:V(),applicationId:V(),scoreType:Ls,score:U(lt()),reason:U(V()),categories:U(qr(V(),Bs)),scoredBy:U(V()),createdAt:V()});({...wn.entries},{...bn.entries});const Us=Se({anonymousId:vn,email:vn,firstName:Vt(V()),lastName:Vt(V()),phone:Vt(V()),source:Vt(gn)}),Hs=Se({candidateId:V(),isNew:Hr()}),qs=Se({isDuplicate:Hr(),existingApplication:pn(Se({id:V(),stageGroup:V(),createdAt:V()}))});var Ws=e=>e,Ks=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},mn=class extends Ks{constructor(t,r,i){super(t),this.data=i,this.name="ApiError",this.status=r??500}},Gs=e=>e instanceof mn&&e.data!==void 0,Ys={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Js(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function Mf(e){return e}var Zs=({environment:e,publishableKey:t,logger:r})=>{let i=Ys[e];return{async checkDuplicate(n){try{let a=new URLSearchParams({email:n.email,scope:n.scope});n.scope==="job"&&n.jobId!=null&&a.set("job_id",String(n.jobId));let o=await fetch(`${i}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Kr(qs,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:n.email,firstName:n.firstName,lastName:n.lastName,phone:n.phone,anonymousId:n.anonymousId,source:n.source??"sdk"},o=Kr(Us,a);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${i}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Kr(Hs,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},Mt,F,yn,_n,ct,xn,kn,Yr,Sn,yt={},Cn=[],Xs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cr=Array.isArray;function Ue(e,t){for(var r in t)e[r]=t[r];return e}function En(e){var t=e.parentNode;t&&t.removeChild(e)}function be(e,t,r){var i,n,a,o={};for(a in t)a=="key"?i=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Mt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Lt(e,o,i,n,null)}function Lt(e,t,r,i,n){var a={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++yn};return n==null&&F.vnode!=null&&F.vnode(a),a}function Qs(){return{current:null}}function ie(e){return e.children}function Ee(e,t){this.props=e,this.context=t}function ur(e,t){if(t==null)return e.__?ur(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ur(e):null}function $n(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return $n(e)}}function Jr(e){(!e.__d&&(e.__d=!0)&&ct.push(e)&&!dr.__r++||xn!==F.debounceRendering)&&((xn=F.debounceRendering)||kn)(dr)}function dr(){var e,t,r,i,n,a,o,s,l;for(ct.sort(Yr);e=ct.shift();)e.__d&&(t=ct.length,i=void 0,n=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(i=[],n=[],(a=Ue({},o)).__v=o.__v+1,Zr(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,i,s??ur(o),o.__h,n),Vn(i,o,n),o.__e!=s&&$n(o)),ct.length>t&&ct.sort(Yr));dr.__r=0}function In(e,t,r,i,n,a,o,s,l,d,p){var u,h,b,w,S,k,y,m,_,$,E=0,T=i&&i.__k||Cn,G=T.length,O=G,P=t.length;for(r.__k=[],u=0;u<P;u++)(w=r.__k[u]=(w=t[u])==null||typeof w=="boolean"||typeof w=="function"?null:typeof w=="string"||typeof w=="number"||typeof w=="bigint"?Lt(null,w,null,null,w):cr(w)?Lt(ie,{children:w},null,null,null):w.__b>0?Lt(w.type,w.props,w.key,w.ref?w.ref:null,w.__v):w)!=null&&(w.__=r,w.__b=r.__b+1,(m=el(w,T,y=u+E,O))===-1?b=yt:(b=T[m]||yt,T[m]=void 0,O--),Zr(e,w,b,n,a,o,s,l,d,p),S=w.__e,(h=w.ref)&&b.ref!=h&&(b.ref&&Xr(b.ref,null,w),p.push(h,w.__c||S,w)),S!=null&&(k==null&&(k=S),$=!(_=b===yt||b.__v===null)&&m===y,_?m==-1&&E--:m!==y&&(m===y+1?(E++,$=!0):m>y?O>P-y?(E+=m-y,$=!0):E--:E=m<y&&m==y-1?m-y:0),y=u+E,$=$||m==u&&!_,typeof w.type!="function"||m===y&&b.__k!==w.__k?typeof w.type=="function"||$?w.__d!==void 0?(l=w.__d,w.__d=void 0):l=S.nextSibling:l=Tn(e,S,l):l=An(w,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=k,u=G;u--;)T[u]!=null&&(typeof r.type=="function"&&T[u].__e!=null&&T[u].__e==r.__d&&(r.__d=T[u].__e.nextSibling),Mn(T[u],T[u]))}function An(e,t,r){for(var i,n=e.__k,a=0;n&&a<n.length;a++)(i=n[a])&&(i.__=e,t=typeof i.type=="function"?An(i,t,r):Tn(r,i.__e,t));return t}function He(e,t){return t=t||[],e==null||typeof e=="boolean"||(cr(e)?e.some(function(r){He(r,t)}):t.push(e)),t}function Tn(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function el(e,t,r,i){var n=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&n==l.key&&a===l.type)return r;if(i>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&n==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&n==l.key&&a===l.type)return s;s++}}return-1}function tl(e,t,r,i,n){var a;for(a in r)a==="children"||a==="key"||a in t||fr(e,a,null,r[a],i);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||fr(e,a,t[a],r[a],i)}function Fn(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Xs.test(t)?r:r+"px"}function fr(e,t,r,i,n){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||Fn(e.style,t,"");if(r)for(t in r)i&&r[t]===i[t]||Fn(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?i||e.addEventListener(t,a?Dn:Nn,a):e.removeEventListener(t,a?Dn:Nn,a);else if(t!=="dangerouslySetInnerHTML"){if(n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Nn(e){return this.l[e.type+!1](F.event?F.event(e):e)}function Dn(e){return this.l[e.type+!0](F.event?F.event(e):e)}function Zr(e,t,r,i,n,a,o,s,l,d){var p,u,h,b,w,S,k,y,m,_,$,E,T,G,O,P=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(p=F.__b)&&p(t);try{e:if(typeof P=="function"){if(y=t.props,m=(p=P.contextType)&&i[p.__c],_=p?m?m.props.value:p.__:i,r.__c?k=(u=t.__c=r.__c).__=u.__E:("prototype"in P&&P.prototype.render?t.__c=u=new P(y,_):(t.__c=u=new Ee(y,_),u.constructor=P,u.render=il),m&&m.sub(u),u.props=y,u.state||(u.state={}),u.context=_,u.__n=i,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),P.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Ue({},u.__s)),Ue(u.__s,P.getDerivedStateFromProps(y,u.__s))),b=u.props,w=u.state,u.__v=t,h)P.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(P.getDerivedStateFromProps==null&&y!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,_),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,_)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(z){z&&(z.__=t)}),$=0;$<u._sb.length;$++)u.__h.push(u._sb[$]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,_),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,w,S)})}if(u.context=_,u.props=y,u.__P=e,u.__e=!1,E=F.__r,T=0,"prototype"in P&&P.prototype.render){for(u.state=u.__s,u.__d=!1,E&&E(t),p=u.render(u.props,u.state,u.context),G=0;G<u._sb.length;G++)u.__h.push(u._sb[G]);u._sb=[]}else do u.__d=!1,E&&E(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++T<25);u.state=u.__s,u.getChildContext!=null&&(i=Ue(Ue({},i),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(S=u.getSnapshotBeforeUpdate(b,w)),In(e,cr(O=p!=null&&p.type===ie&&p.key==null?p.props.children:p)?O:[O],t,r,i,n,a,o,s,l,d),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),k&&(u.__E=u.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=rl(r.__e,t,r,i,n,a,o,l,d);(p=F.diffed)&&p(t)}catch(z){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),F.__e(z,t,r)}}function Vn(e,t,r){for(var i=0;i<r.length;i++)Xr(r[i],r[++i],r[++i]);F.__c&&F.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){F.__e(a,n.__v)}})}function rl(e,t,r,i,n,a,o,s,l){var d,p,u,h=r.props,b=t.props,w=t.type,S=0;if(w==="svg"&&(n=!0),a!=null){for(;S<a.length;S++)if((d=a[S])&&"setAttribute"in d==!!w&&(w?d.localName===w:d.nodeType===3)){e=d,a[S]=null;break}}if(e==null){if(w===null)return document.createTextNode(b);e=n?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,b.is&&b),a=null,s=!1}if(w===null)h===b||s&&e.data===b||(e.data=b);else{if(a=a&&Mt.call(e.childNodes),p=(h=r.props||yt).dangerouslySetInnerHTML,u=b.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},S=0;S<e.attributes.length;S++)h[e.attributes[S].name]=e.attributes[S].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(tl(e,b,h,n,s),u)t.__k=[];else if(In(e,cr(S=t.props.children)?S:[S],t,r,i,n&&w!=="foreignObject",a,o,a?a[0]:r.__k&&ur(r,0),s,l),a!=null)for(S=a.length;S--;)a[S]!=null&&En(a[S]);s||("value"in b&&(S=b.value)!==void 0&&(S!==e.value||w==="progress"&&!S||w==="option"&&S!==h.value)&&fr(e,"value",S,h.value,!1),"checked"in b&&(S=b.checked)!==void 0&&S!==e.checked&&fr(e,"checked",S,h.checked,!1))}return e}function Xr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(i){F.__e(i,r)}}function Mn(e,t,r){var i,n;if(F.unmount&&F.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||Xr(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){F.__e(a,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(n=0;n<i.length;n++)i[n]&&Mn(i[n],t,r||typeof e.type!="function");r||e.__e==null||En(e.__e),e.__=e.__e=e.__d=void 0}function il(e,t,r){return this.constructor(e,r)}function ut(e,t,r){var i,n,a,o;F.__&&F.__(e,t),n=(i=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Zr(t,e=(!i&&r||t).__k=be(ie,null,[e]),n||yt,yt,t.ownerSVGElement!==void 0,!i&&r?[r]:n?null:t.firstChild?Mt.call(t.childNodes):null,a,!i&&r?r:n?n.__e:t.firstChild,i,o),Vn(a,e,o)}function Ln(e,t){ut(e,t,Ln)}function nl(e,t,r){var i,n,a,o,s=Ue({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?i=t[a]:a=="ref"?n=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Mt.call(arguments,2):r),Lt(e.type,s,i||e.key,n||e.ref,null)}function On(e,t){var r={__c:t="__cC"+Sn++,__:e,Consumer:function(i,n){return i.children(n)},Provider:function(i){var n,a;return this.getChildContext||(n=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Jr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),i.children}};return r.Provider.__=r.Consumer.contextType=r}Mt=Cn.slice,F={__e:function(e,t,r,i){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,i||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},yn=0,_n=function(e){return e!=null&&e.constructor===void 0},Ee.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ue({},this.state),typeof e=="function"&&(e=e(Ue({},r),this.props)),e&&Ue(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Jr(this))},Ee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Jr(this))},Ee.prototype.render=ie,ct=[],kn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yr=function(e,t){return e.__v.__b-t.__v.__b},dr.__r=0,Sn=0;function Pn(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Pn(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Ze(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Pn(e))&&(i&&(i+=" "),i+=t);return i}const jn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rn=Ze,dt=(e,t)=>r=>{var i;if((t==null?void 0:t.variants)==null)return Rn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(d=>{const p=r==null?void 0:r[d],u=a==null?void 0:a[d];if(p===null)return null;const h=jn(p)||jn(u);return n[d][h]}),s=r&&Object.entries(r).reduce((d,p)=>{let[u,h]=p;return h===void 0||(d[u]=h),d},{}),l=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((d,p)=>{let{class:u,className:h,...b}=p;return Object.entries(b).every(w=>{let[S,k]=w;return Array.isArray(k)?k.includes({...a,...s}[S]):{...a,...s}[S]===k})?[...d,u,h]:d},[]);return Rn(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var Xe,W,Qr,Bn,_t=0,zn=[],pr=[],Un=F.__b,Hn=F.__r,qn=F.diffed,Wn=F.__c,Kn=F.unmount;function xt(e,t){F.__h&&F.__h(W,e,_t||t),_t=0;var r=W.__H||(W.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:pr}),r.__[e]}function Ce(e){return _t=1,Gn(Zn,e)}function Gn(e,t,r){var i=xt(Xe++,2);if(i.t=e,!i.__c&&(i.__=[r?r(t):Zn(void 0,t),function(s){var l=i.__N?i.__N[0]:i.__[0],d=i.t(l,s);l!==d&&(i.__N=[d,i.__[1]],i.__c.setState({}))}],i.__c=W,!W.u)){var n=function(s,l,d){if(!i.__c.__H)return!0;var p=i.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,s,l,d);var u=!1;return p.forEach(function(h){if(h.__N){var b=h.__[0];h.__=h.__N,h.__N=void 0,b!==h.__[0]&&(u=!0)}}),!(!u&&i.__c.props===s)&&(!a||a.call(this,s,l,d))};W.u=!0;var a=W.shouldComponentUpdate,o=W.componentWillUpdate;W.componentWillUpdate=function(s,l,d){if(this.__e){var p=a;a=void 0,n(s,l,d),a=p}o&&o.call(this,s,l,d)},W.shouldComponentUpdate=n}return i.__N||i.__}function $e(e,t){var r=xt(Xe++,3);!F.__s&&ti(r.__H,t)&&(r.__=e,r.i=t,W.__H.__h.push(r))}function ve(e,t){var r=xt(Xe++,4);!F.__s&&ti(r.__H,t)&&(r.__=e,r.i=t,W.__h.push(r))}function we(e){return _t=5,qe(function(){return{current:e}},[])}function al(e,t,r){_t=6,ve(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function qe(e,t){var r=xt(Xe++,7);return ti(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ol(e,t){return _t=8,qe(function(){return e},t)}function Yn(e){var t=W.context[e.__c],r=xt(Xe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(W)),t.props.value):e.__}function sl(e,t){F.useDebugValue&&F.useDebugValue(t?t(e):e)}function ll(){var e=xt(Xe++,11);if(!e.__){for(var t=W.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function cl(){for(var e;e=zn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(hr),e.__H.__h.forEach(ei),e.__H.__h=[]}catch(t){e.__H.__h=[],F.__e(t,e.__v)}}F.__b=function(e){W=null,Un&&Un(e)},F.__r=function(e){Hn&&Hn(e),Xe=0;var t=(W=e.__c).__H;t&&(Qr===W?(t.__h=[],W.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=pr,r.__N=r.i=void 0})):(t.__h.forEach(hr),t.__h.forEach(ei),t.__h=[],Xe=0)),Qr=W},F.diffed=function(e){qn&&qn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(zn.push(t)!==1&&Bn===F.requestAnimationFrame||((Bn=F.requestAnimationFrame)||ul)(cl)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==pr&&(r.__=r.__V),r.i=void 0,r.__V=pr})),Qr=W=null},F.__c=function(e,t){t.some(function(r){try{r.__h.forEach(hr),r.__h=r.__h.filter(function(i){return!i.__||ei(i)})}catch(i){t.some(function(n){n.__h&&(n.__h=[])}),t=[],F.__e(i,r.__v)}}),Wn&&Wn(e,t)},F.unmount=function(e){Kn&&Kn(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(i){try{hr(i)}catch(n){t=n}}),r.__H=void 0,t&&F.__e(t,r.__v))};var Jn=typeof requestAnimationFrame=="function";function ul(e){var t,r=function(){clearTimeout(i),Jn&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,100);Jn&&(t=requestAnimationFrame(r))}function hr(e){var t=W,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),W=t}function ei(e){var t=W;e.__c=e.__(),W=t}function ti(e,t){return!e||e.length!==t.length||t.some(function(r,i){return r!==e[i]})}function Zn(e,t){return typeof t=="function"?t(e):t}function Xn(e,t){for(var r in t)e[r]=t[r];return e}function ri(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var i in t)if(i!=="__source"&&e[i]!==t[i])return!0;return!1}function ii(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ni(e){this.props=e}function dl(e,t){function r(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,n)||!o:ri(this.props,n)}function i(n){return this.shouldComponentUpdate=r,be(e,n)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(ni.prototype=new Ee).isPureReactComponent=!0,ni.prototype.shouldComponentUpdate=function(e,t){return ri(this.props,e)||ri(this.state,t)};var Qn=F.__b;F.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Qn&&Qn(e)};var fl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ai(e){function t(r){var i=Xn({},r);return delete i.ref,e(i,r.ref||null)}return t.$$typeof=fl,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ea=function(e,t){return e==null?null:He(He(e).map(t))},pl={map:ea,forEach:ea,count:function(e){return e?He(e).length:0},only:function(e){var t=He(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:He},hl=F.__e;F.__e=function(e,t,r,i){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),n.__c(e,t)}hl(e,t,r,i)};var ta=F.unmount;function ra(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),e.__c.__H=null),(e=Xn({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(i){return ra(i,t,r)})),e}function ia(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(i){return ia(i,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function Ot(){this.__u=0,this.t=null,this.__b=null}function na(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function aa(e){var t,r,i;function n(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){i=o}),i)throw i;if(!r)throw t;return be(r,a)}return n.displayName="Lazy",n.__f=!0,n}function Pt(){this.u=null,this.o=null}F.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),ta&&ta(e)},(Ot.prototype=new Ee).__c=function(e,t){var r=t.__c,i=this;i.t==null&&(i.t=[]),i.t.push(r);var n=na(i.__v),a=!1,o=function(){a||(a=!0,r.__R=null,n?n(s):s())};r.__R=o;var s=function(){if(!--i.__u){if(i.state.__a){var d=i.state.__a;i.__v.__k[0]=ia(d,d.__c.__P,d.__c.__O)}var p;for(i.setState({__a:i.__b=null});p=i.t.pop();)p.forceUpdate()}},l=t.__h===!0;i.__u++||l||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(o,o)},Ot.prototype.componentWillUnmount=function(){this.t=[]},Ot.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=ra(this.__b,r,i.__O=i.__P)}this.__b=null}var n=t.__a&&be(ie,null,e.fallback);return n&&(n.__h=null),[be(ie,null,t.__a?null:e.children),n]};var oa=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function gl(e){return this.getChildContext=function(){return e.context},e.children}function bl(e){var t=this,r=e.i;t.componentWillUnmount=function(){ut(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(i){this.childNodes.push(i),t.i.appendChild(i)},insertBefore:function(i,n){this.childNodes.push(i),t.i.appendChild(i)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.i.removeChild(i)}}),ut(be(gl,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function vl(e,t){var r=be(bl,{__v:e,i:t});return r.containerInfo=t,r}(Pt.prototype=new Ee).__a=function(e){var t=this,r=na(t.__v),i=t.o.get(e);return i[0]++,function(n){var a=function(){t.props.revealOrder?(i.push(n),oa(t,e,i)):n()};r?r(a):a()}},Pt.prototype.render=function(e){this.u=null,this.o=new Map;var t=He(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Pt.prototype.componentDidUpdate=Pt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){oa(e,r,t)})};var sa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,wl=/^(?: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]/,ml=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,yl=/[A-Z0-9]/g,_l=typeof document<"u",xl=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function kl(e,t,r){return t.__k==null&&(t.textContent=""),ut(e,t),typeof r=="function"&&r(),e?e.__c:null}function Sl(e,t,r){return Ln(e,t),typeof r=="function"&&r(),e?e.__c:null}Ee.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ee.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var la=F.event;function Cl(){}function El(){return this.cancelBubble}function $l(){return this.defaultPrevented}F.event=function(e){return la&&(e=la(e)),e.persist=Cl,e.isPropagationStopped=El,e.isDefaultPrevented=$l,e.nativeEvent=e};var oi,Il={enumerable:!1,configurable:!0,get:function(){return this.class}},ca=F.vnode;F.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,i=t.type,n={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||_l&&a==="children"&&i==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||i!=="input"&&i!=="textarea"||xl(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":ml.test(a)?a=s:i.indexOf("-")===-1&&wl.test(a)?a=a.replace(yl,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}i=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=He(r.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),i=="select"&&n.defaultValue!=null&&(n.value=He(r.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",Il)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),t.props=n}(e),e.$$typeof=sa,ca&&ca(e)};var ua=F.__r;F.__r=function(e){ua&&ua(e),oi=e.__c};var da=F.diffed;F.diffed=function(e){da&&da(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),oi=null};var Al={ReactCurrentDispatcher:{current:{readContext:function(e){return oi.__n[e.__c].props.value}}}};function Tl(e){return be.bind(null,e)}function fa(e){return!!e&&e.$$typeof===sa}function Fl(e){return fa(e)?nl.apply(null,arguments):e}function Nl(e){return!!e.__k&&(ut(null,e),!0)}function Dl(e){return e&&(e.base||e.nodeType===1&&e)||null}var Vl=function(e,t){return e(t)},Ml=function(e,t){return e(t)},Ll=ie;function pa(e){e()}function Ol(e){return e}function Pl(){return[!1,pa]}var jl=ve;function Rl(e,t){var r=t(),i=Ce({h:{__:r,v:t}}),n=i[0].h,a=i[1];return ve(function(){n.__=r,n.v=t,ii(n.__,t())||a({h:n})},[e,r,t]),$e(function(){return ii(n.__,n.v())||a({h:n}),e(function(){ii(n.__,n.v())||a({h:n})})},[e]),r}var ce={useState:Ce,useId:ll,useReducer:Gn,useEffect:$e,useLayoutEffect:ve,useInsertionEffect:jl,useTransition:Pl,useDeferredValue:Ol,useSyncExternalStore:Rl,startTransition:pa,useRef:we,useImperativeHandle:al,useMemo:qe,useCallback:ol,useContext:Yn,useDebugValue:sl,version:"17.0.2",Children:pl,render:kl,hydrate:Sl,unmountComponentAtNode:Nl,createPortal:vl,createElement:be,createContext:On,createFactory:Tl,cloneElement:Fl,createRef:Qs,Fragment:ie,isValidElement:fa,findDOMNode:Dl,Component:Ee,PureComponent:ni,memo:dl,forwardRef:ai,flushSync:Ml,unstable_batchedUpdates:Vl,StrictMode:Ll,Suspense:Ot,SuspenseList:Pt,lazy:aa,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Al};const ue=Symbol.for("@ts-pattern/matcher"),ha=Symbol.for("@ts-pattern/isVariadic"),gr="@ts-pattern/anonymous-select-key",si=e=>!!(e&&typeof e=="object"),br=e=>e&&!!e[ue],Z=(e,t,r)=>{if(br(e)){const i=e[ue](),{matched:n,selections:a}=i.match(t);return n&&a&&Object.keys(a).forEach(o=>r(o,a[o])),n}if(si(e)){if(!si(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let i=[],n=[],a=[];for(const o of e.keys()){const s=e[o];br(s)&&s[ha]?a.push(s):a.length?n.push(s):i.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<i.length+n.length)return!1;const o=t.slice(0,i.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(i.length,n.length===0?1/0:-n.length);return i.every((d,p)=>Z(d,o[p],r))&&n.every((d,p)=>Z(d,s[p],r))&&(a.length===0||Z(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>Z(o,t[s],r))}return Reflect.ownKeys(e).every(i=>{const n=e[i];return(i in t||br(a=n)&&a[ue]().matcherType==="optional")&&Z(n,t[i],r);var a})}return Object.is(t,e)},de=e=>{var t,r,i;return si(e)?br(e)?(t=(r=(i=e[ue]()).getSelectionKeys)==null?void 0:r.call(i))!=null?t:[]:Array.isArray(e)?jt(e,de):jt(Object.values(e),de):[]},jt=(e,t)=>e.reduce((r,i)=>r.concat(t(i)),[]);function Bl(...e){if(e.length===1){const[t]=e;return r=>Z(t,r,()=>{})}if(e.length===2){const[t,r]=e;return Z(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ee(e){return Object.assign(e,{optional:()=>ci(e),and:t=>K(e,t),or:t=>ga(e,t),select:t=>t===void 0?Rt(e):Rt(t,e)})}function li(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const i=[{value:Object.assign(t,{[ha]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=i[r++])!=null?n:i.at(-1)}}}}))(e),{optional:()=>li(ci(e)),select:t=>li(t===void 0?Rt(e):Rt(t,e))})}function ci(e){return ee({[ue]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return t===void 0?(de(e).forEach(n=>i(n,void 0)),{matched:!0,selections:r}):{matched:Z(e,t,i),selections:r}},getSelectionKeys:()=>de(e),matcherType:"optional"})})}const zl=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Ul=(e,t)=>{for(const[r,i]of e.entries())if(!t(i,r))return!1;return!0},Hl=(e,t)=>{const r=Reflect.ownKeys(e);for(const i of r)if(!t(i,e[i]))return!1;return!0};function K(...e){return ee({[ue]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return{matched:e.every(n=>Z(n,t,i)),selections:r}},getSelectionKeys:()=>jt(e,de),matcherType:"and"})})}function ga(...e){return ee({[ue]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return jt(e,de).forEach(n=>i(n,void 0)),{matched:e.some(n=>Z(n,t,i)),selections:r}},getSelectionKeys:()=>jt(e,de),matcherType:"or"})})}function L(e){return{[ue]:()=>({match:t=>({matched:!!e(t)})})}}function Rt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ee({[ue]:()=>({match:i=>{let n={[t??gr]:i};return{matched:r===void 0||Z(r,i,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??gr].concat(r===void 0?[]:de(r))})})}function ba(e){return!0}function Me(e){return typeof e=="number"}function Qe(e){return typeof e=="string"}function et(e){return typeof e=="bigint"}const va=ee(L(ba)),ql=ee(L(ba)),Wl=va,tt=e=>Object.assign(ee(e),{startsWith:t=>{return tt(K(e,(r=t,L(i=>Qe(i)&&i.startsWith(r)))));var r},endsWith:t=>{return tt(K(e,(r=t,L(i=>Qe(i)&&i.endsWith(r)))));var r},minLength:t=>tt(K(e,(r=>L(i=>Qe(i)&&i.length>=r))(t))),length:t=>tt(K(e,(r=>L(i=>Qe(i)&&i.length===r))(t))),maxLength:t=>tt(K(e,(r=>L(i=>Qe(i)&&i.length<=r))(t))),includes:t=>{return tt(K(e,(r=t,L(i=>Qe(i)&&i.includes(r)))));var r},regex:t=>{return tt(K(e,(r=t,L(i=>Qe(i)&&!!i.match(r)))));var r}}),wa=tt(L(Qe)),Le=e=>Object.assign(ee(e),{between:(t,r)=>Le(K(e,((i,n)=>L(a=>Me(a)&&i<=a&&n>=a))(t,r))),lt:t=>Le(K(e,(r=>L(i=>Me(i)&&i<r))(t))),gt:t=>Le(K(e,(r=>L(i=>Me(i)&&i>r))(t))),lte:t=>Le(K(e,(r=>L(i=>Me(i)&&i<=r))(t))),gte:t=>Le(K(e,(r=>L(i=>Me(i)&&i>=r))(t))),int:()=>Le(K(e,L(t=>Me(t)&&Number.isInteger(t)))),finite:()=>Le(K(e,L(t=>Me(t)&&Number.isFinite(t)))),positive:()=>Le(K(e,L(t=>Me(t)&&t>0))),negative:()=>Le(K(e,L(t=>Me(t)&&t<0)))}),Kl=Le(L(Me)),rt=e=>Object.assign(ee(e),{between:(t,r)=>rt(K(e,((i,n)=>L(a=>et(a)&&i<=a&&n>=a))(t,r))),lt:t=>rt(K(e,(r=>L(i=>et(i)&&i<r))(t))),gt:t=>rt(K(e,(r=>L(i=>et(i)&&i>r))(t))),lte:t=>rt(K(e,(r=>L(i=>et(i)&&i<=r))(t))),gte:t=>rt(K(e,(r=>L(i=>et(i)&&i>=r))(t))),positive:()=>rt(K(e,L(t=>et(t)&&t>0))),negative:()=>rt(K(e,L(t=>et(t)&&t<0)))}),Gl=rt(L(et)),Yl=ee(L(function(e){return typeof e=="boolean"})),Jl=ee(L(function(e){return typeof e=="symbol"})),Zl=ee(L(function(e){return e==null})),Xl=ee(L(function(e){return e!=null}));var Bt={__proto__:null,matcher:ue,optional:ci,array:function(...e){return li({[ue]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let i={};if(t.length===0)return de(r).forEach(a=>{i[a]=[]}),{matched:!0,selections:i};const n=(a,o)=>{i[a]=(i[a]||[]).concat([o])};return{matched:t.every(a=>Z(r,a,n)),selections:i}},getSelectionKeys:()=>e.length===0?[]:de(e[0])})})},set:function(...e){return ee({[ue]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const i=(a,o)=>{r[a]=(r[a]||[]).concat([o])},n=e[0];return{matched:zl(t,a=>Z(n,a,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:de(e[0])})})},map:function(...e){return ee({[ue]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const i=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var n;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);const[a,o]=e;return{matched:Ul(t,(s,l)=>{const d=Z(a,l,i),p=Z(o,s,i);return d&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...de(e[0]),...de(e[1])]})})},record:function(...e){return ee({[ue]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let i={};const n=(s,l)=>{i[s]=(i[s]||[]).concat([l])},[a,o]=e.length===1?[wa,e[0]]:e;return{matched:Hl(t,(s,l)=>{const d=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=d!==null&&Z(a,d,n),u=Z(a,s,n),h=Z(o,l,n);return(u||p)&&h}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[...de(e[0]),...de(e[1])]})})},intersection:K,union:ga,not:function(e){return ee({[ue]:()=>({match:t=>({matched:!Z(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:L,select:Rt,any:va,unknown:ql,_:Wl,string:wa,number:Kl,bigint:Gl,boolean:Yl,symbol:Jl,nullish:Zl,nonNullable:Xl,instanceOf:function(e){return ee(L(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ee(L(Bl(e)))}};class Ql extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}}const ui={matched:!1,value:void 0};function vr(e){return new wr(e,ui)}class wr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],i=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&i.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(d,p)=>{a=!0,o[d]=p},l=!i.some(d=>Z(d,this.input,s))||n&&!n(this.input)?ui:{matched:!0,value:r(a?gr in o?o[gr]:o:this.input,this.input)};return new wr(this.input,l)}when(t,r){if(this.state.matched)return this;const i=!!t(this.input);return new wr(this.input,i?{matched:!0,value:r(this.input,this.input)}:ui)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=ec){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function ec(e){throw new Ql(e)}var tc=["other","few","many","two","one","zero"],ma=({terms:e,overrides:t,locale:r})=>{const i=new Intl.PluralRules(r);function n(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,d)=>{var p;return((p=o==null?void 0:o[d])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=i.select(o.count);if(!(l in s)){const d=tc.find(p=>p in s);if(!d)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=d}return s[l].replace(/{{(\w+)}}/g,(d,p)=>{var u;return((u=o==null?void 0:o[p])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},rc=0;function c(e,t,r,i,n,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var d={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--rc,__source:n,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return F.vnode&&F.vnode(d),d}var ya=On(null),_a=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:i})=>{const n=qe(()=>ma({locale:i,terms:e,overrides:t}),[t,i]);return c(ya.Provider,{value:{t:n,locale:i},children:r})},useTranslation:()=>{const t=Yn(ya);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>ma({terms:e,overrides:t,locale:r})}),{TranslationProvider:Lf,useTranslation:Of,createTFunction:Pf,defaultTerms:ic}=_a({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:nc,useTranslation:ae,createTFunction:ac}=_a({...ic,error_heading:"Something unexpected happened",undo:"Undo",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.",maximize:"Maximise",minimize:"Minimise"}),jf="";function Oe(e,t){if(!e)throw new Error(t)}var di=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(di):Object.keys(e).sort().reduce((t,r)=>(t[r]=di(e[r]),t),{}),oc=e=>{let t=JSON.stringify(di(e)),r=5381;for(let i=0;i<t.length;i++)r=r*33^t.charCodeAt(i);return(r>>>0).toString(36)},sc=Symbol.for("preact-signals");function fi(){if(kt>1)kt--;else{for(var e,t=!1;zt!==void 0;){var r=zt;for(zt=void 0,pi++;r!==void 0;){var i=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ka(r))try{r.c()}catch(n){t||(e=n,t=!0)}r=i}}if(pi=0,kt--,t)throw e}}var H=void 0,zt=void 0,kt=0,pi=0,mr=0;function xa(e){if(H!==void 0){var t=e.n;if(t===void 0||t.t!==H)return t={i:0,S:e,p:H.s,n:void 0,t:H,e:void 0,x:void 0,r:t},H.s!==void 0&&(H.s.n=t),H.s=t,e.n=t,32&H.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=H.s,t.n=void 0,H.s.n=t,H.s=t),t}}function ne(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ne.prototype.brand=sc,ne.prototype.h=function(){return!0},ne.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ne.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ne.prototype.subscribe=function(e){var t=this;return gi(function(){var r=t.value,i=H;H=void 0;try{e(r)}finally{H=i}})},ne.prototype.valueOf=function(){return this.value},ne.prototype.toString=function(){return this.value+""},ne.prototype.toJSON=function(){return this.value},ne.prototype.peek=function(){var e=H;H=void 0;try{return this.value}finally{H=e}},Object.defineProperty(ne.prototype,"value",{get:function(){var e=xa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(pi>100)throw new Error("Cycle detected");this.v=e,this.i++,mr++,kt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{fi()}}}});function We(e){return new ne(e)}function ka(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Sa(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ca(e){for(var t=e.s,r=void 0;t!==void 0;){var i=t.p;t.i===-1?(t.S.U(t),i!==void 0&&(i.n=t.n),t.n!==void 0&&(t.n.p=i)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=i}e.s=r}function St(e){ne.call(this,void 0),this.x=e,this.s=void 0,this.g=mr-1,this.f=4}(St.prototype=new ne).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===mr))return!0;if(this.g=mr,this.f|=1,this.i>0&&!ka(this))return this.f&=-2,!0;var e=H;try{Sa(this),H=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return H=e,Ca(this),this.f&=-2,!0},St.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ne.prototype.S.call(this,e)},St.prototype.U=function(e){if(this.t!==void 0&&(ne.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},St.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(St.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=xa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function lc(e){return new St(e)}function Ea(e){var t=e.u;if(e.u=void 0,typeof t=="function"){kt++;var r=H;H=void 0;try{t()}catch(i){throw e.f&=-2,e.f|=8,hi(e),i}finally{H=r,fi()}}}function hi(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ea(e)}function cc(e){if(H!==this)throw new Error("Out-of-order effect");Ca(this),H=e,this.f&=-2,8&this.f&&hi(this),fi()}function Ut(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ut.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},Ut.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ea(this),Sa(this),kt++;var e=H;return H=this,cc.bind(this,e)},Ut.prototype.N=function(){2&this.f||(this.f|=2,this.o=zt,zt=this)},Ut.prototype.d=function(){this.f|=8,1&this.f||hi(this)};function gi(e){var t=new Ut(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var bi;function Ct(e,t){F[e]=t.bind(null,F[e]||function(){})}function yr(e){bi&&bi(),bi=e&&e.S()}function $a(e){var t=this,r=e.data,i=dc(r);i.value=r;var n=qe(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!_n(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},lc(function(){var o=i.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}$a.displayName="_st",Object.defineProperties(ne.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:$a},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Ct("__b",function(e,t){if(typeof t.type=="string"){var r,i=t.props;for(var n in i)if(n!=="children"){var a=i[n];a instanceof ne&&(r||(t.__np=r={}),r[n]=a,i[n]=a.peek())}}e(t)}),Ct("__r",function(e,t){yr();var r,i=t.__c;i&&(i.__$f&=-2,(r=i.__$u)===void 0&&(i.__$u=r=function(n){var a;return gi(function(){a=this}),a.c=function(){i.__$f|=1,i.setState({})},a}())),yr(r),e(t)}),Ct("__e",function(e,t,r,i){yr(),e(t,r,i)}),Ct("diffed",function(e,t){yr();var r;if(typeof t.type=="string"&&(r=t.__e)){var i=t.__np,n=t.props;if(i){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in i)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in i){var d=a[l],p=i[l];d===void 0?(d=uc(r,l,p,n),a[l]=d):d.o(p,n)}}}e(t)});function uc(e,t,r,i){var n=t in e&&e.ownerSVGElement===void 0,a=We(r);return{o:function(o,s){a.value=o,i=s},d:gi(function(){var o=a.value.value;i[t]!==o&&(i[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Ct("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var i=r.U;if(i){r.U=void 0;for(var n in i){var a=i[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Ct("__h",function(e,t,r,i){(i<3||i===9)&&(t.__$f|=2),e(t,r,i)}),Ee.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var i in t)return!0;for(var n in e)if(n!=="__source"&&e[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function dc(e){return qe(function(){return We(e)},[])}const vi=(e,t)=>t.some(r=>e instanceof r);let Ia,Aa;function fc(){return Ia||(Ia=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function pc(){return Aa||(Aa=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const wi=new WeakMap,mi=new WeakMap,_r=new WeakMap;function hc(e){const t=new Promise((r,i)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(ft(e.result)),n()},o=()=>{i(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return _r.set(t,e),t}function gc(e){if(wi.has(e))return;const t=new Promise((r,i)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),n()},o=()=>{i(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});wi.set(e,t)}let yi={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return wi.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ft(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Ta(e){yi=e(yi)}function bc(e){return pc().includes(e)?function(...t){return e.apply(_i(this),t),ft(this.request)}:function(...t){return ft(e.apply(_i(this),t))}}function vc(e){return typeof e=="function"?bc(e):(e instanceof IDBTransaction&&gc(e),vi(e,fc())?new Proxy(e,yi):e)}function ft(e){if(e instanceof IDBRequest)return hc(e);if(mi.has(e))return mi.get(e);const t=vc(e);return t!==e&&(mi.set(e,t),_r.set(t,e)),t}const _i=e=>_r.get(e);function wc(e,t,{blocked:r,upgrade:i,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=ft(o);return i&&o.addEventListener("upgradeneeded",l=>{i(ft(o.result),l.oldVersion,l.newVersion,ft(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),n&&l.addEventListener("versionchange",d=>n(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const mc=["get","getKey","getAll","getAllKeys","count"],yc=["put","add","delete","clear"],xi=new Map;function Fa(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(xi.get(t))return xi.get(t);const r=t.replace(/FromIndex$/,""),i=t!==r,n=yc.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||mc.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let d=l.store;return i&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),n&&l.done]))[0]};return xi.set(t,a),a}Ta(e=>({...e,get:(t,r,i)=>Fa(t,r)||e.get(t,r,i),has:(t,r)=>!!Fa(t,r)||e.has(t,r)}));const _c=["continue","continuePrimaryKey","advance"],Na={},ki=new WeakMap,Da=new WeakMap,xc={get(e,t){if(!_c.includes(t))return e[t];let r=Na[t];return r||(r=Na[t]=function(...i){ki.set(this,Da.get(this)[t](...i))}),r}};async function*kc(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,xc);for(Da.set(r,t),_r.set(r,_i(t));t;)yield r,t=await(ki.get(r)||t.continue()),ki.delete(r)}function Va(e,t){return t===Symbol.asyncIterator&&vi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&vi(e,[IDBIndex,IDBObjectStore])}Ta(e=>({...e,get(t,r,i){return Va(t,r)?kc:e.get(t,r,i)},has(t,r){return Va(t,r)||e.has(t,r)}}));const xr=typeof indexedDB>"u"?void 0:wc("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let kr,Si,Ht;const Ma=()=>{if(!kr)return Ht;const e=kr;kr=void 0;const t=Pa(e),r=xr==null?void 0:xr.then(i=>i.put("state",e.data,t)).finally(()=>{Ht===r&&(Ht=void 0)});return Ht=r,Ht},it={getStateData:async(e,t,r)=>{var n;const i=Pa({...e,flowKeys:t,context:r});return(n=await xr)==null?void 0:n.get("state",i)},setStateData:e=>{kr=e,clearTimeout(Si),Si=setTimeout(()=>void Ma(),1e3)},flushStateData:()=>(clearTimeout(Si),Ma()??Promise.resolve())},La=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Et=e=>t=>t?t.type===e:!1;class pt extends Error{constructor(){super("Aborted")}}const Sc=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Oa=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Sc()}),Cc=e=>vr(e).with({nativeEvent:{submitter:Bt.select(Bt.union(Bt.instanceOf(HTMLButtonElement),Bt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Sr=(e,t,r,i=0)=>{if(!t.nextId)return r(t.id,{stepsMade:i,remainingSteps:0}),{stepsMade:i,remainingSteps:0};const n=e.find(d=>d.id===t.nextId);if(n===void 0)return{stepsMade:i,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(d=>d.id===a),s=t.type.includes("question")?1:0;if(o){const d=s+Math.max(Sr(e,n,r,i+s).remainingSteps,Sr(e,o,r,i+s).remainingSteps);return r(t.id,{stepsMade:i,remainingSteps:d}),{stepsMade:i,remainingSteps:d}}const l=s+Sr(e,n,r,i+s).remainingSteps;return r(t.id,{stepsMade:i,remainingSteps:l}),{stepsMade:i,remainingSteps:l}},Ec=e=>{const t={},r=e.find(i=>i.isHead);return r&&Sr(e,r,(i,n)=>{t[i]=n}),t},Pa=e=>[...e.flowKeys,e.id,e.version,e.build,oc(e.context)].join("/"),nt=We({state:"idle"}),ht=e=>{const{state:t,flow:r}=nt.value;if(t!=="loaded")return;Oe(r,"No flow to update");const i=e(r.data);r.data=i,nt.value={state:t,flow:r},it.setStateData(r)},N={current$:nt,viewState$:We("closed"),inputHeight$:We(53),prepareFlow:async({flow:e,context:t={},flowKeys:r,title:i,analytics:n,job:a,locationOrigin:o})=>(await it.flushStateData().catch(()=>{}),{data:await it.getStateData(e,r,t)??Oa(),startedAt:new Date,nodeIdToProgress:Ec(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:i,analytics:n,job:a,locationOrigin:o}),commitFlow:e=>{nt.value={state:"loaded",flow:e},it.setStateData(e)},cancelCurrentFlow:()=>{nt.value={state:"idle"},N.viewState$.value="closed"},markAsFinished:()=>ht(e=>({...e,isFinished:!0})),markAsInteracted:()=>ht(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>ht(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{ht(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await it.flushStateData()},restart:()=>{const{state:e,flow:t}=nt.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Oa(),i={...t,data:r,startedAt:new Date};nt.value={state:e,flow:i},it.setStateData(i)},addMessage:(e,t)=>{const r={...e,groupId:t};return ht(i=>(i.messages.push(r),i))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=nt.value;Oe(t==="loaded","Application not loaded");const i=r.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));r.data.messages=i,it.setStateData(r)},setSubmission:(e,t)=>ht(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>ht(t=>({...t,currentInput:e??null}))},$c=({message:e})=>{const{t}=ae();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-9 text-sm",children:e})]})]})},ja=e=>c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:"Loading"}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),Ra=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(ja,{class:"text-neutral-6 h-8 w-8"})}),Ic=e=>{const r=e/100,i=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,i))*100)}%`},Ac=dt("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),Cr=({class:e,children:t,variant:r,...i})=>c("div",{class:"flex flex-1 items-center justify-end px-1",children:c("button",{class:Ze(Ac({variant:r}),e),...i,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})})}),Tc=()=>{if(N.current$.value.state!=="loaded")return null;const e=N.current$.value.flow.nodeIdToProgress,t=N.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const i=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Ic(i)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Fc=({children:e,params:t})=>{const{t:r}=ae(),i=N.viewState$;return c(ie,{children:c("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ci,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:Ze({hidden:N.current$.value.state!=="loaded"||i.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,N.current$.value.state==="loaded"&&c(Cr,{"aria-label":"Restart",onClick:()=>{N.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(Cr,{class:"view-switch",onTouchStart:Ci,"aria-label":r("minimize"),onClick:()=>i.value="minimised",children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),c(Tc,{})]})})};function Ci(){}const Nc=aa(()=>Promise.resolve().then(()=>kf).then(e=>e.ChatbotBody)),Ba=dt("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"}}}),za=dt("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"}}}),Dc=({open:e,...t})=>{const r=we(null);return ve(()=>{const i=r.current;i&&(e?i.showModal():i.close())},[e]),c("dialog",{ref:r,...t})},Vc=({logger:e,apiClient:t,analytics:r,talentBankClient:i,params:n})=>{const{state:a,flow:o,error:s}=N.current$.value,l=N.viewState$.value,d=a!=="idle"&&l==="maximised",p=we(null);return c(nc,{terms:n.terms,locale:void 0,children:[c(Dc,{open:d,onClose:()=>N.viewState$.value="minimised",children:c("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Ba({view:"maximised"}),children:c("div",{class:za({view:"maximised"}),children:[c(Fc,{params:n,children:o==null?void 0:o.title}),vr({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Ra,{},"loading")).with({state:"loaded"},()=>c(Ot,{fallback:c(Ra,{},"loading"),children:c(Nc,{analytics:r,apiClient:t,logger:e,talentBankClient:i})})).with({state:"error"},()=>c($c,{message:s})).exhaustive()]})})}),l==="minimised"?c(Mc,{flow:o}):null]})},Mc=({flow:e})=>{const{t}=ae();return c("div",{class:Ba({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:za({view:"minimised"}),children:[c("button",{onClick:()=>{N.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ci,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),c("div",{class:"flex items-center px-0.5",children:c(Cr,{"aria-label":t("close_application"),onClick:N.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Lc=`[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-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-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-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\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[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] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[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] .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-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] .overflow-y-scroll{overflow-y:scroll}[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-b-3xl{border-bottom-right-radius:24px;border-bottom-left-radius:24px}[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\\.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-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-blur-xl{--tw-backdrop-blur: blur(24px);-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] .duration-700{transition-duration:.7s}[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-\\[height\\]{will-change:height}[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
|
+
`,Ua="inploi-chatbot",Ei=`[data-widget='${Ua}']`,Oc=()=>({getChatbotElement:()=>document.querySelector(Ei),getOrCreateChatbotElement:()=>{const e=document.querySelector(Ei);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Ua,t}}),Pc=25,$i=We({instant:()=>{},smooth:()=>{}}),jc=(e,t)=>new Promise((r,i)=>{if(t!=null&&t.aborted)return i(new pt);const n=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(n),i(new pt)},{once:!0})}),J={onSubmitSuccessFn$:We(()=>{}),onInteractionFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>$i.value.instant(),smooth:()=>$i.value.smooth()}},Rc=()=>{const e=we(null);ve(()=>{$i.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=qe(()=>({setSubmission:(i,n)=>N.setSubmission(i,n),send:async({message:i,signal:n,groupId:a})=>{if(await vr(i).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new pt;J.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Pc;try{await jc(s,n)}finally{J.isBotTyping$.value=!1}}).otherwise(async()=>{}),n!=null&&n.aborted)throw new pt;N.addMessage(i,a)},input:({input:i,signal:n})=>{if(n!=null&&n.aborted)throw new pt;return N.setInput(i),new Promise(a=>{const o=s=>{if(n!=null&&n.aborted)throw new pt;N.setInput(void 0),i.key&&N.setSubmission(i.key,s),a(s)};J.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}};var Ha=us(Pr([xe(),ar()]),tn(String)),qa=le({id:Ha,version:ar(),build:ar(),nodes:nn(rn()),context_schema:De(nr(an(xe(),le({required:Or(),type:Pr([ir("string"),ir("number")])}))))}),Bc=le({flow:qa}),zc=le({company:le({name:xe()}),flow:qa,job:le({id:Ha,title:xe()}),user:De(le({city:De(xe()),country:De(xe()),isEU:De(Or()),continent:De(xe())}))}),Uc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Js(),response:zc}},Hc={pathname:"/flow/id/:id",method:"GET",schema:{response:Bc}},qc=["1","2","3","4","5","6","7","8","9","10","11","12"],Wc={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]}},Kc=(e,t=1,r)=>i=>{const[n,a]=Wc[r][i];return"oklch("+n+"% "+a*t+" "+e+")"},Ii=e=>{const t=Kc(e.hue,e.chroma,e.mode);return Object.fromEntries(qc.map(r=>[e.prefix+r,e.transform(t(r))]))},Ai=e=>e,Gc=e=>{const t=Object.keys(e).flatMap(r=>{const i=e[r];return typeof i=="object"&&i!==null?Object.keys(i).map(n=>{const a=i[n];return[`${String(r)}.${n}`,a]}):[[r,i]]});return Object.fromEntries(t)},Er=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Ti=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Er(e)&&Er(r))for(const i in r){const n=r[i];if(Er(n)){e[i]||Object.assign(e,{[i]:{}});const a=e[i];Er(a)&&Ti(a,n)}else Object.assign(e,{[i]:r[i]})}return Ti(e,...t)},Yc=e=>{function t(r,i){const n=[e.prefix,i.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${n}`:`var(--${n})`}return t},Jc=()=>({core:e=>({semantic:t=>({component:r=>({from:i=>{const{theme:n,getToken:a}=i,o=h=>a("reference",h.toString()),s=e({theme:n}),l=t({theme:n,core:o,raw:{core:s}}),d=r({theme:n,core:o,semantic:o,raw:{core:s,semantic:l}}),p=Gc(Ti(s,l,d)),u=([h,b],w)=>{const S=[w,h].filter(Boolean).join(".");return typeof b=="object"?Object.entries(b).flatMap(k=>u(k,S)):[[i.getToken("declaration",S),b]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(h=>u(h))),ref:h=>a("reference",h.toString())}}})})})});const[Fi,Ni,Wa]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Zc=Jc().core(({theme:e})=>({color:{black:Fi,white:Ni,lowest:e.mode==="light"?Ni:Fi,highest:e.mode==="light"?Fi:Ni,...Ii({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Ai}),...Ii({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Ai}),...Ii({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Ai})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const i=(n,a)=>t.core.color[n].replace(")",` / ${a})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:i("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Wa,"bg-hover":i("n-10",.2),"bg-active":i("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:i})=>{const n=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:i(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":i(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":Wa,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":i(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Xc=Yc({prefix:"i-"}),Qc=e=>{const t=Zc.from({theme:e,getToken:Xc}),r=Object.entries(t.declarations).map(([i,n])=>`${i}: ${n};`);return`${Ei} {
|
|
3
3
|
${r.concat(r).join(`
|
|
4
4
|
`)}
|
|
5
|
-
}`},eu=({_internal_domManager:e=Mc(),theme:t,terms:r,feedback:n})=>qs(({apiClient:i,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:d})=>{let p=!1,u=0;const g=ac({locale:void 0,overrides:r??{}}),b=l&&d?Xs({environment:d,publishableKey:l,logger:o}):void 0,v=m=>m===u,_=()=>{if(typeof window>"u")return;u++,dt.flushStateData().catch(()=>{}),A.cancelCurrentFlow(),A.inputHeight$.value=53,G.isBotTyping$.value=!1;const m=e.getChatbotElement();m&&(lt(null,m),m.remove()),p=!1,o.info("Chatbot plugin destroyed")},C=()=>{if(typeof window>"u")return;const m=u,k=[be("style",{id:"inploi-chatbot-styles"},Oc),be("style",{id:"inploi-chatbot-theme"},Qc(t))],T=e.getOrCreateChatbotElement();if(lt(be(re,{},[k,be(Vc,{apiClient:i,logger:o,analytics:s,talentBankClient:b,params:{theme:t,terms:r,feedback:n}})]),T),n){const N=z=>{var Z,U;if(!v(m))return;const ie=(Z=e.getChatbotElement())==null?void 0:Z.querySelector("dialog");ie&&tu({instance:z({rpcClient:a,apiClient:i,logger:o,analytics:s}),theme:t,terms:((U=n.params)==null?void 0:U.terms)??{},host:ie})};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:z})=>{N(z())}).catch(z=>{o.error("Error preparing feedback plugin",z)}):N(n.plugin)}p=!0},y=async(m,k)=>{if(!v(k))return;_s({context:m.context||{},schema:m.flow.context_schema,logger:o});const T=await A.prepareFlow(m);v(k)&&A.commitFlow(T)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;C(),o.info("Chatbot plugin prepared")}catch(m){o.error("Error preparing chatbot plugin",m)}},fetchFlowByJobId:async(m,k)=>a.request(Uc,{params:{id:m},searchParams:{id_type:(k==null?void 0:k.idType)==="inploi"?"internal":"external"}}).then(T=>({flow:T.flow,title:T.job.title,flowKeys:[T.job.id,...(k==null?void 0:k.flowKeys)??[]],job:{id:T.job.id,id_type:"external"},...k,context:{user:T.user,...k==null?void 0:k.context}})),fetchFlowById:async(m,k)=>a.request(Hc,{params:{id:m}}).then(T=>{var N;return{flow:T.flow,title:"Chatbot",flowKeys:(k==null?void 0:k.flowKeys)??[],...k,analytics:{customProperties:{flow_id:T.flow.id,flow_version:T.flow.version,...(N=k==null?void 0:k.analytics)==null?void 0:N.customProperties}}}}),open:async m=>{if(!(typeof window>"u"))try{A.cancelCurrentFlow(),A.viewState$.value="maximised",p||C();const k=u;m instanceof Promise?(A.current$.value={state:"loading"},m.then(T=>y(T,k)).catch(T=>{if(!v(k))return;const N=T instanceof Error?T.message:g("unknown_error");A.current$.value={state:"error",error:N}})):await y(m,k)}catch(k){o.error("Error starting flow",k)}},close:async()=>{typeof window>"u"||(A.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:_}});function tu({instance:e,terms:t,theme:r,host:n}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=eu;const Wa=(e,t,r)=>{var n;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(n=t.analytics)==null?void 0:n.customProperties})};var Ka=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[i,...a]=e.compareKey.split(".");if(!i)return!1;let o=ci({context:t,key:i,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=Ft(o.value,a);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=Ft(o.value,a),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return Ht(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Ht(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Ht(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(d=>typeof d=="string")?Ht(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?ar(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},Ht=(e,{context:t,submissions:r})=>{let n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let i of n)if(Ka({condition:i,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let i of n)if(!Ka({condition:i,context:t,submissions:r,ifBlock:e}))return!1;return!0}},ru=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,nu=(e,{context:t,submissions:r})=>e.replace(ru,(n,i,a="")=>{let[o,...s]=i.trim().split("."),l=ci({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Nt(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return ar(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let d=Ft(l.value,s);switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(p=>typeof p=="string"))return d.join(", ")}break}}return a});const Ga=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Me=(e,t)=>nu(e,Ga(t)),iu=(e,t)=>Ht(e,Ga(t)),Ya=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Ya({node:n,nodes:t,stopWhen:r})},au=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const a=t.find(s=>s.id===i.branchId);if(!a)return!1;const o=Ya({node:a,nodes:t,stopWhen:s=>s.id===e.id});return!(!o||o.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},ou=({flow:e,analytics:t,logger:r,talentBankClient:n,context:i,apiClient:a,getSubmissions:o,chatService:s,onFlowEnd:l,onInterpret:d,t:p})=>{let u=new AbortController;const g={...t.service,log:v=>t.service.log({...v,customProperties:{...v.customProperties,...t.customProperties}})},b=async(v,_)=>{if(u.signal.aborted)return;const C=o();d==null||d(v,_);try{await su({flow:e,analytics:g,logger:r,talentBankClient:n,apiClient:a,context:i,node:v,submissions:C,t:p,chat:{sendMessage:async y=>s.send({groupId:v.id,message:y,signal:u.signal}),userInput:async y=>s.input({input:y,signal:u.signal}),addToSubmissions:(y,m)=>{u.signal.aborted||s.addToSubmissions(y,m)}},next:y=>{const m=y?e.nodes.find(k=>k.id===y):au({childNode:v,nodes:e.nodes});return m?b(m,v):l==null?void 0:l(v)},end:()=>l==null?void 0:l(v)})}catch(y){if(y instanceof ft)return;throw y}};return{interpret:async v=>{const _=e.nodes.find(C=>C.id===v)??La(e.nodes);return b(_)},undo:v=>{let _=1;const C=e.nodes.find(m=>m.id===v[v.length-1]);for(let m=v.length-2;m>0;m--){const k=v[m],T=e.nodes.find(N=>N.id===k);if(!T||(_++,T.type.startsWith("question-")))break}u.abort(),u=new AbortController;const y=e.nodes.find(m=>m.id===v[v.length-_]);return Oe(y,"Undo failed: new start node not found"),b(y,C),{removed:_}},abort:()=>{u.abort()}}};async function su(e){const t=e.node;switch(t.type){case"text":return gu({...e,node:t});case"image":return bu({...e,node:t});case"question-text":return vu({...e,node:t});case"question-enum":return yu({...e,node:t});case"question-number":return wu({...e,node:t});case"question-phone":return mu({...e,node:t});case"question-boolean":return _u({...e,node:t});case"question-file":return ku({...e,node:t});case"question-address":return xu({...e,node:t});case"end-flow":return Su({...e,node:t});case"if-block":return hu({...e,node:t});case"jump":return uu({...e,node:t});case"link":return pu({...e,node:t});case"integration-application-submit":return fu({...e,node:t});case"add-submission":return du({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return cu({...e,node:t});case"feedback":return lu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function lu({next:e,node:t}){e(t.nextId)}async function cu({next:e,node:t,talentBankClient:r,submissions:n,flow:i,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){const d=t.data.scope==="job"?(l=i.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||d!=null)try{s=await r.checkDuplicate({email:ps({key:t.data.email,submissions:n}).toString(),jobId:d,scope:t.data.scope})}catch(p){a.error("[check-duplicate]",p)}}o.addToSubmissions(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function uu({next:e,node:t}){e(t.data.targetId)}async function du({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Me(t.data.value,{submissions:n,context:i})},e(t.nextId)}async function fu({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:a,analytics:o,flow:s,t:l}){const d=async p=>{p!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:u,session_id:g}=o.getSessionInfo();let b;const v=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:u,session_id:g,job:s.job,submissions:fs(a||{})})}).catch(C=>(b=C,Gs(C)?C.data:C));r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:v});const _=ys(v);if(_&&o.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:_.service,response:_.response,flow_type:"CHATBOT_DRAWER",job:s.job}}),vs(v)){const{redirect_url:C,message:y,button_text:m}=v.integration_response.data;await e.sendMessage({type:"text",author:"bot",text:y??l("submission_redirect_message")});try{const k=new URL(C);u&&!k.searchParams.has("anonymous_id")&&k.searchParams.set("anonymous_id",u),await e.sendMessage({type:"link",href:k.toString(),text:m??l("complete_submission"),onClick:()=>{if(!g){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:g,flow_version:s.version,href:k.toString(),job:s.job}})}})}catch(k){n.error(`Invalid redirect URL: ${C}`,k),e.sendMessage({type:"system",variant:"error",text:l("redirect_url_error")})}return t(r.nextId)}if((v==null?void 0:v.success)===!0)return r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:l("submission_completed")}),t(r.nextId);if(ms(v)){const{error:C}=v.integration_response;return n.error(b??C),await e.sendMessage({type:"system",variant:"error",text:C.message||l("submission_failed")}),d(!1)}return n.error(b??v),await e.sendMessage({type:"system",variant:"error",text:l("submission_failed")}),d(!1)};await d(r.data.skipConfirmation)}async function pu({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({type:"link",href:Me(r.data.href,{submissions:n,context:i}),text:Me(r.data.cta,{submissions:n,context:i})}),t(r.nextId)}async function hu({submissions:e,next:t,node:r,context:n}){t(iu(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function gu({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function bu({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function vu({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?ar(o.value):o.value}),t(r.nextId)}async function wu({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function mu({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const a=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});a===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:a.type==="phone"?ar(a.value):a.value}),t(r.nextId)}async function yu({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function _u({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function xu({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const i=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(i===null)await e.sendMessage({type:"system",variant:"info",text:n("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 t(r.nextId)}async function ku({node:e,chat:t,next:r,submissions:n,context:i,t:a}){await t.sendMessage({author:"bot",type:"text",text:Me(e.data.question,{submissions:n,context:i})});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(e.nextId)}async function Su({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}function Ja(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function Cu({debounce:e,scroll:t,polyfill:r,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){const i=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,o]=Ce({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=we({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),l=e?typeof e=="number"?e:e.scroll:null,d=e?typeof e=="number"?e:e.resize:null,p=we(!1);$e(()=>(p.current=!0,()=>void(p.current=!1)));const[u,g,b]=He(()=>{const y=()=>{if(!s.current.element)return;const{left:m,top:k,width:T,height:N,bottom:z,right:ie,x:Z,y:U}=s.current.element.getBoundingClientRect(),K={left:m,top:k,width:T,height:N,bottom:z,right:ie,x:Z,y:U};s.current.element instanceof HTMLElement&&n&&(K.height=s.current.element.offsetHeight,K.width=s.current.element.offsetWidth),Object.freeze(K),p.current&&!Au(s.current.lastBounds,K)&&o(s.current.lastBounds=K)};return[y,d?Ja(y,d):y,l?Ja(y,l):y]},[o,n,l,d]);function v(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",b,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function _(){s.current.element&&(s.current.resizeObserver=new i(b),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(y=>y.addEventListener("scroll",b,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{b()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const C=y=>{!y||y===s.current.element||(v(),s.current.element=y,s.current.scrollContainers=Xa(y),_())};return $u(b,!!t),Eu(g),$e(()=>{v(),_()},[t,b,g]),$e(()=>v,[]),[C,a,u]}function Eu(e){$e(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function $u(e,t){$e(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Xa(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...Xa(e.parentElement)]}const Iu=["x","y","top","bottom","left","right","width","height"],Au=(e,t)=>Iu.every(r=>e[r]===t[r]),pt=({class:e,...t})=>{const{t:r}=ae();return c("button",{class:Je("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var We;function Er(e){return{lang:(e==null?void 0:e.lang)??(We==null?void 0:We.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(We==null?void 0:We.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(We==null?void 0:We.abortPipeEarly)}}var Vn;function Tu(e){return Vn==null?void 0:Vn.get(e)}var Ln;function Fu(e){return Ln==null?void 0:Ln.get(e)}var On;function Nu(e,t){var r;return(r=On==null?void 0:On.get(e))==null?void 0:r.get(t)}function Et(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function oe(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Et(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},d=e.kind==="schema",p=(i==null?void 0:i.message)??e.message??Nu(e.reference,l.lang)??(d?Fu(l.lang):null)??n.message??Tu(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function Pe(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Er())}}}function Du(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Vu(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function Lu(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Ou=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},Mu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Za(e,t){return{kind:"validation",type:"check",reference:Za,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&oe(this,"input",r,n),r}}}function Qa(e){return{kind:"validation",type:"email",reference:Qa,expects:null,async:!1,requirement:Mu,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&oe(this,"email",t,r),t}}}function qt(e,t){return{kind:"validation",type:"max_length",reference:qt,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&oe(this,"length",r,n,{received:`${r.value.length}`}),r}}}function eo(e,t){return{kind:"validation",type:"max_value",reference:eo,async:!1,expects:`<=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&oe(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function $t(e,t){return{kind:"validation",type:"min_length",reference:$t,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&oe(this,"length",r,n,{received:`${r.value.length}`}),r}}}function to(e,t){return{kind:"validation",type:"min_value",reference:to,async:!1,expects:`>=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&oe(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function Mn(e,t){return{kind:"validation",type:"regex",reference:Mn,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&oe(this,"format",r,n),r}}}function Pn(e){return{kind:"transformation",type:"transform",reference:Pn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function ro(e){return{kind:"validation",type:"url",reference:ro,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&oe(this,"URL",t,r),t}}}function Pu(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function no(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function io(e,t){return{kind:"schema",type:"array",reference:io,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Pe(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const d={type:"array",origin:"value",input:i,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else oe(this,"type",r,n);return r}}}function ao(e){return{kind:"schema",type:"boolean",reference:ao,expects:"boolean",async:!1,message:e,get"~standard"(){return Pe(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:oe(this,"type",t,r),t}}}function oo(e){return{kind:"schema",type:"number",reference:oo,expects:"number",async:!1,message:e,get"~standard"(){return Pe(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:oe(this,"type",t,r),t}}}function Ke(e,t){return{kind:"schema",type:"object",reference:Ke,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Pe(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:no(s),d=s["~run"]({value:l},n);if(d.issues){const p={type:"object",origin:"value",input:i,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=Pu(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(oe(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else oe(this,"type",r,n);return r}}}function Wt(e,t){return{kind:"schema",type:"optional",reference:Wt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Pe(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=no(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function so(e,t){return{kind:"schema",type:"picklist",reference:so,expects:Vu(e.map(Et),"|"),async:!1,options:e,message:t,get"~standard"(){return Pe(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:oe(this,"type",r,n),r}}}function lo(e,t,r){return{kind:"schema",type:"record",reference:lo,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Pe(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(Du(a,l)){const d=a[l],p=this.key["~run"]({value:l},i);if(p.issues){const g={type:"object",origin:"key",input:a,key:l,value:d};for(const b of p.issues)b.path=[g],(o=n.issues)==null||o.push(b);if(n.issues||(n.issues=p.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:d},i);if(u.issues){const g={type:"object",origin:"value",input:a,key:l,value:d};for(const b of u.issues)b.path?b.path.unshift(g):b.path=[g],(s=n.issues)==null||s.push(b);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!p.typed||!u.typed)&&(n.typed=!1),p.typed&&(n.value[p.value]=u.value)}}else oe(this,"type",n,i);return n}}}function me(e){return{kind:"schema",type:"string",reference:me,expects:"string",async:!1,message:e,get"~standard"(){return Pe(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:oe(this,"type",t,r),t}}}function ju(e,t,r){const n=e["~run"]({value:t},Er(r));if(n.issues)throw new Ou(n.issues);return n.value}function Ru(e,t){const r={};for(const n in e.entries)r[n]=!t||t.includes(n)?Wt(e.entries[n]):e.entries[n];return{...e,entries:r,get"~standard"(){return Pe(this)}}}function nt(...e){return{...e[0],pipe:e,get"~standard"(){return Pe(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Bu(e,t,r){const n=e["~run"]({value:t},Er(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}async function zu(e,t,r){const n=await e["~run"]({value:t},Er(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const It=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[c("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"truncate pr-1 text-sm",children:e.message})]}),ht=({class:e,...t})=>{const{t:r}=ae();return c("button",{type:"button",class:Je("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),...t,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var jn={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"};const Kt=ct("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Uu="https://api.mapbox.com/search/searchbox/v1/suggest",Hu="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",qu=e=>atob(e).split("").reverse().join(""),Ge=Ke({name:me()}),Wu=Ke({suggestions:io(Ke({full_address:Wt(me()),place_formatted:Wt(me()),name:Wt(me()),mapbox_id:me(),context:Ru(Ke({address:Ge,street:Ge,neighborhood:Ge,locality:Ge,district:Ge,place:Ge,region:Ge,postcode:Ge,country:Ge}))}))}),Ku=({logger:e,t})=>He(()=>{var n;const r=(n=A.current$.peek().flow)==null?void 0:n.data.flowSessionId;return r?{enabled:!0,getPredictions:async i=>{var u;const a=new URL(Uu);a.searchParams.set("q",i),a.searchParams.set("session_token",r);const o=(u=A.current$.peek().flow)==null?void 0:u.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",qu(Hu));const l=await fetch(a);if(!l.ok)return e.error("Failed to get address details",l),{ok:!1,error:t("address_error")};const d=Bu(Wu,await l.json());if(d.success===!1)return e.error("Failed to parse address details",d.issues),{ok:!1,error:t("address_error")};const{suggestions:p}=d.output;return{ok:!0,data:p.map(g=>{var b,v,_,C,y,m,k,T,N;return{label:g.full_address??g.place_formatted??g.name??g.mapbox_id,id:g.mapbox_id,address:{line1:((b=g.context.address)==null?void 0:b.name)??((v=g.context.street)==null?void 0:v.name),line2:void 0,line3:((_=g.context.neighborhood)==null?void 0:_.name)??((C=g.context.locality)==null?void 0:C.name),city:((y=g.context.place)==null?void 0:y.name)??((m=g.context.district)==null?void 0:m.name),state:(k=g.context.region)==null?void 0:k.name,postcode:(T=g.context.postcode)==null?void 0:T.name,country:(N=g.context.country)==null?void 0:N.name}}})}}}:{enabled:!1}},[e,t]),co=e=>{const{t}=ae();return c("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},Gu=({input:e,onSubmitSuccess:t,logger:r})=>{const{t:n}=ae(),[i,a]=Ce(),[o,s]=Ce([]),{enabled:l,getPredictions:d}=Ku({logger:r,t:n}),[p,u]=Ce(l?"query":"manual"),[g,b]=Ce(""),[v,_]=Ce(),C=y=>{Oe(l,"Query state should not be enabled"),y=y.trim(),y!==(g==null?void 0:g.trim())&&(b(y),y===""&&s([]),_(void 0),d(y).then(m=>{if(m.ok===!1){s([]),_(m.error);return}s(m.data)}))};switch(p){case"query":return Oe(l,"Query state should not be enabled"),c(Yu,{input:e,onSkip:()=>t(null),onAddressSelect:y=>{if(y===""){a(void 0),u("manual");return}const m=o.find(k=>k.id===y);m&&(a(m.address),u("details"))},onAddressSearch:y=>{C(y)},suggestions:o,query:g,error:v});case"details":return Oe(i!==void 0),c(fo,{input:e,logger:r,onSubmitSuccess:t,addressFields:i,actions:c(co,{onClick:()=>{u("query")}})});case"manual":return c(fo,{logger:r,input:e,onSubmitSuccess:t,addressFields:{},actions:l?c(co,{onClick:()=>{u("query")}}):void 0})}},Yu=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:i,onAddressSearch:a,error:o})=>{const{t:s}=ae(),l=we(null);return ve(()=>{l.current&&(l.current.focus(),l.current.select())},[]),c(re,{children:[c("form",{noValidate:!0,onSubmit:d=>{d.preventDefault();const u=new FormData(d.currentTarget).get("address");typeof u=="string"&&a(u)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||s("address_search"),defaultValue:i,class:Kt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]}),c("span",{class:"sr-only",children:s("search")})]})})]}),e.config.optional&&c(ht,{class:"relative",onClick:t})]}),o?c(It,{error:{message:o}}):null,c("ul",{children:[r.map(d=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(d.id)},children:[c("span",{class:"flex-grow",children:d.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},d.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n("")},children:c("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},uo=["line1","line2","line3","city","state","postcode","country"],fo=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const i=we(null);ve(()=>{if(i.current){const s=i.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const a=Object.keys(jn),{t:o}=ae();return c("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const l=new FormData(s.currentTarget),d=Object.fromEntries(l.entries());t({type:"address",value:d})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:uo.map((s,l)=>{const d=`isdk_${s}`,p=n.config.keys[s];return p?c(re,{children:[c("label",{for:d,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:o(s)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:p,id:d,defaultValue:e[s],required:!0,children:[e.country&&!a.includes(e.country)?c("option",{value:e[s],children:e[s]}):c("option",{value:"",children:o("select_country")}),a.map(u=>c("option",{value:u,children:u},u))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:l===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:p,id:d,defaultValue:e[s],required:!0}),l===uo.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"flex w-full flex-1 ",children:[c("div",{class:"flex-grow",children:r}),c(pt,{class:"flex items-center justify-center"})]})]})},Rn=()=>{const e=we(null);return $e(()=>{var t;(t=e.current)==null||t.focus()},[]),e},po=["true","false"],Ju=so(po),Xu="answer",ho="flex items-center flex-wrap gap-2 p-2.5",go="min-w-0 max-w-full flex-auto",bo=on(({label:e,...t},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:c("p",{class:"text-center text-base",children:e})})),Zu=({input:e,onSubmitSuccess:t})=>{const r=Rn();return c("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=Cc(n).value,a=ju(Ju,i);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:ho,children:po.map((n,i)=>c("li",{class:go,children:c(bo,{ref:i===0?r:null,type:"submit",name:Xu,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(ht,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Qu=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),ed=e=>e.reduce((t,r)=>t+r.sizeKb,0),td=St("file"),vo=3,rd=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return c("div",{class:Je("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:i}),c("span",{children:[".",n]})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Nt(e.sizeKb)})]})},wo=({class:e,...t})=>c("li",{class:Je("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),nd=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},id=(e,t)=>{const r=nd(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},ad=({input:e,onSubmitSuccess:t})=>{var u;const r=(u=A.current$.value.flow)==null?void 0:u.data.submissions[e.key],[n,i]=Ce(td(r)?r.value:[]),[a,o]=Ce(),s=n.length-vo,l=ed(n),d=Rn(),{t:p}=ae();return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:g=>(g.preventDefault(),o(void 0),n.length===0?o({type:"required",message:p("validation_file")}):gs(n,e.config.extensions)?e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Nt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?o({type:"invalid",message:p("validation_file_max",{count:1})}):t({type:"file",value:n}):o({type:"validate",message:`${p("validation_file_ext",{ext:e.config.extensions.join(", ")})}`})),children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:d,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:[n.length>0?c(re,{children:[c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,vo).map(g=>{const b=g.name.split(".").pop(),v=g.name.replace(new RegExp(`.${b}$`),"");return c(wo,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:[".",b]})]})}),s>0?c(wo,{children:["+",s," file",s!==1?"s":""]}):null]}),c("p",{class:"text-neutral-11 text-xs",children:[Nt(l)," ",n.length>1?"total":""]})]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",p("file_max_size",{size:Nt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(g=>c("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:g.replace(".","")}))})]})]}),c("input",{id:"dropzone-file",onInput:async g=>{Oe(g.target instanceof HTMLInputElement);const b=g.target.files?Array.from(g.target.files):[],v=await Promise.allSettled(b.map(async C=>{const y=await Qu(C);return{name:id(C.name,42),data:y,sizeKb:C.size/1e3}}));if(v.some(({status:C})=>C==="rejected"))return o({type:"invalid",message:"Invalid file"});const _=v.map(C=>C.status==="fulfilled"?C.value:null).filter(Boolean);i(_)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(pt,{disabled:n.length===0}),e.config.optional&&c(ht,{class:"relative",onClick:()=>t(null)})]})]}),c(It,{error:a})]})};var Gt=e=>e.type==="checkbox",gt=e=>e instanceof Date,he=e=>e==null;const mo=e=>typeof e=="object";var J=e=>!he(e)&&!Array.isArray(e)&&mo(e)&&!gt(e),od=e=>J(e)&&e.target?Gt(e.target)?e.target.checked:e.target.value:e,sd=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ld=(e,t)=>e.has(sd(t)),cd=e=>{const t=e.constructor&&e.constructor.prototype;return J(t)&&t.hasOwnProperty("isPrototypeOf")},Bn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ee(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Bn&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(J(e)&&cd(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=ee(e[i]));return n}var $r=e=>/^\w*$/.test(e),W=e=>e===void 0,zn=e=>Array.isArray(e)?e.filter(Boolean):[],Un=e=>zn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),$=(e,t,r)=>{if(!t||!J(e))return r;const n=($r(t)?[t]:Un(t)).reduce((i,a)=>he(i)?i:i[a],e);return W(n)||n===e?W(e[t])?r:e[t]:n},je=e=>typeof e=="boolean",Ie=e=>typeof e=="function",B=(e,t,r)=>{let n=-1;const i=$r(t)?[t]:Un(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const d=e[s];l=J(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const yo={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ae={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ye={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ud=ce.createContext(null);ud.displayName="HookFormControlContext";var dd=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ae.all&&(t._proxyFormState[o]=!n||Ae.all),r&&(r[o]=!0),e[o]}});return i};const fd=typeof window<"u"?ce.useLayoutEffect:ce.useEffect;var ye=e=>typeof e=="string",pd=(e,t,r,n,i)=>ye(e)?(n&&t.watch.add(e),$(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),$(r,a))):(n&&(t.watchAll=!0),r),Hn=e=>he(e)||!mo(e);function it(e,t,r=new WeakSet){if(Hn(e)||Hn(t))return Object.is(e,t);if(gt(e)&>(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const o=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const s=t[a];if(gt(o)&>(s)||J(o)&&J(s)||Array.isArray(o)&&Array.isArray(s)?!it(o,s,r):!Object.is(o,s))return!1}}return!0}const hd=ce.createContext(null);hd.displayName="HookFormContext";var _o=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Yt=e=>Array.isArray(e)?e:[e],xo=()=>{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 ko(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t[n];if(i&&J(i)&&a){const o=ko(i,a);J(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var fe=e=>J(e)&&!Object.keys(e).length,qn=e=>e.type==="file",Ir=e=>{if(!Bn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},So=e=>e.type==="select-multiple",Wn=e=>e.type==="radio",gd=e=>Wn(e)||Gt(e),Kn=e=>Ir(e)&&e.isConnected;function bd(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=W(e)?n++:e[t[n++]];return e}function vd(e){for(const t in e)if(e.hasOwnProperty(t)&&!W(e[t]))return!1;return!0}function X(e,t){const r=Array.isArray(t)?t:$r(t)?[t]:Un(t),n=r.length===1?e:bd(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(J(n)&&fe(n)||Array.isArray(n)&&vd(n))&&X(e,r.slice(0,-1)),e}var wd=e=>{for(const t in e)if(Ie(e[t]))return!0;return!1};function Co(e){return Array.isArray(e)||J(e)&&!wd(e)}function Gn(e,t={}){for(const r in e){const n=e[r];Co(n)?(t[r]=Array.isArray(n)?[]:{},Gn(n,t[r])):W(n)||(t[r]=!0)}return t}function At(e,t,r){r||(r=Gn(t));for(const n in e){const i=e[n];if(Co(i))W(t)||Hn(r[n])?r[n]=Gn(i,Array.isArray(i)?[]:{}):At(i,he(t)?{}:t[n],r[n]);else{const a=t[n];r[n]=!it(i,a)}}return r}const Eo={value:!1,isValid:!1},$o={value:!0,isValid:!0};var Io=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!W(e[0].attributes.value)?W(e[0].value)||e[0].value===""?$o:{value:e[0].value,isValid:!0}:$o:Eo}return Eo},Ao=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>W(e)?e:t?e===""?NaN:e&&+e:r&&ye(e)?new Date(e):n?n(e):e;const To={isValid:!1,value:null};var Fo=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,To):To;function No(e){const t=e.ref;return qn(t)?t.files:Wn(t)?Fo(e.refs).value:So(t)?[...t.selectedOptions].map(({value:r})=>r):Gt(t)?Io(e.refs).value:Ao(W(t.value)?e.ref.value:t.value,e)}var md=(e,t,r,n)=>{const i={};for(const a of e){const o=$(t,a);o&&B(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Ar=e=>e instanceof RegExp,Jt=e=>W(e)?e:Ar(e)?e.source:J(e)?Ar(e.value)?e.value.source:e.value:e,Do=e=>({isOnSubmit:!e||e===Ae.onSubmit,isOnBlur:e===Ae.onBlur,isOnChange:e===Ae.onChange,isOnAll:e===Ae.all,isOnTouch:e===Ae.onTouched});const Vo="AsyncFunction";var yd=e=>!!e&&!!e.validate&&!!(Ie(e.validate)&&e.validate.constructor.name===Vo||J(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Vo)),_d=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Lo=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Xt=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=$(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Xt(s,t))break}else if(J(s)&&Xt(s,t))break}}};function Oo(e,t,r){const n=$(e,r);if(n||$r(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=$(t,a),s=$(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var xd=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return fe(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||Ae.all))},kd=(e,t,r)=>!e||!t||e===t||Yt(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Sd=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Cd=(e,t)=>!zn($(e,t)).length&&X(e,t),Ed=(e,t,r)=>{const n=Yt($(e,r));return B(n,"root",t[r]),B(e,r,n),e};function Mo(e,t,r="validate"){if(ye(e)||Array.isArray(e)&&e.every(ye)||je(e)&&!e)return{type:r,message:ye(e)?e:"",ref:t}}var Tt=e=>J(e)&&!Ar(e)?e:{value:e,message:""},Po=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:d,minLength:p,min:u,max:g,pattern:b,validate:v,name:_,valueAsNumber:C,mount:y}=e._f,m=$(r,_);if(!y||t.has(_))return{};const k=s?s[0]:o,T=V=>{i&&k.reportValidity&&(k.setCustomValidity(je(V)?"":V||""),k.reportValidity())},N={},z=Wn(o),ie=Gt(o),Z=z||ie,U=(C||qn(o))&&W(o.value)&&W(m)||Ir(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,K=_o.bind(null,_,n,N),Nr=(V,O,te,se=Ye.maxLength,Te=Ye.minLength)=>{const _e=V?O:te;N[_]={type:V?se:Te,message:_e,ref:o,...K(V?se:Te,_e)}};if(a?!Array.isArray(m)||!m.length:l&&(!Z&&(U||he(m))||je(m)&&!m||ie&&!Io(s).isValid||z&&!Fo(s).isValid)){const{value:V,message:O}=ye(l)?{value:!!l,message:l}:Tt(l);if(V&&(N[_]={type:Ye.required,message:O,ref:k,...K(Ye.required,O)},!n))return T(O),N}if(!U&&(!he(u)||!he(g))){let V,O;const te=Tt(g),se=Tt(u);if(!he(m)&&!isNaN(m)){const Te=o.valueAsNumber||m&&+m;he(te.value)||(V=Te>te.value),he(se.value)||(O=Te<se.value)}else{const Te=o.valueAsDate||new Date(m),_e=tr=>new Date(new Date().toDateString()+" "+tr),Qt=o.type=="time",er=o.type=="week";ye(te.value)&&m&&(V=Qt?_e(m)>_e(te.value):er?m>te.value:Te>new Date(te.value)),ye(se.value)&&m&&(O=Qt?_e(m)<_e(se.value):er?m<se.value:Te<new Date(se.value))}if((V||O)&&(Nr(!!V,te.message,se.message,Ye.max,Ye.min),!n))return T(N[_].message),N}if((d||p)&&!U&&(ye(m)||a&&Array.isArray(m))){const V=Tt(d),O=Tt(p),te=!he(V.value)&&m.length>+V.value,se=!he(O.value)&&m.length<+O.value;if((te||se)&&(Nr(te,V.message,O.message),!n))return T(N[_].message),N}if(b&&!U&&ye(m)){const{value:V,message:O}=Tt(b);if(Ar(V)&&!m.match(V)&&(N[_]={type:Ye.pattern,message:O,ref:o,...K(Ye.pattern,O)},!n))return T(O),N}if(v){if(Ie(v)){const V=await v(m,r),O=Mo(V,k);if(O&&(N[_]={...O,...K(Ye.validate,O.message)},!n))return T(O.message),N}else if(J(v)){let V={};for(const O in v){if(!fe(V)&&!n)break;const te=Mo(await v[O](m,r),k,O);te&&(V={...te,...K(O,te.message)},T(te.message),n&&(N[_]=V))}if(!fe(V)&&(N[_]={ref:k,...V},!n))return N}}return T(!0),N};const $d={mode:Ae.onSubmit,reValidateMode:Ae.onChange,shouldFocusError:!0};function Id(e={}){let t={...$d,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ie(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=J(t.defaultValues)||J(t.values)?ee(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ee(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...p};let g={...u};const b={array:xo(),state:xo()},v=t.criteriaMode===Ae.all,_=f=>h=>{clearTimeout(d),d=setTimeout(f,h)},C=async f=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||g.isValid||f)){let h;t.resolver?(h=fe((await Z()).errors),y()):h=await K(n,!0),h!==r.isValid&&b.state.next({isValid:h})}},y=(f,h)=>{!t.disabled&&(u.isValidating||u.validatingFields||g.isValidating||g.validatingFields)&&((f||Array.from(s.mount)).forEach(w=>{w&&(h?B(r.validatingFields,w,h):X(r.validatingFields,w))}),b.state.next({validatingFields:r.validatingFields,isValidating:!fe(r.validatingFields)}))},m=(f,h=[],w,E,S=!0,x=!0)=>{if(E&&w&&!t.disabled){if(o.action=!0,x&&Array.isArray($(n,f))){const F=w($(n,f),E.argA,E.argB);S&&B(n,f,F)}if(x&&Array.isArray($(r.errors,f))){const F=w($(r.errors,f),E.argA,E.argB);S&&B(r.errors,f,F),Cd(r.errors,f)}if((u.touchedFields||g.touchedFields)&&x&&Array.isArray($(r.touchedFields,f))){const F=w($(r.touchedFields,f),E.argA,E.argB);S&&B(r.touchedFields,f,F)}(u.dirtyFields||g.dirtyFields)&&(r.dirtyFields=At(i,a)),b.state.next({name:f,isDirty:V(f,h),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else B(a,f,h)},k=(f,h)=>{B(r.errors,f,h),b.state.next({errors:r.errors})},T=f=>{r.errors=f,b.state.next({errors:r.errors,isValid:!1})},N=(f,h,w,E)=>{const S=$(n,f);if(S){const x=$(a,f,W(w)?$(i,f):w);W(x)||E&&E.defaultChecked||h?B(a,f,h?x:No(S._f)):se(f,x),o.mount&&!o.action&&C()}},z=(f,h,w,E,S)=>{let x=!1,F=!1;const M={name:f};if(!t.disabled){if(!w||E){(u.isDirty||g.isDirty)&&(F=r.isDirty,r.isDirty=M.isDirty=V(),x=F!==M.isDirty);const P=it($(i,f),h);F=!!$(r.dirtyFields,f),P?X(r.dirtyFields,f):B(r.dirtyFields,f,!0),M.dirtyFields=r.dirtyFields,x=x||(u.dirtyFields||g.dirtyFields)&&F!==!P}if(w){const P=$(r.touchedFields,f);P||(B(r.touchedFields,f,w),M.touchedFields=r.touchedFields,x=x||(u.touchedFields||g.touchedFields)&&P!==w)}x&&S&&b.state.next(M)}return x?M:{}},ie=(f,h,w,E)=>{const S=$(r.errors,f),x=(u.isValid||g.isValid)&&je(h)&&r.isValid!==h;if(t.delayError&&w?(l=_(()=>k(f,w)),l(t.delayError)):(clearTimeout(d),l=null,w?B(r.errors,f,w):X(r.errors,f)),(w?!it(S,w):S)||!fe(E)||x){const F={...E,...x&&je(h)?{isValid:h}:{},errors:r.errors,name:f};r={...r,...F},b.state.next(F)}},Z=async f=>(y(f,!0),await t.resolver(a,t.context,md(f||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),U=async f=>{const{errors:h}=await Z(f);if(y(f),f)for(const w of f){const E=$(h,w);E?B(r.errors,w,E):X(r.errors,w)}else r.errors=h;return h},K=async(f,h,w={valid:!0})=>{for(const E in f){const S=f[E];if(S){const{_f:x,...F}=S;if(x){const M=s.array.has(x.name),P=S._f&&yd(S._f);P&&u.validatingFields&&y([x.name],!0);const pe=await Po(S,s.disabled,a,v,t.shouldUseNativeValidation&&!h,M);if(P&&u.validatingFields&&y([x.name]),pe[x.name]&&(w.valid=!1,h||e.shouldUseNativeValidation))break;!h&&($(pe,x.name)?M?Ed(r.errors,pe,x.name):B(r.errors,x.name,pe[x.name]):X(r.errors,x.name))}!fe(F)&&await K(F,h,w)}}return w.valid},Nr=()=>{for(const f of s.unMount){const h=$(n,f);h&&(h._f.refs?h._f.refs.every(w=>!Kn(w)):!Kn(h._f.ref))&&Yn(f)}s.unMount=new Set},V=(f,h)=>!t.disabled&&(f&&h&&B(a,f,h),!it(Wo(),i)),O=(f,h,w)=>pd(f,s,{...o.mount?a:W(h)?i:ye(f)?{[f]:h}:h},w,h),te=f=>zn($(o.mount?a:i,f,t.shouldUnregister?$(i,f,[]):[])),se=(f,h,w={})=>{const E=$(n,f);let S=h;if(E){const x=E._f;x&&(!x.disabled&&B(a,f,Ao(h,x)),S=Ir(x.ref)&&he(h)?"":h,So(x.ref)?[...x.ref.options].forEach(F=>F.selected=S.includes(F.value)):x.refs?Gt(x.ref)?x.refs.forEach(F=>{(!F.defaultChecked||!F.disabled)&&(Array.isArray(S)?F.checked=!!S.find(M=>M===F.value):F.checked=S===F.value||!!S)}):x.refs.forEach(F=>F.checked=F.value===S):qn(x.ref)?x.ref.value="":(x.ref.value=S,x.ref.type||b.state.next({name:f,values:ee(a)})))}(w.shouldDirty||w.shouldTouch)&&z(f,S,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&tr(f)},Te=(f,h,w)=>{for(const E in h){if(!h.hasOwnProperty(E))return;const S=h[E],x=f+"."+E,F=$(n,x);(s.array.has(f)||J(S)||F&&!F._f)&&!gt(S)?Te(x,S,w):se(x,S,w)}},_e=(f,h,w={})=>{const E=$(n,f),S=s.array.has(f),x=ee(h);B(a,f,x),S?(b.array.next({name:f,values:ee(a)}),(u.isDirty||u.dirtyFields||g.isDirty||g.dirtyFields)&&w.shouldDirty&&b.state.next({name:f,dirtyFields:At(i,a),isDirty:V(f,x)})):E&&!E._f&&!he(x)?Te(f,x,w):se(f,x,w),Lo(f,s)?b.state.next({...r,name:f,values:ee(a)}):b.state.next({name:o.mount?f:void 0,values:ee(a)})},Qt=async f=>{o.mount=!0;const h=f.target;let w=h.name,E=!0;const S=$(n,w),x=P=>{E=Number.isNaN(P)||gt(P)&&isNaN(P.getTime())||it(P,$(a,w,P))},F=Do(t.mode),M=Do(t.reValidateMode);if(S){let P,pe;const bt=h.type?No(S._f):od(f),at=f.type===yo.BLUR||f.type===yo.FOCUS_OUT,Tf=!_d(S._f)&&!t.resolver&&!$(r.errors,w)&&!S._f.deps||Sd(at,$(r.touchedFields,w),r.isSubmitted,M,F),Zn=Lo(w,s,at);B(a,w,bt),at?(!h||!h.readOnly)&&(S._f.onBlur&&S._f.onBlur(f),l&&l(0)):S._f.onChange&&S._f.onChange(f);const Qn=z(w,bt,at),Ff=!fe(Qn)||Zn;if(!at&&b.state.next({name:w,type:f.type,values:ee(a)}),Tf)return(u.isValid||g.isValid)&&(t.mode==="onBlur"?at&&C():at||C()),Ff&&b.state.next({name:w,...Zn?{}:Qn});if(!at&&Zn&&b.state.next({...r}),t.resolver){const{errors:ts}=await Z([w]);if(y([w]),x(bt),E){const Nf=Oo(r.errors,n,w),rs=Oo(ts,n,Nf.name||w);P=rs.error,w=rs.name,pe=fe(ts)}}else y([w],!0),P=(await Po(S,s.disabled,a,v,t.shouldUseNativeValidation))[w],y([w]),x(bt),E&&(P?pe=!1:(u.isValid||g.isValid)&&(pe=await K(n,!0)));E&&(S._f.deps&&(!Array.isArray(S._f.deps)||S._f.deps.length>0)&&tr(S._f.deps),ie(w,pe,P,Qn))}},er=(f,h)=>{if($(r.errors,h)&&f.focus)return f.focus(),1},tr=async(f,h={})=>{let w,E;const S=Yt(f);if(t.resolver){const x=await U(W(f)?f:S);w=fe(x),E=f?!S.some(F=>$(x,F)):w}else f?(E=(await Promise.all(S.map(async x=>{const F=$(n,x);return await K(F&&F._f?{[x]:F}:F)}))).every(Boolean),!(!E&&!r.isValid)&&C()):E=w=await K(n);return b.state.next({...!ye(f)||(u.isValid||g.isValid)&&w!==r.isValid?{}:{name:f},...t.resolver||!f?{isValid:w}:{},errors:r.errors}),h.shouldFocus&&!E&&Xt(n,er,f?S:s.mount),E},Wo=(f,h)=>{let w={...o.mount?a:i};return h&&(w=ko(h.dirtyFields?r.dirtyFields:r.touchedFields,w)),W(f)?w:ye(f)?$(w,f):f.map(E=>$(w,E))},Ko=(f,h)=>({invalid:!!$((h||r).errors,f),isDirty:!!$((h||r).dirtyFields,f),error:$((h||r).errors,f),isValidating:!!$(r.validatingFields,f),isTouched:!!$((h||r).touchedFields,f)}),kf=f=>{const h=f?Yt(f):void 0;h==null||h.forEach(w=>X(r.errors,w)),h?h.forEach(w=>{b.state.next({name:w,errors:r.errors})}):b.state.next({errors:{}})},Go=(f,h,w)=>{const E=($(n,f,{_f:{}})._f||{}).ref,S=$(r.errors,f)||{},{ref:x,message:F,type:M,...P}=S;B(r.errors,f,{...P,...h,ref:E}),b.state.next({name:f,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&E&&E.focus&&E.focus()},Sf=(f,h)=>Ie(f)?b.state.subscribe({next:w=>"values"in w&&f(O(void 0,h),w)}):O(f,h,!0),Yo=f=>b.state.subscribe({next:h=>{kd(f.name,h.name,f.exact)&&xd(h,f.formState||u,Af,f.reRenderRoot)&&f.callback({values:{...a},...r,...h,defaultValues:i})}}).unsubscribe,Cf=f=>(o.mount=!0,g={...g,...f.formState},Yo({...f,formState:{...p,...f.formState}})),Yn=(f,h={})=>{for(const w of f?Yt(f):s.mount)s.mount.delete(w),s.array.delete(w),h.keepValue||(X(n,w),X(a,w)),!h.keepError&&X(r.errors,w),!h.keepDirty&&X(r.dirtyFields,w),!h.keepTouched&&X(r.touchedFields,w),!h.keepIsValidating&&X(r.validatingFields,w),!t.shouldUnregister&&!h.keepDefaultValue&&X(i,w);b.state.next({values:ee(a)}),b.state.next({...r,...h.keepDirty?{isDirty:V()}:{}}),!h.keepIsValid&&C()},Jo=({disabled:f,name:h})=>{if(je(f)&&o.mount||f||s.disabled.has(h)){const S=s.disabled.has(h)!==!!f;f?s.disabled.add(h):s.disabled.delete(h),S&&o.mount&&!o.action&&C()}},Jn=(f,h={})=>{let w=$(n,f);const E=je(h.disabled)||je(t.disabled);return B(n,f,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:f}},name:f,mount:!0,...h}}),s.mount.add(f),w?Jo({disabled:je(h.disabled)?h.disabled:t.disabled,name:f}):N(f,!0,h.value),{...E?{disabled:h.disabled||t.disabled}:{},...t.progressive?{required:!!h.required,min:Jt(h.min),max:Jt(h.max),minLength:Jt(h.minLength),maxLength:Jt(h.maxLength),pattern:Jt(h.pattern)}:{},name:f,onChange:Qt,onBlur:Qt,ref:S=>{if(S){Jn(f,h),w=$(n,f);const x=W(S.value)&&S.querySelectorAll&&S.querySelectorAll("input,select,textarea")[0]||S,F=gd(x),M=w._f.refs||[];if(F?M.find(P=>P===x):x===w._f.ref)return;B(n,f,{_f:{...w._f,...F?{refs:[...M.filter(Kn),x,...Array.isArray($(i,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),N(f,!1,void 0,x)}else w=$(n,f,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||h.shouldUnregister)&&!(ld(s.array,f)&&o.action)&&s.unMount.add(f)}}},Xn=()=>t.shouldFocusError&&Xt(n,er,s.mount),Ef=f=>{je(f)&&(b.state.next({disabled:f}),Xt(n,(h,w)=>{const E=$(n,w);E&&(h.disabled=E._f.disabled||f,Array.isArray(E._f.refs)&&E._f.refs.forEach(S=>{S.disabled=E._f.disabled||f}))},0,!1))},Xo=(f,h)=>async w=>{let E;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let S=ee(a);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:x,values:F}=await Z();y(),r.errors=x,S=ee(F)}else await K(n);if(s.disabled.size)for(const x of s.disabled)X(S,x);if(X(r.errors,"root"),fe(r.errors)){b.state.next({errors:{}});try{await f(S,w)}catch(x){E=x}}else h&&await h({...r.errors},w),Xn(),setTimeout(Xn);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:fe(r.errors)&&!E,submitCount:r.submitCount+1,errors:r.errors}),E)throw E},$f=(f,h={})=>{$(n,f)&&(W(h.defaultValue)?_e(f,ee($(i,f))):(_e(f,h.defaultValue),B(i,f,ee(h.defaultValue))),h.keepTouched||X(r.touchedFields,f),h.keepDirty||(X(r.dirtyFields,f),r.isDirty=h.defaultValue?V(f,ee($(i,f))):V()),h.keepError||(X(r.errors,f),u.isValid&&C()),b.state.next({...r}))},Zo=(f,h={})=>{const w=f?ee(f):i,E=ee(w),S=fe(f),x=S?i:E;if(h.keepDefaultValues||(i=w),!h.keepValues){if(h.keepDirtyValues){const F=new Set([...s.mount,...Object.keys(At(i,a))]);for(const M of Array.from(F)){const P=$(r.dirtyFields,M),pe=$(a,M),bt=$(x,M);P&&!W(pe)?B(x,M,pe):!P&&!W(bt)&&_e(M,bt)}}else{if(Bn&&W(f))for(const F of s.mount){const M=$(n,F);if(M&&M._f){const P=Array.isArray(M._f.refs)?M._f.refs[0]:M._f.ref;if(Ir(P)){const pe=P.closest("form");if(pe){pe.reset();break}}}}if(h.keepFieldsRef)for(const F of s.mount)_e(F,$(x,F));else n={}}a=t.shouldUnregister?h.keepDefaultValues?ee(i):{}:ee(x),b.array.next({values:{...x}}),b.state.next({values:{...x}})}s={mount:h.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!h.keepIsValid||!!h.keepDirtyValues||!t.shouldUnregister&&!fe(x),o.watch=!!t.shouldUnregister,o.keepIsValid=!!h.keepIsValid,o.action=!1,h.keepErrors||(r.errors={}),b.state.next({submitCount:h.keepSubmitCount?r.submitCount:0,isDirty:S?!1:h.keepDirty?r.isDirty:!!(h.keepDefaultValues&&!it(f,i)),isSubmitted:h.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:S?{}:h.keepDirtyValues?h.keepDefaultValues&&a?At(i,a):r.dirtyFields:h.keepDefaultValues&&f?At(i,f):h.keepDirty?r.dirtyFields:{},touchedFields:h.keepTouched?r.touchedFields:{},errors:h.keepErrors?r.errors:{},isSubmitSuccessful:h.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Qo=(f,h)=>Zo(Ie(f)?f(a):f,{...t.resetOptions,...h}),If=(f,h={})=>{const w=$(n,f),E=w&&w._f;if(E){const S=E.refs?E.refs[0]:E.ref;S.focus&&setTimeout(()=>{S.focus(),h.shouldSelect&&Ie(S.select)&&S.select()})}},Af=f=>{r={...r,...f}},es={control:{register:Jn,unregister:Yn,getFieldState:Ko,handleSubmit:Xo,setError:Go,_subscribe:Yo,_runSchema:Z,_updateIsValidating:y,_focusError:Xn,_getWatch:O,_getDirty:V,_setValid:C,_setFieldArray:m,_setDisabledField:Jo,_setErrors:T,_getFieldArray:te,_reset:Zo,_resetDefaultValues:()=>Ie(t.defaultValues)&&t.defaultValues().then(f=>{Qo(f,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:Nr,_disableForm:Ef,_subjects:b,_proxyFormState:u,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(f){o=f},get _defaultValues(){return i},get _names(){return s},set _names(f){s=f},get _formState(){return r},get _options(){return t},set _options(f){t={...t,...f}}},subscribe:Cf,trigger:tr,register:Jn,handleSubmit:Xo,watch:Sf,setValue:_e,getValues:Wo,reset:Qo,resetField:$f,clearErrors:kf,unregister:Yn,setError:Go,setFocus:If,getFieldState:Ko};return{...es,formControl:es}}function Tr(e={}){const t=ce.useRef(void 0),r=ce.useRef(void 0),[n,i]=ce.useState({isDirty:!1,isValidating:!1,isLoading:Ie(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:Ie(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ie(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Id(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,fd(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),ce.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),ce.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),ce.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),ce.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),ce.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),ce.useEffect(()=>{var o;e.values&&!it(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),ce.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=ce.useMemo(()=>dd(n,a),[a,n]),t.current}const jo=(e,t,r)=>{if(e&&"reportValidity"in e){const n=$(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Ad=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?jo(n.ref,r,e):n.refs&&n.refs.forEach(i=>jo(i,r,e))}},Td=(e,t)=>{t.shouldUseNativeValidation&&Ad(e,t);const r={};for(const n in e){const i=$(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(Fd(t.names||Object.keys(e),n)){const o=Object.assign({},$(r,n));B(o,"root",a),B(r,n,o)}else B(r,n,a)}return r},Fd=(e,t)=>e.some(r=>r.startsWith(t+"."));var Fr=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(zu(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var d=s.issues[0],p=Lu(d);if(p&&(l[p]||(l[p]={message:d.message,type:d.type}),o)){var u=l[p].types,g=u&&u[d.type];l[p]=_o(p,o,l,d.type,g?[].concat(g,d.message):d.message)}s.issues.shift()}return{values:{},errors:Td(l,a)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Ro=27,Bo=12,zo=10,Nd=St("enum"),Dd=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Fr(Ke({checked:nt(lo(me(),ao()),Pn(n=>Object.entries(n).filter(([i,a])=>a).map(([i,a])=>i)),qt(r.max,t("validation_multiple_choice_max",{count:r.max})),$t(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},Vd=on(({option:e,...t},r)=>c(re,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Uo=ct("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:ho}}}),Ld=({input:e,onSubmitSuccess:t})=>{var p,u;const r=e.key?(p=A.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,i=n&&e.config.options.length===2,{t:a}=ae(),{register:o,handleSubmit:s,formState:{errors:l}}=Tr({defaultValues:{checked:n?{}:Nd(r)?Object.fromEntries(r.value.map(g=>[g,!0])):{}},resolver:Dd(e.config,a)}),d=Rn();return i?c("ul",{style:{maxHeight:6.5*Ro+5*Bo+2*zo},class:Uo({variant:"booleanLike"}),children:e.config.options.map((g,b)=>c("li",{class:go,children:c(bo,{type:"submit",ref:v=>{v&&b===0&&(d.current=v)},label:g.label,value:"true",onClick:()=>t({type:"enum",value:[g.value]})})},g.value))}):c("form",{noValidate:!0,onSubmit:g=>s(b=>{const v=b.checked;t({type:"enum",value:v})})(g),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Ro+5*Bo+2*zo},class:Uo({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((g,b)=>{const v=`checked.${g.value}`,{ref:_,...C}=o(v);return c("li",{class:"relative",children:c(Vd,{option:g,autoFocus:b===0,ref:y=>{y&&b===0&&(d.current=y),_(y)},id:v,...C,onClick:n?()=>t({type:"enum",value:[g.value]}):void 0})},g.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:c(pt,{}),e.config.minSelected===0&&c(ht,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(It,{error:(u=l.checked)==null?void 0:u.root})})]})},Od=St("number"),Md=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return Fr(Ke({number:nt(oo(t("validation_number")),to(r,t("validation_number_min",{min:r})),eo(n,t("validation_number_max",{max:n})),Za(a=>a===Number(a.toFixed(i)),t("validation_number_decimal_cases",{count:i})))}))},Pd=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,n=e.key?(u=A.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:i}=ae(),{register:a,handleSubmit:o,formState:{errors:s}}=Tr({defaultValues:{number:r?Number(r):Od(n)?n.value:void 0},resolver:Md(e.config,i)}),{ref:l,...d}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=we();return ve(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(g=>{g.number!==void 0&&t({type:"number",value:g.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...d,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:g=>{g&&(p.current=g),l(g)},type:"text",min:e.config.min,max:e.config.max,class:Kt({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&c(ht,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(pt,{})]}),c(It,{error:s.number})]})},jd=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(jn).find(i=>e.startsWith(i[1])),r=t?t[1]:"",n=e.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},Rd="44",Bd=/^[0-9 ]+$/,zd=St("string"),Ud=St("phone"),Hd=e=>{const t=nt(me(e("validation_country_code")),Mn(Bd,e("validation_country_code"))),r=nt(me(e("validation_phone")),$t(1,e("validation_phone")),Pn(n=>n.replace(/[^0-9]/g,"")));return Fr(Ke({countryCode:t,phoneNumber:r}))},qd=({input:e,onSubmitSuccess:t})=>{var _;const r=e.key?(_=A.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,{t:n}=ae(),[i,a]=Ce(),o=zd(r)?jd(r.value):Ud(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:d},watch:p}=Tr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??Rd,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:Hd(n)}),{ref:u,...g}=s("phoneNumber",{required:!e.config.optional}),b=we(),v=p("countryCode");return ve(()=>{b.current&&(b.current.focus(),b.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(C=>{const y=C.phoneNumber.replace(/[^0-9]/g,""),m=C.countryCode.replace(/[^0-9]/g,"");a(void 0);const k=e.config.minChars??7,T=y.length+m.length;if(T<k)return a(n("validation_phone_min_chars",{count:k}));const N=e.config.maxChars;if(N!=null&&T>N)return a(n("validation_max_chars",{count:N}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:m,phoneNumber:y}}):t({type:"string",value:v+C.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[c("span",{children:["+",v]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(jn).map(([C,y])=>c("option",{value:y,children:[C," (+",y,")"]},C))})]}),c("input",{...g,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:C=>{C&&(b.current=C),u(C)},class:Kt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(ht,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(pt,{})]}),c(It,{error:d.countryCode||d.phoneNumber||{message:i}})]})},Wd=({input:e,onSubmitSuccess:t})=>c("div",{class:"flex flex-col items-center py-3",children:c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 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:()=>{t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),Kd={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Gd=St("string"),Yd=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return Fr(Ke({text:{date:nt(me(t("validation_date")),Mn(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:nt(me(t("validation_email")),Qa(t("validation_email")),$t(e.minChars??1,r.minLength),qt(e.maxChars??1/0,r.maxLength)),text:nt(me(),$t(e.minChars??1,r.minLength),qt(e.maxChars??1/0,r.maxLength)),url:nt(me(t("validation_url")),ro(t("validation_url")),$t(e.minChars??1,r.minLength),qt(e.maxChars??1/0,r.maxLength))}[e.format]}))},Jd={text:({input:e,onSubmitSuccess:t})=>{var u;const{t:r}=ae(),n=e.key?(u=A.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:s}}=Tr({defaultValues:{text:i||(Gd(n)?n.value:"")},resolver:Yd(e.config,r)}),{ref:l,...d}=a("text",{required:!e.config.optional}),p=we();return ve(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(g=>{t({type:"string",value:g.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...d,...Kd[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:g=>{g&&(p.current=g),l(g)},placeholder:e.config.placeholder,class:Kt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(ht,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(pt,{})]}),c(It,{error:s.text})]})},phone:qd,"multiple-choice":Ld,boolean:Zu,file:ad,submit:Wd,address:Gu,number:Pd},Xd=({logger:e})=>{var o;const t=(o=A.current$.value.flow)==null?void 0:o.data.currentInput,[r,n]=Cu(),i=we(null);A.inputHeight$.value=n.height;const a=()=>G.onInteractionFn$.value();return $e(()=>{const s=i.current;if(s)return s.addEventListener("transitionstart",G.scrollToEnd.smooth),s.addEventListener("transitioncancel",G.scrollToEnd.smooth),s.addEventListener("transitionend",G.scrollToEnd.smooth),()=>{s.removeEventListener("transitionstart",G.scrollToEnd.smooth),s.removeEventListener("transitioncancel",G.scrollToEnd.smooth),s.removeEventListener("transitionend",G.scrollToEnd.smooth)}},[]),c("div",{ref:i,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:n.height},children:c("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",onPointerDownCapture:t?a:void 0,onKeyDownCapture:t?a:void 0,children:t?(()=>{const s=Jd[t.type];return c(s,{logger:e,onSubmitSuccess:G.onSubmitSuccessFn$.value,input:t})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Kt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(pt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Zd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qd=function(e){return e instanceof RegExp},ef=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Ho=function(e){return typeof e=="string"},tf=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function rf(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Ho(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Qd(a)||(a=new RegExp("("+ef(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=i}return o}var nf=function(t,r,n){return Array.isArray(t)||(t=[t]),tf(t.map(function(i){return Ho(i)?rf(i,r,n):i}))};const Zt=Zd(nf),af=/(\[[^\]]+\]\([^)]+\))/g,of=/\[([^\]]+)\]\(([^)]+)\)/,sf=/(https?:\/\/[^\s]+)/g,lf=/_(.*?)_/g,cf=/\*\*(.*?)\*\*/g,uf=/\\n|\n/g,qo="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",df=e=>{const t=Zt(e,af,(o,s)=>{const[,l,d]=o.match(of)??[];return d?c("a",{class:qo,href:d,children:l??d},d+s):c("span",{children:"INVALID LINK"})}),r=Zt(t,sf,(o,s)=>c("a",{class:qo,href:o,children:o},o+s)),n=Zt(r,lf,(o,s)=>c("em",{children:o},o+s)),i=Zt(n,cf,(o,s)=>c("strong",{children:o},o+s));return Zt(i,uf,(o,s)=>c("br",{},`br-${s}`))},ff=ct("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),pf=({children:e,className:t,animate:r,side:n,...i})=>c("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:ff({className:t,side:n,animate:r}),...i,children:e}),hf=({message:e})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),gf=({className:e,...t})=>($e(()=>{G.scrollToEnd.smooth()}),c("div",{"aria-hidden":!0,children:G.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Je("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),bf={bot:"left",user:"right"},vf=ct("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),wf=({lastSentMessageFooter:e})=>{var r;const t=((r=A.current$.value.flow)==null?void 0:r.data.messages)??[];return $e(()=>{G.scrollToEnd.smooth()},[t.length]),c("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,i)=>c(re,{children:c("li",{class:"flex",children:br(n).with({type:"system"},a=>c("p",{class:vf({variant:a.variant}),children:a.text})).with({type:"text",author:Rt.union("bot","user")},a=>{const o=a.author==="user"&&!t.slice(i+1).some(d=>d.type==="text"&&d.author==="user"),s=i===t.length-1,l=a.author==="bot"?df(a.text):a.text;return c(re,{children:[o?e:null,c(pf,{animate:s,side:bf[a.author],children:l},i)]})}).with({type:"link"},a=>c(hf,{message:a})).with({type:"image"},a=>c("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=>c(rd,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const o=t[t.length-1];return!(a===o)||G.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Pa,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),c(gf,{},"typing")]})},mf=({logger:e,apiClient:t,analytics:r,talentBankClient:n})=>{const{flow:i}=A.current$.value;Oe(i,"Flow is required to exist to show chatbot body");const a=A.viewState$.value,{chatRef:o,chatService:s}=Rc(),{t:l}=ae(),[d,p]=Ce();return ve(()=>{a==="maximised"&&G.scrollToEnd.instant()},[a]),ve(()=>{var m;const{state:u,flow:g}=A.current$.peek();if(u!=="loaded")throw new Error(l("invalid_state"));let b=g.data.nodeHistory.at(-1);if(G.scrollToEnd.instant(),A.setInput(void 0),g.data.isFinished)return;const v=()=>{const k=A.current$.peek().flow;!k||k.data.hasInteracted||(A.markAsInteracted(),Wa(r,k,"FLOW_INTERACT"))};G.onInteractionFn$.value=v,b===void 0?(b=La(i.nodes).id,A.setCurrentNodeId(b),Wa(r,g,"FLOW_START")):A.removeMessagesSentByNodeIds([b]);const{interpret:_,abort:C,undo:y}=ou({context:i.context,analytics:{service:r,customProperties:(m=i.analytics)==null?void 0:m.customProperties},apiClient:t,logger:e,talentBankClient:n,flow:i,chatService:s,t:l,getSubmissions:()=>{var k;return(k=A.current$.peek().flow)==null?void 0:k.data.submissions},onInterpret:k=>A.setCurrentNodeId(k.id),onFlowEnd:async()=>{var T;A.markAsFinished();const k=A.current$.peek().flow;Oe(k),r.log({event:"FLOW_END",properties:{flow_id:i.id,flow_version:i.version,flow_session_id:k.data.flowSessionId,flow_build:i.build,job:i.job},customProperties:(T=i.analytics)==null?void 0:T.customProperties})}});return p(()=>y),_(b),()=>{G.onInteractionFn$.value===v&&(G.onInteractionFn$.value=()=>{}),C()}},[r,t,s,e,i,n,l]),c(re,{children:[c("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:A.inputHeight$.value},children:c(wf,{lastSentMessageFooter:i.data.isFinished||!d?null:c(_f,{undoFn:d})})}),c(Xd,{logger:e})]})},yf=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],_f=({undoFn:e})=>{const{t}=ae();return c(Sr,{onClick:async()=>{const{flow:r}=A.current$.peek();Oe(r);const{removed:n}=e(r.data.nodeHistory),i=r.data.nodeHistory.splice(-n);i.length!==0&&(A.removeMessagesSentByNodeIds(i),A.setInput(void 0),i.pop(),i.map(a=>r.nodes.find(o=>o.id===a)).filter(Boolean).flatMap(yf).forEach(a=>delete r.data.submissions[a]),A.current$.value={...A.current$.value})},children:[c("title",{children:t("undo")}),c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})]})},xf=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:mf},Symbol.toStringTag,{value:"Module"}))})();
|
|
5
|
+
}`},eu=({_internal_domManager:e=Oc(),theme:t,terms:r,feedback:i})=>Ws(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:d})=>{let p=!1,u=0;const h=ac({locale:void 0,overrides:r??{}}),b=l&&d?Zs({environment:d,publishableKey:l,logger:o}):void 0,w=m=>m===u,S=()=>{if(typeof window>"u")return;u++,it.flushStateData().catch(()=>{}),N.cancelCurrentFlow(),N.inputHeight$.value=53,J.isBotTyping$.value=!1;const m=e.getChatbotElement();m&&(ut(null,m),m.remove()),p=!1,o.info("Chatbot plugin destroyed")},k=()=>{if(typeof window>"u")return;const m=u,_=[be("style",{id:"inploi-chatbot-styles"},Lc),be("style",{id:"inploi-chatbot-theme"},Qc(t))],$=e.getOrCreateChatbotElement();if(ut(be(ie,{},[_,be(Vc,{apiClient:n,logger:o,analytics:s,talentBankClient:b,params:{theme:t,terms:r,feedback:i}})]),$),i){const E=T=>{var O,P;if(!w(m))return;const G=(O=e.getChatbotElement())==null?void 0:O.querySelector("dialog");G&&tu({instance:T({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((P=i.params)==null?void 0:P.terms)??{},host:G})};i.plugin instanceof Promise?i.plugin.then(({feedbackPlugin:T})=>{E(T())}).catch(T=>{o.error("Error preparing feedback plugin",T)}):E(i.plugin)}p=!0},y=async(m,_)=>{if(!w(_))return;xs({context:m.context||{},schema:m.flow.context_schema,logger:o});const $=await N.prepareFlow(m);w(_)&&N.commitFlow($)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;k(),o.info("Chatbot plugin prepared")}catch(m){o.error("Error preparing chatbot plugin",m)}},fetchFlowByJobId:async(m,_)=>a.request(Uc,{params:{id:m},searchParams:{id_type:(_==null?void 0:_.idType)==="inploi"?"internal":"external"}}).then($=>({flow:$.flow,title:$.job.title,flowKeys:[$.job.id,...(_==null?void 0:_.flowKeys)??[]],job:{id:$.job.id,id_type:"external"},..._,context:{user:$.user,..._==null?void 0:_.context}})),fetchFlowById:async(m,_)=>a.request(Hc,{params:{id:m}}).then($=>{var E;return{flow:$.flow,title:"Chatbot",flowKeys:(_==null?void 0:_.flowKeys)??[],..._,analytics:{customProperties:{flow_id:$.flow.id,flow_version:$.flow.version,...(E=_==null?void 0:_.analytics)==null?void 0:E.customProperties}}}}),open:async m=>{if(!(typeof window>"u"))try{N.cancelCurrentFlow(),N.viewState$.value="maximised",p||k();const _=u;m instanceof Promise?(N.current$.value={state:"loading"},m.then($=>y($,_)).catch($=>{if(!w(_))return;const E=$ instanceof Error?$.message:h("unknown_error");N.current$.value={state:"error",error:E}})):await y(m,_)}catch(_){o.error("Error starting flow",_)}},close:async()=>{typeof window>"u"||(N.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:S}});function tu({instance:e,terms:t,theme:r,host:i}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:i})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=eu;const Ka=(e,t,r)=>{var i;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(i=t.analytics)==null?void 0:i.customProperties})};var Ga=({condition:e,context:t,submissions:r,ifBlock:i})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=cn({context:t,key:n,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=Nt(o.value,a);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=Nt(o.value,a),l={...i,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return qt(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return qt(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return qt(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(d=>typeof d=="string")?qt(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?or(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${i.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}},qt=(e,{context:t,submissions:r})=>{let i="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of i)if(Ga({condition:n,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let n of i)if(!Ga({condition:n,context:t,submissions:r,ifBlock:e}))return!1;return!0}},ru=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,iu=(e,{context:t,submissions:r})=>e.replace(ru,(i,n,a="")=>{let[o,...s]=n.trim().split("."),l=cn({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Dt(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return or(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let d=Nt(l.value,s);switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(p=>typeof p=="string"))return d.join(", ")}break}}return a});const Ya=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Pe=(e,t)=>iu(e,Ya(t)),nu=(e,t)=>qt(e,Ya(t)),Ja=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const i=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(i)return Ja({node:i,nodes:t,stopWhen:r})},au=({childNode:e,nodes:t})=>{const i=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;const a=t.find(s=>s.id===n.branchId);if(!a)return!1;const o=Ja({node:a,nodes:t,stopWhen:s=>s.id===e.id});return!(!o||o.id!==e.id)});if(i!=null&&i.nextId)return t.find(n=>n.id===i.nextId)},ou=({flow:e,analytics:t,logger:r,talentBankClient:i,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:d,onFlowEnd:p,onInterpret:u,t:h})=>{let b=new AbortController;const w={...t.service,log:k=>t.service.log({...k,customProperties:{...k.customProperties,...t.customProperties}})},S=async(k,y)=>{if(b.signal.aborted)return;const m=o(),_=s(),$=(_==null?void 0:_.submitNodeId)===k.id?e.nodes.find(E=>{var T;return E.id===_.fileQuestionNodeId&&E.type==="question-file"&&((T=m==null?void 0:m[E.data.key])==null?void 0:T.type)!=="file"}):void 0;if($)return S($,y);u==null||u(k,y);try{await su({flow:e,analytics:w,logger:r,talentBankClient:i,apiClient:a,context:n,node:k,submissions:m,applicationRecovery:_,setApplicationRecovery:async E=>{if(!b.signal.aborted)try{await l(E)}catch(T){r.error("Failed to persist application recovery",T)}},forceSubmitConfirmation:(_==null?void 0:_.submitNodeId)===k.id,t:h,chat:{sendMessage:async E=>d.send({groupId:k.id,message:E,signal:b.signal}),userInput:async E=>d.input({input:E,signal:b.signal}),setSubmission:(E,T)=>{b.signal.aborted||d.setSubmission(E,T)}},next:E=>{const T=(_==null?void 0:_.fileQuestionNodeId)===k.id?_.submitNodeId:E,G=T?e.nodes.find(O=>O.id===T):au({childNode:k,nodes:e.nodes});return G?S(G,k):p==null?void 0:p(k)},end:()=>p==null?void 0:p(k)})}catch(E){if(E instanceof pt)return;throw E}};return{interpret:async k=>{const y=e.nodes.find(m=>m.id===k)??La(e.nodes);return S(y)},undo:k=>{let y=1;const m=e.nodes.find($=>$.id===k[k.length-1]);for(let $=k.length-2;$>0;$--){const E=k[$],T=e.nodes.find(G=>G.id===E);if(!T||(y++,T.type.startsWith("question-")))break}b.abort(),b=new AbortController;const _=e.nodes.find($=>$.id===k[k.length-y]);return Oe(_,"Undo failed: new start node not found"),S(_,m),{removed:y}},abort:()=>{b.abort()}}};async function su(e){const t=e.node;switch(t.type){case"text":return bu({...e,node:t});case"image":return vu({...e,node:t});case"question-text":return wu({...e,node:t});case"question-enum":return _u({...e,node:t});case"question-number":return mu({...e,node:t});case"question-phone":return yu({...e,node:t});case"question-boolean":return xu({...e,node:t});case"question-file":return Su({...e,node:t});case"question-address":return ku({...e,node:t});case"end-flow":return Cu({...e,node:t});case"if-block":return gu({...e,node:t});case"jump":return uu({...e,node:t});case"link":return hu({...e,node:t});case"integration-application-submit":return fu({...e,node:t});case"add-submission":return du({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return cu({...e,node:t});case"feedback":return lu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function lu({next:e,node:t}){e(t.nextId)}async function cu({next:e,node:t,talentBankClient:r,submissions:i,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(i&&r){const d=t.data.scope==="job"?(l=n.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||d!=null)try{s=await r.checkDuplicate({email:hs({key:t.data.email,submissions:i}).toString(),jobId:d,scope:t.data.scope})}catch(p){a.error("[check-duplicate]",p)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function uu({next:e,node:t}){e(t.data.targetId)}async function du({next:e,node:t,logger:r,submissions:i,context:n}){if(!i){r.error("Submissions not found");return}i[t.data.key]={type:"string",value:Pe(t.data.value,{submissions:i,context:n})},e(t.nextId)}async function fu({chat:e,next:t,end:r,node:i,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:d,setApplicationRecovery:p,forceSubmitConfirmation:u,t:h}){const b=async()=>{(d==null?void 0:d.submitNodeId)===i.id&&await p(void 0)},w=async k=>{const y=k();return await b(),y},S=async k=>{var G;k!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:i.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:y,session_id:m}=s.getSessionInfo();let _;const $=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:i.data.integrationId,anonymous_id:y,session_id:m,job:l.job,flow_build:l.build,submissions:ps(o||{},i.data.submitKeys)})}).catch(O=>(_=O,Gs(O)?O.data:O));i.data.key&&e.setSubmission(i.data.key,{type:"integration",value:$});const E=_s($);if(E&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:E.service,response:E.response,flow_type:"CHATBOT_DRAWER",job:l.job}}),ws($)){const{redirect_url:O,message:P,button_text:z}=$.integration_response.data;await e.sendMessage({type:"text",author:"bot",text:P??h("submission_redirect_message")});try{const Te=new URL(O);y&&!Te.searchParams.has("anonymous_id")&&Te.searchParams.set("anonymous_id",y),await e.sendMessage({type:"link",href:Te.toString(),text:z??h("complete_submission"),onClick:()=>{if(!m){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:m,flow_version:l.version,href:Te.toString(),job:l.job}})}})}catch(Te){n.error(`Invalid redirect URL: ${O}`,Te),e.sendMessage({type:"system",variant:"error",text:h("redirect_url_error")})}return w(()=>t(i.nextId))}if(($==null?void 0:$.success)===!0)return i.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:h("submission_completed")}),w(()=>t(i.nextId));const T=pu($,_);if(T){n.error(_??T.message);const O=T.phase==="submit"&&T.verdict==="confirmed"&&T.code==="unreadable_document"&&typeof T.field=="string"&&T.status!==void 0&&T.status>=400&&T.status<500&&((G=o==null?void 0:o[T.field])==null?void 0:G.type)==="file"?T.field:void 0,P=O===void 0?void 0:l.nodes.find(z=>z.type==="question-file"&&z.data.key===O);return P&&O!==void 0?(e.setSubmission(O,null),await p({fileQuestionNodeId:P.id,submitNodeId:i.id}),await e.sendMessage({type:"system",variant:"error",text:h("submission_unreadable_document")}),t(P.id)):T.status===409&&T.phase==="submit"&&T.verdict==="confirmed"?(await e.sendMessage({type:"system",variant:"info",text:h("submission_duplicate")}),w(r)):T.status===410&&T.phase==="submit"&&T.verdict==="confirmed"&&T.code==="job_closed"?(await e.sendMessage({type:"system",variant:"info",text:h("submission_closed")}),w(r)):T.phase==="submit"&&T.verdict==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:h("submission_unknown")}),w(r)):T.phase==="workflow"&&T.retryable===!0&&T.verdict==="not_submitted"?(await e.sendMessage({type:"system",variant:"error",text:h("submission_retryable")}),S(!1)):(await e.sendMessage({type:"system",variant:"error",text:h("submission_failed")}),w(r))}return n.error(_??$),await e.sendMessage({type:"system",variant:"error",text:h("submission_failed")}),w(r)};await S(u===!0?!1:i.data.skipConfirmation)}const pu=(e,t)=>{if(!ys(e))return;const r=e.integration_response;if(typeof r!="object"||r===null)return;const i=r.error;if(typeof i!="object"||i===null)return;const n=i.data,a=typeof n=="object"&&n!==null?n:{},o=d=>typeof a[d]=="string"?a[d]:void 0,s=d=>typeof a[d]=="boolean"?a[d]:void 0,l=r.status;return{message:e.integration_response.error.message,status:typeof l=="number"?l:t instanceof mn?t.status:void 0,phase:o("phase"),retryable:s("retryable"),verdict:o("verdict"),code:o("code"),field:o("field")}};async function hu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({type:"link",href:Pe(r.data.href,{submissions:i,context:n}),text:Pe(r.data.cta,{submissions:i,context:n})}),t(r.nextId)}async function gu({submissions:e,next:t,node:r,context:i}){t(nu(r,{submissions:e,context:i})?r.branchId:r.nextId)}async function bu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.text,{submissions:i,context:n})}),t(r.nextId)}async function vu({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function wu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?or(o.value):o.value}),t(r.nextId)}async function mu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function yu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const a=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});a===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:a.type==="phone"?or(a.value):a.value}),t(r.nextId)}async function _u({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function xu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Pe(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function ku({chat:e,next:t,node:r,t:i}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:i("skipped")});else{const a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function Su({node:e,chat:t,next:r,submissions:i,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Pe(e.data.question,{submissions:i,context:n})});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function Cu({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}function Za(e,t){let r;return(...i)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...i),t)}}function Eu({debounce:e,scroll:t,polyfill:r,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const n=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!n)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,o]=Ce({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=we({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),l=e?typeof e=="number"?e:e.scroll:null,d=e?typeof e=="number"?e:e.resize:null,p=we(!1);$e(()=>(p.current=!0,()=>void(p.current=!1)));const[u,h,b]=qe(()=>{const y=()=>{if(!s.current.element)return;const{left:m,top:_,width:$,height:E,bottom:T,right:G,x:O,y:P}=s.current.element.getBoundingClientRect(),z={left:m,top:_,width:$,height:E,bottom:T,right:G,x:O,y:P};s.current.element instanceof HTMLElement&&i&&(z.height=s.current.element.offsetHeight,z.width=s.current.element.offsetWidth),Object.freeze(z),p.current&&!Tu(s.current.lastBounds,z)&&o(s.current.lastBounds=z)};return[y,d?Za(y,d):y,l?Za(y,l):y]},[o,i,l,d]);function w(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",b,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function S(){s.current.element&&(s.current.resizeObserver=new n(b),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(y=>y.addEventListener("scroll",b,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{b()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const k=y=>{!y||y===s.current.element||(w(),s.current.element=y,s.current.scrollContainers=Xa(y),S())};return Iu(b,!!t),$u(h),$e(()=>{w(),S()},[t,b,h]),$e(()=>w,[]),[k,a,u]}function $u(e){$e(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Iu(e,t){$e(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Xa(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:i,overflowY:n}=window.getComputedStyle(e);return[r,i,n].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...Xa(e.parentElement)]}const Au=["x","y","top","bottom","left","right","width","height"],Tu=(e,t)=>Au.every(r=>e[r]===t[r]),gt=({class:e,...t})=>{const{t:r}=ae();return c("button",{class:Ze("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var Ke;function $r(e){return{lang:(e==null?void 0:e.lang)??(Ke==null?void 0:Ke.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ke==null?void 0:Ke.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ke==null?void 0:Ke.abortPipeEarly)}}var Di;function Fu(e){return Di==null?void 0:Di.get(e)}var Vi;function Nu(e){return Vi==null?void 0:Vi.get(e)}var Mi;function Du(e,t){var r;return(r=Mi==null?void 0:Mi.get(e))==null?void 0:r.get(t)}function $t(e){var r,i;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function oe(e,t,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??$t(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Du(e.reference,l.lang)??(d?Nu(l.lang):null)??i.message??Fu(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function je(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},$r())}}}function Vu(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Mu(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function Lu(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Ou=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},Pu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Qa(e,t){return{kind:"validation",type:"check",reference:Qa,async:!1,expects:null,requirement:e,message:t,"~run"(r,i){return r.typed&&!this.requirement(r.value)&&oe(this,"input",r,i),r}}}function eo(e){return{kind:"validation",type:"email",reference:eo,expects:null,async:!1,requirement:Pu,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&oe(this,"email",t,r),t}}}function Wt(e,t){return{kind:"validation",type:"max_length",reference:Wt,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&oe(this,"length",r,i,{received:`${r.value.length}`}),r}}}function to(e,t){return{kind:"validation",type:"max_value",reference:to,async:!1,expects:`<=${e instanceof Date?e.toJSON():$t(e)}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!(r.value<=this.requirement)&&oe(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():$t(r.value)}),r}}}function It(e,t){return{kind:"validation",type:"min_length",reference:It,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&oe(this,"length",r,i,{received:`${r.value.length}`}),r}}}function ro(e,t){return{kind:"validation",type:"min_value",reference:ro,async:!1,expects:`>=${e instanceof Date?e.toJSON():$t(e)}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!(r.value>=this.requirement)&&oe(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():$t(r.value)}),r}}}function Li(e,t){return{kind:"validation",type:"regex",reference:Li,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!this.requirement.test(r.value)&&oe(this,"format",r,i),r}}}function Oi(e){return{kind:"transformation",type:"transform",reference:Oi,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function io(e){return{kind:"validation",type:"url",reference:io,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&oe(this,"URL",t,r),t}}}function ju(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function no(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function ao(e,t){return{kind:"schema",type:"array",reference:ao,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return je(this)},"~run"(r,i){var a;const n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){const d={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else oe(this,"type",r,i);return r}}}function oo(e){return{kind:"schema",type:"boolean",reference:oo,expects:"boolean",async:!1,message:e,get"~standard"(){return je(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:oe(this,"type",t,r),t}}}function so(e){return{kind:"schema",type:"number",reference:so,expects:"number",async:!1,message:e,get"~standard"(){return je(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:oe(this,"type",t,r),t}}}function Ge(e,t){return{kind:"schema",type:"object",reference:Ge,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return je(this)},"~run"(r,i){var a;const n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:no(s),d=s["~run"]({value:l},i);if(d.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=ju(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(oe(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else oe(this,"type",r,i);return r}}}function Kt(e,t){return{kind:"schema",type:"optional",reference:Kt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return je(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=no(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function lo(e,t){return{kind:"schema",type:"picklist",reference:lo,expects:Mu(e.map($t),"|"),async:!1,options:e,message:t,get"~standard"(){return je(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:oe(this,"type",r,i),r}}}function co(e,t,r){return{kind:"schema",type:"record",reference:co,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return je(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const l in a)if(Vu(a,l)){const d=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const h={type:"object",origin:"key",input:a,key:l,value:d};for(const b of p.issues)b.path=[h],(o=i.issues)==null||o.push(b);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}const u=this.value["~run"]({value:d},n);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:d};for(const b of u.issues)b.path?b.path.unshift(h):b.path=[h],(s=i.issues)==null||s.push(b);if(i.issues||(i.issues=u.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!u.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=u.value)}}else oe(this,"type",i,n);return i}}}function me(e){return{kind:"schema",type:"string",reference:me,expects:"string",async:!1,message:e,get"~standard"(){return je(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:oe(this,"type",t,r),t}}}function Ru(e,t,r){const i=e["~run"]({value:t},$r(r));if(i.issues)throw new Ou(i.issues);return i.value}function Bu(e,t){const r={};for(const i in e.entries)r[i]=!t||t.includes(i)?Kt(e.entries[i]):e.entries[i];return{...e,entries:r,get"~standard"(){return je(this)}}}function at(...e){return{...e[0],pipe:e,get"~standard"(){return je(this)},"~run"(t,r){for(const i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function zu(e,t,r){const i=e["~run"]({value:t},$r(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}async function Uu(e,t,r){const i=await e["~run"]({value:t},$r(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}const At=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[c("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"truncate pr-1 text-sm",children:e.message})]}),bt=({class:e,...t})=>{const{t:r}=ae();return c("button",{type:"button",class:Ze("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),...t,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Pi={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"};const Gt=dt("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}}),Hu="https://api.mapbox.com/search/searchbox/v1/suggest",qu="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Wu=e=>atob(e).split("").reverse().join(""),Ye=Ge({name:me()}),Ku=Ge({suggestions:ao(Ge({full_address:Kt(me()),place_formatted:Kt(me()),name:Kt(me()),mapbox_id:me(),context:Bu(Ge({address:Ye,street:Ye,neighborhood:Ye,locality:Ye,district:Ye,place:Ye,region:Ye,postcode:Ye,country:Ye}))}))}),Gu=({logger:e,t})=>qe(()=>{var i;const r=(i=N.current$.peek().flow)==null?void 0:i.data.flowSessionId;return r?{enabled:!0,getPredictions:async n=>{var u;const a=new URL(Hu);a.searchParams.set("q",n),a.searchParams.set("session_token",r);const o=(u=N.current$.peek().flow)==null?void 0:u.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",Wu(qu));const l=await fetch(a);if(!l.ok)return e.error("Failed to get address details",l),{ok:!1,error:t("address_error")};const d=zu(Ku,await l.json());if(d.success===!1)return e.error("Failed to parse address details",d.issues),{ok:!1,error:t("address_error")};const{suggestions:p}=d.output;return{ok:!0,data:p.map(h=>{var b,w,S,k,y,m,_,$,E;return{label:h.full_address??h.place_formatted??h.name??h.mapbox_id,id:h.mapbox_id,address:{line1:((b=h.context.address)==null?void 0:b.name)??((w=h.context.street)==null?void 0:w.name),line2:void 0,line3:((S=h.context.neighborhood)==null?void 0:S.name)??((k=h.context.locality)==null?void 0:k.name),city:((y=h.context.place)==null?void 0:y.name)??((m=h.context.district)==null?void 0:m.name),state:(_=h.context.region)==null?void 0:_.name,postcode:($=h.context.postcode)==null?void 0:$.name,country:(E=h.context.country)==null?void 0:E.name}}})}}}:{enabled:!1}},[e,t]),uo=e=>{const{t}=ae();return c("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},Yu=({input:e,onSubmitSuccess:t,logger:r})=>{const{t:i}=ae(),[n,a]=Ce(),[o,s]=Ce([]),{enabled:l,getPredictions:d}=Gu({logger:r,t:i}),[p,u]=Ce(l?"query":"manual"),[h,b]=Ce(""),[w,S]=Ce(),k=y=>{Oe(l,"Query state should not be enabled"),y=y.trim(),y!==(h==null?void 0:h.trim())&&(b(y),y===""&&s([]),S(void 0),d(y).then(m=>{if(m.ok===!1){s([]),S(m.error);return}s(m.data)}))};switch(p){case"query":return Oe(l,"Query state should not be enabled"),c(Ju,{input:e,onSkip:()=>t(null),onAddressSelect:y=>{if(y===""){a(void 0),u("manual");return}const m=o.find(_=>_.id===y);m&&(a(m.address),u("details"))},onAddressSearch:y=>{k(y)},suggestions:o,query:h,error:w});case"details":return Oe(n!==void 0),c(po,{input:e,logger:r,onSubmitSuccess:t,addressFields:n,actions:c(uo,{onClick:()=>{u("query")}})});case"manual":return c(po,{logger:r,input:e,onSubmitSuccess:t,addressFields:{},actions:l?c(uo,{onClick:()=>{u("query")}}):void 0})}},Ju=({input:e,onSkip:t,suggestions:r,onAddressSelect:i,query:n,onAddressSearch:a,error:o})=>{const{t:s}=ae(),l=we(null);return ve(()=>{l.current&&(l.current.focus(),l.current.select())},[]),c(ie,{children:[c("form",{noValidate:!0,onSubmit:d=>{d.preventDefault();const u=new FormData(d.currentTarget).get("address");typeof u=="string"&&a(u)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||s("address_search"),defaultValue:n,class:Gt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]}),c("span",{class:"sr-only",children:s("search")})]})})]}),e.config.optional&&c(bt,{class:"relative",onClick:t})]}),o?c(At,{error:{message:o}}):null,c("ul",{children:[r.map(d=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{i(d.id)},children:[c("span",{class:"flex-grow",children:d.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},d.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{i("")},children:c("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},fo=["line1","line2","line3","city","state","postcode","country"],po=({addressFields:e,onSubmitSuccess:t,actions:r,input:i})=>{const n=we(null);ve(()=>{if(n.current){const s=n.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const a=Object.keys(Pi),{t:o}=ae();return c("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const l=new FormData(s.currentTarget),d=Object.fromEntries(l.entries());t({type:"address",value:d})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:n,children:fo.map((s,l)=>{const d=`isdk_${s}`,p=i.config.keys[s];return p?c(ie,{children:[c("label",{for:d,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:o(s)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:p,id:d,defaultValue:e[s],required:!0,children:[e.country&&!a.includes(e.country)?c("option",{value:e[s],children:e[s]}):c("option",{value:"",children:o("select_country")}),a.map(u=>c("option",{value:u,children:u},u))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:l===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:p,id:d,defaultValue:e[s],required:!0}),l===fo.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"flex w-full flex-1 ",children:[c("div",{class:"flex-grow",children:r}),c(gt,{class:"flex items-center justify-center"})]})]})},ji=()=>{const e=we(null);return $e(()=>{var t;(t=e.current)==null||t.focus()},[]),e},ho=["true","false"],Zu=lo(ho),Xu="answer",go="flex items-center flex-wrap gap-2 p-2.5",bo="min-w-0 max-w-full flex-auto",vo=ai(({label:e,...t},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:c("p",{class:"text-center text-base",children:e})})),Qu=({input:e,onSubmitSuccess:t})=>{const r=ji();return c("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const n=Cc(i).value,a=Ru(Zu,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:go,children:ho.map((i,n)=>c("li",{class:bo,children:c(vo,{ref:n===0?r:null,type:"submit",name:Xu,value:i,label:e.config.labels[i]},i)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(bt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},ed=e=>new Promise((t,r)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>i.result?t(i.result.toString()):r("No result from reader"),i.onerror=r}),td=e=>e.reduce((t,r)=>t+r.sizeKb,0),rd=Et("file"),wo=3,id=({file:e,class:t,...r})=>{const i=e.name.split(".").pop(),n=e.name.replace(new RegExp(`.${i}$`),"");return c("div",{class:Ze("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:n}),c("span",{children:[".",i]})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Dt(e.sizeKb)})]})},mo=({class:e,...t})=>c("li",{class:Ze("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),nd=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},ad=(e,t)=>{const r=nd(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},od=({input:e,onSubmitSuccess:t})=>{var u;const r=(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key],[i,n]=Ce(rd(r)?r.value:[]),[a,o]=Ce(),s=i.length-wo,l=td(i),d=ji(),{t:p}=ae();return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:h=>(h.preventDefault(),o(void 0),i.length===0?o({type:"required",message:p("validation_file")}):bs(i,e.config.extensions)?e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Dt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?o({type:"invalid",message:p("validation_file_max",{count:1})}):t({type:"file",value:i}):o({type:"validate",message:`${p("validation_file_ext",{ext:e.config.extensions.join(", ")})}`})),children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:d,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:[i.length>0?c(ie,{children:[c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,wo).map(h=>{const b=h.name.split(".").pop(),w=h.name.replace(new RegExp(`.${b}$`),"");return c(mo,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:w}),c("span",{children:[".",b]})]})}),s>0?c(mo,{children:["+",s," file",s!==1?"s":""]}):null]}),c("p",{class:"text-neutral-11 text-xs",children:[Dt(l)," ",i.length>1?"total":""]})]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",p("file_max_size",{size:Dt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(h=>c("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:h.replace(".","")}))})]})]}),c("input",{id:"dropzone-file",onInput:async h=>{Oe(h.target instanceof HTMLInputElement);const b=h.target.files?Array.from(h.target.files):[],w=await Promise.allSettled(b.map(async k=>{const y=await ed(k);return{name:ad(k.name,42),data:y,sizeKb:k.size/1e3}}));if(w.some(({status:k})=>k==="rejected"))return o({type:"invalid",message:"Invalid file"});const S=w.map(k=>k.status==="fulfilled"?k.value:null).filter(Boolean);n(S)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(gt,{disabled:i.length===0}),e.config.optional&&c(bt,{class:"relative",onClick:()=>t(null)})]})]}),c(At,{error:a})]})};var Yt=e=>e.type==="checkbox",vt=e=>e instanceof Date,he=e=>e==null;const yo=e=>typeof e=="object";var X=e=>!he(e)&&!Array.isArray(e)&&yo(e)&&!vt(e),sd=e=>X(e)&&e.target?Yt(e.target)?e.target.checked:e.target.value:e,ld=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cd=(e,t)=>e.has(ld(t)),ud=e=>{const t=e.constructor&&e.constructor.prototype;return X(t)&&t.hasOwnProperty("isPrototypeOf")},Ri=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function te(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ri&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(X(e)&&ud(e)))return e;const i=r?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=te(e[n]));return i}var Ir=e=>/^\w*$/.test(e),Y=e=>e===void 0,Bi=e=>Array.isArray(e)?e.filter(Boolean):[],zi=e=>Bi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),A=(e,t,r)=>{if(!t||!X(e))return r;const i=(Ir(t)?[t]:zi(t)).reduce((n,a)=>he(n)?n:n[a],e);return Y(i)||i===e?Y(e[t])?r:e[t]:i},Re=e=>typeof e=="boolean",Ie=e=>typeof e=="function",q=(e,t,r)=>{let i=-1;const n=Ir(t)?[t]:zi(t),a=n.length,o=a-1;for(;++i<a;){const s=n[i];let l=r;if(i!==o){const d=e[s];l=X(d)||Array.isArray(d)?d:isNaN(+n[i+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const _o={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ae={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Je={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},dd=ce.createContext(null);dd.displayName="HookFormControlContext";var fd=(e,t,r,i=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ae.all&&(t._proxyFormState[o]=!i||Ae.all),r&&(r[o]=!0),e[o]}});return n};const pd=typeof window<"u"?ce.useLayoutEffect:ce.useEffect;var ye=e=>typeof e=="string",hd=(e,t,r,i,n)=>ye(e)?(i&&t.watch.add(e),A(r,e,n)):Array.isArray(e)?e.map(a=>(i&&t.watch.add(a),A(r,a))):(i&&(t.watchAll=!0),r),Ui=e=>he(e)||!yo(e);function ot(e,t,r=new WeakSet){if(Ui(e)||Ui(t))return Object.is(e,t);if(vt(e)&&vt(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of i){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(vt(o)&&vt(s)||X(o)&&X(s)||Array.isArray(o)&&Array.isArray(s)?!ot(o,s,r):!Object.is(o,s))return!1}}return!0}const gd=ce.createContext(null);gd.displayName="HookFormContext";var xo=(e,t,r,i,n)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:n||!0}}:{},Jt=e=>Array.isArray(e)?e:[e],ko=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function So(e,t){const r={};for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],a=t[i];if(n&&X(n)&&a){const o=So(n,a);X(o)&&(r[i]=o)}else e[i]&&(r[i]=a)}return r}var fe=e=>X(e)&&!Object.keys(e).length,Hi=e=>e.type==="file",Ar=e=>{if(!Ri)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Co=e=>e.type==="select-multiple",qi=e=>e.type==="radio",bd=e=>qi(e)||Yt(e),Wi=e=>Ar(e)&&e.isConnected;function vd(e,t){const r=t.slice(0,-1).length;let i=0;for(;i<r;)e=Y(e)?i++:e[t[i++]];return e}function wd(e){for(const t in e)if(e.hasOwnProperty(t)&&!Y(e[t]))return!1;return!0}function Q(e,t){const r=Array.isArray(t)?t:Ir(t)?[t]:zi(t),i=r.length===1?e:vd(e,r),n=r.length-1,a=r[n];return i&&delete i[a],n!==0&&(X(i)&&fe(i)||Array.isArray(i)&&wd(i))&&Q(e,r.slice(0,-1)),e}var md=e=>{for(const t in e)if(Ie(e[t]))return!0;return!1};function Eo(e){return Array.isArray(e)||X(e)&&!md(e)}function Ki(e,t={}){for(const r in e){const i=e[r];Eo(i)?(t[r]=Array.isArray(i)?[]:{},Ki(i,t[r])):Y(i)||(t[r]=!0)}return t}function Tt(e,t,r){r||(r=Ki(t));for(const i in e){const n=e[i];if(Eo(n))Y(t)||Ui(r[i])?r[i]=Ki(n,Array.isArray(n)?[]:{}):Tt(n,he(t)?{}:t[i],r[i]);else{const a=t[i];r[i]=!ot(n,a)}}return r}const $o={value:!1,isValid:!1},Io={value:!0,isValid:!0};var Ao=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Y(e[0].attributes.value)?Y(e[0].value)||e[0].value===""?Io:{value:e[0].value,isValid:!0}:Io:$o}return $o},To=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>Y(e)?e:t?e===""?NaN:e&&+e:r&&ye(e)?new Date(e):i?i(e):e;const Fo={isValid:!1,value:null};var No=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Fo):Fo;function Do(e){const t=e.ref;return Hi(t)?t.files:qi(t)?No(e.refs).value:Co(t)?[...t.selectedOptions].map(({value:r})=>r):Yt(t)?Ao(e.refs).value:To(Y(t.value)?e.ref.value:t.value,e)}var yd=(e,t,r,i)=>{const n={};for(const a of e){const o=A(t,a);o&&q(n,a,o._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:i}},Tr=e=>e instanceof RegExp,Zt=e=>Y(e)?e:Tr(e)?e.source:X(e)?Tr(e.value)?e.value.source:e.value:e,Vo=e=>({isOnSubmit:!e||e===Ae.onSubmit,isOnBlur:e===Ae.onBlur,isOnChange:e===Ae.onChange,isOnAll:e===Ae.all,isOnTouch:e===Ae.onTouched});const Mo="AsyncFunction";var _d=e=>!!e&&!!e.validate&&!!(Ie(e.validate)&&e.validate.constructor.name===Mo||X(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Mo)),xd=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Lo=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const Xt=(e,t,r,i)=>{for(const n of r||Object.keys(e)){const a=A(e,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!i)return!0;if(o.ref&&t(o.ref,o.name)&&!i)return!0;if(Xt(s,t))break}else if(X(s)&&Xt(s,t))break}}};function Oo(e,t,r){const i=A(e,r);if(i||Ir(r))return{error:i,name:r};const n=r.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),s=A(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};n.pop()}return{name:r}}var kd=(e,t,r,i)=>{r(e);const{name:n,...a}=e;return fe(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!i||Ae.all))},Sd=(e,t,r)=>!e||!t||e===t||Jt(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i))),Cd=(e,t,r,i,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(t||e):(r?i.isOnBlur:n.isOnBlur)?!e:(r?i.isOnChange:n.isOnChange)?e:!0,Ed=(e,t)=>!Bi(A(e,t)).length&&Q(e,t),$d=(e,t,r)=>{const i=Jt(A(e,r));return q(i,"root",t[r]),q(e,r,i),e};function Po(e,t,r="validate"){if(ye(e)||Array.isArray(e)&&e.every(ye)||Re(e)&&!e)return{type:r,message:ye(e)?e:"",ref:t}}var Ft=e=>X(e)&&!Tr(e)?e:{value:e,message:""},jo=async(e,t,r,i,n,a)=>{const{ref:o,refs:s,required:l,maxLength:d,minLength:p,min:u,max:h,pattern:b,validate:w,name:S,valueAsNumber:k,mount:y}=e._f,m=A(r,S);if(!y||t.has(S))return{};const _=s?s[0]:o,$=M=>{n&&_.reportValidity&&(_.setCustomValidity(Re(M)?"":M||""),_.reportValidity())},E={},T=qi(o),G=Yt(o),O=T||G,P=(k||Hi(o))&&Y(o.value)&&Y(m)||Ar(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,z=xo.bind(null,S,i,E),Te=(M,j,re,se=Je.maxLength,Fe=Je.minLength)=>{const _e=M?j:re;E[S]={type:M?se:Fe,message:_e,ref:o,...z(M?se:Fe,_e)}};if(a?!Array.isArray(m)||!m.length:l&&(!O&&(P||he(m))||Re(m)&&!m||G&&!Ao(s).isValid||T&&!No(s).isValid)){const{value:M,message:j}=ye(l)?{value:!!l,message:l}:Ft(l);if(M&&(E[S]={type:Je.required,message:j,ref:_,...z(Je.required,j)},!i))return $(j),E}if(!P&&(!he(u)||!he(h))){let M,j;const re=Ft(h),se=Ft(u);if(!he(m)&&!isNaN(m)){const Fe=o.valueAsNumber||m&&+m;he(re.value)||(M=Fe>re.value),he(se.value)||(j=Fe<se.value)}else{const Fe=o.valueAsDate||new Date(m),_e=rr=>new Date(new Date().toDateString()+" "+rr),er=o.type=="time",tr=o.type=="week";ye(re.value)&&m&&(M=er?_e(m)>_e(re.value):tr?m>re.value:Fe>new Date(re.value)),ye(se.value)&&m&&(j=er?_e(m)<_e(se.value):tr?m<se.value:Fe<new Date(se.value))}if((M||j)&&(Te(!!M,re.message,se.message,Je.max,Je.min),!i))return $(E[S].message),E}if((d||p)&&!P&&(ye(m)||a&&Array.isArray(m))){const M=Ft(d),j=Ft(p),re=!he(M.value)&&m.length>+M.value,se=!he(j.value)&&m.length<+j.value;if((re||se)&&(Te(re,M.message,j.message),!i))return $(E[S].message),E}if(b&&!P&&ye(m)){const{value:M,message:j}=Ft(b);if(Tr(M)&&!m.match(M)&&(E[S]={type:Je.pattern,message:j,ref:o,...z(Je.pattern,j)},!i))return $(j),E}if(w){if(Ie(w)){const M=await w(m,r),j=Po(M,_);if(j&&(E[S]={...j,...z(Je.validate,j.message)},!i))return $(j.message),E}else if(X(w)){let M={};for(const j in w){if(!fe(M)&&!i)break;const re=Po(await w[j](m,r),_,j);re&&(M={...re,...z(j,re.message)},$(re.message),i&&(E[S]=M))}if(!fe(M)&&(E[S]={ref:_,...M},!i))return E}}return $(!0),E};const Id={mode:Ae.onSubmit,reValidateMode:Ae.onChange,shouldFocusError:!0};function Ad(e={}){let t={...Id,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ie(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},n=X(t.defaultValues)||X(t.values)?te(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:te(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...p};let h={...u};const b={array:ko(),state:ko()},w=t.criteriaMode===Ae.all,S=f=>g=>{clearTimeout(d),d=setTimeout(f,g)},k=async f=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||h.isValid||f)){let g;t.resolver?(g=fe((await O()).errors),y()):g=await z(i,!0),g!==r.isValid&&b.state.next({isValid:g})}},y=(f,g)=>{!t.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((f||Array.from(s.mount)).forEach(v=>{v&&(g?q(r.validatingFields,v,g):Q(r.validatingFields,v))}),b.state.next({validatingFields:r.validatingFields,isValidating:!fe(r.validatingFields)}))},m=(f,g=[],v,I,C=!0,x=!0)=>{if(I&&v&&!t.disabled){if(o.action=!0,x&&Array.isArray(A(i,f))){const D=v(A(i,f),I.argA,I.argB);C&&q(i,f,D)}if(x&&Array.isArray(A(r.errors,f))){const D=v(A(r.errors,f),I.argA,I.argB);C&&q(r.errors,f,D),Ed(r.errors,f)}if((u.touchedFields||h.touchedFields)&&x&&Array.isArray(A(r.touchedFields,f))){const D=v(A(r.touchedFields,f),I.argA,I.argB);C&&q(r.touchedFields,f,D)}(u.dirtyFields||h.dirtyFields)&&(r.dirtyFields=Tt(n,a)),b.state.next({name:f,isDirty:M(f,g),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else q(a,f,g)},_=(f,g)=>{q(r.errors,f,g),b.state.next({errors:r.errors})},$=f=>{r.errors=f,b.state.next({errors:r.errors,isValid:!1})},E=(f,g,v,I)=>{const C=A(i,f);if(C){const x=A(a,f,Y(v)?A(n,f):v);Y(x)||I&&I.defaultChecked||g?q(a,f,g?x:Do(C._f)):se(f,x),o.mount&&!o.action&&k()}},T=(f,g,v,I,C)=>{let x=!1,D=!1;const R={name:f};if(!t.disabled){if(!v||I){(u.isDirty||h.isDirty)&&(D=r.isDirty,r.isDirty=R.isDirty=M(),x=D!==R.isDirty);const B=ot(A(n,f),g);D=!!A(r.dirtyFields,f),B?Q(r.dirtyFields,f):q(r.dirtyFields,f,!0),R.dirtyFields=r.dirtyFields,x=x||(u.dirtyFields||h.dirtyFields)&&D!==!B}if(v){const B=A(r.touchedFields,f);B||(q(r.touchedFields,f,v),R.touchedFields=r.touchedFields,x=x||(u.touchedFields||h.touchedFields)&&B!==v)}x&&C&&b.state.next(R)}return x?R:{}},G=(f,g,v,I)=>{const C=A(r.errors,f),x=(u.isValid||h.isValid)&&Re(g)&&r.isValid!==g;if(t.delayError&&v?(l=S(()=>_(f,v)),l(t.delayError)):(clearTimeout(d),l=null,v?q(r.errors,f,v):Q(r.errors,f)),(v?!ot(C,v):C)||!fe(I)||x){const D={...I,...x&&Re(g)?{isValid:g}:{},errors:r.errors,name:f};r={...r,...D},b.state.next(D)}},O=async f=>(y(f,!0),await t.resolver(a,t.context,yd(f||s.mount,i,t.criteriaMode,t.shouldUseNativeValidation))),P=async f=>{const{errors:g}=await O(f);if(y(f),f)for(const v of f){const I=A(g,v);I?q(r.errors,v,I):Q(r.errors,v)}else r.errors=g;return g},z=async(f,g,v={valid:!0})=>{for(const I in f){const C=f[I];if(C){const{_f:x,...D}=C;if(x){const R=s.array.has(x.name),B=C._f&&_d(C._f);B&&u.validatingFields&&y([x.name],!0);const pe=await jo(C,s.disabled,a,w,t.shouldUseNativeValidation&&!g,R);if(B&&u.validatingFields&&y([x.name]),pe[x.name]&&(v.valid=!1,g||e.shouldUseNativeValidation))break;!g&&(A(pe,x.name)?R?$d(r.errors,pe,x.name):q(r.errors,x.name,pe[x.name]):Q(r.errors,x.name))}!fe(D)&&await z(D,g,v)}}return v.valid},Te=()=>{for(const f of s.unMount){const g=A(i,f);g&&(g._f.refs?g._f.refs.every(v=>!Wi(v)):!Wi(g._f.ref))&&Gi(f)}s.unMount=new Set},M=(f,g)=>!t.disabled&&(f&&g&&q(a,f,g),!ot(Ko(),n)),j=(f,g,v)=>hd(f,s,{...o.mount?a:Y(g)?n:ye(f)?{[f]:g}:g},v,g),re=f=>Bi(A(o.mount?a:n,f,t.shouldUnregister?A(n,f,[]):[])),se=(f,g,v={})=>{const I=A(i,f);let C=g;if(I){const x=I._f;x&&(!x.disabled&&q(a,f,To(g,x)),C=Ar(x.ref)&&he(g)?"":g,Co(x.ref)?[...x.ref.options].forEach(D=>D.selected=C.includes(D.value)):x.refs?Yt(x.ref)?x.refs.forEach(D=>{(!D.defaultChecked||!D.disabled)&&(Array.isArray(C)?D.checked=!!C.find(R=>R===D.value):D.checked=C===D.value||!!C)}):x.refs.forEach(D=>D.checked=D.value===C):Hi(x.ref)?x.ref.value="":(x.ref.value=C,x.ref.type||b.state.next({name:f,values:te(a)})))}(v.shouldDirty||v.shouldTouch)&&T(f,C,v.shouldTouch,v.shouldDirty,!0),v.shouldValidate&&rr(f)},Fe=(f,g,v)=>{for(const I in g){if(!g.hasOwnProperty(I))return;const C=g[I],x=f+"."+I,D=A(i,x);(s.array.has(f)||X(C)||D&&!D._f)&&!vt(C)?Fe(x,C,v):se(x,C,v)}},_e=(f,g,v={})=>{const I=A(i,f),C=s.array.has(f),x=te(g);q(a,f,x),C?(b.array.next({name:f,values:te(a)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&v.shouldDirty&&b.state.next({name:f,dirtyFields:Tt(n,a),isDirty:M(f,x)})):I&&!I._f&&!he(x)?Fe(f,x,v):se(f,x,v),Lo(f,s)?b.state.next({...r,name:f,values:te(a)}):b.state.next({name:o.mount?f:void 0,values:te(a)})},er=async f=>{o.mount=!0;const g=f.target;let v=g.name,I=!0;const C=A(i,v),x=B=>{I=Number.isNaN(B)||vt(B)&&isNaN(B.getTime())||ot(B,A(a,v,B))},D=Vo(t.mode),R=Vo(t.reValidateMode);if(C){let B,pe;const wt=g.type?Do(C._f):sd(f),st=f.type===_o.BLUR||f.type===_o.FOCUS_OUT,Ff=!xd(C._f)&&!t.resolver&&!A(r.errors,v)&&!C._f.deps||Cd(st,A(r.touchedFields,v),r.isSubmitted,R,D),Zi=Lo(v,s,st);q(a,v,wt),st?(!g||!g.readOnly)&&(C._f.onBlur&&C._f.onBlur(f),l&&l(0)):C._f.onChange&&C._f.onChange(f);const Xi=T(v,wt,st),Nf=!fe(Xi)||Zi;if(!st&&b.state.next({name:v,type:f.type,values:te(a)}),Ff)return(u.isValid||h.isValid)&&(t.mode==="onBlur"?st&&k():st||k()),Nf&&b.state.next({name:v,...Zi?{}:Xi});if(!st&&Zi&&b.state.next({...r}),t.resolver){const{errors:rs}=await O([v]);if(y([v]),x(wt),I){const Df=Oo(r.errors,i,v),is=Oo(rs,i,Df.name||v);B=is.error,v=is.name,pe=fe(rs)}}else y([v],!0),B=(await jo(C,s.disabled,a,w,t.shouldUseNativeValidation))[v],y([v]),x(wt),I&&(B?pe=!1:(u.isValid||h.isValid)&&(pe=await z(i,!0)));I&&(C._f.deps&&(!Array.isArray(C._f.deps)||C._f.deps.length>0)&&rr(C._f.deps),G(v,pe,B,Xi))}},tr=(f,g)=>{if(A(r.errors,g)&&f.focus)return f.focus(),1},rr=async(f,g={})=>{let v,I;const C=Jt(f);if(t.resolver){const x=await P(Y(f)?f:C);v=fe(x),I=f?!C.some(D=>A(x,D)):v}else f?(I=(await Promise.all(C.map(async x=>{const D=A(i,x);return await z(D&&D._f?{[x]:D}:D)}))).every(Boolean),!(!I&&!r.isValid)&&k()):I=v=await z(i);return b.state.next({...!ye(f)||(u.isValid||h.isValid)&&v!==r.isValid?{}:{name:f},...t.resolver||!f?{isValid:v}:{},errors:r.errors}),g.shouldFocus&&!I&&Xt(i,tr,f?C:s.mount),I},Ko=(f,g)=>{let v={...o.mount?a:n};return g&&(v=So(g.dirtyFields?r.dirtyFields:r.touchedFields,v)),Y(f)?v:ye(f)?A(v,f):f.map(I=>A(v,I))},Go=(f,g)=>({invalid:!!A((g||r).errors,f),isDirty:!!A((g||r).dirtyFields,f),error:A((g||r).errors,f),isValidating:!!A(r.validatingFields,f),isTouched:!!A((g||r).touchedFields,f)}),Sf=f=>{const g=f?Jt(f):void 0;g==null||g.forEach(v=>Q(r.errors,v)),g?g.forEach(v=>{b.state.next({name:v,errors:r.errors})}):b.state.next({errors:{}})},Yo=(f,g,v)=>{const I=(A(i,f,{_f:{}})._f||{}).ref,C=A(r.errors,f)||{},{ref:x,message:D,type:R,...B}=C;q(r.errors,f,{...B,...g,ref:I}),b.state.next({name:f,errors:r.errors,isValid:!1}),v&&v.shouldFocus&&I&&I.focus&&I.focus()},Cf=(f,g)=>Ie(f)?b.state.subscribe({next:v=>"values"in v&&f(j(void 0,g),v)}):j(f,g,!0),Jo=f=>b.state.subscribe({next:g=>{Sd(f.name,g.name,f.exact)&&kd(g,f.formState||u,Tf,f.reRenderRoot)&&f.callback({values:{...a},...r,...g,defaultValues:n})}}).unsubscribe,Ef=f=>(o.mount=!0,h={...h,...f.formState},Jo({...f,formState:{...p,...f.formState}})),Gi=(f,g={})=>{for(const v of f?Jt(f):s.mount)s.mount.delete(v),s.array.delete(v),g.keepValue||(Q(i,v),Q(a,v)),!g.keepError&&Q(r.errors,v),!g.keepDirty&&Q(r.dirtyFields,v),!g.keepTouched&&Q(r.touchedFields,v),!g.keepIsValidating&&Q(r.validatingFields,v),!t.shouldUnregister&&!g.keepDefaultValue&&Q(n,v);b.state.next({values:te(a)}),b.state.next({...r,...g.keepDirty?{isDirty:M()}:{}}),!g.keepIsValid&&k()},Zo=({disabled:f,name:g})=>{if(Re(f)&&o.mount||f||s.disabled.has(g)){const C=s.disabled.has(g)!==!!f;f?s.disabled.add(g):s.disabled.delete(g),C&&o.mount&&!o.action&&k()}},Yi=(f,g={})=>{let v=A(i,f);const I=Re(g.disabled)||Re(t.disabled);return q(i,f,{...v||{},_f:{...v&&v._f?v._f:{ref:{name:f}},name:f,mount:!0,...g}}),s.mount.add(f),v?Zo({disabled:Re(g.disabled)?g.disabled:t.disabled,name:f}):E(f,!0,g.value),{...I?{disabled:g.disabled||t.disabled}:{},...t.progressive?{required:!!g.required,min:Zt(g.min),max:Zt(g.max),minLength:Zt(g.minLength),maxLength:Zt(g.maxLength),pattern:Zt(g.pattern)}:{},name:f,onChange:er,onBlur:er,ref:C=>{if(C){Yi(f,g),v=A(i,f);const x=Y(C.value)&&C.querySelectorAll&&C.querySelectorAll("input,select,textarea")[0]||C,D=bd(x),R=v._f.refs||[];if(D?R.find(B=>B===x):x===v._f.ref)return;q(i,f,{_f:{...v._f,...D?{refs:[...R.filter(Wi),x,...Array.isArray(A(n,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),E(f,!1,void 0,x)}else v=A(i,f,{}),v._f&&(v._f.mount=!1),(t.shouldUnregister||g.shouldUnregister)&&!(cd(s.array,f)&&o.action)&&s.unMount.add(f)}}},Ji=()=>t.shouldFocusError&&Xt(i,tr,s.mount),$f=f=>{Re(f)&&(b.state.next({disabled:f}),Xt(i,(g,v)=>{const I=A(i,v);I&&(g.disabled=I._f.disabled||f,Array.isArray(I._f.refs)&&I._f.refs.forEach(C=>{C.disabled=I._f.disabled||f}))},0,!1))},Xo=(f,g)=>async v=>{let I;v&&(v.preventDefault&&v.preventDefault(),v.persist&&v.persist());let C=te(a);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:x,values:D}=await O();y(),r.errors=x,C=te(D)}else await z(i);if(s.disabled.size)for(const x of s.disabled)Q(C,x);if(Q(r.errors,"root"),fe(r.errors)){b.state.next({errors:{}});try{await f(C,v)}catch(x){I=x}}else g&&await g({...r.errors},v),Ji(),setTimeout(Ji);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:fe(r.errors)&&!I,submitCount:r.submitCount+1,errors:r.errors}),I)throw I},If=(f,g={})=>{A(i,f)&&(Y(g.defaultValue)?_e(f,te(A(n,f))):(_e(f,g.defaultValue),q(n,f,te(g.defaultValue))),g.keepTouched||Q(r.touchedFields,f),g.keepDirty||(Q(r.dirtyFields,f),r.isDirty=g.defaultValue?M(f,te(A(n,f))):M()),g.keepError||(Q(r.errors,f),u.isValid&&k()),b.state.next({...r}))},Qo=(f,g={})=>{const v=f?te(f):n,I=te(v),C=fe(f),x=C?n:I;if(g.keepDefaultValues||(n=v),!g.keepValues){if(g.keepDirtyValues){const D=new Set([...s.mount,...Object.keys(Tt(n,a))]);for(const R of Array.from(D)){const B=A(r.dirtyFields,R),pe=A(a,R),wt=A(x,R);B&&!Y(pe)?q(x,R,pe):!B&&!Y(wt)&&_e(R,wt)}}else{if(Ri&&Y(f))for(const D of s.mount){const R=A(i,D);if(R&&R._f){const B=Array.isArray(R._f.refs)?R._f.refs[0]:R._f.ref;if(Ar(B)){const pe=B.closest("form");if(pe){pe.reset();break}}}}if(g.keepFieldsRef)for(const D of s.mount)_e(D,A(x,D));else i={}}a=t.shouldUnregister?g.keepDefaultValues?te(n):{}:te(x),b.array.next({values:{...x}}),b.state.next({values:{...x}})}s={mount:g.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!g.keepIsValid||!!g.keepDirtyValues||!t.shouldUnregister&&!fe(x),o.watch=!!t.shouldUnregister,o.keepIsValid=!!g.keepIsValid,o.action=!1,g.keepErrors||(r.errors={}),b.state.next({submitCount:g.keepSubmitCount?r.submitCount:0,isDirty:C?!1:g.keepDirty?r.isDirty:!!(g.keepDefaultValues&&!ot(f,n)),isSubmitted:g.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:C?{}:g.keepDirtyValues?g.keepDefaultValues&&a?Tt(n,a):r.dirtyFields:g.keepDefaultValues&&f?Tt(n,f):g.keepDirty?r.dirtyFields:{},touchedFields:g.keepTouched?r.touchedFields:{},errors:g.keepErrors?r.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},es=(f,g)=>Qo(Ie(f)?f(a):f,{...t.resetOptions,...g}),Af=(f,g={})=>{const v=A(i,f),I=v&&v._f;if(I){const C=I.refs?I.refs[0]:I.ref;C.focus&&setTimeout(()=>{C.focus(),g.shouldSelect&&Ie(C.select)&&C.select()})}},Tf=f=>{r={...r,...f}},ts={control:{register:Yi,unregister:Gi,getFieldState:Go,handleSubmit:Xo,setError:Yo,_subscribe:Jo,_runSchema:O,_updateIsValidating:y,_focusError:Ji,_getWatch:j,_getDirty:M,_setValid:k,_setFieldArray:m,_setDisabledField:Zo,_setErrors:$,_getFieldArray:re,_reset:Qo,_resetDefaultValues:()=>Ie(t.defaultValues)&&t.defaultValues().then(f=>{es(f,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:Te,_disableForm:$f,_subjects:b,_proxyFormState:u,get _fields(){return i},get _formValues(){return a},get _state(){return o},set _state(f){o=f},get _defaultValues(){return n},get _names(){return s},set _names(f){s=f},get _formState(){return r},get _options(){return t},set _options(f){t={...t,...f}}},subscribe:Ef,trigger:rr,register:Yi,handleSubmit:Xo,watch:Cf,setValue:_e,getValues:Ko,reset:es,resetField:If,clearErrors:Sf,unregister:Gi,setError:Yo,setFocus:Af,getFieldState:Go};return{...ts,formControl:ts}}function Fr(e={}){const t=ce.useRef(void 0),r=ce.useRef(void 0),[i,n]=ce.useState({isDirty:!1,isValidating:!1,isLoading:Ie(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:Ie(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!Ie(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Ad(e);t.current={...s,formState:i}}const a=t.current.control;return a._options=e,pd(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),ce.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),ce.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),ce.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),ce.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),ce.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==i.isDirty&&a._subjects.state.next({isDirty:o})}},[a,i.isDirty]),ce.useEffect(()=>{var o;e.values&&!ot(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),ce.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=ce.useMemo(()=>fd(i,a),[a,i]),t.current}const Ro=(e,t,r)=>{if(e&&"reportValidity"in e){const i=A(r,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},Td=(e,t)=>{for(const r in t.fields){const i=t.fields[r];i&&i.ref&&"reportValidity"in i.ref?Ro(i.ref,r,e):i.refs&&i.refs.forEach(n=>Ro(n,r,e))}},Fd=(e,t)=>{t.shouldUseNativeValidation&&Td(e,t);const r={};for(const i in e){const n=A(t.fields,i),a=Object.assign(e[i]||{},{ref:n&&n.ref});if(Nd(t.names||Object.keys(e),i)){const o=Object.assign({},A(r,i));q(o,"root",a),q(r,i,o)}else q(r,i,a)}return r},Nd=(e,t)=>e.some(r=>r.startsWith(t+"."));var Nr=function(e,t,r){return r===void 0&&(r={}),function(i,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(Uu(e,i,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var d=s.issues[0],p=Lu(d);if(p&&(l[p]||(l[p]={message:d.message,type:d.type}),o)){var u=l[p].types,h=u&&u[d.type];l[p]=xo(p,o,l,d.type,h?[].concat(h,d.message):d.message)}s.issues.shift()}return{values:{},errors:Fd(l,a)}}return{values:r.raw?i:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Bo=27,zo=12,Uo=10,Dd=Et("enum"),Vd=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Nr(Ge({checked:at(co(me(),oo()),Oi(i=>Object.entries(i).filter(([n,a])=>a).map(([n,a])=>n)),Wt(r.max,t("validation_multiple_choice_max",{count:r.max})),It(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},Md=ai(({option:e,...t},r)=>c(ie,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Ho=dt("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:go}}}),Ld=({input:e,onSubmitSuccess:t})=>{var p,u;const r=e.key?(p=N.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,i=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=i&&e.config.options.length===2,{t:a}=ae(),{register:o,handleSubmit:s,formState:{errors:l}}=Fr({defaultValues:{checked:i?{}:Dd(r)?Object.fromEntries(r.value.map(h=>[h,!0])):{}},resolver:Vd(e.config,a)}),d=ji();return n?c("ul",{style:{maxHeight:6.5*Bo+5*zo+2*Uo},class:Ho({variant:"booleanLike"}),children:e.config.options.map((h,b)=>c("li",{class:bo,children:c(vo,{type:"submit",ref:w=>{w&&b===0&&(d.current=w)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}):c("form",{noValidate:!0,onSubmit:h=>s(b=>{const w=b.checked;t({type:"enum",value:w})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Bo+5*zo+2*Uo},class:Ho({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,b)=>{const w=`checked.${h.value}`,{ref:S,...k}=o(w);return c("li",{class:"relative",children:c(Md,{option:h,autoFocus:b===0,ref:y=>{y&&b===0&&(d.current=y),S(y)},id:w,...k,onClick:i?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[i?null:c(gt,{}),e.config.minSelected===0&&c(bt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(At,{error:(u=l.checked)==null?void 0:u.root})})]})},Od=Et("number"),Pd=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,i=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Nr(Ge({number:at(so(t("validation_number")),ro(r,t("validation_number_min",{min:r})),to(i,t("validation_number_max",{max:i})),Qa(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},jd=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,i=e.key?(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:n}=ae(),{register:a,handleSubmit:o,formState:{errors:s}}=Fr({defaultValues:{number:r?Number(r):Od(i)?i.value:void 0},resolver:Pd(e.config,n)}),{ref:l,...d}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=we();return ve(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...d,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(p.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:Gt({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&c(bt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(gt,{})]}),c(At,{error:s.number})]})},Rd=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(Pi).find(n=>e.startsWith(n[1])),r=t?t[1]:"",i=e.replace(r,"");return/^\d+$/.test(i)?{countryCode:r,phoneNumber:i}:{countryCode:"",phoneNumber:""}},Bd="44",zd=/^[0-9 ]+$/,Ud=Et("string"),Hd=Et("phone"),qd=e=>{const t=at(me(e("validation_country_code")),Li(zd,e("validation_country_code"))),r=at(me(e("validation_phone")),It(1,e("validation_phone")),Oi(i=>i.replace(/[^0-9]/g,"")));return Nr(Ge({countryCode:t,phoneNumber:r}))},Wd=({input:e,onSubmitSuccess:t})=>{var S;const r=e.key?(S=N.current$.value.flow)==null?void 0:S.data.submissions[e.key]:void 0,{t:i}=ae(),[n,a]=Ce(),o=Ud(r)?Rd(r.value):Hd(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:d},watch:p}=Fr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??Bd,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:qd(i)}),{ref:u,...h}=s("phoneNumber",{required:!e.config.optional}),b=we(),w=p("countryCode");return ve(()=>{b.current&&(b.current.focus(),b.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(k=>{const y=k.phoneNumber.replace(/[^0-9]/g,""),m=k.countryCode.replace(/[^0-9]/g,"");a(void 0);const _=e.config.minChars??7,$=y.length+m.length;if($<_)return a(i("validation_phone_min_chars",{count:_}));const E=e.config.maxChars;if(E!=null&&$>E)return a(i("validation_max_chars",{count:E}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:m,phoneNumber:y}}):t({type:"string",value:w+k.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[c("span",{children:["+",w]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Pi).map(([k,y])=>c("option",{value:y,children:[k," (+",y,")"]},k))})]}),c("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(b.current=k),u(k)},class:Gt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(bt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(gt,{})]}),c(At,{error:d.countryCode||d.phoneNumber||{message:n}})]})},Kd=({input:e,onSubmitSuccess:t})=>c("div",{class:"flex flex-col items-center py-3",children:c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 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:()=>{t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),Gd={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Yd=Et("string"),Jd=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return Nr(Ge({text:{date:at(me(t("validation_date")),Li(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:at(me(t("validation_email")),eo(t("validation_email")),It(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength)),text:at(me(),It(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength)),url:at(me(t("validation_url")),io(t("validation_url")),It(e.minChars??1,r.minLength),Wt(e.maxChars??1/0,r.maxLength))}[e.format]}))},Zd={text:({input:e,onSubmitSuccess:t})=>{var u;const{t:r}=ae(),i=e.key?(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:s}}=Fr({defaultValues:{text:n||(Yd(i)?i.value:"")},resolver:Jd(e.config,r)}),{ref:l,...d}=a("text",{required:!e.config.optional}),p=we();return ve(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{t({type:"string",value:h.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...d,...Gd[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(p.current=h),l(h)},placeholder:e.config.placeholder,class:Gt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(bt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(gt,{})]}),c(At,{error:s.text})]})},phone:Wd,"multiple-choice":Ld,boolean:Qu,file:od,submit:Kd,address:Yu,number:jd},Xd=({logger:e})=>{var o;const t=(o=N.current$.value.flow)==null?void 0:o.data.currentInput,[r,i]=Eu(),n=we(null);N.inputHeight$.value=i.height;const a=()=>J.onInteractionFn$.value();return $e(()=>{const s=n.current;if(s)return s.addEventListener("transitionstart",J.scrollToEnd.smooth),s.addEventListener("transitioncancel",J.scrollToEnd.smooth),s.addEventListener("transitionend",J.scrollToEnd.smooth),()=>{s.removeEventListener("transitionstart",J.scrollToEnd.smooth),s.removeEventListener("transitioncancel",J.scrollToEnd.smooth),s.removeEventListener("transitionend",J.scrollToEnd.smooth)}},[]),c("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:i.height},children:c("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",onPointerDownCapture:t?a:void 0,onKeyDownCapture:t?a:void 0,children:t?(()=>{const s=Zd[t.type];return c(s,{logger:e,onSubmitSuccess:J.onSubmitSuccessFn$.value,input:t})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Gt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(gt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Qd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ef=function(e){return e instanceof RegExp},tf=function(t){var r=/[\\^$.*+?()[\]{}|]/g,i=RegExp(r.source);return t&&i.test(t)?t.replace(r,"\\$&"):t},qo=function(e){return typeof e=="string"},rf=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function nf(e,t,r){var i=0,n=0;if(e==="")return e;if(!e||!qo(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;ef(a)||(a=new RegExp("("+tf(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}n=o[s].length,i+=o[s-1].length,o[s]=r(o[s],s,i),i+=n}return o}var af=function(t,r,i){return Array.isArray(t)||(t=[t]),rf(t.map(function(n){return qo(n)?nf(n,r,i):n}))};const Qt=Qd(af),of=/(\[[^\]]+\]\([^)]+\))/g,sf=/\[([^\]]+)\]\(([^)]+)\)/,lf=/(https?:\/\/[^\s]+)/g,cf=/_(.*?)_/g,uf=/\*\*(.*?)\*\*/g,df=/\\n|\n/g,Wo="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",ff=e=>{const t=Qt(e,of,(o,s)=>{const[,l,d]=o.match(sf)??[];return d?c("a",{class:Wo,href:d,children:l??d},d+s):c("span",{children:"INVALID LINK"})}),r=Qt(t,lf,(o,s)=>c("a",{class:Wo,href:o,children:o},o+s)),i=Qt(r,cf,(o,s)=>c("em",{children:o},o+s)),n=Qt(i,uf,(o,s)=>c("strong",{children:o},o+s));return Qt(n,df,(o,s)=>c("br",{},`br-${s}`))},pf=dt("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"}}),hf=({children:e,className:t,animate:r,side:i,...n})=>c("p",{style:{transformOrigin:i==="left"?"0% 50%":"100% 50%"},class:pf({className:t,side:i,animate:r}),...n,children:e}),gf=({message:e})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),bf=({className:e,...t})=>($e(()=>{J.scrollToEnd.smooth()}),c("div",{"aria-hidden":!0,children:J.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Ze("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,i)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-i*200}ms`}}))}):void 0})),vf={bot:"left",user:"right"},wf=dt("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]"}}}),mf=({lastSentMessageFooter:e})=>{var r;const t=((r=N.current$.value.flow)==null?void 0:r.data.messages)??[];return $e(()=>{J.scrollToEnd.smooth()},[t.length]),c("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((i,n)=>c(ie,{children:c("li",{class:"flex",children:vr(i).with({type:"system"},a=>c("p",{class:wf({variant:a.variant}),children:a.text})).with({type:"text",author:Bt.union("bot","user")},a=>{const o=a.author==="user"&&!t.slice(n+1).some(d=>d.type==="text"&&d.author==="user"),s=n===t.length-1,l=a.author==="bot"?ff(a.text):a.text;return c(ie,{children:[o?e:null,c(hf,{animate:s,side:vf[a.author],children:l},n)]})}).with({type:"link"},a=>c(gf,{message:a})).with({type:"image"},a=>c("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=>c(id,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const o=t[t.length-1];return!(a===o)||J.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(ja,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},n)),c(bf,{},"typing")]})},yf=({logger:e,apiClient:t,analytics:r,talentBankClient:i})=>{const{flow:n}=N.current$.value;Oe(n,"Flow is required to exist to show chatbot body");const a=N.viewState$.value,{chatRef:o,chatService:s}=Rc(),{t:l}=ae(),[d,p]=Ce();return ve(()=>{a==="maximised"&&J.scrollToEnd.instant()},[a]),ve(()=>{var m;const{state:u,flow:h}=N.current$.peek();if(u!=="loaded")throw new Error(l("invalid_state"));let b=h.data.nodeHistory.at(-1);if(J.scrollToEnd.instant(),N.setInput(void 0),h.data.isFinished)return;const w=()=>{const _=N.current$.peek().flow;!_||_.data.hasInteracted||(N.markAsInteracted(),Ka(r,_,"FLOW_INTERACT"))};J.onInteractionFn$.value=w,b===void 0?(b=La(n.nodes).id,N.setCurrentNodeId(b),Ka(r,h,"FLOW_START")):N.removeMessagesSentByNodeIds([b]);const{interpret:S,abort:k,undo:y}=ou({context:n.context,analytics:{service:r,customProperties:(m=n.analytics)==null?void 0:m.customProperties},apiClient:t,logger:e,talentBankClient:i,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var _;return(_=N.current$.peek().flow)==null?void 0:_.data.applicationRecovery},setApplicationRecovery:N.setApplicationRecovery,getSubmissions:()=>{var _;return(_=N.current$.peek().flow)==null?void 0:_.data.submissions},onInterpret:_=>N.setCurrentNodeId(_.id),onFlowEnd:async()=>{var $;N.markAsFinished();const _=N.current$.peek().flow;Oe(_),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:_.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:($=n.analytics)==null?void 0:$.customProperties})}});return p(()=>y),S(b),()=>{J.onInteractionFn$.value===w&&(J.onInteractionFn$.value=()=>{}),k()}},[r,t,s,e,n,i,l]),c(ie,{children:[c("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:N.inputHeight$.value},children:c(mf,{lastSentMessageFooter:n.data.isFinished||!d?null:c(xf,{undoFn:d})})}),c(Xd,{logger:e})]})},_f=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],xf=({undoFn:e})=>{const{t}=ae();return c(Cr,{onClick:async()=>{const{flow:r}=N.current$.peek();Oe(r);const{removed:i}=e(r.data.nodeHistory),n=r.data.nodeHistory.splice(-i);n.length!==0&&(N.removeMessagesSentByNodeIds(n),N.setInput(void 0),n.pop(),n.map(a=>r.nodes.find(o=>o.id===a)).filter(Boolean).flatMap(_f).forEach(a=>delete r.data.submissions[a]),N.current$.value={...N.current$.value})},children:[c("title",{children:t("undo")}),c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})]})},kf=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:yf},Symbol.toStringTag,{value:"Module"}))})();
|