@inploi/plugin-chatbot 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";var Do=t=>t;function Lo(){return{"~standard":{vendor:"inploi",version:1,validate:t=>({value:t})}}}function Op(t){return t}var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vo=Array.isArray,Sr=Vo,jo=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue,zo=jo,Ro=zo,Bo=typeof self=="object"&&self&&self.Object===Object&&self,Uo=Ro||Bo||Function("return this")(),Cr=Uo,Ho=Cr,qo=Ho.Symbol,$r=qo,jn=$r,zn=Object.prototype,Ko=zn.hasOwnProperty,Go=zn.toString,me=jn?jn.toStringTag:void 0;function Wo(t){var e=Ko.call(t,me),r=t[me];try{t[me]=void 0;var n=!0}catch{}var a=Go.call(t);return n&&(e?t[me]=r:delete t[me]),a}var Yo=Wo,Jo=Object.prototype,Zo=Jo.toString;function Xo(t){return Zo.call(t)}var Qo=Xo,Rn=$r,ts=Yo,es=Qo,rs="[object Null]",ns="[object Undefined]",Bn=Rn?Rn.toStringTag:void 0;function as(t){return t==null?t===void 0?ns:rs:Bn&&Bn in Object(t)?ts(t):es(t)}var Un=as;function is(t){return t!=null&&typeof t=="object"}var os=is,ss=Un,ls=os,cs="[object Symbol]";function us(t){return typeof t=="symbol"||ls(t)&&ss(t)==cs}var Er=us,ds=Sr,fs=Er,hs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ps=/^\w*$/;function gs(t,e){if(ds(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||fs(t)?!0:ps.test(t)||!hs.test(t)||e!=null&&t in Object(e)}var vs=gs;function bs(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Hn=bs,ws=Un,ms=Hn,_s="[object AsyncFunction]",ys="[object Function]",xs="[object GeneratorFunction]",ks="[object Proxy]";function Ss(t){if(!ms(t))return!1;var e=ws(t);return e==ys||e==xs||e==_s||e==ks}var Cs=Ss,$s=Cr,Es=$s["__core-js_shared__"],Is=Es,Ir=Is,qn=function(){var t=/[^.]+$/.exec(Ir&&Ir.keys&&Ir.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ts(t){return!!qn&&qn in t}var As=Ts,Ms=Function.prototype,Os=Ms.toString;function Ns(t){if(t!=null){try{return Os.call(t)}catch{}try{return t+""}catch{}}return""}var Fs=Ns,Ps=Cs,Ds=As,Ls=Hn,Vs=Fs,js=/[\\^$.*+?()[\]{}|]/g,zs=/^\[object .+?Constructor\]$/,Rs=Function.prototype,Bs=Object.prototype,Us=Rs.toString,Hs=Bs.hasOwnProperty,qs=RegExp("^"+Us.call(Hs).replace(js,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ks(t){if(!Ls(t)||Ds(t))return!1;var e=Ps(t)?qs:zs;return e.test(Vs(t))}var Gs=Ks;function Ws(t,e){return t==null?void 0:t[e]}var Ys=Ws,Js=Gs,Zs=Ys;function Xs(t,e){var r=Zs(t,e);return Js(r)?r:void 0}var Kn=Xs,Qs=Kn,tl=Qs(Object,"create"),He=tl,Gn=He;function el(){this.__data__=Gn?Gn(null):{},this.size=0}var rl=el;function nl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var al=nl,il=He,ol="__lodash_hash_undefined__",sl=Object.prototype,ll=sl.hasOwnProperty;function cl(t){var e=this.__data__;if(il){var r=e[t];return r===ol?void 0:r}return ll.call(e,t)?e[t]:void 0}var ul=cl,dl=He,fl=Object.prototype,hl=fl.hasOwnProperty;function pl(t){var e=this.__data__;return dl?e[t]!==void 0:hl.call(e,t)}var gl=pl,vl=He,bl="__lodash_hash_undefined__";function wl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=vl&&e===void 0?bl:e,this}var ml=wl,_l=rl,yl=al,xl=ul,kl=gl,Sl=ml;function ae(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ae.prototype.clear=_l,ae.prototype.delete=yl,ae.prototype.get=xl,ae.prototype.has=kl,ae.prototype.set=Sl;var Cl=ae;function $l(){this.__data__=[],this.size=0}var El=$l;function Il(t,e){return t===e||t!==t&&e!==e}var Tl=Il,Al=Tl;function Ml(t,e){for(var r=t.length;r--;)if(Al(t[r][0],e))return r;return-1}var qe=Ml,Ol=qe,Nl=Array.prototype,Fl=Nl.splice;function Pl(t){var e=this.__data__,r=Ol(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Fl.call(e,r,1),--this.size,!0}var Dl=Pl,Ll=qe;function Vl(t){var e=this.__data__,r=Ll(e,t);return r<0?void 0:e[r][1]}var jl=Vl,zl=qe;function Rl(t){return zl(this.__data__,t)>-1}var Bl=Rl,Ul=qe;function Hl(t,e){var r=this.__data__,n=Ul(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var ql=Hl,Kl=El,Gl=Dl,Wl=jl,Yl=Bl,Jl=ql;function ie(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ie.prototype.clear=Kl,ie.prototype.delete=Gl,ie.prototype.get=Wl,ie.prototype.has=Yl,ie.prototype.set=Jl;var Zl=ie,Xl=Kn,Ql=Cr,tc=Xl(Ql,"Map"),ec=tc,Wn=Cl,rc=Zl,nc=ec;function ac(){this.size=0,this.__data__={hash:new Wn,map:new(nc||rc),string:new Wn}}var ic=ac;function oc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var sc=oc,lc=sc;function cc(t,e){var r=t.__data__;return lc(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ke=cc,uc=Ke;function dc(t){var e=uc(this,t).delete(t);return this.size-=e?1:0,e}var fc=dc,hc=Ke;function pc(t){return hc(this,t).get(t)}var gc=pc,vc=Ke;function bc(t){return vc(this,t).has(t)}var wc=bc,mc=Ke;function _c(t,e){var r=mc(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var yc=_c,xc=ic,kc=fc,Sc=gc,Cc=wc,$c=yc;function oe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}oe.prototype.clear=xc,oe.prototype.delete=kc,oe.prototype.get=Sc,oe.prototype.has=Cc,oe.prototype.set=$c;var Ec=oe,Yn=Ec,Ic="Expected a function";function Tr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ic);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Tr.Cache||Yn),r}Tr.Cache=Yn;var Tc=Tr,Ac=Tc,Mc=500;function Oc(t){var e=Ac(t,function(n){return r.size===Mc&&r.clear(),n}),r=e.cache;return e}var Nc=Oc,Fc=Nc,Pc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dc=/\\(\\)?/g,Lc=Fc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Pc,function(r,n,a,i){e.push(a?i.replace(Dc,"$1"):n||r)}),e}),Vc=Lc;function jc(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var zc=jc,Jn=$r,Rc=zc,Bc=Sr,Uc=Er,Hc=1/0,Zn=Jn?Jn.prototype:void 0,Xn=Zn?Zn.toString:void 0;function Qn(t){if(typeof t=="string")return t;if(Bc(t))return Rc(t,Qn)+"";if(Uc(t))return Xn?Xn.call(t):"";var e=t+"";return e=="0"&&1/t==-Hc?"-0":e}var qc=Qn,Kc=qc;function Gc(t){return t==null?"":Kc(t)}var Wc=Gc,Yc=Sr,Jc=vs,Zc=Vc,Xc=Wc;function Qc(t,e){return Yc(t)?t:Jc(t,e)?[t]:Zc(Xc(t))}var tu=Qc,eu=Er,ru=1/0;function nu(t){if(typeof t=="string"||eu(t))return t;var e=t+"";return e=="0"&&1/t==-ru?"-0":e}var au=nu,iu=tu,ou=au;function su(t,e){e=iu(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[ou(e[r++])];return r&&r==n?t:void 0}var lu=su,cu=lu;function uu(t,e,r){var n=t==null?void 0:cu(t,e);return n===void 0?r:n}var du=uu;const _e=kr(du);var ye,C,ta,ea,Gt,ra,na,Ar,aa,se={},ia=[],fu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ge=Array.isArray;function At(t,e){for(var r in e)t[r]=e[r];return t}function oa(t){var e=t.parentNode;e&&e.removeChild(t)}function dt(t,e,r){var n,a,i,o={};for(i in e)i=="key"?n=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?ye.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return xe(t,o,n,a,null)}function xe(t,e,r,n,a){var i={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++ta};return a==null&&C.vnode!=null&&C.vnode(i),i}function hu(){return{current:null}}function J(t){return t.children}function mt(t,e){this.props=t,this.context=e}function We(t,e){if(e==null)return t.__?We(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"?We(t):null}function sa(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 sa(t)}}function Mr(t){(!t.__d&&(t.__d=!0)&&Gt.push(t)&&!Ye.__r++||ra!==C.debounceRendering)&&((ra=C.debounceRendering)||na)(Ye)}function Ye(){var t,e,r,n,a,i,o,s,l;for(Gt.sort(Ar);t=Gt.shift();)t.__d&&(e=Gt.length,n=void 0,a=void 0,i=void 0,s=(o=(r=t).__v).__e,(l=r.__P)&&(n=[],a=[],(i=At({},o)).__v=o.__v+1,Or(l,o,i,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??We(o),o.__h,a),pa(n,o,a),o.__e!=s&&sa(o)),Gt.length>e&&Gt.sort(Ar));Ye.__r=0}function la(t,e,r,n,a,i,o,s,l,h,p){var u,f,b,v,y,S,x,m,A,O,M=0,H=n&&n.__k||ia,at=H.length,gt=at,L=e.length;for(r.__k=[],u=0;u<L;u++)(v=r.__k[u]=(v=e[u])==null||typeof v=="boolean"||typeof v=="function"?null:typeof v=="string"||typeof v=="number"||typeof v=="bigint"?xe(null,v,null,null,v):Ge(v)?xe(J,{children:v},null,null,null):v.__b>0?xe(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null&&(v.__=r,v.__b=r.__b+1,(m=pu(v,H,x=u+M,gt))===-1?b=se:(b=H[m]||se,H[m]=void 0,gt--),Or(t,v,b,a,i,o,s,l,h,p),y=v.__e,(f=v.ref)&&b.ref!=f&&(b.ref&&Nr(b.ref,null,v),p.push(f,v.__c||y,v)),y!=null&&(S==null&&(S=y),O=!(A=b===se||b.__v===null)&&m===x,A?m==-1&&M--:m!==x&&(m===x+1?(M++,O=!0):m>x?gt>L-x?(M+=m-x,O=!0):M--:M=m<x&&m==x-1?m-x:0),x=u+M,O=O||m==u&&!A,typeof v.type!="function"||m===x&&b.__k!==v.__k?typeof v.type=="function"||O?v.__d!==void 0?(l=v.__d,v.__d=void 0):l=y.nextSibling:l=ua(t,y,l):l=ca(v,l,t),typeof r.type=="function"&&(r.__d=l)));for(r.__e=S,u=at;u--;)H[u]!=null&&(typeof r.type=="function"&&H[u].__e!=null&&H[u].__e==r.__d&&(r.__d=H[u].__e.nextSibling),ga(H[u],H[u]))}function ca(t,e,r){for(var n,a=t.__k,i=0;a&&i<a.length;i++)(n=a[i])&&(n.__=t,e=typeof n.type=="function"?ca(n,e,r):ua(r,n.__e,e));return e}function Mt(t,e){return e=e||[],t==null||typeof t=="boolean"||(Ge(t)?t.some(function(r){Mt(r,e)}):e.push(t)),e}function ua(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 pu(t,e,r,n){var a=t.key,i=t.type,o=r-1,s=r+1,l=e[r];if(l===null||l&&a==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<e.length;){if(o>=0){if((l=e[o])&&a==l.key&&i===l.type)return o;o--}if(s<e.length){if((l=e[s])&&a==l.key&&i===l.type)return s;s++}}return-1}function gu(t,e,r,n,a){var i;for(i in r)i==="children"||i==="key"||i in e||Je(t,i,null,r[i],n);for(i in e)a&&typeof e[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===e[i]||Je(t,i,e[i],r[i],n)}function da(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||fu.test(e)?r:r+"px"}function Je(t,e,r,n,a){var i;t:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||da(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||da(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n||t.addEventListener(e,i?ha:fa,i):t.removeEventListener(e,i?ha:fa,i);else if(e!=="dangerouslySetInnerHTML"){if(a)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function fa(t){return this.l[t.type+!1](C.event?C.event(t):t)}function ha(t){return this.l[t.type+!0](C.event?C.event(t):t)}function Or(t,e,r,n,a,i,o,s,l,h){var p,u,f,b,v,y,S,x,m,A,O,M,H,at,gt,L=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=e.__e=r.__e,e.__h=null,i=[s]),(p=C.__b)&&p(e);try{t:if(typeof L=="function"){if(x=e.props,m=(p=L.contextType)&&n[p.__c],A=p?m?m.props.value:p.__:n,r.__c?S=(u=e.__c=r.__c).__=u.__E:("prototype"in L&&L.prototype.render?e.__c=u=new L(x,A):(e.__c=u=new mt(x,A),u.constructor=L,u.render=bu),m&&m.sub(u),u.props=x,u.state||(u.state={}),u.context=A,u.__n=n,f=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),L.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=At({},u.__s)),At(u.__s,L.getDerivedStateFromProps(x,u.__s))),b=u.props,v=u.state,u.__v=e,f)L.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L.getDerivedStateFromProps==null&&x!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(x,A),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(x,u.__s,A)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(u.props=x,u.state=u.__s,u.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(ct){ct&&(ct.__=e)}),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[],u.__h.length&&o.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(x,u.__s,A),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,v,y)})}if(u.context=A,u.props=x,u.__P=t,u.__e=!1,M=C.__r,H=0,"prototype"in L&&L.prototype.render){for(u.state=u.__s,u.__d=!1,M&&M(e),p=u.render(u.props,u.state,u.context),at=0;at<u._sb.length;at++)u.__h.push(u._sb[at]);u._sb=[]}else do u.__d=!1,M&&M(e),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++H<25);u.state=u.__s,u.getChildContext!=null&&(n=At(At({},n),u.getChildContext())),f||u.getSnapshotBeforeUpdate==null||(y=u.getSnapshotBeforeUpdate(b,v)),la(t,Ge(gt=p!=null&&p.type===J&&p.key==null?p.props.children:p)?gt:[gt],e,r,n,a,i,o,s,l,h),u.base=e.__e,e.__h=null,u.__h.length&&o.push(u),S&&(u.__E=u.__=null)}else i==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=vu(r.__e,e,r,n,a,i,o,l,h);(p=C.diffed)&&p(e)}catch(ct){e.__v=null,(l||i!=null)&&(e.__e=s,e.__h=!!l,i[i.indexOf(s)]=null),C.__e(ct,e,r)}}function pa(t,e,r){for(var n=0;n<r.length;n++)Nr(r[n],r[++n],r[++n]);C.__c&&C.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(i){i.call(a)})}catch(i){C.__e(i,a.__v)}})}function vu(t,e,r,n,a,i,o,s,l){var h,p,u,f=r.props,b=e.props,v=e.type,y=0;if(v==="svg"&&(a=!0),i!=null){for(;y<i.length;y++)if((h=i[y])&&"setAttribute"in h==!!v&&(v?h.localName===v:h.nodeType===3)){t=h,i[y]=null;break}}if(t==null){if(v===null)return document.createTextNode(b);t=a?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,b.is&&b),i=null,s=!1}if(v===null)f===b||s&&t.data===b||(t.data=b);else{if(i=i&&ye.call(t.childNodes),p=(f=r.props||se).dangerouslySetInnerHTML,u=b.dangerouslySetInnerHTML,!s){if(i!=null)for(f={},y=0;y<t.attributes.length;y++)f[t.attributes[y].name]=t.attributes[y].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(gu(t,b,f,a,s),u)e.__k=[];else if(la(t,Ge(y=e.props.children)?y:[y],e,r,n,a&&v!=="foreignObject",i,o,i?i[0]:r.__k&&We(r,0),s,l),i!=null)for(y=i.length;y--;)i[y]!=null&&oa(i[y]);s||("value"in b&&(y=b.value)!==void 0&&(y!==t.value||v==="progress"&&!y||v==="option"&&y!==f.value)&&Je(t,"value",y,f.value,!1),"checked"in b&&(y=b.checked)!==void 0&&y!==t.checked&&Je(t,"checked",y,f.checked,!1))}return t}function Nr(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(n){C.__e(n,r)}}function ga(t,e,r){var n,a;if(C.unmount&&C.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||Nr(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){C.__e(i,e)}n.base=n.__P=null,t.__c=void 0}if(n=t.__k)for(a=0;a<n.length;a++)n[a]&&ga(n[a],e,r||typeof t.type!="function");r||t.__e==null||oa(t.__e),t.__=t.__e=t.__d=void 0}function bu(t,e,r){return this.constructor(t,r)}function le(t,e,r){var n,a,i,o;C.__&&C.__(t,e),a=(n=typeof r=="function")?null:r&&r.__k||e.__k,i=[],o=[],Or(e,t=(!n&&r||e).__k=dt(J,null,[t]),a||se,se,e.ownerSVGElement!==void 0,!n&&r?[r]:a?null:e.firstChild?ye.call(e.childNodes):null,i,!n&&r?r:a?a.__e:e.firstChild,n,o),pa(i,t,o)}function va(t,e){le(t,e,va)}function wu(t,e,r){var n,a,i,o,s=At({},t.props);for(i in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)i=="key"?n=e[i]:i=="ref"?a=e[i]:s[i]=e[i]===void 0&&o!==void 0?o[i]:e[i];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):r),xe(t.type,s,n||t.key,a||t.ref,null)}function ba(t,e){var r={__c:e="__cC"+aa++,__:t,Consumer:function(n,a){return n.children(a)},Provider:function(n){var a,i;return this.getChildContext||(a=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&a.some(function(s){s.__e=!0,Mr(s)})},this.sub=function(o){a.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){a.splice(a.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}ye=ia.slice,C={__e:function(t,e,r,n){for(var a,i,o;e=e.__;)if((a=e.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(t)),o=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(t,n||{}),o=a.__d),o)return a.__E=a}catch(s){t=s}throw t}},ta=0,ea=function(t){return t!=null&&t.constructor===void 0},mt.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=At({},this.state),typeof t=="function"&&(t=t(At({},r),this.props)),t&&At(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Mr(this))},mt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Mr(this))},mt.prototype.render=J,Gt=[],na=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(t,e){return t.__v.__b-e.__v.__b},Ye.__r=0,aa=0;function wa(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=wa(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Lt(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=wa(t))&&(n&&(n+=" "),n+=e);return n}const ma=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,_a=Lt,Wt=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return _a(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=e,o=Object.keys(a).map(h=>{const p=r==null?void 0:r[h],u=i==null?void 0:i[h];if(p===null)return null;const f=ma(p)||ma(u);return a[h][f]}),s=r&&Object.entries(r).reduce((h,p)=>{let[u,f]=p;return f===void 0||(h[u]=f),h},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((h,p)=>{let{class:u,className:f,...b}=p;return Object.entries(b).every(v=>{let[y,S]=v;return Array.isArray(S)?S.includes({...i,...s}[y]):{...i,...s}[y]===S})?[...h,u,f]:h},[]);return _a(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var Vt,z,Fr,ya,ce=0,xa=[],Ze=[],ka=C.__b,Sa=C.__r,Ca=C.diffed,$a=C.__c,Ea=C.unmount;function ue(t,e){C.__h&&C.__h(z,t,ce||e),ce=0;var r=z.__H||(z.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:Ze}),r.__[t]}function vt(t){return ce=1,Ia(Ma,t)}function Ia(t,e,r){var n=ue(Vt++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):Ma(void 0,e),function(s){var l=n.__N?n.__N[0]:n.__[0],h=n.t(l,s);l!==h&&(n.__N=[h,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){var a=function(s,l,h){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(f){return f.__c});if(p.every(function(f){return!f.__N}))return!i||i.call(this,s,l,h);var u=!1;return p.forEach(function(f){if(f.__N){var b=f.__[0];f.__=f.__N,f.__N=void 0,b!==f.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!i||i.call(this,s,l,h))};z.u=!0;var i=z.shouldComponentUpdate,o=z.componentWillUpdate;z.componentWillUpdate=function(s,l,h){if(this.__e){var p=i;i=void 0,a(s,l,h),i=p}o&&o.call(this,s,l,h)},z.shouldComponentUpdate=a}return n.__N||n.__}function _t(t,e){var r=ue(Vt++,3);!C.__s&&Dr(r.__H,e)&&(r.__=t,r.i=e,z.__H.__h.push(r))}function ft(t,e){var r=ue(Vt++,4);!C.__s&&Dr(r.__H,e)&&(r.__=t,r.i=e,z.__h.push(r))}function ht(t){return ce=5,Ot(function(){return{current:t}},[])}function mu(t,e,r){ce=6,ft(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 Ot(t,e){var r=ue(Vt++,7);return Dr(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function _u(t,e){return ce=8,Ot(function(){return t},e)}function Ta(t){var e=z.context[t.__c],r=ue(Vt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(z)),e.props.value):t.__}function yu(t,e){C.useDebugValue&&C.useDebugValue(e?e(t):t)}function xu(){var t=ue(Vt++,11);if(!t.__){for(var e=z.__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 ku(){for(var t;t=xa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Xe),t.__H.__h.forEach(Pr),t.__H.__h=[]}catch(e){t.__H.__h=[],C.__e(e,t.__v)}}C.__b=function(t){z=null,ka&&ka(t)},C.__r=function(t){Sa&&Sa(t),Vt=0;var e=(z=t.__c).__H;e&&(Fr===z?(e.__h=[],z.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Ze,r.__N=r.i=void 0})):(e.__h.forEach(Xe),e.__h.forEach(Pr),e.__h=[],Vt=0)),Fr=z},C.diffed=function(t){Ca&&Ca(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(xa.push(e)!==1&&ya===C.requestAnimationFrame||((ya=C.requestAnimationFrame)||Su)(ku)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Ze&&(r.__=r.__V),r.i=void 0,r.__V=Ze})),Fr=z=null},C.__c=function(t,e){e.some(function(r){try{r.__h.forEach(Xe),r.__h=r.__h.filter(function(n){return!n.__||Pr(n)})}catch(n){e.some(function(a){a.__h&&(a.__h=[])}),e=[],C.__e(n,r.__v)}}),$a&&$a(t,e)},C.unmount=function(t){Ea&&Ea(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Xe(n)}catch(a){e=a}}),r.__H=void 0,e&&C.__e(e,r.__v))};var Aa=typeof requestAnimationFrame=="function";function Su(t){var e,r=function(){clearTimeout(n),Aa&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);Aa&&(e=requestAnimationFrame(r))}function Xe(t){var e=z,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),z=e}function Pr(t){var e=z;t.__c=t.__(),z=e}function Dr(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function Ma(t,e){return typeof e=="function"?e(t):e}function Oa(t,e){for(var r in e)t[r]=e[r];return t}function Lr(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function Vr(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function jr(t){this.props=t}function Cu(t,e){function r(a){var i=this.props.ref,o=i==a.ref;return!o&&i&&(i.call?i(null):i.current=null),e?!e(this.props,a)||!o:Lr(this.props,a)}function n(a){return this.shouldComponentUpdate=r,dt(t,a)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(jr.prototype=new mt).isPureReactComponent=!0,jr.prototype.shouldComponentUpdate=function(t,e){return Lr(this.props,t)||Lr(this.state,e)};var Na=C.__b;C.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Na&&Na(t)};var $u=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function zr(t){function e(r){var n=Oa({},r);return delete n.ref,t(n,r.ref||null)}return e.$$typeof=$u,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Fa=function(t,e){return t==null?null:Mt(Mt(t).map(e))},Eu={map:Fa,forEach:Fa,count:function(t){return t?Mt(t).length:0},only:function(t){var e=Mt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Mt},Iu=C.__e;C.__e=function(t,e,r,n){if(t.then){for(var a,i=e;i=i.__;)if((a=i.__c)&&a.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),a.__c(t,e)}Iu(t,e,r,n)};var Pa=C.unmount;function Da(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),t.__c.__H=null),(t=Oa({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(n){return Da(n,e,r)})),t}function La(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(n){return La(n,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 ke(){this.__u=0,this.t=null,this.__b=null}function Va(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ja(t){var e,r,n;function a(i){if(e||(e=t()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw e;return dt(r,i)}return a.displayName="Lazy",a.__f=!0,a}function Se(){this.u=null,this.o=null}C.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Pa&&Pa(t)},(ke.prototype=new mt).__c=function(t,e){var r=e.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var a=Va(n.__v),i=!1,o=function(){i||(i=!0,r.__R=null,a?a(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var h=n.state.__a;n.__v.__k[0]=La(h,h.__c.__P,h.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.t.pop();)p.forceUpdate()}},l=e.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),t.then(o,o)},ke.prototype.componentWillUnmount=function(){this.t=[]},ke.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Da(this.__b,r,n.__O=n.__P)}this.__b=null}var a=e.__a&&dt(J,null,t.fallback);return a&&(a.__h=null),[dt(J,null,e.__a?null:t.children),a]};var za=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 Tu(t){return this.getChildContext=function(){return t.context},t.children}function Au(t){var e=this,r=t.i;e.componentWillUnmount=function(){le(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(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),le(dt(Tu,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Mu(t,e){var r=dt(Au,{__v:t,i:e});return r.containerInfo=e,r}(Se.prototype=new mt).__a=function(t){var e=this,r=Va(e.__v),n=e.o.get(t);return n[0]++,function(a){var i=function(){e.props.revealOrder?(n.push(a),za(e,t,n)):a()};r?r(i):i()}},Se.prototype.render=function(t){this.u=null,this.o=new Map;var e=Mt(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},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){za(t,r,e)})};var Ra=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ou=/^(?: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]/,Nu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Fu=/[A-Z0-9]/g,Pu=typeof document<"u",Du=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Lu(t,e,r){return e.__k==null&&(e.textContent=""),le(t,e),typeof r=="function"&&r(),t?t.__c:null}function Vu(t,e,r){return va(t,e),typeof r=="function"&&r(),t?t.__c:null}mt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(mt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ba=C.event;function ju(){}function zu(){return this.cancelBubble}function Ru(){return this.defaultPrevented}C.event=function(t){return Ba&&(t=Ba(t)),t.persist=ju,t.isPropagationStopped=zu,t.isDefaultPrevented=Ru,t.nativeEvent=t};var Rr,Bu={enumerable:!1,configurable:!0,get:function(){return this.class}},Ua=C.vnode;C.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,n=e.type,a={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Pu&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Du(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Nu.test(i)?i=s:n.indexOf("-")===-1&&Ou.test(i)?i=i.replace(Fu,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&a[i=s]&&(i="oninputCapture"),a[i]=o}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=Mt(r.children).forEach(function(l){l.props.selected=a.value.indexOf(l.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=Mt(r.children).forEach(function(l){l.props.selected=a.multiple?a.defaultValue.indexOf(l.props.value)!=-1:a.defaultValue==l.props.value})),r.class&&!r.className?(a.class=r.class,Object.defineProperty(a,"className",Bu)):(r.className&&!r.class||r.class&&r.className)&&(a.class=a.className=r.className),e.props=a}(t),t.$$typeof=Ra,Ua&&Ua(t)};var Ha=C.__r;C.__r=function(t){Ha&&Ha(t),Rr=t.__c};var qa=C.diffed;C.diffed=function(t){qa&&qa(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),Rr=null};var Uu={ReactCurrentDispatcher:{current:{readContext:function(t){return Rr.__n[t.__c].props.value}}}};function Hu(t){return dt.bind(null,t)}function Ka(t){return!!t&&t.$$typeof===Ra}function qu(t){return Ka(t)?wu.apply(null,arguments):t}function Ku(t){return!!t.__k&&(le(null,t),!0)}function Gu(t){return t&&(t.base||t.nodeType===1&&t)||null}var Wu=function(t,e){return t(e)},Yu=function(t,e){return t(e)},Ju=J;function Ga(t){t()}function Zu(t){return t}function Xu(){return[!1,Ga]}var Qu=ft;function td(t,e){var r=e(),n=vt({h:{__:r,v:e}}),a=n[0].h,i=n[1];return ft(function(){a.__=r,a.v=e,Vr(a.__,e())||i({h:a})},[t,r,e]),_t(function(){return Vr(a.__,a.v())||i({h:a}),t(function(){Vr(a.__,a.v())||i({h:a})})},[t]),r}var St={useState:vt,useId:xu,useReducer:Ia,useEffect:_t,useLayoutEffect:ft,useInsertionEffect:Qu,useTransition:Xu,useDeferredValue:Zu,useSyncExternalStore:td,startTransition:Ga,useRef:ht,useImperativeHandle:mu,useMemo:Ot,useCallback:_u,useContext:Ta,useDebugValue:yu,version:"17.0.2",Children:Eu,render:Lu,hydrate:Vu,unmountComponentAtNode:Ku,createPortal:Mu,createElement:dt,createContext:ba,createFactory:Hu,cloneElement:qu,createRef:hu,Fragment:J,isValidElement:Ka,findDOMNode:Gu,Component:mt,PureComponent:jr,memo:Cu,forwardRef:zr,flushSync:Yu,unstable_batchedUpdates:Wu,StrictMode:Ju,Suspense:ke,SuspenseList:Se,lazy:ja,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Uu};const st=Symbol.for("@ts-pattern/matcher"),Wa=Symbol.for("@ts-pattern/isVariadic"),Qe="@ts-pattern/anonymous-select-key",Br=t=>!!(t&&typeof t=="object"),tr=t=>t&&!!t[st],Z=(t,e,r)=>{if(tr(t)){const n=t[st](),{matched:a,selections:i}=n.match(e);return a&&i&&Object.keys(i).forEach(o=>r(o,i[o])),a}if(Br(t)){if(!Br(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let n=[],a=[],i=[];for(const o of t.keys()){const s=t[o];tr(s)&&s[Wa]?i.push(s):i.length?a.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<n.length+a.length)return!1;const o=e.slice(0,n.length),s=a.length===0?[]:e.slice(-a.length),l=e.slice(n.length,a.length===0?1/0:-a.length);return n.every((h,p)=>Z(h,o[p],r))&&a.every((h,p)=>Z(h,s[p],r))&&(i.length===0||Z(i[0],l,r))}return t.length===e.length&&t.every((o,s)=>Z(o,e[s],r))}return Object.keys(t).every(n=>{const a=t[n];return(n in e||tr(i=a)&&i[st]().matcherType==="optional")&&Z(a,e[n],r);var i})}return Object.is(e,t)},pt=t=>{var e,r,n;return Br(t)?tr(t)?(e=(r=(n=t[st]()).getSelectionKeys)==null?void 0:r.call(n))!=null?e:[]:Array.isArray(t)?Ce(t,pt):Ce(Object.values(t),pt):[]},Ce=(t,e)=>t.reduce((r,n)=>r.concat(e(n)),[]);function ed(...t){if(t.length===1){const[e]=t;return r=>Z(e,r,()=>{})}if(t.length===2){const[e,r]=t;return Z(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function tt(t){return Object.assign(t,{optional:()=>Hr(t),and:e=>R(t,e),or:e=>Ya(t,e),select:e=>e===void 0?$e(t):$e(e,t)})}function Ur(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[Wa]:!0})}}))(t),{optional:()=>Ur(Hr(t)),select:e=>Ur(e===void 0?$e(t):$e(e,t))})}function Hr(t){return tt({[st]:()=>({match:e=>{let r={};const n=(a,i)=>{r[a]=i};return e===void 0?(pt(t).forEach(a=>n(a,void 0)),{matched:!0,selections:r}):{matched:Z(t,e,n),selections:r}},getSelectionKeys:()=>pt(t),matcherType:"optional"})})}const rd=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},nd=(t,e)=>{for(const[r,n]of t.entries())if(!e(n,r))return!1;return!0};function R(...t){return tt({[st]:()=>({match:e=>{let r={};const n=(a,i)=>{r[a]=i};return{matched:t.every(a=>Z(a,e,n)),selections:r}},getSelectionKeys:()=>Ce(t,pt),matcherType:"and"})})}function Ya(...t){return tt({[st]:()=>({match:e=>{let r={};const n=(a,i)=>{r[a]=i};return Ce(t,pt).forEach(a=>n(a,void 0)),{matched:t.some(a=>Z(a,e,n)),selections:r}},getSelectionKeys:()=>Ce(t,pt),matcherType:"or"})})}function F(t){return{[st]:()=>({match:e=>({matched:!!t(e)})})}}function $e(...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 tt({[st]:()=>({match:n=>{let a={[e??Qe]:n};return{matched:r===void 0||Z(r,n,(i,o)=>{a[i]=o}),selections:a}},getSelectionKeys:()=>[e??Qe].concat(r===void 0?[]:pt(r))})})}function Ct(t){return typeof t=="number"}function Yt(t){return typeof t=="string"}function jt(t){return typeof t=="bigint"}const Ja=tt(F(function(t){return!0})),ad=Ja,Jt=t=>Object.assign(tt(t),{startsWith:e=>{return Jt(R(t,(r=e,F(n=>Yt(n)&&n.startsWith(r)))));var r},endsWith:e=>{return Jt(R(t,(r=e,F(n=>Yt(n)&&n.endsWith(r)))));var r},minLength:e=>Jt(R(t,(r=>F(n=>Yt(n)&&n.length>=r))(e))),maxLength:e=>Jt(R(t,(r=>F(n=>Yt(n)&&n.length<=r))(e))),includes:e=>{return Jt(R(t,(r=e,F(n=>Yt(n)&&n.includes(r)))));var r},regex:e=>{return Jt(R(t,(r=e,F(n=>Yt(n)&&!!n.match(r)))));var r}}),id=Jt(F(Yt)),$t=t=>Object.assign(tt(t),{between:(e,r)=>$t(R(t,((n,a)=>F(i=>Ct(i)&&n<=i&&a>=i))(e,r))),lt:e=>$t(R(t,(r=>F(n=>Ct(n)&&n<r))(e))),gt:e=>$t(R(t,(r=>F(n=>Ct(n)&&n>r))(e))),lte:e=>$t(R(t,(r=>F(n=>Ct(n)&&n<=r))(e))),gte:e=>$t(R(t,(r=>F(n=>Ct(n)&&n>=r))(e))),int:()=>$t(R(t,F(e=>Ct(e)&&Number.isInteger(e)))),finite:()=>$t(R(t,F(e=>Ct(e)&&Number.isFinite(e)))),positive:()=>$t(R(t,F(e=>Ct(e)&&e>0))),negative:()=>$t(R(t,F(e=>Ct(e)&&e<0)))}),od=$t(F(Ct)),zt=t=>Object.assign(tt(t),{between:(e,r)=>zt(R(t,((n,a)=>F(i=>jt(i)&&n<=i&&a>=i))(e,r))),lt:e=>zt(R(t,(r=>F(n=>jt(n)&&n<r))(e))),gt:e=>zt(R(t,(r=>F(n=>jt(n)&&n>r))(e))),lte:e=>zt(R(t,(r=>F(n=>jt(n)&&n<=r))(e))),gte:e=>zt(R(t,(r=>F(n=>jt(n)&&n>=r))(e))),positive:()=>zt(R(t,F(e=>jt(e)&&e>0))),negative:()=>zt(R(t,F(e=>jt(e)&&e<0)))}),sd=zt(F(jt)),ld=tt(F(function(t){return typeof t=="boolean"})),cd=tt(F(function(t){return typeof t=="symbol"})),ud=tt(F(function(t){return t==null}));var P={__proto__:null,matcher:st,optional:Hr,array:function(...t){return Ur({[st]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let n={};if(e.length===0)return pt(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const a=(i,o)=>{n[i]=(n[i]||[]).concat([o])};return{matched:e.every(i=>Z(r,i,a)),selections:n}},getSelectionKeys:()=>t.length===0?[]:pt(t[0])})})},set:function(...t){return tt({[st]:()=>({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 n=(i,o)=>{r[i]=(r[i]||[]).concat([o])},a=t[0];return{matched:rd(e,i=>Z(a,i,n)),selections:r}},getSelectionKeys:()=>t.length===0?[]:pt(t[0])})})},map:function(...t){return tt({[st]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(t.length===0)return{matched:!0};var a;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=t[0])==null?void 0:a.toString()}`);const[i,o]=t;return{matched:nd(e,(s,l)=>{const h=Z(i,l,n),p=Z(o,s,n);return h&&p}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...pt(t[0]),...pt(t[1])]})})},intersection:R,union:Ya,not:function(t){return tt({[st]:()=>({match:e=>({matched:!Z(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:F,select:$e,any:Ja,_:ad,string:id,number:od,bigint:sd,boolean:ld,symbol:cd,nullish:ud,instanceOf:function(t){return tt(F(function(e){return r=>r instanceof e}(t)))},shape:function(t){return tt(F(ed(t)))}};const qr={matched:!1,value:void 0};function Zt(t){return new er(t,qr)}class er{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],n=[e[0]];let a;e.length===3&&typeof e[1]=="function"?a=e[1]:e.length>2&&n.push(...e.slice(1,e.length-1));let i=!1,o={};const s=(h,p)=>{i=!0,o[h]=p},l=!n.some(h=>Z(h,this.input,s))||a&&!a(this.input)?qr:{matched:!0,value:r(i?Qe in o?o[Qe]:o:this.input,this.input)};return new er(this.input,l)}when(e,r){if(this.state.matched)return this;const n=!!e(this.input);return new er(this.input,n?{matched:!0,value:r(this.input,this.input)}:qr)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}run(){return this.exhaustive()}returnType(){return this}}var dd=["other","few","many","two","one","zero"],Za=({terms:t,overrides:e,locale:r})=>{const n=new Intl.PluralRules(r);function a(i,o){const s=(e==null?void 0:e[i])??t[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,h)=>{var p;return((p=o==null?void 0:o[h])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let l=n.select(o.count);if(!(l in s)){const h=dd.find(p=>p in s);if(!h)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);l=h}return s[l].replace(/{{(\w+)}}/g,(h,p)=>{var u;return((u=o==null?void 0:o[p])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${i.toString()}”.`)}}return a},fd=0;function c(t,e,r,n,a,i){var o,s,l={};for(s in e)s=="ref"?o=e[s]:l[s]=e[s];var h={type:t,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--fd,__source:a,__self:i};if(typeof t=="function"&&(o=t.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return C.vnode&&C.vnode(h),h}var Xa=ba(null),hd=t=>({defaultTerms:t,TranslationProvider:({terms:e,children:r,locale:n})=>{const a=Ot(()=>Za({locale:n,terms:t,overrides:e}),[e,n]);return c(Xa.Provider,{value:{t:a,locale:n},children:r})},useTranslation:()=>{const e=Ta(Xa);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:r})=>Za({terms:t,overrides:e,locale:r})});const{TranslationProvider:pd,useTranslation:et,createTFunction:gd}=hd({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_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"}}),Np="";function yt(t,e){if(!t)throw new Error(e)}function rr(){throw new Error("Cycle detected")}var vd=Symbol.for("preact-signals");function Kr(){if(de>1)de--;else{for(var t,e=!1;Ee!==void 0;){var r=Ee;for(Ee=void 0,Gr++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ti(r))try{r.c()}catch(a){e||(t=a,e=!0)}r=n}}if(Gr=0,de--,e)throw t}}var B=void 0,Ee=void 0,de=0,Gr=0,nr=0;function Qa(t){if(B!==void 0){var e=t.n;if(e===void 0||e.t!==B)return e={i:0,S:t,p:B.s,n:void 0,t:B,e:void 0,x:void 0,r:e},B.s!==void 0&&(B.s.n=e),B.s=e,t.n=e,32&B.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=B.s,e.n=void 0,B.s.n=e,B.s=e),e}}function X(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}X.prototype.brand=vd,X.prototype.h=function(){return!0},X.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)},X.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)}},X.prototype.subscribe=function(t){var e=this;return Yr(function(){var r=e.value,n=32&this.f;this.f&=-33;try{t(r)}finally{this.f|=n}})},X.prototype.valueOf=function(){return this.value},X.prototype.toString=function(){return this.value+""},X.prototype.toJSON=function(){return this.value},X.prototype.peek=function(){return this.v},Object.defineProperty(X.prototype,"value",{get:function(){var t=Qa(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(B instanceof Bt&&function(){throw new Error("Computed cannot have side-effects")}(),t!==this.v){Gr>100&&rr(),this.v=t,this.i++,nr++,de++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Kr()}}}});function Rt(t){return new X(t)}function ti(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 ei(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 ri(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Bt(t){X.call(this,void 0),this.x=t,this.s=void 0,this.g=nr-1,this.f=4}(Bt.prototype=new X).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===nr))return!0;if(this.g=nr,this.f|=1,this.i>0&&!ti(this))return this.f&=-2,!0;var t=B;try{ei(this),B=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 B=t,ri(this),this.f&=-2,!0},Bt.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}X.prototype.S.call(this,t)},Bt.prototype.U=function(t){if(this.t!==void 0&&(X.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Bt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Bt.prototype.peek=function(){if(this.h()||rr(),16&this.f)throw this.v;return this.v},Object.defineProperty(Bt.prototype,"value",{get:function(){1&this.f&&rr();var t=Qa(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function bd(t){return new Bt(t)}function ni(t){var e=t.u;if(t.u=void 0,typeof e=="function"){de++;var r=B;B=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Wr(t),n}finally{B=r,Kr()}}}function Wr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ni(t)}function wd(t){if(B!==this)throw new Error("Out-of-order effect");ri(this),B=t,this.f&=-2,8&this.f&&Wr(this),Kr()}function Ie(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ie.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()}},Ie.prototype.S=function(){1&this.f&&rr(),this.f|=1,this.f&=-9,ni(this),ei(this),de++;var t=B;return B=this,wd.bind(this,t)},Ie.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ee,Ee=this)},Ie.prototype.d=function(){this.f|=8,1&this.f||Wr(this)};function Yr(t){var e=new Ie(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Jr;function fe(t,e){C[t]=e.bind(null,C[t]||function(){})}function ar(t){Jr&&Jr(),Jr=t&&t.S()}function ai(t){var e=this,r=t.data,n=_d(r);n.value=r;var a=Ot(function(){for(var i=e.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return e.__$u.c=function(){var o;!ea(a.peek())&&((o=e.base)==null?void 0:o.nodeType)===3?e.base.data=a.peek():(e.__$f|=1,e.setState({}))},bd(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return a.value}ai.displayName="_st",Object.defineProperties(X.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ai},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),fe("__b",function(t,e){if(typeof e.type=="string"){var r,n=e.props;for(var a in n)if(a!=="children"){var i=n[a];i instanceof X&&(r||(e.__np=r={}),r[a]=i,n[a]=i.peek())}}t(e)}),fe("__r",function(t,e){ar();var r,n=e.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(a){var i;return Yr(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),ar(r),t(e)}),fe("__e",function(t,e,r,n){ar(),t(e,r,n)}),fe("diffed",function(t,e){ar();var r;if(typeof e.type=="string"&&(r=e.__e)){var n=e.__np,a=e.props;if(n){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in n)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var l in n){var h=i[l],p=n[l];h===void 0?(h=md(r,l,p,a),i[l]=h):h.o(p,a)}}}t(e)});function md(t,e,r,n){var a=e in t&&t.ownerSVGElement===void 0,i=Rt(r);return{o:function(o,s){i.value=o,n=s},d:Yr(function(){var o=i.value.value;n[e]!==o&&(n[e]=o,a?t[e]=o:o?t.setAttribute(e,o):t.removeAttribute(e))})}}fe("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var a in n){var i=n[a];i&&i.d()}}}}else{var o=e.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}t(e)}),fe("__h",function(t,e,r,n){(n<3||n===9)&&(e.__$f|=2),t(e,r,n)}),mt.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 n in e)return!0;for(var a in t)if(a!=="__source"&&t[a]!==this.props[a])return!0;for(var i in this.props)if(!(i in t))return!0;return!1};function _d(t){return Ot(function(){return Rt(t)},[])}const Zr=(t,e)=>e.some(r=>t instanceof r);let ii,oi;function yd(){return ii||(ii=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function xd(){return oi||(oi=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xr=new WeakMap,Qr=new WeakMap,ir=new WeakMap;function kd(t){const e=new Promise((r,n)=>{const a=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Xt(t.result)),a()},o=()=>{n(t.error),a()};t.addEventListener("success",i),t.addEventListener("error",o)});return ir.set(e,t),e}function Sd(t){if(Xr.has(t))return;const e=new Promise((r,n)=>{const a=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),a()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),a()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});Xr.set(t,e)}let tn={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Xr.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Xt(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 si(t){tn=t(tn)}function Cd(t){return xd().includes(t)?function(...e){return t.apply(en(this),e),Xt(this.request)}:function(...e){return Xt(t.apply(en(this),e))}}function $d(t){return typeof t=="function"?Cd(t):(t instanceof IDBTransaction&&Sd(t),Zr(t,yd())?new Proxy(t,tn):t)}function Xt(t){if(t instanceof IDBRequest)return kd(t);if(Qr.has(t))return Qr.get(t);const e=$d(t);return e!==t&&(Qr.set(t,e),ir.set(e,t)),e}const en=t=>ir.get(t);function Ed(t,e,{blocked:r,upgrade:n,blocking:a,terminated:i}={}){const o=indexedDB.open(t,e),s=Xt(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Xt(o.result),l.oldVersion,l.newVersion,Xt(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),a&&l.addEventListener("versionchange",h=>a(h.oldVersion,h.newVersion,h))}).catch(()=>{}),s}const Id=["get","getKey","getAll","getAllKeys","count"],Td=["put","add","delete","clear"],rn=new Map;function li(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(rn.get(e))return rn.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,a=Td.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(a||Id.includes(r)))return;const i=async function(o,...s){const l=this.transaction(o,a?"readwrite":"readonly");let h=l.store;return n&&(h=h.index(s.shift())),(await Promise.all([h[r](...s),a&&l.done]))[0]};return rn.set(e,i),i}si(t=>({...t,get:(e,r,n)=>li(e,r)||t.get(e,r,n),has:(e,r)=>!!li(e,r)||t.has(e,r)}));const Ad=["continue","continuePrimaryKey","advance"],ci={},nn=new WeakMap,ui=new WeakMap,Md={get(t,e){if(!Ad.includes(e))return t[e];let r=ci[e];return r||(r=ci[e]=function(...n){nn.set(this,ui.get(this)[e](...n))}),r}};async function*Od(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const r=new Proxy(e,Md);for(ui.set(r,e),ir.set(r,en(e));e;)yield r,e=await(nn.get(r)||e.continue()),nn.delete(r)}function di(t,e){return e===Symbol.asyncIterator&&Zr(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Zr(t,[IDBIndex,IDBObjectStore])}si(t=>({...t,get(e,r,n){return di(e,r)?Od:t.get(e,r,n)},has(e,r){return di(e,r)||t.has(e,r)}}));const Te=t=>Zt(t).with(P.number.lte(1e3),()=>`${Math.round(t)}KB`).with(P.number.lt(1e3*10),()=>`${(t/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(t/1e3)}MB`),fi=t=>{const e=t.find(r=>r.isHead);if(!e)throw new Error("No head node found");return e},Nd=t=>Object.entries(t).reduce((r,[n,a])=>(r[n]=a.value,r),{}),he=t=>e=>e?e.type===t:!1;class Ae extends Error{constructor(){super("Aborted")}}function Fd(t,e=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{t.apply(this,n)},e)}}const hi=t=>typeof t=="string",Pd=t=>{let e=5381;for(let r=0;r<t.length;r++)e=e*33^t.charCodeAt(r);return e>>>0},an=t=>t===null||typeof t!="object"?t:Array.isArray(t)?t.map(an):Object.keys(t).sort().reduce((e,r)=>(e[r]=an(t[r]),e),{}),Dd=t=>{const e=JSON.stringify(an(t));return Pd(e).toString(36)},Ld=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),pi=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Ld()}),Vd=t=>Zt(t).with({nativeEvent:{submitter:P.select(P.union(P.instanceOf(HTMLButtonElement),P.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),gi=typeof window>"u"?void 0:Ed("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}}),Me={getStateData:async(t,e,r)=>{var a;const n=vi({...t,flowKeys:e,context:r});return(a=await gi)==null?void 0:a.get("state",n)},setStateData:Fd(async t=>{var r;const e=vi(t);return(r=await gi)==null?void 0:r.put("state",t.data,e)},1e3)},or=(t,e,r,n=0)=>{if(!e.nextId)return r(e.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const a=t.find(h=>h.id===e.nextId);if(a===void 0)return{stepsMade:n,remainingSteps:0};const i=e.type==="if-block"?e.branchId:void 0,o=t.find(h=>h.id===i),s=e.type.includes("question")?1:0;if(o){const h=s+Math.max(or(t,a,r,n+s).remainingSteps,or(t,o,r,n+s).remainingSteps);return r(e.id,{stepsMade:n,remainingSteps:h}),{stepsMade:n,remainingSteps:h}}const l=s+or(t,a,r,n+s).remainingSteps;return r(e.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},jd=t=>{const e={},r=t.find(n=>n.isHead);return r&&or(t,r,(n,a)=>{e[n]=a}),e},vi=t=>[...t.flowKeys,t.id,t.version,Dd(t.context)].join("/"),Ut=Rt({state:"idle"}),Oe=t=>{const{state:e,flow:r}=Ut.value;if(e!=="loaded")return;yt(r,"No flow to update");const n=t(r.data);r.data=n,Ut.value={state:e,flow:r},Me.setStateData(r)},I={current$:Ut,viewState$:Rt("closed"),inputHeight$:Rt(53),startFlow:async({flow:t,context:e={},flowKeys:r,title:n,analytics:a,job:i,locationOrigin:o})=>{const l={data:await Me.getStateData(t,r,e)??pi(),startedAt:new Date,nodeIdToProgress:jd(t.nodes),flowKeys:r,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:n,analytics:a,job:i,locationOrigin:o};Ut.value={state:"loaded",flow:l},Me.setStateData(l)},cancelCurrentFlow:()=>{Ut.value={state:"idle"},I.viewState$.value="closed"},markAsFinished:()=>Oe(t=>({...t,isFinished:!0})),setCurrentNodeId:t=>Oe(e=>(e.nodeHistory.push(t),e)),restart:()=>{const{state:t,flow:e}=Ut.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=pi();Ut.value={state:t,flow:{...e,data:r,startedAt:new Date}},Me.setStateData(e)},addMessage:(t,e)=>{const r={...t,groupId:e};return Oe(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:r}=Ut.value;yt(e==="loaded","Application not loaded");const n=r.data.messages.filter(a=>!a.groupId||!t.includes(a.groupId));r.data.messages=n,Me.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}))},zd=({message:t})=>{const{t:e}=et();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&c("p",{class:"text-neutral-9 text-sm",children:t})]})]})},bi=t=>c("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[c("title",{children:"Loading"}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),wi=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(bi,{class:"text-neutral-6 h-8 w-8"})}),Rd=t=>{const r=t/100,n=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Bd=Wt("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),sr=({class:t,children:e,variant:r,...n})=>c("div",{class:"flex flex-1 items-center justify-end px-1",children:c("button",{class:Lt(Bd({variant:r}),t),...n,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:e})})}),Ud=()=>{if(I.current$.value.state!=="loaded")return null;const t=I.current$.value.flow.nodeIdToProgress,e=I.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const r=t[e];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Rd(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Hd=({children:t,params:e})=>{const{t:r}=et(),n=I.viewState$;return c(J,{children:c("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),c("button",{onClick:()=>{n.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:on,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:Lt({hidden:I.current$.value.state!=="loaded"||n.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,I.current$.value.state==="loaded"&&c(sr,{"aria-label":"Restart",onClick:()=>{I.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(sr,{class:"view-switch",onTouchStart:on,"aria-label":r("minimize"),onClick:()=>n.value="minimised",children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),c(Ud,{})]})})};function on(){}const qd=ja(()=>Promise.resolve().then(()=>Sp).then(t=>t.ChatbotBody)),mi=Wt("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),_i=Wt("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Kd=({open:t,...e})=>{const r=ht(null);return ft(()=>{const n=r.current;n&&(t?n.showModal():n.close())},[t]),c("dialog",{ref:r,...e})},Gd=({logger:t,apiClient:e,analytics:r,params:n})=>{const{state:a,flow:i,error:o}=I.current$.value,s=I.viewState$.value,l=a!=="idle"&&s==="maximised",h=ht(null);return c(pd,{terms:n.terms,locale:void 0,children:[c(Kd,{open:l,onClose:()=>I.viewState$.value="minimised",children:c("div",{ref:h,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:mi({view:"maximised"}),children:c("div",{class:_i({view:"maximised"}),children:[c(Hd,{params:n,children:i==null?void 0:i.title}),Zt({state:a,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(wi,{},"loading")).with({state:"loaded"},()=>c(ke,{fallback:c(wi,{},"loading"),children:c(qd,{analytics:r,apiClient:e,logger:t})})).with({state:"error"},()=>c(zd,{message:o})).exhaustive()]})})}),s==="minimised"?c(Wd,{flow:i}):null]})},Wd=({flow:t})=>{const{t:e}=et();return c("div",{class:mi({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:_i({view:"minimised"}),children:[c("button",{onClick:()=>{I.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:on,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:t==null?void 0:t.title})}),c("div",{class:"flex items-center px-0.5",children:c(sr,{"aria-label":e("close_application"),onClick:I.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Yd=`[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]{--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] *,[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] .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-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-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] .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-2\\.5{padding-left:.625rem;padding-right:.625rem}[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] .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}[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))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}[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))}[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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-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))}[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] .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-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))}[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-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
- `,yi="inploi-chatbot",xi=`[data-widget='${yi}']`,Jd=()=>({getOrCreateChatbotElement:()=>{const t=document.querySelector(xi);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=yi,e}});var Nt;function lr(t){return{lang:(t==null?void 0:t.lang)??(Nt==null?void 0:Nt.lang),message:t==null?void 0:t.message,abortEarly:(t==null?void 0:t.abortEarly)??(Nt==null?void 0:Nt.abortEarly),abortPipeEarly:(t==null?void 0:t.abortPipeEarly)??(Nt==null?void 0:Nt.abortPipeEarly)}}var sn;function Zd(t){return sn==null?void 0:sn.get(t)}var ln;function Xd(t){return ln==null?void 0:ln.get(t)}var cn;function Qd(t,e){var r;return(r=cn==null?void 0:cn.get(t))==null?void 0:r.get(e)}function Qt(t){var r,n;const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&((n=(r=Object.getPrototypeOf(t))==null?void 0:r.constructor)==null?void 0:n.name))??"null":e}function G(t,e,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??t.expects??null,s=(a==null?void 0:a.received)??Qt(i),l={kind:t.kind,type:t.type,input:i,expected:o,received:s,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:t.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},h=t.kind==="schema",p=(a==null?void 0:a.message)??t.message??Qd(t.reference,l.lang)??(h?Xd(l.lang):null)??n.message??Zd(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),h&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function lt(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},lr())}}}function tf(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function ki(t,e){const r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var un=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}},ef=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Si(t,e){return{kind:"validation",type:"check",reference:Si,async:!1,expects:null,requirement:t,message:e,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&G(this,"input",r,n),r}}}function Ci(t){return{kind:"validation",type:"email",reference:Ci,expects:null,async:!1,requirement:ef,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&G(this,"email",e,r),e}}}function Ne(t,e){return{kind:"validation",type:"max_length",reference:Ne,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&G(this,"length",r,n,{received:`${r.value.length}`}),r}}}function $i(t,e){return{kind:"validation",type:"max_value",reference:$i,async:!1,expects:`<=${t instanceof Date?t.toJSON():Qt(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&G(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Qt(r.value)}),r}}}function pe(t,e){return{kind:"validation",type:"min_length",reference:pe,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&G(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Ei(t,e){return{kind:"validation",type:"min_value",reference:Ei,async:!1,expects:`>=${t instanceof Date?t.toJSON():Qt(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&G(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Qt(r.value)}),r}}}function Ii(t,e){return{kind:"validation",type:"regex",reference:Ii,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&G(this,"format",r,n),r}}}function cr(t){return{kind:"transformation",type:"transform",reference:cr,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function Ti(t){return{kind:"validation",type:"url",reference:Ti,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)&&G(this,"URL",e,r),e}}}function rf(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function dn(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function Ai(){return{kind:"schema",type:"any",reference:Ai,expects:"any",async:!1,get"~standard"(){return lt(this)},"~run"(t){return t.typed=!0,t}}}function fn(t,e){return{kind:"schema",type:"array",reference:fn,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const h={type:"array",origin:"value",input:a,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(h):p.path=[h],(i=r.issues)==null||i.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else G(this,"type",r,n);return r}}}function ur(t){return{kind:"schema",type:"boolean",reference:ur,expects:"boolean",async:!1,message:t,get"~standard"(){return lt(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:G(this,"type",e,r),e}}}function hn(t,e){return{kind:"schema",type:"literal",reference:hn,expects:Qt(t),async:!1,literal:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:G(this,"type",r,n),r}}}function Mi(t,e){return{kind:"schema",type:"nullable",reference:Mi,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,get"~standard"(){return lt(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=dn(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Fe(t){return{kind:"schema",type:"number",reference:Fe,expects:"number",async:!1,message:t,get"~standard"(){return lt(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:G(this,"type",e,r),e}}}function rt(t,e){return{kind:"schema",type:"object",reference:rt,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:dn(s),h=s["~run"]({value:l},n);if(h.issues){const p={type:"object",origin:"value",input:a,key:o,value:l};for(const u of h.issues)u.path?u.path.unshift(p):u.path=[p],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=h.issues),n.abortEarly){r.typed=!1;break}}h.typed||(r.typed=!1),r.value[o]=h.value}else if(s.fallback!==void 0)r.value[o]=rf(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(G(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else G(this,"type",r,n);return r}}}function xt(t,e){return{kind:"schema",type:"optional",reference:xt,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return lt(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=dn(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Oi(t,e){return{kind:"schema",type:"picklist",reference:Oi,expects:ki(t.map(Qt),"|"),async:!1,options:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:G(this,"type",r,n),r}}}function pn(t,e,r){return{kind:"schema",type:"record",reference:pn,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return lt(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(tf(i,l)){const h=i[l],p=this.key["~run"]({value:l},a);if(p.issues){const f={type:"object",origin:"key",input:i,key:l,value:h};for(const b of p.issues)b.path=[f],(o=n.issues)==null||o.push(b);if(n.issues||(n.issues=p.issues),a.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:h},a);if(u.issues){const f={type:"object",origin:"value",input:i,key:l,value:h};for(const b of u.issues)b.path?b.path.unshift(f):b.path=[f],(s=n.issues)==null||s.push(b);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!p.typed||!u.typed)&&(n.typed=!1),p.typed&&(n.value[p.value]=u.value)}}else G(this,"type",n,a);return n}}}function W(t){return{kind:"schema",type:"string",reference:W,expects:"string",async:!1,message:t,get"~standard"(){return lt(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:G(this,"type",e,r),e}}}function Ni(t){let e;if(t)for(const r of t)e?e.push(...r.issues):e=r.issues;return e}function gn(t,e){return{kind:"schema",type:"union",reference:gn,expects:ki(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){let a,i,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];G(this,"type",r,n,{issues:Ni(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];G(this,"type",r,n,{issues:Ni(o)})}return r}}}function Fi(t,e,r){const n=t["~run"]({value:e},lr(r));if(n.issues)throw new un(n.issues);return n.value}async function nf(t,e,r){const n=await t["~run"]({value:e},lr(r));if(n.issues)throw new un(n.issues);return n.value}function af(t,e){const r={};for(const n in t.entries)r[n]=!e||e.includes(n)?xt(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return lt(this)}}}function Ht(...t){return{...t[0],pipe:t,get"~standard"(){return lt(this)},"~run"(e,r){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function of(t,e,r){const n=t["~run"]({value:e},lr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const Pi=Ht(gn([W(),Fe()]),cr(String)),Di=rt({id:Pi,version:Fe(),build:Fe(),nodes:fn(Ai()),context_schema:xt(Mi(pn(W(),rt({required:ur(),type:gn([hn("string"),hn("number")])}))))}),sf=rt({flow:Di}),lf=rt({company:rt({name:W()}),flow:Di,job:rt({id:Pi,title:W()}),user:xt(rt({city:xt(W()),country:xt(W()),isEU:xt(ur()),continent:xt(W())}))}),cf={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Lo(),response:lf}},uf={pathname:"/flow/id/:id",method:"GET",schema:{response:sf}};var df=["1","2","3","4","5","6","7","8","9","10","11","12"],ff={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]}},hf=(t,e=1,r)=>n=>{const[a,i]=ff[r][n];return"oklch("+a+"% "+i*e+" "+t+")"},vn=t=>{const e=hf(t.hue,t.chroma,t.mode);return Object.fromEntries(df.map(r=>[t.prefix+r,t.transform(e(r))]))},bn=t=>t,pf=t=>{const e=Object.keys(t).flatMap(r=>{const n=t[r];return typeof n=="object"&&n!==null?Object.keys(n).map(a=>{const i=n[a];return[`${String(r)}.${a}`,i]}):[[r,n]]});return Object.fromEntries(e)},dr=t=>!!t&&typeof t=="object"&&!Array.isArray(t),wn=(t,...e)=>{if(!e.length)return t;const r=e.shift();if(dr(t)&&dr(r))for(const n in r){const a=r[n];if(dr(a)){t[n]||Object.assign(t,{[n]:{}});const i=t[n];dr(i)&&wn(i,a)}else Object.assign(t,{[n]:r[n]})}return wn(t,...e)},gf=t=>{function e(r,n){const a=[t.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${a}`:`var(--${a})`}return e},vf=()=>({core:t=>({semantic:e=>({component:r=>({from:n=>{const{theme:a,getToken:i}=n,o=f=>i("reference",f.toString()),s=t({theme:a}),l=e({theme:a,core:o,raw:{core:s}}),h=r({theme:a,core:o,semantic:o,raw:{core:s,semantic:l}}),p=pf(wn(s,l,h)),u=([f,b],v)=>{const y=[v,f].filter(Boolean).join(".");return typeof b=="object"?Object.entries(b).flatMap(S=>u(S,y)):[[n.getToken("declaration",y),b]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(f=>u(f))),ref:f=>i("reference",f.toString())}}})})})});const[mn,_n,Li]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],bf=vf().core(({theme:t})=>({color:{black:mn,white:_n,lowest:t.mode==="light"?_n:mn,highest:t.mode==="light"?mn:_n,...vn({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:bn}),...vn({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:bn}),...vn({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:bn})},typography:{}})).semantic(({core:t,raw:e,theme:r})=>{const n=(a,i)=>e.core.color[a].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":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:Li,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:t,theme:e,semantic:r,core:n})=>{const a=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{app:{bg:n(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":n(e.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Li,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":n(e.mode==="dark"?"color.a-8":"color.a-11")}}}),wf=gf({prefix:"i-"}),mf=t=>{const e=bf.from({theme:t,getToken:wf}),r=Object.entries(e.declarations).map(([n,a])=>`${n}: ${a};`);return`${xi} {
1
+ (function(){"use strict";var Po=t=>t;function Lo(){return{"~standard":{vendor:"inploi",version:1,validate:t=>({value:t})}}}function Np(t){return t}var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vo=Array.isArray,Sr=Vo,jo=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue,zo=jo,Ro=zo,Bo=typeof self=="object"&&self&&self.Object===Object&&self,Uo=Ro||Bo||Function("return this")(),Cr=Uo,Ho=Cr,qo=Ho.Symbol,$r=qo,jn=$r,zn=Object.prototype,Ko=zn.hasOwnProperty,Go=zn.toString,me=jn?jn.toStringTag:void 0;function Wo(t){var e=Ko.call(t,me),r=t[me];try{t[me]=void 0;var n=!0}catch{}var a=Go.call(t);return n&&(e?t[me]=r:delete t[me]),a}var Yo=Wo,Jo=Object.prototype,Zo=Jo.toString;function Xo(t){return Zo.call(t)}var Qo=Xo,Rn=$r,ts=Yo,es=Qo,rs="[object Null]",ns="[object Undefined]",Bn=Rn?Rn.toStringTag:void 0;function as(t){return t==null?t===void 0?ns:rs:Bn&&Bn in Object(t)?ts(t):es(t)}var Un=as;function is(t){return t!=null&&typeof t=="object"}var os=is,ss=Un,ls=os,cs="[object Symbol]";function us(t){return typeof t=="symbol"||ls(t)&&ss(t)==cs}var Er=us,ds=Sr,fs=Er,hs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ps=/^\w*$/;function gs(t,e){if(ds(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||fs(t)?!0:ps.test(t)||!hs.test(t)||e!=null&&t in Object(e)}var vs=gs;function bs(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Hn=bs,ws=Un,ms=Hn,_s="[object AsyncFunction]",ys="[object Function]",xs="[object GeneratorFunction]",ks="[object Proxy]";function Ss(t){if(!ms(t))return!1;var e=ws(t);return e==ys||e==xs||e==_s||e==ks}var Cs=Ss,$s=Cr,Es=$s["__core-js_shared__"],Is=Es,Ir=Is,qn=function(){var t=/[^.]+$/.exec(Ir&&Ir.keys&&Ir.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ts(t){return!!qn&&qn in t}var As=Ts,Ms=Function.prototype,Ns=Ms.toString;function Os(t){if(t!=null){try{return Ns.call(t)}catch{}try{return t+""}catch{}}return""}var Fs=Os,Ds=Cs,Ps=As,Ls=Hn,Vs=Fs,js=/[\\^$.*+?()[\]{}|]/g,zs=/^\[object .+?Constructor\]$/,Rs=Function.prototype,Bs=Object.prototype,Us=Rs.toString,Hs=Bs.hasOwnProperty,qs=RegExp("^"+Us.call(Hs).replace(js,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ks(t){if(!Ls(t)||Ps(t))return!1;var e=Ds(t)?qs:zs;return e.test(Vs(t))}var Gs=Ks;function Ws(t,e){return t==null?void 0:t[e]}var Ys=Ws,Js=Gs,Zs=Ys;function Xs(t,e){var r=Zs(t,e);return Js(r)?r:void 0}var Kn=Xs,Qs=Kn,tl=Qs(Object,"create"),He=tl,Gn=He;function el(){this.__data__=Gn?Gn(null):{},this.size=0}var rl=el;function nl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var al=nl,il=He,ol="__lodash_hash_undefined__",sl=Object.prototype,ll=sl.hasOwnProperty;function cl(t){var e=this.__data__;if(il){var r=e[t];return r===ol?void 0:r}return ll.call(e,t)?e[t]:void 0}var ul=cl,dl=He,fl=Object.prototype,hl=fl.hasOwnProperty;function pl(t){var e=this.__data__;return dl?e[t]!==void 0:hl.call(e,t)}var gl=pl,vl=He,bl="__lodash_hash_undefined__";function wl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=vl&&e===void 0?bl:e,this}var ml=wl,_l=rl,yl=al,xl=ul,kl=gl,Sl=ml;function ae(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ae.prototype.clear=_l,ae.prototype.delete=yl,ae.prototype.get=xl,ae.prototype.has=kl,ae.prototype.set=Sl;var Cl=ae;function $l(){this.__data__=[],this.size=0}var El=$l;function Il(t,e){return t===e||t!==t&&e!==e}var Tl=Il,Al=Tl;function Ml(t,e){for(var r=t.length;r--;)if(Al(t[r][0],e))return r;return-1}var qe=Ml,Nl=qe,Ol=Array.prototype,Fl=Ol.splice;function Dl(t){var e=this.__data__,r=Nl(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Fl.call(e,r,1),--this.size,!0}var Pl=Dl,Ll=qe;function Vl(t){var e=this.__data__,r=Ll(e,t);return r<0?void 0:e[r][1]}var jl=Vl,zl=qe;function Rl(t){return zl(this.__data__,t)>-1}var Bl=Rl,Ul=qe;function Hl(t,e){var r=this.__data__,n=Ul(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var ql=Hl,Kl=El,Gl=Pl,Wl=jl,Yl=Bl,Jl=ql;function ie(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ie.prototype.clear=Kl,ie.prototype.delete=Gl,ie.prototype.get=Wl,ie.prototype.has=Yl,ie.prototype.set=Jl;var Zl=ie,Xl=Kn,Ql=Cr,tc=Xl(Ql,"Map"),ec=tc,Wn=Cl,rc=Zl,nc=ec;function ac(){this.size=0,this.__data__={hash:new Wn,map:new(nc||rc),string:new Wn}}var ic=ac;function oc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var sc=oc,lc=sc;function cc(t,e){var r=t.__data__;return lc(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ke=cc,uc=Ke;function dc(t){var e=uc(this,t).delete(t);return this.size-=e?1:0,e}var fc=dc,hc=Ke;function pc(t){return hc(this,t).get(t)}var gc=pc,vc=Ke;function bc(t){return vc(this,t).has(t)}var wc=bc,mc=Ke;function _c(t,e){var r=mc(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var yc=_c,xc=ic,kc=fc,Sc=gc,Cc=wc,$c=yc;function oe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}oe.prototype.clear=xc,oe.prototype.delete=kc,oe.prototype.get=Sc,oe.prototype.has=Cc,oe.prototype.set=$c;var Ec=oe,Yn=Ec,Ic="Expected a function";function Tr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ic);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Tr.Cache||Yn),r}Tr.Cache=Yn;var Tc=Tr,Ac=Tc,Mc=500;function Nc(t){var e=Ac(t,function(n){return r.size===Mc&&r.clear(),n}),r=e.cache;return e}var Oc=Nc,Fc=Oc,Dc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pc=/\\(\\)?/g,Lc=Fc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Dc,function(r,n,a,i){e.push(a?i.replace(Pc,"$1"):n||r)}),e}),Vc=Lc;function jc(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var zc=jc,Jn=$r,Rc=zc,Bc=Sr,Uc=Er,Hc=1/0,Zn=Jn?Jn.prototype:void 0,Xn=Zn?Zn.toString:void 0;function Qn(t){if(typeof t=="string")return t;if(Bc(t))return Rc(t,Qn)+"";if(Uc(t))return Xn?Xn.call(t):"";var e=t+"";return e=="0"&&1/t==-Hc?"-0":e}var qc=Qn,Kc=qc;function Gc(t){return t==null?"":Kc(t)}var Wc=Gc,Yc=Sr,Jc=vs,Zc=Vc,Xc=Wc;function Qc(t,e){return Yc(t)?t:Jc(t,e)?[t]:Zc(Xc(t))}var tu=Qc,eu=Er,ru=1/0;function nu(t){if(typeof t=="string"||eu(t))return t;var e=t+"";return e=="0"&&1/t==-ru?"-0":e}var au=nu,iu=tu,ou=au;function su(t,e){e=iu(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[ou(e[r++])];return r&&r==n?t:void 0}var lu=su,cu=lu;function uu(t,e,r){var n=t==null?void 0:cu(t,e);return n===void 0?r:n}var du=uu;const _e=kr(du);var ye,C,ta,ea,Gt,ra,na,Ar,aa,se={},ia=[],fu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ge=Array.isArray;function At(t,e){for(var r in e)t[r]=e[r];return t}function oa(t){var e=t.parentNode;e&&e.removeChild(t)}function dt(t,e,r){var n,a,i,o={};for(i in e)i=="key"?n=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?ye.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return xe(t,o,n,a,null)}function xe(t,e,r,n,a){var i={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++ta};return a==null&&C.vnode!=null&&C.vnode(i),i}function hu(){return{current:null}}function J(t){return t.children}function mt(t,e){this.props=t,this.context=e}function We(t,e){if(e==null)return t.__?We(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"?We(t):null}function sa(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 sa(t)}}function Mr(t){(!t.__d&&(t.__d=!0)&&Gt.push(t)&&!Ye.__r++||ra!==C.debounceRendering)&&((ra=C.debounceRendering)||na)(Ye)}function Ye(){var t,e,r,n,a,i,o,s,l;for(Gt.sort(Ar);t=Gt.shift();)t.__d&&(e=Gt.length,n=void 0,a=void 0,i=void 0,s=(o=(r=t).__v).__e,(l=r.__P)&&(n=[],a=[],(i=At({},o)).__v=o.__v+1,Nr(l,o,i,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??We(o),o.__h,a),pa(n,o,a),o.__e!=s&&sa(o)),Gt.length>e&&Gt.sort(Ar));Ye.__r=0}function la(t,e,r,n,a,i,o,s,l,h,p){var u,f,b,v,y,S,x,m,A,P,M=0,H=n&&n.__k||ia,at=H.length,gt=at,L=e.length;for(r.__k=[],u=0;u<L;u++)(v=r.__k[u]=(v=e[u])==null||typeof v=="boolean"||typeof v=="function"?null:typeof v=="string"||typeof v=="number"||typeof v=="bigint"?xe(null,v,null,null,v):Ge(v)?xe(J,{children:v},null,null,null):v.__b>0?xe(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null&&(v.__=r,v.__b=r.__b+1,(m=pu(v,H,x=u+M,gt))===-1?b=se:(b=H[m]||se,H[m]=void 0,gt--),Nr(t,v,b,a,i,o,s,l,h,p),y=v.__e,(f=v.ref)&&b.ref!=f&&(b.ref&&Or(b.ref,null,v),p.push(f,v.__c||y,v)),y!=null&&(S==null&&(S=y),P=!(A=b===se||b.__v===null)&&m===x,A?m==-1&&M--:m!==x&&(m===x+1?(M++,P=!0):m>x?gt>L-x?(M+=m-x,P=!0):M--:M=m<x&&m==x-1?m-x:0),x=u+M,P=P||m==u&&!A,typeof v.type!="function"||m===x&&b.__k!==v.__k?typeof v.type=="function"||P?v.__d!==void 0?(l=v.__d,v.__d=void 0):l=y.nextSibling:l=ua(t,y,l):l=ca(v,l,t),typeof r.type=="function"&&(r.__d=l)));for(r.__e=S,u=at;u--;)H[u]!=null&&(typeof r.type=="function"&&H[u].__e!=null&&H[u].__e==r.__d&&(r.__d=H[u].__e.nextSibling),ga(H[u],H[u]))}function ca(t,e,r){for(var n,a=t.__k,i=0;a&&i<a.length;i++)(n=a[i])&&(n.__=t,e=typeof n.type=="function"?ca(n,e,r):ua(r,n.__e,e));return e}function Mt(t,e){return e=e||[],t==null||typeof t=="boolean"||(Ge(t)?t.some(function(r){Mt(r,e)}):e.push(t)),e}function ua(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 pu(t,e,r,n){var a=t.key,i=t.type,o=r-1,s=r+1,l=e[r];if(l===null||l&&a==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<e.length;){if(o>=0){if((l=e[o])&&a==l.key&&i===l.type)return o;o--}if(s<e.length){if((l=e[s])&&a==l.key&&i===l.type)return s;s++}}return-1}function gu(t,e,r,n,a){var i;for(i in r)i==="children"||i==="key"||i in e||Je(t,i,null,r[i],n);for(i in e)a&&typeof e[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===e[i]||Je(t,i,e[i],r[i],n)}function da(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||fu.test(e)?r:r+"px"}function Je(t,e,r,n,a){var i;t:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||da(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||da(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n||t.addEventListener(e,i?ha:fa,i):t.removeEventListener(e,i?ha:fa,i);else if(e!=="dangerouslySetInnerHTML"){if(a)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function fa(t){return this.l[t.type+!1](C.event?C.event(t):t)}function ha(t){return this.l[t.type+!0](C.event?C.event(t):t)}function Nr(t,e,r,n,a,i,o,s,l,h){var p,u,f,b,v,y,S,x,m,A,P,M,H,at,gt,L=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=e.__e=r.__e,e.__h=null,i=[s]),(p=C.__b)&&p(e);try{t:if(typeof L=="function"){if(x=e.props,m=(p=L.contextType)&&n[p.__c],A=p?m?m.props.value:p.__:n,r.__c?S=(u=e.__c=r.__c).__=u.__E:("prototype"in L&&L.prototype.render?e.__c=u=new L(x,A):(e.__c=u=new mt(x,A),u.constructor=L,u.render=bu),m&&m.sub(u),u.props=x,u.state||(u.state={}),u.context=A,u.__n=n,f=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),L.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=At({},u.__s)),At(u.__s,L.getDerivedStateFromProps(x,u.__s))),b=u.props,v=u.state,u.__v=e,f)L.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L.getDerivedStateFromProps==null&&x!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(x,A),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(x,u.__s,A)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(u.props=x,u.state=u.__s,u.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(ct){ct&&(ct.__=e)}),P=0;P<u._sb.length;P++)u.__h.push(u._sb[P]);u._sb=[],u.__h.length&&o.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(x,u.__s,A),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,v,y)})}if(u.context=A,u.props=x,u.__P=t,u.__e=!1,M=C.__r,H=0,"prototype"in L&&L.prototype.render){for(u.state=u.__s,u.__d=!1,M&&M(e),p=u.render(u.props,u.state,u.context),at=0;at<u._sb.length;at++)u.__h.push(u._sb[at]);u._sb=[]}else do u.__d=!1,M&&M(e),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++H<25);u.state=u.__s,u.getChildContext!=null&&(n=At(At({},n),u.getChildContext())),f||u.getSnapshotBeforeUpdate==null||(y=u.getSnapshotBeforeUpdate(b,v)),la(t,Ge(gt=p!=null&&p.type===J&&p.key==null?p.props.children:p)?gt:[gt],e,r,n,a,i,o,s,l,h),u.base=e.__e,e.__h=null,u.__h.length&&o.push(u),S&&(u.__E=u.__=null)}else i==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=vu(r.__e,e,r,n,a,i,o,l,h);(p=C.diffed)&&p(e)}catch(ct){e.__v=null,(l||i!=null)&&(e.__e=s,e.__h=!!l,i[i.indexOf(s)]=null),C.__e(ct,e,r)}}function pa(t,e,r){for(var n=0;n<r.length;n++)Or(r[n],r[++n],r[++n]);C.__c&&C.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(i){i.call(a)})}catch(i){C.__e(i,a.__v)}})}function vu(t,e,r,n,a,i,o,s,l){var h,p,u,f=r.props,b=e.props,v=e.type,y=0;if(v==="svg"&&(a=!0),i!=null){for(;y<i.length;y++)if((h=i[y])&&"setAttribute"in h==!!v&&(v?h.localName===v:h.nodeType===3)){t=h,i[y]=null;break}}if(t==null){if(v===null)return document.createTextNode(b);t=a?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,b.is&&b),i=null,s=!1}if(v===null)f===b||s&&t.data===b||(t.data=b);else{if(i=i&&ye.call(t.childNodes),p=(f=r.props||se).dangerouslySetInnerHTML,u=b.dangerouslySetInnerHTML,!s){if(i!=null)for(f={},y=0;y<t.attributes.length;y++)f[t.attributes[y].name]=t.attributes[y].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(gu(t,b,f,a,s),u)e.__k=[];else if(la(t,Ge(y=e.props.children)?y:[y],e,r,n,a&&v!=="foreignObject",i,o,i?i[0]:r.__k&&We(r,0),s,l),i!=null)for(y=i.length;y--;)i[y]!=null&&oa(i[y]);s||("value"in b&&(y=b.value)!==void 0&&(y!==t.value||v==="progress"&&!y||v==="option"&&y!==f.value)&&Je(t,"value",y,f.value,!1),"checked"in b&&(y=b.checked)!==void 0&&y!==t.checked&&Je(t,"checked",y,f.checked,!1))}return t}function Or(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(n){C.__e(n,r)}}function ga(t,e,r){var n,a;if(C.unmount&&C.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||Or(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){C.__e(i,e)}n.base=n.__P=null,t.__c=void 0}if(n=t.__k)for(a=0;a<n.length;a++)n[a]&&ga(n[a],e,r||typeof t.type!="function");r||t.__e==null||oa(t.__e),t.__=t.__e=t.__d=void 0}function bu(t,e,r){return this.constructor(t,r)}function le(t,e,r){var n,a,i,o;C.__&&C.__(t,e),a=(n=typeof r=="function")?null:r&&r.__k||e.__k,i=[],o=[],Nr(e,t=(!n&&r||e).__k=dt(J,null,[t]),a||se,se,e.ownerSVGElement!==void 0,!n&&r?[r]:a?null:e.firstChild?ye.call(e.childNodes):null,i,!n&&r?r:a?a.__e:e.firstChild,n,o),pa(i,t,o)}function va(t,e){le(t,e,va)}function wu(t,e,r){var n,a,i,o,s=At({},t.props);for(i in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)i=="key"?n=e[i]:i=="ref"?a=e[i]:s[i]=e[i]===void 0&&o!==void 0?o[i]:e[i];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):r),xe(t.type,s,n||t.key,a||t.ref,null)}function ba(t,e){var r={__c:e="__cC"+aa++,__:t,Consumer:function(n,a){return n.children(a)},Provider:function(n){var a,i;return this.getChildContext||(a=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&a.some(function(s){s.__e=!0,Mr(s)})},this.sub=function(o){a.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){a.splice(a.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}ye=ia.slice,C={__e:function(t,e,r,n){for(var a,i,o;e=e.__;)if((a=e.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(t)),o=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(t,n||{}),o=a.__d),o)return a.__E=a}catch(s){t=s}throw t}},ta=0,ea=function(t){return t!=null&&t.constructor===void 0},mt.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=At({},this.state),typeof t=="function"&&(t=t(At({},r),this.props)),t&&At(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Mr(this))},mt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Mr(this))},mt.prototype.render=J,Gt=[],na=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(t,e){return t.__v.__b-e.__v.__b},Ye.__r=0,aa=0;function wa(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=wa(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Lt(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=wa(t))&&(n&&(n+=" "),n+=e);return n}const ma=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,_a=Lt,Wt=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return _a(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=e,o=Object.keys(a).map(h=>{const p=r==null?void 0:r[h],u=i==null?void 0:i[h];if(p===null)return null;const f=ma(p)||ma(u);return a[h][f]}),s=r&&Object.entries(r).reduce((h,p)=>{let[u,f]=p;return f===void 0||(h[u]=f),h},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((h,p)=>{let{class:u,className:f,...b}=p;return Object.entries(b).every(v=>{let[y,S]=v;return Array.isArray(S)?S.includes({...i,...s}[y]):{...i,...s}[y]===S})?[...h,u,f]:h},[]);return _a(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var Vt,z,Fr,ya,ce=0,xa=[],Ze=[],ka=C.__b,Sa=C.__r,Ca=C.diffed,$a=C.__c,Ea=C.unmount;function ue(t,e){C.__h&&C.__h(z,t,ce||e),ce=0;var r=z.__H||(z.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:Ze}),r.__[t]}function vt(t){return ce=1,Ia(Ma,t)}function Ia(t,e,r){var n=ue(Vt++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):Ma(void 0,e),function(s){var l=n.__N?n.__N[0]:n.__[0],h=n.t(l,s);l!==h&&(n.__N=[h,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){var a=function(s,l,h){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(f){return f.__c});if(p.every(function(f){return!f.__N}))return!i||i.call(this,s,l,h);var u=!1;return p.forEach(function(f){if(f.__N){var b=f.__[0];f.__=f.__N,f.__N=void 0,b!==f.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!i||i.call(this,s,l,h))};z.u=!0;var i=z.shouldComponentUpdate,o=z.componentWillUpdate;z.componentWillUpdate=function(s,l,h){if(this.__e){var p=i;i=void 0,a(s,l,h),i=p}o&&o.call(this,s,l,h)},z.shouldComponentUpdate=a}return n.__N||n.__}function _t(t,e){var r=ue(Vt++,3);!C.__s&&Pr(r.__H,e)&&(r.__=t,r.i=e,z.__H.__h.push(r))}function ft(t,e){var r=ue(Vt++,4);!C.__s&&Pr(r.__H,e)&&(r.__=t,r.i=e,z.__h.push(r))}function ht(t){return ce=5,Nt(function(){return{current:t}},[])}function mu(t,e,r){ce=6,ft(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 Nt(t,e){var r=ue(Vt++,7);return Pr(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function _u(t,e){return ce=8,Nt(function(){return t},e)}function Ta(t){var e=z.context[t.__c],r=ue(Vt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(z)),e.props.value):t.__}function yu(t,e){C.useDebugValue&&C.useDebugValue(e?e(t):t)}function xu(){var t=ue(Vt++,11);if(!t.__){for(var e=z.__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 ku(){for(var t;t=xa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Xe),t.__H.__h.forEach(Dr),t.__H.__h=[]}catch(e){t.__H.__h=[],C.__e(e,t.__v)}}C.__b=function(t){z=null,ka&&ka(t)},C.__r=function(t){Sa&&Sa(t),Vt=0;var e=(z=t.__c).__H;e&&(Fr===z?(e.__h=[],z.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Ze,r.__N=r.i=void 0})):(e.__h.forEach(Xe),e.__h.forEach(Dr),e.__h=[],Vt=0)),Fr=z},C.diffed=function(t){Ca&&Ca(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(xa.push(e)!==1&&ya===C.requestAnimationFrame||((ya=C.requestAnimationFrame)||Su)(ku)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Ze&&(r.__=r.__V),r.i=void 0,r.__V=Ze})),Fr=z=null},C.__c=function(t,e){e.some(function(r){try{r.__h.forEach(Xe),r.__h=r.__h.filter(function(n){return!n.__||Dr(n)})}catch(n){e.some(function(a){a.__h&&(a.__h=[])}),e=[],C.__e(n,r.__v)}}),$a&&$a(t,e)},C.unmount=function(t){Ea&&Ea(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Xe(n)}catch(a){e=a}}),r.__H=void 0,e&&C.__e(e,r.__v))};var Aa=typeof requestAnimationFrame=="function";function Su(t){var e,r=function(){clearTimeout(n),Aa&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);Aa&&(e=requestAnimationFrame(r))}function Xe(t){var e=z,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),z=e}function Dr(t){var e=z;t.__c=t.__(),z=e}function Pr(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function Ma(t,e){return typeof e=="function"?e(t):e}function Na(t,e){for(var r in e)t[r]=e[r];return t}function Lr(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function Vr(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function jr(t){this.props=t}function Cu(t,e){function r(a){var i=this.props.ref,o=i==a.ref;return!o&&i&&(i.call?i(null):i.current=null),e?!e(this.props,a)||!o:Lr(this.props,a)}function n(a){return this.shouldComponentUpdate=r,dt(t,a)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(jr.prototype=new mt).isPureReactComponent=!0,jr.prototype.shouldComponentUpdate=function(t,e){return Lr(this.props,t)||Lr(this.state,e)};var Oa=C.__b;C.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Oa&&Oa(t)};var $u=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function zr(t){function e(r){var n=Na({},r);return delete n.ref,t(n,r.ref||null)}return e.$$typeof=$u,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Fa=function(t,e){return t==null?null:Mt(Mt(t).map(e))},Eu={map:Fa,forEach:Fa,count:function(t){return t?Mt(t).length:0},only:function(t){var e=Mt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Mt},Iu=C.__e;C.__e=function(t,e,r,n){if(t.then){for(var a,i=e;i=i.__;)if((a=i.__c)&&a.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),a.__c(t,e)}Iu(t,e,r,n)};var Da=C.unmount;function Pa(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),t.__c.__H=null),(t=Na({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(n){return Pa(n,e,r)})),t}function La(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(n){return La(n,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 ke(){this.__u=0,this.t=null,this.__b=null}function Va(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ja(t){var e,r,n;function a(i){if(e||(e=t()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw e;return dt(r,i)}return a.displayName="Lazy",a.__f=!0,a}function Se(){this.u=null,this.o=null}C.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Da&&Da(t)},(ke.prototype=new mt).__c=function(t,e){var r=e.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var a=Va(n.__v),i=!1,o=function(){i||(i=!0,r.__R=null,a?a(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var h=n.state.__a;n.__v.__k[0]=La(h,h.__c.__P,h.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.t.pop();)p.forceUpdate()}},l=e.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),t.then(o,o)},ke.prototype.componentWillUnmount=function(){this.t=[]},ke.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Pa(this.__b,r,n.__O=n.__P)}this.__b=null}var a=e.__a&&dt(J,null,t.fallback);return a&&(a.__h=null),[dt(J,null,e.__a?null:t.children),a]};var za=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 Tu(t){return this.getChildContext=function(){return t.context},t.children}function Au(t){var e=this,r=t.i;e.componentWillUnmount=function(){le(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(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),le(dt(Tu,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Mu(t,e){var r=dt(Au,{__v:t,i:e});return r.containerInfo=e,r}(Se.prototype=new mt).__a=function(t){var e=this,r=Va(e.__v),n=e.o.get(t);return n[0]++,function(a){var i=function(){e.props.revealOrder?(n.push(a),za(e,t,n)):a()};r?r(i):i()}},Se.prototype.render=function(t){this.u=null,this.o=new Map;var e=Mt(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},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){za(t,r,e)})};var Ra=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Nu=/^(?: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]/,Ou=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Fu=/[A-Z0-9]/g,Du=typeof document<"u",Pu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Lu(t,e,r){return e.__k==null&&(e.textContent=""),le(t,e),typeof r=="function"&&r(),t?t.__c:null}function Vu(t,e,r){return va(t,e),typeof r=="function"&&r(),t?t.__c:null}mt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(mt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ba=C.event;function ju(){}function zu(){return this.cancelBubble}function Ru(){return this.defaultPrevented}C.event=function(t){return Ba&&(t=Ba(t)),t.persist=ju,t.isPropagationStopped=zu,t.isDefaultPrevented=Ru,t.nativeEvent=t};var Rr,Bu={enumerable:!1,configurable:!0,get:function(){return this.class}},Ua=C.vnode;C.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,n=e.type,a={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Du&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Pu(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Ou.test(i)?i=s:n.indexOf("-")===-1&&Nu.test(i)?i=i.replace(Fu,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&a[i=s]&&(i="oninputCapture"),a[i]=o}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=Mt(r.children).forEach(function(l){l.props.selected=a.value.indexOf(l.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=Mt(r.children).forEach(function(l){l.props.selected=a.multiple?a.defaultValue.indexOf(l.props.value)!=-1:a.defaultValue==l.props.value})),r.class&&!r.className?(a.class=r.class,Object.defineProperty(a,"className",Bu)):(r.className&&!r.class||r.class&&r.className)&&(a.class=a.className=r.className),e.props=a}(t),t.$$typeof=Ra,Ua&&Ua(t)};var Ha=C.__r;C.__r=function(t){Ha&&Ha(t),Rr=t.__c};var qa=C.diffed;C.diffed=function(t){qa&&qa(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),Rr=null};var Uu={ReactCurrentDispatcher:{current:{readContext:function(t){return Rr.__n[t.__c].props.value}}}};function Hu(t){return dt.bind(null,t)}function Ka(t){return!!t&&t.$$typeof===Ra}function qu(t){return Ka(t)?wu.apply(null,arguments):t}function Ku(t){return!!t.__k&&(le(null,t),!0)}function Gu(t){return t&&(t.base||t.nodeType===1&&t)||null}var Wu=function(t,e){return t(e)},Yu=function(t,e){return t(e)},Ju=J;function Ga(t){t()}function Zu(t){return t}function Xu(){return[!1,Ga]}var Qu=ft;function td(t,e){var r=e(),n=vt({h:{__:r,v:e}}),a=n[0].h,i=n[1];return ft(function(){a.__=r,a.v=e,Vr(a.__,e())||i({h:a})},[t,r,e]),_t(function(){return Vr(a.__,a.v())||i({h:a}),t(function(){Vr(a.__,a.v())||i({h:a})})},[t]),r}var kt={useState:vt,useId:xu,useReducer:Ia,useEffect:_t,useLayoutEffect:ft,useInsertionEffect:Qu,useTransition:Xu,useDeferredValue:Zu,useSyncExternalStore:td,startTransition:Ga,useRef:ht,useImperativeHandle:mu,useMemo:Nt,useCallback:_u,useContext:Ta,useDebugValue:yu,version:"17.0.2",Children:Eu,render:Lu,hydrate:Vu,unmountComponentAtNode:Ku,createPortal:Mu,createElement:dt,createContext:ba,createFactory:Hu,cloneElement:qu,createRef:hu,Fragment:J,isValidElement:Ka,findDOMNode:Gu,Component:mt,PureComponent:jr,memo:Cu,forwardRef:zr,flushSync:Yu,unstable_batchedUpdates:Wu,StrictMode:Ju,Suspense:ke,SuspenseList:Se,lazy:ja,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Uu};const st=Symbol.for("@ts-pattern/matcher"),Wa=Symbol.for("@ts-pattern/isVariadic"),Qe="@ts-pattern/anonymous-select-key",Br=t=>!!(t&&typeof t=="object"),tr=t=>t&&!!t[st],Z=(t,e,r)=>{if(tr(t)){const n=t[st](),{matched:a,selections:i}=n.match(e);return a&&i&&Object.keys(i).forEach(o=>r(o,i[o])),a}if(Br(t)){if(!Br(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let n=[],a=[],i=[];for(const o of t.keys()){const s=t[o];tr(s)&&s[Wa]?i.push(s):i.length?a.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<n.length+a.length)return!1;const o=e.slice(0,n.length),s=a.length===0?[]:e.slice(-a.length),l=e.slice(n.length,a.length===0?1/0:-a.length);return n.every((h,p)=>Z(h,o[p],r))&&a.every((h,p)=>Z(h,s[p],r))&&(i.length===0||Z(i[0],l,r))}return t.length===e.length&&t.every((o,s)=>Z(o,e[s],r))}return Object.keys(t).every(n=>{const a=t[n];return(n in e||tr(i=a)&&i[st]().matcherType==="optional")&&Z(a,e[n],r);var i})}return Object.is(e,t)},pt=t=>{var e,r,n;return Br(t)?tr(t)?(e=(r=(n=t[st]()).getSelectionKeys)==null?void 0:r.call(n))!=null?e:[]:Array.isArray(t)?Ce(t,pt):Ce(Object.values(t),pt):[]},Ce=(t,e)=>t.reduce((r,n)=>r.concat(e(n)),[]);function ed(...t){if(t.length===1){const[e]=t;return r=>Z(e,r,()=>{})}if(t.length===2){const[e,r]=t;return Z(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function tt(t){return Object.assign(t,{optional:()=>Hr(t),and:e=>R(t,e),or:e=>Ya(t,e),select:e=>e===void 0?$e(t):$e(e,t)})}function Ur(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[Wa]:!0})}}))(t),{optional:()=>Ur(Hr(t)),select:e=>Ur(e===void 0?$e(t):$e(e,t))})}function Hr(t){return tt({[st]:()=>({match:e=>{let r={};const n=(a,i)=>{r[a]=i};return e===void 0?(pt(t).forEach(a=>n(a,void 0)),{matched:!0,selections:r}):{matched:Z(t,e,n),selections:r}},getSelectionKeys:()=>pt(t),matcherType:"optional"})})}const rd=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},nd=(t,e)=>{for(const[r,n]of t.entries())if(!e(n,r))return!1;return!0};function R(...t){return tt({[st]:()=>({match:e=>{let r={};const n=(a,i)=>{r[a]=i};return{matched:t.every(a=>Z(a,e,n)),selections:r}},getSelectionKeys:()=>Ce(t,pt),matcherType:"and"})})}function Ya(...t){return tt({[st]:()=>({match:e=>{let r={};const n=(a,i)=>{r[a]=i};return Ce(t,pt).forEach(a=>n(a,void 0)),{matched:t.some(a=>Z(a,e,n)),selections:r}},getSelectionKeys:()=>Ce(t,pt),matcherType:"or"})})}function O(t){return{[st]:()=>({match:e=>({matched:!!t(e)})})}}function $e(...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 tt({[st]:()=>({match:n=>{let a={[e??Qe]:n};return{matched:r===void 0||Z(r,n,(i,o)=>{a[i]=o}),selections:a}},getSelectionKeys:()=>[e??Qe].concat(r===void 0?[]:pt(r))})})}function St(t){return typeof t=="number"}function Yt(t){return typeof t=="string"}function jt(t){return typeof t=="bigint"}const Ja=tt(O(function(t){return!0})),ad=Ja,Jt=t=>Object.assign(tt(t),{startsWith:e=>{return Jt(R(t,(r=e,O(n=>Yt(n)&&n.startsWith(r)))));var r},endsWith:e=>{return Jt(R(t,(r=e,O(n=>Yt(n)&&n.endsWith(r)))));var r},minLength:e=>Jt(R(t,(r=>O(n=>Yt(n)&&n.length>=r))(e))),maxLength:e=>Jt(R(t,(r=>O(n=>Yt(n)&&n.length<=r))(e))),includes:e=>{return Jt(R(t,(r=e,O(n=>Yt(n)&&n.includes(r)))));var r},regex:e=>{return Jt(R(t,(r=e,O(n=>Yt(n)&&!!n.match(r)))));var r}}),id=Jt(O(Yt)),Ct=t=>Object.assign(tt(t),{between:(e,r)=>Ct(R(t,((n,a)=>O(i=>St(i)&&n<=i&&a>=i))(e,r))),lt:e=>Ct(R(t,(r=>O(n=>St(n)&&n<r))(e))),gt:e=>Ct(R(t,(r=>O(n=>St(n)&&n>r))(e))),lte:e=>Ct(R(t,(r=>O(n=>St(n)&&n<=r))(e))),gte:e=>Ct(R(t,(r=>O(n=>St(n)&&n>=r))(e))),int:()=>Ct(R(t,O(e=>St(e)&&Number.isInteger(e)))),finite:()=>Ct(R(t,O(e=>St(e)&&Number.isFinite(e)))),positive:()=>Ct(R(t,O(e=>St(e)&&e>0))),negative:()=>Ct(R(t,O(e=>St(e)&&e<0)))}),od=Ct(O(St)),zt=t=>Object.assign(tt(t),{between:(e,r)=>zt(R(t,((n,a)=>O(i=>jt(i)&&n<=i&&a>=i))(e,r))),lt:e=>zt(R(t,(r=>O(n=>jt(n)&&n<r))(e))),gt:e=>zt(R(t,(r=>O(n=>jt(n)&&n>r))(e))),lte:e=>zt(R(t,(r=>O(n=>jt(n)&&n<=r))(e))),gte:e=>zt(R(t,(r=>O(n=>jt(n)&&n>=r))(e))),positive:()=>zt(R(t,O(e=>jt(e)&&e>0))),negative:()=>zt(R(t,O(e=>jt(e)&&e<0)))}),sd=zt(O(jt)),ld=tt(O(function(t){return typeof t=="boolean"})),cd=tt(O(function(t){return typeof t=="symbol"})),ud=tt(O(function(t){return t==null}));var F={__proto__:null,matcher:st,optional:Hr,array:function(...t){return Ur({[st]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let n={};if(e.length===0)return pt(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const a=(i,o)=>{n[i]=(n[i]||[]).concat([o])};return{matched:e.every(i=>Z(r,i,a)),selections:n}},getSelectionKeys:()=>t.length===0?[]:pt(t[0])})})},set:function(...t){return tt({[st]:()=>({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 n=(i,o)=>{r[i]=(r[i]||[]).concat([o])},a=t[0];return{matched:rd(e,i=>Z(a,i,n)),selections:r}},getSelectionKeys:()=>t.length===0?[]:pt(t[0])})})},map:function(...t){return tt({[st]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(t.length===0)return{matched:!0};var a;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=t[0])==null?void 0:a.toString()}`);const[i,o]=t;return{matched:nd(e,(s,l)=>{const h=Z(i,l,n),p=Z(o,s,n);return h&&p}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...pt(t[0]),...pt(t[1])]})})},intersection:R,union:Ya,not:function(t){return tt({[st]:()=>({match:e=>({matched:!Z(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:O,select:$e,any:Ja,_:ad,string:id,number:od,bigint:sd,boolean:ld,symbol:cd,nullish:ud,instanceOf:function(t){return tt(O(function(e){return r=>r instanceof e}(t)))},shape:function(t){return tt(O(ed(t)))}};const qr={matched:!1,value:void 0};function Zt(t){return new er(t,qr)}class er{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],n=[e[0]];let a;e.length===3&&typeof e[1]=="function"?a=e[1]:e.length>2&&n.push(...e.slice(1,e.length-1));let i=!1,o={};const s=(h,p)=>{i=!0,o[h]=p},l=!n.some(h=>Z(h,this.input,s))||a&&!a(this.input)?qr:{matched:!0,value:r(i?Qe in o?o[Qe]:o:this.input,this.input)};return new er(this.input,l)}when(e,r){if(this.state.matched)return this;const n=!!e(this.input);return new er(this.input,n?{matched:!0,value:r(this.input,this.input)}:qr)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}run(){return this.exhaustive()}returnType(){return this}}var dd=["other","few","many","two","one","zero"],Za=({terms:t,overrides:e,locale:r})=>{const n=new Intl.PluralRules(r);function a(i,o){const s=(e==null?void 0:e[i])??t[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,h)=>{var p;return((p=o==null?void 0:o[h])==null?void 0:p.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let l=n.select(o.count);if(!(l in s)){const h=dd.find(p=>p in s);if(!h)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);l=h}return s[l].replace(/{{(\w+)}}/g,(h,p)=>{var u;return((u=o==null?void 0:o[p])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${i.toString()}”.`)}}return a},fd=0;function c(t,e,r,n,a,i){var o,s,l={};for(s in e)s=="ref"?o=e[s]:l[s]=e[s];var h={type:t,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--fd,__source:a,__self:i};if(typeof t=="function"&&(o=t.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return C.vnode&&C.vnode(h),h}var Xa=ba(null),hd=t=>({defaultTerms:t,TranslationProvider:({terms:e,children:r,locale:n})=>{const a=Nt(()=>Za({locale:n,terms:t,overrides:e}),[e,n]);return c(Xa.Provider,{value:{t:a,locale:n},children:r})},useTranslation:()=>{const e=Ta(Xa);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:r})=>Za({terms:t,overrides:e,locale:r})});const{TranslationProvider:pd,useTranslation:et,createTFunction:gd}=hd({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_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"}}),Op="";function $t(t,e){if(!t)throw new Error(e)}function rr(){throw new Error("Cycle detected")}var vd=Symbol.for("preact-signals");function Kr(){if(de>1)de--;else{for(var t,e=!1;Ee!==void 0;){var r=Ee;for(Ee=void 0,Gr++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ti(r))try{r.c()}catch(a){e||(t=a,e=!0)}r=n}}if(Gr=0,de--,e)throw t}}var B=void 0,Ee=void 0,de=0,Gr=0,nr=0;function Qa(t){if(B!==void 0){var e=t.n;if(e===void 0||e.t!==B)return e={i:0,S:t,p:B.s,n:void 0,t:B,e:void 0,x:void 0,r:e},B.s!==void 0&&(B.s.n=e),B.s=e,t.n=e,32&B.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=B.s,e.n=void 0,B.s.n=e,B.s=e),e}}function X(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}X.prototype.brand=vd,X.prototype.h=function(){return!0},X.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)},X.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)}},X.prototype.subscribe=function(t){var e=this;return Yr(function(){var r=e.value,n=32&this.f;this.f&=-33;try{t(r)}finally{this.f|=n}})},X.prototype.valueOf=function(){return this.value},X.prototype.toString=function(){return this.value+""},X.prototype.toJSON=function(){return this.value},X.prototype.peek=function(){return this.v},Object.defineProperty(X.prototype,"value",{get:function(){var t=Qa(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(B instanceof Bt&&function(){throw new Error("Computed cannot have side-effects")}(),t!==this.v){Gr>100&&rr(),this.v=t,this.i++,nr++,de++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Kr()}}}});function Rt(t){return new X(t)}function ti(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 ei(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 ri(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Bt(t){X.call(this,void 0),this.x=t,this.s=void 0,this.g=nr-1,this.f=4}(Bt.prototype=new X).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===nr))return!0;if(this.g=nr,this.f|=1,this.i>0&&!ti(this))return this.f&=-2,!0;var t=B;try{ei(this),B=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 B=t,ri(this),this.f&=-2,!0},Bt.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}X.prototype.S.call(this,t)},Bt.prototype.U=function(t){if(this.t!==void 0&&(X.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Bt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Bt.prototype.peek=function(){if(this.h()||rr(),16&this.f)throw this.v;return this.v},Object.defineProperty(Bt.prototype,"value",{get:function(){1&this.f&&rr();var t=Qa(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function bd(t){return new Bt(t)}function ni(t){var e=t.u;if(t.u=void 0,typeof e=="function"){de++;var r=B;B=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Wr(t),n}finally{B=r,Kr()}}}function Wr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ni(t)}function wd(t){if(B!==this)throw new Error("Out-of-order effect");ri(this),B=t,this.f&=-2,8&this.f&&Wr(this),Kr()}function Ie(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ie.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()}},Ie.prototype.S=function(){1&this.f&&rr(),this.f|=1,this.f&=-9,ni(this),ei(this),de++;var t=B;return B=this,wd.bind(this,t)},Ie.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ee,Ee=this)},Ie.prototype.d=function(){this.f|=8,1&this.f||Wr(this)};function Yr(t){var e=new Ie(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Jr;function fe(t,e){C[t]=e.bind(null,C[t]||function(){})}function ar(t){Jr&&Jr(),Jr=t&&t.S()}function ai(t){var e=this,r=t.data,n=_d(r);n.value=r;var a=Nt(function(){for(var i=e.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return e.__$u.c=function(){var o;!ea(a.peek())&&((o=e.base)==null?void 0:o.nodeType)===3?e.base.data=a.peek():(e.__$f|=1,e.setState({}))},bd(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return a.value}ai.displayName="_st",Object.defineProperties(X.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ai},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),fe("__b",function(t,e){if(typeof e.type=="string"){var r,n=e.props;for(var a in n)if(a!=="children"){var i=n[a];i instanceof X&&(r||(e.__np=r={}),r[a]=i,n[a]=i.peek())}}t(e)}),fe("__r",function(t,e){ar();var r,n=e.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(a){var i;return Yr(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),ar(r),t(e)}),fe("__e",function(t,e,r,n){ar(),t(e,r,n)}),fe("diffed",function(t,e){ar();var r;if(typeof e.type=="string"&&(r=e.__e)){var n=e.__np,a=e.props;if(n){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in n)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var l in n){var h=i[l],p=n[l];h===void 0?(h=md(r,l,p,a),i[l]=h):h.o(p,a)}}}t(e)});function md(t,e,r,n){var a=e in t&&t.ownerSVGElement===void 0,i=Rt(r);return{o:function(o,s){i.value=o,n=s},d:Yr(function(){var o=i.value.value;n[e]!==o&&(n[e]=o,a?t[e]=o:o?t.setAttribute(e,o):t.removeAttribute(e))})}}fe("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var a in n){var i=n[a];i&&i.d()}}}}else{var o=e.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}t(e)}),fe("__h",function(t,e,r,n){(n<3||n===9)&&(e.__$f|=2),t(e,r,n)}),mt.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 n in e)return!0;for(var a in t)if(a!=="__source"&&t[a]!==this.props[a])return!0;for(var i in this.props)if(!(i in t))return!0;return!1};function _d(t){return Nt(function(){return Rt(t)},[])}const Zr=(t,e)=>e.some(r=>t instanceof r);let ii,oi;function yd(){return ii||(ii=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function xd(){return oi||(oi=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xr=new WeakMap,Qr=new WeakMap,ir=new WeakMap;function kd(t){const e=new Promise((r,n)=>{const a=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Xt(t.result)),a()},o=()=>{n(t.error),a()};t.addEventListener("success",i),t.addEventListener("error",o)});return ir.set(e,t),e}function Sd(t){if(Xr.has(t))return;const e=new Promise((r,n)=>{const a=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),a()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),a()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});Xr.set(t,e)}let tn={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Xr.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Xt(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 si(t){tn=t(tn)}function Cd(t){return xd().includes(t)?function(...e){return t.apply(en(this),e),Xt(this.request)}:function(...e){return Xt(t.apply(en(this),e))}}function $d(t){return typeof t=="function"?Cd(t):(t instanceof IDBTransaction&&Sd(t),Zr(t,yd())?new Proxy(t,tn):t)}function Xt(t){if(t instanceof IDBRequest)return kd(t);if(Qr.has(t))return Qr.get(t);const e=$d(t);return e!==t&&(Qr.set(t,e),ir.set(e,t)),e}const en=t=>ir.get(t);function Ed(t,e,{blocked:r,upgrade:n,blocking:a,terminated:i}={}){const o=indexedDB.open(t,e),s=Xt(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Xt(o.result),l.oldVersion,l.newVersion,Xt(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),a&&l.addEventListener("versionchange",h=>a(h.oldVersion,h.newVersion,h))}).catch(()=>{}),s}const Id=["get","getKey","getAll","getAllKeys","count"],Td=["put","add","delete","clear"],rn=new Map;function li(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(rn.get(e))return rn.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,a=Td.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(a||Id.includes(r)))return;const i=async function(o,...s){const l=this.transaction(o,a?"readwrite":"readonly");let h=l.store;return n&&(h=h.index(s.shift())),(await Promise.all([h[r](...s),a&&l.done]))[0]};return rn.set(e,i),i}si(t=>({...t,get:(e,r,n)=>li(e,r)||t.get(e,r,n),has:(e,r)=>!!li(e,r)||t.has(e,r)}));const Ad=["continue","continuePrimaryKey","advance"],ci={},nn=new WeakMap,ui=new WeakMap,Md={get(t,e){if(!Ad.includes(e))return t[e];let r=ci[e];return r||(r=ci[e]=function(...n){nn.set(this,ui.get(this)[e](...n))}),r}};async function*Nd(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const r=new Proxy(e,Md);for(ui.set(r,e),ir.set(r,en(e));e;)yield r,e=await(nn.get(r)||e.continue()),nn.delete(r)}function di(t,e){return e===Symbol.asyncIterator&&Zr(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Zr(t,[IDBIndex,IDBObjectStore])}si(t=>({...t,get(e,r,n){return di(e,r)?Nd:t.get(e,r,n)},has(e,r){return di(e,r)||t.has(e,r)}}));const Te=t=>Zt(t).with(F.number.lte(1e3),()=>`${Math.round(t)}KB`).with(F.number.lt(1e3*10),()=>`${(t/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(t/1e3)}MB`),fi=t=>{const e=t.find(r=>r.isHead);if(!e)throw new Error("No head node found");return e},Od=t=>Object.entries(t).reduce((r,[n,a])=>(r[n]=a.value,r),{}),he=t=>e=>e?e.type===t:!1;class Ae extends Error{constructor(){super("Aborted")}}function Fd(t,e=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{t.apply(this,n)},e)}}const hi=t=>typeof t=="string",Dd=t=>{let e=5381;for(let r=0;r<t.length;r++)e=e*33^t.charCodeAt(r);return e>>>0},an=t=>t===null||typeof t!="object"?t:Array.isArray(t)?t.map(an):Object.keys(t).sort().reduce((e,r)=>(e[r]=an(t[r]),e),{}),Pd=t=>{const e=JSON.stringify(an(t));return Dd(e).toString(36)},Ld=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),pi=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Ld()}),Vd=t=>Zt(t).with({nativeEvent:{submitter:F.select(F.union(F.instanceOf(HTMLButtonElement),F.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),gi=typeof window>"u"?void 0:Ed("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}}),Me={getStateData:async(t,e,r)=>{var a;const n=vi({...t,flowKeys:e,context:r});return(a=await gi)==null?void 0:a.get("state",n)},setStateData:Fd(async t=>{var r;const e=vi(t);return(r=await gi)==null?void 0:r.put("state",t.data,e)},1e3)},or=(t,e,r,n=0)=>{if(!e.nextId)return r(e.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const a=t.find(h=>h.id===e.nextId);if(a===void 0)return{stepsMade:n,remainingSteps:0};const i=e.type==="if-block"?e.branchId:void 0,o=t.find(h=>h.id===i),s=e.type.includes("question")?1:0;if(o){const h=s+Math.max(or(t,a,r,n+s).remainingSteps,or(t,o,r,n+s).remainingSteps);return r(e.id,{stepsMade:n,remainingSteps:h}),{stepsMade:n,remainingSteps:h}}const l=s+or(t,a,r,n+s).remainingSteps;return r(e.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},jd=t=>{const e={},r=t.find(n=>n.isHead);return r&&or(t,r,(n,a)=>{e[n]=a}),e},vi=t=>[...t.flowKeys,t.id,t.version,Pd(t.context)].join("/"),Ut=Rt({state:"idle"}),Ne=t=>{const{state:e,flow:r}=Ut.value;if(e!=="loaded")return;$t(r,"No flow to update");const n=t(r.data);r.data=n,Ut.value={state:e,flow:r},Me.setStateData(r)},I={current$:Ut,viewState$:Rt("closed"),inputHeight$:Rt(53),startFlow:async({flow:t,context:e={},flowKeys:r,title:n,analytics:a,job:i,locationOrigin:o})=>{const l={data:await Me.getStateData(t,r,e)??pi(),startedAt:new Date,nodeIdToProgress:jd(t.nodes),flowKeys:r,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:n,analytics:a,job:i,locationOrigin:o};Ut.value={state:"loaded",flow:l},Me.setStateData(l)},cancelCurrentFlow:()=>{Ut.value={state:"idle"},I.viewState$.value="closed"},markAsFinished:()=>Ne(t=>({...t,isFinished:!0})),setCurrentNodeId:t=>Ne(e=>(e.nodeHistory.push(t),e)),restart:()=>{const{state:t,flow:e}=Ut.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=pi();Ut.value={state:t,flow:{...e,data:r,startedAt:new Date}},Me.setStateData(e)},addMessage:(t,e)=>{const r={...t,groupId:e};return Ne(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:r}=Ut.value;$t(e==="loaded","Application not loaded");const n=r.data.messages.filter(a=>!a.groupId||!t.includes(a.groupId));r.data.messages=n,Me.setStateData(r)},setSubmission:(t,e)=>Ne(r=>(e===null?delete r.submissions[t]:r.submissions[t]=e,r)),setInput:t=>Ne(e=>({...e,currentInput:t??null}))},zd=({message:t})=>{const{t:e}=et();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),c("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&c("p",{class:"text-neutral-9 text-sm",children:t})]})]})},bi=t=>c("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[c("title",{children:"Loading"}),c("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),wi=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(bi,{class:"text-neutral-6 h-8 w-8"})}),Rd=t=>{const r=t/100,n=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Bd=Wt("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),sr=({class:t,children:e,variant:r,...n})=>c("div",{class:"flex flex-1 items-center justify-end px-1",children:c("button",{class:Lt(Bd({variant:r}),t),...n,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:e})})}),Ud=()=>{if(I.current$.value.state!=="loaded")return null;const t=I.current$.value.flow.nodeIdToProgress,e=I.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const r=t[e];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Rd(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Hd=({children:t,params:e})=>{const{t:r}=et(),n=I.viewState$;return c(J,{children:c("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[c("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),c("button",{onClick:()=>{n.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:on,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:Lt({hidden:I.current$.value.state!=="loaded"||n.value!=="maximised"}),children:c("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,I.current$.value.state==="loaded"&&c(sr,{"aria-label":"Restart",onClick:()=>{I.restart()},children:[c("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(sr,{class:"view-switch",onTouchStart:on,"aria-label":r("minimize"),onClick:()=>n.value="minimised",children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),c(Ud,{})]})})};function on(){}const qd=ja(()=>Promise.resolve().then(()=>Sp).then(t=>t.ChatbotBody)),mi=Wt("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),_i=Wt("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Kd=({open:t,...e})=>{const r=ht(null);return ft(()=>{const n=r.current;n&&(t?n.showModal():n.close())},[t]),c("dialog",{ref:r,...e})},Gd=({logger:t,apiClient:e,analytics:r,params:n})=>{const{state:a,flow:i,error:o}=I.current$.value,s=I.viewState$.value,l=a!=="idle"&&s==="maximised",h=ht(null);return c(pd,{terms:n.terms,locale:void 0,children:[c(Kd,{open:l,onClose:()=>I.viewState$.value="minimised",children:c("div",{ref:h,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:mi({view:"maximised"}),children:c("div",{class:_i({view:"maximised"}),children:[c(Hd,{params:n,children:i==null?void 0:i.title}),Zt({state:a,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(wi,{},"loading")).with({state:"loaded"},()=>c(ke,{fallback:c(wi,{},"loading"),children:c(qd,{analytics:r,apiClient:e,logger:t})})).with({state:"error"},()=>c(zd,{message:o})).exhaustive()]})})}),s==="minimised"?c(Wd,{flow:i}):null]})},Wd=({flow:t})=>{const{t:e}=et();return c("div",{class:mi({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:_i({view:"minimised"}),children:[c("button",{onClick:()=>{I.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:on,children:c("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:t==null?void 0:t.title})}),c("div",{class:"flex items-center px-0.5",children:c(sr,{"aria-label":e("close_application"),onClick:I.cancelCurrentFlow,variant:"white",children:c("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Yd=`[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]{--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] *,[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] .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-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-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] .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-2\\.5{padding-left:.625rem;padding-right:.625rem}[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] .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}[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))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}[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))}[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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-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))}[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] .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-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))}[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-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
+ `,yi="inploi-chatbot",xi=`[data-widget='${yi}']`,Jd=()=>({getOrCreateChatbotElement:()=>{const t=document.querySelector(xi);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=yi,e}});var Ot;function lr(t){return{lang:(t==null?void 0:t.lang)??(Ot==null?void 0:Ot.lang),message:t==null?void 0:t.message,abortEarly:(t==null?void 0:t.abortEarly)??(Ot==null?void 0:Ot.abortEarly),abortPipeEarly:(t==null?void 0:t.abortPipeEarly)??(Ot==null?void 0:Ot.abortPipeEarly)}}var sn;function Zd(t){return sn==null?void 0:sn.get(t)}var ln;function Xd(t){return ln==null?void 0:ln.get(t)}var cn;function Qd(t,e){var r;return(r=cn==null?void 0:cn.get(t))==null?void 0:r.get(e)}function Qt(t){var r,n;const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&((n=(r=Object.getPrototypeOf(t))==null?void 0:r.constructor)==null?void 0:n.name))??"null":e}function G(t,e,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??t.expects??null,s=(a==null?void 0:a.received)??Qt(i),l={kind:t.kind,type:t.type,input:i,expected:o,received:s,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:t.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},h=t.kind==="schema",p=(a==null?void 0:a.message)??t.message??Qd(t.reference,l.lang)??(h?Xd(l.lang):null)??n.message??Zd(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),h&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function lt(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},lr())}}}function tf(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function ki(t,e){const r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var un=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}},ef=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Si(t,e){return{kind:"validation",type:"check",reference:Si,async:!1,expects:null,requirement:t,message:e,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&G(this,"input",r,n),r}}}function Ci(t){return{kind:"validation",type:"email",reference:Ci,expects:null,async:!1,requirement:ef,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&G(this,"email",e,r),e}}}function Oe(t,e){return{kind:"validation",type:"max_length",reference:Oe,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&G(this,"length",r,n,{received:`${r.value.length}`}),r}}}function $i(t,e){return{kind:"validation",type:"max_value",reference:$i,async:!1,expects:`<=${t instanceof Date?t.toJSON():Qt(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&G(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Qt(r.value)}),r}}}function pe(t,e){return{kind:"validation",type:"min_length",reference:pe,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&G(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Ei(t,e){return{kind:"validation",type:"min_value",reference:Ei,async:!1,expects:`>=${t instanceof Date?t.toJSON():Qt(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&G(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Qt(r.value)}),r}}}function Ii(t,e){return{kind:"validation",type:"regex",reference:Ii,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&G(this,"format",r,n),r}}}function cr(t){return{kind:"transformation",type:"transform",reference:cr,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function Ti(t){return{kind:"validation",type:"url",reference:Ti,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)&&G(this,"URL",e,r),e}}}function rf(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function dn(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function Ai(){return{kind:"schema",type:"any",reference:Ai,expects:"any",async:!1,get"~standard"(){return lt(this)},"~run"(t){return t.typed=!0,t}}}function fn(t,e){return{kind:"schema",type:"array",reference:fn,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const h={type:"array",origin:"value",input:a,key:o,value:s};for(const p of l.issues)p.path?p.path.unshift(h):p.path=[h],(i=r.issues)==null||i.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else G(this,"type",r,n);return r}}}function ur(t){return{kind:"schema",type:"boolean",reference:ur,expects:"boolean",async:!1,message:t,get"~standard"(){return lt(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:G(this,"type",e,r),e}}}function hn(t,e){return{kind:"schema",type:"literal",reference:hn,expects:Qt(t),async:!1,literal:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:G(this,"type",r,n),r}}}function Mi(t,e){return{kind:"schema",type:"nullable",reference:Mi,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,get"~standard"(){return lt(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=dn(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Fe(t){return{kind:"schema",type:"number",reference:Fe,expects:"number",async:!1,message:t,get"~standard"(){return lt(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:G(this,"type",e,r),e}}}function rt(t,e){return{kind:"schema",type:"object",reference:rt,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:dn(s),h=s["~run"]({value:l},n);if(h.issues){const p={type:"object",origin:"value",input:a,key:o,value:l};for(const u of h.issues)u.path?u.path.unshift(p):u.path=[p],(i=r.issues)==null||i.push(u);if(r.issues||(r.issues=h.issues),n.abortEarly){r.typed=!1;break}}h.typed||(r.typed=!1),r.value[o]=h.value}else if(s.fallback!==void 0)r.value[o]=rf(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(G(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else G(this,"type",r,n);return r}}}function yt(t,e){return{kind:"schema",type:"optional",reference:yt,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return lt(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=dn(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Ni(t,e){return{kind:"schema",type:"picklist",reference:Ni,expects:ki(t.map(Qt),"|"),async:!1,options:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:G(this,"type",r,n),r}}}function pn(t,e,r){return{kind:"schema",type:"record",reference:pn,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return lt(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(tf(i,l)){const h=i[l],p=this.key["~run"]({value:l},a);if(p.issues){const f={type:"object",origin:"key",input:i,key:l,value:h};for(const b of p.issues)b.path=[f],(o=n.issues)==null||o.push(b);if(n.issues||(n.issues=p.issues),a.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:h},a);if(u.issues){const f={type:"object",origin:"value",input:i,key:l,value:h};for(const b of u.issues)b.path?b.path.unshift(f):b.path=[f],(s=n.issues)==null||s.push(b);if(n.issues||(n.issues=u.issues),a.abortEarly){n.typed=!1;break}}(!p.typed||!u.typed)&&(n.typed=!1),p.typed&&(n.value[p.value]=u.value)}}else G(this,"type",n,a);return n}}}function W(t){return{kind:"schema",type:"string",reference:W,expects:"string",async:!1,message:t,get"~standard"(){return lt(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:G(this,"type",e,r),e}}}function Oi(t){let e;if(t)for(const r of t)e?e.push(...r.issues):e=r.issues;return e}function gn(t,e){return{kind:"schema",type:"union",reference:gn,expects:ki(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return lt(this)},"~run"(r,n){let a,i,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];G(this,"type",r,n,{issues:Oi(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];G(this,"type",r,n,{issues:Oi(o)})}return r}}}function Fi(t,e,r){const n=t["~run"]({value:e},lr(r));if(n.issues)throw new un(n.issues);return n.value}async function nf(t,e,r){const n=await t["~run"]({value:e},lr(r));if(n.issues)throw new un(n.issues);return n.value}function af(t,e){const r={};for(const n in t.entries)r[n]=!e||e.includes(n)?yt(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return lt(this)}}}function Ht(...t){return{...t[0],pipe:t,get"~standard"(){return lt(this)},"~run"(e,r){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function of(t,e,r){const n=t["~run"]({value:e},lr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const Di=Ht(gn([W(),Fe()]),cr(String)),Pi=rt({id:Di,version:Fe(),build:Fe(),nodes:fn(Ai()),context_schema:yt(Mi(pn(W(),rt({required:ur(),type:gn([hn("string"),hn("number")])}))))}),sf=rt({flow:Pi}),lf=rt({company:rt({name:W()}),flow:Pi,job:rt({id:Di,title:W()}),user:yt(rt({city:yt(W()),country:yt(W()),isEU:yt(ur()),continent:yt(W())}))}),cf={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Lo(),response:lf}},uf={pathname:"/flow/id/:id",method:"GET",schema:{response:sf}};var df=["1","2","3","4","5","6","7","8","9","10","11","12"],ff={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]}},hf=(t,e=1,r)=>n=>{const[a,i]=ff[r][n];return"oklch("+a+"% "+i*e+" "+t+")"},vn=t=>{const e=hf(t.hue,t.chroma,t.mode);return Object.fromEntries(df.map(r=>[t.prefix+r,t.transform(e(r))]))},bn=t=>t,pf=t=>{const e=Object.keys(t).flatMap(r=>{const n=t[r];return typeof n=="object"&&n!==null?Object.keys(n).map(a=>{const i=n[a];return[`${String(r)}.${a}`,i]}):[[r,n]]});return Object.fromEntries(e)},dr=t=>!!t&&typeof t=="object"&&!Array.isArray(t),wn=(t,...e)=>{if(!e.length)return t;const r=e.shift();if(dr(t)&&dr(r))for(const n in r){const a=r[n];if(dr(a)){t[n]||Object.assign(t,{[n]:{}});const i=t[n];dr(i)&&wn(i,a)}else Object.assign(t,{[n]:r[n]})}return wn(t,...e)},gf=t=>{function e(r,n){const a=[t.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${a}`:`var(--${a})`}return e},vf=()=>({core:t=>({semantic:e=>({component:r=>({from:n=>{const{theme:a,getToken:i}=n,o=f=>i("reference",f.toString()),s=t({theme:a}),l=e({theme:a,core:o,raw:{core:s}}),h=r({theme:a,core:o,semantic:o,raw:{core:s,semantic:l}}),p=pf(wn(s,l,h)),u=([f,b],v)=>{const y=[v,f].filter(Boolean).join(".");return typeof b=="object"?Object.entries(b).flatMap(S=>u(S,y)):[[n.getToken("declaration",y),b]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(f=>u(f))),ref:f=>i("reference",f.toString())}}})})})});const[mn,_n,Li]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],bf=vf().core(({theme:t})=>({color:{black:mn,white:_n,lowest:t.mode==="light"?_n:mn,highest:t.mode==="light"?mn:_n,...vn({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:bn}),...vn({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:bn}),...vn({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:bn})},typography:{}})).semantic(({core:t,raw:e,theme:r})=>{const n=(a,i)=>e.core.color[a].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":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:Li,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:t,theme:e,semantic:r,core:n})=>{const a=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{app:{bg:n(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":n(e.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Li,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":n(e.mode==="dark"?"color.a-8":"color.a-11")}}}),wf=gf({prefix:"i-"}),mf=t=>{const e=bf.from({theme:t,getToken:wf}),r=Object.entries(e.declarations).map(([n,a])=>`${n}: ${a};`);return`${xi} {
3
3
  ${r.concat(r).join(`
4
4
  `)}
5
- }`},Vi=({context:t,schema:e,logger:r})=>{if(e)for(const n in e){const a=e[n];if(!a)continue;const i=_e(t,n,null);if(a.required&&i===null){const o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}switch(a.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:a.type}}},_f=({_internal_domManager:t=Jd(),theme:e,terms:r,feedback:n})=>Do(({apiClient:a,rpcClient:i,logger:o,analytics:s})=>{let l=!1;const h=gd({locale:void 0,overrides:r??{}}),p=()=>{var b;if(typeof window>"u")return;const u=[dt("style",{id:"inploi-chatbot-styles"},Yd),dt("style",{id:"inploi-chatbot-theme"},mf(e))],f=t.getOrCreateChatbotElement();if(le(dt(J,{},[u,dt(Gd,{apiClient:a,logger:o,analytics:s,params:{theme:e,terms:r,feedback:n}})]),f),n){const v=f.querySelector("dialog");if(!v)throw new Error("Couldn't find feedback host");if(n.plugin instanceof Promise)n.plugin.then(({feedbackPlugin:y})=>{var x;const S=y()({rpcClient:i,apiClient:a,logger:o,analytics:s});ji({instance:S,theme:e,terms:((x=n.params)==null?void 0:x.terms)??{},host:v})});else{const y=n.plugin({rpcClient:i,apiClient:a,logger:o,analytics:s});ji({instance:y,theme:e,terms:((b=n.params)==null?void 0:b.terms)??{},host:v})}}l=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(l)return;p(),o.info("Chatbot plugin prepared")}catch(u){o.error("Error preparing chatbot plugin",u)}},fetchFlowByJobId:async(u,f)=>i.request(cf,{params:{id:u},searchParams:{id_type:(f==null?void 0:f.idType)==="inploi"?"internal":"external"}}).then(b=>({flow:b.flow,title:b.job.title,flowKeys:[b.job.id,...(f==null?void 0:f.flowKeys)??[]],job:{id:b.job.id,id_type:"external"},...f,context:{user:b.user,...f==null?void 0:f.context}})),fetchFlowById:async(u,f)=>i.request(uf,{params:{id:u}}).then(b=>{var v;return{flow:b.flow,title:"Chatbot",flowKeys:(f==null?void 0:f.flowKeys)??[],...f,analytics:{customProperties:{flow_id:b.flow.id,flow_version:b.flow.version,...(v=f==null?void 0:f.analytics)==null?void 0:v.customProperties}}}}),open:async u=>{if(!(typeof window>"u"))try{I.cancelCurrentFlow(),I.viewState$.value="maximised",l||p(),u instanceof Promise?(I.current$.value={state:"loading"},u.then(async f=>{Vi({context:f.context||{},schema:f.flow.context_schema,logger:o}),I.startFlow(f)}).catch(f=>{const b=f instanceof Error?f.message:h("unknown_error");I.current$.value={state:"error",error:b}})):(Vi({context:u.context||{},schema:u.flow.context_schema,logger:o}),I.startFlow(u))}catch(f){o.error("Error starting flow",f)}},close:async()=>{typeof window>"u"||(I.cancelCurrentFlow(),o.info("Closed flow from an external source"))}}});function ji({instance:t,terms:e,theme:r,host:n}){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:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=_f;const zi=({condition:t,context:e,submissions:r,ifBlock:n})=>{const[a,...i]=t.compareKey.split(".");if(!a)return!1;const o=Bi({context:e,key:a,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=_e(o.value,i.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=_e(o.value,i.join(".")),l={...n,data:{...n.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Pe(l,{submissions:{_temp:{value:s,type:"boolean"}},context:e});case"string":return Pe(l,{submissions:{_temp:{value:s,type:"string"}},context:e});case"number":return Pe(l,{submissions:{_temp:{value:s,type:"number"}},context:e});case"object":return Array.isArray(s)&&s.every(hi)?Pe(l,{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"?fr(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 ${n.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 n="combinator"in t.data?t.data.conditions:[t.data];if(("combinator"in t.data?t.data.combinator:"and")==="or"){for(const i of n)if(zi({condition:i,context:e,submissions:r,ifBlock:t}))return!0;return!1}else{for(const i of n)if(!zi({condition:i,context:e,submissions:r,ifBlock:t}))return!1;return!0}},yf=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Et=(t,{context:e,submissions:r})=>t.replace(yf,(n,a,i="")=>{const[o,...s]=a.trim().split("."),l=Bi({key:o,path:s,submissions:r,context:e});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(h=>`${h.name} (${Te(h.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(h=>h&&h.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"phone":return fr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const h=_e(l.value,s.join("."));switch(typeof h){case"boolean":return h===!0?"true":"false";case"string":return h;case"number":return h.toString();case"object":if(Array.isArray(h)&&h.every(hi))return h.join(", ")}break}}return i}),Ri=({node:t,nodes:e,stopWhen:r})=>{if((r==null?void 0:r(t))===!0)return t;const n=t.nextId?e.find(a=>a.id===t.nextId):void 0;if(n)return Ri({node:n,nodes:e,stopWhen:r})},xf=({childNode:t,nodes:e})=>{const n=e.filter(a=>a.type==="if-block").find(a=>{if(!a.branchId)return!1;const i=e.find(s=>s.id===a.branchId);if(!i)return!1;const o=Ri({node:i,nodes:e,stopWhen:s=>s.id===t.id});return!(!o||o.id!==t.id)});if(n!=null&&n.nextId)return e.find(a=>a.id===n.nextId)},kf=({flow:t,analytics:e,logger:r,context:n,apiClient:a,getSubmissions:i,chatService:o,onFlowEnd:s,onInterpret:l,t:h})=>{let p=new AbortController;const u={...e.service,log:b=>e.service.log({...b,customProperties:{...b.customProperties,...e.customProperties}})},f=async(b,v)=>{const y=i();l==null||l(b,v);try{await Sf({flow:t,analytics:u,logger:r,apiClient:a,context:n,node:b,submissions:y,t:h,chat:{sendMessage:async S=>o.send({groupId:b.id,message:S,signal:p.signal}),userInput:async S=>o.input({input:S,signal:p.signal}),addToSubmissions:o.addToSubmissions},next:S=>{const x=S?t.nodes.find(m=>m.id===S):xf({childNode:b,nodes:t.nodes});return x?f(x,b):s==null?void 0:s(b)},end:()=>s==null?void 0:s(b)})}catch(S){if(S instanceof Ae)return;throw S}};return{interpret:async b=>{const v=t.nodes.find(y=>y.id===b)??fi(t.nodes);return f(v)},undo:b=>{let v=1;const y=t.nodes.find(x=>x.id===b[b.length-1]);for(let x=b.length-2;x>0;x--){const m=b[x],A=t.nodes.find(O=>O.id===m);if(!A||(v++,A.type.startsWith("question-")))break}p.abort(),p=new AbortController;const S=t.nodes.find(x=>x.id===b[b.length-v]);return yt(S,"Undo failed: new start node not found"),f(S,y),{removed:v}},abort:()=>{p.abort()}}},fr=t=>`+${t.countryCode} ${t.phoneNumber}`;async function Sf(t){const e=t.node;switch(e.type){case"text":return Of({...t,node:e});case"image":return Nf({...t,node:e});case"question-text":return Ff({...t,node:e});case"question-enum":return Lf({...t,node:e});case"question-number":return Pf({...t,node:e});case"question-phone":return Df({...t,node:e});case"question-boolean":return Vf({...t,node:e});case"question-file":return zf({...t,node:e});case"question-address":return jf({...t,node:e});case"end-flow":return Rf({...t,node:e});case"if-block":return Mf({...t,node:e});case"jump":return Ef({...t,node:e});case"link":return Af({...t,node:e});case"integration-application-submit":return Tf({...t,node:e});case"add-submission":return If({...t,node:e});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return $f({...t,node:e});case"feedback":return Cf({...t,node:e});default:throw new Error(`Unknown node: ${JSON.stringify(e)}`)}}const De=(t,e)=>{var n;const r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r};async function Cf({next:t,node:e}){t(e.nextId)}async function $f({next:t,node:e,analytics:r,submissions:n,logger:a}){if(!n)return t(e.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:De(n,e.data.key).toString(),first_name:e.data.firstName?De(n,e.data.firstName).toString():void 0,last_name:e.data.lastName?De(n,e.data.lastName).toString():void 0,email:e.data.email?De(n,e.data.email).toString():void 0,phone_number:e.data.phoneNumber?De(n,e.data.phoneNumber).toString():void 0,custom_traits:e.data.customTraits?Object.fromEntries(e.data.customTraits.map(({key:i,value:o})=>{var s;return[i,(s=n[o])==null?void 0:s.value]})):void 0}})}catch(i){a.error(i)}finally{t(e.nextId)}}async function Ef({next:t,node:e}){t(e.data.targetId)}async function If({next:t,node:e,logger:r,submissions:n,context:a}){if(!n){r.error("Submissions not found");return}n[e.data.key]={type:"string",value:Et(e.data.value,{submissions:n,context:a})},t(e.nextId)}async function Tf({chat:t,next:e,node:r,logger:n,apiClient:a,submissions:i,analytics:o,flow:s,t:l}){const h=async p=>{p!==!0&&await t.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await t.sendMessage({type:"loading"});const{anonymous_id:u,session_id:f}=o.getSessionInfo(),b=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:u,session_id:f,job:s.job,submissions:Nd(i||{})})}).catch(v=>v);r.data.key&&t.addToSubmissions(r.data.key,{type:"integration",value:b}),Zt(b).with({integration_response:P.select(P.union({service:P.optional(P.string),status:P.number,data:P.any},{service:P.optional(P.string),status:P.number,error:{message:P.string,data:P.any}}))},v=>{o.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:v.service??"INVALID_SERVICE",response:{status:v.status,payload:"data"in v?v.data:v.error.data??null},job:s.job}})}).otherwise(()=>{}),await Zt(b).with({integration_response:{data:P.select("redirect",{redirect_url:P.string,message:P.optional(P.union(P.string,P.nullish)),button_text:P.optional(P.union(P.string,P.nullish))})}},async v=>{await t.sendMessage({type:"text",author:"bot",text:v.redirect.message??l("submission_redirect_message")});try{const y=new URL(v.redirect.redirect_url);u&&!y.searchParams.has("anonymous_id")&&y.searchParams.set("anonymous_id",u),await t.sendMessage({type:"link",href:y.toString(),text:v.redirect.button_text??l("complete_submission"),onClick:()=>{if(!f){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:f,flow_version:s.version,href:y.toString(),job:s.job}})}})}catch(y){n.error(`Invalid redirect URL: ${v.redirect.redirect_url}`,y),t.sendMessage({type:"system",variant:"error",text:l("redirect_url_error")})}e(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await t.sendMessage({type:"system",variant:"success",text:l("submission_completed")}),e(r.nextId)}).with({integration_response:{error:P.select("error",{message:P.string})}},async v=>{n.error(v.error),await t.sendMessage({type:"system",variant:"error",text:v.error.message||l("submission_failed")}),await h(!1)}).otherwise(async v=>{n.error(v),await t.sendMessage({type:"system",variant:"error",text:l("submission_failed")}),await h(!1)})};await h(r.data.skipConfirmation)}async function Af({chat:t,next:e,node:r,submissions:n,context:a}){await t.sendMessage({type:"link",href:Et(r.data.href,{submissions:n,context:a}),text:Et(r.data.cta,{submissions:n,context:a})}),e(r.nextId)}async function Mf({submissions:t,next:e,node:r,context:n}){e(Pe(r,{submissions:t,context:n})?r.branchId:r.nextId)}async function Of({chat:t,next:e,node:r,submissions:n,context:a}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.text,{submissions:n,context:a})}),e(r.nextId)}async function Nf({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 Ff({chat:t,next:e,node:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});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,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:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.type==="phone"?fr(o.value):o.value}),e(r.nextId)}async function Pf({chat:t,next:e,node:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});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:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value.toString()}),e(r.nextId)}async function Df({chat:t,next:e,node:r,submissions:n,context:a}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});const i=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}});i===null?await t.sendMessage({type:"system",variant:"info",text:"Skipped"}):await t.sendMessage({author:"user",type:"text",text:i.type==="phone"?fr(i.value):i.value}),e(r.nextId)}async function Lf({chat:t,next:e,node:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});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:i("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 Vf({chat:t,next:e,node:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});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:i("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:n}){await t.sendMessage({author:"bot",type:"text",text:r.data.question});const a=await t.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(a===null)await t.sendMessage({type:"system",variant:"info",text:n("skipped")});else{const i=Object.values(a.value).filter(o=>o&&o.trim().length>0).join(", ");await t.sendMessage({author:"user",type:"text",text:i})}return e(r.nextId)}async function zf({node:t,chat:e,next:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Et(t.data.question,{submissions:n,context:a})});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:i("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 Rf({chat:t,end:e,node:r}){await t.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),e()}const Bi=({key:t,path:e,submissions:r,context:n})=>{if(t==="$context"){if(!e)return;const a=_e(n,e.join("."));switch(typeof a){case"string":return{type:"string",value:a};case"number":return{type:"number",value:a};case"boolean":return{type:"boolean",value:a};default:console.warn(`Unexpected type for $context.${e.join(".")}`,a);return}}return r==null?void 0:r[t]};function yn(t,e,r){var n,a,i,o,s;e==null&&(e=100);function l(){var p=Date.now()-o;p<e&&p>=0?n=setTimeout(l,e-p):(n=null,r||(s=t.apply(i,a),i=a=null))}var h=function(){i=this,a=arguments,o=Date.now();var p=r&&!n;return n||(n=setTimeout(l,e)),p&&(s=t.apply(i,a),i=a=null),s};return h.clear=function(){n&&(clearTimeout(n),n=null)},h.flush=function(){n&&(s=t.apply(i,a),i=a=null,clearTimeout(n),n=null)},h}yn.debounce=yn;var Bf=yn;const Ui=kr(Bf);function Uf(t){let{debounce:e,scroll:r,polyfill:n,offsetSize:a}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const i=n||(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[o,s]=vt({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=ht({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),h=e?typeof e=="number"?e:e.scroll:null,p=e?typeof e=="number"?e:e.resize:null,u=ht(!1);_t(()=>(u.current=!0,()=>void(u.current=!1)));const[f,b,v]=Ot(()=>{const m=()=>{if(!l.current.element)return;const{left:A,top:O,width:M,height:H,bottom:at,right:gt,x:L,y:ct}=l.current.element.getBoundingClientRect(),ot={left:A,top:O,width:M,height:H,bottom:at,right:gt,x:L,y:ct};l.current.element instanceof HTMLElement&&a&&(ot.height=l.current.element.offsetHeight,ot.width=l.current.element.offsetWidth),Object.freeze(ot),u.current&&!Gf(l.current.lastBounds,ot)&&s(l.current.lastBounds=ot)};return[m,p?Ui(m,p):m,h?Ui(m,h):m]},[s,a,h,p]);function y(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(m=>m.removeEventListener("scroll",v,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function S(){l.current.element&&(l.current.resizeObserver=new i(v),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(m=>m.addEventListener("scroll",v,{capture:!0,passive:!0})))}const x=m=>{!m||m===l.current.element||(y(),l.current.element=m,l.current.scrollContainers=Hi(m),S())};return qf(v,!!r),Hf(b),_t(()=>{y(),S()},[r,v,b]),_t(()=>y,[]),[x,o,f]}function Hf(t){_t(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function qf(t,e){_t(()=>{if(e){const r=t;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[t,e])}function Hi(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:n,overflowY:a}=window.getComputedStyle(t);return[r,n,a].some(i=>i==="auto"||i==="scroll")&&e.push(t),[...e,...Hi(t.parentElement)]}const Kf=["x","y","top","bottom","left","right","width","height"],Gf=(t,e)=>Kf.every(r=>t[r]===e[r]),te=({class:t,...e})=>{const{t:r}=et();return c("button",{class:Lt("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:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})},Wf=25,xn=Rt({instant:()=>{},smooth:()=>{}}),nt={onSubmitSuccessFn$:Rt(()=>{}),isBotTyping$:Rt(!1),scrollToEnd:{instant:()=>xn.value.instant(),smooth:()=>xn.value.smooth()}},Yf=()=>{const t=ht(null);ft(()=>{xn.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=Ot(()=>({addToSubmissions:(n,a)=>I.setSubmission(n,a),send:async({message:n,signal:a,groupId:i})=>{if(await Zt(n).with({author:"bot",type:"text"},async o=>{if(a!=null&&a.aborted)throw new Ae;nt.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Wf;await new Promise(l=>setTimeout(l,s,{signal:a})),nt.isBotTyping$.value=!1}).otherwise(async()=>{}),a!=null&&a.aborted)throw new Ae;I.addMessage(n,i)},input:({input:n,signal:a})=>{if(a!=null&&a.aborted)throw new Ae;return I.setInput(n),new Promise(i=>{const o=s=>{if(a!=null&&a.aborted)throw new Ae;I.setInput(void 0),n.key&&I.setSubmission(n.key,s),i(s)};nt.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:t,chatService:e}},ge=({error:t})=>!t||!t.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[c("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"truncate pr-1 text-sm",children:t.message})]}),ee=({class:t,...e})=>{const{t:r}=et();return c("button",{type:"button",class:Lt("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",t),...e,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},kn={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=Wt("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Jf="https://api.mapbox.com/search/searchbox/v1/suggest",Zf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Xf=t=>atob(t).split("").reverse().join(""),Ft=rt({name:W()}),Qf=rt({suggestions:fn(rt({full_address:xt(W()),place_formatted:xt(W()),name:xt(W()),mapbox_id:W(),context:af(rt({address:Ft,street:Ft,neighborhood:Ft,locality:Ft,district:Ft,place:Ft,region:Ft,postcode:Ft,country:Ft}))}))}),th=({logger:t,t:e})=>Ot(()=>{var n;const r=(n=I.current$.peek().flow)==null?void 0:n.data.flowSessionId;return r?{enabled:!0,getPredictions:async a=>{var u;const i=new URL(Jf);i.searchParams.set("q",a),i.searchParams.set("session_token",r);const o=(u=I.current$.peek().flow)==null?void 0:u.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&i.searchParams.set("proximity",`${o.lng},${o.lat}`),i.searchParams.set("access_token",Xf(Zf));const l=await fetch(i);if(!l.ok)return t.error("Failed to get address details",l),{ok:!1,error:e("address_error")};const h=of(Qf,await l.json());if(h.success===!1)return t.error("Failed to parse address details",h.issues),{ok:!1,error:e("address_error")};const{suggestions:p}=h.output;return{ok:!0,data:p.map(f=>{var b,v,y,S,x,m,A,O,M;return{label:f.full_address??f.place_formatted??f.name??f.mapbox_id,id:f.mapbox_id,address:{line1:((b=f.context.address)==null?void 0:b.name)??((v=f.context.street)==null?void 0:v.name),line2:void 0,line3:((y=f.context.neighborhood)==null?void 0:y.name)??((S=f.context.locality)==null?void 0:S.name),city:((x=f.context.place)==null?void 0:x.name)??((m=f.context.district)==null?void 0:m.name),state:(A=f.context.region)==null?void 0:A.name,postcode:(O=f.context.postcode)==null?void 0:O.name,country:(M=f.context.country)==null?void 0:M.name}}})}}}:{enabled:!1}},[t,e]),qi=t=>{const{t:e}=et();return c("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...t,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:e("back")})]})},eh=({input:t,onSubmitSuccess:e,logger:r})=>{const{t:n}=et(),[a,i]=vt(),[o,s]=vt([]),{enabled:l,getPredictions:h}=th({logger:r,t:n}),[p,u]=vt(l?"query":"manual"),[f,b]=vt(""),[v,y]=vt(),S=x=>{yt(l,"Query state should not be enabled"),x=x.trim(),x!==(f==null?void 0:f.trim())&&(b(x),x===""&&s([]),y(void 0),h(x).then(m=>{if(m.ok===!1){s([]),y(m.error);return}s(m.data)}))};switch(p){case"query":return yt(l,"Query state should not be enabled"),c(rh,{input:t,onSkip:()=>e(null),onAddressSelect:x=>{if(x===""){i(void 0),u("manual");return}const m=o.find(A=>A.id===x);m&&(i(m.address),u("details"))},onAddressSearch:x=>{S(x)},suggestions:o,query:f,error:v});case"details":return yt(a!==void 0),c(Gi,{input:t,logger:r,onSubmitSuccess:e,addressFields:a,actions:c(qi,{onClick:()=>{u("query")}})});case"manual":return c(Gi,{logger:r,input:t,onSubmitSuccess:e,addressFields:{},actions:l?c(qi,{onClick:()=>{u("query")}}):void 0})}},rh=({input:t,onSkip:e,suggestions:r,onAddressSelect:n,query:a,onAddressSearch:i,error:o})=>{const{t:s}=et(),l=ht(null);return ft(()=>{l.current&&(l.current.focus(),l.current.select())},[]),c(J,{children:[c("form",{noValidate:!0,onSubmit:h=>{h.preventDefault();const u=new FormData(h.currentTarget).get("address");typeof u=="string"&&i(u)},class:"flex gap-1 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:t.config.placeholder||s("address_search"),defaultValue:a,class:Le({optional:!!t.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]}),c("span",{class:"sr-only",children:s("search")})]})})]}),t.config.optional&&c(ee,{class:"",onClick:e})]}),o?c(ge,{error:{message:o}}):null,c("ul",{children:[r.map(h=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(h.id)},children:[c("span",{class:"flex-grow",children:h.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},h.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n("")},children:c("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},Ki=["line1","line2","line3","city","state","postcode","country"],Gi=({addressFields:t,onSubmitSuccess:e,actions:r,input:n})=>{const a=ht(null);ft(()=>{if(a.current){const s=a.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const i=Object.keys(kn),{t:o}=et();return c("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const l=new FormData(s.currentTarget),h=Object.fromEntries(l.entries());e({type:"address",value:h})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:Ki.map((s,l)=>{const h=`isdk_${s}`,p=n.config.keys[s];return p?c(J,{children:[c("label",{for:h,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:o(s)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:p,id:h,defaultValue:t[s],required:!0,children:[t.country&&!i.includes(t.country)?c("option",{value:t[s],children:t[s]}):c("option",{value:"",children:o("select_country")}),i.map(u=>c("option",{value:u,children:u},u))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:l===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:p,id:h,defaultValue:t[s],required:!0}),l===Ki.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"flex w-full flex-1 ",children:[c("div",{class:"flex-grow",children:r}),c(te,{class:"flex items-center justify-center"})]})]})},Sn=()=>{const t=ht(null);return _t(()=>{var e;(e=t.current)==null||e.focus()},[]),t},Wi=["true","false"],nh=Oi(Wi),ah="answer",Yi="flex items-center gap-2 p-2.5",Ji=zr(({label:t,...e},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...e,ref:r,children:c("p",{class:"truncate text-center text-base",children:t})})),ih=({input:t,onSubmitSuccess:e})=>{const r=Sn();return c("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const a=Vd(n).value,i=Fi(nh,a);e({type:"boolean",value:i==="true"})},children:[c("ul",{class:Yi,children:Wi.map((n,a)=>c("li",{class:"flex-1",children:c(Ji,{ref:a===0?r:null,type:"submit",name:ah,value:n,label:t.config.labels[n]},n)}))}),t.config.optional&&c("div",{class:"px-2 pb-2",children:c(ee,{class:"w-full",type:"button",onClick:()=>e(null)})})]})},oh=t=>new Promise((e,r)=>{const n=new FileReader;n.readAsDataURL(t),n.onload=()=>n.result?e(n.result.toString()):r("No result from reader"),n.onerror=r}),sh=t=>t.reduce((e,r)=>e+r.sizeKb,0),lh=he("file"),Zi=3,ch=({file:t,class:e,...r})=>{const n=t.name.split(".").pop(),a=t.name.replace(new RegExp(`.${n}$`),"");return c("div",{class:Lt("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:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:a}),c("span",{children:[".",n]})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Te(t.sizeKb)})]})},Xi=({class:t,...e})=>c("li",{class:Lt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",t),...e}),Qi=t=>{const e=t.split(".").pop();if(!e)throw new Error("No file extension found");return e?"."+e:""},uh=({allowedExtensions:t,files:e})=>{const r=t.map(n=>n.toLowerCase());return e.every(n=>r.includes(Qi(n.name).toLowerCase()))},dh=(t,e)=>{const r=Qi(t);return`${t.replace(new RegExp(`${r}$`),"").slice(0,e)}${r}`},fh=({input:t,onSubmitSuccess:e})=>{var u;const r=(u=I.current$.value.flow)==null?void 0:u.data.submissions[t.key],[n,a]=vt(lh(r)?r.value:[]),[i,o]=vt(),s=n.length-Zi,l=sh(n),h=Sn(),{t:p}=et();return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),o(void 0),n.length===0?o({type:"required",message:p("validation_file")}):t.config.extensions.length>0&&!uh({allowedExtensions:t.config.extensions,files:n})?o({type:"validate",message:`${p("validation_file_ext",{ext:t.config.extensions.join(", ")})}`}):t.config.fileSizeLimitKib&&l>t.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Te(t.config.fileSizeLimitKib)}`}):t.config.allowMultiple===!1&&n.length>1?o({type:"invalid",message:p("validation_file_max",{count:1})}):e({type:"file",value:n})),children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?c(J,{children:[c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,Zi).map(f=>{const b=f.name.split(".").pop(),v=f.name.replace(new RegExp(`.${b}$`),"");return c(Xi,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:[".",b]})]})}),s>0?c(Xi,{children:["+",s," file",s!==1?"s":""]}):null]}),c("p",{class:"text-neutral-11 text-xs",children:[Te(l)," ",n.length>1?"total":""]})]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:t.config.allowMultiple?2:1})}),t.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",p("file_max_size",{size:Te(t.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:t.config.extensions.map(f=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:f.replace(".","")}))})]})]}),c("input",{id:"dropzone-file",onInput:async f=>{yt(f.target instanceof HTMLInputElement);const b=f.target.files?Array.from(f.target.files):[],v=await Promise.allSettled(b.map(async S=>{const x=await oh(S);return{name:dh(S.name,42),data:x,sizeKb:S.size/1e3}}));if(v.some(({status:S})=>S==="rejected"))return o({type:"invalid",message:"Invalid file"});const y=v.map(S=>S.status==="fulfilled"?S.value:null).filter(Boolean);a(y)},multiple:t.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(te,{disabled:n.length===0}),t.config.optional&&c(ee,{onClick:()=>e(null)})]})]}),c(ge,{error:i})]})};var Ve=t=>t.type==="checkbox",ve=t=>t instanceof Date,it=t=>t==null;const to=t=>typeof t=="object";var Y=t=>!it(t)&&!Array.isArray(t)&&to(t)&&!ve(t),hh=t=>Y(t)&&t.target?Ve(t.target)?t.target.checked:t.target.value:t,ph=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,gh=(t,e)=>t.has(ph(e)),vh=t=>{const e=t.constructor&&t.constructor.prototype;return Y(e)&&e.hasOwnProperty("isPrototypeOf")},Cn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Pt(t){let e;const r=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(Cn&&(t instanceof Blob||t instanceof FileList))&&(r||Y(t)))if(e=r?[]:{},!r&&!vh(t))e=t;else for(const n in t)t.hasOwnProperty(n)&&(e[n]=Pt(t[n]));else return t;return e}var je=t=>Array.isArray(t)?t.filter(Boolean):[],U=t=>t===void 0,$=(t,e,r)=>{if(!e||!Y(t))return r;const n=je(e.split(/[,[\].]+?/)).reduce((a,i)=>it(a)?a:a[i],t);return U(n)||n===t?U(t[e])?r:t[e]:n},qt=t=>typeof t=="boolean";const eo={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},kt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};St.createContext(null);var bh=(t,e,r,n=!0)=>{const a={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(a,i,{get:()=>{const o=i;return e._proxyFormState[o]!==kt.all&&(e._proxyFormState[o]=!n||kt.all),r&&(r[o]=!0),t[o]}});return a},bt=t=>Y(t)&&!Object.keys(t).length,wh=(t,e,r,n)=>{r(t);const{name:a,...i}=t;return bt(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!n||kt.all))},$n=t=>Array.isArray(t)?t:[t];function mh(t){const e=St.useRef(t);e.current=t,St.useEffect(()=>{const r=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{r&&r.unsubscribe()}},[t.disabled])}var It=t=>typeof t=="string",_h=(t,e,r,n,a)=>It(t)?(n&&e.watch.add(t),$(r,t,a)):Array.isArray(t)?t.map(i=>(n&&e.watch.add(i),$(r,i))):(n&&(e.watchAll=!0),r),En=t=>/^\w*$/.test(t),ro=t=>je(t.replace(/["|']|\]/g,"").split(/\.|\[/));function V(t,e,r){let n=-1;const a=En(e)?[e]:ro(e),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=r;if(n!==o){const h=t[s];l=Y(h)||Array.isArray(h)?h:isNaN(+a[n+1])?{}:[]}t[s]=l,t=t[s]}return t}var no=(t,e,r,n,a)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:a||!0}}:{},ao=t=>({isOnSubmit:!t||t===kt.onSubmit,isOnBlur:t===kt.onBlur,isOnChange:t===kt.onChange,isOnAll:t===kt.all,isOnTouch:t===kt.onTouched}),io=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length))));const hr=(t,e,r,n)=>{for(const a of r||Object.keys(t)){const i=$(t,a);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],a)&&!n)break;if(o.ref&&e(o.ref,o.name)&&!n)break}else Y(s)&&hr(s,e)}}};var yh=(t,e,r)=>{const n=je($(t,r));return V(n,"root",e[r]),V(t,r,n),t},In=t=>t.type==="file",Kt=t=>typeof t=="function",pr=t=>{if(!Cn)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},gr=t=>It(t),Tn=t=>t.type==="radio",vr=t=>t instanceof RegExp;const oo={value:!1,isValid:!1},so={value:!0,isValid:!0};var lo=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&&!U(t[0].attributes.value)?U(t[0].value)||t[0].value===""?so:{value:t[0].value,isValid:!0}:so:oo}return oo};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,e,r="validate"){if(gr(t)||Array.isArray(t)&&t.every(gr)||qt(t)&&!t)return{type:r,message:gr(t)?t:"",ref:e}}var be=t=>Y(t)&&!vr(t)?t:{value:t,message:""},ho=async(t,e,r,n,a)=>{const{ref:i,refs:o,required:s,maxLength:l,minLength:h,min:p,max:u,pattern:f,validate:b,name:v,valueAsNumber:y,mount:S,disabled:x}=t._f,m=$(e,v);if(!S||x)return{};const A=o?o[0]:i,O=D=>{n&&A.reportValidity&&(A.setCustomValidity(qt(D)?"":D||""),A.reportValidity())},M={},H=Tn(i),at=Ve(i),gt=H||at,L=(y||In(i))&&U(i.value)&&U(m)||pr(i)&&i.value===""||m===""||Array.isArray(m)&&!m.length,ct=no.bind(null,v,r,M),ot=(D,N,q,ut=Dt.maxLength,wt=Dt.minLength)=>{const Tt=D?N:q;M[v]={type:D?ut:wt,message:Tt,ref:i,...ct(D?ut:wt,Tt)}};if(a?!Array.isArray(m)||!m.length:s&&(!gt&&(L||it(m))||qt(m)&&!m||at&&!lo(o).isValid||H&&!uo(o).isValid)){const{value:D,message:N}=gr(s)?{value:!!s,message:s}:be(s);if(D&&(M[v]={type:Dt.required,message:N,ref:A,...ct(Dt.required,N)},!r))return O(N),M}if(!L&&(!it(p)||!it(u))){let D,N;const q=be(u),ut=be(p);if(!it(m)&&!isNaN(m)){const wt=i.valueAsNumber||m&&+m;it(q.value)||(D=wt>q.value),it(ut.value)||(N=wt<ut.value)}else{const wt=i.valueAsDate||new Date(m),Tt=yr=>new Date(new Date().toDateString()+" "+yr),ne=i.type=="time",Be=i.type=="week";It(q.value)&&m&&(D=ne?Tt(m)>Tt(q.value):Be?m>q.value:wt>new Date(q.value)),It(ut.value)&&m&&(N=ne?Tt(m)<Tt(ut.value):Be?m<ut.value:wt<new Date(ut.value))}if((D||N)&&(ot(!!D,q.message,ut.message,Dt.max,Dt.min),!r))return O(M[v].message),M}if((l||h)&&!L&&(It(m)||a&&Array.isArray(m))){const D=be(l),N=be(h),q=!it(D.value)&&m.length>+D.value,ut=!it(N.value)&&m.length<+N.value;if((q||ut)&&(ot(q,D.message,N.message),!r))return O(M[v].message),M}if(f&&!L&&It(m)){const{value:D,message:N}=be(f);if(vr(D)&&!m.match(D)&&(M[v]={type:Dt.pattern,message:N,ref:i,...ct(Dt.pattern,N)},!r))return O(N),M}if(b){if(Kt(b)){const D=await b(m,e),N=fo(D,A);if(N&&(M[v]={...N,...ct(Dt.validate,N.message)},!r))return O(N.message),M}else if(Y(b)){let D={};for(const N in b){if(!bt(D)&&!r)break;const q=fo(await b[N](m,e),A,N);q&&(D={...q,...ct(N,q.message)},O(q.message),r&&(M[v]=D))}if(!bt(D)&&(M[v]={ref:A,...D},!r))return M}}return O(!0),M};function xh(t,e){const r=e.slice(0,-1).length;let n=0;for(;n<r;)t=U(t)?n++:t[e[n++]];return t}function kh(t){for(const e in t)if(t.hasOwnProperty(e)&&!U(t[e]))return!1;return!0}function Q(t,e){const r=Array.isArray(e)?e:En(e)?[e]:ro(e),n=r.length===1?t:xh(t,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(Y(n)&&bt(n)||Array.isArray(n)&&kh(n))&&Q(t,r.slice(0,-1)),t}function An(){let t=[];return{get observers(){return t},next:a=>{for(const i of t)i.next&&i.next(a)},subscribe:a=>(t.push(a),{unsubscribe:()=>{t=t.filter(i=>i!==a)}}),unsubscribe:()=>{t=[]}}}var br=t=>it(t)||!to(t);function re(t,e){if(br(t)||br(e))return t===e;if(ve(t)&&ve(e))return t.getTime()===e.getTime();const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const a of r){const i=t[a];if(!n.includes(a))return!1;if(a!=="ref"){const o=e[a];if(ve(i)&&ve(o)||Y(i)&&Y(o)||Array.isArray(i)&&Array.isArray(o)?!re(i,o):i!==o)return!1}}return!0}var po=t=>t.type==="select-multiple",Sh=t=>Tn(t)||Ve(t),Mn=t=>pr(t)&&t.isConnected,go=t=>{for(const e in t)if(Kt(t[e]))return!0;return!1};function wr(t,e={}){const r=Array.isArray(t);if(Y(t)||r)for(const n in t)Array.isArray(t[n])||Y(t[n])&&!go(t[n])?(e[n]=Array.isArray(t[n])?[]:{},wr(t[n],e[n])):it(t[n])||(e[n]=!0);return e}function vo(t,e,r){const n=Array.isArray(t);if(Y(t)||n)for(const a in t)Array.isArray(t[a])||Y(t[a])&&!go(t[a])?U(e)||br(r[a])?r[a]=Array.isArray(t[a])?wr(t[a],[]):{...wr(t[a])}:vo(t[a],it(e)?{}:e[a],r[a]):r[a]=!re(t[a],e[a]);return r}var On=(t,e)=>vo(t,e,wr(e)),bo=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:n})=>U(t)?t:e?t===""?NaN:t&&+t:r&&It(t)?new Date(t):n?n(t):t;function Nn(t){const e=t.ref;if(!(t.refs?t.refs.every(r=>r.disabled):e.disabled))return In(e)?e.files:Tn(e)?uo(t.refs).value:po(e)?[...e.selectedOptions].map(({value:r})=>r):Ve(e)?lo(t.refs).value:bo(U(e.value)?t.ref.value:e.value,t)}var Ch=(t,e,r,n)=>{const a={};for(const i of t){const o=$(e,i);o&&V(a,i,o._f)}return{criteriaMode:r,names:[...t],fields:a,shouldUseNativeValidation:n}},ze=t=>U(t)?t:vr(t)?t.source:Y(t)?vr(t.value)?t.value.source:t.value:t,$h=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function wo(t,e,r){const n=$(t,r);if(n||En(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=$(e,i),s=$(t,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};a.pop()}return{name:r}}var Eh=(t,e,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(e||t):(r?n.isOnBlur:a.isOnBlur)?!t:(r?n.isOnChange:a.isOnChange)?t:!0,Ih=(t,e)=>!je($(t,e)).length&&Q(t,e);const Th={mode:kt.onSubmit,reValidateMode:kt.onChange,shouldFocusError:!0};function Ah(t={},e){let r={...Th,...t},n={submitCount:0,isDirty:!1,isLoading:Kt(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},a={},i=Y(r.defaultValues)||Y(r.values)?Pt(r.defaultValues||r.values)||{}:{},o=r.shouldUnregister?{}:Pt(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},h,p=0;const u={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:An(),array:An(),state:An()},b=t.resetOptions&&t.resetOptions.keepDirtyValues,v=ao(r.mode),y=ao(r.reValidateMode),S=r.criteriaMode===kt.all,x=d=>g=>{clearTimeout(p),p=setTimeout(d,g)},m=async d=>{if(u.isValid||d){const g=r.resolver?bt((await L()).errors):await ot(a,!0);g!==n.isValid&&f.state.next({isValid:g})}},A=d=>u.isValidating&&f.state.next({isValidating:d}),O=(d,g=[],w,E,k=!0,_=!0)=>{if(E&&w){if(s.action=!0,_&&Array.isArray($(a,d))){const T=w($(a,d),E.argA,E.argB);k&&V(a,d,T)}if(_&&Array.isArray($(n.errors,d))){const T=w($(n.errors,d),E.argA,E.argB);k&&V(n.errors,d,T),Ih(n.errors,d)}if(u.touchedFields&&_&&Array.isArray($(n.touchedFields,d))){const T=w($(n.touchedFields,d),E.argA,E.argB);k&&V(n.touchedFields,d,T)}u.dirtyFields&&(n.dirtyFields=On(i,o)),f.state.next({name:d,isDirty:N(d,g),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else V(o,d,g)},M=(d,g)=>{V(n.errors,d,g),f.state.next({errors:n.errors})},H=(d,g,w,E)=>{const k=$(a,d);if(k){const _=$(o,d,U(w)?$(i,d):w);U(_)||E&&E.defaultChecked||g?V(o,d,g?_:Nn(k._f)):wt(d,_),s.mount&&m()}},at=(d,g,w,E,k)=>{let _=!1,T=!1;const j={name:d};if(!w||E){u.isDirty&&(T=n.isDirty,n.isDirty=j.isDirty=N(),_=T!==j.isDirty);const K=re($(i,d),g);T=$(n.dirtyFields,d),K?Q(n.dirtyFields,d):V(n.dirtyFields,d,!0),j.dirtyFields=n.dirtyFields,_=_||u.dirtyFields&&T!==!K}if(w){const K=$(n.touchedFields,d);K||(V(n.touchedFields,d,w),j.touchedFields=n.touchedFields,_=_||u.touchedFields&&K!==w)}return _&&k&&f.state.next(j),_?j:{}},gt=(d,g,w,E)=>{const k=$(n.errors,d),_=u.isValid&&qt(g)&&n.isValid!==g;if(t.delayError&&w?(h=x(()=>M(d,w)),h(t.delayError)):(clearTimeout(p),h=null,w?V(n.errors,d,w):Q(n.errors,d)),(w?!re(k,w):k)||!bt(E)||_){const T={...E,..._&&qt(g)?{isValid:g}:{},errors:n.errors,name:d};n={...n,...T},f.state.next(T)}A(!1)},L=async d=>r.resolver(o,r.context,Ch(d||l.mount,a,r.criteriaMode,r.shouldUseNativeValidation)),ct=async d=>{const{errors:g}=await L(d);if(d)for(const w of d){const E=$(g,w);E?V(n.errors,w,E):Q(n.errors,w)}else n.errors=g;return g},ot=async(d,g,w={valid:!0})=>{for(const E in d){const k=d[E];if(k){const{_f:_,...T}=k;if(_){const j=l.array.has(_.name),K=await ho(k,o,S,r.shouldUseNativeValidation&&!g,j);if(K[_.name]&&(w.valid=!1,g))break;!g&&($(K,_.name)?j?yh(n.errors,K,_.name):V(n.errors,_.name,K[_.name]):Q(n.errors,_.name))}T&&await ot(T,g,w)}}return w.valid},D=()=>{for(const d of l.unMount){const g=$(a,d);g&&(g._f.refs?g._f.refs.every(w=>!Mn(w)):!Mn(g._f.ref))&&Pn(d)}l.unMount=new Set},N=(d,g)=>(d&&g&&V(o,d,g),!re($o(),i)),q=(d,g,w)=>_h(d,l,{...s.mount?o:U(g)?i:It(d)?{[d]:g}:g},w,g),ut=d=>je($(s.mount?o:i,d,t.shouldUnregister?$(i,d,[]):[])),wt=(d,g,w={})=>{const E=$(a,d);let k=g;if(E){const _=E._f;_&&(!_.disabled&&V(o,d,bo(g,_)),k=pr(_.ref)&&it(g)?"":g,po(_.ref)?[..._.ref.options].forEach(T=>T.selected=k.includes(T.value)):_.refs?Ve(_.ref)?_.refs.length>1?_.refs.forEach(T=>(!T.defaultChecked||!T.disabled)&&(T.checked=Array.isArray(k)?!!k.find(j=>j===T.value):k===T.value)):_.refs[0]&&(_.refs[0].checked=!!k):_.refs.forEach(T=>T.checked=T.value===k):In(_.ref)?_.ref.value="":(_.ref.value=k,_.ref.type||f.values.next({name:d,values:{...o}})))}(w.shouldDirty||w.shouldTouch)&&at(d,k,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Fn(d)},Tt=(d,g,w)=>{for(const E in g){const k=g[E],_=`${d}.${E}`,T=$(a,_);(l.array.has(d)||!br(k)||T&&!T._f)&&!ve(k)?Tt(_,k,w):wt(_,k,w)}},ne=(d,g,w={})=>{const E=$(a,d),k=l.array.has(d),_=Pt(g);V(o,d,_),k?(f.array.next({name:d,values:{...o}}),(u.isDirty||u.dirtyFields)&&w.shouldDirty&&f.state.next({name:d,dirtyFields:On(i,o),isDirty:N(d,_)})):E&&!E._f&&!it(_)?Tt(d,_,w):wt(d,_,w),io(d,l)&&f.state.next({...n}),f.values.next({name:d,values:{...o}}),!s.mount&&e()},Be=async d=>{const g=d.target;let w=g.name,E=!0;const k=$(a,w),_=()=>g.type?Nn(k._f):hh(d),T=j=>{E=Number.isNaN(j)||j===$(o,w,j)};if(k){let j,K;const xr=_(),we=d.type===eo.BLUR||d.type===eo.FOCUS_OUT,Tp=!$h(k._f)&&!r.resolver&&!$(n.errors,w)&&!k._f.deps||Eh(we,$(n.touchedFields,w),n.isSubmitted,y,v),Ln=io(w,l,we);V(o,w,xr),we?(k._f.onBlur&&k._f.onBlur(d),h&&h(0)):k._f.onChange&&k._f.onChange(d);const Vn=at(w,xr,we,!1),Ap=!bt(Vn)||Ln;if(!we&&f.values.next({name:w,type:d.type,values:{...o}}),Tp)return u.isValid&&m(),Ap&&f.state.next({name:w,...Ln?{}:Vn});if(!we&&Ln&&f.state.next({...n}),A(!0),r.resolver){const{errors:Fo}=await L([w]);if(T(xr),E){const Mp=wo(n.errors,a,w),Po=wo(Fo,a,Mp.name||w);j=Po.error,w=Po.name,K=bt(Fo)}}else j=(await ho(k,o,S,r.shouldUseNativeValidation))[w],T(xr),E&&(j?K=!1:u.isValid&&(K=await ot(a,!0)));E&&(k._f.deps&&Fn(k._f.deps),gt(w,K,j,Vn))}},yr=(d,g)=>{if($(n.errors,g)&&d.focus)return d.focus(),1},Fn=async(d,g={})=>{let w,E;const k=$n(d);if(A(!0),r.resolver){const _=await ct(U(d)?d:k);w=bt(_),E=d?!k.some(T=>$(_,T)):w}else d?(E=(await Promise.all(k.map(async _=>{const T=$(a,_);return await ot(T&&T._f?{[_]:T}:T)}))).every(Boolean),!(!E&&!n.isValid)&&m()):E=w=await ot(a);return f.state.next({...!It(d)||u.isValid&&w!==n.isValid?{}:{name:d},...r.resolver||!d?{isValid:w}:{},errors:n.errors,isValidating:!1}),g.shouldFocus&&!E&&hr(a,yr,d?k:l.mount),E},$o=d=>{const g={...i,...s.mount?o:{}};return U(d)?g:It(d)?$(g,d):d.map(w=>$(g,w))},Eo=(d,g)=>({invalid:!!$((g||n).errors,d),isDirty:!!$((g||n).dirtyFields,d),isTouched:!!$((g||n).touchedFields,d),error:$((g||n).errors,d)}),Cp=d=>{d&&$n(d).forEach(g=>Q(n.errors,g)),f.state.next({errors:d?n.errors:{}})},Io=(d,g,w)=>{const E=($(a,d,{_f:{}})._f||{}).ref;V(n.errors,d,{...g,ref:E}),f.state.next({name:d,errors:n.errors,isValid:!1}),w&&w.shouldFocus&&E&&E.focus&&E.focus()},$p=(d,g)=>Kt(d)?f.values.subscribe({next:w=>d(q(void 0,g),w)}):q(d,g,!0),Pn=(d,g={})=>{for(const w of d?$n(d):l.mount)l.mount.delete(w),l.array.delete(w),g.keepValue||(Q(a,w),Q(o,w)),!g.keepError&&Q(n.errors,w),!g.keepDirty&&Q(n.dirtyFields,w),!g.keepTouched&&Q(n.touchedFields,w),!r.shouldUnregister&&!g.keepDefaultValue&&Q(i,w);f.values.next({values:{...o}}),f.state.next({...n,...g.keepDirty?{isDirty:N()}:{}}),!g.keepIsValid&&m()},To=({disabled:d,name:g,field:w,fields:E,value:k})=>{if(qt(d)){const _=d?void 0:U(k)?Nn(w?w._f:$(E,g)._f):k;V(o,g,_),at(g,_,!1,!1,!0)}},Dn=(d,g={})=>{let w=$(a,d);const E=qt(g.disabled);return V(a,d,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:d}},name:d,mount:!0,...g}}),l.mount.add(d),w?To({field:w,disabled:g.disabled,name:d}):H(d,!0,g.value),{...E?{disabled:g.disabled}:{},...r.progressive?{required:!!g.required,min:ze(g.min),max:ze(g.max),minLength:ze(g.minLength),maxLength:ze(g.maxLength),pattern:ze(g.pattern)}:{},name:d,onChange:Be,onBlur:Be,ref:k=>{if(k){Dn(d,g),w=$(a,d);const _=U(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,T=Sh(_),j=w._f.refs||[];if(T?j.find(K=>K===_):_===w._f.ref)return;V(a,d,{_f:{...w._f,...T?{refs:[...j.filter(Mn),_,...Array.isArray($(i,d))?[{}]:[]],ref:{type:_.type,name:d}}:{ref:_}}}),H(d,!1,void 0,_)}else w=$(a,d,{}),w._f&&(w._f.mount=!1),(r.shouldUnregister||g.shouldUnregister)&&!(gh(l.array,d)&&s.action)&&l.unMount.add(d)}}},Ao=()=>r.shouldFocusError&&hr(a,yr,l.mount),Ep=d=>{qt(d)&&(f.state.next({disabled:d}),hr(a,g=>{g.disabled=d},0,!1))},Mo=(d,g)=>async w=>{w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let E=Pt(o);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:k,values:_}=await L();n.errors=k,E=_}else await ot(a);Q(n.errors,"root"),bt(n.errors)?(f.state.next({errors:{}}),await d(E,w)):(g&&await g({...n.errors},w),Ao(),setTimeout(Ao)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bt(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Ip=(d,g={})=>{$(a,d)&&(U(g.defaultValue)?ne(d,$(i,d)):(ne(d,g.defaultValue),V(i,d,g.defaultValue)),g.keepTouched||Q(n.touchedFields,d),g.keepDirty||(Q(n.dirtyFields,d),n.isDirty=g.defaultValue?N(d,$(i,d)):N()),g.keepError||(Q(n.errors,d),u.isValid&&m()),f.state.next({...n}))},Oo=(d,g={})=>{const w=d?Pt(d):i,E=Pt(w),k=d&&!bt(d)?E:i;if(g.keepDefaultValues||(i=w),!g.keepValues){if(g.keepDirtyValues||b)for(const _ of l.mount)$(n.dirtyFields,_)?V(k,_,$(o,_)):ne(_,$(k,_));else{if(Cn&&U(d))for(const _ of l.mount){const T=$(a,_);if(T&&T._f){const j=Array.isArray(T._f.refs)?T._f.refs[0]:T._f.ref;if(pr(j)){const K=j.closest("form");if(K){K.reset();break}}}}a={}}o=t.shouldUnregister?g.keepDefaultValues?Pt(i):{}:Pt(k),f.array.next({values:{...k}}),f.values.next({values:{...k}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&e(),s.mount=!u.isValid||!!g.keepIsValid,s.watch=!!t.shouldUnregister,f.state.next({submitCount:g.keepSubmitCount?n.submitCount:0,isDirty:g.keepDirty?n.isDirty:!!(g.keepDefaultValues&&!re(d,i)),isSubmitted:g.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:g.keepDirtyValues?n.dirtyFields:g.keepDefaultValues&&d?On(i,d):{},touchedFields:g.keepTouched?n.touchedFields:{},errors:g.keepErrors?n.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},No=(d,g)=>Oo(Kt(d)?d(o):d,g);return{control:{register:Dn,unregister:Pn,getFieldState:Eo,handleSubmit:Mo,setError:Io,_executeSchema:L,_getWatch:q,_getDirty:N,_updateValid:m,_removeUnmounted:D,_updateFieldArray:O,_updateDisabledField:To,_getFieldArray:ut,_reset:Oo,_resetDefaultValues:()=>Kt(r.defaultValues)&&r.defaultValues().then(d=>{No(d,r.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:d=>{n={...n,...d}},_disableForm:Ep,_subjects:f,_proxyFormState:u,get _fields(){return a},get _formValues(){return o},get _state(){return s},set _state(d){s=d},get _defaultValues(){return i},get _names(){return l},set _names(d){l=d},get _formState(){return n},set _formState(d){n=d},get _options(){return r},set _options(d){r={...r,...d}}},trigger:Fn,register:Dn,handleSubmit:Mo,watch:$p,setValue:ne,getValues:$o,reset:No,resetField:Ip,clearErrors:Cp,unregister:Pn,setError:Io,setFocus:(d,g={})=>{const w=$(a,d),E=w&&w._f;if(E){const k=E.refs?E.refs[0]:E.ref;k.focus&&(k.focus(),g.shouldSelect&&k.select())}},getFieldState:Eo}}function mr(t={}){const e=St.useRef(),r=St.useRef(),[n,a]=St.useState({isDirty:!1,isValidating:!1,isLoading:Kt(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Kt(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...Ah(t,()=>a(o=>({...o}))),formState:n});const i=e.current.control;return i._options=t,mh({subject:i._subjects.state,next:o=>{wh(o,i._proxyFormState,i._updateFormState,!0)&&a({...i._formState})}}),St.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),St.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),St.useEffect(()=>{t.values&&!re(t.values,r.current)?(i._reset(t.values,i._options.resetOptions),r.current=t.values):i._resetDefaultValues()},[t.values,i]),St.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=bh(n,i),e.current}var mo=function(t,e,r){if(t&&"reportValidity"in t){var n=$(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},Mh=function(t,e){var r=function(a){var i=e.fields[a];i&&i.ref&&"reportValidity"in i.ref?mo(i.ref,a,t):i.refs&&i.refs.forEach(function(o){return mo(o,a,t)})};for(var n in e.fields)r(n)},Oh=function(t,e){e.shouldUseNativeValidation&&Mh(t,e);var r={};for(var n in t){var a=$(e.fields,n),i=Object.assign(t[n]||{},{ref:a&&a.ref});if(Fh(e.names||Object.keys(t),n)){var o=Object.assign({},Nh($(r,n)));V(o,"root",i),V(r,n,o)}else V(r,n,i)}return r},Nh=function(t){return Array.isArray(t)?t.filter(Boolean):[]},Fh=function(t,e){return t.some(function(r){return r.startsWith(e+".")})},Ph=function(t,e){for(var r={};t.issues.length;){var n=t.issues[0];if(n.path){var a=n.path.map(function(s){return s.key}).join(".");if(r[a]||(r[a]={message:n.message,type:n.validation}),e){var i=r[a].types,o=i&&i[n.validation];r[a]=no(a,e,r,n.validation,o?[].concat(o,n.message):n.message)}t.issues.shift()}}return r},_r=function(t,e,r){return r===void 0&&(r={}),function(n,a,i){try{return Promise.resolve(function(o,s){try{var l=function(){function h(u){return{values:r.raw?n:u,errors:{}}}var p=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},e);return r.mode==="sync"?h(Fi(t,n,p)):Promise.resolve(nf(t,n,p)).then(h)}()}catch(h){return s(h)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(o instanceof un)return{values:{},errors:Oh(Ph(o,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}};const _o=27,yo=12,xo=10,Dh=he("enum"),Lh=(t,e)=>{const r={min:t.minSelected??0,max:t.maxSelected??t.options.length};return _r(rt({checked:Ht(pn(W(),ur()),cr(n=>Object.entries(n).filter(([a,i])=>i).map(([a,i])=>a)),Ne(r.max,e("validation_multiple_choice_max",{count:r.max})),pe(r.min,e("validation_multiple_choice_min",{count:r.min})))}))},Vh=zr(({option:t,...e},r)=>c(J,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...e,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:e.id,children:t.label})]})),ko=Wt("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:Yi}}}),jh=({input:t,onSubmitSuccess:e})=>{var p,u;const r=t.key?(p=I.current$.value.flow)==null?void 0:p.data.submissions[t.key]:void 0,n=(t.config.minSelected===1||t.config.minSelected===void 0)&&t.config.maxSelected===1,a=n&&t.config.options.length===2,{t:i}=et(),{register:o,handleSubmit:s,formState:{errors:l}}=mr({defaultValues:{checked:n?{}:Dh(r)?Object.fromEntries(r.value.map(f=>[f,!0])):{}},resolver:Lh(t.config,i)}),h=Sn();return a?c("ul",{style:{maxHeight:6.5*_o+5*yo+2*xo},class:ko({variant:"booleanLike"}),children:t.config.options.map((f,b)=>c("li",{class:"flex-1",children:c(Ji,{type:"submit",ref:v=>{v&&b===0&&(h.current=v)},label:f.label,value:"true",onClick:()=>e({type:"enum",value:[f.value]})})},f.value))}):c("form",{noValidate:!0,onSubmit:f=>s(b=>{const v=b.checked;e({type:"enum",value:v})})(f),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*_o+5*yo+2*xo},class:ko({variant:t.config.options.length===1?"singleOption":void 0}),children:t.config.options.map((f,b)=>{const v=`checked.${f.value}`,{ref:y,...S}=o(v);return c("li",{class:"relative",children:c(Vh,{option:f,autoFocus:b===0,ref:x=>{x&&b===0&&(h.current=x),y(x)},id:v,...S,onClick:n?()=>e({type:"enum",value:[f.value]}):void 0})},f.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:c(te,{}),t.config.minSelected===0&&c(ee,{type:"button",onClick:()=>e({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(ge,{error:(u=l.checked)==null?void 0:u.root})})]})},zh=he("number"),Rh=(t,e)=>{const r=t.min??Number.MIN_SAFE_INTEGER,n=t.max??Number.MAX_SAFE_INTEGER,a=t.decimalCases??0;return _r(rt({number:Ht(Fe(e("validation_number")),Ei(r,e("validation_number_min",{min:r})),$i(n,e("validation_number_max",{max:n})),Si(i=>i===Number(i.toFixed(a)),e("validation_number_decimal_cases",{count:a})))}))},Bh=({input:t,onSubmitSuccess:e})=>{var u;const r=t.config.defaultValue,n=t.key?(u=I.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,{t:a}=et(),{register:i,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{number:r?Number(r):zh(n)?n.value:void 0},resolver:Rh(t.config,a)}),{ref:l,...h}=i("number",{required:!t.config.optional,valueAsNumber:!0}),p=ht();return ft(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(f=>{f.number!==void 0&&e({type:"number",value:f.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...h,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(p.current=f),l(f)},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&&c(ee,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),c(te,{})]}),c(ge,{error:s.number})]})},Uh=t=>{if(t==="")return{countryCode:"",phoneNumber:""};const e=Object.entries(kn).find(a=>t.startsWith(a[1])),r=e?e[1]:"",n=t.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},Hh="44",qh=/^[0-9 ]+$/,Kh=he("string"),Gh=he("phone"),Wh=t=>{const e=Ht(W(t("validation_country_code")),Ii(qh,t("validation_country_code"))),r=Ht(W(t("validation_phone")),pe(1,t("validation_phone")),cr(n=>n.replace(/[^0-9]/g,"")));return _r(rt({countryCode:e,phoneNumber:r}))},Yh=({input:t,onSubmitSuccess:e})=>{var y;const r=t.key?(y=I.current$.value.flow)==null?void 0:y.data.submissions[t.key]:void 0,{t:n}=et(),[a,i]=vt(),o=Kh(r)?Uh(r.value):Gh(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:h},watch:p}=mr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??t.config.defaultValue.countryCode??Hh,phoneNumber:(o==null?void 0:o.phoneNumber)??t.config.defaultValue.phoneNumber??""},resolver:Wh(n)}),{ref:u,...f}=s("phoneNumber",{required:!t.config.optional}),b=ht(),v=p("countryCode");return ft(()=>{b.current&&(b.current.focus(),b.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(S=>{const x=S.phoneNumber.replace(/[^0-9]/g,""),m=S.countryCode.replace(/[^0-9]/g,"");i(void 0);const A=t.config.minChars??7;if(x.length+m.length<A)return i(n("validation_phone_min_chars",{count:A}));t.config.submissionFormat==="phone"?e({type:"phone",value:{countryCode:m,phoneNumber:x}}):e({type:"string",value:v+S.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${t.key}`,children:[c("span",{children:["+",v]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${t.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(kn).map(([S,x])=>c("option",{value:x,children:[S," (+",x,")"]},S))})]}),c("input",{...f,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:S=>{S&&(b.current=S),u(S)},class:Le({optional:t.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:t.config.placeholder}),t.config.optional&&c(ee,{class:"absolute bottom-0 right-0 top-0",onClick:()=>e(null)})]}),c(te,{})]}),c(ge,{error:h.countryCode||h.phoneNumber||{message:a}})]})},Jh=({input:t,onSubmitSuccess:e})=>c("div",{class:"flex flex-col items-center py-3",children:c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:t.key,onClick:()=>{e(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:t.config.label||"Submit"}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),Zh={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Xh=he("string"),Qh=(t,e)=>{const r={maxLength:e("validation_max_chars",{count:t.maxChars??999}),minLength:e("validation_min_chars",{count:t.minChars??1})};return _r(rt({text:{email:Ht(W(e("validation_email")),Ci(e("validation_email")),pe(t.minChars??1,r.minLength),Ne(t.maxChars??1/0,r.maxLength)),text:Ht(W(),pe(t.minChars??1,r.minLength),Ne(t.maxChars??1/0,r.maxLength)),url:Ht(W(e("validation_url")),Ti(e("validation_url")),pe(t.minChars??1,r.minLength),Ne(t.maxChars??1/0,r.maxLength))}[t.format]}))},tp={text:({input:t,onSubmitSuccess:e})=>{var u;const{t:r}=et(),n=t.key?(u=I.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,a=t.config.defaultValue,{register:i,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{text:a||(Xh(n)?n.value:"")},resolver:Qh(t.config,r)}),{ref:l,...h}=i("text",{required:!t.config.optional}),p=ht();return ft(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(f=>{e({type:"string",value:f.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...h,...Zh[t.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(p.current=f),l(f)},placeholder:t.config.placeholder,class:Le({optional:!!t.config.optional,className:"w-full rounded-full"})}),t.config.optional&&c(ee,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),c(te,{})]}),c(ge,{error:s.text})]})},phone:Yh,"multiple-choice":jh,boolean:ih,file:fh,submit:Jh,address:eh,number:Bh},ep=({logger:t})=>{var i;const e=(i=I.current$.value.flow)==null?void 0:i.data.currentInput,[r,n]=Uf(),a=ht(null);return I.inputHeight$.value=n.height,_t(()=>{const o=a.current;if(o)return o.addEventListener("transitionstart",nt.scrollToEnd.smooth),o.addEventListener("transitioncancel",nt.scrollToEnd.smooth),o.addEventListener("transitionend",nt.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",nt.scrollToEnd.smooth),o.removeEventListener("transitioncancel",nt.scrollToEnd.smooth),o.removeEventListener("transitionend",nt.scrollToEnd.smooth)}},[]),c("div",{ref:a,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:n.height},children:c("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:e?(()=>{const o=tp[e.type];return c(o,{logger:t,onSubmitSuccess:nt.onSubmitSuccessFn$.value,input:e})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Le({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(te,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var rp=function(t){return t instanceof RegExp},np=function(e){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return e&&n.test(e)?e.replace(r,"\\$&"):e},So=function(t){return typeof t=="string"},ap=function(t){var e=[];return t.forEach(function(r){Array.isArray(r)?e=e.concat(r):e.push(r)}),e};function ip(t,e,r){var n=0,a=0;if(t==="")return t;if(!t||!So(t))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=e;rp(i)||(i=new RegExp("("+np(i)+")","gi"));for(var o=t.split(i),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}a=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=a}return o}var op=function(e,r,n){return Array.isArray(e)||(e=[e]),ap(e.map(function(a){return So(a)?ip(a,r,n):a}))};const Re=kr(op),sp=/(\[[^\]]+\]\([^)]+\))/g,lp=/\[([^\]]+)\]\(([^)]+)\)/,cp=/(https?:\/\/[^\s]+)/g,up=/_(.*?)_/g,dp=/\*\*(.*?)\*\*/g,fp=/\\n|\n/g,Co="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",hp=t=>{const e=Re(t,sp,(o,s)=>{const[,l,h]=o.match(lp)??[];return h?c("a",{class:Co,href:h,children:l??h},h+s):c("span",{children:"INVALID LINK"})}),r=Re(e,cp,(o,s)=>c("a",{class:Co,href:o,children:o},o+s)),n=Re(r,up,(o,s)=>c("em",{children:o},o+s)),a=Re(n,dp,(o,s)=>c("strong",{children:o},o+s));return Re(a,fp,(o,s)=>c("br",{},`br-${s}`))},pp=Wt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),gp=({children:t,className:e,animate:r,side:n,...a})=>c("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:pp({className:e,side:n,animate:r}),...a,children:t}),vp=({message:t})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("a",{onClick: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,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),bp=({className:t,...e})=>(_t(()=>{nt.scrollToEnd.smooth()}),c("div",{"aria-hidden":!0,children:nt.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Lt("flex gap-1 p-4",t),...e,children:Array.from({length:3},(r,n)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),wp={bot:"left",user:"right"},mp=Wt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),_p=({lastSentMessageFooter:t})=>{var r;const e=((r=I.current$.value.flow)==null?void 0:r.data.messages)??[];return _t(()=>{nt.scrollToEnd.smooth()},[e.length]),c("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[e.map((n,a)=>c(J,{children:c("li",{class:"flex",children:Zt(n).with({type:"system"},i=>c("p",{class:mp({variant:i.variant}),children:i.text})).with({type:"text",author:P.union("bot","user")},i=>{const o=i.author==="user"&&!e.slice(a+1).some(h=>h.type==="text"&&h.author==="user"),s=a===e.length-1,l=i.author==="bot"?hp(i.text):i.text;return c(J,{children:[o?t:null,c(gp,{animate:s,side:wp[i.author],children:l},a)]})}).with({type:"link"},i=>c(vp,{message:i})).with({type:"image"},i=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>c(ch,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).with({type:"loading"},i=>{const o=e[e.length-1];return!(i===o)||nt.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(bi,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},a)),c(bp,{},"typing")]})},yp=({logger:t,apiClient:e,analytics:r})=>{const{flow:n}=I.current$.value;yt(n,"Flow is required to exist to show chatbot body");const a=I.viewState$.value,{chatRef:i,chatService:o}=Yf(),{t:s}=et(),[l,h]=vt();return ft(()=>{a==="maximised"&&nt.scrollToEnd.instant()},[a]),ft(()=>{var S,x;const{state:p,flow:u}=I.current$.peek();if(p!=="loaded")throw new Error(s("invalid_state"));let f=u.data.nodeHistory.at(-1);if(nt.scrollToEnd.instant(),I.setInput(void 0),u.data.isFinished)return;f===void 0?(f=fi(n.nodes).id,I.setCurrentNodeId(f),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:u.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(S=n.analytics)==null?void 0:S.customProperties})):I.removeMessagesSentByNodeIds([f]);const{interpret:b,abort:v,undo:y}=kf({context:n.context,analytics:{service:r,customProperties:(x=n.analytics)==null?void 0:x.customProperties},apiClient:e,logger:t,flow:n,chatService:o,t:s,getSubmissions:()=>{var m;return(m=I.current$.peek().flow)==null?void 0:m.data.submissions},onInterpret:(m,A)=>{var M;const O=I.current$.peek().flow;yt(O),A&&(O.data.sequence=O.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:A.id,flow_build:n.build,to_node_id:m.id,sequence:O.data.sequence,flow_session_id:O.data.flowSessionId,job:n.job},customProperties:(M=n.analytics)==null?void 0:M.customProperties})),I.setCurrentNodeId(m.id)},onFlowEnd:async()=>{var A;I.markAsFinished();const m=I.current$.peek().flow;yt(m),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:m.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(A=n.analytics)==null?void 0:A.customProperties})}});return h(()=>y),b(f),v},[r,e,o,t,n,s]),c(J,{children:[c("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:I.inputHeight$.value},children:c(_p,{lastSentMessageFooter:n.data.isFinished||!l?null:c(kp,{undoFn:l})})}),c(ep,{logger:t})]})},xp=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"):[],kp=({undoFn:t})=>{const{t:e}=et();return c(sr,{onClick:async()=>{const{flow:r}=I.current$.peek();yt(r);const{removed:n}=t(r.data.nodeHistory),a=r.data.nodeHistory.splice(-n);a.length!==0&&(I.removeMessagesSentByNodeIds(a),I.setInput(void 0),a.pop(),a.map(i=>r.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(xp).forEach(i=>delete r.data.submissions[i]),I.current$.value={...I.current$.value})},children:[c("title",{children:e("undo")}),c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})]})},Sp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:yp},Symbol.toStringTag,{value:"Module"}))})();
5
+ }`},Vi=({context:t,schema:e,logger:r})=>{if(e)for(const n in e){const a=e[n];if(!a)continue;const i=_e(t,n,null);if(a.required&&i===null){const o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}switch(a.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:a.type}}},_f=({_internal_domManager:t=Jd(),theme:e,terms:r,feedback:n})=>Po(({apiClient:a,rpcClient:i,logger:o,analytics:s})=>{let l=!1;const h=gd({locale:void 0,overrides:r??{}}),p=()=>{var b;if(typeof window>"u")return;const u=[dt("style",{id:"inploi-chatbot-styles"},Yd),dt("style",{id:"inploi-chatbot-theme"},mf(e))],f=t.getOrCreateChatbotElement();if(le(dt(J,{},[u,dt(Gd,{apiClient:a,logger:o,analytics:s,params:{theme:e,terms:r,feedback:n}})]),f),n){const v=f.querySelector("dialog");if(!v)throw new Error("Couldn't find feedback host");if(n.plugin instanceof Promise)n.plugin.then(({feedbackPlugin:y})=>{var x;const S=y()({rpcClient:i,apiClient:a,logger:o,analytics:s});ji({instance:S,theme:e,terms:((x=n.params)==null?void 0:x.terms)??{},host:v})});else{const y=n.plugin({rpcClient:i,apiClient:a,logger:o,analytics:s});ji({instance:y,theme:e,terms:((b=n.params)==null?void 0:b.terms)??{},host:v})}}l=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(l)return;p(),o.info("Chatbot plugin prepared")}catch(u){o.error("Error preparing chatbot plugin",u)}},fetchFlowByJobId:async(u,f)=>i.request(cf,{params:{id:u},searchParams:{id_type:(f==null?void 0:f.idType)==="inploi"?"internal":"external"}}).then(b=>({flow:b.flow,title:b.job.title,flowKeys:[b.job.id,...(f==null?void 0:f.flowKeys)??[]],job:{id:b.job.id,id_type:"external"},...f,context:{user:b.user,...f==null?void 0:f.context}})),fetchFlowById:async(u,f)=>i.request(uf,{params:{id:u}}).then(b=>{var v;return{flow:b.flow,title:"Chatbot",flowKeys:(f==null?void 0:f.flowKeys)??[],...f,analytics:{customProperties:{flow_id:b.flow.id,flow_version:b.flow.version,...(v=f==null?void 0:f.analytics)==null?void 0:v.customProperties}}}}),open:async u=>{if(!(typeof window>"u"))try{I.cancelCurrentFlow(),I.viewState$.value="maximised",l||p(),u instanceof Promise?(I.current$.value={state:"loading"},u.then(async f=>{Vi({context:f.context||{},schema:f.flow.context_schema,logger:o}),I.startFlow(f)}).catch(f=>{const b=f instanceof Error?f.message:h("unknown_error");I.current$.value={state:"error",error:b}})):(Vi({context:u.context||{},schema:u.flow.context_schema,logger:o}),I.startFlow(u))}catch(f){o.error("Error starting flow",f)}},close:async()=>{typeof window>"u"||(I.cancelCurrentFlow(),o.info("Closed flow from an external source"))}}});function ji({instance:t,terms:e,theme:r,host:n}){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:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=_f;const zi=({condition:t,context:e,submissions:r,ifBlock:n})=>{const[a,...i]=t.compareKey.split(".");if(!a)return!1;const o=Bi({context:e,key:a,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=_e(o.value,i.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=_e(o.value,i.join(".")),l={...n,data:{...n.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return De(l,{submissions:{_temp:{value:s,type:"boolean"}},context:e});case"string":return De(l,{submissions:{_temp:{value:s,type:"string"}},context:e});case"number":return De(l,{submissions:{_temp:{value:s,type:"number"}},context:e});case"object":return Array.isArray(s)&&s.every(hi)?De(l,{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"?fr(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 ${n.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}},De=(t,{context:e,submissions:r})=>{const n="combinator"in t.data?t.data.conditions:[t.data];if(("combinator"in t.data?t.data.combinator:"and")==="or"){for(const i of n)if(zi({condition:i,context:e,submissions:r,ifBlock:t}))return!0;return!1}else{for(const i of n)if(!zi({condition:i,context:e,submissions:r,ifBlock:t}))return!1;return!0}},yf=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Et=(t,{context:e,submissions:r})=>t.replace(yf,(n,a,i="")=>{const[o,...s]=a.trim().split("."),l=Bi({key:o,path:s,submissions:r,context:e});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(h=>`${h.name} (${Te(h.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(h=>h&&h.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"phone":return fr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const h=_e(l.value,s.join("."));switch(typeof h){case"boolean":return h===!0?"true":"false";case"string":return h;case"number":return h.toString();case"object":if(Array.isArray(h)&&h.every(hi))return h.join(", ")}break}}return i}),Ri=({node:t,nodes:e,stopWhen:r})=>{if((r==null?void 0:r(t))===!0)return t;const n=t.nextId?e.find(a=>a.id===t.nextId):void 0;if(n)return Ri({node:n,nodes:e,stopWhen:r})},xf=({childNode:t,nodes:e})=>{const n=e.filter(a=>a.type==="if-block").find(a=>{if(!a.branchId)return!1;const i=e.find(s=>s.id===a.branchId);if(!i)return!1;const o=Ri({node:i,nodes:e,stopWhen:s=>s.id===t.id});return!(!o||o.id!==t.id)});if(n!=null&&n.nextId)return e.find(a=>a.id===n.nextId)},kf=({flow:t,analytics:e,logger:r,context:n,apiClient:a,getSubmissions:i,chatService:o,onFlowEnd:s,onInterpret:l,t:h})=>{let p=new AbortController;const u={...e.service,log:b=>e.service.log({...b,customProperties:{...b.customProperties,...e.customProperties}})},f=async(b,v)=>{const y=i();l==null||l(b,v);try{await Sf({flow:t,analytics:u,logger:r,apiClient:a,context:n,node:b,submissions:y,t:h,chat:{sendMessage:async S=>o.send({groupId:b.id,message:S,signal:p.signal}),userInput:async S=>o.input({input:S,signal:p.signal}),addToSubmissions:o.addToSubmissions},next:S=>{const x=S?t.nodes.find(m=>m.id===S):xf({childNode:b,nodes:t.nodes});return x?f(x,b):s==null?void 0:s(b)},end:()=>s==null?void 0:s(b)})}catch(S){if(S instanceof Ae)return;throw S}};return{interpret:async b=>{const v=t.nodes.find(y=>y.id===b)??fi(t.nodes);return f(v)},undo:b=>{let v=1;const y=t.nodes.find(x=>x.id===b[b.length-1]);for(let x=b.length-2;x>0;x--){const m=b[x],A=t.nodes.find(P=>P.id===m);if(!A||(v++,A.type.startsWith("question-")))break}p.abort(),p=new AbortController;const S=t.nodes.find(x=>x.id===b[b.length-v]);return $t(S,"Undo failed: new start node not found"),f(S,y),{removed:v}},abort:()=>{p.abort()}}},fr=t=>`+${t.countryCode} ${t.phoneNumber}`;async function Sf(t){const e=t.node;switch(e.type){case"text":return Nf({...t,node:e});case"image":return Of({...t,node:e});case"question-text":return Ff({...t,node:e});case"question-enum":return Lf({...t,node:e});case"question-number":return Df({...t,node:e});case"question-phone":return Pf({...t,node:e});case"question-boolean":return Vf({...t,node:e});case"question-file":return zf({...t,node:e});case"question-address":return jf({...t,node:e});case"end-flow":return Rf({...t,node:e});case"if-block":return Mf({...t,node:e});case"jump":return Ef({...t,node:e});case"link":return Af({...t,node:e});case"integration-application-submit":return Tf({...t,node:e});case"add-submission":return If({...t,node:e});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return $f({...t,node:e});case"feedback":return Cf({...t,node:e});default:throw new Error(`Unknown node: ${JSON.stringify(e)}`)}}const Pe=(t,e)=>{var n;const r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r};async function Cf({next:t,node:e}){t(e.nextId)}async function $f({next:t,node:e,analytics:r,submissions:n,logger:a}){if(!n)return t(e.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:Pe(n,e.data.key).toString(),first_name:e.data.firstName?Pe(n,e.data.firstName).toString():void 0,last_name:e.data.lastName?Pe(n,e.data.lastName).toString():void 0,email:e.data.email?Pe(n,e.data.email).toString():void 0,phone_number:e.data.phoneNumber?Pe(n,e.data.phoneNumber).toString():void 0,custom_traits:e.data.customTraits?Object.fromEntries(e.data.customTraits.map(({key:i,value:o})=>{var s;return[i,(s=n[o])==null?void 0:s.value]})):void 0}})}catch(i){a.error(i)}finally{t(e.nextId)}}async function Ef({next:t,node:e}){t(e.data.targetId)}async function If({next:t,node:e,logger:r,submissions:n,context:a}){if(!n){r.error("Submissions not found");return}n[e.data.key]={type:"string",value:Et(e.data.value,{submissions:n,context:a})},t(e.nextId)}async function Tf({chat:t,next:e,node:r,logger:n,apiClient:a,submissions:i,analytics:o,flow:s,t:l}){const h=async p=>{p!==!0&&await t.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await t.sendMessage({type:"loading"});const{anonymous_id:u,session_id:f}=o.getSessionInfo(),b=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:u,session_id:f,job:s.job,submissions:Od(i||{})})}).catch(v=>v);r.data.key&&t.addToSubmissions(r.data.key,{type:"integration",value:b}),Zt(b).with({integration_response:F.select(F.union({service:F.optional(F.string),status:F.number,data:F.any},{service:F.optional(F.string),status:F.number,error:{message:F.string,data:F.any}}))},v=>{o.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:v.service??"INVALID_SERVICE",response:{status:v.status,payload:"data"in v?v.data:v.error.data??null},job:s.job}})}).otherwise(()=>{}),await Zt(b).with({integration_response:{data:F.select("redirect",{redirect_url:F.string,message:F.optional(F.union(F.string,F.nullish)),button_text:F.optional(F.union(F.string,F.nullish))})}},async v=>{await t.sendMessage({type:"text",author:"bot",text:v.redirect.message??l("submission_redirect_message")});try{const y=new URL(v.redirect.redirect_url);u&&!y.searchParams.has("anonymous_id")&&y.searchParams.set("anonymous_id",u),await t.sendMessage({type:"link",href:y.toString(),text:v.redirect.button_text??l("complete_submission"),onClick:()=>{if(!f){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:f,flow_version:s.version,href:y.toString(),job:s.job}})}})}catch(y){n.error(`Invalid redirect URL: ${v.redirect.redirect_url}`,y),t.sendMessage({type:"system",variant:"error",text:l("redirect_url_error")})}e(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await t.sendMessage({type:"system",variant:"success",text:l("submission_completed")}),e(r.nextId)}).with({integration_response:{error:F.select("error",{message:F.string})}},async v=>{n.error(v.error),await t.sendMessage({type:"system",variant:"error",text:v.error.message||l("submission_failed")}),await h(!1)}).otherwise(async v=>{n.error(v),await t.sendMessage({type:"system",variant:"error",text:l("submission_failed")}),await h(!1)})};await h(r.data.skipConfirmation)}async function Af({chat:t,next:e,node:r,submissions:n,context:a}){await t.sendMessage({type:"link",href:Et(r.data.href,{submissions:n,context:a}),text:Et(r.data.cta,{submissions:n,context:a})}),e(r.nextId)}async function Mf({submissions:t,next:e,node:r,context:n}){e(De(r,{submissions:t,context:n})?r.branchId:r.nextId)}async function Nf({chat:t,next:e,node:r,submissions:n,context:a}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.text,{submissions:n,context:a})}),e(r.nextId)}async function Of({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 Ff({chat:t,next:e,node:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});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,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:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.type==="phone"?fr(o.value):o.value}),e(r.nextId)}async function Df({chat:t,next:e,node:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});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:i("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value.toString()}),e(r.nextId)}async function Pf({chat:t,next:e,node:r,submissions:n,context:a}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});const i=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}});i===null?await t.sendMessage({type:"system",variant:"info",text:"Skipped"}):await t.sendMessage({author:"user",type:"text",text:i.type==="phone"?fr(i.value):i.value}),e(r.nextId)}async function Lf({chat:t,next:e,node:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});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:i("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 Vf({chat:t,next:e,node:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Et(r.data.question,{submissions:n,context:a})});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:i("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:n}){await t.sendMessage({author:"bot",type:"text",text:r.data.question});const a=await t.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(a===null)await t.sendMessage({type:"system",variant:"info",text:n("skipped")});else{const i=Object.values(a.value).filter(o=>o&&o.trim().length>0).join(", ");await t.sendMessage({author:"user",type:"text",text:i})}return e(r.nextId)}async function zf({node:t,chat:e,next:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Et(t.data.question,{submissions:n,context:a})});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:i("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 Rf({chat:t,end:e,node:r}){await t.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),e()}const Bi=({key:t,path:e,submissions:r,context:n})=>{if(t==="$context"){if(!e)return;const a=_e(n,e.join("."));switch(typeof a){case"string":return{type:"string",value:a};case"number":return{type:"number",value:a};case"boolean":return{type:"boolean",value:a};default:console.warn(`Unexpected type for $context.${e.join(".")}`,a);return}}return r==null?void 0:r[t]};function yn(t,e,r){var n,a,i,o,s;e==null&&(e=100);function l(){var p=Date.now()-o;p<e&&p>=0?n=setTimeout(l,e-p):(n=null,r||(s=t.apply(i,a),i=a=null))}var h=function(){i=this,a=arguments,o=Date.now();var p=r&&!n;return n||(n=setTimeout(l,e)),p&&(s=t.apply(i,a),i=a=null),s};return h.clear=function(){n&&(clearTimeout(n),n=null)},h.flush=function(){n&&(s=t.apply(i,a),i=a=null,clearTimeout(n),n=null)},h}yn.debounce=yn;var Bf=yn;const Ui=kr(Bf);function Uf(t){let{debounce:e,scroll:r,polyfill:n,offsetSize:a}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const i=n||(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[o,s]=vt({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=ht({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),h=e?typeof e=="number"?e:e.scroll:null,p=e?typeof e=="number"?e:e.resize:null,u=ht(!1);_t(()=>(u.current=!0,()=>void(u.current=!1)));const[f,b,v]=Nt(()=>{const m=()=>{if(!l.current.element)return;const{left:A,top:P,width:M,height:H,bottom:at,right:gt,x:L,y:ct}=l.current.element.getBoundingClientRect(),ot={left:A,top:P,width:M,height:H,bottom:at,right:gt,x:L,y:ct};l.current.element instanceof HTMLElement&&a&&(ot.height=l.current.element.offsetHeight,ot.width=l.current.element.offsetWidth),Object.freeze(ot),u.current&&!Gf(l.current.lastBounds,ot)&&s(l.current.lastBounds=ot)};return[m,p?Ui(m,p):m,h?Ui(m,h):m]},[s,a,h,p]);function y(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(m=>m.removeEventListener("scroll",v,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function S(){l.current.element&&(l.current.resizeObserver=new i(v),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(m=>m.addEventListener("scroll",v,{capture:!0,passive:!0})))}const x=m=>{!m||m===l.current.element||(y(),l.current.element=m,l.current.scrollContainers=Hi(m),S())};return qf(v,!!r),Hf(b),_t(()=>{y(),S()},[r,v,b]),_t(()=>y,[]),[x,o,f]}function Hf(t){_t(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function qf(t,e){_t(()=>{if(e){const r=t;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[t,e])}function Hi(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:n,overflowY:a}=window.getComputedStyle(t);return[r,n,a].some(i=>i==="auto"||i==="scroll")&&e.push(t),[...e,...Hi(t.parentElement)]}const Kf=["x","y","top","bottom","left","right","width","height"],Gf=(t,e)=>Kf.every(r=>t[r]===e[r]),te=({class:t,...e})=>{const{t:r}=et();return c("button",{class:Lt("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:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})},Wf=25,xn=Rt({instant:()=>{},smooth:()=>{}}),nt={onSubmitSuccessFn$:Rt(()=>{}),isBotTyping$:Rt(!1),scrollToEnd:{instant:()=>xn.value.instant(),smooth:()=>xn.value.smooth()}},Yf=()=>{const t=ht(null);ft(()=>{xn.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=Nt(()=>({addToSubmissions:(n,a)=>I.setSubmission(n,a),send:async({message:n,signal:a,groupId:i})=>{if(await Zt(n).with({author:"bot",type:"text"},async o=>{if(a!=null&&a.aborted)throw new Ae;nt.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Wf;await new Promise(l=>setTimeout(l,s,{signal:a})),nt.isBotTyping$.value=!1}).otherwise(async()=>{}),a!=null&&a.aborted)throw new Ae;I.addMessage(n,i)},input:({input:n,signal:a})=>{if(a!=null&&a.aborted)throw new Ae;return I.setInput(n),new Promise(i=>{const o=s=>{if(a!=null&&a.aborted)throw new Ae;I.setInput(void 0),n.key&&I.setSubmission(n.key,s),i(s)};nt.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:t,chatService:e}},ge=({error:t})=>!t||!t.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[c("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"truncate pr-1 text-sm",children:t.message})]}),ee=({class:t,...e})=>{const{t:r}=et();return c("button",{type:"button",class:Lt("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",t),...e,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},kn={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=Wt("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Jf="https://api.mapbox.com/search/searchbox/v1/suggest",Zf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Xf=t=>atob(t).split("").reverse().join(""),Ft=rt({name:W()}),Qf=rt({suggestions:fn(rt({full_address:yt(W()),place_formatted:yt(W()),name:yt(W()),mapbox_id:W(),context:af(rt({address:Ft,street:Ft,neighborhood:Ft,locality:Ft,district:Ft,place:Ft,region:Ft,postcode:Ft,country:Ft}))}))}),th=({logger:t,t:e})=>Nt(()=>{var n;const r=(n=I.current$.peek().flow)==null?void 0:n.data.flowSessionId;return r?{enabled:!0,getPredictions:async a=>{var u;const i=new URL(Jf);i.searchParams.set("q",a),i.searchParams.set("session_token",r);const o=(u=I.current$.peek().flow)==null?void 0:u.locationOrigin;o&&o.lat!==void 0&&o.lng!==void 0&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180&&i.searchParams.set("proximity",`${o.lng},${o.lat}`),i.searchParams.set("access_token",Xf(Zf));const l=await fetch(i);if(!l.ok)return t.error("Failed to get address details",l),{ok:!1,error:e("address_error")};const h=of(Qf,await l.json());if(h.success===!1)return t.error("Failed to parse address details",h.issues),{ok:!1,error:e("address_error")};const{suggestions:p}=h.output;return{ok:!0,data:p.map(f=>{var b,v,y,S,x,m,A,P,M;return{label:f.full_address??f.place_formatted??f.name??f.mapbox_id,id:f.mapbox_id,address:{line1:((b=f.context.address)==null?void 0:b.name)??((v=f.context.street)==null?void 0:v.name),line2:void 0,line3:((y=f.context.neighborhood)==null?void 0:y.name)??((S=f.context.locality)==null?void 0:S.name),city:((x=f.context.place)==null?void 0:x.name)??((m=f.context.district)==null?void 0:m.name),state:(A=f.context.region)==null?void 0:A.name,postcode:(P=f.context.postcode)==null?void 0:P.name,country:(M=f.context.country)==null?void 0:M.name}}})}}}:{enabled:!1}},[t,e]),qi=t=>{const{t:e}=et();return c("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...t,children:[c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:e("back")})]})},eh=({input:t,onSubmitSuccess:e,logger:r})=>{const{t:n}=et(),[a,i]=vt(),[o,s]=vt([]),{enabled:l,getPredictions:h}=th({logger:r,t:n}),[p,u]=vt(l?"query":"manual"),[f,b]=vt(""),[v,y]=vt(),S=x=>{$t(l,"Query state should not be enabled"),x=x.trim(),x!==(f==null?void 0:f.trim())&&(b(x),x===""&&s([]),y(void 0),h(x).then(m=>{if(m.ok===!1){s([]),y(m.error);return}s(m.data)}))};switch(p){case"query":return $t(l,"Query state should not be enabled"),c(rh,{input:t,onSkip:()=>e(null),onAddressSelect:x=>{if(x===""){i(void 0),u("manual");return}const m=o.find(A=>A.id===x);m&&(i(m.address),u("details"))},onAddressSearch:x=>{S(x)},suggestions:o,query:f,error:v});case"details":return $t(a!==void 0),c(Gi,{input:t,logger:r,onSubmitSuccess:e,addressFields:a,actions:c(qi,{onClick:()=>{u("query")}})});case"manual":return c(Gi,{logger:r,input:t,onSubmitSuccess:e,addressFields:{},actions:l?c(qi,{onClick:()=>{u("query")}}):void 0})}},rh=({input:t,onSkip:e,suggestions:r,onAddressSelect:n,query:a,onAddressSearch:i,error:o})=>{const{t:s}=et(),l=ht(null);return ft(()=>{l.current&&(l.current.focus(),l.current.select())},[]),c(J,{children:[c("form",{noValidate:!0,onSubmit:h=>{h.preventDefault();const u=new FormData(h.currentTarget).get("address");typeof u=="string"&&i(u)},class:"flex gap-1 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:t.config.placeholder||s("address_search"),defaultValue:a,class:Le({optional:!!t.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]}),c("span",{class:"sr-only",children:s("search")})]})})]}),t.config.optional&&c(ee,{class:"",onClick:e})]}),o?c(ge,{error:{message:o}}):null,c("ul",{children:[r.map(h=>c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(h.id)},children:[c("span",{class:"flex-grow",children:h.label}),c("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 3L11 8L6 13"})})]})},h.id)),c("li",{children:c("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n("")},children:c("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},Ki=["line1","line2","line3","city","state","postcode","country"],Gi=({addressFields:t,onSubmitSuccess:e,actions:r,input:n})=>{const a=ht(null);ft(()=>{if(a.current){const s=a.current.querySelector("input");s&&(s.focus(),s.select())}},[]);const i=Object.keys(kn),{t:o}=et();return c("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:s=>{const l=new FormData(s.currentTarget),h=Object.fromEntries(l.entries());e({type:"address",value:h})},children:[c("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:Ki.map((s,l)=>{const h=`isdk_${s}`,p=n.config.keys[s];return p?c(J,{children:[c("label",{for:h,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:o(s)}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[s==="country"?c("div",{class:"relative",children:[c("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:p,id:h,defaultValue:t[s],required:!0,children:[t.country&&!i.includes(t.country)?c("option",{value:t[s],children:t[s]}):c("option",{value:"",children:o("select_country")}),i.map(u=>c("option",{value:u,children:u},u))]}),c("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:l===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:p,id:h,defaultValue:t[s],required:!0}),l===Ki.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"flex w-full flex-1 ",children:[c("div",{class:"flex-grow",children:r}),c(te,{class:"flex items-center justify-center"})]})]})},Sn=()=>{const t=ht(null);return _t(()=>{var e;(e=t.current)==null||e.focus()},[]),t},Wi=["true","false"],nh=Ni(Wi),ah="answer",Yi="flex items-center gap-2 p-2.5",Ji=zr(({label:t,...e},r)=>c("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...e,ref:r,children:c("p",{class:"truncate text-center text-base",children:t})})),ih=({input:t,onSubmitSuccess:e})=>{const r=Sn();return c("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const a=Vd(n).value,i=Fi(nh,a);e({type:"boolean",value:i==="true"})},children:[c("ul",{class:Yi,children:Wi.map((n,a)=>c("li",{class:"flex-1",children:c(Ji,{ref:a===0?r:null,type:"submit",name:ah,value:n,label:t.config.labels[n]},n)}))}),t.config.optional&&c("div",{class:"px-2 pb-2",children:c(ee,{class:"w-full",type:"button",onClick:()=>e(null)})})]})},oh=t=>new Promise((e,r)=>{const n=new FileReader;n.readAsDataURL(t),n.onload=()=>n.result?e(n.result.toString()):r("No result from reader"),n.onerror=r}),sh=t=>t.reduce((e,r)=>e+r.sizeKb,0),lh=he("file"),Zi=3,ch=({file:t,class:e,...r})=>{const n=t.name.split(".").pop(),a=t.name.replace(new RegExp(`.${n}$`),"");return c("div",{class:Lt("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:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:a}),c("span",{children:[".",n]})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Te(t.sizeKb)})]})},Xi=({class:t,...e})=>c("li",{class:Lt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",t),...e}),Qi=t=>{const e=t.split(".").pop();if(!e)throw new Error("No file extension found");return e?"."+e:""},uh=({allowedExtensions:t,files:e})=>{const r=t.map(n=>n.toLowerCase());return e.every(n=>r.includes(Qi(n.name).toLowerCase()))},dh=(t,e)=>{const r=Qi(t);return`${t.replace(new RegExp(`${r}$`),"").slice(0,e)}${r}`},fh=({input:t,onSubmitSuccess:e})=>{var u;const r=(u=I.current$.value.flow)==null?void 0:u.data.submissions[t.key],[n,a]=vt(lh(r)?r.value:[]),[i,o]=vt(),s=n.length-Zi,l=sh(n),h=Sn(),{t:p}=et();return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),o(void 0),n.length===0?o({type:"required",message:p("validation_file")}):t.config.extensions.length>0&&!uh({allowedExtensions:t.config.extensions,files:n})?o({type:"validate",message:`${p("validation_file_ext",{ext:t.config.extensions.join(", ")})}`}):t.config.fileSizeLimitKib&&l>t.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Te(t.config.fileSizeLimitKib)}`}):t.config.allowMultiple===!1&&n.length>1?o({type:"invalid",message:p("validation_file_max",{count:1})}):e({type:"file",value:n})),children:[c("div",{class:"flex items-center gap-2",children:[c("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?c(J,{children:[c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,Zi).map(f=>{const b=f.name.split(".").pop(),v=f.name.replace(new RegExp(`.${b}$`),"");return c(Xi,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:[".",b]})]})}),s>0?c(Xi,{children:["+",s," file",s!==1?"s":""]}):null]}),c("p",{class:"text-neutral-11 text-xs",children:[Te(l)," ",n.length>1?"total":""]})]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:t.config.allowMultiple?2:1})}),t.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",p("file_max_size",{size:Te(t.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:t.config.extensions.map(f=>c("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:f.replace(".","")}))})]})]}),c("input",{id:"dropzone-file",onInput:async f=>{$t(f.target instanceof HTMLInputElement);const b=f.target.files?Array.from(f.target.files):[],v=await Promise.allSettled(b.map(async S=>{const x=await oh(S);return{name:dh(S.name,42),data:x,sizeKb:S.size/1e3}}));if(v.some(({status:S})=>S==="rejected"))return o({type:"invalid",message:"Invalid file"});const y=v.map(S=>S.status==="fulfilled"?S.value:null).filter(Boolean);a(y)},multiple:t.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(te,{disabled:n.length===0}),t.config.optional&&c(ee,{onClick:()=>e(null)})]})]}),c(ge,{error:i})]})};var Ve=t=>t.type==="checkbox",ve=t=>t instanceof Date,it=t=>t==null;const to=t=>typeof t=="object";var Y=t=>!it(t)&&!Array.isArray(t)&&to(t)&&!ve(t),hh=t=>Y(t)&&t.target?Ve(t.target)?t.target.checked:t.target.value:t,ph=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,gh=(t,e)=>t.has(ph(e)),vh=t=>{const e=t.constructor&&t.constructor.prototype;return Y(e)&&e.hasOwnProperty("isPrototypeOf")},Cn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Dt(t){let e;const r=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(Cn&&(t instanceof Blob||t instanceof FileList))&&(r||Y(t)))if(e=r?[]:{},!r&&!vh(t))e=t;else for(const n in t)t.hasOwnProperty(n)&&(e[n]=Dt(t[n]));else return t;return e}var je=t=>Array.isArray(t)?t.filter(Boolean):[],U=t=>t===void 0,$=(t,e,r)=>{if(!e||!Y(t))return r;const n=je(e.split(/[,[\].]+?/)).reduce((a,i)=>it(a)?a:a[i],t);return U(n)||n===t?U(t[e])?r:t[e]:n},qt=t=>typeof t=="boolean";const eo={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Pt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};kt.createContext(null);var bh=(t,e,r,n=!0)=>{const a={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(a,i,{get:()=>{const o=i;return e._proxyFormState[o]!==xt.all&&(e._proxyFormState[o]=!n||xt.all),r&&(r[o]=!0),t[o]}});return a},bt=t=>Y(t)&&!Object.keys(t).length,wh=(t,e,r,n)=>{r(t);const{name:a,...i}=t;return bt(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!n||xt.all))},$n=t=>Array.isArray(t)?t:[t];function mh(t){const e=kt.useRef(t);e.current=t,kt.useEffect(()=>{const r=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{r&&r.unsubscribe()}},[t.disabled])}var It=t=>typeof t=="string",_h=(t,e,r,n,a)=>It(t)?(n&&e.watch.add(t),$(r,t,a)):Array.isArray(t)?t.map(i=>(n&&e.watch.add(i),$(r,i))):(n&&(e.watchAll=!0),r),En=t=>/^\w*$/.test(t),ro=t=>je(t.replace(/["|']|\]/g,"").split(/\.|\[/));function V(t,e,r){let n=-1;const a=En(e)?[e]:ro(e),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=r;if(n!==o){const h=t[s];l=Y(h)||Array.isArray(h)?h:isNaN(+a[n+1])?{}:[]}t[s]=l,t=t[s]}return t}var no=(t,e,r,n,a)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:a||!0}}:{},ao=t=>({isOnSubmit:!t||t===xt.onSubmit,isOnBlur:t===xt.onBlur,isOnChange:t===xt.onChange,isOnAll:t===xt.all,isOnTouch:t===xt.onTouched}),io=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length))));const hr=(t,e,r,n)=>{for(const a of r||Object.keys(t)){const i=$(t,a);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],a)&&!n)break;if(o.ref&&e(o.ref,o.name)&&!n)break}else Y(s)&&hr(s,e)}}};var yh=(t,e,r)=>{const n=je($(t,r));return V(n,"root",e[r]),V(t,r,n),t},In=t=>t.type==="file",Kt=t=>typeof t=="function",pr=t=>{if(!Cn)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},gr=t=>It(t),Tn=t=>t.type==="radio",vr=t=>t instanceof RegExp;const oo={value:!1,isValid:!1},so={value:!0,isValid:!0};var lo=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&&!U(t[0].attributes.value)?U(t[0].value)||t[0].value===""?so:{value:t[0].value,isValid:!0}:so:oo}return oo};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,e,r="validate"){if(gr(t)||Array.isArray(t)&&t.every(gr)||qt(t)&&!t)return{type:r,message:gr(t)?t:"",ref:e}}var be=t=>Y(t)&&!vr(t)?t:{value:t,message:""},ho=async(t,e,r,n,a)=>{const{ref:i,refs:o,required:s,maxLength:l,minLength:h,min:p,max:u,pattern:f,validate:b,name:v,valueAsNumber:y,mount:S,disabled:x}=t._f,m=$(e,v);if(!S||x)return{};const A=o?o[0]:i,P=D=>{n&&A.reportValidity&&(A.setCustomValidity(qt(D)?"":D||""),A.reportValidity())},M={},H=Tn(i),at=Ve(i),gt=H||at,L=(y||In(i))&&U(i.value)&&U(m)||pr(i)&&i.value===""||m===""||Array.isArray(m)&&!m.length,ct=no.bind(null,v,r,M),ot=(D,N,q,ut=Pt.maxLength,wt=Pt.minLength)=>{const Tt=D?N:q;M[v]={type:D?ut:wt,message:Tt,ref:i,...ct(D?ut:wt,Tt)}};if(a?!Array.isArray(m)||!m.length:s&&(!gt&&(L||it(m))||qt(m)&&!m||at&&!lo(o).isValid||H&&!uo(o).isValid)){const{value:D,message:N}=gr(s)?{value:!!s,message:s}:be(s);if(D&&(M[v]={type:Pt.required,message:N,ref:A,...ct(Pt.required,N)},!r))return P(N),M}if(!L&&(!it(p)||!it(u))){let D,N;const q=be(u),ut=be(p);if(!it(m)&&!isNaN(m)){const wt=i.valueAsNumber||m&&+m;it(q.value)||(D=wt>q.value),it(ut.value)||(N=wt<ut.value)}else{const wt=i.valueAsDate||new Date(m),Tt=yr=>new Date(new Date().toDateString()+" "+yr),ne=i.type=="time",Be=i.type=="week";It(q.value)&&m&&(D=ne?Tt(m)>Tt(q.value):Be?m>q.value:wt>new Date(q.value)),It(ut.value)&&m&&(N=ne?Tt(m)<Tt(ut.value):Be?m<ut.value:wt<new Date(ut.value))}if((D||N)&&(ot(!!D,q.message,ut.message,Pt.max,Pt.min),!r))return P(M[v].message),M}if((l||h)&&!L&&(It(m)||a&&Array.isArray(m))){const D=be(l),N=be(h),q=!it(D.value)&&m.length>+D.value,ut=!it(N.value)&&m.length<+N.value;if((q||ut)&&(ot(q,D.message,N.message),!r))return P(M[v].message),M}if(f&&!L&&It(m)){const{value:D,message:N}=be(f);if(vr(D)&&!m.match(D)&&(M[v]={type:Pt.pattern,message:N,ref:i,...ct(Pt.pattern,N)},!r))return P(N),M}if(b){if(Kt(b)){const D=await b(m,e),N=fo(D,A);if(N&&(M[v]={...N,...ct(Pt.validate,N.message)},!r))return P(N.message),M}else if(Y(b)){let D={};for(const N in b){if(!bt(D)&&!r)break;const q=fo(await b[N](m,e),A,N);q&&(D={...q,...ct(N,q.message)},P(q.message),r&&(M[v]=D))}if(!bt(D)&&(M[v]={ref:A,...D},!r))return M}}return P(!0),M};function xh(t,e){const r=e.slice(0,-1).length;let n=0;for(;n<r;)t=U(t)?n++:t[e[n++]];return t}function kh(t){for(const e in t)if(t.hasOwnProperty(e)&&!U(t[e]))return!1;return!0}function Q(t,e){const r=Array.isArray(e)?e:En(e)?[e]:ro(e),n=r.length===1?t:xh(t,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(Y(n)&&bt(n)||Array.isArray(n)&&kh(n))&&Q(t,r.slice(0,-1)),t}function An(){let t=[];return{get observers(){return t},next:a=>{for(const i of t)i.next&&i.next(a)},subscribe:a=>(t.push(a),{unsubscribe:()=>{t=t.filter(i=>i!==a)}}),unsubscribe:()=>{t=[]}}}var br=t=>it(t)||!to(t);function re(t,e){if(br(t)||br(e))return t===e;if(ve(t)&&ve(e))return t.getTime()===e.getTime();const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const a of r){const i=t[a];if(!n.includes(a))return!1;if(a!=="ref"){const o=e[a];if(ve(i)&&ve(o)||Y(i)&&Y(o)||Array.isArray(i)&&Array.isArray(o)?!re(i,o):i!==o)return!1}}return!0}var po=t=>t.type==="select-multiple",Sh=t=>Tn(t)||Ve(t),Mn=t=>pr(t)&&t.isConnected,go=t=>{for(const e in t)if(Kt(t[e]))return!0;return!1};function wr(t,e={}){const r=Array.isArray(t);if(Y(t)||r)for(const n in t)Array.isArray(t[n])||Y(t[n])&&!go(t[n])?(e[n]=Array.isArray(t[n])?[]:{},wr(t[n],e[n])):it(t[n])||(e[n]=!0);return e}function vo(t,e,r){const n=Array.isArray(t);if(Y(t)||n)for(const a in t)Array.isArray(t[a])||Y(t[a])&&!go(t[a])?U(e)||br(r[a])?r[a]=Array.isArray(t[a])?wr(t[a],[]):{...wr(t[a])}:vo(t[a],it(e)?{}:e[a],r[a]):r[a]=!re(t[a],e[a]);return r}var Nn=(t,e)=>vo(t,e,wr(e)),bo=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:n})=>U(t)?t:e?t===""?NaN:t&&+t:r&&It(t)?new Date(t):n?n(t):t;function On(t){const e=t.ref;if(!(t.refs?t.refs.every(r=>r.disabled):e.disabled))return In(e)?e.files:Tn(e)?uo(t.refs).value:po(e)?[...e.selectedOptions].map(({value:r})=>r):Ve(e)?lo(t.refs).value:bo(U(e.value)?t.ref.value:e.value,t)}var Ch=(t,e,r,n)=>{const a={};for(const i of t){const o=$(e,i);o&&V(a,i,o._f)}return{criteriaMode:r,names:[...t],fields:a,shouldUseNativeValidation:n}},ze=t=>U(t)?t:vr(t)?t.source:Y(t)?vr(t.value)?t.value.source:t.value:t,$h=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function wo(t,e,r){const n=$(t,r);if(n||En(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=$(e,i),s=$(t,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};a.pop()}return{name:r}}var Eh=(t,e,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(e||t):(r?n.isOnBlur:a.isOnBlur)?!t:(r?n.isOnChange:a.isOnChange)?t:!0,Ih=(t,e)=>!je($(t,e)).length&&Q(t,e);const Th={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function Ah(t={},e){let r={...Th,...t},n={submitCount:0,isDirty:!1,isLoading:Kt(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},a={},i=Y(r.defaultValues)||Y(r.values)?Dt(r.defaultValues||r.values)||{}:{},o=r.shouldUnregister?{}:Dt(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},h,p=0;const u={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:An(),array:An(),state:An()},b=t.resetOptions&&t.resetOptions.keepDirtyValues,v=ao(r.mode),y=ao(r.reValidateMode),S=r.criteriaMode===xt.all,x=d=>g=>{clearTimeout(p),p=setTimeout(d,g)},m=async d=>{if(u.isValid||d){const g=r.resolver?bt((await L()).errors):await ot(a,!0);g!==n.isValid&&f.state.next({isValid:g})}},A=d=>u.isValidating&&f.state.next({isValidating:d}),P=(d,g=[],w,E,k=!0,_=!0)=>{if(E&&w){if(s.action=!0,_&&Array.isArray($(a,d))){const T=w($(a,d),E.argA,E.argB);k&&V(a,d,T)}if(_&&Array.isArray($(n.errors,d))){const T=w($(n.errors,d),E.argA,E.argB);k&&V(n.errors,d,T),Ih(n.errors,d)}if(u.touchedFields&&_&&Array.isArray($(n.touchedFields,d))){const T=w($(n.touchedFields,d),E.argA,E.argB);k&&V(n.touchedFields,d,T)}u.dirtyFields&&(n.dirtyFields=Nn(i,o)),f.state.next({name:d,isDirty:N(d,g),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else V(o,d,g)},M=(d,g)=>{V(n.errors,d,g),f.state.next({errors:n.errors})},H=(d,g,w,E)=>{const k=$(a,d);if(k){const _=$(o,d,U(w)?$(i,d):w);U(_)||E&&E.defaultChecked||g?V(o,d,g?_:On(k._f)):wt(d,_),s.mount&&m()}},at=(d,g,w,E,k)=>{let _=!1,T=!1;const j={name:d};if(!w||E){u.isDirty&&(T=n.isDirty,n.isDirty=j.isDirty=N(),_=T!==j.isDirty);const K=re($(i,d),g);T=$(n.dirtyFields,d),K?Q(n.dirtyFields,d):V(n.dirtyFields,d,!0),j.dirtyFields=n.dirtyFields,_=_||u.dirtyFields&&T!==!K}if(w){const K=$(n.touchedFields,d);K||(V(n.touchedFields,d,w),j.touchedFields=n.touchedFields,_=_||u.touchedFields&&K!==w)}return _&&k&&f.state.next(j),_?j:{}},gt=(d,g,w,E)=>{const k=$(n.errors,d),_=u.isValid&&qt(g)&&n.isValid!==g;if(t.delayError&&w?(h=x(()=>M(d,w)),h(t.delayError)):(clearTimeout(p),h=null,w?V(n.errors,d,w):Q(n.errors,d)),(w?!re(k,w):k)||!bt(E)||_){const T={...E,..._&&qt(g)?{isValid:g}:{},errors:n.errors,name:d};n={...n,...T},f.state.next(T)}A(!1)},L=async d=>r.resolver(o,r.context,Ch(d||l.mount,a,r.criteriaMode,r.shouldUseNativeValidation)),ct=async d=>{const{errors:g}=await L(d);if(d)for(const w of d){const E=$(g,w);E?V(n.errors,w,E):Q(n.errors,w)}else n.errors=g;return g},ot=async(d,g,w={valid:!0})=>{for(const E in d){const k=d[E];if(k){const{_f:_,...T}=k;if(_){const j=l.array.has(_.name),K=await ho(k,o,S,r.shouldUseNativeValidation&&!g,j);if(K[_.name]&&(w.valid=!1,g))break;!g&&($(K,_.name)?j?yh(n.errors,K,_.name):V(n.errors,_.name,K[_.name]):Q(n.errors,_.name))}T&&await ot(T,g,w)}}return w.valid},D=()=>{for(const d of l.unMount){const g=$(a,d);g&&(g._f.refs?g._f.refs.every(w=>!Mn(w)):!Mn(g._f.ref))&&Dn(d)}l.unMount=new Set},N=(d,g)=>(d&&g&&V(o,d,g),!re($o(),i)),q=(d,g,w)=>_h(d,l,{...s.mount?o:U(g)?i:It(d)?{[d]:g}:g},w,g),ut=d=>je($(s.mount?o:i,d,t.shouldUnregister?$(i,d,[]):[])),wt=(d,g,w={})=>{const E=$(a,d);let k=g;if(E){const _=E._f;_&&(!_.disabled&&V(o,d,bo(g,_)),k=pr(_.ref)&&it(g)?"":g,po(_.ref)?[..._.ref.options].forEach(T=>T.selected=k.includes(T.value)):_.refs?Ve(_.ref)?_.refs.length>1?_.refs.forEach(T=>(!T.defaultChecked||!T.disabled)&&(T.checked=Array.isArray(k)?!!k.find(j=>j===T.value):k===T.value)):_.refs[0]&&(_.refs[0].checked=!!k):_.refs.forEach(T=>T.checked=T.value===k):In(_.ref)?_.ref.value="":(_.ref.value=k,_.ref.type||f.values.next({name:d,values:{...o}})))}(w.shouldDirty||w.shouldTouch)&&at(d,k,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Fn(d)},Tt=(d,g,w)=>{for(const E in g){const k=g[E],_=`${d}.${E}`,T=$(a,_);(l.array.has(d)||!br(k)||T&&!T._f)&&!ve(k)?Tt(_,k,w):wt(_,k,w)}},ne=(d,g,w={})=>{const E=$(a,d),k=l.array.has(d),_=Dt(g);V(o,d,_),k?(f.array.next({name:d,values:{...o}}),(u.isDirty||u.dirtyFields)&&w.shouldDirty&&f.state.next({name:d,dirtyFields:Nn(i,o),isDirty:N(d,_)})):E&&!E._f&&!it(_)?Tt(d,_,w):wt(d,_,w),io(d,l)&&f.state.next({...n}),f.values.next({name:d,values:{...o}}),!s.mount&&e()},Be=async d=>{const g=d.target;let w=g.name,E=!0;const k=$(a,w),_=()=>g.type?On(k._f):hh(d),T=j=>{E=Number.isNaN(j)||j===$(o,w,j)};if(k){let j,K;const xr=_(),we=d.type===eo.BLUR||d.type===eo.FOCUS_OUT,Tp=!$h(k._f)&&!r.resolver&&!$(n.errors,w)&&!k._f.deps||Eh(we,$(n.touchedFields,w),n.isSubmitted,y,v),Ln=io(w,l,we);V(o,w,xr),we?(k._f.onBlur&&k._f.onBlur(d),h&&h(0)):k._f.onChange&&k._f.onChange(d);const Vn=at(w,xr,we,!1),Ap=!bt(Vn)||Ln;if(!we&&f.values.next({name:w,type:d.type,values:{...o}}),Tp)return u.isValid&&m(),Ap&&f.state.next({name:w,...Ln?{}:Vn});if(!we&&Ln&&f.state.next({...n}),A(!0),r.resolver){const{errors:Fo}=await L([w]);if(T(xr),E){const Mp=wo(n.errors,a,w),Do=wo(Fo,a,Mp.name||w);j=Do.error,w=Do.name,K=bt(Fo)}}else j=(await ho(k,o,S,r.shouldUseNativeValidation))[w],T(xr),E&&(j?K=!1:u.isValid&&(K=await ot(a,!0)));E&&(k._f.deps&&Fn(k._f.deps),gt(w,K,j,Vn))}},yr=(d,g)=>{if($(n.errors,g)&&d.focus)return d.focus(),1},Fn=async(d,g={})=>{let w,E;const k=$n(d);if(A(!0),r.resolver){const _=await ct(U(d)?d:k);w=bt(_),E=d?!k.some(T=>$(_,T)):w}else d?(E=(await Promise.all(k.map(async _=>{const T=$(a,_);return await ot(T&&T._f?{[_]:T}:T)}))).every(Boolean),!(!E&&!n.isValid)&&m()):E=w=await ot(a);return f.state.next({...!It(d)||u.isValid&&w!==n.isValid?{}:{name:d},...r.resolver||!d?{isValid:w}:{},errors:n.errors,isValidating:!1}),g.shouldFocus&&!E&&hr(a,yr,d?k:l.mount),E},$o=d=>{const g={...i,...s.mount?o:{}};return U(d)?g:It(d)?$(g,d):d.map(w=>$(g,w))},Eo=(d,g)=>({invalid:!!$((g||n).errors,d),isDirty:!!$((g||n).dirtyFields,d),isTouched:!!$((g||n).touchedFields,d),error:$((g||n).errors,d)}),Cp=d=>{d&&$n(d).forEach(g=>Q(n.errors,g)),f.state.next({errors:d?n.errors:{}})},Io=(d,g,w)=>{const E=($(a,d,{_f:{}})._f||{}).ref;V(n.errors,d,{...g,ref:E}),f.state.next({name:d,errors:n.errors,isValid:!1}),w&&w.shouldFocus&&E&&E.focus&&E.focus()},$p=(d,g)=>Kt(d)?f.values.subscribe({next:w=>d(q(void 0,g),w)}):q(d,g,!0),Dn=(d,g={})=>{for(const w of d?$n(d):l.mount)l.mount.delete(w),l.array.delete(w),g.keepValue||(Q(a,w),Q(o,w)),!g.keepError&&Q(n.errors,w),!g.keepDirty&&Q(n.dirtyFields,w),!g.keepTouched&&Q(n.touchedFields,w),!r.shouldUnregister&&!g.keepDefaultValue&&Q(i,w);f.values.next({values:{...o}}),f.state.next({...n,...g.keepDirty?{isDirty:N()}:{}}),!g.keepIsValid&&m()},To=({disabled:d,name:g,field:w,fields:E,value:k})=>{if(qt(d)){const _=d?void 0:U(k)?On(w?w._f:$(E,g)._f):k;V(o,g,_),at(g,_,!1,!1,!0)}},Pn=(d,g={})=>{let w=$(a,d);const E=qt(g.disabled);return V(a,d,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:d}},name:d,mount:!0,...g}}),l.mount.add(d),w?To({field:w,disabled:g.disabled,name:d}):H(d,!0,g.value),{...E?{disabled:g.disabled}:{},...r.progressive?{required:!!g.required,min:ze(g.min),max:ze(g.max),minLength:ze(g.minLength),maxLength:ze(g.maxLength),pattern:ze(g.pattern)}:{},name:d,onChange:Be,onBlur:Be,ref:k=>{if(k){Pn(d,g),w=$(a,d);const _=U(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,T=Sh(_),j=w._f.refs||[];if(T?j.find(K=>K===_):_===w._f.ref)return;V(a,d,{_f:{...w._f,...T?{refs:[...j.filter(Mn),_,...Array.isArray($(i,d))?[{}]:[]],ref:{type:_.type,name:d}}:{ref:_}}}),H(d,!1,void 0,_)}else w=$(a,d,{}),w._f&&(w._f.mount=!1),(r.shouldUnregister||g.shouldUnregister)&&!(gh(l.array,d)&&s.action)&&l.unMount.add(d)}}},Ao=()=>r.shouldFocusError&&hr(a,yr,l.mount),Ep=d=>{qt(d)&&(f.state.next({disabled:d}),hr(a,g=>{g.disabled=d},0,!1))},Mo=(d,g)=>async w=>{w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let E=Dt(o);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:k,values:_}=await L();n.errors=k,E=_}else await ot(a);Q(n.errors,"root"),bt(n.errors)?(f.state.next({errors:{}}),await d(E,w)):(g&&await g({...n.errors},w),Ao(),setTimeout(Ao)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bt(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Ip=(d,g={})=>{$(a,d)&&(U(g.defaultValue)?ne(d,$(i,d)):(ne(d,g.defaultValue),V(i,d,g.defaultValue)),g.keepTouched||Q(n.touchedFields,d),g.keepDirty||(Q(n.dirtyFields,d),n.isDirty=g.defaultValue?N(d,$(i,d)):N()),g.keepError||(Q(n.errors,d),u.isValid&&m()),f.state.next({...n}))},No=(d,g={})=>{const w=d?Dt(d):i,E=Dt(w),k=d&&!bt(d)?E:i;if(g.keepDefaultValues||(i=w),!g.keepValues){if(g.keepDirtyValues||b)for(const _ of l.mount)$(n.dirtyFields,_)?V(k,_,$(o,_)):ne(_,$(k,_));else{if(Cn&&U(d))for(const _ of l.mount){const T=$(a,_);if(T&&T._f){const j=Array.isArray(T._f.refs)?T._f.refs[0]:T._f.ref;if(pr(j)){const K=j.closest("form");if(K){K.reset();break}}}}a={}}o=t.shouldUnregister?g.keepDefaultValues?Dt(i):{}:Dt(k),f.array.next({values:{...k}}),f.values.next({values:{...k}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&e(),s.mount=!u.isValid||!!g.keepIsValid,s.watch=!!t.shouldUnregister,f.state.next({submitCount:g.keepSubmitCount?n.submitCount:0,isDirty:g.keepDirty?n.isDirty:!!(g.keepDefaultValues&&!re(d,i)),isSubmitted:g.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:g.keepDirtyValues?n.dirtyFields:g.keepDefaultValues&&d?Nn(i,d):{},touchedFields:g.keepTouched?n.touchedFields:{},errors:g.keepErrors?n.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Oo=(d,g)=>No(Kt(d)?d(o):d,g);return{control:{register:Pn,unregister:Dn,getFieldState:Eo,handleSubmit:Mo,setError:Io,_executeSchema:L,_getWatch:q,_getDirty:N,_updateValid:m,_removeUnmounted:D,_updateFieldArray:P,_updateDisabledField:To,_getFieldArray:ut,_reset:No,_resetDefaultValues:()=>Kt(r.defaultValues)&&r.defaultValues().then(d=>{Oo(d,r.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:d=>{n={...n,...d}},_disableForm:Ep,_subjects:f,_proxyFormState:u,get _fields(){return a},get _formValues(){return o},get _state(){return s},set _state(d){s=d},get _defaultValues(){return i},get _names(){return l},set _names(d){l=d},get _formState(){return n},set _formState(d){n=d},get _options(){return r},set _options(d){r={...r,...d}}},trigger:Fn,register:Pn,handleSubmit:Mo,watch:$p,setValue:ne,getValues:$o,reset:Oo,resetField:Ip,clearErrors:Cp,unregister:Dn,setError:Io,setFocus:(d,g={})=>{const w=$(a,d),E=w&&w._f;if(E){const k=E.refs?E.refs[0]:E.ref;k.focus&&(k.focus(),g.shouldSelect&&k.select())}},getFieldState:Eo}}function mr(t={}){const e=kt.useRef(),r=kt.useRef(),[n,a]=kt.useState({isDirty:!1,isValidating:!1,isLoading:Kt(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Kt(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...Ah(t,()=>a(o=>({...o}))),formState:n});const i=e.current.control;return i._options=t,mh({subject:i._subjects.state,next:o=>{wh(o,i._proxyFormState,i._updateFormState,!0)&&a({...i._formState})}}),kt.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),kt.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),kt.useEffect(()=>{t.values&&!re(t.values,r.current)?(i._reset(t.values,i._options.resetOptions),r.current=t.values):i._resetDefaultValues()},[t.values,i]),kt.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=bh(n,i),e.current}var mo=function(t,e,r){if(t&&"reportValidity"in t){var n=$(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},Mh=function(t,e){var r=function(a){var i=e.fields[a];i&&i.ref&&"reportValidity"in i.ref?mo(i.ref,a,t):i.refs&&i.refs.forEach(function(o){return mo(o,a,t)})};for(var n in e.fields)r(n)},Nh=function(t,e){e.shouldUseNativeValidation&&Mh(t,e);var r={};for(var n in t){var a=$(e.fields,n),i=Object.assign(t[n]||{},{ref:a&&a.ref});if(Fh(e.names||Object.keys(t),n)){var o=Object.assign({},Oh($(r,n)));V(o,"root",i),V(r,n,o)}else V(r,n,i)}return r},Oh=function(t){return Array.isArray(t)?t.filter(Boolean):[]},Fh=function(t,e){return t.some(function(r){return r.startsWith(e+".")})},Dh=function(t,e){for(var r={};t.issues.length;){var n=t.issues[0];if(n.path){var a=n.path.map(function(s){return s.key}).join(".");if(r[a]||(r[a]={message:n.message,type:n.validation}),e){var i=r[a].types,o=i&&i[n.validation];r[a]=no(a,e,r,n.validation,o?[].concat(o,n.message):n.message)}t.issues.shift()}}return r},_r=function(t,e,r){return r===void 0&&(r={}),function(n,a,i){try{return Promise.resolve(function(o,s){try{var l=function(){function h(u){return{values:r.raw?n:u,errors:{}}}var p=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},e);return r.mode==="sync"?h(Fi(t,n,p)):Promise.resolve(nf(t,n,p)).then(h)}()}catch(h){return s(h)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(o instanceof un)return{values:{},errors:Nh(Dh(o,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}};const _o=27,yo=12,xo=10,Ph=he("enum"),Lh=(t,e)=>{const r={min:t.minSelected??0,max:t.maxSelected??t.options.length};return _r(rt({checked:Ht(pn(W(),ur()),cr(n=>Object.entries(n).filter(([a,i])=>i).map(([a,i])=>a)),Oe(r.max,e("validation_multiple_choice_max",{count:r.max})),pe(r.min,e("validation_multiple_choice_min",{count:r.min})))}))},Vh=zr(({option:t,...e},r)=>c(J,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...e,ref:r}),c("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:e.id,children:t.label})]})),ko=Wt("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:Yi}}}),jh=({input:t,onSubmitSuccess:e})=>{var p,u;const r=t.key?(p=I.current$.value.flow)==null?void 0:p.data.submissions[t.key]:void 0,n=(t.config.minSelected===1||t.config.minSelected===void 0)&&t.config.maxSelected===1,a=n&&t.config.options.length===2,{t:i}=et(),{register:o,handleSubmit:s,formState:{errors:l}}=mr({defaultValues:{checked:n?{}:Ph(r)?Object.fromEntries(r.value.map(f=>[f,!0])):{}},resolver:Lh(t.config,i)}),h=Sn();return a?c("ul",{style:{maxHeight:6.5*_o+5*yo+2*xo},class:ko({variant:"booleanLike"}),children:t.config.options.map((f,b)=>c("li",{class:"flex-1",children:c(Ji,{type:"submit",ref:v=>{v&&b===0&&(h.current=v)},label:f.label,value:"true",onClick:()=>e({type:"enum",value:[f.value]})})},f.value))}):c("form",{noValidate:!0,onSubmit:f=>s(b=>{const v=b.checked;e({type:"enum",value:v})})(f),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*_o+5*yo+2*xo},class:ko({variant:t.config.options.length===1?"singleOption":void 0}),children:t.config.options.map((f,b)=>{const v=`checked.${f.value}`,{ref:y,...S}=o(v);return c("li",{class:"relative",children:c(Vh,{option:f,autoFocus:b===0,ref:x=>{x&&b===0&&(h.current=x),y(x)},id:v,...S,onClick:n?()=>e({type:"enum",value:[f.value]}):void 0})},f.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:c(te,{}),t.config.minSelected===0&&c(ee,{type:"button",onClick:()=>e({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(ge,{error:(u=l.checked)==null?void 0:u.root})})]})},zh=he("number"),Rh=(t,e)=>{const r=t.min??Number.MIN_SAFE_INTEGER,n=t.max??Number.MAX_SAFE_INTEGER,a=t.decimalCases??0;return _r(rt({number:Ht(Fe(e("validation_number")),Ei(r,e("validation_number_min",{min:r})),$i(n,e("validation_number_max",{max:n})),Si(i=>i===Number(i.toFixed(a)),e("validation_number_decimal_cases",{count:a})))}))},Bh=({input:t,onSubmitSuccess:e})=>{var u;const r=t.config.defaultValue,n=t.key?(u=I.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,{t:a}=et(),{register:i,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{number:r?Number(r):zh(n)?n.value:void 0},resolver:Rh(t.config,a)}),{ref:l,...h}=i("number",{required:!t.config.optional,valueAsNumber:!0}),p=ht();return ft(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(f=>{f.number!==void 0&&e({type:"number",value:f.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...h,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(p.current=f),l(f)},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&&c(ee,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),c(te,{})]}),c(ge,{error:s.number})]})},Uh=t=>{if(t==="")return{countryCode:"",phoneNumber:""};const e=Object.entries(kn).find(a=>t.startsWith(a[1])),r=e?e[1]:"",n=t.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},Hh="44",qh=/^[0-9 ]+$/,Kh=he("string"),Gh=he("phone"),Wh=t=>{const e=Ht(W(t("validation_country_code")),Ii(qh,t("validation_country_code"))),r=Ht(W(t("validation_phone")),pe(1,t("validation_phone")),cr(n=>n.replace(/[^0-9]/g,"")));return _r(rt({countryCode:e,phoneNumber:r}))},Yh=({input:t,onSubmitSuccess:e})=>{var y;const r=t.key?(y=I.current$.value.flow)==null?void 0:y.data.submissions[t.key]:void 0,{t:n}=et(),[a,i]=vt(),o=Kh(r)?Uh(r.value):Gh(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:h},watch:p}=mr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??t.config.defaultValue.countryCode??Hh,phoneNumber:(o==null?void 0:o.phoneNumber)??t.config.defaultValue.phoneNumber??""},resolver:Wh(n)}),{ref:u,...f}=s("phoneNumber",{required:!t.config.optional}),b=ht(),v=p("countryCode");return ft(()=>{b.current&&(b.current.focus(),b.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(S=>{const x=S.phoneNumber.replace(/[^0-9]/g,""),m=S.countryCode.replace(/[^0-9]/g,"");i(void 0);const A=t.config.minChars??7;if(x.length+m.length<A)return i(n("validation_phone_min_chars",{count:A}));t.config.submissionFormat==="phone"?e({type:"phone",value:{countryCode:m,phoneNumber:x}}):e({type:"string",value:v+S.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${t.key}`,children:[c("span",{children:["+",v]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${t.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(kn).map(([S,x])=>c("option",{value:x,children:[S," (+",x,")"]},S))})]}),c("input",{...f,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:S=>{S&&(b.current=S),u(S)},class:Le({optional:t.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:t.config.placeholder}),t.config.optional&&c(ee,{class:"absolute bottom-0 right-0 top-0",onClick:()=>e(null)})]}),c(te,{})]}),c(ge,{error:h.countryCode||h.phoneNumber||{message:a}})]})},Jh=({input:t,onSubmitSuccess:e})=>c("div",{class:"flex flex-col items-center py-3",children:c("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:t.key,onClick:()=>{e(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:t.config.label||"Submit"}),c("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),Zh={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Xh=he("string"),Qh=(t,e)=>{const r={maxLength:e("validation_max_chars",{count:t.maxChars??999}),minLength:e("validation_min_chars",{count:t.minChars??1})};return _r(rt({text:{email:Ht(W(e("validation_email")),Ci(e("validation_email")),pe(t.minChars??1,r.minLength),Oe(t.maxChars??1/0,r.maxLength)),text:Ht(W(),pe(t.minChars??1,r.minLength),Oe(t.maxChars??1/0,r.maxLength)),url:Ht(W(e("validation_url")),Ti(e("validation_url")),pe(t.minChars??1,r.minLength),Oe(t.maxChars??1/0,r.maxLength))}[t.format]}))},tp={text:({input:t,onSubmitSuccess:e})=>{var u;const{t:r}=et(),n=t.key?(u=I.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,a=t.config.defaultValue,{register:i,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{text:a||(Xh(n)?n.value:"")},resolver:Qh(t.config,r)}),{ref:l,...h}=i("text",{required:!t.config.optional}),p=ht();return ft(()=>{p.current&&(p.current.focus(),p.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(f=>{e({type:"string",value:f.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...h,...Zh[t.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(p.current=f),l(f)},placeholder:t.config.placeholder,class:Le({optional:!!t.config.optional,className:"w-full rounded-full"})}),t.config.optional&&c(ee,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),c(te,{})]}),c(ge,{error:s.text})]})},phone:Yh,"multiple-choice":jh,boolean:ih,file:fh,submit:Jh,address:eh,number:Bh},ep=({logger:t})=>{var i;const e=(i=I.current$.value.flow)==null?void 0:i.data.currentInput,[r,n]=Uf(),a=ht(null);return I.inputHeight$.value=n.height,_t(()=>{const o=a.current;if(o)return o.addEventListener("transitionstart",nt.scrollToEnd.smooth),o.addEventListener("transitioncancel",nt.scrollToEnd.smooth),o.addEventListener("transitionend",nt.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",nt.scrollToEnd.smooth),o.removeEventListener("transitioncancel",nt.scrollToEnd.smooth),o.removeEventListener("transitionend",nt.scrollToEnd.smooth)}},[]),c("div",{ref:a,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:n.height},children:c("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:e?(()=>{const o=tp[e.type];return c(o,{logger:t,onSubmitSuccess:nt.onSubmitSuccessFn$.value,input:e})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Le({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(te,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var rp=function(t){return t instanceof RegExp},np=function(e){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return e&&n.test(e)?e.replace(r,"\\$&"):e},So=function(t){return typeof t=="string"},ap=function(t){var e=[];return t.forEach(function(r){Array.isArray(r)?e=e.concat(r):e.push(r)}),e};function ip(t,e,r){var n=0,a=0;if(t==="")return t;if(!t||!So(t))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=e;rp(i)||(i=new RegExp("("+np(i)+")","gi"));for(var o=t.split(i),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}a=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=a}return o}var op=function(e,r,n){return Array.isArray(e)||(e=[e]),ap(e.map(function(a){return So(a)?ip(a,r,n):a}))};const Re=kr(op),sp=/(\[[^\]]+\]\([^)]+\))/g,lp=/\[([^\]]+)\]\(([^)]+)\)/,cp=/(https?:\/\/[^\s]+)/g,up=/_(.*?)_/g,dp=/\*\*(.*?)\*\*/g,fp=/\\n|\n/g,Co="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",hp=t=>{const e=Re(t,sp,(o,s)=>{const[,l,h]=o.match(lp)??[];return h?c("a",{class:Co,href:h,children:l??h},h+s):c("span",{children:"INVALID LINK"})}),r=Re(e,cp,(o,s)=>c("a",{class:Co,href:o,children:o},o+s)),n=Re(r,up,(o,s)=>c("em",{children:o},o+s)),a=Re(n,dp,(o,s)=>c("strong",{children:o},o+s));return Re(a,fp,(o,s)=>c("br",{},`br-${s}`))},pp=Wt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),gp=({children:t,className:e,animate:r,side:n,...a})=>c("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:pp({className:e,side:n,animate:r}),...a,children:t}),vp=({message:t})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("a",{onClick: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,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),bp=({className:t,...e})=>(_t(()=>{nt.scrollToEnd.smooth()}),c("div",{"aria-hidden":!0,children:nt.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Lt("flex gap-1 p-4",t),...e,children:Array.from({length:3},(r,n)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),wp={bot:"left",user:"right"},mp=Wt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),_p=({lastSentMessageFooter:t})=>{var r;const e=((r=I.current$.value.flow)==null?void 0:r.data.messages)??[];return _t(()=>{nt.scrollToEnd.smooth()},[e.length]),c("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[e.map((n,a)=>c(J,{children:c("li",{class:"flex",children:Zt(n).with({type:"system"},i=>c("p",{class:mp({variant:i.variant}),children:i.text})).with({type:"text",author:F.union("bot","user")},i=>{const o=i.author==="user"&&!e.slice(a+1).some(h=>h.type==="text"&&h.author==="user"),s=a===e.length-1,l=i.author==="bot"?hp(i.text):i.text;return c(J,{children:[o?t:null,c(gp,{animate:s,side:wp[i.author],children:l},a)]})}).with({type:"link"},i=>c(vp,{message:i})).with({type:"image"},i=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>c(ch,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).with({type:"loading"},i=>{const o=e[e.length-1];return!(i===o)||nt.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(bi,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},a)),c(bp,{},"typing")]})},yp=({logger:t,apiClient:e,analytics:r})=>{const{flow:n}=I.current$.value;$t(n,"Flow is required to exist to show chatbot body");const a=I.viewState$.value,{chatRef:i,chatService:o}=Yf(),{t:s}=et(),[l,h]=vt();return ft(()=>{a==="maximised"&&nt.scrollToEnd.instant()},[a]),ft(()=>{var S,x;const{state:p,flow:u}=I.current$.peek();if(p!=="loaded")throw new Error(s("invalid_state"));let f=u.data.nodeHistory.at(-1);if(nt.scrollToEnd.instant(),I.setInput(void 0),u.data.isFinished)return;f===void 0?(f=fi(n.nodes).id,I.setCurrentNodeId(f),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:u.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(S=n.analytics)==null?void 0:S.customProperties})):I.removeMessagesSentByNodeIds([f]);const{interpret:b,abort:v,undo:y}=kf({context:n.context,analytics:{service:r,customProperties:(x=n.analytics)==null?void 0:x.customProperties},apiClient:e,logger:t,flow:n,chatService:o,t:s,getSubmissions:()=>{var m;return(m=I.current$.peek().flow)==null?void 0:m.data.submissions},onInterpret:m=>I.setCurrentNodeId(m.id),onFlowEnd:async()=>{var A;I.markAsFinished();const m=I.current$.peek().flow;$t(m),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:m.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(A=n.analytics)==null?void 0:A.customProperties})}});return h(()=>y),b(f),v},[r,e,o,t,n,s]),c(J,{children:[c("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:I.inputHeight$.value},children:c(_p,{lastSentMessageFooter:n.data.isFinished||!l?null:c(kp,{undoFn:l})})}),c(ep,{logger:t})]})},xp=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"):[],kp=({undoFn:t})=>{const{t:e}=et();return c(sr,{onClick:async()=>{const{flow:r}=I.current$.peek();$t(r);const{removed:n}=t(r.data.nodeHistory),a=r.data.nodeHistory.splice(-n);a.length!==0&&(I.removeMessagesSentByNodeIds(a),I.setInput(void 0),a.pop(),a.map(i=>r.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(xp).forEach(i=>delete r.data.submissions[i]),I.current$.value={...I.current$.value})},children:[c("title",{children:e("undo")}),c("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})]})},Sp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:yp},Symbol.toStringTag,{value:"Module"}))})();