@inploi/plugin-chatbot 7.1.0 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";var Po=t=>t,Lo={sandbox:"https://platform.staging.inploi.com",production:"https://platform.inploi.com",_internal_local:"http://localhost:8787"};function jo(){return{"~standard":{vendor:"inploi",version:1,validate:t=>({value:t})}}}function Wp(t){return t}var zo=({environment:t,publishableKey:e,logger:r})=>{let i=Lo[t];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":e}});return o.ok?await o.json():(r.error(`[PlatformClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1})}catch(a){return r.error("[PlatformClient] checkDuplicate failed:",a),{isDuplicate:!1}}}}},Ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ro=Array.isArray,xr=Ro,Bo=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,Uo=Bo,Ho=Uo,qo=typeof self=="object"&&self&&self.Object===Object&&self,Ko=Ho||qo||Function("return this")(),kr=Ko,Go=kr,Wo=Go.Symbol,Sr=Wo,Di=Sr,Vi=Object.prototype,Yo=Vi.hasOwnProperty,Jo=Vi.toString,_e=Di?Di.toStringTag:void 0;function Xo(t){var e=Yo.call(t,_e),r=t[_e];try{t[_e]=void 0;var i=!0}catch{}var n=Jo.call(t);return i&&(e?t[_e]=r:delete t[_e]),n}var Zo=Xo,Qo=Object.prototype,ts=Qo.toString;function es(t){return ts.call(t)}var rs=es,Pi=Sr,is=Zo,ns=rs,as="[object Null]",os="[object Undefined]",Li=Pi?Pi.toStringTag:void 0;function ss(t){return t==null?t===void 0?os:as:Li&&Li in Object(t)?is(t):ns(t)}var ji=ss;function ls(t){return t!=null&&typeof t=="object"}var cs=ls,ds=ji,us=cs,fs="[object Symbol]";function hs(t){return typeof t=="symbol"||us(t)&&ds(t)==fs}var Cr=hs,ps=xr,gs=Cr,vs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bs=/^\w*$/;function ws(t,e){if(ps(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||gs(t)?!0:bs.test(t)||!vs.test(t)||e!=null&&t in Object(e)}var ms=ws;function ys(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var zi=ys,_s=ji,xs=zi,ks="[object AsyncFunction]",Ss="[object Function]",Cs="[object GeneratorFunction]",$s="[object Proxy]";function Es(t){if(!xs(t))return!1;var e=_s(t);return e==Ss||e==Cs||e==ks||e==$s}var Is=Es,Ts=kr,As=Ts["__core-js_shared__"],Ms=As,$r=Ms,Ri=function(){var t=/[^.]+$/.exec($r&&$r.keys&&$r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ns(t){return!!Ri&&Ri in t}var Fs=Ns,Os=Function.prototype,Ds=Os.toString;function Vs(t){if(t!=null){try{return Ds.call(t)}catch{}try{return t+""}catch{}}return""}var Ps=Vs,Ls=Is,js=Fs,zs=zi,Rs=Ps,Bs=/[\\^$.*+?()[\]{}|]/g,Us=/^\[object .+?Constructor\]$/,Hs=Function.prototype,qs=Object.prototype,Ks=Hs.toString,Gs=qs.hasOwnProperty,Ws=RegExp("^"+Ks.call(Gs).replace(Bs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ys(t){if(!zs(t)||js(t))return!1;var e=Ls(t)?Ws:Us;return e.test(Rs(t))}var Js=Ys;function Xs(t,e){return t==null?void 0:t[e]}var Zs=Xs,Qs=Js,tl=Zs;function el(t,e){var r=tl(t,e);return Qs(r)?r:void 0}var Bi=el,rl=Bi,il=rl(Object,"create"),We=il,Ui=We;function nl(){this.__data__=Ui?Ui(null):{},this.size=0}var al=nl;function ol(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var sl=ol,ll=We,cl="__lodash_hash_undefined__",dl=Object.prototype,ul=dl.hasOwnProperty;function fl(t){var e=this.__data__;if(ll){var r=e[t];return r===cl?void 0:r}return ul.call(e,t)?e[t]:void 0}var hl=fl,pl=We,gl=Object.prototype,vl=gl.hasOwnProperty;function bl(t){var e=this.__data__;return pl?e[t]!==void 0:vl.call(e,t)}var wl=bl,ml=We,yl="__lodash_hash_undefined__";function _l(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ml&&e===void 0?yl:e,this}var xl=_l,kl=al,Sl=sl,Cl=hl,$l=wl,El=xl;function ae(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ae.prototype.clear=kl,ae.prototype.delete=Sl,ae.prototype.get=Cl,ae.prototype.has=$l,ae.prototype.set=El;var Il=ae;function Tl(){this.__data__=[],this.size=0}var Al=Tl;function Ml(t,e){return t===e||t!==t&&e!==e}var Nl=Ml,Fl=Nl;function Ol(t,e){for(var r=t.length;r--;)if(Fl(t[r][0],e))return r;return-1}var Ye=Ol,Dl=Ye,Vl=Array.prototype,Pl=Vl.splice;function Ll(t){var e=this.__data__,r=Dl(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():Pl.call(e,r,1),--this.size,!0}var jl=Ll,zl=Ye;function Rl(t){var e=this.__data__,r=zl(e,t);return r<0?void 0:e[r][1]}var Bl=Rl,Ul=Ye;function Hl(t){return Ul(this.__data__,t)>-1}var ql=Hl,Kl=Ye;function Gl(t,e){var r=this.__data__,i=Kl(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var Wl=Gl,Yl=Al,Jl=jl,Xl=Bl,Zl=ql,Ql=Wl;function oe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}oe.prototype.clear=Yl,oe.prototype.delete=Jl,oe.prototype.get=Xl,oe.prototype.has=Zl,oe.prototype.set=Ql;var tc=oe,ec=Bi,rc=kr,ic=ec(rc,"Map"),nc=ic,Hi=Il,ac=tc,oc=nc;function sc(){this.size=0,this.__data__={hash:new Hi,map:new(oc||ac),string:new Hi}}var lc=sc;function cc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var dc=cc,uc=dc;function fc(t,e){var r=t.__data__;return uc(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Je=fc,hc=Je;function pc(t){var e=hc(this,t).delete(t);return this.size-=e?1:0,e}var gc=pc,vc=Je;function bc(t){return vc(this,t).get(t)}var wc=bc,mc=Je;function yc(t){return mc(this,t).has(t)}var _c=yc,xc=Je;function kc(t,e){var r=xc(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}var Sc=kc,Cc=lc,$c=gc,Ec=wc,Ic=_c,Tc=Sc;function se(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}se.prototype.clear=Cc,se.prototype.delete=$c,se.prototype.get=Ec,se.prototype.has=Ic,se.prototype.set=Tc;var Ac=se,qi=Ac,Mc="Expected a function";function Er(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Mc);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(Er.Cache||qi),r}Er.Cache=qi;var Nc=Er,Fc=Nc,Oc=500;function Dc(t){var e=Fc(t,function(i){return r.size===Oc&&r.clear(),i}),r=e.cache;return e}var Vc=Dc,Pc=Vc,Lc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jc=/\\(\\)?/g,zc=Pc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Lc,function(r,i,n,a){e.push(n?a.replace(jc,"$1"):i||r)}),e}),Rc=zc;function Bc(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var Uc=Bc,Ki=Sr,Hc=Uc,qc=xr,Kc=Cr,Gc=1/0,Gi=Ki?Ki.prototype:void 0,Wi=Gi?Gi.toString:void 0;function Yi(t){if(typeof t=="string")return t;if(qc(t))return Hc(t,Yi)+"";if(Kc(t))return Wi?Wi.call(t):"";var e=t+"";return e=="0"&&1/t==-Gc?"-0":e}var Wc=Yi,Yc=Wc;function Jc(t){return t==null?"":Yc(t)}var Xc=Jc,Zc=xr,Qc=ms,td=Rc,ed=Xc;function rd(t,e){return Zc(t)?t:Qc(t,e)?[t]:td(ed(t))}var id=rd,nd=Cr,ad=1/0;function od(t){if(typeof t=="string"||nd(t))return t;var e=t+"";return e=="0"&&1/t==-ad?"-0":e}var sd=od,ld=id,cd=sd;function dd(t,e){e=ld(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[cd(e[r++])];return r&&r==i?t:void 0}var ud=dd,fd=ud;function hd(t,e,r){var i=t==null?void 0:fd(t,e);return i===void 0?r:i}var pd=hd;const xe=Oi(pd);var ke,E,Ji,Xi,Jt,Zi,Qi,Ir,tn,le={},en=[],gd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Xe=Array.isArray;function Ft(t,e){for(var r in e)t[r]=e[r];return t}function rn(t){var e=t.parentNode;e&&e.removeChild(t)}function vt(t,e,r){var i,n,a,o={};for(a in e)a=="key"?i=e[a]:a=="ref"?n=e[a]:o[a]=e[a];if(arguments.length>2&&(o.children=arguments.length>3?ke.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)o[a]===void 0&&(o[a]=t.defaultProps[a]);return Se(t,o,i,n,null)}function Se(t,e,r,i,n){var a={type:t,props:e,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++Ji};return n==null&&E.vnode!=null&&E.vnode(a),a}function vd(){return{current:null}}function et(t){return t.children}function xt(t,e){this.props=t,this.context=e}function Ze(t,e){if(e==null)return t.__?Ze(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Ze(t):null}function nn(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return nn(t)}}function Tr(t){(!t.__d&&(t.__d=!0)&&Jt.push(t)&&!Qe.__r++||Zi!==E.debounceRendering)&&((Zi=E.debounceRendering)||Qi)(Qe)}function Qe(){var t,e,r,i,n,a,o,s,c;for(Jt.sort(Ir);t=Jt.shift();)t.__d&&(e=Jt.length,i=void 0,n=void 0,a=void 0,s=(o=(r=t).__v).__e,(c=r.__P)&&(i=[],n=[],(a=Ft({},o)).__v=o.__v+1,Ar(c,o,a,r.__n,c.ownerSVGElement!==void 0,o.__h!=null?[s]:null,i,s??Ze(o),o.__h,n),un(i,o,n),o.__e!=s&&nn(o)),Jt.length>e&&Jt.sort(Ir));Qe.__r=0}function an(t,e,r,i,n,a,o,s,c,f,v){var d,p,w,g,m,S,y,x,A,N,M=0,K=i&&i.__k||en,gt=K.length,it=gt,U=e.length;for(r.__k=[],d=0;d<U;d++)(g=r.__k[d]=(g=e[d])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?Se(null,g,null,null,g):Xe(g)?Se(et,{children:g},null,null,null):g.__b>0?Se(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(x=bd(g,K,y=d+M,it))===-1?w=le:(w=K[x]||le,K[x]=void 0,it--),Ar(t,g,w,n,a,o,s,c,f,v),m=g.__e,(p=g.ref)&&w.ref!=p&&(w.ref&&Mr(w.ref,null,g),v.push(p,g.__c||m,g)),m!=null&&(S==null&&(S=m),N=!(A=w===le||w.__v===null)&&x===y,A?x==-1&&M--:x!==y&&(x===y+1?(M++,N=!0):x>y?it>U-y?(M+=x-y,N=!0):M--:M=x<y&&x==y-1?x-y:0),y=d+M,N=N||x==d&&!A,typeof g.type!="function"||x===y&&w.__k!==g.__k?typeof g.type=="function"||N?g.__d!==void 0?(c=g.__d,g.__d=void 0):c=m.nextSibling:c=sn(t,m,c):c=on(g,c,t),typeof r.type=="function"&&(r.__d=c)));for(r.__e=S,d=gt;d--;)K[d]!=null&&(typeof r.type=="function"&&K[d].__e!=null&&K[d].__e==r.__d&&(r.__d=K[d].__e.nextSibling),fn(K[d],K[d]))}function on(t,e,r){for(var i,n=t.__k,a=0;n&&a<n.length;a++)(i=n[a])&&(i.__=t,e=typeof i.type=="function"?on(i,e,r):sn(r,i.__e,e));return e}function Ot(t,e){return e=e||[],t==null||typeof t=="boolean"||(Xe(t)?t.some(function(r){Ot(r,e)}):e.push(t)),e}function sn(t,e,r){return r==null||r.parentNode!==t?t.insertBefore(e,null):e==r&&e.parentNode!=null||t.insertBefore(e,r),e.nextSibling}function bd(t,e,r,i){var n=t.key,a=t.type,o=r-1,s=r+1,c=e[r];if(c===null||c&&n==c.key&&a===c.type)return r;if(i>(c!=null?1:0))for(;o>=0||s<e.length;){if(o>=0){if((c=e[o])&&n==c.key&&a===c.type)return o;o--}if(s<e.length){if((c=e[s])&&n==c.key&&a===c.type)return s;s++}}return-1}function wd(t,e,r,i,n){var a;for(a in r)a==="children"||a==="key"||a in e||tr(t,a,null,r[a],i);for(a in e)n&&typeof e[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===e[a]||tr(t,a,e[a],r[a],i)}function ln(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||gd.test(e)?r:r+"px"}function tr(t,e,r,i,n){var a;t:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)r&&e in r||ln(t.style,e,"");if(r)for(e in r)i&&r[e]===i[e]||ln(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")a=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+a]=r,r?i||t.addEventListener(e,a?dn:cn,a):t.removeEventListener(e,a?dn:cn,a);else if(e!=="dangerouslySetInnerHTML"){if(n)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function cn(t){return this.l[t.type+!1](E.event?E.event(t):t)}function dn(t){return this.l[t.type+!0](E.event?E.event(t):t)}function Ar(t,e,r,i,n,a,o,s,c,f){var v,d,p,w,g,m,S,y,x,A,N,M,K,gt,it,U=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(c=r.__h,s=e.__e=r.__e,e.__h=null,a=[s]),(v=E.__b)&&v(e);try{t:if(typeof U=="function"){if(y=e.props,x=(v=U.contextType)&&i[v.__c],A=v?x?x.props.value:v.__:i,r.__c?S=(d=e.__c=r.__c).__=d.__E:("prototype"in U&&U.prototype.render?e.__c=d=new U(y,A):(e.__c=d=new xt(y,A),d.constructor=U,d.render=yd),x&&x.sub(d),d.props=y,d.state||(d.state={}),d.context=A,d.__n=i,p=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),U.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ft({},d.__s)),Ft(d.__s,U.getDerivedStateFromProps(y,d.__s))),w=d.props,g=d.state,d.__v=e,p)U.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(U.getDerivedStateFromProps==null&&y!==w&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(y,A),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(y,d.__s,A)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(q){q&&(q.__=e)}),N=0;N<d._sb.length;N++)d.__h.push(d._sb[N]);d._sb=[],d.__h.length&&o.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(y,d.__s,A),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(w,g,m)})}if(d.context=A,d.props=y,d.__P=t,d.__e=!1,M=E.__r,K=0,"prototype"in U&&U.prototype.render){for(d.state=d.__s,d.__d=!1,M&&M(e),v=d.render(d.props,d.state,d.context),gt=0;gt<d._sb.length;gt++)d.__h.push(d._sb[gt]);d._sb=[]}else do d.__d=!1,M&&M(e),v=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++K<25);d.state=d.__s,d.getChildContext!=null&&(i=Ft(Ft({},i),d.getChildContext())),p||d.getSnapshotBeforeUpdate==null||(m=d.getSnapshotBeforeUpdate(w,g)),an(t,Xe(it=v!=null&&v.type===et&&v.key==null?v.props.children:v)?it:[it],e,r,i,n,a,o,s,c,f),d.base=e.__e,e.__h=null,d.__h.length&&o.push(d),S&&(d.__E=d.__=null)}else a==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=md(r.__e,e,r,i,n,a,o,c,f);(v=E.diffed)&&v(e)}catch(q){e.__v=null,(c||a!=null)&&(e.__e=s,e.__h=!!c,a[a.indexOf(s)]=null),E.__e(q,e,r)}}function un(t,e,r){for(var i=0;i<r.length;i++)Mr(r[i],r[++i],r[++i]);E.__c&&E.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(a){a.call(n)})}catch(a){E.__e(a,n.__v)}})}function md(t,e,r,i,n,a,o,s,c){var f,v,d,p=r.props,w=e.props,g=e.type,m=0;if(g==="svg"&&(n=!0),a!=null){for(;m<a.length;m++)if((f=a[m])&&"setAttribute"in f==!!g&&(g?f.localName===g:f.nodeType===3)){t=f,a[m]=null;break}}if(t==null){if(g===null)return document.createTextNode(w);t=n?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,w.is&&w),a=null,s=!1}if(g===null)p===w||s&&t.data===w||(t.data=w);else{if(a=a&&ke.call(t.childNodes),v=(p=r.props||le).dangerouslySetInnerHTML,d=w.dangerouslySetInnerHTML,!s){if(a!=null)for(p={},m=0;m<t.attributes.length;m++)p[t.attributes[m].name]=t.attributes[m].value;(d||v)&&(d&&(v&&d.__html==v.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(wd(t,w,p,n,s),d)e.__k=[];else if(an(t,Xe(m=e.props.children)?m:[m],e,r,i,n&&g!=="foreignObject",a,o,a?a[0]:r.__k&&Ze(r,0),s,c),a!=null)for(m=a.length;m--;)a[m]!=null&&rn(a[m]);s||("value"in w&&(m=w.value)!==void 0&&(m!==t.value||g==="progress"&&!m||g==="option"&&m!==p.value)&&tr(t,"value",m,p.value,!1),"checked"in w&&(m=w.checked)!==void 0&&m!==t.checked&&tr(t,"checked",m,p.checked,!1))}return t}function Mr(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(i){E.__e(i,r)}}function fn(t,e,r){var i,n;if(E.unmount&&E.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||Mr(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){E.__e(a,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(n=0;n<i.length;n++)i[n]&&fn(i[n],e,r||typeof t.type!="function");r||t.__e==null||rn(t.__e),t.__=t.__e=t.__d=void 0}function yd(t,e,r){return this.constructor(t,r)}function ce(t,e,r){var i,n,a,o;E.__&&E.__(t,e),n=(i=typeof r=="function")?null:r&&r.__k||e.__k,a=[],o=[],Ar(e,t=(!i&&r||e).__k=vt(et,null,[t]),n||le,le,e.ownerSVGElement!==void 0,!i&&r?[r]:n?null:e.firstChild?ke.call(e.childNodes):null,a,!i&&r?r:n?n.__e:e.firstChild,i,o),un(a,t,o)}function hn(t,e){ce(t,e,hn)}function _d(t,e,r){var i,n,a,o,s=Ft({},t.props);for(a in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)a=="key"?i=e[a]:a=="ref"?n=e[a]:s[a]=e[a]===void 0&&o!==void 0?o[a]:e[a];return arguments.length>2&&(s.children=arguments.length>3?ke.call(arguments,2):r),Se(t.type,s,i||t.key,n||t.ref,null)}function pn(t,e){var r={__c:e="__cC"+tn++,__:t,Consumer:function(i,n){return i.children(n)},Provider:function(i){var n,a;return this.getChildContext||(n=[],(a={})[e]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(s){s.__e=!0,Tr(s)})},this.sub=function(o){n.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),s&&s.call(o)}}),i.children}};return r.Provider.__=r.Consumer.contextType=r}ke=en.slice,E={__e:function(t,e,r,i){for(var n,a,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(t)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(t,i||{}),o=n.__d),o)return n.__E=n}catch(s){t=s}throw t}},Ji=0,Xi=function(t){return t!=null&&t.constructor===void 0},xt.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state),typeof t=="function"&&(t=t(Ft({},r),this.props)),t&&Ft(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Tr(this))},xt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Tr(this))},xt.prototype.render=et,Jt=[],Qi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ir=function(t,e){return t.__v.__b-e.__v.__b},Qe.__r=0,tn=0;function gn(t){var e,r,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(r=gn(t[e]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}function zt(){for(var t,e,r=0,i="",n=arguments.length;r<n;r++)(t=arguments[r])&&(e=gn(t))&&(i&&(i+=" "),i+=e);return i}const vn=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,bn=zt,Xt=(t,e)=>r=>{var i;if((e==null?void 0:e.variants)==null)return bn(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:a}=e,o=Object.keys(n).map(f=>{const v=r==null?void 0:r[f],d=a==null?void 0:a[f];if(v===null)return null;const p=vn(v)||vn(d);return n[f][p]}),s=r&&Object.entries(r).reduce((f,v)=>{let[d,p]=v;return p===void 0||(f[d]=p),f},{}),c=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((f,v)=>{let{class:d,className:p,...w}=v;return Object.entries(w).every(g=>{let[m,S]=g;return Array.isArray(S)?S.includes({...a,...s}[m]):{...a,...s}[m]===S})?[...f,d,p]:f},[]);return bn(t,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};var Rt,R,Nr,wn,de=0,mn=[],er=[],yn=E.__b,_n=E.__r,xn=E.diffed,kn=E.__c,Sn=E.unmount;function ue(t,e){E.__h&&E.__h(R,t,de||e),de=0;var r=R.__H||(R.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:er}),r.__[t]}function _t(t){return de=1,Cn(In,t)}function Cn(t,e,r){var i=ue(Rt++,2);if(i.t=t,!i.__c&&(i.__=[r?r(e):In(void 0,e),function(s){var c=i.__N?i.__N[0]:i.__[0],f=i.t(c,s);c!==f&&(i.__N=[f,i.__[1]],i.__c.setState({}))}],i.__c=R,!R.u)){var n=function(s,c,f){if(!i.__c.__H)return!0;var v=i.__c.__H.__.filter(function(p){return p.__c});if(v.every(function(p){return!p.__N}))return!a||a.call(this,s,c,f);var d=!1;return v.forEach(function(p){if(p.__N){var w=p.__[0];p.__=p.__N,p.__N=void 0,w!==p.__[0]&&(d=!0)}}),!(!d&&i.__c.props===s)&&(!a||a.call(this,s,c,f))};R.u=!0;var a=R.shouldComponentUpdate,o=R.componentWillUpdate;R.componentWillUpdate=function(s,c,f){if(this.__e){var v=a;a=void 0,n(s,c,f),a=v}o&&o.call(this,s,c,f)},R.shouldComponentUpdate=n}return i.__N||i.__}function kt(t,e){var r=ue(Rt++,3);!E.__s&&Or(r.__H,e)&&(r.__=t,r.i=e,R.__H.__h.push(r))}function bt(t,e){var r=ue(Rt++,4);!E.__s&&Or(r.__H,e)&&(r.__=t,r.i=e,R.__h.push(r))}function wt(t){return de=5,Dt(function(){return{current:t}},[])}function xd(t,e,r){de=6,bt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function Dt(t,e){var r=ue(Rt++,7);return Or(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function kd(t,e){return de=8,Dt(function(){return t},e)}function $n(t){var e=R.context[t.__c],r=ue(Rt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(R)),e.props.value):t.__}function Sd(t,e){E.useDebugValue&&E.useDebugValue(e?e(t):t)}function Cd(){var t=ue(Rt++,11);if(!t.__){for(var e=R.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function $d(){for(var t;t=mn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(rr),t.__H.__h.forEach(Fr),t.__H.__h=[]}catch(e){t.__H.__h=[],E.__e(e,t.__v)}}E.__b=function(t){R=null,yn&&yn(t)},E.__r=function(t){_n&&_n(t),Rt=0;var e=(R=t.__c).__H;e&&(Nr===R?(e.__h=[],R.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=er,r.__N=r.i=void 0})):(e.__h.forEach(rr),e.__h.forEach(Fr),e.__h=[],Rt=0)),Nr=R},E.diffed=function(t){xn&&xn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(mn.push(e)!==1&&wn===E.requestAnimationFrame||((wn=E.requestAnimationFrame)||Ed)($d)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==er&&(r.__=r.__V),r.i=void 0,r.__V=er})),Nr=R=null},E.__c=function(t,e){e.some(function(r){try{r.__h.forEach(rr),r.__h=r.__h.filter(function(i){return!i.__||Fr(i)})}catch(i){e.some(function(n){n.__h&&(n.__h=[])}),e=[],E.__e(i,r.__v)}}),kn&&kn(t,e)},E.unmount=function(t){Sn&&Sn(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(i){try{rr(i)}catch(n){e=n}}),r.__H=void 0,e&&E.__e(e,r.__v))};var En=typeof requestAnimationFrame=="function";function Ed(t){var e,r=function(){clearTimeout(i),En&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(r,100);En&&(e=requestAnimationFrame(r))}function rr(t){var e=R,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),R=e}function Fr(t){var e=R;t.__c=t.__(),R=e}function Or(t,e){return!t||t.length!==e.length||e.some(function(r,i){return r!==t[i]})}function In(t,e){return typeof e=="function"?e(t):e}function Tn(t,e){for(var r in e)t[r]=e[r];return t}function Dr(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var i in e)if(i!=="__source"&&t[i]!==e[i])return!0;return!1}function Vr(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function Pr(t){this.props=t}function Id(t,e){function r(n){var a=this.props.ref,o=a==n.ref;return!o&&a&&(a.call?a(null):a.current=null),e?!e(this.props,n)||!o:Dr(this.props,n)}function i(n){return this.shouldComponentUpdate=r,vt(t,n)}return i.displayName="Memo("+(t.displayName||t.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(Pr.prototype=new xt).isPureReactComponent=!0,Pr.prototype.shouldComponentUpdate=function(t,e){return Dr(this.props,t)||Dr(this.state,e)};var An=E.__b;E.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),An&&An(t)};var Td=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Lr(t){function e(r){var i=Tn({},r);return delete i.ref,t(i,r.ref||null)}return e.$$typeof=Td,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Mn=function(t,e){return t==null?null:Ot(Ot(t).map(e))},Ad={map:Mn,forEach:Mn,count:function(t){return t?Ot(t).length:0},only:function(t){var e=Ot(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Ot},Md=E.__e;E.__e=function(t,e,r,i){if(t.then){for(var n,a=e;a=a.__;)if((n=a.__c)&&n.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e)}Md(t,e,r,i)};var Nn=E.unmount;function Fn(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),t.__c.__H=null),(t=Tn({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(i){return Fn(i,e,r)})),t}function On(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(i){return On(i,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function Ce(){this.__u=0,this.t=null,this.__b=null}function Dn(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Vn(t){var e,r,i;function n(a){if(e||(e=t()).then(function(o){r=o.default||o},function(o){i=o}),i)throw i;if(!r)throw e;return vt(r,a)}return n.displayName="Lazy",n.__f=!0,n}function $e(){this.u=null,this.o=null}E.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Nn&&Nn(t)},(Ce.prototype=new xt).__c=function(t,e){var r=e.__c,i=this;i.t==null&&(i.t=[]),i.t.push(r);var n=Dn(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 f=i.state.__a;i.__v.__k[0]=On(f,f.__c.__P,f.__c.__O)}var v;for(i.setState({__a:i.__b=null});v=i.t.pop();)v.forceUpdate()}},c=e.__h===!0;i.__u++||c||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(o,o)},Ce.prototype.componentWillUnmount=function(){this.t=[]},Ce.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Fn(this.__b,r,i.__O=i.__P)}this.__b=null}var n=e.__a&&vt(et,null,t.fallback);return n&&(n.__h=null),[vt(et,null,e.__a?null:t.children),n]};var Pn=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Nd(t){return this.getChildContext=function(){return t.context},t.children}function Fd(t){var e=this,r=t.i;e.componentWillUnmount=function(){ce(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(i){this.childNodes.push(i),e.i.appendChild(i)},insertBefore:function(i,n){this.childNodes.push(i),e.i.appendChild(i)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.i.removeChild(i)}}),ce(vt(Nd,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Od(t,e){var r=vt(Fd,{__v:t,i:e});return r.containerInfo=e,r}($e.prototype=new xt).__a=function(t){var e=this,r=Dn(e.__v),i=e.o.get(t);return i[0]++,function(n){var a=function(){e.props.revealOrder?(i.push(n),Pn(e,t,i)):n()};r?r(a):a()}},$e.prototype.render=function(t){this.u=null,this.o=new Map;var e=Ot(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},$e.prototype.componentDidUpdate=$e.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){Pn(t,r,e)})};var Ln=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Dd=/^(?: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]/,Vd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Pd=/[A-Z0-9]/g,Ld=typeof document<"u",jd=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function zd(t,e,r){return e.__k==null&&(e.textContent=""),ce(t,e),typeof r=="function"&&r(),t?t.__c:null}function Rd(t,e,r){return hn(t,e),typeof r=="function"&&r(),t?t.__c:null}xt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(xt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var jn=E.event;function Bd(){}function Ud(){return this.cancelBubble}function Hd(){return this.defaultPrevented}E.event=function(t){return jn&&(t=jn(t)),t.persist=Bd,t.isPropagationStopped=Ud,t.isDefaultPrevented=Hd,t.nativeEvent=t};var jr,qd={enumerable:!1,configurable:!0,get:function(){return this.class}},zn=E.vnode;E.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,i=e.type,n={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Ld&&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"||jd(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Vd.test(a)?a=s:i.indexOf("-")===-1&&Dd.test(a)?a=a.replace(Pd,"-$&").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=Ot(r.children).forEach(function(c){c.props.selected=n.value.indexOf(c.props.value)!=-1})),i=="select"&&n.defaultValue!=null&&(n.value=Ot(r.children).forEach(function(c){c.props.selected=n.multiple?n.defaultValue.indexOf(c.props.value)!=-1:n.defaultValue==c.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",qd)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),e.props=n}(t),t.$$typeof=Ln,zn&&zn(t)};var Rn=E.__r;E.__r=function(t){Rn&&Rn(t),jr=t.__c};var Bn=E.diffed;E.diffed=function(t){Bn&&Bn(t);var e=t.props,r=t.__e;r!=null&&t.type==="textarea"&&"value"in e&&e.value!==r.value&&(r.value=e.value==null?"":e.value),jr=null};var Kd={ReactCurrentDispatcher:{current:{readContext:function(t){return jr.__n[t.__c].props.value}}}};function Gd(t){return vt.bind(null,t)}function Un(t){return!!t&&t.$$typeof===Ln}function Wd(t){return Un(t)?_d.apply(null,arguments):t}function Yd(t){return!!t.__k&&(ce(null,t),!0)}function Jd(t){return t&&(t.base||t.nodeType===1&&t)||null}var Xd=function(t,e){return t(e)},Zd=function(t,e){return t(e)},Qd=et;function Hn(t){t()}function tu(t){return t}function eu(){return[!1,Hn]}var ru=bt;function iu(t,e){var r=e(),i=_t({h:{__:r,v:e}}),n=i[0].h,a=i[1];return bt(function(){n.__=r,n.v=e,Vr(n.__,e())||a({h:n})},[t,r,e]),kt(function(){return Vr(n.__,n.v())||a({h:n}),t(function(){Vr(n.__,n.v())||a({h:n})})},[t]),r}var lt={useState:_t,useId:Cd,useReducer:Cn,useEffect:kt,useLayoutEffect:bt,useInsertionEffect:ru,useTransition:eu,useDeferredValue:tu,useSyncExternalStore:iu,startTransition:Hn,useRef:wt,useImperativeHandle:xd,useMemo:Dt,useCallback:kd,useContext:$n,useDebugValue:Sd,version:"17.0.2",Children:Ad,render:zd,hydrate:Rd,unmountComponentAtNode:Yd,createPortal:Od,createElement:vt,createContext:pn,createFactory:Gd,cloneElement:Wd,createRef:vd,Fragment:et,isValidElement:Un,findDOMNode:Jd,Component:xt,PureComponent:Pr,memo:Id,forwardRef:Lr,flushSync:Zd,unstable_batchedUpdates:Xd,StrictMode:Qd,Suspense:Ce,SuspenseList:$e,lazy:Vn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kd};const ct=Symbol.for("@ts-pattern/matcher"),qn=Symbol.for("@ts-pattern/isVariadic"),ir="@ts-pattern/anonymous-select-key",zr=t=>!!(t&&typeof t=="object"),nr=t=>t&&!!t[ct],G=(t,e,r)=>{if(nr(t)){const i=t[ct](),{matched:n,selections:a}=i.match(e);return n&&a&&Object.keys(a).forEach(o=>r(o,a[o])),n}if(zr(t)){if(!zr(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let i=[],n=[],a=[];for(const o of t.keys()){const s=t[o];nr(s)&&s[qn]?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(e.length<i.length+n.length)return!1;const o=e.slice(0,i.length),s=n.length===0?[]:e.slice(-n.length),c=e.slice(i.length,n.length===0?1/0:-n.length);return i.every((f,v)=>G(f,o[v],r))&&n.every((f,v)=>G(f,s[v],r))&&(a.length===0||G(a[0],c,r))}return t.length===e.length&&t.every((o,s)=>G(o,e[s],r))}return Reflect.ownKeys(t).every(i=>{const n=t[i];return(i in e||nr(a=n)&&a[ct]().matcherType==="optional")&&G(n,e[i],r);var a})}return Object.is(e,t)},dt=t=>{var e,r,i;return zr(t)?nr(t)?(e=(r=(i=t[ct]()).getSelectionKeys)==null?void 0:r.call(i))!=null?e:[]:Array.isArray(t)?Ee(t,dt):Ee(Object.values(t),dt):[]},Ee=(t,e)=>t.reduce((r,i)=>r.concat(e(i)),[]);function nu(...t){if(t.length===1){const[e]=t;return r=>G(e,r,()=>{})}if(t.length===2){const[e,r]=t;return G(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function X(t){return Object.assign(t,{optional:()=>Br(t),and:e=>B(t,e),or:e=>Kn(t,e),select:e=>e===void 0?Ie(t):Ie(e,t)})}function Rr(t){return Object.assign((e=>Object.assign(e,{[Symbol.iterator](){let r=0;const i=[{value:Object.assign(e,{[qn]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var n;return(n=i[r++])!=null?n:i.at(-1)}}}}))(t),{optional:()=>Rr(Br(t)),select:e=>Rr(e===void 0?Ie(t):Ie(e,t))})}function Br(t){return X({[ct]:()=>({match:e=>{let r={};const i=(n,a)=>{r[n]=a};return e===void 0?(dt(t).forEach(n=>i(n,void 0)),{matched:!0,selections:r}):{matched:G(t,e,i),selections:r}},getSelectionKeys:()=>dt(t),matcherType:"optional"})})}const au=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},ou=(t,e)=>{for(const[r,i]of t.entries())if(!e(i,r))return!1;return!0},su=(t,e)=>{const r=Reflect.ownKeys(t);for(const i of r)if(!e(i,t[i]))return!1;return!0};function B(...t){return X({[ct]:()=>({match:e=>{let r={};const i=(n,a)=>{r[n]=a};return{matched:t.every(n=>G(n,e,i)),selections:r}},getSelectionKeys:()=>Ee(t,dt),matcherType:"and"})})}function Kn(...t){return X({[ct]:()=>({match:e=>{let r={};const i=(n,a)=>{r[n]=a};return Ee(t,dt).forEach(n=>i(n,void 0)),{matched:t.some(n=>G(n,e,i)),selections:r}},getSelectionKeys:()=>Ee(t,dt),matcherType:"or"})})}function O(t){return{[ct]:()=>({match:e=>({matched:!!t(e)})})}}function Ie(...t){const e=typeof t[0]=="string"?t[0]:void 0,r=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return X({[ct]:()=>({match:i=>{let n={[e??ir]:i};return{matched:r===void 0||G(r,i,(a,o)=>{n[a]=o}),selections:n}},getSelectionKeys:()=>[e??ir].concat(r===void 0?[]:dt(r))})})}function Gn(t){return!0}function It(t){return typeof t=="number"}function Bt(t){return typeof t=="string"}function Ut(t){return typeof t=="bigint"}const Wn=X(O(Gn)),lu=X(O(Gn)),cu=Wn,Ht=t=>Object.assign(X(t),{startsWith:e=>{return Ht(B(t,(r=e,O(i=>Bt(i)&&i.startsWith(r)))));var r},endsWith:e=>{return Ht(B(t,(r=e,O(i=>Bt(i)&&i.endsWith(r)))));var r},minLength:e=>Ht(B(t,(r=>O(i=>Bt(i)&&i.length>=r))(e))),length:e=>Ht(B(t,(r=>O(i=>Bt(i)&&i.length===r))(e))),maxLength:e=>Ht(B(t,(r=>O(i=>Bt(i)&&i.length<=r))(e))),includes:e=>{return Ht(B(t,(r=e,O(i=>Bt(i)&&i.includes(r)))));var r},regex:e=>{return Ht(B(t,(r=e,O(i=>Bt(i)&&!!i.match(r)))));var r}}),Yn=Ht(O(Bt)),Tt=t=>Object.assign(X(t),{between:(e,r)=>Tt(B(t,((i,n)=>O(a=>It(a)&&i<=a&&n>=a))(e,r))),lt:e=>Tt(B(t,(r=>O(i=>It(i)&&i<r))(e))),gt:e=>Tt(B(t,(r=>O(i=>It(i)&&i>r))(e))),lte:e=>Tt(B(t,(r=>O(i=>It(i)&&i<=r))(e))),gte:e=>Tt(B(t,(r=>O(i=>It(i)&&i>=r))(e))),int:()=>Tt(B(t,O(e=>It(e)&&Number.isInteger(e)))),finite:()=>Tt(B(t,O(e=>It(e)&&Number.isFinite(e)))),positive:()=>Tt(B(t,O(e=>It(e)&&e>0))),negative:()=>Tt(B(t,O(e=>It(e)&&e<0)))}),du=Tt(O(It)),qt=t=>Object.assign(X(t),{between:(e,r)=>qt(B(t,((i,n)=>O(a=>Ut(a)&&i<=a&&n>=a))(e,r))),lt:e=>qt(B(t,(r=>O(i=>Ut(i)&&i<r))(e))),gt:e=>qt(B(t,(r=>O(i=>Ut(i)&&i>r))(e))),lte:e=>qt(B(t,(r=>O(i=>Ut(i)&&i<=r))(e))),gte:e=>qt(B(t,(r=>O(i=>Ut(i)&&i>=r))(e))),positive:()=>qt(B(t,O(e=>Ut(e)&&e>0))),negative:()=>qt(B(t,O(e=>Ut(e)&&e<0)))}),uu=qt(O(Ut)),fu=X(O(function(t){return typeof t=="boolean"})),hu=X(O(function(t){return typeof t=="symbol"})),pu=X(O(function(t){return t==null})),gu=X(O(function(t){return t!=null}));var D={__proto__:null,matcher:ct,optional:Br,array:function(...t){return Rr({[ct]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let i={};if(e.length===0)return dt(r).forEach(a=>{i[a]=[]}),{matched:!0,selections:i};const n=(a,o)=>{i[a]=(i[a]||[]).concat([o])};return{matched:e.every(a=>G(r,a,n)),selections:i}},getSelectionKeys:()=>t.length===0?[]:dt(t[0])})})},set:function(...t){return X({[ct]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};if(t.length===0)return{matched:!0};const i=(a,o)=>{r[a]=(r[a]||[]).concat([o])},n=t[0];return{matched:au(e,a=>G(n,a,i)),selections:r}},getSelectionKeys:()=>t.length===0?[]:dt(t[0])})})},map:function(...t){return X({[ct]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const i=(s,c)=>{r[s]=(r[s]||[]).concat([c])};if(t.length===0)return{matched:!0};var n;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(n=t[0])==null?void 0:n.toString()}`);const[a,o]=t;return{matched:ou(e,(s,c)=>{const f=G(a,c,i),v=G(o,s,i);return f&&v}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...dt(t[0]),...dt(t[1])]})})},record:function(...t){return X({[ct]:()=>({match:e=>{if(e===null||typeof e!="object"||Array.isArray(e))return{matched:!1};var r;if(t.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=t[0])==null?void 0:r.toString()}`);let i={};const n=(s,c)=>{i[s]=(i[s]||[]).concat([c])},[a,o]=t.length===1?[Yn,t[0]]:t;return{matched:su(e,(s,c)=>{const f=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),v=f!==null&&G(a,f,n),d=G(a,s,n),p=G(o,c,n);return(d||v)&&p}),selections:i}},getSelectionKeys:()=>t.length===0?[]:[...dt(t[0]),...dt(t[1])]})})},intersection:B,union:Kn,not:function(t){return X({[ct]:()=>({match:e=>({matched:!G(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:O,select:Ie,any:Wn,unknown:lu,_:cu,string:Yn,number:du,bigint:uu,boolean:fu,symbol:hu,nullish:pu,nonNullable:gu,instanceOf:function(t){return X(O(function(e){return r=>r instanceof e}(t)))},shape:function(t){return X(O(nu(t)))}};class vu extends Error{constructor(e){let r;try{r=JSON.stringify(e)}catch{r=e}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=e}}const Ur={matched:!1,value:void 0};function Zt(t){return new ar(t,Ur)}class ar{constructor(e,r){this.input=void 0,this.state=void 0,this.input=e,this.state=r}with(...e){if(this.state.matched)return this;const r=e[e.length-1],i=[e[0]];let n;e.length===3&&typeof e[1]=="function"?n=e[1]:e.length>2&&i.push(...e.slice(1,e.length-1));let a=!1,o={};const s=(f,v)=>{a=!0,o[f]=v},c=!i.some(f=>G(f,this.input,s))||n&&!n(this.input)?Ur:{matched:!0,value:r(a?ir in o?o[ir]:o:this.input,this.input)};return new ar(this.input,c)}when(e,r){if(this.state.matched)return this;const i=!!e(this.input);return new ar(this.input,i?{matched:!0,value:r(this.input,this.input)}:Ur)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=bu){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function bu(t){throw new vu(t)}var wu=["other","few","many","two","one","zero"],Jn=({terms:t,overrides:e,locale:r})=>{const i=new Intl.PluralRules(r);function n(a,o){const s=(e==null?void 0:e[a])??t[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(c,f)=>{var v;return((v=o==null?void 0:o[f])==null?void 0:v.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let c=i.select(o.count);if(!(c in s)){const f=wu.find(v=>v in s);if(!f)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);c=f}return s[c].replace(/{{(\w+)}}/g,(f,v)=>{var d;return((d=o==null?void 0:o[v])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return n},mu=0;function l(t,e,r,i,n,a){var o,s,c={};for(s in e)s=="ref"?o=e[s]:c[s]=e[s];var f={type:t,props:c,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--mu,__source:n,__self:a};if(typeof t=="function"&&(o=t.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return E.vnode&&E.vnode(f),f}var Xn=pn(null),yu=t=>({defaultTerms:t,TranslationProvider:({terms:e,children:r,locale:i})=>{const n=Dt(()=>Jn({locale:i,terms:t,overrides:e}),[e,i]);return l(Xn.Provider,{value:{t:n,locale:i},children:r})},useTranslation:()=>{const e=$n(Xn);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:r})=>Jn({terms:t,overrides:e,locale:r})});const{TranslationProvider:_u,useTranslation:nt,createTFunction:xu}=yu({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"}}),Yp="";function At(t,e){if(!t)throw new Error(e)}var ku=Symbol.for("preact-signals");function Hr(){if(fe>1)fe--;else{for(var t,e=!1;Te!==void 0;){var r=Te;for(Te=void 0,qr++;r!==void 0;){var i=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Qn(r))try{r.c()}catch(n){e||(t=n,e=!0)}r=i}}if(qr=0,fe--,e)throw t}}var j=void 0,Te=void 0,fe=0,qr=0,or=0;function Zn(t){if(j!==void 0){var e=t.n;if(e===void 0||e.t!==j)return e={i:0,S:t,p:j.s,n:void 0,t:j,e:void 0,x:void 0,r:e},j.s!==void 0&&(j.s.n=e),j.s=e,t.n=e,32&j.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=j.s,e.n=void 0,j.s.n=e,j.s=e),e}}function rt(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}rt.prototype.brand=ku,rt.prototype.h=function(){return!0},rt.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)},rt.prototype.U=function(t){if(this.t!==void 0){var e=t.e,r=t.x;e!==void 0&&(e.x=r,t.e=void 0),r!==void 0&&(r.e=e,t.x=void 0),t===this.t&&(this.t=r)}},rt.prototype.subscribe=function(t){var e=this;return Gr(function(){var r=e.value,i=j;j=void 0;try{t(r)}finally{j=i}})},rt.prototype.valueOf=function(){return this.value},rt.prototype.toString=function(){return this.value+""},rt.prototype.toJSON=function(){return this.value},rt.prototype.peek=function(){var t=j;j=void 0;try{return this.value}finally{j=t}},Object.defineProperty(rt.prototype,"value",{get:function(){var t=Zn(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(qr>100)throw new Error("Cycle detected");this.v=t,this.i++,or++,fe++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Hr()}}}});function Kt(t){return new rt(t)}function Qn(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ta(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function ea(t){for(var e=t.s,r=void 0;e!==void 0;){var i=e.p;e.i===-1?(e.S.U(e),i!==void 0&&(i.n=e.n),e.n!==void 0&&(e.n.p=i)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=i}t.s=r}function he(t){rt.call(this,void 0),this.x=t,this.s=void 0,this.g=or-1,this.f=4}(he.prototype=new rt).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===or))return!0;if(this.g=or,this.f|=1,this.i>0&&!Qn(this))return this.f&=-2,!0;var t=j;try{ta(this),j=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return j=t,ea(this),this.f&=-2,!0},he.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}rt.prototype.S.call(this,t)},he.prototype.U=function(t){if(this.t!==void 0&&(rt.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},he.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(he.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Zn(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Su(t){return new he(t)}function ra(t){var e=t.u;if(t.u=void 0,typeof e=="function"){fe++;var r=j;j=void 0;try{e()}catch(i){throw t.f&=-2,t.f|=8,Kr(t),i}finally{j=r,Hr()}}}function Kr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ra(t)}function Cu(t){if(j!==this)throw new Error("Out-of-order effect");ea(this),j=t,this.f&=-2,8&this.f&&Kr(this),Hr()}function Ae(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ae.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Ae.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ra(this),ta(this),fe++;var t=j;return j=this,Cu.bind(this,t)},Ae.prototype.N=function(){2&this.f||(this.f|=2,this.o=Te,Te=this)},Ae.prototype.d=function(){this.f|=8,1&this.f||Kr(this)};function Gr(t){var e=new Ae(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Wr;function pe(t,e){E[t]=e.bind(null,E[t]||function(){})}function sr(t){Wr&&Wr(),Wr=t&&t.S()}function ia(t){var e=this,r=t.data,i=Eu(r);i.value=r;var n=Dt(function(){for(var a=e.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return e.__$u.c=function(){var o;!Xi(n.peek())&&((o=e.base)==null?void 0:o.nodeType)===3?e.base.data=n.peek():(e.__$f|=1,e.setState({}))},Su(function(){var o=i.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}ia.displayName="_st",Object.defineProperties(rt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ia},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),pe("__b",function(t,e){if(typeof e.type=="string"){var r,i=e.props;for(var n in i)if(n!=="children"){var a=i[n];a instanceof rt&&(r||(e.__np=r={}),r[n]=a,i[n]=a.peek())}}t(e)}),pe("__r",function(t,e){sr();var r,i=e.__c;i&&(i.__$f&=-2,(r=i.__$u)===void 0&&(i.__$u=r=function(n){var a;return Gr(function(){a=this}),a.c=function(){i.__$f|=1,i.setState({})},a}())),sr(r),t(e)}),pe("__e",function(t,e,r,i){sr(),t(e,r,i)}),pe("diffed",function(t,e){sr();var r;if(typeof e.type=="string"&&(r=e.__e)){var i=e.__np,n=e.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 c in i){var f=a[c],v=i[c];f===void 0?(f=$u(r,c,v,n),a[c]=f):f.o(v,n)}}}t(e)});function $u(t,e,r,i){var n=e in t&&t.ownerSVGElement===void 0,a=Kt(r);return{o:function(o,s){a.value=o,i=s},d:Gr(function(){var o=a.value.value;i[e]!==o&&(i[e]=o,n?t[e]=o:o?t.setAttribute(e,o):t.removeAttribute(e))})}}pe("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__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=e.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}t(e)}),pe("__h",function(t,e,r,i){(i<3||i===9)&&(e.__$f|=2),t(e,r,i)}),xt.prototype.shouldComponentUpdate=function(t,e){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var i in e)return!0;for(var n in t)if(n!=="__source"&&t[n]!==this.props[n])return!0;for(var a in this.props)if(!(a in t))return!0;return!1};function Eu(t){return Dt(function(){return Kt(t)},[])}const Yr=(t,e)=>e.some(r=>t instanceof r);let na,aa;function Iu(){return na||(na=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Tu(){return aa||(aa=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Jr=new WeakMap,Xr=new WeakMap,lr=new WeakMap;function Au(t){const e=new Promise((r,i)=>{const n=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{r(Qt(t.result)),n()},o=()=>{i(t.error),n()};t.addEventListener("success",a),t.addEventListener("error",o)});return lr.set(e,t),e}function Mu(t){if(Jr.has(t))return;const e=new Promise((r,i)=>{const n=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{r(),n()},o=()=>{i(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});Jr.set(t,e)}let Zr={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Jr.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Qt(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function oa(t){Zr=t(Zr)}function Nu(t){return Tu().includes(t)?function(...e){return t.apply(Qr(this),e),Qt(this.request)}:function(...e){return Qt(t.apply(Qr(this),e))}}function Fu(t){return typeof t=="function"?Nu(t):(t instanceof IDBTransaction&&Mu(t),Yr(t,Iu())?new Proxy(t,Zr):t)}function Qt(t){if(t instanceof IDBRequest)return Au(t);if(Xr.has(t))return Xr.get(t);const e=Fu(t);return e!==t&&(Xr.set(t,e),lr.set(e,t)),e}const Qr=t=>lr.get(t);function Ou(t,e,{blocked:r,upgrade:i,blocking:n,terminated:a}={}){const o=indexedDB.open(t,e),s=Qt(o);return i&&o.addEventListener("upgradeneeded",c=>{i(Qt(o.result),c.oldVersion,c.newVersion,Qt(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),s.then(c=>{a&&c.addEventListener("close",()=>a()),n&&c.addEventListener("versionchange",f=>n(f.oldVersion,f.newVersion,f))}).catch(()=>{}),s}const Du=["get","getKey","getAll","getAllKeys","count"],Vu=["put","add","delete","clear"],ti=new Map;function sa(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(ti.get(e))return ti.get(e);const r=e.replace(/FromIndex$/,""),i=e!==r,n=Vu.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||Du.includes(r)))return;const a=async function(o,...s){const c=this.transaction(o,n?"readwrite":"readonly");let f=c.store;return i&&(f=f.index(s.shift())),(await Promise.all([f[r](...s),n&&c.done]))[0]};return ti.set(e,a),a}oa(t=>({...t,get:(e,r,i)=>sa(e,r)||t.get(e,r,i),has:(e,r)=>!!sa(e,r)||t.has(e,r)}));const Pu=["continue","continuePrimaryKey","advance"],la={},ei=new WeakMap,ca=new WeakMap,Lu={get(t,e){if(!Pu.includes(e))return t[e];let r=la[e];return r||(r=la[e]=function(...i){ei.set(this,ca.get(this)[e](...i))}),r}};async function*ju(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const r=new Proxy(e,Lu);for(ca.set(r,e),lr.set(r,Qr(e));e;)yield r,e=await(ei.get(r)||e.continue()),ei.delete(r)}function da(t,e){return e===Symbol.asyncIterator&&Yr(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Yr(t,[IDBIndex,IDBObjectStore])}oa(t=>({...t,get(e,r,i){return da(e,r)?ju:t.get(e,r,i)},has(e,r){return da(e,r)||t.has(e,r)}}));const Me=t=>Zt(t).with(D.number.lte(1e3),()=>`${Math.round(t)}KB`).with(D.number.lt(1e3*10),()=>`${(t/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(t/1e3)}MB`),ua=t=>{const e=t.find(r=>r.isHead);if(!e)throw new Error("No head node found");return e},zu=t=>Object.entries(t).reduce((r,[i,n])=>(r[i]=n.value,r),{}),ge=t=>e=>e?e.type===t:!1;class Ne extends Error{constructor(){super("Aborted")}}function Ru(t,e=300){let r;return(...i)=>{clearTimeout(r),r=setTimeout(()=>{t.apply(this,i)},e)}}const fa=t=>typeof t=="string",Bu=t=>{let e=5381;for(let r=0;r<t.length;r++)e=e*33^t.charCodeAt(r);return e>>>0},ri=t=>t===null||typeof t!="object"?t:Array.isArray(t)?t.map(ri):Object.keys(t).sort().reduce((e,r)=>(e[r]=ri(t[r]),e),{}),Uu=t=>{const e=JSON.stringify(ri(t));return Bu(e).toString(36)},Hu=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),ha=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Hu()}),qu=t=>Zt(t).with({nativeEvent:{submitter:D.select(D.union(D.instanceOf(HTMLButtonElement),D.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),pa=typeof window>"u"?void 0:Ou("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}}),Fe={getStateData:async(t,e,r)=>{var n;const i=ga({...t,flowKeys:e,context:r});return(n=await pa)==null?void 0:n.get("state",i)},setStateData:Ru(async t=>{var r;const e=ga(t);return(r=await pa)==null?void 0:r.put("state",t.data,e)},1e3)},cr=(t,e,r,i=0)=>{if(!e.nextId)return r(e.id,{stepsMade:i,remainingSteps:0}),{stepsMade:i,remainingSteps:0};const n=t.find(f=>f.id===e.nextId);if(n===void 0)return{stepsMade:i,remainingSteps:0};const a=e.type==="if-block"?e.branchId:void 0,o=t.find(f=>f.id===a),s=e.type.includes("question")?1:0;if(o){const f=s+Math.max(cr(t,n,r,i+s).remainingSteps,cr(t,o,r,i+s).remainingSteps);return r(e.id,{stepsMade:i,remainingSteps:f}),{stepsMade:i,remainingSteps:f}}const c=s+cr(t,n,r,i+s).remainingSteps;return r(e.id,{stepsMade:i,remainingSteps:c}),{stepsMade:i,remainingSteps:c}},Ku=t=>{const e={},r=t.find(i=>i.isHead);return r&&cr(t,r,(i,n)=>{e[i]=n}),e},ga=t=>[...t.flowKeys,t.id,t.version,Uu(t.context)].join("/"),Gt=Kt({state:"idle"}),Oe=t=>{const{state:e,flow:r}=Gt.value;if(e!=="loaded")return;At(r,"No flow to update");const i=t(r.data);r.data=i,Gt.value={state:e,flow:r},Fe.setStateData(r)},T={current$:Gt,viewState$:Kt("closed"),inputHeight$:Kt(53),startFlow:async({flow:t,context:e={},flowKeys:r,title:i,analytics:n,job:a,locationOrigin:o})=>{const c={data:await Fe.getStateData(t,r,e)??ha(),startedAt:new Date,nodeIdToProgress:Ku(t.nodes),flowKeys:r,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:i,analytics:n,job:a,locationOrigin:o};Gt.value={state:"loaded",flow:c},Fe.setStateData(c)},cancelCurrentFlow:()=>{Gt.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>Oe(t=>({...t,isFinished:!0})),setCurrentNodeId:t=>Oe(e=>(e.nodeHistory.push(t),e)),restart:()=>{const{state:t,flow:e}=Gt.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=ha();Gt.value={state:t,flow:{...e,data:r,startedAt:new Date}},Fe.setStateData(e)},addMessage:(t,e)=>{const r={...t,groupId:e};return Oe(i=>(i.messages.push(r),i))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:r}=Gt.value;At(e==="loaded","Application not loaded");const i=r.data.messages.filter(n=>!n.groupId||!t.includes(n.groupId));r.data.messages=i,Fe.setStateData(r)},setSubmission:(t,e)=>Oe(r=>(e===null?delete r.submissions[t]:r.submissions[t]=e,r)),setInput:t=>Oe(e=>({...e,currentInput:t??null}))},Gu=({message:t})=>{const{t:e}=nt();return l("div",{class:"flex flex-grow flex-col items-center justify-center",children:[l("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:[l("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"}),l("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"}),l("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),l("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),l("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),l("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),l("path",{d:"M38 56h19"})]}),l("div",{class:"flex flex-col gap-2 text-center",children:[l("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&l("p",{class:"text-neutral-9 text-sm",children:t})]})]})},va=t=>l("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[l("title",{children:"Loading"}),l("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)}}"}),l("g",{id:"s1",transform:"translate(12,0)",children:l("g",{id:"s2",transform:"scale(0,0)",children:l("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),l("g",{id:"s3",transform:"translate(12,12)",children:l("g",{id:"s4",transform:"scale(1,1)",children:l("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),l("g",{id:"s5",transform:"translate(12,0)",children:l("g",{id:"s6",transform:"scale(0,0)",children:l("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"})})}),l("g",{id:"s7",transform:"translate(12,0)",children:l("g",{id:"s8",transform:"scale(0,0)",children:l("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"})})})]}),ba=()=>l("div",{class:"flex flex-grow flex-col items-center justify-center",children:l(va,{class:"text-neutral-6 h-8 w-8"})}),Wu=t=>{const r=t/100,i=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,i))*100)}%`},Yu=Xt("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"}}),dr=({class:t,children:e,variant:r,...i})=>l("div",{class:"flex flex-1 items-center justify-end px-1",children:l("button",{class:zt(Yu({variant:r}),t),...i,children:l("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:e})})}),Ju=()=>{if(T.current$.value.state!=="loaded")return null;const t=T.current$.value.flow.nodeIdToProgress,e=T.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const r=t[e];if(r===void 0)return null;const i=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return l("div",{class:"bg-accent-3",children:l("div",{style:{width:Wu(i)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Xu=({children:t,params:e})=>{const{t:r}=nt(),i=T.viewState$;return l(et,{children:l("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:[l("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:[l("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),l("button",{onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ii,children:l("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),l("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?l("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:zt({hidden:T.current$.value.state!=="loaded"||i.value!=="maximised"}),children:l("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,T.current$.value.state==="loaded"&&l(dr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[l("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"}),l("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),l(dr,{class:"view-switch",onTouchStart:ii,"aria-label":r("minimize"),onClick:()=>i.value="minimised",children:l("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),l(Ju,{})]})})};function ii(){}const Zu=Vn(()=>Promise.resolve().then(()=>Pp).then(t=>t.ChatbotBody)),wa=Xt("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=Xt("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"}}}),Qu=({open:t,...e})=>{const r=wt(null);return bt(()=>{const i=r.current;i&&(t?i.showModal():i.close())},[t]),l("dialog",{ref:r,...e})},tf=({logger:t,apiClient:e,analytics:r,platformClient:i,params:n})=>{const{state:a,flow:o,error:s}=T.current$.value,c=T.viewState$.value,f=a!=="idle"&&c==="maximised",v=wt(null);return l(_u,{terms:n.terms,locale:void 0,children:[l(Qu,{open:f,onClose:()=>T.viewState$.value="minimised",children:l("div",{ref:v,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:wa({view:"maximised"}),children:l("div",{class:ma({view:"maximised"}),children:[l(Xu,{params:n,children:o==null?void 0:o.title}),Zt({state:a,view:c}).with({state:"idle"},()=>null).with({state:"loading"},()=>l(ba,{},"loading")).with({state:"loaded"},()=>l(Ce,{fallback:l(ba,{},"loading"),children:l(Zu,{analytics:r,apiClient:e,logger:t,platformClient:i})})).with({state:"error"},()=>l(Gu,{message:s})).exhaustive()]})})}),c==="minimised"?l(ef,{flow:o}):null]})},ef=({flow:t})=>{const{t:e}=nt();return l("div",{class:wa({view:"minimised",class:"z-100 isolate"}),children:l("div",{class:ma({view:"minimised"}),children:[l("button",{onClick:()=>{T.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:ii,children:l("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:t==null?void 0:t.title})}),l("div",{class:"flex items-center px-0.5",children:l(dr,{"aria-label":e("close_application"),onClick:T.cancelCurrentFlow,variant:"white",children:l("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},rf=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:99999;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:.5rem}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:.625rem}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-2{left:.5rem}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:.125rem}[data-widget=inploi-chatbot] .right-1{right:.25rem}[data-widget=inploi-chatbot] .right-2{right:.5rem}[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:.25rem}[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:.375rem}[data-widget=inploi-chatbot] .h-16{height:4rem}[data-widget=inploi-chatbot] .h-4{height:1rem}[data-widget=inploi-chatbot] .h-48{height:12rem}[data-widget=inploi-chatbot] .h-8{height:2rem}[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 + 1rem)}[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 + 1rem)}[data-widget=inploi-chatbot] .w-1\\.5{width:.375rem}[data-widget=inploi-chatbot] .w-16{width:4rem}[data-widget=inploi-chatbot] .w-24{width:6rem}[data-widget=inploi-chatbot] .w-4{width:1rem}[data-widget=inploi-chatbot] .w-64{width:16rem}[data-widget=inploi-chatbot] .w-8{width:2rem}[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:2rem}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 4rem))}[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:.25rem}[data-widget=inploi-chatbot] .gap-1\\.5{gap:.375rem}[data-widget=inploi-chatbot] .gap-2{gap:.5rem}[data-widget=inploi-chatbot] .gap-2\\.5{gap:.625rem}[data-widget=inploi-chatbot] .gap-3{gap:.75rem}[data-widget=inploi-chatbot] .gap-4{gap:1rem}[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:.25rem}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:1rem}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:1.5rem}[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:.5rem}[data-widget=inploi-chatbot] .rounded-md{border-radius:.375rem}[data-widget=inploi-chatbot] .rounded-xl{border-radius:.75rem}[data-widget=inploi-chatbot] .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}[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:1.5rem;border-top-right-radius:1.5rem}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:.375rem}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:.375rem}[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:.25rem}[data-widget=inploi-chatbot] .p-1\\.5{padding:.375rem}[data-widget=inploi-chatbot] .p-10{padding:2.5rem}[data-widget=inploi-chatbot] .p-11{padding:2.75rem}[data-widget=inploi-chatbot] .p-12{padding:3rem}[data-widget=inploi-chatbot] .p-2{padding:.5rem}[data-widget=inploi-chatbot] .p-2\\.5{padding:.625rem}[data-widget=inploi-chatbot] .p-3{padding:.75rem}[data-widget=inploi-chatbot] .p-4{padding:1rem}[data-widget=inploi-chatbot] .p-5{padding:1.25rem}[data-widget=inploi-chatbot] .p-6{padding:1.5rem}[data-widget=inploi-chatbot] .p-7{padding:1.75rem}[data-widget=inploi-chatbot] .p-8{padding:2rem}[data-widget=inploi-chatbot] .p-9{padding:2.25rem}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:.125rem;padding-right:.125rem}[data-widget=inploi-chatbot] .px-1{padding-left:.25rem;padding-right:.25rem}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-widget=inploi-chatbot] .px-2{padding-left:.5rem;padding-right:.5rem}[data-widget=inploi-chatbot] .px-3{padding-left:.75rem;padding-right:.75rem}[data-widget=inploi-chatbot] .px-4{padding-left:1rem;padding-right:1rem}[data-widget=inploi-chatbot] .px-5{padding-left:1.25rem;padding-right:1.25rem}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-widget=inploi-chatbot] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-widget=inploi-chatbot] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}[data-widget=inploi-chatbot] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-widget=inploi-chatbot] .pb-2{padding-bottom:.5rem}[data-widget=inploi-chatbot] .pb-6{padding-bottom:1.5rem}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:.375rem}[data-widget=inploi-chatbot] .pl-2{padding-left:.5rem}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:.625rem}[data-widget=inploi-chatbot] .pl-3{padding-left:.75rem}[data-widget=inploi-chatbot] .pl-4{padding-left:1rem}[data-widget=inploi-chatbot] .pr-1{padding-right:.25rem}[data-widget=inploi-chatbot] .pr-16{padding-right:4rem}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:.625rem}[data-widget=inploi-chatbot] .pr-3{padding-right:.75rem}[data-widget=inploi-chatbot] .pr-4{padding-right:1rem}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:.625rem}[data-widget=inploi-chatbot] .pt-3{padding-top:.75rem}[data-widget=inploi-chatbot] .pt-5{padding-top:1.25rem}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}[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:1rem;line-height:1.5rem}[data-widget=inploi-chatbot] .text-sm{font-size:.875rem;line-height:1.25rem}[data-widget=inploi-chatbot] .text-xs{font-size:.75rem;line-height:1rem}[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:.75rem}[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:.5rem;border-bottom-left-radius:.5rem}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}[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
- `,ya="inploi-chatbot",_a=`[data-widget='${ya}']`,nf=()=>({getOrCreateChatbotElement:()=>{const t=document.querySelector(_a);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=ya,e}});var Vt;function ur(t){return{lang:(t==null?void 0:t.lang)??(Vt==null?void 0:Vt.lang),message:t==null?void 0:t.message,abortEarly:(t==null?void 0:t.abortEarly)??(Vt==null?void 0:Vt.abortEarly),abortPipeEarly:(t==null?void 0:t.abortPipeEarly)??(Vt==null?void 0:Vt.abortPipeEarly)}}var ni;function af(t){return ni==null?void 0:ni.get(t)}var ai;function of(t){return ai==null?void 0:ai.get(t)}var oi;function sf(t,e){var r;return(r=oi==null?void 0:oi.get(t))==null?void 0:r.get(e)}function te(t){var r,i;const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&((i=(r=Object.getPrototypeOf(t))==null?void 0:r.constructor)==null?void 0:i.name))??"null":e}function Z(t,e,r,i,n){const a=n&&"input"in n?n.input:r.value,o=(n==null?void 0:n.expected)??t.expects??null,s=(n==null?void 0:n.received)??te(a),c={kind:t.kind,type:t.type,input:a,expected:o,received:s,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:t.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},f=t.kind==="schema",v=(n==null?void 0:n.message)??t.message??sf(t.reference,c.lang)??(f?of(c.lang):null)??i.message??af(c.lang);v!==void 0&&(c.message=typeof v=="function"?v(c):v),f&&(r.typed=!1),r.issues?r.issues.push(c):r.issues=[c]}function ht(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},ur())}}}function lf(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function xa(t,e){const r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}function cf(t){if(t.path){let e="";for(const r of t.path)if(typeof r.key=="string"||typeof r.key=="number")e?e+=`.${r.key}`:e+=r.key;else return null;return e}return null}var df=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}},uf=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function ka(t,e){return{kind:"validation",type:"check",reference:ka,async:!1,expects:null,requirement:t,message:e,"~run"(r,i){return r.typed&&!this.requirement(r.value)&&Z(this,"input",r,i),r}}}function Sa(t){return{kind:"validation",type:"email",reference:Sa,expects:null,async:!1,requirement:uf,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&Z(this,"email",e,r),e}}}function De(t,e){return{kind:"validation",type:"max_length",reference:De,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,i){return r.typed&&r.value.length>this.requirement&&Z(this,"length",r,i,{received:`${r.value.length}`}),r}}}function Ca(t,e){return{kind:"validation",type:"max_value",reference:Ca,async:!1,expects:`<=${t instanceof Date?t.toJSON():te(t)}`,requirement:t,message:e,"~run"(r,i){return r.typed&&!(r.value<=this.requirement)&&Z(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():te(r.value)}),r}}}function ve(t,e){return{kind:"validation",type:"min_length",reference:ve,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,i){return r.typed&&r.value.length<this.requirement&&Z(this,"length",r,i,{received:`${r.value.length}`}),r}}}function $a(t,e){return{kind:"validation",type:"min_value",reference:$a,async:!1,expects:`>=${t instanceof Date?t.toJSON():te(t)}`,requirement:t,message:e,"~run"(r,i){return r.typed&&!(r.value>=this.requirement)&&Z(this,"value",r,i,{received:r.value instanceof Date?r.value.toJSON():te(r.value)}),r}}}function si(t,e){return{kind:"validation",type:"regex",reference:si,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(r,i){return r.typed&&!this.requirement.test(r.value)&&Z(this,"format",r,i),r}}}function fr(t){return{kind:"transformation",type:"transform",reference:fr,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function Ea(t){return{kind:"validation",type:"url",reference:Ea,async:!1,expects:null,requirement(e){try{return new URL(e),!0}catch{return!1}},message:t,"~run"(e,r){return e.typed&&!this.requirement(e.value)&&Z(this,"URL",e,r),e}}}function ff(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function li(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function Ia(){return{kind:"schema",type:"any",reference:Ia,expects:"any",async:!1,get"~standard"(){return ht(this)},"~run"(t){return t.typed=!0,t}}}function ci(t,e){return{kind:"schema",type:"array",reference:ci,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return ht(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],c=this.item["~run"]({value:s},i);if(c.issues){const f={type:"array",origin:"value",input:n,key:o,value:s};for(const v of c.issues)v.path?v.path.unshift(f):v.path=[f],(a=r.issues)==null||a.push(v);if(r.issues||(r.issues=c.issues),i.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value.push(c.value)}}else Z(this,"type",r,i);return r}}}function hr(t){return{kind:"schema",type:"boolean",reference:hr,expects:"boolean",async:!1,message:t,get"~standard"(){return ht(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:Z(this,"type",e,r),e}}}function di(t,e){return{kind:"schema",type:"literal",reference:di,expects:te(t),async:!1,literal:t,message:e,get"~standard"(){return ht(this)},"~run"(r,i){return r.value===this.literal?r.typed=!0:Z(this,"type",r,i),r}}}function Ta(t,e){return{kind:"schema",type:"nullable",reference:Ta,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,get"~standard"(){return ht(this)},"~run"(r,i){return r.value===null&&(this.default!==void 0&&(r.value=li(this,r,i)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Ve(t){return{kind:"schema",type:"number",reference:Ve,expects:"number",async:!1,message:t,get"~standard"(){return ht(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:Z(this,"type",e,r),e}}}function at(t,e){return{kind:"schema",type:"object",reference:at,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return ht(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 c=o in n?n[o]:li(s),f=s["~run"]({value:c},i);if(f.issues){const v={type:"object",origin:"value",input:n,key:o,value:c};for(const d of f.issues)d.path?d.path.unshift(v):d.path=[v],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=f.issues),i.abortEarly){r.typed=!1;break}}f.typed||(r.typed=!1),r.value[o]=f.value}else if(s.fallback!==void 0)r.value[o]=ff(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Z(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 Z(this,"type",r,i);return r}}}function St(t,e){return{kind:"schema",type:"optional",reference:St,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return ht(this)},"~run"(r,i){return r.value===void 0&&(this.default!==void 0&&(r.value=li(this,r,i)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,i)}}}function Aa(t,e){return{kind:"schema",type:"picklist",reference:Aa,expects:xa(t.map(te),"|"),async:!1,options:t,message:e,get"~standard"(){return ht(this)},"~run"(r,i){return this.options.includes(r.value)?r.typed=!0:Z(this,"type",r,i),r}}}function ui(t,e,r){return{kind:"schema",type:"record",reference:ui,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return ht(this)},"~run"(i,n){var o,s;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const c in a)if(lf(a,c)){const f=a[c],v=this.key["~run"]({value:c},n);if(v.issues){const p={type:"object",origin:"key",input:a,key:c,value:f};for(const w of v.issues)w.path=[p],(o=i.issues)==null||o.push(w);if(i.issues||(i.issues=v.issues),n.abortEarly){i.typed=!1;break}}const d=this.value["~run"]({value:f},n);if(d.issues){const p={type:"object",origin:"value",input:a,key:c,value:f};for(const w of d.issues)w.path?w.path.unshift(p):w.path=[p],(s=i.issues)==null||s.push(w);if(i.issues||(i.issues=d.issues),n.abortEarly){i.typed=!1;break}}(!v.typed||!d.typed)&&(i.typed=!1),v.typed&&(i.value[v.value]=d.value)}}else Z(this,"type",i,n);return i}}}function W(t){return{kind:"schema",type:"string",reference:W,expects:"string",async:!1,message:t,get"~standard"(){return ht(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:Z(this,"type",e,r),e}}}function Ma(t){let e;if(t)for(const r of t)e?e.push(...r.issues):e=r.issues;return e}function fi(t,e){return{kind:"schema",type:"union",reference:fi,expects:xa(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return ht(this)},"~run"(r,i){let n,a,o;for(const s of this.options){const c=s["~run"]({value:r.value},i);if(c.typed)if(c.issues)a?a.push(c):a=[c];else{n=c;break}else o?o.push(c):o=[c]}if(n)return n;if(a){if(a.length===1)return a[0];Z(this,"type",r,i,{issues:Ma(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Z(this,"type",r,i,{issues:Ma(o)})}return r}}}function hf(t,e,r){const i=t["~run"]({value:e},ur(r));if(i.issues)throw new df(i.issues);return i.value}function pf(t,e){const r={};for(const i in t.entries)r[i]=!e||e.includes(i)?St(t.entries[i]):t.entries[i];return{...t,entries:r,get"~standard"(){return ht(this)}}}function Pt(...t){return{...t[0],pipe:t,get"~standard"(){return ht(this)},"~run"(e,r){for(const i of t)if(i.kind!=="metadata"){if(e.issues&&(i.kind==="schema"||i.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=i["~run"](e,r))}return e}}}function gf(t,e,r){const i=t["~run"]({value:e},ur(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}async function vf(t,e,r){const i=await t["~run"]({value:e},ur(r));return{typed:i.typed,success:!i.issues,output:i.value,issues:i.issues}}const Na=Pt(fi([W(),Ve()]),fr(String)),Fa=at({id:Na,version:Ve(),build:Ve(),nodes:ci(Ia()),context_schema:St(Ta(ui(W(),at({required:hr(),type:fi([di("string"),di("number")])}))))}),bf=at({flow:Fa}),wf=at({company:at({name:W()}),flow:Fa,job:at({id:Na,title:W()}),user:St(at({city:St(W()),country:St(W()),isEU:St(hr()),continent:St(W())}))}),mf={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:jo(),response:wf}},yf={pathname:"/flow/id/:id",method:"GET",schema:{response:bf}};var _f=["1","2","3","4","5","6","7","8","9","10","11","12"],xf={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]}},kf=(t,e=1,r)=>i=>{const[n,a]=xf[r][i];return"oklch("+n+"% "+a*e+" "+t+")"},hi=t=>{const e=kf(t.hue,t.chroma,t.mode);return Object.fromEntries(_f.map(r=>[t.prefix+r,t.transform(e(r))]))},pi=t=>t,Sf=t=>{const e=Object.keys(t).flatMap(r=>{const i=t[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(e)},pr=t=>!!t&&typeof t=="object"&&!Array.isArray(t),gi=(t,...e)=>{if(!e.length)return t;const r=e.shift();if(pr(t)&&pr(r))for(const i in r){const n=r[i];if(pr(n)){t[i]||Object.assign(t,{[i]:{}});const a=t[i];pr(a)&&gi(a,n)}else Object.assign(t,{[i]:r[i]})}return gi(t,...e)},Cf=t=>{function e(r,i){const n=[t.prefix,i.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${n}`:`var(--${n})`}return e},$f=()=>({core:t=>({semantic:e=>({component:r=>({from:i=>{const{theme:n,getToken:a}=i,o=p=>a("reference",p.toString()),s=t({theme:n}),c=e({theme:n,core:o,raw:{core:s}}),f=r({theme:n,core:o,semantic:o,raw:{core:s,semantic:c}}),v=Sf(gi(s,c,f)),d=([p,w],g)=>{const m=[g,p].filter(Boolean).join(".");return typeof w=="object"?Object.entries(w).flatMap(S=>d(S,m)):[[i.getToken("declaration",m),w]]};return{values:v,declarations:Object.fromEntries(Object.entries(v).flatMap(p=>d(p))),ref:p=>a("reference",p.toString())}}})})})});const[vi,bi,Oa]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Ef=$f().core(({theme:t})=>({color:{black:vi,white:bi,lowest:t.mode==="light"?bi:vi,highest:t.mode==="light"?vi:bi,...hi({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:pi}),...hi({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:pi}),...hi({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:pi})},typography:{}})).semantic(({core:t,raw:e,theme:r})=>{const i=(n,a)=>e.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":t("color.n-12"),"copy-headings":t("color.n-12"),interactive:{copy:t("color.n-11"),"copy-hover":t("color.n-12"),"copy-active":t("color.n-12"),bg:Oa,"bg-hover":i("n-10",.2),"bg-active":i("n-10",.3)}}}).component(({raw:t,theme:e,semantic:r,core:i})=>{const n=(a,o)=>t.core.color[a].replace(")",` / ${o})`);return{app:{bg:i(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:n("black",.4)},bubble:{"weak-bg":i(e.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":Oa,"bg-button-hover":n("n-10",.4),"bg-button-active":n("n-10",.5)},"submit-button":{"bg-active":i(e.mode==="dark"?"color.a-8":"color.a-11")}}}),If=Cf({prefix:"i-"}),Tf=t=>{const e=Ef.from({theme:t,getToken:If}),r=Object.entries(e.declarations).map(([i,n])=>`${i}: ${n};`);return`${_a} {
1
+ (function(){"use strict";var Po=t=>t,Lo={sandbox:"https://platform.staging.inploi.com",production:"https://platform.inploi.com",_internal_local:"http://localhost:8787"};function jo(){return{"~standard":{vendor:"inploi",version:1,validate:t=>({value:t})}}}function Wp(t){return t}var zo=({environment:t,publishableKey:e,logger:r})=>{let a=Lo[t];return{async checkDuplicate(i){try{let n=new URLSearchParams({email:i.email,scope:i.scope});i.scope==="job"&&i.jobId!=null&&n.set("job_id",String(i.jobId));let o=await fetch(`${a}/applications/check-duplicate?${n}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":e}});return o.ok?await o.json():(r.error(`[PlatformClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1})}catch(n){return r.error("[PlatformClient] checkDuplicate failed:",n),{isDuplicate:!1}}}}},Ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ro=Array.isArray,xr=Ro,Bo=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,Uo=Bo,Ho=Uo,qo=typeof self=="object"&&self&&self.Object===Object&&self,Ko=Ho||qo||Function("return this")(),kr=Ko,Go=kr,Wo=Go.Symbol,Sr=Wo,Va=Sr,Da=Object.prototype,Yo=Da.hasOwnProperty,Jo=Da.toString,_e=Va?Va.toStringTag:void 0;function Xo(t){var e=Yo.call(t,_e),r=t[_e];try{t[_e]=void 0;var a=!0}catch{}var i=Jo.call(t);return a&&(e?t[_e]=r:delete t[_e]),i}var Zo=Xo,Qo=Object.prototype,ts=Qo.toString;function es(t){return ts.call(t)}var rs=es,Pa=Sr,as=Zo,is=rs,ns="[object Null]",os="[object Undefined]",La=Pa?Pa.toStringTag:void 0;function ss(t){return t==null?t===void 0?os:ns:La&&La in Object(t)?as(t):is(t)}var ja=ss;function ls(t){return t!=null&&typeof t=="object"}var cs=ls,ds=ja,us=cs,fs="[object Symbol]";function hs(t){return typeof t=="symbol"||us(t)&&ds(t)==fs}var Cr=hs,ps=xr,gs=Cr,vs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bs=/^\w*$/;function ws(t,e){if(ps(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||gs(t)?!0:bs.test(t)||!vs.test(t)||e!=null&&t in Object(e)}var ms=ws;function ys(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var za=ys,_s=ja,xs=za,ks="[object AsyncFunction]",Ss="[object Function]",Cs="[object GeneratorFunction]",$s="[object Proxy]";function Es(t){if(!xs(t))return!1;var e=_s(t);return e==Ss||e==Cs||e==ks||e==$s}var Is=Es,Ts=kr,As=Ts["__core-js_shared__"],Ms=As,$r=Ms,Ra=function(){var t=/[^.]+$/.exec($r&&$r.keys&&$r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ns(t){return!!Ra&&Ra in t}var Fs=Ns,Os=Function.prototype,Vs=Os.toString;function Ds(t){if(t!=null){try{return Vs.call(t)}catch{}try{return t+""}catch{}}return""}var Ps=Ds,Ls=Is,js=Fs,zs=za,Rs=Ps,Bs=/[\\^$.*+?()[\]{}|]/g,Us=/^\[object .+?Constructor\]$/,Hs=Function.prototype,qs=Object.prototype,Ks=Hs.toString,Gs=qs.hasOwnProperty,Ws=RegExp("^"+Ks.call(Gs).replace(Bs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ys(t){if(!zs(t)||js(t))return!1;var e=Ls(t)?Ws:Us;return e.test(Rs(t))}var Js=Ys;function Xs(t,e){return t==null?void 0:t[e]}var Zs=Xs,Qs=Js,tl=Zs;function el(t,e){var r=tl(t,e);return Qs(r)?r:void 0}var Ba=el,rl=Ba,al=rl(Object,"create"),We=al,Ua=We;function il(){this.__data__=Ua?Ua(null):{},this.size=0}var nl=il;function ol(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var sl=ol,ll=We,cl="__lodash_hash_undefined__",dl=Object.prototype,ul=dl.hasOwnProperty;function fl(t){var e=this.__data__;if(ll){var r=e[t];return r===cl?void 0:r}return ul.call(e,t)?e[t]:void 0}var hl=fl,pl=We,gl=Object.prototype,vl=gl.hasOwnProperty;function bl(t){var e=this.__data__;return pl?e[t]!==void 0:vl.call(e,t)}var wl=bl,ml=We,yl="__lodash_hash_undefined__";function _l(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ml&&e===void 0?yl:e,this}var xl=_l,kl=nl,Sl=sl,Cl=hl,$l=wl,El=xl;function ne(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}ne.prototype.clear=kl,ne.prototype.delete=Sl,ne.prototype.get=Cl,ne.prototype.has=$l,ne.prototype.set=El;var Il=ne;function Tl(){this.__data__=[],this.size=0}var Al=Tl;function Ml(t,e){return t===e||t!==t&&e!==e}var Nl=Ml,Fl=Nl;function Ol(t,e){for(var r=t.length;r--;)if(Fl(t[r][0],e))return r;return-1}var Ye=Ol,Vl=Ye,Dl=Array.prototype,Pl=Dl.splice;function Ll(t){var e=this.__data__,r=Vl(e,t);if(r<0)return!1;var a=e.length-1;return r==a?e.pop():Pl.call(e,r,1),--this.size,!0}var jl=Ll,zl=Ye;function Rl(t){var e=this.__data__,r=zl(e,t);return r<0?void 0:e[r][1]}var Bl=Rl,Ul=Ye;function Hl(t){return Ul(this.__data__,t)>-1}var ql=Hl,Kl=Ye;function Gl(t,e){var r=this.__data__,a=Kl(r,t);return a<0?(++this.size,r.push([t,e])):r[a][1]=e,this}var Wl=Gl,Yl=Al,Jl=jl,Xl=Bl,Zl=ql,Ql=Wl;function oe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}oe.prototype.clear=Yl,oe.prototype.delete=Jl,oe.prototype.get=Xl,oe.prototype.has=Zl,oe.prototype.set=Ql;var tc=oe,ec=Ba,rc=kr,ac=ec(rc,"Map"),ic=ac,Ha=Il,nc=tc,oc=ic;function sc(){this.size=0,this.__data__={hash:new Ha,map:new(oc||nc),string:new Ha}}var lc=sc;function cc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var dc=cc,uc=dc;function fc(t,e){var r=t.__data__;return uc(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Je=fc,hc=Je;function pc(t){var e=hc(this,t).delete(t);return this.size-=e?1:0,e}var gc=pc,vc=Je;function bc(t){return vc(this,t).get(t)}var wc=bc,mc=Je;function yc(t){return mc(this,t).has(t)}var _c=yc,xc=Je;function kc(t,e){var r=xc(this,t),a=r.size;return r.set(t,e),this.size+=r.size==a?0:1,this}var Sc=kc,Cc=lc,$c=gc,Ec=wc,Ic=_c,Tc=Sc;function se(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}se.prototype.clear=Cc,se.prototype.delete=$c,se.prototype.get=Ec,se.prototype.has=Ic,se.prototype.set=Tc;var Ac=se,qa=Ac,Mc="Expected a function";function Er(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Mc);var r=function(){var a=arguments,i=e?e.apply(this,a):a[0],n=r.cache;if(n.has(i))return n.get(i);var o=t.apply(this,a);return r.cache=n.set(i,o)||n,o};return r.cache=new(Er.Cache||qa),r}Er.Cache=qa;var Nc=Er,Fc=Nc,Oc=500;function Vc(t){var e=Fc(t,function(a){return r.size===Oc&&r.clear(),a}),r=e.cache;return e}var Dc=Vc,Pc=Dc,Lc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jc=/\\(\\)?/g,zc=Pc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Lc,function(r,a,i,n){e.push(i?n.replace(jc,"$1"):a||r)}),e}),Rc=zc;function Bc(t,e){for(var r=-1,a=t==null?0:t.length,i=Array(a);++r<a;)i[r]=e(t[r],r,t);return i}var Uc=Bc,Ka=Sr,Hc=Uc,qc=xr,Kc=Cr,Gc=1/0,Ga=Ka?Ka.prototype:void 0,Wa=Ga?Ga.toString:void 0;function Ya(t){if(typeof t=="string")return t;if(qc(t))return Hc(t,Ya)+"";if(Kc(t))return Wa?Wa.call(t):"";var e=t+"";return e=="0"&&1/t==-Gc?"-0":e}var Wc=Ya,Yc=Wc;function Jc(t){return t==null?"":Yc(t)}var Xc=Jc,Zc=xr,Qc=ms,td=Rc,ed=Xc;function rd(t,e){return Zc(t)?t:Qc(t,e)?[t]:td(ed(t))}var ad=rd,id=Cr,nd=1/0;function od(t){if(typeof t=="string"||id(t))return t;var e=t+"";return e=="0"&&1/t==-nd?"-0":e}var sd=od,ld=ad,cd=sd;function dd(t,e){e=ld(e,t);for(var r=0,a=e.length;t!=null&&r<a;)t=t[cd(e[r++])];return r&&r==a?t:void 0}var ud=dd,fd=ud;function hd(t,e,r){var a=t==null?void 0:fd(t,e);return a===void 0?r:a}var pd=hd;const xe=Oa(pd);var ke,E,Ja,Xa,Jt,Za,Qa,Ir,ti,le={},ei=[],gd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Xe=Array.isArray;function Ft(t,e){for(var r in e)t[r]=e[r];return t}function ri(t){var e=t.parentNode;e&&e.removeChild(t)}function vt(t,e,r){var a,i,n,o={};for(n in e)n=="key"?a=e[n]:n=="ref"?i=e[n]:o[n]=e[n];if(arguments.length>2&&(o.children=arguments.length>3?ke.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)o[n]===void 0&&(o[n]=t.defaultProps[n]);return Se(t,o,a,i,null)}function Se(t,e,r,a,i){var n={type:t,props:e,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Ja};return i==null&&E.vnode!=null&&E.vnode(n),n}function vd(){return{current:null}}function et(t){return t.children}function xt(t,e){this.props=t,this.context=e}function Ze(t,e){if(e==null)return t.__?Ze(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Ze(t):null}function ai(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return ai(t)}}function Tr(t){(!t.__d&&(t.__d=!0)&&Jt.push(t)&&!Qe.__r++||Za!==E.debounceRendering)&&((Za=E.debounceRendering)||Qa)(Qe)}function Qe(){var t,e,r,a,i,n,o,s,c;for(Jt.sort(Ir);t=Jt.shift();)t.__d&&(e=Jt.length,a=void 0,i=void 0,n=void 0,s=(o=(r=t).__v).__e,(c=r.__P)&&(a=[],i=[],(n=Ft({},o)).__v=o.__v+1,Ar(c,o,n,r.__n,c.ownerSVGElement!==void 0,o.__h!=null?[s]:null,a,s??Ze(o),o.__h,i),di(a,o,i),o.__e!=s&&ai(o)),Jt.length>e&&Jt.sort(Ir));Qe.__r=0}function ii(t,e,r,a,i,n,o,s,c,f,v){var d,p,w,g,m,S,y,x,A,N,M=0,K=a&&a.__k||ei,gt=K.length,at=gt,U=e.length;for(r.__k=[],d=0;d<U;d++)(g=r.__k[d]=(g=e[d])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?Se(null,g,null,null,g):Xe(g)?Se(et,{children:g},null,null,null):g.__b>0?Se(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(x=bd(g,K,y=d+M,at))===-1?w=le:(w=K[x]||le,K[x]=void 0,at--),Ar(t,g,w,i,n,o,s,c,f,v),m=g.__e,(p=g.ref)&&w.ref!=p&&(w.ref&&Mr(w.ref,null,g),v.push(p,g.__c||m,g)),m!=null&&(S==null&&(S=m),N=!(A=w===le||w.__v===null)&&x===y,A?x==-1&&M--:x!==y&&(x===y+1?(M++,N=!0):x>y?at>U-y?(M+=x-y,N=!0):M--:M=x<y&&x==y-1?x-y:0),y=d+M,N=N||x==d&&!A,typeof g.type!="function"||x===y&&w.__k!==g.__k?typeof g.type=="function"||N?g.__d!==void 0?(c=g.__d,g.__d=void 0):c=m.nextSibling:c=oi(t,m,c):c=ni(g,c,t),typeof r.type=="function"&&(r.__d=c)));for(r.__e=S,d=gt;d--;)K[d]!=null&&(typeof r.type=="function"&&K[d].__e!=null&&K[d].__e==r.__d&&(r.__d=K[d].__e.nextSibling),ui(K[d],K[d]))}function ni(t,e,r){for(var a,i=t.__k,n=0;i&&n<i.length;n++)(a=i[n])&&(a.__=t,e=typeof a.type=="function"?ni(a,e,r):oi(r,a.__e,e));return e}function Ot(t,e){return e=e||[],t==null||typeof t=="boolean"||(Xe(t)?t.some(function(r){Ot(r,e)}):e.push(t)),e}function oi(t,e,r){return r==null||r.parentNode!==t?t.insertBefore(e,null):e==r&&e.parentNode!=null||t.insertBefore(e,r),e.nextSibling}function bd(t,e,r,a){var i=t.key,n=t.type,o=r-1,s=r+1,c=e[r];if(c===null||c&&i==c.key&&n===c.type)return r;if(a>(c!=null?1:0))for(;o>=0||s<e.length;){if(o>=0){if((c=e[o])&&i==c.key&&n===c.type)return o;o--}if(s<e.length){if((c=e[s])&&i==c.key&&n===c.type)return s;s++}}return-1}function wd(t,e,r,a,i){var n;for(n in r)n==="children"||n==="key"||n in e||tr(t,n,null,r[n],a);for(n in e)i&&typeof e[n]!="function"||n==="children"||n==="key"||n==="value"||n==="checked"||r[n]===e[n]||tr(t,n,e[n],r[n],a)}function si(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||gd.test(e)?r:r+"px"}function tr(t,e,r,a,i){var n;t:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof a=="string"&&(t.style.cssText=a=""),a)for(e in a)r&&e in r||si(t.style,e,"");if(r)for(e in r)a&&r[e]===a[e]||si(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")n=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=r,r?a||t.addEventListener(e,n?ci:li,n):t.removeEventListener(e,n?ci:li,n);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function li(t){return this.l[t.type+!1](E.event?E.event(t):t)}function ci(t){return this.l[t.type+!0](E.event?E.event(t):t)}function Ar(t,e,r,a,i,n,o,s,c,f){var v,d,p,w,g,m,S,y,x,A,N,M,K,gt,at,U=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(c=r.__h,s=e.__e=r.__e,e.__h=null,n=[s]),(v=E.__b)&&v(e);try{t:if(typeof U=="function"){if(y=e.props,x=(v=U.contextType)&&a[v.__c],A=v?x?x.props.value:v.__:a,r.__c?S=(d=e.__c=r.__c).__=d.__E:("prototype"in U&&U.prototype.render?e.__c=d=new U(y,A):(e.__c=d=new xt(y,A),d.constructor=U,d.render=yd),x&&x.sub(d),d.props=y,d.state||(d.state={}),d.context=A,d.__n=a,p=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),U.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ft({},d.__s)),Ft(d.__s,U.getDerivedStateFromProps(y,d.__s))),w=d.props,g=d.state,d.__v=e,p)U.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(U.getDerivedStateFromProps==null&&y!==w&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(y,A),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(y,d.__s,A)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(q){q&&(q.__=e)}),N=0;N<d._sb.length;N++)d.__h.push(d._sb[N]);d._sb=[],d.__h.length&&o.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(y,d.__s,A),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(w,g,m)})}if(d.context=A,d.props=y,d.__P=t,d.__e=!1,M=E.__r,K=0,"prototype"in U&&U.prototype.render){for(d.state=d.__s,d.__d=!1,M&&M(e),v=d.render(d.props,d.state,d.context),gt=0;gt<d._sb.length;gt++)d.__h.push(d._sb[gt]);d._sb=[]}else do d.__d=!1,M&&M(e),v=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++K<25);d.state=d.__s,d.getChildContext!=null&&(a=Ft(Ft({},a),d.getChildContext())),p||d.getSnapshotBeforeUpdate==null||(m=d.getSnapshotBeforeUpdate(w,g)),ii(t,Xe(at=v!=null&&v.type===et&&v.key==null?v.props.children:v)?at:[at],e,r,a,i,n,o,s,c,f),d.base=e.__e,e.__h=null,d.__h.length&&o.push(d),S&&(d.__E=d.__=null)}else n==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=md(r.__e,e,r,a,i,n,o,c,f);(v=E.diffed)&&v(e)}catch(q){e.__v=null,(c||n!=null)&&(e.__e=s,e.__h=!!c,n[n.indexOf(s)]=null),E.__e(q,e,r)}}function di(t,e,r){for(var a=0;a<r.length;a++)Mr(r[a],r[++a],r[++a]);E.__c&&E.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(n){n.call(i)})}catch(n){E.__e(n,i.__v)}})}function md(t,e,r,a,i,n,o,s,c){var f,v,d,p=r.props,w=e.props,g=e.type,m=0;if(g==="svg"&&(i=!0),n!=null){for(;m<n.length;m++)if((f=n[m])&&"setAttribute"in f==!!g&&(g?f.localName===g:f.nodeType===3)){t=f,n[m]=null;break}}if(t==null){if(g===null)return document.createTextNode(w);t=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,w.is&&w),n=null,s=!1}if(g===null)p===w||s&&t.data===w||(t.data=w);else{if(n=n&&ke.call(t.childNodes),v=(p=r.props||le).dangerouslySetInnerHTML,d=w.dangerouslySetInnerHTML,!s){if(n!=null)for(p={},m=0;m<t.attributes.length;m++)p[t.attributes[m].name]=t.attributes[m].value;(d||v)&&(d&&(v&&d.__html==v.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(wd(t,w,p,i,s),d)e.__k=[];else if(ii(t,Xe(m=e.props.children)?m:[m],e,r,a,i&&g!=="foreignObject",n,o,n?n[0]:r.__k&&Ze(r,0),s,c),n!=null)for(m=n.length;m--;)n[m]!=null&&ri(n[m]);s||("value"in w&&(m=w.value)!==void 0&&(m!==t.value||g==="progress"&&!m||g==="option"&&m!==p.value)&&tr(t,"value",m,p.value,!1),"checked"in w&&(m=w.checked)!==void 0&&m!==t.checked&&tr(t,"checked",m,p.checked,!1))}return t}function Mr(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(a){E.__e(a,r)}}function ui(t,e,r){var a,i;if(E.unmount&&E.unmount(t),(a=t.ref)&&(a.current&&a.current!==t.__e||Mr(a,null,e)),(a=t.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(n){E.__e(n,e)}a.base=a.__P=null,t.__c=void 0}if(a=t.__k)for(i=0;i<a.length;i++)a[i]&&ui(a[i],e,r||typeof t.type!="function");r||t.__e==null||ri(t.__e),t.__=t.__e=t.__d=void 0}function yd(t,e,r){return this.constructor(t,r)}function ce(t,e,r){var a,i,n,o;E.__&&E.__(t,e),i=(a=typeof r=="function")?null:r&&r.__k||e.__k,n=[],o=[],Ar(e,t=(!a&&r||e).__k=vt(et,null,[t]),i||le,le,e.ownerSVGElement!==void 0,!a&&r?[r]:i?null:e.firstChild?ke.call(e.childNodes):null,n,!a&&r?r:i?i.__e:e.firstChild,a,o),di(n,t,o)}function fi(t,e){ce(t,e,fi)}function _d(t,e,r){var a,i,n,o,s=Ft({},t.props);for(n in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)n=="key"?a=e[n]:n=="ref"?i=e[n]:s[n]=e[n]===void 0&&o!==void 0?o[n]:e[n];return arguments.length>2&&(s.children=arguments.length>3?ke.call(arguments,2):r),Se(t.type,s,a||t.key,i||t.ref,null)}function hi(t,e){var r={__c:e="__cC"+ti++,__:t,Consumer:function(a,i){return a.children(i)},Provider:function(a){var i,n;return this.getChildContext||(i=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Tr(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)}}),a.children}};return r.Provider.__=r.Consumer.contextType=r}ke=ei.slice,E={__e:function(t,e,r,a){for(var i,n,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&n.getDerivedStateFromError!=null&&(i.setState(n.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,a||{}),o=i.__d),o)return i.__E=i}catch(s){t=s}throw t}},Ja=0,Xa=function(t){return t!=null&&t.constructor===void 0},xt.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state),typeof t=="function"&&(t=t(Ft({},r),this.props)),t&&Ft(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Tr(this))},xt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Tr(this))},xt.prototype.render=et,Jt=[],Qa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ir=function(t,e){return t.__v.__b-e.__v.__b},Qe.__r=0,ti=0;function pi(t){var e,r,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=pi(t[e]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}function zt(){for(var t,e,r=0,a="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=pi(t))&&(a&&(a+=" "),a+=e);return a}const gi=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,vi=zt,Xt=(t,e)=>r=>{var a;if((e==null?void 0:e.variants)==null)return vi(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:n}=e,o=Object.keys(i).map(f=>{const v=r==null?void 0:r[f],d=n==null?void 0:n[f];if(v===null)return null;const p=gi(v)||gi(d);return i[f][p]}),s=r&&Object.entries(r).reduce((f,v)=>{let[d,p]=v;return p===void 0||(f[d]=p),f},{}),c=e==null||(a=e.compoundVariants)===null||a===void 0?void 0:a.reduce((f,v)=>{let{class:d,className:p,...w}=v;return Object.entries(w).every(g=>{let[m,S]=g;return Array.isArray(S)?S.includes({...n,...s}[m]):{...n,...s}[m]===S})?[...f,d,p]:f},[]);return vi(t,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};var Rt,R,Nr,bi,de=0,wi=[],er=[],mi=E.__b,yi=E.__r,_i=E.diffed,xi=E.__c,ki=E.unmount;function ue(t,e){E.__h&&E.__h(R,t,de||e),de=0;var r=R.__H||(R.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:er}),r.__[t]}function _t(t){return de=1,Si(Ei,t)}function Si(t,e,r){var a=ue(Rt++,2);if(a.t=t,!a.__c&&(a.__=[r?r(e):Ei(void 0,e),function(s){var c=a.__N?a.__N[0]:a.__[0],f=a.t(c,s);c!==f&&(a.__N=[f,a.__[1]],a.__c.setState({}))}],a.__c=R,!R.u)){var i=function(s,c,f){if(!a.__c.__H)return!0;var v=a.__c.__H.__.filter(function(p){return p.__c});if(v.every(function(p){return!p.__N}))return!n||n.call(this,s,c,f);var d=!1;return v.forEach(function(p){if(p.__N){var w=p.__[0];p.__=p.__N,p.__N=void 0,w!==p.__[0]&&(d=!0)}}),!(!d&&a.__c.props===s)&&(!n||n.call(this,s,c,f))};R.u=!0;var n=R.shouldComponentUpdate,o=R.componentWillUpdate;R.componentWillUpdate=function(s,c,f){if(this.__e){var v=n;n=void 0,i(s,c,f),n=v}o&&o.call(this,s,c,f)},R.shouldComponentUpdate=i}return a.__N||a.__}function kt(t,e){var r=ue(Rt++,3);!E.__s&&Or(r.__H,e)&&(r.__=t,r.i=e,R.__H.__h.push(r))}function bt(t,e){var r=ue(Rt++,4);!E.__s&&Or(r.__H,e)&&(r.__=t,r.i=e,R.__h.push(r))}function wt(t){return de=5,Vt(function(){return{current:t}},[])}function xd(t,e,r){de=6,bt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function Vt(t,e){var r=ue(Rt++,7);return Or(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function kd(t,e){return de=8,Vt(function(){return t},e)}function Ci(t){var e=R.context[t.__c],r=ue(Rt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(R)),e.props.value):t.__}function Sd(t,e){E.useDebugValue&&E.useDebugValue(e?e(t):t)}function Cd(){var t=ue(Rt++,11);if(!t.__){for(var e=R.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function $d(){for(var t;t=wi.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(rr),t.__H.__h.forEach(Fr),t.__H.__h=[]}catch(e){t.__H.__h=[],E.__e(e,t.__v)}}E.__b=function(t){R=null,mi&&mi(t)},E.__r=function(t){yi&&yi(t),Rt=0;var e=(R=t.__c).__H;e&&(Nr===R?(e.__h=[],R.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=er,r.__N=r.i=void 0})):(e.__h.forEach(rr),e.__h.forEach(Fr),e.__h=[],Rt=0)),Nr=R},E.diffed=function(t){_i&&_i(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(wi.push(e)!==1&&bi===E.requestAnimationFrame||((bi=E.requestAnimationFrame)||Ed)($d)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==er&&(r.__=r.__V),r.i=void 0,r.__V=er})),Nr=R=null},E.__c=function(t,e){e.some(function(r){try{r.__h.forEach(rr),r.__h=r.__h.filter(function(a){return!a.__||Fr(a)})}catch(a){e.some(function(i){i.__h&&(i.__h=[])}),e=[],E.__e(a,r.__v)}}),xi&&xi(t,e)},E.unmount=function(t){ki&&ki(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(a){try{rr(a)}catch(i){e=i}}),r.__H=void 0,e&&E.__e(e,r.__v))};var $i=typeof requestAnimationFrame=="function";function Ed(t){var e,r=function(){clearTimeout(a),$i&&cancelAnimationFrame(e),setTimeout(t)},a=setTimeout(r,100);$i&&(e=requestAnimationFrame(r))}function rr(t){var e=R,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),R=e}function Fr(t){var e=R;t.__c=t.__(),R=e}function Or(t,e){return!t||t.length!==e.length||e.some(function(r,a){return r!==t[a]})}function Ei(t,e){return typeof e=="function"?e(t):e}function Ii(t,e){for(var r in e)t[r]=e[r];return t}function Vr(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}function Dr(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function Pr(t){this.props=t}function Id(t,e){function r(i){var n=this.props.ref,o=n==i.ref;return!o&&n&&(n.call?n(null):n.current=null),e?!e(this.props,i)||!o:Vr(this.props,i)}function a(i){return this.shouldComponentUpdate=r,vt(t,i)}return a.displayName="Memo("+(t.displayName||t.name)+")",a.prototype.isReactComponent=!0,a.__f=!0,a}(Pr.prototype=new xt).isPureReactComponent=!0,Pr.prototype.shouldComponentUpdate=function(t,e){return Vr(this.props,t)||Vr(this.state,e)};var Ti=E.__b;E.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Ti&&Ti(t)};var Td=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Lr(t){function e(r){var a=Ii({},r);return delete a.ref,t(a,r.ref||null)}return e.$$typeof=Td,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Ai=function(t,e){return t==null?null:Ot(Ot(t).map(e))},Ad={map:Ai,forEach:Ai,count:function(t){return t?Ot(t).length:0},only:function(t){var e=Ot(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Ot},Md=E.__e;E.__e=function(t,e,r,a){if(t.then){for(var i,n=e;n=n.__;)if((i=n.__c)&&i.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),i.__c(t,e)}Md(t,e,r,a)};var Mi=E.unmount;function Ni(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(a){typeof a.__c=="function"&&a.__c()}),t.__c.__H=null),(t=Ii({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(a){return Ni(a,e,r)})),t}function Fi(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(a){return Fi(a,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function Ce(){this.__u=0,this.t=null,this.__b=null}function Oi(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Vi(t){var e,r,a;function i(n){if(e||(e=t()).then(function(o){r=o.default||o},function(o){a=o}),a)throw a;if(!r)throw e;return vt(r,n)}return i.displayName="Lazy",i.__f=!0,i}function $e(){this.u=null,this.o=null}E.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Mi&&Mi(t)},(Ce.prototype=new xt).__c=function(t,e){var r=e.__c,a=this;a.t==null&&(a.t=[]),a.t.push(r);var i=Oi(a.__v),n=!1,o=function(){n||(n=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--a.__u){if(a.state.__a){var f=a.state.__a;a.__v.__k[0]=Fi(f,f.__c.__P,f.__c.__O)}var v;for(a.setState({__a:a.__b=null});v=a.t.pop();)v.forceUpdate()}},c=e.__h===!0;a.__u++||c||a.setState({__a:a.__b=a.__v.__k[0]}),t.then(o,o)},Ce.prototype.componentWillUnmount=function(){this.t=[]},Ce.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),a=this.__v.__k[0].__c;this.__v.__k[0]=Ni(this.__b,r,a.__O=a.__P)}this.__b=null}var i=e.__a&&vt(et,null,t.fallback);return i&&(i.__h=null),[vt(et,null,e.__a?null:t.children),i]};var Di=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Nd(t){return this.getChildContext=function(){return t.context},t.children}function Fd(t){var e=this,r=t.i;e.componentWillUnmount=function(){ce(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(a){this.childNodes.push(a),e.i.appendChild(a)},insertBefore:function(a,i){this.childNodes.push(a),e.i.appendChild(a)},removeChild:function(a){this.childNodes.splice(this.childNodes.indexOf(a)>>>1,1),e.i.removeChild(a)}}),ce(vt(Nd,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Od(t,e){var r=vt(Fd,{__v:t,i:e});return r.containerInfo=e,r}($e.prototype=new xt).__a=function(t){var e=this,r=Oi(e.__v),a=e.o.get(t);return a[0]++,function(i){var n=function(){e.props.revealOrder?(a.push(i),Di(e,t,a)):i()};r?r(n):n()}},$e.prototype.render=function(t){this.u=null,this.o=new Map;var e=Ot(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},$e.prototype.componentDidUpdate=$e.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){Di(t,r,e)})};var Pi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Vd=/^(?: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]/,Dd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Pd=/[A-Z0-9]/g,Ld=typeof document<"u",jd=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function zd(t,e,r){return e.__k==null&&(e.textContent=""),ce(t,e),typeof r=="function"&&r(),t?t.__c:null}function Rd(t,e,r){return fi(t,e),typeof r=="function"&&r(),t?t.__c:null}xt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(xt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Li=E.event;function Bd(){}function Ud(){return this.cancelBubble}function Hd(){return this.defaultPrevented}E.event=function(t){return Li&&(t=Li(t)),t.persist=Bd,t.isPropagationStopped=Ud,t.isDefaultPrevented=Hd,t.nativeEvent=t};var jr,qd={enumerable:!1,configurable:!0,get:function(){return this.class}},ji=E.vnode;E.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,a=e.type,i={};for(var n in r){var o=r[n];if(!(n==="value"&&"defaultValue"in r&&o==null||Ld&&n==="children"&&a==="noscript"||n==="class"||n==="className")){var s=n.toLowerCase();n==="defaultValue"&&"value"in r&&r.value==null?n="value":n==="download"&&o===!0?o="":s==="ondoubleclick"?n="ondblclick":s!=="onchange"||a!=="input"&&a!=="textarea"||jd(r.type)?s==="onfocus"?n="onfocusin":s==="onblur"?n="onfocusout":Dd.test(n)?n=s:a.indexOf("-")===-1&&Vd.test(n)?n=n.replace(Pd,"-$&").toLowerCase():o===null&&(o=void 0):s=n="oninput",s==="oninput"&&i[n=s]&&(n="oninputCapture"),i[n]=o}}a=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Ot(r.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),a=="select"&&i.defaultValue!=null&&(i.value=Ot(r.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",qd)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),e.props=i}(t),t.$$typeof=Pi,ji&&ji(t)};var zi=E.__r;E.__r=function(t){zi&&zi(t),jr=t.__c};var Ri=E.diffed;E.diffed=function(t){Ri&&Ri(t);var e=t.props,r=t.__e;r!=null&&t.type==="textarea"&&"value"in e&&e.value!==r.value&&(r.value=e.value==null?"":e.value),jr=null};var Kd={ReactCurrentDispatcher:{current:{readContext:function(t){return jr.__n[t.__c].props.value}}}};function Gd(t){return vt.bind(null,t)}function Bi(t){return!!t&&t.$$typeof===Pi}function Wd(t){return Bi(t)?_d.apply(null,arguments):t}function Yd(t){return!!t.__k&&(ce(null,t),!0)}function Jd(t){return t&&(t.base||t.nodeType===1&&t)||null}var Xd=function(t,e){return t(e)},Zd=function(t,e){return t(e)},Qd=et;function Ui(t){t()}function tu(t){return t}function eu(){return[!1,Ui]}var ru=bt;function au(t,e){var r=e(),a=_t({h:{__:r,v:e}}),i=a[0].h,n=a[1];return bt(function(){i.__=r,i.v=e,Dr(i.__,e())||n({h:i})},[t,r,e]),kt(function(){return Dr(i.__,i.v())||n({h:i}),t(function(){Dr(i.__,i.v())||n({h:i})})},[t]),r}var lt={useState:_t,useId:Cd,useReducer:Si,useEffect:kt,useLayoutEffect:bt,useInsertionEffect:ru,useTransition:eu,useDeferredValue:tu,useSyncExternalStore:au,startTransition:Ui,useRef:wt,useImperativeHandle:xd,useMemo:Vt,useCallback:kd,useContext:Ci,useDebugValue:Sd,version:"17.0.2",Children:Ad,render:zd,hydrate:Rd,unmountComponentAtNode:Yd,createPortal:Od,createElement:vt,createContext:hi,createFactory:Gd,cloneElement:Wd,createRef:vd,Fragment:et,isValidElement:Bi,findDOMNode:Jd,Component:xt,PureComponent:Pr,memo:Id,forwardRef:Lr,flushSync:Zd,unstable_batchedUpdates:Xd,StrictMode:Qd,Suspense:Ce,SuspenseList:$e,lazy:Vi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kd};const ct=Symbol.for("@ts-pattern/matcher"),Hi=Symbol.for("@ts-pattern/isVariadic"),ar="@ts-pattern/anonymous-select-key",zr=t=>!!(t&&typeof t=="object"),ir=t=>t&&!!t[ct],G=(t,e,r)=>{if(ir(t)){const a=t[ct](),{matched:i,selections:n}=a.match(e);return i&&n&&Object.keys(n).forEach(o=>r(o,n[o])),i}if(zr(t)){if(!zr(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let a=[],i=[],n=[];for(const o of t.keys()){const s=t[o];ir(s)&&s[Hi]?n.push(s):n.length?i.push(s):a.push(s)}if(n.length){if(n.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<a.length+i.length)return!1;const o=e.slice(0,a.length),s=i.length===0?[]:e.slice(-i.length),c=e.slice(a.length,i.length===0?1/0:-i.length);return a.every((f,v)=>G(f,o[v],r))&&i.every((f,v)=>G(f,s[v],r))&&(n.length===0||G(n[0],c,r))}return t.length===e.length&&t.every((o,s)=>G(o,e[s],r))}return Reflect.ownKeys(t).every(a=>{const i=t[a];return(a in e||ir(n=i)&&n[ct]().matcherType==="optional")&&G(i,e[a],r);var n})}return Object.is(e,t)},dt=t=>{var e,r,a;return zr(t)?ir(t)?(e=(r=(a=t[ct]()).getSelectionKeys)==null?void 0:r.call(a))!=null?e:[]:Array.isArray(t)?Ee(t,dt):Ee(Object.values(t),dt):[]},Ee=(t,e)=>t.reduce((r,a)=>r.concat(e(a)),[]);function iu(...t){if(t.length===1){const[e]=t;return r=>G(e,r,()=>{})}if(t.length===2){const[e,r]=t;return G(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function X(t){return Object.assign(t,{optional:()=>Br(t),and:e=>B(t,e),or:e=>qi(t,e),select:e=>e===void 0?Ie(t):Ie(e,t)})}function Rr(t){return Object.assign((e=>Object.assign(e,{[Symbol.iterator](){let r=0;const a=[{value:Object.assign(e,{[Hi]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=a[r++])!=null?i:a.at(-1)}}}}))(t),{optional:()=>Rr(Br(t)),select:e=>Rr(e===void 0?Ie(t):Ie(e,t))})}function Br(t){return X({[ct]:()=>({match:e=>{let r={};const a=(i,n)=>{r[i]=n};return e===void 0?(dt(t).forEach(i=>a(i,void 0)),{matched:!0,selections:r}):{matched:G(t,e,a),selections:r}},getSelectionKeys:()=>dt(t),matcherType:"optional"})})}const nu=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},ou=(t,e)=>{for(const[r,a]of t.entries())if(!e(a,r))return!1;return!0},su=(t,e)=>{const r=Reflect.ownKeys(t);for(const a of r)if(!e(a,t[a]))return!1;return!0};function B(...t){return X({[ct]:()=>({match:e=>{let r={};const a=(i,n)=>{r[i]=n};return{matched:t.every(i=>G(i,e,a)),selections:r}},getSelectionKeys:()=>Ee(t,dt),matcherType:"and"})})}function qi(...t){return X({[ct]:()=>({match:e=>{let r={};const a=(i,n)=>{r[i]=n};return Ee(t,dt).forEach(i=>a(i,void 0)),{matched:t.some(i=>G(i,e,a)),selections:r}},getSelectionKeys:()=>Ee(t,dt),matcherType:"or"})})}function O(t){return{[ct]:()=>({match:e=>({matched:!!t(e)})})}}function Ie(...t){const e=typeof t[0]=="string"?t[0]:void 0,r=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return X({[ct]:()=>({match:a=>{let i={[e??ar]:a};return{matched:r===void 0||G(r,a,(n,o)=>{i[n]=o}),selections:i}},getSelectionKeys:()=>[e??ar].concat(r===void 0?[]:dt(r))})})}function Ki(t){return!0}function It(t){return typeof t=="number"}function Bt(t){return typeof t=="string"}function Ut(t){return typeof t=="bigint"}const Gi=X(O(Ki)),lu=X(O(Ki)),cu=Gi,Ht=t=>Object.assign(X(t),{startsWith:e=>{return Ht(B(t,(r=e,O(a=>Bt(a)&&a.startsWith(r)))));var r},endsWith:e=>{return Ht(B(t,(r=e,O(a=>Bt(a)&&a.endsWith(r)))));var r},minLength:e=>Ht(B(t,(r=>O(a=>Bt(a)&&a.length>=r))(e))),length:e=>Ht(B(t,(r=>O(a=>Bt(a)&&a.length===r))(e))),maxLength:e=>Ht(B(t,(r=>O(a=>Bt(a)&&a.length<=r))(e))),includes:e=>{return Ht(B(t,(r=e,O(a=>Bt(a)&&a.includes(r)))));var r},regex:e=>{return Ht(B(t,(r=e,O(a=>Bt(a)&&!!a.match(r)))));var r}}),Wi=Ht(O(Bt)),Tt=t=>Object.assign(X(t),{between:(e,r)=>Tt(B(t,((a,i)=>O(n=>It(n)&&a<=n&&i>=n))(e,r))),lt:e=>Tt(B(t,(r=>O(a=>It(a)&&a<r))(e))),gt:e=>Tt(B(t,(r=>O(a=>It(a)&&a>r))(e))),lte:e=>Tt(B(t,(r=>O(a=>It(a)&&a<=r))(e))),gte:e=>Tt(B(t,(r=>O(a=>It(a)&&a>=r))(e))),int:()=>Tt(B(t,O(e=>It(e)&&Number.isInteger(e)))),finite:()=>Tt(B(t,O(e=>It(e)&&Number.isFinite(e)))),positive:()=>Tt(B(t,O(e=>It(e)&&e>0))),negative:()=>Tt(B(t,O(e=>It(e)&&e<0)))}),du=Tt(O(It)),qt=t=>Object.assign(X(t),{between:(e,r)=>qt(B(t,((a,i)=>O(n=>Ut(n)&&a<=n&&i>=n))(e,r))),lt:e=>qt(B(t,(r=>O(a=>Ut(a)&&a<r))(e))),gt:e=>qt(B(t,(r=>O(a=>Ut(a)&&a>r))(e))),lte:e=>qt(B(t,(r=>O(a=>Ut(a)&&a<=r))(e))),gte:e=>qt(B(t,(r=>O(a=>Ut(a)&&a>=r))(e))),positive:()=>qt(B(t,O(e=>Ut(e)&&e>0))),negative:()=>qt(B(t,O(e=>Ut(e)&&e<0)))}),uu=qt(O(Ut)),fu=X(O(function(t){return typeof t=="boolean"})),hu=X(O(function(t){return typeof t=="symbol"})),pu=X(O(function(t){return t==null})),gu=X(O(function(t){return t!=null}));var V={__proto__:null,matcher:ct,optional:Br,array:function(...t){return Rr({[ct]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let a={};if(e.length===0)return dt(r).forEach(n=>{a[n]=[]}),{matched:!0,selections:a};const i=(n,o)=>{a[n]=(a[n]||[]).concat([o])};return{matched:e.every(n=>G(r,n,i)),selections:a}},getSelectionKeys:()=>t.length===0?[]:dt(t[0])})})},set:function(...t){return X({[ct]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};if(t.length===0)return{matched:!0};const a=(n,o)=>{r[n]=(r[n]||[]).concat([o])},i=t[0];return{matched:nu(e,n=>G(i,n,a)),selections:r}},getSelectionKeys:()=>t.length===0?[]:dt(t[0])})})},map:function(...t){return X({[ct]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const a=(s,c)=>{r[s]=(r[s]||[]).concat([c])};if(t.length===0)return{matched:!0};var i;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=t[0])==null?void 0:i.toString()}`);const[n,o]=t;return{matched:ou(e,(s,c)=>{const f=G(n,c,a),v=G(o,s,a);return f&&v}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...dt(t[0]),...dt(t[1])]})})},record:function(...t){return X({[ct]:()=>({match:e=>{if(e===null||typeof e!="object"||Array.isArray(e))return{matched:!1};var r;if(t.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=t[0])==null?void 0:r.toString()}`);let a={};const i=(s,c)=>{a[s]=(a[s]||[]).concat([c])},[n,o]=t.length===1?[Wi,t[0]]:t;return{matched:su(e,(s,c)=>{const f=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),v=f!==null&&G(n,f,i),d=G(n,s,i),p=G(o,c,i);return(d||v)&&p}),selections:a}},getSelectionKeys:()=>t.length===0?[]:[...dt(t[0]),...dt(t[1])]})})},intersection:B,union:qi,not:function(t){return X({[ct]:()=>({match:e=>({matched:!G(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:O,select:Ie,any:Gi,unknown:lu,_:cu,string:Wi,number:du,bigint:uu,boolean:fu,symbol:hu,nullish:pu,nonNullable:gu,instanceOf:function(t){return X(O(function(e){return r=>r instanceof e}(t)))},shape:function(t){return X(O(iu(t)))}};class vu extends Error{constructor(e){let r;try{r=JSON.stringify(e)}catch{r=e}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=e}}const Ur={matched:!1,value:void 0};function Zt(t){return new nr(t,Ur)}class nr{constructor(e,r){this.input=void 0,this.state=void 0,this.input=e,this.state=r}with(...e){if(this.state.matched)return this;const r=e[e.length-1],a=[e[0]];let i;e.length===3&&typeof e[1]=="function"?i=e[1]:e.length>2&&a.push(...e.slice(1,e.length-1));let n=!1,o={};const s=(f,v)=>{n=!0,o[f]=v},c=!a.some(f=>G(f,this.input,s))||i&&!i(this.input)?Ur:{matched:!0,value:r(n?ar in o?o[ar]:o:this.input,this.input)};return new nr(this.input,c)}when(e,r){if(this.state.matched)return this;const a=!!e(this.input);return new nr(this.input,a?{matched:!0,value:r(this.input,this.input)}:Ur)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=bu){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function bu(t){throw new vu(t)}var wu=["other","few","many","two","one","zero"],Yi=({terms:t,overrides:e,locale:r})=>{const a=new Intl.PluralRules(r);function i(n,o){const s=(e==null?void 0:e[n])??t[n];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(c,f)=>{var v;return((v=o==null?void 0:o[f])==null?void 0:v.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${n.toString()}”`);let c=a.select(o.count);if(!(c in s)){const f=wu.find(v=>v in s);if(!f)throw new Error(`Missing plural rule for translation key “${n.toString()}”`);c=f}return s[c].replace(/{{(\w+)}}/g,(f,v)=>{var d;return((d=o==null?void 0:o[v])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${n.toString()}”.`)}}return i},mu=0;function l(t,e,r,a,i,n){var o,s,c={};for(s in e)s=="ref"?o=e[s]:c[s]=e[s];var f={type:t,props:c,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--mu,__source:i,__self:n};if(typeof t=="function"&&(o=t.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return E.vnode&&E.vnode(f),f}var Ji=hi(null),yu=t=>({defaultTerms:t,TranslationProvider:({terms:e,children:r,locale:a})=>{const i=Vt(()=>Yi({locale:a,terms:t,overrides:e}),[e,a]);return l(Ji.Provider,{value:{t:i,locale:a},children:r})},useTranslation:()=>{const e=Ci(Ji);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:r})=>Yi({terms:t,overrides:e,locale:r})});const{TranslationProvider:_u,useTranslation:it,createTFunction:xu}=yu({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"}}),Yp="";function At(t,e){if(!t)throw new Error(e)}var ku=Symbol.for("preact-signals");function Hr(){if(fe>1)fe--;else{for(var t,e=!1;Te!==void 0;){var r=Te;for(Te=void 0,qr++;r!==void 0;){var a=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Zi(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=a}}if(qr=0,fe--,e)throw t}}var j=void 0,Te=void 0,fe=0,qr=0,or=0;function Xi(t){if(j!==void 0){var e=t.n;if(e===void 0||e.t!==j)return e={i:0,S:t,p:j.s,n:void 0,t:j,e:void 0,x:void 0,r:e},j.s!==void 0&&(j.s.n=e),j.s=e,t.n=e,32&j.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=j.s,e.n=void 0,j.s.n=e,j.s=e),e}}function rt(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}rt.prototype.brand=ku,rt.prototype.h=function(){return!0},rt.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)},rt.prototype.U=function(t){if(this.t!==void 0){var e=t.e,r=t.x;e!==void 0&&(e.x=r,t.e=void 0),r!==void 0&&(r.e=e,t.x=void 0),t===this.t&&(this.t=r)}},rt.prototype.subscribe=function(t){var e=this;return Gr(function(){var r=e.value,a=j;j=void 0;try{t(r)}finally{j=a}})},rt.prototype.valueOf=function(){return this.value},rt.prototype.toString=function(){return this.value+""},rt.prototype.toJSON=function(){return this.value},rt.prototype.peek=function(){var t=j;j=void 0;try{return this.value}finally{j=t}},Object.defineProperty(rt.prototype,"value",{get:function(){var t=Xi(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(qr>100)throw new Error("Cycle detected");this.v=t,this.i++,or++,fe++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Hr()}}}});function Kt(t){return new rt(t)}function Zi(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Qi(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function tn(t){for(var e=t.s,r=void 0;e!==void 0;){var a=e.p;e.i===-1?(e.S.U(e),a!==void 0&&(a.n=e.n),e.n!==void 0&&(e.n.p=a)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=a}t.s=r}function he(t){rt.call(this,void 0),this.x=t,this.s=void 0,this.g=or-1,this.f=4}(he.prototype=new rt).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===or))return!0;if(this.g=or,this.f|=1,this.i>0&&!Zi(this))return this.f&=-2,!0;var t=j;try{Qi(this),j=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return j=t,tn(this),this.f&=-2,!0},he.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}rt.prototype.S.call(this,t)},he.prototype.U=function(t){if(this.t!==void 0&&(rt.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},he.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(he.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Xi(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Su(t){return new he(t)}function en(t){var e=t.u;if(t.u=void 0,typeof e=="function"){fe++;var r=j;j=void 0;try{e()}catch(a){throw t.f&=-2,t.f|=8,Kr(t),a}finally{j=r,Hr()}}}function Kr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,en(t)}function Cu(t){if(j!==this)throw new Error("Out-of-order effect");tn(this),j=t,this.f&=-2,8&this.f&&Kr(this),Hr()}function Ae(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ae.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Ae.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,en(this),Qi(this),fe++;var t=j;return j=this,Cu.bind(this,t)},Ae.prototype.N=function(){2&this.f||(this.f|=2,this.o=Te,Te=this)},Ae.prototype.d=function(){this.f|=8,1&this.f||Kr(this)};function Gr(t){var e=new Ae(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Wr;function pe(t,e){E[t]=e.bind(null,E[t]||function(){})}function sr(t){Wr&&Wr(),Wr=t&&t.S()}function rn(t){var e=this,r=t.data,a=Eu(r);a.value=r;var i=Vt(function(){for(var n=e.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}return e.__$u.c=function(){var o;!Xa(i.peek())&&((o=e.base)==null?void 0:o.nodeType)===3?e.base.data=i.peek():(e.__$f|=1,e.setState({}))},Su(function(){var o=a.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}rn.displayName="_st",Object.defineProperties(rt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:rn},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),pe("__b",function(t,e){if(typeof e.type=="string"){var r,a=e.props;for(var i in a)if(i!=="children"){var n=a[i];n instanceof rt&&(r||(e.__np=r={}),r[i]=n,a[i]=n.peek())}}t(e)}),pe("__r",function(t,e){sr();var r,a=e.__c;a&&(a.__$f&=-2,(r=a.__$u)===void 0&&(a.__$u=r=function(i){var n;return Gr(function(){n=this}),n.c=function(){a.__$f|=1,a.setState({})},n}())),sr(r),t(e)}),pe("__e",function(t,e,r,a){sr(),t(e,r,a)}),pe("diffed",function(t,e){sr();var r;if(typeof e.type=="string"&&(r=e.__e)){var a=e.__np,i=e.props;if(a){var n=r.U;if(n)for(var o in n){var s=n[o];s!==void 0&&!(o in a)&&(s.d(),n[o]=void 0)}else r.U=n={};for(var c in a){var f=n[c],v=a[c];f===void 0?(f=$u(r,c,v,i),n[c]=f):f.o(v,i)}}}t(e)});function $u(t,e,r,a){var i=e in t&&t.ownerSVGElement===void 0,n=Kt(r);return{o:function(o,s){n.value=o,a=s},d:Gr(function(){var o=n.value.value;a[e]!==o&&(a[e]=o,i?t[e]=o:o?t.setAttribute(e,o):t.removeAttribute(e))})}}pe("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var a=r.U;if(a){r.U=void 0;for(var i in a){var n=a[i];n&&n.d()}}}}else{var o=e.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}t(e)}),pe("__h",function(t,e,r,a){(a<3||a===9)&&(e.__$f|=2),t(e,r,a)}),xt.prototype.shouldComponentUpdate=function(t,e){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var a in e)return!0;for(var i in t)if(i!=="__source"&&t[i]!==this.props[i])return!0;for(var n in this.props)if(!(n in t))return!0;return!1};function Eu(t){return Vt(function(){return Kt(t)},[])}const Yr=(t,e)=>e.some(r=>t instanceof r);let an,nn;function Iu(){return an||(an=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Tu(){return nn||(nn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Jr=new WeakMap,Xr=new WeakMap,lr=new WeakMap;function Au(t){const e=new Promise((r,a)=>{const i=()=>{t.removeEventListener("success",n),t.removeEventListener("error",o)},n=()=>{r(Qt(t.result)),i()},o=()=>{a(t.error),i()};t.addEventListener("success",n),t.addEventListener("error",o)});return lr.set(e,t),e}function Mu(t){if(Jr.has(t))return;const e=new Promise((r,a)=>{const i=()=>{t.removeEventListener("complete",n),t.removeEventListener("error",o),t.removeEventListener("abort",o)},n=()=>{r(),i()},o=()=>{a(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",n),t.addEventListener("error",o),t.addEventListener("abort",o)});Jr.set(t,e)}let Zr={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Jr.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Qt(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function on(t){Zr=t(Zr)}function Nu(t){return Tu().includes(t)?function(...e){return t.apply(Qr(this),e),Qt(this.request)}:function(...e){return Qt(t.apply(Qr(this),e))}}function Fu(t){return typeof t=="function"?Nu(t):(t instanceof IDBTransaction&&Mu(t),Yr(t,Iu())?new Proxy(t,Zr):t)}function Qt(t){if(t instanceof IDBRequest)return Au(t);if(Xr.has(t))return Xr.get(t);const e=Fu(t);return e!==t&&(Xr.set(t,e),lr.set(e,t)),e}const Qr=t=>lr.get(t);function Ou(t,e,{blocked:r,upgrade:a,blocking:i,terminated:n}={}){const o=indexedDB.open(t,e),s=Qt(o);return a&&o.addEventListener("upgradeneeded",c=>{a(Qt(o.result),c.oldVersion,c.newVersion,Qt(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),s.then(c=>{n&&c.addEventListener("close",()=>n()),i&&c.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),s}const Vu=["get","getKey","getAll","getAllKeys","count"],Du=["put","add","delete","clear"],ta=new Map;function sn(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(ta.get(e))return ta.get(e);const r=e.replace(/FromIndex$/,""),a=e!==r,i=Du.includes(r);if(!(r in(a?IDBIndex:IDBObjectStore).prototype)||!(i||Vu.includes(r)))return;const n=async function(o,...s){const c=this.transaction(o,i?"readwrite":"readonly");let f=c.store;return a&&(f=f.index(s.shift())),(await Promise.all([f[r](...s),i&&c.done]))[0]};return ta.set(e,n),n}on(t=>({...t,get:(e,r,a)=>sn(e,r)||t.get(e,r,a),has:(e,r)=>!!sn(e,r)||t.has(e,r)}));const Pu=["continue","continuePrimaryKey","advance"],ln={},ea=new WeakMap,cn=new WeakMap,Lu={get(t,e){if(!Pu.includes(e))return t[e];let r=ln[e];return r||(r=ln[e]=function(...a){ea.set(this,cn.get(this)[e](...a))}),r}};async function*ju(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const r=new Proxy(e,Lu);for(cn.set(r,e),lr.set(r,Qr(e));e;)yield r,e=await(ea.get(r)||e.continue()),ea.delete(r)}function dn(t,e){return e===Symbol.asyncIterator&&Yr(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Yr(t,[IDBIndex,IDBObjectStore])}on(t=>({...t,get(e,r,a){return dn(e,r)?ju:t.get(e,r,a)},has(e,r){return dn(e,r)||t.has(e,r)}}));const Me=t=>Zt(t).with(V.number.lte(1e3),()=>`${Math.round(t)}KB`).with(V.number.lt(1e3*10),()=>`${(t/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(t/1e3)}MB`),un=t=>{const e=t.find(r=>r.isHead);if(!e)throw new Error("No head node found");return e},zu=t=>Object.entries(t).reduce((r,[a,i])=>(r[a]=i.value,r),{}),ge=t=>e=>e?e.type===t:!1;class Ne extends Error{constructor(){super("Aborted")}}function Ru(t,e=300){let r;return(...a)=>{clearTimeout(r),r=setTimeout(()=>{t.apply(this,a)},e)}}const fn=t=>typeof t=="string",Bu=t=>{let e=5381;for(let r=0;r<t.length;r++)e=e*33^t.charCodeAt(r);return e>>>0},ra=t=>t===null||typeof t!="object"?t:Array.isArray(t)?t.map(ra):Object.keys(t).sort().reduce((e,r)=>(e[r]=ra(t[r]),e),{}),Uu=t=>{const e=JSON.stringify(ra(t));return Bu(e).toString(36)},Hu=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),hn=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Hu()}),qu=t=>Zt(t).with({nativeEvent:{submitter:V.select(V.union(V.instanceOf(HTMLButtonElement),V.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),pn=typeof window>"u"?void 0:Ou("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}}),Fe={getStateData:async(t,e,r)=>{var i;const a=gn({...t,flowKeys:e,context:r});return(i=await pn)==null?void 0:i.get("state",a)},setStateData:Ru(async t=>{var r;const e=gn(t);return(r=await pn)==null?void 0:r.put("state",t.data,e)},1e3)},cr=(t,e,r,a=0)=>{if(!e.nextId)return r(e.id,{stepsMade:a,remainingSteps:0}),{stepsMade:a,remainingSteps:0};const i=t.find(f=>f.id===e.nextId);if(i===void 0)return{stepsMade:a,remainingSteps:0};const n=e.type==="if-block"?e.branchId:void 0,o=t.find(f=>f.id===n),s=e.type.includes("question")?1:0;if(o){const f=s+Math.max(cr(t,i,r,a+s).remainingSteps,cr(t,o,r,a+s).remainingSteps);return r(e.id,{stepsMade:a,remainingSteps:f}),{stepsMade:a,remainingSteps:f}}const c=s+cr(t,i,r,a+s).remainingSteps;return r(e.id,{stepsMade:a,remainingSteps:c}),{stepsMade:a,remainingSteps:c}},Ku=t=>{const e={},r=t.find(a=>a.isHead);return r&&cr(t,r,(a,i)=>{e[a]=i}),e},gn=t=>[...t.flowKeys,t.id,t.version,Uu(t.context)].join("/"),Gt=Kt({state:"idle"}),Oe=t=>{const{state:e,flow:r}=Gt.value;if(e!=="loaded")return;At(r,"No flow to update");const a=t(r.data);r.data=a,Gt.value={state:e,flow:r},Fe.setStateData(r)},T={current$:Gt,viewState$:Kt("closed"),inputHeight$:Kt(53),startFlow:async({flow:t,context:e={},flowKeys:r,title:a,analytics:i,job:n,locationOrigin:o})=>{const c={data:await Fe.getStateData(t,r,e)??hn(),startedAt:new Date,nodeIdToProgress:Ku(t.nodes),flowKeys:r,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:a,analytics:i,job:n,locationOrigin:o};Gt.value={state:"loaded",flow:c},Fe.setStateData(c)},cancelCurrentFlow:()=>{Gt.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>Oe(t=>({...t,isFinished:!0})),setCurrentNodeId:t=>Oe(e=>(e.nodeHistory.push(t),e)),restart:()=>{const{state:t,flow:e}=Gt.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=hn();Gt.value={state:t,flow:{...e,data:r,startedAt:new Date}},Fe.setStateData(e)},addMessage:(t,e)=>{const r={...t,groupId:e};return Oe(a=>(a.messages.push(r),a))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:r}=Gt.value;At(e==="loaded","Application not loaded");const a=r.data.messages.filter(i=>!i.groupId||!t.includes(i.groupId));r.data.messages=a,Fe.setStateData(r)},setSubmission:(t,e)=>Oe(r=>(e===null?delete r.submissions[t]:r.submissions[t]=e,r)),setInput:t=>Oe(e=>({...e,currentInput:t??null}))},Gu=({message:t})=>{const{t:e}=it();return l("div",{class:"flex flex-grow flex-col items-center justify-center",children:[l("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:[l("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"}),l("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"}),l("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),l("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),l("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),l("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),l("path",{d:"M38 56h19"})]}),l("div",{class:"flex flex-col gap-2 text-center",children:[l("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&l("p",{class:"text-neutral-9 text-sm",children:t})]})]})},vn=t=>l("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[l("title",{children:"Loading"}),l("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)}}"}),l("g",{id:"s1",transform:"translate(12,0)",children:l("g",{id:"s2",transform:"scale(0,0)",children:l("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),l("g",{id:"s3",transform:"translate(12,12)",children:l("g",{id:"s4",transform:"scale(1,1)",children:l("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),l("g",{id:"s5",transform:"translate(12,0)",children:l("g",{id:"s6",transform:"scale(0,0)",children:l("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"})})}),l("g",{id:"s7",transform:"translate(12,0)",children:l("g",{id:"s8",transform:"scale(0,0)",children:l("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"})})})]}),bn=()=>l("div",{class:"flex flex-grow flex-col items-center justify-center",children:l(vn,{class:"text-neutral-6 h-8 w-8"})}),Wu=t=>{const r=t/100,a=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,a))*100)}%`},Yu=Xt("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"}}),dr=({class:t,children:e,variant:r,...a})=>l("div",{class:"flex flex-1 items-center justify-end px-1",children:l("button",{class:zt(Yu({variant:r}),t),...a,children:l("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:e})})}),Ju=()=>{if(T.current$.value.state!=="loaded")return null;const t=T.current$.value.flow.nodeIdToProgress,e=T.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const r=t[e];if(r===void 0)return null;const a=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return l("div",{class:"bg-accent-3",children:l("div",{style:{width:Wu(a)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Xu=({children:t,params:e})=>{const{t:r}=it(),a=T.viewState$;return l(et,{children:l("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:[l("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:[l("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),l("button",{onClick:()=>{a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:aa,children:l("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),l("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?l("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:zt({hidden:T.current$.value.state!=="loaded"||a.value!=="maximised"}),children:l("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,T.current$.value.state==="loaded"&&l(dr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[l("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"}),l("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),l(dr,{class:"view-switch",onTouchStart:aa,"aria-label":r("minimize"),onClick:()=>a.value="minimised",children:l("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),l(Ju,{})]})})};function aa(){}const Zu=Vi(()=>Promise.resolve().then(()=>Pp).then(t=>t.ChatbotBody)),wn=Xt("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"}}}),mn=Xt("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"}}}),Qu=({open:t,...e})=>{const r=wt(null);return bt(()=>{const a=r.current;a&&(t?a.showModal():a.close())},[t]),l("dialog",{ref:r,...e})},tf=({logger:t,apiClient:e,analytics:r,platformClient:a,params:i})=>{const{state:n,flow:o,error:s}=T.current$.value,c=T.viewState$.value,f=n!=="idle"&&c==="maximised",v=wt(null);return l(_u,{terms:i.terms,locale:void 0,children:[l(Qu,{open:f,onClose:()=>T.viewState$.value="minimised",children:l("div",{ref:v,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:wn({view:"maximised"}),children:l("div",{class:mn({view:"maximised"}),children:[l(Xu,{params:i,children:o==null?void 0:o.title}),Zt({state:n,view:c}).with({state:"idle"},()=>null).with({state:"loading"},()=>l(bn,{},"loading")).with({state:"loaded"},()=>l(Ce,{fallback:l(bn,{},"loading"),children:l(Zu,{analytics:r,apiClient:e,logger:t,platformClient:a})})).with({state:"error"},()=>l(Gu,{message:s})).exhaustive()]})})}),c==="minimised"?l(ef,{flow:o}):null]})},ef=({flow:t})=>{const{t:e}=it();return l("div",{class:wn({view:"minimised",class:"z-100 isolate"}),children:l("div",{class:mn({view:"minimised"}),children:[l("button",{onClick:()=>{T.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:aa,children:l("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:t==null?void 0:t.title})}),l("div",{class:"flex items-center px-0.5",children:l(dr,{"aria-label":e("close_application"),onClick:T.cancelCurrentFlow,variant:"white",children:l("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},rf=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:99999;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:.5rem}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:.625rem}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-2{left:.5rem}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:.125rem}[data-widget=inploi-chatbot] .right-1{right:.25rem}[data-widget=inploi-chatbot] .right-2{right:.5rem}[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:.25rem}[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:.375rem}[data-widget=inploi-chatbot] .h-16{height:4rem}[data-widget=inploi-chatbot] .h-4{height:1rem}[data-widget=inploi-chatbot] .h-48{height:12rem}[data-widget=inploi-chatbot] .h-8{height:2rem}[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 + 1rem)}[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 + 1rem)}[data-widget=inploi-chatbot] .w-1\\.5{width:.375rem}[data-widget=inploi-chatbot] .w-16{width:4rem}[data-widget=inploi-chatbot] .w-24{width:6rem}[data-widget=inploi-chatbot] .w-4{width:1rem}[data-widget=inploi-chatbot] .w-64{width:16rem}[data-widget=inploi-chatbot] .w-8{width:2rem}[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:2rem}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 4rem))}[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:.25rem}[data-widget=inploi-chatbot] .gap-1\\.5{gap:.375rem}[data-widget=inploi-chatbot] .gap-2{gap:.5rem}[data-widget=inploi-chatbot] .gap-2\\.5{gap:.625rem}[data-widget=inploi-chatbot] .gap-3{gap:.75rem}[data-widget=inploi-chatbot] .gap-4{gap:1rem}[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:.25rem}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:1rem}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:1.5rem}[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:.5rem}[data-widget=inploi-chatbot] .rounded-md{border-radius:.375rem}[data-widget=inploi-chatbot] .rounded-xl{border-radius:.75rem}[data-widget=inploi-chatbot] .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}[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:1.5rem;border-top-right-radius:1.5rem}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:.375rem}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:.375rem}[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:.25rem}[data-widget=inploi-chatbot] .p-1\\.5{padding:.375rem}[data-widget=inploi-chatbot] .p-10{padding:2.5rem}[data-widget=inploi-chatbot] .p-11{padding:2.75rem}[data-widget=inploi-chatbot] .p-12{padding:3rem}[data-widget=inploi-chatbot] .p-2{padding:.5rem}[data-widget=inploi-chatbot] .p-2\\.5{padding:.625rem}[data-widget=inploi-chatbot] .p-3{padding:.75rem}[data-widget=inploi-chatbot] .p-4{padding:1rem}[data-widget=inploi-chatbot] .p-5{padding:1.25rem}[data-widget=inploi-chatbot] .p-6{padding:1.5rem}[data-widget=inploi-chatbot] .p-7{padding:1.75rem}[data-widget=inploi-chatbot] .p-8{padding:2rem}[data-widget=inploi-chatbot] .p-9{padding:2.25rem}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:.125rem;padding-right:.125rem}[data-widget=inploi-chatbot] .px-1{padding-left:.25rem;padding-right:.25rem}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-widget=inploi-chatbot] .px-2{padding-left:.5rem;padding-right:.5rem}[data-widget=inploi-chatbot] .px-3{padding-left:.75rem;padding-right:.75rem}[data-widget=inploi-chatbot] .px-4{padding-left:1rem;padding-right:1rem}[data-widget=inploi-chatbot] .px-5{padding-left:1.25rem;padding-right:1.25rem}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-widget=inploi-chatbot] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-widget=inploi-chatbot] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}[data-widget=inploi-chatbot] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-widget=inploi-chatbot] .pb-2{padding-bottom:.5rem}[data-widget=inploi-chatbot] .pb-6{padding-bottom:1.5rem}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:.375rem}[data-widget=inploi-chatbot] .pl-2{padding-left:.5rem}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:.625rem}[data-widget=inploi-chatbot] .pl-3{padding-left:.75rem}[data-widget=inploi-chatbot] .pl-4{padding-left:1rem}[data-widget=inploi-chatbot] .pr-1{padding-right:.25rem}[data-widget=inploi-chatbot] .pr-16{padding-right:4rem}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:.625rem}[data-widget=inploi-chatbot] .pr-3{padding-right:.75rem}[data-widget=inploi-chatbot] .pr-4{padding-right:1rem}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:.625rem}[data-widget=inploi-chatbot] .pt-3{padding-top:.75rem}[data-widget=inploi-chatbot] .pt-5{padding-top:1.25rem}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}[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:1rem;line-height:1.5rem}[data-widget=inploi-chatbot] .text-sm{font-size:.875rem;line-height:1.25rem}[data-widget=inploi-chatbot] .text-xs{font-size:.75rem;line-height:1rem}[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:.75rem}[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:.5rem;border-bottom-left-radius:.5rem}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}[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
+ `,yn="inploi-chatbot",_n=`[data-widget='${yn}']`,af=()=>({getOrCreateChatbotElement:()=>{const t=document.querySelector(_n);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=yn,e}});var Dt;function ur(t){return{lang:(t==null?void 0:t.lang)??(Dt==null?void 0:Dt.lang),message:t==null?void 0:t.message,abortEarly:(t==null?void 0:t.abortEarly)??(Dt==null?void 0:Dt.abortEarly),abortPipeEarly:(t==null?void 0:t.abortPipeEarly)??(Dt==null?void 0:Dt.abortPipeEarly)}}var ia;function nf(t){return ia==null?void 0:ia.get(t)}var na;function of(t){return na==null?void 0:na.get(t)}var oa;function sf(t,e){var r;return(r=oa==null?void 0:oa.get(t))==null?void 0:r.get(e)}function te(t){var r,a;const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&((a=(r=Object.getPrototypeOf(t))==null?void 0:r.constructor)==null?void 0:a.name))??"null":e}function Z(t,e,r,a,i){const n=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??t.expects??null,s=(i==null?void 0:i.received)??te(n),c={kind:t.kind,type:t.type,input:n,expected:o,received:s,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:t.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:a.lang,abortEarly:a.abortEarly,abortPipeEarly:a.abortPipeEarly},f=t.kind==="schema",v=(i==null?void 0:i.message)??t.message??sf(t.reference,c.lang)??(f?of(c.lang):null)??a.message??nf(c.lang);v!==void 0&&(c.message=typeof v=="function"?v(c):v),f&&(r.typed=!1),r.issues?r.issues.push(c):r.issues=[c]}function ht(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},ur())}}}function lf(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function xn(t,e){const r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}function cf(t){if(t.path){let e="";for(const r of t.path)if(typeof r.key=="string"||typeof r.key=="number")e?e+=`.${r.key}`:e+=r.key;else return null;return e}return null}var df=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}},uf=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function kn(t,e){return{kind:"validation",type:"check",reference:kn,async:!1,expects:null,requirement:t,message:e,"~run"(r,a){return r.typed&&!this.requirement(r.value)&&Z(this,"input",r,a),r}}}function Sn(t){return{kind:"validation",type:"email",reference:Sn,expects:null,async:!1,requirement:uf,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&Z(this,"email",e,r),e}}}function Ve(t,e){return{kind:"validation",type:"max_length",reference:Ve,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,a){return r.typed&&r.value.length>this.requirement&&Z(this,"length",r,a,{received:`${r.value.length}`}),r}}}function Cn(t,e){return{kind:"validation",type:"max_value",reference:Cn,async:!1,expects:`<=${t instanceof Date?t.toJSON():te(t)}`,requirement:t,message:e,"~run"(r,a){return r.typed&&!(r.value<=this.requirement)&&Z(this,"value",r,a,{received:r.value instanceof Date?r.value.toJSON():te(r.value)}),r}}}function ve(t,e){return{kind:"validation",type:"min_length",reference:ve,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,a){return r.typed&&r.value.length<this.requirement&&Z(this,"length",r,a,{received:`${r.value.length}`}),r}}}function $n(t,e){return{kind:"validation",type:"min_value",reference:$n,async:!1,expects:`>=${t instanceof Date?t.toJSON():te(t)}`,requirement:t,message:e,"~run"(r,a){return r.typed&&!(r.value>=this.requirement)&&Z(this,"value",r,a,{received:r.value instanceof Date?r.value.toJSON():te(r.value)}),r}}}function sa(t,e){return{kind:"validation",type:"regex",reference:sa,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(r,a){return r.typed&&!this.requirement.test(r.value)&&Z(this,"format",r,a),r}}}function fr(t){return{kind:"transformation",type:"transform",reference:fr,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function En(t){return{kind:"validation",type:"url",reference:En,async:!1,expects:null,requirement(e){try{return new URL(e),!0}catch{return!1}},message:t,"~run"(e,r){return e.typed&&!this.requirement(e.value)&&Z(this,"URL",e,r),e}}}function ff(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function la(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function In(){return{kind:"schema",type:"any",reference:In,expects:"any",async:!1,get"~standard"(){return ht(this)},"~run"(t){return t.typed=!0,t}}}function ca(t,e){return{kind:"schema",type:"array",reference:ca,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return ht(this)},"~run"(r,a){var n;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],c=this.item["~run"]({value:s},a);if(c.issues){const f={type:"array",origin:"value",input:i,key:o,value:s};for(const v of c.issues)v.path?v.path.unshift(f):v.path=[f],(n=r.issues)==null||n.push(v);if(r.issues||(r.issues=c.issues),a.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value.push(c.value)}}else Z(this,"type",r,a);return r}}}function hr(t){return{kind:"schema",type:"boolean",reference:hr,expects:"boolean",async:!1,message:t,get"~standard"(){return ht(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:Z(this,"type",e,r),e}}}function da(t,e){return{kind:"schema",type:"literal",reference:da,expects:te(t),async:!1,literal:t,message:e,get"~standard"(){return ht(this)},"~run"(r,a){return r.value===this.literal?r.typed=!0:Z(this,"type",r,a),r}}}function Tn(t,e){return{kind:"schema",type:"nullable",reference:Tn,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,get"~standard"(){return ht(this)},"~run"(r,a){return r.value===null&&(this.default!==void 0&&(r.value=la(this,r,a)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,a)}}}function De(t){return{kind:"schema",type:"number",reference:De,expects:"number",async:!1,message:t,get"~standard"(){return ht(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:Z(this,"type",e,r),e}}}function nt(t,e){return{kind:"schema",type:"object",reference:nt,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return ht(this)},"~run"(r,a){var n;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 c=o in i?i[o]:la(s),f=s["~run"]({value:c},a);if(f.issues){const v={type:"object",origin:"value",input:i,key:o,value:c};for(const d of f.issues)d.path?d.path.unshift(v):d.path=[v],(n=r.issues)==null||n.push(d);if(r.issues||(r.issues=f.issues),a.abortEarly){r.typed=!1;break}}f.typed||(r.typed=!1),r.value[o]=f.value}else if(s.fallback!==void 0)r.value[o]=ff(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(Z(this,"key",r,a,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),a.abortEarly))break}}else Z(this,"type",r,a);return r}}}function St(t,e){return{kind:"schema",type:"optional",reference:St,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return ht(this)},"~run"(r,a){return r.value===void 0&&(this.default!==void 0&&(r.value=la(this,r,a)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,a)}}}function An(t,e){return{kind:"schema",type:"picklist",reference:An,expects:xn(t.map(te),"|"),async:!1,options:t,message:e,get"~standard"(){return ht(this)},"~run"(r,a){return this.options.includes(r.value)?r.typed=!0:Z(this,"type",r,a),r}}}function ua(t,e,r){return{kind:"schema",type:"record",reference:ua,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return ht(this)},"~run"(a,i){var o,s;const n=a.value;if(n&&typeof n=="object"){a.typed=!0,a.value={};for(const c in n)if(lf(n,c)){const f=n[c],v=this.key["~run"]({value:c},i);if(v.issues){const p={type:"object",origin:"key",input:n,key:c,value:f};for(const w of v.issues)w.path=[p],(o=a.issues)==null||o.push(w);if(a.issues||(a.issues=v.issues),i.abortEarly){a.typed=!1;break}}const d=this.value["~run"]({value:f},i);if(d.issues){const p={type:"object",origin:"value",input:n,key:c,value:f};for(const w of d.issues)w.path?w.path.unshift(p):w.path=[p],(s=a.issues)==null||s.push(w);if(a.issues||(a.issues=d.issues),i.abortEarly){a.typed=!1;break}}(!v.typed||!d.typed)&&(a.typed=!1),v.typed&&(a.value[v.value]=d.value)}}else Z(this,"type",a,i);return a}}}function W(t){return{kind:"schema",type:"string",reference:W,expects:"string",async:!1,message:t,get"~standard"(){return ht(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:Z(this,"type",e,r),e}}}function Mn(t){let e;if(t)for(const r of t)e?e.push(...r.issues):e=r.issues;return e}function fa(t,e){return{kind:"schema",type:"union",reference:fa,expects:xn(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return ht(this)},"~run"(r,a){let i,n,o;for(const s of this.options){const c=s["~run"]({value:r.value},a);if(c.typed)if(c.issues)n?n.push(c):n=[c];else{i=c;break}else o?o.push(c):o=[c]}if(i)return i;if(n){if(n.length===1)return n[0];Z(this,"type",r,a,{issues:Mn(n)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];Z(this,"type",r,a,{issues:Mn(o)})}return r}}}function hf(t,e,r){const a=t["~run"]({value:e},ur(r));if(a.issues)throw new df(a.issues);return a.value}function pf(t,e){const r={};for(const a in t.entries)r[a]=!e||e.includes(a)?St(t.entries[a]):t.entries[a];return{...t,entries:r,get"~standard"(){return ht(this)}}}function Pt(...t){return{...t[0],pipe:t,get"~standard"(){return ht(this)},"~run"(e,r){for(const a of t)if(a.kind!=="metadata"){if(e.issues&&(a.kind==="schema"||a.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=a["~run"](e,r))}return e}}}function gf(t,e,r){const a=t["~run"]({value:e},ur(r));return{typed:a.typed,success:!a.issues,output:a.value,issues:a.issues}}async function vf(t,e,r){const a=await t["~run"]({value:e},ur(r));return{typed:a.typed,success:!a.issues,output:a.value,issues:a.issues}}const Nn=Pt(fa([W(),De()]),fr(String)),Fn=nt({id:Nn,version:De(),build:De(),nodes:ca(In()),context_schema:St(Tn(ua(W(),nt({required:hr(),type:fa([da("string"),da("number")])}))))}),bf=nt({flow:Fn}),wf=nt({company:nt({name:W()}),flow:Fn,job:nt({id:Nn,title:W()}),user:St(nt({city:St(W()),country:St(W()),isEU:St(hr()),continent:St(W())}))}),mf={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:jo(),response:wf}},yf={pathname:"/flow/id/:id",method:"GET",schema:{response:bf}};var _f=["1","2","3","4","5","6","7","8","9","10","11","12"],xf={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]}},kf=(t,e=1,r)=>a=>{const[i,n]=xf[r][a];return"oklch("+i+"% "+n*e+" "+t+")"},ha=t=>{const e=kf(t.hue,t.chroma,t.mode);return Object.fromEntries(_f.map(r=>[t.prefix+r,t.transform(e(r))]))},pa=t=>t,Sf=t=>{const e=Object.keys(t).flatMap(r=>{const a=t[r];return typeof a=="object"&&a!==null?Object.keys(a).map(i=>{const n=a[i];return[`${String(r)}.${i}`,n]}):[[r,a]]});return Object.fromEntries(e)},pr=t=>!!t&&typeof t=="object"&&!Array.isArray(t),ga=(t,...e)=>{if(!e.length)return t;const r=e.shift();if(pr(t)&&pr(r))for(const a in r){const i=r[a];if(pr(i)){t[a]||Object.assign(t,{[a]:{}});const n=t[a];pr(n)&&ga(n,i)}else Object.assign(t,{[a]:r[a]})}return ga(t,...e)},Cf=t=>{function e(r,a){const i=[t.prefix,a.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return e},$f=()=>({core:t=>({semantic:e=>({component:r=>({from:a=>{const{theme:i,getToken:n}=a,o=p=>n("reference",p.toString()),s=t({theme:i}),c=e({theme:i,core:o,raw:{core:s}}),f=r({theme:i,core:o,semantic:o,raw:{core:s,semantic:c}}),v=Sf(ga(s,c,f)),d=([p,w],g)=>{const m=[g,p].filter(Boolean).join(".");return typeof w=="object"?Object.entries(w).flatMap(S=>d(S,m)):[[a.getToken("declaration",m),w]]};return{values:v,declarations:Object.fromEntries(Object.entries(v).flatMap(p=>d(p))),ref:p=>n("reference",p.toString())}}})})})});const[va,ba,On]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Ef=$f().core(({theme:t})=>({color:{black:va,white:ba,lowest:t.mode==="light"?ba:va,highest:t.mode==="light"?va:ba,...ha({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:pa}),...ha({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:pa}),...ha({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:pa})},typography:{}})).semantic(({core:t,raw:e,theme:r})=>{const a=(i,n)=>e.core.color[i].replace(")",` / ${n})`);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:a("n-8",r.mode==="dark"?.4:.2)},"copy-body":t("color.n-12"),"copy-headings":t("color.n-12"),interactive:{copy:t("color.n-11"),"copy-hover":t("color.n-12"),"copy-active":t("color.n-12"),bg:On,"bg-hover":a("n-10",.2),"bg-active":a("n-10",.3)}}}).component(({raw:t,theme:e,semantic:r,core:a})=>{const i=(n,o)=>t.core.color[n].replace(")",` / ${o})`);return{app:{bg:a(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":a(e.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":On,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":a(e.mode==="dark"?"color.a-8":"color.a-11")}}}),If=Cf({prefix:"i-"}),Tf=t=>{const e=Ef.from({theme:t,getToken:If}),r=Object.entries(e.declarations).map(([a,i])=>`${a}: ${i};`);return`${_n} {
3
3
  ${r.concat(r).join(`
4
4
  `)}
5
- }`},Da=({context:t,schema:e,logger:r})=>{if(e)for(const i in e){const n=e[i];if(!n)continue;const a=xe(t,i,null);if(n.required&&a===null){const o=`Configuration error in context: ${i} is required`;throw r.error(o),new Error(o)}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}}},Af=({_internal_domManager:t=nf(),theme:e,terms:r,feedback:i})=>Po(({apiClient:n,rpcClient:a,logger:o,analytics:s,publishableKey:c,env:f})=>{let v=!1;const d=xu({locale:void 0,overrides:r??{}}),p=c&&f?zo({environment:f,publishableKey:c,logger:o}):void 0,w=()=>{var S;if(typeof window>"u")return;const g=[vt("style",{id:"inploi-chatbot-styles"},rf),vt("style",{id:"inploi-chatbot-theme"},Tf(e))],m=t.getOrCreateChatbotElement();if(ce(vt(et,{},[g,vt(tf,{apiClient:n,logger:o,analytics:s,platformClient:p,params:{theme:e,terms:r,feedback:i}})]),m),i){const y=m.querySelector("dialog");if(!y)throw new Error("Couldn't find feedback host");if(i.plugin instanceof Promise)i.plugin.then(({feedbackPlugin:x})=>{var N;const A=x()({rpcClient:a,apiClient:n,logger:o,analytics:s});Va({instance:A,theme:e,terms:((N=i.params)==null?void 0:N.terms)??{},host:y})});else{const x=i.plugin({rpcClient:a,apiClient:n,logger:o,analytics:s});Va({instance:x,theme:e,terms:((S=i.params)==null?void 0:S.terms)??{},host:y})}}v=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(v)return;w(),o.info("Chatbot plugin prepared")}catch(g){o.error("Error preparing chatbot plugin",g)}},fetchFlowByJobId:async(g,m)=>a.request(mf,{params:{id:g},searchParams:{id_type:(m==null?void 0:m.idType)==="inploi"?"internal":"external"}}).then(S=>({flow:S.flow,title:S.job.title,flowKeys:[S.job.id,...(m==null?void 0:m.flowKeys)??[]],job:{id:S.job.id,id_type:"external"},...m,context:{user:S.user,...m==null?void 0:m.context}})),fetchFlowById:async(g,m)=>a.request(yf,{params:{id:g}}).then(S=>{var y;return{flow:S.flow,title:"Chatbot",flowKeys:(m==null?void 0:m.flowKeys)??[],...m,analytics:{customProperties:{flow_id:S.flow.id,flow_version:S.flow.version,...(y=m==null?void 0:m.analytics)==null?void 0:y.customProperties}}}}),open:async g=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",v||w(),g instanceof Promise?(T.current$.value={state:"loading"},g.then(async m=>{Da({context:m.context||{},schema:m.flow.context_schema,logger:o}),T.startFlow(m)}).catch(m=>{const S=m instanceof Error?m.message:d("unknown_error");T.current$.value={state:"error",error:S}})):(Da({context:g.context||{},schema:g.flow.context_schema,logger:o}),T.startFlow(g))}catch(m){o.error("Error starting flow",m)}},close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),o.info("Closed flow from an external source"))}}});function Va({instance:t,terms:e,theme:r,host:i}){t.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:e,host:i})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Af;const Pa=({condition:t,context:e,submissions:r,ifBlock:i})=>{const[n,...a]=t.compareKey.split(".");if(!n)return!1;const o=ja({context:e,key:n,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=xe(o.value,a.join("."));switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const s=xe(o.value,a.join(".")),c={...i,data:{...i.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Pe(c,{submissions:{_temp:{value:s,type:"boolean"}},context:e});case"string":return Pe(c,{submissions:{_temp:{value:s,type:"string"}},context:e});case"number":return Pe(c,{submissions:{_temp:{value:s,type:"number"}},context:e});case"object":return Array.isArray(s)&&s.every(fa)?Pe(c,{submissions:{_temp:{value:s,type:"enum"}},context:e}):!1}break}case"boolean":{const s=t.compareValue==="true";switch(t.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{const s=o.type==="phone"?gr(o.value):o.value;switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"number":{try{const s=Number(t.compareValue);switch(t.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(t.compare){case"equals":return o.value.length===1&&o.value[0]===t.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==t.compareValue;case"contains":return o.value.includes(t.compareValue);case"notContains":return!o.value.includes(t.compareValue)}break}},Pe=(t,{context:e,submissions:r})=>{const i="combinator"in t.data?t.data.conditions:[t.data];if(("combinator"in t.data?t.data.combinator:"and")==="or"){for(const a of i)if(Pa({condition:a,context:e,submissions:r,ifBlock:t}))return!0;return!1}else{for(const a of i)if(!Pa({condition:a,context:e,submissions:r,ifBlock:t}))return!1;return!0}},Mf=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Mt=(t,{context:e,submissions:r})=>t.replace(Mf,(i,n,a="")=>{const[o,...s]=n.trim().split("."),c=ja({key:o,path:s,submissions:r,context:e});if(!c)return a;switch(c.type){case"boolean":return c.value===!0?"true":"false";case"file":return c.value.map(f=>`${f.name} (${Me(f.sizeKb)})`).join(", ");case"enum":return c.value.join(", ");case"address":return Object.values(c.value).filter(f=>f&&f.trim().length>0).join(", ");case"number":case"string":return c.value?c.value.toString():a;case"phone":return gr(c.value);case"integration":{if(typeof c.value!="object"||Array.isArray(c.value))break;const f=xe(c.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(fa))return f.join(", ")}break}}return a}),La=({node:t,nodes:e,stopWhen:r})=>{if((r==null?void 0:r(t))===!0)return t;const i=t.nextId?e.find(n=>n.id===t.nextId):void 0;if(i)return La({node:i,nodes:e,stopWhen:r})},Nf=({childNode:t,nodes:e})=>{const i=e.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;const a=e.find(s=>s.id===n.branchId);if(!a)return!1;const o=La({node:a,nodes:e,stopWhen:s=>s.id===t.id});return!(!o||o.id!==t.id)});if(i!=null&&i.nextId)return e.find(n=>n.id===i.nextId)},Ff=({flow:t,analytics:e,logger:r,platformClient:i,context:n,apiClient:a,getSubmissions:o,chatService:s,onFlowEnd:c,onInterpret:f,t:v})=>{let d=new AbortController;const p={...e.service,log:g=>e.service.log({...g,customProperties:{...g.customProperties,...e.customProperties}})},w=async(g,m)=>{const S=o();f==null||f(g,m);try{await Of({flow:t,analytics:p,logger:r,platformClient:i,apiClient:a,context:n,node:g,submissions:S,t:v,chat:{sendMessage:async y=>s.send({groupId:g.id,message:y,signal:d.signal}),userInput:async y=>s.input({input:y,signal:d.signal}),addToSubmissions:s.addToSubmissions},next:y=>{const x=y?t.nodes.find(A=>A.id===y):Nf({childNode:g,nodes:t.nodes});return x?w(x,g):c==null?void 0:c(g)},end:()=>c==null?void 0:c(g)})}catch(y){if(y instanceof Ne)return;throw y}};return{interpret:async g=>{const m=t.nodes.find(S=>S.id===g)??ua(t.nodes);return w(m)},undo:g=>{let m=1;const S=t.nodes.find(x=>x.id===g[g.length-1]);for(let x=g.length-2;x>0;x--){const A=g[x],N=t.nodes.find(M=>M.id===A);if(!N||(m++,N.type.startsWith("question-")))break}d.abort(),d=new AbortController;const y=t.nodes.find(x=>x.id===g[g.length-m]);return At(y,"Undo failed: new start node not found"),w(y,S),{removed:m}},abort:()=>{d.abort()}}},gr=t=>`+${t.countryCode} ${t.phoneNumber}`;async function Of(t){const e=t.node;switch(e.type){case"text":return Uf({...t,node:e});case"image":return Hf({...t,node:e});case"question-text":return qf({...t,node:e});case"question-enum":return Wf({...t,node:e});case"question-number":return Kf({...t,node:e});case"question-phone":return Gf({...t,node:e});case"question-boolean":return Yf({...t,node:e});case"question-file":return Xf({...t,node:e});case"question-address":return Jf({...t,node:e});case"end-flow":return Zf({...t,node:e});case"if-block":return Bf({...t,node:e});case"jump":return Lf({...t,node:e});case"link":return Rf({...t,node:e});case"integration-application-submit":return zf({...t,node:e});case"add-submission":return jf({...t,node:e});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return Vf({...t,node:e});case"check-duplicate":return Pf({...t,node:e});case"feedback":return Df({...t,node:e});default:throw new Error(`Unknown node: ${JSON.stringify(e)}`)}}const be=(t,e)=>{var i;const r=(i=t[e])==null?void 0:i.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r};async function Df({next:t,node:e}){t(e.nextId)}async function Vf({next:t,node:e,analytics:r,submissions:i,logger:n}){if(!i)return t(e.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:be(i,e.data.key).toString(),first_name:e.data.firstName?be(i,e.data.firstName).toString():void 0,last_name:e.data.lastName?be(i,e.data.lastName).toString():void 0,email:e.data.email?be(i,e.data.email).toString():void 0,phone_number:e.data.phoneNumber?be(i,e.data.phoneNumber).toString():void 0,custom_traits:e.data.customTraits?Object.fromEntries(e.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{t(e.nextId)}}async function Pf({next:t,node:e,platformClient:r,submissions:i,flow:n,logger:a,chat:o}){var c;let s={isDuplicate:!1};if(i&&r){const f=e.data.scope==="job"?(c=n.job)==null?void 0:c.id:void 0;if(e.data.scope==="company"||f!=null)try{s=await r.checkDuplicate({email:be(i,e.data.email).toString(),jobId:f,scope:e.data.scope})}catch(v){a.error("[check-duplicate]",v)}}o.addToSubmissions(e.data.key,{type:"integration",value:s}),t(e.nextId)}async function Lf({next:t,node:e}){t(e.data.targetId)}async function jf({next:t,node:e,logger:r,submissions:i,context:n}){if(!i){r.error("Submissions not found");return}i[e.data.key]={type:"string",value:Mt(e.data.value,{submissions:i,context:n})},t(e.nextId)}async function zf({chat:t,next:e,node:r,logger:i,apiClient:n,submissions:a,analytics:o,flow:s,t:c}){const f=async v=>{v!==!0&&await t.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await t.sendMessage({type:"loading"});const{anonymous_id:d,session_id:p}=o.getSessionInfo(),w=await n.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:d,session_id:p,job:s.job,submissions:zu(a||{})})}).catch(g=>g);r.data.key&&t.addToSubmissions(r.data.key,{type:"integration",value:w}),Zt(w).with({integration_response:D.select(D.union({service:D.optional(D.string),status:D.number,data:D.any},{service:D.optional(D.string),status:D.number,error:{message:D.string,data:D.any}}))},g=>{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:g.service??"INVALID_SERVICE",response:{status:g.status,payload:"data"in g?g.data:g.error.data??null},job:s.job}})}).otherwise(()=>{}),await Zt(w).with({integration_response:{data:D.select("redirect",{redirect_url:D.string,message:D.optional(D.union(D.string,D.nullish)),button_text:D.optional(D.union(D.string,D.nullish))})}},async g=>{await t.sendMessage({type:"text",author:"bot",text:g.redirect.message??c("submission_redirect_message")});try{const m=new URL(g.redirect.redirect_url);d&&!m.searchParams.has("anonymous_id")&&m.searchParams.set("anonymous_id",d),await t.sendMessage({type:"link",href:m.toString(),text:g.redirect.button_text??c("complete_submission"),onClick:()=>{if(!p){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:p,flow_version:s.version,href:m.toString(),job:s.job}})}})}catch(m){i.error(`Invalid redirect URL: ${g.redirect.redirect_url}`,m),t.sendMessage({type:"system",variant:"error",text:c("redirect_url_error")})}e(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await t.sendMessage({type:"system",variant:"success",text:c("submission_completed")}),e(r.nextId)}).with({integration_response:{error:D.select("error",{message:D.string})}},async g=>{i.error(g.error),await t.sendMessage({type:"system",variant:"error",text:g.error.message||c("submission_failed")}),await f(!1)}).otherwise(async g=>{i.error(g),await t.sendMessage({type:"system",variant:"error",text:c("submission_failed")}),await f(!1)})};await f(r.data.skipConfirmation)}async function Rf({chat:t,next:e,node:r,submissions:i,context:n}){await t.sendMessage({type:"link",href:Mt(r.data.href,{submissions:i,context:n}),text:Mt(r.data.cta,{submissions:i,context:n})}),e(r.nextId)}async function Bf({submissions:t,next:e,node:r,context:i}){e(Pe(r,{submissions:t,context:i})?r.branchId:r.nextId)}async function Uf({chat:t,next:e,node:r,submissions:i,context:n}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.text,{submissions:i,context:n})}),e(r.nextId)}async function Hf({chat:t,next:e,node:r}){await t.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),e(r.nextId)}async function qf({chat:t,next:e,node:r,submissions:i,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:i,context:n})});const o=r.data.format==="phone"?await t.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 t.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 t.sendMessage({type:"system",variant:"info",text:a("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.type==="phone"?gr(o.value):o.value}),e(r.nextId)}async function Kf({chat:t,next:e,node:r,submissions:i,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:i,context:n})});const o=await t.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 t.sendMessage({type:"system",variant:"info",text:a("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value.toString()}),e(r.nextId)}async function Gf({chat:t,next:e,node:r,submissions:i,context:n}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:i,context:n})});const a=await t.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 t.sendMessage({type:"system",variant:"info",text:"Skipped"}):await t.sendMessage({author:"user",type:"text",text:a.type==="phone"?gr(a.value):a.value}),e(r.nextId)}async function Wf({chat:t,next:e,node:r,submissions:i,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:i,context:n})});const o=await t.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await t.sendMessage({type:"system",variant:"info",text:a("skipped")}):await t.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),e(r.nextId)}async function Yf({chat:t,next:e,node:r,submissions:i,context:n,t:a}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:i,context:n})});const o=await t.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await t.sendMessage({type:"system",variant:"info",text:a("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),e(r.nextId)}async function Jf({chat:t,next:e,node:r,t:i}){await t.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await t.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await t.sendMessage({type:"system",variant:"info",text:i("skipped")});else{const a=Object.values(n.value).filter(o=>o&&o.trim().length>0).join(", ");await t.sendMessage({author:"user",type:"text",text:a})}return e(r.nextId)}async function Xf({node:t,chat:e,next:r,submissions:i,context:n,t:a}){await e.sendMessage({author:"bot",type:"text",text:Mt(t.data.question,{submissions:i,context:n})});const o=await e.userInput({key:t.data.key,type:"file",config:{optional:t.data.optional,extensions:t.data.extensions,fileSizeLimitKib:t.data.maxSizeKb??10*1024,allowMultiple:t.data.multiple===!0}});if(o===null)await e.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const s of o.value)await e.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(t.nextId)}async function Zf({chat:t,end:e,node:r}){await t.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),e()}const ja=({key:t,path:e,submissions:r,context:i})=>{if(t==="$context"){if(!e)return;const n=xe(i,e.join("."));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.${e.join(".")}`,n);return}}return r==null?void 0:r[t]};function za(t,e){let r;return(...i)=>{window.clearTimeout(r),r=window.setTimeout(()=>t(...i),e)}}function Qf({debounce:t,scroll:e,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]=_t({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=wt({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),c=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,v=wt(!1);kt(()=>(v.current=!0,()=>void(v.current=!1)));const[d,p,w]=Dt(()=>{const y=()=>{if(!s.current.element)return;const{left:x,top:A,width:N,height:M,bottom:K,right:gt,x:it,y:U}=s.current.element.getBoundingClientRect(),q={left:x,top:A,width:N,height:M,bottom:K,right:gt,x:it,y:U};s.current.element instanceof HTMLElement&&i&&(q.height=s.current.element.offsetHeight,q.width=s.current.element.offsetWidth),Object.freeze(q),v.current&&!ih(s.current.lastBounds,q)&&o(s.current.lastBounds=q)};return[y,f?za(y,f):y,c?za(y,c):y]},[o,i,c,f]);function g(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",w,!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 m(){s.current.element&&(s.current.resizeObserver=new n(w),s.current.resizeObserver.observe(s.current.element),e&&s.current.scrollContainers&&s.current.scrollContainers.forEach(y=>y.addEventListener("scroll",w,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{w()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const S=y=>{!y||y===s.current.element||(g(),s.current.element=y,s.current.scrollContainers=Ra(y),m())};return eh(w,!!e),th(p),kt(()=>{g(),m()},[e,w,p]),kt(()=>g,[]),[S,a,d]}function th(t){kt(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function eh(t,e){kt(()=>{if(e){const r=t;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[t,e])}function Ra(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:i,overflowY:n}=window.getComputedStyle(t);return[r,i,n].some(a=>a==="auto"||a==="scroll")&&e.push(t),[...e,...Ra(t.parentElement)]}const rh=["x","y","top","bottom","left","right","width","height"],ih=(t,e)=>rh.every(r=>t[r]===e[r]),ee=({class:t,...e})=>{const{t:r}=nt();return l("button",{class:zt("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",t),type:"submit",...e,children:l("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[l("title",{children:r("send")}),l("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),l("path",{d:"M8 4V13"})]})})},nh=25,wi=Kt({instant:()=>{},smooth:()=>{}}),ot={onSubmitSuccessFn$:Kt(()=>{}),isBotTyping$:Kt(!1),scrollToEnd:{instant:()=>wi.value.instant(),smooth:()=>wi.value.smooth()}},ah=()=>{const t=wt(null);bt(()=>{wi.value={instant:()=>{var r;return(r=t.current)==null?void 0:r.scrollTo({top:t.current.scrollHeight,behavior:"instant"})},smooth:()=>{t.current&&t.current.scrollHeight-t.current.scrollTop<=t.current.clientHeight*2&&t.current.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})}}},[t]);const e=Dt(()=>({addToSubmissions:(i,n)=>T.setSubmission(i,n),send:async({message:i,signal:n,groupId:a})=>{if(await Zt(i).with({author:"bot",type:"text"},async o=>{if(n!=null&&n.aborted)throw new Ne;ot.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*nh;await new Promise(c=>setTimeout(c,s,{signal:n})),ot.isBotTyping$.value=!1}).otherwise(async()=>{}),n!=null&&n.aborted)throw new Ne;T.addMessage(i,a)},input:({input:i,signal:n})=>{if(n!=null&&n.aborted)throw new Ne;return T.setInput(i),new Promise(a=>{const o=s=>{if(n!=null&&n.aborted)throw new Ne;T.setInput(void 0),i.key&&T.setSubmission(i.key,s),a(s)};ot.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:t,chatService:e}},we=({error:t})=>!t||!t.message?null:l("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[l("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),l("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),l("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),l("p",{class:"truncate pr-1 text-sm",children:t.message})]}),re=({class:t,...e})=>{const{t:r}=nt();return l("button",{type:"button",class:zt("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",t),...e,children:[l("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:[l("title",{children:r("skip")}),l("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),l("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},mi={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"},Le=Xt("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}}),oh="https://api.mapbox.com/search/searchbox/v1/suggest",sh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",lh=t=>atob(t).split("").reverse().join(""),Lt=at({name:W()}),ch=at({suggestions:ci(at({full_address:St(W()),place_formatted:St(W()),name:St(W()),mapbox_id:W(),context:pf(at({address:Lt,street:Lt,neighborhood:Lt,locality:Lt,district:Lt,place:Lt,region:Lt,postcode:Lt,country:Lt}))}))}),dh=({logger:t,t:e})=>Dt(()=>{var i;const r=(i=T.current$.peek().flow)==null?void 0:i.data.flowSessionId;return r?{enabled:!0,getPredictions:async n=>{var d;const a=new URL(oh);a.searchParams.set("q",n),a.searchParams.set("session_token",r);const o=(d=T.current$.peek().flow)==null?void 0:d.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&a.searchParams.set("proximity",`${o.lng},${o.lat}`),a.searchParams.set("access_token",lh(sh));const c=await fetch(a);if(!c.ok)return t.error("Failed to get address details",c),{ok:!1,error:e("address_error")};const f=gf(ch,await c.json());if(f.success===!1)return t.error("Failed to parse address details",f.issues),{ok:!1,error:e("address_error")};const{suggestions:v}=f.output;return{ok:!0,data:v.map(p=>{var w,g,m,S,y,x,A,N,M;return{label:p.full_address??p.place_formatted??p.name??p.mapbox_id,id:p.mapbox_id,address:{line1:((w=p.context.address)==null?void 0:w.name)??((g=p.context.street)==null?void 0:g.name),line2:void 0,line3:((m=p.context.neighborhood)==null?void 0:m.name)??((S=p.context.locality)==null?void 0:S.name),city:((y=p.context.place)==null?void 0:y.name)??((x=p.context.district)==null?void 0:x.name),state:(A=p.context.region)==null?void 0:A.name,postcode:(N=p.context.postcode)==null?void 0:N.name,country:(M=p.context.country)==null?void 0:M.name}}})}}}:{enabled:!1}},[t,e]),Ba=t=>{const{t:e}=nt();return l("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",...t,children:[l("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:l("path",{d:"M10 3L5 8L10 13"})}),l("span",{children:e("back")})]})},uh=({input:t,onSubmitSuccess:e,logger:r})=>{const{t:i}=nt(),[n,a]=_t(),[o,s]=_t([]),{enabled:c,getPredictions:f}=dh({logger:r,t:i}),[v,d]=_t(c?"query":"manual"),[p,w]=_t(""),[g,m]=_t(),S=y=>{At(c,"Query state should not be enabled"),y=y.trim(),y!==(p==null?void 0:p.trim())&&(w(y),y===""&&s([]),m(void 0),f(y).then(x=>{if(x.ok===!1){s([]),m(x.error);return}s(x.data)}))};switch(v){case"query":return At(c,"Query state should not be enabled"),l(fh,{input:t,onSkip:()=>e(null),onAddressSelect:y=>{if(y===""){a(void 0),d("manual");return}const x=o.find(A=>A.id===y);x&&(a(x.address),d("details"))},onAddressSearch:y=>{S(y)},suggestions:o,query:p,error:g});case"details":return At(n!==void 0),l(Ha,{input:t,logger:r,onSubmitSuccess:e,addressFields:n,actions:l(Ba,{onClick:()=>{d("query")}})});case"manual":return l(Ha,{logger:r,input:t,onSubmitSuccess:e,addressFields:{},actions:c?l(Ba,{onClick:()=>{d("query")}}):void 0})}},fh=({input:t,onSkip:e,suggestions:r,onAddressSelect:i,query:n,onAddressSearch:a,error:o})=>{const{t:s}=nt(),c=wt(null);return bt(()=>{c.current&&(c.current.focus(),c.current.select())},[]),l(et,{children:[l("form",{noValidate:!0,onSubmit:f=>{f.preventDefault();const d=new FormData(f.currentTarget).get("address");typeof d=="string"&&a(d)},class:"flex gap-2 p-2.5",children:[l("div",{class:"group relative flex-1",children:[l("input",{ref:c,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:t.config.placeholder||s("address_search"),defaultValue:n,class:Le({optional:!!t.config.optional,className:"w-full rounded-full"})}),l("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:l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[l("circle",{cx:"7",cy:"7",r:"4"}),l("path",{d:"M10 10L13 13"})]}),l("span",{class:"sr-only",children:s("search")})]})})]}),t.config.optional&&l(re,{class:"relative",onClick:e})]}),o?l(we,{error:{message:o}}):null,l("ul",{children:[r.map(f=>l("li",{children:l("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(f.id)},children:[l("span",{class:"flex-grow",children:f.label}),l("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:l("path",{d:"M6 3L11 8L6 13"})})]})},f.id)),l("li",{children:l("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:l("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},Ua=["line1","line2","line3","city","state","postcode","country"],Ha=({addressFields:t,onSubmitSuccess:e,actions:r,input:i})=>{const n=wt(null);bt(()=>{if(n.current){const s=n.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const a=Object.keys(mi),{t:o}=nt();return l("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const c=new FormData(s.currentTarget),f=Object.fromEntries(c.entries());e({type:"address",value:f})},children:[l("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:Ua.map((s,c)=>{const f=`isdk_${s}`,v=i.config.keys[s];return v?l(et,{children:[l("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)}),l("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?l("div",{class:"relative",children:[l("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:v,id:f,defaultValue:t[s],required:!0,children:[t.country&&!a.includes(t.country)?l("option",{value:t[s],children:t[s]}):l("option",{value:"",children:o("select_country")}),a.map(d=>l("option",{value:d,children:d},d))]}),l("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:l("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):l("input",{autoFocus:c===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:v,id:f,defaultValue:t[s],required:!0}),c===Ua.length-1?l("hr",{class:"m-0 w-full border-b border-b-transparent"}):l("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),l("div",{class:"flex w-full flex-1 ",children:[l("div",{class:"flex-grow",children:r}),l(ee,{class:"flex items-center justify-center"})]})]})},yi=()=>{const t=wt(null);return kt(()=>{var e;(e=t.current)==null||e.focus()},[]),t},qa=["true","false"],hh=Aa(qa),ph="answer",Ka="flex items-center flex-wrap gap-2 p-2.5",Ga="min-w-0 max-w-full flex-auto",Wa=Lr(({label:t,...e},r)=>l("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",...e,ref:r,children:l("p",{class:"text-center text-base",children:t})})),gh=({input:t,onSubmitSuccess:e})=>{const r=yi();return l("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const n=qu(i).value,a=hf(hh,n);e({type:"boolean",value:a==="true"})},children:[l("ul",{class:Ka,children:qa.map((i,n)=>l("li",{class:Ga,children:l(Wa,{ref:n===0?r:null,type:"submit",name:ph,value:i,label:t.config.labels[i]},i)}))}),t.config.optional&&l("div",{class:"px-2 pb-2",children:l(re,{class:"relative w-full",type:"button",onClick:()=>e(null)})})]})},vh=t=>new Promise((e,r)=>{const i=new FileReader;i.readAsDataURL(t),i.onload=()=>i.result?e(i.result.toString()):r("No result from reader"),i.onerror=r}),bh=t=>t.reduce((e,r)=>e+r.sizeKb,0),wh=ge("file"),Ya=3,mh=({file:t,class:e,...r})=>{const i=t.name.split(".").pop(),n=t.name.replace(new RegExp(`.${i}$`),"");return l("div",{class:zt("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",e),...r,children:[l("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[l("span",{class:"block truncate",children:n}),l("span",{children:[".",i]})]}),l("p",{"aria-label":"File size",class:"text-accent-11",children:Me(t.sizeKb)})]})},Ja=({class:t,...e})=>l("li",{class:zt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",t),...e}),Xa=t=>{const e=t.split(".").pop();if(!e)throw new Error("No file extension found");return e?"."+e:""},yh=({allowedExtensions:t,files:e})=>{const r=t.map(i=>i.toLowerCase());return e.every(i=>r.includes(Xa(i.name).toLowerCase()))},_h=(t,e)=>{const r=Xa(t);return`${t.replace(new RegExp(`${r}$`),"").slice(0,e)}${r}`},xh=({input:t,onSubmitSuccess:e})=>{var d;const r=(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key],[i,n]=_t(wh(r)?r.value:[]),[a,o]=_t(),s=i.length-Ya,c=bh(i),f=yi(),{t:v}=nt();return l("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:p=>(p.preventDefault(),o(void 0),i.length===0?o({type:"required",message:v("validation_file")}):t.config.extensions.length>0&&!yh({allowedExtensions:t.config.extensions,files:i})?o({type:"validate",message:`${v("validation_file_ext",{ext:t.config.extensions.join(", ")})}`}):t.config.fileSizeLimitKib&&c>t.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Me(t.config.fileSizeLimitKib)}`}):t.config.allowMultiple===!1&&i.length>1?o({type:"invalid",message:v("validation_file_max",{count:1})}):e({type:"file",value:i})),children:[l("div",{class:"flex items-center gap-2",children:[l("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:[i.length>0?l(et,{children:[l("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,Ya).map(p=>{const w=p.name.split(".").pop(),g=p.name.replace(new RegExp(`.${w}$`),"");return l(Ja,{class:"flex overflow-hidden",children:[l("span",{class:"block truncate",children:g}),l("span",{children:[".",w]})]})}),s>0?l(Ja,{children:["+",s," file",s!==1?"s":""]}):null]}),l("p",{class:"text-neutral-11 text-xs",children:[Me(c)," ",i.length>1?"total":""]})]}):l("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[l("header",{class:"flex flex-col items-center gap-0",children:[l("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:l("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"})}),l("p",{class:"text-neutral-12 tracking-[-0.01em]",children:v("upload_file",{count:t.config.allowMultiple?2:1})}),t.config.fileSizeLimitKib?l("p",{class:"text-neutral-10 text-xs",children:["(",v("file_max_size",{size:Me(t.config.fileSizeLimitKib)}),")"]}):null]}),l("aside",{class:"flex flex-col items-center gap-2",children:[l("p",{id:"accepted-filetypes",class:"sr-only",children:v("file_extensions")}),l("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:t.config.extensions.map(p=>l("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:p.replace(".","")}))})]})]}),l("input",{id:"dropzone-file",onInput:async p=>{At(p.target instanceof HTMLInputElement);const w=p.target.files?Array.from(p.target.files):[],g=await Promise.allSettled(w.map(async S=>{const y=await vh(S);return{name:_h(S.name,42),data:y,sizeKb:S.size/1e3}}));if(g.some(({status:S})=>S==="rejected"))return o({type:"invalid",message:"Invalid file"});const m=g.map(S=>S.status==="fulfilled"?S.value:null).filter(Boolean);n(m)},multiple:t.config.allowMultiple,type:"file",class:"sr-only"})]}),l("div",{class:"flex h-full flex-col items-center gap-2",children:[l(ee,{disabled:i.length===0}),t.config.optional&&l(re,{class:"relative",onClick:()=>e(null)})]})]}),l(we,{error:a})]})};var je=t=>t.type==="checkbox",ie=t=>t instanceof Date,pt=t=>t==null;const Za=t=>typeof t=="object";var Y=t=>!pt(t)&&!Array.isArray(t)&&Za(t)&&!ie(t),kh=t=>Y(t)&&t.target?je(t.target)?t.target.checked:t.target.value:t,Sh=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,Ch=(t,e)=>t.has(Sh(e)),$h=t=>{const e=t.constructor&&t.constructor.prototype;return Y(e)&&e.hasOwnProperty("isPrototypeOf")},_i=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Q(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(_i&&(t instanceof Blob||e))return t;const r=Array.isArray(t);if(!r&&!(Y(t)&&$h(t)))return t;const i=r?[]:Object.create(Object.getPrototypeOf(t));for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=Q(t[n]));return i}var vr=t=>/^\w*$/.test(t),H=t=>t===void 0,xi=t=>Array.isArray(t)?t.filter(Boolean):[],ki=t=>xi(t.replace(/["|']|\]/g,"").split(/\.|\[/)),$=(t,e,r)=>{if(!e||!Y(t))return r;const i=(vr(e)?[e]:ki(e)).reduce((n,a)=>pt(n)?n:n[a],t);return H(i)||i===t?H(t[e])?r:t[e]:i},Nt=t=>typeof t=="boolean",Ct=t=>typeof t=="function",z=(t,e,r)=>{let i=-1;const n=vr(e)?[e]:ki(e),a=n.length,o=a-1;for(;++i<a;){const s=n[i];let c=r;if(i!==o){const f=t[s];c=Y(f)||Array.isArray(f)?f:isNaN(+n[i+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;t[s]=c,t=t[s]}};const Qa={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$t={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},jt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Eh=lt.createContext(null);Eh.displayName="HookFormControlContext";var Ih=(t,e,r,i=!0)=>{const n={defaultValues:e._defaultValues};for(const a in t)Object.defineProperty(n,a,{get:()=>{const o=a;return e._proxyFormState[o]!==$t.all&&(e._proxyFormState[o]=!i||$t.all),r&&(r[o]=!0),t[o]}});return n};const Th=typeof window<"u"?lt.useLayoutEffect:lt.useEffect;var mt=t=>typeof t=="string",Ah=(t,e,r,i,n)=>mt(t)?(i&&e.watch.add(t),$(r,t,n)):Array.isArray(t)?t.map(a=>(i&&e.watch.add(a),$(r,a))):(i&&(e.watchAll=!0),r),Si=t=>pt(t)||!Za(t);function Wt(t,e,r=new WeakSet){if(Si(t)||Si(e))return Object.is(t,e);if(ie(t)&&ie(e))return Object.is(t.getTime(),e.getTime());const i=Object.keys(t),n=Object.keys(e);if(i.length!==n.length)return!1;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);for(const a of i){const o=t[a];if(!n.includes(a))return!1;if(a!=="ref"){const s=e[a];if(ie(o)&&ie(s)||Y(o)&&Y(s)||Array.isArray(o)&&Array.isArray(s)?!Wt(o,s,r):!Object.is(o,s))return!1}}return!0}const Mh=lt.createContext(null);Mh.displayName="HookFormContext";var to=(t,e,r,i,n)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[i]:n||!0}}:{},ze=t=>Array.isArray(t)?t:[t],eo=()=>{let t=[];return{get observers(){return t},next:n=>{for(const a of t)a.next&&a.next(n)},subscribe:n=>(t.push(n),{unsubscribe:()=>{t=t.filter(a=>a!==n)}}),unsubscribe:()=>{t=[]}}};function ro(t,e){const r={};for(const i in t)if(t.hasOwnProperty(i)){const n=t[i],a=e[i];if(n&&Y(n)&&a){const o=ro(n,a);Y(o)&&(r[i]=o)}else t[i]&&(r[i]=a)}return r}var ut=t=>Y(t)&&!Object.keys(t).length,Ci=t=>t.type==="file",br=t=>{if(!_i)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},io=t=>t.type==="select-multiple",$i=t=>t.type==="radio",Nh=t=>$i(t)||je(t),Ei=t=>br(t)&&t.isConnected;function Fh(t,e){const r=e.slice(0,-1).length;let i=0;for(;i<r;)t=H(t)?i++:t[e[i++]];return t}function Oh(t){for(const e in t)if(t.hasOwnProperty(e)&&!H(t[e]))return!1;return!0}function J(t,e){const r=Array.isArray(e)?e:vr(e)?[e]:ki(e),i=r.length===1?t:Fh(t,r),n=r.length-1,a=r[n];return i&&delete i[a],n!==0&&(Y(i)&&ut(i)||Array.isArray(i)&&Oh(i))&&J(t,r.slice(0,-1)),t}var Dh=t=>{for(const e in t)if(Ct(t[e]))return!0;return!1};function no(t){return Array.isArray(t)||Y(t)&&!Dh(t)}function Ii(t,e={}){for(const r in t){const i=t[r];no(i)?(e[r]=Array.isArray(i)?[]:{},Ii(i,e[r])):H(i)||(e[r]=!0)}return e}function me(t,e,r){r||(r=Ii(e));for(const i in t){const n=t[i];if(no(n))H(e)||Si(r[i])?r[i]=Ii(n,Array.isArray(n)?[]:{}):me(n,pt(e)?{}:e[i],r[i]);else{const a=e[i];r[i]=!Wt(n,a)}}return r}const ao={value:!1,isValid:!1},oo={value:!0,isValid:!0};var so=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!H(t[0].attributes.value)?H(t[0].value)||t[0].value===""?oo:{value:t[0].value,isValid:!0}:oo:ao}return ao},lo=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:i})=>H(t)?t:e?t===""?NaN:t&&+t:r&&mt(t)?new Date(t):i?i(t):t;const co={isValid:!1,value:null};var uo=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,co):co;function fo(t){const e=t.ref;return Ci(e)?e.files:$i(e)?uo(t.refs).value:io(e)?[...e.selectedOptions].map(({value:r})=>r):je(e)?so(t.refs).value:lo(H(e.value)?t.ref.value:e.value,t)}var Vh=(t,e,r,i)=>{const n={};for(const a of t){const o=$(e,a);o&&z(n,a,o._f)}return{criteriaMode:r,names:[...t],fields:n,shouldUseNativeValidation:i}},wr=t=>t instanceof RegExp,Re=t=>H(t)?t:wr(t)?t.source:Y(t)?wr(t.value)?t.value.source:t.value:t,ho=t=>({isOnSubmit:!t||t===$t.onSubmit,isOnBlur:t===$t.onBlur,isOnChange:t===$t.onChange,isOnAll:t===$t.all,isOnTouch:t===$t.onTouched});const po="AsyncFunction";var Ph=t=>!!t&&!!t.validate&&!!(Ct(t.validate)&&t.validate.constructor.name===po||Y(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===po)),Lh=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),go=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(i=>t.startsWith(i)&&/^\.\w+/.test(t.slice(i.length))));const Be=(t,e,r,i)=>{for(const n of r||Object.keys(t)){const a=$(t,n);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],n)&&!i)return!0;if(o.ref&&e(o.ref,o.name)&&!i)return!0;if(Be(s,e))break}else if(Y(s)&&Be(s,e))break}}};function vo(t,e,r){const i=$(t,r);if(i||vr(r))return{error:i,name:r};const n=r.split(".");for(;n.length;){const a=n.join("."),o=$(e,a),s=$(t,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 jh=(t,e,r,i)=>{r(t);const{name:n,...a}=t;return ut(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(o=>e[o]===(!i||$t.all))},zh=(t,e,r)=>!t||!e||t===e||ze(t).some(i=>i&&(r?i===e:i.startsWith(e)||e.startsWith(i))),Rh=(t,e,r,i,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(e||t):(r?i.isOnBlur:n.isOnBlur)?!t:(r?i.isOnChange:n.isOnChange)?t:!0,Bh=(t,e)=>!xi($(t,e)).length&&J(t,e),Uh=(t,e,r)=>{const i=ze($(t,r));return z(i,"root",e[r]),z(t,r,i),t};function bo(t,e,r="validate"){if(mt(t)||Array.isArray(t)&&t.every(mt)||Nt(t)&&!t)return{type:r,message:mt(t)?t:"",ref:e}}var ye=t=>Y(t)&&!wr(t)?t:{value:t,message:""},wo=async(t,e,r,i,n,a)=>{const{ref:o,refs:s,required:c,maxLength:f,minLength:v,min:d,max:p,pattern:w,validate:g,name:m,valueAsNumber:S,mount:y}=t._f,x=$(r,m);if(!y||e.has(m))return{};const A=s?s[0]:o,N=F=>{n&&A.reportValidity&&(A.setCustomValidity(Nt(F)?"":F||""),A.reportValidity())},M={},K=$i(o),gt=je(o),it=K||gt,U=(S||Ci(o))&&H(o.value)&&H(x)||br(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,q=to.bind(null,m,i,M),_r=(F,V,tt,st=jt.maxLength,Et=jt.minLength)=>{const yt=F?V:tt;M[m]={type:F?st:Et,message:yt,ref:o,...q(F?st:Et,yt)}};if(a?!Array.isArray(x)||!x.length:c&&(!it&&(U||pt(x))||Nt(x)&&!x||gt&&!so(s).isValid||K&&!uo(s).isValid)){const{value:F,message:V}=mt(c)?{value:!!c,message:c}:ye(c);if(F&&(M[m]={type:jt.required,message:V,ref:A,...q(jt.required,V)},!i))return N(V),M}if(!U&&(!pt(d)||!pt(p))){let F,V;const tt=ye(p),st=ye(d);if(!pt(x)&&!isNaN(x)){const Et=o.valueAsNumber||x&&+x;pt(tt.value)||(F=Et>tt.value),pt(st.value)||(V=Et<st.value)}else{const Et=o.valueAsDate||new Date(x),yt=Ke=>new Date(new Date().toDateString()+" "+Ke),He=o.type=="time",qe=o.type=="week";mt(tt.value)&&x&&(F=He?yt(x)>yt(tt.value):qe?x>tt.value:Et>new Date(tt.value)),mt(st.value)&&x&&(V=He?yt(x)<yt(st.value):qe?x<st.value:Et<new Date(st.value))}if((F||V)&&(_r(!!F,tt.message,st.message,jt.max,jt.min),!i))return N(M[m].message),M}if((f||v)&&!U&&(mt(x)||a&&Array.isArray(x))){const F=ye(f),V=ye(v),tt=!pt(F.value)&&x.length>+F.value,st=!pt(V.value)&&x.length<+V.value;if((tt||st)&&(_r(tt,F.message,V.message),!i))return N(M[m].message),M}if(w&&!U&&mt(x)){const{value:F,message:V}=ye(w);if(wr(F)&&!x.match(F)&&(M[m]={type:jt.pattern,message:V,ref:o,...q(jt.pattern,V)},!i))return N(V),M}if(g){if(Ct(g)){const F=await g(x,r),V=bo(F,A);if(V&&(M[m]={...V,...q(jt.validate,V.message)},!i))return N(V.message),M}else if(Y(g)){let F={};for(const V in g){if(!ut(F)&&!i)break;const tt=bo(await g[V](x,r),A,V);tt&&(F={...tt,...q(V,tt.message)},N(tt.message),i&&(M[m]=F))}if(!ut(F)&&(M[m]={ref:A,...F},!i))return M}}return N(!0),M};const Hh={mode:$t.onSubmit,reValidateMode:$t.onChange,shouldFocusError:!0};function qh(t={}){let e={...Hh,...t},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ct(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},i={},n=Y(e.defaultValues)||Y(e.values)?Q(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:Q(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},c,f=0;const v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...v};let p={...d};const w={array:eo(),state:eo()},g=e.criteriaMode===$t.all,m=u=>h=>{clearTimeout(f),f=setTimeout(u,h)},S=async u=>{if(!o.keepIsValid&&!e.disabled&&(d.isValid||p.isValid||u)){let h;e.resolver?(h=ut((await it()).errors),y()):h=await q(i,!0),h!==r.isValid&&w.state.next({isValid:h})}},y=(u,h)=>{!e.disabled&&(d.isValidating||d.validatingFields||p.isValidating||p.validatingFields)&&((u||Array.from(s.mount)).forEach(b=>{b&&(h?z(r.validatingFields,b,h):J(r.validatingFields,b))}),w.state.next({validatingFields:r.validatingFields,isValidating:!ut(r.validatingFields)}))},x=(u,h=[],b,C,k=!0,_=!0)=>{if(C&&b&&!e.disabled){if(o.action=!0,_&&Array.isArray($(i,u))){const I=b($(i,u),C.argA,C.argB);k&&z(i,u,I)}if(_&&Array.isArray($(r.errors,u))){const I=b($(r.errors,u),C.argA,C.argB);k&&z(r.errors,u,I),Bh(r.errors,u)}if((d.touchedFields||p.touchedFields)&&_&&Array.isArray($(r.touchedFields,u))){const I=b($(r.touchedFields,u),C.argA,C.argB);k&&z(r.touchedFields,u,I)}(d.dirtyFields||p.dirtyFields)&&(r.dirtyFields=me(n,a)),w.state.next({name:u,isDirty:F(u,h),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else z(a,u,h)},A=(u,h)=>{z(r.errors,u,h),w.state.next({errors:r.errors})},N=u=>{r.errors=u,w.state.next({errors:r.errors,isValid:!1})},M=(u,h,b,C)=>{const k=$(i,u);if(k){const _=$(a,u,H(b)?$(n,u):b);H(_)||C&&C.defaultChecked||h?z(a,u,h?_:fo(k._f)):st(u,_),o.mount&&!o.action&&S()}},K=(u,h,b,C,k)=>{let _=!1,I=!1;const P={name:u};if(!e.disabled){if(!b||C){(d.isDirty||p.isDirty)&&(I=r.isDirty,r.isDirty=P.isDirty=F(),_=I!==P.isDirty);const L=Wt($(n,u),h);I=!!$(r.dirtyFields,u),L?J(r.dirtyFields,u):z(r.dirtyFields,u,!0),P.dirtyFields=r.dirtyFields,_=_||(d.dirtyFields||p.dirtyFields)&&I!==!L}if(b){const L=$(r.touchedFields,u);L||(z(r.touchedFields,u,b),P.touchedFields=r.touchedFields,_=_||(d.touchedFields||p.touchedFields)&&L!==b)}_&&k&&w.state.next(P)}return _?P:{}},gt=(u,h,b,C)=>{const k=$(r.errors,u),_=(d.isValid||p.isValid)&&Nt(h)&&r.isValid!==h;if(e.delayError&&b?(c=m(()=>A(u,b)),c(e.delayError)):(clearTimeout(f),c=null,b?z(r.errors,u,b):J(r.errors,u)),(b?!Wt(k,b):k)||!ut(C)||_){const I={...C,..._&&Nt(h)?{isValid:h}:{},errors:r.errors,name:u};r={...r,...I},w.state.next(I)}},it=async u=>(y(u,!0),await e.resolver(a,e.context,Vh(u||s.mount,i,e.criteriaMode,e.shouldUseNativeValidation))),U=async u=>{const{errors:h}=await it(u);if(y(u),u)for(const b of u){const C=$(h,b);C?z(r.errors,b,C):J(r.errors,b)}else r.errors=h;return h},q=async(u,h,b={valid:!0})=>{for(const C in u){const k=u[C];if(k){const{_f:_,...I}=k;if(_){const P=s.array.has(_.name),L=k._f&&Ph(k._f);L&&d.validatingFields&&y([_.name],!0);const ft=await wo(k,s.disabled,a,g,e.shouldUseNativeValidation&&!h,P);if(L&&d.validatingFields&&y([_.name]),ft[_.name]&&(b.valid=!1,h||t.shouldUseNativeValidation))break;!h&&($(ft,_.name)?P?Uh(r.errors,ft,_.name):z(r.errors,_.name,ft[_.name]):J(r.errors,_.name))}!ut(I)&&await q(I,h,b)}}return b.valid},_r=()=>{for(const u of s.unMount){const h=$(i,u);h&&(h._f.refs?h._f.refs.every(b=>!Ei(b)):!Ei(h._f.ref))&&Ti(u)}s.unMount=new Set},F=(u,h)=>!e.disabled&&(u&&h&&z(a,u,h),!Wt($o(),n)),V=(u,h,b)=>Ah(u,s,{...o.mount?a:H(h)?n:mt(u)?{[u]:h}:h},b,h),tt=u=>xi($(o.mount?a:n,u,e.shouldUnregister?$(n,u,[]):[])),st=(u,h,b={})=>{const C=$(i,u);let k=h;if(C){const _=C._f;_&&(!_.disabled&&z(a,u,lo(h,_)),k=br(_.ref)&&pt(h)?"":h,io(_.ref)?[..._.ref.options].forEach(I=>I.selected=k.includes(I.value)):_.refs?je(_.ref)?_.refs.forEach(I=>{(!I.defaultChecked||!I.disabled)&&(Array.isArray(k)?I.checked=!!k.find(P=>P===I.value):I.checked=k===I.value||!!k)}):_.refs.forEach(I=>I.checked=I.value===k):Ci(_.ref)?_.ref.value="":(_.ref.value=k,_.ref.type||w.state.next({name:u,values:Q(a)})))}(b.shouldDirty||b.shouldTouch)&&K(u,k,b.shouldTouch,b.shouldDirty,!0),b.shouldValidate&&Ke(u)},Et=(u,h,b)=>{for(const C in h){if(!h.hasOwnProperty(C))return;const k=h[C],_=u+"."+C,I=$(i,_);(s.array.has(u)||Y(k)||I&&!I._f)&&!ie(k)?Et(_,k,b):st(_,k,b)}},yt=(u,h,b={})=>{const C=$(i,u),k=s.array.has(u),_=Q(h);z(a,u,_),k?(w.array.next({name:u,values:Q(a)}),(d.isDirty||d.dirtyFields||p.isDirty||p.dirtyFields)&&b.shouldDirty&&w.state.next({name:u,dirtyFields:me(n,a),isDirty:F(u,_)})):C&&!C._f&&!pt(_)?Et(u,_,b):st(u,_,b),go(u,s)?w.state.next({...r,name:u,values:Q(a)}):w.state.next({name:o.mount?u:void 0,values:Q(a)})},He=async u=>{o.mount=!0;const h=u.target;let b=h.name,C=!0;const k=$(i,b),_=L=>{C=Number.isNaN(L)||ie(L)&&isNaN(L.getTime())||Wt(L,$(a,b,L))},I=ho(e.mode),P=ho(e.reValidateMode);if(k){let L,ft;const ne=h.type?fo(k._f):kh(u),Yt=u.type===Qa.BLUR||u.type===Qa.FOCUS_OUT,qp=!Lh(k._f)&&!e.resolver&&!$(r.errors,b)&&!k._f.deps||Rh(Yt,$(r.touchedFields,b),r.isSubmitted,P,I),Ni=go(b,s,Yt);z(a,b,ne),Yt?(!h||!h.readOnly)&&(k._f.onBlur&&k._f.onBlur(u),c&&c(0)):k._f.onChange&&k._f.onChange(u);const Fi=K(b,ne,Yt),Kp=!ut(Fi)||Ni;if(!Yt&&w.state.next({name:b,type:u.type,values:Q(a)}),qp)return(d.isValid||p.isValid)&&(e.mode==="onBlur"?Yt&&S():Yt||S()),Kp&&w.state.next({name:b,...Ni?{}:Fi});if(!Yt&&Ni&&w.state.next({...r}),e.resolver){const{errors:Do}=await it([b]);if(y([b]),_(ne),C){const Gp=vo(r.errors,i,b),Vo=vo(Do,i,Gp.name||b);L=Vo.error,b=Vo.name,ft=ut(Do)}}else y([b],!0),L=(await wo(k,s.disabled,a,g,e.shouldUseNativeValidation))[b],y([b]),_(ne),C&&(L?ft=!1:(d.isValid||p.isValid)&&(ft=await q(i,!0)));C&&(k._f.deps&&(!Array.isArray(k._f.deps)||k._f.deps.length>0)&&Ke(k._f.deps),gt(b,ft,L,Fi))}},qe=(u,h)=>{if($(r.errors,h)&&u.focus)return u.focus(),1},Ke=async(u,h={})=>{let b,C;const k=ze(u);if(e.resolver){const _=await U(H(u)?u:k);b=ut(_),C=u?!k.some(I=>$(_,I)):b}else u?(C=(await Promise.all(k.map(async _=>{const I=$(i,_);return await q(I&&I._f?{[_]:I}:I)}))).every(Boolean),!(!C&&!r.isValid)&&S()):C=b=await q(i);return w.state.next({...!mt(u)||(d.isValid||p.isValid)&&b!==r.isValid?{}:{name:u},...e.resolver||!u?{isValid:b}:{},errors:r.errors}),h.shouldFocus&&!C&&Be(i,qe,u?k:s.mount),C},$o=(u,h)=>{let b={...o.mount?a:n};return h&&(b=ro(h.dirtyFields?r.dirtyFields:r.touchedFields,b)),H(u)?b:mt(u)?$(b,u):u.map(C=>$(b,C))},Eo=(u,h)=>({invalid:!!$((h||r).errors,u),isDirty:!!$((h||r).dirtyFields,u),error:$((h||r).errors,u),isValidating:!!$(r.validatingFields,u),isTouched:!!$((h||r).touchedFields,u)}),Lp=u=>{const h=u?ze(u):void 0;h==null||h.forEach(b=>J(r.errors,b)),h?h.forEach(b=>{w.state.next({name:b,errors:r.errors})}):w.state.next({errors:{}})},Io=(u,h,b)=>{const C=($(i,u,{_f:{}})._f||{}).ref,k=$(r.errors,u)||{},{ref:_,message:I,type:P,...L}=k;z(r.errors,u,{...L,...h,ref:C}),w.state.next({name:u,errors:r.errors,isValid:!1}),b&&b.shouldFocus&&C&&C.focus&&C.focus()},jp=(u,h)=>Ct(u)?w.state.subscribe({next:b=>"values"in b&&u(V(void 0,h),b)}):V(u,h,!0),To=u=>w.state.subscribe({next:h=>{zh(u.name,h.name,u.exact)&&jh(h,u.formState||d,Hp,u.reRenderRoot)&&u.callback({values:{...a},...r,...h,defaultValues:n})}}).unsubscribe,zp=u=>(o.mount=!0,p={...p,...u.formState},To({...u,formState:{...v,...u.formState}})),Ti=(u,h={})=>{for(const b of u?ze(u):s.mount)s.mount.delete(b),s.array.delete(b),h.keepValue||(J(i,b),J(a,b)),!h.keepError&&J(r.errors,b),!h.keepDirty&&J(r.dirtyFields,b),!h.keepTouched&&J(r.touchedFields,b),!h.keepIsValidating&&J(r.validatingFields,b),!e.shouldUnregister&&!h.keepDefaultValue&&J(n,b);w.state.next({values:Q(a)}),w.state.next({...r,...h.keepDirty?{isDirty:F()}:{}}),!h.keepIsValid&&S()},Ao=({disabled:u,name:h})=>{if(Nt(u)&&o.mount||u||s.disabled.has(h)){const k=s.disabled.has(h)!==!!u;u?s.disabled.add(h):s.disabled.delete(h),k&&o.mount&&!o.action&&S()}},Ai=(u,h={})=>{let b=$(i,u);const C=Nt(h.disabled)||Nt(e.disabled);return z(i,u,{...b||{},_f:{...b&&b._f?b._f:{ref:{name:u}},name:u,mount:!0,...h}}),s.mount.add(u),b?Ao({disabled:Nt(h.disabled)?h.disabled:e.disabled,name:u}):M(u,!0,h.value),{...C?{disabled:h.disabled||e.disabled}:{},...e.progressive?{required:!!h.required,min:Re(h.min),max:Re(h.max),minLength:Re(h.minLength),maxLength:Re(h.maxLength),pattern:Re(h.pattern)}:{},name:u,onChange:He,onBlur:He,ref:k=>{if(k){Ai(u,h),b=$(i,u);const _=H(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,I=Nh(_),P=b._f.refs||[];if(I?P.find(L=>L===_):_===b._f.ref)return;z(i,u,{_f:{...b._f,...I?{refs:[...P.filter(Ei),_,...Array.isArray($(n,u))?[{}]:[]],ref:{type:_.type,name:u}}:{ref:_}}}),M(u,!1,void 0,_)}else b=$(i,u,{}),b._f&&(b._f.mount=!1),(e.shouldUnregister||h.shouldUnregister)&&!(Ch(s.array,u)&&o.action)&&s.unMount.add(u)}}},Mi=()=>e.shouldFocusError&&Be(i,qe,s.mount),Rp=u=>{Nt(u)&&(w.state.next({disabled:u}),Be(i,(h,b)=>{const C=$(i,b);C&&(h.disabled=C._f.disabled||u,Array.isArray(C._f.refs)&&C._f.refs.forEach(k=>{k.disabled=C._f.disabled||u}))},0,!1))},Mo=(u,h)=>async b=>{let C;b&&(b.preventDefault&&b.preventDefault(),b.persist&&b.persist());let k=Q(a);if(w.state.next({isSubmitting:!0}),e.resolver){const{errors:_,values:I}=await it();y(),r.errors=_,k=Q(I)}else await q(i);if(s.disabled.size)for(const _ of s.disabled)J(k,_);if(J(r.errors,"root"),ut(r.errors)){w.state.next({errors:{}});try{await u(k,b)}catch(_){C=_}}else h&&await h({...r.errors},b),Mi(),setTimeout(Mi);if(w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ut(r.errors)&&!C,submitCount:r.submitCount+1,errors:r.errors}),C)throw C},Bp=(u,h={})=>{$(i,u)&&(H(h.defaultValue)?yt(u,Q($(n,u))):(yt(u,h.defaultValue),z(n,u,Q(h.defaultValue))),h.keepTouched||J(r.touchedFields,u),h.keepDirty||(J(r.dirtyFields,u),r.isDirty=h.defaultValue?F(u,Q($(n,u))):F()),h.keepError||(J(r.errors,u),d.isValid&&S()),w.state.next({...r}))},No=(u,h={})=>{const b=u?Q(u):n,C=Q(b),k=ut(u),_=k?n:C;if(h.keepDefaultValues||(n=b),!h.keepValues){if(h.keepDirtyValues){const I=new Set([...s.mount,...Object.keys(me(n,a))]);for(const P of Array.from(I)){const L=$(r.dirtyFields,P),ft=$(a,P),ne=$(_,P);L&&!H(ft)?z(_,P,ft):!L&&!H(ne)&&yt(P,ne)}}else{if(_i&&H(u))for(const I of s.mount){const P=$(i,I);if(P&&P._f){const L=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(br(L)){const ft=L.closest("form");if(ft){ft.reset();break}}}}if(h.keepFieldsRef)for(const I of s.mount)yt(I,$(_,I));else i={}}a=e.shouldUnregister?h.keepDefaultValues?Q(n):{}:Q(_),w.array.next({values:{..._}}),w.state.next({values:{..._}})}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=!d.isValid||!!h.keepIsValid||!!h.keepDirtyValues||!e.shouldUnregister&&!ut(_),o.watch=!!e.shouldUnregister,o.keepIsValid=!!h.keepIsValid,o.action=!1,h.keepErrors||(r.errors={}),w.state.next({submitCount:h.keepSubmitCount?r.submitCount:0,isDirty:k?!1:h.keepDirty?r.isDirty:!!(h.keepDefaultValues&&!Wt(u,n)),isSubmitted:h.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:k?{}:h.keepDirtyValues?h.keepDefaultValues&&a?me(n,a):r.dirtyFields:h.keepDefaultValues&&u?me(n,u):h.keepDirty?r.dirtyFields:{},touchedFields:h.keepTouched?r.touchedFields:{},errors:h.keepErrors?r.errors:{},isSubmitSuccessful:h.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Fo=(u,h)=>No(Ct(u)?u(a):u,{...e.resetOptions,...h}),Up=(u,h={})=>{const b=$(i,u),C=b&&b._f;if(C){const k=C.refs?C.refs[0]:C.ref;k.focus&&setTimeout(()=>{k.focus(),h.shouldSelect&&Ct(k.select)&&k.select()})}},Hp=u=>{r={...r,...u}},Oo={control:{register:Ai,unregister:Ti,getFieldState:Eo,handleSubmit:Mo,setError:Io,_subscribe:To,_runSchema:it,_updateIsValidating:y,_focusError:Mi,_getWatch:V,_getDirty:F,_setValid:S,_setFieldArray:x,_setDisabledField:Ao,_setErrors:N,_getFieldArray:tt,_reset:No,_resetDefaultValues:()=>Ct(e.defaultValues)&&e.defaultValues().then(u=>{Fo(u,e.resetOptions),w.state.next({isLoading:!1})}),_removeUnmounted:_r,_disableForm:Rp,_subjects:w,_proxyFormState:d,get _fields(){return i},get _formValues(){return a},get _state(){return o},set _state(u){o=u},get _defaultValues(){return n},get _names(){return s},set _names(u){s=u},get _formState(){return r},get _options(){return e},set _options(u){e={...e,...u}}},subscribe:zp,trigger:Ke,register:Ai,handleSubmit:Mo,watch:jp,setValue:yt,getValues:$o,reset:Fo,resetField:Bp,clearErrors:Lp,unregister:Ti,setError:Io,setFocus:Up,getFieldState:Eo};return{...Oo,formControl:Oo}}function mr(t={}){const e=lt.useRef(void 0),r=lt.useRef(void 0),[i,n]=lt.useState({isDirty:!1,isValidating:!1,isLoading:Ct(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:Ct(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:i},t.defaultValues&&!Ct(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:o,...s}=qh(t);e.current={...s,formState:i}}const a=e.current.control;return a._options=t,Th(()=>{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]),lt.useEffect(()=>a._disableForm(t.disabled),[a,t.disabled]),lt.useEffect(()=>{t.mode&&(a._options.mode=t.mode),t.reValidateMode&&(a._options.reValidateMode=t.reValidateMode)},[a,t.mode,t.reValidateMode]),lt.useEffect(()=>{t.errors&&(a._setErrors(t.errors),a._focusError())},[a,t.errors]),lt.useEffect(()=>{t.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,t.shouldUnregister]),lt.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==i.isDirty&&a._subjects.state.next({isDirty:o})}},[a,i.isDirty]),lt.useEffect(()=>{var o;t.values&&!Wt(t.values,r.current)?(a._reset(t.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=t.values,n(s=>({...s}))):a._resetDefaultValues()},[a,t.values]),lt.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()}),e.current.formState=lt.useMemo(()=>Ih(i,a),[a,i]),e.current}const mo=(t,e,r)=>{if(t&&"reportValidity"in t){const i=$(r,e);t.setCustomValidity(i&&i.message||""),t.reportValidity()}},Kh=(t,e)=>{for(const r in e.fields){const i=e.fields[r];i&&i.ref&&"reportValidity"in i.ref?mo(i.ref,r,t):i.refs&&i.refs.forEach(n=>mo(n,r,t))}},Gh=(t,e)=>{e.shouldUseNativeValidation&&Kh(t,e);const r={};for(const i in t){const n=$(e.fields,i),a=Object.assign(t[i]||{},{ref:n&&n.ref});if(Wh(e.names||Object.keys(t),i)){const o=Object.assign({},$(r,i));z(o,"root",a),z(r,i,o)}else z(r,i,a)}return r},Wh=(t,e)=>t.some(r=>r.startsWith(e+"."));var yr=function(t,e,r){return r===void 0&&(r={}),function(i,n,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(vf(t,i,Object.assign({},e,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var c={};s.issues.length;){var f=s.issues[0],v=cf(f);if(v&&(c[v]||(c[v]={message:f.message,type:f.type}),o)){var d=c[v].types,p=d&&d[f.type];c[v]=to(v,o,c,f.type,p?[].concat(p,f.message):f.message)}s.issues.shift()}return{values:{},errors:Gh(c,a)}}return{values:r.raw?i:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const yo=27,_o=12,xo=10,Yh=ge("enum"),Jh=(t,e)=>{const r={min:t.minSelected??0,max:t.maxSelected??t.options.length};return yr(at({checked:Pt(ui(W(),hr()),fr(i=>Object.entries(i).filter(([n,a])=>a).map(([n,a])=>n)),De(r.max,e("validation_multiple_choice_max",{count:r.max})),ve(r.min,e("validation_multiple_choice_min",{count:r.min})))}))},Xh=Lr(({option:t,...e},r)=>l(et,{children:[l("input",{class:"peer sr-only h-full",type:"checkbox",...e,ref:r}),l("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:e.id,children:t.label})]})),ko=Xt("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:Ka}}}),Zh=({input:t,onSubmitSuccess:e})=>{var v,d;const r=t.key?(v=T.current$.value.flow)==null?void 0:v.data.submissions[t.key]:void 0,i=(t.config.minSelected===1||t.config.minSelected===void 0)&&t.config.maxSelected===1,n=i&&t.config.options.length===2,{t:a}=nt(),{register:o,handleSubmit:s,formState:{errors:c}}=mr({defaultValues:{checked:i?{}:Yh(r)?Object.fromEntries(r.value.map(p=>[p,!0])):{}},resolver:Jh(t.config,a)}),f=yi();return n?l("ul",{style:{maxHeight:6.5*yo+5*_o+2*xo},class:ko({variant:"booleanLike"}),children:t.config.options.map((p,w)=>l("li",{class:Ga,children:l(Wa,{type:"submit",ref:g=>{g&&w===0&&(f.current=g)},label:p.label,value:"true",onClick:()=>e({type:"enum",value:[p.value]})})},p.value))}):l("form",{noValidate:!0,onSubmit:p=>s(w=>{const g=w.checked;e({type:"enum",value:g})})(p),children:[l("div",{class:"flex items-center gap-1",children:[l("ul",{style:{maxHeight:6.5*yo+5*_o+2*xo},class:ko({variant:t.config.options.length===1?"singleOption":void 0}),children:t.config.options.map((p,w)=>{const g=`checked.${p.value}`,{ref:m,...S}=o(g);return l("li",{class:"relative",children:l(Xh,{option:p,autoFocus:w===0,ref:y=>{y&&w===0&&(f.current=y),m(y)},id:g,...S,onClick:i?()=>e({type:"enum",value:[p.value]}):void 0})},p.value)})}),l("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[i?null:l(ee,{}),t.config.minSelected===0&&l(re,{class:"relative",type:"button",onClick:()=>e({type:"enum",value:[]})})]})]}),l("div",{class:"px-1",children:l(we,{error:(d=c.checked)==null?void 0:d.root})})]})},Qh=ge("number"),tp=(t,e)=>{const r=t.min??Number.MIN_SAFE_INTEGER,i=t.max??Number.MAX_SAFE_INTEGER,n=t.decimalCases??0;return yr(at({number:Pt(Ve(e("validation_number")),$a(r,e("validation_number_min",{min:r})),Ca(i,e("validation_number_max",{max:i})),ka(a=>a===Number(a.toFixed(n)),e("validation_number_decimal_cases",{count:n})))}))},ep=({input:t,onSubmitSuccess:e})=>{var d;const r=t.config.defaultValue,i=t.key?(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key]:void 0,{t:n}=nt(),{register:a,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{number:r?Number(r):Qh(i)?i.value:void 0},resolver:tp(t.config,n)}),{ref:c,...f}=a("number",{required:!t.config.optional,valueAsNumber:!0}),v=wt();return bt(()=>{v.current&&(v.current.focus(),v.current.select())},[]),l("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{p.number!==void 0&&e({type:"number",value:p.number})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative min-w-0 flex-grow",children:[l("input",{...f,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(v.current=p),c(p)},type:"text",min:t.config.min,max:t.config.max,class:Le({optional:t.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:t.config.placeholder}),t.config.optional&&l(re,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(we,{error:s.number})]})},rp=t=>{if(t==="")return{countryCode:"",phoneNumber:""};const e=Object.entries(mi).find(n=>t.startsWith(n[1])),r=e?e[1]:"",i=t.replace(r,"");return/^\d+$/.test(i)?{countryCode:r,phoneNumber:i}:{countryCode:"",phoneNumber:""}},ip="44",np=/^[0-9 ]+$/,ap=ge("string"),op=ge("phone"),sp=t=>{const e=Pt(W(t("validation_country_code")),si(np,t("validation_country_code"))),r=Pt(W(t("validation_phone")),ve(1,t("validation_phone")),fr(i=>i.replace(/[^0-9]/g,"")));return yr(at({countryCode:e,phoneNumber:r}))},lp=({input:t,onSubmitSuccess:e})=>{var m;const r=t.key?(m=T.current$.value.flow)==null?void 0:m.data.submissions[t.key]:void 0,{t:i}=nt(),[n,a]=_t(),o=ap(r)?rp(r.value):op(r)?r.value:void 0,{register:s,handleSubmit:c,formState:{errors:f},watch:v}=mr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??t.config.defaultValue.countryCode??ip,phoneNumber:(o==null?void 0:o.phoneNumber)??t.config.defaultValue.phoneNumber??""},resolver:sp(i)}),{ref:d,...p}=s("phoneNumber",{required:!t.config.optional}),w=wt(),g=v("countryCode");return bt(()=>{w.current&&(w.current.focus(),w.current.select())},[]),l("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:c(S=>{const y=S.phoneNumber.replace(/[^0-9]/g,""),x=S.countryCode.replace(/[^0-9]/g,"");a(void 0);const A=t.config.minChars??7,N=y.length+x.length;if(N<A)return a(i("validation_phone_min_chars",{count:A}));const M=t.config.maxChars;if(M!=null&&N>M)return a(i("validation_max_chars",{count:M}));t.config.submissionFormat==="phone"?e({type:"phone",value:{countryCode:x,phoneNumber:y}}):e({type:"string",value:g+S.phoneNumber})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[l("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_${t.key}`,children:[l("span",{children:["+",g]}),l("select",{...s("countryCode",{}),id:`isdk_phone_${t.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(mi).map(([S,y])=>l("option",{value:y,children:[S," (+",y,")"]},S))})]}),l("input",{...p,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:S=>{S&&(w.current=S),d(S)},class:Le({optional:t.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:t.config.placeholder}),t.config.optional&&l(re,{class:"absolute bottom-0 right-1 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(we,{error:f.countryCode||f.phoneNumber||{message:n}})]})},cp=({input:t,onSubmitSuccess:e})=>l("div",{class:"flex flex-col items-center py-3",children:l("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:t.key,onClick:()=>{e(null)},children:l("span",{class:"flex items-center gap-1.5",children:[l("span",{class:"inline-flex items-center text-sm font-medium",children:t.config.label||"Submit"}),l("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:[l("path",{d:"M4 8L8 4L12 8"}),l("path",{d:"M8 4V13"})]})]})})}),dp={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},up=ge("string"),fp=(t,e)=>{const r={maxLength:e("validation_max_chars",{count:t.maxChars??999}),minLength:e("validation_min_chars",{count:t.minChars??1})};return yr(at({text:{date:Pt(W(e("validation_date")),si(/^\d{4}-\d{2}-\d{2}$/,e("validation_date"))),email:Pt(W(e("validation_email")),Sa(e("validation_email")),ve(t.minChars??1,r.minLength),De(t.maxChars??1/0,r.maxLength)),text:Pt(W(),ve(t.minChars??1,r.minLength),De(t.maxChars??1/0,r.maxLength)),url:Pt(W(e("validation_url")),Ea(e("validation_url")),ve(t.minChars??1,r.minLength),De(t.maxChars??1/0,r.maxLength))}[t.format]}))},hp={text:({input:t,onSubmitSuccess:e})=>{var d;const{t:r}=nt(),i=t.key?(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key]:void 0,n=t.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{text:n||(up(i)?i.value:"")},resolver:fp(t.config,r)}),{ref:c,...f}=a("text",{required:!t.config.optional}),v=wt();return bt(()=>{v.current&&(v.current.focus(),v.current.select())},[]),l("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{e({type:"string",value:p.text})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative min-w-0 flex-1",children:[l("input",{id:"chat-input",...f,...dp[t.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(v.current=p),c(p)},placeholder:t.config.placeholder,class:Le({optional:!!t.config.optional,className:"w-full rounded-full"})}),t.config.optional&&l(re,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(we,{error:s.text})]})},phone:lp,"multiple-choice":Zh,boolean:gh,file:xh,submit:cp,address:uh,number:ep},pp=({logger:t})=>{var a;const e=(a=T.current$.value.flow)==null?void 0:a.data.currentInput,[r,i]=Qf(),n=wt(null);return T.inputHeight$.value=i.height,kt(()=>{const o=n.current;if(o)return o.addEventListener("transitionstart",ot.scrollToEnd.smooth),o.addEventListener("transitioncancel",ot.scrollToEnd.smooth),o.addEventListener("transitionend",ot.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",ot.scrollToEnd.smooth),o.removeEventListener("transitioncancel",ot.scrollToEnd.smooth),o.removeEventListener("transitionend",ot.scrollToEnd.smooth)}},[]),l("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:l("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:e?(()=>{const o=hp[e.type];return l(o,{logger:t,onSubmitSuccess:ot.onSubmitSuccessFn$.value,input:e})})():l("div",{class:"flex items-center gap-2 p-2.5",children:[l("input",{"aria-hidden":"true",id:"chat-input",class:Le({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),l(ee,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var gp=function(t){return t instanceof RegExp},vp=function(e){var r=/[\\^$.*+?()[\]{}|]/g,i=RegExp(r.source);return e&&i.test(e)?e.replace(r,"\\$&"):e},So=function(t){return typeof t=="string"},bp=function(t){var e=[];return t.forEach(function(r){Array.isArray(r)?e=e.concat(r):e.push(r)}),e};function wp(t,e,r){var i=0,n=0;if(t==="")return t;if(!t||!So(t))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=e;gp(a)||(a=new RegExp("("+vp(a)+")","gi"));for(var o=t.split(a),s=1,c=o.length;s<c;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 mp=function(e,r,i){return Array.isArray(e)||(e=[e]),bp(e.map(function(n){return So(n)?wp(n,r,i):n}))};const Ue=Oi(mp),yp=/(\[[^\]]+\]\([^)]+\))/g,_p=/\[([^\]]+)\]\(([^)]+)\)/,xp=/(https?:\/\/[^\s]+)/g,kp=/_(.*?)_/g,Sp=/\*\*(.*?)\*\*/g,Cp=/\\n|\n/g,Co="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",$p=t=>{const e=Ue(t,yp,(o,s)=>{const[,c,f]=o.match(_p)??[];return f?l("a",{class:Co,href:f,children:c??f},f+s):l("span",{children:"INVALID LINK"})}),r=Ue(e,xp,(o,s)=>l("a",{class:Co,href:o,children:o},o+s)),i=Ue(r,kp,(o,s)=>l("em",{children:o},o+s)),n=Ue(i,Sp,(o,s)=>l("strong",{children:o},o+s));return Ue(n,Cp,(o,s)=>l("br",{},`br-${s}`))},Ep=Xt("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"}}),Ip=({children:t,className:e,animate:r,side:i,...n})=>l("p",{style:{transformOrigin:i==="left"?"0% 50%":"100% 50%"},class:Ep({className:e,side:i,animate:r}),...n,children:t}),Tp=({message:t})=>l("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:l("a",{onClick:t.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:t.href,children:[t.text,l("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l("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"})})]})}),Ap=({className:t,...e})=>(kt(()=>{ot.scrollToEnd.smooth()}),l("div",{"aria-hidden":!0,children:ot.isBotTyping$.value===!0?l("div",{"aria-label":"Typing…",class:zt("flex gap-1 p-4",t),...e,children:Array.from({length:3},(r,i)=>l("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-i*200}ms`}}))}):void 0})),Mp={bot:"left",user:"right"},Np=Xt("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]"}}}),Fp=({lastSentMessageFooter:t})=>{var r;const e=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return kt(()=>{ot.scrollToEnd.smooth()},[e.length]),l("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[e.map((i,n)=>l(et,{children:l("li",{class:"flex",children:Zt(i).with({type:"system"},a=>l("p",{class:Np({variant:a.variant}),children:a.text})).with({type:"text",author:D.union("bot","user")},a=>{const o=a.author==="user"&&!e.slice(n+1).some(f=>f.type==="text"&&f.author==="user"),s=n===e.length-1,c=a.author==="bot"?$p(a.text):a.text;return l(et,{children:[o?t:null,l(Ip,{animate:s,side:Mp[a.author],children:c},n)]})}).with({type:"link"},a=>l(Tp,{message:a})).with({type:"image"},a=>l("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=>l(mh,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const o=e[e.length-1];return!(a===o)||ot.isBotTyping$.value?null:l("div",{class:"flex flex-grow flex-col items-center justify-center",children:l(va,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},n)),l(Ap,{},"typing")]})},Op=({logger:t,apiClient:e,analytics:r,platformClient:i})=>{const{flow:n}=T.current$.value;At(n,"Flow is required to exist to show chatbot body");const a=T.viewState$.value,{chatRef:o,chatService:s}=ah(),{t:c}=nt(),[f,v]=_t();return bt(()=>{a==="maximised"&&ot.scrollToEnd.instant()},[a]),bt(()=>{var y,x;const{state:d,flow:p}=T.current$.peek();if(d!=="loaded")throw new Error(c("invalid_state"));let w=p.data.nodeHistory.at(-1);if(ot.scrollToEnd.instant(),T.setInput(void 0),p.data.isFinished)return;w===void 0?(w=ua(n.nodes).id,T.setCurrentNodeId(w),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:p.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(y=n.analytics)==null?void 0:y.customProperties})):T.removeMessagesSentByNodeIds([w]);const{interpret:g,abort:m,undo:S}=Ff({context:n.context,analytics:{service:r,customProperties:(x=n.analytics)==null?void 0:x.customProperties},apiClient:e,logger:t,platformClient:i,flow:n,chatService:s,t:c,getSubmissions:()=>{var A;return(A=T.current$.peek().flow)==null?void 0:A.data.submissions},onInterpret:A=>T.setCurrentNodeId(A.id),onFlowEnd:async()=>{var N;T.markAsFinished();const A=T.current$.peek().flow;At(A),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:A.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(N=n.analytics)==null?void 0:N.customProperties})}});return v(()=>S),g(w),m},[r,e,s,t,n,i,c]),l(et,{children:[l("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:l(Fp,{lastSentMessageFooter:n.data.isFinished||!f?null:l(Vp,{undoFn:f})})}),l(pp,{logger:t})]})},Dp=t=>t.type==="identify"?[]:"key"in t.data&&t.data.key?[t.data.key]:"keys"in t.data?Object.values(t.data.keys).filter(e=>typeof e=="string"):[],Vp=({undoFn:t})=>{const{t:e}=nt();return l(dr,{onClick:async()=>{const{flow:r}=T.current$.peek();At(r);const{removed:i}=t(r.data.nodeHistory),n=r.data.nodeHistory.splice(-i);n.length!==0&&(T.removeMessagesSentByNodeIds(n),T.setInput(void 0),n.pop(),n.map(a=>r.nodes.find(o=>o.id===a)).filter(Boolean).flatMap(Dp).forEach(a=>delete r.data.submissions[a]),T.current$.value={...T.current$.value})},children:[l("title",{children:e("undo")}),l("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"})]})},Pp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Op},Symbol.toStringTag,{value:"Module"}))})();
5
+ }`},Vn=({context:t,schema:e,logger:r})=>{if(e)for(const a in e){const i=e[a];if(!i)continue;const n=xe(t,a,null);if(i.required&&n===null){const o=`Configuration error in context: ${a} is required`;throw r.error(o),new Error(o)}switch(i.type){case"number":if(typeof n!="number")throw new Error(`Configuration error in context: ${a} is not a number`);break;case"string":if(typeof n!="string")throw new Error(`Configuration error in context: ${a} is not a string`);break;default:i.type}}},Af=({_internal_domManager:t=af(),theme:e,terms:r,feedback:a})=>Po(({apiClient:i,rpcClient:n,logger:o,analytics:s,publishableKey:c,env:f})=>{let v=!1;const d=xu({locale:void 0,overrides:r??{}}),p=c&&f?zo({environment:f,publishableKey:c,logger:o}):void 0,w=()=>{var S;if(typeof window>"u")return;const g=[vt("style",{id:"inploi-chatbot-styles"},rf),vt("style",{id:"inploi-chatbot-theme"},Tf(e))],m=t.getOrCreateChatbotElement();if(ce(vt(et,{},[g,vt(tf,{apiClient:i,logger:o,analytics:s,platformClient:p,params:{theme:e,terms:r,feedback:a}})]),m),a){const y=m.querySelector("dialog");if(!y)throw new Error("Couldn't find feedback host");if(a.plugin instanceof Promise)a.plugin.then(({feedbackPlugin:x})=>{var N;const A=x()({rpcClient:n,apiClient:i,logger:o,analytics:s});Dn({instance:A,theme:e,terms:((N=a.params)==null?void 0:N.terms)??{},host:y})});else{const x=a.plugin({rpcClient:n,apiClient:i,logger:o,analytics:s});Dn({instance:x,theme:e,terms:((S=a.params)==null?void 0:S.terms)??{},host:y})}}v=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(v)return;w(),o.info("Chatbot plugin prepared")}catch(g){o.error("Error preparing chatbot plugin",g)}},fetchFlowByJobId:async(g,m)=>n.request(mf,{params:{id:g},searchParams:{id_type:(m==null?void 0:m.idType)==="inploi"?"internal":"external"}}).then(S=>({flow:S.flow,title:S.job.title,flowKeys:[S.job.id,...(m==null?void 0:m.flowKeys)??[]],job:{id:S.job.id,id_type:"external"},...m,context:{user:S.user,...m==null?void 0:m.context}})),fetchFlowById:async(g,m)=>n.request(yf,{params:{id:g}}).then(S=>{var y;return{flow:S.flow,title:"Chatbot",flowKeys:(m==null?void 0:m.flowKeys)??[],...m,analytics:{customProperties:{flow_id:S.flow.id,flow_version:S.flow.version,...(y=m==null?void 0:m.analytics)==null?void 0:y.customProperties}}}}),open:async g=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",v||w(),g instanceof Promise?(T.current$.value={state:"loading"},g.then(async m=>{Vn({context:m.context||{},schema:m.flow.context_schema,logger:o}),T.startFlow(m)}).catch(m=>{const S=m instanceof Error?m.message:d("unknown_error");T.current$.value={state:"error",error:S}})):(Vn({context:g.context||{},schema:g.flow.context_schema,logger:o}),T.startFlow(g))}catch(m){o.error("Error starting flow",m)}},close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),o.info("Closed flow from an external source"))}}});function Dn({instance:t,terms:e,theme:r,host:a}){t.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:e,host:a})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Af;const Pn=({condition:t,context:e,submissions:r,ifBlock:a})=>{const[i,...n]=t.compareKey.split(".");if(!i)return!1;const o=jn({context:e,key:i,path:n,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=xe(o.value,n.join("."));switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const s=xe(o.value,n.join(".")),c={...a,data:{compareKey:"_temp",compare:t.compare,compareValue:t.compareValue}};switch(typeof s){case"boolean":return Pe(c,{submissions:{_temp:{value:s,type:"boolean"}},context:e});case"string":return Pe(c,{submissions:{_temp:{value:s,type:"string"}},context:e});case"number":return Pe(c,{submissions:{_temp:{value:s,type:"number"}},context:e});case"object":return Array.isArray(s)&&s.every(fn)?Pe(c,{submissions:{_temp:{value:s,type:"enum"}},context:e}):!1}break}case"boolean":{const s=t.compareValue==="true";switch(t.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{const s=o.type==="phone"?gr(o.value):o.value;switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"number":{try{const s=Number(t.compareValue);switch(t.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 ${a.id}`,o.value),!1}break}case"enum":switch(t.compare){case"equals":return o.value.length===1&&o.value[0]===t.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==t.compareValue;case"contains":return o.value.includes(t.compareValue);case"notContains":return!o.value.includes(t.compareValue)}break}},Pe=(t,{context:e,submissions:r})=>{const a="combinator"in t.data?t.data.conditions:[t.data];if(("combinator"in t.data?t.data.combinator:"and")==="or"){for(const n of a)if(Pn({condition:n,context:e,submissions:r,ifBlock:t}))return!0;return!1}else{for(const n of a)if(!Pn({condition:n,context:e,submissions:r,ifBlock:t}))return!1;return!0}},Mf=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Mt=(t,{context:e,submissions:r})=>t.replace(Mf,(a,i,n="")=>{const[o,...s]=i.trim().split("."),c=jn({key:o,path:s,submissions:r,context:e});if(!c)return n;switch(c.type){case"boolean":return c.value===!0?"true":"false";case"file":return c.value.map(f=>`${f.name} (${Me(f.sizeKb)})`).join(", ");case"enum":return c.value.join(", ");case"address":return Object.values(c.value).filter(f=>f&&f.trim().length>0).join(", ");case"number":case"string":return c.value?c.value.toString():n;case"phone":return gr(c.value);case"integration":{if(typeof c.value!="object"||Array.isArray(c.value))break;const f=xe(c.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(fn))return f.join(", ")}break}}return n}),Ln=({node:t,nodes:e,stopWhen:r})=>{if((r==null?void 0:r(t))===!0)return t;const a=t.nextId?e.find(i=>i.id===t.nextId):void 0;if(a)return Ln({node:a,nodes:e,stopWhen:r})},Nf=({childNode:t,nodes:e})=>{const a=e.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const n=e.find(s=>s.id===i.branchId);if(!n)return!1;const o=Ln({node:n,nodes:e,stopWhen:s=>s.id===t.id});return!(!o||o.id!==t.id)});if(a!=null&&a.nextId)return e.find(i=>i.id===a.nextId)},Ff=({flow:t,analytics:e,logger:r,platformClient:a,context:i,apiClient:n,getSubmissions:o,chatService:s,onFlowEnd:c,onInterpret:f,t:v})=>{let d=new AbortController;const p={...e.service,log:g=>e.service.log({...g,customProperties:{...g.customProperties,...e.customProperties}})},w=async(g,m)=>{const S=o();f==null||f(g,m);try{await Of({flow:t,analytics:p,logger:r,platformClient:a,apiClient:n,context:i,node:g,submissions:S,t:v,chat:{sendMessage:async y=>s.send({groupId:g.id,message:y,signal:d.signal}),userInput:async y=>s.input({input:y,signal:d.signal}),addToSubmissions:s.addToSubmissions},next:y=>{const x=y?t.nodes.find(A=>A.id===y):Nf({childNode:g,nodes:t.nodes});return x?w(x,g):c==null?void 0:c(g)},end:()=>c==null?void 0:c(g)})}catch(y){if(y instanceof Ne)return;throw y}};return{interpret:async g=>{const m=t.nodes.find(S=>S.id===g)??un(t.nodes);return w(m)},undo:g=>{let m=1;const S=t.nodes.find(x=>x.id===g[g.length-1]);for(let x=g.length-2;x>0;x--){const A=g[x],N=t.nodes.find(M=>M.id===A);if(!N||(m++,N.type.startsWith("question-")))break}d.abort(),d=new AbortController;const y=t.nodes.find(x=>x.id===g[g.length-m]);return At(y,"Undo failed: new start node not found"),w(y,S),{removed:m}},abort:()=>{d.abort()}}},gr=t=>`+${t.countryCode} ${t.phoneNumber}`;async function Of(t){const e=t.node;switch(e.type){case"text":return Uf({...t,node:e});case"image":return Hf({...t,node:e});case"question-text":return qf({...t,node:e});case"question-enum":return Wf({...t,node:e});case"question-number":return Kf({...t,node:e});case"question-phone":return Gf({...t,node:e});case"question-boolean":return Yf({...t,node:e});case"question-file":return Xf({...t,node:e});case"question-address":return Jf({...t,node:e});case"end-flow":return Zf({...t,node:e});case"if-block":return Bf({...t,node:e});case"jump":return Lf({...t,node:e});case"link":return Rf({...t,node:e});case"integration-application-submit":return zf({...t,node:e});case"add-submission":return jf({...t,node:e});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return Df({...t,node:e});case"check-duplicate":return Pf({...t,node:e});case"feedback":return Vf({...t,node:e});default:throw new Error(`Unknown node: ${JSON.stringify(e)}`)}}const be=(t,e)=>{var a;const r=(a=t[e])==null?void 0:a.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r};async function Vf({next:t,node:e}){t(e.nextId)}async function Df({next:t,node:e,analytics:r,submissions:a,logger:i}){if(!a)return t(e.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:be(a,e.data.key).toString(),first_name:e.data.firstName?be(a,e.data.firstName).toString():void 0,last_name:e.data.lastName?be(a,e.data.lastName).toString():void 0,email:e.data.email?be(a,e.data.email).toString():void 0,phone_number:e.data.phoneNumber?be(a,e.data.phoneNumber).toString():void 0,custom_traits:e.data.customTraits?Object.fromEntries(e.data.customTraits.map(({key:n,value:o})=>{var s;return[n,(s=a[o])==null?void 0:s.value]})):void 0}})}catch(n){i.error(n)}finally{t(e.nextId)}}async function Pf({next:t,node:e,platformClient:r,submissions:a,flow:i,logger:n,chat:o}){var c;let s={isDuplicate:!1};if(a&&r){const f=e.data.scope==="job"?(c=i.job)==null?void 0:c.id:void 0;if(e.data.scope==="company"||f!=null)try{s=await r.checkDuplicate({email:be(a,e.data.email).toString(),jobId:f,scope:e.data.scope})}catch(v){n.error("[check-duplicate]",v)}}o.addToSubmissions(e.data.key,{type:"integration",value:s}),t(e.nextId)}async function Lf({next:t,node:e}){t(e.data.targetId)}async function jf({next:t,node:e,logger:r,submissions:a,context:i}){if(!a){r.error("Submissions not found");return}a[e.data.key]={type:"string",value:Mt(e.data.value,{submissions:a,context:i})},t(e.nextId)}async function zf({chat:t,next:e,node:r,logger:a,apiClient:i,submissions:n,analytics:o,flow:s,t:c}){const f=async v=>{v!==!0&&await t.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await t.sendMessage({type:"loading"});const{anonymous_id:d,session_id:p}=o.getSessionInfo(),w=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:d,session_id:p,job:s.job,submissions:zu(n||{})})}).catch(g=>g);r.data.key&&t.addToSubmissions(r.data.key,{type:"integration",value:w}),Zt(w).with({integration_response:V.select(V.union({service:V.optional(V.string),status:V.number,data:V.any},{service:V.optional(V.string),status:V.number,error:{message:V.string,data:V.any}}))},g=>{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:g.service??"INVALID_SERVICE",response:{status:g.status,payload:"data"in g?g.data:g.error.data??null},job:s.job}})}).otherwise(()=>{}),await Zt(w).with({integration_response:{data:V.select("redirect",{redirect_url:V.string,message:V.optional(V.union(V.string,V.nullish)),button_text:V.optional(V.union(V.string,V.nullish))})}},async g=>{await t.sendMessage({type:"text",author:"bot",text:g.redirect.message??c("submission_redirect_message")});try{const m=new URL(g.redirect.redirect_url);d&&!m.searchParams.has("anonymous_id")&&m.searchParams.set("anonymous_id",d),await t.sendMessage({type:"link",href:m.toString(),text:g.redirect.button_text??c("complete_submission"),onClick:()=>{if(!p){a.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:p,flow_version:s.version,href:m.toString(),job:s.job}})}})}catch(m){a.error(`Invalid redirect URL: ${g.redirect.redirect_url}`,m),t.sendMessage({type:"system",variant:"error",text:c("redirect_url_error")})}e(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await t.sendMessage({type:"system",variant:"success",text:c("submission_completed")}),e(r.nextId)}).with({integration_response:{error:V.select("error",{message:V.string})}},async g=>{a.error(g.error),await t.sendMessage({type:"system",variant:"error",text:g.error.message||c("submission_failed")}),await f(!1)}).otherwise(async g=>{a.error(g),await t.sendMessage({type:"system",variant:"error",text:c("submission_failed")}),await f(!1)})};await f(r.data.skipConfirmation)}async function Rf({chat:t,next:e,node:r,submissions:a,context:i}){await t.sendMessage({type:"link",href:Mt(r.data.href,{submissions:a,context:i}),text:Mt(r.data.cta,{submissions:a,context:i})}),e(r.nextId)}async function Bf({submissions:t,next:e,node:r,context:a}){e(Pe(r,{submissions:t,context:a})?r.branchId:r.nextId)}async function Uf({chat:t,next:e,node:r,submissions:a,context:i}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.text,{submissions:a,context:i})}),e(r.nextId)}async function Hf({chat:t,next:e,node:r}){await t.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),e(r.nextId)}async function qf({chat:t,next:e,node:r,submissions:a,context:i,t:n}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:a,context:i})});const o=r.data.format==="phone"?await t.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 t.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 t.sendMessage({type:"system",variant:"info",text:n("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.type==="phone"?gr(o.value):o.value}),e(r.nextId)}async function Kf({chat:t,next:e,node:r,submissions:a,context:i,t:n}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:a,context:i})});const o=await t.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 t.sendMessage({type:"system",variant:"info",text:n("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value.toString()}),e(r.nextId)}async function Gf({chat:t,next:e,node:r,submissions:a,context:i}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:a,context:i})});const n=await t.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}});n===null?await t.sendMessage({type:"system",variant:"info",text:"Skipped"}):await t.sendMessage({author:"user",type:"text",text:n.type==="phone"?gr(n.value):n.value}),e(r.nextId)}async function Wf({chat:t,next:e,node:r,submissions:a,context:i,t:n}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:a,context:i})});const o=await t.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await t.sendMessage({type:"system",variant:"info",text:n("skipped")}):await t.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),e(r.nextId)}async function Yf({chat:t,next:e,node:r,submissions:a,context:i,t:n}){await t.sendMessage({author:"bot",type:"text",text:Mt(r.data.question,{submissions:a,context:i})});const o=await t.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await t.sendMessage({type:"system",variant:"info",text:n("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),e(r.nextId)}async function Jf({chat:t,next:e,node:r,t:a}){await t.sendMessage({author:"bot",type:"text",text:r.data.question});const i=await t.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(i===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else{const n=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await t.sendMessage({author:"user",type:"text",text:n})}return e(r.nextId)}async function Xf({node:t,chat:e,next:r,submissions:a,context:i,t:n}){await e.sendMessage({author:"bot",type:"text",text:Mt(t.data.question,{submissions:a,context:i})});const o=await e.userInput({key:t.data.key,type:"file",config:{optional:t.data.optional,extensions:t.data.extensions,fileSizeLimitKib:t.data.maxSizeKb??10*1024,allowMultiple:t.data.multiple===!0}});if(o===null)await e.sendMessage({type:"system",variant:"info",text:n("skipped")});else for(const s of o.value)await e.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(t.nextId)}async function Zf({chat:t,end:e,node:r}){await t.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),e()}const jn=({key:t,path:e,submissions:r,context:a})=>{if(t==="$context"){if(!e)return;const i=xe(a,e.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.${e.join(".")}`,i);return}}return r==null?void 0:r[t]};function zn(t,e){let r;return(...a)=>{window.clearTimeout(r),r=window.setTimeout(()=>t(...a),e)}}function Qf({debounce:t,scroll:e,polyfill:r,offsetSize:a}={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[n,o]=_t({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=wt({element:null,scrollContainers:null,resizeObserver:null,lastBounds:n,orientationHandler:null}),c=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,v=wt(!1);kt(()=>(v.current=!0,()=>void(v.current=!1)));const[d,p,w]=Vt(()=>{const y=()=>{if(!s.current.element)return;const{left:x,top:A,width:N,height:M,bottom:K,right:gt,x:at,y:U}=s.current.element.getBoundingClientRect(),q={left:x,top:A,width:N,height:M,bottom:K,right:gt,x:at,y:U};s.current.element instanceof HTMLElement&&a&&(q.height=s.current.element.offsetHeight,q.width=s.current.element.offsetWidth),Object.freeze(q),v.current&&!ah(s.current.lastBounds,q)&&o(s.current.lastBounds=q)};return[y,f?zn(y,f):y,c?zn(y,c):y]},[o,a,c,f]);function g(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",w,!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 m(){s.current.element&&(s.current.resizeObserver=new i(w),s.current.resizeObserver.observe(s.current.element),e&&s.current.scrollContainers&&s.current.scrollContainers.forEach(y=>y.addEventListener("scroll",w,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{w()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const S=y=>{!y||y===s.current.element||(g(),s.current.element=y,s.current.scrollContainers=Rn(y),m())};return eh(w,!!e),th(p),kt(()=>{g(),m()},[e,w,p]),kt(()=>g,[]),[S,n,d]}function th(t){kt(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function eh(t,e){kt(()=>{if(e){const r=t;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[t,e])}function Rn(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:a,overflowY:i}=window.getComputedStyle(t);return[r,a,i].some(n=>n==="auto"||n==="scroll")&&e.push(t),[...e,...Rn(t.parentElement)]}const rh=["x","y","top","bottom","left","right","width","height"],ah=(t,e)=>rh.every(r=>t[r]===e[r]),ee=({class:t,...e})=>{const{t:r}=it();return l("button",{class:zt("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",t),type:"submit",...e,children:l("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[l("title",{children:r("send")}),l("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),l("path",{d:"M8 4V13"})]})})},ih=25,wa=Kt({instant:()=>{},smooth:()=>{}}),ot={onSubmitSuccessFn$:Kt(()=>{}),isBotTyping$:Kt(!1),scrollToEnd:{instant:()=>wa.value.instant(),smooth:()=>wa.value.smooth()}},nh=()=>{const t=wt(null);bt(()=>{wa.value={instant:()=>{var r;return(r=t.current)==null?void 0:r.scrollTo({top:t.current.scrollHeight,behavior:"instant"})},smooth:()=>{t.current&&t.current.scrollHeight-t.current.scrollTop<=t.current.clientHeight*2&&t.current.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})}}},[t]);const e=Vt(()=>({addToSubmissions:(a,i)=>T.setSubmission(a,i),send:async({message:a,signal:i,groupId:n})=>{if(await Zt(a).with({author:"bot",type:"text"},async o=>{if(i!=null&&i.aborted)throw new Ne;ot.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*ih;await new Promise(c=>setTimeout(c,s,{signal:i})),ot.isBotTyping$.value=!1}).otherwise(async()=>{}),i!=null&&i.aborted)throw new Ne;T.addMessage(a,n)},input:({input:a,signal:i})=>{if(i!=null&&i.aborted)throw new Ne;return T.setInput(a),new Promise(n=>{const o=s=>{if(i!=null&&i.aborted)throw new Ne;T.setInput(void 0),a.key&&T.setSubmission(a.key,s),n(s)};ot.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:t,chatService:e}},we=({error:t})=>!t||!t.message?null:l("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[l("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),l("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),l("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),l("p",{class:"truncate pr-1 text-sm",children:t.message})]}),re=({class:t,...e})=>{const{t:r}=it();return l("button",{type:"button",class:zt("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",t),...e,children:[l("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:[l("title",{children:r("skip")}),l("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),l("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},ma={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"},Le=Xt("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}}),oh="https://api.mapbox.com/search/searchbox/v1/suggest",sh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",lh=t=>atob(t).split("").reverse().join(""),Lt=nt({name:W()}),ch=nt({suggestions:ca(nt({full_address:St(W()),place_formatted:St(W()),name:St(W()),mapbox_id:W(),context:pf(nt({address:Lt,street:Lt,neighborhood:Lt,locality:Lt,district:Lt,place:Lt,region:Lt,postcode:Lt,country:Lt}))}))}),dh=({logger:t,t:e})=>Vt(()=>{var a;const r=(a=T.current$.peek().flow)==null?void 0:a.data.flowSessionId;return r?{enabled:!0,getPredictions:async i=>{var d;const n=new URL(oh);n.searchParams.set("q",i),n.searchParams.set("session_token",r);const o=(d=T.current$.peek().flow)==null?void 0:d.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&n.searchParams.set("proximity",`${o.lng},${o.lat}`),n.searchParams.set("access_token",lh(sh));const c=await fetch(n);if(!c.ok)return t.error("Failed to get address details",c),{ok:!1,error:e("address_error")};const f=gf(ch,await c.json());if(f.success===!1)return t.error("Failed to parse address details",f.issues),{ok:!1,error:e("address_error")};const{suggestions:v}=f.output;return{ok:!0,data:v.map(p=>{var w,g,m,S,y,x,A,N,M;return{label:p.full_address??p.place_formatted??p.name??p.mapbox_id,id:p.mapbox_id,address:{line1:((w=p.context.address)==null?void 0:w.name)??((g=p.context.street)==null?void 0:g.name),line2:void 0,line3:((m=p.context.neighborhood)==null?void 0:m.name)??((S=p.context.locality)==null?void 0:S.name),city:((y=p.context.place)==null?void 0:y.name)??((x=p.context.district)==null?void 0:x.name),state:(A=p.context.region)==null?void 0:A.name,postcode:(N=p.context.postcode)==null?void 0:N.name,country:(M=p.context.country)==null?void 0:M.name}}})}}}:{enabled:!1}},[t,e]),Bn=t=>{const{t:e}=it();return l("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",...t,children:[l("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:l("path",{d:"M10 3L5 8L10 13"})}),l("span",{children:e("back")})]})},uh=({input:t,onSubmitSuccess:e,logger:r})=>{const{t:a}=it(),[i,n]=_t(),[o,s]=_t([]),{enabled:c,getPredictions:f}=dh({logger:r,t:a}),[v,d]=_t(c?"query":"manual"),[p,w]=_t(""),[g,m]=_t(),S=y=>{At(c,"Query state should not be enabled"),y=y.trim(),y!==(p==null?void 0:p.trim())&&(w(y),y===""&&s([]),m(void 0),f(y).then(x=>{if(x.ok===!1){s([]),m(x.error);return}s(x.data)}))};switch(v){case"query":return At(c,"Query state should not be enabled"),l(fh,{input:t,onSkip:()=>e(null),onAddressSelect:y=>{if(y===""){n(void 0),d("manual");return}const x=o.find(A=>A.id===y);x&&(n(x.address),d("details"))},onAddressSearch:y=>{S(y)},suggestions:o,query:p,error:g});case"details":return At(i!==void 0),l(Hn,{input:t,logger:r,onSubmitSuccess:e,addressFields:i,actions:l(Bn,{onClick:()=>{d("query")}})});case"manual":return l(Hn,{logger:r,input:t,onSubmitSuccess:e,addressFields:{},actions:c?l(Bn,{onClick:()=>{d("query")}}):void 0})}},fh=({input:t,onSkip:e,suggestions:r,onAddressSelect:a,query:i,onAddressSearch:n,error:o})=>{const{t:s}=it(),c=wt(null);return bt(()=>{c.current&&(c.current.focus(),c.current.select())},[]),l(et,{children:[l("form",{noValidate:!0,onSubmit:f=>{f.preventDefault();const d=new FormData(f.currentTarget).get("address");typeof d=="string"&&n(d)},class:"flex gap-2 p-2.5",children:[l("div",{class:"group relative flex-1",children:[l("input",{ref:c,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:t.config.placeholder||s("address_search"),defaultValue:i,class:Le({optional:!!t.config.optional,className:"w-full rounded-full"})}),l("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:l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[l("circle",{cx:"7",cy:"7",r:"4"}),l("path",{d:"M10 10L13 13"})]}),l("span",{class:"sr-only",children:s("search")})]})})]}),t.config.optional&&l(re,{class:"relative",onClick:e})]}),o?l(we,{error:{message:o}}):null,l("ul",{children:[r.map(f=>l("li",{children:l("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:()=>{a(f.id)},children:[l("span",{class:"flex-grow",children:f.label}),l("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:l("path",{d:"M6 3L11 8L6 13"})})]})},f.id)),l("li",{children:l("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:()=>{a("")},children:l("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},Un=["line1","line2","line3","city","state","postcode","country"],Hn=({addressFields:t,onSubmitSuccess:e,actions:r,input:a})=>{const i=wt(null);bt(()=>{if(i.current){const s=i.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const n=Object.keys(ma),{t:o}=it();return l("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const c=new FormData(s.currentTarget),f=Object.fromEntries(c.entries());e({type:"address",value:f})},children:[l("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:Un.map((s,c)=>{const f=`isdk_${s}`,v=a.config.keys[s];return v?l(et,{children:[l("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)}),l("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?l("div",{class:"relative",children:[l("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:v,id:f,defaultValue:t[s],required:!0,children:[t.country&&!n.includes(t.country)?l("option",{value:t[s],children:t[s]}):l("option",{value:"",children:o("select_country")}),n.map(d=>l("option",{value:d,children:d},d))]}),l("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:l("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):l("input",{autoFocus:c===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:v,id:f,defaultValue:t[s],required:!0}),c===Un.length-1?l("hr",{class:"m-0 w-full border-b border-b-transparent"}):l("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),l("div",{class:"flex w-full flex-1 ",children:[l("div",{class:"flex-grow",children:r}),l(ee,{class:"flex items-center justify-center"})]})]})},ya=()=>{const t=wt(null);return kt(()=>{var e;(e=t.current)==null||e.focus()},[]),t},qn=["true","false"],hh=An(qn),ph="answer",Kn="flex items-center flex-wrap gap-2 p-2.5",Gn="min-w-0 max-w-full flex-auto",Wn=Lr(({label:t,...e},r)=>l("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",...e,ref:r,children:l("p",{class:"text-center text-base",children:t})})),gh=({input:t,onSubmitSuccess:e})=>{const r=ya();return l("form",{noValidate:!0,class:"",onSubmit:a=>{a.preventDefault();const i=qu(a).value,n=hf(hh,i);e({type:"boolean",value:n==="true"})},children:[l("ul",{class:Kn,children:qn.map((a,i)=>l("li",{class:Gn,children:l(Wn,{ref:i===0?r:null,type:"submit",name:ph,value:a,label:t.config.labels[a]},a)}))}),t.config.optional&&l("div",{class:"px-2 pb-2",children:l(re,{class:"relative w-full",type:"button",onClick:()=>e(null)})})]})},vh=t=>new Promise((e,r)=>{const a=new FileReader;a.readAsDataURL(t),a.onload=()=>a.result?e(a.result.toString()):r("No result from reader"),a.onerror=r}),bh=t=>t.reduce((e,r)=>e+r.sizeKb,0),wh=ge("file"),Yn=3,mh=({file:t,class:e,...r})=>{const a=t.name.split(".").pop(),i=t.name.replace(new RegExp(`.${a}$`),"");return l("div",{class:zt("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",e),...r,children:[l("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[l("span",{class:"block truncate",children:i}),l("span",{children:[".",a]})]}),l("p",{"aria-label":"File size",class:"text-accent-11",children:Me(t.sizeKb)})]})},Jn=({class:t,...e})=>l("li",{class:zt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",t),...e}),Xn=t=>{const e=t.split(".").pop();if(!e)throw new Error("No file extension found");return e?"."+e:""},yh=({allowedExtensions:t,files:e})=>{const r=t.map(a=>a.toLowerCase());return e.every(a=>r.includes(Xn(a.name).toLowerCase()))},_h=(t,e)=>{const r=Xn(t);return`${t.replace(new RegExp(`${r}$`),"").slice(0,e)}${r}`},xh=({input:t,onSubmitSuccess:e})=>{var d;const r=(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key],[a,i]=_t(wh(r)?r.value:[]),[n,o]=_t(),s=a.length-Yn,c=bh(a),f=ya(),{t:v}=it();return l("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:p=>(p.preventDefault(),o(void 0),a.length===0?o({type:"required",message:v("validation_file")}):t.config.extensions.length>0&&!yh({allowedExtensions:t.config.extensions,files:a})?o({type:"validate",message:`${v("validation_file_ext",{ext:t.config.extensions.join(", ")})}`}):t.config.fileSizeLimitKib&&c>t.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Me(t.config.fileSizeLimitKib)}`}):t.config.allowMultiple===!1&&a.length>1?o({type:"invalid",message:v("validation_file_max",{count:1})}):e({type:"file",value:a})),children:[l("div",{class:"flex items-center gap-2",children:[l("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:[a.length>0?l(et,{children:[l("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[a.slice(0,Yn).map(p=>{const w=p.name.split(".").pop(),g=p.name.replace(new RegExp(`.${w}$`),"");return l(Jn,{class:"flex overflow-hidden",children:[l("span",{class:"block truncate",children:g}),l("span",{children:[".",w]})]})}),s>0?l(Jn,{children:["+",s," file",s!==1?"s":""]}):null]}),l("p",{class:"text-neutral-11 text-xs",children:[Me(c)," ",a.length>1?"total":""]})]}):l("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[l("header",{class:"flex flex-col items-center gap-0",children:[l("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:l("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"})}),l("p",{class:"text-neutral-12 tracking-[-0.01em]",children:v("upload_file",{count:t.config.allowMultiple?2:1})}),t.config.fileSizeLimitKib?l("p",{class:"text-neutral-10 text-xs",children:["(",v("file_max_size",{size:Me(t.config.fileSizeLimitKib)}),")"]}):null]}),l("aside",{class:"flex flex-col items-center gap-2",children:[l("p",{id:"accepted-filetypes",class:"sr-only",children:v("file_extensions")}),l("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:t.config.extensions.map(p=>l("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:p.replace(".","")}))})]})]}),l("input",{id:"dropzone-file",onInput:async p=>{At(p.target instanceof HTMLInputElement);const w=p.target.files?Array.from(p.target.files):[],g=await Promise.allSettled(w.map(async S=>{const y=await vh(S);return{name:_h(S.name,42),data:y,sizeKb:S.size/1e3}}));if(g.some(({status:S})=>S==="rejected"))return o({type:"invalid",message:"Invalid file"});const m=g.map(S=>S.status==="fulfilled"?S.value:null).filter(Boolean);i(m)},multiple:t.config.allowMultiple,type:"file",class:"sr-only"})]}),l("div",{class:"flex h-full flex-col items-center gap-2",children:[l(ee,{disabled:a.length===0}),t.config.optional&&l(re,{class:"relative",onClick:()=>e(null)})]})]}),l(we,{error:n})]})};var je=t=>t.type==="checkbox",ae=t=>t instanceof Date,pt=t=>t==null;const Zn=t=>typeof t=="object";var Y=t=>!pt(t)&&!Array.isArray(t)&&Zn(t)&&!ae(t),kh=t=>Y(t)&&t.target?je(t.target)?t.target.checked:t.target.value:t,Sh=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,Ch=(t,e)=>t.has(Sh(e)),$h=t=>{const e=t.constructor&&t.constructor.prototype;return Y(e)&&e.hasOwnProperty("isPrototypeOf")},_a=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Q(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(_a&&(t instanceof Blob||e))return t;const r=Array.isArray(t);if(!r&&!(Y(t)&&$h(t)))return t;const a=r?[]:Object.create(Object.getPrototypeOf(t));for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a[i]=Q(t[i]));return a}var vr=t=>/^\w*$/.test(t),H=t=>t===void 0,xa=t=>Array.isArray(t)?t.filter(Boolean):[],ka=t=>xa(t.replace(/["|']|\]/g,"").split(/\.|\[/)),$=(t,e,r)=>{if(!e||!Y(t))return r;const a=(vr(e)?[e]:ka(e)).reduce((i,n)=>pt(i)?i:i[n],t);return H(a)||a===t?H(t[e])?r:t[e]:a},Nt=t=>typeof t=="boolean",Ct=t=>typeof t=="function",z=(t,e,r)=>{let a=-1;const i=vr(e)?[e]:ka(e),n=i.length,o=n-1;for(;++a<n;){const s=i[a];let c=r;if(a!==o){const f=t[s];c=Y(f)||Array.isArray(f)?f:isNaN(+i[a+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;t[s]=c,t=t[s]}};const Qn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$t={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},jt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Eh=lt.createContext(null);Eh.displayName="HookFormControlContext";var Ih=(t,e,r,a=!0)=>{const i={defaultValues:e._defaultValues};for(const n in t)Object.defineProperty(i,n,{get:()=>{const o=n;return e._proxyFormState[o]!==$t.all&&(e._proxyFormState[o]=!a||$t.all),r&&(r[o]=!0),t[o]}});return i};const Th=typeof window<"u"?lt.useLayoutEffect:lt.useEffect;var mt=t=>typeof t=="string",Ah=(t,e,r,a,i)=>mt(t)?(a&&e.watch.add(t),$(r,t,i)):Array.isArray(t)?t.map(n=>(a&&e.watch.add(n),$(r,n))):(a&&(e.watchAll=!0),r),Sa=t=>pt(t)||!Zn(t);function Wt(t,e,r=new WeakSet){if(Sa(t)||Sa(e))return Object.is(t,e);if(ae(t)&&ae(e))return Object.is(t.getTime(),e.getTime());const a=Object.keys(t),i=Object.keys(e);if(a.length!==i.length)return!1;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);for(const n of a){const o=t[n];if(!i.includes(n))return!1;if(n!=="ref"){const s=e[n];if(ae(o)&&ae(s)||Y(o)&&Y(s)||Array.isArray(o)&&Array.isArray(s)?!Wt(o,s,r):!Object.is(o,s))return!1}}return!0}const Mh=lt.createContext(null);Mh.displayName="HookFormContext";var to=(t,e,r,a,i)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[a]:i||!0}}:{},ze=t=>Array.isArray(t)?t:[t],eo=()=>{let t=[];return{get observers(){return t},next:i=>{for(const n of t)n.next&&n.next(i)},subscribe:i=>(t.push(i),{unsubscribe:()=>{t=t.filter(n=>n!==i)}}),unsubscribe:()=>{t=[]}}};function ro(t,e){const r={};for(const a in t)if(t.hasOwnProperty(a)){const i=t[a],n=e[a];if(i&&Y(i)&&n){const o=ro(i,n);Y(o)&&(r[a]=o)}else t[a]&&(r[a]=n)}return r}var ut=t=>Y(t)&&!Object.keys(t).length,Ca=t=>t.type==="file",br=t=>{if(!_a)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},ao=t=>t.type==="select-multiple",$a=t=>t.type==="radio",Nh=t=>$a(t)||je(t),Ea=t=>br(t)&&t.isConnected;function Fh(t,e){const r=e.slice(0,-1).length;let a=0;for(;a<r;)t=H(t)?a++:t[e[a++]];return t}function Oh(t){for(const e in t)if(t.hasOwnProperty(e)&&!H(t[e]))return!1;return!0}function J(t,e){const r=Array.isArray(e)?e:vr(e)?[e]:ka(e),a=r.length===1?t:Fh(t,r),i=r.length-1,n=r[i];return a&&delete a[n],i!==0&&(Y(a)&&ut(a)||Array.isArray(a)&&Oh(a))&&J(t,r.slice(0,-1)),t}var Vh=t=>{for(const e in t)if(Ct(t[e]))return!0;return!1};function io(t){return Array.isArray(t)||Y(t)&&!Vh(t)}function Ia(t,e={}){for(const r in t){const a=t[r];io(a)?(e[r]=Array.isArray(a)?[]:{},Ia(a,e[r])):H(a)||(e[r]=!0)}return e}function me(t,e,r){r||(r=Ia(e));for(const a in t){const i=t[a];if(io(i))H(e)||Sa(r[a])?r[a]=Ia(i,Array.isArray(i)?[]:{}):me(i,pt(e)?{}:e[a],r[a]);else{const n=e[a];r[a]=!Wt(i,n)}}return r}const no={value:!1,isValid:!1},oo={value:!0,isValid:!0};var so=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!H(t[0].attributes.value)?H(t[0].value)||t[0].value===""?oo:{value:t[0].value,isValid:!0}:oo:no}return no},lo=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:a})=>H(t)?t:e?t===""?NaN:t&&+t:r&&mt(t)?new Date(t):a?a(t):t;const co={isValid:!1,value:null};var uo=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,co):co;function fo(t){const e=t.ref;return Ca(e)?e.files:$a(e)?uo(t.refs).value:ao(e)?[...e.selectedOptions].map(({value:r})=>r):je(e)?so(t.refs).value:lo(H(e.value)?t.ref.value:e.value,t)}var Dh=(t,e,r,a)=>{const i={};for(const n of t){const o=$(e,n);o&&z(i,n,o._f)}return{criteriaMode:r,names:[...t],fields:i,shouldUseNativeValidation:a}},wr=t=>t instanceof RegExp,Re=t=>H(t)?t:wr(t)?t.source:Y(t)?wr(t.value)?t.value.source:t.value:t,ho=t=>({isOnSubmit:!t||t===$t.onSubmit,isOnBlur:t===$t.onBlur,isOnChange:t===$t.onChange,isOnAll:t===$t.all,isOnTouch:t===$t.onTouched});const po="AsyncFunction";var Ph=t=>!!t&&!!t.validate&&!!(Ct(t.validate)&&t.validate.constructor.name===po||Y(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===po)),Lh=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),go=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(a=>t.startsWith(a)&&/^\.\w+/.test(t.slice(a.length))));const Be=(t,e,r,a)=>{for(const i of r||Object.keys(t)){const n=$(t,i);if(n){const{_f:o,...s}=n;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],i)&&!a)return!0;if(o.ref&&e(o.ref,o.name)&&!a)return!0;if(Be(s,e))break}else if(Y(s)&&Be(s,e))break}}};function vo(t,e,r){const a=$(t,r);if(a||vr(r))return{error:a,name:r};const i=r.split(".");for(;i.length;){const n=i.join("."),o=$(e,n),s=$(t,n);if(o&&!Array.isArray(o)&&r!==n)return{name:r};if(s&&s.type)return{name:n,error:s};if(s&&s.root&&s.root.type)return{name:`${n}.root`,error:s.root};i.pop()}return{name:r}}var jh=(t,e,r,a)=>{r(t);const{name:i,...n}=t;return ut(n)||Object.keys(n).length>=Object.keys(e).length||Object.keys(n).find(o=>e[o]===(!a||$t.all))},zh=(t,e,r)=>!t||!e||t===e||ze(t).some(a=>a&&(r?a===e:a.startsWith(e)||e.startsWith(a))),Rh=(t,e,r,a,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(e||t):(r?a.isOnBlur:i.isOnBlur)?!t:(r?a.isOnChange:i.isOnChange)?t:!0,Bh=(t,e)=>!xa($(t,e)).length&&J(t,e),Uh=(t,e,r)=>{const a=ze($(t,r));return z(a,"root",e[r]),z(t,r,a),t};function bo(t,e,r="validate"){if(mt(t)||Array.isArray(t)&&t.every(mt)||Nt(t)&&!t)return{type:r,message:mt(t)?t:"",ref:e}}var ye=t=>Y(t)&&!wr(t)?t:{value:t,message:""},wo=async(t,e,r,a,i,n)=>{const{ref:o,refs:s,required:c,maxLength:f,minLength:v,min:d,max:p,pattern:w,validate:g,name:m,valueAsNumber:S,mount:y}=t._f,x=$(r,m);if(!y||e.has(m))return{};const A=s?s[0]:o,N=F=>{i&&A.reportValidity&&(A.setCustomValidity(Nt(F)?"":F||""),A.reportValidity())},M={},K=$a(o),gt=je(o),at=K||gt,U=(S||Ca(o))&&H(o.value)&&H(x)||br(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,q=to.bind(null,m,a,M),_r=(F,D,tt,st=jt.maxLength,Et=jt.minLength)=>{const yt=F?D:tt;M[m]={type:F?st:Et,message:yt,ref:o,...q(F?st:Et,yt)}};if(n?!Array.isArray(x)||!x.length:c&&(!at&&(U||pt(x))||Nt(x)&&!x||gt&&!so(s).isValid||K&&!uo(s).isValid)){const{value:F,message:D}=mt(c)?{value:!!c,message:c}:ye(c);if(F&&(M[m]={type:jt.required,message:D,ref:A,...q(jt.required,D)},!a))return N(D),M}if(!U&&(!pt(d)||!pt(p))){let F,D;const tt=ye(p),st=ye(d);if(!pt(x)&&!isNaN(x)){const Et=o.valueAsNumber||x&&+x;pt(tt.value)||(F=Et>tt.value),pt(st.value)||(D=Et<st.value)}else{const Et=o.valueAsDate||new Date(x),yt=Ke=>new Date(new Date().toDateString()+" "+Ke),He=o.type=="time",qe=o.type=="week";mt(tt.value)&&x&&(F=He?yt(x)>yt(tt.value):qe?x>tt.value:Et>new Date(tt.value)),mt(st.value)&&x&&(D=He?yt(x)<yt(st.value):qe?x<st.value:Et<new Date(st.value))}if((F||D)&&(_r(!!F,tt.message,st.message,jt.max,jt.min),!a))return N(M[m].message),M}if((f||v)&&!U&&(mt(x)||n&&Array.isArray(x))){const F=ye(f),D=ye(v),tt=!pt(F.value)&&x.length>+F.value,st=!pt(D.value)&&x.length<+D.value;if((tt||st)&&(_r(tt,F.message,D.message),!a))return N(M[m].message),M}if(w&&!U&&mt(x)){const{value:F,message:D}=ye(w);if(wr(F)&&!x.match(F)&&(M[m]={type:jt.pattern,message:D,ref:o,...q(jt.pattern,D)},!a))return N(D),M}if(g){if(Ct(g)){const F=await g(x,r),D=bo(F,A);if(D&&(M[m]={...D,...q(jt.validate,D.message)},!a))return N(D.message),M}else if(Y(g)){let F={};for(const D in g){if(!ut(F)&&!a)break;const tt=bo(await g[D](x,r),A,D);tt&&(F={...tt,...q(D,tt.message)},N(tt.message),a&&(M[m]=F))}if(!ut(F)&&(M[m]={ref:A,...F},!a))return M}}return N(!0),M};const Hh={mode:$t.onSubmit,reValidateMode:$t.onChange,shouldFocusError:!0};function qh(t={}){let e={...Hh,...t},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ct(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},a={},i=Y(e.defaultValues)||Y(e.values)?Q(e.defaultValues||e.values)||{}:{},n=e.shouldUnregister?{}:Q(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},c,f=0;const v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...v};let p={...d};const w={array:eo(),state:eo()},g=e.criteriaMode===$t.all,m=u=>h=>{clearTimeout(f),f=setTimeout(u,h)},S=async u=>{if(!o.keepIsValid&&!e.disabled&&(d.isValid||p.isValid||u)){let h;e.resolver?(h=ut((await at()).errors),y()):h=await q(a,!0),h!==r.isValid&&w.state.next({isValid:h})}},y=(u,h)=>{!e.disabled&&(d.isValidating||d.validatingFields||p.isValidating||p.validatingFields)&&((u||Array.from(s.mount)).forEach(b=>{b&&(h?z(r.validatingFields,b,h):J(r.validatingFields,b))}),w.state.next({validatingFields:r.validatingFields,isValidating:!ut(r.validatingFields)}))},x=(u,h=[],b,C,k=!0,_=!0)=>{if(C&&b&&!e.disabled){if(o.action=!0,_&&Array.isArray($(a,u))){const I=b($(a,u),C.argA,C.argB);k&&z(a,u,I)}if(_&&Array.isArray($(r.errors,u))){const I=b($(r.errors,u),C.argA,C.argB);k&&z(r.errors,u,I),Bh(r.errors,u)}if((d.touchedFields||p.touchedFields)&&_&&Array.isArray($(r.touchedFields,u))){const I=b($(r.touchedFields,u),C.argA,C.argB);k&&z(r.touchedFields,u,I)}(d.dirtyFields||p.dirtyFields)&&(r.dirtyFields=me(i,n)),w.state.next({name:u,isDirty:F(u,h),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else z(n,u,h)},A=(u,h)=>{z(r.errors,u,h),w.state.next({errors:r.errors})},N=u=>{r.errors=u,w.state.next({errors:r.errors,isValid:!1})},M=(u,h,b,C)=>{const k=$(a,u);if(k){const _=$(n,u,H(b)?$(i,u):b);H(_)||C&&C.defaultChecked||h?z(n,u,h?_:fo(k._f)):st(u,_),o.mount&&!o.action&&S()}},K=(u,h,b,C,k)=>{let _=!1,I=!1;const P={name:u};if(!e.disabled){if(!b||C){(d.isDirty||p.isDirty)&&(I=r.isDirty,r.isDirty=P.isDirty=F(),_=I!==P.isDirty);const L=Wt($(i,u),h);I=!!$(r.dirtyFields,u),L?J(r.dirtyFields,u):z(r.dirtyFields,u,!0),P.dirtyFields=r.dirtyFields,_=_||(d.dirtyFields||p.dirtyFields)&&I!==!L}if(b){const L=$(r.touchedFields,u);L||(z(r.touchedFields,u,b),P.touchedFields=r.touchedFields,_=_||(d.touchedFields||p.touchedFields)&&L!==b)}_&&k&&w.state.next(P)}return _?P:{}},gt=(u,h,b,C)=>{const k=$(r.errors,u),_=(d.isValid||p.isValid)&&Nt(h)&&r.isValid!==h;if(e.delayError&&b?(c=m(()=>A(u,b)),c(e.delayError)):(clearTimeout(f),c=null,b?z(r.errors,u,b):J(r.errors,u)),(b?!Wt(k,b):k)||!ut(C)||_){const I={...C,..._&&Nt(h)?{isValid:h}:{},errors:r.errors,name:u};r={...r,...I},w.state.next(I)}},at=async u=>(y(u,!0),await e.resolver(n,e.context,Dh(u||s.mount,a,e.criteriaMode,e.shouldUseNativeValidation))),U=async u=>{const{errors:h}=await at(u);if(y(u),u)for(const b of u){const C=$(h,b);C?z(r.errors,b,C):J(r.errors,b)}else r.errors=h;return h},q=async(u,h,b={valid:!0})=>{for(const C in u){const k=u[C];if(k){const{_f:_,...I}=k;if(_){const P=s.array.has(_.name),L=k._f&&Ph(k._f);L&&d.validatingFields&&y([_.name],!0);const ft=await wo(k,s.disabled,n,g,e.shouldUseNativeValidation&&!h,P);if(L&&d.validatingFields&&y([_.name]),ft[_.name]&&(b.valid=!1,h||t.shouldUseNativeValidation))break;!h&&($(ft,_.name)?P?Uh(r.errors,ft,_.name):z(r.errors,_.name,ft[_.name]):J(r.errors,_.name))}!ut(I)&&await q(I,h,b)}}return b.valid},_r=()=>{for(const u of s.unMount){const h=$(a,u);h&&(h._f.refs?h._f.refs.every(b=>!Ea(b)):!Ea(h._f.ref))&&Ta(u)}s.unMount=new Set},F=(u,h)=>!e.disabled&&(u&&h&&z(n,u,h),!Wt($o(),i)),D=(u,h,b)=>Ah(u,s,{...o.mount?n:H(h)?i:mt(u)?{[u]:h}:h},b,h),tt=u=>xa($(o.mount?n:i,u,e.shouldUnregister?$(i,u,[]):[])),st=(u,h,b={})=>{const C=$(a,u);let k=h;if(C){const _=C._f;_&&(!_.disabled&&z(n,u,lo(h,_)),k=br(_.ref)&&pt(h)?"":h,ao(_.ref)?[..._.ref.options].forEach(I=>I.selected=k.includes(I.value)):_.refs?je(_.ref)?_.refs.forEach(I=>{(!I.defaultChecked||!I.disabled)&&(Array.isArray(k)?I.checked=!!k.find(P=>P===I.value):I.checked=k===I.value||!!k)}):_.refs.forEach(I=>I.checked=I.value===k):Ca(_.ref)?_.ref.value="":(_.ref.value=k,_.ref.type||w.state.next({name:u,values:Q(n)})))}(b.shouldDirty||b.shouldTouch)&&K(u,k,b.shouldTouch,b.shouldDirty,!0),b.shouldValidate&&Ke(u)},Et=(u,h,b)=>{for(const C in h){if(!h.hasOwnProperty(C))return;const k=h[C],_=u+"."+C,I=$(a,_);(s.array.has(u)||Y(k)||I&&!I._f)&&!ae(k)?Et(_,k,b):st(_,k,b)}},yt=(u,h,b={})=>{const C=$(a,u),k=s.array.has(u),_=Q(h);z(n,u,_),k?(w.array.next({name:u,values:Q(n)}),(d.isDirty||d.dirtyFields||p.isDirty||p.dirtyFields)&&b.shouldDirty&&w.state.next({name:u,dirtyFields:me(i,n),isDirty:F(u,_)})):C&&!C._f&&!pt(_)?Et(u,_,b):st(u,_,b),go(u,s)?w.state.next({...r,name:u,values:Q(n)}):w.state.next({name:o.mount?u:void 0,values:Q(n)})},He=async u=>{o.mount=!0;const h=u.target;let b=h.name,C=!0;const k=$(a,b),_=L=>{C=Number.isNaN(L)||ae(L)&&isNaN(L.getTime())||Wt(L,$(n,b,L))},I=ho(e.mode),P=ho(e.reValidateMode);if(k){let L,ft;const ie=h.type?fo(k._f):kh(u),Yt=u.type===Qn.BLUR||u.type===Qn.FOCUS_OUT,qp=!Lh(k._f)&&!e.resolver&&!$(r.errors,b)&&!k._f.deps||Rh(Yt,$(r.touchedFields,b),r.isSubmitted,P,I),Na=go(b,s,Yt);z(n,b,ie),Yt?(!h||!h.readOnly)&&(k._f.onBlur&&k._f.onBlur(u),c&&c(0)):k._f.onChange&&k._f.onChange(u);const Fa=K(b,ie,Yt),Kp=!ut(Fa)||Na;if(!Yt&&w.state.next({name:b,type:u.type,values:Q(n)}),qp)return(d.isValid||p.isValid)&&(e.mode==="onBlur"?Yt&&S():Yt||S()),Kp&&w.state.next({name:b,...Na?{}:Fa});if(!Yt&&Na&&w.state.next({...r}),e.resolver){const{errors:Vo}=await at([b]);if(y([b]),_(ie),C){const Gp=vo(r.errors,a,b),Do=vo(Vo,a,Gp.name||b);L=Do.error,b=Do.name,ft=ut(Vo)}}else y([b],!0),L=(await wo(k,s.disabled,n,g,e.shouldUseNativeValidation))[b],y([b]),_(ie),C&&(L?ft=!1:(d.isValid||p.isValid)&&(ft=await q(a,!0)));C&&(k._f.deps&&(!Array.isArray(k._f.deps)||k._f.deps.length>0)&&Ke(k._f.deps),gt(b,ft,L,Fa))}},qe=(u,h)=>{if($(r.errors,h)&&u.focus)return u.focus(),1},Ke=async(u,h={})=>{let b,C;const k=ze(u);if(e.resolver){const _=await U(H(u)?u:k);b=ut(_),C=u?!k.some(I=>$(_,I)):b}else u?(C=(await Promise.all(k.map(async _=>{const I=$(a,_);return await q(I&&I._f?{[_]:I}:I)}))).every(Boolean),!(!C&&!r.isValid)&&S()):C=b=await q(a);return w.state.next({...!mt(u)||(d.isValid||p.isValid)&&b!==r.isValid?{}:{name:u},...e.resolver||!u?{isValid:b}:{},errors:r.errors}),h.shouldFocus&&!C&&Be(a,qe,u?k:s.mount),C},$o=(u,h)=>{let b={...o.mount?n:i};return h&&(b=ro(h.dirtyFields?r.dirtyFields:r.touchedFields,b)),H(u)?b:mt(u)?$(b,u):u.map(C=>$(b,C))},Eo=(u,h)=>({invalid:!!$((h||r).errors,u),isDirty:!!$((h||r).dirtyFields,u),error:$((h||r).errors,u),isValidating:!!$(r.validatingFields,u),isTouched:!!$((h||r).touchedFields,u)}),Lp=u=>{const h=u?ze(u):void 0;h==null||h.forEach(b=>J(r.errors,b)),h?h.forEach(b=>{w.state.next({name:b,errors:r.errors})}):w.state.next({errors:{}})},Io=(u,h,b)=>{const C=($(a,u,{_f:{}})._f||{}).ref,k=$(r.errors,u)||{},{ref:_,message:I,type:P,...L}=k;z(r.errors,u,{...L,...h,ref:C}),w.state.next({name:u,errors:r.errors,isValid:!1}),b&&b.shouldFocus&&C&&C.focus&&C.focus()},jp=(u,h)=>Ct(u)?w.state.subscribe({next:b=>"values"in b&&u(D(void 0,h),b)}):D(u,h,!0),To=u=>w.state.subscribe({next:h=>{zh(u.name,h.name,u.exact)&&jh(h,u.formState||d,Hp,u.reRenderRoot)&&u.callback({values:{...n},...r,...h,defaultValues:i})}}).unsubscribe,zp=u=>(o.mount=!0,p={...p,...u.formState},To({...u,formState:{...v,...u.formState}})),Ta=(u,h={})=>{for(const b of u?ze(u):s.mount)s.mount.delete(b),s.array.delete(b),h.keepValue||(J(a,b),J(n,b)),!h.keepError&&J(r.errors,b),!h.keepDirty&&J(r.dirtyFields,b),!h.keepTouched&&J(r.touchedFields,b),!h.keepIsValidating&&J(r.validatingFields,b),!e.shouldUnregister&&!h.keepDefaultValue&&J(i,b);w.state.next({values:Q(n)}),w.state.next({...r,...h.keepDirty?{isDirty:F()}:{}}),!h.keepIsValid&&S()},Ao=({disabled:u,name:h})=>{if(Nt(u)&&o.mount||u||s.disabled.has(h)){const k=s.disabled.has(h)!==!!u;u?s.disabled.add(h):s.disabled.delete(h),k&&o.mount&&!o.action&&S()}},Aa=(u,h={})=>{let b=$(a,u);const C=Nt(h.disabled)||Nt(e.disabled);return z(a,u,{...b||{},_f:{...b&&b._f?b._f:{ref:{name:u}},name:u,mount:!0,...h}}),s.mount.add(u),b?Ao({disabled:Nt(h.disabled)?h.disabled:e.disabled,name:u}):M(u,!0,h.value),{...C?{disabled:h.disabled||e.disabled}:{},...e.progressive?{required:!!h.required,min:Re(h.min),max:Re(h.max),minLength:Re(h.minLength),maxLength:Re(h.maxLength),pattern:Re(h.pattern)}:{},name:u,onChange:He,onBlur:He,ref:k=>{if(k){Aa(u,h),b=$(a,u);const _=H(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,I=Nh(_),P=b._f.refs||[];if(I?P.find(L=>L===_):_===b._f.ref)return;z(a,u,{_f:{...b._f,...I?{refs:[...P.filter(Ea),_,...Array.isArray($(i,u))?[{}]:[]],ref:{type:_.type,name:u}}:{ref:_}}}),M(u,!1,void 0,_)}else b=$(a,u,{}),b._f&&(b._f.mount=!1),(e.shouldUnregister||h.shouldUnregister)&&!(Ch(s.array,u)&&o.action)&&s.unMount.add(u)}}},Ma=()=>e.shouldFocusError&&Be(a,qe,s.mount),Rp=u=>{Nt(u)&&(w.state.next({disabled:u}),Be(a,(h,b)=>{const C=$(a,b);C&&(h.disabled=C._f.disabled||u,Array.isArray(C._f.refs)&&C._f.refs.forEach(k=>{k.disabled=C._f.disabled||u}))},0,!1))},Mo=(u,h)=>async b=>{let C;b&&(b.preventDefault&&b.preventDefault(),b.persist&&b.persist());let k=Q(n);if(w.state.next({isSubmitting:!0}),e.resolver){const{errors:_,values:I}=await at();y(),r.errors=_,k=Q(I)}else await q(a);if(s.disabled.size)for(const _ of s.disabled)J(k,_);if(J(r.errors,"root"),ut(r.errors)){w.state.next({errors:{}});try{await u(k,b)}catch(_){C=_}}else h&&await h({...r.errors},b),Ma(),setTimeout(Ma);if(w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ut(r.errors)&&!C,submitCount:r.submitCount+1,errors:r.errors}),C)throw C},Bp=(u,h={})=>{$(a,u)&&(H(h.defaultValue)?yt(u,Q($(i,u))):(yt(u,h.defaultValue),z(i,u,Q(h.defaultValue))),h.keepTouched||J(r.touchedFields,u),h.keepDirty||(J(r.dirtyFields,u),r.isDirty=h.defaultValue?F(u,Q($(i,u))):F()),h.keepError||(J(r.errors,u),d.isValid&&S()),w.state.next({...r}))},No=(u,h={})=>{const b=u?Q(u):i,C=Q(b),k=ut(u),_=k?i:C;if(h.keepDefaultValues||(i=b),!h.keepValues){if(h.keepDirtyValues){const I=new Set([...s.mount,...Object.keys(me(i,n))]);for(const P of Array.from(I)){const L=$(r.dirtyFields,P),ft=$(n,P),ie=$(_,P);L&&!H(ft)?z(_,P,ft):!L&&!H(ie)&&yt(P,ie)}}else{if(_a&&H(u))for(const I of s.mount){const P=$(a,I);if(P&&P._f){const L=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(br(L)){const ft=L.closest("form");if(ft){ft.reset();break}}}}if(h.keepFieldsRef)for(const I of s.mount)yt(I,$(_,I));else a={}}n=e.shouldUnregister?h.keepDefaultValues?Q(i):{}:Q(_),w.array.next({values:{..._}}),w.state.next({values:{..._}})}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=!d.isValid||!!h.keepIsValid||!!h.keepDirtyValues||!e.shouldUnregister&&!ut(_),o.watch=!!e.shouldUnregister,o.keepIsValid=!!h.keepIsValid,o.action=!1,h.keepErrors||(r.errors={}),w.state.next({submitCount:h.keepSubmitCount?r.submitCount:0,isDirty:k?!1:h.keepDirty?r.isDirty:!!(h.keepDefaultValues&&!Wt(u,i)),isSubmitted:h.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:k?{}:h.keepDirtyValues?h.keepDefaultValues&&n?me(i,n):r.dirtyFields:h.keepDefaultValues&&u?me(i,u):h.keepDirty?r.dirtyFields:{},touchedFields:h.keepTouched?r.touchedFields:{},errors:h.keepErrors?r.errors:{},isSubmitSuccessful:h.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Fo=(u,h)=>No(Ct(u)?u(n):u,{...e.resetOptions,...h}),Up=(u,h={})=>{const b=$(a,u),C=b&&b._f;if(C){const k=C.refs?C.refs[0]:C.ref;k.focus&&setTimeout(()=>{k.focus(),h.shouldSelect&&Ct(k.select)&&k.select()})}},Hp=u=>{r={...r,...u}},Oo={control:{register:Aa,unregister:Ta,getFieldState:Eo,handleSubmit:Mo,setError:Io,_subscribe:To,_runSchema:at,_updateIsValidating:y,_focusError:Ma,_getWatch:D,_getDirty:F,_setValid:S,_setFieldArray:x,_setDisabledField:Ao,_setErrors:N,_getFieldArray:tt,_reset:No,_resetDefaultValues:()=>Ct(e.defaultValues)&&e.defaultValues().then(u=>{Fo(u,e.resetOptions),w.state.next({isLoading:!1})}),_removeUnmounted:_r,_disableForm:Rp,_subjects:w,_proxyFormState:d,get _fields(){return a},get _formValues(){return n},get _state(){return o},set _state(u){o=u},get _defaultValues(){return i},get _names(){return s},set _names(u){s=u},get _formState(){return r},get _options(){return e},set _options(u){e={...e,...u}}},subscribe:zp,trigger:Ke,register:Aa,handleSubmit:Mo,watch:jp,setValue:yt,getValues:$o,reset:Fo,resetField:Bp,clearErrors:Lp,unregister:Ta,setError:Io,setFocus:Up,getFieldState:Eo};return{...Oo,formControl:Oo}}function mr(t={}){const e=lt.useRef(void 0),r=lt.useRef(void 0),[a,i]=lt.useState({isDirty:!1,isValidating:!1,isLoading:Ct(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:Ct(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:a},t.defaultValues&&!Ct(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:o,...s}=qh(t);e.current={...s,formState:a}}const n=e.current.control;return n._options=t,Th(()=>{const o=n._subscribe({formState:n._proxyFormState,callback:()=>i({...n._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),n._formState.isReady=!0,o},[n]),lt.useEffect(()=>n._disableForm(t.disabled),[n,t.disabled]),lt.useEffect(()=>{t.mode&&(n._options.mode=t.mode),t.reValidateMode&&(n._options.reValidateMode=t.reValidateMode)},[n,t.mode,t.reValidateMode]),lt.useEffect(()=>{t.errors&&(n._setErrors(t.errors),n._focusError())},[n,t.errors]),lt.useEffect(()=>{t.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,t.shouldUnregister]),lt.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==a.isDirty&&n._subjects.state.next({isDirty:o})}},[n,a.isDirty]),lt.useEffect(()=>{var o;t.values&&!Wt(t.values,r.current)?(n._reset(t.values,{keepFieldsRef:!0,...n._options.resetOptions}),!((o=n._options.resetOptions)===null||o===void 0)&&o.keepIsValid||n._setValid(),r.current=t.values,i(s=>({...s}))):n._resetDefaultValues()},[n,t.values]),lt.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),e.current.formState=lt.useMemo(()=>Ih(a,n),[n,a]),e.current}const mo=(t,e,r)=>{if(t&&"reportValidity"in t){const a=$(r,e);t.setCustomValidity(a&&a.message||""),t.reportValidity()}},Kh=(t,e)=>{for(const r in e.fields){const a=e.fields[r];a&&a.ref&&"reportValidity"in a.ref?mo(a.ref,r,t):a.refs&&a.refs.forEach(i=>mo(i,r,t))}},Gh=(t,e)=>{e.shouldUseNativeValidation&&Kh(t,e);const r={};for(const a in t){const i=$(e.fields,a),n=Object.assign(t[a]||{},{ref:i&&i.ref});if(Wh(e.names||Object.keys(t),a)){const o=Object.assign({},$(r,a));z(o,"root",n),z(r,a,o)}else z(r,a,n)}return r},Wh=(t,e)=>t.some(r=>r.startsWith(e+"."));var yr=function(t,e,r){return r===void 0&&(r={}),function(a,i,n){try{var o=!n.shouldUseNativeValidation&&n.criteriaMode==="all";return Promise.resolve(vf(t,a,Object.assign({},e,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var c={};s.issues.length;){var f=s.issues[0],v=cf(f);if(v&&(c[v]||(c[v]={message:f.message,type:f.type}),o)){var d=c[v].types,p=d&&d[f.type];c[v]=to(v,o,c,f.type,p?[].concat(p,f.message):f.message)}s.issues.shift()}return{values:{},errors:Gh(c,n)}}return{values:r.raw?a:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const yo=27,_o=12,xo=10,Yh=ge("enum"),Jh=(t,e)=>{const r={min:t.minSelected??0,max:t.maxSelected??t.options.length};return yr(nt({checked:Pt(ua(W(),hr()),fr(a=>Object.entries(a).filter(([i,n])=>n).map(([i,n])=>i)),Ve(r.max,e("validation_multiple_choice_max",{count:r.max})),ve(r.min,e("validation_multiple_choice_min",{count:r.min})))}))},Xh=Lr(({option:t,...e},r)=>l(et,{children:[l("input",{class:"peer sr-only h-full",type:"checkbox",...e,ref:r}),l("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:e.id,children:t.label})]})),ko=Xt("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:Kn}}}),Zh=({input:t,onSubmitSuccess:e})=>{var v,d;const r=t.key?(v=T.current$.value.flow)==null?void 0:v.data.submissions[t.key]:void 0,a=(t.config.minSelected===1||t.config.minSelected===void 0)&&t.config.maxSelected===1,i=a&&t.config.options.length===2,{t:n}=it(),{register:o,handleSubmit:s,formState:{errors:c}}=mr({defaultValues:{checked:a?{}:Yh(r)?Object.fromEntries(r.value.map(p=>[p,!0])):{}},resolver:Jh(t.config,n)}),f=ya();return i?l("ul",{style:{maxHeight:6.5*yo+5*_o+2*xo},class:ko({variant:"booleanLike"}),children:t.config.options.map((p,w)=>l("li",{class:Gn,children:l(Wn,{type:"submit",ref:g=>{g&&w===0&&(f.current=g)},label:p.label,value:"true",onClick:()=>e({type:"enum",value:[p.value]})})},p.value))}):l("form",{noValidate:!0,onSubmit:p=>s(w=>{const g=w.checked;e({type:"enum",value:g})})(p),children:[l("div",{class:"flex items-center gap-1",children:[l("ul",{style:{maxHeight:6.5*yo+5*_o+2*xo},class:ko({variant:t.config.options.length===1?"singleOption":void 0}),children:t.config.options.map((p,w)=>{const g=`checked.${p.value}`,{ref:m,...S}=o(g);return l("li",{class:"relative",children:l(Xh,{option:p,autoFocus:w===0,ref:y=>{y&&w===0&&(f.current=y),m(y)},id:g,...S,onClick:a?()=>e({type:"enum",value:[p.value]}):void 0})},p.value)})}),l("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[a?null:l(ee,{}),t.config.minSelected===0&&l(re,{class:"relative",type:"button",onClick:()=>e({type:"enum",value:[]})})]})]}),l("div",{class:"px-1",children:l(we,{error:(d=c.checked)==null?void 0:d.root})})]})},Qh=ge("number"),tp=(t,e)=>{const r=t.min??Number.MIN_SAFE_INTEGER,a=t.max??Number.MAX_SAFE_INTEGER,i=t.decimalCases??0;return yr(nt({number:Pt(De(e("validation_number")),$n(r,e("validation_number_min",{min:r})),Cn(a,e("validation_number_max",{max:a})),kn(n=>n===Number(n.toFixed(i)),e("validation_number_decimal_cases",{count:i})))}))},ep=({input:t,onSubmitSuccess:e})=>{var d;const r=t.config.defaultValue,a=t.key?(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key]:void 0,{t:i}=it(),{register:n,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{number:r?Number(r):Qh(a)?a.value:void 0},resolver:tp(t.config,i)}),{ref:c,...f}=n("number",{required:!t.config.optional,valueAsNumber:!0}),v=wt();return bt(()=>{v.current&&(v.current.focus(),v.current.select())},[]),l("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{p.number!==void 0&&e({type:"number",value:p.number})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative min-w-0 flex-grow",children:[l("input",{...f,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(v.current=p),c(p)},type:"text",min:t.config.min,max:t.config.max,class:Le({optional:t.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:t.config.placeholder}),t.config.optional&&l(re,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(we,{error:s.number})]})},rp=t=>{if(t==="")return{countryCode:"",phoneNumber:""};const e=Object.entries(ma).find(i=>t.startsWith(i[1])),r=e?e[1]:"",a=t.replace(r,"");return/^\d+$/.test(a)?{countryCode:r,phoneNumber:a}:{countryCode:"",phoneNumber:""}},ap="44",ip=/^[0-9 ]+$/,np=ge("string"),op=ge("phone"),sp=t=>{const e=Pt(W(t("validation_country_code")),sa(ip,t("validation_country_code"))),r=Pt(W(t("validation_phone")),ve(1,t("validation_phone")),fr(a=>a.replace(/[^0-9]/g,"")));return yr(nt({countryCode:e,phoneNumber:r}))},lp=({input:t,onSubmitSuccess:e})=>{var m;const r=t.key?(m=T.current$.value.flow)==null?void 0:m.data.submissions[t.key]:void 0,{t:a}=it(),[i,n]=_t(),o=np(r)?rp(r.value):op(r)?r.value:void 0,{register:s,handleSubmit:c,formState:{errors:f},watch:v}=mr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??t.config.defaultValue.countryCode??ap,phoneNumber:(o==null?void 0:o.phoneNumber)??t.config.defaultValue.phoneNumber??""},resolver:sp(a)}),{ref:d,...p}=s("phoneNumber",{required:!t.config.optional}),w=wt(),g=v("countryCode");return bt(()=>{w.current&&(w.current.focus(),w.current.select())},[]),l("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:c(S=>{const y=S.phoneNumber.replace(/[^0-9]/g,""),x=S.countryCode.replace(/[^0-9]/g,"");n(void 0);const A=t.config.minChars??7,N=y.length+x.length;if(N<A)return n(a("validation_phone_min_chars",{count:A}));const M=t.config.maxChars;if(M!=null&&N>M)return n(a("validation_max_chars",{count:M}));t.config.submissionFormat==="phone"?e({type:"phone",value:{countryCode:x,phoneNumber:y}}):e({type:"string",value:g+S.phoneNumber})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[l("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_${t.key}`,children:[l("span",{children:["+",g]}),l("select",{...s("countryCode",{}),id:`isdk_phone_${t.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(ma).map(([S,y])=>l("option",{value:y,children:[S," (+",y,")"]},S))})]}),l("input",{...p,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:S=>{S&&(w.current=S),d(S)},class:Le({optional:t.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:t.config.placeholder}),t.config.optional&&l(re,{class:"absolute bottom-0 right-1 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(we,{error:f.countryCode||f.phoneNumber||{message:i}})]})},cp=({input:t,onSubmitSuccess:e})=>l("div",{class:"flex flex-col items-center py-3",children:l("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:t.key,onClick:()=>{e(null)},children:l("span",{class:"flex items-center gap-1.5",children:[l("span",{class:"inline-flex items-center text-sm font-medium",children:t.config.label||"Submit"}),l("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:[l("path",{d:"M4 8L8 4L12 8"}),l("path",{d:"M8 4V13"})]})]})})}),dp={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},up=ge("string"),fp=(t,e)=>{const r={maxLength:e("validation_max_chars",{count:t.maxChars??999}),minLength:e("validation_min_chars",{count:t.minChars??1})};return yr(nt({text:{date:Pt(W(e("validation_date")),sa(/^\d{4}-\d{2}-\d{2}$/,e("validation_date"))),email:Pt(W(e("validation_email")),Sn(e("validation_email")),ve(t.minChars??1,r.minLength),Ve(t.maxChars??1/0,r.maxLength)),text:Pt(W(),ve(t.minChars??1,r.minLength),Ve(t.maxChars??1/0,r.maxLength)),url:Pt(W(e("validation_url")),En(e("validation_url")),ve(t.minChars??1,r.minLength),Ve(t.maxChars??1/0,r.maxLength))}[t.format]}))},hp={text:({input:t,onSubmitSuccess:e})=>{var d;const{t:r}=it(),a=t.key?(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key]:void 0,i=t.config.defaultValue,{register:n,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{text:i||(up(a)?a.value:"")},resolver:fp(t.config,r)}),{ref:c,...f}=n("text",{required:!t.config.optional}),v=wt();return bt(()=>{v.current&&(v.current.focus(),v.current.select())},[]),l("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{e({type:"string",value:p.text})}),children:[l("div",{class:"flex items-center gap-2",children:[l("div",{class:"relative min-w-0 flex-1",children:[l("input",{id:"chat-input",...f,...dp[t.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(v.current=p),c(p)},placeholder:t.config.placeholder,class:Le({optional:!!t.config.optional,className:"w-full rounded-full"})}),t.config.optional&&l(re,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>e(null)})]}),l(ee,{})]}),l(we,{error:s.text})]})},phone:lp,"multiple-choice":Zh,boolean:gh,file:xh,submit:cp,address:uh,number:ep},pp=({logger:t})=>{var n;const e=(n=T.current$.value.flow)==null?void 0:n.data.currentInput,[r,a]=Qf(),i=wt(null);return T.inputHeight$.value=a.height,kt(()=>{const o=i.current;if(o)return o.addEventListener("transitionstart",ot.scrollToEnd.smooth),o.addEventListener("transitioncancel",ot.scrollToEnd.smooth),o.addEventListener("transitionend",ot.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",ot.scrollToEnd.smooth),o.removeEventListener("transitioncancel",ot.scrollToEnd.smooth),o.removeEventListener("transitionend",ot.scrollToEnd.smooth)}},[]),l("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:a.height},children:l("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:e?(()=>{const o=hp[e.type];return l(o,{logger:t,onSubmitSuccess:ot.onSubmitSuccessFn$.value,input:e})})():l("div",{class:"flex items-center gap-2 p-2.5",children:[l("input",{"aria-hidden":"true",id:"chat-input",class:Le({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),l(ee,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var gp=function(t){return t instanceof RegExp},vp=function(e){var r=/[\\^$.*+?()[\]{}|]/g,a=RegExp(r.source);return e&&a.test(e)?e.replace(r,"\\$&"):e},So=function(t){return typeof t=="string"},bp=function(t){var e=[];return t.forEach(function(r){Array.isArray(r)?e=e.concat(r):e.push(r)}),e};function wp(t,e,r){var a=0,i=0;if(t==="")return t;if(!t||!So(t))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var n=e;gp(n)||(n=new RegExp("("+vp(n)+")","gi"));for(var o=t.split(n),s=1,c=o.length;s<c;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,a+=o[s-1].length,o[s]=r(o[s],s,a),a+=i}return o}var mp=function(e,r,a){return Array.isArray(e)||(e=[e]),bp(e.map(function(i){return So(i)?wp(i,r,a):i}))};const Ue=Oa(mp),yp=/(\[[^\]]+\]\([^)]+\))/g,_p=/\[([^\]]+)\]\(([^)]+)\)/,xp=/(https?:\/\/[^\s]+)/g,kp=/_(.*?)_/g,Sp=/\*\*(.*?)\*\*/g,Cp=/\\n|\n/g,Co="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",$p=t=>{const e=Ue(t,yp,(o,s)=>{const[,c,f]=o.match(_p)??[];return f?l("a",{class:Co,href:f,children:c??f},f+s):l("span",{children:"INVALID LINK"})}),r=Ue(e,xp,(o,s)=>l("a",{class:Co,href:o,children:o},o+s)),a=Ue(r,kp,(o,s)=>l("em",{children:o},o+s)),i=Ue(a,Sp,(o,s)=>l("strong",{children:o},o+s));return Ue(i,Cp,(o,s)=>l("br",{},`br-${s}`))},Ep=Xt("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"}}),Ip=({children:t,className:e,animate:r,side:a,...i})=>l("p",{style:{transformOrigin:a==="left"?"0% 50%":"100% 50%"},class:Ep({className:e,side:a,animate:r}),...i,children:t}),Tp=({message:t})=>l("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:l("a",{onClick:t.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:t.href,children:[t.text,l("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l("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"})})]})}),Ap=({className:t,...e})=>(kt(()=>{ot.scrollToEnd.smooth()}),l("div",{"aria-hidden":!0,children:ot.isBotTyping$.value===!0?l("div",{"aria-label":"Typing…",class:zt("flex gap-1 p-4",t),...e,children:Array.from({length:3},(r,a)=>l("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-a*200}ms`}}))}):void 0})),Mp={bot:"left",user:"right"},Np=Xt("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]"}}}),Fp=({lastSentMessageFooter:t})=>{var r;const e=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return kt(()=>{ot.scrollToEnd.smooth()},[e.length]),l("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[e.map((a,i)=>l(et,{children:l("li",{class:"flex",children:Zt(a).with({type:"system"},n=>l("p",{class:Np({variant:n.variant}),children:n.text})).with({type:"text",author:V.union("bot","user")},n=>{const o=n.author==="user"&&!e.slice(i+1).some(f=>f.type==="text"&&f.author==="user"),s=i===e.length-1,c=n.author==="bot"?$p(n.text):n.text;return l(et,{children:[o?t:null,l(Ip,{animate:s,side:Mp[n.author],children:c},i)]})}).with({type:"link"},n=>l(Tp,{message:n})).with({type:"image"},n=>l("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:n.url,style:{aspectRatio:n.width/n.height}})).with({type:"file"},n=>l(mh,{class:n.author==="bot"?void 0:"ml-auto",file:{name:n.fileName,sizeKb:n.fileSizeKb}})).with({type:"loading"},n=>{const o=e[e.length-1];return!(n===o)||ot.isBotTyping$.value?null:l("div",{class:"flex flex-grow flex-col items-center justify-center",children:l(vn,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),l(Ap,{},"typing")]})},Op=({logger:t,apiClient:e,analytics:r,platformClient:a})=>{const{flow:i}=T.current$.value;At(i,"Flow is required to exist to show chatbot body");const n=T.viewState$.value,{chatRef:o,chatService:s}=nh(),{t:c}=it(),[f,v]=_t();return bt(()=>{n==="maximised"&&ot.scrollToEnd.instant()},[n]),bt(()=>{var y,x;const{state:d,flow:p}=T.current$.peek();if(d!=="loaded")throw new Error(c("invalid_state"));let w=p.data.nodeHistory.at(-1);if(ot.scrollToEnd.instant(),T.setInput(void 0),p.data.isFinished)return;w===void 0?(w=un(i.nodes).id,T.setCurrentNodeId(w),r.log({event:"FLOW_START",properties:{flow_id:i.id,flow_version:i.version,flow_session_id:p.data.flowSessionId,flow_build:i.build,job:i.job},customProperties:(y=i.analytics)==null?void 0:y.customProperties})):T.removeMessagesSentByNodeIds([w]);const{interpret:g,abort:m,undo:S}=Ff({context:i.context,analytics:{service:r,customProperties:(x=i.analytics)==null?void 0:x.customProperties},apiClient:e,logger:t,platformClient:a,flow:i,chatService:s,t:c,getSubmissions:()=>{var A;return(A=T.current$.peek().flow)==null?void 0:A.data.submissions},onInterpret:A=>T.setCurrentNodeId(A.id),onFlowEnd:async()=>{var N;T.markAsFinished();const A=T.current$.peek().flow;At(A),r.log({event:"FLOW_END",properties:{flow_id:i.id,flow_version:i.version,flow_session_id:A.data.flowSessionId,flow_build:i.build,job:i.job},customProperties:(N=i.analytics)==null?void 0:N.customProperties})}});return v(()=>S),g(w),m},[r,e,s,t,i,a,c]),l(et,{children:[l("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:l(Fp,{lastSentMessageFooter:i.data.isFinished||!f?null:l(Dp,{undoFn:f})})}),l(pp,{logger:t})]})},Vp=t=>t.type==="identify"?[]:"key"in t.data&&t.data.key?[t.data.key]:"keys"in t.data?Object.values(t.data.keys).filter(e=>typeof e=="string"):[],Dp=({undoFn:t})=>{const{t:e}=it();return l(dr,{onClick:async()=>{const{flow:r}=T.current$.peek();At(r);const{removed:a}=t(r.data.nodeHistory),i=r.data.nodeHistory.splice(-a);i.length!==0&&(T.removeMessagesSentByNodeIds(i),T.setInput(void 0),i.pop(),i.map(n=>r.nodes.find(o=>o.id===n)).filter(Boolean).flatMap(Vp).forEach(n=>delete r.data.submissions[n]),T.current$.value={...T.current$.value})},children:[l("title",{children:e("undo")}),l("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"})]})},Pp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Op},Symbol.toStringTag,{value:"Module"}))})();