@inploi/plugin-chatbot 9.0.1 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";let Ve;function ni(e){return{lang:(e==null?void 0:e.lang)??(Ve==null?void 0:Ve.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ve==null?void 0:Ve.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ve==null?void 0:Ve.abortPipeEarly)}}let Mr;function fs(e){return Mr==null?void 0:Mr.get(e)}let Pr;function ps(e){return Pr==null?void 0:Pr.get(e)}let Vr;function hs(e,t){var r;return(r=Vr==null?void 0:Vr.get(e))==null?void 0:r.get(t)}function ii(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function Le(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??ii(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},f=e.kind==="schema",p=(i==null?void 0:i.message)??e.message??hs(e.reference,l.lang)??(f?ps(l.lang):null)??n.message??fs(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),f&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ke(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},ni())}}}function gs(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function vs(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function ai(e,t){return{kind:"validation",type:"min_length",reference:ai,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&Le(this,"length",r,n,{received:`${r.value.length}`}),r}}}function bs(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function nr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function oi(e,t){return{kind:"schema",type:"array",reference:oi,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ke(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const f={type:"array",origin:"value",input:i,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(f):p.path=[f],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else Le(this,"type",r,n);return r}}}function Lr(e){return{kind:"schema",type:"boolean",reference:Lr,expects:"boolean",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:Le(this,"type",t,r),t}}}function K(e,t){return{kind:"schema",type:"nullable",reference:K,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=nr(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function At(e,t){return{kind:"schema",type:"nullish",reference:At,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=nr(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ht(e){return{kind:"schema",type:"number",reference:ht,expects:"number",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Le(this,"type",t,r),t}}}function Se(e,t){return{kind:"schema",type:"object",reference:Se,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ke(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:nr(s),f=s["~run"]({value:l},n);if(f.issues){const p={type:"object",origin:"value",input:i,key:o,value:l};for(const u of f.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=f.issues),n.abortEarly){r.typed=!1;break}}f.typed||(r.typed=!1),r.value[o]=f.value}else if(s.fallback!==void 0)r.value[o]=bs(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Le(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else Le(this,"type",r,n);return r}}}function si(e,t){return{kind:"schema",type:"optional",reference:si,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=nr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Nt(e,t){return{kind:"schema",type:"picklist",reference:Nt,expects:vs(e.map(ii),"|"),async:!1,options:e,message:t,get"~standard"(){return ke(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:Le(this,"type",r,n),r}}}function jr(e,t,r){return{kind:"schema",type:"record",reference:jr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ke(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(gs(a,l)){const f=a[l],p=this.key["~run"]({value:l},i);if(p.issues){const g={type:"object",origin:"key",input:a,key:l,value:f};for(const b of p.issues)b.path=[g],(o=n.issues)==null||o.push(b);if(n.issues||(n.issues=p.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:f},i);if(u.issues){const g={type:"object",origin:"value",input:a,key:l,value:f};for(const b of u.issues)b.path?b.path.unshift(g):b.path=[g],(s=n.issues)==null||s.push(b);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!p.typed||!u.typed)&&(n.typed=!1),p.typed&&(n.value[p.value]=u.value)}}else Le(this,"type",n,i);return n}}}function O(e){return{kind:"schema",type:"string",reference:O,expects:"string",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:Le(this,"type",t,r),t}}}function li(){return{kind:"schema",type:"unknown",reference:li,expects:"unknown",async:!1,get"~standard"(){return ke(this)},"~run"(e){return e.typed=!0,e}}}function ws(...e){return{...e[0],pipe:e,get"~standard"(){return ke(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Rr(e,t,r){const n=e["~run"]({value:t},ni(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const ms=["agent","sdk","form","integration","migration"],ys=["PENDING","SUBMITTED","SCREENING","SHORTLISTED","INTERVIEW","OFFERED","HIRED","REJECTED","WITHDRAWN"],_s=["screening","cv_match","interview","overall"],xs=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],ci=Nt(ms),ks=Nt(ys),Ss=Nt(_s),Cs=Nt(xs),ui=Se({id:O(),email:K(O()),firstName:K(O()),lastName:K(O()),phone:K(O()),source:K(ci),identifiedAt:K(O()),createdAt:O(),updatedAt:O()}),di=ws(O(),ai(1)),zr=jr(O(),li()),$s=Se({id:O(),applicationId:O(),status:Cs,scheduledAt:K(O()),completedAt:K(O()),meta:K(zr),createdAt:O(),updatedAt:O()}),Es=Se({score:ht(),reason:O(),confidence:ht()}),fi=Se({id:O(),candidateId:O(),jobId:ht(),status:ks,sessionId:K(ht()),externalApplicationId:K(O()),meta:K(zr),context:K(zr),scoredAt:K(O()),shortlistedAt:K(O()),createdAt:O(),updatedAt:O()}),Is=Se({id:O(),applicationId:O(),scoreType:Ss,score:K(ht()),reason:K(O()),categories:K(jr(O(),Es)),scoredBy:K(O()),createdAt:O()});({...fi.entries},{...ui.entries});const Ts=Se({anonymousId:di,email:di,firstName:At(O()),lastName:At(O()),phone:At(O()),source:At(ci)}),As=Se({candidateId:O(),isNew:Lr()}),Ns=Se({isDuplicate:Lr(),existingApplication:si(Se({id:O(),status:O(),createdAt:O()}))});var Ds=e=>e,Os={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Fs(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function Kg(e){return e}var Ms=({environment:e,publishableKey:t,logger:r})=>{let n=Os[e];return{async checkDuplicate(i){try{let a=new URLSearchParams({email:i.email,scope:i.scope});i.scope==="job"&&i.jobId!=null&&a.set("job_id",String(i.jobId));let o=await fetch(`${n}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=Rr(Ns,await o.json());return s.success?s.output:(r.error("[TalentBankClient] checkDuplicate returned an invalid response"),{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(i){try{if(!i.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:i.email,firstName:i.firstName,lastName:i.lastName,phone:i.phone,anonymousId:i.anonymousId,source:i.source??"sdk"},o=Rr(Ts,a);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Rr(As,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ps=Array.isArray,Br=Ps,Vs=typeof ir=="object"&&ir&&ir.Object===Object&&ir,Ls=Vs,js=Ls,Rs=typeof self=="object"&&self&&self.Object===Object&&self,zs=js||Rs||Function("return this")(),Ur=zs,Bs=Ur,Us=Bs.Symbol,Hr=Us,hi=Hr,gi=Object.prototype,Hs=gi.hasOwnProperty,qs=gi.toString,Dt=hi?hi.toStringTag:void 0;function Ks(e){var t=Hs.call(e,Dt),r=e[Dt];try{e[Dt]=void 0;var n=!0}catch{}var i=qs.call(e);return n&&(t?e[Dt]=r:delete e[Dt]),i}var Gs=Ks,Ws=Object.prototype,Ys=Ws.toString;function Js(e){return Ys.call(e)}var Xs=Js,vi=Hr,Zs=Gs,Qs=Xs,el="[object Null]",tl="[object Undefined]",bi=vi?vi.toStringTag:void 0;function rl(e){return e==null?e===void 0?tl:el:bi&&bi in Object(e)?Zs(e):Qs(e)}var wi=rl;function nl(e){return e!=null&&typeof e=="object"}var il=nl,al=wi,ol=il,sl="[object Symbol]";function ll(e){return typeof e=="symbol"||ol(e)&&al(e)==sl}var qr=ll,cl=Br,ul=qr,dl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fl=/^\w*$/;function pl(e,t){if(cl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ul(e)?!0:fl.test(e)||!dl.test(e)||t!=null&&e in Object(t)}var hl=pl;function gl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var mi=gl,vl=wi,bl=mi,wl="[object AsyncFunction]",ml="[object Function]",yl="[object GeneratorFunction]",_l="[object Proxy]";function xl(e){if(!bl(e))return!1;var t=vl(e);return t==ml||t==yl||t==wl||t==_l}var kl=xl,Sl=Ur,Cl=Sl["__core-js_shared__"],$l=Cl,Kr=$l,yi=function(){var e=/[^.]+$/.exec(Kr&&Kr.keys&&Kr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function El(e){return!!yi&&yi in e}var Il=El,Tl=Function.prototype,Al=Tl.toString;function Nl(e){if(e!=null){try{return Al.call(e)}catch{}try{return e+""}catch{}}return""}var Dl=Nl,Ol=kl,Fl=Il,Ml=mi,Pl=Dl,Vl=/[\\^$.*+?()[\]{}|]/g,Ll=/^\[object .+?Constructor\]$/,jl=Function.prototype,Rl=Object.prototype,zl=jl.toString,Bl=Rl.hasOwnProperty,Ul=RegExp("^"+zl.call(Bl).replace(Vl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Hl(e){if(!Ml(e)||Fl(e))return!1;var t=Ol(e)?Ul:Ll;return t.test(Pl(e))}var ql=Hl;function Kl(e,t){return e==null?void 0:e[t]}var Gl=Kl,Wl=ql,Yl=Gl;function Jl(e,t){var r=Yl(e,t);return Wl(r)?r:void 0}var _i=Jl,Xl=_i,Zl=Xl(Object,"create"),ar=Zl,xi=ar;function Ql(){this.__data__=xi?xi(null):{},this.size=0}var ec=Ql;function tc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rc=tc,nc=ar,ic="__lodash_hash_undefined__",ac=Object.prototype,oc=ac.hasOwnProperty;function sc(e){var t=this.__data__;if(nc){var r=t[e];return r===ic?void 0:r}return oc.call(t,e)?t[e]:void 0}var lc=sc,cc=ar,uc=Object.prototype,dc=uc.hasOwnProperty;function fc(e){var t=this.__data__;return cc?t[e]!==void 0:dc.call(t,e)}var pc=fc,hc=ar,gc="__lodash_hash_undefined__";function vc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=hc&&t===void 0?gc:t,this}var bc=vc,wc=ec,mc=rc,yc=lc,_c=pc,xc=bc;function gt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gt.prototype.clear=wc,gt.prototype.delete=mc,gt.prototype.get=yc,gt.prototype.has=_c,gt.prototype.set=xc;var kc=gt;function Sc(){this.__data__=[],this.size=0}var Cc=Sc;function $c(e,t){return e===t||e!==e&&t!==t}var Ec=$c,Ic=Ec;function Tc(e,t){for(var r=e.length;r--;)if(Ic(e[r][0],t))return r;return-1}var or=Tc,Ac=or,Nc=Array.prototype,Dc=Nc.splice;function Oc(e){var t=this.__data__,r=Ac(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Dc.call(t,r,1),--this.size,!0}var Fc=Oc,Mc=or;function Pc(e){var t=this.__data__,r=Mc(t,e);return r<0?void 0:t[r][1]}var Vc=Pc,Lc=or;function jc(e){return Lc(this.__data__,e)>-1}var Rc=jc,zc=or;function Bc(e,t){var r=this.__data__,n=zc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Uc=Bc,Hc=Cc,qc=Fc,Kc=Vc,Gc=Rc,Wc=Uc;function vt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}vt.prototype.clear=Hc,vt.prototype.delete=qc,vt.prototype.get=Kc,vt.prototype.has=Gc,vt.prototype.set=Wc;var Yc=vt,Jc=_i,Xc=Ur,Zc=Jc(Xc,"Map"),Qc=Zc,ki=kc,eu=Yc,tu=Qc;function ru(){this.size=0,this.__data__={hash:new ki,map:new(tu||eu),string:new ki}}var nu=ru;function iu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var au=iu,ou=au;function su(e,t){var r=e.__data__;return ou(t)?r[typeof t=="string"?"string":"hash"]:r.map}var sr=su,lu=sr;function cu(e){var t=lu(this,e).delete(e);return this.size-=t?1:0,t}var uu=cu,du=sr;function fu(e){return du(this,e).get(e)}var pu=fu,hu=sr;function gu(e){return hu(this,e).has(e)}var vu=gu,bu=sr;function wu(e,t){var r=bu(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var mu=wu,yu=nu,_u=uu,xu=pu,ku=vu,Su=mu;function bt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}bt.prototype.clear=yu,bt.prototype.delete=_u,bt.prototype.get=xu,bt.prototype.has=ku,bt.prototype.set=Su;var Cu=bt,Si=Cu,$u="Expected a function";function Gr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($u);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(Gr.Cache||Si),r}Gr.Cache=Si;var Eu=Gr,Iu=Eu,Tu=500;function Au(e){var t=Iu(e,function(n){return r.size===Tu&&r.clear(),n}),r=t.cache;return t}var Nu=Au,Du=Nu,Ou=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fu=/\\(\\)?/g,Mu=Du(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ou,function(r,n,i,a){t.push(i?a.replace(Fu,"$1"):n||r)}),t}),Pu=Mu;function Vu(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Lu=Vu,Ci=Hr,ju=Lu,Ru=Br,zu=qr,Bu=1/0,$i=Ci?Ci.prototype:void 0,Ei=$i?$i.toString:void 0;function Ii(e){if(typeof e=="string")return e;if(Ru(e))return ju(e,Ii)+"";if(zu(e))return Ei?Ei.call(e):"";var t=e+"";return t=="0"&&1/e==-Bu?"-0":t}var Uu=Ii,Hu=Uu;function qu(e){return e==null?"":Hu(e)}var Ku=qu,Gu=Br,Wu=hl,Yu=Pu,Ju=Ku;function Xu(e,t){return Gu(e)?e:Wu(e,t)?[e]:Yu(Ju(e))}var Zu=Xu,Qu=qr,ed=1/0;function td(e){if(typeof e=="string"||Qu(e))return e;var t=e+"";return t=="0"&&1/e==-ed?"-0":t}var rd=td,nd=Zu,id=rd;function ad(e,t){t=nd(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[id(t[r++])];return r&&r==n?e:void 0}var od=ad,sd=od;function ld(e,t,r){var n=e==null?void 0:sd(e,t);return n===void 0?r:n}var cd=ld;const Ot=pi(cd);var Ft,I,Ti,Ai,rt,Ni,Di,Wr,Oi,wt={},Fi=[],ud=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lr=Array.isArray;function je(e,t){for(var r in t)e[r]=t[r];return e}function Mi(e){var t=e.parentNode;t&&t.removeChild(e)}function we(e,t,r){var n,i,a,o={};for(a in t)a=="key"?n=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Ft.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Mt(e,o,n,i,null)}function Mt(e,t,r,n,i){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Ti};return i==null&&I.vnode!=null&&I.vnode(a),a}function dd(){return{current:null}}function ie(e){return e.children}function $e(e,t){this.props=e,this.context=t}function cr(e,t){if(t==null)return e.__?cr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?cr(e):null}function Pi(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Pi(e)}}function Yr(e){(!e.__d&&(e.__d=!0)&&rt.push(e)&&!ur.__r++||Ni!==I.debounceRendering)&&((Ni=I.debounceRendering)||Di)(ur)}function ur(){var e,t,r,n,i,a,o,s,l;for(rt.sort(Wr);e=rt.shift();)e.__d&&(t=rt.length,n=void 0,i=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(a=je({},o)).__v=o.__v+1,Jr(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??cr(o),o.__h,i),Ui(n,o,i),o.__e!=s&&Pi(o)),rt.length>t&&rt.sort(Wr));ur.__r=0}function Vi(e,t,r,n,i,a,o,s,l,f,p){var u,g,b,v,_,E,y,m,S,T,D=0,B=n&&n.__k||Fi,se=B.length,Q=se,U=t.length;for(r.__k=[],u=0;u<U;u++)(v=r.__k[u]=(v=t[u])==null||typeof v=="boolean"||typeof v=="function"?null:typeof v=="string"||typeof v=="number"||typeof v=="bigint"?Mt(null,v,null,null,v):lr(v)?Mt(ie,{children:v},null,null,null):v.__b>0?Mt(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null&&(v.__=r,v.__b=r.__b+1,(m=fd(v,B,y=u+D,Q))===-1?b=wt:(b=B[m]||wt,B[m]=void 0,Q--),Jr(e,v,b,i,a,o,s,l,f,p),_=v.__e,(g=v.ref)&&b.ref!=g&&(b.ref&&Xr(b.ref,null,v),p.push(g,v.__c||_,v)),_!=null&&(E==null&&(E=_),T=!(S=b===wt||b.__v===null)&&m===y,S?m==-1&&D--:m!==y&&(m===y+1?(D++,T=!0):m>y?Q>U-y?(D+=m-y,T=!0):D--:D=m<y&&m==y-1?m-y:0),y=u+D,T=T||m==u&&!S,typeof v.type!="function"||m===y&&b.__k!==v.__k?typeof v.type=="function"||T?v.__d!==void 0?(l=v.__d,v.__d=void 0):l=_.nextSibling:l=ji(e,_,l):l=Li(v,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=E,u=se;u--;)B[u]!=null&&(typeof r.type=="function"&&B[u].__e!=null&&B[u].__e==r.__d&&(r.__d=B[u].__e.nextSibling),Hi(B[u],B[u]))}function Li(e,t,r){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,t=typeof n.type=="function"?Li(n,t,r):ji(r,n.__e,t));return t}function Re(e,t){return t=t||[],e==null||typeof e=="boolean"||(lr(e)?e.some(function(r){Re(r,t)}):t.push(e)),t}function ji(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function fd(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&a===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&i==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&i==l.key&&a===l.type)return s;s++}}return-1}function pd(e,t,r,n,i){var a;for(a in r)a==="children"||a==="key"||a in t||dr(e,a,null,r[a],n);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||dr(e,a,t[a],r[a],n)}function Ri(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||ud.test(t)?r:r+"px"}function dr(e,t,r,n,i){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ri(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Ri(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n||e.addEventListener(t,a?Bi:zi,a):e.removeEventListener(t,a?Bi:zi,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function zi(e){return this.l[e.type+!1](I.event?I.event(e):e)}function Bi(e){return this.l[e.type+!0](I.event?I.event(e):e)}function Jr(e,t,r,n,i,a,o,s,l,f){var p,u,g,b,v,_,E,y,m,S,T,D,B,se,Q,U=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(p=I.__b)&&p(t);try{e:if(typeof U=="function"){if(y=t.props,m=(p=U.contextType)&&n[p.__c],S=p?m?m.props.value:p.__:n,r.__c?E=(u=t.__c=r.__c).__=u.__E:("prototype"in U&&U.prototype.render?t.__c=u=new U(y,S):(t.__c=u=new $e(y,S),u.constructor=U,u.render=gd),m&&m.sub(u),u.props=y,u.state||(u.state={}),u.context=S,u.__n=n,g=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),U.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=je({},u.__s)),je(u.__s,U.getDerivedStateFromProps(y,u.__s))),b=u.props,v=u.state,u.__v=t,g)U.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(U.getDerivedStateFromProps==null&&y!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,S),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,S)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(W){W&&(W.__=t)}),T=0;T<u._sb.length;T++)u.__h.push(u._sb[T]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,S),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,v,_)})}if(u.context=S,u.props=y,u.__P=e,u.__e=!1,D=I.__r,B=0,"prototype"in U&&U.prototype.render){for(u.state=u.__s,u.__d=!1,D&&D(t),p=u.render(u.props,u.state,u.context),se=0;se<u._sb.length;se++)u.__h.push(u._sb[se]);u._sb=[]}else do u.__d=!1,D&&D(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++B<25);u.state=u.__s,u.getChildContext!=null&&(n=je(je({},n),u.getChildContext())),g||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(b,v)),Vi(e,lr(Q=p!=null&&p.type===ie&&p.key==null?p.props.children:p)?Q:[Q],t,r,n,i,a,o,s,l,f),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),E&&(u.__E=u.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=hd(r.__e,t,r,n,i,a,o,l,f);(p=I.diffed)&&p(t)}catch(W){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),I.__e(W,t,r)}}function Ui(e,t,r){for(var n=0;n<r.length;n++)Xr(r[n],r[++n],r[++n]);I.__c&&I.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){I.__e(a,i.__v)}})}function hd(e,t,r,n,i,a,o,s,l){var f,p,u,g=r.props,b=t.props,v=t.type,_=0;if(v==="svg"&&(i=!0),a!=null){for(;_<a.length;_++)if((f=a[_])&&"setAttribute"in f==!!v&&(v?f.localName===v:f.nodeType===3)){e=f,a[_]=null;break}}if(e==null){if(v===null)return document.createTextNode(b);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,b.is&&b),a=null,s=!1}if(v===null)g===b||s&&e.data===b||(e.data=b);else{if(a=a&&Ft.call(e.childNodes),p=(g=r.props||wt).dangerouslySetInnerHTML,u=b.dangerouslySetInnerHTML,!s){if(a!=null)for(g={},_=0;_<e.attributes.length;_++)g[e.attributes[_].name]=e.attributes[_].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(pd(e,b,g,i,s),u)t.__k=[];else if(Vi(e,lr(_=t.props.children)?_:[_],t,r,n,i&&v!=="foreignObject",a,o,a?a[0]:r.__k&&cr(r,0),s,l),a!=null)for(_=a.length;_--;)a[_]!=null&&Mi(a[_]);s||("value"in b&&(_=b.value)!==void 0&&(_!==e.value||v==="progress"&&!_||v==="option"&&_!==g.value)&&dr(e,"value",_,g.value,!1),"checked"in b&&(_=b.checked)!==void 0&&_!==e.checked&&dr(e,"checked",_,g.checked,!1))}return e}function Xr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){I.__e(n,r)}}function Hi(e,t,r){var n,i;if(I.unmount&&I.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Xr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){I.__e(a,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Hi(n[i],t,r||typeof e.type!="function");r||e.__e==null||Mi(e.__e),e.__=e.__e=e.__d=void 0}function gd(e,t,r){return this.constructor(e,r)}function nt(e,t,r){var n,i,a,o;I.__&&I.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Jr(t,e=(!n&&r||t).__k=we(ie,null,[e]),i||wt,wt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?Ft.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),Ui(a,e,o)}function qi(e,t){nt(e,t,qi)}function vd(e,t,r){var n,i,a,o,s=je({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?n=t[a]:a=="ref"?i=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Ft.call(arguments,2):r),Mt(e.type,s,n||e.key,i||e.ref,null)}function Ki(e,t){var r={__c:t="__cC"+Oi++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Yr(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Ft=Fi.slice,I={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},Ti=0,Ai=function(e){return e!=null&&e.constructor===void 0},$e.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=je({},this.state),typeof e=="function"&&(e=e(je({},r),this.props)),e&&je(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Yr(this))},$e.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Yr(this))},$e.prototype.render=ie,rt=[],Di=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wr=function(e,t){return e.__v.__b-t.__v.__b},ur.__r=0,Oi=0;function Gi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Gi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ke(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Gi(e))&&(n&&(n+=" "),n+=t);return n}const Wi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yi=Ke,it=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Yi(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(f=>{const p=r==null?void 0:r[f],u=a==null?void 0:a[f];if(p===null)return null;const g=Wi(p)||Wi(u);return i[f][g]}),s=r&&Object.entries(r).reduce((f,p)=>{let[u,g]=p;return g===void 0||(f[u]=g),f},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((f,p)=>{let{class:u,className:g,...b}=p;return Object.entries(b).every(v=>{let[_,E]=v;return Array.isArray(E)?E.includes({...a,...s}[_]):{...a,...s}[_]===E})?[...f,u,g]:f},[]);return Yi(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var Ge,H,Zr,Ji,mt=0,Xi=[],fr=[],Zi=I.__b,Qi=I.__r,ea=I.diffed,ta=I.__c,ra=I.unmount;function yt(e,t){I.__h&&I.__h(H,e,mt||t),mt=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:fr}),r.__[e]}function Ce(e){return mt=1,na(oa,e)}function na(e,t,r){var n=yt(Ge++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):oa(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],f=n.t(l,s);l!==f&&(n.__N=[f,n.__[1]],n.__c.setState({}))}],n.__c=H,!H.u)){var i=function(s,l,f){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(g){return g.__c});if(p.every(function(g){return!g.__N}))return!a||a.call(this,s,l,f);var u=!1;return p.forEach(function(g){if(g.__N){var b=g.__[0];g.__=g.__N,g.__N=void 0,b!==g.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!a||a.call(this,s,l,f))};H.u=!0;var a=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(s,l,f){if(this.__e){var p=a;a=void 0,i(s,l,f),a=p}o&&o.call(this,s,l,f)},H.shouldComponentUpdate=i}return n.__N||n.__}function Ee(e,t){var r=yt(Ge++,3);!I.__s&&en(r.__H,t)&&(r.__=e,r.i=t,H.__H.__h.push(r))}function me(e,t){var r=yt(Ge++,4);!I.__s&&en(r.__H,t)&&(r.__=e,r.i=t,H.__h.push(r))}function ye(e){return mt=5,ze(function(){return{current:e}},[])}function bd(e,t,r){mt=6,me(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function ze(e,t){var r=yt(Ge++,7);return en(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function wd(e,t){return mt=8,ze(function(){return e},t)}function ia(e){var t=H.context[e.__c],r=yt(Ge++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(H)),t.props.value):e.__}function md(e,t){I.useDebugValue&&I.useDebugValue(t?t(e):e)}function yd(){var e=yt(Ge++,11);if(!e.__){for(var t=H.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function _d(){for(var e;e=Xi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pr),e.__H.__h.forEach(Qr),e.__H.__h=[]}catch(t){e.__H.__h=[],I.__e(t,e.__v)}}I.__b=function(e){H=null,Zi&&Zi(e)},I.__r=function(e){Qi&&Qi(e),Ge=0;var t=(H=e.__c).__H;t&&(Zr===H?(t.__h=[],H.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=fr,r.__N=r.i=void 0})):(t.__h.forEach(pr),t.__h.forEach(Qr),t.__h=[],Ge=0)),Zr=H},I.diffed=function(e){ea&&ea(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xi.push(t)!==1&&Ji===I.requestAnimationFrame||((Ji=I.requestAnimationFrame)||xd)(_d)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==fr&&(r.__=r.__V),r.i=void 0,r.__V=fr})),Zr=H=null},I.__c=function(e,t){t.some(function(r){try{r.__h.forEach(pr),r.__h=r.__h.filter(function(n){return!n.__||Qr(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],I.__e(n,r.__v)}}),ta&&ta(e,t)},I.unmount=function(e){ra&&ra(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{pr(n)}catch(i){t=i}}),r.__H=void 0,t&&I.__e(t,r.__v))};var aa=typeof requestAnimationFrame=="function";function xd(e){var t,r=function(){clearTimeout(n),aa&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);aa&&(t=requestAnimationFrame(r))}function pr(e){var t=H,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),H=t}function Qr(e){var t=H;e.__c=e.__(),H=t}function en(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function oa(e,t){return typeof t=="function"?t(e):t}function sa(e,t){for(var r in t)e[r]=t[r];return e}function tn(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function rn(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function nn(e){this.props=e}function kd(e,t){function r(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:tn(this.props,i)}function n(i){return this.shouldComponentUpdate=r,we(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(nn.prototype=new $e).isPureReactComponent=!0,nn.prototype.shouldComponentUpdate=function(e,t){return tn(this.props,e)||tn(this.state,t)};var la=I.__b;I.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),la&&la(e)};var Sd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function an(e){function t(r){var n=sa({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Sd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ca=function(e,t){return e==null?null:Re(Re(e).map(t))},Cd={map:ca,forEach:ca,count:function(e){return e?Re(e).length:0},only:function(e){var t=Re(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Re},$d=I.__e;I.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}$d(e,t,r,n)};var ua=I.unmount;function da(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=sa({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return da(n,t,r)})),e}function fa(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return fa(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function Pt(){this.__u=0,this.t=null,this.__b=null}function pa(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ha(e){var t,r,n;function i(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return we(r,a)}return i.displayName="Lazy",i.__f=!0,i}function Vt(){this.u=null,this.o=null}I.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),ua&&ua(e)},(Pt.prototype=new $e).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=pa(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=fa(f,f.__c.__P,f.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.t.pop();)p.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},Pt.prototype.componentWillUnmount=function(){this.t=[]},Pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=da(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&we(ie,null,e.fallback);return i&&(i.__h=null),[we(ie,null,t.__a?null:e.children),i]};var ga=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Ed(e){return this.getChildContext=function(){return e.context},e.children}function Id(e){var t=this,r=e.i;t.componentWillUnmount=function(){nt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),nt(we(Ed,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Td(e,t){var r=we(Id,{__v:e,i:t});return r.containerInfo=t,r}(Vt.prototype=new $e).__a=function(e){var t=this,r=pa(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),ga(t,e,n)):i()};r?r(a):a()}},Vt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Re(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Vt.prototype.componentDidUpdate=Vt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){ga(e,r,t)})};var va=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ad=/^(?: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]/,Nd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Dd=/[A-Z0-9]/g,Od=typeof document<"u",Fd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Md(e,t,r){return t.__k==null&&(t.textContent=""),nt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Pd(e,t,r){return qi(e,t),typeof r=="function"&&r(),e?e.__c:null}$e.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty($e.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ba=I.event;function Vd(){}function Ld(){return this.cancelBubble}function jd(){return this.defaultPrevented}I.event=function(e){return ba&&(e=ba(e)),e.persist=Vd,e.isPropagationStopped=Ld,e.isDefaultPrevented=jd,e.nativeEvent=e};var on,Rd={enumerable:!1,configurable:!0,get:function(){return this.class}},wa=I.vnode;I.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Od&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Fd(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Nd.test(a)?a=s:n.indexOf("-")===-1&&Ad.test(a)?a=a.replace(Dd,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&i[a=s]&&(a="oninputCapture"),i[a]=o}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Re(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Re(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",Rd)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=va,wa&&wa(e)};var ma=I.__r;I.__r=function(e){ma&&ma(e),on=e.__c};var ya=I.diffed;I.diffed=function(e){ya&&ya(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),on=null};var zd={ReactCurrentDispatcher:{current:{readContext:function(e){return on.__n[e.__c].props.value}}}};function Bd(e){return we.bind(null,e)}function _a(e){return!!e&&e.$$typeof===va}function Ud(e){return _a(e)?vd.apply(null,arguments):e}function Hd(e){return!!e.__k&&(nt(null,e),!0)}function qd(e){return e&&(e.base||e.nodeType===1&&e)||null}var Kd=function(e,t){return e(t)},Gd=function(e,t){return e(t)},Wd=ie;function xa(e){e()}function Yd(e){return e}function Jd(){return[!1,xa]}var Xd=me;function Zd(e,t){var r=t(),n=Ce({h:{__:r,v:t}}),i=n[0].h,a=n[1];return me(function(){i.__=r,i.v=t,rn(i.__,t())||a({h:i})},[e,r,t]),Ee(function(){return rn(i.__,i.v())||a({h:i}),e(function(){rn(i.__,i.v())||a({h:i})})},[e]),r}var de={useState:Ce,useId:yd,useReducer:na,useEffect:Ee,useLayoutEffect:me,useInsertionEffect:Xd,useTransition:Jd,useDeferredValue:Yd,useSyncExternalStore:Zd,startTransition:xa,useRef:ye,useImperativeHandle:bd,useMemo:ze,useCallback:wd,useContext:ia,useDebugValue:md,version:"17.0.2",Children:Cd,render:Md,hydrate:Pd,unmountComponentAtNode:Hd,createPortal:Td,createElement:we,createContext:Ki,createFactory:Bd,cloneElement:Ud,createRef:dd,Fragment:ie,isValidElement:_a,findDOMNode:qd,Component:$e,PureComponent:nn,memo:kd,forwardRef:an,flushSync:Gd,unstable_batchedUpdates:Kd,StrictMode:Wd,Suspense:Pt,SuspenseList:Vt,lazy:ha,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:zd};const fe=Symbol.for("@ts-pattern/matcher"),ka=Symbol.for("@ts-pattern/isVariadic"),hr="@ts-pattern/anonymous-select-key",sn=e=>!!(e&&typeof e=="object"),gr=e=>e&&!!e[fe],Y=(e,t,r)=>{if(gr(e)){const n=e[fe](),{matched:i,selections:a}=n.match(t);return i&&a&&Object.keys(a).forEach(o=>r(o,a[o])),i}if(sn(e)){if(!sn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],a=[];for(const o of e.keys()){const s=e[o];gr(s)&&s[ka]?a.push(s):a.length?i.push(s):n.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const o=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((f,p)=>Y(f,o[p],r))&&i.every((f,p)=>Y(f,s[p],r))&&(a.length===0||Y(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>Y(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const i=e[n];return(n in t||gr(a=i)&&a[fe]().matcherType==="optional")&&Y(i,t[n],r);var a})}return Object.is(t,e)},pe=e=>{var t,r,n;return sn(e)?gr(e)?(t=(r=(n=e[fe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Lt(e,pe):Lt(Object.values(e),pe):[]},Lt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Qd(...e){if(e.length===1){const[t]=e;return r=>Y(t,r,()=>{})}if(e.length===2){const[t,r]=e;return Y(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ee(e){return Object.assign(e,{optional:()=>cn(e),and:t=>q(e,t),or:t=>Sa(e,t),select:t=>t===void 0?jt(e):jt(t,e)})}function ln(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[ka]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=n[r++])!=null?i:n.at(-1)}}}}))(e),{optional:()=>ln(cn(e)),select:t=>ln(t===void 0?jt(e):jt(t,e))})}function cn(e){return ee({[fe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return t===void 0?(pe(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:Y(e,t,n),selections:r}},getSelectionKeys:()=>pe(e),matcherType:"optional"})})}const ef=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},tf=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},rf=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function q(...e){return ee({[fe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return{matched:e.every(i=>Y(i,t,n)),selections:r}},getSelectionKeys:()=>Lt(e,pe),matcherType:"and"})})}function Sa(...e){return ee({[fe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return Lt(e,pe).forEach(i=>n(i,void 0)),{matched:e.some(i=>Y(i,t,n)),selections:r}},getSelectionKeys:()=>Lt(e,pe),matcherType:"or"})})}function M(e){return{[fe]:()=>({match:t=>({matched:!!e(t)})})}}function jt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ee({[fe]:()=>({match:n=>{let i={[t??hr]:n};return{matched:r===void 0||Y(r,n,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??hr].concat(r===void 0?[]:pe(r))})})}function Ca(e){return!0}function De(e){return typeof e=="number"}function We(e){return typeof e=="string"}function Ye(e){return typeof e=="bigint"}const $a=ee(M(Ca)),nf=ee(M(Ca)),af=$a,Je=e=>Object.assign(ee(e),{startsWith:t=>{return Je(q(e,(r=t,M(n=>We(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Je(q(e,(r=t,M(n=>We(n)&&n.endsWith(r)))));var r},minLength:t=>Je(q(e,(r=>M(n=>We(n)&&n.length>=r))(t))),length:t=>Je(q(e,(r=>M(n=>We(n)&&n.length===r))(t))),maxLength:t=>Je(q(e,(r=>M(n=>We(n)&&n.length<=r))(t))),includes:t=>{return Je(q(e,(r=t,M(n=>We(n)&&n.includes(r)))));var r},regex:t=>{return Je(q(e,(r=t,M(n=>We(n)&&!!n.match(r)))));var r}}),Ea=Je(M(We)),Oe=e=>Object.assign(ee(e),{between:(t,r)=>Oe(q(e,((n,i)=>M(a=>De(a)&&n<=a&&i>=a))(t,r))),lt:t=>Oe(q(e,(r=>M(n=>De(n)&&n<r))(t))),gt:t=>Oe(q(e,(r=>M(n=>De(n)&&n>r))(t))),lte:t=>Oe(q(e,(r=>M(n=>De(n)&&n<=r))(t))),gte:t=>Oe(q(e,(r=>M(n=>De(n)&&n>=r))(t))),int:()=>Oe(q(e,M(t=>De(t)&&Number.isInteger(t)))),finite:()=>Oe(q(e,M(t=>De(t)&&Number.isFinite(t)))),positive:()=>Oe(q(e,M(t=>De(t)&&t>0))),negative:()=>Oe(q(e,M(t=>De(t)&&t<0)))}),of=Oe(M(De)),Xe=e=>Object.assign(ee(e),{between:(t,r)=>Xe(q(e,((n,i)=>M(a=>Ye(a)&&n<=a&&i>=a))(t,r))),lt:t=>Xe(q(e,(r=>M(n=>Ye(n)&&n<r))(t))),gt:t=>Xe(q(e,(r=>M(n=>Ye(n)&&n>r))(t))),lte:t=>Xe(q(e,(r=>M(n=>Ye(n)&&n<=r))(t))),gte:t=>Xe(q(e,(r=>M(n=>Ye(n)&&n>=r))(t))),positive:()=>Xe(q(e,M(t=>Ye(t)&&t>0))),negative:()=>Xe(q(e,M(t=>Ye(t)&&t<0)))}),sf=Xe(M(Ye)),lf=ee(M(function(e){return typeof e=="boolean"})),cf=ee(M(function(e){return typeof e=="symbol"})),uf=ee(M(function(e){return e==null})),df=ee(M(function(e){return e!=null}));var P={__proto__:null,matcher:fe,optional:cn,array:function(...e){return ln({[fe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return pe(r).forEach(a=>{n[a]=[]}),{matched:!0,selections:n};const i=(a,o)=>{n[a]=(n[a]||[]).concat([o])};return{matched:t.every(a=>Y(r,a,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:pe(e[0])})})},set:function(...e){return ee({[fe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])},i=e[0];return{matched:ef(t,a=>Y(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:pe(e[0])})})},map:function(...e){return ee({[fe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:tf(t,(s,l)=>{const f=Y(a,l,n),p=Y(o,s,n);return f&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...pe(e[0]),...pe(e[1])]})})},record:function(...e){return ee({[fe]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const i=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[a,o]=e.length===1?[Ea,e[0]]:e;return{matched:rf(t,(s,l)=>{const f=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=f!==null&&Y(a,f,i),u=Y(a,s,i),g=Y(o,l,i);return(u||p)&&g}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...pe(e[0]),...pe(e[1])]})})},intersection:q,union:Sa,not:function(e){return ee({[fe]:()=>({match:t=>({matched:!Y(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:M,select:jt,any:$a,unknown:nf,_:af,string:Ea,number:of,bigint:sf,boolean:lf,symbol:cf,nullish:uf,nonNullable:df,instanceOf:function(e){return ee(M(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ee(M(Qd(e)))}};class ff extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}}const un={matched:!1,value:void 0};function at(e){return new vr(e,un)}class vr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(f,p)=>{a=!0,o[f]=p},l=!n.some(f=>Y(f,this.input,s))||i&&!i(this.input)?un:{matched:!0,value:r(a?hr in o?o[hr]:o:this.input,this.input)};return new vr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new vr(this.input,n?{matched:!0,value:r(this.input,this.input)}:un)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=pf){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function pf(e){throw new ff(e)}var hf=["other","few","many","two","one","zero"],Ia=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function i(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,f)=>{var p;return((p=o==null?void 0:o[f])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=n.select(o.count);if(!(l in s)){const f=hf.find(p=>p in s);if(!f)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=f}return s[l].replace(/{{(\w+)}}/g,(f,p)=>{var u;return((u=o==null?void 0:o[p])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return i},gf=0;function c(e,t,r,n,i,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var f={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--gf,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return I.vnode&&I.vnode(f),f}var Ta=Ki(null),vf=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const i=ze(()=>Ia({locale:n,terms:e,overrides:t}),[t,n]);return c(Ta.Provider,{value:{t:i,locale:n},children:r})},useTranslation:()=>{const t=ia(Ta);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>Ia({terms:e,overrides:t,locale:r})});const{TranslationProvider:bf,useTranslation:le,createTFunction:wf}=vf({error_heading:"Something unexpected happened",undo:"Undo",send:"Send",skip:"Skip",skipped:"Skipped",submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",maximize:"Maximise",minimize:"Minimise",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_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_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},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_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"}}),Gg="";function Fe(e,t){if(!e)throw new Error(t)}var mf=Symbol.for("preact-signals");function dn(){if(_t>1)_t--;else{for(var e,t=!1;Rt!==void 0;){var r=Rt;for(Rt=void 0,fn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Na(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(fn=0,_t--,t)throw e}}var R=void 0,Rt=void 0,_t=0,fn=0,br=0;function Aa(e){if(R!==void 0){var t=e.n;if(t===void 0||t.t!==R)return t={i:0,S:e,p:R.s,n:void 0,t:R,e:void 0,x:void 0,r:t},R.s!==void 0&&(R.s.n=t),R.s=t,e.n=t,32&R.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=R.s,t.n=void 0,R.s.n=t,R.s=t),t}}function ae(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ae.prototype.brand=mf,ae.prototype.h=function(){return!0},ae.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)},ae.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ae.prototype.subscribe=function(e){var t=this;return hn(function(){var r=t.value,n=R;R=void 0;try{e(r)}finally{R=n}})},ae.prototype.valueOf=function(){return this.value},ae.prototype.toString=function(){return this.value+""},ae.prototype.toJSON=function(){return this.value},ae.prototype.peek=function(){var e=R;R=void 0;try{return this.value}finally{R=e}},Object.defineProperty(ae.prototype,"value",{get:function(){var e=Aa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(fn>100)throw new Error("Cycle detected");this.v=e,this.i++,br++,_t++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{dn()}}}});function Ze(e){return new ae(e)}function Na(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 Da(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Oa(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function xt(e){ae.call(this,void 0),this.x=e,this.s=void 0,this.g=br-1,this.f=4}(xt.prototype=new ae).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===br))return!0;if(this.g=br,this.f|=1,this.i>0&&!Na(this))return this.f&=-2,!0;var e=R;try{Da(this),R=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return R=e,Oa(this),this.f&=-2,!0},xt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ae.prototype.S.call(this,e)},xt.prototype.U=function(e){if(this.t!==void 0&&(ae.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},xt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(xt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Aa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function yf(e){return new xt(e)}function Fa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){_t++;var r=R;R=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,pn(e),n}finally{R=r,dn()}}}function pn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Fa(e)}function _f(e){if(R!==this)throw new Error("Out-of-order effect");Oa(this),R=e,this.f&=-2,8&this.f&&pn(this),dn()}function zt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}zt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},zt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Fa(this),Da(this),_t++;var e=R;return R=this,_f.bind(this,e)},zt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Rt,Rt=this)},zt.prototype.d=function(){this.f|=8,1&this.f||pn(this)};function hn(e){var t=new zt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var gn;function kt(e,t){I[e]=t.bind(null,I[e]||function(){})}function wr(e){gn&&gn(),gn=e&&e.S()}function Ma(e){var t=this,r=e.data,n=kf(r);n.value=r;var i=ze(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Ai(i.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},yf(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}Ma.displayName="_st",Object.defineProperties(ae.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ma},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),kt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var a=n[i];a instanceof ae&&(r||(t.__np=r={}),r[i]=a,n[i]=a.peek())}}e(t)}),kt("__r",function(e,t){wr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var a;return hn(function(){a=this}),a.c=function(){n.__$f|=1,n.setState({})},a}())),wr(r),e(t)}),kt("__e",function(e,t,r,n){wr(),e(t,r,n)}),kt("diffed",function(e,t){wr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in n)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in n){var f=a[l],p=n[l];f===void 0?(f=xf(r,l,p,i),a[l]=f):f.o(p,i)}}}e(t)});function xf(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,a=Ze(r);return{o:function(o,s){a.value=o,n=s},d:hn(function(){var o=a.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}kt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var a=n[i];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),kt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),$e.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function kf(e){return ze(function(){return Ze(e)},[])}const vn=(e,t)=>t.some(r=>e instanceof r);let Pa,Va;function Sf(){return Pa||(Pa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Cf(){return Va||(Va=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bn=new WeakMap,wn=new WeakMap,mr=new WeakMap;function $f(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(ot(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return mr.set(t,e),t}function Ef(e){if(bn.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});bn.set(e,t)}let mn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return bn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ot(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function La(e){mn=e(mn)}function If(e){return Cf().includes(e)?function(...t){return e.apply(yn(this),t),ot(this.request)}:function(...t){return ot(e.apply(yn(this),t))}}function Tf(e){return typeof e=="function"?If(e):(e instanceof IDBTransaction&&Ef(e),vn(e,Sf())?new Proxy(e,mn):e)}function ot(e){if(e instanceof IDBRequest)return $f(e);if(wn.has(e))return wn.get(e);const t=Tf(e);return t!==e&&(wn.set(e,t),mr.set(t,e)),t}const yn=e=>mr.get(e);function Af(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=ot(o);return n&&o.addEventListener("upgradeneeded",l=>{n(ot(o.result),l.oldVersion,l.newVersion,ot(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),s}const Nf=["get","getKey","getAll","getAllKeys","count"],Df=["put","add","delete","clear"],_n=new Map;function ja(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(_n.get(t))return _n.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=Df.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||Nf.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let f=l.store;return n&&(f=f.index(s.shift())),(await Promise.all([f[r](...s),i&&l.done]))[0]};return _n.set(t,a),a}La(e=>({...e,get:(t,r,n)=>ja(t,r)||e.get(t,r,n),has:(t,r)=>!!ja(t,r)||e.has(t,r)}));const Of=["continue","continuePrimaryKey","advance"],Ra={},xn=new WeakMap,za=new WeakMap,Ff={get(e,t){if(!Of.includes(t))return e[t];let r=Ra[t];return r||(r=Ra[t]=function(...n){xn.set(this,za.get(this)[t](...n))}),r}};async function*Mf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Ff);for(za.set(r,t),mr.set(r,yn(t));t;)yield r,t=await(xn.get(r)||t.continue()),xn.delete(r)}function Ba(e,t){return t===Symbol.asyncIterator&&vn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&vn(e,[IDBIndex,IDBObjectStore])}La(e=>({...e,get(t,r,n){return Ba(t,r)?Mf:e.get(t,r,n)},has(t,r){return Ba(t,r)||e.has(t,r)}}));const yr=typeof indexedDB>"u"?void 0:Af("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let _r,kn,Bt;const Ua=()=>{if(!_r)return Bt;const e=_r;_r=void 0;const t=Ga(e),r=yr==null?void 0:yr.then(n=>n.put("state",e.data,t)).finally(()=>{Bt===r&&(Bt=void 0)});return Bt=r,Bt},st={getStateData:async(e,t,r)=>{var i;const n=Ga({...e,flowKeys:t,context:r});return(i=await yr)==null?void 0:i.get("state",n)},setStateData:e=>{_r=e,clearTimeout(kn),kn=setTimeout(()=>void Ua(),1e3)},flushStateData:()=>(clearTimeout(kn),Ua()??Promise.resolve())},Ut=e=>at(e).with(P.number.lte(1e3),()=>`${Math.round(e)}KB`).with(P.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Ha=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Pf=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),St=e=>t=>t?t.type===e:!1;class lt extends Error{constructor(){super("Aborted")}}const qa=e=>typeof e=="string",Vf=e=>{let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return t>>>0},Sn=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(Sn):Object.keys(e).sort().reduce((t,r)=>(t[r]=Sn(e[r]),t),{}),Lf=e=>{const t=JSON.stringify(Sn(e));return Vf(t).toString(36)},jf=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ka=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:jf()}),Rf=e=>at(e).with({nativeEvent:{submitter:P.select(P.union(P.instanceOf(HTMLButtonElement),P.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),xr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(f=>f.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(f=>f.id===a),s=t.type.includes("question")?1:0;if(o){const f=s+Math.max(xr(e,i,r,n+s).remainingSteps,xr(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:f}),{stepsMade:n,remainingSteps:f}}const l=s+xr(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},zf=e=>{const t={},r=e.find(n=>n.isHead);return r&&xr(e,r,(n,i)=>{t[n]=i}),t},Ga=e=>[...e.flowKeys,e.id,e.version,Lf(e.context)].join("/"),Qe=Ze({state:"idle"}),Ht=e=>{const{state:t,flow:r}=Qe.value;if(t!=="loaded")return;Fe(r,"No flow to update");const n=e(r.data);r.data=n,Qe.value={state:t,flow:r},st.setStateData(r)},N={current$:Qe,viewState$:Ze("closed"),inputHeight$:Ze(53),prepareFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:i,job:a,locationOrigin:o})=>(await st.flushStateData().catch(()=>{}),{data:await st.getStateData(e,r,t)??Ka(),startedAt:new Date,nodeIdToProgress:zf(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:i,job:a,locationOrigin:o}),commitFlow:e=>{Qe.value={state:"loaded",flow:e},st.setStateData(e)},cancelCurrentFlow:()=>{Qe.value={state:"idle"},N.viewState$.value="closed"},markAsFinished:()=>Ht(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Ht(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Qe.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ka();Qe.value={state:e,flow:{...t,data:r,startedAt:new Date}},st.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Ht(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Qe.value;Fe(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,st.setStateData(r)},setSubmission:(e,t)=>Ht(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Ht(t=>({...t,currentInput:e??null}))},Bf=({message:e})=>{const{t}=le();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-9 text-sm",children:e})]})]})},Wa=e=>c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:"Loading"}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),Ya=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Wa,{class:"text-neutral-6 h-8 w-8"})}),Uf=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Hf=it("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),kr=({class:e,children:t,variant:r,...n})=>c("div",{class:"flex flex-1 items-center justify-end px-1",children:c("button",{class:Ke(Hf({variant:r}),e),...n,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})})}),qf=()=>{if(N.current$.value.state!=="loaded")return null;const e=N.current$.value.flow.nodeIdToProgress,t=N.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Uf(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Kf=({children:e,params:t})=>{const{t:r}=le(),n=N.viewState$;return c(ie,{children:c("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{onClick:()=>{n.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Cn,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:Ke({hidden:N.current$.value.state!=="loaded"||n.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,N.current$.value.state==="loaded"&&c(kr,{"aria-label":"Restart",onClick:()=>{N.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(kr,{class:"view-switch",onTouchStart:Cn,"aria-label":r("minimize"),onClick:()=>n.value="minimised",children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),c(qf,{})]})})};function Cn(){}const Gf=ha(()=>Promise.resolve().then(()=>Fg).then(e=>e.ChatbotBody)),Ja=it("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),Xa=it("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Wf=({open:e,...t})=>{const r=ye(null);return me(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),c("dialog",{ref:r,...t})},Yf=({logger:e,apiClient:t,analytics:r,talentBankClient:n,params:i})=>{const{state:a,flow:o,error:s}=N.current$.value,l=N.viewState$.value,f=a!=="idle"&&l==="maximised",p=ye(null);return c(bf,{terms:i.terms,locale:void 0,children:[c(Wf,{open:f,onClose:()=>N.viewState$.value="minimised",children:c("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Ja({view:"maximised"}),children:c("div",{class:Xa({view:"maximised"}),children:[c(Kf,{params:i,children:o==null?void 0:o.title}),at({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Ya,{},"loading")).with({state:"loaded"},()=>c(Pt,{fallback:c(Ya,{},"loading"),children:c(Gf,{analytics:r,apiClient:t,logger:e,talentBankClient:n})})).with({state:"error"},()=>c(Bf,{message:s})).exhaustive()]})})}),l==="minimised"?c(Jf,{flow:o}):null]})},Jf=({flow:e})=>{const{t}=le();return c("div",{class:Ja({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Xa({view:"minimised"}),children:[c("button",{onClick:()=>{N.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Cn,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(kr,{"aria-label":t("close_application"),onClick:N.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Xf=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overflow-y-scroll{overflow-y:scroll}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-b-3xl{border-bottom-right-radius:24px;border-bottom-left-radius:24px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .duration-700{transition-duration:.7s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[height\\]{will-change:height}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}
2
- `,Za="inploi-chatbot",$n=`[data-widget='${Za}']`,Zf=()=>({getChatbotElement:()=>document.querySelector($n),getOrCreateChatbotElement:()=>{const e=document.querySelector($n);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Za,t}}),Qf=25,En=Ze({instant:()=>{},smooth:()=>{}}),ep=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new lt);const i=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(i),n(new lt)},{once:!0})}),oe={onSubmitSuccessFn$:Ze(()=>{}),isBotTyping$:Ze(!1),scrollToEnd:{instant:()=>En.value.instant(),smooth:()=>En.value.smooth()}},tp=()=>{const e=ye(null);me(()=>{En.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=ze(()=>({addToSubmissions:(n,i)=>N.setSubmission(n,i),send:async({message:n,signal:i,groupId:a})=>{if(await at(n).with({author:"bot",type:"text"},async o=>{if(i!=null&&i.aborted)throw new lt;oe.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Qf;try{await ep(s,i)}finally{oe.isBotTyping$.value=!1}}).otherwise(async()=>{}),i!=null&&i.aborted)throw new lt;N.addMessage(n,a)},input:({input:n,signal:i})=>{if(i!=null&&i.aborted)throw new lt;return N.setInput(n),new Promise(a=>{const o=s=>{if(i!=null&&i.aborted)throw new lt;N.setInput(void 0),n.key&&N.setSubmission(n.key,s),a(s)};oe.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}};var Be;function Sr(e){return{lang:(e==null?void 0:e.lang)??(Be==null?void 0:Be.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Be==null?void 0:Be.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Be==null?void 0:Be.abortPipeEarly)}}var In;function rp(e){return In==null?void 0:In.get(e)}var Tn;function np(e){return Tn==null?void 0:Tn.get(e)}var An;function ip(e,t){var r;return(r=An==null?void 0:An.get(e))==null?void 0:r.get(t)}function ct(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function te(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??ct(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},f=e.kind==="schema",p=(i==null?void 0:i.message)??e.message??ip(e.reference,l.lang)??(f?np(l.lang):null)??n.message??rp(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),f&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ve(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Sr())}}}function ap(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Qa(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function op(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var sp=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},lp=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function eo(e,t){return{kind:"validation",type:"check",reference:eo,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&te(this,"input",r,n),r}}}function to(e){return{kind:"validation",type:"email",reference:to,expects:null,async:!1,requirement:lp,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&te(this,"email",t,r),t}}}function qt(e,t){return{kind:"validation",type:"max_length",reference:qt,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&te(this,"length",r,n,{received:`${r.value.length}`}),r}}}function ro(e,t){return{kind:"validation",type:"max_value",reference:ro,async:!1,expects:`<=${e instanceof Date?e.toJSON():ct(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&te(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():ct(r.value)}),r}}}function Ct(e,t){return{kind:"validation",type:"min_length",reference:Ct,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&te(this,"length",r,n,{received:`${r.value.length}`}),r}}}function no(e,t){return{kind:"validation",type:"min_value",reference:no,async:!1,expects:`>=${e instanceof Date?e.toJSON():ct(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&te(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():ct(r.value)}),r}}}function Nn(e,t){return{kind:"validation",type:"regex",reference:Nn,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&te(this,"format",r,n),r}}}function Cr(e){return{kind:"transformation",type:"transform",reference:Cr,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function io(e){return{kind:"validation",type:"url",reference:io,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&te(this,"URL",t,r),t}}}function cp(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Dn(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function ao(){return{kind:"schema",type:"any",reference:ao,expects:"any",async:!1,get"~standard"(){return ve(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 ve(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const f={type:"array",origin:"value",input:i,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(f):p.path=[f],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else te(this,"type",r,n);return r}}}function $r(e){return{kind:"schema",type:"boolean",reference:$r,expects:"boolean",async:!1,message:e,get"~standard"(){return ve(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:te(this,"type",t,r),t}}}function Fn(e,t){return{kind:"schema",type:"literal",reference:Fn,expects:ct(e),async:!1,literal:e,message:t,get"~standard"(){return ve(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:te(this,"type",r,n),r}}}function oo(e,t){return{kind:"schema",type:"nullable",reference:oo,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ve(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=Dn(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Kt(e){return{kind:"schema",type:"number",reference:Kt,expects:"number",async:!1,message:e,get"~standard"(){return ve(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:te(this,"type",t,r),t}}}function ce(e,t){return{kind:"schema",type:"object",reference:ce,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ve(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:Dn(s),f=s["~run"]({value:l},n);if(f.issues){const p={type:"object",origin:"value",input:i,key:o,value:l};for(const u of f.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=f.issues),n.abortEarly){r.typed=!1;break}}f.typed||(r.typed=!1),r.value[o]=f.value}else if(s.fallback!==void 0)r.value[o]=cp(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(te(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else te(this,"type",r,n);return r}}}function Ie(e,t){return{kind:"schema",type:"optional",reference:Ie,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ve(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Dn(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function so(e,t){return{kind:"schema",type:"picklist",reference:so,expects:Qa(e.map(ct),"|"),async:!1,options:e,message:t,get"~standard"(){return ve(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:te(this,"type",r,n),r}}}function Mn(e,t,r){return{kind:"schema",type:"record",reference:Mn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ve(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(ap(a,l)){const f=a[l],p=this.key["~run"]({value:l},i);if(p.issues){const g={type:"object",origin:"key",input:a,key:l,value:f};for(const b of p.issues)b.path=[g],(o=n.issues)==null||o.push(b);if(n.issues||(n.issues=p.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:f},i);if(u.issues){const g={type:"object",origin:"value",input:a,key:l,value:f};for(const b of u.issues)b.path?b.path.unshift(g):b.path=[g],(s=n.issues)==null||s.push(b);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!p.typed||!u.typed)&&(n.typed=!1),p.typed&&(n.value[p.value]=u.value)}}else te(this,"type",n,i);return n}}}function J(e){return{kind:"schema",type:"string",reference:J,expects:"string",async:!1,message:e,get"~standard"(){return ve(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:te(this,"type",t,r),t}}}function lo(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function Pn(e,t){return{kind:"schema",type:"union",reference:Pn,expects:Qa(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return ve(this)},"~run"(r,n){let i,a,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];te(this,"type",r,n,{issues:lo(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];te(this,"type",r,n,{issues:lo(o)})}return r}}}function up(e,t,r){const n=e["~run"]({value:t},Sr(r));if(n.issues)throw new sp(n.issues);return n.value}function dp(e,t){const r={};for(const n in e.entries)r[n]=!t||t.includes(n)?Ie(e.entries[n]):e.entries[n];return{...e,entries:r,get"~standard"(){return ve(this)}}}function Ue(...e){return{...e[0],pipe:e,get"~standard"(){return ve(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function fp(e,t,r){const n=e["~run"]({value:t},Sr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}async function pp(e,t,r){const n=await e["~run"]({value:t},Sr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const co=Ue(Pn([J(),Kt()]),Cr(String)),uo=ce({id:co,version:Kt(),build:Kt(),nodes:On(ao()),context_schema:Ie(oo(Mn(J(),ce({required:$r(),type:Pn([Fn("string"),Fn("number")])}))))}),hp=ce({flow:uo}),gp=ce({company:ce({name:J()}),flow:uo,job:ce({id:co,title:J()}),user:Ie(ce({city:Ie(J()),country:Ie(J()),isEU:Ie($r()),continent:Ie(J())}))}),vp={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Fs(),response:gp}},bp={pathname:"/flow/id/:id",method:"GET",schema:{response:hp}};var wp=["1","2","3","4","5","6","7","8","9","10","11","12"],mp={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]}},yp=(e,t=1,r)=>n=>{const[i,a]=mp[r][n];return"oklch("+i+"% "+a*t+" "+e+")"},Vn=e=>{const t=yp(e.hue,e.chroma,e.mode);return Object.fromEntries(wp.map(r=>[e.prefix+r,e.transform(t(r))]))},Ln=e=>e,_p=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const a=n[i];return[`${String(r)}.${i}`,a]}):[[r,n]]});return Object.fromEntries(t)},Er=e=>!!e&&typeof e=="object"&&!Array.isArray(e),jn=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Er(e)&&Er(r))for(const n in r){const i=r[n];if(Er(i)){e[n]||Object.assign(e,{[n]:{}});const a=e[n];Er(a)&&jn(a,i)}else Object.assign(e,{[n]:r[n]})}return jn(e,...t)},xp=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},kp=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:a}=n,o=g=>a("reference",g.toString()),s=e({theme:i}),l=t({theme:i,core:o,raw:{core:s}}),f=r({theme:i,core:o,semantic:o,raw:{core:s,semantic:l}}),p=_p(jn(s,l,f)),u=([g,b],v)=>{const _=[v,g].filter(Boolean).join(".");return typeof b=="object"?Object.entries(b).flatMap(E=>u(E,_)):[[n.getToken("declaration",_),b]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(g=>u(g))),ref:g=>a("reference",g.toString())}}})})})});const[Rn,zn,fo]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Sp=kp().core(({theme:e})=>({color:{black:Rn,white:zn,lowest:e.mode==="light"?zn:Rn,highest:e.mode==="light"?Rn:zn,...Vn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Ln}),...Vn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Ln}),...Vn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Ln})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(i,a)=>t.core.color[i].replace(")",` / ${a})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:fo,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const i=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":fo,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Cp=xp({prefix:"i-"}),$p=e=>{const t=Sp.from({theme:e,getToken:Cp}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`${$n} {
1
+ (function(){"use strict";var Pe;function Zo(e){return{lang:(e==null?void 0:e.lang)??(Pe==null?void 0:Pe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Pe==null?void 0:Pe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Pe==null?void 0:Pe.abortPipeEarly)}}var Nr;function Xo(e){return Nr==null?void 0:Nr.get(e)}var Fr;function Qo(e){return Fr==null?void 0:Fr.get(e)}var Vr;function es(e,t){var r;return(r=Vr==null?void 0:Vr.get(e))==null?void 0:r.get(t)}function Xi(e){var r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function tr(e,t,r,i,n){let a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??Xi(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??es(e.reference,l.lang)??(d?Qo(l.lang):null)??i.message??Xo(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function It(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Zo())}}}function ts(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Dr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Qi(e,t){return{kind:"schema",type:"literal",reference:Qi,expects:Xi(e),async:!1,literal:e,message:t,get"~standard"(){return It(this)},"~run"(r,i){return r.value===this.literal?r.typed=!0:tr(this,"type",r,i),r}}}function Mr(e,t){return{kind:"schema",type:"nullable",reference:Mr,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return It(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=Dr(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function rr(e,t){return{kind:"schema",type:"object",reference:rr,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return It(this)},"~run"(r,i){var a;let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in n?n[o]:Dr(s),d=s["~run"]({value:l},i);if(d.issues){let p={type:"object",origin:"value",input:n,key:o,value:l};for(let u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=ts(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(tr(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else tr(this,"type",r,i);return r}}}function Lr(e,t){return{kind:"schema",type:"optional",reference:Lr,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return It(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=Dr(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function ir(e){return{kind:"schema",type:"string",reference:ir,expects:"string",async:!1,message:e,get"~standard"(){return It(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:tr(this,"type",t,r),t}}}var At=(e,t)=>{if(t.length===0)return;let r=e;for(let i of t){if(r==null||typeof r!="object")return;r=r[i]}return r},rs=e=>{let t={};for(let r in e){let i=e[r];i&&(t[r]=i.value)}return t},en=({key:e,path:t,submissions:r,context:i})=>{if(e==="$context"){if(!t)return;let n=At(i,t);switch(typeof n){case"string":return{type:"string",value:n};case"number":return{type:"number",value:n};case"boolean":return{type:"boolean",value:n};default:console.warn(`Unexpected type for $context.${t.join(".")}`,n);return}}return r[e]},Tt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,tn=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`;rr({success:Qi(!0),integration_response:rr({data:rr({redirect_url:ir(),message:Lr(Mr(ir())),button_text:Lr(Mr(ir()))})})});var is=({context:e,schema:t,logger:r})=>{if(t)for(let i in t){let n=t[i];if(!n)continue;let a=At(e,i.split("."));if(n.required&&a==null){let o=`Configuration error in context: ${i} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(n.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${i} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${i} is not a string`);break;default:n.type}}};let Oe;function rn(e){return{lang:(e==null?void 0:e.lang)??(Oe==null?void 0:Oe.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Oe==null?void 0:Oe.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Oe==null?void 0:Oe.abortPipeEarly)}}let Pr;function ns(e){return Pr==null?void 0:Pr.get(e)}let Or;function as(e){return Or==null?void 0:Or.get(e)}let jr;function os(e,t){var r;return(r=jr==null?void 0:jr.get(e))==null?void 0:r.get(t)}function nn(e){var r,i;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function je(e,t,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??nn(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??os(e.reference,l.lang)??(d?as(l.lang):null)??i.message??ns(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ke(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},rn())}}}function ss(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ls(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function an(e,t){return{kind:"validation",type:"min_length",reference:an,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&je(this,"length",r,i,{received:`${r.value.length}`}),r}}}function cs(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function nr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function on(e,t){return{kind:"schema",type:"array",reference:on,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){var a;const n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){const d={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else je(this,"type",r,i);return r}}}function Br(e){return{kind:"schema",type:"boolean",reference:Br,expects:"boolean",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:je(this,"type",t,r),t}}}function W(e,t){return{kind:"schema",type:"nullable",reference:W,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=nr(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Nt(e,t){return{kind:"schema",type:"nullish",reference:Nt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=nr(this,r,i)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function ht(e){return{kind:"schema",type:"number",reference:ht,expects:"number",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:je(this,"type",t,r),t}}}function Se(e,t){return{kind:"schema",type:"object",reference:Se,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){var a;const n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:nr(s),d=s["~run"]({value:l},i);if(d.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=cs(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(je(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else je(this,"type",r,i);return r}}}function sn(e,t){return{kind:"schema",type:"optional",reference:sn,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return ke(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=nr(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Ft(e,t){return{kind:"schema",type:"picklist",reference:Ft,expects:ls(e.map(nn),"|"),async:!1,options:e,message:t,get"~standard"(){return ke(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:je(this,"type",r,i),r}}}function Rr(e,t,r){return{kind:"schema",type:"record",reference:Rr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return ke(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const l in a)if(ss(a,l)){const d=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const g={type:"object",origin:"key",input:a,key:l,value:d};for(const v of p.issues)v.path=[g],(o=i.issues)==null||o.push(v);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}const u=this.value["~run"]({value:d},n);if(u.issues){const g={type:"object",origin:"value",input:a,key:l,value:d};for(const v of u.issues)v.path?v.path.unshift(g):v.path=[g],(s=i.issues)==null||s.push(v);if(i.issues||(i.issues=u.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!u.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=u.value)}}else je(this,"type",i,n);return i}}}function V(e){return{kind:"schema",type:"string",reference:V,expects:"string",async:!1,message:e,get"~standard"(){return ke(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:je(this,"type",t,r),t}}}function ln(){return{kind:"schema",type:"unknown",reference:ln,expects:"unknown",async:!1,get"~standard"(){return ke(this)},"~run"(e){return e.typed=!0,e}}}function us(...e){return{...e[0],pipe:e,get"~standard"(){return ke(this)},"~run"(t,r){for(const i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function zr(e,t,r){const i=e["~run"]({value:t},rn(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}const ds=["agent","sdk","form","integration","migration"],fs=["PENDING","SUBMITTED","SCREENING","SHORTLISTED","INTERVIEW","OFFERED","HIRED","REJECTED","WITHDRAWN"],ps=["screening","cv_match","interview","overall"],hs=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],cn=Ft(ds),gs=Ft(fs),bs=Ft(ps),vs=Ft(hs),un=Se({id:V(),email:W(V()),firstName:W(V()),lastName:W(V()),phone:W(V()),source:W(cn),identifiedAt:W(V()),createdAt:V(),updatedAt:V()}),dn=us(V(),an(1)),Ur=Rr(V(),ln()),ws=Se({id:V(),applicationId:V(),status:vs,scheduledAt:W(V()),completedAt:W(V()),meta:W(Ur),createdAt:V(),updatedAt:V()}),ms=Se({score:ht(),reason:V(),confidence:ht()}),fn=Se({id:V(),candidateId:V(),jobId:ht(),status:gs,sessionId:W(ht()),externalApplicationId:W(V()),meta:W(Ur),context:W(Ur),scoredAt:W(V()),shortlistedAt:W(V()),createdAt:V(),updatedAt:V()}),ys=Se({id:V(),applicationId:V(),scoreType:bs,score:W(ht()),reason:W(V()),categories:W(Rr(V(),ms)),scoredBy:W(V()),createdAt:V()});({...fn.entries},{...un.entries});const _s=Se({anonymousId:dn,email:dn,firstName:Nt(V()),lastName:Nt(V()),phone:Nt(V()),source:Nt(cn)}),xs=Se({candidateId:V(),isNew:Br()}),ks=Se({isDuplicate:Br(),existingApplication:sn(Se({id:V(),status:V(),createdAt:V()}))});var Ss=e=>e,Cs={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"};function Es(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function uf(e){return e}var $s=({environment:e,publishableKey:t,logger:r})=>{let i=Cs[e];return{async checkDuplicate(n){try{let a=new URLSearchParams({email:n.email,scope:n.scope});n.scope==="job"&&n.jobId!=null&&a.set("job_id",String(n.jobId));let o=await fetch(`${i}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=zr(ks,await o.json());return s.success?s.output:(r.error("[TalentBankClient] checkDuplicate returned an invalid response"),{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(n){try{if(!n.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:n.email,firstName:n.firstName,lastName:n.lastName,phone:n.phone,anonymousId:n.anonymousId,source:n.source??"sdk"},o=zr(_s,a);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${i}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=zr(xs,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},Vt,I,pn,hn,it,gn,bn,Hr,vn,gt={},wn=[],Is=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ar=Array.isArray;function Be(e,t){for(var r in t)e[r]=t[r];return e}function mn(e){var t=e.parentNode;t&&t.removeChild(e)}function we(e,t,r){var i,n,a,o={};for(a in t)a=="key"?i=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Vt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Dt(e,o,i,n,null)}function Dt(e,t,r,i,n){var a={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++pn};return n==null&&I.vnode!=null&&I.vnode(a),a}function As(){return{current:null}}function ne(e){return e.children}function Ee(e,t){this.props=e,this.context=t}function or(e,t){if(t==null)return e.__?or(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?or(e):null}function yn(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return yn(e)}}function qr(e){(!e.__d&&(e.__d=!0)&&it.push(e)&&!sr.__r++||gn!==I.debounceRendering)&&((gn=I.debounceRendering)||bn)(sr)}function sr(){var e,t,r,i,n,a,o,s,l;for(it.sort(Hr);e=it.shift();)e.__d&&(t=it.length,i=void 0,n=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(i=[],n=[],(a=Be({},o)).__v=o.__v+1,Wr(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,i,s??or(o),o.__h,n),$n(i,o,n),o.__e!=s&&yn(o)),it.length>t&&it.sort(Hr));sr.__r=0}function _n(e,t,r,i,n,a,o,s,l,d,p){var u,g,v,b,_,$,y,m,S,A,F=0,z=i&&i.__k||wn,se=z.length,Q=se,U=t.length;for(r.__k=[],u=0;u<U;u++)(b=r.__k[u]=(b=t[u])==null||typeof b=="boolean"||typeof b=="function"?null:typeof b=="string"||typeof b=="number"||typeof b=="bigint"?Dt(null,b,null,null,b):ar(b)?Dt(ne,{children:b},null,null,null):b.__b>0?Dt(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)!=null&&(b.__=r,b.__b=r.__b+1,(m=Ts(b,z,y=u+F,Q))===-1?v=gt:(v=z[m]||gt,z[m]=void 0,Q--),Wr(e,b,v,n,a,o,s,l,d,p),_=b.__e,(g=b.ref)&&v.ref!=g&&(v.ref&&Kr(v.ref,null,b),p.push(g,b.__c||_,b)),_!=null&&($==null&&($=_),A=!(S=v===gt||v.__v===null)&&m===y,S?m==-1&&F--:m!==y&&(m===y+1?(F++,A=!0):m>y?Q>U-y?(F+=m-y,A=!0):F--:F=m<y&&m==y-1?m-y:0),y=u+F,A=A||m==u&&!S,typeof b.type!="function"||m===y&&v.__k!==b.__k?typeof b.type=="function"||A?b.__d!==void 0?(l=b.__d,b.__d=void 0):l=_.nextSibling:l=kn(e,_,l):l=xn(b,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=$,u=se;u--;)z[u]!=null&&(typeof r.type=="function"&&z[u].__e!=null&&z[u].__e==r.__d&&(r.__d=z[u].__e.nextSibling),In(z[u],z[u]))}function xn(e,t,r){for(var i,n=e.__k,a=0;n&&a<n.length;a++)(i=n[a])&&(i.__=e,t=typeof i.type=="function"?xn(i,t,r):kn(r,i.__e,t));return t}function Re(e,t){return t=t||[],e==null||typeof e=="boolean"||(ar(e)?e.some(function(r){Re(r,t)}):t.push(e)),t}function kn(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function Ts(e,t,r,i){var n=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&n==l.key&&a===l.type)return r;if(i>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&n==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&n==l.key&&a===l.type)return s;s++}}return-1}function Ns(e,t,r,i,n){var a;for(a in r)a==="children"||a==="key"||a in t||lr(e,a,null,r[a],i);for(a in t)n&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||lr(e,a,t[a],r[a],i)}function Sn(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Is.test(t)?r:r+"px"}function lr(e,t,r,i,n){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||Sn(e.style,t,"");if(r)for(t in r)i&&r[t]===i[t]||Sn(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?i||e.addEventListener(t,a?En:Cn,a):e.removeEventListener(t,a?En:Cn,a);else if(t!=="dangerouslySetInnerHTML"){if(n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Cn(e){return this.l[e.type+!1](I.event?I.event(e):e)}function En(e){return this.l[e.type+!0](I.event?I.event(e):e)}function Wr(e,t,r,i,n,a,o,s,l,d){var p,u,g,v,b,_,$,y,m,S,A,F,z,se,Q,U=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(p=I.__b)&&p(t);try{e:if(typeof U=="function"){if(y=t.props,m=(p=U.contextType)&&i[p.__c],S=p?m?m.props.value:p.__:i,r.__c?$=(u=t.__c=r.__c).__=u.__E:("prototype"in U&&U.prototype.render?t.__c=u=new U(y,S):(t.__c=u=new Ee(y,S),u.constructor=U,u.render=Vs),m&&m.sub(u),u.props=y,u.state||(u.state={}),u.context=S,u.__n=i,g=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),U.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Be({},u.__s)),Be(u.__s,U.getDerivedStateFromProps(y,u.__s))),v=u.props,b=u.state,u.__v=t,g)U.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(U.getDerivedStateFromProps==null&&y!==v&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,S),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,S)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(G){G&&(G.__=t)}),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,S),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(v,b,_)})}if(u.context=S,u.props=y,u.__P=e,u.__e=!1,F=I.__r,z=0,"prototype"in U&&U.prototype.render){for(u.state=u.__s,u.__d=!1,F&&F(t),p=u.render(u.props,u.state,u.context),se=0;se<u._sb.length;se++)u.__h.push(u._sb[se]);u._sb=[]}else do u.__d=!1,F&&F(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++z<25);u.state=u.__s,u.getChildContext!=null&&(i=Be(Be({},i),u.getChildContext())),g||u.getSnapshotBeforeUpdate==null||(_=u.getSnapshotBeforeUpdate(v,b)),_n(e,ar(Q=p!=null&&p.type===ne&&p.key==null?p.props.children:p)?Q:[Q],t,r,i,n,a,o,s,l,d),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),$&&(u.__E=u.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Fs(r.__e,t,r,i,n,a,o,l,d);(p=I.diffed)&&p(t)}catch(G){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),I.__e(G,t,r)}}function $n(e,t,r){for(var i=0;i<r.length;i++)Kr(r[i],r[++i],r[++i]);I.__c&&I.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){I.__e(a,n.__v)}})}function Fs(e,t,r,i,n,a,o,s,l){var d,p,u,g=r.props,v=t.props,b=t.type,_=0;if(b==="svg"&&(n=!0),a!=null){for(;_<a.length;_++)if((d=a[_])&&"setAttribute"in d==!!b&&(b?d.localName===b:d.nodeType===3)){e=d,a[_]=null;break}}if(e==null){if(b===null)return document.createTextNode(v);e=n?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,v.is&&v),a=null,s=!1}if(b===null)g===v||s&&e.data===v||(e.data=v);else{if(a=a&&Vt.call(e.childNodes),p=(g=r.props||gt).dangerouslySetInnerHTML,u=v.dangerouslySetInnerHTML,!s){if(a!=null)for(g={},_=0;_<e.attributes.length;_++)g[e.attributes[_].name]=e.attributes[_].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(Ns(e,v,g,n,s),u)t.__k=[];else if(_n(e,ar(_=t.props.children)?_:[_],t,r,i,n&&b!=="foreignObject",a,o,a?a[0]:r.__k&&or(r,0),s,l),a!=null)for(_=a.length;_--;)a[_]!=null&&mn(a[_]);s||("value"in v&&(_=v.value)!==void 0&&(_!==e.value||b==="progress"&&!_||b==="option"&&_!==g.value)&&lr(e,"value",_,g.value,!1),"checked"in v&&(_=v.checked)!==void 0&&_!==e.checked&&lr(e,"checked",_,g.checked,!1))}return e}function Kr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(i){I.__e(i,r)}}function In(e,t,r){var i,n;if(I.unmount&&I.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||Kr(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){I.__e(a,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(n=0;n<i.length;n++)i[n]&&In(i[n],t,r||typeof e.type!="function");r||e.__e==null||mn(e.__e),e.__=e.__e=e.__d=void 0}function Vs(e,t,r){return this.constructor(e,r)}function nt(e,t,r){var i,n,a,o;I.__&&I.__(e,t),n=(i=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Wr(t,e=(!i&&r||t).__k=we(ne,null,[e]),n||gt,gt,t.ownerSVGElement!==void 0,!i&&r?[r]:n?null:t.firstChild?Vt.call(t.childNodes):null,a,!i&&r?r:n?n.__e:t.firstChild,i,o),$n(a,e,o)}function An(e,t){nt(e,t,An)}function Ds(e,t,r){var i,n,a,o,s=Be({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?i=t[a]:a=="ref"?n=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Vt.call(arguments,2):r),Dt(e.type,s,i||e.key,n||e.ref,null)}function Tn(e,t){var r={__c:t="__cC"+vn++,__:e,Consumer:function(i,n){return i.children(n)},Provider:function(i){var n,a;return this.getChildContext||(n=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,qr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),i.children}};return r.Provider.__=r.Consumer.contextType=r}Vt=wn.slice,I={__e:function(e,t,r,i){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,i||{}),o=n.__d),o)return n.__E=n}catch(s){e=s}throw e}},pn=0,hn=function(e){return e!=null&&e.constructor===void 0},Ee.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Be({},this.state),typeof e=="function"&&(e=e(Be({},r),this.props)),e&&Be(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),qr(this))},Ee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),qr(this))},Ee.prototype.render=ne,it=[],bn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hr=function(e,t){return e.__v.__b-t.__v.__b},sr.__r=0,vn=0;function Nn(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Nn(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Ke(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Nn(e))&&(i&&(i+=" "),i+=t);return i}const Fn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vn=Ke,at=(e,t)=>r=>{var i;if((t==null?void 0:t.variants)==null)return Vn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:a}=t,o=Object.keys(n).map(d=>{const p=r==null?void 0:r[d],u=a==null?void 0:a[d];if(p===null)return null;const g=Fn(p)||Fn(u);return n[d][g]}),s=r&&Object.entries(r).reduce((d,p)=>{let[u,g]=p;return g===void 0||(d[u]=g),d},{}),l=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((d,p)=>{let{class:u,className:g,...v}=p;return Object.entries(v).every(b=>{let[_,$]=b;return Array.isArray($)?$.includes({...a,...s}[_]):{...a,...s}[_]===$})?[...d,u,g]:d},[]);return Vn(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var Ge,H,Gr,Dn,bt=0,Mn=[],cr=[],Ln=I.__b,Pn=I.__r,On=I.diffed,jn=I.__c,Bn=I.unmount;function vt(e,t){I.__h&&I.__h(H,e,bt||t),bt=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:cr}),r.__[e]}function Ce(e){return bt=1,Rn(Hn,e)}function Rn(e,t,r){var i=vt(Ge++,2);if(i.t=e,!i.__c&&(i.__=[r?r(t):Hn(void 0,t),function(s){var l=i.__N?i.__N[0]:i.__[0],d=i.t(l,s);l!==d&&(i.__N=[d,i.__[1]],i.__c.setState({}))}],i.__c=H,!H.u)){var n=function(s,l,d){if(!i.__c.__H)return!0;var p=i.__c.__H.__.filter(function(g){return g.__c});if(p.every(function(g){return!g.__N}))return!a||a.call(this,s,l,d);var u=!1;return p.forEach(function(g){if(g.__N){var v=g.__[0];g.__=g.__N,g.__N=void 0,v!==g.__[0]&&(u=!0)}}),!(!u&&i.__c.props===s)&&(!a||a.call(this,s,l,d))};H.u=!0;var a=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(s,l,d){if(this.__e){var p=a;a=void 0,n(s,l,d),a=p}o&&o.call(this,s,l,d)},H.shouldComponentUpdate=n}return i.__N||i.__}function $e(e,t){var r=vt(Ge++,3);!I.__s&&Jr(r.__H,t)&&(r.__=e,r.i=t,H.__H.__h.push(r))}function me(e,t){var r=vt(Ge++,4);!I.__s&&Jr(r.__H,t)&&(r.__=e,r.i=t,H.__h.push(r))}function ye(e){return bt=5,ze(function(){return{current:e}},[])}function Ms(e,t,r){bt=6,me(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function ze(e,t){var r=vt(Ge++,7);return Jr(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Ls(e,t){return bt=8,ze(function(){return e},t)}function zn(e){var t=H.context[e.__c],r=vt(Ge++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(H)),t.props.value):e.__}function Ps(e,t){I.useDebugValue&&I.useDebugValue(t?t(e):e)}function Os(){var e=vt(Ge++,11);if(!e.__){for(var t=H.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function js(){for(var e;e=Mn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ur),e.__H.__h.forEach(Yr),e.__H.__h=[]}catch(t){e.__H.__h=[],I.__e(t,e.__v)}}I.__b=function(e){H=null,Ln&&Ln(e)},I.__r=function(e){Pn&&Pn(e),Ge=0;var t=(H=e.__c).__H;t&&(Gr===H?(t.__h=[],H.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=cr,r.__N=r.i=void 0})):(t.__h.forEach(ur),t.__h.forEach(Yr),t.__h=[],Ge=0)),Gr=H},I.diffed=function(e){On&&On(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Mn.push(t)!==1&&Dn===I.requestAnimationFrame||((Dn=I.requestAnimationFrame)||Bs)(js)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==cr&&(r.__=r.__V),r.i=void 0,r.__V=cr})),Gr=H=null},I.__c=function(e,t){t.some(function(r){try{r.__h.forEach(ur),r.__h=r.__h.filter(function(i){return!i.__||Yr(i)})}catch(i){t.some(function(n){n.__h&&(n.__h=[])}),t=[],I.__e(i,r.__v)}}),jn&&jn(e,t)},I.unmount=function(e){Bn&&Bn(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(i){try{ur(i)}catch(n){t=n}}),r.__H=void 0,t&&I.__e(t,r.__v))};var Un=typeof requestAnimationFrame=="function";function Bs(e){var t,r=function(){clearTimeout(i),Un&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,100);Un&&(t=requestAnimationFrame(r))}function ur(e){var t=H,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),H=t}function Yr(e){var t=H;e.__c=e.__(),H=t}function Jr(e,t){return!e||e.length!==t.length||t.some(function(r,i){return r!==e[i]})}function Hn(e,t){return typeof t=="function"?t(e):t}function qn(e,t){for(var r in t)e[r]=t[r];return e}function Zr(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var i in t)if(i!=="__source"&&e[i]!==t[i])return!0;return!1}function Xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Qr(e){this.props=e}function Rs(e,t){function r(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,n)||!o:Zr(this.props,n)}function i(n){return this.shouldComponentUpdate=r,we(e,n)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(Qr.prototype=new Ee).isPureReactComponent=!0,Qr.prototype.shouldComponentUpdate=function(e,t){return Zr(this.props,e)||Zr(this.state,t)};var Wn=I.__b;I.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Wn&&Wn(e)};var zs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ei(e){function t(r){var i=qn({},r);return delete i.ref,e(i,r.ref||null)}return t.$$typeof=zs,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Kn=function(e,t){return e==null?null:Re(Re(e).map(t))},Us={map:Kn,forEach:Kn,count:function(e){return e?Re(e).length:0},only:function(e){var t=Re(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Re},Hs=I.__e;I.__e=function(e,t,r,i){if(e.then){for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),n.__c(e,t)}Hs(e,t,r,i)};var Gn=I.unmount;function Yn(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),e.__c.__H=null),(e=qn({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(i){return Yn(i,t,r)})),e}function Jn(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(i){return Jn(i,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function Mt(){this.__u=0,this.t=null,this.__b=null}function Zn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Xn(e){var t,r,i;function n(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){i=o}),i)throw i;if(!r)throw t;return we(r,a)}return n.displayName="Lazy",n.__f=!0,n}function Lt(){this.u=null,this.o=null}I.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Gn&&Gn(e)},(Mt.prototype=new Ee).__c=function(e,t){var r=t.__c,i=this;i.t==null&&(i.t=[]),i.t.push(r);var n=Zn(i.__v),a=!1,o=function(){a||(a=!0,r.__R=null,n?n(s):s())};r.__R=o;var s=function(){if(!--i.__u){if(i.state.__a){var d=i.state.__a;i.__v.__k[0]=Jn(d,d.__c.__P,d.__c.__O)}var p;for(i.setState({__a:i.__b=null});p=i.t.pop();)p.forceUpdate()}},l=t.__h===!0;i.__u++||l||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(o,o)},Mt.prototype.componentWillUnmount=function(){this.t=[]},Mt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Yn(this.__b,r,i.__O=i.__P)}this.__b=null}var n=t.__a&&we(ne,null,e.fallback);return n&&(n.__h=null),[we(ne,null,t.__a?null:e.children),n]};var Qn=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function qs(e){return this.getChildContext=function(){return e.context},e.children}function Ws(e){var t=this,r=e.i;t.componentWillUnmount=function(){nt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(i){this.childNodes.push(i),t.i.appendChild(i)},insertBefore:function(i,n){this.childNodes.push(i),t.i.appendChild(i)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.i.removeChild(i)}}),nt(we(qs,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ks(e,t){var r=we(Ws,{__v:e,i:t});return r.containerInfo=t,r}(Lt.prototype=new Ee).__a=function(e){var t=this,r=Zn(t.__v),i=t.o.get(e);return i[0]++,function(n){var a=function(){t.props.revealOrder?(i.push(n),Qn(t,e,i)):n()};r?r(a):a()}},Lt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Re(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Lt.prototype.componentDidUpdate=Lt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Qn(e,r,t)})};var ea=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Gs=/^(?: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]/,Ys=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Js=/[A-Z0-9]/g,Zs=typeof document<"u",Xs=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Qs(e,t,r){return t.__k==null&&(t.textContent=""),nt(e,t),typeof r=="function"&&r(),e?e.__c:null}function el(e,t,r){return An(e,t),typeof r=="function"&&r(),e?e.__c:null}Ee.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ee.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ta=I.event;function tl(){}function rl(){return this.cancelBubble}function il(){return this.defaultPrevented}I.event=function(e){return ta&&(e=ta(e)),e.persist=tl,e.isPropagationStopped=rl,e.isDefaultPrevented=il,e.nativeEvent=e};var ti,nl={enumerable:!1,configurable:!0,get:function(){return this.class}},ra=I.vnode;I.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,i=t.type,n={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Zs&&a==="children"&&i==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||i!=="input"&&i!=="textarea"||Xs(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Ys.test(a)?a=s:i.indexOf("-")===-1&&Gs.test(a)?a=a.replace(Js,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&n[a=s]&&(a="oninputCapture"),n[a]=o}}i=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=Re(r.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),i=="select"&&n.defaultValue!=null&&(n.value=Re(r.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",nl)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),t.props=n}(e),e.$$typeof=ea,ra&&ra(e)};var ia=I.__r;I.__r=function(e){ia&&ia(e),ti=e.__c};var na=I.diffed;I.diffed=function(e){na&&na(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),ti=null};var al={ReactCurrentDispatcher:{current:{readContext:function(e){return ti.__n[e.__c].props.value}}}};function ol(e){return we.bind(null,e)}function aa(e){return!!e&&e.$$typeof===ea}function sl(e){return aa(e)?Ds.apply(null,arguments):e}function ll(e){return!!e.__k&&(nt(null,e),!0)}function cl(e){return e&&(e.base||e.nodeType===1&&e)||null}var ul=function(e,t){return e(t)},dl=function(e,t){return e(t)},fl=ne;function oa(e){e()}function pl(e){return e}function hl(){return[!1,oa]}var gl=me;function bl(e,t){var r=t(),i=Ce({h:{__:r,v:t}}),n=i[0].h,a=i[1];return me(function(){n.__=r,n.v=t,Xr(n.__,t())||a({h:n})},[e,r,t]),$e(function(){return Xr(n.__,n.v())||a({h:n}),e(function(){Xr(n.__,n.v())||a({h:n})})},[e]),r}var de={useState:Ce,useId:Os,useReducer:Rn,useEffect:$e,useLayoutEffect:me,useInsertionEffect:gl,useTransition:hl,useDeferredValue:pl,useSyncExternalStore:bl,startTransition:oa,useRef:ye,useImperativeHandle:Ms,useMemo:ze,useCallback:Ls,useContext:zn,useDebugValue:Ps,version:"17.0.2",Children:Us,render:Qs,hydrate:el,unmountComponentAtNode:ll,createPortal:Ks,createElement:we,createContext:Tn,createFactory:ol,cloneElement:sl,createRef:As,Fragment:ne,isValidElement:aa,findDOMNode:cl,Component:Ee,PureComponent:Qr,memo:Rs,forwardRef:ei,flushSync:dl,unstable_batchedUpdates:ul,StrictMode:fl,Suspense:Mt,SuspenseList:Lt,lazy:Xn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:al};const fe=Symbol.for("@ts-pattern/matcher"),sa=Symbol.for("@ts-pattern/isVariadic"),dr="@ts-pattern/anonymous-select-key",ri=e=>!!(e&&typeof e=="object"),fr=e=>e&&!!e[fe],Y=(e,t,r)=>{if(fr(e)){const i=e[fe](),{matched:n,selections:a}=i.match(t);return n&&a&&Object.keys(a).forEach(o=>r(o,a[o])),n}if(ri(e)){if(!ri(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let i=[],n=[],a=[];for(const o of e.keys()){const s=e[o];fr(s)&&s[sa]?a.push(s):a.length?n.push(s):i.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<i.length+n.length)return!1;const o=t.slice(0,i.length),s=n.length===0?[]:t.slice(-n.length),l=t.slice(i.length,n.length===0?1/0:-n.length);return i.every((d,p)=>Y(d,o[p],r))&&n.every((d,p)=>Y(d,s[p],r))&&(a.length===0||Y(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>Y(o,t[s],r))}return Reflect.ownKeys(e).every(i=>{const n=e[i];return(i in t||fr(a=n)&&a[fe]().matcherType==="optional")&&Y(n,t[i],r);var a})}return Object.is(t,e)},pe=e=>{var t,r,i;return ri(e)?fr(e)?(t=(r=(i=e[fe]()).getSelectionKeys)==null?void 0:r.call(i))!=null?t:[]:Array.isArray(e)?Pt(e,pe):Pt(Object.values(e),pe):[]},Pt=(e,t)=>e.reduce((r,i)=>r.concat(t(i)),[]);function vl(...e){if(e.length===1){const[t]=e;return r=>Y(t,r,()=>{})}if(e.length===2){const[t,r]=e;return Y(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ee(e){return Object.assign(e,{optional:()=>ni(e),and:t=>q(e,t),or:t=>la(e,t),select:t=>t===void 0?Ot(e):Ot(t,e)})}function ii(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const i=[{value:Object.assign(t,{[sa]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=i[r++])!=null?n:i.at(-1)}}}}))(e),{optional:()=>ii(ni(e)),select:t=>ii(t===void 0?Ot(e):Ot(t,e))})}function ni(e){return ee({[fe]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return t===void 0?(pe(e).forEach(n=>i(n,void 0)),{matched:!0,selections:r}):{matched:Y(e,t,i),selections:r}},getSelectionKeys:()=>pe(e),matcherType:"optional"})})}const wl=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},ml=(e,t)=>{for(const[r,i]of e.entries())if(!t(i,r))return!1;return!0},yl=(e,t)=>{const r=Reflect.ownKeys(e);for(const i of r)if(!t(i,e[i]))return!1;return!0};function q(...e){return ee({[fe]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return{matched:e.every(n=>Y(n,t,i)),selections:r}},getSelectionKeys:()=>Pt(e,pe),matcherType:"and"})})}function la(...e){return ee({[fe]:()=>({match:t=>{let r={};const i=(n,a)=>{r[n]=a};return Pt(e,pe).forEach(n=>i(n,void 0)),{matched:e.some(n=>Y(n,t,i)),selections:r}},getSelectionKeys:()=>Pt(e,pe),matcherType:"or"})})}function M(e){return{[fe]:()=>({match:t=>({matched:!!e(t)})})}}function Ot(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ee({[fe]:()=>({match:i=>{let n={[t??dr]:i};return{matched:r===void 0||Y(r,i,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[t??dr].concat(r===void 0?[]:pe(r))})})}function ca(e){return!0}function Fe(e){return typeof e=="number"}function Ye(e){return typeof e=="string"}function Je(e){return typeof e=="bigint"}const ua=ee(M(ca)),_l=ee(M(ca)),xl=ua,Ze=e=>Object.assign(ee(e),{startsWith:t=>{return Ze(q(e,(r=t,M(i=>Ye(i)&&i.startsWith(r)))));var r},endsWith:t=>{return Ze(q(e,(r=t,M(i=>Ye(i)&&i.endsWith(r)))));var r},minLength:t=>Ze(q(e,(r=>M(i=>Ye(i)&&i.length>=r))(t))),length:t=>Ze(q(e,(r=>M(i=>Ye(i)&&i.length===r))(t))),maxLength:t=>Ze(q(e,(r=>M(i=>Ye(i)&&i.length<=r))(t))),includes:t=>{return Ze(q(e,(r=t,M(i=>Ye(i)&&i.includes(r)))));var r},regex:t=>{return Ze(q(e,(r=t,M(i=>Ye(i)&&!!i.match(r)))));var r}}),da=Ze(M(Ye)),Ve=e=>Object.assign(ee(e),{between:(t,r)=>Ve(q(e,((i,n)=>M(a=>Fe(a)&&i<=a&&n>=a))(t,r))),lt:t=>Ve(q(e,(r=>M(i=>Fe(i)&&i<r))(t))),gt:t=>Ve(q(e,(r=>M(i=>Fe(i)&&i>r))(t))),lte:t=>Ve(q(e,(r=>M(i=>Fe(i)&&i<=r))(t))),gte:t=>Ve(q(e,(r=>M(i=>Fe(i)&&i>=r))(t))),int:()=>Ve(q(e,M(t=>Fe(t)&&Number.isInteger(t)))),finite:()=>Ve(q(e,M(t=>Fe(t)&&Number.isFinite(t)))),positive:()=>Ve(q(e,M(t=>Fe(t)&&t>0))),negative:()=>Ve(q(e,M(t=>Fe(t)&&t<0)))}),kl=Ve(M(Fe)),Xe=e=>Object.assign(ee(e),{between:(t,r)=>Xe(q(e,((i,n)=>M(a=>Je(a)&&i<=a&&n>=a))(t,r))),lt:t=>Xe(q(e,(r=>M(i=>Je(i)&&i<r))(t))),gt:t=>Xe(q(e,(r=>M(i=>Je(i)&&i>r))(t))),lte:t=>Xe(q(e,(r=>M(i=>Je(i)&&i<=r))(t))),gte:t=>Xe(q(e,(r=>M(i=>Je(i)&&i>=r))(t))),positive:()=>Xe(q(e,M(t=>Je(t)&&t>0))),negative:()=>Xe(q(e,M(t=>Je(t)&&t<0)))}),Sl=Xe(M(Je)),Cl=ee(M(function(e){return typeof e=="boolean"})),El=ee(M(function(e){return typeof e=="symbol"})),$l=ee(M(function(e){return e==null})),Il=ee(M(function(e){return e!=null}));var j={__proto__:null,matcher:fe,optional:ni,array:function(...e){return ii({[fe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let i={};if(t.length===0)return pe(r).forEach(a=>{i[a]=[]}),{matched:!0,selections:i};const n=(a,o)=>{i[a]=(i[a]||[]).concat([o])};return{matched:t.every(a=>Y(r,a,n)),selections:i}},getSelectionKeys:()=>e.length===0?[]:pe(e[0])})})},set:function(...e){return ee({[fe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const i=(a,o)=>{r[a]=(r[a]||[]).concat([o])},n=e[0];return{matched:wl(t,a=>Y(n,a,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:pe(e[0])})})},map:function(...e){return ee({[fe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const i=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var n;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);const[a,o]=e;return{matched:ml(t,(s,l)=>{const d=Y(a,l,i),p=Y(o,s,i);return d&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...pe(e[0]),...pe(e[1])]})})},record:function(...e){return ee({[fe]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let i={};const n=(s,l)=>{i[s]=(i[s]||[]).concat([l])},[a,o]=e.length===1?[da,e[0]]:e;return{matched:yl(t,(s,l)=>{const d=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),p=d!==null&&Y(a,d,n),u=Y(a,s,n),g=Y(o,l,n);return(u||p)&&g}),selections:i}},getSelectionKeys:()=>e.length===0?[]:[...pe(e[0]),...pe(e[1])]})})},intersection:q,union:la,not:function(e){return ee({[fe]:()=>({match:t=>({matched:!Y(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:M,select:Ot,any:ua,unknown:_l,_:xl,string:da,number:kl,bigint:Sl,boolean:Cl,symbol:El,nullish:$l,nonNullable:Il,instanceOf:function(e){return ee(M(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ee(M(vl(e)))}};class Al extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}}const ai={matched:!1,value:void 0};function wt(e){return new pr(e,ai)}class pr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],i=[t[0]];let n;t.length===3&&typeof t[1]=="function"?n=t[1]:t.length>2&&i.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(d,p)=>{a=!0,o[d]=p},l=!i.some(d=>Y(d,this.input,s))||n&&!n(this.input)?ai:{matched:!0,value:r(a?dr in o?o[dr]:o:this.input,this.input)};return new pr(this.input,l)}when(t,r){if(this.state.matched)return this;const i=!!t(this.input);return new pr(this.input,i?{matched:!0,value:r(this.input,this.input)}:ai)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=Tl){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function Tl(e){throw new Al(e)}var Nl=["other","few","many","two","one","zero"],fa=({terms:e,overrides:t,locale:r})=>{const i=new Intl.PluralRules(r);function n(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,d)=>{var p;return((p=o==null?void 0:o[d])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=i.select(o.count);if(!(l in s)){const d=Nl.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},Fl=0;function c(e,t,r,i,n,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var d={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Fl,__source:n,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return I.vnode&&I.vnode(d),d}var pa=Tn(null),ha=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:i})=>{const n=ze(()=>fa({locale:i,terms:e,overrides:t}),[t,i]);return c(pa.Provider,{value:{t:n,locale:i},children:r})},useTranslation:()=>{const t=zn(pa);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>fa({terms:e,overrides:t,locale:r})}),{TranslationProvider:df,useTranslation:ff,createTFunction:pf,defaultTerms:Vl}=ha({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",close_application:"Close application",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_empty:"Please enter a value",validation_date:"Please enter a valid date (YYYY-MM-DD)",validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_min:{one:"Please upload at least one file",other:"Please only upload at least {{count}} files"},validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_file_size:"Your file is too big. Please upload a file smaller than {{size}}",validation_required:"This field is required.",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"},optional:"optional"});const{TranslationProvider:Dl,useTranslation:le,createTFunction:Ml}=ha({...Vl,error_heading:"Something unexpected happened",undo:"Undo",send:"Send",skip:"Skip",skipped:"Skipped",maximize:"Maximise",minimize:"Minimise"}),hf="";function De(e,t){if(!e)throw new Error(t)}var oi=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(oi):Object.keys(e).sort().reduce((t,r)=>(t[r]=oi(e[r]),t),{}),Ll=e=>{let t=JSON.stringify(oi(e)),r=5381;for(let i=0;i<t.length;i++)r=r*33^t.charCodeAt(i);return(r>>>0).toString(36)},Pl=Symbol.for("preact-signals");function si(){if(mt>1)mt--;else{for(var e,t=!1;jt!==void 0;){var r=jt;for(jt=void 0,li++;r!==void 0;){var i=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ba(r))try{r.c()}catch(n){t||(e=n,t=!0)}r=i}}if(li=0,mt--,t)throw e}}var B=void 0,jt=void 0,mt=0,li=0,hr=0;function ga(e){if(B!==void 0){var t=e.n;if(t===void 0||t.t!==B)return t={i:0,S:e,p:B.s,n:void 0,t:B,e:void 0,x:void 0,r:t},B.s!==void 0&&(B.s.n=t),B.s=t,e.n=t,32&B.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=B.s,t.n=void 0,B.s.n=t,B.s=t),t}}function ae(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ae.prototype.brand=Pl,ae.prototype.h=function(){return!0},ae.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)},ae.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ae.prototype.subscribe=function(e){var t=this;return ui(function(){var r=t.value,i=B;B=void 0;try{e(r)}finally{B=i}})},ae.prototype.valueOf=function(){return this.value},ae.prototype.toString=function(){return this.value+""},ae.prototype.toJSON=function(){return this.value},ae.prototype.peek=function(){var e=B;B=void 0;try{return this.value}finally{B=e}},Object.defineProperty(ae.prototype,"value",{get:function(){var e=ga(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(li>100)throw new Error("Cycle detected");this.v=e,this.i++,hr++,mt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{si()}}}});function Qe(e){return new ae(e)}function ba(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 va(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function wa(e){for(var t=e.s,r=void 0;t!==void 0;){var i=t.p;t.i===-1?(t.S.U(t),i!==void 0&&(i.n=t.n),t.n!==void 0&&(t.n.p=i)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=i}e.s=r}function yt(e){ae.call(this,void 0),this.x=e,this.s=void 0,this.g=hr-1,this.f=4}(yt.prototype=new ae).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===hr))return!0;if(this.g=hr,this.f|=1,this.i>0&&!ba(this))return this.f&=-2,!0;var e=B;try{va(this),B=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return B=e,wa(this),this.f&=-2,!0},yt.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)}ae.prototype.S.call(this,e)},yt.prototype.U=function(e){if(this.t!==void 0&&(ae.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)}},yt.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(yt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ga(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Ol(e){return new yt(e)}function ma(e){var t=e.u;if(e.u=void 0,typeof t=="function"){mt++;var r=B;B=void 0;try{t()}catch(i){throw e.f&=-2,e.f|=8,ci(e),i}finally{B=r,si()}}}function ci(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ma(e)}function jl(e){if(B!==this)throw new Error("Out-of-order effect");wa(this),B=e,this.f&=-2,8&this.f&&ci(this),si()}function Bt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Bt.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()}},Bt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ma(this),va(this),mt++;var e=B;return B=this,jl.bind(this,e)},Bt.prototype.N=function(){2&this.f||(this.f|=2,this.o=jt,jt=this)},Bt.prototype.d=function(){this.f|=8,1&this.f||ci(this)};function ui(e){var t=new Bt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var di;function _t(e,t){I[e]=t.bind(null,I[e]||function(){})}function gr(e){di&&di(),di=e&&e.S()}function ya(e){var t=this,r=e.data,i=Rl(r);i.value=r;var n=ze(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!hn(n.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=n.peek():(t.__$f|=1,t.setState({}))},Ol(function(){var o=i.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}ya.displayName="_st",Object.defineProperties(ae.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ya},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),_t("__b",function(e,t){if(typeof t.type=="string"){var r,i=t.props;for(var n in i)if(n!=="children"){var a=i[n];a instanceof ae&&(r||(t.__np=r={}),r[n]=a,i[n]=a.peek())}}e(t)}),_t("__r",function(e,t){gr();var r,i=t.__c;i&&(i.__$f&=-2,(r=i.__$u)===void 0&&(i.__$u=r=function(n){var a;return ui(function(){a=this}),a.c=function(){i.__$f|=1,i.setState({})},a}())),gr(r),e(t)}),_t("__e",function(e,t,r,i){gr(),e(t,r,i)}),_t("diffed",function(e,t){gr();var r;if(typeof t.type=="string"&&(r=t.__e)){var i=t.__np,n=t.props;if(i){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in i)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in i){var d=a[l],p=i[l];d===void 0?(d=Bl(r,l,p,n),a[l]=d):d.o(p,n)}}}e(t)});function Bl(e,t,r,i){var n=t in e&&e.ownerSVGElement===void 0,a=Qe(r);return{o:function(o,s){a.value=o,i=s},d:ui(function(){var o=a.value.value;i[t]!==o&&(i[t]=o,n?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}_t("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var i=r.U;if(i){r.U=void 0;for(var n in i){var a=i[n];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),_t("__h",function(e,t,r,i){(i<3||i===9)&&(t.__$f|=2),e(t,r,i)}),Ee.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var i in t)return!0;for(var n in e)if(n!=="__source"&&e[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function Rl(e){return ze(function(){return Qe(e)},[])}const fi=(e,t)=>t.some(r=>e instanceof r);let _a,xa;function zl(){return _a||(_a=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ul(){return xa||(xa=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const pi=new WeakMap,hi=new WeakMap,br=new WeakMap;function Hl(e){const t=new Promise((r,i)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(ot(e.result)),n()},o=()=>{i(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",o)});return br.set(t,e),t}function ql(e){if(pi.has(e))return;const t=new Promise((r,i)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),n()},o=()=>{i(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});pi.set(e,t)}let gi={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return pi.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ot(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function ka(e){gi=e(gi)}function Wl(e){return Ul().includes(e)?function(...t){return e.apply(bi(this),t),ot(this.request)}:function(...t){return ot(e.apply(bi(this),t))}}function Kl(e){return typeof e=="function"?Wl(e):(e instanceof IDBTransaction&&ql(e),fi(e,zl())?new Proxy(e,gi):e)}function ot(e){if(e instanceof IDBRequest)return Hl(e);if(hi.has(e))return hi.get(e);const t=Kl(e);return t!==e&&(hi.set(e,t),br.set(t,e)),t}const bi=e=>br.get(e);function Gl(e,t,{blocked:r,upgrade:i,blocking:n,terminated:a}={}){const o=indexedDB.open(e,t),s=ot(o);return i&&o.addEventListener("upgradeneeded",l=>{i(ot(o.result),l.oldVersion,l.newVersion,ot(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),n&&l.addEventListener("versionchange",d=>n(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const Yl=["get","getKey","getAll","getAllKeys","count"],Jl=["put","add","delete","clear"],vi=new Map;function Sa(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(vi.get(t))return vi.get(t);const r=t.replace(/FromIndex$/,""),i=t!==r,n=Jl.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||Yl.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,n?"readwrite":"readonly");let d=l.store;return i&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),n&&l.done]))[0]};return vi.set(t,a),a}ka(e=>({...e,get:(t,r,i)=>Sa(t,r)||e.get(t,r,i),has:(t,r)=>!!Sa(t,r)||e.has(t,r)}));const Zl=["continue","continuePrimaryKey","advance"],Ca={},wi=new WeakMap,Ea=new WeakMap,Xl={get(e,t){if(!Zl.includes(t))return e[t];let r=Ca[t];return r||(r=Ca[t]=function(...i){wi.set(this,Ea.get(this)[t](...i))}),r}};async function*Ql(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Xl);for(Ea.set(r,t),br.set(r,bi(t));t;)yield r,t=await(wi.get(r)||t.continue()),wi.delete(r)}function $a(e,t){return t===Symbol.asyncIterator&&fi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&fi(e,[IDBIndex,IDBObjectStore])}ka(e=>({...e,get(t,r,i){return $a(t,r)?Ql:e.get(t,r,i)},has(t,r){return $a(t,r)||e.has(t,r)}}));const vr=typeof indexedDB>"u"?void 0:Gl("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let wr,mi,Rt;const Ia=()=>{if(!wr)return Rt;const e=wr;wr=void 0;const t=Na(e),r=vr==null?void 0:vr.then(i=>i.put("state",e.data,t)).finally(()=>{Rt===r&&(Rt=void 0)});return Rt=r,Rt},st={getStateData:async(e,t,r)=>{var n;const i=Na({...e,flowKeys:t,context:r});return(n=await vr)==null?void 0:n.get("state",i)},setStateData:e=>{wr=e,clearTimeout(mi),mi=setTimeout(()=>void Ia(),1e3)},flushStateData:()=>(clearTimeout(mi),Ia()??Promise.resolve())},Aa=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},xt=e=>t=>t?t.type===e:!1;class lt extends Error{constructor(){super("Aborted")}}const ec=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ta=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:ec()}),tc=e=>wt(e).with({nativeEvent:{submitter:j.select(j.union(j.instanceOf(HTMLButtonElement),j.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),mr=(e,t,r,i=0)=>{if(!t.nextId)return r(t.id,{stepsMade:i,remainingSteps:0}),{stepsMade:i,remainingSteps:0};const n=e.find(d=>d.id===t.nextId);if(n===void 0)return{stepsMade:i,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(d=>d.id===a),s=t.type.includes("question")?1:0;if(o){const d=s+Math.max(mr(e,n,r,i+s).remainingSteps,mr(e,o,r,i+s).remainingSteps);return r(t.id,{stepsMade:i,remainingSteps:d}),{stepsMade:i,remainingSteps:d}}const l=s+mr(e,n,r,i+s).remainingSteps;return r(t.id,{stepsMade:i,remainingSteps:l}),{stepsMade:i,remainingSteps:l}},rc=e=>{const t={},r=e.find(i=>i.isHead);return r&&mr(e,r,(i,n)=>{t[i]=n}),t},Na=e=>[...e.flowKeys,e.id,e.version,Ll(e.context)].join("/"),et=Qe({state:"idle"}),zt=e=>{const{state:t,flow:r}=et.value;if(t!=="loaded")return;De(r,"No flow to update");const i=e(r.data);r.data=i,et.value={state:t,flow:r},st.setStateData(r)},N={current$:et,viewState$:Qe("closed"),inputHeight$:Qe(53),prepareFlow:async({flow:e,context:t={},flowKeys:r,title:i,analytics:n,job:a,locationOrigin:o})=>(await st.flushStateData().catch(()=>{}),{data:await st.getStateData(e,r,t)??Ta(),startedAt:new Date,nodeIdToProgress:rc(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:i,analytics:n,job:a,locationOrigin:o}),commitFlow:e=>{et.value={state:"loaded",flow:e},st.setStateData(e)},cancelCurrentFlow:()=>{et.value={state:"idle"},N.viewState$.value="closed"},markAsFinished:()=>zt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>zt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=et.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ta();et.value={state:e,flow:{...t,data:r,startedAt:new Date}},st.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return zt(i=>(i.messages.push(r),i))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=et.value;De(t==="loaded","Application not loaded");const i=r.data.messages.filter(n=>!n.groupId||!e.includes(n.groupId));r.data.messages=i,st.setStateData(r)},setSubmission:(e,t)=>zt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>zt(t=>({...t,currentInput:e??null}))},ic=({message:e})=>{const{t}=le();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-9 text-sm",children:e})]})]})},Fa=e=>c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:"Loading"}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),Va=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Fa,{class:"text-neutral-6 h-8 w-8"})}),nc=e=>{const r=e/100,i=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,i))*100)}%`},ac=at("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"}}),yr=({class:e,children:t,variant:r,...i})=>c("div",{class:"flex flex-1 items-center justify-end px-1",children:c("button",{class:Ke(ac({variant:r}),e),...i,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})})}),oc=()=>{if(N.current$.value.state!=="loaded")return null;const e=N.current$.value.flow.nodeIdToProgress,t=N.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const i=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:nc(i)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},sc=({children:e,params:t})=>{const{t:r}=le(),i=N.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",{onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:yi,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:Ke({hidden:N.current$.value.state!=="loaded"||i.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,N.current$.value.state==="loaded"&&c(yr,{"aria-label":"Restart",onClick:()=>{N.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(yr,{class:"view-switch",onTouchStart:yi,"aria-label":r("minimize"),onClick:()=>i.value="minimised",children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),c(oc,{})]})})};function yi(){}const lc=Xn(()=>Promise.resolve().then(()=>Zd).then(e=>e.ChatbotBody)),Da=at("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"}}}),Ma=at("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"}}}),cc=({open:e,...t})=>{const r=ye(null);return me(()=>{const i=r.current;i&&(e?i.showModal():i.close())},[e]),c("dialog",{ref:r,...t})},uc=({logger:e,apiClient:t,analytics:r,talentBankClient:i,params:n})=>{const{state:a,flow:o,error:s}=N.current$.value,l=N.viewState$.value,d=a!=="idle"&&l==="maximised",p=ye(null);return c(Dl,{terms:n.terms,locale:void 0,children:[c(cc,{open:d,onClose:()=>N.viewState$.value="minimised",children:c("div",{ref:p,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Da({view:"maximised"}),children:c("div",{class:Ma({view:"maximised"}),children:[c(sc,{params:n,children:o==null?void 0:o.title}),wt({state:a,view:l}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(Va,{},"loading")).with({state:"loaded"},()=>c(Mt,{fallback:c(Va,{},"loading"),children:c(lc,{analytics:r,apiClient:t,logger:e,talentBankClient:i})})).with({state:"error"},()=>c(ic,{message:s})).exhaustive()]})})}),l==="minimised"?c(dc,{flow:o}):null]})},dc=({flow:e})=>{const{t}=le();return c("div",{class:Da({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:Ma({view:"minimised"}),children:[c("button",{onClick:()=>{N.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:yi,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(yr,{"aria-label":t("close_application"),onClick:N.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},fc=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overflow-y-scroll{overflow-y:scroll}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-b-3xl{border-bottom-right-radius:24px;border-bottom-left-radius:24px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .duration-700{transition-duration:.7s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[height\\]{will-change:height}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (pointer: coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}
2
+ `,La="inploi-chatbot",_i=`[data-widget='${La}']`,pc=()=>({getChatbotElement:()=>document.querySelector(_i),getOrCreateChatbotElement:()=>{const e=document.querySelector(_i);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=La,t}}),hc=25,xi=Qe({instant:()=>{},smooth:()=>{}}),gc=(e,t)=>new Promise((r,i)=>{if(t!=null&&t.aborted)return i(new lt);const n=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(n),i(new lt)},{once:!0})}),oe={onSubmitSuccessFn$:Qe(()=>{}),isBotTyping$:Qe(!1),scrollToEnd:{instant:()=>xi.value.instant(),smooth:()=>xi.value.smooth()}},bc=()=>{const e=ye(null);me(()=>{xi.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=ze(()=>({addToSubmissions:(i,n)=>N.setSubmission(i,n),send:async({message:i,signal:n,groupId:a})=>{if(await wt(i).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new lt;oe.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*hc;try{await gc(s,n)}finally{oe.isBotTyping$.value=!1}}).otherwise(async()=>{}),n!=null&&n.aborted)throw new lt;N.addMessage(i,a)},input:({input:i,signal:n})=>{if(n!=null&&n.aborted)throw new lt;return N.setInput(i),new Promise(a=>{const o=s=>{if(n!=null&&n.aborted)throw new lt;N.setInput(void 0),i.key&&N.setSubmission(i.key,s),a(s)};oe.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}};var Ue;function _r(e){return{lang:(e==null?void 0:e.lang)??(Ue==null?void 0:Ue.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ue==null?void 0:Ue.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ue==null?void 0:Ue.abortPipeEarly)}}var ki;function vc(e){return ki==null?void 0:ki.get(e)}var Si;function wc(e){return Si==null?void 0:Si.get(e)}var Ci;function mc(e,t){var r;return(r=Ci==null?void 0:Ci.get(e))==null?void 0:r.get(t)}function ct(e){var r,i;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function te(e,t,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??e.expects??null,s=(n==null?void 0:n.received)??ct(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},d=e.kind==="schema",p=(n==null?void 0:n.message)??e.message??mc(e.reference,l.lang)??(d?wc(l.lang):null)??i.message??vc(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),d&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function be(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},_r())}}}function yc(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Pa(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function _c(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var xc=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}},kc=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Oa(e,t){return{kind:"validation",type:"check",reference:Oa,async:!1,expects:null,requirement:e,message:t,"~run"(r,i){return r.typed&&!this.requirement(r.value)&&te(this,"input",r,i),r}}}function ja(e){return{kind:"validation",type:"email",reference:ja,expects:null,async:!1,requirement:kc,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&te(this,"email",t,r),t}}}function Ut(e,t){return{kind:"validation",type:"max_length",reference:Ut,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&te(this,"length",r,i,{received:`${r.value.length}`}),r}}}function Ba(e,t){return{kind:"validation",type:"max_value",reference:Ba,async:!1,expects:`<=${e instanceof Date?e.toJSON():ct(e)}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!(r.value<=this.requirement)&&te(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():ct(r.value)}),r}}}function kt(e,t){return{kind:"validation",type:"min_length",reference:kt,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&te(this,"length",r,i,{received:`${r.value.length}`}),r}}}function Ra(e,t){return{kind:"validation",type:"min_value",reference:Ra,async:!1,expects:`>=${e instanceof Date?e.toJSON():ct(e)}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!(r.value>=this.requirement)&&te(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():ct(r.value)}),r}}}function Ei(e,t){return{kind:"validation",type:"regex",reference:Ei,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,i){return r.typed&&!this.requirement.test(r.value)&&te(this,"format",r,i),r}}}function xr(e){return{kind:"transformation",type:"transform",reference:xr,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function za(e){return{kind:"validation",type:"url",reference:za,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&te(this,"URL",t,r),t}}}function Sc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function $i(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ua(){return{kind:"schema",type:"any",reference:Ua,expects:"any",async:!1,get"~standard"(){return be(this)},"~run"(e){return e.typed=!0,e}}}function Ii(e,t){return{kind:"schema",type:"array",reference:Ii,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return be(this)},"~run"(r,i){var a;const n=r.value;if(Array.isArray(n)){r.typed=!0,r.value=[];for(let o=0;o<n.length;o++){const s=n[o],l=this.item["~run"]({value:s},i);if(l.issues){const d={type:"array",origin:"value",input:n,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(d):p.path=[d],(a=r.issues)==null||a.push(p);if(r.issues||(r.issues=l.issues),i.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else te(this,"type",r,i);return r}}}function kr(e){return{kind:"schema",type:"boolean",reference:kr,expects:"boolean",async:!1,message:e,get"~standard"(){return be(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:te(this,"type",t,r),t}}}function Ai(e,t){return{kind:"schema",type:"literal",reference:Ai,expects:ct(e),async:!1,literal:e,message:t,get"~standard"(){return be(this)},"~run"(r,i){return r.value===this.literal?r.typed=!0:te(this,"type",r,i),r}}}function Ha(e,t){return{kind:"schema",type:"nullable",reference:Ha,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return be(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=$i(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Ht(e){return{kind:"schema",type:"number",reference:Ht,expects:"number",async:!1,message:e,get"~standard"(){return be(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:te(this,"type",t,r),t}}}function ce(e,t){return{kind:"schema",type:"object",reference:ce,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return be(this)},"~run"(r,i){var a;const n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in n||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in n?n[o]:$i(s),d=s["~run"]({value:l},i);if(d.issues){const p={type:"object",origin:"value",input:n,key:o,value:l};for(const u of d.issues)u.path?u.path.unshift(p):u.path=[p],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),r.value[o]=d.value}else if(s.fallback!==void 0)r.value[o]=Sc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(te(this,"key",r,i,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:n,key:o,value:n[o]}]}),i.abortEarly))break}}else te(this,"type",r,i);return r}}}function Ie(e,t){return{kind:"schema",type:"optional",reference:Ie,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return be(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=$i(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function qa(e,t){return{kind:"schema",type:"picklist",reference:qa,expects:Pa(e.map(ct),"|"),async:!1,options:e,message:t,get"~standard"(){return be(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:te(this,"type",r,i),r}}}function Ti(e,t,r){return{kind:"schema",type:"record",reference:Ti,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return be(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const l in a)if(yc(a,l)){const d=a[l],p=this.key["~run"]({value:l},n);if(p.issues){const g={type:"object",origin:"key",input:a,key:l,value:d};for(const v of p.issues)v.path=[g],(o=i.issues)==null||o.push(v);if(i.issues||(i.issues=p.issues),n.abortEarly){i.typed=!1;break}}const u=this.value["~run"]({value:d},n);if(u.issues){const g={type:"object",origin:"value",input:a,key:l,value:d};for(const v of u.issues)v.path?v.path.unshift(g):v.path=[g],(s=i.issues)==null||s.push(v);if(i.issues||(i.issues=u.issues),n.abortEarly){i.typed=!1;break}}(!p.typed||!u.typed)&&(i.typed=!1),p.typed&&(i.value[p.value]=u.value)}}else te(this,"type",i,n);return i}}}function J(e){return{kind:"schema",type:"string",reference:J,expects:"string",async:!1,message:e,get"~standard"(){return be(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:te(this,"type",t,r),t}}}function Wa(e){let t;if(e)for(const r of e)t?t.push(...r.issues):t=r.issues;return t}function Ni(e,t){return{kind:"schema",type:"union",reference:Ni,expects:Pa(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return be(this)},"~run"(r,i){let n,a,o;for(const s of this.options){const l=s["~run"]({value:r.value},i);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{n=l;break}else o?o.push(l):o=[l]}if(n)return n;if(a){if(a.length===1)return a[0];te(this,"type",r,i,{issues:Wa(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];te(this,"type",r,i,{issues:Wa(o)})}return r}}}function Cc(e,t,r){const i=e["~run"]({value:t},_r(r));if(i.issues)throw new xc(i.issues);return i.value}function Ec(e,t){const r={};for(const i in e.entries)r[i]=!t||t.includes(i)?Ie(e.entries[i]):e.entries[i];return{...e,entries:r,get"~standard"(){return be(this)}}}function He(...e){return{...e[0],pipe:e,get"~standard"(){return be(this)},"~run"(t,r){for(const i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i["~run"](t,r))}return t}}}function $c(e,t,r){const i=e["~run"]({value:t},_r(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}async function Ic(e,t,r){const i=await e["~run"]({value:t},_r(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}const Ka=He(Ni([J(),Ht()]),xr(String)),Ga=ce({id:Ka,version:Ht(),build:Ht(),nodes:Ii(Ua()),context_schema:Ie(Ha(Ti(J(),ce({required:kr(),type:Ni([Ai("string"),Ai("number")])}))))}),Ac=ce({flow:Ga}),Tc=ce({company:ce({name:J()}),flow:Ga,job:ce({id:Ka,title:J()}),user:Ie(ce({city:Ie(J()),country:Ie(J()),isEU:Ie(kr()),continent:Ie(J())}))}),Nc={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Es(),response:Tc}},Fc={pathname:"/flow/id/:id",method:"GET",schema:{response:Ac}};var Vc=["1","2","3","4","5","6","7","8","9","10","11","12"],Dc={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]}},Mc=(e,t=1,r)=>i=>{const[n,a]=Dc[r][i];return"oklch("+n+"% "+a*t+" "+e+")"},Fi=e=>{const t=Mc(e.hue,e.chroma,e.mode);return Object.fromEntries(Vc.map(r=>[e.prefix+r,e.transform(t(r))]))},Vi=e=>e,Lc=e=>{const t=Object.keys(e).flatMap(r=>{const i=e[r];return typeof i=="object"&&i!==null?Object.keys(i).map(n=>{const a=i[n];return[`${String(r)}.${n}`,a]}):[[r,i]]});return Object.fromEntries(t)},Sr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Di=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Sr(e)&&Sr(r))for(const i in r){const n=r[i];if(Sr(n)){e[i]||Object.assign(e,{[i]:{}});const a=e[i];Sr(a)&&Di(a,n)}else Object.assign(e,{[i]:r[i]})}return Di(e,...t)},Pc=e=>{function t(r,i){const n=[e.prefix,i.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${n}`:`var(--${n})`}return t},Oc=()=>({core:e=>({semantic:t=>({component:r=>({from:i=>{const{theme:n,getToken:a}=i,o=g=>a("reference",g.toString()),s=e({theme:n}),l=t({theme:n,core:o,raw:{core:s}}),d=r({theme:n,core:o,semantic:o,raw:{core:s,semantic:l}}),p=Lc(Di(s,l,d)),u=([g,v],b)=>{const _=[b,g].filter(Boolean).join(".");return typeof v=="object"?Object.entries(v).flatMap($=>u($,_)):[[i.getToken("declaration",_),v]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(g=>u(g))),ref:g=>a("reference",g.toString())}}})})})});const[Mi,Li,Ya]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],jc=Oc().core(({theme:e})=>({color:{black:Mi,white:Li,lowest:e.mode==="light"?Li:Mi,highest:e.mode==="light"?Mi:Li,...Fi({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Vi}),...Fi({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Vi}),...Fi({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Vi})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const i=(n,a)=>t.core.color[n].replace(")",` / ${a})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:i("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Ya,"bg-hover":i("n-10",.2),"bg-active":i("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:i})=>{const n=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:i(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":i(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":n("a-9",.05)},"status-bar":{bg:n("n-2",.8),"bg-button":Ya,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":i(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Bc=Pc({prefix:"i-"}),Rc=e=>{const t=jc.from({theme:e,getToken:Bc}),r=Object.entries(t.declarations).map(([i,n])=>`${i}: ${n};`);return`${_i} {
3
3
  ${r.concat(r).join(`
4
4
  `)}
5
- }`},Ep=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const i=t[n];if(!i)continue;const a=Ot(e,n,null);if(i.required&&a===null){const o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}switch(i.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},Ip=({_internal_domManager:e=Zf(),theme:t,terms:r,feedback:n})=>Ds(({apiClient:i,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:f})=>{let p=!1,u=0;const g=wf({locale:void 0,overrides:r??{}}),b=l&&f?Ms({environment:f,publishableKey:l,logger:o}):void 0,v=m=>m===u,_=()=>{if(typeof window>"u")return;u++,st.flushStateData().catch(()=>{}),N.cancelCurrentFlow(),N.inputHeight$.value=53,oe.isBotTyping$.value=!1;const m=e.getChatbotElement();m&&(nt(null,m),m.remove()),p=!1,o.info("Chatbot plugin destroyed")},E=()=>{if(typeof window>"u")return;const m=u,S=[we("style",{id:"inploi-chatbot-styles"},Xf),we("style",{id:"inploi-chatbot-theme"},$p(t))],T=e.getOrCreateChatbotElement();if(nt(we(ie,{},[S,we(Yf,{apiClient:i,logger:o,analytics:s,talentBankClient:b,params:{theme:t,terms:r,feedback:n}})]),T),n){const D=B=>{var Q,U;if(!v(m))return;const se=(Q=e.getChatbotElement())==null?void 0:Q.querySelector("dialog");se&&Tp({instance:B({rpcClient:a,apiClient:i,logger:o,analytics:s}),theme:t,terms:((U=n.params)==null?void 0:U.terms)??{},host:se})};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:B})=>{D(B())}).catch(B=>{o.error("Error preparing feedback plugin",B)}):D(n.plugin)}p=!0},y=async(m,S)=>{if(!v(S))return;Ep({context:m.context||{},schema:m.flow.context_schema,logger:o});const T=await N.prepareFlow(m);v(S)&&N.commitFlow(T)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;E(),o.info("Chatbot plugin prepared")}catch(m){o.error("Error preparing chatbot plugin",m)}},fetchFlowByJobId:async(m,S)=>a.request(vp,{params:{id:m},searchParams:{id_type:(S==null?void 0:S.idType)==="inploi"?"internal":"external"}}).then(T=>({flow:T.flow,title:T.job.title,flowKeys:[T.job.id,...(S==null?void 0:S.flowKeys)??[]],job:{id:T.job.id,id_type:"external"},...S,context:{user:T.user,...S==null?void 0:S.context}})),fetchFlowById:async(m,S)=>a.request(bp,{params:{id:m}}).then(T=>{var D;return{flow:T.flow,title:"Chatbot",flowKeys:(S==null?void 0:S.flowKeys)??[],...S,analytics:{customProperties:{flow_id:T.flow.id,flow_version:T.flow.version,...(D=S==null?void 0:S.analytics)==null?void 0:D.customProperties}}}}),open:async m=>{if(!(typeof window>"u"))try{N.cancelCurrentFlow(),N.viewState$.value="maximised",p||E();const S=u;m instanceof Promise?(N.current$.value={state:"loading"},m.then(T=>y(T,S)).catch(T=>{if(!v(S))return;const D=T instanceof Error?T.message:g("unknown_error");N.current$.value={state:"error",error:D}})):await y(m,S)}catch(S){o.error("Error starting flow",S)}},close:async()=>{typeof window>"u"||(N.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:_}});function Tp({instance:e,terms:t,theme:r,host:n}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Ip;const po=({condition:e,context:t,submissions:r,ifBlock:n})=>{const[i,...a]=e.compareKey.split(".");if(!i)return!1;const o=go({context:t,key:i,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=Ot(o.value,a.join("."));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"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const s=Ot(o.value,a.join(".")),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return Gt(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Gt(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Gt(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(qa)?Gt(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{const s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{const s=o.type==="phone"?Ir(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{const s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},Gt=(e,{context:t,submissions:r})=>{const n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(const a of n)if(po({condition:a,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(const a of n)if(!po({condition:a,context:t,submissions:r,ifBlock:e}))return!1;return!0}},Ap=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Me=(e,{context:t,submissions:r})=>e.replace(Ap,(n,i,a="")=>{const[o,...s]=i.trim().split("."),l=go({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(f=>`${f.name} (${Ut(f.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(f=>f&&f.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return Ir(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const f=Ot(l.value,s.join("."));switch(typeof f){case"boolean":return f===!0?"true":"false";case"string":return f;case"number":return f.toString();case"object":if(Array.isArray(f)&&f.every(qa))return f.join(", ")}break}}return a}),ho=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return ho({node:n,nodes:t,stopWhen:r})},Np=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const a=t.find(s=>s.id===i.branchId);if(!a)return!1;const o=ho({node:a,nodes:t,stopWhen:s=>s.id===e.id});return!(!o||o.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},Dp=({flow:e,analytics:t,logger:r,talentBankClient:n,context:i,apiClient:a,getSubmissions:o,chatService:s,onFlowEnd:l,onInterpret:f,t:p})=>{let u=new AbortController;const g={...t.service,log:v=>t.service.log({...v,customProperties:{...v.customProperties,...t.customProperties}})},b=async(v,_)=>{if(u.signal.aborted)return;const E=o();f==null||f(v,_);try{await Op({flow:e,analytics:g,logger:r,talentBankClient:n,apiClient:a,context:i,node:v,submissions:E,t:p,chat:{sendMessage:async y=>s.send({groupId:v.id,message:y,signal:u.signal}),userInput:async y=>s.input({input:y,signal:u.signal}),addToSubmissions:(y,m)=>{u.signal.aborted||s.addToSubmissions(y,m)}},next:y=>{const m=y?e.nodes.find(S=>S.id===y):Np({childNode:v,nodes:e.nodes});return m?b(m,v):l==null?void 0:l(v)},end:()=>l==null?void 0:l(v)})}catch(y){if(y instanceof lt)return;throw y}};return{interpret:async v=>{const _=e.nodes.find(E=>E.id===v)??Ha(e.nodes);return b(_)},undo:v=>{let _=1;const E=e.nodes.find(m=>m.id===v[v.length-1]);for(let m=v.length-2;m>0;m--){const S=v[m],T=e.nodes.find(D=>D.id===S);if(!T||(_++,T.type.startsWith("question-")))break}u.abort(),u=new AbortController;const y=e.nodes.find(m=>m.id===v[v.length-_]);return Fe(y,"Undo failed: new start node not found"),b(y,E),{removed:_}},abort:()=>{u.abort()}}},Ir=e=>`+${e.countryCode} ${e.phoneNumber}`;async function Op(e){const t=e.node;switch(t.type){case"text":return Bp({...e,node:t});case"image":return Up({...e,node:t});case"question-text":return Hp({...e,node:t});case"question-enum":return Gp({...e,node:t});case"question-number":return qp({...e,node:t});case"question-phone":return Kp({...e,node:t});case"question-boolean":return Wp({...e,node:t});case"question-file":return Jp({...e,node:t});case"question-address":return Yp({...e,node:t});case"end-flow":return Xp({...e,node:t});case"if-block":return zp({...e,node:t});case"jump":return Vp({...e,node:t});case"link":return Rp({...e,node:t});case"integration-application-submit":return jp({...e,node:t});case"add-submission":return Lp({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return Mp({...e,node:t});case"check-duplicate":return Pp({...e,node:t});case"feedback":return Fp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}const $t=(e,t)=>{var n;const r=(n=e[t])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${t}” is not a string or number`);return r};async function Fp({next:e,node:t}){e(t.nextId)}async function Mp({next:e,node:t,analytics:r,submissions:n,logger:i}){if(!n)return e(t.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:$t(n,t.data.key).toString(),first_name:t.data.firstName?$t(n,t.data.firstName).toString():void 0,last_name:t.data.lastName?$t(n,t.data.lastName).toString():void 0,email:t.data.email?$t(n,t.data.email).toString():void 0,phone_number:t.data.phoneNumber?$t(n,t.data.phoneNumber).toString():void 0,custom_traits:t.data.customTraits?Object.fromEntries(t.data.customTraits.map(({key:a,value:o})=>{var s;return[a,(s=n[o])==null?void 0:s.value]})):void 0}})}catch(a){i.error(a)}finally{e(t.nextId)}}async function Pp({next:e,node:t,talentBankClient:r,submissions:n,flow:i,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){const f=t.data.scope==="job"?(l=i.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||f!=null)try{s=await r.checkDuplicate({email:$t(n,t.data.email).toString(),jobId:f,scope:t.data.scope})}catch(p){a.error("[check-duplicate]",p)}}o.addToSubmissions(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Vp({next:e,node:t}){e(t.data.targetId)}async function Lp({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Me(t.data.value,{submissions:n,context:i})},e(t.nextId)}async function jp({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:a,analytics:o,flow:s,t:l}){const f=async p=>{p!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:u,session_id:g}=o.getSessionInfo(),b=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:u,session_id:g,job:s.job,submissions:Pf(a||{})})}).catch(v=>v);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:b}),at(b).with({integration_response:P.select(P.union({service:P.optional(P.string),status:P.number,data:P.any},{service:P.optional(P.string),status:P.number,error:{message:P.string,data:P.any}}))},v=>{o.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:v.service??"INVALID_SERVICE",response:{status:v.status,payload:"data"in v?v.data:v.error.data??null},job:s.job}})}).otherwise(()=>{}),await at(b).with({integration_response:{data:P.select("redirect",{redirect_url:P.string,message:P.optional(P.union(P.string,P.nullish)),button_text:P.optional(P.union(P.string,P.nullish))})}},async v=>{await e.sendMessage({type:"text",author:"bot",text:v.redirect.message??l("submission_redirect_message")});try{const _=new URL(v.redirect.redirect_url);u&&!_.searchParams.has("anonymous_id")&&_.searchParams.set("anonymous_id",u),await e.sendMessage({type:"link",href:_.toString(),text:v.redirect.button_text??l("complete_submission"),onClick:()=>{if(!g){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:g,flow_version:s.version,href:_.toString(),job:s.job}})}})}catch(_){n.error(`Invalid redirect URL: ${v.redirect.redirect_url}`,_),e.sendMessage({type:"system",variant:"error",text:l("redirect_url_error")})}t(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:l("submission_completed")}),t(r.nextId)}).with({integration_response:{error:P.select("error",{message:P.string})}},async v=>{n.error(v.error),await e.sendMessage({type:"system",variant:"error",text:v.error.message||l("submission_failed")}),await f(!1)}).otherwise(async v=>{n.error(v),await e.sendMessage({type:"system",variant:"error",text:l("submission_failed")}),await f(!1)})};await f(r.data.skipConfirmation)}async function Rp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({type:"link",href:Me(r.data.href,{submissions:n,context:i}),text:Me(r.data.cta,{submissions:n,context:i})}),t(r.nextId)}async function zp({submissions:e,next:t,node:r,context:n}){t(Gt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Bp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function Up({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Hp({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Ir(o.value):o.value}),t(r.nextId)}async function qp({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Kp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const a=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});a===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:a.type==="phone"?Ir(a.value):a.value}),t(r.nextId)}async function Gp({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function Wp({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Yp({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const i=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(i===null)await e.sendMessage({type:"system",variant:"info",text:n("skipped")});else{const a=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function Jp({node:e,chat:t,next:r,submissions:n,context:i,t:a}){await t.sendMessage({author:"bot",type:"text",text:Me(e.data.question,{submissions:n,context:i})});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(e.nextId)}async function Xp({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const go=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const i=Ot(n,t.join("."));switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r==null?void 0:r[e]};function vo(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function Zp({debounce:e,scroll:t,polyfill:r,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){const i=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,o]=Ce({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=ye({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),l=e?typeof e=="number"?e:e.scroll:null,f=e?typeof e=="number"?e:e.resize:null,p=ye(!1);Ee(()=>(p.current=!0,()=>void(p.current=!1)));const[u,g,b]=ze(()=>{const y=()=>{if(!s.current.element)return;const{left:m,top:S,width:T,height:D,bottom:B,right:se,x:Q,y:U}=s.current.element.getBoundingClientRect(),W={left:m,top:S,width:T,height:D,bottom:B,right:se,x:Q,y:U};s.current.element instanceof HTMLElement&&n&&(W.height=s.current.element.offsetHeight,W.width=s.current.element.offsetWidth),Object.freeze(W),p.current&&!rh(s.current.lastBounds,W)&&o(s.current.lastBounds=W)};return[y,f?vo(y,f):y,l?vo(y,l):y]},[o,n,l,f]);function v(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",b,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function _(){s.current.element&&(s.current.resizeObserver=new i(b),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(y=>y.addEventListener("scroll",b,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{b()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const E=y=>{!y||y===s.current.element||(v(),s.current.element=y,s.current.scrollContainers=bo(y),_())};return eh(b,!!t),Qp(g),Ee(()=>{v(),_()},[t,b,g]),Ee(()=>v,[]),[E,a,u]}function Qp(e){Ee(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function eh(e,t){Ee(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function bo(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...bo(e.parentElement)]}const th=["x","y","top","bottom","left","right","width","height"],rh=(e,t)=>th.every(r=>e[r]===t[r]),ut=({class:e,...t})=>{const{t:r}=le();return c("button",{class:Ke("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})},Et=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[c("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"truncate pr-1 text-sm",children:e.message})]}),dt=({class:e,...t})=>{const{t:r}=le();return c("button",{type:"button",class:Ke("fr touch-hitbox text-neutral-10 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},Bn={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"},Wt=it("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),nh="https://api.mapbox.com/search/searchbox/v1/suggest",ih="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",ah=e=>atob(e).split("").reverse().join(""),He=ce({name:J()}),oh=ce({suggestions:On(ce({full_address:Ie(J()),place_formatted:Ie(J()),name:Ie(J()),mapbox_id:J(),context:dp(ce({address:He,street:He,neighborhood:He,locality:He,district:He,place:He,region:He,postcode:He,country:He}))}))}),sh=({logger:e,t})=>ze(()=>{var n;const r=(n=N.current$.peek().flow)==null?void 0:n.data.flowSessionId;return r?{enabled:!0,getPredictions:async i=>{var u;const a=new URL(nh);a.searchParams.set("q",i),a.searchParams.set("session_token",r);const o=(u=N.current$.peek().flow)==null?void 0:u.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&a.searchParams.set("proximity",`${o.lng},${o.lat}`),a.searchParams.set("access_token",ah(ih));const l=await fetch(a);if(!l.ok)return e.error("Failed to get address details",l),{ok:!1,error:t("address_error")};const f=fp(oh,await l.json());if(f.success===!1)return e.error("Failed to parse address details",f.issues),{ok:!1,error:t("address_error")};const{suggestions:p}=f.output;return{ok:!0,data:p.map(g=>{var b,v,_,E,y,m,S,T,D;return{label:g.full_address??g.place_formatted??g.name??g.mapbox_id,id:g.mapbox_id,address:{line1:((b=g.context.address)==null?void 0:b.name)??((v=g.context.street)==null?void 0:v.name),line2:void 0,line3:((_=g.context.neighborhood)==null?void 0:_.name)??((E=g.context.locality)==null?void 0:E.name),city:((y=g.context.place)==null?void 0:y.name)??((m=g.context.district)==null?void 0:m.name),state:(S=g.context.region)==null?void 0:S.name,postcode:(T=g.context.postcode)==null?void 0:T.name,country:(D=g.context.country)==null?void 0:D.name}}})}}}:{enabled:!1}},[e,t]),wo=e=>{const{t}=le();return c("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},lh=({input:e,onSubmitSuccess:t,logger:r})=>{const{t:n}=le(),[i,a]=Ce(),[o,s]=Ce([]),{enabled:l,getPredictions:f}=sh({logger:r,t:n}),[p,u]=Ce(l?"query":"manual"),[g,b]=Ce(""),[v,_]=Ce(),E=y=>{Fe(l,"Query state should not be enabled"),y=y.trim(),y!==(g==null?void 0:g.trim())&&(b(y),y===""&&s([]),_(void 0),f(y).then(m=>{if(m.ok===!1){s([]),_(m.error);return}s(m.data)}))};switch(p){case"query":return Fe(l,"Query state should not be enabled"),c(ch,{input:e,onSkip:()=>t(null),onAddressSelect:y=>{if(y===""){a(void 0),u("manual");return}const m=o.find(S=>S.id===y);m&&(a(m.address),u("details"))},onAddressSearch:y=>{E(y)},suggestions:o,query:g,error:v});case"details":return Fe(i!==void 0),c(yo,{input:e,logger:r,onSubmitSuccess:t,addressFields:i,actions:c(wo,{onClick:()=>{u("query")}})});case"manual":return c(yo,{logger:r,input:e,onSubmitSuccess:t,addressFields:{},actions:l?c(wo,{onClick:()=>{u("query")}}):void 0})}},ch=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:i,onAddressSearch:a,error:o})=>{const{t:s}=le(),l=ye(null);return me(()=>{l.current&&(l.current.focus(),l.current.select())},[]),c(ie,{children:[c("form",{noValidate:!0,onSubmit:f=>{f.preventDefault();const u=new FormData(f.currentTarget).get("address");typeof u=="string"&&a(u)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||s("address_search"),defaultValue:i,class:Wt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]}),c("span",{class:"sr-only",children:s("search")})]})})]}),e.config.optional&&c(dt,{class:"relative",onClick:t})]}),o?c(Et,{error:{message:o}}):null,c("ul",{children:[r.map(f=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(f.id)},children:[c("span",{class:"flex-grow",children:f.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"})})]})},f.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n("")},children:c("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},mo=["line1","line2","line3","city","state","postcode","country"],yo=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const i=ye(null);me(()=>{if(i.current){const s=i.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const a=Object.keys(Bn),{t:o}=le();return c("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const l=new FormData(s.currentTarget),f=Object.fromEntries(l.entries());t({type:"address",value:f})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:mo.map((s,l)=>{const f=`isdk_${s}`,p=n.config.keys[s];return p?c(ie,{children:[c("label",{for:f,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:o(s)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:p,id:f,defaultValue:e[s],required:!0,children:[e.country&&!a.includes(e.country)?c("option",{value:e[s],children:e[s]}):c("option",{value:"",children:o("select_country")}),a.map(u=>c("option",{value:u,children:u},u))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:l===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:p,id:f,defaultValue:e[s],required:!0}),l===mo.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"flex w-full flex-1 ",children:[c("div",{class:"flex-grow",children:r}),c(ut,{class:"flex items-center justify-center"})]})]})},Un=()=>{const e=ye(null);return Ee(()=>{var t;(t=e.current)==null||t.focus()},[]),e},_o=["true","false"],uh=so(_o),dh="answer",xo="flex items-center flex-wrap gap-2 p-2.5",ko="min-w-0 max-w-full flex-auto",So=an(({label:e,...t},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:c("p",{class:"text-center text-base",children:e})})),fh=({input:e,onSubmitSuccess:t})=>{const r=Un();return c("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=Rf(n).value,a=up(uh,i);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:xo,children:_o.map((n,i)=>c("li",{class:ko,children:c(So,{ref:i===0?r:null,type:"submit",name:dh,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(dt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},ph=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),hh=e=>e.reduce((t,r)=>t+r.sizeKb,0),gh=St("file"),Co=3,vh=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return c("div",{class:Ke("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:i}),c("span",{children:[".",n]})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Ut(e.sizeKb)})]})},$o=({class:e,...t})=>c("li",{class:Ke("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Eo=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},bh=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(Eo(n.name).toLowerCase()))},wh=(e,t)=>{const r=Eo(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},mh=({input:e,onSubmitSuccess:t})=>{var u;const r=(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key],[n,i]=Ce(gh(r)?r.value:[]),[a,o]=Ce(),s=n.length-Co,l=hh(n),f=Un(),{t:p}=le();return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:g=>(g.preventDefault(),o(void 0),n.length===0?o({type:"required",message:p("validation_file")}):e.config.extensions.length>0&&!bh({allowedExtensions:e.config.extensions,files:n})?o({type:"validate",message:`${p("validation_file_ext",{ext:e.config.extensions.join(", ")})}`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Ut(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?o({type:"invalid",message:p("validation_file_max",{count:1})}):t({type:"file",value:n})),children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:f,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?c(ie,{children:[c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,Co).map(g=>{const b=g.name.split(".").pop(),v=g.name.replace(new RegExp(`.${b}$`),"");return c($o,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:[".",b]})]})}),s>0?c($o,{children:["+",s," file",s!==1?"s":""]}):null]}),c("p",{class:"text-neutral-11 text-xs",children:[Ut(l)," ",n.length>1?"total":""]})]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",p("file_max_size",{size:Ut(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(g=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:g.replace(".","")}))})]})]}),c("input",{id:"dropzone-file",onInput:async g=>{Fe(g.target instanceof HTMLInputElement);const b=g.target.files?Array.from(g.target.files):[],v=await Promise.allSettled(b.map(async E=>{const y=await ph(E);return{name:wh(E.name,42),data:y,sizeKb:E.size/1e3}}));if(v.some(({status:E})=>E==="rejected"))return o({type:"invalid",message:"Invalid file"});const _=v.map(E=>E.status==="fulfilled"?E.value:null).filter(Boolean);i(_)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(ut,{disabled:n.length===0}),e.config.optional&&c(dt,{class:"relative",onClick:()=>t(null)})]})]}),c(Et,{error:a})]})};var Yt=e=>e.type==="checkbox",ft=e=>e instanceof Date,be=e=>e==null;const Io=e=>typeof e=="object";var X=e=>!be(e)&&!Array.isArray(e)&&Io(e)&&!ft(e),yh=e=>X(e)&&e.target?Yt(e.target)?e.target.checked:e.target.value:e,_h=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,xh=(e,t)=>e.has(_h(t)),kh=e=>{const t=e.constructor&&e.constructor.prototype;return X(t)&&t.hasOwnProperty("isPrototypeOf")},Hn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function re(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Hn&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(X(e)&&kh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=re(e[i]));return n}var Tr=e=>/^\w*$/.test(e),G=e=>e===void 0,qn=e=>Array.isArray(e)?e.filter(Boolean):[],Kn=e=>qn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),$=(e,t,r)=>{if(!t||!X(e))return r;const n=(Tr(t)?[t]:Kn(t)).reduce((i,a)=>be(i)?i:i[a],e);return G(n)||n===e?G(e[t])?r:e[t]:n},Pe=e=>typeof e=="boolean",Te=e=>typeof e=="function",z=(e,t,r)=>{let n=-1;const i=Tr(t)?[t]:Kn(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const f=e[s];l=X(f)||Array.isArray(f)?f:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const To={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ae={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},qe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Sh=de.createContext(null);Sh.displayName="HookFormControlContext";var Ch=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ae.all&&(t._proxyFormState[o]=!n||Ae.all),r&&(r[o]=!0),e[o]}});return i};const $h=typeof window<"u"?de.useLayoutEffect:de.useEffect;var _e=e=>typeof e=="string",Eh=(e,t,r,n,i)=>_e(e)?(n&&t.watch.add(e),$(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),$(r,a))):(n&&(t.watchAll=!0),r),Gn=e=>be(e)||!Io(e);function et(e,t,r=new WeakSet){if(Gn(e)||Gn(t))return Object.is(e,t);if(ft(e)&&ft(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const o=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const s=t[a];if(ft(o)&&ft(s)||X(o)&&X(s)||Array.isArray(o)&&Array.isArray(s)?!et(o,s,r):!Object.is(o,s))return!1}}return!0}const Ih=de.createContext(null);Ih.displayName="HookFormContext";var Ao=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Jt=e=>Array.isArray(e)?e:[e],No=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}};function Do(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t[n];if(i&&X(i)&&a){const o=Do(i,a);X(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var he=e=>X(e)&&!Object.keys(e).length,Wn=e=>e.type==="file",Ar=e=>{if(!Hn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Oo=e=>e.type==="select-multiple",Yn=e=>e.type==="radio",Th=e=>Yn(e)||Yt(e),Jn=e=>Ar(e)&&e.isConnected;function Ah(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=G(e)?n++:e[t[n++]];return e}function Nh(e){for(const t in e)if(e.hasOwnProperty(t)&&!G(e[t]))return!1;return!0}function Z(e,t){const r=Array.isArray(t)?t:Tr(t)?[t]:Kn(t),n=r.length===1?e:Ah(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(X(n)&&he(n)||Array.isArray(n)&&Nh(n))&&Z(e,r.slice(0,-1)),e}var Dh=e=>{for(const t in e)if(Te(e[t]))return!0;return!1};function Fo(e){return Array.isArray(e)||X(e)&&!Dh(e)}function Xn(e,t={}){for(const r in e){const n=e[r];Fo(n)?(t[r]=Array.isArray(n)?[]:{},Xn(n,t[r])):G(n)||(t[r]=!0)}return t}function It(e,t,r){r||(r=Xn(t));for(const n in e){const i=e[n];if(Fo(i))G(t)||Gn(r[n])?r[n]=Xn(i,Array.isArray(i)?[]:{}):It(i,be(t)?{}:t[n],r[n]);else{const a=t[n];r[n]=!et(i,a)}}return r}const Mo={value:!1,isValid:!1},Po={value:!0,isValid:!0};var Vo=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!G(e[0].attributes.value)?G(e[0].value)||e[0].value===""?Po:{value:e[0].value,isValid:!0}:Po:Mo}return Mo},Lo=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>G(e)?e:t?e===""?NaN:e&&+e:r&&_e(e)?new Date(e):n?n(e):e;const jo={isValid:!1,value:null};var Ro=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,jo):jo;function zo(e){const t=e.ref;return Wn(t)?t.files:Yn(t)?Ro(e.refs).value:Oo(t)?[...t.selectedOptions].map(({value:r})=>r):Yt(t)?Vo(e.refs).value:Lo(G(t.value)?e.ref.value:t.value,e)}var Oh=(e,t,r,n)=>{const i={};for(const a of e){const o=$(t,a);o&&z(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Nr=e=>e instanceof RegExp,Xt=e=>G(e)?e:Nr(e)?e.source:X(e)?Nr(e.value)?e.value.source:e.value:e,Bo=e=>({isOnSubmit:!e||e===Ae.onSubmit,isOnBlur:e===Ae.onBlur,isOnChange:e===Ae.onChange,isOnAll:e===Ae.all,isOnTouch:e===Ae.onTouched});const Uo="AsyncFunction";var Fh=e=>!!e&&!!e.validate&&!!(Te(e.validate)&&e.validate.constructor.name===Uo||X(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Uo)),Mh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ho=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Zt=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=$(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Zt(s,t))break}else if(X(s)&&Zt(s,t))break}}};function qo(e,t,r){const n=$(e,r);if(n||Tr(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=$(t,a),s=$(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var Ph=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return he(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||Ae.all))},Vh=(e,t,r)=>!e||!t||e===t||Jt(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Lh=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,jh=(e,t)=>!qn($(e,t)).length&&Z(e,t),Rh=(e,t,r)=>{const n=Jt($(e,r));return z(n,"root",t[r]),z(e,r,n),e};function Ko(e,t,r="validate"){if(_e(e)||Array.isArray(e)&&e.every(_e)||Pe(e)&&!e)return{type:r,message:_e(e)?e:"",ref:t}}var Tt=e=>X(e)&&!Nr(e)?e:{value:e,message:""},Go=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:f,minLength:p,min:u,max:g,pattern:b,validate:v,name:_,valueAsNumber:E,mount:y}=e._f,m=$(r,_);if(!y||t.has(_))return{};const S=s?s[0]:o,T=F=>{i&&S.reportValidity&&(S.setCustomValidity(Pe(F)?"":F||""),S.reportValidity())},D={},B=Yn(o),se=Yt(o),Q=B||se,U=(E||Wn(o))&&G(o.value)&&G(m)||Ar(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,W=Ao.bind(null,_,n,D),Fr=(F,V,ne,ue=qe.maxLength,Ne=qe.minLength)=>{const xe=F?V:ne;D[_]={type:F?ue:Ne,message:xe,ref:o,...W(F?ue:Ne,xe)}};if(a?!Array.isArray(m)||!m.length:l&&(!Q&&(U||be(m))||Pe(m)&&!m||se&&!Vo(s).isValid||B&&!Ro(s).isValid)){const{value:F,message:V}=_e(l)?{value:!!l,message:l}:Tt(l);if(F&&(D[_]={type:qe.required,message:V,ref:S,...W(qe.required,V)},!n))return T(V),D}if(!U&&(!be(u)||!be(g))){let F,V;const ne=Tt(g),ue=Tt(u);if(!be(m)&&!isNaN(m)){const Ne=o.valueAsNumber||m&&+m;be(ne.value)||(F=Ne>ne.value),be(ue.value)||(V=Ne<ue.value)}else{const Ne=o.valueAsDate||new Date(m),xe=rr=>new Date(new Date().toDateString()+" "+rr),er=o.type=="time",tr=o.type=="week";_e(ne.value)&&m&&(F=er?xe(m)>xe(ne.value):tr?m>ne.value:Ne>new Date(ne.value)),_e(ue.value)&&m&&(V=er?xe(m)<xe(ue.value):tr?m<ue.value:Ne<new Date(ue.value))}if((F||V)&&(Fr(!!F,ne.message,ue.message,qe.max,qe.min),!n))return T(D[_].message),D}if((f||p)&&!U&&(_e(m)||a&&Array.isArray(m))){const F=Tt(f),V=Tt(p),ne=!be(F.value)&&m.length>+F.value,ue=!be(V.value)&&m.length<+V.value;if((ne||ue)&&(Fr(ne,F.message,V.message),!n))return T(D[_].message),D}if(b&&!U&&_e(m)){const{value:F,message:V}=Tt(b);if(Nr(F)&&!m.match(F)&&(D[_]={type:qe.pattern,message:V,ref:o,...W(qe.pattern,V)},!n))return T(V),D}if(v){if(Te(v)){const F=await v(m,r),V=Ko(F,S);if(V&&(D[_]={...V,...W(qe.validate,V.message)},!n))return T(V.message),D}else if(X(v)){let F={};for(const V in v){if(!he(F)&&!n)break;const ne=Ko(await v[V](m,r),S,V);ne&&(F={...ne,...W(V,ne.message)},T(ne.message),n&&(D[_]=F))}if(!he(F)&&(D[_]={ref:S,...F},!n))return D}}return T(!0),D};const zh={mode:Ae.onSubmit,reValidateMode:Ae.onChange,shouldFocusError:!0};function Bh(e={}){let t={...zh,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Te(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=X(t.defaultValues)||X(t.values)?re(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:re(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,f=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...p};let g={...u};const b={array:No(),state:No()},v=t.criteriaMode===Ae.all,_=d=>h=>{clearTimeout(f),f=setTimeout(d,h)},E=async d=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||g.isValid||d)){let h;t.resolver?(h=he((await Q()).errors),y()):h=await W(n,!0),h!==r.isValid&&b.state.next({isValid:h})}},y=(d,h)=>{!t.disabled&&(u.isValidating||u.validatingFields||g.isValidating||g.validatingFields)&&((d||Array.from(s.mount)).forEach(w=>{w&&(h?z(r.validatingFields,w,h):Z(r.validatingFields,w))}),b.state.next({validatingFields:r.validatingFields,isValidating:!he(r.validatingFields)}))},m=(d,h=[],w,C,k=!0,x=!0)=>{if(C&&w&&!t.disabled){if(o.action=!0,x&&Array.isArray($(n,d))){const A=w($(n,d),C.argA,C.argB);k&&z(n,d,A)}if(x&&Array.isArray($(r.errors,d))){const A=w($(r.errors,d),C.argA,C.argB);k&&z(r.errors,d,A),jh(r.errors,d)}if((u.touchedFields||g.touchedFields)&&x&&Array.isArray($(r.touchedFields,d))){const A=w($(r.touchedFields,d),C.argA,C.argB);k&&z(r.touchedFields,d,A)}(u.dirtyFields||g.dirtyFields)&&(r.dirtyFields=It(i,a)),b.state.next({name:d,isDirty:F(d,h),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else z(a,d,h)},S=(d,h)=>{z(r.errors,d,h),b.state.next({errors:r.errors})},T=d=>{r.errors=d,b.state.next({errors:r.errors,isValid:!1})},D=(d,h,w,C)=>{const k=$(n,d);if(k){const x=$(a,d,G(w)?$(i,d):w);G(x)||C&&C.defaultChecked||h?z(a,d,h?x:zo(k._f)):ue(d,x),o.mount&&!o.action&&E()}},B=(d,h,w,C,k)=>{let x=!1,A=!1;const L={name:d};if(!t.disabled){if(!w||C){(u.isDirty||g.isDirty)&&(A=r.isDirty,r.isDirty=L.isDirty=F(),x=A!==L.isDirty);const j=et($(i,d),h);A=!!$(r.dirtyFields,d),j?Z(r.dirtyFields,d):z(r.dirtyFields,d,!0),L.dirtyFields=r.dirtyFields,x=x||(u.dirtyFields||g.dirtyFields)&&A!==!j}if(w){const j=$(r.touchedFields,d);j||(z(r.touchedFields,d,w),L.touchedFields=r.touchedFields,x=x||(u.touchedFields||g.touchedFields)&&j!==w)}x&&k&&b.state.next(L)}return x?L:{}},se=(d,h,w,C)=>{const k=$(r.errors,d),x=(u.isValid||g.isValid)&&Pe(h)&&r.isValid!==h;if(t.delayError&&w?(l=_(()=>S(d,w)),l(t.delayError)):(clearTimeout(f),l=null,w?z(r.errors,d,w):Z(r.errors,d)),(w?!et(k,w):k)||!he(C)||x){const A={...C,...x&&Pe(h)?{isValid:h}:{},errors:r.errors,name:d};r={...r,...A},b.state.next(A)}},Q=async d=>(y(d,!0),await t.resolver(a,t.context,Oh(d||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),U=async d=>{const{errors:h}=await Q(d);if(y(d),d)for(const w of d){const C=$(h,w);C?z(r.errors,w,C):Z(r.errors,w)}else r.errors=h;return h},W=async(d,h,w={valid:!0})=>{for(const C in d){const k=d[C];if(k){const{_f:x,...A}=k;if(x){const L=s.array.has(x.name),j=k._f&&Fh(k._f);j&&u.validatingFields&&y([x.name],!0);const ge=await Go(k,s.disabled,a,v,t.shouldUseNativeValidation&&!h,L);if(j&&u.validatingFields&&y([x.name]),ge[x.name]&&(w.valid=!1,h||e.shouldUseNativeValidation))break;!h&&($(ge,x.name)?L?Rh(r.errors,ge,x.name):z(r.errors,x.name,ge[x.name]):Z(r.errors,x.name))}!he(A)&&await W(A,h,w)}}return w.valid},Fr=()=>{for(const d of s.unMount){const h=$(n,d);h&&(h._f.refs?h._f.refs.every(w=>!Jn(w)):!Jn(h._f.ref))&&Zn(d)}s.unMount=new Set},F=(d,h)=>!t.disabled&&(d&&h&&z(a,d,h),!et(ts(),i)),V=(d,h,w)=>Eh(d,s,{...o.mount?a:G(h)?i:_e(d)?{[d]:h}:h},w,h),ne=d=>qn($(o.mount?a:i,d,t.shouldUnregister?$(i,d,[]):[])),ue=(d,h,w={})=>{const C=$(n,d);let k=h;if(C){const x=C._f;x&&(!x.disabled&&z(a,d,Lo(h,x)),k=Ar(x.ref)&&be(h)?"":h,Oo(x.ref)?[...x.ref.options].forEach(A=>A.selected=k.includes(A.value)):x.refs?Yt(x.ref)?x.refs.forEach(A=>{(!A.defaultChecked||!A.disabled)&&(Array.isArray(k)?A.checked=!!k.find(L=>L===A.value):A.checked=k===A.value||!!k)}):x.refs.forEach(A=>A.checked=A.value===k):Wn(x.ref)?x.ref.value="":(x.ref.value=k,x.ref.type||b.state.next({name:d,values:re(a)})))}(w.shouldDirty||w.shouldTouch)&&B(d,k,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&rr(d)},Ne=(d,h,w)=>{for(const C in h){if(!h.hasOwnProperty(C))return;const k=h[C],x=d+"."+C,A=$(n,x);(s.array.has(d)||X(k)||A&&!A._f)&&!ft(k)?Ne(x,k,w):ue(x,k,w)}},xe=(d,h,w={})=>{const C=$(n,d),k=s.array.has(d),x=re(h);z(a,d,x),k?(b.array.next({name:d,values:re(a)}),(u.isDirty||u.dirtyFields||g.isDirty||g.dirtyFields)&&w.shouldDirty&&b.state.next({name:d,dirtyFields:It(i,a),isDirty:F(d,x)})):C&&!C._f&&!be(x)?Ne(d,x,w):ue(d,x,w),Ho(d,s)?b.state.next({...r,name:d,values:re(a)}):b.state.next({name:o.mount?d:void 0,values:re(a)})},er=async d=>{o.mount=!0;const h=d.target;let w=h.name,C=!0;const k=$(n,w),x=j=>{C=Number.isNaN(j)||ft(j)&&isNaN(j.getTime())||et(j,$(a,w,j))},A=Bo(t.mode),L=Bo(t.reValidateMode);if(k){let j,ge;const pt=h.type?zo(k._f):yh(d),tt=d.type===To.BLUR||d.type===To.FOCUS_OUT,Bg=!Mh(k._f)&&!t.resolver&&!$(r.errors,w)&&!k._f.deps||Lh(tt,$(r.touchedFields,w),r.isSubmitted,L,A),ti=Ho(w,s,tt);z(a,w,pt),tt?(!h||!h.readOnly)&&(k._f.onBlur&&k._f.onBlur(d),l&&l(0)):k._f.onChange&&k._f.onChange(d);const ri=B(w,pt,tt),Ug=!he(ri)||ti;if(!tt&&b.state.next({name:w,type:d.type,values:re(a)}),Bg)return(u.isValid||g.isValid)&&(t.mode==="onBlur"?tt&&E():tt||E()),Ug&&b.state.next({name:w,...ti?{}:ri});if(!tt&&ti&&b.state.next({...r}),t.resolver){const{errors:us}=await Q([w]);if(y([w]),x(pt),C){const Hg=qo(r.errors,n,w),ds=qo(us,n,Hg.name||w);j=ds.error,w=ds.name,ge=he(us)}}else y([w],!0),j=(await Go(k,s.disabled,a,v,t.shouldUseNativeValidation))[w],y([w]),x(pt),C&&(j?ge=!1:(u.isValid||g.isValid)&&(ge=await W(n,!0)));C&&(k._f.deps&&(!Array.isArray(k._f.deps)||k._f.deps.length>0)&&rr(k._f.deps),se(w,ge,j,ri))}},tr=(d,h)=>{if($(r.errors,h)&&d.focus)return d.focus(),1},rr=async(d,h={})=>{let w,C;const k=Jt(d);if(t.resolver){const x=await U(G(d)?d:k);w=he(x),C=d?!k.some(A=>$(x,A)):w}else d?(C=(await Promise.all(k.map(async x=>{const A=$(n,x);return await W(A&&A._f?{[x]:A}:A)}))).every(Boolean),!(!C&&!r.isValid)&&E()):C=w=await W(n);return b.state.next({...!_e(d)||(u.isValid||g.isValid)&&w!==r.isValid?{}:{name:d},...t.resolver||!d?{isValid:w}:{},errors:r.errors}),h.shouldFocus&&!C&&Zt(n,tr,d?k:s.mount),C},ts=(d,h)=>{let w={...o.mount?a:i};return h&&(w=Do(h.dirtyFields?r.dirtyFields:r.touchedFields,w)),G(d)?w:_e(d)?$(w,d):d.map(C=>$(w,C))},rs=(d,h)=>({invalid:!!$((h||r).errors,d),isDirty:!!$((h||r).dirtyFields,d),error:$((h||r).errors,d),isValidating:!!$(r.validatingFields,d),isTouched:!!$((h||r).touchedFields,d)}),Mg=d=>{const h=d?Jt(d):void 0;h==null||h.forEach(w=>Z(r.errors,w)),h?h.forEach(w=>{b.state.next({name:w,errors:r.errors})}):b.state.next({errors:{}})},ns=(d,h,w)=>{const C=($(n,d,{_f:{}})._f||{}).ref,k=$(r.errors,d)||{},{ref:x,message:A,type:L,...j}=k;z(r.errors,d,{...j,...h,ref:C}),b.state.next({name:d,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&C&&C.focus&&C.focus()},Pg=(d,h)=>Te(d)?b.state.subscribe({next:w=>"values"in w&&d(V(void 0,h),w)}):V(d,h,!0),is=d=>b.state.subscribe({next:h=>{Vh(d.name,h.name,d.exact)&&Ph(h,d.formState||u,zg,d.reRenderRoot)&&d.callback({values:{...a},...r,...h,defaultValues:i})}}).unsubscribe,Vg=d=>(o.mount=!0,g={...g,...d.formState},is({...d,formState:{...p,...d.formState}})),Zn=(d,h={})=>{for(const w of d?Jt(d):s.mount)s.mount.delete(w),s.array.delete(w),h.keepValue||(Z(n,w),Z(a,w)),!h.keepError&&Z(r.errors,w),!h.keepDirty&&Z(r.dirtyFields,w),!h.keepTouched&&Z(r.touchedFields,w),!h.keepIsValidating&&Z(r.validatingFields,w),!t.shouldUnregister&&!h.keepDefaultValue&&Z(i,w);b.state.next({values:re(a)}),b.state.next({...r,...h.keepDirty?{isDirty:F()}:{}}),!h.keepIsValid&&E()},as=({disabled:d,name:h})=>{if(Pe(d)&&o.mount||d||s.disabled.has(h)){const k=s.disabled.has(h)!==!!d;d?s.disabled.add(h):s.disabled.delete(h),k&&o.mount&&!o.action&&E()}},Qn=(d,h={})=>{let w=$(n,d);const C=Pe(h.disabled)||Pe(t.disabled);return z(n,d,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:d}},name:d,mount:!0,...h}}),s.mount.add(d),w?as({disabled:Pe(h.disabled)?h.disabled:t.disabled,name:d}):D(d,!0,h.value),{...C?{disabled:h.disabled||t.disabled}:{},...t.progressive?{required:!!h.required,min:Xt(h.min),max:Xt(h.max),minLength:Xt(h.minLength),maxLength:Xt(h.maxLength),pattern:Xt(h.pattern)}:{},name:d,onChange:er,onBlur:er,ref:k=>{if(k){Qn(d,h),w=$(n,d);const x=G(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,A=Th(x),L=w._f.refs||[];if(A?L.find(j=>j===x):x===w._f.ref)return;z(n,d,{_f:{...w._f,...A?{refs:[...L.filter(Jn),x,...Array.isArray($(i,d))?[{}]:[]],ref:{type:x.type,name:d}}:{ref:x}}}),D(d,!1,void 0,x)}else w=$(n,d,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||h.shouldUnregister)&&!(xh(s.array,d)&&o.action)&&s.unMount.add(d)}}},ei=()=>t.shouldFocusError&&Zt(n,tr,s.mount),Lg=d=>{Pe(d)&&(b.state.next({disabled:d}),Zt(n,(h,w)=>{const C=$(n,w);C&&(h.disabled=C._f.disabled||d,Array.isArray(C._f.refs)&&C._f.refs.forEach(k=>{k.disabled=C._f.disabled||d}))},0,!1))},os=(d,h)=>async w=>{let C;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let k=re(a);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:x,values:A}=await Q();y(),r.errors=x,k=re(A)}else await W(n);if(s.disabled.size)for(const x of s.disabled)Z(k,x);if(Z(r.errors,"root"),he(r.errors)){b.state.next({errors:{}});try{await d(k,w)}catch(x){C=x}}else h&&await h({...r.errors},w),ei(),setTimeout(ei);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:he(r.errors)&&!C,submitCount:r.submitCount+1,errors:r.errors}),C)throw C},jg=(d,h={})=>{$(n,d)&&(G(h.defaultValue)?xe(d,re($(i,d))):(xe(d,h.defaultValue),z(i,d,re(h.defaultValue))),h.keepTouched||Z(r.touchedFields,d),h.keepDirty||(Z(r.dirtyFields,d),r.isDirty=h.defaultValue?F(d,re($(i,d))):F()),h.keepError||(Z(r.errors,d),u.isValid&&E()),b.state.next({...r}))},ss=(d,h={})=>{const w=d?re(d):i,C=re(w),k=he(d),x=k?i:C;if(h.keepDefaultValues||(i=w),!h.keepValues){if(h.keepDirtyValues){const A=new Set([...s.mount,...Object.keys(It(i,a))]);for(const L of Array.from(A)){const j=$(r.dirtyFields,L),ge=$(a,L),pt=$(x,L);j&&!G(ge)?z(x,L,ge):!j&&!G(pt)&&xe(L,pt)}}else{if(Hn&&G(d))for(const A of s.mount){const L=$(n,A);if(L&&L._f){const j=Array.isArray(L._f.refs)?L._f.refs[0]:L._f.ref;if(Ar(j)){const ge=j.closest("form");if(ge){ge.reset();break}}}}if(h.keepFieldsRef)for(const A of s.mount)xe(A,$(x,A));else n={}}a=t.shouldUnregister?h.keepDefaultValues?re(i):{}:re(x),b.array.next({values:{...x}}),b.state.next({values:{...x}})}s={mount:h.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!h.keepIsValid||!!h.keepDirtyValues||!t.shouldUnregister&&!he(x),o.watch=!!t.shouldUnregister,o.keepIsValid=!!h.keepIsValid,o.action=!1,h.keepErrors||(r.errors={}),b.state.next({submitCount:h.keepSubmitCount?r.submitCount:0,isDirty:k?!1:h.keepDirty?r.isDirty:!!(h.keepDefaultValues&&!et(d,i)),isSubmitted:h.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:k?{}:h.keepDirtyValues?h.keepDefaultValues&&a?It(i,a):r.dirtyFields:h.keepDefaultValues&&d?It(i,d):h.keepDirty?r.dirtyFields:{},touchedFields:h.keepTouched?r.touchedFields:{},errors:h.keepErrors?r.errors:{},isSubmitSuccessful:h.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},ls=(d,h)=>ss(Te(d)?d(a):d,{...t.resetOptions,...h}),Rg=(d,h={})=>{const w=$(n,d),C=w&&w._f;if(C){const k=C.refs?C.refs[0]:C.ref;k.focus&&setTimeout(()=>{k.focus(),h.shouldSelect&&Te(k.select)&&k.select()})}},zg=d=>{r={...r,...d}},cs={control:{register:Qn,unregister:Zn,getFieldState:rs,handleSubmit:os,setError:ns,_subscribe:is,_runSchema:Q,_updateIsValidating:y,_focusError:ei,_getWatch:V,_getDirty:F,_setValid:E,_setFieldArray:m,_setDisabledField:as,_setErrors:T,_getFieldArray:ne,_reset:ss,_resetDefaultValues:()=>Te(t.defaultValues)&&t.defaultValues().then(d=>{ls(d,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:Fr,_disableForm:Lg,_subjects:b,_proxyFormState:u,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(d){o=d},get _defaultValues(){return i},get _names(){return s},set _names(d){s=d},get _formState(){return r},get _options(){return t},set _options(d){t={...t,...d}}},subscribe:Vg,trigger:rr,register:Qn,handleSubmit:os,watch:Pg,setValue:xe,getValues:ts,reset:ls,resetField:jg,clearErrors:Mg,unregister:Zn,setError:ns,setFocus:Rg,getFieldState:rs};return{...cs,formControl:cs}}function Dr(e={}){const t=de.useRef(void 0),r=de.useRef(void 0),[n,i]=de.useState({isDirty:!1,isValidating:!1,isLoading:Te(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:Te(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Te(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=Bh(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,$h(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),de.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),de.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),de.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),de.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),de.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),de.useEffect(()=>{var o;e.values&&!et(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),de.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=de.useMemo(()=>Ch(n,a),[a,n]),t.current}const Wo=(e,t,r)=>{if(e&&"reportValidity"in e){const n=$(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Uh=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Wo(n.ref,r,e):n.refs&&n.refs.forEach(i=>Wo(i,r,e))}},Hh=(e,t)=>{t.shouldUseNativeValidation&&Uh(e,t);const r={};for(const n in e){const i=$(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(qh(t.names||Object.keys(e),n)){const o=Object.assign({},$(r,n));z(o,"root",a),z(r,n,o)}else z(r,n,a)}return r},qh=(e,t)=>e.some(r=>r.startsWith(t+"."));var Or=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(pp(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var f=s.issues[0],p=op(f);if(p&&(l[p]||(l[p]={message:f.message,type:f.type}),o)){var u=l[p].types,g=u&&u[f.type];l[p]=Ao(p,o,l,f.type,g?[].concat(g,f.message):f.message)}s.issues.shift()}return{values:{},errors:Hh(l,a)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Yo=27,Jo=12,Xo=10,Kh=St("enum"),Gh=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Or(ce({checked:Ue(Mn(J(),$r()),Cr(n=>Object.entries(n).filter(([i,a])=>a).map(([i,a])=>i)),qt(r.max,t("validation_multiple_choice_max",{count:r.max})),Ct(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},Wh=an(({option:e,...t},r)=>c(ie,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Zo=it("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:xo}}}),Yh=({input:e,onSubmitSuccess:t})=>{var p,u;const r=e.key?(p=N.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,i=n&&e.config.options.length===2,{t:a}=le(),{register:o,handleSubmit:s,formState:{errors:l}}=Dr({defaultValues:{checked:n?{}:Kh(r)?Object.fromEntries(r.value.map(g=>[g,!0])):{}},resolver:Gh(e.config,a)}),f=Un();return i?c("ul",{style:{maxHeight:6.5*Yo+5*Jo+2*Xo},class:Zo({variant:"booleanLike"}),children:e.config.options.map((g,b)=>c("li",{class:ko,children:c(So,{type:"submit",ref:v=>{v&&b===0&&(f.current=v)},label:g.label,value:"true",onClick:()=>t({type:"enum",value:[g.value]})})},g.value))}):c("form",{noValidate:!0,onSubmit:g=>s(b=>{const v=b.checked;t({type:"enum",value:v})})(g),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Yo+5*Jo+2*Xo},class:Zo({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((g,b)=>{const v=`checked.${g.value}`,{ref:_,...E}=o(v);return c("li",{class:"relative",children:c(Wh,{option:g,autoFocus:b===0,ref:y=>{y&&b===0&&(f.current=y),_(y)},id:v,...E,onClick:n?()=>t({type:"enum",value:[g.value]}):void 0})},g.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:c(ut,{}),e.config.minSelected===0&&c(dt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(Et,{error:(u=l.checked)==null?void 0:u.root})})]})},Jh=St("number"),Xh=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return Or(ce({number:Ue(Kt(t("validation_number")),no(r,t("validation_number_min",{min:r})),ro(n,t("validation_number_max",{max:n})),eo(a=>a===Number(a.toFixed(i)),t("validation_number_decimal_cases",{count:i})))}))},Zh=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,n=e.key?(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:i}=le(),{register:a,handleSubmit:o,formState:{errors:s}}=Dr({defaultValues:{number:r?Number(r):Jh(n)?n.value:void 0},resolver:Xh(e.config,i)}),{ref:l,...f}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=ye();return me(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(g=>{g.number!==void 0&&t({type:"number",value:g.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...f,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:g=>{g&&(p.current=g),l(g)},type:"text",min:e.config.min,max:e.config.max,class:Wt({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(ut,{})]}),c(Et,{error:s.number})]})},Qh=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(Bn).find(i=>e.startsWith(i[1])),r=t?t[1]:"",n=e.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},eg="44",tg=/^[0-9 ]+$/,rg=St("string"),ng=St("phone"),ig=e=>{const t=Ue(J(e("validation_country_code")),Nn(tg,e("validation_country_code"))),r=Ue(J(e("validation_phone")),Ct(1,e("validation_phone")),Cr(n=>n.replace(/[^0-9]/g,"")));return Or(ce({countryCode:t,phoneNumber:r}))},ag=({input:e,onSubmitSuccess:t})=>{var _;const r=e.key?(_=N.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,{t:n}=le(),[i,a]=Ce(),o=rg(r)?Qh(r.value):ng(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:f},watch:p}=Dr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??eg,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:ig(n)}),{ref:u,...g}=s("phoneNumber",{required:!e.config.optional}),b=ye(),v=p("countryCode");return me(()=>{b.current&&(b.current.focus(),b.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(E=>{const y=E.phoneNumber.replace(/[^0-9]/g,""),m=E.countryCode.replace(/[^0-9]/g,"");a(void 0);const S=e.config.minChars??7,T=y.length+m.length;if(T<S)return a(n("validation_phone_min_chars",{count:S}));const D=e.config.maxChars;if(D!=null&&T>D)return a(n("validation_max_chars",{count:D}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:m,phoneNumber:y}}):t({type:"string",value:v+E.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(Bn).map(([E,y])=>c("option",{value:y,children:[E," (+",y,")"]},E))})]}),c("input",{...g,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:E=>{E&&(b.current=E),u(E)},class:Wt({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(ut,{})]}),c(Et,{error:f.countryCode||f.phoneNumber||{message:i}})]})},og=({input:e,onSubmitSuccess:t})=>c("div",{class:"flex flex-col items-center py-3",children:c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),sg={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},lg=St("string"),cg=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return Or(ce({text:{date:Ue(J(t("validation_date")),Nn(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:Ue(J(t("validation_email")),to(t("validation_email")),Ct(e.minChars??1,r.minLength),qt(e.maxChars??1/0,r.maxLength)),text:Ue(J(),Ct(e.minChars??1,r.minLength),qt(e.maxChars??1/0,r.maxLength)),url:Ue(J(t("validation_url")),io(t("validation_url")),Ct(e.minChars??1,r.minLength),qt(e.maxChars??1/0,r.maxLength))}[e.format]}))},ug={text:({input:e,onSubmitSuccess:t})=>{var u;const{t:r}=le(),n=e.key?(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:s}}=Dr({defaultValues:{text:i||(lg(n)?n.value:"")},resolver:cg(e.config,r)}),{ref:l,...f}=a("text",{required:!e.config.optional}),p=ye();return me(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(g=>{t({type:"string",value:g.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...f,...sg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:g=>{g&&(p.current=g),l(g)},placeholder:e.config.placeholder,class:Wt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(dt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(ut,{})]}),c(Et,{error:s.text})]})},phone:ag,"multiple-choice":Yh,boolean:fh,file:mh,submit:og,address:lh,number:Zh},dg=({logger:e})=>{var a;const t=(a=N.current$.value.flow)==null?void 0:a.data.currentInput,[r,n]=Zp(),i=ye(null);return N.inputHeight$.value=n.height,Ee(()=>{const o=i.current;if(o)return o.addEventListener("transitionstart",oe.scrollToEnd.smooth),o.addEventListener("transitioncancel",oe.scrollToEnd.smooth),o.addEventListener("transitionend",oe.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",oe.scrollToEnd.smooth),o.removeEventListener("transitioncancel",oe.scrollToEnd.smooth),o.removeEventListener("transitionend",oe.scrollToEnd.smooth)}},[]),c("div",{ref:i,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:n.height},children:c("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:t?(()=>{const o=ug[t.type];return c(o,{logger:e,onSubmitSuccess:oe.onSubmitSuccessFn$.value,input:t})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Wt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(ut,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var fg=function(e){return e instanceof RegExp},pg=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Qo=function(e){return typeof e=="string"},hg=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function gg(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Qo(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;fg(a)||(a=new RegExp("("+pg(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=i}return o}var vg=function(t,r,n){return Array.isArray(t)||(t=[t]),hg(t.map(function(i){return Qo(i)?gg(i,r,n):i}))};const Qt=pi(vg),bg=/(\[[^\]]+\]\([^)]+\))/g,wg=/\[([^\]]+)\]\(([^)]+)\)/,mg=/(https?:\/\/[^\s]+)/g,yg=/_(.*?)_/g,_g=/\*\*(.*?)\*\*/g,xg=/\\n|\n/g,es="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",kg=e=>{const t=Qt(e,bg,(o,s)=>{const[,l,f]=o.match(wg)??[];return f?c("a",{class:es,href:f,children:l??f},f+s):c("span",{children:"INVALID LINK"})}),r=Qt(t,mg,(o,s)=>c("a",{class:es,href:o,children:o},o+s)),n=Qt(r,yg,(o,s)=>c("em",{children:o},o+s)),i=Qt(n,_g,(o,s)=>c("strong",{children:o},o+s));return Qt(i,xg,(o,s)=>c("br",{},`br-${s}`))},Sg=it("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Cg=({children:e,className:t,animate:r,side:n,...i})=>c("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Sg({className:t,side:n,animate:r}),...i,children:e}),$g=({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"})})]})}),Eg=({className:e,...t})=>(Ee(()=>{oe.scrollToEnd.smooth()}),c("div",{"aria-hidden":!0,children:oe.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Ke("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),Ig={bot:"left",user:"right"},Tg=it("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),Ag=({lastSentMessageFooter:e})=>{var r;const t=((r=N.current$.value.flow)==null?void 0:r.data.messages)??[];return Ee(()=>{oe.scrollToEnd.smooth()},[t.length]),c("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,i)=>c(ie,{children:c("li",{class:"flex",children:at(n).with({type:"system"},a=>c("p",{class:Tg({variant:a.variant}),children:a.text})).with({type:"text",author:P.union("bot","user")},a=>{const o=a.author==="user"&&!t.slice(i+1).some(f=>f.type==="text"&&f.author==="user"),s=i===t.length-1,l=a.author==="bot"?kg(a.text):a.text;return c(ie,{children:[o?e:null,c(Cg,{animate:s,side:Ig[a.author],children:l},i)]})}).with({type:"link"},a=>c($g,{message:a})).with({type:"image"},a=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:a.url,style:{aspectRatio:a.width/a.height}})).with({type:"file"},a=>c(vh,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const o=t[t.length-1];return!(a===o)||oe.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Wa,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),c(Eg,{},"typing")]})},Ng=({logger:e,apiClient:t,analytics:r,talentBankClient:n})=>{const{flow:i}=N.current$.value;Fe(i,"Flow is required to exist to show chatbot body");const a=N.viewState$.value,{chatRef:o,chatService:s}=tp(),{t:l}=le(),[f,p]=Ce();return me(()=>{a==="maximised"&&oe.scrollToEnd.instant()},[a]),me(()=>{var y,m;const{state:u,flow:g}=N.current$.peek();if(u!=="loaded")throw new Error(l("invalid_state"));let b=g.data.nodeHistory.at(-1);if(oe.scrollToEnd.instant(),N.setInput(void 0),g.data.isFinished)return;b===void 0?(b=Ha(i.nodes).id,N.setCurrentNodeId(b),r.log({event:"FLOW_START",properties:{flow_id:i.id,flow_version:i.version,flow_session_id:g.data.flowSessionId,flow_build:i.build,job:i.job},customProperties:(y=i.analytics)==null?void 0:y.customProperties})):N.removeMessagesSentByNodeIds([b]);const{interpret:v,abort:_,undo:E}=Dp({context:i.context,analytics:{service:r,customProperties:(m=i.analytics)==null?void 0:m.customProperties},apiClient:t,logger:e,talentBankClient:n,flow:i,chatService:s,t:l,getSubmissions:()=>{var S;return(S=N.current$.peek().flow)==null?void 0:S.data.submissions},onInterpret:S=>N.setCurrentNodeId(S.id),onFlowEnd:async()=>{var T;N.markAsFinished();const S=N.current$.peek().flow;Fe(S),r.log({event:"FLOW_END",properties:{flow_id:i.id,flow_version:i.version,flow_session_id:S.data.flowSessionId,flow_build:i.build,job:i.job},customProperties:(T=i.analytics)==null?void 0:T.customProperties})}});return p(()=>E),v(b),_},[r,t,s,e,i,n,l]),c(ie,{children:[c("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:N.inputHeight$.value},children:c(Ag,{lastSentMessageFooter:i.data.isFinished||!f?null:c(Og,{undoFn:f})})}),c(dg,{logger:e})]})},Dg=e=>e.type==="identify"?[]:"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],Og=({undoFn:e})=>{const{t}=le();return c(kr,{onClick:async()=>{const{flow:r}=N.current$.peek();Fe(r);const{removed:n}=e(r.data.nodeHistory),i=r.data.nodeHistory.splice(-n);i.length!==0&&(N.removeMessagesSentByNodeIds(i),N.setInput(void 0),i.pop(),i.map(a=>r.nodes.find(o=>o.id===a)).filter(Boolean).flatMap(Dg).forEach(a=>delete r.data.submissions[a]),N.current$.value={...N.current$.value})},children:[c("title",{children:t("undo")}),c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})]})},Fg=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Ng},Symbol.toStringTag,{value:"Module"}))})();
5
+ }`},zc=({_internal_domManager:e=pc(),theme:t,terms:r,feedback:i})=>Ss(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:l,env:d})=>{let p=!1,u=0;const g=Ml({locale:void 0,overrides:r??{}}),v=l&&d?$s({environment:d,publishableKey:l,logger:o}):void 0,b=m=>m===u,_=()=>{if(typeof window>"u")return;u++,st.flushStateData().catch(()=>{}),N.cancelCurrentFlow(),N.inputHeight$.value=53,oe.isBotTyping$.value=!1;const m=e.getChatbotElement();m&&(nt(null,m),m.remove()),p=!1,o.info("Chatbot plugin destroyed")},$=()=>{if(typeof window>"u")return;const m=u,S=[we("style",{id:"inploi-chatbot-styles"},fc),we("style",{id:"inploi-chatbot-theme"},Rc(t))],A=e.getOrCreateChatbotElement();if(nt(we(ne,{},[S,we(uc,{apiClient:n,logger:o,analytics:s,talentBankClient:v,params:{theme:t,terms:r,feedback:i}})]),A),i){const F=z=>{var Q,U;if(!b(m))return;const se=(Q=e.getChatbotElement())==null?void 0:Q.querySelector("dialog");se&&Uc({instance:z({rpcClient:a,apiClient:n,logger:o,analytics:s}),theme:t,terms:((U=i.params)==null?void 0:U.terms)??{},host:se})};i.plugin instanceof Promise?i.plugin.then(({feedbackPlugin:z})=>{F(z())}).catch(z=>{o.error("Error preparing feedback plugin",z)}):F(i.plugin)}p=!0},y=async(m,S)=>{if(!b(S))return;is({context:m.context||{},schema:m.flow.context_schema,logger:o});const A=await N.prepareFlow(m);b(S)&&N.commitFlow(A)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(p)return;$(),o.info("Chatbot plugin prepared")}catch(m){o.error("Error preparing chatbot plugin",m)}},fetchFlowByJobId:async(m,S)=>a.request(Nc,{params:{id:m},searchParams:{id_type:(S==null?void 0:S.idType)==="inploi"?"internal":"external"}}).then(A=>({flow:A.flow,title:A.job.title,flowKeys:[A.job.id,...(S==null?void 0:S.flowKeys)??[]],job:{id:A.job.id,id_type:"external"},...S,context:{user:A.user,...S==null?void 0:S.context}})),fetchFlowById:async(m,S)=>a.request(Fc,{params:{id:m}}).then(A=>{var F;return{flow:A.flow,title:"Chatbot",flowKeys:(S==null?void 0:S.flowKeys)??[],...S,analytics:{customProperties:{flow_id:A.flow.id,flow_version:A.flow.version,...(F=S==null?void 0:S.analytics)==null?void 0:F.customProperties}}}}),open:async m=>{if(!(typeof window>"u"))try{N.cancelCurrentFlow(),N.viewState$.value="maximised",p||$();const S=u;m instanceof Promise?(N.current$.value={state:"loading"},m.then(A=>y(A,S)).catch(A=>{if(!b(S))return;const F=A instanceof Error?A.message:g("unknown_error");N.current$.value={state:"error",error:F}})):await y(m,S)}catch(S){o.error("Error starting flow",S)}},close:async()=>{typeof window>"u"||(N.cancelCurrentFlow(),o.info("Closed flow from an external source"))},destroy:_}});function Uc({instance:e,terms:t,theme:r,host:i}){e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:i})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=zc;var Ja=({condition:e,context:t,submissions:r,ifBlock:i})=>{let[n,...a]=e.compareKey.split(".");if(!n)return!1;let o=en({context:t,key:n,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=At(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=At(o.value,a),l={...i,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return qt(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return qt(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return qt(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(d=>typeof d=="string")?qt(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?tn(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${i.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},qt=(e,{context:t,submissions:r})=>{let i="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let n of i)if(Ja({condition:n,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let n of i)if(!Ja({condition:n,context:t,submissions:r,ifBlock:e}))return!1;return!0}},Hc=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,qc=(e,{context:t,submissions:r})=>e.replace(Hc,(i,n,a="")=>{let[o,...s]=n.trim().split("."),l=en({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${Tt(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 tn(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let d=At(l.value,s);switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(p=>typeof p=="string"))return d.join(", ")}break}}return a});const Za=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Me=(e,t)=>qc(e,Za(t)),Wc=(e,t)=>qt(e,Za(t)),Xa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const i=e.nextId?t.find(n=>n.id===e.nextId):void 0;if(i)return Xa({node:i,nodes:t,stopWhen:r})},Kc=({childNode:e,nodes:t})=>{const i=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;const a=t.find(s=>s.id===n.branchId);if(!a)return!1;const o=Xa({node:a,nodes:t,stopWhen:s=>s.id===e.id});return!(!o||o.id!==e.id)});if(i!=null&&i.nextId)return t.find(n=>n.id===i.nextId)},Gc=({flow:e,analytics:t,logger:r,talentBankClient:i,context:n,apiClient:a,getSubmissions:o,chatService:s,onFlowEnd:l,onInterpret:d,t:p})=>{let u=new AbortController;const g={...t.service,log:b=>t.service.log({...b,customProperties:{...b.customProperties,...t.customProperties}})},v=async(b,_)=>{if(u.signal.aborted)return;const $=o();d==null||d(b,_);try{await Yc({flow:e,analytics:g,logger:r,talentBankClient:i,apiClient:a,context:n,node:b,submissions:$,t:p,chat:{sendMessage:async y=>s.send({groupId:b.id,message:y,signal:u.signal}),userInput:async y=>s.input({input:y,signal:u.signal}),addToSubmissions:(y,m)=>{u.signal.aborted||s.addToSubmissions(y,m)}},next:y=>{const m=y?e.nodes.find(S=>S.id===y):Kc({childNode:b,nodes:e.nodes});return m?v(m,b):l==null?void 0:l(b)},end:()=>l==null?void 0:l(b)})}catch(y){if(y instanceof lt)return;throw y}};return{interpret:async b=>{const _=e.nodes.find($=>$.id===b)??Aa(e.nodes);return v(_)},undo:b=>{let _=1;const $=e.nodes.find(m=>m.id===b[b.length-1]);for(let m=b.length-2;m>0;m--){const S=b[m],A=e.nodes.find(F=>F.id===S);if(!A||(_++,A.type.startsWith("question-")))break}u.abort(),u=new AbortController;const y=e.nodes.find(m=>m.id===b[b.length-_]);return De(y,"Undo failed: new start node not found"),v(y,$),{removed:_}},abort:()=>{u.abort()}}},Qa=e=>`+${e.countryCode} ${e.phoneNumber}`;async function Yc(e){const t=e.node;switch(t.type){case"text":return nu({...e,node:t});case"image":return au({...e,node:t});case"question-text":return ou({...e,node:t});case"question-enum":return cu({...e,node:t});case"question-number":return su({...e,node:t});case"question-phone":return lu({...e,node:t});case"question-boolean":return uu({...e,node:t});case"question-file":return fu({...e,node:t});case"question-address":return du({...e,node:t});case"end-flow":return pu({...e,node:t});case"if-block":return iu({...e,node:t});case"jump":return Qc({...e,node:t});case"link":return ru({...e,node:t});case"integration-application-submit":return tu({...e,node:t});case"add-submission":return eu({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return Zc({...e,node:t});case"check-duplicate":return Xc({...e,node:t});case"feedback":return Jc({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}const St=(e,t)=>{var i;const r=(i=e[t])==null?void 0:i.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${t}” is not a string or number`);return r};async function Jc({next:e,node:t}){e(t.nextId)}async function Zc({next:e,node:t,analytics:r,submissions:i,logger:n}){if(!i)return e(t.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:St(i,t.data.key).toString(),first_name:t.data.firstName?St(i,t.data.firstName).toString():void 0,last_name:t.data.lastName?St(i,t.data.lastName).toString():void 0,email:t.data.email?St(i,t.data.email).toString():void 0,phone_number:t.data.phoneNumber?St(i,t.data.phoneNumber).toString():void 0,custom_traits:t.data.customTraits?Object.fromEntries(t.data.customTraits.map(({key:a,value:o})=>{var s;return[a,(s=i[o])==null?void 0:s.value]})):void 0}})}catch(a){n.error(a)}finally{e(t.nextId)}}async function Xc({next:e,node:t,talentBankClient:r,submissions:i,flow:n,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(i&&r){const d=t.data.scope==="job"?(l=n.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||d!=null)try{s=await r.checkDuplicate({email:St(i,t.data.email).toString(),jobId:d,scope:t.data.scope})}catch(p){a.error("[check-duplicate]",p)}}o.addToSubmissions(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Qc({next:e,node:t}){e(t.data.targetId)}async function eu({next:e,node:t,logger:r,submissions:i,context:n}){if(!i){r.error("Submissions not found");return}i[t.data.key]={type:"string",value:Me(t.data.value,{submissions:i,context:n})},e(t.nextId)}async function tu({chat:e,next:t,node:r,logger:i,apiClient:n,submissions:a,analytics:o,flow:s,t:l}){const d=async p=>{p!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:u,session_id:g}=o.getSessionInfo(),v=await n.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:u,session_id:g,job:s.job,submissions:rs(a||{})})}).catch(b=>b);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:v}),wt(v).with({integration_response:j.select(j.union({service:j.optional(j.string),status:j.number,data:j.any},{service:j.optional(j.string),status:j.number,error:{message:j.string,data:j.any}}))},b=>{o.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:b.service??"INVALID_SERVICE",response:{status:b.status,payload:"data"in b?b.data:b.error.data??null},job:s.job}})}).otherwise(()=>{}),await wt(v).with({integration_response:{data:j.select("redirect",{redirect_url:j.string,message:j.optional(j.union(j.string,j.nullish)),button_text:j.optional(j.union(j.string,j.nullish))})}},async b=>{await e.sendMessage({type:"text",author:"bot",text:b.redirect.message??l("submission_redirect_message")});try{const _=new URL(b.redirect.redirect_url);u&&!_.searchParams.has("anonymous_id")&&_.searchParams.set("anonymous_id",u),await e.sendMessage({type:"link",href:_.toString(),text:b.redirect.button_text??l("complete_submission"),onClick:()=>{if(!g){i.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:g,flow_version:s.version,href:_.toString(),job:s.job}})}})}catch(_){i.error(`Invalid redirect URL: ${b.redirect.redirect_url}`,_),e.sendMessage({type:"system",variant:"error",text:l("redirect_url_error")})}t(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:l("submission_completed")}),t(r.nextId)}).with({integration_response:{error:j.select("error",{message:j.string})}},async b=>{i.error(b.error),await e.sendMessage({type:"system",variant:"error",text:b.error.message||l("submission_failed")}),await d(!1)}).otherwise(async b=>{i.error(b),await e.sendMessage({type:"system",variant:"error",text:l("submission_failed")}),await d(!1)})};await d(r.data.skipConfirmation)}async function ru({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({type:"link",href:Me(r.data.href,{submissions:i,context:n}),text:Me(r.data.cta,{submissions:i,context:n})}),t(r.nextId)}async function iu({submissions:e,next:t,node:r,context:i}){t(Wc(r,{submissions:e,context:i})?r.branchId:r.nextId)}async function nu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.text,{submissions:i,context:n})}),t(r.nextId)}async function au({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function ou({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:i,context:n})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Qa(o.value):o.value}),t(r.nextId)}async function su({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function lu({chat:e,next:t,node:r,submissions:i,context:n}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:i,context:n})});const a=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});a===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:a.type==="phone"?Qa(a.value):a.value}),t(r.nextId)}async function cu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function uu({chat:e,next:t,node:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Me(r.data.question,{submissions:i,context:n})});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function du({chat:e,next:t,node:r,t:i}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:i("skipped")});else{const a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function fu({node:e,chat:t,next:r,submissions:i,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Me(e.data.question,{submissions:i,context:n})});const o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(e.nextId)}async function pu({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}function eo(e,t){let r;return(...i)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...i),t)}}function hu({debounce:e,scroll:t,polyfill:r,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const n=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!n)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,o]=Ce({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=ye({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),l=e?typeof e=="number"?e:e.scroll:null,d=e?typeof e=="number"?e:e.resize:null,p=ye(!1);$e(()=>(p.current=!0,()=>void(p.current=!1)));const[u,g,v]=ze(()=>{const y=()=>{if(!s.current.element)return;const{left:m,top:S,width:A,height:F,bottom:z,right:se,x:Q,y:U}=s.current.element.getBoundingClientRect(),G={left:m,top:S,width:A,height:F,bottom:z,right:se,x:Q,y:U};s.current.element instanceof HTMLElement&&i&&(G.height=s.current.element.offsetHeight,G.width=s.current.element.offsetWidth),Object.freeze(G),p.current&&!wu(s.current.lastBounds,G)&&o(s.current.lastBounds=G)};return[y,d?eo(y,d):y,l?eo(y,l):y]},[o,i,l,d]);function b(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",v,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function _(){s.current.element&&(s.current.resizeObserver=new n(v),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(y=>y.addEventListener("scroll",v,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{v()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const $=y=>{!y||y===s.current.element||(b(),s.current.element=y,s.current.scrollContainers=to(y),_())};return bu(v,!!t),gu(g),$e(()=>{b(),_()},[t,v,g]),$e(()=>b,[]),[$,a,u]}function gu(e){$e(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function bu(e,t){$e(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function to(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:i,overflowY:n}=window.getComputedStyle(e);return[r,i,n].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...to(e.parentElement)]}const vu=["x","y","top","bottom","left","right","width","height"],wu=(e,t)=>vu.every(r=>e[r]===t[r]),ut=({class:e,...t})=>{const{t:r}=le();return c("button",{class:Ke("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})},Ct=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[c("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"truncate pr-1 text-sm",children:e.message})]}),dt=({class:e,...t})=>{const{t:r}=le();return c("button",{type:"button",class:Ke("fr touch-hitbox text-neutral-10 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Pi={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"};const Wt=at("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}}),mu="https://api.mapbox.com/search/searchbox/v1/suggest",yu="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",_u=e=>atob(e).split("").reverse().join(""),qe=ce({name:J()}),xu=ce({suggestions:Ii(ce({full_address:Ie(J()),place_formatted:Ie(J()),name:Ie(J()),mapbox_id:J(),context:Ec(ce({address:qe,street:qe,neighborhood:qe,locality:qe,district:qe,place:qe,region:qe,postcode:qe,country:qe}))}))}),ku=({logger:e,t})=>ze(()=>{var i;const r=(i=N.current$.peek().flow)==null?void 0:i.data.flowSessionId;return r?{enabled:!0,getPredictions:async n=>{var u;const a=new URL(mu);a.searchParams.set("q",n),a.searchParams.set("session_token",r);const o=(u=N.current$.peek().flow)==null?void 0:u.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&a.searchParams.set("proximity",`${o.lng},${o.lat}`),a.searchParams.set("access_token",_u(yu));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=$c(xu,await l.json());if(d.success===!1)return e.error("Failed to parse address details",d.issues),{ok:!1,error:t("address_error")};const{suggestions:p}=d.output;return{ok:!0,data:p.map(g=>{var v,b,_,$,y,m,S,A,F;return{label:g.full_address??g.place_formatted??g.name??g.mapbox_id,id:g.mapbox_id,address:{line1:((v=g.context.address)==null?void 0:v.name)??((b=g.context.street)==null?void 0:b.name),line2:void 0,line3:((_=g.context.neighborhood)==null?void 0:_.name)??(($=g.context.locality)==null?void 0:$.name),city:((y=g.context.place)==null?void 0:y.name)??((m=g.context.district)==null?void 0:m.name),state:(S=g.context.region)==null?void 0:S.name,postcode:(A=g.context.postcode)==null?void 0:A.name,country:(F=g.context.country)==null?void 0:F.name}}})}}}:{enabled:!1}},[e,t]),ro=e=>{const{t}=le();return c("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},Su=({input:e,onSubmitSuccess:t,logger:r})=>{const{t:i}=le(),[n,a]=Ce(),[o,s]=Ce([]),{enabled:l,getPredictions:d}=ku({logger:r,t:i}),[p,u]=Ce(l?"query":"manual"),[g,v]=Ce(""),[b,_]=Ce(),$=y=>{De(l,"Query state should not be enabled"),y=y.trim(),y!==(g==null?void 0:g.trim())&&(v(y),y===""&&s([]),_(void 0),d(y).then(m=>{if(m.ok===!1){s([]),_(m.error);return}s(m.data)}))};switch(p){case"query":return De(l,"Query state should not be enabled"),c(Cu,{input:e,onSkip:()=>t(null),onAddressSelect:y=>{if(y===""){a(void 0),u("manual");return}const m=o.find(S=>S.id===y);m&&(a(m.address),u("details"))},onAddressSearch:y=>{$(y)},suggestions:o,query:g,error:b});case"details":return De(n!==void 0),c(no,{input:e,logger:r,onSubmitSuccess:t,addressFields:n,actions:c(ro,{onClick:()=>{u("query")}})});case"manual":return c(no,{logger:r,input:e,onSubmitSuccess:t,addressFields:{},actions:l?c(ro,{onClick:()=>{u("query")}}):void 0})}},Cu=({input:e,onSkip:t,suggestions:r,onAddressSelect:i,query:n,onAddressSearch:a,error:o})=>{const{t:s}=le(),l=ye(null);return me(()=>{l.current&&(l.current.focus(),l.current.select())},[]),c(ne,{children:[c("form",{noValidate:!0,onSubmit:d=>{d.preventDefault();const u=new FormData(d.currentTarget).get("address");typeof u=="string"&&a(u)},class:"flex gap-2 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||s("address_search"),defaultValue:n,class:Wt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]}),c("span",{class:"sr-only",children:s("search")})]})})]}),e.config.optional&&c(dt,{class:"relative",onClick:t})]}),o?c(Ct,{error:{message:o}}):null,c("ul",{children:[r.map(d=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{i(d.id)},children:[c("span",{class:"flex-grow",children:d.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},d.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{i("")},children:c("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},io=["line1","line2","line3","city","state","postcode","country"],no=({addressFields:e,onSubmitSuccess:t,actions:r,input:i})=>{const n=ye(null);me(()=>{if(n.current){const s=n.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const a=Object.keys(Pi),{t:o}=le();return c("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const l=new FormData(s.currentTarget),d=Object.fromEntries(l.entries());t({type:"address",value:d})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:n,children:io.map((s,l)=>{const d=`isdk_${s}`,p=i.config.keys[s];return p?c(ne,{children:[c("label",{for:d,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:o(s)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:p,id:d,defaultValue:e[s],required:!0,children:[e.country&&!a.includes(e.country)?c("option",{value:e[s],children:e[s]}):c("option",{value:"",children:o("select_country")}),a.map(u=>c("option",{value:u,children:u},u))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:l===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:p,id:d,defaultValue:e[s],required:!0}),l===io.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"flex w-full flex-1 ",children:[c("div",{class:"flex-grow",children:r}),c(ut,{class:"flex items-center justify-center"})]})]})},Oi=()=>{const e=ye(null);return $e(()=>{var t;(t=e.current)==null||t.focus()},[]),e},ao=["true","false"],Eu=qa(ao),$u="answer",oo="flex items-center flex-wrap gap-2 p-2.5",so="min-w-0 max-w-full flex-auto",lo=ei(({label:e,...t},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:c("p",{class:"text-center text-base",children:e})})),Iu=({input:e,onSubmitSuccess:t})=>{const r=Oi();return c("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const n=tc(i).value,a=Cc(Eu,n);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:oo,children:ao.map((i,n)=>c("li",{class:so,children:c(lo,{ref:n===0?r:null,type:"submit",name:$u,value:i,label:e.config.labels[i]},i)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(dt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Au=e=>new Promise((t,r)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>i.result?t(i.result.toString()):r("No result from reader"),i.onerror=r}),Tu=e=>e.reduce((t,r)=>t+r.sizeKb,0),Nu=xt("file"),co=3,Fu=({file:e,class:t,...r})=>{const i=e.name.split(".").pop(),n=e.name.replace(new RegExp(`.${i}$`),"");return c("div",{class:Ke("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:n}),c("span",{children:[".",i]})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Tt(e.sizeKb)})]})},uo=({class:e,...t})=>c("li",{class:Ke("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),fo=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Vu=({allowedExtensions:e,files:t})=>{const r=e.map(i=>i.toLowerCase());return t.every(i=>r.includes(fo(i.name).toLowerCase()))},Du=(e,t)=>{const r=fo(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Mu=({input:e,onSubmitSuccess:t})=>{var u;const r=(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key],[i,n]=Ce(Nu(r)?r.value:[]),[a,o]=Ce(),s=i.length-co,l=Tu(i),d=Oi(),{t:p}=le();return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:g=>(g.preventDefault(),o(void 0),i.length===0?o({type:"required",message:p("validation_file")}):e.config.extensions.length>0&&!Vu({allowedExtensions:e.config.extensions,files:i})?o({type:"validate",message:`${p("validation_file_ext",{ext:e.config.extensions.join(", ")})}`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Tt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?o({type:"invalid",message:p("validation_file_max",{count:1})}):t({type:"file",value:i})),children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[i.length>0?c(ne,{children:[c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,co).map(g=>{const v=g.name.split(".").pop(),b=g.name.replace(new RegExp(`.${v}$`),"");return c(uo,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:b}),c("span",{children:[".",v]})]})}),s>0?c(uo,{children:["+",s," file",s!==1?"s":""]}):null]}),c("p",{class:"text-neutral-11 text-xs",children:[Tt(l)," ",i.length>1?"total":""]})]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",p("file_max_size",{size:Tt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(g=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:g.replace(".","")}))})]})]}),c("input",{id:"dropzone-file",onInput:async g=>{De(g.target instanceof HTMLInputElement);const v=g.target.files?Array.from(g.target.files):[],b=await Promise.allSettled(v.map(async $=>{const y=await Au($);return{name:Du($.name,42),data:y,sizeKb:$.size/1e3}}));if(b.some(({status:$})=>$==="rejected"))return o({type:"invalid",message:"Invalid file"});const _=b.map($=>$.status==="fulfilled"?$.value:null).filter(Boolean);n(_)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(ut,{disabled:i.length===0}),e.config.optional&&c(dt,{class:"relative",onClick:()=>t(null)})]})]}),c(Ct,{error:a})]})};var Kt=e=>e.type==="checkbox",ft=e=>e instanceof Date,ve=e=>e==null;const po=e=>typeof e=="object";var Z=e=>!ve(e)&&!Array.isArray(e)&&po(e)&&!ft(e),Lu=e=>Z(e)&&e.target?Kt(e.target)?e.target.checked:e.target.value:e,Pu=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ou=(e,t)=>e.has(Pu(t)),ju=e=>{const t=e.constructor&&e.constructor.prototype;return Z(t)&&t.hasOwnProperty("isPrototypeOf")},ji=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function re(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(ji&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Z(e)&&ju(e)))return e;const i=r?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=re(e[n]));return i}var Cr=e=>/^\w*$/.test(e),K=e=>e===void 0,Bi=e=>Array.isArray(e)?e.filter(Boolean):[],Ri=e=>Bi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),E=(e,t,r)=>{if(!t||!Z(e))return r;const i=(Cr(t)?[t]:Ri(t)).reduce((n,a)=>ve(n)?n:n[a],e);return K(i)||i===e?K(e[t])?r:e[t]:i},Le=e=>typeof e=="boolean",Ae=e=>typeof e=="function",R=(e,t,r)=>{let i=-1;const n=Cr(t)?[t]:Ri(t),a=n.length,o=a-1;for(;++i<a;){const s=n[i];let l=r;if(i!==o){const d=e[s];l=Z(d)||Array.isArray(d)?d:isNaN(+n[i+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const ho={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},We={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Bu=de.createContext(null);Bu.displayName="HookFormControlContext";var Ru=(e,t,r,i=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Te.all&&(t._proxyFormState[o]=!i||Te.all),r&&(r[o]=!0),e[o]}});return n};const zu=typeof window<"u"?de.useLayoutEffect:de.useEffect;var _e=e=>typeof e=="string",Uu=(e,t,r,i,n)=>_e(e)?(i&&t.watch.add(e),E(r,e,n)):Array.isArray(e)?e.map(a=>(i&&t.watch.add(a),E(r,a))):(i&&(t.watchAll=!0),r),zi=e=>ve(e)||!po(e);function tt(e,t,r=new WeakSet){if(zi(e)||zi(t))return Object.is(e,t);if(ft(e)&&ft(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of i){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=t[a];if(ft(o)&&ft(s)||Z(o)&&Z(s)||Array.isArray(o)&&Array.isArray(s)?!tt(o,s,r):!Object.is(o,s))return!1}}return!0}const Hu=de.createContext(null);Hu.displayName="HookFormContext";var go=(e,t,r,i,n)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:n||!0}}:{},Gt=e=>Array.isArray(e)?e:[e],bo=()=>{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 vo(e,t){const r={};for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],a=t[i];if(n&&Z(n)&&a){const o=vo(n,a);Z(o)&&(r[i]=o)}else e[i]&&(r[i]=a)}return r}var he=e=>Z(e)&&!Object.keys(e).length,Ui=e=>e.type==="file",Er=e=>{if(!ji)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},wo=e=>e.type==="select-multiple",Hi=e=>e.type==="radio",qu=e=>Hi(e)||Kt(e),qi=e=>Er(e)&&e.isConnected;function Wu(e,t){const r=t.slice(0,-1).length;let i=0;for(;i<r;)e=K(e)?i++:e[t[i++]];return e}function Ku(e){for(const t in e)if(e.hasOwnProperty(t)&&!K(e[t]))return!1;return!0}function X(e,t){const r=Array.isArray(t)?t:Cr(t)?[t]:Ri(t),i=r.length===1?e:Wu(e,r),n=r.length-1,a=r[n];return i&&delete i[a],n!==0&&(Z(i)&&he(i)||Array.isArray(i)&&Ku(i))&&X(e,r.slice(0,-1)),e}var Gu=e=>{for(const t in e)if(Ae(e[t]))return!0;return!1};function mo(e){return Array.isArray(e)||Z(e)&&!Gu(e)}function Wi(e,t={}){for(const r in e){const i=e[r];mo(i)?(t[r]=Array.isArray(i)?[]:{},Wi(i,t[r])):K(i)||(t[r]=!0)}return t}function Et(e,t,r){r||(r=Wi(t));for(const i in e){const n=e[i];if(mo(n))K(t)||zi(r[i])?r[i]=Wi(n,Array.isArray(n)?[]:{}):Et(n,ve(t)?{}:t[i],r[i]);else{const a=t[i];r[i]=!tt(n,a)}}return r}const yo={value:!1,isValid:!1},_o={value:!0,isValid:!0};var xo=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!K(e[0].attributes.value)?K(e[0].value)||e[0].value===""?_o:{value:e[0].value,isValid:!0}:_o:yo}return yo},ko=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>K(e)?e:t?e===""?NaN:e&&+e:r&&_e(e)?new Date(e):i?i(e):e;const So={isValid:!1,value:null};var Co=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,So):So;function Eo(e){const t=e.ref;return Ui(t)?t.files:Hi(t)?Co(e.refs).value:wo(t)?[...t.selectedOptions].map(({value:r})=>r):Kt(t)?xo(e.refs).value:ko(K(t.value)?e.ref.value:t.value,e)}var Yu=(e,t,r,i)=>{const n={};for(const a of e){const o=E(t,a);o&&R(n,a,o._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:i}},$r=e=>e instanceof RegExp,Yt=e=>K(e)?e:$r(e)?e.source:Z(e)?$r(e.value)?e.value.source:e.value:e,$o=e=>({isOnSubmit:!e||e===Te.onSubmit,isOnBlur:e===Te.onBlur,isOnChange:e===Te.onChange,isOnAll:e===Te.all,isOnTouch:e===Te.onTouched});const Io="AsyncFunction";var Ju=e=>!!e&&!!e.validate&&!!(Ae(e.validate)&&e.validate.constructor.name===Io||Z(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Io)),Zu=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ao=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const Jt=(e,t,r,i)=>{for(const n of r||Object.keys(e)){const a=E(e,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!i)return!0;if(o.ref&&t(o.ref,o.name)&&!i)return!0;if(Jt(s,t))break}else if(Z(s)&&Jt(s,t))break}}};function To(e,t,r){const i=E(e,r);if(i||Cr(r))return{error:i,name:r};const n=r.split(".");for(;n.length;){const a=n.join("."),o=E(t,a),s=E(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};n.pop()}return{name:r}}var Xu=(e,t,r,i)=>{r(e);const{name:n,...a}=e;return he(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!i||Te.all))},Qu=(e,t,r)=>!e||!t||e===t||Gt(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i))),ed=(e,t,r,i,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(t||e):(r?i.isOnBlur:n.isOnBlur)?!e:(r?i.isOnChange:n.isOnChange)?e:!0,td=(e,t)=>!Bi(E(e,t)).length&&X(e,t),rd=(e,t,r)=>{const i=Gt(E(e,r));return R(i,"root",t[r]),R(e,r,i),e};function No(e,t,r="validate"){if(_e(e)||Array.isArray(e)&&e.every(_e)||Le(e)&&!e)return{type:r,message:_e(e)?e:"",ref:t}}var $t=e=>Z(e)&&!$r(e)?e:{value:e,message:""},Fo=async(e,t,r,i,n,a)=>{const{ref:o,refs:s,required:l,maxLength:d,minLength:p,min:u,max:g,pattern:v,validate:b,name:_,valueAsNumber:$,mount:y}=e._f,m=E(r,_);if(!y||t.has(_))return{};const S=s?s[0]:o,A=D=>{n&&S.reportValidity&&(S.setCustomValidity(Le(D)?"":D||""),S.reportValidity())},F={},z=Hi(o),se=Kt(o),Q=z||se,U=($||Ui(o))&&K(o.value)&&K(m)||Er(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,G=go.bind(null,_,i,F),Tr=(D,L,ie,ue=We.maxLength,Ne=We.minLength)=>{const xe=D?L:ie;F[_]={type:D?ue:Ne,message:xe,ref:o,...G(D?ue:Ne,xe)}};if(a?!Array.isArray(m)||!m.length:l&&(!Q&&(U||ve(m))||Le(m)&&!m||se&&!xo(s).isValid||z&&!Co(s).isValid)){const{value:D,message:L}=_e(l)?{value:!!l,message:l}:$t(l);if(D&&(F[_]={type:We.required,message:L,ref:S,...G(We.required,L)},!i))return A(L),F}if(!U&&(!ve(u)||!ve(g))){let D,L;const ie=$t(g),ue=$t(u);if(!ve(m)&&!isNaN(m)){const Ne=o.valueAsNumber||m&&+m;ve(ie.value)||(D=Ne>ie.value),ve(ue.value)||(L=Ne<ue.value)}else{const Ne=o.valueAsDate||new Date(m),xe=er=>new Date(new Date().toDateString()+" "+er),Xt=o.type=="time",Qt=o.type=="week";_e(ie.value)&&m&&(D=Xt?xe(m)>xe(ie.value):Qt?m>ie.value:Ne>new Date(ie.value)),_e(ue.value)&&m&&(L=Xt?xe(m)<xe(ue.value):Qt?m<ue.value:Ne<new Date(ue.value))}if((D||L)&&(Tr(!!D,ie.message,ue.message,We.max,We.min),!i))return A(F[_].message),F}if((d||p)&&!U&&(_e(m)||a&&Array.isArray(m))){const D=$t(d),L=$t(p),ie=!ve(D.value)&&m.length>+D.value,ue=!ve(L.value)&&m.length<+L.value;if((ie||ue)&&(Tr(ie,D.message,L.message),!i))return A(F[_].message),F}if(v&&!U&&_e(m)){const{value:D,message:L}=$t(v);if($r(D)&&!m.match(D)&&(F[_]={type:We.pattern,message:L,ref:o,...G(We.pattern,L)},!i))return A(L),F}if(b){if(Ae(b)){const D=await b(m,r),L=No(D,S);if(L&&(F[_]={...L,...G(We.validate,L.message)},!i))return A(L.message),F}else if(Z(b)){let D={};for(const L in b){if(!he(D)&&!i)break;const ie=No(await b[L](m,r),S,L);ie&&(D={...ie,...G(L,ie.message)},A(ie.message),i&&(F[_]=D))}if(!he(D)&&(F[_]={ref:S,...D},!i))return F}}return A(!0),F};const id={mode:Te.onSubmit,reValidateMode:Te.onChange,shouldFocusError:!0};function nd(e={}){let t={...id,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ae(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},n=Z(t.defaultValues)||Z(t.values)?re(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:re(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 g={...u};const v={array:bo(),state:bo()},b=t.criteriaMode===Te.all,_=f=>h=>{clearTimeout(d),d=setTimeout(f,h)},$=async f=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||g.isValid||f)){let h;t.resolver?(h=he((await Q()).errors),y()):h=await G(i,!0),h!==r.isValid&&v.state.next({isValid:h})}},y=(f,h)=>{!t.disabled&&(u.isValidating||u.validatingFields||g.isValidating||g.validatingFields)&&((f||Array.from(s.mount)).forEach(w=>{w&&(h?R(r.validatingFields,w,h):X(r.validatingFields,w))}),v.state.next({validatingFields:r.validatingFields,isValidating:!he(r.validatingFields)}))},m=(f,h=[],w,C,k=!0,x=!0)=>{if(C&&w&&!t.disabled){if(o.action=!0,x&&Array.isArray(E(i,f))){const T=w(E(i,f),C.argA,C.argB);k&&R(i,f,T)}if(x&&Array.isArray(E(r.errors,f))){const T=w(E(r.errors,f),C.argA,C.argB);k&&R(r.errors,f,T),td(r.errors,f)}if((u.touchedFields||g.touchedFields)&&x&&Array.isArray(E(r.touchedFields,f))){const T=w(E(r.touchedFields,f),C.argA,C.argB);k&&R(r.touchedFields,f,T)}(u.dirtyFields||g.dirtyFields)&&(r.dirtyFields=Et(n,a)),v.state.next({name:f,isDirty:D(f,h),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else R(a,f,h)},S=(f,h)=>{R(r.errors,f,h),v.state.next({errors:r.errors})},A=f=>{r.errors=f,v.state.next({errors:r.errors,isValid:!1})},F=(f,h,w,C)=>{const k=E(i,f);if(k){const x=E(a,f,K(w)?E(n,f):w);K(x)||C&&C.defaultChecked||h?R(a,f,h?x:Eo(k._f)):ue(f,x),o.mount&&!o.action&&$()}},z=(f,h,w,C,k)=>{let x=!1,T=!1;const P={name:f};if(!t.disabled){if(!w||C){(u.isDirty||g.isDirty)&&(T=r.isDirty,r.isDirty=P.isDirty=D(),x=T!==P.isDirty);const O=tt(E(n,f),h);T=!!E(r.dirtyFields,f),O?X(r.dirtyFields,f):R(r.dirtyFields,f,!0),P.dirtyFields=r.dirtyFields,x=x||(u.dirtyFields||g.dirtyFields)&&T!==!O}if(w){const O=E(r.touchedFields,f);O||(R(r.touchedFields,f,w),P.touchedFields=r.touchedFields,x=x||(u.touchedFields||g.touchedFields)&&O!==w)}x&&k&&v.state.next(P)}return x?P:{}},se=(f,h,w,C)=>{const k=E(r.errors,f),x=(u.isValid||g.isValid)&&Le(h)&&r.isValid!==h;if(t.delayError&&w?(l=_(()=>S(f,w)),l(t.delayError)):(clearTimeout(d),l=null,w?R(r.errors,f,w):X(r.errors,f)),(w?!tt(k,w):k)||!he(C)||x){const T={...C,...x&&Le(h)?{isValid:h}:{},errors:r.errors,name:f};r={...r,...T},v.state.next(T)}},Q=async f=>(y(f,!0),await t.resolver(a,t.context,Yu(f||s.mount,i,t.criteriaMode,t.shouldUseNativeValidation))),U=async f=>{const{errors:h}=await Q(f);if(y(f),f)for(const w of f){const C=E(h,w);C?R(r.errors,w,C):X(r.errors,w)}else r.errors=h;return h},G=async(f,h,w={valid:!0})=>{for(const C in f){const k=f[C];if(k){const{_f:x,...T}=k;if(x){const P=s.array.has(x.name),O=k._f&&Ju(k._f);O&&u.validatingFields&&y([x.name],!0);const ge=await Fo(k,s.disabled,a,b,t.shouldUseNativeValidation&&!h,P);if(O&&u.validatingFields&&y([x.name]),ge[x.name]&&(w.valid=!1,h||e.shouldUseNativeValidation))break;!h&&(E(ge,x.name)?P?rd(r.errors,ge,x.name):R(r.errors,x.name,ge[x.name]):X(r.errors,x.name))}!he(T)&&await G(T,h,w)}}return w.valid},Tr=()=>{for(const f of s.unMount){const h=E(i,f);h&&(h._f.refs?h._f.refs.every(w=>!qi(w)):!qi(h._f.ref))&&Ki(f)}s.unMount=new Set},D=(f,h)=>!t.disabled&&(f&&h&&R(a,f,h),!tt(Bo(),n)),L=(f,h,w)=>Uu(f,s,{...o.mount?a:K(h)?n:_e(f)?{[f]:h}:h},w,h),ie=f=>Bi(E(o.mount?a:n,f,t.shouldUnregister?E(n,f,[]):[])),ue=(f,h,w={})=>{const C=E(i,f);let k=h;if(C){const x=C._f;x&&(!x.disabled&&R(a,f,ko(h,x)),k=Er(x.ref)&&ve(h)?"":h,wo(x.ref)?[...x.ref.options].forEach(T=>T.selected=k.includes(T.value)):x.refs?Kt(x.ref)?x.refs.forEach(T=>{(!T.defaultChecked||!T.disabled)&&(Array.isArray(k)?T.checked=!!k.find(P=>P===T.value):T.checked=k===T.value||!!k)}):x.refs.forEach(T=>T.checked=T.value===k):Ui(x.ref)?x.ref.value="":(x.ref.value=k,x.ref.type||v.state.next({name:f,values:re(a)})))}(w.shouldDirty||w.shouldTouch)&&z(f,k,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&er(f)},Ne=(f,h,w)=>{for(const C in h){if(!h.hasOwnProperty(C))return;const k=h[C],x=f+"."+C,T=E(i,x);(s.array.has(f)||Z(k)||T&&!T._f)&&!ft(k)?Ne(x,k,w):ue(x,k,w)}},xe=(f,h,w={})=>{const C=E(i,f),k=s.array.has(f),x=re(h);R(a,f,x),k?(v.array.next({name:f,values:re(a)}),(u.isDirty||u.dirtyFields||g.isDirty||g.dirtyFields)&&w.shouldDirty&&v.state.next({name:f,dirtyFields:Et(n,a),isDirty:D(f,x)})):C&&!C._f&&!ve(x)?Ne(f,x,w):ue(f,x,w),Ao(f,s)?v.state.next({...r,name:f,values:re(a)}):v.state.next({name:o.mount?f:void 0,values:re(a)})},Xt=async f=>{o.mount=!0;const h=f.target;let w=h.name,C=!0;const k=E(i,w),x=O=>{C=Number.isNaN(O)||ft(O)&&isNaN(O.getTime())||tt(O,E(a,w,O))},T=$o(t.mode),P=$o(t.reValidateMode);if(k){let O,ge;const pt=h.type?Eo(k._f):Lu(f),rt=f.type===ho.BLUR||f.type===ho.FOCUS_OUT,of=!Zu(k._f)&&!t.resolver&&!E(r.errors,w)&&!k._f.deps||ed(rt,E(r.touchedFields,w),r.isSubmitted,P,T),Ji=Ao(w,s,rt);R(a,w,pt),rt?(!h||!h.readOnly)&&(k._f.onBlur&&k._f.onBlur(f),l&&l(0)):k._f.onChange&&k._f.onChange(f);const Zi=z(w,pt,rt),sf=!he(Zi)||Ji;if(!rt&&v.state.next({name:w,type:f.type,values:re(a)}),of)return(u.isValid||g.isValid)&&(t.mode==="onBlur"?rt&&$():rt||$()),sf&&v.state.next({name:w,...Ji?{}:Zi});if(!rt&&Ji&&v.state.next({...r}),t.resolver){const{errors:Yo}=await Q([w]);if(y([w]),x(pt),C){const lf=To(r.errors,i,w),Jo=To(Yo,i,lf.name||w);O=Jo.error,w=Jo.name,ge=he(Yo)}}else y([w],!0),O=(await Fo(k,s.disabled,a,b,t.shouldUseNativeValidation))[w],y([w]),x(pt),C&&(O?ge=!1:(u.isValid||g.isValid)&&(ge=await G(i,!0)));C&&(k._f.deps&&(!Array.isArray(k._f.deps)||k._f.deps.length>0)&&er(k._f.deps),se(w,ge,O,Zi))}},Qt=(f,h)=>{if(E(r.errors,h)&&f.focus)return f.focus(),1},er=async(f,h={})=>{let w,C;const k=Gt(f);if(t.resolver){const x=await U(K(f)?f:k);w=he(x),C=f?!k.some(T=>E(x,T)):w}else f?(C=(await Promise.all(k.map(async x=>{const T=E(i,x);return await G(T&&T._f?{[x]:T}:T)}))).every(Boolean),!(!C&&!r.isValid)&&$()):C=w=await G(i);return v.state.next({...!_e(f)||(u.isValid||g.isValid)&&w!==r.isValid?{}:{name:f},...t.resolver||!f?{isValid:w}:{},errors:r.errors}),h.shouldFocus&&!C&&Jt(i,Qt,f?k:s.mount),C},Bo=(f,h)=>{let w={...o.mount?a:n};return h&&(w=vo(h.dirtyFields?r.dirtyFields:r.touchedFields,w)),K(f)?w:_e(f)?E(w,f):f.map(C=>E(w,C))},Ro=(f,h)=>({invalid:!!E((h||r).errors,f),isDirty:!!E((h||r).dirtyFields,f),error:E((h||r).errors,f),isValidating:!!E(r.validatingFields,f),isTouched:!!E((h||r).touchedFields,f)}),Xd=f=>{const h=f?Gt(f):void 0;h==null||h.forEach(w=>X(r.errors,w)),h?h.forEach(w=>{v.state.next({name:w,errors:r.errors})}):v.state.next({errors:{}})},zo=(f,h,w)=>{const C=(E(i,f,{_f:{}})._f||{}).ref,k=E(r.errors,f)||{},{ref:x,message:T,type:P,...O}=k;R(r.errors,f,{...O,...h,ref:C}),v.state.next({name:f,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&C&&C.focus&&C.focus()},Qd=(f,h)=>Ae(f)?v.state.subscribe({next:w=>"values"in w&&f(L(void 0,h),w)}):L(f,h,!0),Uo=f=>v.state.subscribe({next:h=>{Qu(f.name,h.name,f.exact)&&Xu(h,f.formState||u,af,f.reRenderRoot)&&f.callback({values:{...a},...r,...h,defaultValues:n})}}).unsubscribe,ef=f=>(o.mount=!0,g={...g,...f.formState},Uo({...f,formState:{...p,...f.formState}})),Ki=(f,h={})=>{for(const w of f?Gt(f):s.mount)s.mount.delete(w),s.array.delete(w),h.keepValue||(X(i,w),X(a,w)),!h.keepError&&X(r.errors,w),!h.keepDirty&&X(r.dirtyFields,w),!h.keepTouched&&X(r.touchedFields,w),!h.keepIsValidating&&X(r.validatingFields,w),!t.shouldUnregister&&!h.keepDefaultValue&&X(n,w);v.state.next({values:re(a)}),v.state.next({...r,...h.keepDirty?{isDirty:D()}:{}}),!h.keepIsValid&&$()},Ho=({disabled:f,name:h})=>{if(Le(f)&&o.mount||f||s.disabled.has(h)){const k=s.disabled.has(h)!==!!f;f?s.disabled.add(h):s.disabled.delete(h),k&&o.mount&&!o.action&&$()}},Gi=(f,h={})=>{let w=E(i,f);const C=Le(h.disabled)||Le(t.disabled);return R(i,f,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:f}},name:f,mount:!0,...h}}),s.mount.add(f),w?Ho({disabled:Le(h.disabled)?h.disabled:t.disabled,name:f}):F(f,!0,h.value),{...C?{disabled:h.disabled||t.disabled}:{},...t.progressive?{required:!!h.required,min:Yt(h.min),max:Yt(h.max),minLength:Yt(h.minLength),maxLength:Yt(h.maxLength),pattern:Yt(h.pattern)}:{},name:f,onChange:Xt,onBlur:Xt,ref:k=>{if(k){Gi(f,h),w=E(i,f);const x=K(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,T=qu(x),P=w._f.refs||[];if(T?P.find(O=>O===x):x===w._f.ref)return;R(i,f,{_f:{...w._f,...T?{refs:[...P.filter(qi),x,...Array.isArray(E(n,f))?[{}]:[]],ref:{type:x.type,name:f}}:{ref:x}}}),F(f,!1,void 0,x)}else w=E(i,f,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||h.shouldUnregister)&&!(Ou(s.array,f)&&o.action)&&s.unMount.add(f)}}},Yi=()=>t.shouldFocusError&&Jt(i,Qt,s.mount),tf=f=>{Le(f)&&(v.state.next({disabled:f}),Jt(i,(h,w)=>{const C=E(i,w);C&&(h.disabled=C._f.disabled||f,Array.isArray(C._f.refs)&&C._f.refs.forEach(k=>{k.disabled=C._f.disabled||f}))},0,!1))},qo=(f,h)=>async w=>{let C;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let k=re(a);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:x,values:T}=await Q();y(),r.errors=x,k=re(T)}else await G(i);if(s.disabled.size)for(const x of s.disabled)X(k,x);if(X(r.errors,"root"),he(r.errors)){v.state.next({errors:{}});try{await f(k,w)}catch(x){C=x}}else h&&await h({...r.errors},w),Yi(),setTimeout(Yi);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:he(r.errors)&&!C,submitCount:r.submitCount+1,errors:r.errors}),C)throw C},rf=(f,h={})=>{E(i,f)&&(K(h.defaultValue)?xe(f,re(E(n,f))):(xe(f,h.defaultValue),R(n,f,re(h.defaultValue))),h.keepTouched||X(r.touchedFields,f),h.keepDirty||(X(r.dirtyFields,f),r.isDirty=h.defaultValue?D(f,re(E(n,f))):D()),h.keepError||(X(r.errors,f),u.isValid&&$()),v.state.next({...r}))},Wo=(f,h={})=>{const w=f?re(f):n,C=re(w),k=he(f),x=k?n:C;if(h.keepDefaultValues||(n=w),!h.keepValues){if(h.keepDirtyValues){const T=new Set([...s.mount,...Object.keys(Et(n,a))]);for(const P of Array.from(T)){const O=E(r.dirtyFields,P),ge=E(a,P),pt=E(x,P);O&&!K(ge)?R(x,P,ge):!O&&!K(pt)&&xe(P,pt)}}else{if(ji&&K(f))for(const T of s.mount){const P=E(i,T);if(P&&P._f){const O=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(Er(O)){const ge=O.closest("form");if(ge){ge.reset();break}}}}if(h.keepFieldsRef)for(const T of s.mount)xe(T,E(x,T));else i={}}a=t.shouldUnregister?h.keepDefaultValues?re(n):{}:re(x),v.array.next({values:{...x}}),v.state.next({values:{...x}})}s={mount:h.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!h.keepIsValid||!!h.keepDirtyValues||!t.shouldUnregister&&!he(x),o.watch=!!t.shouldUnregister,o.keepIsValid=!!h.keepIsValid,o.action=!1,h.keepErrors||(r.errors={}),v.state.next({submitCount:h.keepSubmitCount?r.submitCount:0,isDirty:k?!1:h.keepDirty?r.isDirty:!!(h.keepDefaultValues&&!tt(f,n)),isSubmitted:h.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:k?{}:h.keepDirtyValues?h.keepDefaultValues&&a?Et(n,a):r.dirtyFields:h.keepDefaultValues&&f?Et(n,f):h.keepDirty?r.dirtyFields:{},touchedFields:h.keepTouched?r.touchedFields:{},errors:h.keepErrors?r.errors:{},isSubmitSuccessful:h.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Ko=(f,h)=>Wo(Ae(f)?f(a):f,{...t.resetOptions,...h}),nf=(f,h={})=>{const w=E(i,f),C=w&&w._f;if(C){const k=C.refs?C.refs[0]:C.ref;k.focus&&setTimeout(()=>{k.focus(),h.shouldSelect&&Ae(k.select)&&k.select()})}},af=f=>{r={...r,...f}},Go={control:{register:Gi,unregister:Ki,getFieldState:Ro,handleSubmit:qo,setError:zo,_subscribe:Uo,_runSchema:Q,_updateIsValidating:y,_focusError:Yi,_getWatch:L,_getDirty:D,_setValid:$,_setFieldArray:m,_setDisabledField:Ho,_setErrors:A,_getFieldArray:ie,_reset:Wo,_resetDefaultValues:()=>Ae(t.defaultValues)&&t.defaultValues().then(f=>{Ko(f,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:Tr,_disableForm:tf,_subjects:v,_proxyFormState:u,get _fields(){return i},get _formValues(){return a},get _state(){return o},set _state(f){o=f},get _defaultValues(){return n},get _names(){return s},set _names(f){s=f},get _formState(){return r},get _options(){return t},set _options(f){t={...t,...f}}},subscribe:ef,trigger:er,register:Gi,handleSubmit:qo,watch:Qd,setValue:xe,getValues:Bo,reset:Ko,resetField:rf,clearErrors:Xd,unregister:Ki,setError:zo,setFocus:nf,getFieldState:Ro};return{...Go,formControl:Go}}function Ir(e={}){const t=de.useRef(void 0),r=de.useRef(void 0),[i,n]=de.useState({isDirty:!1,isValidating:!1,isLoading:Ae(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:Ae(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!Ae(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=nd(e);t.current={...s,formState:i}}const a=t.current.control;return a._options=e,zu(()=>{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]),de.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),de.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),de.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),de.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),de.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==i.isDirty&&a._subjects.state.next({isDirty:o})}},[a,i.isDirty]),de.useEffect(()=>{var o;e.values&&!tt(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,n(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),de.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=de.useMemo(()=>Ru(i,a),[a,i]),t.current}const Vo=(e,t,r)=>{if(e&&"reportValidity"in e){const i=E(r,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},ad=(e,t)=>{for(const r in t.fields){const i=t.fields[r];i&&i.ref&&"reportValidity"in i.ref?Vo(i.ref,r,e):i.refs&&i.refs.forEach(n=>Vo(n,r,e))}},od=(e,t)=>{t.shouldUseNativeValidation&&ad(e,t);const r={};for(const i in e){const n=E(t.fields,i),a=Object.assign(e[i]||{},{ref:n&&n.ref});if(sd(t.names||Object.keys(e),i)){const o=Object.assign({},E(r,i));R(o,"root",a),R(r,i,o)}else R(r,i,a)}return r},sd=(e,t)=>e.some(r=>r.startsWith(t+"."));var Ar=function(e,t,r){return r===void 0&&(r={}),function(i,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(Ic(e,i,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var d=s.issues[0],p=_c(d);if(p&&(l[p]||(l[p]={message:d.message,type:d.type}),o)){var u=l[p].types,g=u&&u[d.type];l[p]=go(p,o,l,d.type,g?[].concat(g,d.message):d.message)}s.issues.shift()}return{values:{},errors:od(l,a)}}return{values:r.raw?i:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const Do=27,Mo=12,Lo=10,ld=xt("enum"),cd=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Ar(ce({checked:He(Ti(J(),kr()),xr(i=>Object.entries(i).filter(([n,a])=>a).map(([n,a])=>n)),Ut(r.max,t("validation_multiple_choice_max",{count:r.max})),kt(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},ud=ei(({option:e,...t},r)=>c(ne,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Po=at("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:oo}}}),dd=({input:e,onSubmitSuccess:t})=>{var p,u;const r=e.key?(p=N.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,i=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,n=i&&e.config.options.length===2,{t:a}=le(),{register:o,handleSubmit:s,formState:{errors:l}}=Ir({defaultValues:{checked:i?{}:ld(r)?Object.fromEntries(r.value.map(g=>[g,!0])):{}},resolver:cd(e.config,a)}),d=Oi();return n?c("ul",{style:{maxHeight:6.5*Do+5*Mo+2*Lo},class:Po({variant:"booleanLike"}),children:e.config.options.map((g,v)=>c("li",{class:so,children:c(lo,{type:"submit",ref:b=>{b&&v===0&&(d.current=b)},label:g.label,value:"true",onClick:()=>t({type:"enum",value:[g.value]})})},g.value))}):c("form",{noValidate:!0,onSubmit:g=>s(v=>{const b=v.checked;t({type:"enum",value:b})})(g),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*Do+5*Mo+2*Lo},class:Po({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((g,v)=>{const b=`checked.${g.value}`,{ref:_,...$}=o(b);return c("li",{class:"relative",children:c(ud,{option:g,autoFocus:v===0,ref:y=>{y&&v===0&&(d.current=y),_(y)},id:b,...$,onClick:i?()=>t({type:"enum",value:[g.value]}):void 0})},g.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[i?null:c(ut,{}),e.config.minSelected===0&&c(dt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(Ct,{error:(u=l.checked)==null?void 0:u.root})})]})},fd=xt("number"),pd=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,i=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Ar(ce({number:He(Ht(t("validation_number")),Ra(r,t("validation_number_min",{min:r})),Ba(i,t("validation_number_max",{max:i})),Oa(a=>a===Number(a.toFixed(n)),t("validation_number_decimal_cases",{count:n})))}))},hd=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,i=e.key?(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:n}=le(),{register:a,handleSubmit:o,formState:{errors:s}}=Ir({defaultValues:{number:r?Number(r):fd(i)?i.value:void 0},resolver:pd(e.config,n)}),{ref:l,...d}=a("number",{required:!e.config.optional,valueAsNumber:!0}),p=ye();return me(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(g=>{g.number!==void 0&&t({type:"number",value:g.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...d,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:g=>{g&&(p.current=g),l(g)},type:"text",min:e.config.min,max:e.config.max,class:Wt({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(ut,{})]}),c(Ct,{error:s.number})]})},gd=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(Pi).find(n=>e.startsWith(n[1])),r=t?t[1]:"",i=e.replace(r,"");return/^\d+$/.test(i)?{countryCode:r,phoneNumber:i}:{countryCode:"",phoneNumber:""}},bd="44",vd=/^[0-9 ]+$/,wd=xt("string"),md=xt("phone"),yd=e=>{const t=He(J(e("validation_country_code")),Ei(vd,e("validation_country_code"))),r=He(J(e("validation_phone")),kt(1,e("validation_phone")),xr(i=>i.replace(/[^0-9]/g,"")));return Ar(ce({countryCode:t,phoneNumber:r}))},_d=({input:e,onSubmitSuccess:t})=>{var _;const r=e.key?(_=N.current$.value.flow)==null?void 0:_.data.submissions[e.key]:void 0,{t:i}=le(),[n,a]=Ce(),o=wd(r)?gd(r.value):md(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:d},watch:p}=Ir({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??bd,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:yd(i)}),{ref:u,...g}=s("phoneNumber",{required:!e.config.optional}),v=ye(),b=p("countryCode");return me(()=>{v.current&&(v.current.focus(),v.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l($=>{const y=$.phoneNumber.replace(/[^0-9]/g,""),m=$.countryCode.replace(/[^0-9]/g,"");a(void 0);const S=e.config.minChars??7,A=y.length+m.length;if(A<S)return a(i("validation_phone_min_chars",{count:S}));const F=e.config.maxChars;if(F!=null&&A>F)return a(i("validation_max_chars",{count:F}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:m,phoneNumber:y}}):t({type:"string",value:b+$.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:["+",b]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Pi).map(([$,y])=>c("option",{value:y,children:[$," (+",y,")"]},$))})]}),c("input",{...g,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:$=>{$&&(v.current=$),u($)},class:Wt({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(ut,{})]}),c(Ct,{error:d.countryCode||d.phoneNumber||{message:n}})]})},xd=({input:e,onSubmitSuccess:t})=>c("div",{class:"flex flex-col items-center py-3",children:c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),kd={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Sd=xt("string"),Cd=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return Ar(ce({text:{date:He(J(t("validation_date")),Ei(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:He(J(t("validation_email")),ja(t("validation_email")),kt(e.minChars??1,r.minLength),Ut(e.maxChars??1/0,r.maxLength)),text:He(J(),kt(e.minChars??1,r.minLength),Ut(e.maxChars??1/0,r.maxLength)),url:He(J(t("validation_url")),za(t("validation_url")),kt(e.minChars??1,r.minLength),Ut(e.maxChars??1/0,r.maxLength))}[e.format]}))},Ed={text:({input:e,onSubmitSuccess:t})=>{var u;const{t:r}=le(),i=e.key?(u=N.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:s}}=Ir({defaultValues:{text:n||(Sd(i)?i.value:"")},resolver:Cd(e.config,r)}),{ref:l,...d}=a("text",{required:!e.config.optional}),p=ye();return me(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(g=>{t({type:"string",value:g.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...d,...kd[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:g=>{g&&(p.current=g),l(g)},placeholder:e.config.placeholder,class:Wt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(dt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),c(ut,{})]}),c(Ct,{error:s.text})]})},phone:_d,"multiple-choice":dd,boolean:Iu,file:Mu,submit:xd,address:Su,number:hd},$d=({logger:e})=>{var a;const t=(a=N.current$.value.flow)==null?void 0:a.data.currentInput,[r,i]=hu(),n=ye(null);return N.inputHeight$.value=i.height,$e(()=>{const o=n.current;if(o)return o.addEventListener("transitionstart",oe.scrollToEnd.smooth),o.addEventListener("transitioncancel",oe.scrollToEnd.smooth),o.addEventListener("transitionend",oe.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",oe.scrollToEnd.smooth),o.removeEventListener("transitioncancel",oe.scrollToEnd.smooth),o.removeEventListener("transitionend",oe.scrollToEnd.smooth)}},[]),c("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:i.height},children:c("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:t?(()=>{const o=Ed[t.type];return c(o,{logger:e,onSubmitSuccess:oe.onSubmitSuccessFn$.value,input:t})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Wt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(ut,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Id(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ad=function(e){return e instanceof RegExp},Td=function(t){var r=/[\\^$.*+?()[\]{}|]/g,i=RegExp(r.source);return t&&i.test(t)?t.replace(r,"\\$&"):t},Oo=function(e){return typeof e=="string"},Nd=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Fd(e,t,r){var i=0,n=0;if(e==="")return e;if(!e||!Oo(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Ad(a)||(a=new RegExp("("+Td(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}n=o[s].length,i+=o[s-1].length,o[s]=r(o[s],s,i),i+=n}return o}var Vd=function(t,r,i){return Array.isArray(t)||(t=[t]),Nd(t.map(function(n){return Oo(n)?Fd(n,r,i):n}))};const Zt=Id(Vd),Dd=/(\[[^\]]+\]\([^)]+\))/g,Md=/\[([^\]]+)\]\(([^)]+)\)/,Ld=/(https?:\/\/[^\s]+)/g,Pd=/_(.*?)_/g,Od=/\*\*(.*?)\*\*/g,jd=/\\n|\n/g,jo="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Bd=e=>{const t=Zt(e,Dd,(o,s)=>{const[,l,d]=o.match(Md)??[];return d?c("a",{class:jo,href:d,children:l??d},d+s):c("span",{children:"INVALID LINK"})}),r=Zt(t,Ld,(o,s)=>c("a",{class:jo,href:o,children:o},o+s)),i=Zt(r,Pd,(o,s)=>c("em",{children:o},o+s)),n=Zt(i,Od,(o,s)=>c("strong",{children:o},o+s));return Zt(n,jd,(o,s)=>c("br",{},`br-${s}`))},Rd=at("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"}}),zd=({children:e,className:t,animate:r,side:i,...n})=>c("p",{style:{transformOrigin:i==="left"?"0% 50%":"100% 50%"},class:Rd({className:t,side:i,animate:r}),...n,children:e}),Ud=({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"})})]})}),Hd=({className:e,...t})=>($e(()=>{oe.scrollToEnd.smooth()}),c("div",{"aria-hidden":!0,children:oe.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Ke("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,i)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-i*200}ms`}}))}):void 0})),qd={bot:"left",user:"right"},Wd=at("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),Kd=({lastSentMessageFooter:e})=>{var r;const t=((r=N.current$.value.flow)==null?void 0:r.data.messages)??[];return $e(()=>{oe.scrollToEnd.smooth()},[t.length]),c("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((i,n)=>c(ne,{children:c("li",{class:"flex",children:wt(i).with({type:"system"},a=>c("p",{class:Wd({variant:a.variant}),children:a.text})).with({type:"text",author:j.union("bot","user")},a=>{const o=a.author==="user"&&!t.slice(n+1).some(d=>d.type==="text"&&d.author==="user"),s=n===t.length-1,l=a.author==="bot"?Bd(a.text):a.text;return c(ne,{children:[o?e:null,c(zd,{animate:s,side:qd[a.author],children:l},n)]})}).with({type:"link"},a=>c(Ud,{message:a})).with({type:"image"},a=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:a.url,style:{aspectRatio:a.width/a.height}})).with({type:"file"},a=>c(Fu,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const o=t[t.length-1];return!(a===o)||oe.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(Fa,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},n)),c(Hd,{},"typing")]})},Gd=({logger:e,apiClient:t,analytics:r,talentBankClient:i})=>{const{flow:n}=N.current$.value;De(n,"Flow is required to exist to show chatbot body");const a=N.viewState$.value,{chatRef:o,chatService:s}=bc(),{t:l}=le(),[d,p]=Ce();return me(()=>{a==="maximised"&&oe.scrollToEnd.instant()},[a]),me(()=>{var y,m;const{state:u,flow:g}=N.current$.peek();if(u!=="loaded")throw new Error(l("invalid_state"));let v=g.data.nodeHistory.at(-1);if(oe.scrollToEnd.instant(),N.setInput(void 0),g.data.isFinished)return;v===void 0?(v=Aa(n.nodes).id,N.setCurrentNodeId(v),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:g.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(y=n.analytics)==null?void 0:y.customProperties})):N.removeMessagesSentByNodeIds([v]);const{interpret:b,abort:_,undo:$}=Gc({context:n.context,analytics:{service:r,customProperties:(m=n.analytics)==null?void 0:m.customProperties},apiClient:t,logger:e,talentBankClient:i,flow:n,chatService:s,t:l,getSubmissions:()=>{var S;return(S=N.current$.peek().flow)==null?void 0:S.data.submissions},onInterpret:S=>N.setCurrentNodeId(S.id),onFlowEnd:async()=>{var A;N.markAsFinished();const S=N.current$.peek().flow;De(S),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:S.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(A=n.analytics)==null?void 0:A.customProperties})}});return p(()=>$),b(v),_},[r,t,s,e,n,i,l]),c(ne,{children:[c("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:N.inputHeight$.value},children:c(Kd,{lastSentMessageFooter:n.data.isFinished||!d?null:c(Jd,{undoFn:d})})}),c($d,{logger:e})]})},Yd=e=>e.type==="identify"?[]:"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],Jd=({undoFn:e})=>{const{t}=le();return c(yr,{onClick:async()=>{const{flow:r}=N.current$.peek();De(r);const{removed:i}=e(r.data.nodeHistory),n=r.data.nodeHistory.splice(-i);n.length!==0&&(N.removeMessagesSentByNodeIds(n),N.setInput(void 0),n.pop(),n.map(a=>r.nodes.find(o=>o.id===a)).filter(Boolean).flatMap(Yd).forEach(a=>delete r.data.submissions[a]),N.current$.value={...N.current$.value})},children:[c("title",{children:t("undo")}),c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})]})},Zd=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Gd},Symbol.toStringTag,{value:"Module"}))})();