@inploi/plugin-chatbot 14.10.1 → 14.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +5 -5
- package/dist/chatbot-body-64d33887.cjs +5 -0
- package/dist/{chatbot-body-d3fd468f.js → chatbot-body-a22432d8.js} +1674 -1415
- package/dist/chatbot.idb.d.ts +27 -0
- package/dist/{index-4aad840b.cjs → index-f5c3c7c4.cjs} +3 -3
- package/dist/{index-b8dab3ec.js → index-fd318f9f.js} +113 -102
- package/dist/md.test.d.ts +1 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +2 -2
- package/dist/chatbot-body-b3e7212a.cjs +0 -5
package/cdn/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(){"use strict";var He;function Nn(e){return{lang:(e==null?void 0:e.lang)??(He==null?void 0:He.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(He==null?void 0:He.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(He==null?void 0:He.abortPipeEarly)}}var ir;function js(e){return ir==null?void 0:ir.get(e)}var rr;function Rs(e){return rr==null?void 0:rr.get(e)}var nr;function Bs(e,t){var i;return(i=nr==null?void 0:nr.get(e))==null?void 0:i.get(t)}function Mn(e){var i,r;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Te(e,t,i,r,n){let a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Mn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Bs(e.reference,l.lang)??(d?Rs(l.lang):null)??r.message??js(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function me(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Nn())}}}function zs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Us(e,t){let i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function Vn(e){return{kind:"transformation",type:"transform",reference:Vn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function qs(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function ar(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function Pn(){return{kind:"schema",type:"any",reference:Pn,expects:"any",async:!1,get"~standard"(){return me(this)},"~run"(e){return e.typed=!0,e}}}function On(e,t){return{kind:"schema",type:"array",reference:On,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return me(this)},"~run"(i,r){var a;let n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){let 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=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Te(this,"type",i,r);return i}}}function or(e){return{kind:"schema",type:"boolean",reference:or,expects:"boolean",async:!1,message:e,get"~standard"(){return me(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Te(this,"type",t,i),t}}}function $t(e,t){return{kind:"schema",type:"literal",reference:$t,expects:Mn(e),async:!1,literal:e,message:t,get"~standard"(){return me(this)},"~run"(i,r){return i.value===this.literal?i.typed=!0:Te(this,"type",i,r),i}}}function Ln(e){return{kind:"schema",type:"null",reference:Ln,expects:"null",async:!1,message:e,get"~standard"(){return me(this)},"~run"(t,i){return t.value===null?t.typed=!0:Te(this,"type",t,i),t}}}function _i(e,t){return{kind:"schema",type:"nullable",reference:_i,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return me(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=ar(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function xi(e){return{kind:"schema",type:"number",reference:xi,expects:"number",async:!1,message:e,get"~standard"(){return me(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Te(this,"type",t,i),t}}}function ue(e,t){return{kind:"schema",type:"object",reference:ue,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return me(this)},"~run"(i,r){var a;let n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(let o in this.entries){let s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in n?n[o]:ar(s),d=s["~run"]({value:l},r);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=i.issues)==null||a.push(u);if(i.issues||(i.issues=d.issues),r.abortEarly){i.typed=!1;break}}d.typed||(i.typed=!1),i.value[o]=d.value}else if(s.fallback!==void 0)i.value[o]=qs(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Te(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Te(this,"type",i,r);return i}}}function ye(e,t){return{kind:"schema",type:"optional",reference:ye,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return me(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=ar(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function jn(e,t,i){return{kind:"schema",type:"record",reference:jn,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return me(this)},"~run"(r,n){var o,s;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let l in a)if(zs(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 g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}let u=this.value["~run"]({value:d},n);if(u.issues){let h={type:"object",origin:"value",input:a,key:l,value:d};for(let g of u.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=u.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!u.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=u.value)}}else Te(this,"type",r,n);return r}}}function Ee(e){return{kind:"schema",type:"string",reference:Ee,expects:"string",async:!1,message:e,get"~standard"(){return me(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Te(this,"type",t,i),t}}}function Rn(e){let t;if(e)for(let i of e)t?t.push(...i.issues):t=i.issues;return t}function sr(e,t){return{kind:"schema",type:"union",reference:sr,expects:Us(e.map(i=>i.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return me(this)},"~run"(i,r){let n,a,o;for(let s of this.options){let l=s["~run"]({value:i.value},r);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(a){if(a.length===1)return a[0];Te(this,"type",i,r,{issues:Rn(a)}),i.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Te(this,"type",i,r,{issues:Rn(o)})}return i}}}function Kt(){return{kind:"schema",type:"unknown",reference:Kt,expects:"unknown",async:!1,get"~standard"(){return me(this)},"~run"(e){return e.typed=!0,e}}}function Ws(...e){return{...e[0],pipe:e,get"~standard"(){return me(this)},"~run"(t,i){for(let r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function lr(e,t,i){let r=e["~run"]({value:t},Nn(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var Hs=e=>({ok:!0,err:!1,val:e}),Ks=e=>({err:!0,ok:!1,val:e}),cr=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function dr(e,t,i){var o,s;let r=e.find(l=>l.type==="pre-apply-result");if(!r)return;let n=(o=t[r.data.participationKey])==null?void 0:o.value,a={};if(n===!0)for(let l of cr(e)){let d=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(d)&&d.length===1&&(d=d[0]),(typeof d=="boolean"||typeof d=="string")&&(a[l.data.key]=d)}return{node_id:r.id,flow_session_id:i,participation:n,answers:a}}function Gs(e,t){let i=dr(e,t,""),r=cr(e).map(a=>{let o=a.data.preApply,s=i==null?void 0:i.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(d=>d.value===s);return{key:a.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),n=(i==null?void 0:i.participation)===!1?"skipped":(i==null?void 0:i.participation)===!0&&r.length>0&&r.every(a=>a.valid)?"completed":"unavailable";return{status:n,hasHardConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="advisory"):null,answers:n==="completed"?r:[]}}function Ys(e,t){let i=new Set(cr(e).map(r=>r.data.key));for(let r of e)r.type==="pre-apply-result"&&(i.add(r.data.key),i.add(r.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([r])=>!i.has(r)))}var it=class extends Error{constructor(){super("Aborted")}},Gt=(e,t)=>{if(t.length===0)return;let i=e;for(let r of t){if(i==null||typeof i!="object")return;i=i[r]}return i},Js=(e,t="all")=>{let i={},r=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(r&&!r.has(n)||(i[n]=a.value))}return i},Bn=(e,t)=>{let i=new Set(e.flatMap(r=>r.type==="add-submission"?[r.data.key]:[]));return Object.entries(t).some(([r,n])=>n!==void 0&&n.type!=="integration"&&!i.has(r))},Zs=({key:e,submissions:t})=>{var r;let i=(r=t[e])==null?void 0:r.value;if(typeof i!="string"&&typeof i!="number")throw new Error(`Submission at “${e}” is not a string or number`);return i},zn=({key:e,path:t,submissions:i,context:r})=>{if(e==="$context"){if(!t)return;let n=Gt(r,t);switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${t.join(".")}`,n);return}}return i[e]},Xs=e=>{let t=e.split(".").pop();return t?Hs(t?"."+t:""):Ks("No file extension found")},Un=(e,t)=>{if(t.length===0)return!0;let i=t.map(r=>r.toLowerCase());return e.every(r=>{let n=Xs(r.name);return n.ok&&i.includes(n.val.toLowerCase())})},Et=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,ki=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,Qs=ue({integration_response:ue({data:ue({redirect_url:Ee(),message:ye(_i(Ee())),button_text:ye(_i(Ee()))})})}),ur=e=>lr(Qs,e).success,el=ue({integration_response:ue({status:ye(Kt()),error:ue({message:Ee(),data:ye(Kt())})})}),qn=e=>lr(el,e).success,tl=ue({success:$t(!0),integration_response:ue({data:ue({outcome:$t("pending"),message:ye(Kt())}),error:ye(Ln())})}),fr=e=>{let t=lr(tl,e);if(!t.success||ur(e))return;let{message:i}=t.output.integration_response.data;return typeof i=="string"&&i.trim()?{message:i}:{}};ue({success:$t(!1),message:ye(Kt())});var Wn=(e,t)=>{if(!qn(e))return;let i=e.integration_response,r=i.error.data,n=typeof r=="object"&&r!==null?r:{},a=w=>typeof n[w]=="string"?n[w]:void 0,o=w=>typeof n[w]=="boolean"?n[w]:void 0,s=w=>{let _=n[w];return Number.isSafeInteger(_)&&_>=0?_:void 0},l=w=>{let _=a(w),k=_===void 0?NaN:Date.parse(_);return Number.isFinite(k)?k:void 0},d=typeof i.status=="number"?i.status:t,p=a("phase"),u=a("verdict"),h=a("code"),g=d===409&&p==="submit"&&u==="confirmed"?"duplicate":d===410&&h==="job_closed"?"closed":p==="submit"&&u==="unknown"?"unknown":void 0;return{message:i.error.message,status:d,phase:p,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:u,code:h,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:g}},Hn=3e4,il=2e4,rl=6e4,pr=12e4,Kn=6*60*6e4,nl=60*6e4,Gn=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,i=t===void 0?0:t-Date.now();return i>0&&i<=Kn?t:void 0},al=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Gn(e);return t===void 0?{}:{until:t}},Yn=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),ol=(e,t)=>{let i=Gn(t);if(i!==void 0)return{waitMs:i-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:Hn};let r=(e??0)+1,n=Math.min(r*il,rl),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(n,a),pr),throttles:r}},Jn=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",sl=e=>{if(!qn(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},ll=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",cl=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",dl=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,ul=e=>{if(typeof e!="object"||e===null)return null;let t=e.integration_response;if(typeof t!="object"||t===null)return null;let i=t;if(typeof i.status!="number"||i.service!==void 0&&typeof i.service!="string")return null;let r="data"in i,n=i.error,a=typeof n=="object"&&n!==null&&typeof n.message=="string"&&"data"in n;if(!r&&!a)return null;let o=r?i.data:n.data??null;return{service:i.service??"INVALID_SERVICE",response:{status:i.status,payload:o},...fr(e)&&{outcome:"pending"}}},fl=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},pl=(e,t)=>{if(!fl(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},hl=({context:e,schema:t,logger:i})=>{if(t)for(let r in t){let n=t[r];if(!n)continue;let a=Gt(e,r.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${r} is required`;throw i.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${r} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${r} is not a string`);break;default:n.type}}};let Ke;function Zn(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)}}let hr;function gl(e){return hr==null?void 0:hr.get(e)}let gr;function bl(e){return gr==null?void 0:gr.get(e)}let br;function vl(e,t){var i;return(i=br==null?void 0:br.get(e))==null?void 0:i.get(t)}function Xn(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Re(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Xn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??vl(e.reference,l.lang)??(d?bl(l.lang):null)??r.message??gl(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Ie(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Zn())}}}function wl(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ml(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function vr(e,t){return{kind:"validation",type:"max_length",reference:vr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&Re(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Si(e,t){return{kind:"validation",type:"min_length",reference:Si,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&Re(this,"length",i,r,{received:`${i.value.length}`}),i}}}function wr(){return{kind:"transformation",type:"trim",reference:wr,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function yl(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function Ci(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function Qn(e,t){return{kind:"schema",type:"array",reference:Qn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ie(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const 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=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Re(this,"type",i,r);return i}}}function mr(e){return{kind:"schema",type:"boolean",reference:mr,expects:"boolean",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Re(this,"type",t,i),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 Ie(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=Ci(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Yt(e,t){return{kind:"schema",type:"nullish",reference:Yt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ie(this)},"~run"(i,r){return(i.value===null||i.value===void 0)&&(this.default!==void 0&&(i.value=Ci(this,i,r)),i.value===null||i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function gt(e){return{kind:"schema",type:"number",reference:gt,expects:"number",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Re(this,"type",t,i),t}}}function Ae(e,t){return{kind:"schema",type:"object",reference:Ae,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ie(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:Ci(s),d=s["~run"]({value:l},r);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=i.issues)==null||a.push(u);if(i.issues||(i.issues=d.issues),r.abortEarly){i.typed=!1;break}}d.typed||(i.typed=!1),i.value[o]=d.value}else if(s.fallback!==void 0)i.value[o]=yl(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Re(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Re(this,"type",i,r);return i}}}function ea(e,t){return{kind:"schema",type:"optional",reference:ea,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ie(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=Ci(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function It(e,t){return{kind:"schema",type:"picklist",reference:It,expects:ml(e.map(Xn),"|"),async:!1,options:e,message:t,get"~standard"(){return Ie(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:Re(this,"type",i,r),i}}}function yr(e,t,i){return{kind:"schema",type:"record",reference:yr,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Ie(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(wl(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 g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}const u=this.value["~run"]({value:d},n);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:d};for(const g of u.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=u.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!u.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=u.value)}}else Re(this,"type",r,n);return r}}}function R(e){return{kind:"schema",type:"string",reference:R,expects:"string",async:!1,message:e,get"~standard"(){return Ie(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Re(this,"type",t,i),t}}}function ta(){return{kind:"schema",type:"unknown",reference:ta,expects:"unknown",async:!1,get"~standard"(){return Ie(this)},"~run"(e){return e.typed=!0,e}}}function _r(...e){return{...e[0],pipe:e,get"~standard"(){return Ie(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function xr(e,t,i){const r=e["~run"]({value:t},Zn(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var _l=e=>e,Jt=class extends Error{constructor(t,i){super(t),this.status=i,this.name="ErrorWithStatus"}},xl=class extends Jt{constructor(t){super(t??"Not found"),this.name="NotFoundError",this.status=404}},kl=class extends Jt{constructor(t,i){super(t??"You are not authorised to perform this action."),this.name="UnauthorisedError",this.status=i??401}},Sl=class extends Jt{constructor(t,i){let r=i?` in ${i}`:"";super(`Schema validation failed${r}`),this.issues=t,this.source=i,this.name="SchemaValidationError",this.status=400}},kr=class extends Jt{constructor(t,i,r){super(t),this.data=r,this.name="ApiError",this.status=i??500}},Cl=e=>e instanceof kr&&e.data!==void 0,$l=class extends Jt{constructor(t){super("Error parsing response into JSON."),this.response=t,this.name="ParsingError",this.status=t&&t.status>=300?t.status:500,this.contentType=new Headers(t==null?void 0:t.headers).get("content-type")??void 0}},El={NotFound:xl,Unauthorised:kl,SchemaValidation:Sl,Api:kr,JsonParsing:$l};function Il(e){return Object.values(El).some(t=>e instanceof t)}var Al={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Fl(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function Vp(e){return e}var Tl=["agent","sdk","form","integration","migration"],Dl=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],Nl=["screening","cv_match","interview","overall"],Ml=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],Vl=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],ia=It(Tl),Pl=It(Dl),Ol=_r(R(),wr(),Si(1),vr(100)),Ll=It(Nl),jl=It(Ml),Rl=_r(R(),wr(),Si(1),vr(100)),Bl=It(Vl),ra=Ae({id:R(),email:J(R()),firstName:J(R()),lastName:J(R()),phone:J(R()),source:J(ia),identifiedAt:J(R()),createdAt:R(),updatedAt:R()}),na=_r(R(),Si(1)),Sr=yr(R(),ta()),zl=Ae({id:R(),applicationId:R(),status:jl,scheduledAt:J(R()),completedAt:J(R()),meta:J(Sr),createdAt:R(),updatedAt:R()}),Ul=Ae({score:gt(),reason:R(),confidence:gt()}),aa=Ae({id:R(),candidateId:R(),jobId:gt(),stage:Ol,stageGroup:Pl,stageEnteredAt:R(),rating:J(gt()),disqualifiedAt:J(R()),disqualificationReason:J(Rl),disqualificationNote:J(R()),source:Bl,sourceDetail:J(R()),sessionId:J(gt()),externalApplicationId:J(R()),meta:J(Sr),context:J(Sr),scoredAt:J(R()),createdAt:R(),updatedAt:R()}),ql=Ae({id:R(),applicationId:R(),scoreType:Ll,score:J(gt()),reason:J(R()),categories:J(yr(R(),Ul)),scoredBy:J(R()),createdAt:R()});({...aa.entries},{...ra.entries});var Wl=Ae({anonymousId:na,email:na,firstName:Yt(R()),lastName:Yt(R()),phone:Yt(R()),source:Yt(ia)}),Hl=Ae({candidateId:R(),isNew:mr()}),Kl=Ae({id:R(),stageGroup:R(),createdAt:R()}),Gl=Ae({isDuplicate:mr(),existingApplication:ea(Kl)}),Yl=({environment:e,publishableKey:t,logger:i})=>{let r=Al[e];return{async checkDuplicate(n){try{let a=new URLSearchParams({email:n.email,scope:n.scope});n.scope==="job"&&n.jobId!=null&&a.set("job_id",String(n.jobId));let o=await fetch(`${r}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return i.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=xr(Gl,s);return l.success?l.output:(i.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return i.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return i.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:n.email,firstName:n.firstName,lastName:n.lastName,phone:n.phone,anonymousId:n.anonymousId,source:n.source??"sdk"},o=xr(Wl,a);if(!o.success)return i.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${r}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return i.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=xr(Hl,await s.json());return l.success?l.output:(i.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return i.error("[TalentBankClient] identify failed:",a),null}}}},oa=Ws(sr([Ee(),xi()]),Vn(String)),sa=ue({id:oa,version:xi(),build:xi(),nodes:On(Pn()),context_schema:ye(_i(jn(Ee(),ue({required:or(),type:sr([$t("string"),$t("number")])}))))}),Jl=ue({flow:sa}),Zl=ue({company:ue({name:Ee()}),flow:sa,job:ue({id:oa,title:Ee()}),user:ye(ue({city:ye(Ee()),country:ye(Ee()),isEU:ye(or()),continent:ye(Ee())}))}),Xl=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),Ql={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Fl(),response:Zl}},ec={pathname:"/flow/id/:id",method:"GET",schema:{response:Jl}},Zt,F,la,ca,bt,da,ua,Cr,fa,At={},pa=[],tc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$i=Array.isArray;function Ge(e,t){for(var i in t)e[i]=t[i];return e}function ha(e){var t=e.parentNode;t&&t.removeChild(e)}function Ce(e,t,i){var r,n,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Zt.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Xt(e,o,r,n,null)}function Xt(e,t,i,r,n){var a={type:e,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++la};return n==null&&F.vnode!=null&&F.vnode(a),a}function ic(){return{current:null}}function ne(e){return e.children}function De(e,t){this.props=e,this.context=t}function Ei(e,t){if(t==null)return e.__?Ei(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?Ei(e):null}function ga(e){var t,i;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null){e.__e=e.__c.base=i.__e;break}return ga(e)}}function $r(e){(!e.__d&&(e.__d=!0)&&bt.push(e)&&!Ii.__r++||da!==F.debounceRendering)&&((da=F.debounceRendering)||ua)(Ii)}function Ii(){var e,t,i,r,n,a,o,s,l;for(bt.sort(Cr);e=bt.shift();)e.__d&&(t=bt.length,r=void 0,n=void 0,a=void 0,s=(o=(i=e).__v).__e,(l=i.__P)&&(r=[],n=[],(a=Ge({},o)).__v=o.__v+1,Er(l,o,a,i.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s??Ei(o),o.__h,n),xa(r,o,n),o.__e!=s&&ga(o)),bt.length>t&&bt.sort(Cr));Ii.__r=0}function ba(e,t,i,r,n,a,o,s,l,d,p){var u,h,g,w,_,k,y,v,x,E,$=0,T=r&&r.__k||pa,V=T.length,L=V,P=t.length;for(i.__k=[],u=0;u<P;u++)(w=i.__k[u]=(w=t[u])==null||typeof w=="boolean"||typeof w=="function"?null:typeof w=="string"||typeof w=="number"||typeof w=="bigint"?Xt(null,w,null,null,w):$i(w)?Xt(ne,{children:w},null,null,null):w.__b>0?Xt(w.type,w.props,w.key,w.ref?w.ref:null,w.__v):w)!=null&&(w.__=i,w.__b=i.__b+1,(v=rc(w,T,y=u+$,L))===-1?g=At:(g=T[v]||At,T[v]=void 0,L--),Er(e,w,g,n,a,o,s,l,d,p),_=w.__e,(h=w.ref)&&g.ref!=h&&(g.ref&&Ir(g.ref,null,w),p.push(h,w.__c||_,w)),_!=null&&(k==null&&(k=_),E=!(x=g===At||g.__v===null)&&v===y,x?v==-1&&$--:v!==y&&(v===y+1?($++,E=!0):v>y?L>P-y?($+=v-y,E=!0):$--:$=v<y&&v==y-1?v-y:0),y=u+$,E=E||v==u&&!x,typeof w.type!="function"||v===y&&g.__k!==w.__k?typeof w.type=="function"||E?w.__d!==void 0?(l=w.__d,w.__d=void 0):l=_.nextSibling:l=wa(e,_,l):l=va(w,l,e),typeof i.type=="function"&&(i.__d=l)));for(i.__e=k,u=V;u--;)T[u]!=null&&(typeof i.type=="function"&&T[u].__e!=null&&T[u].__e==i.__d&&(i.__d=T[u].__e.nextSibling),ka(T[u],T[u]))}function va(e,t,i){for(var r,n=e.__k,a=0;n&&a<n.length;a++)(r=n[a])&&(r.__=e,t=typeof r.type=="function"?va(r,t,i):wa(i,r.__e,t));return t}function Ye(e,t){return t=t||[],e==null||typeof e=="boolean"||($i(e)?e.some(function(i){Ye(i,t)}):t.push(e)),t}function wa(e,t,i){return i==null||i.parentNode!==e?e.insertBefore(t,null):t==i&&t.parentNode!=null||e.insertBefore(t,i),t.nextSibling}function rc(e,t,i,r){var n=e.key,a=e.type,o=i-1,s=i+1,l=t[i];if(l===null||l&&n==l.key&&a===l.type)return i;if(r>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&n==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&n==l.key&&a===l.type)return s;s++}}return-1}function nc(e,t,i,r,n){var a;for(a in i)a==="children"||a==="key"||a in t||Ai(e,a,null,i[a],r);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||i[a]===t[a]||Ai(e,a,t[a],i[a],r)}function ma(e,t,i){t[0]==="-"?e.setProperty(t,i??""):e[t]=i==null?"":typeof i!="number"||tc.test(t)?i:i+"px"}function Ai(e,t,i,r,n){var a;e:if(t==="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)i&&t in i||ma(e.style,t,"");if(i)for(t in i)r&&i[t]===r[t]||ma(e.style,t,i[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=i,i?r||e.addEventListener(t,a?_a:ya,a):e.removeEventListener(t,a?_a:ya,a);else if(t!=="dangerouslySetInnerHTML"){if(n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,i))}}function ya(e){return this.l[e.type+!1](F.event?F.event(e):e)}function _a(e){return this.l[e.type+!0](F.event?F.event(e):e)}function Er(e,t,i,r,n,a,o,s,l,d){var p,u,h,g,w,_,k,y,v,x,E,$,T,V,L,P=t.type;if(t.constructor!==void 0)return null;i.__h!=null&&(l=i.__h,s=t.__e=i.__e,t.__h=null,a=[s]),(p=F.__b)&&p(t);try{e:if(typeof P=="function"){if(y=t.props,v=(p=P.contextType)&&r[p.__c],x=p?v?v.props.value:p.__:r,i.__c?k=(u=t.__c=i.__c).__=u.__E:("prototype"in P&&P.prototype.render?t.__c=u=new P(y,x):(t.__c=u=new De(y,x),u.constructor=P,u.render=oc),v&&v.sub(u),u.props=y,u.state||(u.state={}),u.context=x,u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),P.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Ge({},u.__s)),Ge(u.__s,P.getDerivedStateFromProps(y,u.__s))),g=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!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,x),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,x)===!1||t.__v===i.__v)){for(t.__v!==i.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.forEach(function(z){z&&(z.__=t)}),E=0;E<u._sb.length;E++)u.__h.push(u._sb[E]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,x),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,w,_)})}if(u.context=x,u.props=y,u.__P=e,u.__e=!1,$=F.__r,T=0,"prototype"in P&&P.prototype.render){for(u.state=u.__s,u.__d=!1,$&&$(t),p=u.render(u.props,u.state,u.context),V=0;V<u._sb.length;V++)u.__h.push(u._sb[V]);u._sb=[]}else do u.__d=!1,$&&$(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&&(r=Ge(Ge({},r),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(g,w)),ba(e,$i(L=p!=null&&p.type===ne&&p.key==null?p.props.children:p)?L:[L],t,i,r,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===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=ac(i.__e,t,i,r,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,i)}}function xa(e,t,i){for(var r=0;r<i.length;r++)Ir(i[r],i[++r],i[++r]);F.__c&&F.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){F.__e(a,n.__v)}})}function ac(e,t,i,r,n,a,o,s,l){var d,p,u,h=i.props,g=t.props,w=t.type,_=0;if(w==="svg"&&(n=!0),a!=null){for(;_<a.length;_++)if((d=a[_])&&"setAttribute"in d==!!w&&(w?d.localName===w:d.nodeType===3)){e=d,a[_]=null;break}}if(e==null){if(w===null)return document.createTextNode(g);e=n?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,g.is&&g),a=null,s=!1}if(w===null)h===g||s&&e.data===g||(e.data=g);else{if(a=a&&Zt.call(e.childNodes),p=(h=i.props||At).dangerouslySetInnerHTML,u=g.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},_=0;_<e.attributes.length;_++)h[e.attributes[_].name]=e.attributes[_].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(nc(e,g,h,n,s),u)t.__k=[];else if(ba(e,$i(_=t.props.children)?_:[_],t,i,r,n&&w!=="foreignObject",a,o,a?a[0]:i.__k&&Ei(i,0),s,l),a!=null)for(_=a.length;_--;)a[_]!=null&&ha(a[_]);s||("value"in g&&(_=g.value)!==void 0&&(_!==e.value||w==="progress"&&!_||w==="option"&&_!==h.value)&&Ai(e,"value",_,h.value,!1),"checked"in g&&(_=g.checked)!==void 0&&_!==e.checked&&Ai(e,"checked",_,h.checked,!1))}return e}function Ir(e,t,i){try{typeof e=="function"?e(t):e.current=t}catch(r){F.__e(r,i)}}function ka(e,t,i){var r,n;if(F.unmount&&F.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ir(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){F.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&ka(r[n],t,i||typeof e.type!="function");i||e.__e==null||ha(e.__e),e.__=e.__e=e.__d=void 0}function oc(e,t,i){return this.constructor(e,i)}function vt(e,t,i){var r,n,a,o;F.__&&F.__(e,t),n=(r=typeof i=="function")?null:i&&i.__k||t.__k,a=[],o=[],Er(t,e=(!r&&i||t).__k=Ce(ne,null,[e]),n||At,At,t.ownerSVGElement!==void 0,!r&&i?[i]:n?null:t.firstChild?Zt.call(t.childNodes):null,a,!r&&i?i:n?n.__e:t.firstChild,r,o),xa(a,e,o)}function Sa(e,t){vt(e,t,Sa)}function sc(e,t,i){var r,n,a,o,s=Ge({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?n=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Zt.call(arguments,2):i),Xt(e.type,s,r||e.key,n||e.ref,null)}function Ca(e,t){var i={__c:t="__cC"+fa++,__:e,Consumer:function(r,n){return r.children(n)},Provider:function(r){var n,a;return this.getChildContext||(n=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,$r(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),r.children}};return i.Provider.__=i.Consumer.contextType=i}Zt=pa.slice,F={__e:function(e,t,i,r){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,r||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},la=0,ca=function(e){return e!=null&&e.constructor===void 0},De.prototype.setState=function(e,t){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ge({},this.state),typeof e=="function"&&(e=e(Ge({},i),this.props)),e&&Ge(i,e),e!=null&&this.__v&&(t&&this._sb.push(t),$r(this))},De.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$r(this))},De.prototype.render=ne,bt=[],ua=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Cr=function(e,t){return e.__v.__b-t.__v.__b},Ii.__r=0,fa=0;function $a(e){var t,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(i=$a(e[t]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function Je(){for(var e,t,i=0,r="",n=arguments.length;i<n;i++)(e=arguments[i])&&(t=$a(e))&&(r&&(r+=" "),r+=t);return r}const Ea=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ia=Je,wt=(e,t)=>i=>{var r;if((t==null?void 0:t.variants)==null)return Ia(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(d=>{const p=i==null?void 0:i[d],u=a==null?void 0:a[d];if(p===null)return null;const h=Ea(p)||Ea(u);return n[d][h]}),s=i&&Object.entries(i).reduce((d,p)=>{let[u,h]=p;return h===void 0||(d[u]=h),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,p)=>{let{class:u,className:h,...g}=p;return Object.entries(g).every(w=>{let[_,k]=w;return Array.isArray(k)?k.includes({...a,...s}[_]):{...a,...s}[_]===k})?[...d,u,h]:d},[]);return Ia(e,o,l,i==null?void 0:i.class,i==null?void 0:i.className)};var rt,Q,Ar,Aa,Ft=0,Fa=[],Fi=[],Ta=F.__b,Da=F.__r,Na=F.diffed,Ma=F.__c,Va=F.unmount;function Tt(e,t){F.__h&&F.__h(Q,e,Ft||t),Ft=0;var i=Q.__H||(Q.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:Fi}),i.__[e]}function Ne(e){return Ft=1,Pa(ja,e)}function Pa(e,t,i){var r=Tt(rt++,2);if(r.t=e,!r.__c&&(r.__=[i?i(t):ja(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],d=r.t(l,s);l!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.u)){var n=function(s,l,d){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,s,l,d);var u=!1;return p.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(u=!0)}}),!(!u&&r.__c.props===s)&&(!a||a.call(this,s,l,d))};Q.u=!0;var a=Q.shouldComponentUpdate,o=Q.componentWillUpdate;Q.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)},Q.shouldComponentUpdate=n}return r.__N||r.__}function Ti(e,t){var i=Tt(rt++,3);!F.__s&&Tr(i.__H,t)&&(i.__=e,i.i=t,Q.__H.__h.push(i))}function _e(e,t){var i=Tt(rt++,4);!F.__s&&Tr(i.__H,t)&&(i.__=e,i.i=t,Q.__h.push(i))}function xe(e){return Ft=5,nt(function(){return{current:e}},[])}function lc(e,t,i){Ft=6,_e(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},i==null?i:i.concat(e))}function nt(e,t){var i=Tt(rt++,7);return Tr(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function cc(e,t){return Ft=8,nt(function(){return e},t)}function Oa(e){var t=Q.context[e.__c],i=Tt(rt++,9);return i.c=e,t?(i.__==null&&(i.__=!0,t.sub(Q)),t.props.value):e.__}function dc(e,t){F.useDebugValue&&F.useDebugValue(t?t(e):e)}function uc(){var e=Tt(rt++,11);if(!e.__){for(var t=Q.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var i=t.__m||(t.__m=[0,0]);e.__="P"+i[0]+"-"+i[1]++}return e.__}function fc(){for(var e;e=Fa.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Di),e.__H.__h.forEach(Fr),e.__H.__h=[]}catch(t){e.__H.__h=[],F.__e(t,e.__v)}}F.__b=function(e){Q=null,Ta&&Ta(e)},F.__r=function(e){Da&&Da(e),rt=0;var t=(Q=e.__c).__H;t&&(Ar===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(i){i.__N&&(i.__=i.__N),i.__V=Fi,i.__N=i.i=void 0})):(t.__h.forEach(Di),t.__h.forEach(Fr),t.__h=[],rt=0)),Ar=Q},F.diffed=function(e){Na&&Na(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Fa.push(t)!==1&&Aa===F.requestAnimationFrame||((Aa=F.requestAnimationFrame)||pc)(fc)),t.__H.__.forEach(function(i){i.i&&(i.__H=i.i),i.__V!==Fi&&(i.__=i.__V),i.i=void 0,i.__V=Fi})),Ar=Q=null},F.__c=function(e,t){t.some(function(i){try{i.__h.forEach(Di),i.__h=i.__h.filter(function(r){return!r.__||Fr(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],F.__e(r,i.__v)}}),Ma&&Ma(e,t)},F.unmount=function(e){Va&&Va(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach(function(r){try{Di(r)}catch(n){t=n}}),i.__H=void 0,t&&F.__e(t,i.__v))};var La=typeof requestAnimationFrame=="function";function pc(e){var t,i=function(){clearTimeout(r),La&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(i,100);La&&(t=requestAnimationFrame(i))}function Di(e){var t=Q,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),Q=t}function Fr(e){var t=Q;e.__c=e.__(),Q=t}function Tr(e,t){return!e||e.length!==t.length||t.some(function(i,r){return i!==e[r]})}function ja(e,t){return typeof t=="function"?t(e):t}function Ra(e,t){for(var i in t)e[i]=t[i];return e}function Dr(e,t){for(var i in e)if(i!=="__source"&&!(i in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Nr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Mr(e){this.props=e}function hc(e,t){function i(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,n)||!o:Dr(this.props,n)}function r(n){return this.shouldComponentUpdate=i,Ce(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Mr.prototype=new De).isPureReactComponent=!0,Mr.prototype.shouldComponentUpdate=function(e,t){return Dr(this.props,e)||Dr(this.state,t)};var Ba=F.__b;F.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ba&&Ba(e)};var gc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Vr(e){function t(i){var r=Ra({},i);return delete r.ref,e(r,i.ref||null)}return t.$$typeof=gc,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var za=function(e,t){return e==null?null:Ye(Ye(e).map(t))},bc={map:za,forEach:za,count:function(e){return e?Ye(e).length:0},only:function(e){var t=Ye(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ye},vc=F.__e;F.__e=function(e,t,i,r){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=i.__e,t.__k=i.__k),n.__c(e,t)}vc(e,t,i,r)};var Ua=F.unmount;function qa(e,t,i){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Ra({},e)).__c!=null&&(e.__c.__P===i&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return qa(r,t,i)})),e}function Wa(e,t,i){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Wa(r,t,i)}),e.__c&&e.__c.__P===t&&(e.__e&&i.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=i)),e}function Qt(){this.__u=0,this.t=null,this.__b=null}function Ha(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ka(e){var t,i,r;function n(a){if(t||(t=e()).then(function(o){i=o.default||o},function(o){r=o}),r)throw r;if(!i)throw t;return Ce(i,a)}return n.displayName="Lazy",n.__f=!0,n}function ei(){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),Ua&&Ua(e)},(Qt.prototype=new De).__c=function(e,t){var i=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(i);var n=Ha(r.__v),a=!1,o=function(){a||(a=!0,i.__R=null,n?n(s):s())};i.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var d=r.state.__a;r.__v.__k[0]=Wa(d,d.__c.__P,d.__c.__O)}var p;for(r.setState({__a:r.__b=null});p=r.t.pop();)p.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Qt.prototype.componentWillUnmount=function(){this.t=[]},Qt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=qa(this.__b,i,r.__O=r.__P)}this.__b=null}var n=t.__a&&Ce(ne,null,e.fallback);return n&&(n.__h=null),[Ce(ne,null,t.__a?null:e.children),n]};var Ga=function(e,t,i){if(++i[1]===i[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(i=e.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;e.u=i=i[2]}};function wc(e){return this.getChildContext=function(){return e.context},e.children}function mc(e){var t=this,i=e.i;t.componentWillUnmount=function(){vt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==i&&t.componentWillUnmount(),e.__v?(t.l||(t.i=i,t.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,n){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),vt(Ce(wc,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function yc(e,t){var i=Ce(mc,{__v:e,i:t});return i.containerInfo=t,i}(ei.prototype=new De).__a=function(e){var t=this,i=Ha(t.__v),r=t.o.get(e);return r[0]++,function(n){var a=function(){t.props.revealOrder?(r.push(n),Ga(t,e,r)):n()};i?i(a):a()}},ei.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ye(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var i=t.length;i--;)this.o.set(t[i],this.u=[1,0,this.u]);return e.children},ei.prototype.componentDidUpdate=ei.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,i){Ga(e,i,t)})};var Ya=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,_c=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,xc=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,kc=/[A-Z0-9]/g,Sc=typeof document<"u",Cc=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function $c(e,t,i){return t.__k==null&&(t.textContent=""),vt(e,t),typeof i=="function"&&i(),e?e.__c:null}function Ec(e,t,i){return Sa(e,t),typeof i=="function"&&i(),e?e.__c:null}De.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(De.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ja=F.event;function Ic(){}function Ac(){return this.cancelBubble}function Fc(){return this.defaultPrevented}F.event=function(e){return Ja&&(e=Ja(e)),e.persist=Ic,e.isPropagationStopped=Ac,e.isDefaultPrevented=Fc,e.nativeEvent=e};var Pr,Tc={enumerable:!1,configurable:!0,get:function(){return this.class}},Za=F.vnode;F.vnode=function(e){typeof e.type=="string"&&function(t){var i=t.props,r=t.type,n={};for(var a in i){var o=i[a];if(!(a==="value"&&"defaultValue"in i&&o==null||Sc&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in i&&i.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||r!=="input"&&r!=="textarea"||Cc(i.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":xc.test(a)?a=s:r.indexOf("-")===-1&&_c.test(a)?a=a.replace(kc,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}r=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Ye(i.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),r=="select"&&n.defaultValue!=null&&(n.value=Ye(i.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),i.class&&!i.className?(n.class=i.class,Object.defineProperty(n,"className",Tc)):(i.className&&!i.class||i.class&&i.className)&&(n.class=n.className=i.className),t.props=n}(e),e.$$typeof=Ya,Za&&Za(e)};var Xa=F.__r;F.__r=function(e){Xa&&Xa(e),Pr=e.__c};var Qa=F.diffed;F.diffed=function(e){Qa&&Qa(e);var t=e.props,i=e.__e;i!=null&&e.type==="textarea"&&"value"in t&&t.value!==i.value&&(i.value=t.value==null?"":t.value),Pr=null};var Dc={ReactCurrentDispatcher:{current:{readContext:function(e){return Pr.__n[e.__c].props.value}}}};function Nc(e){return Ce.bind(null,e)}function eo(e){return!!e&&e.$$typeof===Ya}function Mc(e){return eo(e)?sc.apply(null,arguments):e}function Vc(e){return!!e.__k&&(vt(null,e),!0)}function Pc(e){return e&&(e.base||e.nodeType===1&&e)||null}var Oc=function(e,t){return e(t)},Lc=function(e,t){return e(t)},jc=ne;function to(e){e()}function Rc(e){return e}function Bc(){return[!1,to]}var zc=_e;function Uc(e,t){var i=t(),r=Ne({h:{__:i,v:t}}),n=r[0].h,a=r[1];return _e(function(){n.__=i,n.v=t,Nr(n.__,t())||a({h:n})},[e,i,t]),Ti(function(){return Nr(n.__,n.v())||a({h:n}),e(function(){Nr(n.__,n.v())||a({h:n})})},[e]),i}var he={useState:Ne,useId:uc,useReducer:Pa,useEffect:Ti,useLayoutEffect:_e,useInsertionEffect:zc,useTransition:Bc,useDeferredValue:Rc,useSyncExternalStore:Uc,startTransition:to,useRef:xe,useImperativeHandle:lc,useMemo:nt,useCallback:cc,useContext:Oa,useDebugValue:dc,version:"17.0.2",Children:bc,render:$c,hydrate:Ec,unmountComponentAtNode:Vc,createPortal:yc,createElement:Ce,createContext:Ca,createFactory:Nc,cloneElement:Mc,createRef:ic,Fragment:ne,isValidElement:eo,findDOMNode:Pc,Component:De,PureComponent:Mr,memo:hc,forwardRef:Vr,flushSync:Lc,unstable_batchedUpdates:Oc,StrictMode:jc,Suspense:Qt,SuspenseList:ei,lazy:Ka,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Dc};const ge=Symbol.for("@ts-pattern/matcher"),io=Symbol.for("@ts-pattern/isVariadic"),Ni="@ts-pattern/anonymous-select-key",Or=e=>!!(e&&typeof e=="object"),Mi=e=>e&&!!e[ge],ae=(e,t,i)=>{if(Mi(e)){const r=e[ge](),{matched:n,selections:a}=r.match(t);return n&&a&&Object.keys(a).forEach(o=>i(o,a[o])),n}if(Or(e)){if(!Or(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],n=[],a=[];for(const o of e.keys()){const s=e[o];Mi(s)&&s[io]?a.push(s):a.length?n.push(s):r.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+n.length)return!1;const o=t.slice(0,r.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(r.length,n.length===0?1/0:-n.length);return r.every((d,p)=>ae(d,o[p],i))&&n.every((d,p)=>ae(d,s[p],i))&&(a.length===0||ae(a[0],l,i))}return e.length===t.length&&e.every((o,s)=>ae(o,t[s],i))}return Reflect.ownKeys(e).every(r=>{const n=e[r];return(r in t||Mi(a=n)&&a[ge]().matcherType==="optional")&&ae(n,t[r],i);var a})}return Object.is(t,e)},be=e=>{var t,i,r;return Or(e)?Mi(e)?(t=(i=(r=e[ge]()).getSelectionKeys)==null?void 0:i.call(r))!=null?t:[]:Array.isArray(e)?ti(e,be):ti(Object.values(e),be):[]},ti=(e,t)=>e.reduce((i,r)=>i.concat(t(r)),[]);function qc(...e){if(e.length===1){const[t]=e;return i=>ae(t,i,()=>{})}if(e.length===2){const[t,i]=e;return ae(t,i,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ce(e){return Object.assign(e,{optional:()=>jr(e),and:t=>ee(e,t),or:t=>ro(e,t),select:t=>t===void 0?ii(e):ii(t,e)})}function Lr(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let i=0;const r=[{value:Object.assign(t,{[io]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=r[i++])!=null?n:r.at(-1)}}}}))(e),{optional:()=>Lr(jr(e)),select:t=>Lr(t===void 0?ii(e):ii(t,e))})}function jr(e){return ce({[ge]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return t===void 0?(be(e).forEach(n=>r(n,void 0)),{matched:!0,selections:i}):{matched:ae(e,t,r),selections:i}},getSelectionKeys:()=>be(e),matcherType:"optional"})})}const Wc=(e,t)=>{for(const i of e)if(!t(i))return!1;return!0},Hc=(e,t)=>{for(const[i,r]of e.entries())if(!t(r,i))return!1;return!0},Kc=(e,t)=>{const i=Reflect.ownKeys(e);for(const r of i)if(!t(r,e[r]))return!1;return!0};function ee(...e){return ce({[ge]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return{matched:e.every(n=>ae(n,t,r)),selections:i}},getSelectionKeys:()=>ti(e,be),matcherType:"and"})})}function ro(...e){return ce({[ge]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return ti(e,be).forEach(n=>r(n,void 0)),{matched:e.some(n=>ae(n,t,r)),selections:i}},getSelectionKeys:()=>ti(e,be),matcherType:"or"})})}function U(e){return{[ge]:()=>({match:t=>({matched:!!e(t)})})}}function ii(...e){const t=typeof e[0]=="string"?e[0]:void 0,i=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ce({[ge]:()=>({match:r=>{let n={[t??Ni]:r};return{matched:i===void 0||ae(i,r,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??Ni].concat(i===void 0?[]:be(i))})})}function no(e){return!0}function Be(e){return typeof e=="number"}function at(e){return typeof e=="string"}function ot(e){return typeof e=="bigint"}const ao=ce(U(no)),Gc=ce(U(no)),Yc=ao,st=e=>Object.assign(ce(e),{startsWith:t=>{return st(ee(e,(i=t,U(r=>at(r)&&r.startsWith(i)))));var i},endsWith:t=>{return st(ee(e,(i=t,U(r=>at(r)&&r.endsWith(i)))));var i},minLength:t=>st(ee(e,(i=>U(r=>at(r)&&r.length>=i))(t))),length:t=>st(ee(e,(i=>U(r=>at(r)&&r.length===i))(t))),maxLength:t=>st(ee(e,(i=>U(r=>at(r)&&r.length<=i))(t))),includes:t=>{return st(ee(e,(i=t,U(r=>at(r)&&r.includes(i)))));var i},regex:t=>{return st(ee(e,(i=t,U(r=>at(r)&&!!r.match(i)))));var i}}),oo=st(U(at)),ze=e=>Object.assign(ce(e),{between:(t,i)=>ze(ee(e,((r,n)=>U(a=>Be(a)&&r<=a&&n>=a))(t,i))),lt:t=>ze(ee(e,(i=>U(r=>Be(r)&&r<i))(t))),gt:t=>ze(ee(e,(i=>U(r=>Be(r)&&r>i))(t))),lte:t=>ze(ee(e,(i=>U(r=>Be(r)&&r<=i))(t))),gte:t=>ze(ee(e,(i=>U(r=>Be(r)&&r>=i))(t))),int:()=>ze(ee(e,U(t=>Be(t)&&Number.isInteger(t)))),finite:()=>ze(ee(e,U(t=>Be(t)&&Number.isFinite(t)))),positive:()=>ze(ee(e,U(t=>Be(t)&&t>0))),negative:()=>ze(ee(e,U(t=>Be(t)&&t<0)))}),Jc=ze(U(Be)),lt=e=>Object.assign(ce(e),{between:(t,i)=>lt(ee(e,((r,n)=>U(a=>ot(a)&&r<=a&&n>=a))(t,i))),lt:t=>lt(ee(e,(i=>U(r=>ot(r)&&r<i))(t))),gt:t=>lt(ee(e,(i=>U(r=>ot(r)&&r>i))(t))),lte:t=>lt(ee(e,(i=>U(r=>ot(r)&&r<=i))(t))),gte:t=>lt(ee(e,(i=>U(r=>ot(r)&&r>=i))(t))),positive:()=>lt(ee(e,U(t=>ot(t)&&t>0))),negative:()=>lt(ee(e,U(t=>ot(t)&&t<0)))}),Zc=lt(U(ot)),Xc=ce(U(function(e){return typeof e=="boolean"})),Qc=ce(U(function(e){return typeof e=="symbol"})),ed=ce(U(function(e){return e==null})),td=ce(U(function(e){return e!=null}));var ri={__proto__:null,matcher:ge,optional:jr,array:function(...e){return Lr({[ge]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const i=e[0];let r={};if(t.length===0)return be(i).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>ae(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:be(e[0])})})},set:function(...e){return ce({[ge]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};if(e.length===0)return{matched:!0};const r=(a,o)=>{i[a]=(i[a]||[]).concat([o])},n=e[0];return{matched:Wc(t,a=>ae(n,a,r)),selections:i}},getSelectionKeys:()=>e.length===0?[]:be(e[0])})})},map:function(...e){return ce({[ge]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};const r=(s,l)=>{i[s]=(i[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var n;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);const[a,o]=e;return{matched:Hc(t,(s,l)=>{const d=ae(a,l,r),p=ae(o,s,r);return d&&p}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[...be(e[0]),...be(e[1])]})})},record:function(...e){return ce({[ge]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var i;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);let r={};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])},[a,o]=e.length===1?[oo,e[0]]:e;return{matched:Kc(t,(s,l)=>{const d=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=d!==null&&ae(a,d,n),u=ae(a,s,n),h=ae(o,l,n);return(u||p)&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...be(e[0]),...be(e[1])]})})},intersection:ee,union:ro,not:function(e){return ce({[ge]:()=>({match:t=>({matched:!ae(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:U,select:ii,any:ao,unknown:Gc,_:Yc,string:oo,number:Jc,bigint:Zc,boolean:Xc,symbol:Qc,nullish:ed,nonNullable:td,instanceOf:function(e){return ce(U(function(t){return i=>i instanceof t}(e)))},shape:function(e){return ce(U(qc(e)))}};class id extends Error{constructor(t){let i;try{i=JSON.stringify(t)}catch{i=t}super(`Pattern matching error: no pattern matches value ${i}`),this.input=void 0,this.input=t}}const Rr={matched:!1,value:void 0};function Vi(e){return new rd(e,Rr)}let rd=class Dn{constructor(t,i){this.input=void 0,this.state=void 0,this.input=t,this.state=i}with(...t){if(this.state.matched)return this;const i=t[t.length-1],r=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(d,p)=>{a=!0,o[d]=p},l=!r.some(d=>ae(d,this.input,s))||n&&!n(this.input)?Rr:{matched:!0,value:i(a?Ni in o?o[Ni]:o:this.input,this.input)};return new Dn(this.input,l)}when(t,i){if(this.state.matched)return this;const r=!!t(this.input);return new Dn(this.input,r?{matched:!0,value:i(this.input,this.input)}:Rr)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=nd){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function nd(e){throw new id(e)}var ad=["other","few","many","two","one","zero"],so=({terms:e,overrides:t,locale:i})=>{const r=new Intl.PluralRules(i);function n(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,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=r.select(o.count);if(!(l in s)){const d=ad.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},od=0;function c(e,t,i,r,n,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var d={type:e,props:l,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--od,__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 lo=Ca(null),co=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:i,locale:r})=>{const n=nt(()=>so({locale:r,terms:e,overrides:t}),[t,r]);return c(lo.Provider,{value:{t:n,locale:r},children:i})},useTranslation:()=>{const t=Oa(lo);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:i})=>so({terms:e,overrides:t,locale:i})}),{TranslationProvider:Pp,useTranslation:Op,createTFunction:Lp,defaultTerms:sd}=co({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_pending:"Thanks, we've received your application and are processing it.",submission_failed:"Failed to submit",submission_provider_maintenance:"Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Your answers are saved, so you can come back after then and submit your application. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Your answers are saved, so you can come back after then and submit your application. We apologise for the inconvenience.",submission_available_at:"Submit will be available again at {{time}}.",resume_prompt:"You have an unfinished application for this role. Continue where you left off?",resume_continue:"Continue",resume_start_again:"Start again",captcha_failed:"Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.",close_application:"Close application",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_empty:"Please enter a value",validation_date:"Please enter a valid date (YYYY-MM-DD)",validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_min:{one:"Please upload at least one file",other:"Please only upload at least {{count}} files"},validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_file_size:"Your file is too big. Please upload a file smaller than {{size}}",validation_file_empty:"This file is empty. If it’s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.",validation_required:"This field is required.",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"},optional:"optional"});const{TranslationProvider:ld,useTranslation:oe,createTFunction:cd}=co({...sd,error_heading:"Something unexpected happened",undo:"Change answer",conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"This role is no longer accepting applications.",submission_duplicate:"You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.",submission_duplicate_earlier_attempt:"You've already applied for this role. If that doesn't sound right, it's most likely a hiccup from your earlier attempt — don't worry, we have your application.",submission_retryable:"We couldn't submit your application. Please try again.",submission_failed:"We couldn't submit your application. Choose Restart to try again.",submission_unknown:"We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.",submission_unknown_do_not_resubmit:"We couldn't confirm whether your application went through, and submitting it again won't help. Please don't keep resubmitting — check your email for a confirmation, or contact the employer if nothing arrives.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",submission_cooldown:{one:"Submit will be available again in {{count}} second.",other:"Submit will be available again in {{count}} seconds."},submission_cooldown_ready:"Submit is available again.",captcha_check:"One quick check before we send your application",submission_still_working:"Still working — the employer's application system is taking a little longer than usual. Please keep this window open.",file_preparing:{one:"Preparing your file…",other:"Preparing your files…"},file_ready:{one:"Your file is ready to send",other:"Your files are ready to send"},file_read_error:"We couldn't read this file. Select it again or choose another file.",file_read_error_replacement:"We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.",address_error:"We couldn't search for that address. Try again, or fill it in manually.",address_searching:"Searching addresses…",address_no_results:"We couldn't find that address. Check the spelling or postcode, or fill it in manually.",maximize:"Maximise",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",file_more:{one:"+{{count}} file",other:"+{{count}} files"},loading:"Loading",minimize:"Minimise"}),jp="";function Ze(e,t){if(!e)throw new Error(t)}var Br=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(Br):Object.keys(e).sort().reduce((t,i)=>(t[i]=Br(e[i]),t),{}),dd=e=>{let t=JSON.stringify(Br(e)),i=5381;for(let r=0;r<t.length;r++)i=i*33^t.charCodeAt(r);return(i>>>0).toString(36)},ud=Symbol.for("preact-signals");function zr(){if(Dt>1)Dt--;else{for(var e,t=!1;ni!==void 0;){var i=ni;for(ni=void 0,Ur++;i!==void 0;){var r=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&fo(i))try{i.c()}catch(n){t||(e=n,t=!0)}i=r}}if(Ur=0,Dt--,t)throw e}}var Z=void 0,ni=void 0,Dt=0,Ur=0,Pi=0;function uo(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function fe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}fe.prototype.brand=ud,fe.prototype.h=function(){return!0},fe.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)},fe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,i=e.x;t!==void 0&&(t.x=i,e.e=void 0),i!==void 0&&(i.e=t,e.x=void 0),e===this.t&&(this.t=i)}},fe.prototype.subscribe=function(e){var t=this;return Wr(function(){var i=t.value,r=Z;Z=void 0;try{e(i)}finally{Z=r}})},fe.prototype.valueOf=function(){return this.value},fe.prototype.toString=function(){return this.value+""},fe.prototype.toJSON=function(){return this.value},fe.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(fe.prototype,"value",{get:function(){var e=uo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Ur>100)throw new Error("Cycle detected");this.v=e,this.i++,Pi++,Dt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{zr()}}}});function Me(e){return new fe(e)}function fo(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 po(e){for(var t=e.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ho(e){for(var t=e.s,i=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=i}function Nt(e){fe.call(this,void 0),this.x=e,this.s=void 0,this.g=Pi-1,this.f=4}(Nt.prototype=new fe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Pi))return!0;if(this.g=Pi,this.f|=1,this.i>0&&!fo(this))return this.f&=-2,!0;var e=Z;try{po(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return Z=e,ho(this),this.f&=-2,!0},Nt.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)}fe.prototype.S.call(this,e)},Nt.prototype.U=function(e){if(this.t!==void 0&&(fe.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)}},Nt.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(Nt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=uo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function fd(e){return new Nt(e)}function go(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Dt++;var i=Z;Z=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,qr(e),r}finally{Z=i,zr()}}}function qr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,go(e)}function pd(e){if(Z!==this)throw new Error("Out-of-order effect");ho(this),Z=e,this.f&=-2,8&this.f&&qr(this),zr()}function ai(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}ai.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()}},ai.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,go(this),po(this),Dt++;var e=Z;return Z=this,pd.bind(this,e)},ai.prototype.N=function(){2&this.f||(this.f|=2,this.o=ni,ni=this)},ai.prototype.d=function(){this.f|=8,1&this.f||qr(this)};function Wr(e){var t=new ai(e);try{t.c()}catch(i){throw t.d(),i}return t.d.bind(t)}var Hr;function Mt(e,t){F[e]=t.bind(null,F[e]||function(){})}function Oi(e){Hr&&Hr(),Hr=e&&e.S()}function bo(e){var t=this,i=e.data,r=gd(i);r.value=i;var n=nt(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!ca(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},fd(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}bo.displayName="_st",Object.defineProperties(fe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:bo},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Mt("__b",function(e,t){if(typeof t.type=="string"){var i,r=t.props;for(var n in r)if(n!=="children"){var a=r[n];a instanceof fe&&(i||(t.__np=i={}),i[n]=a,r[n]=a.peek())}}e(t)}),Mt("__r",function(e,t){Oi();var i,r=t.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(n){var a;return Wr(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),Oi(i),e(t)}),Mt("__e",function(e,t,i,r){Oi(),e(t,i,r)}),Mt("diffed",function(e,t){Oi();var i;if(typeof t.type=="string"&&(i=t.__e)){var r=t.__np,n=t.props;if(r){var a=i.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in r)&&(s.d(),a[o]=void 0)}else i.U=a={};for(var l in r){var d=a[l],p=r[l];d===void 0?(d=hd(i,l,p,n),a[l]=d):d.o(p,n)}}}e(t)});function hd(e,t,i,r){var n=t in e&&e.ownerSVGElement===void 0,a=Me(i);return{o:function(o,s){a.value=o,r=s},d:Wr(function(){var o=a.value.value;r[t]!==o&&(r[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Mt("unmount",function(e,t){if(typeof t.type=="string"){var i=t.__e;if(i){var r=i.U;if(r){i.U=void 0;for(var n in r){var a=r[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Mt("__h",function(e,t,i,r){(r<3||r===9)&&(t.__$f|=2),e(t,i,r)}),De.prototype.shouldComponentUpdate=function(e,t){var i=this.__$u;if(!(i&&i.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var n in e)if(n!=="__source"&&e[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function gd(e){return nt(function(){return Me(e)},[])}const Kr=(e,t)=>t.some(i=>e instanceof i);let vo,wo;function bd(){return vo||(vo=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function vd(){return wo||(wo=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Gr=new WeakMap,Yr=new WeakMap,Li=new WeakMap;function wd(e){const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{i(mt(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return Li.set(t,e),t}function md(e){if(Gr.has(e))return;const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{i(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Gr.set(e,t)}let Jr={get(e,t,i){if(e instanceof IDBTransaction){if(t==="done")return Gr.get(e);if(t==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return mt(e[t])},set(e,t,i){return e[t]=i,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function mo(e){Jr=e(Jr)}function yd(e){return vd().includes(e)?function(...t){return e.apply(Zr(this),t),mt(this.request)}:function(...t){return mt(e.apply(Zr(this),t))}}function _d(e){return typeof e=="function"?yd(e):(e instanceof IDBTransaction&&md(e),Kr(e,bd())?new Proxy(e,Jr):e)}function mt(e){if(e instanceof IDBRequest)return wd(e);if(Yr.has(e))return Yr.get(e);const t=_d(e);return t!==e&&(Yr.set(e,t),Li.set(t,e)),t}const Zr=e=>Li.get(e);function xd(e,t,{blocked:i,upgrade:r,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=mt(o);return r&&o.addEventListener("upgradeneeded",l=>{r(mt(o.result),l.oldVersion,l.newVersion,mt(o.transaction),l)}),i&&o.addEventListener("blocked",l=>i(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),n&&l.addEventListener("versionchange",d=>n(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const kd=["get","getKey","getAll","getAllKeys","count"],Sd=["put","add","delete","clear"],Xr=new Map;function yo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Xr.get(t))return Xr.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,n=Sd.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!(n||kd.includes(i)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let d=l.store;return r&&(d=d.index(s.shift())),(await Promise.all([d[i](...s),n&&l.done]))[0]};return Xr.set(t,a),a}mo(e=>({...e,get:(t,i,r)=>yo(t,i)||e.get(t,i,r),has:(t,i)=>!!yo(t,i)||e.has(t,i)}));const Cd=["continue","continuePrimaryKey","advance"],_o={},Qr=new WeakMap,xo=new WeakMap,$d={get(e,t){if(!Cd.includes(t))return e[t];let i=_o[t];return i||(i=_o[t]=function(...r){Qr.set(this,xo.get(this)[t](...r))}),i}};async function*Ed(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const i=new Proxy(t,$d);for(xo.set(i,t),Li.set(i,Zr(t));t;)yield i,t=await(Qr.get(i)||t.continue()),Qr.delete(i)}function ko(e,t){return t===Symbol.asyncIterator&&Kr(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Kr(e,[IDBIndex,IDBObjectStore])}mo(e=>({...e,get(t,i,r){return ko(t,i)?Ed:e.get(t,i,r)},has(t,i){return ko(t,i)||e.has(t,i)}}));const ji=typeof indexedDB>"u"?void 0:xd("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let Ri,en,oi;const So=()=>{if(!Ri)return oi;const e=Ri;Ri=void 0;const t=zi(e),i=ji==null?void 0:ji.then(r=>r.put("state",e.data,t)).finally(()=>{oi===i&&(oi=void 0)});return oi=i,oi},Fe={getStateData:async(e,t,i)=>{var n;const r=zi({...e,flowKeys:t,context:i});return(n=await ji)==null?void 0:n.get("state",r)},setStateData:e=>{Ri=e,clearTimeout(en),en=setTimeout(()=>void So(),1e3)},flushStateData:()=>(clearTimeout(en),So()??Promise.resolve())},Vt=e=>t=>t?t.type===e:!1,Id=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Co=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Id()}),Ad=e=>Vi(e).with({nativeEvent:{submitter:ri.select(ri.union(ri.instanceOf(HTMLButtonElement),ri.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Bi=(e,t,i,r=0)=>{if(!t.nextId)return i(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const n=e.find(d=>d.id===t.nextId);if(n===void 0)return{stepsMade:r,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(d=>d.id===a),s=t.type.includes("question")?1:0;if(o){const d=s+Math.max(Bi(e,n,i,r+s).remainingSteps,Bi(e,o,i,r+s).remainingSteps);return i(t.id,{stepsMade:r,remainingSteps:d}),{stepsMade:r,remainingSteps:d}}const l=s+Bi(e,n,i,r+s).remainingSteps;return i(t.id,{stepsMade:r,remainingSteps:l}),{stepsMade:r,remainingSteps:l}},Fd=e=>{const t={},i=e.find(r=>r.isHead);return i&&Bi(e,i,(r,n)=>{t[r]=n}),t},zi=e=>[...e.flowKeys,e.id,e.version,e.build,dd(e.context)].join("/"),Td=({data:e,nodes:t})=>{const i=e.startedWriteNodeIds===void 0?t.some(r=>r.type==="integration-application-submit"&&e.nodeHistory.includes(r.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!i&&Bn(t,e.submissions)},Dd=({data:e,nodes:t})=>{var i;return!e.isFinished&&((((i=e.startedWriteNodeIds)==null?void 0:i.length)??0)>0||Bn(t,e.submissions))},Ue=Me({state:"idle"}),tn=new Set,yt=e=>{const{state:t,flow:i}=Ue.value;if(t!=="loaded")return;Ze(i,"No flow to update");const r=e(i.data);i.data=r,Ue.value={state:t,flow:i},Fe.setStateData(i)},D={current$:Ue,viewState$:Me("closed"),prepareFlow:async({flow:e,context:t={},flowKeys:i,title:r,analytics:n,job:a,locationOrigin:o})=>{await Fe.flushStateData().catch(()=>{});const s=await Fe.getStateData(e,i,t),l=s??Co(),d=zi({...e,flowKeys:i,context:t}),p=s!==void 0&&!tn.has(d)&&Td({data:l,nodes:e.nodes});return p||tn.add(d),{data:l,offerResume:p,startedAt:new Date,nodeIdToProgress:Fd(e.nodes),flowKeys:i,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:r,analytics:n,job:a,locationOrigin:o}},commitFlow:e=>{Ue.value={state:"loaded",flow:e},Fe.setStateData(e)},settleResume:e=>{e.offerResume=!1,tn.add(zi(e))},cancelCurrentFlow:()=>{Ue.value={state:"idle"},D.viewState$.value="closed"},markAsFinished:()=>yt(e=>({...e,isFinished:!0})),markAsInteracted:()=>yt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>yt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{yt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await Fe.flushStateData()},restart:()=>{const{state:e,flow:t}=Ue.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const i={...Co(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},r={...t,data:i,startedAt:new Date,offerResume:!1};Ue.value={state:e,flow:r},Fe.setStateData(r)},addMessage:(e,t)=>{const i={...e,groupId:t};return yt(r=>(r.messages.push(i),r))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:i}=Ue.value;Ze(t==="loaded","Application not loaded");const r=i.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));i.data.messages=r,Fe.setStateData(i)},setSubmission:(e,t)=>yt(i=>(t===null?delete i.submissions[e]:i.submissions[e]=t,i)),setInput:e=>yt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Ue.peek().flow===e&&(Ue.value={state:"loaded",flow:e}),Fe.setStateData(e),await Fe.flushStateData()}},Nd=({message:e})=>{const{t}=oe();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-11 text-sm",children:e})]})]})},Ui=e=>{const{t}=oe();return c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:t("loading")}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},$o=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Ui,{class:"text-neutral-6 h-8 w-8"})}),Md=e=>{const i=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-i,r))*100)}%`},Vd=wt("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"}}),si=({class:e,children:t,variant:i,...r})=>c("button",{class:Je(Vd({variant:i}),e),...r,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),Eo=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Pd=()=>{if(D.current$.value.state!=="loaded")return null;const e=D.current$.value.flow.nodeIdToProgress,t=D.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const i=e[t];if(i===void 0)return null;const r=100*(i.stepsMade/(i.remainingSteps+i.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Md(r)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Od=({children:e,params:t})=>{const{t:i}=oe(),r=D.viewState$;return c(ne,{children:c("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{"aria-label":i("minimize"),onClick:()=>{r.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:rn,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:D.current$.value.state!=="loaded"||r.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,D.current$.value.state==="loaded"&&c(si,{class:"mx-1","aria-label":i("restart"),onClick:()=>{D.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(si,{class:"view-switch mx-1",onTouchStart:rn,"aria-label":i("minimize"),onClick:()=>r.value="minimised",children:c(Eo,{})},"minmax")]})]}),c(Pd,{})]})})};function rn(){}const Ld=Ka(()=>Promise.resolve().then(()=>Tp).then(e=>e.ChatbotBody)),Io=wt("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"}}}),Ao=wt("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"}}}),jd=({open:e,...t})=>{const i=xe(null);return _e(()=>{const r=i.current;r&&(e?r.showModal():r.close())},[e]),c("dialog",{ref:i,...t})},Rd=({logger:e,apiClient:t,analytics:i,talentBankClient:r,params:n})=>{const{state:a,flow:o,error:s}=D.current$.value,l=D.viewState$.value,d=a!=="idle"&&l==="maximised",p=xe(null),u=o?[...o.data.nodeHistory].reverse().map(h=>o.nodes.find(g=>g.id===h)).find(h=>(h==null?void 0:h.type)==="flow-section"):void 0;return c(ld,{terms:n.terms,locale:void 0,children:[c(jd,{open:d,onClose:()=>D.viewState$.value="minimised",children:c("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Io({view:"maximised"}),children:c("div",{class:Ao({view:"maximised"}),children:[c(Od,{params:n,children:u?c(ne,{children:[c("span",{class:"block",children:u.data.title}),c("span",{class:"block truncate text-xs font-normal",children:o==null?void 0:o.title})]}):o==null?void 0:o.title}),Vi({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c($o,{},"loading")).with({state:"loaded"},()=>c(Qt,{fallback:c($o,{},"loading"),children:c(Ld,{analytics:i,apiClient:t,logger:e,talentBankClient:r})})).with({state:"error"},()=>c(Nd,{message:s})).exhaustive()]})})}),l==="minimised"?c(Bd,{flow:o}):null]})},Bd=({flow:e})=>{const{t}=oe();return c("div",{class:Io({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Ao({view:"minimised"}),children:[c("button",{onClick:()=>{D.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:rn,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(si,{class:"mx-1","aria-label":t("close_application"),onClick:D.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},zd=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .\\!visible{visibility:visible!important}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-1{bottom:4px}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-none{resize:none}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-end{align-items:flex-end}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}
|
|
2
|
-
`,
|
|
1
|
+
var eh=Object.defineProperty;var th=(ge,ze,Je)=>ze in ge?eh(ge,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ge[ze]=Je;var ue=(ge,ze,Je)=>(th(ge,typeof ze!="symbol"?ze+"":ze,Je),Je);(function(){"use strict";var ge;function ze(e){return{lang:(e==null?void 0:e.lang)??(ge==null?void 0:ge.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(ge==null?void 0:ge.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(ge==null?void 0:ge.abortPipeEarly)}}var Je;function Gs(e){return Je==null?void 0:Je.get(e)}var cr;function Ys(e){return cr==null?void 0:cr.get(e)}var dr;function Js(e,t){var i;return(i=dr==null?void 0:dr.get(e))==null?void 0:i.get(t)}function Bn(e){var i,r;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Me(e,t,i,r,n){let a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Bn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??Js(e.reference,l.lang)??(u?Ys(l.lang):null)??r.message??Gs(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function _e(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ze())}}}function Zs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Xs(e,t){let i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function zn(e){return{kind:"transformation",type:"transform",reference:zn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Qs(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function ur(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function Un(){return{kind:"schema",type:"any",reference:Un,expects:"any",async:!1,get"~standard"(){return _e(this)},"~run"(e){return e.typed=!0,e}}}function Hn(e,t){return{kind:"schema",type:"array",reference:Hn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return _e(this)},"~run"(i,r){var a;let n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){let s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){let u={type:"array",origin:"value",input:n,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Me(this,"type",i,r);return i}}}function fr(e){return{kind:"schema",type:"boolean",reference:fr,expects:"boolean",async:!1,message:e,get"~standard"(){return _e(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Me(this,"type",t,i),t}}}function Mt(e,t){return{kind:"schema",type:"literal",reference:Mt,expects:Bn(e),async:!1,literal:e,message:t,get"~standard"(){return _e(this)},"~run"(i,r){return i.value===this.literal?i.typed=!0:Me(this,"type",i,r),i}}}function qn(e){return{kind:"schema",type:"null",reference:qn,expects:"null",async:!1,message:e,get"~standard"(){return _e(this)},"~run"(t,i){return t.value===null?t.typed=!0:Me(this,"type",t,i),t}}}function Ei(e,t){return{kind:"schema",type:"nullable",reference:Ei,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return _e(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Ii(e){return{kind:"schema",type:"number",reference:Ii,expects:"number",async:!1,message:e,get"~standard"(){return _e(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Me(this,"type",t,i),t}}}function fe(e,t){return{kind:"schema",type:"object",reference:fe,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return _e(this)},"~run"(i,r){var a;let n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(let o in this.entries){let s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in n?n[o]:ur(s),u=s["~run"]({value:l},r);if(u.issues){let f={type:"object",origin:"value",input:n,key:o,value:l};for(let d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=Qs(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Me(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Me(this,"type",i,r);return i}}}function xe(e,t){return{kind:"schema",type:"optional",reference:xe,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return _e(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=ur(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Wn(e,t,i){return{kind:"schema",type:"record",reference:Wn,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return _e(this)},"~run"(r,n){var o,s;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let l in a)if(Zs(a,l)){let u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){let h={type:"object",origin:"key",input:a,key:l,value:u};for(let g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.typed=!1;break}}let d=this.value["~run"]({value:u},n);if(d.issues){let h={type:"object",origin:"value",input:a,key:l,value:u};for(let g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else Me(this,"type",r,n);return r}}}function Ae(e){return{kind:"schema",type:"string",reference:Ae,expects:"string",async:!1,message:e,get"~standard"(){return _e(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Me(this,"type",t,i),t}}}function Kn(e){let t;if(e)for(let i of e)t?t.push(...i.issues):t=i.issues;return t}function pr(e,t){return{kind:"schema",type:"union",reference:pr,expects:Xs(e.map(i=>i.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return _e(this)},"~run"(i,r){let n,a,o;for(let s of this.options){let l=s["~run"]({value:i.value},r);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(a){if(a.length===1)return a[0];Me(this,"type",i,r,{issues:Kn(a)}),i.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Me(this,"type",i,r,{issues:Kn(o)})}return i}}}function ei(){return{kind:"schema",type:"unknown",reference:ei,expects:"unknown",async:!1,get"~standard"(){return _e(this)},"~run"(e){return e.typed=!0,e}}}function el(...e){return{...e[0],pipe:e,get"~standard"(){return _e(this)},"~run"(t,i){for(let r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function hr(e,t,i){let r=e["~run"]({value:t},ze(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var tl=e=>({ok:!0,err:!1,val:e}),il=e=>({err:!0,ok:!1,val:e}),gr=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function br(e,t,i){var o,s;let r=e.find(l=>l.type==="pre-apply-result");if(!r)return;let n=(o=t[r.data.participationKey])==null?void 0:o.value,a={};if(n===!0)for(let l of gr(e)){let u=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(u)&&u.length===1&&(u=u[0]),(typeof u=="boolean"||typeof u=="string")&&(a[l.data.key]=u)}return{node_id:r.id,flow_session_id:i,participation:n,answers:a}}function rl(e,t){let i=br(e,t,""),r=gr(e).map(a=>{let o=a.data.preApply,s=i==null?void 0:i.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(u=>u.value===s);return{key:a.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),n=(i==null?void 0:i.participation)===!1?"skipped":(i==null?void 0:i.participation)===!0&&r.length>0&&r.every(a=>a.valid)?"completed":"unavailable";return{status:n,hasHardConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:n==="completed"?r.some(a=>!a.matched&&a.severity==="advisory"):null,answers:n==="completed"?r:[]}}function nl(e,t){let i=new Set(gr(e).map(r=>r.data.key));for(let r of e)r.type==="pre-apply-result"&&(i.add(r.data.key),i.add(r.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([r])=>!i.has(r)))}var st=class extends Error{constructor(){super("Aborted")}},ti=(e,t)=>{if(t.length===0)return;let i=e;for(let r of t){if(i==null||typeof i!="object")return;i=i[r]}return i},al=(e,t="all")=>{let i={},r=t==="all"?null:new Set(t);for(let n in e){let a=e[n];a&&(r&&!r.has(n)||(i[n]=a.value))}return i},Gn=(e,t)=>{let i=new Set(e.flatMap(r=>r.type==="add-submission"?[r.data.key]:[]));return Object.entries(t).some(([r,n])=>n!==void 0&&n.type!=="integration"&&!i.has(r))},ol=({key:e,submissions:t})=>{var r;let i=(r=t[e])==null?void 0:r.value;if(typeof i!="string"&&typeof i!="number")throw new Error(`Submission at “${e}” is not a string or number`);return i},Yn=({key:e,path:t,submissions:i,context:r})=>{if(e==="$context"){if(!t)return;let n=ti(r,t);switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${t.join(".")}`,n);return}}return i[e]},sl=e=>{let t=e.split(".").pop();return t?tl(t?"."+t:""):il("No file extension found")},Jn=(e,t)=>{if(t.length===0)return!0;let i=t.map(r=>r.toLowerCase());return e.every(r=>{let n=sl(r.name);return n.ok&&i.includes(n.val.toLowerCase())})},Nt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Ai=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,ll=fe({integration_response:fe({data:fe({redirect_url:Ae(),message:xe(Ei(Ae())),button_text:xe(Ei(Ae()))})})}),vr=e=>hr(ll,e).success,cl=fe({integration_response:fe({status:xe(ei()),error:fe({message:Ae(),data:xe(ei())})})}),Zn=e=>hr(cl,e).success,dl=fe({success:Mt(!0),integration_response:fe({data:fe({outcome:Mt("pending"),message:xe(ei())}),error:xe(qn())})}),wr=e=>{let t=hr(dl,e);if(!t.success||vr(e))return;let{message:i}=t.output.integration_response.data;return typeof i=="string"&&i.trim()?{message:i}:{}};fe({success:Mt(!1),message:xe(ei())});var Xn=(e,t)=>{if(!Zn(e))return;let i=e.integration_response,r=i.error.data,n=typeof r=="object"&&r!==null?r:{},a=v=>typeof n[v]=="string"?n[v]:void 0,o=v=>typeof n[v]=="boolean"?n[v]:void 0,s=v=>{let y=n[v];return Number.isSafeInteger(y)&&y>=0?y:void 0},l=v=>{let y=a(v),k=y===void 0?NaN:Date.parse(y);return Number.isFinite(k)?k:void 0},u=typeof i.status=="number"?i.status:t,f=a("phase"),d=a("verdict"),h=a("code"),g=u===409&&f==="submit"&&d==="confirmed"?"duplicate":u===410&&h==="job_closed"?"closed":f==="submit"&&d==="unknown"?"unknown":void 0;return{message:i.error.message,status:u,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:d,code:h,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:g}},Qn=3e4,ul=2e4,fl=6e4,mr=12e4,ea=6*60*6e4,pl=60*6e4,ta=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,i=t===void 0?0:t-Date.now();return i>0&&i<=ea?t:void 0},hl=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=ta(e);return t===void 0?{}:{until:t}},ia=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),gl=(e,t)=>{let i=ta(t);if(i!==void 0)return{waitMs:i-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:Qn};let r=(e??0)+1,n=Math.min(r*ul,fl),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(n,a),mr),throttles:r}},ra=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",bl=e=>{if(!Zn(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},vl=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",wl=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",ml=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,yl=e=>{if(typeof e!="object"||e===null)return null;let t=e.integration_response;if(typeof t!="object"||t===null)return null;let i=t;if(typeof i.status!="number"||i.service!==void 0&&typeof i.service!="string")return null;let r="data"in i,n=i.error,a=typeof n=="object"&&n!==null&&typeof n.message=="string"&&"data"in n;if(!r&&!a)return null;let o=r?i.data:n.data??null;return{service:i.service??"INVALID_SERVICE",response:{status:i.status,payload:o},...wr(e)&&{outcome:"pending"}}},_l=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},xl=(e,t)=>{if(!_l(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},kl=({context:e,schema:t,logger:i})=>{if(t)for(let r in t){let n=t[r];if(!n)continue;let a=ti(e,r.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${r} is required`;throw i.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${r} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${r} is not a string`);break;default:n.type}}};let Ze;function na(e){return{lang:(e==null?void 0:e.lang)??(Ze==null?void 0:Ze.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ze==null?void 0:Ze.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ze==null?void 0:Ze.abortPipeEarly)}}let yr;function Sl(e){return yr==null?void 0:yr.get(e)}let _r;function Cl(e){return _r==null?void 0:_r.get(e)}let xr;function $l(e,t){var i;return(i=xr==null?void 0:xr.get(e))==null?void 0:i.get(t)}function aa(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function Ue(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??aa(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??$l(e.reference,l.lang)??(u?Cl(l.lang):null)??r.message??Sl(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Te(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},na())}}}function El(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Il(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function kr(e,t){return{kind:"validation",type:"max_length",reference:kr,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Ti(e,t){return{kind:"validation",type:"min_length",reference:Ti,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&Ue(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Sr(){return{kind:"transformation",type:"trim",reference:Sr,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Al(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function Fi(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function oa(e,t){return{kind:"schema",type:"array",reference:oa,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Te(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else Ue(this,"type",i,r);return i}}}function Cr(e){return{kind:"schema",type:"boolean",reference:Cr,expects:"boolean",async:!1,message:e,get"~standard"(){return Te(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:Ue(this,"type",t,i),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 Te(this)},"~run"(i,r){return i.value===null&&(this.default!==void 0&&(i.value=Fi(this,i,r)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function ii(e,t){return{kind:"schema",type:"nullish",reference:ii,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Te(this)},"~run"(i,r){return(i.value===null||i.value===void 0)&&(this.default!==void 0&&(i.value=Fi(this,i,r)),i.value===null||i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function kt(e){return{kind:"schema",type:"number",reference:kt,expects:"number",async:!1,message:e,get"~standard"(){return Te(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Ue(this,"type",t,i),t}}}function Fe(e,t){return{kind:"schema",type:"object",reference:Fe,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Te(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:Fi(s),u=s["~run"]({value:l},r);if(u.issues){const f={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=Al(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Ue(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else Ue(this,"type",i,r);return i}}}function sa(e,t){return{kind:"schema",type:"optional",reference:sa,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Te(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=Fi(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Lt(e,t){return{kind:"schema",type:"picklist",reference:Lt,expects:Il(e.map(aa),"|"),async:!1,options:e,message:t,get"~standard"(){return Te(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:Ue(this,"type",i,r),i}}}function $r(e,t,i){return{kind:"schema",type:"record",reference:$r,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Te(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(El(a,l)){const u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.typed=!1;break}}const d=this.value["~run"]({value:u},n);if(d.issues){const h={type:"object",origin:"value",input:a,key:l,value:u};for(const g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else Ue(this,"type",r,n);return r}}}function j(e){return{kind:"schema",type:"string",reference:j,expects:"string",async:!1,message:e,get"~standard"(){return Te(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:Ue(this,"type",t,i),t}}}function la(){return{kind:"schema",type:"unknown",reference:la,expects:"unknown",async:!1,get"~standard"(){return Te(this)},"~run"(e){return e.typed=!0,e}}}function Er(...e){return{...e[0],pipe:e,get"~standard"(){return Te(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Ir(e,t,i){const r=e["~run"]({value:t},na(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var Tl=e=>e,Fl={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Dl(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function ih(e){return e}var Ml=["agent","sdk","form","integration","migration"],Nl=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],Ll=["screening","cv_match","interview","overall"],Vl=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],Ol=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],ca=Lt(Ml),Pl=Lt(Nl),jl=Er(j(),Sr(),Ti(1),kr(100)),Rl=Lt(Ll),Bl=Lt(Vl),zl=Er(j(),Sr(),Ti(1),kr(100)),Ul=Lt(Ol),da=Fe({id:j(),email:J(j()),firstName:J(j()),lastName:J(j()),phone:J(j()),source:J(ca),identifiedAt:J(j()),createdAt:j(),updatedAt:j()}),ua=Er(j(),Ti(1)),Ar=$r(j(),la()),Hl=Fe({id:j(),applicationId:j(),status:Bl,scheduledAt:J(j()),completedAt:J(j()),meta:J(Ar),createdAt:j(),updatedAt:j()}),ql=Fe({score:kt(),reason:j(),confidence:kt()}),fa=Fe({id:j(),candidateId:j(),jobId:kt(),stage:jl,stageGroup:Pl,stageEnteredAt:j(),rating:J(kt()),disqualifiedAt:J(j()),disqualificationReason:J(zl),disqualificationNote:J(j()),source:Ul,sourceDetail:J(j()),sessionId:J(kt()),externalApplicationId:J(j()),meta:J(Ar),context:J(Ar),scoredAt:J(j()),createdAt:j(),updatedAt:j()}),Wl=Fe({id:j(),applicationId:j(),scoreType:Rl,score:J(kt()),reason:J(j()),categories:J($r(j(),ql)),scoredBy:J(j()),createdAt:j()});({...fa.entries},{...da.entries});var Kl=Fe({anonymousId:ua,email:ua,firstName:ii(j()),lastName:ii(j()),phone:ii(j()),source:ii(ca)}),Gl=Fe({candidateId:j(),isNew:Cr()}),Yl=Fe({id:j(),stageGroup:j(),createdAt:j()}),Jl=Fe({isDuplicate:Cr(),existingApplication:sa(Yl)}),Zl=({environment:e,publishableKey:t,logger:i})=>{let r=Fl[e];return{async checkDuplicate(n){try{let a=new URLSearchParams({email:n.email,scope:n.scope});n.scope==="job"&&n.jobId!=null&&a.set("job_id",String(n.jobId));let o=await fetch(`${r}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return i.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Ir(Jl,s);return l.success?l.output:(i.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return i.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return i.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:n.email,firstName:n.firstName,lastName:n.lastName,phone:n.phone,anonymousId:n.anonymousId,source:n.source??"sdk"},o=Ir(Kl,a);if(!o.success)return i.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${r}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return i.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Ir(Gl,await s.json());return l.success?l.output:(i.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return i.error("[TalentBankClient] identify failed:",a),null}}}},pa=el(pr([Ae(),Ii()]),zn(String)),ha=fe({id:pa,version:Ii(),build:Ii(),nodes:Hn(Un()),context_schema:xe(Ei(Wn(Ae(),fe({required:fr(),type:pr([Mt("string"),Mt("number")])}))))}),Xl=fe({flow:ha}),Ql=fe({company:fe({name:Ae()}),flow:ha,job:fe({id:pa,title:Ae()}),user:xe(fe({city:xe(Ae()),country:xe(Ae()),isEU:xe(fr()),continent:xe(Ae())}))}),ec=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),tc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Dl(),response:Ql}},ic={pathname:"/flow/id/:id",method:"GET",schema:{response:Xl}},ri,T,ga,ba,St,va,wa,Tr,ma,Vt={},ya=[],rc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Di=Array.isArray;function Xe(e,t){for(var i in t)e[i]=t[i];return e}function _a(e){var t=e.parentNode;t&&t.removeChild(e)}function Ee(e,t,i){var r,n,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?ri.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return ni(e,o,r,n,null)}function ni(e,t,i,r,n){var a={type:e,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++ga};return n==null&&T.vnode!=null&&T.vnode(a),a}function nc(){return{current:null}}function ne(e){return e.children}function Ne(e,t){this.props=e,this.context=t}function Mi(e,t){if(t==null)return e.__?Mi(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?Mi(e):null}function xa(e){var t,i;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((i=e.__k[t])!=null&&i.__e!=null){e.__e=e.__c.base=i.__e;break}return xa(e)}}function Fr(e){(!e.__d&&(e.__d=!0)&&St.push(e)&&!Ni.__r++||va!==T.debounceRendering)&&((va=T.debounceRendering)||wa)(Ni)}function Ni(){var e,t,i,r,n,a,o,s,l;for(St.sort(Tr);e=St.shift();)e.__d&&(t=St.length,r=void 0,n=void 0,a=void 0,s=(o=(i=e).__v).__e,(l=i.__P)&&(r=[],n=[],(a=Xe({},o)).__v=o.__v+1,Dr(l,o,a,i.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s??Mi(o),o.__h,n),Aa(r,o,n),o.__e!=s&&xa(o)),St.length>t&&St.sort(Tr));Ni.__r=0}function ka(e,t,i,r,n,a,o,s,l,u,f){var d,h,g,v,y,k,_,w,x,E,$=0,F=r&&r.__k||ya,L=F.length,P=L,V=t.length;for(i.__k=[],d=0;d<V;d++)(v=i.__k[d]=(v=t[d])==null||typeof v=="boolean"||typeof v=="function"?null:typeof v=="string"||typeof v=="number"||typeof v=="bigint"?ni(null,v,null,null,v):Di(v)?ni(ne,{children:v},null,null,null):v.__b>0?ni(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null&&(v.__=i,v.__b=i.__b+1,(w=ac(v,F,_=d+$,P))===-1?g=Vt:(g=F[w]||Vt,F[w]=void 0,P--),Dr(e,v,g,n,a,o,s,l,u,f),y=v.__e,(h=v.ref)&&g.ref!=h&&(g.ref&&Mr(g.ref,null,v),f.push(h,v.__c||y,v)),y!=null&&(k==null&&(k=y),E=!(x=g===Vt||g.__v===null)&&w===_,x?w==-1&&$--:w!==_&&(w===_+1?($++,E=!0):w>_?P>V-_?($+=w-_,E=!0):$--:$=w<_&&w==_-1?w-_:0),_=d+$,E=E||w==d&&!x,typeof v.type!="function"||w===_&&g.__k!==v.__k?typeof v.type=="function"||E?v.__d!==void 0?(l=v.__d,v.__d=void 0):l=y.nextSibling:l=Ca(e,y,l):l=Sa(v,l,e),typeof i.type=="function"&&(i.__d=l)));for(i.__e=k,d=L;d--;)F[d]!=null&&(typeof i.type=="function"&&F[d].__e!=null&&F[d].__e==i.__d&&(i.__d=F[d].__e.nextSibling),Ta(F[d],F[d]))}function Sa(e,t,i){for(var r,n=e.__k,a=0;n&&a<n.length;a++)(r=n[a])&&(r.__=e,t=typeof r.type=="function"?Sa(r,t,i):Ca(i,r.__e,t));return t}function Qe(e,t){return t=t||[],e==null||typeof e=="boolean"||(Di(e)?e.some(function(i){Qe(i,t)}):t.push(e)),t}function Ca(e,t,i){return i==null||i.parentNode!==e?e.insertBefore(t,null):t==i&&t.parentNode!=null||e.insertBefore(t,i),t.nextSibling}function ac(e,t,i,r){var n=e.key,a=e.type,o=i-1,s=i+1,l=t[i];if(l===null||l&&n==l.key&&a===l.type)return i;if(r>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&n==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&n==l.key&&a===l.type)return s;s++}}return-1}function oc(e,t,i,r,n){var a;for(a in i)a==="children"||a==="key"||a in t||Li(e,a,null,i[a],r);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||i[a]===t[a]||Li(e,a,t[a],i[a],r)}function $a(e,t,i){t[0]==="-"?e.setProperty(t,i??""):e[t]=i==null?"":typeof i!="number"||rc.test(t)?i:i+"px"}function Li(e,t,i,r,n){var a;e:if(t==="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)i&&t in i||$a(e.style,t,"");if(i)for(t in i)r&&i[t]===r[t]||$a(e.style,t,i[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=i,i?r||e.addEventListener(t,a?Ia:Ea,a):e.removeEventListener(t,a?Ia:Ea,a);else if(t!=="dangerouslySetInnerHTML"){if(n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,i))}}function Ea(e){return this.l[e.type+!1](T.event?T.event(e):e)}function Ia(e){return this.l[e.type+!0](T.event?T.event(e):e)}function Dr(e,t,i,r,n,a,o,s,l,u){var f,d,h,g,v,y,k,_,w,x,E,$,F,L,P,V=t.type;if(t.constructor!==void 0)return null;i.__h!=null&&(l=i.__h,s=t.__e=i.__e,t.__h=null,a=[s]),(f=T.__b)&&f(t);try{e:if(typeof V=="function"){if(_=t.props,w=(f=V.contextType)&&r[f.__c],x=f?w?w.props.value:f.__:r,i.__c?k=(d=t.__c=i.__c).__=d.__E:("prototype"in V&&V.prototype.render?t.__c=d=new V(_,x):(t.__c=d=new Ne(_,x),d.constructor=V,d.render=lc),w&&w.sub(d),d.props=_,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),V.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Xe({},d.__s)),Xe(d.__s,V.getDerivedStateFromProps(_,d.__s))),g=d.props,v=d.state,d.__v=t,h)V.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(V.getDerivedStateFromProps==null&&_!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,x),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(_,d.__s,x)===!1||t.__v===i.__v)){for(t.__v!==i.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.forEach(function(z){z&&(z.__=t)}),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,x),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,v,y)})}if(d.context=x,d.props=_,d.__P=e,d.__e=!1,$=T.__r,F=0,"prototype"in V&&V.prototype.render){for(d.state=d.__s,d.__d=!1,$&&$(t),f=d.render(d.props,d.state,d.context),L=0;L<d._sb.length;L++)d.__h.push(d._sb[L]);d._sb=[]}else do d.__d=!1,$&&$(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++F<25);d.state=d.__s,d.getChildContext!=null&&(r=Xe(Xe({},r),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(y=d.getSnapshotBeforeUpdate(g,v)),ka(e,Di(P=f!=null&&f.type===ne&&f.key==null?f.props.children:f)?P:[P],t,i,r,n,a,o,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),k&&(d.__E=d.__=null)}else a==null&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=sc(i.__e,t,i,r,n,a,o,l,u);(f=T.diffed)&&f(t)}catch(z){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),T.__e(z,t,i)}}function Aa(e,t,i){for(var r=0;r<i.length;r++)Mr(i[r],i[++r],i[++r]);T.__c&&T.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){T.__e(a,n.__v)}})}function sc(e,t,i,r,n,a,o,s,l){var u,f,d,h=i.props,g=t.props,v=t.type,y=0;if(v==="svg"&&(n=!0),a!=null){for(;y<a.length;y++)if((u=a[y])&&"setAttribute"in u==!!v&&(v?u.localName===v:u.nodeType===3)){e=u,a[y]=null;break}}if(e==null){if(v===null)return document.createTextNode(g);e=n?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,g.is&&g),a=null,s=!1}if(v===null)h===g||s&&e.data===g||(e.data=g);else{if(a=a&&ri.call(e.childNodes),f=(h=i.props||Vt).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},y=0;y<e.attributes.length;y++)h[e.attributes[y].name]=e.attributes[y].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(oc(e,g,h,n,s),d)t.__k=[];else if(ka(e,Di(y=t.props.children)?y:[y],t,i,r,n&&v!=="foreignObject",a,o,a?a[0]:i.__k&&Mi(i,0),s,l),a!=null)for(y=a.length;y--;)a[y]!=null&&_a(a[y]);s||("value"in g&&(y=g.value)!==void 0&&(y!==e.value||v==="progress"&&!y||v==="option"&&y!==h.value)&&Li(e,"value",y,h.value,!1),"checked"in g&&(y=g.checked)!==void 0&&y!==e.checked&&Li(e,"checked",y,h.checked,!1))}return e}function Mr(e,t,i){try{typeof e=="function"?e(t):e.current=t}catch(r){T.__e(r,i)}}function Ta(e,t,i){var r,n;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Mr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){T.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&Ta(r[n],t,i||typeof e.type!="function");i||e.__e==null||_a(e.__e),e.__=e.__e=e.__d=void 0}function lc(e,t,i){return this.constructor(e,i)}function Ct(e,t,i){var r,n,a,o;T.__&&T.__(e,t),n=(r=typeof i=="function")?null:i&&i.__k||t.__k,a=[],o=[],Dr(t,e=(!r&&i||t).__k=Ee(ne,null,[e]),n||Vt,Vt,t.ownerSVGElement!==void 0,!r&&i?[i]:n?null:t.firstChild?ri.call(t.childNodes):null,a,!r&&i?i:n?n.__e:t.firstChild,r,o),Aa(a,e,o)}function Fa(e,t){Ct(e,t,Fa)}function cc(e,t,i){var r,n,a,o,s=Xe({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?n=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ri.call(arguments,2):i),ni(e.type,s,r||e.key,n||e.ref,null)}function Da(e,t){var i={__c:t="__cC"+ma++,__:e,Consumer:function(r,n){return r.children(n)},Provider:function(r){var n,a;return this.getChildContext||(n=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Fr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),r.children}};return i.Provider.__=i.Consumer.contextType=i}ri=ya.slice,T={__e:function(e,t,i,r){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,r||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},ga=0,ba=function(e){return e!=null&&e.constructor===void 0},Ne.prototype.setState=function(e,t){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xe({},this.state),typeof e=="function"&&(e=e(Xe({},i),this.props)),e&&Xe(i,e),e!=null&&this.__v&&(t&&this._sb.push(t),Fr(this))},Ne.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fr(this))},Ne.prototype.render=ne,St=[],wa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Tr=function(e,t){return e.__v.__b-t.__v.__b},Ni.__r=0,ma=0;function Ma(e){var t,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(i=Ma(e[t]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function et(){for(var e,t,i=0,r="",n=arguments.length;i<n;i++)(e=arguments[i])&&(t=Ma(e))&&(r&&(r+=" "),r+=t);return r}const Na=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,La=et,$t=(e,t)=>i=>{var r;if((t==null?void 0:t.variants)==null)return La(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(u=>{const f=i==null?void 0:i[u],d=a==null?void 0:a[u];if(f===null)return null;const h=Na(f)||Na(d);return n[u][h]}),s=i&&Object.entries(i).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:h,...g}=f;return Object.entries(g).every(v=>{let[y,k]=v;return Array.isArray(k)?k.includes({...a,...s}[y]):{...a,...s}[y]===k})?[...u,d,h]:u},[]);return La(e,o,l,i==null?void 0:i.class,i==null?void 0:i.className)};var lt,Q,Nr,Va,Ot=0,Oa=[],Vi=[],Pa=T.__b,ja=T.__r,Ra=T.diffed,Ba=T.__c,za=T.unmount;function Pt(e,t){T.__h&&T.__h(Q,e,Ot||t),Ot=0;var i=Q.__H||(Q.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:Vi}),i.__[e]}function Le(e){return Ot=1,Ua(Wa,e)}function Ua(e,t,i){var r=Pt(lt++,2);if(r.t=e,!r.__c&&(r.__=[i?i(t):Wa(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,s);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.u)){var n=function(s,l,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!a||a.call(this,s,l,u);var d=!1;return f.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(d=!0)}}),!(!d&&r.__c.props===s)&&(!a||a.call(this,s,l,u))};Q.u=!0;var a=Q.shouldComponentUpdate,o=Q.componentWillUpdate;Q.componentWillUpdate=function(s,l,u){if(this.__e){var f=a;a=void 0,n(s,l,u),a=f}o&&o.call(this,s,l,u)},Q.shouldComponentUpdate=n}return r.__N||r.__}function Oi(e,t){var i=Pt(lt++,3);!T.__s&&Vr(i.__H,t)&&(i.__=e,i.i=t,Q.__H.__h.push(i))}function ke(e,t){var i=Pt(lt++,4);!T.__s&&Vr(i.__H,t)&&(i.__=e,i.i=t,Q.__h.push(i))}function Se(e){return Ot=5,ct(function(){return{current:e}},[])}function dc(e,t,i){Ot=6,ke(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},i==null?i:i.concat(e))}function ct(e,t){var i=Pt(lt++,7);return Vr(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function uc(e,t){return Ot=8,ct(function(){return e},t)}function Ha(e){var t=Q.context[e.__c],i=Pt(lt++,9);return i.c=e,t?(i.__==null&&(i.__=!0,t.sub(Q)),t.props.value):e.__}function fc(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function pc(){var e=Pt(lt++,11);if(!e.__){for(var t=Q.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var i=t.__m||(t.__m=[0,0]);e.__="P"+i[0]+"-"+i[1]++}return e.__}function hc(){for(var e;e=Oa.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Pi),e.__H.__h.forEach(Lr),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){Q=null,Pa&&Pa(e)},T.__r=function(e){ja&&ja(e),lt=0;var t=(Q=e.__c).__H;t&&(Nr===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(i){i.__N&&(i.__=i.__N),i.__V=Vi,i.__N=i.i=void 0})):(t.__h.forEach(Pi),t.__h.forEach(Lr),t.__h=[],lt=0)),Nr=Q},T.diffed=function(e){Ra&&Ra(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Oa.push(t)!==1&&Va===T.requestAnimationFrame||((Va=T.requestAnimationFrame)||gc)(hc)),t.__H.__.forEach(function(i){i.i&&(i.__H=i.i),i.__V!==Vi&&(i.__=i.__V),i.i=void 0,i.__V=Vi})),Nr=Q=null},T.__c=function(e,t){t.some(function(i){try{i.__h.forEach(Pi),i.__h=i.__h.filter(function(r){return!r.__||Lr(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],T.__e(r,i.__v)}}),Ba&&Ba(e,t)},T.unmount=function(e){za&&za(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach(function(r){try{Pi(r)}catch(n){t=n}}),i.__H=void 0,t&&T.__e(t,i.__v))};var qa=typeof requestAnimationFrame=="function";function gc(e){var t,i=function(){clearTimeout(r),qa&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(i,100);qa&&(t=requestAnimationFrame(i))}function Pi(e){var t=Q,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),Q=t}function Lr(e){var t=Q;e.__c=e.__(),Q=t}function Vr(e,t){return!e||e.length!==t.length||t.some(function(i,r){return i!==e[r]})}function Wa(e,t){return typeof t=="function"?t(e):t}function Ka(e,t){for(var i in t)e[i]=t[i];return e}function Or(e,t){for(var i in e)if(i!=="__source"&&!(i in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function jr(e){this.props=e}function bc(e,t){function i(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,n)||!o:Or(this.props,n)}function r(n){return this.shouldComponentUpdate=i,Ee(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(jr.prototype=new Ne).isPureReactComponent=!0,jr.prototype.shouldComponentUpdate=function(e,t){return Or(this.props,e)||Or(this.state,t)};var Ga=T.__b;T.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ga&&Ga(e)};var vc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(e){function t(i){var r=Ka({},i);return delete r.ref,e(r,i.ref||null)}return t.$$typeof=vc,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ya=function(e,t){return e==null?null:Qe(Qe(e).map(t))},wc={map:Ya,forEach:Ya,count:function(e){return e?Qe(e).length:0},only:function(e){var t=Qe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Qe},mc=T.__e;T.__e=function(e,t,i,r){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=i.__e,t.__k=i.__k),n.__c(e,t)}mc(e,t,i,r)};var Ja=T.unmount;function Za(e,t,i){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Ka({},e)).__c!=null&&(e.__c.__P===i&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Za(r,t,i)})),e}function Xa(e,t,i){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Xa(r,t,i)}),e.__c&&e.__c.__P===t&&(e.__e&&i.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=i)),e}function ai(){this.__u=0,this.t=null,this.__b=null}function Qa(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function eo(e){var t,i,r;function n(a){if(t||(t=e()).then(function(o){i=o.default||o},function(o){r=o}),r)throw r;if(!i)throw t;return Ee(i,a)}return n.displayName="Lazy",n.__f=!0,n}function oi(){this.u=null,this.o=null}T.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ja&&Ja(e)},(ai.prototype=new Ne).__c=function(e,t){var i=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(i);var n=Qa(r.__v),a=!1,o=function(){a||(a=!0,i.__R=null,n?n(s):s())};i.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Xa(u,u.__c.__P,u.__c.__O)}var f;for(r.setState({__a:r.__b=null});f=r.t.pop();)f.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ai.prototype.componentWillUnmount=function(){this.t=[]},ai.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Za(this.__b,i,r.__O=r.__P)}this.__b=null}var n=t.__a&&Ee(ne,null,e.fallback);return n&&(n.__h=null),[Ee(ne,null,t.__a?null:e.children),n]};var to=function(e,t,i){if(++i[1]===i[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(i=e.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;e.u=i=i[2]}};function yc(e){return this.getChildContext=function(){return e.context},e.children}function _c(e){var t=this,i=e.i;t.componentWillUnmount=function(){Ct(null,t.l),t.l=null,t.i=null},t.i&&t.i!==i&&t.componentWillUnmount(),e.__v?(t.l||(t.i=i,t.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,n){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Ct(Ee(yc,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function xc(e,t){var i=Ee(_c,{__v:e,i:t});return i.containerInfo=t,i}(oi.prototype=new Ne).__a=function(e){var t=this,i=Qa(t.__v),r=t.o.get(e);return r[0]++,function(n){var a=function(){t.props.revealOrder?(r.push(n),to(t,e,r)):n()};i?i(a):a()}},oi.prototype.render=function(e){this.u=null,this.o=new Map;var t=Qe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var i=t.length;i--;)this.o.set(t[i],this.u=[1,0,this.u]);return e.children},oi.prototype.componentDidUpdate=oi.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,i){to(e,i,t)})};var io=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,kc=/^(?: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]/,Sc=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Cc=/[A-Z0-9]/g,$c=typeof document<"u",Ec=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ic(e,t,i){return t.__k==null&&(t.textContent=""),Ct(e,t),typeof i=="function"&&i(),e?e.__c:null}function Ac(e,t,i){return Fa(e,t),typeof i=="function"&&i(),e?e.__c:null}Ne.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ne.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ro=T.event;function Tc(){}function Fc(){return this.cancelBubble}function Dc(){return this.defaultPrevented}T.event=function(e){return ro&&(e=ro(e)),e.persist=Tc,e.isPropagationStopped=Fc,e.isDefaultPrevented=Dc,e.nativeEvent=e};var Br,Mc={enumerable:!1,configurable:!0,get:function(){return this.class}},no=T.vnode;T.vnode=function(e){typeof e.type=="string"&&function(t){var i=t.props,r=t.type,n={};for(var a in i){var o=i[a];if(!(a==="value"&&"defaultValue"in i&&o==null||$c&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in i&&i.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||r!=="input"&&r!=="textarea"||Ec(i.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Sc.test(a)?a=s:r.indexOf("-")===-1&&kc.test(a)?a=a.replace(Cc,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}r=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),r=="select"&&n.defaultValue!=null&&(n.value=Qe(i.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),i.class&&!i.className?(n.class=i.class,Object.defineProperty(n,"className",Mc)):(i.className&&!i.class||i.class&&i.className)&&(n.class=n.className=i.className),t.props=n}(e),e.$$typeof=io,no&&no(e)};var ao=T.__r;T.__r=function(e){ao&&ao(e),Br=e.__c};var oo=T.diffed;T.diffed=function(e){oo&&oo(e);var t=e.props,i=e.__e;i!=null&&e.type==="textarea"&&"value"in t&&t.value!==i.value&&(i.value=t.value==null?"":t.value),Br=null};var Nc={ReactCurrentDispatcher:{current:{readContext:function(e){return Br.__n[e.__c].props.value}}}};function Lc(e){return Ee.bind(null,e)}function so(e){return!!e&&e.$$typeof===io}function Vc(e){return so(e)?cc.apply(null,arguments):e}function Oc(e){return!!e.__k&&(Ct(null,e),!0)}function Pc(e){return e&&(e.base||e.nodeType===1&&e)||null}var jc=function(e,t){return e(t)},Rc=function(e,t){return e(t)},Bc=ne;function lo(e){e()}function zc(e){return e}function Uc(){return[!1,lo]}var Hc=ke;function qc(e,t){var i=t(),r=Le({h:{__:i,v:t}}),n=r[0].h,a=r[1];return ke(function(){n.__=i,n.v=t,Pr(n.__,t())||a({h:n})},[e,i,t]),Oi(function(){return Pr(n.__,n.v())||a({h:n}),e(function(){Pr(n.__,n.v())||a({h:n})})},[e]),i}var be={useState:Le,useId:pc,useReducer:Ua,useEffect:Oi,useLayoutEffect:ke,useInsertionEffect:Hc,useTransition:Uc,useDeferredValue:zc,useSyncExternalStore:qc,startTransition:lo,useRef:Se,useImperativeHandle:dc,useMemo:ct,useCallback:uc,useContext:Ha,useDebugValue:fc,version:"17.0.2",Children:wc,render:Ic,hydrate:Ac,unmountComponentAtNode:Oc,createPortal:xc,createElement:Ee,createContext:Da,createFactory:Lc,cloneElement:Vc,createRef:nc,Fragment:ne,isValidElement:so,findDOMNode:Pc,Component:Ne,PureComponent:jr,memo:bc,forwardRef:Rr,flushSync:Rc,unstable_batchedUpdates:jc,StrictMode:Bc,Suspense:ai,SuspenseList:oi,lazy:eo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Nc};const ve=Symbol.for("@ts-pattern/matcher"),co=Symbol.for("@ts-pattern/isVariadic"),ji="@ts-pattern/anonymous-select-key",zr=e=>!!(e&&typeof e=="object"),Ri=e=>e&&!!e[ve],ae=(e,t,i)=>{if(Ri(e)){const r=e[ve](),{matched:n,selections:a}=r.match(t);return n&&a&&Object.keys(a).forEach(o=>i(o,a[o])),n}if(zr(e)){if(!zr(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],n=[],a=[];for(const o of e.keys()){const s=e[o];Ri(s)&&s[co]?a.push(s):a.length?n.push(s):r.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+n.length)return!1;const o=t.slice(0,r.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(r.length,n.length===0?1/0:-n.length);return r.every((u,f)=>ae(u,o[f],i))&&n.every((u,f)=>ae(u,s[f],i))&&(a.length===0||ae(a[0],l,i))}return e.length===t.length&&e.every((o,s)=>ae(o,t[s],i))}return Reflect.ownKeys(e).every(r=>{const n=e[r];return(r in t||Ri(a=n)&&a[ve]().matcherType==="optional")&&ae(n,t[r],i);var a})}return Object.is(t,e)},we=e=>{var t,i,r;return zr(e)?Ri(e)?(t=(i=(r=e[ve]()).getSelectionKeys)==null?void 0:i.call(r))!=null?t:[]:Array.isArray(e)?si(e,we):si(Object.values(e),we):[]},si=(e,t)=>e.reduce((i,r)=>i.concat(t(r)),[]);function Wc(...e){if(e.length===1){const[t]=e;return i=>ae(t,i,()=>{})}if(e.length===2){const[t,i]=e;return ae(t,i,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ce(e){return Object.assign(e,{optional:()=>Hr(e),and:t=>ee(e,t),or:t=>uo(e,t),select:t=>t===void 0?li(e):li(t,e)})}function Ur(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let i=0;const r=[{value:Object.assign(t,{[co]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=r[i++])!=null?n:r.at(-1)}}}}))(e),{optional:()=>Ur(Hr(e)),select:t=>Ur(t===void 0?li(e):li(t,e))})}function Hr(e){return ce({[ve]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return t===void 0?(we(e).forEach(n=>r(n,void 0)),{matched:!0,selections:i}):{matched:ae(e,t,r),selections:i}},getSelectionKeys:()=>we(e),matcherType:"optional"})})}const Kc=(e,t)=>{for(const i of e)if(!t(i))return!1;return!0},Gc=(e,t)=>{for(const[i,r]of e.entries())if(!t(r,i))return!1;return!0},Yc=(e,t)=>{const i=Reflect.ownKeys(e);for(const r of i)if(!t(r,e[r]))return!1;return!0};function ee(...e){return ce({[ve]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return{matched:e.every(n=>ae(n,t,r)),selections:i}},getSelectionKeys:()=>si(e,we),matcherType:"and"})})}function uo(...e){return ce({[ve]:()=>({match:t=>{let i={};const r=(n,a)=>{i[n]=a};return si(e,we).forEach(n=>r(n,void 0)),{matched:e.some(n=>ae(n,t,r)),selections:i}},getSelectionKeys:()=>si(e,we),matcherType:"or"})})}function U(e){return{[ve]:()=>({match:t=>({matched:!!e(t)})})}}function li(...e){const t=typeof e[0]=="string"?e[0]:void 0,i=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ce({[ve]:()=>({match:r=>{let n={[t??ji]:r};return{matched:i===void 0||ae(i,r,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??ji].concat(i===void 0?[]:we(i))})})}function fo(e){return!0}function He(e){return typeof e=="number"}function dt(e){return typeof e=="string"}function ut(e){return typeof e=="bigint"}const po=ce(U(fo)),Jc=ce(U(fo)),Zc=po,ft=e=>Object.assign(ce(e),{startsWith:t=>{return ft(ee(e,(i=t,U(r=>dt(r)&&r.startsWith(i)))));var i},endsWith:t=>{return ft(ee(e,(i=t,U(r=>dt(r)&&r.endsWith(i)))));var i},minLength:t=>ft(ee(e,(i=>U(r=>dt(r)&&r.length>=i))(t))),length:t=>ft(ee(e,(i=>U(r=>dt(r)&&r.length===i))(t))),maxLength:t=>ft(ee(e,(i=>U(r=>dt(r)&&r.length<=i))(t))),includes:t=>{return ft(ee(e,(i=t,U(r=>dt(r)&&r.includes(i)))));var i},regex:t=>{return ft(ee(e,(i=t,U(r=>dt(r)&&!!r.match(i)))));var i}}),ho=ft(U(dt)),qe=e=>Object.assign(ce(e),{between:(t,i)=>qe(ee(e,((r,n)=>U(a=>He(a)&&r<=a&&n>=a))(t,i))),lt:t=>qe(ee(e,(i=>U(r=>He(r)&&r<i))(t))),gt:t=>qe(ee(e,(i=>U(r=>He(r)&&r>i))(t))),lte:t=>qe(ee(e,(i=>U(r=>He(r)&&r<=i))(t))),gte:t=>qe(ee(e,(i=>U(r=>He(r)&&r>=i))(t))),int:()=>qe(ee(e,U(t=>He(t)&&Number.isInteger(t)))),finite:()=>qe(ee(e,U(t=>He(t)&&Number.isFinite(t)))),positive:()=>qe(ee(e,U(t=>He(t)&&t>0))),negative:()=>qe(ee(e,U(t=>He(t)&&t<0)))}),Xc=qe(U(He)),pt=e=>Object.assign(ce(e),{between:(t,i)=>pt(ee(e,((r,n)=>U(a=>ut(a)&&r<=a&&n>=a))(t,i))),lt:t=>pt(ee(e,(i=>U(r=>ut(r)&&r<i))(t))),gt:t=>pt(ee(e,(i=>U(r=>ut(r)&&r>i))(t))),lte:t=>pt(ee(e,(i=>U(r=>ut(r)&&r<=i))(t))),gte:t=>pt(ee(e,(i=>U(r=>ut(r)&&r>=i))(t))),positive:()=>pt(ee(e,U(t=>ut(t)&&t>0))),negative:()=>pt(ee(e,U(t=>ut(t)&&t<0)))}),Qc=pt(U(ut)),ed=ce(U(function(e){return typeof e=="boolean"})),td=ce(U(function(e){return typeof e=="symbol"})),id=ce(U(function(e){return e==null})),rd=ce(U(function(e){return e!=null}));var ci={__proto__:null,matcher:ve,optional:Hr,array:function(...e){return Ur({[ve]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const i=e[0];let r={};if(t.length===0)return we(i).forEach(a=>{r[a]=[]}),{matched:!0,selections:r};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])};return{matched:t.every(a=>ae(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:we(e[0])})})},set:function(...e){return ce({[ve]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};if(e.length===0)return{matched:!0};const r=(a,o)=>{i[a]=(i[a]||[]).concat([o])},n=e[0];return{matched:Kc(t,a=>ae(n,a,r)),selections:i}},getSelectionKeys:()=>e.length===0?[]:we(e[0])})})},map:function(...e){return ce({[ve]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let i={};if(t.size===0)return{matched:!0,selections:i};const r=(s,l)=>{i[s]=(i[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var n;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);const[a,o]=e;return{matched:Gc(t,(s,l)=>{const u=ae(a,l,r),f=ae(o,s,r);return u&&f}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[...we(e[0]),...we(e[1])]})})},record:function(...e){return ce({[ve]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var i;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);let r={};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])},[a,o]=e.length===1?[ho,e[0]]:e;return{matched:Yc(t,(s,l)=>{const u=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=u!==null&&ae(a,u,n),d=ae(a,s,n),h=ae(o,l,n);return(d||f)&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...we(e[0]),...we(e[1])]})})},intersection:ee,union:uo,not:function(e){return ce({[ve]:()=>({match:t=>({matched:!ae(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:U,select:li,any:po,unknown:Jc,_:Zc,string:ho,number:Xc,bigint:Qc,boolean:ed,symbol:td,nullish:id,nonNullable:rd,instanceOf:function(e){return ce(U(function(t){return i=>i instanceof t}(e)))},shape:function(e){return ce(U(Wc(e)))}};class nd extends Error{constructor(t){let i;try{i=JSON.stringify(t)}catch{i=t}super(`Pattern matching error: no pattern matches value ${i}`),this.input=void 0,this.input=t}}const qr={matched:!1,value:void 0};function Bi(e){return new ad(e,qr)}let ad=class Rn{constructor(t,i){this.input=void 0,this.state=void 0,this.input=t,this.state=i}with(...t){if(this.state.matched)return this;const i=t[t.length-1],r=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(u,f)=>{a=!0,o[u]=f},l=!r.some(u=>ae(u,this.input,s))||n&&!n(this.input)?qr:{matched:!0,value:i(a?ji in o?o[ji]:o:this.input,this.input)};return new Rn(this.input,l)}when(t,i){if(this.state.matched)return this;const r=!!t(this.input);return new Rn(this.input,r?{matched:!0,value:i(this.input,this.input)}:qr)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=od){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function od(e){throw new nd(e)}var sd=["other","few","many","two","one","zero"],go=({terms:e,overrides:t,locale:i})=>{const r=new Intl.PluralRules(i);function n(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,u)=>{var f;return((f=o==null?void 0:o[u])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=r.select(o.count);if(!(l in s)){const u=sd.find(f=>f in s);if(!u)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=u}return s[l].replace(/{{(\w+)}}/g,(u,f)=>{var d;return((d=o==null?void 0:o[f])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},ld=0;function c(e,t,i,r,n,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var u={type:e,props:l,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ld,__source:n,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return T.vnode&&T.vnode(u),u}var bo=Da(null),vo=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:i,locale:r})=>{const n=ct(()=>go({locale:r,terms:e,overrides:t}),[t,r]);return c(bo.Provider,{value:{t:n,locale:r},children:i})},useTranslation:()=>{const t=Ha(bo);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:i})=>go({terms:e,overrides:t,locale:i})}),{TranslationProvider:rh,useTranslation:nh,createTFunction:ah,defaultTerms:cd}=vo({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_pending:"Thanks, we've received your application and are processing it.",submission_failed:"Failed to submit",submission_provider_maintenance:"Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Your answers are saved, so you can come back after then and submit your application. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Your answers are saved, so you can come back after then and submit your application. We apologise for the inconvenience.",submission_available_at:"Submit will be available again at {{time}}.",resume_prompt:"You have an unfinished application for this role. Continue where you left off?",resume_continue:"Continue",resume_start_again:"Start again",captcha_failed:"Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.",close_application:"Close application",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_empty:"Please enter a value",validation_date:"Please enter a valid date (YYYY-MM-DD)",validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_min:{one:"Please upload at least one file",other:"Please only upload at least {{count}} files"},validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_file_size:"Your file is too big. Please upload a file smaller than {{size}}",validation_file_empty:"This file is empty. If it’s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.",validation_required:"This field is required.",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"},optional:"optional"});const{TranslationProvider:dd,useTranslation:oe,createTFunction:ud}=vo({...cd,error_heading:"Something unexpected happened",undo:"Change answer",conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"This role is no longer accepting applications.",submission_duplicate:"You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.",submission_duplicate_earlier_attempt:"You've already applied for this role. If that doesn't sound right, it's most likely a hiccup from your earlier attempt — don't worry, we have your application.",submission_retryable:"We couldn't submit your application. Please try again.",submission_failed:"We couldn't submit your application. Choose Restart to try again.",submission_unknown:"We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.",submission_unknown_do_not_resubmit:"We couldn't confirm whether your application went through, and submitting it again won't help. Please don't keep resubmitting — check your email for a confirmation, or contact the employer if nothing arrives.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",submission_cooldown:{one:"Submit will be available again in {{count}} second.",other:"Submit will be available again in {{count}} seconds."},submission_cooldown_ready:"Submit is available again.",captcha_check:"One quick check before we send your application",submission_still_working:"Still working — the employer's application system is taking a little longer than usual. Please keep this window open.",file_preparing:{one:"Preparing your file…",other:"Preparing your files…"},file_ready:{one:"Your file is ready to send",other:"Your files are ready to send"},file_read_error:"We couldn't read this file. Select it again or choose another file.",file_read_error_replacement:"We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.",address_error:"We couldn't search for that address. Try again, or fill it in manually.",address_searching:"Searching addresses…",address_no_results:"We couldn't find that address. Check the spelling or postcode, or fill it in manually.",maximize:"Maximise",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",file_more:{one:"+{{count}} file",other:"+{{count}} files"},loading:"Loading",minimize:"Minimise"}),oh="";function tt(e,t){if(!e)throw new Error(t)}var Wr=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(Wr):Object.keys(e).sort().reduce((t,i)=>(t[i]=Wr(e[i]),t),{}),fd=e=>{let t=JSON.stringify(Wr(e)),i=5381;for(let r=0;r<t.length;r++)i=i*33^t.charCodeAt(r);return(i>>>0).toString(36)},pd=Symbol.for("preact-signals");function Kr(){if(jt>1)jt--;else{for(var e,t=!1;di!==void 0;){var i=di;for(di=void 0,Gr++;i!==void 0;){var r=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&mo(i))try{i.c()}catch(n){t||(e=n,t=!0)}i=r}}if(Gr=0,jt--,t)throw e}}var Z=void 0,di=void 0,jt=0,Gr=0,zi=0;function wo(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function pe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}pe.prototype.brand=pd,pe.prototype.h=function(){return!0},pe.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},pe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,i=e.x;t!==void 0&&(t.x=i,e.e=void 0),i!==void 0&&(i.e=t,e.x=void 0),e===this.t&&(this.t=i)}},pe.prototype.subscribe=function(e){var t=this;return Jr(function(){var i=t.value,r=Z;Z=void 0;try{e(i)}finally{Z=r}})},pe.prototype.valueOf=function(){return this.value},pe.prototype.toString=function(){return this.value+""},pe.prototype.toJSON=function(){return this.value},pe.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(pe.prototype,"value",{get:function(){var e=wo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Gr>100)throw new Error("Cycle detected");this.v=e,this.i++,zi++,jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Kr()}}}});function Ve(e){return new pe(e)}function mo(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function yo(e){for(var t=e.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function _o(e){for(var t=e.s,i=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=i}function Rt(e){pe.call(this,void 0),this.x=e,this.s=void 0,this.g=zi-1,this.f=4}(Rt.prototype=new pe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===zi))return!0;if(this.g=zi,this.f|=1,this.i>0&&!mo(this))return this.f&=-2,!0;var e=Z;try{yo(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return Z=e,_o(this),this.f&=-2,!0},Rt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}pe.prototype.S.call(this,e)},Rt.prototype.U=function(e){if(this.t!==void 0&&(pe.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Rt.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(Rt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=wo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function hd(e){return new Rt(e)}function xo(e){var t=e.u;if(e.u=void 0,typeof t=="function"){jt++;var i=Z;Z=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Yr(e),r}finally{Z=i,Kr()}}}function Yr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,xo(e)}function gd(e){if(Z!==this)throw new Error("Out-of-order effect");_o(this),Z=e,this.f&=-2,8&this.f&&Yr(this),Kr()}function ui(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}ui.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()}},ui.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,xo(this),yo(this),jt++;var e=Z;return Z=this,gd.bind(this,e)},ui.prototype.N=function(){2&this.f||(this.f|=2,this.o=di,di=this)},ui.prototype.d=function(){this.f|=8,1&this.f||Yr(this)};function Jr(e){var t=new ui(e);try{t.c()}catch(i){throw t.d(),i}return t.d.bind(t)}var Zr;function Bt(e,t){T[e]=t.bind(null,T[e]||function(){})}function Ui(e){Zr&&Zr(),Zr=e&&e.S()}function ko(e){var t=this,i=e.data,r=vd(i);r.value=i;var n=ct(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!ba(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},hd(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}ko.displayName="_st",Object.defineProperties(pe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ko},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Bt("__b",function(e,t){if(typeof t.type=="string"){var i,r=t.props;for(var n in r)if(n!=="children"){var a=r[n];a instanceof pe&&(i||(t.__np=i={}),i[n]=a,r[n]=a.peek())}}e(t)}),Bt("__r",function(e,t){Ui();var i,r=t.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(n){var a;return Jr(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),Ui(i),e(t)}),Bt("__e",function(e,t,i,r){Ui(),e(t,i,r)}),Bt("diffed",function(e,t){Ui();var i;if(typeof t.type=="string"&&(i=t.__e)){var r=t.__np,n=t.props;if(r){var a=i.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in r)&&(s.d(),a[o]=void 0)}else i.U=a={};for(var l in r){var u=a[l],f=r[l];u===void 0?(u=bd(i,l,f,n),a[l]=u):u.o(f,n)}}}e(t)});function bd(e,t,i,r){var n=t in e&&e.ownerSVGElement===void 0,a=Ve(i);return{o:function(o,s){a.value=o,r=s},d:Jr(function(){var o=a.value.value;r[t]!==o&&(r[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Bt("unmount",function(e,t){if(typeof t.type=="string"){var i=t.__e;if(i){var r=i.U;if(r){i.U=void 0;for(var n in r){var a=r[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Bt("__h",function(e,t,i,r){(r<3||r===9)&&(t.__$f|=2),e(t,i,r)}),Ne.prototype.shouldComponentUpdate=function(e,t){var i=this.__$u;if(!(i&&i.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var n in e)if(n!=="__source"&&e[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function vd(e){return ct(function(){return Ve(e)},[])}const Xr=(e,t)=>t.some(i=>e instanceof i);let So,Co;function wd(){return So||(So=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function md(){return Co||(Co=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Qr=new WeakMap,en=new WeakMap,Hi=new WeakMap;function yd(e){const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{i(Et(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return Hi.set(t,e),t}function _d(e){if(Qr.has(e))return;const t=new Promise((i,r)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{i(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Qr.set(e,t)}let tn={get(e,t,i){if(e instanceof IDBTransaction){if(t==="done")return Qr.get(e);if(t==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return Et(e[t])},set(e,t,i){return e[t]=i,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function $o(e){tn=e(tn)}function xd(e){return md().includes(e)?function(...t){return e.apply(rn(this),t),Et(this.request)}:function(...t){return Et(e.apply(rn(this),t))}}function kd(e){return typeof e=="function"?xd(e):(e instanceof IDBTransaction&&_d(e),Xr(e,wd())?new Proxy(e,tn):e)}function Et(e){if(e instanceof IDBRequest)return yd(e);if(en.has(e))return en.get(e);const t=kd(e);return t!==e&&(en.set(e,t),Hi.set(t,e)),t}const rn=e=>Hi.get(e);function Sd(e,t,{blocked:i,upgrade:r,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=Et(o);return r&&o.addEventListener("upgradeneeded",l=>{r(Et(o.result),l.oldVersion,l.newVersion,Et(o.transaction),l)}),i&&o.addEventListener("blocked",l=>i(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),n&&l.addEventListener("versionchange",u=>n(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Cd=["get","getKey","getAll","getAllKeys","count"],$d=["put","add","delete","clear"],nn=new Map;function Eo(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(nn.get(t))return nn.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,n=$d.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!(n||Cd.includes(i)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(s.shift())),(await Promise.all([u[i](...s),n&&l.done]))[0]};return nn.set(t,a),a}$o(e=>({...e,get:(t,i,r)=>Eo(t,i)||e.get(t,i,r),has:(t,i)=>!!Eo(t,i)||e.has(t,i)}));const Ed=["continue","continuePrimaryKey","advance"],Io={},an=new WeakMap,Ao=new WeakMap,Id={get(e,t){if(!Ed.includes(t))return e[t];let i=Io[t];return i||(i=Io[t]=function(...r){an.set(this,Ao.get(this)[t](...r))}),i}};async function*Ad(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const i=new Proxy(t,Id);for(Ao.set(i,t),Hi.set(i,rn(t));t;)yield i,t=await(an.get(i)||t.continue()),an.delete(i)}function To(e,t){return t===Symbol.asyncIterator&&Xr(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Xr(e,[IDBIndex,IDBObjectStore])}$o(e=>({...e,get(t,i,r){return To(t,i)?Ad:e.get(t,i,r)},has(t,i){return To(t,i)||e.has(t,i)}}));const qi=typeof indexedDB>"u"?void 0:Sd("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Td=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:i,...r}=t;return r})});let Wi,on,fi;const Fo=()=>{if(!Wi)return fi;const e=Wi;Wi=void 0;const t=Gi(e),i=qi==null?void 0:qi.then(r=>r.put("state",Td(e.data),t)).finally(()=>{fi===i&&(fi=void 0)});return fi=i,fi},De={getStateData:async(e,t,i)=>{var n;const r=Gi({...e,flowKeys:t,context:i});return(n=await qi)==null?void 0:n.get("state",r)},setStateData:e=>{Wi=e,clearTimeout(on),on=setTimeout(()=>void Fo(),1e3)},flushStateData:()=>(clearTimeout(on),Fo()??Promise.resolve())},zt=e=>t=>t?t.type===e:!1,Fd=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Do=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:Fd()}),Dd=e=>Bi(e).with({nativeEvent:{submitter:ci.select(ci.union(ci.instanceOf(HTMLButtonElement),ci.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Ki=(e,t,i,r=0)=>{if(!t.nextId)return i(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const n=e.find(u=>u.id===t.nextId);if(n===void 0)return{stepsMade:r,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(u=>u.id===a),s=t.type.includes("question")?1:0;if(o){const u=s+Math.max(Ki(e,n,i,r+s).remainingSteps,Ki(e,o,i,r+s).remainingSteps);return i(t.id,{stepsMade:r,remainingSteps:u}),{stepsMade:r,remainingSteps:u}}const l=s+Ki(e,n,i,r+s).remainingSteps;return i(t.id,{stepsMade:r,remainingSteps:l}),{stepsMade:r,remainingSteps:l}},Md=e=>{const t={},i=e.find(r=>r.isHead);return i&&Ki(e,i,(r,n)=>{t[r]=n}),t},Gi=e=>[...e.flowKeys,e.id,e.version,e.build,fd(e.context)].join("/"),Nd=({data:e,nodes:t})=>{const i=e.startedWriteNodeIds===void 0?t.some(r=>r.type==="integration-application-submit"&&e.nodeHistory.includes(r.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!i&&Gn(t,e.submissions)},Ld=({data:e,nodes:t})=>{var i;return!e.isFinished&&((((i=e.startedWriteNodeIds)==null?void 0:i.length)??0)>0||Gn(t,e.submissions))},We=Ve({state:"idle"}),sn=new Set,It=e=>{const{state:t,flow:i}=We.value;if(t!=="loaded")return;tt(i,"No flow to update");const r=e(i.data);i.data=r,We.value={state:t,flow:i},De.setStateData(i)},D={current$:We,viewState$:Ve("closed"),prepareFlow:async({flow:e,context:t={},flowKeys:i,title:r,analytics:n,job:a,locationOrigin:o})=>{await De.flushStateData().catch(()=>{});const s=await De.getStateData(e,i,t),l=s??Do(),u=Gi({...e,flowKeys:i,context:t}),f=s!==void 0&&!sn.has(u)&&Nd({data:l,nodes:e.nodes});return f||sn.add(u),{data:l,offerResume:f,startedAt:new Date,nodeIdToProgress:Md(e.nodes),flowKeys:i,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:r,analytics:n,job:a,locationOrigin:o}},commitFlow:e=>{We.value={state:"loaded",flow:e},De.setStateData(e)},settleResume:e=>{e.offerResume=!1,sn.add(Gi(e))},cancelCurrentFlow:()=>{We.value={state:"idle"},D.viewState$.value="closed"},markAsFinished:()=>It(e=>({...e,isFinished:!0})),markAsInteracted:()=>It(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>It(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{It(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await De.flushStateData()},restart:()=>{const{state:e,flow:t}=We.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const i={...Do(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},r={...t,data:i,startedAt:new Date,offerResume:!1};We.value={state:e,flow:r},De.setStateData(r)},addMessage:(e,t)=>{const i={...e,groupId:t};return It(r=>(r.messages.push(i),r))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:i}=We.value;tt(t==="loaded","Application not loaded");const r=i.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));i.data.messages=r,De.setStateData(i)},setSubmission:(e,t)=>It(i=>(t===null?delete i.submissions[e]:i.submissions[e]=t,i)),setInput:e=>It(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{We.peek().flow===e&&(We.value={state:"loaded",flow:e}),De.setStateData(e),await De.flushStateData()}},Vd=({message:e})=>{const{t}=oe();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-11 text-sm",children:e})]})]})},Yi=e=>{const{t}=oe();return c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:t("loading")}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},Mo=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Yi,{class:"text-neutral-6 h-8 w-8"})}),Od=e=>{const i=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-i,r))*100)}%`},Pd=$t("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"}}),pi=({class:e,children:t,variant:i,...r})=>c("button",{class:et(Pd({variant:i}),e),...r,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),No=()=>c("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),jd=()=>{if(D.current$.value.state!=="loaded")return null;const e=D.current$.value.flow.nodeIdToProgress,t=D.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const i=e[t];if(i===void 0)return null;const r=100*(i.stepsMade/(i.remainingSteps+i.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Od(r)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Rd=({children:e,params:t})=>{const{t:i}=oe(),r=D.viewState$;return c(ne,{children:c("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{"aria-label":i("minimize"),onClick:()=>{r.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ln,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:et({hidden:D.current$.value.state!=="loaded"||r.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,D.current$.value.state==="loaded"&&c(pi,{class:"mx-1","aria-label":i("restart"),onClick:()=>{D.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(pi,{class:"view-switch mx-1",onTouchStart:ln,"aria-label":i("minimize"),onClick:()=>r.value="minimised",children:c(No,{})},"minmax")]})]}),c(jd,{})]})})};function ln(){}const Bd=eo(()=>Promise.resolve().then(()=>Jp).then(e=>e.ChatbotBody)),Lo=$t("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),Vo=$t("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"}}}),zd=({open:e,...t})=>{const i=Se(null);return ke(()=>{const r=i.current;r&&(e?r.showModal():r.close())},[e]),c("dialog",{ref:i,...t})},Ud=({logger:e,apiClient:t,analytics:i,talentBankClient:r,params:n})=>{const{state:a,flow:o,error:s}=D.current$.value,l=D.viewState$.value,u=a!=="idle"&&l==="maximised",f=Se(null),d=o?[...o.data.nodeHistory].reverse().map(h=>o.nodes.find(g=>g.id===h)).find(h=>(h==null?void 0:h.type)==="flow-section"):void 0;return c(dd,{terms:n.terms,locale:void 0,children:[c(zd,{open:u,onClose:()=>D.viewState$.value="minimised",children:c("div",{ref:f,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Lo({view:"maximised"}),children:c("div",{class:Vo({view:"maximised"}),children:[c(Rd,{params:n,children:d?c(ne,{children:[c("span",{class:"block",children:d.data.title}),c("span",{class:"block truncate text-xs font-normal",children:o==null?void 0:o.title})]}):o==null?void 0:o.title}),Bi({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Mo,{},"loading")).with({state:"loaded"},()=>c(ai,{fallback:c(Mo,{},"loading"),children:c(Bd,{analytics:i,apiClient:t,logger:e,talentBankClient:r})})).with({state:"error"},()=>c(Vd,{message:s})).exhaustive()]})})}),l==="minimised"?c(Hd,{flow:o}):null]})},Hd=({flow:e})=>{const{t}=oe();return c("div",{class:Lo({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Vo({view:"minimised"}),children:[c("button",{onClick:()=>{D.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ln,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(pi,{class:"mx-1","aria-label":t("close_application"),onClick:D.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},qd=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .\\!visible{visibility:visible!important}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-1{bottom:4px}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-none{resize:none}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-end{align-items:flex-end}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media (prefers-reduced-motion: reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}
|
|
2
|
+
`,Oo="inploi-chatbot",cn=`[data-widget='${Oo}']`,Wd=()=>({getChatbotElement:()=>document.querySelector(cn),getOrCreateChatbotElement:()=>{const e=document.querySelector(cn);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Oo,t}}),Kd=25,Po=Ve(()=>{}),Gd=(e,t)=>new Promise((i,r)=>{if(t!=null&&t.aborted)return r(new st);const n=setTimeout(i,e);t==null||t.addEventListener("abort",()=>{clearTimeout(n),r(new st)},{once:!0})}),ie={onSubmitSuccessFn$:Ve(()=>{}),onInteractionFn$:Ve(()=>{}),isBotTyping$:Ve(!1),captchaVisible$:Ve(!1),themeMode$:Ve("light"),isReadingHistory$:Ve(!1),scrollToEnd:()=>Po.value()},Yd=()=>{const e=Se(null);ke(()=>{const i=e.current;if(!i)return;const r=()=>{ie.isReadingHistory$.value=!1,i.scrollTo({top:i.scrollHeight,behavior:"instant"})};Po.value=r;const n=()=>{ie.isReadingHistory$.value=i.scrollHeight-i.scrollTop-i.clientHeight>2};i.addEventListener("scroll",n,{passive:!0});const a=new ResizeObserver(()=>{ie.isReadingHistory$.peek()||r()});return a.observe(i),i.firstElementChild&&a.observe(i.firstElementChild),()=>{i.removeEventListener("scroll",n),a.disconnect()}},[]);const t=ct(()=>({setSubmission:(r,n)=>D.setSubmission(r,n),captcha:{container:()=>{var r;return((r=e.current)==null?void 0:r.querySelector("[data-captcha-slot]"))??null},get theme(){return ie.themeMode$.peek()},reveal:r=>{ie.captchaVisible$.value=r,r&&requestAnimationFrame(()=>{var n,a;(a=(n=e.current)==null?void 0:n.querySelector("[data-captcha-slot]"))==null||a.focus(),ie.scrollToEnd()})}},send:async({message:r,signal:n,groupId:a})=>{if(await Bi(r).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new st;ie.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Kd;try{await Gd(s,n)}finally{ie.isBotTyping$.value=!1}}).otherwise(async()=>{}),n!=null&&n.aborted)throw new st;D.addMessage(r,a)},input:({input:r,signal:n})=>{if(n!=null&&n.aborted)throw new st;return D.setInput(r),new Promise(a=>{const o=s=>{if(n!=null&&n.aborted)throw new st;D.setInput(void 0),r.key&&D.setSubmission(r.key,s),a(s)};ie.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}};var Jd=["1","2","3","4","5","6","7","8","9","10","11","12"],Zd={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]}},Xd=(e,t=1,i)=>r=>{const[n,a]=Zd[i][r];return"oklch("+n+"% "+a*t+" "+e+")"},dn=e=>{const t=Xd(e.hue,e.chroma,e.mode);return Object.fromEntries(Jd.map(i=>[e.prefix+i,e.transform(t(i))]))},un=e=>e,Qd=e=>{const t=Object.keys(e).flatMap(i=>{const r=e[i];return typeof r=="object"&&r!==null?Object.keys(r).map(n=>{const a=r[n];return[`${String(i)}.${n}`,a]}):[[i,r]]});return Object.fromEntries(t)},Ji=e=>!!e&&typeof e=="object"&&!Array.isArray(e),fn=(e,...t)=>{if(!t.length)return e;const i=t.shift();if(Ji(e)&&Ji(i))for(const r in i){const n=i[r];if(Ji(n)){e[r]||Object.assign(e,{[r]:{}});const a=e[r];Ji(a)&&fn(a,n)}else Object.assign(e,{[r]:i[r]})}return fn(e,...t)},eu=e=>{function t(i,r){const n=[e.prefix,r.toString().replace(/\./g,"-")].join("");return i==="declaration"?`--${n}`:`var(--${n})`}return t},tu=()=>({core:e=>({semantic:t=>({component:i=>({from:r=>{const{theme:n,getToken:a}=r,o=h=>a("reference",h.toString()),s=e({theme:n}),l=t({theme:n,core:o,raw:{core:s}}),u=i({theme:n,core:o,semantic:o,raw:{core:s,semantic:l}}),f=Qd(fn(s,l,u)),d=([h,g],v)=>{const y=[v,h].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(k=>d(k,y)):[[r.getToken("declaration",y),g]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>d(h))),ref:h=>a("reference",h.toString())}}})})})});const[pn,hn,jo]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],iu=tu().core(({theme:e})=>({color:{black:pn,white:hn,lowest:e.mode==="light"?hn:pn,highest:e.mode==="light"?pn:hn,...dn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:un}),...dn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:un}),...dn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:un})},typography:{}})).semantic(({core:e,raw:t,theme:i})=>{const r=(n,a)=>t.core.color[n].replace(")",` / ${a})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:r("n-8",i.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:jo,"bg-hover":r("n-10",.2),"bg-active":r("n-10",.3)}}}).component(({raw:e,theme:t,semantic:i,core:r})=>{const n=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":i("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":jo,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":r(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),ru=eu({prefix:"i-"}),nu=e=>{const t=iu.from({theme:e,getToken:ru}),i=Object.entries(t.declarations).map(([r,n])=>`${r}: ${n};`);return`${cn} {
|
|
3
3
|
${i.concat(i).join(`
|
|
4
4
|
`)}
|
|
5
|
-
}`},iu=({_internal_domManager:e=Ud(),theme:t,terms:i,feedback:r})=>_l(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:d})=>{let p=!1,u=0;const h=cd({locale:void 0,overrides:i??{}}),g=l&&d?Yl({environment:d,publishableKey:l,logger:o}):void 0,w=v=>v===u,_=()=>{if(typeof window>"u")return;u++,Fe.flushStateData().catch(()=>{}),D.cancelCurrentFlow(),ie.isBotTyping$.value=!1;const v=e.getChatbotElement();v&&(vt(null,v),v.remove()),p=!1,o.info("Chatbot plugin destroyed")},k=()=>{if(typeof window>"u")return;const v=u,x=[Ce("style",{id:"inploi-chatbot-styles"},zd),Ce("style",{id:"inploi-chatbot-theme"},tu(t))],E=e.getOrCreateChatbotElement();if(ie.themeMode$.value=t.mode,vt(Ce(ne,{},[x,Ce(Rd,{apiClient:n,logger:o,analytics:s,talentBankClient:g,params:{theme:t,terms:i,feedback:r}})]),E),r){const $=T=>{var L,P;if(!w(v))return;const V=(L=e.getChatbotElement())==null?void 0:L.querySelector("dialog");V&&ru({instance:T({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((P=r.params)==null?void 0:P.terms)??{},host:V})};r.plugin instanceof Promise?r.plugin.then(({feedbackPlugin:T})=>{$(T())}).catch(T=>{o.error("Error preparing feedback plugin",T)}):$(r.plugin)}p=!0},y=async(v,x)=>{if(!w(x))return;hl({context:v.context||{},schema:v.flow.context_schema,logger:o});const E=await D.prepareFlow(v);w(x)&&D.commitFlow(E)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;k(),o.info("Chatbot plugin prepared")}catch(v){o.error("Error preparing chatbot plugin",v)}},fetchFlowByJobId:async(v,x)=>{const E=(x==null?void 0:x.idType)==="inploi"?"internal":"external";return a.request(Ql,{params:{id:v},searchParams:{id_type:E}}).then($=>({flow:$.flow,title:$.job.title,flowKeys:[$.job.id,...(x==null?void 0:x.flowKeys)??[]],job:Xl($,{id:v,idType:E}),...x,context:{user:$.user,...x==null?void 0:x.context}}))},fetchFlowById:async(v,x)=>a.request(ec,{params:{id:v}}).then(E=>{var $;return{flow:E.flow,title:"Chatbot",flowKeys:(x==null?void 0:x.flowKeys)??[],...x,analytics:{customProperties:{flow_id:E.flow.id,flow_version:E.flow.version,...($=x==null?void 0:x.analytics)==null?void 0:$.customProperties}}}}),open:async v=>{if(!(typeof window>"u"))try{D.cancelCurrentFlow(),D.viewState$.value="maximised",p||k();const x=u;v instanceof Promise?(D.current$.value={state:"loading"},v.then(E=>y(E,x)).catch(E=>{if(!w(x))return;const $=E instanceof Error?E.message:h("unknown_error");D.current$.value={state:"error",error:$}})):await y(v,x)}catch(x){o.error("Error starting flow",x)}},hasApplicationInProgress:async v=>{const x=await Fe.getStateData(v.flow,v.flowKeys,v.context??{});return x!==void 0&&Dd({data:x,nodes:v.flow.nodes})},close:async()=>{typeof window>"u"||(D.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:_}});function ru({instance:e,terms:t,theme:i,host:r}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:i.chroma??1,hue:i.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:i.mode,corners:"rounded",highlights:"stroke"},terms:t,host:r})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=iu;var nu="9.8.0",No=`https://sdk.inploi.com/@inploi/flows@${nu}/cdn/captcha/index.html`,au=new URL(No).origin,Mo=3e4,ou=5*6e4,su=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",dn=new WeakMap,lu=e=>{let t=dn.get(e);return t||(t=e.fetch("/flow/captcha").then(i=>{let r=i==null?void 0:i.site_key;return typeof r=="string"&&r!==""?r:void 0}).catch(i=>{throw dn.delete(e),i}),dn.set(e,t)),t},cu=(e,t={})=>new Promise((i,r)=>{let{signal:n,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,d=()=>{},p=_=>{l||(l=!0,clearTimeout(g),n==null||n.removeEventListener("abort",h),d(),_())},u=_=>p(()=>r(new Error(_))),h=()=>u("Captcha aborted"),g,w=_=>{clearTimeout(g),g=setTimeout(()=>u("Captcha timed out"),_)};if(w(Mo),n==null?void 0:n.aborted)return h();n==null||n.addEventListener("abort",h),(async()=>{let _=await lu(e);if(_===void 0)return p(()=>i(void 0));if(l)return;let k=document.createElement("iframe");k.src=`${No}?${new URLSearchParams({sitekey:_,origin:window.location.origin,...o&&{theme:o}}).toString()}`,k.title="Cloudflare security check",k.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(k):(k.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(k));let y=!1,v=x=>{if(!k.contentWindow||x.source!==k.contentWindow||x.origin!==au||!su(x.data))return;let E=x.data;switch(E.type){case"token":return p(()=>i(E.token));case"resize":k.style.height=`${Math.max(0,Math.ceil(E.height))}px`;return;case"before-interactive":return y=!0,w(ou),s==null?void 0:s();case"after-interactive":return y=!1,w(Mo);case"error":!y&&!E.interactive&&u("Captcha failed");return;case"expired":return u("Captcha expired");case"timeout":return u("Captcha timed out")}};window.addEventListener("message",v),d=()=>{window.removeEventListener("message",v),k.remove()}})().catch(_=>p(()=>r(_)))}),Vo=({condition:e,context:t,submissions:i,ifBlock:r})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=zn({context:t,key:n,path:a,submissions:i});if(!o)return!1;switch(o.type){case"address":{let s=Gt(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=Gt(o.value,a),l={...r,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return li(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return li(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return li(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(d=>typeof d=="string")?li(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"?ki(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${r.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},li=(e,{context:t,submissions:i})=>{let r="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of r)if(Vo({condition:n,context:t,submissions:i,ifBlock:e}))return!0;return!1}else{for(let n of r)if(!Vo({condition:n,context:t,submissions:i,ifBlock:e}))return!1;return!0}},du=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,uu=(e,{context:t,submissions:i})=>e.replace(du,(r,n,a="")=>{let[o,...s]=n.trim().split("."),l=zn({key:o,path:s,submissions:i,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Et(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 ki(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let d=Gt(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}),Po=e=>{let t=e.find(i=>i.isHead);if(!t)throw new Error("No head node found");return t},un=e=>{var t,i;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(i=[...e.data.messages].reverse().find(r=>r.groupId&&e.nodes.some(n=>n.id===r.groupId&&n.type.startsWith("question-"))&&(r.type==="system"||"author"in r&&r.author==="user")))==null?void 0:i.groupId},fn=e=>Array.isArray(e)?e.map(fn):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[i])=>t.localeCompare(i)).map(([t,i])=>[t,fn(i)])):typeof e=="function"?void 0:e;async function fu(e,t,i,r){var n;let a=new TextEncoder().encode(JSON.stringify(fn(i))),o=await crypto.subtle.digest("SHA-256",a);if(r!=null&&r.aborted)return;let s=Array.from(new Uint8Array(o),u=>u.toString(16).padStart(2,"0")).join(""),l=(n=e.data).preApplyFingerprints??(n.preApplyFingerprints=[]);if(l.includes(s))return;l.push(s);let d=new AbortController,p=setTimeout(()=>d.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:d.signal,body:JSON.stringify(i)}).catch(()=>{let u=l.indexOf(s);u!==-1&&l.splice(u,1)}).finally(()=>{clearTimeout(p)})}var Oo=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Ve=(e,t)=>uu(e,Oo(t)),pu=(e,t)=>li(e,Oo(t)),Lo=({node:e,nodes:t,stopWhen:i})=>{if((i==null?void 0:i(e))===!0)return e;let r=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(r)return Lo({node:r,nodes:t,stopWhen:i})},hu=({childNode:e,nodes:t})=>{let i=t.filter(r=>r.type==="if-block").find(r=>{if(!r.branchId)return!1;let n=t.find(o=>o.id===r.branchId);if(!n)return!1;let a=Lo({node:n,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(i!=null&&i.nextId)return t.find(r=>r.id===i.nextId)},gu=3,bu=({flow:e,analytics:t,logger:i,talentBankClient:r,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:d,persistWriteBarrier:p,onSubmitNetworkError:u,closedRoleBehaviour:h,dateEchoLocale:g,onFlowEnd:w,onInterpret:_,forceSubmitConfirmation:k,t:y})=>{var v;let x=new AbortController,E={submitAccepted:!1};(v=e.data).startedWriteNodeIds??(v.startedWriteNodeIds=e.nodes.flatMap(V=>{var P,z;if(V.type!=="integration-application-submit"||!e.data.nodeHistory.includes(V.id))return[];let L=V.data.key?(P=o())==null?void 0:P[V.data.key]:void 0;return(L==null?void 0:L.type)==="integration"&&((z=Wn(L.value))==null?void 0:z.verdict)==="not_submitted"?[]:[V.id]}));let $={...t.service,log:V=>t.service.log({...V,customProperties:{...V.customProperties,...t.customProperties}})},T=async(V,L)=>{let P=x.signal;if(P.aborted)return;let z=o(),te=s(),O=(te==null?void 0:te.submitNodeId)===V.id?e.nodes.find(N=>{var q;return N.id===te.fileQuestionNodeId&&N.type==="question-file"&&((q=z==null?void 0:z[N.data.key])==null?void 0:q.type)!=="file"}):void 0;if(O)return T(O,L);_==null||_(V,L);try{await vu({flow:e,analytics:$,logger:i,talentBankClient:r,apiClient:a,context:n,node:V,submissions:z,applicationRecovery:te,setApplicationRecovery:async N=>{if(!P.aborted)try{await l(N)}catch(q){i.error("Failed to persist application recovery",q)}},forceSubmitConfirmation:k||(te==null?void 0:te.submitNodeId)===V.id,run:E,persistWriteBarrier:p,onSubmitNetworkError:u,closedRoleBehaviour:h,dateEchoLocale:g,signal:P,t:y,chat:{sendMessage:async N=>d.send({groupId:V.id,message:N,signal:P}),userInput:async N=>d.input({input:N,signal:P}),setSubmission:(N,q)=>{P.aborted||d.setSubmission(N,q)},captcha:d.captcha},next:N=>{if(P.aborted)return;let q=(te==null?void 0:te.fileQuestionNodeId)===V.id?te.submitNodeId:N,H=q?e.nodes.find(K=>K.id===q):hu({childNode:V,nodes:e.nodes});return H?T(H,V):w==null?void 0:w(V)},end:()=>{P.aborted||(w==null||w(V))}})}catch(N){if(N instanceof it)return;throw N}};return{interpret:async V=>{let L=e.nodes.find(P=>P.id===V)??Po(e.nodes);return T(L)},undo:V=>{var q;if(delete e.data.reviewReplay,((q=e.data.startedWriteNodeIds)==null?void 0:q.length)||e.data.isFinished)return{removed:0};let L=un(e),P=L?V.lastIndexOf(L):-1,z=e.nodes.find(H=>H.id===L);if(P===-1||!z)return{removed:0};let te=e.nodes.find(H=>H.id===V[V.length-1]);x.abort();let O=V.splice(P);e.data.messages=e.data.messages.filter(H=>!H.groupId||!O.includes(H.groupId)),e.data.currentInput=null;let N=o();for(let H of O.slice(1)){let K=e.nodes.find(W=>W.id===H);if(!(!K||!N||K.id===L)&&("key"in K.data&&K.data.key&&delete N[K.data.key],"keys"in K.data))for(let W of Object.values(K.data.keys))typeof W=="string"&&delete N[W]}return x=new AbortController,T(z,te),{removed:O.length}},abort:()=>{x.abort()}}};async function vu(e){let t=e.node;switch(t.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:t.data.title}),e.next(t.nextId);case"pre-apply-result":return Ou({...e,node:t});case"text":return Eu({...e,node:t});case"image":return Iu({...e,node:t});case"question-text":return Au({...e,node:t});case"question-enum":return Du({...e,node:t});case"question-number":return Fu({...e,node:t});case"question-phone":return Tu({...e,node:t});case"question-boolean":return Nu({...e,node:t});case"question-file":return Vu({...e,node:t});case"question-address":return Mu({...e,node:t});case"end-flow":return Pu({...e,node:t});case"if-block":return $u({...e,node:t});case"jump":return yu({...e,node:t});case"link":return Cu({...e,node:t});case"integration-application-submit":return Su({...e,node:t});case"add-submission":return _u({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return mu({...e,node:t});case"feedback":return wu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function wu({next:e,node:t}){e(t.nextId)}async function mu({next:e,node:t,talentBankClient:i,submissions:r,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(r&&i){let 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 i.checkDuplicate({email:Zs({key:t.data.email,submissions:r}).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 yu({next:e,node:t}){e(t.data.targetId)}async function _u({next:e,node:t,logger:i,submissions:r,context:n}){if(!r){i.error("Submissions not found");return}r[t.data.key]={type:"string",value:Ve(t.data.value,{submissions:r,context:n})},e(t.nextId)}var xu=5e3,ku=(e,t,i)=>{let{waitMs:r,throttles:n,maintenance:a}=ol(t==null?void 0:t.throttles,i);return{key:e,until:Date.now()+r,...n!==void 0&&{throttles:n},...a&&{maintenance:a}}};async function Su({chat:e,next:t,end:i,node:r,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:d,setApplicationRecovery:p,forceSubmitConfirmation:u,run:h,persistWriteBarrier:g,signal:w,onSubmitNetworkError:_,closedRoleBehaviour:k,t:y}){var T;if((T=l.data.startedWriteNodeIds)!=null&&T.includes(r.id)&&(d==null?void 0:d.submitNodeId)!==r.id)return await e.sendMessage({type:"system",variant:"warning",text:y("submission_unknown")}),i();let v=l.job?`${r.id}@${l.job.id_type}:${l.job.id}`:r.id,x=0,E=h.submitAccepted&&r.data.skipConfirmation===!0&&(d==null?void 0:d.submitNodeId)!==r.id,$=async V=>{var qt,wi,Wt,Ht,er,mi,tr;let L=((qt=l.data.submitCooldown)==null?void 0:qt.key)===v?l.data.submitCooldown:void 0;L&&(L.until=Math.min(L.until,Date.now()+(L.maintenance?Kn:L.throttles?pr:Hn)));let P=L==null?void 0:L.until;(l.data.reviewRequiresSend===!0&&!E||V!==!0||P!==void 0&&P>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel,...P!==void 0&&{availableAt:P}}}),E=!1;let z;if(r.data.captcha){let j=e.captcha,St=!0;try{z=await cu(a,{signal:w,container:(j==null?void 0:j.container())??null,theme:j==null?void 0:j.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:y("captcha_check")}).catch(()=>{}).then(()=>{St&&(j==null||j.reveal(!0))})}})}catch(yi){if(n.error("Captcha check failed",yi),w.aborted)return}finally{St=!1,j==null||j.reveal(!1)}}await e.sendMessage({type:"loading",text:y("submitting")});let{anonymous_id:te,session_id:O}=s.getSessionInfo();if(w.aborted)return;let N=((wi=l.data.startedWriteNodeIds)==null?void 0:wi.includes(r.id))===!0;if((d==null?void 0:d.submitNodeId)===r.id&&await p(void 0),N||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],r.id]),await g().catch(j=>n.error("Failed to persist application write barrier",j)),w.aborted)return;let q,H=setTimeout(()=>{q=(async()=>{await e.sendMessage({type:"text",author:"bot",text:y("submission_still_working")}),await e.sendMessage({type:"loading",text:y("submitting")})})().catch(j=>n.error("Failed to send submission progress message",j))},xu),K,W=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:te,session_id:O,job:l.job,flow_build:l.build,...z!==void 0&&{captcha_token:z},submissions:Ys(l.nodes,Js(o||{},r.data.submitKeys)),pre_apply:dr(l.nodes,o||{},l.data.flowSessionId)})}).catch(j=>(K=j,Cl(j)?j.data:j));if(clearTimeout(H),await q,w.aborted)return;if(K!==void 0&&!Il(K)&&_)return await _(K,w),$(!0);r.data.key&&e.setSubmission(r.data.key,{type:"integration",value:W});let B=Wn(W,K instanceof kr?K.status:void 0),Le=l.data.failedAttemptAt,je=Le==null?void 0:Le[v];Le&&je!==void 0&&je>Date.now()&&(je=Le[v]=Date.now());let gi=je!==void 0&&Date.now()-je<nl||((Wt=l.data.unconfirmedAttemptKeys)==null?void 0:Wt.includes(v))===!0,ft=ul(W);ft&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:ft.service,response:ft.response,flow_type:"CHATBOT_DRAWER",job:l.job,...(B==null?void 0:B.outcome)==="duplicate"&&{outcome:gi?"duplicate_after_own_attempt":"duplicate"},...ft.outcome&&{outcome:ft.outcome}}});let Qi=ur(W)||(W==null?void 0:W.success)===!0;if((Qi||fr(W))&&(h.submitAccepted=!0),Qi&&((Ht=l.data.submitCooldown)==null?void 0:Ht.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(j=>n.error("Failed to persist submit cooldown reset",j))),ur(W)){let{redirect_url:j,message:St,button_text:yi}=W.integration_response.data;await e.sendMessage({type:"text",author:"bot",text:St??y("submission_redirect_message")});try{let pt=new URL(j);te&&!pt.searchParams.has("anonymous_id")&&pt.searchParams.set("anonymous_id",te),await e.sendMessage({type:"link",href:pt.toString(),text:yi??y("complete_submission"),onClick:()=>{if(!O){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:O,flow_version:l.version,href:pt.toString(),job:l.job}})}})}catch(pt){n.error(`Invalid redirect URL: ${j}`,pt),e.sendMessage({type:"system",variant:"error",text:y("redirect_url_error")})}return t(r.nextId)}let bi=fr(W);if(bi)return await e.sendMessage({type:"system",variant:"success",text:bi.message??y("submission_pending")}),t(r.nextId);if((W==null?void 0:W.success)===!0)return r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:y("submission_completed")}),t(r.nextId);let vi=dl(B),kt=vi!==void 0&&((er=o==null?void 0:o[vi])==null?void 0:er.type)==="file"?vi:void 0,Ut=kt===void 0?void 0:l.nodes.find(j=>j.type==="question-file"&&j.data.key===kt);if(!Ut&&!(k==="terminal"&&(B==null?void 0:B.outcome)==="closed")&&!Jn(B)&&(l.data.submitCooldown=ku(v,L,B)),(B==null?void 0:B.outcome)!=="duplicate"&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[v]:Date.now()},(mi=l.data.unconfirmedAttemptKeys)!=null&&mi.includes(v)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(j=>j!==v))),(B==null?void 0:B.verdict)==="not_submitted"||(B==null?void 0:B.outcome)==="duplicate"||(B==null?void 0:B.outcome)==="closed"?(N||(l.data.startedWriteNodeIds=(tr=l.data.startedWriteNodeIds)==null?void 0:tr.filter(j=>j!==r.id)),(d==null?void 0:d.submitNodeId)===r.id&&await p(d),await g().catch(j=>n.error("Failed to persist application write barrier release",j))):await g().catch(j=>n.error("Failed to persist submit cooldown",j)),B){if(n.error(K??B.message),Ut&&kt!==void 0)return e.setSubmission(kt,null),await p({fileQuestionNodeId:Ut.id,submitNodeId:r.id}),await e.sendMessage({type:"system",variant:"error",text:y("submission_unreadable_document")}),t(Ut.id);if(B.outcome==="duplicate")return await e.sendMessage({type:"system",variant:"info",text:y(gi?"submission_duplicate_earlier_attempt":"submission_duplicate")}),$(!1);if(B.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",text:y("submission_closed")}),k==="terminal"?(delete l.data.submitCooldown,i()):$(!1);let j=al(B);return j?(await e.sendMessage({type:"system",variant:"warning",text:j.until===void 0?y("submission_provider_maintenance_later"):y("submission_provider_maintenance",{time:Yn(j.until,void 0)})}),$(!1)):B.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:y(cl(B)?"submission_unknown_do_not_resubmit":"submission_unknown")}),$(!1)):Jn(B)?sl(W)?(await e.sendMessage({type:"text",author:"bot",text:B.message}),$(!1)):(x===0&&await e.sendMessage({type:"system",variant:"warning",text:y("captcha_failed")}),x++,$(x<=gu)):ll(B)?(await e.sendMessage({type:"system",variant:"error",text:y("submission_retryable")}),$(!1)):(await e.sendMessage({type:"system",variant:"error",text:y("submission_failed")}),i())}return n.error(K??W),await e.sendMessage({type:"system",variant:"error",text:y("submission_failed")}),i()};await $(u===!0&&!E?!1:r.data.skipConfirmation)}async function Cu({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({type:"link",href:Ve(i.data.href,{submissions:r,context:n}),text:Ve(i.data.cta,{submissions:r,context:n})}),t(i.nextId)}async function $u({submissions:e,next:t,node:i,context:r}){t(pu(i,{submissions:e,context:r})?i.branchId:i.nextId)}async function Eu({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({author:"bot",type:"text",text:Ve(i.data.text,{submissions:r,context:n})}),t(i.nextId)}async function Iu({chat:e,next:t,node:i}){await e.sendMessage({author:"bot",type:"image",url:i.data.url,height:i.data.height,width:i.data.width}),t(i.nextId)}async function Au({chat:e,next:t,node:i,submissions:r,context:n,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Ve(i.data.question,{submissions:r,context:n})});let s=i.data.format==="phone"?await e.userInput({key:i.data.key,type:"phone",config:{optional:i.data.optional,placeholder:i.data.placeholder,minChars:i.data.minChars,maxChars:i.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:i.data.key,type:"text",config:{optional:i.data.optional,placeholder:i.data.placeholder,format:i.data.format,maxChars:i.data.maxChars,minChars:i.data.minChars,multiline:i.data.format==="text"&&i.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?ki(s.value):i.data.format==="date"&&o!==void 0?pl(s.value,o):s.value}),t(i.nextId)}async function Fu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Ve(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"number",config:{max:i.data.max,min:i.data.min,optional:i.data.optional,placeholder:i.data.placeholder,decimalCases:i.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(i.nextId)}async function Tu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Ve(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"phone",config:{minChars:i.data.minChars,defaultValue:{countryCode:i.data.defaultCountryCode},placeholder:i.data.placeholder,submissionFormat:"phone",optional:i.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?ki(o.value):o.value}),t(i.nextId)}async function Du({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Ve(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"multiple-choice",config:i.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:i.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(i.nextId)}async function Nu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Ve(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"boolean",config:{optional:i.data.optional,labels:{true:i.data.trueLabel,false:i.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?i.data.trueLabel:i.data.falseLabel}),t(i.nextId)}async function Mu({chat:e,next:t,node:i,t:r}){await e.sendMessage({author:"bot",type:"text",text:i.data.question});let n=await e.userInput({type:"address",key:i.data.key,config:{optional:i.data.optional,keys:i.data.keys,line2Required:i.data.line2Required,placeholder:i.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:r("skipped")});else{let a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(i.nextId)}async function Vu({node:e,chat:t,next:i,submissions:r,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Ve(e.data.question,{submissions:r,context:n})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return i(e.nextId)}async function Pu({chat:e,end:t,node:i}){await e.sendMessage({type:"system",variant:"info",text:i.data.systemMessage}),t()}async function Ou({node:e,flow:t,submissions:i,chat:r,next:n,apiClient:a,analytics:o,signal:s,context:l}){let d=Gs(t.nodes,i||{}),{answers:p,...u}=d;if(r.setSubmission(e.data.key,{type:"integration",value:u}),await fu(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:dr(t.nodes,i||{},t.data.flowSessionId)},s),d.status!=="skipped"){let h=[d.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":d.hasHardConcerns?e.data.messages.hard:d.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let g of["hard","advisory"]){let w=p.filter(_=>!_.matched&&_.severity===g);w.length&&h.push((g==="hard"?"Role requirements":"Other things to consider")+`
|
|
6
|
-
`+
|
|
5
|
+
}`},au=({_internal_domManager:e=Wd(),theme:t,terms:i,feedback:r})=>Tl(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:u})=>{let f=!1,d=0;const h=ud({locale:void 0,overrides:i??{}}),g=l&&u?Zl({environment:u,publishableKey:l,logger:o}):void 0,v=w=>w===d,y=()=>{if(typeof window>"u")return;d++,De.flushStateData().catch(()=>{}),D.cancelCurrentFlow(),ie.isBotTyping$.value=!1;const w=e.getChatbotElement();w&&(Ct(null,w),w.remove()),f=!1,o.info("Chatbot plugin destroyed")},k=()=>{if(typeof window>"u")return;const w=d,x=[Ee("style",{id:"inploi-chatbot-styles"},qd),Ee("style",{id:"inploi-chatbot-theme"},nu(t))],E=e.getOrCreateChatbotElement();if(ie.themeMode$.value=t.mode,Ct(Ee(ne,{},[x,Ee(Ud,{apiClient:n,logger:o,analytics:s,talentBankClient:g,params:{theme:t,terms:i,feedback:r}})]),E),r){const $=F=>{var P,V;if(!v(w))return;const L=(P=e.getChatbotElement())==null?void 0:P.querySelector("dialog");L&&ou({instance:F({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((V=r.params)==null?void 0:V.terms)??{},host:L})};r.plugin instanceof Promise?r.plugin.then(({feedbackPlugin:F})=>{$(F())}).catch(F=>{o.error("Error preparing feedback plugin",F)}):$(r.plugin)}f=!0},_=async(w,x)=>{if(!v(x))return;kl({context:w.context||{},schema:w.flow.context_schema,logger:o});const E=await D.prepareFlow(w);v(x)&&D.commitFlow(E)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(f)return;k(),o.info("Chatbot plugin prepared")}catch(w){o.error("Error preparing chatbot plugin",w)}},fetchFlowByJobId:async(w,x)=>{const E=(x==null?void 0:x.idType)==="inploi"?"internal":"external";return a.request(tc,{params:{id:w},searchParams:{id_type:E}}).then($=>({flow:$.flow,title:$.job.title,flowKeys:[$.job.id,...(x==null?void 0:x.flowKeys)??[]],job:ec($,{id:w,idType:E}),...x,context:{user:$.user,...x==null?void 0:x.context}}))},fetchFlowById:async(w,x)=>a.request(ic,{params:{id:w}}).then(E=>{var $;return{flow:E.flow,title:"Chatbot",flowKeys:(x==null?void 0:x.flowKeys)??[],...x,analytics:{customProperties:{flow_id:E.flow.id,flow_version:E.flow.version,...($=x==null?void 0:x.analytics)==null?void 0:$.customProperties}}}}),open:async w=>{if(!(typeof window>"u"))try{D.cancelCurrentFlow(),D.viewState$.value="maximised",f||k();const x=d;w instanceof Promise?(D.current$.value={state:"loading"},w.then(E=>_(E,x)).catch(E=>{if(!v(x))return;const $=E instanceof Error?E.message:h("unknown_error");D.current$.value={state:"error",error:$}})):await _(w,x)}catch(x){o.error("Error starting flow",x)}},hasApplicationInProgress:async w=>{const x=await De.getStateData(w.flow,w.flowKeys,w.context??{});return x!==void 0&&Ld({data:x,nodes:w.flow.nodes})},close:async()=>{typeof window>"u"||(D.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:y}});function ou({instance:e,terms:t,theme:i,host:r}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:i.chroma??1,hue:i.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:i.mode,corners:"rounded",highlights:"stroke"},terms:t,host:r})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=au;var su="9.8.1",Ro=`https://sdk.inploi.com/@inploi/flows@${su}/cdn/captcha/index.html`,lu=new URL(Ro).origin,Bo=3e4,cu=5*6e4,du=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",gn=new WeakMap,uu=e=>{let t=gn.get(e);return t||(t=e.fetch("/flow/captcha").then(i=>{let r=i==null?void 0:i.site_key;return typeof r=="string"&&r!==""?r:void 0}).catch(i=>{throw gn.delete(e),i}),gn.set(e,t)),t},fu=(e,t={})=>new Promise((i,r)=>{let{signal:n,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,u=()=>{},f=y=>{l||(l=!0,clearTimeout(g),n==null||n.removeEventListener("abort",h),u(),y())},d=y=>f(()=>r(new Error(y))),h=()=>d("Captcha aborted"),g,v=y=>{clearTimeout(g),g=setTimeout(()=>d("Captcha timed out"),y)};if(v(Bo),n==null?void 0:n.aborted)return h();n==null||n.addEventListener("abort",h),(async()=>{let y=await uu(e);if(y===void 0)return f(()=>i(void 0));if(l)return;let k=document.createElement("iframe");k.src=`${Ro}?${new URLSearchParams({sitekey:y,origin:window.location.origin,...o&&{theme:o}}).toString()}`,k.title="Cloudflare security check",k.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(k):(k.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(k));let _=!1,w=x=>{if(!k.contentWindow||x.source!==k.contentWindow||x.origin!==lu||!du(x.data))return;let E=x.data;switch(E.type){case"token":return f(()=>i(E.token));case"resize":k.style.height=`${Math.max(0,Math.ceil(E.height))}px`;return;case"before-interactive":return _=!0,v(cu),s==null?void 0:s();case"after-interactive":return _=!1,v(Bo);case"error":!_&&!E.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",w),u=()=>{window.removeEventListener("message",w),k.remove()}})().catch(y=>f(()=>r(y)))}),zo=({condition:e,context:t,submissions:i,ifBlock:r})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=Yn({context:t,key:n,path:a,submissions:i});if(!o)return!1;switch(o.type){case"address":{let s=ti(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=ti(o.value,a),l={...r,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return hi(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return hi(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return hi(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(u=>typeof u=="string")?hi(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"?Ai(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${r.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},hi=(e,{context:t,submissions:i})=>{let r="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of r)if(zo({condition:n,context:t,submissions:i,ifBlock:e}))return!0;return!1}else{for(let n of r)if(!zo({condition:n,context:t,submissions:i,ifBlock:e}))return!1;return!0}},pu=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,hu=(e,{context:t,submissions:i})=>e.replace(pu,(r,n,a="")=>{let[o,...s]=n.trim().split("."),l=Yn({key:o,path:s,submissions:i,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${Nt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return Ai(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let u=ti(l.value,s);switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(f=>typeof f=="string"))return u.join(", ")}break}}return a});/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function gu(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function bn(e,t,i=""){const r=gu(e),n=e==null?void 0:e.length,a=t!==void 0;if(!r||a&&n!==t){const o=i&&`"${i}" `,s=a?` of length ${t}`:"",l=r?`length=${n}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Uo(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function bu(e,t){bn(e,void 0,"digestInto() output");const i=t.outputLen;if(e.length<i)throw new Error('"digestInto() output" expected to be of length >='+i)}function vn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function wn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ke(e,t){return e<<32-t|e>>>t}const vu=(()=>typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function")(),wu=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function mu(e){if(bn(e),vu)return e.toHex();let t="";for(let i=0;i<e.length;i++)t+=wu[e[i]];return t}function yu(e,t={}){const i=(n,a)=>e(a).update(n).digest(),r=e(void 0);return i.outputLen=r.outputLen,i.blockLen=r.blockLen,i.create=n=>e(n),Object.assign(i,t),Object.freeze(i)}const _u=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function xu(e,t,i){return e&t^~e&i}function ku(e,t,i){return e&t^e&i^t&i}class Su{constructor(t,i,r,n){ue(this,"blockLen");ue(this,"outputLen");ue(this,"padOffset");ue(this,"isLE");ue(this,"buffer");ue(this,"view");ue(this,"finished",!1);ue(this,"length",0);ue(this,"pos",0);ue(this,"destroyed",!1);this.blockLen=t,this.outputLen=i,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(t),this.view=wn(this.buffer)}update(t){Uo(this),bn(t);const{view:i,buffer:r,blockLen:n}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(n-this.pos,a-o);if(s===n){const l=wn(t);for(;n<=a-o;o+=n)this.process(l,o);continue}r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(i,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Uo(this),bu(t,this),this.finished=!0;const{buffer:i,view:r,blockLen:n,isLE:a}=this;let{pos:o}=this;i[o++]=128,vn(this.buffer.subarray(o)),this.padOffset>n-o&&(this.process(r,0),o=0);for(let d=o;d<n;d++)i[d]=0;r.setBigUint64(n-8,BigInt(this.length*8),a),this.process(r,0);const s=wn(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const u=l/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)s.setUint32(4*d,f[d],a)}digest(){const{buffer:t,outputLen:i}=this;this.digestInto(t);const r=t.slice(0,i);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:i,buffer:r,length:n,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=n,t.pos=s,n%i&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const ht=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Cu=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),gt=new Uint32Array(64);class $u extends Su{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:i,C:r,D:n,E:a,F:o,G:s,H:l}=this;return[t,i,r,n,a,o,s,l]}set(t,i,r,n,a,o,s,l){this.A=t|0,this.B=i|0,this.C=r|0,this.D=n|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,i){for(let d=0;d<16;d++,i+=4)gt[d]=t.getUint32(i,!1);for(let d=16;d<64;d++){const h=gt[d-15],g=gt[d-2],v=Ke(h,7)^Ke(h,18)^h>>>3,y=Ke(g,17)^Ke(g,19)^g>>>10;gt[d]=y+gt[d-7]+v+gt[d-16]|0}let{A:r,B:n,C:a,D:o,E:s,F:l,G:u,H:f}=this;for(let d=0;d<64;d++){const h=Ke(s,6)^Ke(s,11)^Ke(s,25),g=f+h+xu(s,l,u)+Cu[d]+gt[d]|0,y=(Ke(r,2)^Ke(r,13)^Ke(r,22))+ku(r,n,a)|0;f=u,u=l,l=s,s=o+g|0,o=a,a=n,n=r,r=g+y|0}r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(r,n,a,o,s,l,u,f)}roundClean(){vn(gt)}destroy(){this.set(0,0,0,0,0,0,0,0),vn(this.buffer)}}class Eu extends $u{constructor(){super(32);ue(this,"A",ht[0]|0);ue(this,"B",ht[1]|0);ue(this,"C",ht[2]|0);ue(this,"D",ht[3]|0);ue(this,"E",ht[4]|0);ue(this,"F",ht[5]|0);ue(this,"G",ht[6]|0);ue(this,"H",ht[7]|0)}}const Iu=yu(()=>new Eu,_u(1));var Ho=e=>{let t=e.find(i=>i.isHead);if(!t)throw new Error("No head node found");return t},mn=e=>{var t,i;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(i=[...e.data.messages].reverse().find(r=>r.groupId&&e.nodes.some(n=>n.id===r.groupId&&n.type.startsWith("question-"))&&(r.type==="system"||"author"in r&&r.author==="user")))==null?void 0:i.groupId},yn=e=>Array.isArray(e)?e.map(yn):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[i])=>t.localeCompare(i)).map(([t,i])=>[t,yn(i)])):typeof e=="function"?void 0:e,Au=e=>mu(Iu(new TextEncoder().encode(JSON.stringify(yn(e)))));function Tu(e,t,i,r){var n;if(r!=null&&r.aborted)return;let a=Au(i),o=(n=e.data).preApplyFingerprints??(n.preApplyFingerprints=[]);if(o.includes(a))return;o.push(a);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(i)}).catch(()=>{let u=o.indexOf(a);u!==-1&&o.splice(u,1)}).finally(()=>{clearTimeout(l)})}var qo=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Oe=(e,t)=>hu(e,qo(t)),Fu=(e,t)=>hi(e,qo(t)),Wo=({node:e,nodes:t,stopWhen:i})=>{if((i==null?void 0:i(e))===!0)return e;let r=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(r)return Wo({node:r,nodes:t,stopWhen:i})},Du=({childNode:e,nodes:t})=>{let i=t.filter(r=>r.type==="if-block").find(r=>{if(!r.branchId)return!1;let n=t.find(o=>o.id===r.branchId);if(!n)return!1;let a=Wo({node:n,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(i!=null&&i.nextId)return t.find(r=>r.id===i.nextId)},Mu=3,Nu=({flow:e,analytics:t,logger:i,talentBankClient:r,context:n,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:u,persistWriteBarrier:f,onSubmitNetworkError:d,closedRoleBehaviour:h,dateEchoLocale:g,onFlowEnd:v,onInterpret:y,forceSubmitConfirmation:k,t:_})=>{var w;let x=new AbortController,E={submitAccepted:!1};(w=e.data).startedWriteNodeIds??(w.startedWriteNodeIds=e.nodes.flatMap(L=>{var V,z;if(L.type!=="integration-application-submit"||!e.data.nodeHistory.includes(L.id))return[];let P=L.data.key?(V=o())==null?void 0:V[L.data.key]:void 0;return(P==null?void 0:P.type)==="integration"&&((z=Xn(P.value))==null?void 0:z.verdict)==="not_submitted"?[]:[L.id]}));let $={...t.service,log:L=>t.service.log({...L,customProperties:{...L.customProperties,...t.customProperties}})},F=async(L,P)=>{let V=x.signal;if(V.aborted)return;let z=o(),te=s(),O=(te==null?void 0:te.submitNodeId)===L.id?e.nodes.find(M=>{var H;return M.id===te.fileQuestionNodeId&&M.type==="question-file"&&((H=z==null?void 0:z[M.data.key])==null?void 0:H.type)!=="file"}):void 0;if(O)return F(O,P);y==null||y(L,P);try{await Lu({flow:e,analytics:$,logger:i,talentBankClient:r,apiClient:a,context:n,node:L,submissions:z,applicationRecovery:te,setApplicationRecovery:async M=>{if(!V.aborted)try{await l(M)}catch(H){i.error("Failed to persist application recovery",H)}},forceSubmitConfirmation:k||(te==null?void 0:te.submitNodeId)===L.id,run:E,persistWriteBarrier:f,onSubmitNetworkError:d,closedRoleBehaviour:h,dateEchoLocale:g,signal:V,t:_,chat:{sendMessage:async M=>u.send({groupId:L.id,message:M,signal:V}),userInput:async M=>u.input({input:M,signal:V}),setSubmission:(M,H)=>{V.aborted||u.setSubmission(M,H)},captcha:u.captcha},next:M=>{if(V.aborted)return;let H=(te==null?void 0:te.fileQuestionNodeId)===L.id?te.submitNodeId:M,W=H?e.nodes.find(K=>K.id===H):Du({childNode:L,nodes:e.nodes});return W?F(W,L):v==null?void 0:v(L)},end:()=>{V.aborted||(v==null||v(L))}})}catch(M){if(M instanceof st)return;throw M}};return{interpret:async L=>{let P=e.nodes.find(V=>V.id===L)??Ho(e.nodes);return F(P)},undo:L=>{var H;if(delete e.data.reviewReplay,((H=e.data.startedWriteNodeIds)==null?void 0:H.length)||e.data.isFinished)return{removed:0};let P=mn(e),V=P?L.lastIndexOf(P):-1,z=e.nodes.find(W=>W.id===P);if(V===-1||!z)return{removed:0};let te=e.nodes.find(W=>W.id===L[L.length-1]);x.abort();let O=L.splice(V);e.data.messages=e.data.messages.filter(W=>!W.groupId||!O.includes(W.groupId)),e.data.currentInput=null;let M=o();for(let W of O.slice(1)){let K=e.nodes.find(q=>q.id===W);if(!(!K||!M||K.id===P)&&("key"in K.data&&K.data.key&&delete M[K.data.key],"keys"in K.data))for(let q of Object.values(K.data.keys))typeof q=="string"&&delete M[q]}return x=new AbortController,F(z,te),{removed:O.length}},abort:()=>{x.abort()}}};async function Lu(e){let t=e.node;switch(t.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:t.data.title}),e.next(t.nextId);case"pre-apply-result":return rf({...e,node:t});case"text":return Wu({...e,node:t});case"image":return Ku({...e,node:t});case"question-text":return Gu({...e,node:t});case"question-enum":return Zu({...e,node:t});case"question-number":return Yu({...e,node:t});case"question-phone":return Ju({...e,node:t});case"question-boolean":return Xu({...e,node:t});case"question-file":return ef({...e,node:t});case"question-address":return Qu({...e,node:t});case"end-flow":return tf({...e,node:t});case"if-block":return qu({...e,node:t});case"jump":return Pu({...e,node:t});case"link":return Hu({...e,node:t});case"integration-application-submit":return Uu({...e,node:t});case"add-submission":return ju({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Ou({...e,node:t});case"feedback":return Vu({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function Vu({next:e,node:t}){e(t.nextId)}async function Ou({next:e,node:t,talentBankClient:i,submissions:r,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(r&&i){let u=t.data.scope==="job"?(l=n.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||u!=null)try{s=await i.checkDuplicate({email:ol({key:t.data.email,submissions:r}).toString(),jobId:u,scope:t.data.scope})}catch(f){a.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Pu({next:e,node:t}){e(t.data.targetId)}async function ju({next:e,node:t,logger:i,submissions:r,context:n}){if(!r){i.error("Submissions not found");return}r[t.data.key]={type:"string",value:Oe(t.data.value,{submissions:r,context:n})},e(t.nextId)}var Ru=5e3,Bu=(e,t,i)=>{let{waitMs:r,throttles:n,maintenance:a}=gl(t==null?void 0:t.throttles,i);return{key:e,until:Date.now()+r,...n!==void 0&&{throttles:n},...a&&{maintenance:a}}},zu=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],Ko=e=>e instanceof Error&&zu.includes(e.name)?e:void 0,Go=e=>{let t=Ko(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Uu({chat:e,next:t,end:i,node:r,logger:n,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:u,setApplicationRecovery:f,forceSubmitConfirmation:d,run:h,persistWriteBarrier:g,signal:v,onSubmitNetworkError:y,closedRoleBehaviour:k,t:_}){var F;if((F=l.data.startedWriteNodeIds)!=null&&F.includes(r.id)&&(u==null?void 0:u.submitNodeId)!==r.id)return await e.sendMessage({type:"system",variant:"warning",text:_("submission_unknown")}),i();let w=l.job?`${r.id}@${l.job.id_type}:${l.job.id}`:r.id,x=0,E=h.submitAccepted&&r.data.skipConfirmation===!0&&(u==null?void 0:u.submitNodeId)!==r.id,$=async L=>{var ki,Xt,Qt,or,Si,sr,Ci,$i;let P=((ki=l.data.submitCooldown)==null?void 0:ki.key)===w?l.data.submitCooldown:void 0;P&&(P.until=Math.min(P.until,Date.now()+(P.maintenance?ea:P.throttles?mr:Qn)));let V=P==null?void 0:P.until;(l.data.reviewRequiresSend===!0&&!E||L!==!0||V!==void 0&&V>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel,...V!==void 0&&{availableAt:V}}}),E=!1;let z;if(r.data.captcha){let R=e.captcha,Be=!0;try{z=await fu(a,{signal:v,container:(R==null?void 0:R.container())??null,theme:R==null?void 0:R.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:_("captcha_check")}).catch(()=>{}).then(()=>{Be&&(R==null||R.reveal(!0))})}})}catch(lr){if(n.error("Captcha check failed",lr),v.aborted)return}finally{Be=!1,R==null||R.reveal(!1)}}await e.sendMessage({type:"loading",text:_("submitting")});let{anonymous_id:te,session_id:O}=s.getSessionInfo();if(v.aborted)return;let M=((Xt=l.data.startedWriteNodeIds)==null?void 0:Xt.includes(r.id))===!0;if((u==null?void 0:u.submitNodeId)===r.id&&await f(void 0),M||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],r.id]),await g().catch(R=>n.error("Failed to persist application write barrier",R)),v.aborted)return;let H,W=setTimeout(()=>{H=(async()=>{await e.sendMessage({type:"text",author:"bot",text:_("submission_still_working")}),await e.sendMessage({type:"loading",text:_("submitting")})})().catch(R=>n.error("Failed to send submission progress message",R))},Ru),K,q=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:te,session_id:O,job:l.job,flow_build:l.build,...z!==void 0&&{captcha_token:z},submissions:nl(l.nodes,al(o||{},r.data.submitKeys)),pre_apply:br(l.nodes,o||{},l.data.flowSessionId)})}).catch(R=>{K=R;let Be=Go(R);return(Be==null?void 0:Be.data)!==void 0?Be.data:R});if(clearTimeout(W),await H,v.aborted)return;if(K!==void 0&&!Ko(K)&&y)return await y(K,v),$(!0);r.data.key&&e.setSubmission(r.data.key,{type:"integration",value:q});let mt=(Qt=Go(K))==null?void 0:Qt.status,B=Xn(q,typeof mt=="number"?mt:void 0),Re=l.data.failedAttemptAt,yt=Re==null?void 0:Re[w];Re&&yt!==void 0&&yt>Date.now()&&(yt=Re[w]=Date.now());let _i=yt!==void 0&&Date.now()-yt<pl||((or=l.data.unconfirmedAttemptKeys)==null?void 0:or.includes(w))===!0,Ft=yl(q);Ft&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:Ft.service,response:Ft.response,flow_type:"CHATBOT_DRAWER",job:l.job,...(B==null?void 0:B.outcome)==="duplicate"&&{outcome:_i?"duplicate_after_own_attempt":"duplicate"},...Ft.outcome&&{outcome:Ft.outcome}}});let xi=vr(q)||(q==null?void 0:q.success)===!0;if((xi||wr(q))&&(h.submitAccepted=!0),xi&&((Si=l.data.submitCooldown)==null?void 0:Si.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(R=>n.error("Failed to persist submit cooldown reset",R))),vr(q)){let{redirect_url:R,message:Be,button_text:lr}=q.integration_response.data;await e.sendMessage({type:"text",author:"bot",text:Be??_("submission_redirect_message")});try{let ot=new URL(R);te&&!ot.searchParams.has("anonymous_id")&&ot.searchParams.set("anonymous_id",te),await e.sendMessage({type:"link",href:ot.toString(),text:lr??_("complete_submission"),onClick:()=>{if(!O){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:O,flow_version:l.version,href:ot.toString(),job:l.job}})}})}catch(ot){n.error(`Invalid redirect URL: ${R}`,ot),e.sendMessage({type:"system",variant:"error",text:_("redirect_url_error")})}return t(r.nextId)}let ar=wr(q);if(ar)return await e.sendMessage({type:"system",variant:"success",text:ar.message??_("submission_pending")}),t(r.nextId);if((q==null?void 0:q.success)===!0)return r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:_("submission_completed")}),t(r.nextId);let Jt=ml(B),Zt=Jt!==void 0&&((sr=o==null?void 0:o[Jt])==null?void 0:sr.type)==="file"?Jt:void 0,_t=Zt===void 0?void 0:l.nodes.find(R=>R.type==="question-file"&&R.data.key===Zt);if(!_t&&!(k==="terminal"&&(B==null?void 0:B.outcome)==="closed")&&!ra(B)&&(l.data.submitCooldown=Bu(w,P,B)),(B==null?void 0:B.outcome)!=="duplicate"&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[w]:Date.now()},(Ci=l.data.unconfirmedAttemptKeys)!=null&&Ci.includes(w)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(R=>R!==w))),(B==null?void 0:B.verdict)==="not_submitted"||(B==null?void 0:B.outcome)==="duplicate"||(B==null?void 0:B.outcome)==="closed"?(M||(l.data.startedWriteNodeIds=($i=l.data.startedWriteNodeIds)==null?void 0:$i.filter(R=>R!==r.id)),(u==null?void 0:u.submitNodeId)===r.id&&await f(u),await g().catch(R=>n.error("Failed to persist application write barrier release",R))):await g().catch(R=>n.error("Failed to persist submit cooldown",R)),B){if(n.error(K??B.message),_t&&Zt!==void 0)return e.setSubmission(Zt,null),await f({fileQuestionNodeId:_t.id,submitNodeId:r.id}),await e.sendMessage({type:"system",variant:"error",text:_("submission_unreadable_document")}),t(_t.id);if(B.outcome==="duplicate")return await e.sendMessage({type:"system",variant:"info",text:_(_i?"submission_duplicate_earlier_attempt":"submission_duplicate")}),$(!1);if(B.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",text:_("submission_closed")}),k==="terminal"?(delete l.data.submitCooldown,i()):$(!1);let R=hl(B);return R?(await e.sendMessage({type:"system",variant:"warning",text:R.until===void 0?_("submission_provider_maintenance_later"):_("submission_provider_maintenance",{time:ia(R.until,void 0)})}),$(!1)):B.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:_(wl(B)?"submission_unknown_do_not_resubmit":"submission_unknown")}),$(!1)):ra(B)?bl(q)?(await e.sendMessage({type:"text",author:"bot",text:B.message}),$(!1)):(x===0&&await e.sendMessage({type:"system",variant:"warning",text:_("captcha_failed")}),x++,$(x<=Mu)):vl(B)?(await e.sendMessage({type:"system",variant:"error",text:_("submission_retryable")}),$(!1)):(await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),i())}return n.error(K??q),await e.sendMessage({type:"system",variant:"error",text:_("submission_failed")}),i()};await $(d===!0&&!E?!1:r.data.skipConfirmation)}async function Hu({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({type:"link",href:Oe(i.data.href,{submissions:r,context:n}),text:Oe(i.data.cta,{submissions:r,context:n})}),t(i.nextId)}async function qu({submissions:e,next:t,node:i,context:r}){t(Fu(i,{submissions:e,context:r})?i.branchId:i.nextId)}async function Wu({chat:e,next:t,node:i,submissions:r,context:n}){await e.sendMessage({author:"bot",type:"text",text:Oe(i.data.text,{submissions:r,context:n})}),t(i.nextId)}async function Ku({chat:e,next:t,node:i}){await e.sendMessage({author:"bot",type:"image",url:i.data.url,height:i.data.height,width:i.data.width}),t(i.nextId)}async function Gu({chat:e,next:t,node:i,submissions:r,context:n,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Oe(i.data.question,{submissions:r,context:n})});let s=i.data.format==="phone"?await e.userInput({key:i.data.key,type:"phone",config:{optional:i.data.optional,placeholder:i.data.placeholder,minChars:i.data.minChars,maxChars:i.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:i.data.key,type:"text",config:{optional:i.data.optional,placeholder:i.data.placeholder,format:i.data.format,maxChars:i.data.maxChars,minChars:i.data.minChars,multiline:i.data.format==="text"&&i.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Ai(s.value):i.data.format==="date"&&o!==void 0?xl(s.value,o):s.value}),t(i.nextId)}async function Yu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"number",config:{max:i.data.max,min:i.data.min,optional:i.data.optional,placeholder:i.data.placeholder,decimalCases:i.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(i.nextId)}async function Ju({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"phone",config:{minChars:i.data.minChars,defaultValue:{countryCode:i.data.defaultCountryCode},placeholder:i.data.placeholder,submissionFormat:"phone",optional:i.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Ai(o.value):o.value}),t(i.nextId)}async function Zu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"multiple-choice",config:i.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:i.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(i.nextId)}async function Xu({chat:e,next:t,node:i,submissions:r,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Oe(i.data.question,{submissions:r,context:n})});let o=await e.userInput({key:i.data.key,type:"boolean",config:{optional:i.data.optional,labels:{true:i.data.trueLabel,false:i.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?i.data.trueLabel:i.data.falseLabel}),t(i.nextId)}async function Qu({chat:e,next:t,node:i,t:r}){await e.sendMessage({author:"bot",type:"text",text:i.data.question});let n=await e.userInput({type:"address",key:i.data.key,config:{optional:i.data.optional,keys:i.data.keys,line2Required:i.data.line2Required,placeholder:i.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:r("skipped")});else{let a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(i.nextId)}async function ef({node:e,chat:t,next:i,submissions:r,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Oe(e.data.question,{submissions:r,context:n})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return i(e.nextId)}async function tf({chat:e,end:t,node:i}){await e.sendMessage({type:"system",variant:"info",text:i.data.systemMessage}),t()}async function rf({node:e,flow:t,submissions:i,chat:r,next:n,apiClient:a,analytics:o,signal:s,context:l}){let u=rl(t.nodes,i||{}),{answers:f,...d}=u;if(r.setSubmission(e.data.key,{type:"integration",value:d}),Tu(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:br(t.nodes,i||{},t.data.flowSessionId)},s),u.status!=="skipped"){let h=[u.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":u.hasHardConcerns?e.data.messages.hard:u.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let g of["hard","advisory"]){let v=f.filter(y=>!y.matched&&y.severity===g);v.length&&h.push((g==="hard"?"Role requirements":"Other things to consider")+`
|
|
6
|
+
`+v.map(y=>`• ${y.message}`).join(`
|
|
7
7
|
`))}await r.sendMessage({type:"text",author:"bot",text:h.join(`
|
|
8
8
|
|
|
9
|
-
`)}),d.hasHardConcerns&&e.data.alternativeLink&&await r.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await r.userInput({type:"submit",key:void 0,config:{label:Ve(e.data.continueLabel,{submissions:i,context:l})}})}return n(e.nextId)}const jo=(e,t,i)=>{var r;return e.log({event:i,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(r=t.analytics)==null?void 0:r.customProperties})},pn="resume-prompt",Lu=async({chatService:e,t,signal:i})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:pn,signal:i});const r=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:i});return D.removeMessagesSentByNodeIds([pn]),(r==null?void 0:r.value)!==!1},_t=({class:e,...t})=>{const{t:i}=oe();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:i("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var Xe;function Wi(e){return{lang:(e==null?void 0:e.lang)??(Xe==null?void 0:Xe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Xe==null?void 0:Xe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Xe==null?void 0:Xe.abortPipeEarly)}}var hn;function ju(e){return hn==null?void 0:hn.get(e)}var gn;function Ru(e){return gn==null?void 0:gn.get(e)}var bn;function Bu(e,t){var i;return(i=bn==null?void 0:bn.get(e))==null?void 0:i.get(t)}function Pt(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function pe(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Pt(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??Bu(e.reference,l.lang)??(d?Ru(l.lang):null)??r.message??ju(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function qe(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Wi())}}}function zu(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Uu(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function qu(e){if(e.path){let t="";for(const i of e.path)if(typeof i.key=="string"||typeof i.key=="number")t?t+=`.${i.key}`:t+=i.key;else return null;return t}return null}var Wu=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},Hu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Ro(e,t){return{kind:"validation",type:"check",reference:Ro,async:!1,expects:null,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement(i.value)&&pe(this,"input",i,r),i}}}function Bo(e){return{kind:"validation",type:"email",reference:Bo,expects:null,async:!1,requirement:Hu,message:e,"~run"(t,i){return t.typed&&!this.requirement.test(t.value)&&pe(this,"email",t,i),t}}}function ci(e,t){return{kind:"validation",type:"max_length",reference:ci,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&pe(this,"length",i,r,{received:`${i.value.length}`}),i}}}function zo(e,t){return{kind:"validation",type:"max_value",reference:zo,async:!1,expects:`<=${e instanceof Date?e.toJSON():Pt(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value<=this.requirement)&&pe(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():Pt(i.value)}),i}}}function Ot(e,t){return{kind:"validation",type:"min_length",reference:Ot,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&pe(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Uo(e,t){return{kind:"validation",type:"min_value",reference:Uo,async:!1,expects:`>=${e instanceof Date?e.toJSON():Pt(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value>=this.requirement)&&pe(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():Pt(i.value)}),i}}}function vn(e,t){return{kind:"validation",type:"regex",reference:vn,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement.test(i.value)&&pe(this,"format",i,r),i}}}function wn(e){return{kind:"transformation",type:"transform",reference:wn,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function qo(e){return{kind:"validation",type:"url",reference:qo,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,i){return t.typed&&!this.requirement(t.value)&&pe(this,"URL",t,i),t}}}function Ku(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function Wo(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function Ho(e,t){return{kind:"schema",type:"array",reference:Ho,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return qe(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const 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=i.issues)==null||a.push(p);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else pe(this,"type",i,r);return i}}}function Ko(e){return{kind:"schema",type:"boolean",reference:Ko,expects:"boolean",async:!1,message:e,get"~standard"(){return qe(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:pe(this,"type",t,i),t}}}function Go(e){return{kind:"schema",type:"number",reference:Go,expects:"number",async:!1,message:e,get"~standard"(){return qe(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:pe(this,"type",t,i),t}}}function Qe(e,t){return{kind:"schema",type:"object",reference:Qe,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return qe(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:Wo(s),d=s["~run"]({value:l},r);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=i.issues)==null||a.push(u);if(i.issues||(i.issues=d.issues),r.abortEarly){i.typed=!1;break}}d.typed||(i.typed=!1),i.value[o]=d.value}else if(s.fallback!==void 0)i.value[o]=Ku(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(pe(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else pe(this,"type",i,r);return i}}}function Lt(e,t){return{kind:"schema",type:"optional",reference:Lt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return qe(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=Wo(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function Yo(e,t){return{kind:"schema",type:"picklist",reference:Yo,expects:Uu(e.map(Pt),"|"),async:!1,options:e,message:t,get"~standard"(){return qe(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:pe(this,"type",i,r),i}}}function Jo(e,t,i){return{kind:"schema",type:"record",reference:Jo,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return qe(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(zu(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 g of p.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=p.issues),n.abortEarly){r.typed=!1;break}}const u=this.value["~run"]({value:d},n);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:d};for(const g of u.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=u.issues),n.abortEarly){r.typed=!1;break}}(!p.typed||!u.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=u.value)}}else pe(this,"type",r,n);return r}}}function ke(e){return{kind:"schema",type:"string",reference:ke,expects:"string",async:!1,message:e,get"~standard"(){return qe(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:pe(this,"type",t,i),t}}}function Gu(e,t,i){const r=e["~run"]({value:t},Wi(i));if(r.issues)throw new Wu(r.issues);return r.value}function Yu(e,t){const i={};for(const r in e.entries)i[r]=!t||t.includes(r)?Lt(e.entries[r]):e.entries[r];return{...e,entries:i,get"~standard"(){return qe(this)}}}function ct(...e){return{...e[0],pipe:e,get"~standard"(){return qe(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function Ju(e,t,i){const r=e["~run"]({value:t},Wi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}async function Zu(e,t,i){const r=await e["~run"]({value:t},Wi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}const jt=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[c("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"break-words pr-1 text-sm",children:e.message})]}),dt=({class:e,...t})=>{const{t:i}=oe();return c("button",{type:"button",class:Je("fr touch-hitbox text-neutral-11 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:i("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),i("skip")]})};var mn={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 Rt=wt("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}}),Xu="https://api.mapbox.com/search/searchbox/v1/suggest",Qu="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",ef=e=>atob(e).split("").reverse().join(""),et=Qe({name:ke()}),tf=Qe({suggestions:Ho(Qe({feature_type:Lt(ke()),full_address:Lt(ke()),place_formatted:Lt(ke()),name:Lt(ke()),mapbox_id:ke(),context:Yu(Qe({address:et,street:et,neighborhood:et,locality:et,district:et,place:et,region:et,postcode:et,country:et}))}))}),rf=({logger:e,t})=>nt(()=>{var r;const i=(r=D.current$.peek().flow)==null?void 0:r.data.flowSessionId;return i?{enabled:!0,getPredictions:async n=>{var u;const a=new URL(Xu);a.searchParams.set("q",n),a.searchParams.set("session_token",i);const o=(u=D.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",ef(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=Ju(tf,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 g,w,_,k,y,v,x,E,$;return{label:h.full_address??([h.name,h.place_formatted].filter(Boolean).join(", ")||h.mapbox_id),id:h.mapbox_id,address:{line1:((g=h.context.address)==null?void 0:g.name)??((w=h.context.street)==null?void 0:w.name),line2:void 0,line3:((_=h.context.neighborhood)==null?void 0:_.name)??((k=h.context.locality)==null?void 0:k.name),city:((y=h.context.place)==null?void 0:y.name)??((v=h.context.district)==null?void 0:v.name),state:(x=h.context.region)==null?void 0:x.name,postcode:((E=h.context.postcode)==null?void 0:E.name)??(h.feature_type==="postcode"?h.name:void 0),country:($=h.context.country)==null?void 0:$.name}}})}}}:{enabled:!1}},[e,t]),Zo=e=>{const{t}=oe();return c("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},nf=({input:e,onSubmitSuccess:t,logger:i})=>{const{t:r}=oe(),[n,a]=Ne(),{enabled:o,getPredictions:s}=rf({logger:i,t:r}),[l,d]=Ne(o?"query":"manual"),[p,u]=Ne(""),[h,g]=Ne(),w=xe(),_=xe(),k=v=>{var E;if(Ze(o,"Query state should not be enabled"),v=v.trim(),v===((E=w.current)==null?void 0:E.query)||v===(h==null?void 0:h.query)&&h.status==="done")return;if(u(v),v===""){w.current=void 0,g(void 0);return}const x=w.current={query:v};g({query:v,status:"pending"}),s(v).then($=>{w.current===x&&(w.current=void 0,g($.ok?{query:v,status:"done",items:$.data}:{query:v,status:"failed",error:$.error}))},$=>{w.current===x&&(w.current=void 0,i.error("Failed to get address details",$),g({query:v,status:"failed",error:r("address_error")}))})},y=(v,x)=>{a(E=>({...E,[v]:x}))};switch(l){case"query":return Ze(o,"Query state should not be enabled"),c(af,{input:e,onSkip:()=>t(null),onAddressSelect:v=>{if(v===""){w.current&&(w.current=void 0,g(void 0)),d("manual");return}const x=(h==null?void 0:h.status)==="done"?h.items.find(E=>E.id===v):void 0;x&&(_.current!==v&&a(x.address),_.current=v,d("details"))},onAddressSearch:k,lookup:h,query:p});case"details":return Ze(n!==void 0),c(Xo,{input:e,logger:i,onSubmitSuccess:t,addressFields:n,onFieldChange:y,actions:c(Zo,{onClick:()=>{d("query")}})});case"manual":return c(Xo,{logger:i,input:e,onSubmitSuccess:t,addressFields:n??{},onFieldChange:y,actions:o?c(Zo,{onClick:()=>{d("query")}}):e.config.optional?c(dt,{onClick:()=>t(null)}):void 0})}},af=({input:e,onSkip:t,lookup:i,onAddressSelect:r,query:n,onAddressSearch:a})=>{const{t:o}=oe(),s=xe(null);return _e(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(ne,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const p=new FormData(l.currentTarget).get("address");typeof p=="string"&&a(p)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:n,class:Rt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[c("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]})}),c("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&c(dt,{class:"relative",onClick:t})]}),(i==null?void 0:i.status)==="failed"?c(jt,{error:{message:i.error}}):null,c("p",{role:"status",class:(i==null?void 0:i.status)==="pending"||(i==null?void 0:i.status)==="done"&&i.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(i==null?void 0:i.status)==="pending"?c(ne,{children:[c(Ui,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(i==null?void 0:i.status)==="done"&&i.items.length===0?o("address_no_results"):null}),c("ul",{children:[((i==null?void 0:i.status)==="done"?i.items:[]).map(l=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{r(l.id)},children:[c("span",{class:"flex-grow",children:l.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{r("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},yn=["line1","line2","line3","city","state","postcode","country"],Xo=({addressFields:e,onFieldChange:t,onSubmitSuccess:i,actions:r,input:n})=>{const a=xe(null);_e(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(mn),{t:s}=oe();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{const d=l.currentTarget,p=[...d.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of p){g.value="";const w=yn.find(_=>n.config.keys[_]===g.name);w&&t(w,"")}if(p.length>0&&!d.checkValidity()){l.preventDefault(),d.reportValidity();return}const u=new FormData(d),h=Object.fromEntries(u.entries());i({type:"address",value:h})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:yn.map((l,d)=>{const p=`isdk_${l}`,u=n.config.keys[l];return u?c(ne,{children:[c("label",{for:p,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:u,id:p,defaultValue:e[l],onChange:h=>t(l,h.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?c("option",{value:e[l],children:e[l]}):c("option",{value:"",children:s("select_country")}),o.map(h=>c("option",{value:h,children:h},h))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:d===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:u,id:p,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:l==="line2"?n.config.line2Required===!0:l!=="line3"}),d===yn.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[r,c(_t,{class:"ml-auto"})]})]})},_n=()=>{const e=xe(null);return Ti(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Qo=["true","false"],of=Yo(Qo),sf="answer",es="flex items-center flex-wrap gap-2 p-2.5",ts="min-w-0 max-w-full flex-auto",is=Vr(({label:e,...t},i)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:i,children:c("p",{class:"text-center text-base",children:e})})),lf=({input:e,onSubmitSuccess:t})=>{const i=_n();return c("form",{noValidate:!0,class:"",onSubmit:r=>{r.preventDefault();const n=Ad(r).value,a=Gu(of,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:es,children:Qo.map((r,n)=>c("li",{class:ts,children:c(is,{ref:n===0?i:null,type:"submit",name:sf,value:r,label:e.config.labels[r]},r)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(dt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},cf=e=>new Promise((t,i)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"||!r.result)return i(new Error("Invalid file"));t(r.result)},r.onerror=i,r.readAsDataURL(e)}),rs=e=>e.reduce((t,i)=>t+i.sizeKb,0),df=Vt("file"),ns=3,Hi=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},uf=({file:e,class:t,...i})=>{const{t:r}=oe(),[n,a]=Hi(e.name);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),...i,children:[c("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"sr-only",children:[r("file_name"),": "]}),c("span",{class:"block truncate",children:n}),c("span",{children:a})]}),c("p",{class:"text-accent-11",children:[c("span",{class:"sr-only",children:[r("file_size"),": "]}),Et(e.sizeKb)]})]})},as=({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}),ff=(e,t)=>{const[i,r]=Hi(e);return`${i.slice(0,t)}${r}`},os=e=>({name:ff(e.name,42),sizeKb:e.size/1e3}),pf=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],hf=(e,t,i)=>{const r=Hi(t.name)[1].toLowerCase(),n=[...i.map(o=>o.toLowerCase()),...pf],a=r===""?"none":n.includes(r)?r:"other";return`chatbot-file-refused:${e}:${a}`},gf=({input:e,onSubmitSuccess:t,analytics:i})=>{var k;const r=(k=D.current$.value.flow)==null?void 0:k.data.submissions[e.key],[n,a]=Ne(df(r)&&r.value.length?{status:"ready",files:r.value}:{status:"empty"}),o=xe(0),s=n.status==="ready"?n.files:[],l=n.status==="ready"||n.status==="pending"?n.files:[],d=n.status==="error"?n.error:void 0,p=l.length-ns,u=rs(l),h=_n(),{t:g}=oe(),w=y=>{if(!y.length)return{reason:"required",error:{type:"required",message:g("validation_file")}};if(!Un(y,e.config.extensions))return{reason:"type",file:y.find(v=>!Un([v],e.config.extensions)),error:{type:"validate",message:g("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(y.some(v=>v.sizeKb===0))return{reason:"empty",file:y.find(v=>v.sizeKb===0),error:{type:"validate",message:g("validation_file_empty")}};if(e.config.fileSizeLimitKib&&rs(y)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:g("validation_file_size",{size:Et(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&y.length>1)return{reason:"count",error:{type:"invalid",message:g("validation_file_max",{count:1})}}},_=(y,v)=>{var x,E;return i.log({event:"INTERACTION",properties:{tag:hf(y,v,e.config.extensions)},customProperties:(E=(x=D.current$.peek().flow)==null?void 0:x.analytics)==null?void 0:E.customProperties})};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:y=>{if(y.preventDefault(),n.status==="pending"||n.status==="error")return;const v=w(s);v?a({status:"error",error:v.error}):t({type:"file",value:s})},children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,ns).map(y=>{const[v,x]=Hi(y.name);return c(as,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:x})]})}),p>0?c(as,{children:g("file_more",{count:p})}):null]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:g("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-11 text-xs",children:["(",g("file_max_size",{size:Et(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:g("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(y=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:y.replace(".","")}))})]})]}),c("p",{role:"status",class:Je("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:n.status==="pending"?c(ne,{children:[c(Ui,{"aria-hidden":"true",class:"h-4 w-4"}),g("file_preparing",{count:l.length})]}):n.status==="ready"?c(ne,{children:[s.length>1?g("file_total_size",{size:Et(u)}):Et(u),c("span",{class:"sr-only",children:[". ",g("file_ready",{count:s.length})]})]}):null}),c("input",{id:"dropzone-file","aria-label":g("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async y=>{Ze(y.target instanceof HTMLInputElement);const v=y.target.files?Array.from(y.target.files):[];y.target.value="";const[x]=v;if(!x)return;const E=++o.current,$=n.status==="ready",T=v.map(os),V=w(T);if(V)return _(V.reason,V.file??x),a({status:"error",error:V.error});a({status:"pending",files:T});let L;try{const P=await Promise.all(v.map(async z=>{try{return{...os(z),data:await cf(z)}}catch(te){throw L??(L=z),te}}));o.current===E&&a({status:"ready",files:P})}catch{if(o.current!==E)return;_("unreadable",L??x),a({status:"error",error:{type:"invalid",message:g($?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(_t,{disabled:s.length===0}),e.config.optional&&c(dt,{class:"relative",onClick:()=>t(null)})]})]}),c(jt,{error:d})]})};var di=e=>e.type==="checkbox",xt=e=>e instanceof Date,Se=e=>e==null;const ss=e=>typeof e=="object";var se=e=>!Se(e)&&!Array.isArray(e)&&ss(e)&&!xt(e),bf=e=>se(e)&&e.target?di(e.target)?e.target.checked:e.target.value:e,vf=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wf=(e,t)=>e.has(vf(t)),mf=e=>{const t=e.constructor&&e.constructor.prototype;return se(t)&&t.hasOwnProperty("isPrototypeOf")},xn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function de(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(xn&&(e instanceof Blob||t))return e;const i=Array.isArray(e);if(!i&&!(se(e)&&mf(e)))return e;const r=i?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=de(e[n]));return r}var Ki=e=>/^\w*$/.test(e),re=e=>e===void 0,kn=e=>Array.isArray(e)?e.filter(Boolean):[],Sn=e=>kn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),A=(e,t,i)=>{if(!t||!se(e))return i;const r=(Ki(t)?[t]:Sn(t)).reduce((n,a)=>Se(n)?n:n[a],e);return re(r)||r===e?re(e[t])?i:e[t]:r},We=e=>typeof e=="boolean",Pe=e=>typeof e=="function",X=(e,t,i)=>{let r=-1;const n=Ki(t)?[t]:Sn(t),a=n.length,o=a-1;for(;++r<a;){const s=n[r];let l=i;if(r!==o){const d=e[s];l=se(d)||Array.isArray(d)?d:isNaN(+n[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ls={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Oe={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},tt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},yf=he.createContext(null);yf.displayName="HookFormControlContext";var _f=(e,t,i,r=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Oe.all&&(t._proxyFormState[o]=!r||Oe.all),i&&(i[o]=!0),e[o]}});return n};const xf=typeof window<"u"?he.useLayoutEffect:he.useEffect;var $e=e=>typeof e=="string",kf=(e,t,i,r,n)=>$e(e)?(r&&t.watch.add(e),A(i,e,n)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),A(i,a))):(r&&(t.watchAll=!0),i),Cn=e=>Se(e)||!ss(e);function ut(e,t,i=new WeakSet){if(Cn(e)||Cn(t))return Object.is(e,t);if(xt(e)&&xt(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(i.has(e)||i.has(t))return!0;i.add(e),i.add(t);for(const a of r){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(xt(o)&&xt(s)||se(o)&&se(s)||Array.isArray(o)&&Array.isArray(s)?!ut(o,s,i):!Object.is(o,s))return!1}}return!0}const Sf=he.createContext(null);Sf.displayName="HookFormContext";var cs=(e,t,i,r,n)=>t?{...i[e],types:{...i[e]&&i[e].types?i[e].types:{},[r]:n||!0}}:{},ui=e=>Array.isArray(e)?e:[e],ds=()=>{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 us(e,t){const i={};for(const r in e)if(e.hasOwnProperty(r)){const n=e[r],a=t[r];if(n&&se(n)&&a){const o=us(n,a);se(o)&&(i[r]=o)}else e[r]&&(i[r]=a)}return i}var ve=e=>se(e)&&!Object.keys(e).length,$n=e=>e.type==="file",Gi=e=>{if(!xn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},fs=e=>e.type==="select-multiple",En=e=>e.type==="radio",Cf=e=>En(e)||di(e),In=e=>Gi(e)&&e.isConnected;function $f(e,t){const i=t.slice(0,-1).length;let r=0;for(;r<i;)e=re(e)?r++:e[t[r++]];return e}function Ef(e){for(const t in e)if(e.hasOwnProperty(t)&&!re(e[t]))return!1;return!0}function le(e,t){const i=Array.isArray(t)?t:Ki(t)?[t]:Sn(t),r=i.length===1?e:$f(e,i),n=i.length-1,a=i[n];return r&&delete r[a],n!==0&&(se(r)&&ve(r)||Array.isArray(r)&&Ef(r))&&le(e,i.slice(0,-1)),e}var If=e=>{for(const t in e)if(Pe(e[t]))return!0;return!1};function ps(e){return Array.isArray(e)||se(e)&&!If(e)}function An(e,t={}){for(const i in e){const r=e[i];ps(r)?(t[i]=Array.isArray(r)?[]:{},An(r,t[i])):re(r)||(t[i]=!0)}return t}function Bt(e,t,i){i||(i=An(t));for(const r in e){const n=e[r];if(ps(n))re(t)||Cn(i[r])?i[r]=An(n,Array.isArray(n)?[]:{}):Bt(n,Se(t)?{}:t[r],i[r]);else{const a=t[r];i[r]=!ut(n,a)}}return i}const hs={value:!1,isValid:!1},gs={value:!0,isValid:!0};var bs=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!re(e[0].attributes.value)?re(e[0].value)||e[0].value===""?gs:{value:e[0].value,isValid:!0}:gs:hs}return hs},vs=(e,{valueAsNumber:t,valueAsDate:i,setValueAs:r})=>re(e)?e:t?e===""?NaN:e&&+e:i&&$e(e)?new Date(e):r?r(e):e;const ws={isValid:!1,value:null};var ms=e=>Array.isArray(e)?e.reduce((t,i)=>i&&i.checked&&!i.disabled?{isValid:!0,value:i.value}:t,ws):ws;function ys(e){const t=e.ref;return $n(t)?t.files:En(t)?ms(e.refs).value:fs(t)?[...t.selectedOptions].map(({value:i})=>i):di(t)?bs(e.refs).value:vs(re(t.value)?e.ref.value:t.value,e)}var Af=(e,t,i,r)=>{const n={};for(const a of e){const o=A(t,a);o&&X(n,a,o._f)}return{criteriaMode:i,names:[...e],fields:n,shouldUseNativeValidation:r}},Yi=e=>e instanceof RegExp,fi=e=>re(e)?e:Yi(e)?e.source:se(e)?Yi(e.value)?e.value.source:e.value:e,_s=e=>({isOnSubmit:!e||e===Oe.onSubmit,isOnBlur:e===Oe.onBlur,isOnChange:e===Oe.onChange,isOnAll:e===Oe.all,isOnTouch:e===Oe.onTouched});const xs="AsyncFunction";var Ff=e=>!!e&&!!e.validate&&!!(Pe(e.validate)&&e.validate.constructor.name===xs||se(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===xs)),Tf=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ks=(e,t,i)=>!i&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const pi=(e,t,i,r)=>{for(const n of i||Object.keys(e)){const a=A(e,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(pi(s,t))break}else if(se(s)&&pi(s,t))break}}};function Ss(e,t,i){const r=A(e,i);if(r||Ki(i))return{error:r,name:i};const n=i.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),s=A(e,a);if(o&&!Array.isArray(o)&&i!==a)return{name:i};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};n.pop()}return{name:i}}var Df=(e,t,i,r)=>{i(e);const{name:n,...a}=e;return ve(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!r||Oe.all))},Nf=(e,t,i)=>!e||!t||e===t||ui(e).some(r=>r&&(i?r===t:r.startsWith(t)||t.startsWith(r))),Mf=(e,t,i,r,n)=>n.isOnAll?!1:!i&&n.isOnTouch?!(t||e):(i?r.isOnBlur:n.isOnBlur)?!e:(i?r.isOnChange:n.isOnChange)?e:!0,Vf=(e,t)=>!kn(A(e,t)).length&&le(e,t),Pf=(e,t,i)=>{const r=ui(A(e,i));return X(r,"root",t[i]),X(e,i,r),e};function Cs(e,t,i="validate"){if($e(e)||Array.isArray(e)&&e.every($e)||We(e)&&!e)return{type:i,message:$e(e)?e:"",ref:t}}var zt=e=>se(e)&&!Yi(e)?e:{value:e,message:""},$s=async(e,t,i,r,n,a)=>{const{ref:o,refs:s,required:l,maxLength:d,minLength:p,min:u,max:h,pattern:g,validate:w,name:_,valueAsNumber:k,mount:y}=e._f,v=A(i,_);if(!y||t.has(_))return{};const x=s?s[0]:o,E=O=>{n&&x.reportValidity&&(x.setCustomValidity(We(O)?"":O||""),x.reportValidity())},$={},T=En(o),V=di(o),L=T||V,P=(k||$n(o))&&re(o.value)&&re(v)||Gi(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,z=cs.bind(null,_,r,$),te=(O,N,q,H=tt.maxLength,K=tt.minLength)=>{const W=O?N:q;$[_]={type:O?H:K,message:W,ref:o,...z(O?H:K,W)}};if(a?!Array.isArray(v)||!v.length:l&&(!L&&(P||Se(v))||We(v)&&!v||V&&!bs(s).isValid||T&&!ms(s).isValid)){const{value:O,message:N}=$e(l)?{value:!!l,message:l}:zt(l);if(O&&($[_]={type:tt.required,message:N,ref:x,...z(tt.required,N)},!r))return E(N),$}if(!P&&(!Se(u)||!Se(h))){let O,N;const q=zt(h),H=zt(u);if(!Se(v)&&!isNaN(v)){const K=o.valueAsNumber||v&&+v;Se(q.value)||(O=K>q.value),Se(H.value)||(N=K<H.value)}else{const K=o.valueAsDate||new Date(v),W=je=>new Date(new Date().toDateString()+" "+je),B=o.type=="time",Le=o.type=="week";$e(q.value)&&v&&(O=B?W(v)>W(q.value):Le?v>q.value:K>new Date(q.value)),$e(H.value)&&v&&(N=B?W(v)<W(H.value):Le?v<H.value:K<new Date(H.value))}if((O||N)&&(te(!!O,q.message,H.message,tt.max,tt.min),!r))return E($[_].message),$}if((d||p)&&!P&&($e(v)||a&&Array.isArray(v))){const O=zt(d),N=zt(p),q=!Se(O.value)&&v.length>+O.value,H=!Se(N.value)&&v.length<+N.value;if((q||H)&&(te(q,O.message,N.message),!r))return E($[_].message),$}if(g&&!P&&$e(v)){const{value:O,message:N}=zt(g);if(Yi(O)&&!v.match(O)&&($[_]={type:tt.pattern,message:N,ref:o,...z(tt.pattern,N)},!r))return E(N),$}if(w){if(Pe(w)){const O=await w(v,i),N=Cs(O,x);if(N&&($[_]={...N,...z(tt.validate,N.message)},!r))return E(N.message),$}else if(se(w)){let O={};for(const N in w){if(!ve(O)&&!r)break;const q=Cs(await w[N](v,i),x,N);q&&(O={...q,...z(N,q.message)},E(q.message),r&&($[_]=O))}if(!ve(O)&&($[_]={ref:x,...O},!r))return $}}return E(!0),$};const Of={mode:Oe.onSubmit,reValidateMode:Oe.onChange,shouldFocusError:!0};function Lf(e={}){let t={...Of,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:Pe(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},n=se(t.defaultValues)||se(t.values)?de(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:de(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 g={array:ds(),state:ds()},w=t.criteriaMode===Oe.all,_=f=>b=>{clearTimeout(d),d=setTimeout(f,b)},k=async f=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||h.isValid||f)){let b;t.resolver?(b=ve((await L()).errors),y()):b=await z(r,!0),b!==i.isValid&&g.state.next({isValid:b})}},y=(f,b)=>{!t.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((f||Array.from(s.mount)).forEach(m=>{m&&(b?X(i.validatingFields,m,b):le(i.validatingFields,m))}),g.state.next({validatingFields:i.validatingFields,isValidating:!ve(i.validatingFields)}))},v=(f,b=[],m,I,C=!0,S=!0)=>{if(I&&m&&!t.disabled){if(o.action=!0,S&&Array.isArray(A(r,f))){const M=m(A(r,f),I.argA,I.argB);C&&X(r,f,M)}if(S&&Array.isArray(A(i.errors,f))){const M=m(A(i.errors,f),I.argA,I.argB);C&&X(i.errors,f,M),Vf(i.errors,f)}if((u.touchedFields||h.touchedFields)&&S&&Array.isArray(A(i.touchedFields,f))){const M=m(A(i.touchedFields,f),I.argA,I.argB);C&&X(i.touchedFields,f,M)}(u.dirtyFields||h.dirtyFields)&&(i.dirtyFields=Bt(n,a)),g.state.next({name:f,isDirty:O(f,b),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else X(a,f,b)},x=(f,b)=>{X(i.errors,f,b),g.state.next({errors:i.errors})},E=f=>{i.errors=f,g.state.next({errors:i.errors,isValid:!1})},$=(f,b,m,I)=>{const C=A(r,f);if(C){const S=A(a,f,re(m)?A(n,f):m);re(S)||I&&I.defaultChecked||b?X(a,f,b?S:ys(C._f)):H(f,S),o.mount&&!o.action&&k()}},T=(f,b,m,I,C)=>{let S=!1,M=!1;const G={name:f};if(!t.disabled){if(!m||I){(u.isDirty||h.isDirty)&&(M=i.isDirty,i.isDirty=G.isDirty=O(),S=M!==G.isDirty);const Y=ut(A(n,f),b);M=!!A(i.dirtyFields,f),Y?le(i.dirtyFields,f):X(i.dirtyFields,f,!0),G.dirtyFields=i.dirtyFields,S=S||(u.dirtyFields||h.dirtyFields)&&M!==!Y}if(m){const Y=A(i.touchedFields,f);Y||(X(i.touchedFields,f,m),G.touchedFields=i.touchedFields,S=S||(u.touchedFields||h.touchedFields)&&Y!==m)}S&&C&&g.state.next(G)}return S?G:{}},V=(f,b,m,I)=>{const C=A(i.errors,f),S=(u.isValid||h.isValid)&&We(b)&&i.isValid!==b;if(t.delayError&&m?(l=_(()=>x(f,m)),l(t.delayError)):(clearTimeout(d),l=null,m?X(i.errors,f,m):le(i.errors,f)),(m?!ut(C,m):C)||!ve(I)||S){const M={...I,...S&&We(b)?{isValid:b}:{},errors:i.errors,name:f};i={...i,...M},g.state.next(M)}},L=async f=>(y(f,!0),await t.resolver(a,t.context,Af(f||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),P=async f=>{const{errors:b}=await L(f);if(y(f),f)for(const m of f){const I=A(b,m);I?X(i.errors,m,I):le(i.errors,m)}else i.errors=b;return b},z=async(f,b,m={valid:!0})=>{for(const I in f){const C=f[I];if(C){const{_f:S,...M}=C;if(S){const G=s.array.has(S.name),Y=C._f&&Ff(C._f);Y&&u.validatingFields&&y([S.name],!0);const we=await $s(C,s.disabled,a,w,t.shouldUseNativeValidation&&!b,G);if(Y&&u.validatingFields&&y([S.name]),we[S.name]&&(m.valid=!1,b||e.shouldUseNativeValidation))break;!b&&(A(we,S.name)?G?Pf(i.errors,we,S.name):X(i.errors,S.name,we[S.name]):le(i.errors,S.name))}!ve(M)&&await z(M,b,m)}}return m.valid},te=()=>{for(const f of s.unMount){const b=A(r,f);b&&(b._f.refs?b._f.refs.every(m=>!In(m)):!In(b._f.ref))&&qt(f)}s.unMount=new Set},O=(f,b)=>!t.disabled&&(f&&b&&X(a,f,b),!ut(gi(),n)),N=(f,b,m)=>kf(f,s,{...o.mount?a:re(b)?n:$e(f)?{[f]:b}:b},m,b),q=f=>kn(A(o.mount?a:n,f,t.shouldUnregister?A(n,f,[]):[])),H=(f,b,m={})=>{const I=A(r,f);let C=b;if(I){const S=I._f;S&&(!S.disabled&&X(a,f,vs(b,S)),C=Gi(S.ref)&&Se(b)?"":b,fs(S.ref)?[...S.ref.options].forEach(M=>M.selected=C.includes(M.value)):S.refs?di(S.ref)?S.refs.forEach(M=>{(!M.defaultChecked||!M.disabled)&&(Array.isArray(C)?M.checked=!!C.find(G=>G===M.value):M.checked=C===M.value||!!C)}):S.refs.forEach(M=>M.checked=M.value===C):$n(S.ref)?S.ref.value="":(S.ref.value=C,S.ref.type||g.state.next({name:f,values:de(a)})))}(m.shouldDirty||m.shouldTouch)&&T(f,C,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&je(f)},K=(f,b,m)=>{for(const I in b){if(!b.hasOwnProperty(I))return;const C=b[I],S=f+"."+I,M=A(r,S);(s.array.has(f)||se(C)||M&&!M._f)&&!xt(C)?K(S,C,m):H(S,C,m)}},W=(f,b,m={})=>{const I=A(r,f),C=s.array.has(f),S=de(b);X(a,f,S),C?(g.array.next({name:f,values:de(a)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&m.shouldDirty&&g.state.next({name:f,dirtyFields:Bt(n,a),isDirty:O(f,S)})):I&&!I._f&&!Se(S)?K(f,S,m):H(f,S,m),ks(f,s)?g.state.next({...i,name:f,values:de(a)}):g.state.next({name:o.mount?f:void 0,values:de(a)})},B=async f=>{o.mount=!0;const b=f.target;let m=b.name,I=!0;const C=A(r,m),S=Y=>{I=Number.isNaN(Y)||xt(Y)&&isNaN(Y.getTime())||ut(Y,A(a,m,Y))},M=_s(t.mode),G=_s(t.reValidateMode);if(C){let Y,we;const Ct=b.type?ys(C._f):bf(f),ht=f.type===ls.BLUR||f.type===ls.FOCUS_OUT,Dp=!Tf(C._f)&&!t.resolver&&!A(i.errors,m)&&!C._f.deps||Mf(ht,A(i.touchedFields,m),i.isSubmitted,G,M),Fn=ks(m,s,ht);X(a,m,Ct),ht?(!b||!b.readOnly)&&(C._f.onBlur&&C._f.onBlur(f),l&&l(0)):C._f.onChange&&C._f.onChange(f);const Tn=T(m,Ct,ht),Np=!ve(Tn)||Fn;if(!ht&&g.state.next({name:m,type:f.type,values:de(a)}),Dp)return(u.isValid||h.isValid)&&(t.mode==="onBlur"?ht&&k():ht||k()),Np&&g.state.next({name:m,...Fn?{}:Tn});if(!ht&&Fn&&g.state.next({...i}),t.resolver){const{errors:Os}=await L([m]);if(y([m]),S(Ct),I){const Mp=Ss(i.errors,r,m),Ls=Ss(Os,r,Mp.name||m);Y=Ls.error,m=Ls.name,we=ve(Os)}}else y([m],!0),Y=(await $s(C,s.disabled,a,w,t.shouldUseNativeValidation))[m],y([m]),S(Ct),I&&(Y?we=!1:(u.isValid||h.isValid)&&(we=await z(r,!0)));I&&(C._f.deps&&(!Array.isArray(C._f.deps)||C._f.deps.length>0)&&je(C._f.deps),V(m,we,Y,Tn))}},Le=(f,b)=>{if(A(i.errors,b)&&f.focus)return f.focus(),1},je=async(f,b={})=>{let m,I;const C=ui(f);if(t.resolver){const S=await P(re(f)?f:C);m=ve(S),I=f?!C.some(M=>A(S,M)):m}else f?(I=(await Promise.all(C.map(async S=>{const M=A(r,S);return await z(M&&M._f?{[S]:M}:M)}))).every(Boolean),!(!I&&!i.isValid)&&k()):I=m=await z(r);return g.state.next({...!$e(f)||(u.isValid||h.isValid)&&m!==i.isValid?{}:{name:f},...t.resolver||!f?{isValid:m}:{},errors:i.errors}),b.shouldFocus&&!I&&pi(r,Le,f?C:s.mount),I},gi=(f,b)=>{let m={...o.mount?a:n};return b&&(m=us(b.dirtyFields?i.dirtyFields:i.touchedFields,m)),re(f)?m:$e(f)?A(m,f):f.map(I=>A(m,I))},ft=(f,b)=>({invalid:!!A((b||i).errors,f),isDirty:!!A((b||i).dirtyFields,f),error:A((b||i).errors,f),isValidating:!!A(i.validatingFields,f),isTouched:!!A((b||i).touchedFields,f)}),Qi=f=>{const b=f?ui(f):void 0;b==null||b.forEach(m=>le(i.errors,m)),b?b.forEach(m=>{g.state.next({name:m,errors:i.errors})}):g.state.next({errors:{}})},bi=(f,b,m)=>{const I=(A(r,f,{_f:{}})._f||{}).ref,C=A(i.errors,f)||{},{ref:S,message:M,type:G,...Y}=C;X(i.errors,f,{...Y,...b,ref:I}),g.state.next({name:f,errors:i.errors,isValid:!1}),m&&m.shouldFocus&&I&&I.focus&&I.focus()},vi=(f,b)=>Pe(f)?g.state.subscribe({next:m=>"values"in m&&f(N(void 0,b),m)}):N(f,b,!0),kt=f=>g.state.subscribe({next:b=>{Nf(f.name,b.name,f.exact)&&Df(b,f.formState||u,pt,f.reRenderRoot)&&f.callback({values:{...a},...i,...b,defaultValues:n})}}).unsubscribe,Ut=f=>(o.mount=!0,h={...h,...f.formState},kt({...f,formState:{...p,...f.formState}})),qt=(f,b={})=>{for(const m of f?ui(f):s.mount)s.mount.delete(m),s.array.delete(m),b.keepValue||(le(r,m),le(a,m)),!b.keepError&&le(i.errors,m),!b.keepDirty&&le(i.dirtyFields,m),!b.keepTouched&&le(i.touchedFields,m),!b.keepIsValidating&&le(i.validatingFields,m),!t.shouldUnregister&&!b.keepDefaultValue&&le(n,m);g.state.next({values:de(a)}),g.state.next({...i,...b.keepDirty?{isDirty:O()}:{}}),!b.keepIsValid&&k()},wi=({disabled:f,name:b})=>{if(We(f)&&o.mount||f||s.disabled.has(b)){const C=s.disabled.has(b)!==!!f;f?s.disabled.add(b):s.disabled.delete(b),C&&o.mount&&!o.action&&k()}},Wt=(f,b={})=>{let m=A(r,f);const I=We(b.disabled)||We(t.disabled);return X(r,f,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:f}},name:f,mount:!0,...b}}),s.mount.add(f),m?wi({disabled:We(b.disabled)?b.disabled:t.disabled,name:f}):$(f,!0,b.value),{...I?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:fi(b.min),max:fi(b.max),minLength:fi(b.minLength),maxLength:fi(b.maxLength),pattern:fi(b.pattern)}:{},name:f,onChange:B,onBlur:B,ref:C=>{if(C){Wt(f,b),m=A(r,f);const S=re(C.value)&&C.querySelectorAll&&C.querySelectorAll("input,select,textarea")[0]||C,M=Cf(S),G=m._f.refs||[];if(M?G.find(Y=>Y===S):S===m._f.ref)return;X(r,f,{_f:{...m._f,...M?{refs:[...G.filter(In),S,...Array.isArray(A(n,f))?[{}]:[]],ref:{type:S.type,name:f}}:{ref:S}}}),$(f,!1,void 0,S)}else m=A(r,f,{}),m._f&&(m._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!(wf(s.array,f)&&o.action)&&s.unMount.add(f)}}},Ht=()=>t.shouldFocusError&&pi(r,Le,s.mount),er=f=>{We(f)&&(g.state.next({disabled:f}),pi(r,(b,m)=>{const I=A(r,m);I&&(b.disabled=I._f.disabled||f,Array.isArray(I._f.refs)&&I._f.refs.forEach(C=>{C.disabled=I._f.disabled||f}))},0,!1))},mi=(f,b)=>async m=>{let I;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let C=de(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:S,values:M}=await L();y(),i.errors=S,C=de(M)}else await z(r);if(s.disabled.size)for(const S of s.disabled)le(C,S);if(le(i.errors,"root"),ve(i.errors)){g.state.next({errors:{}});try{await f(C,m)}catch(S){I=S}}else b&&await b({...i.errors},m),Ht(),setTimeout(Ht);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ve(i.errors)&&!I,submitCount:i.submitCount+1,errors:i.errors}),I)throw I},tr=(f,b={})=>{A(r,f)&&(re(b.defaultValue)?W(f,de(A(n,f))):(W(f,b.defaultValue),X(n,f,de(b.defaultValue))),b.keepTouched||le(i.touchedFields,f),b.keepDirty||(le(i.dirtyFields,f),i.isDirty=b.defaultValue?O(f,de(A(n,f))):O()),b.keepError||(le(i.errors,f),u.isValid&&k()),g.state.next({...i}))},j=(f,b={})=>{const m=f?de(f):n,I=de(m),C=ve(f),S=C?n:I;if(b.keepDefaultValues||(n=m),!b.keepValues){if(b.keepDirtyValues){const M=new Set([...s.mount,...Object.keys(Bt(n,a))]);for(const G of Array.from(M)){const Y=A(i.dirtyFields,G),we=A(a,G),Ct=A(S,G);Y&&!re(we)?X(S,G,we):!Y&&!re(Ct)&&W(G,Ct)}}else{if(xn&&re(f))for(const M of s.mount){const G=A(r,M);if(G&&G._f){const Y=Array.isArray(G._f.refs)?G._f.refs[0]:G._f.ref;if(Gi(Y)){const we=Y.closest("form");if(we){we.reset();break}}}}if(b.keepFieldsRef)for(const M of s.mount)W(M,A(S,M));else r={}}a=t.shouldUnregister?b.keepDefaultValues?de(n):{}:de(S),g.array.next({values:{...S}}),g.state.next({values:{...S}})}s={mount:b.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!b.keepIsValid||!!b.keepDirtyValues||!t.shouldUnregister&&!ve(S),o.watch=!!t.shouldUnregister,o.keepIsValid=!!b.keepIsValid,o.action=!1,b.keepErrors||(i.errors={}),g.state.next({submitCount:b.keepSubmitCount?i.submitCount:0,isDirty:C?!1:b.keepDirty?i.isDirty:!!(b.keepDefaultValues&&!ut(f,n)),isSubmitted:b.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:C?{}:b.keepDirtyValues?b.keepDefaultValues&&a?Bt(n,a):i.dirtyFields:b.keepDefaultValues&&f?Bt(n,f):b.keepDirty?i.dirtyFields:{},touchedFields:b.keepTouched?i.touchedFields:{},errors:b.keepErrors?i.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},St=(f,b)=>j(Pe(f)?f(a):f,{...t.resetOptions,...b}),yi=(f,b={})=>{const m=A(r,f),I=m&&m._f;if(I){const C=I.refs?I.refs[0]:I.ref;C.focus&&setTimeout(()=>{C.focus(),b.shouldSelect&&Pe(C.select)&&C.select()})}},pt=f=>{i={...i,...f}},Ps={control:{register:Wt,unregister:qt,getFieldState:ft,handleSubmit:mi,setError:bi,_subscribe:kt,_runSchema:L,_updateIsValidating:y,_focusError:Ht,_getWatch:N,_getDirty:O,_setValid:k,_setFieldArray:v,_setDisabledField:wi,_setErrors:E,_getFieldArray:q,_reset:j,_resetDefaultValues:()=>Pe(t.defaultValues)&&t.defaultValues().then(f=>{St(f,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:te,_disableForm:er,_subjects:g,_proxyFormState:u,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(f){o=f},get _defaultValues(){return n},get _names(){return s},set _names(f){s=f},get _formState(){return i},get _options(){return t},set _options(f){t={...t,...f}}},subscribe:Ut,trigger:je,register:Wt,handleSubmit:mi,watch:vi,setValue:W,getValues:gi,reset:St,resetField:tr,clearErrors:Qi,unregister:qt,setError:bi,setFocus:yi,getFieldState:ft};return{...Ps,formControl:Ps}}function Ji(e={}){const t=he.useRef(void 0),i=he.useRef(void 0),[r,n]=he.useState({isDirty:!1,isValidating:!1,isLoading:Pe(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:Pe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Pe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Lf(e);t.current={...s,formState:r}}const a=t.current.control;return a._options=e,xf(()=>{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]),he.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),he.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),he.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),he.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),he.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==r.isDirty&&a._subjects.state.next({isDirty:o})}},[a,r.isDirty]),he.useEffect(()=>{var o;e.values&&!ut(e.values,i.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),i.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),he.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=he.useMemo(()=>_f(r,a),[a,r]),t.current}const Es=(e,t,i)=>{if(e&&"reportValidity"in e){const r=A(i,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},jf=(e,t)=>{for(const i in t.fields){const r=t.fields[i];r&&r.ref&&"reportValidity"in r.ref?Es(r.ref,i,e):r.refs&&r.refs.forEach(n=>Es(n,i,e))}},Rf=(e,t)=>{t.shouldUseNativeValidation&&jf(e,t);const i={};for(const r in e){const n=A(t.fields,r),a=Object.assign(e[r]||{},{ref:n&&n.ref});if(Bf(t.names||Object.keys(e),r)){const o=Object.assign({},A(i,r));X(o,"root",a),X(i,r,o)}else X(i,r,a)}return i},Bf=(e,t)=>e.some(i=>i.startsWith(t+"."));var Zi=function(e,t,i){return i===void 0&&(i={}),function(r,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(Zu(e,r,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var d=s.issues[0],p=qu(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]=cs(p,o,l,d.type,h?[].concat(h,d.message):d.message)}s.issues.shift()}return{values:{},errors:Rf(l,a)}}return{values:i.raw?r:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Is=27,As=12,Fs=10,zf=Vt("enum"),Uf=(e,t)=>{const i={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Zi(Qe({checked:ct(Jo(ke(),Ko()),wn(r=>Object.entries(r).filter(([n,a])=>a).map(([n,a])=>n)),ci(i.max,t("validation_multiple_choice_max",{count:i.max})),Ot(i.min,t("validation_multiple_choice_min",{count:i.min})))}))},qf=Vr(({option:e,...t},i)=>c(ne,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:i}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Ts=wt("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:es}}}),Wf=({input:e,onSubmitSuccess:t})=>{var p,u;const i=e.key?(p=D.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,r=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=r&&e.config.options.length===2,{t:a}=oe(),{register:o,handleSubmit:s,formState:{errors:l}}=Ji({defaultValues:{checked:r?{}:zf(i)?Object.fromEntries(i.value.map(h=>[h,!0])):{}},resolver:Uf(e.config,a)}),d=_n();return n?c("ul",{style:{maxHeight:6.5*Is+5*As+2*Fs},class:Ts({variant:"booleanLike"}),children:e.config.options.map((h,g)=>c("li",{class:ts,children:c(is,{type:"submit",ref:w=>{w&&g===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(g=>{const w=g.checked;t({type:"enum",value:w})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Is+5*As+2*Fs},class:Ts({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,g)=>{const w=`checked.${h.value}`,{ref:_,...k}=o(w);return c("li",{class:"relative",children:c(qf,{option:h,autoFocus:g===0,ref:y=>{y&&g===0&&(d.current=y),_(y)},id:w,...k,onClick:r?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[r?null:c(_t,{}),e.config.minSelected===0&&c(dt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(jt,{error:(u=l.checked)==null?void 0:u.root})})]})},Hf=Vt("number"),Kf=(e,t)=>{const i=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Zi(Qe({number:ct(Go(t("validation_number")),Uo(i,t("validation_number_min",{min:i})),zo(r,t("validation_number_max",{max:r})),Ro(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},Gf=({input:e,onSubmitSuccess:t})=>{var u;const i=e.config.defaultValue,r=e.key?(u=D.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:n}=oe(),{register:a,handleSubmit:o,formState:{errors:s}}=Ji({defaultValues:{number:Hf(r)?r.value:i?Number(i):void 0},resolver:Kf(e.config,n)}),{ref:l,...d}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=xe();return _e(()=>{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:Rt({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(dt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(_t,{})]}),c(jt,{error:s.number})]})},Yf=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(mn).find(n=>e.startsWith(n[1])),i=t?t[1]:"",r=e.replace(i,"");return/^\d+$/.test(r)?{countryCode:i,phoneNumber:r}:{countryCode:"",phoneNumber:""}},Jf="44",Zf=/^[0-9 ]+$/,Xf=Vt("string"),Qf=Vt("phone"),ep=e=>{const t=ct(ke(e("validation_country_code")),vn(Zf,e("validation_country_code"))),i=ct(ke(e("validation_phone")),Ot(1,e("validation_phone")),wn(r=>r.replace(/[^0-9]/g,"")));return Zi(Qe({countryCode:t,phoneNumber:i}))},tp=({input:e,onSubmitSuccess:t})=>{var _;const i=e.key?(_=D.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,{t:r}=oe(),[n,a]=Ne(),o=Xf(i)?Yf(i.value):Qf(i)?i.value:void 0,{register:s,handleSubmit:l,formState:{errors:d},watch:p}=Ji({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??Jf,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:ep(r)}),{ref:u,...h}=s("phoneNumber",{required:!e.config.optional}),g=xe(),w=p("countryCode");return _e(()=>{g.current&&(g.current.focus(),g.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(k=>{const y=k.phoneNumber.replace(/[^0-9]/g,""),v=k.countryCode.replace(/[^0-9]/g,"");a(void 0);const x=e.config.minChars??7,E=y.length+v.length;if(E<x)return a(r("validation_phone_min_chars",{count:x}));const $=e.config.maxChars;if($!=null&&E>$)return a(r("validation_max_chars",{count:$}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:v,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(mn).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&&(g.current=k),u(k)},class:Rt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(dt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(_t,{})]}),c(jt,{error:d.countryCode||d.phoneNumber||{message:n}})]})},Xi=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),Ds=(e,t,i,r)=>i!==void 0&&r*1e3>pr?e("submission_available_at",{time:Yn(i,t)}):e("submission_cooldown",{count:r}),ip=({input:e,onSubmitSuccess:t})=>{const{t:i,locale:r}=oe(),{availableAt:n}=e.config,[a,o]=Ne(()=>Xi(n)),[s,l]=Ne("");Ti(()=>{const p=Xi(n);if(o(p),p===0)return;l(Ds(i,r,n,p));const u=setInterval(()=>{const h=Xi(n);o(h),!(h>0)&&(clearInterval(u),l(i("submission_cooldown_ready")))},250);return()=>clearInterval(u)},[n,r,i]);const d=a>0;return c("div",{class:"flex flex-col items-center gap-2 py-3",children:[c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":d,"aria-describedby":d?"submit-cooldown":void 0,onClick:()=>{Xi(n)>0||t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})}),d&&c("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:Ds(i,r,n,a)}),c("p",{role:"status",class:"sr-only",children:s})]})},rp=160,Ns=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,rp)}px`},np={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},ap=Vt("string"),op=(e,t)=>{const i={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return Zi(Qe({text:{date:ct(ke(t("validation_date")),vn(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:ct(ke(t("validation_email")),Bo(t("validation_email")),Ot(e.minChars??1,i.minLength),ci(e.maxChars??1/0,i.maxLength)),text:ct(ke(),Ot(e.minChars??1,i.minLength),ci(e.maxChars??1/0,i.maxLength)),url:ct(ke(t("validation_url")),qo(t("validation_url")),Ot(e.minChars??1,i.minLength),ci(e.maxChars??1/0,i.maxLength))}[e.format]}))},sp={text:({input:e,onSubmitSuccess:t})=>{var _;const{t:i}=oe(),r=e.key?(_=D.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,n=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:d}}=Ji({defaultValues:{text:ap(r)?r.value:n??""},resolver:op(e.config,i)}),{ref:p,...u}=o("text",{required:!e.config.optional}),h=xe();_e(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&Ns(h.current),h.current.focus(),h.current.select())},[]);const g=e.config.maxChars,w=a&&g!==void 0?l("text").length:void 0;return c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(k=>{t({type:"string",value:k.text})}),children:[c("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[a?c("textarea",{id:"chat-input",...u,rows:2,maxLength:g,autoFocus:!0,"aria-describedby":w!==void 0?"chat-input-count":void 0,onInput:k=>Ns(k.currentTarget),onKeyDown:k=>{var y;k.key==="Enter"&&(k.ctrlKey||k.metaKey)&&(k.preventDefault(),(y=k.currentTarget.form)==null||y.requestSubmit())},ref:k=>{k&&(h.current=k),p(k)},placeholder:e.config.placeholder,class:Rt({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):c("input",{id:"chat-input",...u,...np[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(h.current=k),p(k)},placeholder:e.config.placeholder,class:Rt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(dt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(_t,{})]}),w!==void 0&&g!==void 0&&c("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[w,"/",g]}),c(jt,{error:d.text})]})},phone:tp,"multiple-choice":Wf,boolean:lf,file:gf,submit:ip,address:nf,number:Gf},lp=({logger:e,analytics:t})=>{var a;const i=(a=D.current$.value.flow)==null?void 0:a.data.currentInput,r=xe(null),n=()=>ie.onInteractionFn$.value();return _e(()=>{var o;(o=r.current)==null||o.scrollTo({top:0})},[i]),c("div",{ref:r,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:c("div",{class:"flex flex-col",onPointerDownCapture:i?n:void 0,onKeyDownCapture:i?n:void 0,children:i?(()=>{const o=sp[i.type];return c(o,{logger:e,analytics:t,onSubmitSuccess:ie.onSubmitSuccessFn$.value,input:i})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Rt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(_t,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function cp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dp=function(e){return e instanceof RegExp},up=function(t){var i=/[\\^$.*+?()[\]{}|]/g,r=RegExp(i.source);return t&&r.test(t)?t.replace(i,"\\$&"):t},Ms=function(e){return typeof e=="string"},fp=function(e){var t=[];return e.forEach(function(i){Array.isArray(i)?t=t.concat(i):t.push(i)}),t};function pp(e,t,i){var r=0,n=0;if(e==="")return e;if(!e||!Ms(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;dp(a)||(a=new RegExp("("+up(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}n=o[s].length,r+=o[s-1].length,o[s]=i(o[s],s,r),r+=n}return o}var hp=function(t,i,r){return Array.isArray(t)||(t=[t]),fp(t.map(function(n){return Ms(n)?pp(n,i,r):n}))};const hi=cp(hp),gp=/(\[[^\]]+\]\([^)]+\))/g,bp=/\[([^\]]+)\]\(([^)]+)\)/,vp=/(https?:\/\/[^\s]+)/g,wp=/_(.*?)_/g,mp=/\*\*(.*?)\*\*/g,yp=/\\n|\n/g,Vs="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",_p=e=>{const t=hi(e,gp,(o,s)=>{const[,l,d]=o.match(bp)??[];return d?c("a",{class:Vs,href:d,children:l??d},d+s):c("span",{children:"INVALID LINK"})}),i=hi(t,vp,(o,s)=>c("a",{class:Vs,href:o,children:o},o+s)),r=hi(i,wp,(o,s)=>c("em",{children:o},o+s)),n=hi(r,mp,(o,s)=>c("strong",{children:o},o+s));return hi(n,yp,(o,s)=>c("br",{},`br-${s}`))},xp=wt("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"}}),kp=({children:e,className:t,animate:i,side:r,...n})=>c("p",{style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:xp({className:t,side:r,animate:i}),...n,children:e}),Sp=({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"})})]})}),Cp=({className:e,...t})=>c("div",{"aria-hidden":!0,children:ie.isBotTyping$.value===!0?c("div",{"data-testid":"typing-indicator",class:Je("flex gap-1 p-4",e),...t,children:Array.from({length:3},(i,r)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}):void 0}),$p={bot:"left",user:"right"},Ep=wt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),Ip=({lastSentMessageFooter:e})=>{const{t}=oe(),i=D.current$.value.flow,r=(i==null?void 0:i.data.messages)??[],n=i?un(i):void 0;return c("ol",{"aria-label":t("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[r.map((a,o)=>c(ne,{children:c("li",{class:"flex",tabIndex:o===r.length-1?-1:void 0,children:[n&&a.groupId===n&&!r.slice(o+1).some(s=>s.groupId===n)?e:null,Vi(a).with({type:"system"},s=>c("p",{class:Ep({variant:s.variant}),children:s.text})).with({type:"text",author:ri.union("bot","user")},s=>{const l=o===r.length-1,d=s.author==="bot"?_p(s.text):s.text;return c(ne,{children:c(kp,{animate:l,side:$p[s.author],children:d},o)})}).with({type:"link"},s=>c(Sp,{message:s})).with({type:"image"},s=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:s.url,style:{aspectRatio:s.width/s.height}})).with({type:"file"},s=>c(uf,{class:s.author==="bot"?void 0:"ml-auto",file:{name:s.fileName,sizeKb:s.fileSizeKb}})).with({type:"loading"},s=>{const l=r[r.length-1];return!(s===l)||ie.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[c(Ui,{"aria-hidden":s.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),s.text?c("p",{role:"status",class:"text-neutral-11 text-sm",children:s.text}):null]})}).exhaustive()]})},o)),c("li",{class:ie.captchaVisible$.value?"flex":"hidden",children:c("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":t("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),c(Cp,{},"typing")]})},Ap=({logger:e,apiClient:t,analytics:i,talentBankClient:r})=>{const{flow:n}=D.current$.value;Ze(n,"Flow is required to exist to show chatbot body");const a=D.viewState$.value,{chatRef:o,chatService:s}=Hd(),{t:l}=oe(),[d,p]=Ne();return _e(()=>{a==="maximised"&&ie.scrollToEnd()},[a]),_e(()=>{var $;const{state:u,flow:h}=D.current$.peek();if(u!=="loaded")throw new Error(l("invalid_state"));let g=h.data.nodeHistory.at(-1);if(ie.scrollToEnd(),D.setInput(void 0),h.data.isFinished)return;const w=()=>{const T=D.current$.peek().flow;!T||T.data.hasInteracted||(D.markAsInteracted(),jo(i,T,"FLOW_INTERACT"))};ie.onInteractionFn$.value=w,g===void 0?(g=Po(n.nodes).id,D.setCurrentNodeId(g),jo(i,h,"FLOW_START")):D.removeMessagesSentByNodeIds([g,pn]);const{interpret:_,abort:k,undo:y}=bu({context:n.context,analytics:{service:i,customProperties:($=n.analytics)==null?void 0:$.customProperties},apiClient:t,logger:e,talentBankClient:r,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var T;return(T=D.current$.peek().flow)==null?void 0:T.data.applicationRecovery},setApplicationRecovery:D.setApplicationRecovery,persistWriteBarrier:()=>D.persistWriteBarrier(h),getSubmissions:()=>{var T;return(T=D.current$.peek().flow)==null?void 0:T.data.submissions},onInterpret:T=>D.setCurrentNodeId(T.id),onFlowEnd:async()=>{var V;D.markAsFinished();const T=D.current$.peek().flow;Ze(T),i.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:T.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(V=n.analytics)==null?void 0:V.customProperties})}}),v=g,x=()=>{p(()=>y),_(v)},E=new AbortController;return h.offerResume?Lu({chatService:s,t:l,signal:E.signal}).then(T=>(D.settleResume(h),T?x():(D.restart(),Fe.flushStateData()))).catch(T=>{T instanceof it||e.error("Resume prompt failed",T)}):x(),()=>{E.abort(),ie.onInteractionFn$.value===w&&(ie.onInteractionFn$.value=()=>{}),k()}},[i,t,s,e,n,r,l]),c(ne,{children:[c("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[c("div",{ref:o,role:"region","aria-label":l("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:c(Ip,{lastSentMessageFooter:!un(n)||!d?null:c(Fp,{undoFn:d})})}),ie.isReadingHistory$.value&&!n.data.isFinished&&!ie.isBotTyping$.value&&c("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:c(si,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":l("jump_to_current"),onClick:()=>{var h,g;ie.scrollToEnd(),(g=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||g.focus({preventScroll:!0})},children:c(Eo,{})})})]}),c(lp,{logger:e,analytics:i})]})},Fp=({undoFn:e})=>{const{t}=oe();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(si,{"aria-label":t("undo"),onClick:async()=>{const{flow:i}=D.current$.peek();Ze(i),e(i.data.nodeHistory)},children:c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},Tp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Ap},Symbol.toStringTag,{value:"Module"}))})();
|
|
9
|
+
`)}),u.hasHardConcerns&&e.data.alternativeLink&&await r.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await r.userInput({type:"submit",key:void 0,config:{label:Oe(e.data.continueLabel,{submissions:i,context:l})}})}return n(e.nextId)}const Yo=(e,t,i)=>{var r;return e.log({event:i,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(r=t.analytics)==null?void 0:r.customProperties})},_n="resume-prompt",nf=async({chatService:e,t,signal:i})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:_n,signal:i});const r=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:i});return D.removeMessagesSentByNodeIds([_n]),(r==null?void 0:r.value)!==!1},At=({class:e,...t})=>{const{t:i}=oe();return c("button",{class:et("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:i("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})};var it;function Zi(e){return{lang:(e==null?void 0:e.lang)??(it==null?void 0:it.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(it==null?void 0:it.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(it==null?void 0:it.abortPipeEarly)}}var xn;function af(e){return xn==null?void 0:xn.get(e)}var kn;function of(e){return kn==null?void 0:kn.get(e)}var Sn;function sf(e,t){var i;return(i=Sn==null?void 0:Sn.get(e))==null?void 0:i.get(t)}function Ut(e){var i,r;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((r=(i=Object.getPrototypeOf(e))==null?void 0:i.constructor)==null?void 0:r.name))??"null":t}function he(e,t,i,r,n){const a=n&&"input"in n?n.input:i.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Ut(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=e.kind==="schema",f=(n==null?void 0:n.message)??e.message??sf(e.reference,l.lang)??(u?of(l.lang):null)??r.message??af(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(i.typed=!1),i.issues?i.issues.push(l):i.issues=[l]}function Ge(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Zi())}}}function lf(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function cf(e,t){const i=[...new Set(e)];return i.length>1?`(${i.join(` ${t} `)})`:i[0]??"never"}function df(e){if(e.path){let t="";for(const i of e.path)if(typeof i.key=="string"||typeof i.key=="number")t?t+=`.${i.key}`:t+=i.key;else return null;return t}return null}var uf=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},ff=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Jo(e,t){return{kind:"validation",type:"check",reference:Jo,async:!1,expects:null,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement(i.value)&&he(this,"input",i,r),i}}}function Zo(e){return{kind:"validation",type:"email",reference:Zo,expects:null,async:!1,requirement:ff,message:e,"~run"(t,i){return t.typed&&!this.requirement.test(t.value)&&he(this,"email",t,i),t}}}function gi(e,t){return{kind:"validation",type:"max_length",reference:gi,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length>this.requirement&&he(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Xo(e,t){return{kind:"validation",type:"max_value",reference:Xo,async:!1,expects:`<=${e instanceof Date?e.toJSON():Ut(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value<=this.requirement)&&he(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():Ut(i.value)}),i}}}function Ht(e,t){return{kind:"validation",type:"min_length",reference:Ht,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&i.value.length<this.requirement&&he(this,"length",i,r,{received:`${i.value.length}`}),i}}}function Qo(e,t){return{kind:"validation",type:"min_value",reference:Qo,async:!1,expects:`>=${e instanceof Date?e.toJSON():Ut(e)}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!(i.value>=this.requirement)&&he(this,"value",i,r,{received:i.value instanceof Date?i.value.toJSON():Ut(i.value)}),i}}}function Cn(e,t){return{kind:"validation",type:"regex",reference:Cn,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(i,r){return i.typed&&!this.requirement.test(i.value)&&he(this,"format",i,r),i}}}function $n(e){return{kind:"transformation",type:"transform",reference:$n,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function es(e){return{kind:"validation",type:"url",reference:es,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,i){return t.typed&&!this.requirement(t.value)&&he(this,"URL",t,i),t}}}function pf(e,t,i){return typeof e.fallback=="function"?e.fallback(t,i):e.fallback}function ts(e,t,i){return typeof e.default=="function"?e.default(t,i):e.default}function is(e,t){return{kind:"schema",type:"array",reference:is,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(Array.isArray(n)){i.typed=!0,i.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},r);if(l.issues){const u={type:"array",origin:"value",input:n,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(u):f.path=[u],(a=i.issues)==null||a.push(f);if(i.issues||(i.issues=l.issues),r.abortEarly){i.typed=!1;break}}l.typed||(i.typed=!1),i.value.push(l.value)}}else he(this,"type",i,r);return i}}}function rs(e){return{kind:"schema",type:"boolean",reference:rs,expects:"boolean",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="boolean"?t.typed=!0:he(this,"type",t,i),t}}}function ns(e){return{kind:"schema",type:"number",reference:ns,expects:"number",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:he(this,"type",t,i),t}}}function rt(e,t){return{kind:"schema",type:"object",reference:rt,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){var a;const n=i.value;if(n&&typeof n=="object"){i.typed=!0,i.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:ts(s),u=s["~run"]({value:l},r);if(u.issues){const f={type:"object",origin:"value",input:n,key:o,value:l};for(const d of u.issues)d.path?d.path.unshift(f):d.path=[f],(a=i.issues)==null||a.push(d);if(i.issues||(i.issues=u.issues),r.abortEarly){i.typed=!1;break}}u.typed||(i.typed=!1),i.value[o]=u.value}else if(s.fallback!==void 0)i.value[o]=pf(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(he(this,"key",i,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),r.abortEarly))break}}else he(this,"type",i,r);return i}}}function qt(e,t){return{kind:"schema",type:"optional",reference:qt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ge(this)},"~run"(i,r){return i.value===void 0&&(this.default!==void 0&&(i.value=ts(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,r)}}}function as(e,t){return{kind:"schema",type:"picklist",reference:as,expects:cf(e.map(Ut),"|"),async:!1,options:e,message:t,get"~standard"(){return Ge(this)},"~run"(i,r){return this.options.includes(i.value)?i.typed=!0:he(this,"type",i,r),i}}}function os(e,t,i){return{kind:"schema",type:"record",reference:os,expects:"Object",async:!1,key:e,value:t,message:i,get"~standard"(){return Ge(this)},"~run"(r,n){var o,s;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const l in a)if(lf(a,l)){const u=a[l],f=this.key["~run"]({value:l},n);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:u};for(const g of f.issues)g.path=[h],(o=r.issues)==null||o.push(g);if(r.issues||(r.issues=f.issues),n.abortEarly){r.typed=!1;break}}const d=this.value["~run"]({value:u},n);if(d.issues){const h={type:"object",origin:"value",input:a,key:l,value:u};for(const g of d.issues)g.path?g.path.unshift(h):g.path=[h],(s=r.issues)==null||s.push(g);if(r.issues||(r.issues=d.issues),n.abortEarly){r.typed=!1;break}}(!f.typed||!d.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=d.value)}}else he(this,"type",r,n);return r}}}function Ce(e){return{kind:"schema",type:"string",reference:Ce,expects:"string",async:!1,message:e,get"~standard"(){return Ge(this)},"~run"(t,i){return typeof t.value=="string"?t.typed=!0:he(this,"type",t,i),t}}}function hf(e,t,i){const r=e["~run"]({value:t},Zi(i));if(r.issues)throw new uf(r.issues);return r.value}function gf(e,t){const i={};for(const r in e.entries)i[r]=!t||t.includes(r)?qt(e.entries[r]):e.entries[r];return{...e,entries:i,get"~standard"(){return Ge(this)}}}function bt(...e){return{...e[0],pipe:e,get"~standard"(){return Ge(this)},"~run"(t,i){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!i.abortEarly&&!i.abortPipeEarly)&&(t=r["~run"](t,i))}return t}}}function bf(e,t,i){const r=e["~run"]({value:t},Zi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}async function vf(e,t,i){const r=await e["~run"]({value:t},Zi(i));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}const Wt=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[c("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"break-words pr-1 text-sm",children:e.message})]}),vt=({class:e,...t})=>{const{t:i}=oe();return c("button",{type:"button",class:et("fr touch-hitbox text-neutral-11 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:i("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),i("skip")]})};var En={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=$t("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}}),wf="https://api.mapbox.com/search/searchbox/v1/suggest",mf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",yf=e=>atob(e).split("").reverse().join(""),nt=rt({name:Ce()}),_f=rt({suggestions:is(rt({feature_type:qt(Ce()),full_address:qt(Ce()),place_formatted:qt(Ce()),name:qt(Ce()),mapbox_id:Ce(),context:gf(rt({address:nt,street:nt,neighborhood:nt,locality:nt,district:nt,place:nt,region:nt,postcode:nt,country:nt}))}))}),xf=({logger:e,t})=>ct(()=>{var r;const i=(r=D.current$.peek().flow)==null?void 0:r.data.flowSessionId;return i?{enabled:!0,getPredictions:async n=>{var d;const a=new URL(wf);a.searchParams.set("q",n),a.searchParams.set("session_token",i);const o=(d=D.current$.peek().flow)==null?void 0:d.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&a.searchParams.set("proximity",`${o.lng},${o.lat}`),a.searchParams.set("access_token",yf(mf));const l=await fetch(a);if(!l.ok)return e.error("Failed to get address details",l),{ok:!1,error:t("address_error")};const u=bf(_f,await l.json());if(u.success===!1)return e.error("Failed to parse address details",u.issues),{ok:!1,error:t("address_error")};const{suggestions:f}=u.output;return{ok:!0,data:f.map(h=>{var g,v,y,k,_,w,x,E,$;return{label:h.full_address??([h.name,h.place_formatted].filter(Boolean).join(", ")||h.mapbox_id),id:h.mapbox_id,address:{line1:((g=h.context.address)==null?void 0:g.name)??((v=h.context.street)==null?void 0:v.name),line2:void 0,line3:((y=h.context.neighborhood)==null?void 0:y.name)??((k=h.context.locality)==null?void 0:k.name),city:((_=h.context.place)==null?void 0:_.name)??((w=h.context.district)==null?void 0:w.name),state:(x=h.context.region)==null?void 0:x.name,postcode:((E=h.context.postcode)==null?void 0:E.name)??(h.feature_type==="postcode"?h.name:void 0),country:($=h.context.country)==null?void 0:$.name}}})}}}:{enabled:!1}},[e,t]),ss=e=>{const{t}=oe();return c("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},kf=({input:e,onSubmitSuccess:t,logger:i})=>{const{t:r}=oe(),[n,a]=Le(),{enabled:o,getPredictions:s}=xf({logger:i,t:r}),[l,u]=Le(o?"query":"manual"),[f,d]=Le(""),[h,g]=Le(),v=Se(),y=Se(),k=w=>{var E;if(tt(o,"Query state should not be enabled"),w=w.trim(),w===((E=v.current)==null?void 0:E.query)||w===(h==null?void 0:h.query)&&h.status==="done")return;if(d(w),w===""){v.current=void 0,g(void 0);return}const x=v.current={query:w};g({query:w,status:"pending"}),s(w).then($=>{v.current===x&&(v.current=void 0,g($.ok?{query:w,status:"done",items:$.data}:{query:w,status:"failed",error:$.error}))},$=>{v.current===x&&(v.current=void 0,i.error("Failed to get address details",$),g({query:w,status:"failed",error:r("address_error")}))})},_=(w,x)=>{a(E=>({...E,[w]:x}))};switch(l){case"query":return tt(o,"Query state should not be enabled"),c(Sf,{input:e,onSkip:()=>t(null),onAddressSelect:w=>{if(w===""){v.current&&(v.current=void 0,g(void 0)),u("manual");return}const x=(h==null?void 0:h.status)==="done"?h.items.find(E=>E.id===w):void 0;x&&(y.current!==w&&a(x.address),y.current=w,u("details"))},onAddressSearch:k,lookup:h,query:f});case"details":return tt(n!==void 0),c(ls,{input:e,logger:i,onSubmitSuccess:t,addressFields:n,onFieldChange:_,actions:c(ss,{onClick:()=>{u("query")}})});case"manual":return c(ls,{logger:i,input:e,onSubmitSuccess:t,addressFields:n??{},onFieldChange:_,actions:o?c(ss,{onClick:()=>{u("query")}}):e.config.optional?c(vt,{onClick:()=>t(null)}):void 0})}},Sf=({input:e,onSkip:t,lookup:i,onAddressSelect:r,query:n,onAddressSearch:a})=>{const{t:o}=oe(),s=Se(null);return ke(()=>{s.current&&(s.current.focus(),s.current.select())},[]),c(ne,{children:[c("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&a(f)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:n,class:Kt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[c("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]})}),c("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&c(vt,{class:"relative",onClick:t})]}),(i==null?void 0:i.status)==="failed"?c(Wt,{error:{message:i.error}}):null,c("p",{role:"status",class:(i==null?void 0:i.status)==="pending"||(i==null?void 0:i.status)==="done"&&i.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(i==null?void 0:i.status)==="pending"?c(ne,{children:[c(Yi,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(i==null?void 0:i.status)==="done"&&i.items.length===0?o("address_no_results"):null}),c("ul",{children:[((i==null?void 0:i.status)==="done"?i.items:[]).map(l=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{r(l.id)},children:[c("span",{class:"flex-grow",children:l.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{r("")},children:c("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},In=["line1","line2","line3","city","state","postcode","country"],ls=({addressFields:e,onFieldChange:t,onSubmitSuccess:i,actions:r,input:n})=>{const a=Se(null);ke(()=>{if(a.current){const l=a.current.querySelector("input");l&&(l.focus(),l.select())}},[]);const o=Object.keys(En),{t:s}=oe();return c("form",{class:"flex flex-col px-2 pt-2",onSubmit:l=>{const u=l.currentTarget,f=[...u.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of f){g.value="";const v=In.find(y=>n.config.keys[y]===g.name);v&&t(v,"")}if(f.length>0&&!u.checkValidity()){l.preventDefault(),u.reportValidity();return}const d=new FormData(u),h=Object.fromEntries(d.entries());i({type:"address",value:h})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:In.map((l,u)=>{const f=`isdk_${l}`,d=n.config.keys[l];return d?c(ne,{children:[c("label",{for:f,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:s(l)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[l==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:d,id:f,defaultValue:e[l],onChange:h=>t(l,h.currentTarget.value),required:!0,children:[e.country&&!o.includes(e.country)?c("option",{value:e[l],children:e[l]}):c("option",{value:"",children:s("select_country")}),o.map(h=>c("option",{value:h,children:h},h))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:u===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:d,id:f,defaultValue:e[l],onInput:h=>t(l,h.currentTarget.value),required:l==="line2"?n.config.line2Required===!0:l!=="line3"}),u===In.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[r,c(At,{class:"ml-auto"})]})]})},An=()=>{const e=Se(null);return Oi(()=>{var t;(t=e.current)==null||t.focus()},[]),e},cs=["true","false"],Cf=as(cs),$f="answer",ds="flex items-center flex-wrap gap-2 p-2.5",us="min-w-0 max-w-full flex-auto",fs=Rr(({label:e,...t},i)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:i,children:c("p",{class:"text-center text-base",children:e})})),Ef=({input:e,onSubmitSuccess:t})=>{const i=An();return c("form",{noValidate:!0,class:"",onSubmit:r=>{r.preventDefault();const n=Dd(r).value,a=hf(Cf,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:ds,children:cs.map((r,n)=>c("li",{class:us,children:c(fs,{ref:n===0?i:null,type:"submit",name:$f,value:r,label:e.config.labels[r]},r)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(vt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},If=e=>new Promise((t,i)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"||!r.result)return i(new Error("Invalid file"));t(r.result)},r.onerror=i,r.readAsDataURL(e)}),ps=e=>e.reduce((t,i)=>t+i.sizeKb,0),Af=zt("file"),hs=3,Xi=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Tf=({file:e,class:t,...i})=>{const{t:r}=oe(),[n,a]=Xi(e.name);return c("div",{class:et("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...i,children:[c("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"sr-only",children:[r("file_name"),": "]}),c("span",{class:"block truncate",children:n}),c("span",{children:a})]}),c("p",{class:"text-accent-11",children:[c("span",{class:"sr-only",children:[r("file_size"),": "]}),Nt(e.sizeKb)]})]})},gs=({class:e,...t})=>c("li",{class:et("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Ff=(e,t)=>{const[i,r]=Xi(e);return`${i.slice(0,t)}${r}`},bs=e=>({name:Ff(e.name,42),sizeKb:e.size/1e3}),Df=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Mf=(e,t,i)=>{const r=Xi(t.name)[1].toLowerCase(),n=[...i.map(o=>o.toLowerCase()),...Df],a=r===""?"none":n.includes(r)?r:"other";return`chatbot-file-refused:${e}:${a}`},Nf=({input:e,onSubmitSuccess:t,analytics:i})=>{var k;const r=(k=D.current$.value.flow)==null?void 0:k.data.submissions[e.key],[n,a]=Le(Af(r)&&r.value.length?{status:"ready",files:r.value}:{status:"empty"}),o=Se(0),s=n.status==="ready"?n.files:[],l=n.status==="ready"||n.status==="pending"?n.files:[],u=n.status==="error"?n.error:void 0,f=l.length-hs,d=ps(l),h=An(),{t:g}=oe(),v=_=>{if(!_.length)return{reason:"required",error:{type:"required",message:g("validation_file")}};if(!Jn(_,e.config.extensions))return{reason:"type",file:_.find(w=>!Jn([w],e.config.extensions)),error:{type:"validate",message:g("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(_.some(w=>w.sizeKb===0))return{reason:"empty",file:_.find(w=>w.sizeKb===0),error:{type:"validate",message:g("validation_file_empty")}};if(e.config.fileSizeLimitKib&&ps(_)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:g("validation_file_size",{size:Nt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&_.length>1)return{reason:"count",error:{type:"invalid",message:g("validation_file_max",{count:1})}}},y=(_,w)=>{var x,E;return i.log({event:"INTERACTION",properties:{tag:Mf(_,w,e.config.extensions)},customProperties:(E=(x=D.current$.peek().flow)==null?void 0:x.analytics)==null?void 0:E.customProperties})};return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:_=>{if(_.preventDefault(),n.status==="pending"||n.status==="error")return;const w=v(s);w?a({status:"error",error:w.error}):t({type:"file",value:s})},children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,hs).map(_=>{const[w,x]=Xi(_.name);return c(gs,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:w}),c("span",{children:x})]})}),f>0?c(gs,{children:g("file_more",{count:f})}):null]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:g("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-11 text-xs",children:["(",g("file_max_size",{size: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:g("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(_=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:_.replace(".","")}))})]})]}),c("p",{role:"status",class:et("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:n.status==="pending"?c(ne,{children:[c(Yi,{"aria-hidden":"true",class:"h-4 w-4"}),g("file_preparing",{count:l.length})]}):n.status==="ready"?c(ne,{children:[s.length>1?g("file_total_size",{size:Nt(d)}):Nt(d),c("span",{class:"sr-only",children:[". ",g("file_ready",{count:s.length})]})]}):null}),c("input",{id:"dropzone-file","aria-label":g("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async _=>{tt(_.target instanceof HTMLInputElement);const w=_.target.files?Array.from(_.target.files):[];_.target.value="";const[x]=w;if(!x)return;const E=++o.current,$=n.status==="ready",F=w.map(bs),L=v(F);if(L)return y(L.reason,L.file??x),a({status:"error",error:L.error});a({status:"pending",files:F});let P;try{const V=await Promise.all(w.map(async z=>{try{return{...bs(z),data:await If(z)}}catch(te){throw P??(P=z),te}}));o.current===E&&a({status:"ready",files:V})}catch{if(o.current!==E)return;y("unreadable",P??x),a({status:"error",error:{type:"invalid",message:g($?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:e.config.extensions.join(","),type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(At,{disabled:s.length===0}),e.config.optional&&c(vt,{class:"relative",onClick:()=>t(null)})]})]}),c(Wt,{error:u})]})};var bi=e=>e.type==="checkbox",Tt=e=>e instanceof Date,$e=e=>e==null;const vs=e=>typeof e=="object";var se=e=>!$e(e)&&!Array.isArray(e)&&vs(e)&&!Tt(e),Lf=e=>se(e)&&e.target?bi(e.target)?e.target.checked:e.target.value:e,Vf=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Of=(e,t)=>e.has(Vf(t)),Pf=e=>{const t=e.constructor&&e.constructor.prototype;return se(t)&&t.hasOwnProperty("isPrototypeOf")},Tn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function de(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Tn&&(e instanceof Blob||t))return e;const i=Array.isArray(e);if(!i&&!(se(e)&&Pf(e)))return e;const r=i?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=de(e[n]));return r}var Qi=e=>/^\w*$/.test(e),re=e=>e===void 0,Fn=e=>Array.isArray(e)?e.filter(Boolean):[],Dn=e=>Fn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),A=(e,t,i)=>{if(!t||!se(e))return i;const r=(Qi(t)?[t]:Dn(t)).reduce((n,a)=>$e(n)?n:n[a],e);return re(r)||r===e?re(e[t])?i:e[t]:r},Ye=e=>typeof e=="boolean",Pe=e=>typeof e=="function",X=(e,t,i)=>{let r=-1;const n=Qi(t)?[t]:Dn(t),a=n.length,o=a-1;for(;++r<a;){const s=n[r];let l=i;if(r!==o){const u=e[s];l=se(u)||Array.isArray(u)?u:isNaN(+n[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ws={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},je={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},at={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},jf=be.createContext(null);jf.displayName="HookFormControlContext";var Rf=(e,t,i,r=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==je.all&&(t._proxyFormState[o]=!r||je.all),i&&(i[o]=!0),e[o]}});return n};const Bf=typeof window<"u"?be.useLayoutEffect:be.useEffect;var Ie=e=>typeof e=="string",zf=(e,t,i,r,n)=>Ie(e)?(r&&t.watch.add(e),A(i,e,n)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),A(i,a))):(r&&(t.watchAll=!0),i),Mn=e=>$e(e)||!vs(e);function wt(e,t,i=new WeakSet){if(Mn(e)||Mn(t))return Object.is(e,t);if(Tt(e)&&Tt(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(i.has(e)||i.has(t))return!0;i.add(e),i.add(t);for(const a of r){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(Tt(o)&&Tt(s)||se(o)&&se(s)||Array.isArray(o)&&Array.isArray(s)?!wt(o,s,i):!Object.is(o,s))return!1}}return!0}const Uf=be.createContext(null);Uf.displayName="HookFormContext";var ms=(e,t,i,r,n)=>t?{...i[e],types:{...i[e]&&i[e].types?i[e].types:{},[r]:n||!0}}:{},vi=e=>Array.isArray(e)?e:[e],ys=()=>{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 _s(e,t){const i={};for(const r in e)if(e.hasOwnProperty(r)){const n=e[r],a=t[r];if(n&&se(n)&&a){const o=_s(n,a);se(o)&&(i[r]=o)}else e[r]&&(i[r]=a)}return i}var me=e=>se(e)&&!Object.keys(e).length,Nn=e=>e.type==="file",er=e=>{if(!Tn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},xs=e=>e.type==="select-multiple",Ln=e=>e.type==="radio",Hf=e=>Ln(e)||bi(e),Vn=e=>er(e)&&e.isConnected;function qf(e,t){const i=t.slice(0,-1).length;let r=0;for(;r<i;)e=re(e)?r++:e[t[r++]];return e}function Wf(e){for(const t in e)if(e.hasOwnProperty(t)&&!re(e[t]))return!1;return!0}function le(e,t){const i=Array.isArray(t)?t:Qi(t)?[t]:Dn(t),r=i.length===1?e:qf(e,i),n=i.length-1,a=i[n];return r&&delete r[a],n!==0&&(se(r)&&me(r)||Array.isArray(r)&&Wf(r))&&le(e,i.slice(0,-1)),e}var Kf=e=>{for(const t in e)if(Pe(e[t]))return!0;return!1};function ks(e){return Array.isArray(e)||se(e)&&!Kf(e)}function On(e,t={}){for(const i in e){const r=e[i];ks(r)?(t[i]=Array.isArray(r)?[]:{},On(r,t[i])):re(r)||(t[i]=!0)}return t}function Gt(e,t,i){i||(i=On(t));for(const r in e){const n=e[r];if(ks(n))re(t)||Mn(i[r])?i[r]=On(n,Array.isArray(n)?[]:{}):Gt(n,$e(t)?{}:t[r],i[r]);else{const a=t[r];i[r]=!wt(n,a)}}return i}const Ss={value:!1,isValid:!1},Cs={value:!0,isValid:!0};var $s=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!re(e[0].attributes.value)?re(e[0].value)||e[0].value===""?Cs:{value:e[0].value,isValid:!0}:Cs:Ss}return Ss},Es=(e,{valueAsNumber:t,valueAsDate:i,setValueAs:r})=>re(e)?e:t?e===""?NaN:e&&+e:i&&Ie(e)?new Date(e):r?r(e):e;const Is={isValid:!1,value:null};var As=e=>Array.isArray(e)?e.reduce((t,i)=>i&&i.checked&&!i.disabled?{isValid:!0,value:i.value}:t,Is):Is;function Ts(e){const t=e.ref;return Nn(t)?t.files:Ln(t)?As(e.refs).value:xs(t)?[...t.selectedOptions].map(({value:i})=>i):bi(t)?$s(e.refs).value:Es(re(t.value)?e.ref.value:t.value,e)}var Gf=(e,t,i,r)=>{const n={};for(const a of e){const o=A(t,a);o&&X(n,a,o._f)}return{criteriaMode:i,names:[...e],fields:n,shouldUseNativeValidation:r}},tr=e=>e instanceof RegExp,wi=e=>re(e)?e:tr(e)?e.source:se(e)?tr(e.value)?e.value.source:e.value:e,Fs=e=>({isOnSubmit:!e||e===je.onSubmit,isOnBlur:e===je.onBlur,isOnChange:e===je.onChange,isOnAll:e===je.all,isOnTouch:e===je.onTouched});const Ds="AsyncFunction";var Yf=e=>!!e&&!!e.validate&&!!(Pe(e.validate)&&e.validate.constructor.name===Ds||se(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ds)),Jf=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ms=(e,t,i)=>!i&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const mi=(e,t,i,r)=>{for(const n of i||Object.keys(e)){const a=A(e,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(mi(s,t))break}else if(se(s)&&mi(s,t))break}}};function Ns(e,t,i){const r=A(e,i);if(r||Qi(i))return{error:r,name:i};const n=i.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),s=A(e,a);if(o&&!Array.isArray(o)&&i!==a)return{name:i};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};n.pop()}return{name:i}}var Zf=(e,t,i,r)=>{i(e);const{name:n,...a}=e;return me(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!r||je.all))},Xf=(e,t,i)=>!e||!t||e===t||vi(e).some(r=>r&&(i?r===t:r.startsWith(t)||t.startsWith(r))),Qf=(e,t,i,r,n)=>n.isOnAll?!1:!i&&n.isOnTouch?!(t||e):(i?r.isOnBlur:n.isOnBlur)?!e:(i?r.isOnChange:n.isOnChange)?e:!0,ep=(e,t)=>!Fn(A(e,t)).length&&le(e,t),tp=(e,t,i)=>{const r=vi(A(e,i));return X(r,"root",t[i]),X(e,i,r),e};function Ls(e,t,i="validate"){if(Ie(e)||Array.isArray(e)&&e.every(Ie)||Ye(e)&&!e)return{type:i,message:Ie(e)?e:"",ref:t}}var Yt=e=>se(e)&&!tr(e)?e:{value:e,message:""},Vs=async(e,t,i,r,n,a)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:f,min:d,max:h,pattern:g,validate:v,name:y,valueAsNumber:k,mount:_}=e._f,w=A(i,y);if(!_||t.has(y))return{};const x=s?s[0]:o,E=O=>{n&&x.reportValidity&&(x.setCustomValidity(Ye(O)?"":O||""),x.reportValidity())},$={},F=Ln(o),L=bi(o),P=F||L,V=(k||Nn(o))&&re(o.value)&&re(w)||er(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,z=ms.bind(null,y,r,$),te=(O,M,H,W=at.maxLength,K=at.minLength)=>{const q=O?M:H;$[y]={type:O?W:K,message:q,ref:o,...z(O?W:K,q)}};if(a?!Array.isArray(w)||!w.length:l&&(!P&&(V||$e(w))||Ye(w)&&!w||L&&!$s(s).isValid||F&&!As(s).isValid)){const{value:O,message:M}=Ie(l)?{value:!!l,message:l}:Yt(l);if(O&&($[y]={type:at.required,message:M,ref:x,...z(at.required,M)},!r))return E(M),$}if(!V&&(!$e(d)||!$e(h))){let O,M;const H=Yt(h),W=Yt(d);if(!$e(w)&&!isNaN(w)){const K=o.valueAsNumber||w&&+w;$e(H.value)||(O=K>H.value),$e(W.value)||(M=K<W.value)}else{const K=o.valueAsDate||new Date(w),q=Re=>new Date(new Date().toDateString()+" "+Re),mt=o.type=="time",B=o.type=="week";Ie(H.value)&&w&&(O=mt?q(w)>q(H.value):B?w>H.value:K>new Date(H.value)),Ie(W.value)&&w&&(M=mt?q(w)<q(W.value):B?w<W.value:K<new Date(W.value))}if((O||M)&&(te(!!O,H.message,W.message,at.max,at.min),!r))return E($[y].message),$}if((u||f)&&!V&&(Ie(w)||a&&Array.isArray(w))){const O=Yt(u),M=Yt(f),H=!$e(O.value)&&w.length>+O.value,W=!$e(M.value)&&w.length<+M.value;if((H||W)&&(te(H,O.message,M.message),!r))return E($[y].message),$}if(g&&!V&&Ie(w)){const{value:O,message:M}=Yt(g);if(tr(O)&&!w.match(O)&&($[y]={type:at.pattern,message:M,ref:o,...z(at.pattern,M)},!r))return E(M),$}if(v){if(Pe(v)){const O=await v(w,i),M=Ls(O,x);if(M&&($[y]={...M,...z(at.validate,M.message)},!r))return E(M.message),$}else if(se(v)){let O={};for(const M in v){if(!me(O)&&!r)break;const H=Ls(await v[M](w,i),x,M);H&&(O={...H,...z(M,H.message)},E(H.message),r&&($[y]=O))}if(!me(O)&&($[y]={ref:x,...O},!r))return $}}return E(!0),$};const ip={mode:je.onSubmit,reValidateMode:je.onChange,shouldFocusError:!0};function rp(e={}){let t={...ip,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:Pe(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},n=se(t.defaultValues)||se(t.values)?de(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:de(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...f};let h={...d};const g={array:ys(),state:ys()},v=t.criteriaMode===je.all,y=p=>b=>{clearTimeout(u),u=setTimeout(p,b)},k=async p=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||p)){let b;t.resolver?(b=me((await P()).errors),_()):b=await z(r,!0),b!==i.isValid&&g.state.next({isValid:b})}},_=(p,b)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((p||Array.from(s.mount)).forEach(m=>{m&&(b?X(i.validatingFields,m,b):le(i.validatingFields,m))}),g.state.next({validatingFields:i.validatingFields,isValidating:!me(i.validatingFields)}))},w=(p,b=[],m,I,C=!0,S=!0)=>{if(I&&m&&!t.disabled){if(o.action=!0,S&&Array.isArray(A(r,p))){const N=m(A(r,p),I.argA,I.argB);C&&X(r,p,N)}if(S&&Array.isArray(A(i.errors,p))){const N=m(A(i.errors,p),I.argA,I.argB);C&&X(i.errors,p,N),ep(i.errors,p)}if((d.touchedFields||h.touchedFields)&&S&&Array.isArray(A(i.touchedFields,p))){const N=m(A(i.touchedFields,p),I.argA,I.argB);C&&X(i.touchedFields,p,N)}(d.dirtyFields||h.dirtyFields)&&(i.dirtyFields=Gt(n,a)),g.state.next({name:p,isDirty:O(p,b),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else X(a,p,b)},x=(p,b)=>{X(i.errors,p,b),g.state.next({errors:i.errors})},E=p=>{i.errors=p,g.state.next({errors:i.errors,isValid:!1})},$=(p,b,m,I)=>{const C=A(r,p);if(C){const S=A(a,p,re(m)?A(n,p):m);re(S)||I&&I.defaultChecked||b?X(a,p,b?S:Ts(C._f)):W(p,S),o.mount&&!o.action&&k()}},F=(p,b,m,I,C)=>{let S=!1,N=!1;const G={name:p};if(!t.disabled){if(!m||I){(d.isDirty||h.isDirty)&&(N=i.isDirty,i.isDirty=G.isDirty=O(),S=N!==G.isDirty);const Y=wt(A(n,p),b);N=!!A(i.dirtyFields,p),Y?le(i.dirtyFields,p):X(i.dirtyFields,p,!0),G.dirtyFields=i.dirtyFields,S=S||(d.dirtyFields||h.dirtyFields)&&N!==!Y}if(m){const Y=A(i.touchedFields,p);Y||(X(i.touchedFields,p,m),G.touchedFields=i.touchedFields,S=S||(d.touchedFields||h.touchedFields)&&Y!==m)}S&&C&&g.state.next(G)}return S?G:{}},L=(p,b,m,I)=>{const C=A(i.errors,p),S=(d.isValid||h.isValid)&&Ye(b)&&i.isValid!==b;if(t.delayError&&m?(l=y(()=>x(p,m)),l(t.delayError)):(clearTimeout(u),l=null,m?X(i.errors,p,m):le(i.errors,p)),(m?!wt(C,m):C)||!me(I)||S){const N={...I,...S&&Ye(b)?{isValid:b}:{},errors:i.errors,name:p};i={...i,...N},g.state.next(N)}},P=async p=>(_(p,!0),await t.resolver(a,t.context,Gf(p||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),V=async p=>{const{errors:b}=await P(p);if(_(p),p)for(const m of p){const I=A(b,m);I?X(i.errors,m,I):le(i.errors,m)}else i.errors=b;return b},z=async(p,b,m={valid:!0})=>{for(const I in p){const C=p[I];if(C){const{_f:S,...N}=C;if(S){const G=s.array.has(S.name),Y=C._f&&Yf(C._f);Y&&d.validatingFields&&_([S.name],!0);const ye=await Vs(C,s.disabled,a,v,t.shouldUseNativeValidation&&!b,G);if(Y&&d.validatingFields&&_([S.name]),ye[S.name]&&(m.valid=!1,b||e.shouldUseNativeValidation))break;!b&&(A(ye,S.name)?G?tp(i.errors,ye,S.name):X(i.errors,S.name,ye[S.name]):le(i.errors,S.name))}!me(N)&&await z(N,b,m)}}return m.valid},te=()=>{for(const p of s.unMount){const b=A(r,p);b&&(b._f.refs?b._f.refs.every(m=>!Vn(m)):!Vn(b._f.ref))&&_t(p)}s.unMount=new Set},O=(p,b)=>!t.disabled&&(p&&b&&X(a,p,b),!wt(yt(),n)),M=(p,b,m)=>zf(p,s,{...o.mount?a:re(b)?n:Ie(p)?{[p]:b}:b},m,b),H=p=>Fn(A(o.mount?a:n,p,t.shouldUnregister?A(n,p,[]):[])),W=(p,b,m={})=>{const I=A(r,p);let C=b;if(I){const S=I._f;S&&(!S.disabled&&X(a,p,Es(b,S)),C=er(S.ref)&&$e(b)?"":b,xs(S.ref)?[...S.ref.options].forEach(N=>N.selected=C.includes(N.value)):S.refs?bi(S.ref)?S.refs.forEach(N=>{(!N.defaultChecked||!N.disabled)&&(Array.isArray(C)?N.checked=!!C.find(G=>G===N.value):N.checked=C===N.value||!!C)}):S.refs.forEach(N=>N.checked=N.value===C):Nn(S.ref)?S.ref.value="":(S.ref.value=C,S.ref.type||g.state.next({name:p,values:de(a)})))}(m.shouldDirty||m.shouldTouch)&&F(p,C,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&Re(p)},K=(p,b,m)=>{for(const I in b){if(!b.hasOwnProperty(I))return;const C=b[I],S=p+"."+I,N=A(r,S);(s.array.has(p)||se(C)||N&&!N._f)&&!Tt(C)?K(S,C,m):W(S,C,m)}},q=(p,b,m={})=>{const I=A(r,p),C=s.array.has(p),S=de(b);X(a,p,S),C?(g.array.next({name:p,values:de(a)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&m.shouldDirty&&g.state.next({name:p,dirtyFields:Gt(n,a),isDirty:O(p,S)})):I&&!I._f&&!$e(S)?K(p,S,m):W(p,S,m),Ms(p,s)?g.state.next({...i,name:p,values:de(a)}):g.state.next({name:o.mount?p:void 0,values:de(a)})},mt=async p=>{o.mount=!0;const b=p.target;let m=b.name,I=!0;const C=A(r,m),S=Y=>{I=Number.isNaN(Y)||Tt(Y)&&isNaN(Y.getTime())||wt(Y,A(a,m,Y))},N=Fs(t.mode),G=Fs(t.reValidateMode);if(C){let Y,ye;const Dt=b.type?Ts(C._f):Lf(p),xt=p.type===ws.BLUR||p.type===ws.FOCUS_OUT,Zp=!Jf(C._f)&&!t.resolver&&!A(i.errors,m)&&!C._f.deps||Qf(xt,A(i.touchedFields,m),i.isSubmitted,G,N),Pn=Ms(m,s,xt);X(a,m,Dt),xt?(!b||!b.readOnly)&&(C._f.onBlur&&C._f.onBlur(p),l&&l(0)):C._f.onChange&&C._f.onChange(p);const jn=F(m,Dt,xt),Xp=!me(jn)||Pn;if(!xt&&g.state.next({name:m,type:p.type,values:de(a)}),Zp)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?xt&&k():xt||k()),Xp&&g.state.next({name:m,...Pn?{}:jn});if(!xt&&Pn&&g.state.next({...i}),t.resolver){const{errors:Ws}=await P([m]);if(_([m]),S(Dt),I){const Qp=Ns(i.errors,r,m),Ks=Ns(Ws,r,Qp.name||m);Y=Ks.error,m=Ks.name,ye=me(Ws)}}else _([m],!0),Y=(await Vs(C,s.disabled,a,v,t.shouldUseNativeValidation))[m],_([m]),S(Dt),I&&(Y?ye=!1:(d.isValid||h.isValid)&&(ye=await z(r,!0)));I&&(C._f.deps&&(!Array.isArray(C._f.deps)||C._f.deps.length>0)&&Re(C._f.deps),L(m,ye,Y,jn))}},B=(p,b)=>{if(A(i.errors,b)&&p.focus)return p.focus(),1},Re=async(p,b={})=>{let m,I;const C=vi(p);if(t.resolver){const S=await V(re(p)?p:C);m=me(S),I=p?!C.some(N=>A(S,N)):m}else p?(I=(await Promise.all(C.map(async S=>{const N=A(r,S);return await z(N&&N._f?{[S]:N}:N)}))).every(Boolean),!(!I&&!i.isValid)&&k()):I=m=await z(r);return g.state.next({...!Ie(p)||(d.isValid||h.isValid)&&m!==i.isValid?{}:{name:p},...t.resolver||!p?{isValid:m}:{},errors:i.errors}),b.shouldFocus&&!I&&mi(r,B,p?C:s.mount),I},yt=(p,b)=>{let m={...o.mount?a:n};return b&&(m=_s(b.dirtyFields?i.dirtyFields:i.touchedFields,m)),re(p)?m:Ie(p)?A(m,p):p.map(I=>A(m,I))},_i=(p,b)=>({invalid:!!A((b||i).errors,p),isDirty:!!A((b||i).dirtyFields,p),error:A((b||i).errors,p),isValidating:!!A(i.validatingFields,p),isTouched:!!A((b||i).touchedFields,p)}),Ft=p=>{const b=p?vi(p):void 0;b==null||b.forEach(m=>le(i.errors,m)),b?b.forEach(m=>{g.state.next({name:m,errors:i.errors})}):g.state.next({errors:{}})},xi=(p,b,m)=>{const I=(A(r,p,{_f:{}})._f||{}).ref,C=A(i.errors,p)||{},{ref:S,message:N,type:G,...Y}=C;X(i.errors,p,{...Y,...b,ref:I}),g.state.next({name:p,errors:i.errors,isValid:!1}),m&&m.shouldFocus&&I&&I.focus&&I.focus()},ar=(p,b)=>Pe(p)?g.state.subscribe({next:m=>"values"in m&&p(M(void 0,b),m)}):M(p,b,!0),Jt=p=>g.state.subscribe({next:b=>{Xf(p.name,b.name,p.exact)&&Zf(b,p.formState||d,Be,p.reRenderRoot)&&p.callback({values:{...a},...i,...b,defaultValues:n})}}).unsubscribe,Zt=p=>(o.mount=!0,h={...h,...p.formState},Jt({...p,formState:{...f,...p.formState}})),_t=(p,b={})=>{for(const m of p?vi(p):s.mount)s.mount.delete(m),s.array.delete(m),b.keepValue||(le(r,m),le(a,m)),!b.keepError&&le(i.errors,m),!b.keepDirty&&le(i.dirtyFields,m),!b.keepTouched&&le(i.touchedFields,m),!b.keepIsValidating&&le(i.validatingFields,m),!t.shouldUnregister&&!b.keepDefaultValue&&le(n,m);g.state.next({values:de(a)}),g.state.next({...i,...b.keepDirty?{isDirty:O()}:{}}),!b.keepIsValid&&k()},ki=({disabled:p,name:b})=>{if(Ye(p)&&o.mount||p||s.disabled.has(b)){const C=s.disabled.has(b)!==!!p;p?s.disabled.add(b):s.disabled.delete(b),C&&o.mount&&!o.action&&k()}},Xt=(p,b={})=>{let m=A(r,p);const I=Ye(b.disabled)||Ye(t.disabled);return X(r,p,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:p}},name:p,mount:!0,...b}}),s.mount.add(p),m?ki({disabled:Ye(b.disabled)?b.disabled:t.disabled,name:p}):$(p,!0,b.value),{...I?{disabled:b.disabled||t.disabled}:{},...t.progressive?{required:!!b.required,min:wi(b.min),max:wi(b.max),minLength:wi(b.minLength),maxLength:wi(b.maxLength),pattern:wi(b.pattern)}:{},name:p,onChange:mt,onBlur:mt,ref:C=>{if(C){Xt(p,b),m=A(r,p);const S=re(C.value)&&C.querySelectorAll&&C.querySelectorAll("input,select,textarea")[0]||C,N=Hf(S),G=m._f.refs||[];if(N?G.find(Y=>Y===S):S===m._f.ref)return;X(r,p,{_f:{...m._f,...N?{refs:[...G.filter(Vn),S,...Array.isArray(A(n,p))?[{}]:[]],ref:{type:S.type,name:p}}:{ref:S}}}),$(p,!1,void 0,S)}else m=A(r,p,{}),m._f&&(m._f.mount=!1),(t.shouldUnregister||b.shouldUnregister)&&!(Of(s.array,p)&&o.action)&&s.unMount.add(p)}}},Qt=()=>t.shouldFocusError&&mi(r,B,s.mount),or=p=>{Ye(p)&&(g.state.next({disabled:p}),mi(r,(b,m)=>{const I=A(r,m);I&&(b.disabled=I._f.disabled||p,Array.isArray(I._f.refs)&&I._f.refs.forEach(C=>{C.disabled=I._f.disabled||p}))},0,!1))},Si=(p,b)=>async m=>{let I;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let C=de(a);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:S,values:N}=await P();_(),i.errors=S,C=de(N)}else await z(r);if(s.disabled.size)for(const S of s.disabled)le(C,S);if(le(i.errors,"root"),me(i.errors)){g.state.next({errors:{}});try{await p(C,m)}catch(S){I=S}}else b&&await b({...i.errors},m),Qt(),setTimeout(Qt);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:me(i.errors)&&!I,submitCount:i.submitCount+1,errors:i.errors}),I)throw I},sr=(p,b={})=>{A(r,p)&&(re(b.defaultValue)?q(p,de(A(n,p))):(q(p,b.defaultValue),X(n,p,de(b.defaultValue))),b.keepTouched||le(i.touchedFields,p),b.keepDirty||(le(i.dirtyFields,p),i.isDirty=b.defaultValue?O(p,de(A(n,p))):O()),b.keepError||(le(i.errors,p),d.isValid&&k()),g.state.next({...i}))},Ci=(p,b={})=>{const m=p?de(p):n,I=de(m),C=me(p),S=C?n:I;if(b.keepDefaultValues||(n=m),!b.keepValues){if(b.keepDirtyValues){const N=new Set([...s.mount,...Object.keys(Gt(n,a))]);for(const G of Array.from(N)){const Y=A(i.dirtyFields,G),ye=A(a,G),Dt=A(S,G);Y&&!re(ye)?X(S,G,ye):!Y&&!re(Dt)&&q(G,Dt)}}else{if(Tn&&re(p))for(const N of s.mount){const G=A(r,N);if(G&&G._f){const Y=Array.isArray(G._f.refs)?G._f.refs[0]:G._f.ref;if(er(Y)){const ye=Y.closest("form");if(ye){ye.reset();break}}}}if(b.keepFieldsRef)for(const N of s.mount)q(N,A(S,N));else r={}}a=t.shouldUnregister?b.keepDefaultValues?de(n):{}:de(S),g.array.next({values:{...S}}),g.state.next({values:{...S}})}s={mount:b.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!b.keepIsValid||!!b.keepDirtyValues||!t.shouldUnregister&&!me(S),o.watch=!!t.shouldUnregister,o.keepIsValid=!!b.keepIsValid,o.action=!1,b.keepErrors||(i.errors={}),g.state.next({submitCount:b.keepSubmitCount?i.submitCount:0,isDirty:C?!1:b.keepDirty?i.isDirty:!!(b.keepDefaultValues&&!wt(p,n)),isSubmitted:b.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:C?{}:b.keepDirtyValues?b.keepDefaultValues&&a?Gt(n,a):i.dirtyFields:b.keepDefaultValues&&p?Gt(n,p):b.keepDirty?i.dirtyFields:{},touchedFields:b.keepTouched?i.touchedFields:{},errors:b.keepErrors?i.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},$i=(p,b)=>Ci(Pe(p)?p(a):p,{...t.resetOptions,...b}),R=(p,b={})=>{const m=A(r,p),I=m&&m._f;if(I){const C=I.refs?I.refs[0]:I.ref;C.focus&&setTimeout(()=>{C.focus(),b.shouldSelect&&Pe(C.select)&&C.select()})}},Be=p=>{i={...i,...p}},ot={control:{register:Xt,unregister:_t,getFieldState:_i,handleSubmit:Si,setError:xi,_subscribe:Jt,_runSchema:P,_updateIsValidating:_,_focusError:Qt,_getWatch:M,_getDirty:O,_setValid:k,_setFieldArray:w,_setDisabledField:ki,_setErrors:E,_getFieldArray:H,_reset:Ci,_resetDefaultValues:()=>Pe(t.defaultValues)&&t.defaultValues().then(p=>{$i(p,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:te,_disableForm:or,_subjects:g,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(p){o=p},get _defaultValues(){return n},get _names(){return s},set _names(p){s=p},get _formState(){return i},get _options(){return t},set _options(p){t={...t,...p}}},subscribe:Zt,trigger:Re,register:Xt,handleSubmit:Si,watch:ar,setValue:q,getValues:yt,reset:$i,resetField:sr,clearErrors:Ft,unregister:_t,setError:xi,setFocus:R,getFieldState:_i};return{...ot,formControl:ot}}function ir(e={}){const t=be.useRef(void 0),i=be.useRef(void 0),[r,n]=be.useState({isDirty:!1,isValidating:!1,isLoading:Pe(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:Pe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Pe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=rp(e);t.current={...s,formState:r}}const a=t.current.control;return a._options=e,Bf(()=>{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]),be.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),be.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),be.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),be.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),be.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==r.isDirty&&a._subjects.state.next({isDirty:o})}},[a,r.isDirty]),be.useEffect(()=>{var o;e.values&&!wt(e.values,i.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),i.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),be.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=be.useMemo(()=>Rf(r,a),[a,r]),t.current}const Os=(e,t,i)=>{if(e&&"reportValidity"in e){const r=A(i,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},np=(e,t)=>{for(const i in t.fields){const r=t.fields[i];r&&r.ref&&"reportValidity"in r.ref?Os(r.ref,i,e):r.refs&&r.refs.forEach(n=>Os(n,i,e))}},ap=(e,t)=>{t.shouldUseNativeValidation&&np(e,t);const i={};for(const r in e){const n=A(t.fields,r),a=Object.assign(e[r]||{},{ref:n&&n.ref});if(op(t.names||Object.keys(e),r)){const o=Object.assign({},A(i,r));X(o,"root",a),X(i,r,o)}else X(i,r,a)}return i},op=(e,t)=>e.some(i=>i.startsWith(t+"."));var rr=function(e,t,i){return i===void 0&&(i={}),function(r,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(vf(e,r,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var u=s.issues[0],f=df(u);if(f&&(l[f]||(l[f]={message:u.message,type:u.type}),o)){var d=l[f].types,h=d&&d[u.type];l[f]=ms(f,o,l,u.type,h?[].concat(h,u.message):u.message)}s.issues.shift()}return{values:{},errors:ap(l,a)}}return{values:i.raw?r:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Ps=27,js=12,Rs=10,sp=zt("enum"),lp=(e,t)=>{const i={min:e.minSelected??0,max:e.maxSelected??e.options.length};return rr(rt({checked:bt(os(Ce(),rs()),$n(r=>Object.entries(r).filter(([n,a])=>a).map(([n,a])=>n)),gi(i.max,t("validation_multiple_choice_max",{count:i.max})),Ht(i.min,t("validation_multiple_choice_min",{count:i.min})))}))},cp=Rr(({option:e,...t},i)=>c(ne,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:i}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Bs=$t("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:ds}}}),dp=({input:e,onSubmitSuccess:t})=>{var f,d;const i=e.key?(f=D.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,r=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=r&&e.config.options.length===2,{t:a}=oe(),{register:o,handleSubmit:s,formState:{errors:l}}=ir({defaultValues:{checked:r?{}:sp(i)?Object.fromEntries(i.value.map(h=>[h,!0])):{}},resolver:lp(e.config,a)}),u=An();return n?c("ul",{style:{maxHeight:6.5*Ps+5*js+2*Rs},class:Bs({variant:"booleanLike"}),children:e.config.options.map((h,g)=>c("li",{class:us,children:c(fs,{type:"submit",ref:v=>{v&&g===0&&(u.current=v)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}):c("form",{noValidate:!0,onSubmit:h=>s(g=>{const v=g.checked;t({type:"enum",value:v})})(h),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Ps+5*js+2*Rs},class:Bs({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,g)=>{const v=`checked.${h.value}`,{ref:y,...k}=o(v);return c("li",{class:"relative",children:c(cp,{option:h,autoFocus:g===0,ref:_=>{_&&g===0&&(u.current=_),y(_)},id:v,...k,onClick:r?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[r?null:c(At,{}),e.config.minSelected===0&&c(vt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(Wt,{error:(d=l.checked)==null?void 0:d.root})})]})},up=zt("number"),fp=(e,t)=>{const i=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return rr(rt({number:bt(ns(t("validation_number")),Qo(i,t("validation_number_min",{min:i})),Xo(r,t("validation_number_max",{max:r})),Jo(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},pp=({input:e,onSubmitSuccess:t})=>{var d;const i=e.config.defaultValue,r=e.key?(d=D.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:n}=oe(),{register:a,handleSubmit:o,formState:{errors:s}}=ir({defaultValues:{number:up(r)?r.value:i?Number(i):void 0},resolver:fp(e.config,n)}),{ref:l,...u}=a("number",{required:!e.config.optional,valueAsNumber:!0}),f=Se();return ke(()=>{f.current&&(f.current.focus(),f.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...u,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(f.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:Kt({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&c(vt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(At,{})]}),c(Wt,{error:s.number})]})},hp=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(En).find(n=>e.startsWith(n[1])),i=t?t[1]:"",r=e.replace(i,"");return/^\d+$/.test(r)?{countryCode:i,phoneNumber:r}:{countryCode:"",phoneNumber:""}},gp="44",bp=/^[0-9 ]+$/,vp=zt("string"),wp=zt("phone"),mp=e=>{const t=bt(Ce(e("validation_country_code")),Cn(bp,e("validation_country_code"))),i=bt(Ce(e("validation_phone")),Ht(1,e("validation_phone")),$n(r=>r.replace(/[^0-9]/g,"")));return rr(rt({countryCode:t,phoneNumber:i}))},yp=({input:e,onSubmitSuccess:t})=>{var y;const i=e.key?(y=D.current$.value.flow)==null?void 0:y.data.submissions[e.key]:void 0,{t:r}=oe(),[n,a]=Le(),o=vp(i)?hp(i.value):wp(i)?i.value:void 0,{register:s,handleSubmit:l,formState:{errors:u},watch:f}=ir({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??gp,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:mp(r)}),{ref:d,...h}=s("phoneNumber",{required:!e.config.optional}),g=Se(),v=f("countryCode");return ke(()=>{g.current&&(g.current.focus(),g.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(k=>{const _=k.phoneNumber.replace(/[^0-9]/g,""),w=k.countryCode.replace(/[^0-9]/g,"");a(void 0);const x=e.config.minChars??7,E=_.length+w.length;if(E<x)return a(r("validation_phone_min_chars",{count:x}));const $=e.config.maxChars;if($!=null&&E>$)return a(r("validation_max_chars",{count:$}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:w,phoneNumber:_}}):t({type:"string",value:v+k.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[c("span",{children:["+",v]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(En).map(([k,_])=>c("option",{value:_,children:[k," (+",_,")"]},k))})]}),c("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(g.current=k),d(k)},class:Kt({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(vt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),c(At,{})]}),c(Wt,{error:u.countryCode||u.phoneNumber||{message:n}})]})},nr=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),zs=(e,t,i,r)=>i!==void 0&&r*1e3>mr?e("submission_available_at",{time:ia(i,t)}):e("submission_cooldown",{count:r}),_p=({input:e,onSubmitSuccess:t})=>{const{t:i,locale:r}=oe(),{availableAt:n}=e.config,[a,o]=Le(()=>nr(n)),[s,l]=Le("");Oi(()=>{const f=nr(n);if(o(f),f===0)return;l(zs(i,r,n,f));const d=setInterval(()=>{const h=nr(n);o(h),!(h>0)&&(clearInterval(d),l(i("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[n,r,i]);const u=a>0;return c("div",{class:"flex flex-col items-center gap-2 py-3",children:[c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":u,"aria-describedby":u?"submit-cooldown":void 0,onClick:()=>{nr(n)>0||t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})}),u&&c("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:zs(i,r,n,a)}),c("p",{role:"status",class:"sr-only",children:s})]})},xp=160,Us=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,xp)}px`},kp={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Sp=zt("string"),Cp=(e,t)=>{const i={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return rr(rt({text:{date:bt(Ce(t("validation_date")),Cn(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:bt(Ce(t("validation_email")),Zo(t("validation_email")),Ht(e.minChars??1,i.minLength),gi(e.maxChars??1/0,i.maxLength)),text:bt(Ce(),Ht(e.minChars??1,i.minLength),gi(e.maxChars??1/0,i.maxLength)),url:bt(Ce(t("validation_url")),es(t("validation_url")),Ht(e.minChars??1,i.minLength),gi(e.maxChars??1/0,i.maxLength))}[e.format]}))},$p={text:({input:e,onSubmitSuccess:t})=>{var y;const{t:i}=oe(),r=e.key?(y=D.current$.value.flow)==null?void 0:y.data.submissions[e.key]:void 0,n=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:u}}=ir({defaultValues:{text:Sp(r)?r.value:n??""},resolver:Cp(e.config,i)}),{ref:f,...d}=o("text",{required:!e.config.optional}),h=Se();ke(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&Us(h.current),h.current.focus(),h.current.select())},[]);const g=e.config.maxChars,v=a&&g!==void 0?l("text").length:void 0;return c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(k=>{t({type:"string",value:k.text})}),children:[c("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[a?c("textarea",{id:"chat-input",...d,rows:2,maxLength:g,autoFocus:!0,"aria-describedby":v!==void 0?"chat-input-count":void 0,onInput:k=>Us(k.currentTarget),onKeyDown:k=>{var _;k.key==="Enter"&&(k.ctrlKey||k.metaKey)&&(k.preventDefault(),(_=k.currentTarget.form)==null||_.requestSubmit())},ref:k=>{k&&(h.current=k),f(k)},placeholder:e.config.placeholder,class:Kt({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):c("input",{id:"chat-input",...d,...kp[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(h.current=k),f(k)},placeholder:e.config.placeholder,class:Kt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(vt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(At,{})]}),v!==void 0&&g!==void 0&&c("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[v,"/",g]}),c(Wt,{error:u.text})]})},phone:yp,"multiple-choice":dp,boolean:Ef,file:Nf,submit:_p,address:kf,number:pp},Ep=({logger:e,analytics:t})=>{var a;const i=(a=D.current$.value.flow)==null?void 0:a.data.currentInput,r=Se(null),n=()=>ie.onInteractionFn$.value();return ke(()=>{var o;(o=r.current)==null||o.scrollTo({top:0})},[i]),c("div",{ref:r,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:c("div",{class:"flex flex-col",onPointerDownCapture:i?n:void 0,onKeyDownCapture:i?n:void 0,children:i?(()=>{const o=$p[i.type];return c(o,{logger:e,analytics:t,onSubmitSuccess:ie.onSubmitSuccessFn$.value,input:i})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Kt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(At,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Ip(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ap=function(e){return e instanceof RegExp},Tp=function(t){var i=/[\\^$.*+?()[\]{}|]/g,r=RegExp(i.source);return t&&r.test(t)?t.replace(i,"\\$&"):t},Hs=function(e){return typeof e=="string"},Fp=function(e){var t=[];return e.forEach(function(i){Array.isArray(i)?t=t.concat(i):t.push(i)}),t};function Dp(e,t,i){var r=0,n=0;if(e==="")return e;if(!e||!Hs(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Ap(a)||(a=new RegExp("("+Tp(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}n=o[s].length,r+=o[s-1].length,o[s]=i(o[s],s,r),r+=n}return o}var Mp=function(t,i,r){return Array.isArray(t)||(t=[t]),Fp(t.map(function(n){return Hs(n)?Dp(n,i,r):n}))};const yi=Ip(Mp),Np=/(\[[^\]]+\]\([^)]+\))/g,Lp=/\[([^\]]+)\]\(([^)]+)\)/,Vp=/(https?:\/\/[^\s]+)/g,Op=/_(.*?)_/g,Pp=/\*\*(.*?)\*\*/g,jp=/(\\n|\n)/g,qs="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Rp=e=>{const t=yi(e,Np,(s,l)=>{const[,u,f]=s.match(Lp)??[];return f?c("a",{class:qs,href:f,children:u??f},f+l):c("span",{children:"INVALID LINK"})}),i=yi(t,Vp,(s,l)=>c("a",{class:qs,href:s,children:s},s+l)),r=yi(i,Op,(s,l)=>c("em",{children:s},s+l)),n=yi(r,Pp,(s,l)=>c("strong",{children:s},s+l));let a=0;return yi(n,jp,()=>c("br",{},`br-${a++}`))},Bp=$t("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"}}),zp=({children:e,className:t,animate:i,side:r,...n})=>c("p",{style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:Bp({className:t,side:r,animate:i}),...n,children:e}),Up=({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"})})]})}),Hp=({className:e,...t})=>c("div",{"aria-hidden":!0,children:ie.isBotTyping$.value===!0?c("div",{"data-testid":"typing-indicator",class:et("flex gap-1 p-4",e),...t,children:Array.from({length:3},(i,r)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}):void 0}),qp={bot:"left",user:"right"},Wp=$t("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),Kp=({lastSentMessageFooter:e})=>{const{t}=oe(),i=D.current$.value.flow,r=(i==null?void 0:i.data.messages)??[],n=i?mn(i):void 0;return c("ol",{"aria-label":t("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[r.map((a,o)=>c(ne,{children:c("li",{class:"flex",tabIndex:o===r.length-1?-1:void 0,children:[n&&a.groupId===n&&!r.slice(o+1).some(s=>s.groupId===n)?e:null,Bi(a).with({type:"system"},s=>c("p",{class:Wp({variant:s.variant}),children:s.text})).with({type:"text",author:ci.union("bot","user")},s=>{const l=o===r.length-1,u=s.author==="bot"?Rp(s.text):s.text;return c(ne,{children:c(zp,{animate:l,side:qp[s.author],children:u},o)})}).with({type:"link"},s=>c(Up,{message:s})).with({type:"image"},s=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:s.url,style:{aspectRatio:s.width/s.height}})).with({type:"file"},s=>c(Tf,{class:s.author==="bot"?void 0:"ml-auto",file:{name:s.fileName,sizeKb:s.fileSizeKb}})).with({type:"loading"},s=>{const l=r[r.length-1];return!(s===l)||ie.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[c(Yi,{"aria-hidden":s.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),s.text?c("p",{role:"status",class:"text-neutral-11 text-sm",children:s.text}):null]})}).exhaustive()]})},o)),c("li",{class:ie.captchaVisible$.value?"flex":"hidden",children:c("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":t("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),c(Hp,{},"typing")]})},Gp=({logger:e,apiClient:t,analytics:i,talentBankClient:r})=>{const{flow:n}=D.current$.value;tt(n,"Flow is required to exist to show chatbot body");const a=D.viewState$.value,{chatRef:o,chatService:s}=Yd(),{t:l}=oe(),[u,f]=Le();return ke(()=>{a==="maximised"&&ie.scrollToEnd()},[a]),ke(()=>{var $;const{state:d,flow:h}=D.current$.peek();if(d!=="loaded")throw new Error(l("invalid_state"));let g=h.data.nodeHistory.at(-1);if(ie.scrollToEnd(),D.setInput(void 0),h.data.isFinished)return;const v=()=>{const F=D.current$.peek().flow;!F||F.data.hasInteracted||(D.markAsInteracted(),Yo(i,F,"FLOW_INTERACT"))};ie.onInteractionFn$.value=v,g===void 0?(g=Ho(n.nodes).id,D.setCurrentNodeId(g),Yo(i,h,"FLOW_START")):D.removeMessagesSentByNodeIds([g,_n]);const{interpret:y,abort:k,undo:_}=Nu({context:n.context,analytics:{service:i,customProperties:($=n.analytics)==null?void 0:$.customProperties},apiClient:t,logger:e,talentBankClient:r,flow:n,chatService:s,t:l,getApplicationRecovery:()=>{var F;return(F=D.current$.peek().flow)==null?void 0:F.data.applicationRecovery},setApplicationRecovery:D.setApplicationRecovery,persistWriteBarrier:()=>D.persistWriteBarrier(h),getSubmissions:()=>{var F;return(F=D.current$.peek().flow)==null?void 0:F.data.submissions},onInterpret:F=>D.setCurrentNodeId(F.id),onFlowEnd:async()=>{var L;D.markAsFinished();const F=D.current$.peek().flow;tt(F),i.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:F.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(L=n.analytics)==null?void 0:L.customProperties})}}),w=g,x=()=>{f(()=>_),y(w)},E=new AbortController;return h.offerResume?nf({chatService:s,t:l,signal:E.signal}).then(F=>(D.settleResume(h),F?x():(D.restart(),De.flushStateData()))).catch(F=>{F instanceof st||e.error("Resume prompt failed",F)}):x(),()=>{E.abort(),ie.onInteractionFn$.value===v&&(ie.onInteractionFn$.value=()=>{}),k()}},[i,t,s,e,n,r,l]),c(ne,{children:[c("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[c("div",{ref:o,role:"region","aria-label":l("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:c(Kp,{lastSentMessageFooter:!mn(n)||!u?null:c(Yp,{undoFn:u})})}),ie.isReadingHistory$.value&&!n.data.isFinished&&!ie.isBotTyping$.value&&c("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:c(pi,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":l("jump_to_current"),onClick:()=>{var h,g;ie.scrollToEnd(),(g=((h=o.current)==null?void 0:h.querySelector('li[tabindex="-1"]'))??o.current)==null||g.focus({preventScroll:!0})},children:c(No,{})})})]}),c(Ep,{logger:e,analytics:i})]})},Yp=({undoFn:e})=>{const{t}=oe();return c("div",{class:"flex flex-1 items-center justify-end px-1",children:c(pi,{"aria-label":t("undo"),onClick:async()=>{const{flow:i}=D.current$.peek();tt(i),e(i.data.nodeHistory)},children:c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},Jp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Gp},Symbol.toStringTag,{value:"Module"}))})();
|