@inploi/plugin-chatbot 3.25.0 → 3.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +9 -9
- package/cdn/style.css +1 -1
- package/dist/{chatbot-body-fb25c0fb.js → chatbot-body-56129012.js} +507 -50
- package/dist/{chatbot-body-af83f13f.cjs → chatbot-body-ab0ea636.cjs} +505 -48
- package/dist/{index-acee09dd.cjs → index-0dd235bd.cjs} +2 -2
- package/dist/{index-91ddb671.js → index-dd385762.js} +5 -5
- package/dist/md.d.ts +1 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/style.css +46 -1
- package/package.json +2 -1
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var vm=Object.defineProperty;var mm=(Je,ge,Ve)=>ge in Je?vm(Je,ge,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Je[ge]=Ve;var js=(Je,ge,Ve)=>(mm(Je,typeof ge!="symbol"?ge+"":ge,Ve),Ve);(function(){"use strict";var Je=e=>e,ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ve(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rs=Array.isArray,Kr=Rs,Vs=typeof ge=="object"&&ge&&ge.Object===Object&&ge,Bs=Vs,zs=Bs,Us=typeof self=="object"&&self&&self.Object===Object&&self,Hs=zs||Us||Function("return this")(),Wr=Hs,qs=Wr,Ks=qs.Symbol,Gr=Ks,bi=Gr,gi=Object.prototype,Ws=gi.hasOwnProperty,Gs=gi.toString,It=bi?bi.toStringTag:void 0;function Ys(e){var t=Ws.call(e,It),r=e[It];try{e[It]=void 0;var n=!0}catch{}var o=Gs.call(e);return n&&(t?e[It]=r:delete e[It]),o}var Zs=Ys,Xs=Object.prototype,Qs=Xs.toString;function Js(e){return Qs.call(e)}var el=Js,yi=Gr,tl=Zs,rl=el,nl="[object Null]",il="[object Undefined]",_i=yi?yi.toStringTag:void 0;function ol(e){return e==null?e===void 0?il:nl:_i&&_i in Object(e)?tl(e):rl(e)}var wi=ol;function al(e){return e!=null&&typeof e=="object"}var sl=al,ll=wi,cl=sl,ul="[object Symbol]";function dl(e){return typeof e=="symbol"||cl(e)&&ll(e)==ul}var Yr=dl,fl=Kr,hl=Yr,pl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vl=/^\w*$/;function ml(e,t){if(fl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||hl(e)?!0:vl.test(e)||!pl.test(e)||t!=null&&e in Object(t)}var bl=ml;function gl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var xi=gl,yl=wi,_l=xi,wl="[object AsyncFunction]",xl="[object Function]",kl="[object GeneratorFunction]",$l="[object Proxy]";function Sl(e){if(!_l(e))return!1;var t=yl(e);return t==xl||t==kl||t==wl||t==$l}var Cl=Sl,El=Wr,Ol=El["__core-js_shared__"],Pl=Ol,Zr=Pl,ki=function(){var e=/[^.]+$/.exec(Zr&&Zr.keys&&Zr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Al(e){return!!ki&&ki in e}var Il=Al,Tl=Function.prototype,Dl=Tl.toString;function Nl(e){if(e!=null){try{return Dl.call(e)}catch{}try{return e+""}catch{}}return""}var Ml=Nl,Fl=Cl,Ll=Il,jl=xi,Rl=Ml,Vl=/[\\^$.*+?()[\]{}|]/g,Bl=/^\[object .+?Constructor\]$/,zl=Function.prototype,Ul=Object.prototype,Hl=zl.toString,ql=Ul.hasOwnProperty,Kl=RegExp("^"+Hl.call(ql).replace(Vl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wl(e){if(!jl(e)||Ll(e))return!1;var t=Fl(e)?Kl:Bl;return t.test(Rl(e))}var Gl=Wl;function Yl(e,t){return e==null?void 0:e[t]}var Zl=Yl,Xl=Gl,Ql=Zl;function Jl(e,t){var r=Ql(e,t);return Xl(r)?r:void 0}var $i=Jl,ec=$i,tc=ec(Object,"create"),tr=tc,Si=tr;function rc(){this.__data__=Si?Si(null):{},this.size=0}var nc=rc;function ic(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oc=ic,ac=tr,sc="__lodash_hash_undefined__",lc=Object.prototype,cc=lc.hasOwnProperty;function uc(e){var t=this.__data__;if(ac){var r=t[e];return r===sc?void 0:r}return cc.call(t,e)?t[e]:void 0}var dc=uc,fc=tr,hc=Object.prototype,pc=hc.hasOwnProperty;function vc(e){var t=this.__data__;return fc?t[e]!==void 0:pc.call(t,e)}var mc=vc,bc=tr,gc="__lodash_hash_undefined__";function yc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bc&&t===void 0?gc:t,this}var _c=yc,wc=nc,xc=oc,kc=dc,$c=mc,Sc=_c;function ut(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ut.prototype.clear=wc,ut.prototype.delete=xc,ut.prototype.get=kc,ut.prototype.has=$c,ut.prototype.set=Sc;var Cc=ut;function Ec(){this.__data__=[],this.size=0}var Oc=Ec;function Pc(e,t){return e===t||e!==e&&t!==t}var Ac=Pc,Ic=Ac;function Tc(e,t){for(var r=e.length;r--;)if(Ic(e[r][0],t))return r;return-1}var rr=Tc,Dc=rr,Nc=Array.prototype,Mc=Nc.splice;function Fc(e){var t=this.__data__,r=Dc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Mc.call(t,r,1),--this.size,!0}var Lc=Fc,jc=rr;function Rc(e){var t=this.__data__,r=jc(t,e);return r<0?void 0:t[r][1]}var Vc=Rc,Bc=rr;function zc(e){return Bc(this.__data__,e)>-1}var Uc=zc,Hc=rr;function qc(e,t){var r=this.__data__,n=Hc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Kc=qc,Wc=Oc,Gc=Lc,Yc=Vc,Zc=Uc,Xc=Kc;function dt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}dt.prototype.clear=Wc,dt.prototype.delete=Gc,dt.prototype.get=Yc,dt.prototype.has=Zc,dt.prototype.set=Xc;var Qc=dt,Jc=$i,eu=Wr,tu=Jc(eu,"Map"),ru=tu,Ci=Cc,nu=Qc,iu=ru;function ou(){this.size=0,this.__data__={hash:new Ci,map:new(iu||nu),string:new Ci}}var au=ou;function su(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var lu=su,cu=lu;function uu(e,t){var r=e.__data__;return cu(t)?r[typeof t=="string"?"string":"hash"]:r.map}var nr=uu,du=nr;function fu(e){var t=du(this,e).delete(e);return this.size-=t?1:0,t}var hu=fu,pu=nr;function vu(e){return pu(this,e).get(e)}var mu=vu,bu=nr;function gu(e){return bu(this,e).has(e)}var yu=gu,_u=nr;function wu(e,t){var r=_u(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var xu=wu,ku=au,$u=hu,Su=mu,Cu=yu,Eu=xu;function ft(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ft.prototype.clear=ku,ft.prototype.delete=$u,ft.prototype.get=Su,ft.prototype.has=Cu,ft.prototype.set=Eu;var Ou=ft,Ei=Ou,Pu="Expected a function";function Xr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Pu);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Xr.Cache||Ei),r}Xr.Cache=Ei;var Au=Xr,Iu=Au,Tu=500;function Du(e){var t=Iu(e,function(n){return r.size===Tu&&r.clear(),n}),r=t.cache;return t}var Nu=Du,Mu=Nu,Fu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lu=/\\(\\)?/g,ju=Mu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Fu,function(r,n,o,i){t.push(o?i.replace(Lu,"$1"):n||r)}),t}),Ru=ju;function Vu(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Bu=Vu,Oi=Gr,zu=Bu,Uu=Kr,Hu=Yr,qu=1/0,Pi=Oi?Oi.prototype:void 0,Ai=Pi?Pi.toString:void 0;function Ii(e){if(typeof e=="string")return e;if(Uu(e))return zu(e,Ii)+"";if(Hu(e))return Ai?Ai.call(e):"";var t=e+"";return t=="0"&&1/e==-qu?"-0":t}var Ku=Ii,Wu=Ku;function Gu(e){return e==null?"":Wu(e)}var Yu=Gu,Zu=Kr,Xu=bl,Qu=Ru,Ju=Yu;function ed(e,t){return Zu(e)?e:Xu(e,t)?[e]:Qu(Ju(e))}var td=ed,rd=Yr,nd=1/0;function id(e){if(typeof e=="string"||rd(e))return e;var t=e+"";return t=="0"&&1/e==-nd?"-0":t}var od=id,ad=td,sd=od;function ld(e,t){t=ad(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[sd(t[r++])];return r&&r==n?e:void 0}var cd=ld,ud=cd;function dd(e,t,r){var n=e==null?void 0:ud(e,t);return n===void 0?r:n}var fd=dd;const Tt=Ve(fd);var Dt,S,Ti,Di,et,Ni,Mi,Qr,Fi,ht={},Li=[],hd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ir=Array.isArray;function Ie(e,t){for(var r in t)e[r]=t[r];return e}function ji(e){var t=e.parentNode;t&&t.removeChild(e)}function D(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Dt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Nt(e,a,n,o,null)}function Nt(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Ti};return o==null&&S.vnode!=null&&S.vnode(i),i}function Ri(){return{current:null}}function W(e){return e.children}function ye(e,t){this.props=e,this.context=t}function or(e,t){if(t==null)return e.__?or(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?or(e):null}function Vi(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Vi(e)}}function Jr(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!ar.__r++||Ni!==S.debounceRendering)&&((Ni=S.debounceRendering)||Mi)(ar)}function ar(){var e,t,r,n,o,i,a,s,l;for(et.sort(Qr);e=et.shift();)e.__d&&(t=et.length,n=void 0,o=void 0,i=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],o=[],(i=Ie({},a)).__v=a.__v+1,en(l,a,i,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??or(a),a.__h,o),Wi(n,a,o),a.__e!=s&&Vi(a)),et.length>t&&et.sort(Qr));ar.__r=0}function Bi(e,t,r,n,o,i,a,s,l,u,h){var c,p,m,b,v,_,x,w,O,A,P=0,U=n&&n.__k||Li,q=U.length,N=q,M=t.length;for(r.__k=[],c=0;c<M;c++)(b=r.__k[c]=(b=t[c])==null||typeof b=="boolean"||typeof b=="function"?null:typeof b=="string"||typeof b=="number"||typeof b=="bigint"?Nt(null,b,null,null,b):ir(b)?Nt(W,{children:b},null,null,null):b.__b>0?Nt(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)!=null&&(b.__=r,b.__b=r.__b+1,(w=pd(b,U,x=c+P,N))===-1?m=ht:(m=U[w]||ht,U[w]=void 0,N--),en(e,b,m,o,i,a,s,l,u,h),v=b.__e,(p=b.ref)&&m.ref!=p&&(m.ref&&tn(m.ref,null,b),h.push(p,b.__c||v,b)),v!=null&&(_==null&&(_=v),A=!(O=m===ht||m.__v===null)&&w===x,O?w==-1&&P--:w!==x&&(w===x+1?(P++,A=!0):w>x?N>M-x?(P+=w-x,A=!0):P--:P=w<x&&w==x-1?w-x:0),x=c+P,A=A||w==c&&!O,typeof b.type!="function"||w===x&&m.__k!==b.__k?typeof b.type=="function"||A?b.__d!==void 0?(l=b.__d,b.__d=void 0):l=v.nextSibling:l=Ui(e,v,l):l=zi(b,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,c=q;c--;)U[c]!=null&&(typeof r.type=="function"&&U[c].__e!=null&&U[c].__e==r.__d&&(r.__d=U[c].__e.nextSibling),Gi(U[c],U[c]))}function zi(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?zi(n,t,r):Ui(r,n.__e,t));return t}function Te(e,t){return t=t||[],e==null||typeof e=="boolean"||(ir(e)?e.some(function(r){Te(r,t)}):t.push(e)),t}function Ui(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function pd(e,t,r,n){var o=e.key,i=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&o==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&o==l.key&&i===l.type)return s;s++}}return-1}function vd(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||sr(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||sr(e,i,t[i],r[i],n)}function Hi(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||hd.test(t)?r:r+"px"}function sr(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Hi(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Hi(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?Ki:qi,i):e.removeEventListener(t,i?Ki:qi,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function qi(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Ki(e){return this.l[e.type+!0](S.event?S.event(e):e)}function en(e,t,r,n,o,i,a,s,l,u){var h,c,p,m,b,v,_,x,w,O,A,P,U,q,N,M=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(h=S.__b)&&h(t);try{e:if(typeof M=="function"){if(x=t.props,w=(h=M.contextType)&&n[h.__c],O=h?w?w.props.value:h.__:n,r.__c?_=(c=t.__c=r.__c).__=c.__E:("prototype"in M&&M.prototype.render?t.__c=c=new M(x,O):(t.__c=c=new ye(x,O),c.constructor=M,c.render=bd),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=O,c.__n=n,p=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ie({},c.__s)),Ie(c.__s,M.getDerivedStateFromProps(x,c.__s))),m=c.props,b=c.state,c.__v=t,p)M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(M.getDerivedStateFromProps==null&&x!==m&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,O),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),A=0;A<c._sb.length;A++)c.__h.push(c._sb[A]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,O),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(m,b,v)})}if(c.context=O,c.props=x,c.__P=e,c.__e=!1,P=S.__r,U=0,"prototype"in M&&M.prototype.render){for(c.state=c.__s,c.__d=!1,P&&P(t),h=c.render(c.props,c.state,c.context),q=0;q<c._sb.length;q++)c.__h.push(c._sb[q]);c._sb=[]}else do c.__d=!1,P&&P(t),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++U<25);c.state=c.__s,c.getChildContext!=null&&(n=Ie(Ie({},n),c.getChildContext())),p||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(m,b)),Bi(e,ir(N=h!=null&&h.type===W&&h.key==null?h.props.children:h)?N:[N],t,r,n,o,i,a,s,l,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),_&&(c.__E=c.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=md(r.__e,t,r,n,o,i,a,l,u);(h=S.diffed)&&h(t)}catch(se){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),S.__e(se,t,r)}}function Wi(e,t,r){for(var n=0;n<r.length;n++)tn(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function md(e,t,r,n,o,i,a,s,l){var u,h,c,p=r.props,m=t.props,b=t.type,v=0;if(b==="svg"&&(o=!0),i!=null){for(;v<i.length;v++)if((u=i[v])&&"setAttribute"in u==!!b&&(b?u.localName===b:u.nodeType===3)){e=u,i[v]=null;break}}if(e==null){if(b===null)return document.createTextNode(m);e=o?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,m.is&&m),i=null,s=!1}if(b===null)p===m||s&&e.data===m||(e.data=m);else{if(i=i&&Dt.call(e.childNodes),h=(p=r.props||ht).dangerouslySetInnerHTML,c=m.dangerouslySetInnerHTML,!s){if(i!=null)for(p={},v=0;v<e.attributes.length;v++)p[e.attributes[v].name]=e.attributes[v].value;(c||h)&&(c&&(h&&c.__html==h.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(vd(e,m,p,o,s),c)t.__k=[];else if(Bi(e,ir(v=t.props.children)?v:[v],t,r,n,o&&b!=="foreignObject",i,a,i?i[0]:r.__k&&or(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&ji(i[v]);s||("value"in m&&(v=m.value)!==void 0&&(v!==e.value||b==="progress"&&!v||b==="option"&&v!==p.value)&&sr(e,"value",v,p.value,!1),"checked"in m&&(v=m.checked)!==void 0&&v!==e.checked&&sr(e,"checked",v,p.checked,!1))}return e}function tn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Gi(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||tn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Gi(n[o],t,r||typeof e.type!="function");r||e.__e==null||ji(e.__e),e.__=e.__e=e.__d=void 0}function bd(e,t,r){return this.constructor(e,r)}function pt(e,t,r){var n,o,i,a;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],en(t,e=(!n&&r||t).__k=D(W,null,[e]),o||ht,ht,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?Dt.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),Wi(i,e,a)}function Yi(e,t){pt(e,t,Yi)}function gd(e,t,r){var n,o,i,a,s=Ie({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&a!==void 0?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Dt.call(arguments,2):r),Nt(e.type,s,n||e.key,o||e.ref,null)}function Mt(e,t){var r={__c:t="__cC"+Fi++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(s){s.__e=!0,Jr(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Dt=Li.slice,S={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},Ti=0,Di=function(e){return e!=null&&e.constructor===void 0},ye.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ie({},this.state),typeof e=="function"&&(e=e(Ie({},r),this.props)),e&&Ie(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Jr(this))},ye.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Jr(this))},ye.prototype.render=W,et=[],Mi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Qr=function(e,t){return e.__v.__b-t.__v.__b},ar.__r=0,Fi=0;var rn=class extends Error{constructor(t){super(t[0].message);js(this,"issues");this.name="ValiError",this.issues=t}};function Zi(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ft(e){return{issues:e}}function ce(e){return{output:e}}function yd(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,path:t.path,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function _d(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Be(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ce(e);let o,i,a=e;for(const s of t){const l=s._parse(a);if(l.issues){o=o||_d(r,n);for(const u of l.issues){const h=yd(o,u);i?i.push(h):i=[h]}if(o.abortEarly||o.abortPipeEarly)break}else a=l.output}return i?Ft(i):ce(a)}function ze(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function Xi(e){return typeof e=="function"?e():e}function Ue(e,t,r,n){return Ft([{validation:e,message:Xi(t),input:r,requirement:n}])}function wd(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,a]=ze(t,r);return[e,i,a]}const[n,o]=ze(e,t);return[void 0,n,o]}function De(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:Xi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Qi(e){return typeof e.default=="function"?e.default():e.default}function xd(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Be(t,this.pipe,r,"any")}}}function kd(e,t,r){const[n="Invalid type",o]=ze(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,a){if(!Array.isArray(i))return De(a,"type","array",this.message,i);let s;const l=[];for(let u=0;u<i.length;u++){const h=i[u],c=this.item._parse(h,a);if(c.issues){const p={type:"array",input:i,key:u,value:h};for(const m of c.issues)m.path?m.path.unshift(p):m.path=[p],s==null||s.push(m);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Ft(s):Be(l,this.pipe,a,"array")}}}function Ji(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?De(i,"type","boolean",this.message,o):Be(o,this.pipe,i,"boolean")}}}function eo(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?De(n,"type","literal",this.message,r):ce(r)}}}function $d(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const o=Qi(this);if(o===void 0)return ce(r);r=o}return this.wrapped._parse(r,n)}}}function nn(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?De(i,"type","number",this.message,o):Be(o,this.pipe,i,"number")}}}function Ne(e,t,r,n){const[o,i="Invalid type",a]=wd(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:a,_parse(l,u){if(!l||typeof l!="object")return De(u,"type","object",this.message,l);s=s||Object.entries(this.entries);let h;const c={};for(const[p,m]of s){const b=l[p],v=m._parse(b,u);if(v.issues){const _={type:"object",input:l,key:p,value:b};for(const x of v.issues)x.path?x.path.unshift(_):x.path=[_],h==null||h.push(x);if(h||(h=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||p in l)&&(c[p]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&h)){for(const p in l)if(!(p in this.entries)){const m=l[p],b=this.rest._parse(m,u);if(b.issues){const v={type:"object",input:l,key:p,value:m};for(const _ of b.issues)_.path?_.path.unshift(v):_.path=[v],h==null||h.push(_);if(h||(h=b.issues),u!=null&&u.abortEarly)break}else c[p]=b.output}}return h?Ft(h):Be(c,this.pipe,u,"object")}}}function Sd(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const o=Qi(this);if(o===void 0)return ce(r);r=o}return this.wrapped._parse(r,n)}}}function Cd(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ce(r):De(n,"type","picklist",this.message,r)}}}function Se(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?De(i,"type","string",this.message,o):Be(o,this.pipe,i,"string")}}}function Ed(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=ze(r,n);return[e,t,a,s]}const[o,i]=ze(t,r);return[Se(),e,o,i]}var Od=["__proto__","prototype","constructor"];function to(e,t,r,n){const[o,i,a="Invalid type",s]=Ed(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:a,pipe:s,_parse(l,u){if(!l||typeof l!="object")return De(u,"type","record",this.message,l);let h;const c={};for(const[p,m]of Object.entries(l))if(!Od.includes(p)){let b;const v=this.key._parse(p,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(v.issues){b={type:"record",input:l,key:p,value:m};for(const x of v.issues)x.path=[b],h==null||h.push(x);if(h||(h=v.issues),u!=null&&u.abortEarly)break}const _=this.value._parse(m,u);if(_.issues){b=b||{type:"record",input:l,key:p,value:m};for(const x of _.issues)x.path?x.path.unshift(b):x.path=[b],h==null||h.push(x);if(h||(h=_.issues),u!=null&&u.abortEarly)break}!v.issues&&!_.issues&&(c[v.output]=_.output)}return h?Ft(h):Be(c,this.pipe,u,"record")}}}function Pd(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let o,i;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(o)for(const l of s.issues)o.push(l);else o=s.issues;else{i=[s.output];break}}return i?ce(i[0]):De(n,"type","union",this.message,r,o)}}}function lr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new rn(n.issues);return n.output}async function Ad(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new rn(n.issues);return n.output}function ro(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const a=t(i.output);return r&&!Array.isArray(r)?r._parse(a,o):Be(a,r,o,typeof a)}}}var Id=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Td(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Dd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Id,_parse(t){return this.requirement.test(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function Lt(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Nd(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function jt(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Md(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Fd(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Ld(e="Invalid URL"){return{type:"url",async:!1,message:e,requirement(t){try{return new URL(t),!0}catch{return!1}},_parse(t){return this.requirement(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},de.apply(this,arguments)}var Me,B,on,no,vt=0,io=[],cr=[],oo=S.__b,ao=S.__r,so=S.diffed,lo=S.__c,co=S.unmount;function tt(e,t){S.__h&&S.__h(B,e,vt||t),vt=0;var r=B.__H||(B.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:cr}),r.__[e]}function G(e){return vt=1,ur(vo,e)}function ur(e,t,r){var n=tt(Me++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):vo(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,s);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=B,!B.u)){var o=function(s,l,u){if(!n.__c.__H)return!0;var h=n.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!i||i.call(this,s,l,u);var c=!1;return h.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!i||i.call(this,s,l,u))};B.u=!0;var i=B.shouldComponentUpdate,a=B.componentWillUpdate;B.componentWillUpdate=function(s,l,u){if(this.__e){var h=i;i=void 0,o(s,l,u),i=h}a&&a.call(this,s,l,u)},B.shouldComponentUpdate=o}return n.__N||n.__}function R(e,t){var r=tt(Me++,3);!S.__s&&sn(r.__H,t)&&(r.__=e,r.i=t,B.__H.__h.push(r))}function ve(e,t){var r=tt(Me++,4);!S.__s&&sn(r.__H,t)&&(r.__=e,r.i=t,B.__h.push(r))}function L(e){return vt=5,fe(function(){return{current:e}},[])}function uo(e,t,r){vt=6,ve(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function fe(e,t){var r=tt(Me++,7);return sn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function me(e,t){return vt=8,fe(function(){return e},t)}function dr(e){var t=B.context[e.__c],r=tt(Me++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(B)),t.props.value):e.__}function fo(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function jd(e){var t=tt(Me++,10),r=G();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function ho(){var e=tt(Me++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Rd(){for(var e;e=io.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fr),e.__H.__h.forEach(an),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){B=null,oo&&oo(e)},S.__r=function(e){ao&&ao(e),Me=0;var t=(B=e.__c).__H;t&&(on===B?(t.__h=[],B.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=cr,r.__N=r.i=void 0})):(t.__h.forEach(fr),t.__h.forEach(an),t.__h=[],Me=0)),on=B},S.diffed=function(e){so&&so(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(io.push(t)!==1&&no===S.requestAnimationFrame||((no=S.requestAnimationFrame)||Vd)(Rd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==cr&&(r.__=r.__V),r.i=void 0,r.__V=cr})),on=B=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(fr),r.__h=r.__h.filter(function(n){return!n.__||an(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),lo&&lo(e,t)},S.unmount=function(e){co&&co(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{fr(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var po=typeof requestAnimationFrame=="function";function Vd(e){var t,r=function(){clearTimeout(n),po&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);po&&(t=requestAnimationFrame(r))}function fr(e){var t=B,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),B=t}function an(e){var t=B;e.__c=e.__(),B=t}function sn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function vo(e,t){return typeof t=="function"?t(e):t}function mo(e,t){for(var r in t)e[r]=t[r];return e}function ln(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function cn(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function hr(e){this.props=e}function bo(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:ln(this.props,o)}function n(o){return this.shouldComponentUpdate=r,D(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(hr.prototype=new ye).isPureReactComponent=!0,hr.prototype.shouldComponentUpdate=function(e,t){return ln(this.props,e)||ln(this.state,t)};var go=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),go&&go(e)};var Bd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function re(e){function t(r){var n=mo({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Bd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var yo=function(e,t){return e==null?null:Te(Te(e).map(t))},Fe={map:yo,forEach:yo,count:function(e){return e?Te(e).length:0},only:function(e){var t=Te(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Te},zd=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}zd(e,t,r,n)};var _o=S.unmount;function wo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=mo({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return wo(n,t,r)})),e}function xo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return xo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function mt(){this.__u=0,this.t=null,this.__b=null}function ko(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function un(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return D(r,i)}return o.displayName="Lazy",o.__f=!0,o}function bt(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),_o&&_o(e)},(mt.prototype=new ye).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=ko(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=xo(u,u.__c.__P,u.__c.__O)}var h;for(n.setState({__a:n.__b=null});h=n.t.pop();)h.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},mt.prototype.componentWillUnmount=function(){this.t=[]},mt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=wo(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&D(W,null,e.fallback);return o&&(o.__h=null),[D(W,null,t.__a?null:e.children),o]};var $o=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Ud(e){return this.getChildContext=function(){return e.context},e.children}function Hd(e){var t=this,r=e.i;t.componentWillUnmount=function(){pt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),pt(D(Ud,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function So(e,t){var r=D(Hd,{__v:e,i:t});return r.containerInfo=t,r}(bt.prototype=new ye).__a=function(e){var t=this,r=ko(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),$o(t,e,n)):o()};r?r(i):i()}},bt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Te(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},bt.prototype.componentDidUpdate=bt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){$o(e,r,t)})};var Co=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,qd=/^(?: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]/,Kd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Wd=/[A-Z0-9]/g,Gd=typeof document<"u",Yd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Eo(e,t,r){return t.__k==null&&(t.textContent=""),pt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Oo(e,t,r){return Yi(e,t),typeof r=="function"&&r(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Po=S.event;function Zd(){}function Xd(){return this.cancelBubble}function Qd(){return this.defaultPrevented}S.event=function(e){return Po&&(e=Po(e)),e.persist=Zd,e.isPropagationStopped=Xd,e.isDefaultPrevented=Qd,e.nativeEvent=e};var dn,Jd={enumerable:!1,configurable:!0,get:function(){return this.class}},Ao=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||Gd&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Yd(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Kd.test(i)?i=s:n.indexOf("-")===-1&&qd.test(i)?i=i.replace(Wd,"-$&").toLowerCase():a===null&&(a=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Te(r.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Te(r.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Jd)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Co,Ao&&Ao(e)};var Io=S.__r;S.__r=function(e){Io&&Io(e),dn=e.__c};var To=S.diffed;S.diffed=function(e){To&&To(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),dn=null};var Do={ReactCurrentDispatcher:{current:{readContext:function(e){return dn.__n[e.__c].props.value}}}},ef="17.0.2";function No(e){return D.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Co}function gt(e){return rt(e)?gd.apply(null,arguments):e}function Mo(e){return!!e.__k&&(pt(null,e),!0)}function Fo(e){return e&&(e.base||e.nodeType===1&&e)||null}var Lo=function(e,t){return e(t)},pr=function(e,t){return e(t)},jo=W;function fn(e){e()}function Ro(e){return e}function Vo(){return[!1,fn]}var Bo=ve;function zo(e,t){var r=t(),n=G({h:{__:r,v:t}}),o=n[0].h,i=n[1];return ve(function(){o.__=r,o.v=t,cn(o.__,t())||i({h:o})},[e,r,t]),R(function(){return cn(o.__,o.v())||i({h:o}),e(function(){cn(o.__,o.v())||i({h:o})})},[e]),r}var xe={useState:G,useId:ho,useReducer:ur,useEffect:R,useLayoutEffect:ve,useInsertionEffect:Bo,useTransition:Vo,useDeferredValue:Ro,useSyncExternalStore:zo,startTransition:fn,useRef:L,useImperativeHandle:uo,useMemo:fe,useCallback:me,useContext:dr,useDebugValue:fo,version:"17.0.2",Children:Fe,render:Eo,hydrate:Oo,unmountComponentAtNode:Mo,createPortal:So,createElement:D,createContext:Mt,createFactory:No,cloneElement:gt,createRef:Ri,Fragment:W,isValidElement:rt,findDOMNode:Fo,Component:ye,PureComponent:hr,memo:bo,forwardRef:re,flushSync:pr,unstable_batchedUpdates:Lo,StrictMode:jo,Suspense:mt,SuspenseList:bt,lazy:un,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do};const tf=Object.freeze(Object.defineProperty({__proto__:null,Children:Fe,Component:ye,Fragment:W,PureComponent:hr,StrictMode:jo,Suspense:mt,SuspenseList:bt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do,cloneElement:gt,createContext:Mt,createElement:D,createFactory:No,createPortal:So,createRef:Ri,default:xe,findDOMNode:Fo,flushSync:pr,forwardRef:re,hydrate:Oo,isValidElement:rt,lazy:un,memo:bo,render:Eo,startTransition:fn,unmountComponentAtNode:Mo,unstable_batchedUpdates:Lo,useCallback:me,useContext:dr,useDebugValue:fo,useDeferredValue:Ro,useEffect:R,useErrorBoundary:jd,useId:ho,useImperativeHandle:uo,useInsertionEffect:Bo,useLayoutEffect:ve,useMemo:fe,useReducer:ur,useRef:L,useState:G,useSyncExternalStore:zo,useTransition:Vo,version:ef},Symbol.toStringTag,{value:"Module"}));function yt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function rf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Uo(...e){return t=>e.forEach(r=>rf(r,t))}function Rt(...e){return me(Uo(...e),e)}function nf(e,t=[]){let r=[];function n(i,a){const s=Mt(a),l=r.length;r=[...r,a];function u(c){const{scope:p,children:m,...b}=c,v=(p==null?void 0:p[e][l])||s,_=fe(()=>b,Object.values(b));return D(v.Provider,{value:_},m)}function h(c,p){const m=(p==null?void 0:p[e][l])||s,b=dr(m);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,h]}const o=()=>{const i=r.map(a=>Mt(a));return function(s){const l=(s==null?void 0:s[e])||i;return fe(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,of(o,...t)]}function of(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...s,...c}},{});return fe(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const hn=globalThis!=null&&globalThis.document?ve:()=>{},af=tf["useId".toString()]||(()=>{});let sf=0;function pn(e){const[t,r]=G(af());return hn(()=>{e||r(n=>n??String(sf++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=L(e);return R(()=>{t.current=e}),fe(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function lf({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=cf({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=nt(r),l=me(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else o(u)},[i,e,o,s]);return[a,l]}function cf({defaultProp:e,onChange:t}){const r=G(e),[n]=r,o=L(n),i=nt(t);return R(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const vn=re((e,t)=>{const{children:r,...n}=e,o=Fe.toArray(r),i=o.find(df);if(i){const a=i.props.children,s=o.map(l=>l===i?Fe.count(a)>1?Fe.only(null):rt(a)?a.props.children:null:l);return D(mn,de({},n,{ref:t}),rt(a)?gt(a,void 0,s):null)}return D(mn,de({},n,{ref:t}),r)});vn.displayName="Slot";const mn=re((e,t)=>{const{children:r,...n}=e;return rt(r)?gt(r,{...ff(n,r.props),ref:t?Uo(t,r.ref):r.ref}):Fe.count(r)>1?Fe.only(null):null});mn.displayName="SlotClone";const uf=({children:e})=>D(W,null,e);function df(e){return rt(e)&&e.type===uf}function ff(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=re((n,o)=>{const{asChild:i,...a}=n,s=i?vn:t;return R(()=>{window[Symbol.for("radix-ui")]=!0},[]),D(s,de({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hf(e,t){e&&pr(()=>e.dispatchEvent(t))}function pf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);R(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const gn="dismissableLayer.update",vf="dismissableLayer.pointerDownOutside",mf="dismissableLayer.focusOutside";let Ho;const bf=Mt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gf=re((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=dr(bf),[c,p]=G(null),m=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,b]=G({}),v=Rt(t,N=>p(N)),_=Array.from(h.layers),[x]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(x),O=c?_.indexOf(c):-1,A=h.layersWithOutsidePointerEventsDisabled.size>0,P=O>=w,U=yf(N=>{const M=N.target,se=[...h.branches].some(te=>te.contains(M));!P||se||(i==null||i(N),s==null||s(N),N.defaultPrevented||l==null||l())},m),q=_f(N=>{const M=N.target;[...h.branches].some(te=>te.contains(M))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},m);return pf(N=>{O===h.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},m),R(()=>{if(c)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Ho=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(c)),h.layers.add(c),qo(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ho)}},[c,m,n,h]),R(()=>()=>{c&&(h.layers.delete(c),h.layersWithOutsidePointerEventsDisabled.delete(c),qo())},[c,h]),R(()=>{const N=()=>b({});return document.addEventListener(gn,N),()=>document.removeEventListener(gn,N)},[]),D(bn.div,de({},u,{ref:v,style:{pointerEvents:A?P?"auto":"none":void 0,...e.style},onFocusCapture:yt(e.onFocusCapture,q.onFocusCapture),onBlurCapture:yt(e.onBlurCapture,q.onBlurCapture),onPointerDownCapture:yt(e.onPointerDownCapture,U.onPointerDownCapture)}))});function yf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1),o=L(()=>{});return R(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Ko(vf,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function _f(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1);return R(()=>{const o=i=>{i.target&&!n.current&&Ko(mf,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function qo(){const e=new CustomEvent(gn);document.dispatchEvent(e)}function Ko(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?hf(o,i):o.dispatchEvent(i)}const yn="focusScope.autoFocusOnMount",_n="focusScope.autoFocusOnUnmount",Wo={bubbles:!1,cancelable:!0},wf=re((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=G(null),u=nt(o),h=nt(i),c=L(null),p=Rt(t,v=>l(v)),m=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R(()=>{if(n){let v=function(O){if(m.paused||!s)return;const A=O.target;s.contains(A)?c.current=A:He(c.current,{select:!0})},_=function(O){if(m.paused||!s)return;const A=O.relatedTarget;A!==null&&(s.contains(A)||He(c.current,{select:!0}))},x=function(O){if(document.activeElement===document.body)for(const P of O)P.removedNodes.length>0&&He(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),w.disconnect()}}},[n,s,m.paused]),R(()=>{if(s){Zo.add(m);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(yn,Wo);s.addEventListener(yn,u),s.dispatchEvent(x),x.defaultPrevented||(xf(Ef(Go(s)),{select:!0}),document.activeElement===v&&He(s))}return()=>{s.removeEventListener(yn,u),setTimeout(()=>{const x=new CustomEvent(_n,Wo);s.addEventListener(_n,h),s.dispatchEvent(x),x.defaultPrevented||He(v??document.body,{select:!0}),s.removeEventListener(_n,h),Zo.remove(m)},0)}}},[s,u,h,m]);const b=me(v=>{if(!r&&!n||m.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(_&&x){const w=v.currentTarget,[O,A]=kf(w);O&&A?!v.shiftKey&&x===A?(v.preventDefault(),r&&He(O,{select:!0})):v.shiftKey&&x===O&&(v.preventDefault(),r&&He(A,{select:!0})):x===w&&v.preventDefault()}},[r,n,m.paused]);return D(bn.div,de({tabIndex:-1},a,{ref:p,onKeyDown:b}))});function xf(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(He(n,{select:t}),document.activeElement!==r)return}function kf(e){const t=Go(e),r=Yo(t,e),n=Yo(t.reverse(),e);return[r,n]}function Go(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Yo(e,t){for(const r of e)if(!$f(r,{upTo:t}))return r}function $f(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sf(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Sf(e)&&t&&e.select()}}const Zo=Cf();function Cf(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Xo(e,t),e.unshift(t)},remove(t){var r;e=Xo(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Xo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ef(e){return e.filter(t=>t.tagName!=="A")}function Of(e,t){return ur((r,n)=>{const o=t[r][n];return o??r},e)}const wn=e=>{const{present:t,children:r}=e,n=Pf(t),o=typeof r=="function"?r({present:n.isPresent}):Fe.only(r),i=Rt(n.ref,o.ref);return typeof r=="function"||n.isPresent?gt(o,{ref:i}):null};wn.displayName="Presence";function Pf(e){const[t,r]=G(),n=L({}),o=L(e),i=L("none"),a=e?"mounted":"unmounted",[s,l]=Of(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R(()=>{const u=vr(n.current);i.current=s==="mounted"?u:"none"},[s]),hn(()=>{const u=n.current,h=o.current;if(h!==e){const p=i.current,m=vr(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(h&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),hn(()=>{if(t){const u=c=>{const m=vr(n.current).includes(c.animationName);c.target===t&&m&&pr(()=>l("ANIMATION_END"))},h=c=>{c.target===t&&(i.current=vr(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:me(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function vr(e){return(e==null?void 0:e.animationName)||"none"}let xn=0;function Af(){R(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Qo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Qo()),xn++,()=>{xn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),xn--}},[])}function Qo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ce=function(){return Ce=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ce.apply(this,arguments)};function Jo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function If(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var mr="right-scroll-bar-position",br="width-before-scroll-bar",Tf="with-scroll-bars-hidden",Df="--removed-body-scroll-bar-size";function Nf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Mf(e,t){var r=G(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Ff(e,t){return Mf(t||null,function(r){return e.forEach(function(n){return Nf(n,r)})})}function Lf(e){return e}function jf(e,t){t===void 0&&(t=Lf);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var h=a;a=[],h.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),r}}}};return o}function Rf(e){e===void 0&&(e={});var t=jf(null);return t.options=Ce({async:!0,ssr:!1},e),t}var ea=function(e){var t=e.sideCar,r=Jo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return D(n,Ce({},r))};ea.isSideCarExport=!0;function Vf(e,t){return e.useMedium(t),ea}var ta=Rf(),kn=function(){},gr=re(function(e,t){var r=L(null),n=G({onScrollCapture:kn,onWheelCapture:kn,onTouchMoveCapture:kn}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,c=e.shards,p=e.sideCar,m=e.noIsolation,b=e.inert,v=e.allowPinchZoom,_=e.as,x=_===void 0?"div":_,w=Jo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=p,A=Ff([r,t]),P=Ce(Ce({},w),o);return D(W,null,h&&D(O,{sideCar:ta,removeScrollBar:u,shards:c,noIsolation:m,inert:b,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?gt(Fe.only(s),Ce(Ce({},P),{ref:A})):D(x,Ce({},P,{className:l,ref:A}),s))});gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},gr.classNames={fullWidth:br,zeroRight:mr};var ra,Bf=function(){if(ra)return ra;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bf();return t&&e.setAttribute("nonce",t),e}function Uf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var qf=function(){var e=0,t=null;return{add:function(r){e==0&&(t=zf())&&(Uf(t,r),Hf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kf=function(){var e=qf();return function(t,r){R(function(){return e.add(t),function(){e.remove()}},[t&&r])}},na=function(){var e=Kf(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Wf={left:0,top:0,right:0,gap:0},$n=function(e){return parseInt(e||"",10)||0},Gf=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$n(r),$n(n),$n(o)]},Yf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wf;var t=Gf(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Zf=na(),Xf=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
var Tm=Object.defineProperty;var Im=(Je,be,Ie)=>be in Je?Tm(Je,be,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Je[be]=Ie;var Bs=(Je,be,Ie)=>(Im(Je,typeof be!="symbol"?be+"":be,Ie),Ie);(function(){"use strict";var Je=e=>e,be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zs=Array.isArray,Wr=zs,Us=typeof be=="object"&&be&&be.Object===Object&&be,Hs=Us,qs=Hs,Ks=typeof self=="object"&&self&&self.Object===Object&&self,Ws=qs||Ks||Function("return this")(),Gr=Ws,Gs=Gr,Ys=Gs.Symbol,Yr=Ys,bi=Yr,yi=Object.prototype,Zs=yi.hasOwnProperty,Xs=yi.toString,Tt=bi?bi.toStringTag:void 0;function Qs(e){var t=Zs.call(e,Tt),r=e[Tt];try{e[Tt]=void 0;var n=!0}catch{}var o=Xs.call(e);return n&&(t?e[Tt]=r:delete e[Tt]),o}var Js=Qs,el=Object.prototype,tl=el.toString;function rl(e){return tl.call(e)}var nl=rl,_i=Yr,il=Js,ol=nl,al="[object Null]",sl="[object Undefined]",wi=_i?_i.toStringTag:void 0;function ll(e){return e==null?e===void 0?sl:al:wi&&wi in Object(e)?il(e):ol(e)}var xi=ll;function cl(e){return e!=null&&typeof e=="object"}var ul=cl,dl=xi,fl=ul,pl="[object Symbol]";function hl(e){return typeof e=="symbol"||fl(e)&&dl(e)==pl}var Zr=hl,vl=Wr,ml=Zr,gl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bl=/^\w*$/;function yl(e,t){if(vl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ml(e)?!0:bl.test(e)||!gl.test(e)||t!=null&&e in Object(t)}var _l=yl;function wl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ki=wl,xl=xi,kl=ki,$l="[object AsyncFunction]",Sl="[object Function]",Cl="[object GeneratorFunction]",El="[object Proxy]";function Ol(e){if(!kl(e))return!1;var t=xl(e);return t==Sl||t==Cl||t==$l||t==El}var Pl=Ol,Al=Gr,Tl=Al["__core-js_shared__"],Il=Tl,Xr=Il,$i=function(){var e=/[^.]+$/.exec(Xr&&Xr.keys&&Xr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Dl(e){return!!$i&&$i in e}var Nl=Dl,Ml=Function.prototype,Fl=Ml.toString;function Ll(e){if(e!=null){try{return Fl.call(e)}catch{}try{return e+""}catch{}}return""}var Rl=Ll,jl=Pl,Vl=Nl,Bl=ki,zl=Rl,Ul=/[\\^$.*+?()[\]{}|]/g,Hl=/^\[object .+?Constructor\]$/,ql=Function.prototype,Kl=Object.prototype,Wl=ql.toString,Gl=Kl.hasOwnProperty,Yl=RegExp("^"+Wl.call(Gl).replace(Ul,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zl(e){if(!Bl(e)||Vl(e))return!1;var t=jl(e)?Yl:Hl;return t.test(zl(e))}var Xl=Zl;function Ql(e,t){return e==null?void 0:e[t]}var Jl=Ql,ec=Xl,tc=Jl;function rc(e,t){var r=tc(e,t);return ec(r)?r:void 0}var Si=rc,nc=Si,ic=nc(Object,"create"),rr=ic,Ci=rr;function oc(){this.__data__=Ci?Ci(null):{},this.size=0}var ac=oc;function sc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var lc=sc,cc=rr,uc="__lodash_hash_undefined__",dc=Object.prototype,fc=dc.hasOwnProperty;function pc(e){var t=this.__data__;if(cc){var r=t[e];return r===uc?void 0:r}return fc.call(t,e)?t[e]:void 0}var hc=pc,vc=rr,mc=Object.prototype,gc=mc.hasOwnProperty;function bc(e){var t=this.__data__;return vc?t[e]!==void 0:gc.call(t,e)}var yc=bc,_c=rr,wc="__lodash_hash_undefined__";function xc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_c&&t===void 0?wc:t,this}var kc=xc,$c=ac,Sc=lc,Cc=hc,Ec=yc,Oc=kc;function ft(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ft.prototype.clear=$c,ft.prototype.delete=Sc,ft.prototype.get=Cc,ft.prototype.has=Ec,ft.prototype.set=Oc;var Pc=ft;function Ac(){this.__data__=[],this.size=0}var Tc=Ac;function Ic(e,t){return e===t||e!==e&&t!==t}var Dc=Ic,Nc=Dc;function Mc(e,t){for(var r=e.length;r--;)if(Nc(e[r][0],t))return r;return-1}var nr=Mc,Fc=nr,Lc=Array.prototype,Rc=Lc.splice;function jc(e){var t=this.__data__,r=Fc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Rc.call(t,r,1),--this.size,!0}var Vc=jc,Bc=nr;function zc(e){var t=this.__data__,r=Bc(t,e);return r<0?void 0:t[r][1]}var Uc=zc,Hc=nr;function qc(e){return Hc(this.__data__,e)>-1}var Kc=qc,Wc=nr;function Gc(e,t){var r=this.__data__,n=Wc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Yc=Gc,Zc=Tc,Xc=Vc,Qc=Uc,Jc=Kc,eu=Yc;function pt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}pt.prototype.clear=Zc,pt.prototype.delete=Xc,pt.prototype.get=Qc,pt.prototype.has=Jc,pt.prototype.set=eu;var tu=pt,ru=Si,nu=Gr,iu=ru(nu,"Map"),ou=iu,Ei=Pc,au=tu,su=ou;function lu(){this.size=0,this.__data__={hash:new Ei,map:new(su||au),string:new Ei}}var cu=lu;function uu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var du=uu,fu=du;function pu(e,t){var r=e.__data__;return fu(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ir=pu,hu=ir;function vu(e){var t=hu(this,e).delete(e);return this.size-=t?1:0,t}var mu=vu,gu=ir;function bu(e){return gu(this,e).get(e)}var yu=bu,_u=ir;function wu(e){return _u(this,e).has(e)}var xu=wu,ku=ir;function $u(e,t){var r=ku(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Su=$u,Cu=cu,Eu=mu,Ou=yu,Pu=xu,Au=Su;function ht(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ht.prototype.clear=Cu,ht.prototype.delete=Eu,ht.prototype.get=Ou,ht.prototype.has=Pu,ht.prototype.set=Au;var Tu=ht,Oi=Tu,Iu="Expected a function";function Qr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Iu);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Qr.Cache||Oi),r}Qr.Cache=Oi;var Du=Qr,Nu=Du,Mu=500;function Fu(e){var t=Nu(e,function(n){return r.size===Mu&&r.clear(),n}),r=t.cache;return t}var Lu=Fu,Ru=Lu,ju=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vu=/\\(\\)?/g,Bu=Ru(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ju,function(r,n,o,i){t.push(o?i.replace(Vu,"$1"):n||r)}),t}),zu=Bu;function Uu(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Hu=Uu,Pi=Yr,qu=Hu,Ku=Wr,Wu=Zr,Gu=1/0,Ai=Pi?Pi.prototype:void 0,Ti=Ai?Ai.toString:void 0;function Ii(e){if(typeof e=="string")return e;if(Ku(e))return qu(e,Ii)+"";if(Wu(e))return Ti?Ti.call(e):"";var t=e+"";return t=="0"&&1/e==-Gu?"-0":t}var Yu=Ii,Zu=Yu;function Xu(e){return e==null?"":Zu(e)}var Qu=Xu,Ju=Wr,ed=_l,td=zu,rd=Qu;function nd(e,t){return Ju(e)?e:ed(e,t)?[e]:td(rd(e))}var id=nd,od=Zr,ad=1/0;function sd(e){if(typeof e=="string"||od(e))return e;var t=e+"";return t=="0"&&1/e==-ad?"-0":t}var ld=sd,cd=id,ud=ld;function dd(e,t){t=cd(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ud(t[r++])];return r&&r==n?e:void 0}var fd=dd,pd=fd;function hd(e,t,r){var n=e==null?void 0:pd(e,t);return n===void 0?r:n}var vd=hd;const It=Ie(vd);var Dt,S,Di,Ni,et,Mi,Fi,Jr,Li,vt={},Ri=[],md=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,or=Array.isArray;function De(e,t){for(var r in t)e[r]=t[r];return e}function ji(e){var t=e.parentNode;t&&t.removeChild(e)}function D(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Dt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Nt(e,a,n,o,null)}function Nt(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Di};return o==null&&S.vnode!=null&&S.vnode(i),i}function Vi(){return{current:null}}function Y(e){return e.children}function ye(e,t){this.props=e,this.context=t}function ar(e,t){if(t==null)return e.__?ar(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ar(e):null}function Bi(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Bi(e)}}function en(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!sr.__r++||Mi!==S.debounceRendering)&&((Mi=S.debounceRendering)||Fi)(sr)}function sr(){var e,t,r,n,o,i,a,s,l;for(et.sort(Jr);e=et.shift();)e.__d&&(t=et.length,n=void 0,o=void 0,i=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],o=[],(i=De({},a)).__v=a.__v+1,tn(l,a,i,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??ar(a),a.__h,o),Gi(n,a,o),a.__e!=s&&Bi(a)),et.length>t&&et.sort(Jr));sr.__r=0}function zi(e,t,r,n,o,i,a,s,l,d,f){var c,h,m,g,v,_,x,w,O,A,P=0,U=n&&n.__k||Ri,K=U.length,N=K,M=t.length;for(r.__k=[],c=0;c<M;c++)(g=r.__k[c]=(g=t[c])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?Nt(null,g,null,null,g):or(g)?Nt(Y,{children:g},null,null,null):g.__b>0?Nt(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(w=gd(g,U,x=c+P,N))===-1?m=vt:(m=U[w]||vt,U[w]=void 0,N--),tn(e,g,m,o,i,a,s,l,d,f),v=g.__e,(h=g.ref)&&m.ref!=h&&(m.ref&&rn(m.ref,null,g),f.push(h,g.__c||v,g)),v!=null&&(_==null&&(_=v),A=!(O=m===vt||m.__v===null)&&w===x,O?w==-1&&P--:w!==x&&(w===x+1?(P++,A=!0):w>x?N>M-x?(P+=w-x,A=!0):P--:P=w<x&&w==x-1?w-x:0),x=c+P,A=A||w==c&&!O,typeof g.type!="function"||w===x&&m.__k!==g.__k?typeof g.type=="function"||A?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=v.nextSibling:l=Hi(e,v,l):l=Ui(g,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,c=K;c--;)U[c]!=null&&(typeof r.type=="function"&&U[c].__e!=null&&U[c].__e==r.__d&&(r.__d=U[c].__e.nextSibling),Yi(U[c],U[c]))}function Ui(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?Ui(n,t,r):Hi(r,n.__e,t));return t}function Ne(e,t){return t=t||[],e==null||typeof e=="boolean"||(or(e)?e.some(function(r){Ne(r,t)}):t.push(e)),t}function Hi(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function gd(e,t,r,n){var o=e.key,i=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&o==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&o==l.key&&i===l.type)return s;s++}}return-1}function bd(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||lr(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||lr(e,i,t[i],r[i],n)}function qi(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||md.test(t)?r:r+"px"}function lr(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||qi(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||qi(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?Wi:Ki,i):e.removeEventListener(t,i?Wi:Ki,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Ki(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Wi(e){return this.l[e.type+!0](S.event?S.event(e):e)}function tn(e,t,r,n,o,i,a,s,l,d){var f,c,h,m,g,v,_,x,w,O,A,P,U,K,N,M=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=S.__b)&&f(t);try{e:if(typeof M=="function"){if(x=t.props,w=(f=M.contextType)&&n[f.__c],O=f?w?w.props.value:f.__:n,r.__c?_=(c=t.__c=r.__c).__=c.__E:("prototype"in M&&M.prototype.render?t.__c=c=new M(x,O):(t.__c=c=new ye(x,O),c.constructor=M,c.render=_d),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=O,c.__n=n,h=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=De({},c.__s)),De(c.__s,M.getDerivedStateFromProps(x,c.__s))),m=c.props,g=c.state,c.__v=t,h)M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(M.getDerivedStateFromProps==null&&x!==m&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,O),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),A=0;A<c._sb.length;A++)c.__h.push(c._sb[A]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,O),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(m,g,v)})}if(c.context=O,c.props=x,c.__P=e,c.__e=!1,P=S.__r,U=0,"prototype"in M&&M.prototype.render){for(c.state=c.__s,c.__d=!1,P&&P(t),f=c.render(c.props,c.state,c.context),K=0;K<c._sb.length;K++)c.__h.push(c._sb[K]);c._sb=[]}else do c.__d=!1,P&&P(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++U<25);c.state=c.__s,c.getChildContext!=null&&(n=De(De({},n),c.getChildContext())),h||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(m,g)),zi(e,or(N=f!=null&&f.type===Y&&f.key==null?f.props.children:f)?N:[N],t,r,n,o,i,a,s,l,d),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),_&&(c.__E=c.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=yd(r.__e,t,r,n,o,i,a,l,d);(f=S.diffed)&&f(t)}catch(se){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),S.__e(se,t,r)}}function Gi(e,t,r){for(var n=0;n<r.length;n++)rn(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function yd(e,t,r,n,o,i,a,s,l){var d,f,c,h=r.props,m=t.props,g=t.type,v=0;if(g==="svg"&&(o=!0),i!=null){for(;v<i.length;v++)if((d=i[v])&&"setAttribute"in d==!!g&&(g?d.localName===g:d.nodeType===3)){e=d,i[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(m);e=o?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,m.is&&m),i=null,s=!1}if(g===null)h===m||s&&e.data===m||(e.data=m);else{if(i=i&&Dt.call(e.childNodes),f=(h=r.props||vt).dangerouslySetInnerHTML,c=m.dangerouslySetInnerHTML,!s){if(i!=null)for(h={},v=0;v<e.attributes.length;v++)h[e.attributes[v].name]=e.attributes[v].value;(c||f)&&(c&&(f&&c.__html==f.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(bd(e,m,h,o,s),c)t.__k=[];else if(zi(e,or(v=t.props.children)?v:[v],t,r,n,o&&g!=="foreignObject",i,a,i?i[0]:r.__k&&ar(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&ji(i[v]);s||("value"in m&&(v=m.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==h.value)&&lr(e,"value",v,h.value,!1),"checked"in m&&(v=m.checked)!==void 0&&v!==e.checked&&lr(e,"checked",v,h.checked,!1))}return e}function rn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Yi(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||rn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Yi(n[o],t,r||typeof e.type!="function");r||e.__e==null||ji(e.__e),e.__=e.__e=e.__d=void 0}function _d(e,t,r){return this.constructor(e,r)}function mt(e,t,r){var n,o,i,a;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],tn(t,e=(!n&&r||t).__k=D(Y,null,[e]),o||vt,vt,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?Dt.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),Gi(i,e,a)}function Zi(e,t){mt(e,t,Zi)}function wd(e,t,r){var n,o,i,a,s=De({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&a!==void 0?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Dt.call(arguments,2):r),Nt(e.type,s,n||e.key,o||e.ref,null)}function Mt(e,t){var r={__c:t="__cC"+Li++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(s){s.__e=!0,en(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Dt=Ri.slice,S={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},Di=0,Ni=function(e){return e!=null&&e.constructor===void 0},ye.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=De({},this.state),typeof e=="function"&&(e=e(De({},r),this.props)),e&&De(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),en(this))},ye.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),en(this))},ye.prototype.render=Y,et=[],Fi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Jr=function(e,t){return e.__v.__b-t.__v.__b},sr.__r=0,Li=0;var nn=class extends Error{constructor(t){super(t[0].message);Bs(this,"issues");this.name="ValiError",this.issues=t}};function Xi(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Ft(e){return{issues:e}}function ce(e){return{output:e}}function xd(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,path:t.path,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function kd(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Be(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ce(e);let o,i,a=e;for(const s of t){const l=s._parse(a);if(l.issues){o=o||kd(r,n);for(const d of l.issues){const f=xd(o,d);i?i.push(f):i=[f]}if(o.abortEarly||o.abortPipeEarly)break}else a=l.output}return i?Ft(i):ce(a)}function ze(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function Qi(e){return typeof e=="function"?e():e}function Ue(e,t,r,n){return Ft([{validation:e,message:Qi(t),input:r,requirement:n}])}function $d(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,a]=ze(t,r);return[e,i,a]}const[n,o]=ze(e,t);return[void 0,n,o]}function Me(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:Qi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Ji(e){return typeof e.default=="function"?e.default():e.default}function Sd(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Be(t,this.pipe,r,"any")}}}function Cd(e,t,r){const[n="Invalid type",o]=ze(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,a){if(!Array.isArray(i))return Me(a,"type","array",this.message,i);let s;const l=[];for(let d=0;d<i.length;d++){const f=i[d],c=this.item._parse(f,a);if(c.issues){const h={type:"array",input:i,key:d,value:f};for(const m of c.issues)m.path?m.path.unshift(h):m.path=[h],s==null||s.push(m);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Ft(s):Be(l,this.pipe,a,"array")}}}function eo(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?Me(i,"type","boolean",this.message,o):Be(o,this.pipe,i,"boolean")}}}function to(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?Me(n,"type","literal",this.message,r):ce(r)}}}function Ed(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const o=Ji(this);if(o===void 0)return ce(r);r=o}return this.wrapped._parse(r,n)}}}function on(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?Me(i,"type","number",this.message,o):Be(o,this.pipe,i,"number")}}}function Se(e,t,r,n){const[o,i="Invalid type",a]=$d(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:a,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","object",this.message,l);s=s||Object.entries(this.entries);let f;const c={};for(const[h,m]of s){const g=l[h],v=m._parse(g,d);if(v.issues){const _={type:"object",input:l,key:h,value:g};for(const x of v.issues)x.path?x.path.unshift(_):x.path=[_],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}else(v.output!==void 0||h in l)&&(c[h]=v.output)}if(this.rest&&!(d!=null&&d.abortEarly&&f)){for(const h in l)if(!(h in this.entries)){const m=l[h],g=this.rest._parse(m,d);if(g.issues){const v={type:"object",input:l,key:h,value:m};for(const _ of g.issues)_.path?_.path.unshift(v):_.path=[v],f==null||f.push(_);if(f||(f=g.issues),d!=null&&d.abortEarly)break}else c[h]=g.output}}return f?Ft(f):Be(c,this.pipe,d,"object")}}}function Od(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const o=Ji(this);if(o===void 0)return ce(r);r=o}return this.wrapped._parse(r,n)}}}function Pd(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ce(r):Me(n,"type","picklist",this.message,r)}}}function Ce(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?Me(i,"type","string",this.message,o):Be(o,this.pipe,i,"string")}}}function Ad(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=ze(r,n);return[e,t,a,s]}const[o,i]=ze(t,r);return[Ce(),e,o,i]}var Td=["__proto__","prototype","constructor"];function ro(e,t,r,n){const[o,i,a="Invalid type",s]=Ad(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:a,pipe:s,_parse(l,d){if(!l||typeof l!="object")return Me(d,"type","record",this.message,l);let f;const c={};for(const[h,m]of Object.entries(l))if(!Td.includes(h)){let g;const v=this.key._parse(h,{origin:"key",abortEarly:d==null?void 0:d.abortEarly,abortPipeEarly:d==null?void 0:d.abortPipeEarly,skipPipe:d==null?void 0:d.skipPipe});if(v.issues){g={type:"record",input:l,key:h,value:m};for(const x of v.issues)x.path=[g],f==null||f.push(x);if(f||(f=v.issues),d!=null&&d.abortEarly)break}const _=this.value._parse(m,d);if(_.issues){g=g||{type:"record",input:l,key:h,value:m};for(const x of _.issues)x.path?x.path.unshift(g):x.path=[g],f==null||f.push(x);if(f||(f=_.issues),d!=null&&d.abortEarly)break}!v.issues&&!_.issues&&(c[v.output]=_.output)}return f?Ft(f):Be(c,this.pipe,d,"record")}}}function Id(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let o,i;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(o)for(const l of s.issues)o.push(l);else o=s.issues;else{i=[s.output];break}}return i?ce(i[0]):Me(n,"type","union",this.message,r,o)}}}function cr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new nn(n.issues);return n.output}async function Dd(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new nn(n.issues);return n.output}function no(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const a=t(i.output);return r&&!Array.isArray(r)?r._parse(a,o):Be(a,r,o,typeof a)}}}var Nd=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Md(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Fd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Nd,_parse(t){return this.requirement.test(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function Lt(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Ld(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Rt(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Rd(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function jd(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Vd(e="Invalid URL"){return{type:"url",async:!1,message:e,requirement(t){try{return new URL(t),!0}catch{return!1}},_parse(t){return this.requirement(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},de.apply(this,arguments)}var Fe,B,an,io,gt=0,oo=[],ur=[],ao=S.__b,so=S.__r,lo=S.diffed,co=S.__c,uo=S.unmount;function tt(e,t){S.__h&&S.__h(B,e,gt||t),gt=0;var r=B.__H||(B.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:ur}),r.__[e]}function W(e){return gt=1,dr(mo,e)}function dr(e,t,r){var n=tt(Fe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):mo(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=B,!B.u)){var o=function(s,l,d){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!i||i.call(this,s,l,d);var c=!1;return f.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!i||i.call(this,s,l,d))};B.u=!0;var i=B.shouldComponentUpdate,a=B.componentWillUpdate;B.componentWillUpdate=function(s,l,d){if(this.__e){var f=i;i=void 0,o(s,l,d),i=f}a&&a.call(this,s,l,d)},B.shouldComponentUpdate=o}return n.__N||n.__}function j(e,t){var r=tt(Fe++,3);!S.__s&&ln(r.__H,t)&&(r.__=e,r.i=t,B.__H.__h.push(r))}function fe(e,t){var r=tt(Fe++,4);!S.__s&&ln(r.__H,t)&&(r.__=e,r.i=t,B.__h.push(r))}function F(e){return gt=5,pe(function(){return{current:e}},[])}function fo(e,t,r){gt=6,fe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function pe(e,t){var r=tt(Fe++,7);return ln(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function me(e,t){return gt=8,pe(function(){return e},t)}function fr(e){var t=B.context[e.__c],r=tt(Fe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(B)),t.props.value):e.__}function po(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function Bd(e){var t=tt(Fe++,10),r=W();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function ho(){var e=tt(Fe++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function zd(){for(var e;e=oo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pr),e.__H.__h.forEach(sn),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){B=null,ao&&ao(e)},S.__r=function(e){so&&so(e),Fe=0;var t=(B=e.__c).__H;t&&(an===B?(t.__h=[],B.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=ur,r.__N=r.i=void 0})):(t.__h.forEach(pr),t.__h.forEach(sn),t.__h=[],Fe=0)),an=B},S.diffed=function(e){lo&&lo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(oo.push(t)!==1&&io===S.requestAnimationFrame||((io=S.requestAnimationFrame)||Ud)(zd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==ur&&(r.__=r.__V),r.i=void 0,r.__V=ur})),an=B=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(pr),r.__h=r.__h.filter(function(n){return!n.__||sn(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),co&&co(e,t)},S.unmount=function(e){uo&&uo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{pr(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var vo=typeof requestAnimationFrame=="function";function Ud(e){var t,r=function(){clearTimeout(n),vo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);vo&&(t=requestAnimationFrame(r))}function pr(e){var t=B,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),B=t}function sn(e){var t=B;e.__c=e.__(),B=t}function ln(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function mo(e,t){return typeof t=="function"?t(e):t}function go(e,t){for(var r in t)e[r]=t[r];return e}function cn(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function un(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function hr(e){this.props=e}function bo(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:cn(this.props,o)}function n(o){return this.shouldComponentUpdate=r,D(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(hr.prototype=new ye).isPureReactComponent=!0,hr.prototype.shouldComponentUpdate=function(e,t){return cn(this.props,e)||cn(this.state,t)};var yo=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),yo&&yo(e)};var Hd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ne(e){function t(r){var n=go({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Hd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var _o=function(e,t){return e==null?null:Ne(Ne(e).map(t))},Le={map:_o,forEach:_o,count:function(e){return e?Ne(e).length:0},only:function(e){var t=Ne(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ne},qd=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}qd(e,t,r,n)};var wo=S.unmount;function xo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=go({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return xo(n,t,r)})),e}function ko(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return ko(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function bt(){this.__u=0,this.t=null,this.__b=null}function $o(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function dn(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return D(r,i)}return o.displayName="Lazy",o.__f=!0,o}function yt(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),wo&&wo(e)},(bt.prototype=new ye).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=$o(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=ko(d,d.__c.__P,d.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},bt.prototype.componentWillUnmount=function(){this.t=[]},bt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=xo(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&D(Y,null,e.fallback);return o&&(o.__h=null),[D(Y,null,t.__a?null:e.children),o]};var So=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Kd(e){return this.getChildContext=function(){return e.context},e.children}function Wd(e){var t=this,r=e.i;t.componentWillUnmount=function(){mt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),mt(D(Kd,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Co(e,t){var r=D(Wd,{__v:e,i:t});return r.containerInfo=t,r}(yt.prototype=new ye).__a=function(e){var t=this,r=$o(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),So(t,e,n)):o()};r?r(i):i()}},yt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ne(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},yt.prototype.componentDidUpdate=yt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){So(e,r,t)})};var Eo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Gd=/^(?: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]/,Yd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Zd=/[A-Z0-9]/g,Xd=typeof document<"u",Qd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Oo(e,t,r){return t.__k==null&&(t.textContent=""),mt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Po(e,t,r){return Zi(e,t),typeof r=="function"&&r(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ao=S.event;function Jd(){}function ef(){return this.cancelBubble}function tf(){return this.defaultPrevented}S.event=function(e){return Ao&&(e=Ao(e)),e.persist=Jd,e.isPropagationStopped=ef,e.isDefaultPrevented=tf,e.nativeEvent=e};var fn,rf={enumerable:!1,configurable:!0,get:function(){return this.class}},To=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||Xd&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Qd(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Yd.test(i)?i=s:n.indexOf("-")===-1&&Gd.test(i)?i=i.replace(Zd,"-$&").toLowerCase():a===null&&(a=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Ne(r.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Ne(r.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",rf)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Eo,To&&To(e)};var Io=S.__r;S.__r=function(e){Io&&Io(e),fn=e.__c};var Do=S.diffed;S.diffed=function(e){Do&&Do(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),fn=null};var No={ReactCurrentDispatcher:{current:{readContext:function(e){return fn.__n[e.__c].props.value}}}},nf="17.0.2";function Mo(e){return D.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Eo}function _t(e){return rt(e)?wd.apply(null,arguments):e}function Fo(e){return!!e.__k&&(mt(null,e),!0)}function Lo(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ro=function(e,t){return e(t)},vr=function(e,t){return e(t)},jo=Y;function pn(e){e()}function Vo(e){return e}function Bo(){return[!1,pn]}var zo=fe;function Uo(e,t){var r=t(),n=W({h:{__:r,v:t}}),o=n[0].h,i=n[1];return fe(function(){o.__=r,o.v=t,un(o.__,t())||i({h:o})},[e,r,t]),j(function(){return un(o.__,o.v())||i({h:o}),e(function(){un(o.__,o.v())||i({h:o})})},[e]),r}var xe={useState:W,useId:ho,useReducer:dr,useEffect:j,useLayoutEffect:fe,useInsertionEffect:zo,useTransition:Bo,useDeferredValue:Vo,useSyncExternalStore:Uo,startTransition:pn,useRef:F,useImperativeHandle:fo,useMemo:pe,useCallback:me,useContext:fr,useDebugValue:po,version:"17.0.2",Children:Le,render:Oo,hydrate:Po,unmountComponentAtNode:Fo,createPortal:Co,createElement:D,createContext:Mt,createFactory:Mo,cloneElement:_t,createRef:Vi,Fragment:Y,isValidElement:rt,findDOMNode:Lo,Component:ye,PureComponent:hr,memo:bo,forwardRef:ne,flushSync:vr,unstable_batchedUpdates:Ro,StrictMode:jo,Suspense:bt,SuspenseList:yt,lazy:dn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:No};const of=Object.freeze(Object.defineProperty({__proto__:null,Children:Le,Component:ye,Fragment:Y,PureComponent:hr,StrictMode:jo,Suspense:bt,SuspenseList:yt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:No,cloneElement:_t,createContext:Mt,createElement:D,createFactory:Mo,createPortal:Co,createRef:Vi,default:xe,findDOMNode:Lo,flushSync:vr,forwardRef:ne,hydrate:Po,isValidElement:rt,lazy:dn,memo:bo,render:Oo,startTransition:pn,unmountComponentAtNode:Fo,unstable_batchedUpdates:Ro,useCallback:me,useContext:fr,useDebugValue:po,useDeferredValue:Vo,useEffect:j,useErrorBoundary:Bd,useId:ho,useImperativeHandle:fo,useInsertionEffect:zo,useLayoutEffect:fe,useMemo:pe,useReducer:dr,useRef:F,useState:W,useSyncExternalStore:Uo,useTransition:Bo,version:nf},Symbol.toStringTag,{value:"Module"}));function wt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function af(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ho(...e){return t=>e.forEach(r=>af(r,t))}function jt(...e){return me(Ho(...e),e)}function sf(e,t=[]){let r=[];function n(i,a){const s=Mt(a),l=r.length;r=[...r,a];function d(c){const{scope:h,children:m,...g}=c,v=(h==null?void 0:h[e][l])||s,_=pe(()=>g,Object.values(g));return D(v.Provider,{value:_},m)}function f(c,h){const m=(h==null?void 0:h[e][l])||s,g=fr(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,f]}const o=()=>{const i=r.map(a=>Mt(a));return function(s){const l=(s==null?void 0:s[e])||i;return pe(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,lf(o,...t)]}function lf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:d})=>{const c=l(i)[`__scope${d}`];return{...s,...c}},{});return pe(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const hn=globalThis!=null&&globalThis.document?fe:()=>{},cf=of["useId".toString()]||(()=>{});let uf=0;function vn(e){const[t,r]=W(cf());return hn(()=>{e||r(n=>n??String(uf++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=F(e);return j(()=>{t.current=e}),pe(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function df({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=ff({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=nt(r),l=me(d=>{if(i){const c=typeof d=="function"?d(e):d;c!==e&&s(c)}else o(d)},[i,e,o,s]);return[a,l]}function ff({defaultProp:e,onChange:t}){const r=W(e),[n]=r,o=F(n),i=nt(t);return j(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const mn=ne((e,t)=>{const{children:r,...n}=e,o=Le.toArray(r),i=o.find(hf);if(i){const a=i.props.children,s=o.map(l=>l===i?Le.count(a)>1?Le.only(null):rt(a)?a.props.children:null:l);return D(gn,de({},n,{ref:t}),rt(a)?_t(a,void 0,s):null)}return D(gn,de({},n,{ref:t}),r)});mn.displayName="Slot";const gn=ne((e,t)=>{const{children:r,...n}=e;return rt(r)?_t(r,{...vf(n,r.props),ref:t?Ho(t,r.ref):r.ref}):Le.count(r)>1?Le.only(null):null});gn.displayName="SlotClone";const pf=({children:e})=>D(Y,null,e);function hf(e){return rt(e)&&e.type===pf}function vf(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=ne((n,o)=>{const{asChild:i,...a}=n,s=i?mn:t;return j(()=>{window[Symbol.for("radix-ui")]=!0},[]),D(s,de({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mf(e,t){e&&vr(()=>e.dispatchEvent(t))}function gf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);j(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const yn="dismissableLayer.update",bf="dismissableLayer.pointerDownOutside",yf="dismissableLayer.focusOutside";let qo;const _f=Mt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wf=ne((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...d}=e,f=fr(_f),[c,h]=W(null),m=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=W({}),v=jt(t,N=>h(N)),_=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(x),O=c?_.indexOf(c):-1,A=f.layersWithOutsidePointerEventsDisabled.size>0,P=O>=w,U=xf(N=>{const M=N.target,se=[...f.branches].some(re=>re.contains(M));!P||se||(i==null||i(N),s==null||s(N),N.defaultPrevented||l==null||l())},m),K=kf(N=>{const M=N.target;[...f.branches].some(re=>re.contains(M))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},m);return gf(N=>{O===f.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},m),j(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qo=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),Ko(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=qo)}},[c,m,n,f]),j(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),Ko())},[c,f]),j(()=>{const N=()=>g({});return document.addEventListener(yn,N),()=>document.removeEventListener(yn,N)},[]),D(bn.div,de({},d,{ref:v,style:{pointerEvents:A?P?"auto":"none":void 0,...e.style},onFocusCapture:wt(e.onFocusCapture,K.onFocusCapture),onBlurCapture:wt(e.onBlurCapture,K.onBlurCapture),onPointerDownCapture:wt(e.onPointerDownCapture,U.onPointerDownCapture)}))});function xf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=F(!1),o=F(()=>{});return j(()=>{const i=s=>{if(s.target&&!n.current){let d=function(){Wo(bf,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function kf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=F(!1);return j(()=>{const o=i=>{i.target&&!n.current&&Wo(yf,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ko(){const e=new CustomEvent(yn);document.dispatchEvent(e)}function Wo(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?mf(o,i):o.dispatchEvent(i)}const _n="focusScope.autoFocusOnMount",wn="focusScope.autoFocusOnUnmount",Go={bubbles:!1,cancelable:!0},$f=ne((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=W(null),d=nt(o),f=nt(i),c=F(null),h=jt(t,v=>l(v)),m=F({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j(()=>{if(n){let v=function(O){if(m.paused||!s)return;const A=O.target;s.contains(A)?c.current=A:He(c.current,{select:!0})},_=function(O){if(m.paused||!s)return;const A=O.relatedTarget;A!==null&&(s.contains(A)||He(c.current,{select:!0}))},x=function(O){if(document.activeElement===document.body)for(const P of O)P.removedNodes.length>0&&He(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),w.disconnect()}}},[n,s,m.paused]),j(()=>{if(s){Xo.add(m);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(_n,Go);s.addEventListener(_n,d),s.dispatchEvent(x),x.defaultPrevented||(Sf(Af(Yo(s)),{select:!0}),document.activeElement===v&&He(s))}return()=>{s.removeEventListener(_n,d),setTimeout(()=>{const x=new CustomEvent(wn,Go);s.addEventListener(wn,f),s.dispatchEvent(x),x.defaultPrevented||He(v??document.body,{select:!0}),s.removeEventListener(wn,f),Xo.remove(m)},0)}}},[s,d,f,m]);const g=me(v=>{if(!r&&!n||m.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(_&&x){const w=v.currentTarget,[O,A]=Cf(w);O&&A?!v.shiftKey&&x===A?(v.preventDefault(),r&&He(O,{select:!0})):v.shiftKey&&x===O&&(v.preventDefault(),r&&He(A,{select:!0})):x===w&&v.preventDefault()}},[r,n,m.paused]);return D(bn.div,de({tabIndex:-1},a,{ref:h,onKeyDown:g}))});function Sf(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(He(n,{select:t}),document.activeElement!==r)return}function Cf(e){const t=Yo(e),r=Zo(t,e),n=Zo(t.reverse(),e);return[r,n]}function Yo(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Zo(e,t){for(const r of e)if(!Ef(r,{upTo:t}))return r}function Ef(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Of(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Of(e)&&t&&e.select()}}const Xo=Pf();function Pf(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Qo(e,t),e.unshift(t)},remove(t){var r;e=Qo(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Qo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Af(e){return e.filter(t=>t.tagName!=="A")}function Tf(e,t){return dr((r,n)=>{const o=t[r][n];return o??r},e)}const xn=e=>{const{present:t,children:r}=e,n=If(t),o=typeof r=="function"?r({present:n.isPresent}):Le.only(r),i=jt(n.ref,o.ref);return typeof r=="function"||n.isPresent?_t(o,{ref:i}):null};xn.displayName="Presence";function If(e){const[t,r]=W(),n=F({}),o=F(e),i=F("none"),a=e?"mounted":"unmounted",[s,l]=Tf(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j(()=>{const d=mr(n.current);i.current=s==="mounted"?d:"none"},[s]),hn(()=>{const d=n.current,f=o.current;if(f!==e){const h=i.current,m=mr(d);e?l("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),hn(()=>{if(t){const d=c=>{const m=mr(n.current).includes(c.animationName);c.target===t&&m&&vr(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(i.current=mr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:me(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function mr(e){return(e==null?void 0:e.animationName)||"none"}let kn=0;function Df(){j(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Jo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Jo()),kn++,()=>{kn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),kn--}},[])}function Jo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ee=function(){return Ee=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ee.apply(this,arguments)};function ea(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Nf(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var gr="right-scroll-bar-position",br="width-before-scroll-bar",Mf="with-scroll-bars-hidden",Ff="--removed-body-scroll-bar-size";function Lf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rf(e,t){var r=W(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function jf(e,t){return Rf(t||null,function(r){return e.forEach(function(n){return Lf(n,r)})})}function Vf(e){return e}function Bf(e,t){t===void 0&&(t=Vf);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},d=function(){return Promise.resolve().then(l)};d(),r={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),r}}}};return o}function zf(e){e===void 0&&(e={});var t=Bf(null);return t.options=Ee({async:!0,ssr:!1},e),t}var ta=function(e){var t=e.sideCar,r=ea(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return D(n,Ee({},r))};ta.isSideCarExport=!0;function Uf(e,t){return e.useMedium(t),ta}var ra=zf(),$n=function(){},yr=ne(function(e,t){var r=F(null),n=W({onScrollCapture:$n,onWheelCapture:$n,onTouchMoveCapture:$n}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,c=e.shards,h=e.sideCar,m=e.noIsolation,g=e.inert,v=e.allowPinchZoom,_=e.as,x=_===void 0?"div":_,w=ea(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=h,A=jf([r,t]),P=Ee(Ee({},w),o);return D(Y,null,f&&D(O,{sideCar:ra,removeScrollBar:d,shards:c,noIsolation:m,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?_t(Le.only(s),Ee(Ee({},P),{ref:A})):D(x,Ee({},P,{className:l,ref:A}),s))});yr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yr.classNames={fullWidth:br,zeroRight:gr};var na,Hf=function(){if(na)return na;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hf();return t&&e.setAttribute("nonce",t),e}function Kf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Wf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gf=function(){var e=0,t=null;return{add:function(r){e==0&&(t=qf())&&(Kf(t,r),Wf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yf=function(){var e=Gf();return function(t,r){j(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ia=function(){var e=Yf(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Zf={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Xf=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(r),Sn(n),Sn(o)]},Qf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Zf;var t=Xf(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Jf=ia(),ep=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
+
.`.concat(Mf,` {
|
|
3
3
|
overflow: hidden `).concat(n,`;
|
|
4
4
|
padding-right: `).concat(s,"px ").concat(n,`;
|
|
5
5
|
}
|
|
@@ -16,7 +16,7 @@ var vm=Object.defineProperty;var mm=(Je,ge,Ve)=>ge in Je?vm(Je,ge,{enumerable:!0
|
|
|
16
16
|
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
19
|
+
.`).concat(gr,` {
|
|
20
20
|
right: `).concat(s,"px ").concat(n,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ var vm=Object.defineProperty;var mm=(Je,ge,Ve)=>ge in Je?vm(Je,ge,{enumerable:!0
|
|
|
24
24
|
margin-right: `).concat(s,"px ").concat(n,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(gr," .").concat(gr,` {
|
|
28
28
|
right: 0 `).concat(n,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -33,13 +33,13 @@ var vm=Object.defineProperty;var mm=(Je,ge,Ve)=>ge in Je?vm(Je,ge,{enumerable:!0
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(Ff,": ").concat(s,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},tp=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=pe(function(){return Qf(o)},[o]);return D(Jf,{styles:ep(i,!t,o,r?"":"!important")})},Cn=!1;if(typeof window<"u")try{var _r=Object.defineProperty({},"passive",{get:function(){return Cn=!0,!0}});window.addEventListener("test",_r,_r),window.removeEventListener("test",_r,_r)}catch{Cn=!1}var xt=Cn?{passive:!1}:!1,rp=function(e){return e.tagName==="TEXTAREA"},oa=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!rp(e)&&r[t]==="visible")},np=function(e){return oa(e,"overflowY")},ip=function(e){return oa(e,"overflowX")},aa=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=sa(e,r);if(n){var o=la(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},op=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ap=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},sa=function(e,t){return e==="v"?np(t):ip(t)},la=function(e,t){return e==="v"?op(t):ap(t)},sp=function(e,t){return e==="h"&&t==="rtl"?-1:1},lp=function(e,t,r,n,o){var i=sp(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),d=!1,f=a>0,c=0,h=0;do{var m=la(e,s),g=m[0],v=m[1],_=m[2],x=v-_-i*g;(g||x)&&sa(e,s)&&(c+=x,h+=g),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(o&&c===0||!o&&a>c)||!f&&(o&&h===0||!o&&-a>h))&&(d=!0),d},wr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ca=function(e){return[e.deltaX,e.deltaY]},ua=function(e){return e&&"current"in e?e.current:e},cp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},up=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},lh=0,wt=[];function ch(e){var t=L([]),r=L([0,0]),n=L(),o=G(lh++)[0],i=G(function(){return na()})[0],a=L(e);R(function(){a.current=e},[e]),R(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=If([e.lockRef.current],(e.shards||[]).map(ca),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me(function(v,_){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=_r(v),w=r.current,O="deltaX"in v?v.deltaX:w[0]-x[0],A="deltaY"in v?v.deltaY:w[1]-x[1],P,U=v.target,q=Math.abs(O)>Math.abs(A)?"h":"v";if("touches"in v&&q==="h"&&U.type==="range")return!1;var N=oa(q,U);if(!N)return!0;if(N?P=q:(P=q==="v"?"h":"v",N=oa(q,U)),!N)return!1;if(!n.current&&"changedTouches"in v&&(O||A)&&(n.current=P),!P)return!0;var M=n.current||P;return oh(M,_,v,M==="h"?O:A,!0)},[]),l=me(function(v){var _=v;if(!(!wt.length||wt[wt.length-1]!==i)){var x="deltaY"in _?la(_):_r(_),w=t.current.filter(function(P){return P.name===_.type&&P.target===_.target&&ah(P.delta,x)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var O=(a.current.shards||[]).map(ca).filter(Boolean).filter(function(P){return P.contains(_.target)}),A=O.length>0?s(_,O[0]):!a.current.noIsolation;A&&_.cancelable&&_.preventDefault()}}},[]),u=me(function(v,_,x,w){var O={name:v,delta:_,target:x,should:w};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(A){return A!==O})},1)},[]),h=me(function(v){r.current=_r(v),n.current=void 0},[]),c=me(function(v){u(v.type,la(v),v.target,s(v,e.lockRef.current))},[]),p=me(function(v){u(v.type,_r(v),v.target,s(v,e.lockRef.current))},[]);R(function(){return wt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,_t),document.addEventListener("touchmove",l,_t),document.addEventListener("touchstart",h,_t),function(){wt=wt.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,_t),document.removeEventListener("touchmove",l,_t),document.removeEventListener("touchstart",h,_t)}},[]);var m=e.removeScrollBar,b=e.inert;return D(W,null,b?D(i,{styles:sh(o)}):null,m?D(Qf,{gapMode:"margin"}):null)}const uh=Vf(ta,ch);var ua=re(function(e,t){return D(gr,Ce({},e,{ref:t,sideCar:uh}))});ua.classNames=gr.classNames;const dh=ua;var fh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xt=new WeakMap,wr=new WeakMap,xr={},Cn=0,da=function(e){return e&&(e.host||da(e.parentNode))},hh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=da(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},ph=function(e,t,r,n){var o=hh(t,Array.isArray(e)?e:[e]);xr[r]||(xr[r]=new WeakMap);var i=xr[r],a=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var h=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(s.has(p))h(p);else{var m=p.getAttribute(n),b=m!==null&&m!=="false",v=(xt.get(p)||0)+1,_=(i.get(p)||0)+1;xt.set(p,v),i.set(p,_),a.push(p),v===1&&b&&wr.set(p,!0),_===1&&p.setAttribute(r,"true"),b||p.setAttribute(n,"true")}})};return h(t),s.clear(),Cn++,function(){a.forEach(function(c){var p=xt.get(c)-1,m=i.get(c)-1;xt.set(c,p),i.set(c,m),p||(wr.has(c)||c.removeAttribute(n),wr.delete(c)),m||c.removeAttribute(r)}),Cn--,Cn||(xt=new WeakMap,xt=new WeakMap,wr=new WeakMap,xr={})}},vh=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||fh(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),ph(n,o,r,"aria-hidden")):function(){return null}};const fa="Dialog",[ha,gm]=nf(fa),[mh,kt]=ha(fa),bh=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=L(null),l=L(null),[u=!1,h]=lf({prop:n,defaultProp:o,onChange:i});return D(mh,{scope:t,triggerRef:s,contentRef:l,contentId:pn(),titleId:pn(),descriptionId:pn(),open:u,onOpenChange:h,onOpenToggle:me(()=>h(c=>!c),[h]),modal:a},r)},gh="DialogPortal",[ym,pa]=ha(gh,{forceMount:void 0}),En="DialogOverlay",yh=re((e,t)=>{const r=pa(En,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=kt(En,e.__scopeDialog);return i.modal?D(wn,{present:n||i.open},D(_h,de({},o,{ref:t}))):null}),_h=re((e,t)=>{const{__scopeDialog:r,...n}=e,o=kt(En,r);return D(dh,{as:vn,allowPinchZoom:!0,shards:[o.contentRef]},D(bn.div,de({"data-state":ma(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Vt="DialogContent",wh=re((e,t)=>{const r=pa(Vt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=kt(Vt,e.__scopeDialog);return D(wn,{present:n||i.open},i.modal?D(xh,de({},o,{ref:t})):D(kh,de({},o,{ref:t})))}),xh=re((e,t)=>{const r=kt(Vt,e.__scopeDialog),n=L(null),o=Rt(t,r.contentRef,n);return R(()=>{const i=n.current;if(i)return vh(i)},[]),D(va,de({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:yt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:yt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:yt(e.onFocusOutside,i=>i.preventDefault())}))}),kh=re((e,t)=>{const r=kt(Vt,e.__scopeDialog),n=L(!1),o=L(!1);return D(va,de({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),va=re((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=kt(Vt,r),l=L(null),u=Rt(t,l);return Af(),D(W,null,D(wf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},D(gf,de({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ma(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function ma(e){return e?"open":"closed"}const $h=bh,Sh=yh,Ch=wh;function ba(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ba(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function it(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ba(e))&&(n&&(n+=" "),n+=t);return n}const ga=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,ya=it,kr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ya(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const h=r==null?void 0:r[u],c=i==null?void 0:i[u];if(h===null)return null;const p=ga(h)||ga(c);return o[u][p]}),s=r&&Object.entries(r).reduce((u,h)=>{let[c,p]=h;return p===void 0||(u[c]=p),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,h)=>{let{class:c,className:p,...m}=h;return Object.entries(m).every(b=>{let[v,_]=b;return Array.isArray(_)?_.includes({...i,...s}[v]):{...i,...s}[v]===_})?[...u,c,p]:u},[]);return ya(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},he=Symbol.for("@ts-pattern/matcher"),_a=Symbol.for("@ts-pattern/isVariadic"),$r="@ts-pattern/anonymous-select-key",On=e=>!!(e&&typeof e=="object"),Sr=e=>e&&!!e[he],ne=(e,t,r)=>{if(Sr(e)){const n=e[he](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(On(e)){if(!On(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const a of e.keys()){const s=e[a];Sr(s)&&s[_a]?i.push(s):i.length?o.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(t.length<n.length+o.length)return!1;const a=t.slice(0,n.length),s=o.length===0?[]:t.slice(-o.length),l=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,h)=>ne(u,a[h],r))&&o.every((u,h)=>ne(u,s[h],r))&&(i.length===0||ne(i[0],l,r))}return e.length===t.length&&e.every((a,s)=>ne(a,t[s],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||Sr(i=o)&&i[he]().matcherType==="optional")&&ne(o,t[n],r);var i})}return Object.is(t,e)},be=e=>{var t,r,n;return On(e)?Sr(e)?(t=(r=(n=e[he]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Bt(e,be):Bt(Object.values(e),be):[]},Bt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Eh(...e){if(e.length===1){const[t]=e;return r=>ne(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ne(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function le(e){return Object.assign(e,{optional:()=>An(e),and:t=>K(e,t),or:t=>wa(e,t),select:t=>t===void 0?zt(e):zt(t,e)})}function Pn(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[_a]:!0})}}))(e),{optional:()=>Pn(An(e)),select:t=>Pn(t===void 0?zt(e):zt(t,e))})}function An(e){return le({[he]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(be(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:ne(e,t,n),selections:r}},getSelectionKeys:()=>be(e),matcherType:"optional"})})}const Oh=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Ph=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function K(...e){return le({[he]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>ne(o,t,n)),selections:r}},getSelectionKeys:()=>Bt(e,be),matcherType:"and"})})}function wa(...e){return le({[he]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Bt(e,be).forEach(o=>n(o,void 0)),{matched:e.some(o=>ne(o,t,n)),selections:r}},getSelectionKeys:()=>Bt(e,be),matcherType:"or"})})}function j(e){return{[he]:()=>({match:t=>({matched:!!e(t)})})}}function zt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return le({[he]:()=>({match:n=>{let o={[t??$r]:n};return{matched:r===void 0||ne(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[t??$r].concat(r===void 0?[]:be(r))})})}function Ee(e){return typeof e=="number"}function ot(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}const xa=le(j(function(e){return!0})),Ah=xa,at=e=>Object.assign(le(e),{startsWith:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.endsWith(r)))));var r},minLength:t=>at(K(e,(r=>j(n=>ot(n)&&n.length>=r))(t))),maxLength:t=>at(K(e,(r=>j(n=>ot(n)&&n.length<=r))(t))),includes:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.includes(r)))));var r},regex:t=>{return at(K(e,(r=t,j(n=>ot(n)&&!!n.match(r)))));var r}}),Ih=at(j(ot)),Oe=e=>Object.assign(le(e),{between:(t,r)=>Oe(K(e,((n,o)=>j(i=>Ee(i)&&n<=i&&o>=i))(t,r))),lt:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n<r))(t))),gt:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n>r))(t))),lte:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n<=r))(t))),gte:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n>=r))(t))),int:()=>Oe(K(e,j(t=>Ee(t)&&Number.isInteger(t)))),finite:()=>Oe(K(e,j(t=>Ee(t)&&Number.isFinite(t)))),positive:()=>Oe(K(e,j(t=>Ee(t)&&t>0))),negative:()=>Oe(K(e,j(t=>Ee(t)&&t<0)))}),Th=Oe(j(Ee)),Ke=e=>Object.assign(le(e),{between:(t,r)=>Ke(K(e,((n,o)=>j(i=>qe(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ke(K(e,(r=>j(n=>qe(n)&&n<r))(t))),gt:t=>Ke(K(e,(r=>j(n=>qe(n)&&n>r))(t))),lte:t=>Ke(K(e,(r=>j(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(K(e,(r=>j(n=>qe(n)&&n>=r))(t))),positive:()=>Ke(K(e,j(t=>qe(t)&&t>0))),negative:()=>Ke(K(e,j(t=>qe(t)&&t<0)))}),Dh=Ke(j(qe)),Nh=le(j(function(e){return typeof e=="boolean"})),Mh=le(j(function(e){return typeof e=="symbol"})),Fh=le(j(function(e){return e==null}));var ie={__proto__:null,matcher:he,optional:An,array:function(...e){return Pn({[he]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return be(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:t.every(i=>ne(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:be(e[0])})})},set:function(...e){return le({[he]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=e[0];return{matched:Oh(t,i=>ne(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:be(e[0])})})},map:function(...e){return le({[he]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,a]=e;return{matched:Ph(t,(s,l)=>{const u=ne(i,l,n),h=ne(a,s,n);return u&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...be(e[0]),...be(e[1])]})})},intersection:K,union:wa,not:function(e){return le({[he]:()=>({match:t=>({matched:!ne(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:j,select:zt,any:xa,_:Ah,string:Ih,number:Th,bigint:Dh,boolean:Nh,symbol:Mh,nullish:Fh,instanceOf:function(e){return le(j(function(t){return r=>r instanceof t}(e)))},shape:function(e){return le(j(Eh(e)))}};const In={matched:!1,value:void 0};function Le(e){return new Cr(e,In)}class Cr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,a={};const s=(u,h)=>{i=!0,a[u]=h},l=!n.some(u=>ne(u,this.input,s))||o&&!o(this.input)?In:{matched:!0,value:r(i?$r in a?a[$r]:a:this.input,this.input)};return new Cr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Cr(this.input,n?{matched:!0,value:r(this.input,this.input)}:In)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}}const _m="";function ke(e,t){if(!e)throw new Error(t)}function Er(){throw new Error("Cycle detected")}var Lh=Symbol.for("preact-signals");function Tn(){if($t>1)$t--;else{for(var e,t=!1;Ut!==void 0;){var r=Ut;for(Ut=void 0,Dn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&$a(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(Dn=0,$t--,t)throw e}}var Y=void 0,Ut=void 0,$t=0,Dn=0,Or=0;function ka(e){if(Y!==void 0){var t=e.n;if(t===void 0||t.t!==Y)return t={i:0,S:e,p:Y.s,n:void 0,t:Y,e:void 0,x:void 0,r:t},Y.s!==void 0&&(Y.s.n=t),Y.s=t,e.n=t,32&Y.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Y.s,t.n=void 0,Y.s.n=t,Y.s=t),t}}function oe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}oe.prototype.brand=Lh,oe.prototype.h=function(){return!0},oe.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},oe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},oe.prototype.subscribe=function(e){var t=this;return Mn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},oe.prototype.valueOf=function(){return this.value},oe.prototype.toString=function(){return this.value+""},oe.prototype.toJSON=function(){return this.value},oe.prototype.peek=function(){return this.v},Object.defineProperty(oe.prototype,"value",{get:function(){var e=ka(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(Y instanceof Ge&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Dn>100&&Er(),this.v=e,this.i++,Or++,$t++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Tn()}}}});function We(e){return new oe(e)}function $a(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Sa(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ca(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Ge(e){oe.call(this,void 0),this.x=e,this.s=void 0,this.g=Or-1,this.f=4}(Ge.prototype=new oe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Or))return!0;if(this.g=Or,this.f|=1,this.i>0&&!$a(this))return this.f&=-2,!0;var e=Y;try{Sa(this),Y=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Y=e,Ca(this),this.f&=-2,!0},Ge.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}oe.prototype.S.call(this,e)},Ge.prototype.U=function(e){if(this.t!==void 0&&(oe.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ge.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ge.prototype.peek=function(){if(this.h()||Er(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ge.prototype,"value",{get:function(){1&this.f&&Er();var e=ka(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function jh(e){return new Ge(e)}function Ea(e){var t=e.u;if(e.u=void 0,typeof t=="function"){$t++;var r=Y;Y=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Nn(e),n}finally{Y=r,Tn()}}}function Nn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ea(e)}function Rh(e){if(Y!==this)throw new Error("Out-of-order effect");Ca(this),Y=e,this.f&=-2,8&this.f&&Nn(this),Tn()}function Ht(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ht.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},Ht.prototype.S=function(){1&this.f&&Er(),this.f|=1,this.f&=-9,Ea(this),Sa(this),$t++;var e=Y;return Y=this,Rh.bind(this,e)},Ht.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ut,Ut=this)},Ht.prototype.d=function(){this.f|=8,1&this.f||Nn(this)};function Mn(e){var t=new Ht(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Fn;function St(e,t){S[e]=t.bind(null,S[e]||function(){})}function Pr(e){Fn&&Fn(),Fn=e&&e.S()}function Oa(e){var t=this,r=e.data,n=Bh(r);n.value=r;var o=fe(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Di(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},jh(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}Oa.displayName="_st",Object.defineProperties(oe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Oa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),St("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof oe&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),St("__r",function(e,t){Pr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Mn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Pr(r),e(t)}),St("__e",function(e,t,r,n){Pr(),e(t,r,n)}),St("diffed",function(e,t){Pr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else r.U=i={};for(var l in n){var u=i[l],h=n[l];u===void 0?(u=Vh(r,l,h,o),i[l]=u):u.o(h,o)}}}e(t)});function Vh(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=We(r);return{o:function(a,s){i.value=a,n=s},d:Mn(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}St("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),St("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ye.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Bh(e){return fe(function(){return We(e)},[])}const Ln=(e,t)=>t.some(r=>e instanceof r);let Pa,Aa;function zh(){return Pa||(Pa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Uh(){return Aa||(Aa=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const jn=new WeakMap,Rn=new WeakMap,Ar=new WeakMap;function Hh(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{r(st(e.result)),o()},a=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",a)});return Ar.set(t,e),t}function qh(e){if(jn.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{r(),o()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});jn.set(e,t)}let Vn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return jn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return st(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Ia(e){Vn=e(Vn)}function Kh(e){return Uh().includes(e)?function(...t){return e.apply(Bn(this),t),st(this.request)}:function(...t){return st(e.apply(Bn(this),t))}}function Wh(e){return typeof e=="function"?Kh(e):(e instanceof IDBTransaction&&qh(e),Ln(e,zh())?new Proxy(e,Vn):e)}function st(e){if(e instanceof IDBRequest)return Hh(e);if(Rn.has(e))return Rn.get(e);const t=Wh(e);return t!==e&&(Rn.set(e,t),Ar.set(t,e)),t}const Bn=e=>Ar.get(e);function Gh(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=st(a);return n&&a.addEventListener("upgradeneeded",l=>{n(st(a.result),l.oldVersion,l.newVersion,st(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Yh=["get","getKey","getAll","getAllKeys","count"],Zh=["put","add","delete","clear"],zn=new Map;function Ta(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(zn.get(t))return zn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=Zh.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||Yh.includes(r)))return;const i=async function(a,...s){const l=this.transaction(a,o?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),o&&l.done]))[0]};return zn.set(t,i),i}Ia(e=>({...e,get:(t,r,n)=>Ta(t,r)||e.get(t,r,n),has:(t,r)=>!!Ta(t,r)||e.has(t,r)}));const Xh=["continue","continuePrimaryKey","advance"],Da={},Un=new WeakMap,Na=new WeakMap,Qh={get(e,t){if(!Xh.includes(t))return e[t];let r=Da[t];return r||(r=Da[t]=function(...n){Un.set(this,Na.get(this)[t](...n))}),r}};async function*Jh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Qh);for(Na.set(r,t),Ar.set(r,Bn(t));t;)yield r,t=await(Un.get(r)||t.continue()),Un.delete(r)}function Ma(e,t){return t===Symbol.asyncIterator&&Ln(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Ln(e,[IDBIndex,IDBObjectStore])}Ia(e=>({...e,get(t,r,n){return Ma(t,r)?Jh:e.get(t,r,n)},has(t,r){return Ma(t,r)||e.has(t,r)}}));const qt=e=>Le(e).with(ie.number.lte(1e3),()=>`${Math.round(e)}KB`).with(ie.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Fa=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},ep=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),Ir=e=>t=>t?t.type===e:!1;class Kt extends Error{constructor(){super("Aborted")}}function tp(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const La=e=>typeof e=="string",rp=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),ja=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:rp()}),np=e=>Le(e).with({nativeEvent:{submitter:ie.select(ie.union(ie.instanceOf(HTMLButtonElement),ie.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Ra=typeof window>"u"?void 0:Gh("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Wt={getStateData:async(e,t)=>{var n;const r=Va({...e,flowKeys:t});return(n=await Ra)==null?void 0:n.get("state",r)},setStateData:tp(async e=>{var r;const t=Va(e);return(r=await Ra)==null?void 0:r.put("state",e.data,t)},1e3)},Tr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(u=>u.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,a=e.find(u=>u.id===i),s=t.type.includes("question")?1:0;if(a){const u=s+Math.max(Tr(e,o,r,n+s).remainingSteps,Tr(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=s+Tr(e,o,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},ip=e=>{const t={},r=e.find(n=>n.isHead);return r&&Tr(e,r,(n,o)=>{t[n]=o}),t},Va=e=>[...e.flowKeys,e.id,e.version].join("/"),Ye=We({state:"idle"}),Gt=e=>{const{state:t,flow:r}=Ye.value;if(t!=="loaded")return;ke(r,"No flow to update");const n=e(r.data);r.data=n,Ye.value={state:t,flow:r},Wt.setStateData(r)},T={current$:Ye,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:o,job:i})=>{const s={data:await Wt.getStateData(e,r)??ja(),startedAt:new Date,nodeIdToProgress:ip(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:o,job:i};Ye.value={state:"loaded",flow:s},Wt.setStateData(s)},cancelCurrentFlow:()=>{Ye.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>Gt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Gt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Ye.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=ja();Ye.value={state:e,flow:{...t,data:r,startedAt:new Date}},Wt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Gt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ye.value;ke(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Wt.setStateData(r)},setSubmission:(e,t)=>Gt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Gt(t=>({...t,currentInput:e??null}))};var op=0;function d(e,t,r,n,o,i){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var u={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--op,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(u),u}const ap=({message:e})=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("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:[d("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"}),d("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"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:[d("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&d("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Ba=e=>d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:"Loading"}),d("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)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("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"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("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"})})})]}),za=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(Ba,{class:"text-neutral-6 h-8 w-8"})}),sp=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Dr=({class:e,children:t,...r})=>d("button",{class:it("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),lp=()=>{if(T.current$.value.state!=="loaded")return null;const e=T.current$.value.flow.nodeIdToProgress,t=T.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:sp(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},cp=({children:e})=>{const t=T.viewState$;return d(W,{children:d("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:[d("div",{class:"flex h-[var(--header-height)] gap-2",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?d(W,{children:[d(Dr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:d("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),d(Dr,{"aria-label":"Close application",onClick:T.cancelCurrentFlow,children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):d(W,{children:[T.current$.value.state==="loaded"&&d(Dr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[d("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"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(Dr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),d(lp,{})]})})},up=un(()=>Promise.resolve().then(()=>sm).then(e=>e.ChatbotBody)),dp=kr("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),fp=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=T.current$.value,a=T.viewState$.value,s=n!=="idle"&&a==="maximised",l=L(null);return d($h,{open:s,modal:s,children:[d(Sh,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),d(Ch,{forceMount:!0,asChild:!0,children:d("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:dp({view:a}),children:d("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[d(cp,{children:o==null?void 0:o.title}),Le({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>d(za,{},"loading")).with({state:"loaded"},()=>d(mt,{fallback:d(za,{},"loading"),children:d(up,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>d(ap,{message:i})).exhaustive()]})})})]})},Ua=Ne({id:Zi(Se(),String),version:nn(),build:nn(),nodes:kd(xd()),context_schema:Sd($d(to(Se(),Ne({required:Ji(),type:Pd([eo("string"),eo("number")])}))))}),hp=Ne({flow:Ua}),pp=Ne({company:Ne({name:Se()}),flow:Ua,job:Ne({id:Zi(Se(),String),title:Se()})}),vp=`#isdk{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){#isdk{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}#isdk{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :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: }#isdk ::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: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .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}#isdk .pointer-events-none{pointer-events:none}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;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))}#isdk .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)}}#isdk .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}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%);height:var(--header-height)}to{transform:translateY(0);height:var(--content-height)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.16,1,.3,1)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-neutral-3{background-color:var(--i-color-n-3)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .bg-none{background-image:none}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-2{padding-top:.5rem}#isdk .pt-2\\.5{padding-top:.625rem}#isdk .pt-3{padding-top:.75rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-right{text-align:right}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .font-medium{font-weight:500}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .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)}#isdk .leading-3{line-height:.75rem}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline-none{outline:2px solid transparent;outline-offset:2px}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .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}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .will-change-\\[height\\]{will-change:height}#isdk .text-wrap-balance{text-wrap:balance}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .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)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .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}#isdk .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}#isdk .\\[text-wrap\\:pretty\\]{text-wrap:pretty}#isdk .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}#isdk .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}#isdk .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}#isdk .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}#isdk .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)}#isdk .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)}#isdk .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#isdk .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}#isdk .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}#isdk .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#isdk .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)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#isdk .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}#isdk .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}#isdk .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}#isdk .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}#isdk .active\\:text-accent-10:active{color:var(--i-color-a-10)}#isdk .active\\:text-accent-11:active{color:var(--i-color-a-11)}#isdk .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}#isdk .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}#isdk .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)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}#isdk .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}#isdk .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)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}@media (pointer: coarse){#isdk .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}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}
|
|
42
|
-
`,
|
|
41
|
+
`)},dp=0,kt=[];function fp(e){var t=F([]),r=F([0,0]),n=F(),o=W(dp++)[0],i=W(function(){return ia()})[0],a=F(e);j(function(){a.current=e},[e]),j(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Nf([e.lockRef.current],(e.shards||[]).map(ua),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me(function(v,_){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=wr(v),w=r.current,O="deltaX"in v?v.deltaX:w[0]-x[0],A="deltaY"in v?v.deltaY:w[1]-x[1],P,U=v.target,K=Math.abs(O)>Math.abs(A)?"h":"v";if("touches"in v&&K==="h"&&U.type==="range")return!1;var N=aa(K,U);if(!N)return!0;if(N?P=K:(P=K==="v"?"h":"v",N=aa(K,U)),!N)return!1;if(!n.current&&"changedTouches"in v&&(O||A)&&(n.current=P),!P)return!0;var M=n.current||P;return lp(M,_,v,M==="h"?O:A,!0)},[]),l=me(function(v){var _=v;if(!(!kt.length||kt[kt.length-1]!==i)){var x="deltaY"in _?ca(_):wr(_),w=t.current.filter(function(P){return P.name===_.type&&P.target===_.target&&cp(P.delta,x)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var O=(a.current.shards||[]).map(ua).filter(Boolean).filter(function(P){return P.contains(_.target)}),A=O.length>0?s(_,O[0]):!a.current.noIsolation;A&&_.cancelable&&_.preventDefault()}}},[]),d=me(function(v,_,x,w){var O={name:v,delta:_,target:x,should:w};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(A){return A!==O})},1)},[]),f=me(function(v){r.current=wr(v),n.current=void 0},[]),c=me(function(v){d(v.type,ca(v),v.target,s(v,e.lockRef.current))},[]),h=me(function(v){d(v.type,wr(v),v.target,s(v,e.lockRef.current))},[]);j(function(){return kt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,xt),document.addEventListener("touchmove",l,xt),document.addEventListener("touchstart",f,xt),function(){kt=kt.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,xt),document.removeEventListener("touchmove",l,xt),document.removeEventListener("touchstart",f,xt)}},[]);var m=e.removeScrollBar,g=e.inert;return D(Y,null,g?D(i,{styles:up(o)}):null,m?D(tp,{gapMode:"margin"}):null)}const pp=Uf(ra,fp);var da=ne(function(e,t){return D(yr,Ee({},e,{ref:t,sideCar:pp}))});da.classNames=yr.classNames;const hp=da;var vp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,xr=new WeakMap,kr={},En=0,fa=function(e){return e&&(e.host||fa(e.parentNode))},mp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=fa(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},gp=function(e,t,r,n){var o=mp(t,Array.isArray(e)?e:[e]);kr[r]||(kr[r]=new WeakMap);var i=kr[r],a=[],s=new Set,l=new Set(o),d=function(c){!c||s.has(c)||(s.add(c),d(c.parentNode))};o.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(s.has(h))f(h);else{var m=h.getAttribute(n),g=m!==null&&m!=="false",v=($t.get(h)||0)+1,_=(i.get(h)||0)+1;$t.set(h,v),i.set(h,_),a.push(h),v===1&&g&&xr.set(h,!0),_===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}})};return f(t),s.clear(),En++,function(){a.forEach(function(c){var h=$t.get(c)-1,m=i.get(c)-1;$t.set(c,h),i.set(c,m),h||(xr.has(c)||c.removeAttribute(n),xr.delete(c)),m||c.removeAttribute(r)}),En--,En||($t=new WeakMap,$t=new WeakMap,xr=new WeakMap,kr={})}},bp=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||vp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),gp(n,o,r,"aria-hidden")):function(){return null}};const pa="Dialog",[ha,Nm]=sf(pa),[yp,St]=ha(pa),_p=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=F(null),l=F(null),[d=!1,f]=df({prop:n,defaultProp:o,onChange:i});return D(yp,{scope:t,triggerRef:s,contentRef:l,contentId:vn(),titleId:vn(),descriptionId:vn(),open:d,onOpenChange:f,onOpenToggle:me(()=>f(c=>!c),[f]),modal:a},r)},wp="DialogPortal",[Mm,va]=ha(wp,{forceMount:void 0}),On="DialogOverlay",xp=ne((e,t)=>{const r=va(On,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=St(On,e.__scopeDialog);return i.modal?D(xn,{present:n||i.open},D(kp,de({},o,{ref:t}))):null}),kp=ne((e,t)=>{const{__scopeDialog:r,...n}=e,o=St(On,r);return D(hp,{as:mn,allowPinchZoom:!0,shards:[o.contentRef]},D(bn.div,de({"data-state":ga(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Vt="DialogContent",$p=ne((e,t)=>{const r=va(Vt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=St(Vt,e.__scopeDialog);return D(xn,{present:n||i.open},i.modal?D(Sp,de({},o,{ref:t})):D(Cp,de({},o,{ref:t})))}),Sp=ne((e,t)=>{const r=St(Vt,e.__scopeDialog),n=F(null),o=jt(t,r.contentRef,n);return j(()=>{const i=n.current;if(i)return bp(i)},[]),D(ma,de({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:wt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:wt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:wt(e.onFocusOutside,i=>i.preventDefault())}))}),Cp=ne((e,t)=>{const r=St(Vt,e.__scopeDialog),n=F(!1),o=F(!1);return D(ma,de({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),ma=ne((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=St(Vt,r),l=F(null),d=jt(t,l);return Df(),D(Y,null,D($f,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},D(wf,de({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ga(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function ga(e){return e?"open":"closed"}const Ep=_p,Op=xp,Pp=$p;function ba(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ba(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function it(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ba(e))&&(n&&(n+=" "),n+=t);return n}const ya=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,_a=it,$r=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return _a(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],c=i==null?void 0:i[d];if(f===null)return null;const h=ya(f)||ya(c);return o[d][h]}),s=r&&Object.entries(r).reduce((d,f)=>{let[c,h]=f;return h===void 0||(d[c]=h),d},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:c,className:h,...m}=f;return Object.entries(m).every(g=>{let[v,_]=g;return Array.isArray(_)?_.includes({...i,...s}[v]):{...i,...s}[v]===_})?[...d,c,h]:d},[]);return _a(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},he=Symbol.for("@ts-pattern/matcher"),wa=Symbol.for("@ts-pattern/isVariadic"),Sr="@ts-pattern/anonymous-select-key",Pn=e=>!!(e&&typeof e=="object"),Cr=e=>e&&!!e[he],ie=(e,t,r)=>{if(Cr(e)){const n=e[he](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(Pn(e)){if(!Pn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const a of e.keys()){const s=e[a];Cr(s)&&s[wa]?i.push(s):i.length?o.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(t.length<n.length+o.length)return!1;const a=t.slice(0,n.length),s=o.length===0?[]:t.slice(-o.length),l=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((d,f)=>ie(d,a[f],r))&&o.every((d,f)=>ie(d,s[f],r))&&(i.length===0||ie(i[0],l,r))}return e.length===t.length&&e.every((a,s)=>ie(a,t[s],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||Cr(i=o)&&i[he]().matcherType==="optional")&&ie(o,t[n],r);var i})}return Object.is(t,e)},ge=e=>{var t,r,n;return Pn(e)?Cr(e)?(t=(r=(n=e[he]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Bt(e,ge):Bt(Object.values(e),ge):[]},Bt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Ap(...e){if(e.length===1){const[t]=e;return r=>ie(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ie(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function le(e){return Object.assign(e,{optional:()=>Tn(e),and:t=>G(e,t),or:t=>xa(e,t),select:t=>t===void 0?zt(e):zt(t,e)})}function An(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[wa]:!0})}}))(e),{optional:()=>An(Tn(e)),select:t=>An(t===void 0?zt(e):zt(t,e))})}function Tn(e){return le({[he]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(ge(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:ie(e,t,n),selections:r}},getSelectionKeys:()=>ge(e),matcherType:"optional"})})}const Tp=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Ip=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function G(...e){return le({[he]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>ie(o,t,n)),selections:r}},getSelectionKeys:()=>Bt(e,ge),matcherType:"and"})})}function xa(...e){return le({[he]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Bt(e,ge).forEach(o=>n(o,void 0)),{matched:e.some(o=>ie(o,t,n)),selections:r}},getSelectionKeys:()=>Bt(e,ge),matcherType:"or"})})}function R(e){return{[he]:()=>({match:t=>({matched:!!e(t)})})}}function zt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return le({[he]:()=>({match:n=>{let o={[t??Sr]:n};return{matched:r===void 0||ie(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[t??Sr].concat(r===void 0?[]:ge(r))})})}function Oe(e){return typeof e=="number"}function ot(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}const ka=le(R(function(e){return!0})),Dp=ka,at=e=>Object.assign(le(e),{startsWith:t=>{return at(G(e,(r=t,R(n=>ot(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(G(e,(r=t,R(n=>ot(n)&&n.endsWith(r)))));var r},minLength:t=>at(G(e,(r=>R(n=>ot(n)&&n.length>=r))(t))),maxLength:t=>at(G(e,(r=>R(n=>ot(n)&&n.length<=r))(t))),includes:t=>{return at(G(e,(r=t,R(n=>ot(n)&&n.includes(r)))));var r},regex:t=>{return at(G(e,(r=t,R(n=>ot(n)&&!!n.match(r)))));var r}}),Np=at(R(ot)),Pe=e=>Object.assign(le(e),{between:(t,r)=>Pe(G(e,((n,o)=>R(i=>Oe(i)&&n<=i&&o>=i))(t,r))),lt:t=>Pe(G(e,(r=>R(n=>Oe(n)&&n<r))(t))),gt:t=>Pe(G(e,(r=>R(n=>Oe(n)&&n>r))(t))),lte:t=>Pe(G(e,(r=>R(n=>Oe(n)&&n<=r))(t))),gte:t=>Pe(G(e,(r=>R(n=>Oe(n)&&n>=r))(t))),int:()=>Pe(G(e,R(t=>Oe(t)&&Number.isInteger(t)))),finite:()=>Pe(G(e,R(t=>Oe(t)&&Number.isFinite(t)))),positive:()=>Pe(G(e,R(t=>Oe(t)&&t>0))),negative:()=>Pe(G(e,R(t=>Oe(t)&&t<0)))}),Mp=Pe(R(Oe)),Ke=e=>Object.assign(le(e),{between:(t,r)=>Ke(G(e,((n,o)=>R(i=>qe(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ke(G(e,(r=>R(n=>qe(n)&&n<r))(t))),gt:t=>Ke(G(e,(r=>R(n=>qe(n)&&n>r))(t))),lte:t=>Ke(G(e,(r=>R(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(G(e,(r=>R(n=>qe(n)&&n>=r))(t))),positive:()=>Ke(G(e,R(t=>qe(t)&&t>0))),negative:()=>Ke(G(e,R(t=>qe(t)&&t<0)))}),Fp=Ke(R(qe)),Lp=le(R(function(e){return typeof e=="boolean"})),Rp=le(R(function(e){return typeof e=="symbol"})),jp=le(R(function(e){return e==null}));var q={__proto__:null,matcher:he,optional:Tn,array:function(...e){return An({[he]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return ge(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:t.every(i=>ie(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},set:function(...e){return le({[he]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=e[0];return{matched:Tp(t,i=>ie(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ge(e[0])})})},map:function(...e){return le({[he]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,a]=e;return{matched:Ip(t,(s,l)=>{const d=ie(i,l,n),f=ie(a,s,n);return d&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ge(e[0]),...ge(e[1])]})})},intersection:G,union:xa,not:function(e){return le({[he]:()=>({match:t=>({matched:!ie(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:R,select:zt,any:ka,_:Dp,string:Np,number:Mp,bigint:Fp,boolean:Lp,symbol:Rp,nullish:jp,instanceOf:function(e){return le(R(function(t){return r=>r instanceof t}(e)))},shape:function(e){return le(R(Ap(e)))}};const In={matched:!1,value:void 0};function Re(e){return new Er(e,In)}class Er{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,a={};const s=(d,f)=>{i=!0,a[d]=f},l=!n.some(d=>ie(d,this.input,s))||o&&!o(this.input)?In:{matched:!0,value:r(i?Sr in a?a[Sr]:a:this.input,this.input)};return new Er(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Er(this.input,n?{matched:!0,value:r(this.input,this.input)}:In)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}}const Fm="";function ke(e,t){if(!e)throw new Error(t)}function Or(){throw new Error("Cycle detected")}var Vp=Symbol.for("preact-signals");function Dn(){if(Ct>1)Ct--;else{for(var e,t=!1;Ut!==void 0;){var r=Ut;for(Ut=void 0,Nn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Sa(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(Nn=0,Ct--,t)throw e}}var X=void 0,Ut=void 0,Ct=0,Nn=0,Pr=0;function $a(e){if(X!==void 0){var t=e.n;if(t===void 0||t.t!==X)return t={i:0,S:e,p:X.s,n:void 0,t:X,e:void 0,x:void 0,r:t},X.s!==void 0&&(X.s.n=t),X.s=t,e.n=t,32&X.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=X.s,t.n=void 0,X.s.n=t,X.s=t),t}}function oe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}oe.prototype.brand=Vp,oe.prototype.h=function(){return!0},oe.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},oe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},oe.prototype.subscribe=function(e){var t=this;return Fn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},oe.prototype.valueOf=function(){return this.value},oe.prototype.toString=function(){return this.value+""},oe.prototype.toJSON=function(){return this.value},oe.prototype.peek=function(){return this.v},Object.defineProperty(oe.prototype,"value",{get:function(){var e=$a(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(X instanceof Ge&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Nn>100&&Or(),this.v=e,this.i++,Pr++,Ct++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Dn()}}}});function We(e){return new oe(e)}function Sa(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ca(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ea(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Ge(e){oe.call(this,void 0),this.x=e,this.s=void 0,this.g=Pr-1,this.f=4}(Ge.prototype=new oe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Pr))return!0;if(this.g=Pr,this.f|=1,this.i>0&&!Sa(this))return this.f&=-2,!0;var e=X;try{Ca(this),X=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return X=e,Ea(this),this.f&=-2,!0},Ge.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}oe.prototype.S.call(this,e)},Ge.prototype.U=function(e){if(this.t!==void 0&&(oe.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ge.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ge.prototype.peek=function(){if(this.h()||Or(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ge.prototype,"value",{get:function(){1&this.f&&Or();var e=$a(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Bp(e){return new Ge(e)}function Oa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ct++;var r=X;X=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Mn(e),n}finally{X=r,Dn()}}}function Mn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Oa(e)}function zp(e){if(X!==this)throw new Error("Out-of-order effect");Ea(this),X=e,this.f&=-2,8&this.f&&Mn(this),Dn()}function Ht(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ht.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},Ht.prototype.S=function(){1&this.f&&Or(),this.f|=1,this.f&=-9,Oa(this),Ca(this),Ct++;var e=X;return X=this,zp.bind(this,e)},Ht.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ut,Ut=this)},Ht.prototype.d=function(){this.f|=8,1&this.f||Mn(this)};function Fn(e){var t=new Ht(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Ln;function Et(e,t){S[e]=t.bind(null,S[e]||function(){})}function Ar(e){Ln&&Ln(),Ln=e&&e.S()}function Pa(e){var t=this,r=e.data,n=Hp(r);n.value=r;var o=pe(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Ni(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},Bp(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}Pa.displayName="_st",Object.defineProperties(oe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Pa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Et("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof oe&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),Et("__r",function(e,t){Ar();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Fn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Ar(r),e(t)}),Et("__e",function(e,t,r,n){Ar(),e(t,r,n)}),Et("diffed",function(e,t){Ar();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else r.U=i={};for(var l in n){var d=i[l],f=n[l];d===void 0?(d=Up(r,l,f,o),i[l]=d):d.o(f,o)}}}e(t)});function Up(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=We(r);return{o:function(a,s){i.value=a,n=s},d:Fn(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}Et("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),Et("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ye.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Hp(e){return pe(function(){return We(e)},[])}const Rn=(e,t)=>t.some(r=>e instanceof r);let Aa,Ta;function qp(){return Aa||(Aa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Kp(){return Ta||(Ta=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const jn=new WeakMap,Vn=new WeakMap,Tr=new WeakMap;function Wp(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{r(st(e.result)),o()},a=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",a)});return Tr.set(t,e),t}function Gp(e){if(jn.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{r(),o()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});jn.set(e,t)}let Bn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return jn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return st(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Ia(e){Bn=e(Bn)}function Yp(e){return Kp().includes(e)?function(...t){return e.apply(zn(this),t),st(this.request)}:function(...t){return st(e.apply(zn(this),t))}}function Zp(e){return typeof e=="function"?Yp(e):(e instanceof IDBTransaction&&Gp(e),Rn(e,qp())?new Proxy(e,Bn):e)}function st(e){if(e instanceof IDBRequest)return Wp(e);if(Vn.has(e))return Vn.get(e);const t=Zp(e);return t!==e&&(Vn.set(e,t),Tr.set(t,e)),t}const zn=e=>Tr.get(e);function Xp(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=st(a);return n&&a.addEventListener("upgradeneeded",l=>{n(st(a.result),l.oldVersion,l.newVersion,st(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",d=>o(d.oldVersion,d.newVersion,d))}).catch(()=>{}),s}const Qp=["get","getKey","getAll","getAllKeys","count"],Jp=["put","add","delete","clear"],Un=new Map;function Da(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Un.get(t))return Un.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=Jp.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||Qp.includes(r)))return;const i=async function(a,...s){const l=this.transaction(a,o?"readwrite":"readonly");let d=l.store;return n&&(d=d.index(s.shift())),(await Promise.all([d[r](...s),o&&l.done]))[0]};return Un.set(t,i),i}Ia(e=>({...e,get:(t,r,n)=>Da(t,r)||e.get(t,r,n),has:(t,r)=>!!Da(t,r)||e.has(t,r)}));const eh=["continue","continuePrimaryKey","advance"],Na={},Hn=new WeakMap,Ma=new WeakMap,th={get(e,t){if(!eh.includes(t))return e[t];let r=Na[t];return r||(r=Na[t]=function(...n){Hn.set(this,Ma.get(this)[t](...n))}),r}};async function*rh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,th);for(Ma.set(r,t),Tr.set(r,zn(t));t;)yield r,t=await(Hn.get(r)||t.continue()),Hn.delete(r)}function Fa(e,t){return t===Symbol.asyncIterator&&Rn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Rn(e,[IDBIndex,IDBObjectStore])}Ia(e=>({...e,get(t,r,n){return Fa(t,r)?rh:e.get(t,r,n)},has(t,r){return Fa(t,r)||e.has(t,r)}}));const qt=e=>Re(e).with(q.number.lte(1e3),()=>`${Math.round(e)}KB`).with(q.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),La=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},nh=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),Kt=e=>t=>t?t.type===e:!1;class Wt extends Error{constructor(){super("Aborted")}}function ih(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const Ra=e=>typeof e=="string",oh=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),ja=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:oh()}),ah=e=>Re(e).with({nativeEvent:{submitter:q.select(q.union(q.instanceOf(HTMLButtonElement),q.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Va=typeof window>"u"?void 0:Xp("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Gt={getStateData:async(e,t)=>{var n;const r=Ba({...e,flowKeys:t});return(n=await Va)==null?void 0:n.get("state",r)},setStateData:ih(async e=>{var r;const t=Ba(e);return(r=await Va)==null?void 0:r.put("state",e.data,t)},1e3)},Ir=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(d=>d.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,a=e.find(d=>d.id===i),s=t.type.includes("question")?1:0;if(a){const d=s+Math.max(Ir(e,o,r,n+s).remainingSteps,Ir(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:d}),{stepsMade:n,remainingSteps:d}}const l=s+Ir(e,o,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},sh=e=>{const t={},r=e.find(n=>n.isHead);return r&&Ir(e,r,(n,o)=>{t[n]=o}),t},Ba=e=>[...e.flowKeys,e.id,e.version].join("/"),Ye=We({state:"idle"}),Yt=e=>{const{state:t,flow:r}=Ye.value;if(t!=="loaded")return;ke(r,"No flow to update");const n=e(r.data);r.data=n,Ye.value={state:t,flow:r},Gt.setStateData(r)},I={current$:Ye,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:o,job:i})=>{const s={data:await Gt.getStateData(e,r)??ja(),startedAt:new Date,nodeIdToProgress:sh(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:o,job:i};Ye.value={state:"loaded",flow:s},Gt.setStateData(s)},cancelCurrentFlow:()=>{Ye.value={state:"idle"},I.viewState$.value="closed"},markAsFinished:()=>Yt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Yt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Ye.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=ja();Ye.value={state:e,flow:{...t,data:r,startedAt:new Date}},Gt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Yt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ye.value;ke(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Gt.setStateData(r)},setSubmission:(e,t)=>Yt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Yt(t=>({...t,currentInput:e??null}))};var lh=0;function u(e,t,r,n,o,i){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var d={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--lh,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(d),d}const ch=({message:e})=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:[u("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:[u("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"}),u("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"}),u("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),u("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),u("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),u("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),u("path",{d:"M38 56h19"})]}),u("div",{class:"flex flex-col gap-2 text-center",children:[u("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&u("p",{class:"text-neutral-9 text-sm",children:e})]})]}),za=e=>u("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[u("title",{children:"Loading"}),u("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)}}"}),u("g",{id:"s1",transform:"translate(12,0)",children:u("g",{id:"s2",transform:"scale(0,0)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s3",transform:"translate(12,12)",children:u("g",{id:"s4",transform:"scale(1,1)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s5",transform:"translate(12,0)",children:u("g",{id:"s6",transform:"scale(0,0)",children:u("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"})})}),u("g",{id:"s7",transform:"translate(12,0)",children:u("g",{id:"s8",transform:"scale(0,0)",children:u("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"})})})]}),Ua=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(za,{class:"text-neutral-6 h-8 w-8"})}),uh=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Dr=({class:e,children:t,...r})=>u("button",{class:it("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),dh=()=>{if(I.current$.value.state!=="loaded")return null;const e=I.current$.value.flow.nodeIdToProgress,t=I.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return u("div",{class:"bg-accent-3",children:u("div",{style:{width:uh(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},fh=({children:e})=>{const t=I.viewState$;return u(Y,{children:u("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:[u("div",{class:"flex h-[var(--header-height)] gap-2",children:[u("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),u("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:u("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),u("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?u(Y,{children:[u(Dr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:u("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),u(Dr,{"aria-label":"Close application",onClick:I.cancelCurrentFlow,children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):u(Y,{children:[I.current$.value.state==="loaded"&&u(Dr,{"aria-label":"Restart",onClick:()=>{I.restart()},children:[u("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"}),u("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),u(Dr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:u("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),u(dh,{})]})})},ph=dn(()=>Promise.resolve().then(()=>km).then(e=>e.ChatbotBody)),hh=$r("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),vh=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=I.current$.value,a=I.viewState$.value,s=n!=="idle"&&a==="maximised",l=F(null);return u(Ep,{open:s,modal:s,children:[u(Op,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),u(Pp,{forceMount:!0,asChild:!0,children:u("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:hh({view:a}),children:u("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[u(fh,{children:o==null?void 0:o.title}),Re({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>u(Ua,{},"loading")).with({state:"loaded"},()=>u(bt,{fallback:u(Ua,{},"loading"),children:u(ph,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>u(ch,{message:i})).exhaustive()]})})})]})},Ha=Se({id:Xi(Ce(),String),version:on(),build:on(),nodes:Cd(Sd()),context_schema:Od(Ed(ro(Ce(),Se({required:eo(),type:Id([to("string"),to("number")])}))))}),mh=Se({flow:Ha}),gh=Se({company:Se({name:Ce()}),flow:Ha,job:Se({id:Xi(Ce(),String),title:Ce()})}),bh=`#isdk{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){#isdk{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}#isdk{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk em{font-style:italic}#isdk strong{font-weight:700}#isdk *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :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: }#isdk ::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: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .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}#isdk .pointer-events-none{pointer-events:none}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-12{width:3rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;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))}#isdk .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)}}#isdk .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}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%);height:var(--header-height)}to{transform:translateY(0);height:var(--content-height)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.16,1,.3,1)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .text-ellipsis{text-overflow:ellipsis}#isdk .whitespace-nowrap{white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-neutral-3{background-color:var(--i-color-n-3)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .bg-none{background-image:none}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-2{padding-top:.5rem}#isdk .pt-2\\.5{padding-top:.625rem}#isdk .pt-3{padding-top:.75rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-right{text-align:right}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .font-medium{font-weight:500}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .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)}#isdk .leading-3{line-height:.75rem}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-10{color:var(--i-color-a-10)}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .opacity-0{opacity:0}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline-none{outline:2px solid transparent;outline-offset:2px}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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)}#isdk .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}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .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}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .will-change-\\[height\\]{will-change:height}#isdk .text-wrap-balance{text-wrap:balance}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .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)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .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}#isdk .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}#isdk .\\[text-wrap\\:pretty\\]{text-wrap:pretty}#isdk .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}#isdk .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}#isdk .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}#isdk .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}#isdk .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)}#isdk .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)}#isdk .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}#isdk .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}#isdk .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}#isdk .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#isdk .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}#isdk .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}#isdk .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#isdk .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)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#isdk .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}#isdk .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}#isdk .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}#isdk .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}#isdk .active\\:text-accent-10:active{color:var(--i-color-a-10)}#isdk .active\\:text-accent-11:active{color:var(--i-color-a-11)}#isdk .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}#isdk .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}#isdk .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)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}#isdk .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}#isdk .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)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}@media (pointer: coarse){#isdk .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}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}
|
|
42
|
+
`,qa="isdk",yh={not_in_local_storage:"Application not found in local storage",invalid_end_node:"Unexpected node type to finish flow",no_submissions:"Application ended without any fields submitted",invalid_state:"Invalid state"},_h=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(qa);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.id=qa,t}});var wh=["1","2","3","4","5","6","7","8","9","10","11","12"],xh={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]}},kh=(e,t=1,r)=>n=>{const[o,i]=xh[r][n];return"oklch("+o+"% "+i*t+" "+e+")"},qn=e=>{const t=kh(e.hue,e.chroma,e.mode);return Object.fromEntries(wh.map(r=>[e.prefix+r,e.transform(t(r))]))},Kn=e=>e,$h=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(o=>{const i=n[o];return[`${String(r)}.${o}`,i]}):[[r,n]]});return Object.fromEntries(t)},Nr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Wn=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Nr(e)&&Nr(r))for(const n in r){const o=r[n];if(Nr(o)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];Nr(i)&&Wn(i,o)}else Object.assign(e,{[n]:r[n]})}return Wn(e,...t)},Sh=e=>{function t(r,n){const o=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${o}`:`var(--${o})`}return t},Ch=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:o,getToken:i}=n,a=h=>i("reference",h.toString()),s=e({theme:o}),l=t({theme:o,core:a,raw:{core:s}}),d=r({theme:o,core:a,semantic:a,raw:{core:s,semantic:l}}),f=$h(Wn(s,l,d)),c=([h,m],g)=>{const v=[g,h].filter(Boolean).join(".");return typeof m=="object"?Object.entries(m).flatMap(_=>c(_,v)):[[n.getToken("declaration",v),m]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>c(h))),ref:h=>i("reference",h.toString())}}})})})});const[Gn,Yn,Ka]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Eh=Ch().core(({theme:e})=>({color:{black:Gn,white:Yn,lowest:e.mode==="light"?Yn:Gn,highest:e.mode==="light"?Gn:Yn,...qn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Kn}),...qn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Kn}),...qn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Kn})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(o,i)=>t.core.color[o].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":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Ka,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const o=(i,a)=>e.core.color[i].replace(")",` / ${a})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:o("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":o("a-9",.05)},"status-bar":{bg:o("n-2",.8),"bg-button":Ka,"bg-button-hover":o("n-10",.4),"bg-button-active":o("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Oh=Sh({prefix:"i-"}),Ph=e=>{const t=Eh.from({theme:e,getToken:Oh}),r=Object.entries(t.declarations).map(([n,o])=>`${n}: ${o};`);return`#isdk {
|
|
43
43
|
${r.concat(r).join(`
|
|
44
44
|
`)}
|
|
45
|
-
}`},Ka=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const o=t[n];if(!o)continue;const i=Tt(e,n,null);if(o.required&&i===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(o.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:o.type}}},Ep=({_internal_domManager:e=bp(),theme:t})=>Je(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const a=()=>{if(typeof window>"u")return;const s=[D("style",{id:"inploi-chatbot-styles"},vp),D("style",{id:"inploi-chatbot-theme"},Cp(t))],l=e.getOrCreateChatbotElement();pt(D(W,{},[s,D(fp,{apiClient:r,logger:n,analytics:o})]),l),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,l)=>r.fetch(`/flow/job/${s}`).then(u=>{const h=lr(pp,u);return{flow:h.flow,title:`Applying for “${h.job.title}”`,flowKeys:[h.job.id,...(l==null?void 0:l.flowKeys)??[]],job:{id:h.job.id,id_type:"external"},...l}}),fetchFlowById:async(s,l)=>r.fetch(`/flow/id/${s}`).then(u=>{var c;const h=lr(hp,u);return{flow:h.flow,title:"Chatbot",flowKeys:(l==null?void 0:l.flowKeys)??[],...l,analytics:{customProperties:{flow_id:h.flow.id,flow_version:h.flow.version,...(c=l==null?void 0:l.analytics)==null?void 0:c.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",i||a(),s instanceof Promise?(T.current$.value={state:"loading"},s.then(async l=>{Ka({context:l.context||{},schema:l.flow.context_schema,logger:n}),T.startFlow(l)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";T.current$.value={state:"error",error:u}})):(Ka({context:s.context||{},schema:s.flow.context_schema,logger:n}),T.startFlow(s))}catch(l){n.error("Error starting flow",l)}},close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Ep;const Yt=(e,{context:t,submissions:r})=>{const[n,...o]=e.data.compareKey.split(".");if(!n)return!1;const i=Ga({context:t,key:n,path:o,submissions:r});if(!i)return!1;switch(i.type){case"address":{const a=Tt(i.value,o.join("."));switch(e.data.compare){case"equals":return a===e.data.compareValue;case"contains":return a?a.includes(e.data.compareValue):!1;case"notEquals":return a!==e.data.compareValue;case"notContains":return a?!a.includes(e.data.compareValue):!0}break}case"integration":{if(typeof i.value!="object"||Array.isArray(i.value))return!1;const a=Tt(i.value,o.join(".")),s={...e,data:{...e.data,compareKey:"_temp"}};switch(typeof a){case"boolean":return Yt(s,{submissions:{_temp:{value:a,type:"boolean"}},context:t});case"string":return Yt(s,{submissions:{_temp:{value:a,type:"string"}},context:t});case"number":return Yt(s,{submissions:{_temp:{value:a,type:"number"}},context:t});case"object":return Array.isArray(a)&&a.every(La)?Yt(s,{submissions:{_temp:{value:a,type:"enum"}},context:t}):!1}break}case"boolean":{const a=e.data.compareValue==="true";switch(e.data.compare){case"equals":return i.value===a;case"notEquals":return i.value!==a}break}case"string":switch(e.data.compare){case"equals":return i.value===e.data.compareValue;case"contains":return i.value?i.value.includes(e.data.compareValue):!1;case"notEquals":return i.value!==e.data.compareValue;case"notContains":return i.value?!i.value.includes(e.data.compareValue):!0}break;case"number":{try{const a=Number(e.data.compareValue);switch(e.data.compare){case"equals":return i.value===a;case"notEquals":return i.value!==a;case"greaterThan":return i.value>a;case"greaterThanOrEqualTo":return i.value>=a;case"lessThan":return i.value<a;case"lessThanOrEqualTo":return i.value<=a}}catch{return console.error(`Failed to parse number in if-block ${e.id}`,i.value),!1}break}case"enum":switch(e.data.compare){case"equals":return i.value.length===1&&i.value[0]===e.data.compareValue;case"notEquals":return i.value.length===1&&i.value[0]!==e.data.compareValue;case"contains":return i.value.includes(e.data.compareValue);case"notContains":return!i.value.includes(e.data.compareValue)}break}return!1},Op=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Ze=(e,{context:t,submissions:r})=>e.replace(Op,(n,o,i="")=>{const[a,...s]=o.trim().split("."),l=Ga({key:a,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${qt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const u=Tt(l.value,s.join("."));switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(La))return u.join(", ")}break}}return i}),Wa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return Wa({node:n,nodes:t,stopWhen:r})},Pp=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(s=>s.id===o.branchId);if(!i)return!1;const a=Wa({node:i,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},Ap=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:a,onFlowEnd:s,onInterpret:l})=>{let u=new AbortController;const h={...t.service,log:p=>t.service.log({...p,customProperties:{...p.customProperties,...t.customProperties}})},c=async(p,m)=>{const b=i();l==null||l(p,m);try{await Ip({flow:e,analytics:h,logger:r,apiClient:o,context:n,node:p,submissions:b,chat:{sendMessage:async v=>a.send({groupId:p.id,message:v,signal:u.signal}),userInput:async v=>a.input({input:v,signal:u.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const _=v?e.nodes.find(x=>x.id===v):Pp({childNode:p,nodes:e.nodes});return _?c(_,p):s==null?void 0:s(p)},end:()=>s==null?void 0:s(p)})}catch(v){if(v instanceof Kt)return;throw v}};return{interpret:async p=>{const m=e.nodes.find(b=>b.id===p)??Fa(e.nodes);return c(m)},undo:p=>{let m=1;const b=e.nodes.find(_=>_.id===p[p.length-1]);for(let _=p.length-2;_>0;_--){const x=p[_],w=e.nodes.find(O=>O.id===x);if(!w||(m++,w.type.startsWith("question-")))break}u.abort(),u=new AbortController;const v=e.nodes.find(_=>_.id===p[p.length-m]);return ke(v,"Undo failed: new start node not found"),c(v,b),{removed:m}},abort:()=>{u.abort()}}};async function Ip(e){return await Le(e).with({node:{type:"text"}},Mp).with({node:{type:"image"}},Fp).with({node:{type:"question-text"}},Lp).with({node:{type:"question-enum"}},Rp).with({node:{type:"question-number"}},jp).with({node:{type:"question-boolean"}},Vp).with({node:{type:"question-file"}},zp).with({node:{type:"question-address"}},Bp).with({node:{type:"end-flow"}},Up).with({node:{type:"if-block"}},Np).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},Dp).with({node:{type:"integration-application-submit"}},Tp).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function Tp({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,analytics:a,flow:s}){const l=async u=>{u!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:h,session_id:c}=a.getSessionInfo(),p=await o.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:h,session_id:c,job:s.job,submissions:ep(i||{})})}).catch(m=>m);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:p}),Le(p).with({integration_response:ie.select(ie.union({status:ie.number,data:ie.any},{status:ie.number,error:{message:ie.string,data:ie.any}}))},m=>{a.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,response:{status:m.status,payload:"data"in m?m.data:m.error.data??null},job:s.job}})}).otherwise(()=>{}),await Le(p).with({ats_data:{redirect_url:ie.string}},async m=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const b=new URL(m.ats_data.redirect_url);h&&!b.searchParams.has("anonymous_id")&&b.searchParams.set("anonymous_id",h),await e.sendMessage({type:"link",href:b.toString(),text:"Complete submission",onClick:()=>{if(!c)return n.error("session_id not set, cannot log FLOW_REDIRECT event");a.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:c,flow_version:s.version,href:b.toString(),job:s.job}})}}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with({sucess:!1,ats_data:{message:ie.string}},async m=>{n.error(m.ats_data),await e.sendMessage({type:"system",variant:"error",text:m.ats_data.message}),await l(!1)}).otherwise(async m=>{n.error(m),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await l(!1)})};await l(r.data.skipConfirmation)}async function Dp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({type:"link",href:Ze(r.data.href,{submissions:n,context:o}),text:Ze(r.data.cta,{submissions:n,context:o})}),t(r.nextId)}async function Np({submissions:e,next:t,node:r,context:n}){t(Yt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Mp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.text,{submissions:n,context:o})}),t(r.nextId)}async function Fp({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Lp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(r.nextId)}async function jp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value.toString()}),t(r.nextId)}async function Rp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(a=>i.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function Vp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Bp({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function zp({node:e,chat:t,next:r,submissions:n,context:o}){await t.sendMessage({author:"bot",type:"text",text:Ze(e.data.question,{submissions:n,context:o})});const i=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(i===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const a of i.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function Up({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Ga=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const o=Tt(n,t.join("."));switch(typeof o){case"string":return{type:"string",value:o};case"number":return{type:"number",value:o};case"boolean":return{type:"boolean",value:o};default:console.warn(`Unexpected type for $context.${t.join(".")}`,o);return}}return r==null?void 0:r[e]};function Yn(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var h=Date.now()-a;h<t&&h>=0?n=setTimeout(l,t-h):(n=null,r||(s=e.apply(i,o),i=o=null))}var u=function(){i=this,o=arguments,a=Date.now();var h=r&&!n;return n||(n=setTimeout(l,t)),h&&(s=e.apply(i,o),i=o=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},u}Yn.debounce=Yn;var Hp=Yn;const Ya=Ve(Hp);function qp(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;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[a,s]=G({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,h=t?typeof t=="number"?t:t.resize:null,c=L(!1);R(()=>(c.current=!0,()=>void(c.current=!1)));const[p,m,b]=fe(()=>{const w=()=>{if(!l.current.element)return;const{left:O,top:A,width:P,height:U,bottom:q,right:N,x:M,y:se}=l.current.element.getBoundingClientRect(),te={left:O,top:A,width:P,height:U,bottom:q,right:N,x:M,y:se};l.current.element instanceof HTMLElement&&o&&(te.height=l.current.element.offsetHeight,te.width=l.current.element.offsetWidth),Object.freeze(te),c.current&&!Yp(l.current.lastBounds,te)&&s(l.current.lastBounds=te)};return[w,h?Ya(w,h):w,u?Ya(w,u):w]},[s,o,u,h]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",b,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new i(b),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",b,{capture:!0,passive:!0})))}const x=w=>{!w||w===l.current.element||(v(),l.current.element=w,l.current.scrollContainers=Za(w),_())};return Wp(b,!!r),Kp(m),R(()=>{v(),_()},[r,b,m]),R(()=>v,[]),[x,a,p]}function Kp(e){R(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Wp(e,t){R(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Za(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Za(e.parentElement)]}const Gp=["x","y","top","bottom","left","right","width","height"],Yp=(e,t)=>Gp.every(r=>e[r]===t[r]),Ct=({class:e,...t})=>d("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:"Send"}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})}),Zp=25,Zn=We({instant:()=>{},smooth:()=>{}}),Z={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>Zn.value.instant(),smooth:()=>Zn.value.smooth()}},Xp=()=>{const e=L(null);ve(()=>{Zn.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=fe(()=>({addToSubmissions:(n,o)=>T.setSubmission(n,o),send:async({message:n,signal:o,groupId:i})=>{if(await Le(n).with({author:"bot",type:"text"},async a=>{if(o!=null&&o.aborted)throw new Kt;Z.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*Zp;await new Promise(l=>setTimeout(l,s,{signal:o})),Z.isBotTyping$.value=!1}).otherwise(async()=>{}),o!=null&&o.aborted)throw new Kt;T.addMessage(n,i)},input:({input:n,signal:o})=>{if(o!=null&&o.aborted)throw new Kt;return T.setInput(n),new Promise(i=>{const a=s=>{if(o!=null&&o.aborted)throw new Kt;T.setInput(void 0),n.key&&T.setSubmission(n.key,s),i(s)};Z.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},Et=({class:e,...t})=>d("button",{type:"button",class:it("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",e),...t,children:[d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:"Skip"}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Xa=["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Caribbean Netherlands","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Cook Islands","Costa Rica","Croatia","Cuba","Curaçao","Cyprus","Czechia","Côte d'Ivoire","Democratic Republic of the Congo","Denmark","Djibouti","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands (Islas Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern and Antarctic Lands","Gabon","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar (Burma)","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Rwanda","Réunion","Saint Barthélemy","Saint Helena, Ascension and Tristan da Cunha","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Sweden","Switzerland","Syria","São Tomé and Príncipe","Taiwan","Tajikistan","Tanzania","Thailand","The Bahamas","The Gambia","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkmenistan","Turks and Caicos Islands","Tuvalu","Türkiye","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Åland Islands"],Qa={line1:["street_number","floor","room","premise"],line2:["subpremise","street_address","route"],line3:["sublocality","neighborhood"],city:["locality","postal_town"],state:["administrative_area_level_1"],postcode:["postal_code"],country:["country"]},Mr=Object.keys(Qa),Qp=e=>Mr.reduce((t,r)=>{const n=Qa[r],o=e.filter(i=>i.types.some(a=>n.includes(a))).map(i=>i.long_name).join(", ");return o&&(t[r]=o),t},{}),Jp=document.createElement("div"),ev=()=>fe(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(Jp);return{enabled:!0,getPredictions:async n=>{const{predictions:o}=await t.getPlacePredictions({input:n,language:"en"});return o.map(i=>({label:i.description,value:i.place_id}))},getPlaceDetails:async n=>await new Promise((i,a)=>r.getDetails({placeId:n,fields:["address_components"],language:"en"},(s,l)=>l!==e.maps.places.PlacesServiceStatus.OK?a(l):s===null?a("ZERO_RESULTS"):i({ok:!0,place:s}))).catch(async i=>(console.error("Failed to get address details",i),{ok:!1}))}},[]),Xn=e=>d("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("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:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:"Back"})]}),Qn={label:"Fill in manually",value:""},tv=({input:e,onSubmitSuccess:t})=>{const[r,n]=G(""),[o,i]=G(),[a,s]=G([]),[l,u]=G(),{enabled:h,getPredictions:c,getPlaceDetails:p}=ev(),[m,b]=G(h?"query":"manual"),v=_=>{ke(h,"Query state should not be enabled if Google Places isn't available"),n(_),_===""&&s([]),c(_).then(x=>{s(x)})};switch(R(()=>{if(h&&!(l===void 0||l===""))return p(l).then(_=>{if(!_.ok||!_.place.address_components){i({});return}const x=Qp(_.place.address_components);i(x),b("details")}),()=>{i(void 0)}},[l,p,h]),m){case"query":return ke(h,"Query state should not be enabled if Google Places isn't available"),d(rv,{input:e,onSkip:()=>t(null),onAddressSelect:_=>{u(_),b("loading")},onAddressSearch:_=>{v(_)},suggestions:a,query:r});case"loading":return d(Jn,{input:e,onSubmitSuccess:t,addressFields:{},actions:d(Xn,{onClick:()=>{u(void 0),b("query")}})});case"details":return ke(o!==void 0),d(Jn,{input:e,onSubmitSuccess:t,addressFields:o,actions:d(Xn,{onClick:()=>{u(void 0),b("query")}})});case"manual":return d(Jn,{input:e,onSubmitSuccess:t,addressFields:{},actions:h?d(Xn,{onClick:()=>{u(void 0),b("query")}}):void 0})}},rv=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onAddressSearch:i})=>{const a=L(null);return ve(()=>{a.current&&(a.current.focus(),a.current.select())},[]),d(W,{children:[d("form",{noValidate:!0,onSubmit:s=>{s.preventDefault();const u=new FormData(s.currentTarget).get("address");typeof u=="string"&&i(u)},class:"flex gap-1 p-2.5",children:[d("div",{class:"group relative flex-1",children:[d("input",{ref:a,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder||"Type and search for places...",defaultValue:o}),d("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:d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[d("circle",{cx:"7",cy:"7",r:"4"}),d("path",{d:"M10 10L13 13"})]}),d("span",{class:"sr-only",children:"Search"})]})})]}),e.config.optional&&d(Et,{class:"",onClick:t})]}),d("ul",{children:[r.map(s=>d("li",{children:d("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(s.value)},children:[d("span",{class:"flex-grow",children:s.label}),d("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:d("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),d("li",{children:d("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(Qn.value)},children:d("span",{class:"flex-grow",children:Qn.label})})},Qn.label)]})]})},nv={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Jn=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=L(null);return ve(()=>{if(o.current){const i=o.current.querySelector("input");i&&(i.focus(),i.select())}},[]),d("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:i=>{const a=new FormData(i.currentTarget),s=Object.fromEntries(a.entries());t({type:"address",value:s})},children:[d("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:o,children:Mr.map((i,a)=>{const s=`isdk_${i}`,l=n.config.keys[i];return l?d(W,{children:[d("label",{for:s,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:nv[i]}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[i==="country"?d("div",{class:"relative",children:[d("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:l,id:s,defaultValue:e[i],required:!0,children:[e.country&&!Xa.includes(e.country)?d("option",{value:e[i],children:e[i]}):d("option",{value:"",children:"Select a country"}),Xa.map(u=>d("option",{value:u,children:u},u))]}),d("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:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:a===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:l,id:s,defaultValue:e[i],required:!0}),a!==Mr.length-1&&d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),a===Mr.length-1&&d("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),d("div",{class:"flex w-full flex-1 ",children:[d("div",{class:"flex-grow",children:r}),d(Ct,{class:"flex items-center justify-center"})]})]})},ei=()=>{const e=L(null);return R(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Ja=["true","false"],iv=Cd(Ja),ov="answer",es="flex items-center gap-2 p-2.5",ts=re(({label:e,...t},r)=>d("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",...t,ref:r,children:d("p",{class:"truncate text-center text-base",children:e})})),av=({input:e,onSubmitSuccess:t})=>{const r=ei();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=np(n).value,i=lr(iv,o);t({type:"boolean",value:i==="true"})},children:[d("ul",{class:es,children:Ja.map((n,o)=>d("li",{class:"flex-1",children:d(ts,{ref:o===0?r:null,type:"submit",name:ov,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(Et,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Fr=({error:e})=>e?d("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[d("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null,sv=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),lv=e=>e.reduce((t,r)=>t+r.sizeKb,0),cv=Ir("file"),rs=3,uv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return d("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"block truncate",children:o}),d("span",{children:[".",n]})]}),d("p",{"aria-label":"File size",class:"text-accent-11",children:qt(e.sizeKb)})]})},ns=({class:e,...t})=>d("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),is=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},dv=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(is(n.name).toLowerCase()))},fv=(e,t)=>{const r=is(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},hv=({input:e,onSubmitSuccess:t})=>{var h;const r=(h=T.current$.value.flow)==null?void 0:h.data.submissions[e.key],[n,o]=G(cv(r)?r.value:[]),[i,a]=G(),s=n.length-rs,l=lv(n),u=ei();return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!dv({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${qt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:u,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?d(W,{children:[d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,rs).map(c=>{const p=c.name.split(".").pop(),m=c.name.replace(new RegExp(`.${p}$`),"");return d(ns,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:m}),d("span",{children:[".",p]})]})}),s>0?d(ns,{children:["+",s," file",s!==1?"s":""]}):null]}),d("p",{class:"text-neutral-11 text-xs",children:[qt(l)," ",n.length>1?"total":""]})]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("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:d("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"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-10 text-xs",children:["(max ",qt(e.config.fileSizeLimitKib),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>d("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:c.replace(".","")}))})]})]}),d("input",{id:"dropzone-file",onInput:async c=>{ke(c.target instanceof HTMLInputElement);const p=c.target.files?Array.from(c.target.files):[],m=await Promise.allSettled(p.map(async v=>{const _=await sv(v);return{name:fv(v.name,42),data:_,sizeKb:v.size/1e3}}));if(m.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const b=m.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);o(b)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(Ct,{disabled:n.length===0}),e.config.optional&&d(Et,{onClick:()=>t(null)})]})]}),d(Fr,{error:i})]})};var Zt=e=>e.type==="checkbox",Ot=e=>e instanceof Date,ue=e=>e==null;const os=e=>typeof e=="object";var ee=e=>!ue(e)&&!Array.isArray(e)&&os(e)&&!Ot(e),pv=e=>ee(e)&&e.target?Zt(e.target)?e.target.checked:e.target.value:e,vv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,mv=(e,t)=>e.has(vv(t)),bv=e=>{const t=e.constructor&&e.constructor.prototype;return ee(t)&&t.hasOwnProperty("isPrototypeOf")},ti=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ti&&(e instanceof Blob||e instanceof FileList))&&(r||ee(e)))if(t=r?[]:{},!r&&!bv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=je(e[n]));else return e;return t}var Xt=e=>Array.isArray(e)?e.filter(Boolean):[],X=e=>e===void 0,C=(e,t,r)=>{if(!t||!ee(e))return r;const n=Xt(t.split(/[,[\].]+?/)).reduce((o,i)=>ue(o)?o:o[i],e);return X(n)||n===e?X(e[t])?r:e[t]:n},Xe=e=>typeof e=="boolean";const as={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Re={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var gv=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==$e.all&&(t._proxyFormState[a]=!n||$e.all),r&&(r[a]=!0),e[a]}});return o},_e=e=>ee(e)&&!Object.keys(e).length,yv=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return _e(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||$e.all))},ri=e=>Array.isArray(e)?e:[e];function _v(e){const t=xe.useRef(e);t.current=e,xe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Pe=e=>typeof e=="string",wv=(e,t,r,n,o)=>Pe(e)?(n&&t.watch.add(e),C(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),C(r,i))):(n&&(t.watchAll=!0),r),ni=e=>/^\w*$/.test(e),ss=e=>Xt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function z(e,t,r){let n=-1;const o=ni(t)?[t]:ss(t),i=o.length,a=i-1;for(;++n<i;){const s=o[n];let l=r;if(n!==a){const u=e[s];l=ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var ls=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},cs=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched}),us=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Lr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=C(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else ee(s)&&Lr(s,t)}}};var xv=(e,t,r)=>{const n=Xt(C(e,r));return z(n,"root",t[r]),z(e,r,n),e},ii=e=>e.type==="file",Qe=e=>typeof e=="function",jr=e=>{if(!ti)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Rr=e=>Pe(e),oi=e=>e.type==="radio",Vr=e=>e instanceof RegExp;const ds={value:!1,isValid:!1},fs={value:!0,isValid:!0};var hs=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!X(e[0].attributes.value)?X(e[0].value)||e[0].value===""?fs:{value:e[0].value,isValid:!0}:fs:ds}return ds};const ps={isValid:!1,value:null};var vs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ps):ps;function ms(e,t,r="validate"){if(Rr(e)||Array.isArray(e)&&e.every(Rr)||Xe(e)&&!e)return{type:r,message:Rr(e)?e:"",ref:t}}var Pt=e=>ee(e)&&!Vr(e)?e:{value:e,message:""},bs=async(e,t,r,n,o)=>{const{ref:i,refs:a,required:s,maxLength:l,minLength:u,min:h,max:c,pattern:p,validate:m,name:b,valueAsNumber:v,mount:_,disabled:x}=e._f,w=C(t,b);if(!_||x)return{};const O=a?a[0]:i,A=V=>{n&&O.reportValidity&&(O.setCustomValidity(Xe(V)?"":V||""),O.reportValidity())},P={},U=oi(i),q=Zt(i),N=U||q,M=(v||ii(i))&&X(i.value)&&X(w)||jr(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,se=ls.bind(null,b,r,P),te=(V,F,Q,pe=Re.maxLength,we=Re.minLength)=>{const Ae=V?F:Q;P[b]={type:V?pe:we,message:Ae,ref:i,...se(V?pe:we,Ae)}};if(o?!Array.isArray(w)||!w.length:s&&(!N&&(M||ue(w))||Xe(w)&&!w||q&&!hs(a).isValid||U&&!vs(a).isValid)){const{value:V,message:F}=Rr(s)?{value:!!s,message:s}:Pt(s);if(V&&(P[b]={type:Re.required,message:F,ref:O,...se(Re.required,F)},!r))return A(F),P}if(!M&&(!ue(h)||!ue(c))){let V,F;const Q=Pt(c),pe=Pt(h);if(!ue(w)&&!isNaN(w)){const we=i.valueAsNumber||w&&+w;ue(Q.value)||(V=we>Q.value),ue(pe.value)||(F=we<pe.value)}else{const we=i.valueAsDate||new Date(w),Ae=Hr=>new Date(new Date().toDateString()+" "+Hr),ct=i.type=="time",er=i.type=="week";Pe(Q.value)&&w&&(V=ct?Ae(w)>Ae(Q.value):er?w>Q.value:we>new Date(Q.value)),Pe(pe.value)&&w&&(F=ct?Ae(w)<Ae(pe.value):er?w<pe.value:we<new Date(pe.value))}if((V||F)&&(te(!!V,Q.message,pe.message,Re.max,Re.min),!r))return A(P[b].message),P}if((l||u)&&!M&&(Pe(w)||o&&Array.isArray(w))){const V=Pt(l),F=Pt(u),Q=!ue(V.value)&&w.length>+V.value,pe=!ue(F.value)&&w.length<+F.value;if((Q||pe)&&(te(Q,V.message,F.message),!r))return A(P[b].message),P}if(p&&!M&&Pe(w)){const{value:V,message:F}=Pt(p);if(Vr(V)&&!w.match(V)&&(P[b]={type:Re.pattern,message:F,ref:i,...se(Re.pattern,F)},!r))return A(F),P}if(m){if(Qe(m)){const V=await m(w,t),F=ms(V,O);if(F&&(P[b]={...F,...se(Re.validate,F.message)},!r))return A(F.message),P}else if(ee(m)){let V={};for(const F in m){if(!_e(V)&&!r)break;const Q=ms(await m[F](w,t),O,F);Q&&(V={...Q,...se(F,Q.message)},A(Q.message),r&&(P[b]=V))}if(!_e(V)&&(P[b]={ref:O,...V},!r))return P}}return A(!0),P};function kv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=X(e)?n++:e[t[n++]];return e}function $v(e){for(const t in e)if(e.hasOwnProperty(t)&&!X(e[t]))return!1;return!0}function ae(e,t){const r=Array.isArray(t)?t:ni(t)?[t]:ss(t),n=r.length===1?e:kv(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(ee(n)&&_e(n)||Array.isArray(n)&&$v(n))&&ae(e,r.slice(0,-1)),e}function ai(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Br=e=>ue(e)||!os(e);function lt(e,t){if(Br(e)||Br(t))return e===t;if(Ot(e)&&Ot(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Ot(i)&&Ot(a)||ee(i)&&ee(a)||Array.isArray(i)&&Array.isArray(a)?!lt(i,a):i!==a)return!1}}return!0}var gs=e=>e.type==="select-multiple",Sv=e=>oi(e)||Zt(e),si=e=>jr(e)&&e.isConnected,ys=e=>{for(const t in e)if(Qe(e[t]))return!0;return!1};function zr(e,t={}){const r=Array.isArray(e);if(ee(e)||r)for(const n in e)Array.isArray(e[n])||ee(e[n])&&!ys(e[n])?(t[n]=Array.isArray(e[n])?[]:{},zr(e[n],t[n])):ue(e[n])||(t[n]=!0);return t}function _s(e,t,r){const n=Array.isArray(e);if(ee(e)||n)for(const o in e)Array.isArray(e[o])||ee(e[o])&&!ys(e[o])?X(t)||Br(r[o])?r[o]=Array.isArray(e[o])?zr(e[o],[]):{...zr(e[o])}:_s(e[o],ue(t)?{}:t[o],r[o]):r[o]=!lt(e[o],t[o]);return r}var li=(e,t)=>_s(e,t,zr(t)),ws=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>X(e)?e:t?e===""?NaN:e&&+e:r&&Pe(e)?new Date(e):n?n(e):e;function ci(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return ii(t)?t.files:oi(t)?vs(e.refs).value:gs(t)?[...t.selectedOptions].map(({value:r})=>r):Zt(t)?hs(e.refs).value:ws(X(t.value)?e.ref.value:t.value,e)}var Cv=(e,t,r,n)=>{const o={};for(const i of e){const a=C(t,i);a&&z(o,i,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Qt=e=>X(e)?e:Vr(e)?e.source:ee(e)?Vr(e.value)?e.value.source:e.value:e,Ev=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function xs(e,t,r){const n=C(e,r);if(n||ni(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),a=C(t,i),s=C(e,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:r}}var Ov=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Pv=(e,t)=>!Xt(C(e,t)).length&&ae(e,t);const Av={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function Iv(e={},t){let r={...Av,...e},n={submitCount:0,isDirty:!1,isLoading:Qe(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=ee(r.defaultValues)||ee(r.values)?je(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:je(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,h=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:ai(),array:ai(),state:ai()},m=e.resetOptions&&e.resetOptions.keepDirtyValues,b=cs(r.mode),v=cs(r.reValidateMode),_=r.criteriaMode===$e.all,x=f=>g=>{clearTimeout(h),h=setTimeout(f,g)},w=async f=>{if(c.isValid||f){const g=r.resolver?_e((await M()).errors):await te(o,!0);g!==n.isValid&&p.state.next({isValid:g})}},O=f=>c.isValidating&&p.state.next({isValidating:f}),A=(f,g=[],y,E,$=!0,k=!0)=>{if(E&&y){if(s.action=!0,k&&Array.isArray(C(o,f))){const I=y(C(o,f),E.argA,E.argB);$&&z(o,f,I)}if(k&&Array.isArray(C(n.errors,f))){const I=y(C(n.errors,f),E.argA,E.argB);$&&z(n.errors,f,I),Pv(n.errors,f)}if(c.touchedFields&&k&&Array.isArray(C(n.touchedFields,f))){const I=y(C(n.touchedFields,f),E.argA,E.argB);$&&z(n.touchedFields,f,I)}c.dirtyFields&&(n.dirtyFields=li(i,a)),p.state.next({name:f,isDirty:F(f,g),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else z(a,f,g)},P=(f,g)=>{z(n.errors,f,g),p.state.next({errors:n.errors})},U=(f,g,y,E)=>{const $=C(o,f);if($){const k=C(a,f,X(y)?C(i,f):y);X(k)||E&&E.defaultChecked||g?z(a,f,g?k:ci($._f)):we(f,k),s.mount&&w()}},q=(f,g,y,E,$)=>{let k=!1,I=!1;const H={name:f};if(!y||E){c.isDirty&&(I=n.isDirty,n.isDirty=H.isDirty=F(),k=I!==H.isDirty);const J=lt(C(i,f),g);I=C(n.dirtyFields,f),J?ae(n.dirtyFields,f):z(n.dirtyFields,f,!0),H.dirtyFields=n.dirtyFields,k=k||c.dirtyFields&&I!==!J}if(y){const J=C(n.touchedFields,f);J||(z(n.touchedFields,f,y),H.touchedFields=n.touchedFields,k=k||c.touchedFields&&J!==y)}return k&&$&&p.state.next(H),k?H:{}},N=(f,g,y,E)=>{const $=C(n.errors,f),k=c.isValid&&Xe(g)&&n.isValid!==g;if(e.delayError&&y?(u=x(()=>P(f,y)),u(e.delayError)):(clearTimeout(h),u=null,y?z(n.errors,f,y):ae(n.errors,f)),(y?!lt($,y):$)||!_e(E)||k){const I={...E,...k&&Xe(g)?{isValid:g}:{},errors:n.errors,name:f};n={...n,...I},p.state.next(I)}O(!1)},M=async f=>r.resolver(a,r.context,Cv(f||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),se=async f=>{const{errors:g}=await M(f);if(f)for(const y of f){const E=C(g,y);E?z(n.errors,y,E):ae(n.errors,y)}else n.errors=g;return g},te=async(f,g,y={valid:!0})=>{for(const E in f){const $=f[E];if($){const{_f:k,...I}=$;if(k){const H=l.array.has(k.name),J=await bs($,a,_,r.shouldUseNativeValidation&&!g,H);if(J[k.name]&&(y.valid=!1,g))break;!g&&(C(J,k.name)?H?xv(n.errors,J,k.name):z(n.errors,k.name,J[k.name]):ae(n.errors,k.name))}I&&await te(I,g,y)}}return y.valid},V=()=>{for(const f of l.unMount){const g=C(o,f);g&&(g._f.refs?g._f.refs.every(y=>!si(y)):!si(g._f.ref))&&hi(f)}l.unMount=new Set},F=(f,g)=>(f&&g&&z(a,f,g),!lt(Os(),i)),Q=(f,g,y)=>wv(f,l,{...s.mount?a:X(g)?i:Pe(f)?{[f]:g}:g},y,g),pe=f=>Xt(C(s.mount?a:i,f,e.shouldUnregister?C(i,f,[]):[])),we=(f,g,y={})=>{const E=C(o,f);let $=g;if(E){const k=E._f;k&&(!k.disabled&&z(a,f,ws(g,k)),$=jr(k.ref)&&ue(g)?"":g,gs(k.ref)?[...k.ref.options].forEach(I=>I.selected=$.includes(I.value)):k.refs?Zt(k.ref)?k.refs.length>1?k.refs.forEach(I=>(!I.defaultChecked||!I.disabled)&&(I.checked=Array.isArray($)?!!$.find(H=>H===I.value):$===I.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(I=>I.checked=I.value===$):ii(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||p.values.next({name:f,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&q(f,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&fi(f)},Ae=(f,g,y)=>{for(const E in g){const $=g[E],k=`${f}.${E}`,I=C(o,k);(l.array.has(f)||!Br($)||I&&!I._f)&&!Ot($)?Ae(k,$,y):we(k,$,y)}},ct=(f,g,y={})=>{const E=C(o,f),$=l.array.has(f),k=je(g);z(a,f,k),$?(p.array.next({name:f,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&p.state.next({name:f,dirtyFields:li(i,a),isDirty:F(f,k)})):E&&!E._f&&!ue(k)?Ae(f,k,y):we(f,k,y),us(f,l)&&p.state.next({...n}),p.values.next({name:f,values:{...a}}),!s.mount&&t()},er=async f=>{const g=f.target;let y=g.name,E=!0;const $=C(o,y),k=()=>g.type?ci($._f):pv(f),I=H=>{E=Number.isNaN(H)||H===C(a,y,H)};if($){let H,J;const qr=k(),At=f.type===as.BLUR||f.type===as.FOCUS_OUT,fm=!Ev($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||Ov(At,C(n.touchedFields,y),n.isSubmitted,v,b),vi=us(y,l,At);z(a,y,qr),At?($._f.onBlur&&$._f.onBlur(f),u&&u(0)):$._f.onChange&&$._f.onChange(f);const mi=q(y,qr,At,!1),hm=!_e(mi)||vi;if(!At&&p.values.next({name:y,type:f.type,values:{...a}}),fm)return c.isValid&&w(),hm&&p.state.next({name:y,...vi?{}:mi});if(!At&&vi&&p.state.next({...n}),O(!0),r.resolver){const{errors:Fs}=await M([y]);if(I(qr),E){const pm=xs(n.errors,o,y),Ls=xs(Fs,o,pm.name||y);H=Ls.error,y=Ls.name,J=_e(Fs)}}else H=(await bs($,a,_,r.shouldUseNativeValidation))[y],I(qr),E&&(H?J=!1:c.isValid&&(J=await te(o,!0)));E&&($._f.deps&&fi($._f.deps),N(y,J,H,mi))}},Hr=(f,g)=>{if(C(n.errors,g)&&f.focus)return f.focus(),1},fi=async(f,g={})=>{let y,E;const $=ri(f);if(O(!0),r.resolver){const k=await se(X(f)?f:$);y=_e(k),E=f?!$.some(I=>C(k,I)):y}else f?(E=(await Promise.all($.map(async k=>{const I=C(o,k);return await te(I&&I._f?{[k]:I}:I)}))).every(Boolean),!(!E&&!n.isValid)&&w()):E=y=await te(o);return p.state.next({...!Pe(f)||c.isValid&&y!==n.isValid?{}:{name:f},...r.resolver||!f?{isValid:y}:{},errors:n.errors,isValidating:!1}),g.shouldFocus&&!E&&Lr(o,Hr,f?$:l.mount),E},Os=f=>{const g={...i,...s.mount?a:{}};return X(f)?g:Pe(f)?C(g,f):f.map(y=>C(g,y))},Ps=(f,g)=>({invalid:!!C((g||n).errors,f),isDirty:!!C((g||n).dirtyFields,f),isTouched:!!C((g||n).touchedFields,f),error:C((g||n).errors,f)}),lm=f=>{f&&ri(f).forEach(g=>ae(n.errors,g)),p.state.next({errors:f?n.errors:{}})},As=(f,g,y)=>{const E=(C(o,f,{_f:{}})._f||{}).ref;z(n.errors,f,{...g,ref:E}),p.state.next({name:f,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},cm=(f,g)=>Qe(f)?p.values.subscribe({next:y=>f(Q(void 0,g),y)}):Q(f,g,!0),hi=(f,g={})=>{for(const y of f?ri(f):l.mount)l.mount.delete(y),l.array.delete(y),g.keepValue||(ae(o,y),ae(a,y)),!g.keepError&&ae(n.errors,y),!g.keepDirty&&ae(n.dirtyFields,y),!g.keepTouched&&ae(n.touchedFields,y),!r.shouldUnregister&&!g.keepDefaultValue&&ae(i,y);p.values.next({values:{...a}}),p.state.next({...n,...g.keepDirty?{isDirty:F()}:{}}),!g.keepIsValid&&w()},Is=({disabled:f,name:g,field:y,fields:E,value:$})=>{if(Xe(f)){const k=f?void 0:X($)?ci(y?y._f:C(E,g)._f):$;z(a,g,k),q(g,k,!1,!1,!0)}},pi=(f,g={})=>{let y=C(o,f);const E=Xe(g.disabled);return z(o,f,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:f}},name:f,mount:!0,...g}}),l.mount.add(f),y?Is({field:y,disabled:g.disabled,name:f}):U(f,!0,g.value),{...E?{disabled:g.disabled}:{},...r.progressive?{required:!!g.required,min:Qt(g.min),max:Qt(g.max),minLength:Qt(g.minLength),maxLength:Qt(g.maxLength),pattern:Qt(g.pattern)}:{},name:f,onChange:er,onBlur:er,ref:$=>{if($){pi(f,g),y=C(o,f);const k=X($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,I=Sv(k),H=y._f.refs||[];if(I?H.find(J=>J===k):k===y._f.ref)return;z(o,f,{_f:{...y._f,...I?{refs:[...H.filter(si),k,...Array.isArray(C(i,f))?[{}]:[]],ref:{type:k.type,name:f}}:{ref:k}}}),U(f,!1,void 0,k)}else y=C(o,f,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||g.shouldUnregister)&&!(mv(l.array,f)&&s.action)&&l.unMount.add(f)}}},Ts=()=>r.shouldFocusError&&Lr(o,Hr,l.mount),um=f=>{Xe(f)&&(p.state.next({disabled:f}),Lr(o,g=>{g.disabled=f},0,!1))},Ds=(f,g)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=je(a);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await M();n.errors=$,E=k}else await te(o);ae(n.errors,"root"),_e(n.errors)?(p.state.next({errors:{}}),await f(E,y)):(g&&await g({...n.errors},y),Ts(),setTimeout(Ts)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_e(n.errors),submitCount:n.submitCount+1,errors:n.errors})},dm=(f,g={})=>{C(o,f)&&(X(g.defaultValue)?ct(f,C(i,f)):(ct(f,g.defaultValue),z(i,f,g.defaultValue)),g.keepTouched||ae(n.touchedFields,f),g.keepDirty||(ae(n.dirtyFields,f),n.isDirty=g.defaultValue?F(f,C(i,f)):F()),g.keepError||(ae(n.errors,f),c.isValid&&w()),p.state.next({...n}))},Ns=(f,g={})=>{const y=f?je(f):i,E=je(y),$=f&&!_e(f)?E:i;if(g.keepDefaultValues||(i=y),!g.keepValues){if(g.keepDirtyValues||m)for(const k of l.mount)C(n.dirtyFields,k)?z($,k,C(a,k)):ct(k,C($,k));else{if(ti&&X(f))for(const k of l.mount){const I=C(o,k);if(I&&I._f){const H=Array.isArray(I._f.refs)?I._f.refs[0]:I._f.ref;if(jr(H)){const J=H.closest("form");if(J){J.reset();break}}}}o={}}a=e.shouldUnregister?g.keepDefaultValues?je(i):{}:je($),p.array.next({values:{...$}}),p.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!c.isValid||!!g.keepIsValid,s.watch=!!e.shouldUnregister,p.state.next({submitCount:g.keepSubmitCount?n.submitCount:0,isDirty:g.keepDirty?n.isDirty:!!(g.keepDefaultValues&&!lt(f,i)),isSubmitted:g.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:g.keepDirtyValues?n.dirtyFields:g.keepDefaultValues&&f?li(i,f):{},touchedFields:g.keepTouched?n.touchedFields:{},errors:g.keepErrors?n.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ms=(f,g)=>Ns(Qe(f)?f(a):f,g);return{control:{register:pi,unregister:hi,getFieldState:Ps,handleSubmit:Ds,setError:As,_executeSchema:M,_getWatch:Q,_getDirty:F,_updateValid:w,_removeUnmounted:V,_updateFieldArray:A,_updateDisabledField:Is,_getFieldArray:pe,_reset:Ns,_resetDefaultValues:()=>Qe(r.defaultValues)&&r.defaultValues().then(f=>{Ms(f,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:f=>{n={...n,...f}},_disableForm:um,_subjects:p,_proxyFormState:c,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(f){s=f},get _defaultValues(){return i},get _names(){return l},set _names(f){l=f},get _formState(){return n},set _formState(f){n=f},get _options(){return r},set _options(f){r={...r,...f}}},trigger:fi,register:pi,handleSubmit:Ds,watch:cm,setValue:ct,getValues:Os,reset:Ms,resetField:dm,clearErrors:lm,unregister:hi,setError:As,setFocus:(f,g={})=>{const y=C(o,f),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),g.shouldSelect&&$.select())}},getFieldState:Ps}}function ui(e={}){const t=xe.useRef(),r=xe.useRef(),[n,o]=xe.useState({isDirty:!1,isValidating:!1,isLoading:Qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Qe(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Iv(e,()=>o(a=>({...a}))),formState:n});const i=t.current.control;return i._options=e,_v({subject:i._subjects.state,next:a=>{yv(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),xe.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),xe.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),xe.useEffect(()=>{e.values&&!lt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),xe.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()}),t.current.formState=gv(n,i),t.current}var ks=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Tv=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?ks(i.ref,o,e):i.refs&&i.refs.forEach(function(a){return ks(a,o,e)})};for(var n in t.fields)r(n)},Dv=function(e,t){t.shouldUseNativeValidation&&Tv(e,t);var r={};for(var n in e){var o=C(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(Mv(t.names||Object.keys(e),n)){var a=Object.assign({},Nv(C(r,n)));z(a,"root",i),z(r,n,a)}else z(r,n,i)}return r},Nv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Mv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Fv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(s){return s.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,a=i&&i[n.validation];r[o]=ls(o,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},di=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(a,s){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var h=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(lr(e,n,h)):Promise.resolve(Ad(e,n,h)).then(u)}()}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof rn)return{values:{},errors:Dv(Fv(a,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};const $s=27,Ss=12,Cs=10,Lv=Ir("enum"),jv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return di(Ne({checked:ro(to(Ji()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[Lt(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),jt(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Rv=re(({option:e,...t},r)=>d(W,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Es=kr("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:es}}}),Vv=({input:e,onSubmitSuccess:t})=>{var u,h;const r=e.key?(u=T.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,o=n&&e.config.options.length===2,{register:i,handleSubmit:a,formState:{errors:s}}=ui({defaultValues:{checked:n?{}:Lv(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:jv(e.config)}),l=ei();return o?d("ul",{style:{maxHeight:6.5*$s+5*Ss+2*Cs},class:Es({variant:"booleanLike"}),children:e.config.options.map((c,p)=>d("li",{class:"flex-1",children:d(ts,{type:"submit",ref:m=>{m&&p===0&&(l.current=m)},label:c.label,value:"true",onClick:()=>t({type:"enum",value:[c.value]})})},c.value))}):d("form",{noValidate:!0,onSubmit:c=>a(p=>{const m=p.checked;t({type:"enum",value:m})})(c),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*$s+5*Ss+2*Cs},class:Es({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((c,p)=>{const m=`checked.${c.value}`,{ref:b,...v}=i(m);return d("li",{class:"relative",children:d(Rv,{option:c,autoFocus:p===0,ref:_=>{_&&p===0&&(l.current=_),b(_)},id:m,...v,onClick:n?()=>t({type:"enum",value:[c.value]}):void 0})},c.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(Ct,{}),e.config.minSelected===0&&d(Et,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(Fr,{error:(h=s.checked)==null?void 0:h.root})})]})},Bv=Ir("number"),Ur={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},zv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return di(Ne({number:nn(Ur.number(),[Md(t,Ur.min(t)),Nd(r,Ur.max(r)),Td(o=>o===Number(o.toFixed(n)),Ur.decimalCases(n))])}))},Uv=({input:e,onSubmitSuccess:t})=>{var h;const r=e.config.defaultValue,n=e.key?(h=T.current$.value.flow)==null?void 0:h.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:a}}=ui({defaultValues:{number:r?Number(r):Bv(n)?n.value:void 0},resolver:zv(e.config)}),{ref:s,...l}=o("number",{required:!e.config.optional,valueAsNumber:!0}),u=L();return ve(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},type:"text",min:e.config.min,max:e.config.max,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest [type=number:-webkit-inner-spin-button] w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all [-webkit-outer-spin-button:none]",placeholder:e.config.placeholder}),e.config.optional&&d(Et,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(Ct,{})]}),d(Fr,{error:a.number})]})},Hv=({input:e,onSubmitSuccess:t})=>d("div",{class:"flex flex-col items-center py-3",children:d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),d("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:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})})}),Jt={empty:"Please enter some text",email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number",url:"That doesn’t look like a valid URL"},qv=Se(Jt.phone,[Fd(/^\+?[0-9 -]+$/,Jt.phone)]),Kv={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Wv=Ir("string"),Gv=e=>{const t={maxLength:`Please enter no more than ${e.maxChars??999} characters`,minLength:`Please enter ${e.minChars??1} or more characters`};return di(Ne({text:{email:Se(Jt.email,[Dd(Jt.email),jt(e.minChars??1,t.minLength),Lt(e.maxChars??1/0,t.maxLength)]),phone:ro(qv,r=>r.replace(/[^0-9]/g,""),[jt(e.minChars??1,t.minLength),Lt(e.maxChars??1/0,t.maxLength)]),text:Se([jt(e.minChars??1,t.minLength),Lt(e.maxChars??1/0,t.maxLength)]),url:Se([Ld(Jt.url),jt(e.minChars??1,t.minLength),Lt(e.maxChars??1/0,t.maxLength)])}[e.format]}))},Yv=({input:e,onSubmitSuccess:t})=>{var h;const r=e.key?(h=T.current$.value.flow)==null?void 0:h.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:a}}=ui({defaultValues:{text:n||(Wv(r)?r.value:"")},resolver:Gv(e.config)}),{ref:s,...l}=o("text",{required:!e.config.optional}),u=L();return ve(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{t({type:"string",value:c.text})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{id:"chat-input",...l,...Kv[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&d(Et,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(Ct,{})]}),d(Fr,{error:a.text})]})},Zv=()=>{var o;const e=(o=T.current$.value.flow)==null?void 0:o.data.currentInput,[t,r]=qp(),n=L(null);return T.inputHeight$.value=r.height,R(()=>{const i=n.current;if(i)return i.addEventListener("transitionstart",Z.scrollToEnd.smooth),i.addEventListener("transitioncancel",Z.scrollToEnd.smooth),i.addEventListener("transitionend",Z.scrollToEnd.smooth),()=>{i.removeEventListener("transitionstart",Z.scrollToEnd.smooth),i.removeEventListener("transitioncancel",Z.scrollToEnd.smooth),i.removeEventListener("transitionend",Z.scrollToEnd.smooth)}},[]),d("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:d("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:Le({input:e}).with({input:ie.nullish},()=>d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),d(Ct,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},i=>d(Yv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"multiple-choice"}},i=>d(Vv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"boolean"}},i=>d(av,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"file"}},i=>d(hv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"submit"}},i=>d(Hv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"address"}},i=>d(tv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"number"}},i=>d(Uv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).exhaustive()})})},Xv=kr("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"}}),Qv=({children:e,className:t,animate:r,side:n,...o})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Xv({className:t,side:n,animate:r}),...o,children:e}),Jv=({message:e})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("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"})})]})}),em=({className:e,...t})=>(R(()=>{Z.scrollToEnd.smooth()}),d("div",{"aria-hidden":!0,children:Z.isBotTyping$.value===!0?d("div",{"aria-label":"Typing…",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),tm={bot:"left",user:"right"},rm=kr("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]"}}}),nm=({lastSentMessageFooter:e})=>{var r;const t=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return R(()=>{Z.scrollToEnd.smooth()},[t.length]),d("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>d(W,{children:d("li",{class:"flex",children:Le(n).with({type:"system"},i=>d("p",{class:rm({variant:i.variant}),children:i.text})).with({type:"text",author:ie.union("bot","user")},i=>{const a=i.author==="user"&&!t.slice(o+1).some(l=>l.type==="text"&&l.author==="user"),s=o===t.length-1;return d(Qv,{animate:s,side:tm[i.author],children:[i.text,a?e:null]},o)}).with({type:"link"},i=>d(Jv,{message:i})).with({type:"image"},i=>d("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=>d(uv,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).with({type:"loading"},i=>{const a=t[t.length-1];return!(i===a)||Z.isBotTyping$.value?null:d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(Ba,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},o)),d(em,{},"typing")]})},im=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=T.current$.value;ke(n,"Flow is required to exist to show chatbot body");const o=T.viewState$.value,{chatRef:i,chatService:a}=Xp(),[s,l]=G();return ve(()=>{o==="maximised"&&Z.scrollToEnd.instant()},[o]),ve(()=>{var v,_;const{state:u,flow:h}=T.current$.peek();if(u!=="loaded")throw new Error(mp.invalid_state);let c=h.data.nodeHistory.at(-1);if(Z.scrollToEnd.instant(),T.setInput(void 0),h.data.isFinished)return;c===void 0?(c=Fa(n.nodes).id,T.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:h.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):T.removeMessagesSentByNodeIds([c]);const{interpret:p,abort:m,undo:b}=Ap({context:n.context,analytics:{service:r,customProperties:(_=n.analytics)==null?void 0:_.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=T.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,w)=>{var A;const O=T.current$.peek().flow;ke(O),w&&(O.data.sequence=O.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:w.id,flow_build:n.build,to_node_id:x.id,sequence:O.data.sequence,flow_session_id:O.data.flowSessionId,job:n.job},customProperties:(A=n.analytics)==null?void 0:A.customProperties})),T.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var w;T.markAsFinished();const x=T.current$.peek().flow;ke(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(w=n.analytics)==null?void 0:w.customProperties})}});return l(()=>b),p(c),m},[r,t,a,e,n]),d(W,{children:[d("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:d(nm,{lastSentMessageFooter:n.data.isFinished||!s?null:d(am,{undoFn:s})})}),d(Zv,{})]})},om=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],am=({undoFn:e})=>d("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:d("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=T.current$.peek();ke(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(T.removeMessagesSentByNodeIds(n),T.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(om).forEach(o=>delete t.data.submissions[o]),T.current$.value={...T.current$.value})},children:"Undo"})}),sm=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:im},Symbol.toStringTag,{value:"Module"}))})();
|
|
45
|
+
}`},Wa=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const o=t[n];if(!o)continue;const i=It(e,n,null);if(o.required&&i===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(o.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:o.type}}},Ah=({_internal_domManager:e=_h(),theme:t})=>Je(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const a=()=>{if(typeof window>"u")return;const s=[D("style",{id:"inploi-chatbot-styles"},bh),D("style",{id:"inploi-chatbot-theme"},Ph(t))],l=e.getOrCreateChatbotElement();mt(D(Y,{},[s,D(vh,{apiClient:r,logger:n,analytics:o})]),l),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,l)=>r.fetch(`/flow/job/${s}`).then(d=>{const f=cr(gh,d);return{flow:f.flow,title:`Applying for “${f.job.title}”`,flowKeys:[f.job.id,...(l==null?void 0:l.flowKeys)??[]],job:{id:f.job.id,id_type:"external"},...l}}),fetchFlowById:async(s,l)=>r.fetch(`/flow/id/${s}`).then(d=>{var c;const f=cr(mh,d);return{flow:f.flow,title:"Chatbot",flowKeys:(l==null?void 0:l.flowKeys)??[],...l,analytics:{customProperties:{flow_id:f.flow.id,flow_version:f.flow.version,...(c=l==null?void 0:l.analytics)==null?void 0:c.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{I.cancelCurrentFlow(),I.viewState$.value="maximised",i||a(),s instanceof Promise?(I.current$.value={state:"loading"},s.then(async l=>{Wa({context:l.context||{},schema:l.flow.context_schema,logger:n}),I.startFlow(l)}).catch(l=>{const d=l instanceof Error?l.message:"An error occurred";I.current$.value={state:"error",error:d}})):(Wa({context:s.context||{},schema:s.flow.context_schema,logger:n}),I.startFlow(s))}catch(l){n.error("Error starting flow",l)}},close:async()=>{typeof window>"u"||(I.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Ah;const Zt=(e,{context:t,submissions:r})=>{const[n,...o]=e.data.compareKey.split(".");if(!n)return!1;const i=Ya({context:t,key:n,path:o,submissions:r});if(!i)return!1;switch(i.type){case"address":{const a=It(i.value,o.join("."));switch(e.data.compare){case"equals":return a===e.data.compareValue;case"contains":return a?a.includes(e.data.compareValue):!1;case"notEquals":return a!==e.data.compareValue;case"notContains":return a?!a.includes(e.data.compareValue):!0}break}case"integration":{if(typeof i.value!="object"||Array.isArray(i.value))return!1;const a=It(i.value,o.join(".")),s={...e,data:{...e.data,compareKey:"_temp"}};switch(typeof a){case"boolean":return Zt(s,{submissions:{_temp:{value:a,type:"boolean"}},context:t});case"string":return Zt(s,{submissions:{_temp:{value:a,type:"string"}},context:t});case"number":return Zt(s,{submissions:{_temp:{value:a,type:"number"}},context:t});case"object":return Array.isArray(a)&&a.every(Ra)?Zt(s,{submissions:{_temp:{value:a,type:"enum"}},context:t}):!1}break}case"boolean":{const a=e.data.compareValue==="true";switch(e.data.compare){case"equals":return i.value===a;case"notEquals":return i.value!==a}break}case"string":switch(e.data.compare){case"equals":return i.value===e.data.compareValue;case"contains":return i.value?i.value.includes(e.data.compareValue):!1;case"notEquals":return i.value!==e.data.compareValue;case"notContains":return i.value?!i.value.includes(e.data.compareValue):!0}break;case"number":{try{const a=Number(e.data.compareValue);switch(e.data.compare){case"equals":return i.value===a;case"notEquals":return i.value!==a;case"greaterThan":return i.value>a;case"greaterThanOrEqualTo":return i.value>=a;case"lessThan":return i.value<a;case"lessThanOrEqualTo":return i.value<=a}}catch{return console.error(`Failed to parse number in if-block ${e.id}`,i.value),!1}break}case"enum":switch(e.data.compare){case"equals":return i.value.length===1&&i.value[0]===e.data.compareValue;case"notEquals":return i.value.length===1&&i.value[0]!==e.data.compareValue;case"contains":return i.value.includes(e.data.compareValue);case"notContains":return!i.value.includes(e.data.compareValue)}break}return!1},Th=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Ze=(e,{context:t,submissions:r})=>e.replace(Th,(n,o,i="")=>{const[a,...s]=o.trim().split("."),l=Ya({key:a,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(d=>`${d.name} (${qt(d.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(d=>d&&d.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const d=It(l.value,s.join("."));switch(typeof d){case"boolean":return d===!0?"true":"false";case"string":return d;case"number":return d.toString();case"object":if(Array.isArray(d)&&d.every(Ra))return d.join(", ")}break}}return i}),Ga=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return Ga({node:n,nodes:t,stopWhen:r})},Ih=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(s=>s.id===o.branchId);if(!i)return!1;const a=Ga({node:i,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},Dh=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:a,onFlowEnd:s,onInterpret:l})=>{let d=new AbortController;const f={...t.service,log:h=>t.service.log({...h,customProperties:{...h.customProperties,...t.customProperties}})},c=async(h,m)=>{const g=i();l==null||l(h,m);try{await Nh({flow:e,analytics:f,logger:r,apiClient:o,context:n,node:h,submissions:g,chat:{sendMessage:async v=>a.send({groupId:h.id,message:v,signal:d.signal}),userInput:async v=>a.input({input:v,signal:d.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const _=v?e.nodes.find(x=>x.id===v):Ih({childNode:h,nodes:e.nodes});return _?c(_,h):s==null?void 0:s(h)},end:()=>s==null?void 0:s(h)})}catch(v){if(v instanceof Wt)return;throw v}};return{interpret:async h=>{const m=e.nodes.find(g=>g.id===h)??La(e.nodes);return c(m)},undo:h=>{let m=1;const g=e.nodes.find(_=>_.id===h[h.length-1]);for(let _=h.length-2;_>0;_--){const x=h[_],w=e.nodes.find(O=>O.id===x);if(!w||(m++,w.type.startsWith("question-")))break}d.abort(),d=new AbortController;const v=e.nodes.find(_=>_.id===h[h.length-m]);return ke(v,"Undo failed: new start node not found"),c(v,g),{removed:m}},abort:()=>{d.abort()}}};async function Nh(e){return await Re(e).with({node:{type:"text"}},Rh).with({node:{type:"image"}},jh).with({node:{type:"question-text"}},Vh).with({node:{type:"question-enum"}},zh).with({node:{type:"question-number"}},Bh).with({node:{type:"question-boolean"}},Uh).with({node:{type:"question-file"}},qh).with({node:{type:"question-address"}},Hh).with({node:{type:"end-flow"}},Kh).with({node:{type:"if-block"}},Lh).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},Fh).with({node:{type:"integration-application-submit"}},Mh).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function Mh({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,analytics:a,flow:s}){const l=async d=>{d!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:f,session_id:c}=a.getSessionInfo(),h=await o.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:f,session_id:c,job:s.job,submissions:nh(i||{})})}).catch(m=>m);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:h}),Re(h).with({integration_response:q.select(q.union({status:q.number,data:q.any},{status:q.number,error:{message:q.string,data:q.any}}))},m=>{a.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,response:{status:m.status,payload:"data"in m?m.data:m.error.data??null},job:s.job}})}).otherwise(()=>{}),await Re(h).with(q.union({ats_data:q.select("redirect",{redirect_url:q.string})},{integration_response:{data:q.select("redirect",{redirect_url:q.string})}}),async m=>{if(m.redirect===void 0)return;await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const g=new URL(m.redirect.redirect_url);f&&!g.searchParams.has("anonymous_id")&&g.searchParams.set("anonymous_id",f),await e.sendMessage({type:"link",href:g.toString(),text:"Complete submission",onClick:()=>{if(!c){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}a.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:c,flow_version:s.version,href:g.toString(),job:s.job}})}}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with(q.union({success:!1,ats_data:q.select("error",{message:q.string})},{integration_response:{error:q.select("error",{message:q.string})}}),async m=>{var g;n.error(m.error),await e.sendMessage({type:"system",variant:"error",text:((g=m.error)==null?void 0:g.message)||"Failed to submit"}),await l(!1)}).otherwise(async m=>{n.error(m),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await l(!1)})};await l(r.data.skipConfirmation)}async function Fh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({type:"link",href:Ze(r.data.href,{submissions:n,context:o}),text:Ze(r.data.cta,{submissions:n,context:o})}),t(r.nextId)}async function Lh({submissions:e,next:t,node:r,context:n}){t(Zt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Rh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.text,{submissions:n,context:o})}),t(r.nextId)}async function jh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Vh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,maxChars:r.data.maxChars,minChars:r.data.minChars}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(r.nextId)}async function Bh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value.toString()}),t(r.nextId)}async function zh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(a=>i.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function Uh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Hh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function qh({node:e,chat:t,next:r,submissions:n,context:o}){await t.sendMessage({author:"bot",type:"text",text:Ze(e.data.question,{submissions:n,context:o})});const i=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(i===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const a of i.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function Kh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Ya=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const o=It(n,t.join("."));switch(typeof o){case"string":return{type:"string",value:o};case"number":return{type:"number",value:o};case"boolean":return{type:"boolean",value:o};default:console.warn(`Unexpected type for $context.${t.join(".")}`,o);return}}return r==null?void 0:r[e]};function Zn(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var f=Date.now()-a;f<t&&f>=0?n=setTimeout(l,t-f):(n=null,r||(s=e.apply(i,o),i=o=null))}var d=function(){i=this,o=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(l,t)),f&&(s=e.apply(i,o),i=o=null),s};return d.clear=function(){n&&(clearTimeout(n),n=null)},d.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},d}Zn.debounce=Zn;var Wh=Zn;const Za=Ie(Wh);function Gh(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;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[a,s]=W({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=F({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),d=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,c=F(!1);j(()=>(c.current=!0,()=>void(c.current=!1)));const[h,m,g]=pe(()=>{const w=()=>{if(!l.current.element)return;const{left:O,top:A,width:P,height:U,bottom:K,right:N,x:M,y:se}=l.current.element.getBoundingClientRect(),re={left:O,top:A,width:P,height:U,bottom:K,right:N,x:M,y:se};l.current.element instanceof HTMLElement&&o&&(re.height=l.current.element.offsetHeight,re.width=l.current.element.offsetWidth),Object.freeze(re),c.current&&!Qh(l.current.lastBounds,re)&&s(l.current.lastBounds=re)};return[w,f?Za(w,f):w,d?Za(w,d):w]},[s,o,d,f]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",g,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new i(g),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",g,{capture:!0,passive:!0})))}const x=w=>{!w||w===l.current.element||(v(),l.current.element=w,l.current.scrollContainers=Xa(w),_())};return Zh(g,!!r),Yh(m),j(()=>{v(),_()},[r,g,m]),j(()=>v,[]),[x,a,h]}function Yh(e){j(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Zh(e,t){j(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Xa(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Xa(e.parentElement)]}const Xh=["x","y","top","bottom","left","right","width","height"],Qh=(e,t)=>Xh.every(r=>e[r]===t[r]),lt=({class:e,...t})=>u("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[u("title",{children:"Send"}),u("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),u("path",{d:"M8 4V13"})]})}),Jh=25,Xn=We({instant:()=>{},smooth:()=>{}}),Z={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>Xn.value.instant(),smooth:()=>Xn.value.smooth()}},ev=()=>{const e=F(null);fe(()=>{Xn.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=pe(()=>({addToSubmissions:(n,o)=>I.setSubmission(n,o),send:async({message:n,signal:o,groupId:i})=>{if(await Re(n).with({author:"bot",type:"text"},async a=>{if(o!=null&&o.aborted)throw new Wt;Z.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*Jh;await new Promise(l=>setTimeout(l,s,{signal:o})),Z.isBotTyping$.value=!1}).otherwise(async()=>{}),o!=null&&o.aborted)throw new Wt;I.addMessage(n,i)},input:({input:n,signal:o})=>{if(o!=null&&o.aborted)throw new Wt;return I.setInput(n),new Promise(i=>{const a=s=>{if(o!=null&&o.aborted)throw new Wt;I.setInput(void 0),n.key&&I.setSubmission(n.key,s),i(s)};Z.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},ct=({class:e,...t})=>u("button",{type:"button",class:it("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",e),...t,children:[u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[u("title",{children:"Skip"}),u("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),u("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Qa={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1",Andorra:"376",Angola:"244",Anguilla:"1",Antarctica:"672","Antigua and Barbuda":"1",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1","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",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":"260",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1",Guadeloupe:"590",Guam:"1",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509","Heard Island and McDonald Islands":"334",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"352","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1",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",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":"852","North Macedonia":"389","Northern Mariana Islands":"1",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",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","Saint Lucia":"1","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1",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":"293",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1",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"},Ja={line1:["street_number","floor","room","premise"],line2:["subpremise","street_address","route"],line3:["sublocality","neighborhood"],city:["locality","postal_town"],state:["administrative_area_level_1"],postcode:["postal_code"],country:["country"]},Mr=Object.keys(Ja),tv=e=>Mr.reduce((t,r)=>{const n=Ja[r],o=e.filter(i=>i.types.some(a=>n.includes(a))).map(i=>i.long_name).join(", ");return o&&(t[r]=o),t},{}),rv=document.createElement("div"),nv=()=>pe(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(rv);return{enabled:!0,getPredictions:async n=>{const{predictions:o}=await t.getPlacePredictions({input:n,language:"en"});return o.map(i=>({label:i.description,value:i.place_id}))},getPlaceDetails:async n=>await new Promise((i,a)=>r.getDetails({placeId:n,fields:["address_components"],language:"en"},(s,l)=>l!==e.maps.places.PlacesServiceStatus.OK?a(l):s===null?a("ZERO_RESULTS"):i({ok:!0,place:s}))).catch(async i=>(console.error("Failed to get address details",i),{ok:!1}))}},[]),Qn=e=>u("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[u("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:u("path",{d:"M10 3L5 8L10 13"})}),u("span",{children:"Back"})]}),Jn={label:"Fill in manually",value:""},iv=({input:e,onSubmitSuccess:t})=>{const[r,n]=W(""),[o,i]=W(),[a,s]=W([]),[l,d]=W(),{enabled:f,getPredictions:c,getPlaceDetails:h}=nv(),[m,g]=W(f?"query":"manual"),v=_=>{ke(f,"Query state should not be enabled if Google Places isn't available"),n(_),_===""&&s([]),c(_).then(x=>{s(x)})};switch(j(()=>{if(f&&!(l===void 0||l===""))return h(l).then(_=>{if(!_.ok||!_.place.address_components){i({});return}const x=tv(_.place.address_components);i(x),g("details")}),()=>{i(void 0)}},[l,h,f]),m){case"query":return ke(f,"Query state should not be enabled if Google Places isn't available"),u(ov,{input:e,onSkip:()=>t(null),onAddressSelect:_=>{d(_),g("loading")},onAddressSearch:_=>{v(_)},suggestions:a,query:r});case"loading":return u(ei,{input:e,onSubmitSuccess:t,addressFields:{},actions:u(Qn,{onClick:()=>{d(void 0),g("query")}})});case"details":return ke(o!==void 0),u(ei,{input:e,onSubmitSuccess:t,addressFields:o,actions:u(Qn,{onClick:()=>{d(void 0),g("query")}})});case"manual":return u(ei,{input:e,onSubmitSuccess:t,addressFields:{},actions:f?u(Qn,{onClick:()=>{d(void 0),g("query")}}):void 0})}},ov=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onAddressSearch:i})=>{const a=F(null);return fe(()=>{a.current&&(a.current.focus(),a.current.select())},[]),u(Y,{children:[u("form",{noValidate:!0,onSubmit:s=>{s.preventDefault();const d=new FormData(s.currentTarget).get("address");typeof d=="string"&&i(d)},class:"flex gap-1 p-2.5",children:[u("div",{class:"group relative flex-1",children:[u("input",{ref:a,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder||"Type and search for places...",defaultValue:o}),u("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:u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[u("circle",{cx:"7",cy:"7",r:"4"}),u("path",{d:"M10 10L13 13"})]}),u("span",{class:"sr-only",children:"Search"})]})})]}),e.config.optional&&u(ct,{class:"",onClick:t})]}),u("ul",{children:[r.map(s=>u("li",{children:u("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(s.value)},children:[u("span",{class:"flex-grow",children:s.label}),u("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:u("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),u("li",{children:u("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(Jn.value)},children:u("span",{class:"flex-grow",children:Jn.label})})},Jn.label)]})]})},av={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},ei=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=F(null);fe(()=>{if(o.current){const a=o.current.querySelector("input");a&&(a.focus(),a.select())}},[]);const i=Object.keys(Qa);return u("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:a=>{const s=new FormData(a.currentTarget),l=Object.fromEntries(s.entries());t({type:"address",value:l})},children:[u("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:o,children:Mr.map((a,s)=>{const l=`isdk_${a}`,d=n.config.keys[a];return d?u(Y,{children:[u("label",{for:l,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:av[a]}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[a==="country"?u("div",{class:"relative",children:[u("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:d,id:l,defaultValue:e[a],required:!0,children:[e.country&&!i.includes(e.country)?u("option",{value:e[a],children:e[a]}):u("option",{value:"",children:"Select a country"}),i.map(f=>u("option",{value:f,children:f},f))]}),u("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:u("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):u("input",{autoFocus:s===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:d,id:l,defaultValue:e[a],required:!0}),s!==Mr.length-1&&u("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),s===Mr.length-1&&u("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),u("div",{class:"flex w-full flex-1 ",children:[u("div",{class:"flex-grow",children:r}),u(lt,{class:"flex items-center justify-center"})]})]})},ti=()=>{const e=F(null);return j(()=>{var t;(t=e.current)==null||t.focus()},[]),e},es=["true","false"],sv=Pd(es),lv="answer",ts="flex items-center gap-2 p-2.5",rs=ne(({label:e,...t},r)=>u("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",...t,ref:r,children:u("p",{class:"truncate text-center text-base",children:e})})),cv=({input:e,onSubmitSuccess:t})=>{const r=ti();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=ah(n).value,i=cr(sv,o);t({type:"boolean",value:i==="true"})},children:[u("ul",{class:ts,children:es.map((n,o)=>u("li",{class:"flex-1",children:u(rs,{ref:o===0?r:null,type:"submit",name:lv,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&u("div",{class:"px-2 pb-2",children:u(ct,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Xt=({error:e})=>e?u("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[u("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),u("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),u("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),u("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null,uv=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),dv=e=>e.reduce((t,r)=>t+r.sizeKb,0),fv=Kt("file"),ns=3,pv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return u("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[u("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[u("span",{class:"block truncate",children:o}),u("span",{children:[".",n]})]}),u("p",{"aria-label":"File size",class:"text-accent-11",children:qt(e.sizeKb)})]})},is=({class:e,...t})=>u("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),os=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},hv=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(os(n.name).toLowerCase()))},vv=(e,t)=>{const r=os(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},mv=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=I.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,o]=W(fv(r)?r.value:[]),[i,a]=W(),s=n.length-ns,l=dv(n),d=ti();return u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!hv({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${qt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[u("div",{class:"flex items-center gap-2",children:[u("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?u(Y,{children:[u("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,ns).map(c=>{const h=c.name.split(".").pop(),m=c.name.replace(new RegExp(`.${h}$`),"");return u(is,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:m}),u("span",{children:[".",h]})]})}),s>0?u(is,{children:["+",s," file",s!==1?"s":""]}):null]}),u("p",{class:"text-neutral-11 text-xs",children:[qt(l)," ",n.length>1?"total":""]})]}):u("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[u("header",{class:"flex flex-col items-center gap-0",children:[u("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:u("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"})}),u("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?u("p",{class:"text-neutral-10 text-xs",children:["(max ",qt(e.config.fileSizeLimitKib),")"]}):null]}),u("aside",{class:"flex flex-col items-center gap-2",children:[u("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),u("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>u("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:c.replace(".","")}))})]})]}),u("input",{id:"dropzone-file",onInput:async c=>{ke(c.target instanceof HTMLInputElement);const h=c.target.files?Array.from(c.target.files):[],m=await Promise.allSettled(h.map(async v=>{const _=await uv(v);return{name:vv(v.name,42),data:_,sizeKb:v.size/1e3}}));if(m.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const g=m.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);o(g)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(lt,{disabled:n.length===0}),e.config.optional&&u(ct,{onClick:()=>t(null)})]})]}),u(Xt,{error:i})]})};var Qt=e=>e.type==="checkbox",Ot=e=>e instanceof Date,ue=e=>e==null;const as=e=>typeof e=="object";var te=e=>!ue(e)&&!Array.isArray(e)&&as(e)&&!Ot(e),gv=e=>te(e)&&e.target?Qt(e.target)?e.target.checked:e.target.value:e,bv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,yv=(e,t)=>e.has(bv(t)),_v=e=>{const t=e.constructor&&e.constructor.prototype;return te(t)&&t.hasOwnProperty("isPrototypeOf")},ri=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ri&&(e instanceof Blob||e instanceof FileList))&&(r||te(e)))if(t=r?[]:{},!r&&!_v(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=je(e[n]));else return e;return t}var Jt=e=>Array.isArray(e)?e.filter(Boolean):[],Q=e=>e===void 0,C=(e,t,r)=>{if(!t||!te(e))return r;const n=Jt(t.split(/[,[\].]+?/)).reduce((o,i)=>ue(o)?o:o[i],e);return Q(n)||n===e?Q(e[t])?r:e[t]:n},Xe=e=>typeof e=="boolean";const ss={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ve={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var wv=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==$e.all&&(t._proxyFormState[a]=!n||$e.all),r&&(r[a]=!0),e[a]}});return o},_e=e=>te(e)&&!Object.keys(e).length,xv=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return _e(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||$e.all))},ni=e=>Array.isArray(e)?e:[e];function kv(e){const t=xe.useRef(e);t.current=e,xe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ae=e=>typeof e=="string",$v=(e,t,r,n,o)=>Ae(e)?(n&&t.watch.add(e),C(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),C(r,i))):(n&&(t.watchAll=!0),r),ii=e=>/^\w*$/.test(e),ls=e=>Jt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function z(e,t,r){let n=-1;const o=ii(t)?[t]:ls(t),i=o.length,a=i-1;for(;++n<i;){const s=o[n];let l=r;if(n!==a){const d=e[s];l=te(d)||Array.isArray(d)?d:isNaN(+o[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var cs=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},us=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched}),ds=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Fr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=C(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else te(s)&&Fr(s,t)}}};var Sv=(e,t,r)=>{const n=Jt(C(e,r));return z(n,"root",t[r]),z(e,r,n),e},oi=e=>e.type==="file",Qe=e=>typeof e=="function",Lr=e=>{if(!ri)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Rr=e=>Ae(e),ai=e=>e.type==="radio",jr=e=>e instanceof RegExp;const fs={value:!1,isValid:!1},ps={value:!0,isValid:!0};var hs=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Q(e[0].attributes.value)?Q(e[0].value)||e[0].value===""?ps:{value:e[0].value,isValid:!0}:ps:fs}return fs};const vs={isValid:!1,value:null};var ms=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,vs):vs;function gs(e,t,r="validate"){if(Rr(e)||Array.isArray(e)&&e.every(Rr)||Xe(e)&&!e)return{type:r,message:Rr(e)?e:"",ref:t}}var Pt=e=>te(e)&&!jr(e)?e:{value:e,message:""},bs=async(e,t,r,n,o)=>{const{ref:i,refs:a,required:s,maxLength:l,minLength:d,min:f,max:c,pattern:h,validate:m,name:g,valueAsNumber:v,mount:_,disabled:x}=e._f,w=C(t,g);if(!_||x)return{};const O=a?a[0]:i,A=V=>{n&&O.reportValidity&&(O.setCustomValidity(Xe(V)?"":V||""),O.reportValidity())},P={},U=ai(i),K=Qt(i),N=U||K,M=(v||oi(i))&&Q(i.value)&&Q(w)||Lr(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,se=cs.bind(null,g,r,P),re=(V,L,J,ve=Ve.maxLength,we=Ve.minLength)=>{const Te=V?L:J;P[g]={type:V?ve:we,message:Te,ref:i,...se(V?ve:we,Te)}};if(o?!Array.isArray(w)||!w.length:s&&(!N&&(M||ue(w))||Xe(w)&&!w||K&&!hs(a).isValid||U&&!ms(a).isValid)){const{value:V,message:L}=Rr(s)?{value:!!s,message:s}:Pt(s);if(V&&(P[g]={type:Ve.required,message:L,ref:O,...se(Ve.required,L)},!r))return A(L),P}if(!M&&(!ue(f)||!ue(c))){let V,L;const J=Pt(c),ve=Pt(f);if(!ue(w)&&!isNaN(w)){const we=i.valueAsNumber||w&&+w;ue(J.value)||(V=we>J.value),ue(ve.value)||(L=we<ve.value)}else{const we=i.valueAsDate||new Date(w),Te=qr=>new Date(new Date().toDateString()+" "+qr),dt=i.type=="time",tr=i.type=="week";Ae(J.value)&&w&&(V=dt?Te(w)>Te(J.value):tr?w>J.value:we>new Date(J.value)),Ae(ve.value)&&w&&(L=dt?Te(w)<Te(ve.value):tr?w<ve.value:we<new Date(ve.value))}if((V||L)&&(re(!!V,J.message,ve.message,Ve.max,Ve.min),!r))return A(P[g].message),P}if((l||d)&&!M&&(Ae(w)||o&&Array.isArray(w))){const V=Pt(l),L=Pt(d),J=!ue(V.value)&&w.length>+V.value,ve=!ue(L.value)&&w.length<+L.value;if((J||ve)&&(re(J,V.message,L.message),!r))return A(P[g].message),P}if(h&&!M&&Ae(w)){const{value:V,message:L}=Pt(h);if(jr(V)&&!w.match(V)&&(P[g]={type:Ve.pattern,message:L,ref:i,...se(Ve.pattern,L)},!r))return A(L),P}if(m){if(Qe(m)){const V=await m(w,t),L=gs(V,O);if(L&&(P[g]={...L,...se(Ve.validate,L.message)},!r))return A(L.message),P}else if(te(m)){let V={};for(const L in m){if(!_e(V)&&!r)break;const J=gs(await m[L](w,t),O,L);J&&(V={...J,...se(L,J.message)},A(J.message),r&&(P[g]=V))}if(!_e(V)&&(P[g]={ref:O,...V},!r))return P}}return A(!0),P};function Cv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Q(e)?n++:e[t[n++]];return e}function Ev(e){for(const t in e)if(e.hasOwnProperty(t)&&!Q(e[t]))return!1;return!0}function ae(e,t){const r=Array.isArray(t)?t:ii(t)?[t]:ls(t),n=r.length===1?e:Cv(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(te(n)&&_e(n)||Array.isArray(n)&&Ev(n))&&ae(e,r.slice(0,-1)),e}function si(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Vr=e=>ue(e)||!as(e);function ut(e,t){if(Vr(e)||Vr(t))return e===t;if(Ot(e)&&Ot(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Ot(i)&&Ot(a)||te(i)&&te(a)||Array.isArray(i)&&Array.isArray(a)?!ut(i,a):i!==a)return!1}}return!0}var ys=e=>e.type==="select-multiple",Ov=e=>ai(e)||Qt(e),li=e=>Lr(e)&&e.isConnected,_s=e=>{for(const t in e)if(Qe(e[t]))return!0;return!1};function Br(e,t={}){const r=Array.isArray(e);if(te(e)||r)for(const n in e)Array.isArray(e[n])||te(e[n])&&!_s(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Br(e[n],t[n])):ue(e[n])||(t[n]=!0);return t}function ws(e,t,r){const n=Array.isArray(e);if(te(e)||n)for(const o in e)Array.isArray(e[o])||te(e[o])&&!_s(e[o])?Q(t)||Vr(r[o])?r[o]=Array.isArray(e[o])?Br(e[o],[]):{...Br(e[o])}:ws(e[o],ue(t)?{}:t[o],r[o]):r[o]=!ut(e[o],t[o]);return r}var ci=(e,t)=>ws(e,t,Br(t)),xs=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Q(e)?e:t?e===""?NaN:e&&+e:r&&Ae(e)?new Date(e):n?n(e):e;function ui(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return oi(t)?t.files:ai(t)?ms(e.refs).value:ys(t)?[...t.selectedOptions].map(({value:r})=>r):Qt(t)?hs(e.refs).value:xs(Q(t.value)?e.ref.value:t.value,e)}var Pv=(e,t,r,n)=>{const o={};for(const i of e){const a=C(t,i);a&&z(o,i,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},er=e=>Q(e)?e:jr(e)?e.source:te(e)?jr(e.value)?e.value.source:e.value:e,Av=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ks(e,t,r){const n=C(e,r);if(n||ii(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),a=C(t,i),s=C(e,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:r}}var Tv=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Iv=(e,t)=>!Jt(C(e,t)).length&&ae(e,t);const Dv={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function Nv(e={},t){let r={...Dv,...e},n={submitCount:0,isDirty:!1,isLoading:Qe(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=te(r.defaultValues)||te(r.values)?je(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:je(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:si(),array:si(),state:si()},m=e.resetOptions&&e.resetOptions.keepDirtyValues,g=us(r.mode),v=us(r.reValidateMode),_=r.criteriaMode===$e.all,x=p=>b=>{clearTimeout(f),f=setTimeout(p,b)},w=async p=>{if(c.isValid||p){const b=r.resolver?_e((await M()).errors):await re(o,!0);b!==n.isValid&&h.state.next({isValid:b})}},O=p=>c.isValidating&&h.state.next({isValidating:p}),A=(p,b=[],y,E,$=!0,k=!0)=>{if(E&&y){if(s.action=!0,k&&Array.isArray(C(o,p))){const T=y(C(o,p),E.argA,E.argB);$&&z(o,p,T)}if(k&&Array.isArray(C(n.errors,p))){const T=y(C(n.errors,p),E.argA,E.argB);$&&z(n.errors,p,T),Iv(n.errors,p)}if(c.touchedFields&&k&&Array.isArray(C(n.touchedFields,p))){const T=y(C(n.touchedFields,p),E.argA,E.argB);$&&z(n.touchedFields,p,T)}c.dirtyFields&&(n.dirtyFields=ci(i,a)),h.state.next({name:p,isDirty:L(p,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else z(a,p,b)},P=(p,b)=>{z(n.errors,p,b),h.state.next({errors:n.errors})},U=(p,b,y,E)=>{const $=C(o,p);if($){const k=C(a,p,Q(y)?C(i,p):y);Q(k)||E&&E.defaultChecked||b?z(a,p,b?k:ui($._f)):we(p,k),s.mount&&w()}},K=(p,b,y,E,$)=>{let k=!1,T=!1;const H={name:p};if(!y||E){c.isDirty&&(T=n.isDirty,n.isDirty=H.isDirty=L(),k=T!==H.isDirty);const ee=ut(C(i,p),b);T=C(n.dirtyFields,p),ee?ae(n.dirtyFields,p):z(n.dirtyFields,p,!0),H.dirtyFields=n.dirtyFields,k=k||c.dirtyFields&&T!==!ee}if(y){const ee=C(n.touchedFields,p);ee||(z(n.touchedFields,p,y),H.touchedFields=n.touchedFields,k=k||c.touchedFields&&ee!==y)}return k&&$&&h.state.next(H),k?H:{}},N=(p,b,y,E)=>{const $=C(n.errors,p),k=c.isValid&&Xe(b)&&n.isValid!==b;if(e.delayError&&y?(d=x(()=>P(p,y)),d(e.delayError)):(clearTimeout(f),d=null,y?z(n.errors,p,y):ae(n.errors,p)),(y?!ut($,y):$)||!_e(E)||k){const T={...E,...k&&Xe(b)?{isValid:b}:{},errors:n.errors,name:p};n={...n,...T},h.state.next(T)}O(!1)},M=async p=>r.resolver(a,r.context,Pv(p||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),se=async p=>{const{errors:b}=await M(p);if(p)for(const y of p){const E=C(b,y);E?z(n.errors,y,E):ae(n.errors,y)}else n.errors=b;return b},re=async(p,b,y={valid:!0})=>{for(const E in p){const $=p[E];if($){const{_f:k,...T}=$;if(k){const H=l.array.has(k.name),ee=await bs($,a,_,r.shouldUseNativeValidation&&!b,H);if(ee[k.name]&&(y.valid=!1,b))break;!b&&(C(ee,k.name)?H?Sv(n.errors,ee,k.name):z(n.errors,k.name,ee[k.name]):ae(n.errors,k.name))}T&&await re(T,b,y)}}return y.valid},V=()=>{for(const p of l.unMount){const b=C(o,p);b&&(b._f.refs?b._f.refs.every(y=>!li(y)):!li(b._f.ref))&&hi(p)}l.unMount=new Set},L=(p,b)=>(p&&b&&z(a,p,b),!ut(Ts(),i)),J=(p,b,y)=>$v(p,l,{...s.mount?a:Q(b)?i:Ae(p)?{[p]:b}:b},y,b),ve=p=>Jt(C(s.mount?a:i,p,e.shouldUnregister?C(i,p,[]):[])),we=(p,b,y={})=>{const E=C(o,p);let $=b;if(E){const k=E._f;k&&(!k.disabled&&z(a,p,xs(b,k)),$=Lr(k.ref)&&ue(b)?"":b,ys(k.ref)?[...k.ref.options].forEach(T=>T.selected=$.includes(T.value)):k.refs?Qt(k.ref)?k.refs.length>1?k.refs.forEach(T=>(!T.defaultChecked||!T.disabled)&&(T.checked=Array.isArray($)?!!$.find(H=>H===T.value):$===T.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(T=>T.checked=T.value===$):oi(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||h.values.next({name:p,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&K(p,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&pi(p)},Te=(p,b,y)=>{for(const E in b){const $=b[E],k=`${p}.${E}`,T=C(o,k);(l.array.has(p)||!Vr($)||T&&!T._f)&&!Ot($)?Te(k,$,y):we(k,$,y)}},dt=(p,b,y={})=>{const E=C(o,p),$=l.array.has(p),k=je(b);z(a,p,k),$?(h.array.next({name:p,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&h.state.next({name:p,dirtyFields:ci(i,a),isDirty:L(p,k)})):E&&!E._f&&!ue(k)?Te(p,k,y):we(p,k,y),ds(p,l)&&h.state.next({...n}),h.values.next({name:p,values:{...a}}),!s.mount&&t()},tr=async p=>{const b=p.target;let y=b.name,E=!0;const $=C(o,y),k=()=>b.type?ui($._f):gv(p),T=H=>{E=Number.isNaN(H)||H===C(a,y,H)};if($){let H,ee;const Kr=k(),At=p.type===ss.BLUR||p.type===ss.FOCUS_OUT,Om=!Av($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||Tv(At,C(n.touchedFields,y),n.isSubmitted,v,g),mi=ds(y,l,At);z(a,y,Kr),At?($._f.onBlur&&$._f.onBlur(p),d&&d(0)):$._f.onChange&&$._f.onChange(p);const gi=K(y,Kr,At,!1),Pm=!_e(gi)||mi;if(!At&&h.values.next({name:y,type:p.type,values:{...a}}),Om)return c.isValid&&w(),Pm&&h.state.next({name:y,...mi?{}:gi});if(!At&&mi&&h.state.next({...n}),O(!0),r.resolver){const{errors:js}=await M([y]);if(T(Kr),E){const Am=ks(n.errors,o,y),Vs=ks(js,o,Am.name||y);H=Vs.error,y=Vs.name,ee=_e(js)}}else H=(await bs($,a,_,r.shouldUseNativeValidation))[y],T(Kr),E&&(H?ee=!1:c.isValid&&(ee=await re(o,!0)));E&&($._f.deps&&pi($._f.deps),N(y,ee,H,gi))}},qr=(p,b)=>{if(C(n.errors,b)&&p.focus)return p.focus(),1},pi=async(p,b={})=>{let y,E;const $=ni(p);if(O(!0),r.resolver){const k=await se(Q(p)?p:$);y=_e(k),E=p?!$.some(T=>C(k,T)):y}else p?(E=(await Promise.all($.map(async k=>{const T=C(o,k);return await re(T&&T._f?{[k]:T}:T)}))).every(Boolean),!(!E&&!n.isValid)&&w()):E=y=await re(o);return h.state.next({...!Ae(p)||c.isValid&&y!==n.isValid?{}:{name:p},...r.resolver||!p?{isValid:y}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&Fr(o,qr,p?$:l.mount),E},Ts=p=>{const b={...i,...s.mount?a:{}};return Q(p)?b:Ae(p)?C(b,p):p.map(y=>C(b,y))},Is=(p,b)=>({invalid:!!C((b||n).errors,p),isDirty:!!C((b||n).dirtyFields,p),isTouched:!!C((b||n).touchedFields,p),error:C((b||n).errors,p)}),$m=p=>{p&&ni(p).forEach(b=>ae(n.errors,b)),h.state.next({errors:p?n.errors:{}})},Ds=(p,b,y)=>{const E=(C(o,p,{_f:{}})._f||{}).ref;z(n.errors,p,{...b,ref:E}),h.state.next({name:p,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},Sm=(p,b)=>Qe(p)?h.values.subscribe({next:y=>p(J(void 0,b),y)}):J(p,b,!0),hi=(p,b={})=>{for(const y of p?ni(p):l.mount)l.mount.delete(y),l.array.delete(y),b.keepValue||(ae(o,y),ae(a,y)),!b.keepError&&ae(n.errors,y),!b.keepDirty&&ae(n.dirtyFields,y),!b.keepTouched&&ae(n.touchedFields,y),!r.shouldUnregister&&!b.keepDefaultValue&&ae(i,y);h.values.next({values:{...a}}),h.state.next({...n,...b.keepDirty?{isDirty:L()}:{}}),!b.keepIsValid&&w()},Ns=({disabled:p,name:b,field:y,fields:E,value:$})=>{if(Xe(p)){const k=p?void 0:Q($)?ui(y?y._f:C(E,b)._f):$;z(a,b,k),K(b,k,!1,!1,!0)}},vi=(p,b={})=>{let y=C(o,p);const E=Xe(b.disabled);return z(o,p,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:p}},name:p,mount:!0,...b}}),l.mount.add(p),y?Ns({field:y,disabled:b.disabled,name:p}):U(p,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:er(b.min),max:er(b.max),minLength:er(b.minLength),maxLength:er(b.maxLength),pattern:er(b.pattern)}:{},name:p,onChange:tr,onBlur:tr,ref:$=>{if($){vi(p,b),y=C(o,p);const k=Q($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,T=Ov(k),H=y._f.refs||[];if(T?H.find(ee=>ee===k):k===y._f.ref)return;z(o,p,{_f:{...y._f,...T?{refs:[...H.filter(li),k,...Array.isArray(C(i,p))?[{}]:[]],ref:{type:k.type,name:p}}:{ref:k}}}),U(p,!1,void 0,k)}else y=C(o,p,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(yv(l.array,p)&&s.action)&&l.unMount.add(p)}}},Ms=()=>r.shouldFocusError&&Fr(o,qr,l.mount),Cm=p=>{Xe(p)&&(h.state.next({disabled:p}),Fr(o,b=>{b.disabled=p},0,!1))},Fs=(p,b)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=je(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await M();n.errors=$,E=k}else await re(o);ae(n.errors,"root"),_e(n.errors)?(h.state.next({errors:{}}),await p(E,y)):(b&&await b({...n.errors},y),Ms(),setTimeout(Ms)),h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_e(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Em=(p,b={})=>{C(o,p)&&(Q(b.defaultValue)?dt(p,C(i,p)):(dt(p,b.defaultValue),z(i,p,b.defaultValue)),b.keepTouched||ae(n.touchedFields,p),b.keepDirty||(ae(n.dirtyFields,p),n.isDirty=b.defaultValue?L(p,C(i,p)):L()),b.keepError||(ae(n.errors,p),c.isValid&&w()),h.state.next({...n}))},Ls=(p,b={})=>{const y=p?je(p):i,E=je(y),$=p&&!_e(p)?E:i;if(b.keepDefaultValues||(i=y),!b.keepValues){if(b.keepDirtyValues||m)for(const k of l.mount)C(n.dirtyFields,k)?z($,k,C(a,k)):dt(k,C($,k));else{if(ri&&Q(p))for(const k of l.mount){const T=C(o,k);if(T&&T._f){const H=Array.isArray(T._f.refs)?T._f.refs[0]:T._f.ref;if(Lr(H)){const ee=H.closest("form");if(ee){ee.reset();break}}}}o={}}a=e.shouldUnregister?b.keepDefaultValues?je(i):{}:je($),h.array.next({values:{...$}}),h.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!c.isValid||!!b.keepIsValid,s.watch=!!e.shouldUnregister,h.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!ut(p,i)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&p?ci(i,p):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Rs=(p,b)=>Ls(Qe(p)?p(a):p,b);return{control:{register:vi,unregister:hi,getFieldState:Is,handleSubmit:Fs,setError:Ds,_executeSchema:M,_getWatch:J,_getDirty:L,_updateValid:w,_removeUnmounted:V,_updateFieldArray:A,_updateDisabledField:Ns,_getFieldArray:ve,_reset:Ls,_resetDefaultValues:()=>Qe(r.defaultValues)&&r.defaultValues().then(p=>{Rs(p,r.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:p=>{n={...n,...p}},_disableForm:Cm,_subjects:h,_proxyFormState:c,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(p){s=p},get _defaultValues(){return i},get _names(){return l},set _names(p){l=p},get _formState(){return n},set _formState(p){n=p},get _options(){return r},set _options(p){r={...r,...p}}},trigger:pi,register:vi,handleSubmit:Fs,watch:Sm,setValue:dt,getValues:Ts,reset:Rs,resetField:Em,clearErrors:$m,unregister:hi,setError:Ds,setFocus:(p,b={})=>{const y=C(o,p),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:Is}}function zr(e={}){const t=xe.useRef(),r=xe.useRef(),[n,o]=xe.useState({isDirty:!1,isValidating:!1,isLoading:Qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Qe(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Nv(e,()=>o(a=>({...a}))),formState:n});const i=t.current.control;return i._options=e,kv({subject:i._subjects.state,next:a=>{xv(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),xe.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),xe.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),xe.useEffect(()=>{e.values&&!ut(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),xe.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()}),t.current.formState=wv(n,i),t.current}var $s=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Mv=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?$s(i.ref,o,e):i.refs&&i.refs.forEach(function(a){return $s(a,o,e)})};for(var n in t.fields)r(n)},Fv=function(e,t){t.shouldUseNativeValidation&&Mv(e,t);var r={};for(var n in e){var o=C(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(Rv(t.names||Object.keys(e),n)){var a=Object.assign({},Lv(C(r,n)));z(a,"root",i),z(r,n,a)}else z(r,n,i)}return r},Lv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Rv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},jv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(s){return s.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,a=i&&i[n.validation];r[o]=cs(o,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},Ur=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(a,s){try{var l=function(){function d(c){return{values:r.raw?n:c,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?d(cr(e,n,f)):Promise.resolve(Dd(e,n,f)).then(d)}()}catch(d){return s(d)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof nn)return{values:{},errors:Fv(jv(a,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};const Ss=27,Cs=12,Es=10,Vv=Kt("enum"),Bv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Ur(Se({checked:no(ro(eo()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[Lt(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),Rt(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},zv=ne(({option:e,...t},r)=>u(Y,{children:[u("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),u("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Os=$r("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:ts}}}),Uv=({input:e,onSubmitSuccess:t})=>{var d,f;const r=e.key?(d=I.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,o=n&&e.config.options.length===2,{register:i,handleSubmit:a,formState:{errors:s}}=zr({defaultValues:{checked:n?{}:Vv(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:Bv(e.config)}),l=ti();return o?u("ul",{style:{maxHeight:6.5*Ss+5*Cs+2*Es},class:Os({variant:"booleanLike"}),children:e.config.options.map((c,h)=>u("li",{class:"flex-1",children:u(rs,{type:"submit",ref:m=>{m&&h===0&&(l.current=m)},label:c.label,value:"true",onClick:()=>t({type:"enum",value:[c.value]})})},c.value))}):u("form",{noValidate:!0,onSubmit:c=>a(h=>{const m=h.checked;t({type:"enum",value:m})})(c),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*Ss+5*Cs+2*Es},class:Os({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((c,h)=>{const m=`checked.${c.value}`,{ref:g,...v}=i(m);return u("li",{class:"relative",children:u(zv,{option:c,autoFocus:h===0,ref:_=>{_&&h===0&&(l.current=_),g(_)},id:m,...v,onClick:n?()=>t({type:"enum",value:[c.value]}):void 0})},c.value)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(lt,{}),e.config.minSelected===0&&u(ct,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(Xt,{error:(f=s.checked)==null?void 0:f.root})})]})},Hv=Kt("number"),Hr={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},qv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Ur(Se({number:on(Hr.number(),[Rd(t,Hr.min(t)),Ld(r,Hr.max(r)),Md(o=>o===Number(o.toFixed(n)),Hr.decimalCases(n))])}))},Kv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=I.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:a}}=zr({defaultValues:{number:r?Number(r):Hv(n)?n.value:void 0},resolver:qv(e.config)}),{ref:s,...l}=o("number",{required:!e.config.optional,valueAsNumber:!0}),d=F();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-grow",children:[u("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.current=c),s(c)},type:"text",min:e.config.min,max:e.config.max,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest [type=number:-webkit-inner-spin-button] w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all [-webkit-outer-spin-button:none]",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Xt,{error:a.number})]})},Ps="That doesn’t look like a valid phone number",Wv="44",Gv=Ce(Ps,[jd(/^\+?[0-9 -]+$/,Ps)]),Yv=e=>{const t={maxLength:`Please enter no more than ${e.maxChars??999} characters`,minLength:`Please enter ${e.minChars??1} or more characters`};return Ur(Se({text:no(Gv,r=>r.replace(/[^0-9]/g,""),[Rt(e.minChars??1,t.minLength),Lt(e.maxChars??1/0,t.maxLength)])}))},Zv=Kt("string"),Xv=({input:e,onSubmitSuccess:t})=>{var g;const r=e.key?(g=I.current$.value.flow)==null?void 0:g.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:a}}=zr({defaultValues:{text:n||(Zv(r)?r.value:"")},resolver:Yv(e.config)}),{ref:s,...l}=o("text",{required:!e.config.optional}),d=Wv,[f,c]=W(d),h=F(),m=F(null);return fe(()=>{h.current&&(h.current.focus(),h.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(v=>{t({type:"string",value:f+v.text})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[u("label",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus-within:bg-neutral-5 focus-within:outline-accent-7 relative flex h-full w-12 appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-lg border-solid bg-transparent bg-none py-1.5 text-center text-base transition-colors focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[u("span",{children:["+",f]}),u("select",{ref:m,onChange:v=>{var x;const _=(x=v.currentTarget.selectedOptions[0])==null?void 0:x.value;c(_)},required:!0,defaultValue:d,id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Qa).map(([v,_])=>u("option",{value:_,children:[v," (+",_,")"]},v))})]}),u("input",{...l,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:v=>{v&&(h.current=v),s(v)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest flex-1 rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Xt,{error:a.text})]})},Qv=({input:e,onSubmitSuccess:t})=>u("div",{class:"flex flex-col items-center py-3",children:u("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:u("span",{class:"flex items-center gap-1.5",children:[u("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),u("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:[u("path",{d:"M4 8L8 4L12 8"}),u("path",{d:"M8 4V13"})]})]})})}),di={empty:"Please enter some text",email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number",url:"That doesn’t look like a valid URL"},Jv={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},em=Kt("string"),tm=e=>{const t={maxLength:`Please enter no more than ${e.maxChars??999} characters`,minLength:`Please enter ${e.minChars??1} or more characters`};return Ur(Se({text:{email:Ce(di.email,[Fd(di.email),Rt(e.minChars??1,t.minLength),Lt(e.maxChars??1/0,t.maxLength)]),text:Ce([Rt(e.minChars??1,t.minLength),Lt(e.maxChars??1/0,t.maxLength)]),url:Ce([Vd(di.url),Rt(e.minChars??1,t.minLength),Lt(e.maxChars??1/0,t.maxLength)])}[e.format]}))},rm=({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=I.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:a}}=zr({defaultValues:{text:n||(em(r)?r.value:"")},resolver:tm(e.config)}),{ref:s,...l}=o("text",{required:!e.config.optional}),d=F();return fe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{t({type:"string",value:c.text})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[u("input",{id:"chat-input",...l,...Jv[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(d.current=c),s(c)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&u(ct,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),u(lt,{})]}),u(Xt,{error:a.text})]})},nm=()=>{var o;const e=(o=I.current$.value.flow)==null?void 0:o.data.currentInput,[t,r]=Gh(),n=F(null);return I.inputHeight$.value=r.height,j(()=>{const i=n.current;if(i)return i.addEventListener("transitionstart",Z.scrollToEnd.smooth),i.addEventListener("transitioncancel",Z.scrollToEnd.smooth),i.addEventListener("transitionend",Z.scrollToEnd.smooth),()=>{i.removeEventListener("transitionstart",Z.scrollToEnd.smooth),i.removeEventListener("transitioncancel",Z.scrollToEnd.smooth),i.removeEventListener("transitionend",Z.scrollToEnd.smooth)}},[]),u("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:u("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:Re({input:e}).with({input:q.nullish},()=>u("div",{class:"flex items-center gap-2 p-2.5",children:[u("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),u(lt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},i=>u(rm,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"phone"}},i=>u(Xv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"multiple-choice"}},i=>u(Uv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"boolean"}},i=>u(cv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"file"}},i=>u(mv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"submit"}},i=>u(Qv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"address"}},i=>u(iv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"number"}},i=>u(Kv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).exhaustive()})})};var im=function(e){return e instanceof RegExp},om=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},As=function(e){return typeof e=="string"},am=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function sm(e,t,r){var n=0,o=0;if(e==="")return e;if(!e||!As(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=t;im(i)||(i=new RegExp("("+om(i)+")","gi"));for(var a=e.split(i),s=1,l=a.length;s<l;s+=2){if(a[s]===void 0||a[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}o=a[s].length,n+=a[s-1].length,a[s]=r(a[s],s,n),n+=o}return a}var lm=function(t,r,n){return Array.isArray(t)||(t=[t]),am(t.map(function(o){return As(o)?sm(o,r,n):o}))};const fi=Ie(lm),cm=/(https?:\/\/[^\s]+)/g,um=/_(.*?)_/g,dm=/\*\*(.*?)\*\*/g,fm=e=>{const t=fi(e,cm,(o,i)=>u("a",{class:"text-accent-10 hover:text-accent-11 no-underline",href:o,children:o},o+i)),r=fi(t,um,(o,i)=>u("em",{children:o},o+i));return fi(r,dm,(o,i)=>u("strong",{children:o},o+i))},pm=$r("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"}}),hm=({children:e,className:t,animate:r,side:n,...o})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:pm({className:t,side:n,animate:r}),...o,children:e}),vm=({message:e})=>u("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:u("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,u("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("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"})})]})}),mm=({className:e,...t})=>(j(()=>{Z.scrollToEnd.smooth()}),u("div",{"aria-hidden":!0,children:Z.isBotTyping$.value===!0?u("div",{"aria-label":"Typing…",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>u("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),gm={bot:"left",user:"right"},bm=$r("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]"}}}),ym=({lastSentMessageFooter:e})=>{var r;const t=((r=I.current$.value.flow)==null?void 0:r.data.messages)??[];return j(()=>{Z.scrollToEnd.smooth()},[t.length]),u("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>u(Y,{children:u("li",{class:"flex",children:Re(n).with({type:"system"},i=>u("p",{class:bm({variant:i.variant}),children:i.text})).with({type:"text",author:q.union("bot","user")},i=>{const a=i.author==="user"&&!t.slice(o+1).some(l=>l.type==="text"&&l.author==="user"),s=o===t.length-1;return u(hm,{animate:s,side:gm[i.author],children:[fm(i.text),a?e:null]},o)}).with({type:"link"},i=>u(vm,{message:i})).with({type:"image"},i=>u("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=>u(pv,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).with({type:"loading"},i=>{const a=t[t.length-1];return!(i===a)||Z.isBotTyping$.value?null:u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(za,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},o)),u(mm,{},"typing")]})},_m=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=I.current$.value;ke(n,"Flow is required to exist to show chatbot body");const o=I.viewState$.value,{chatRef:i,chatService:a}=ev(),[s,l]=W();return fe(()=>{o==="maximised"&&Z.scrollToEnd.instant()},[o]),fe(()=>{var v,_;const{state:d,flow:f}=I.current$.peek();if(d!=="loaded")throw new Error(yh.invalid_state);let c=f.data.nodeHistory.at(-1);if(Z.scrollToEnd.instant(),I.setInput(void 0),f.data.isFinished)return;c===void 0?(c=La(n.nodes).id,I.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:f.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):I.removeMessagesSentByNodeIds([c]);const{interpret:h,abort:m,undo:g}=Dh({context:n.context,analytics:{service:r,customProperties:(_=n.analytics)==null?void 0:_.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=I.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,w)=>{var A;const O=I.current$.peek().flow;ke(O),w&&(O.data.sequence=O.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:w.id,flow_build:n.build,to_node_id:x.id,sequence:O.data.sequence,flow_session_id:O.data.flowSessionId,job:n.job},customProperties:(A=n.analytics)==null?void 0:A.customProperties})),I.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var w;I.markAsFinished();const x=I.current$.peek().flow;ke(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(w=n.analytics)==null?void 0:w.customProperties})}});return l(()=>g),h(c),m},[r,t,a,e,n]),u(Y,{children:[u("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:u(ym,{lastSentMessageFooter:n.data.isFinished||!s?null:u(xm,{undoFn:s})})}),u(nm,{})]})},wm=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],xm=({undoFn:e})=>u("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:u("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=I.current$.peek();ke(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(I.removeMessagesSentByNodeIds(n),I.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(wm).forEach(o=>delete t.data.submissions[o]),I.current$.value={...I.current$.value})},children:"Undo"})}),km=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:_m},Symbol.toStringTag,{value:"Module"}))})();
|