@inploi/plugin-chatbot 3.12.2 → 3.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js CHANGED
@@ -1,5 +1,5 @@
1
- var uy=Object.defineProperty;var dy=(pt,xe,E)=>xe in pt?uy(pt,xe,{enumerable:!0,configurable:!0,writable:!0,value:E}):pt[xe]=E;var cu=(pt,xe,E)=>(dy(pt,typeof xe!="symbol"?xe+"":xe,E),E);(function(){"use strict";var pt=e=>e,xe,E,jo,Uo,ht,zo,Ho,Wr,Wo,It={},Ko=[],lu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ln=Array.isArray;function Re(e,t){for(var n in t)e[n]=t[n];return e}function qo(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?xe.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return on(e,s,r,i,null)}function on(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++jo};return i==null&&E.vnode!=null&&E.vnode(o),o}function Go(){return{current:null}}function Q(e){return e.children}function ke(e,t){this.props=e,this.context=t}function Rn(e,t){if(t==null)return e.__?Rn(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Rn(e):null}function Yo(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Yo(e)}}function Kr(e){(!e.__d&&(e.__d=!0)&&ht.push(e)&&!Bn.__r++||zo!==E.debounceRendering)&&((zo=E.debounceRendering)||Ho)(Bn)}function Bn(){var e,t,n,r,i,o,s,a,l;for(ht.sort(Wr);e=ht.shift();)e.__d&&(t=ht.length,r=void 0,i=void 0,o=void 0,a=(s=(n=e).__v).__e,(l=n.__P)&&(r=[],i=[],(o=Re({},s)).__v=s.__v+1,qr(l,s,o,n.__n,l.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??Rn(s),s.__h,i),ns(r,s,i),s.__e!=a&&Yo(s)),ht.length>t&&ht.sort(Wr));Bn.__r=0}function Zo(e,t,n,r,i,o,s,a,l,u,d){var c,f,h,p,v,b,x,y,_,C,S=0,N=r&&r.__k||Ko,I=N.length,A=I,T=t.length;for(n.__k=[],c=0;c<T;c++)(p=n.__k[c]=(p=t[c])==null||typeof p=="boolean"||typeof p=="function"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?on(null,p,null,null,p):Ln(p)?on(Q,{children:p},null,null,null):p.__b>0?on(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null&&(p.__=n,p.__b=n.__b+1,(y=uu(p,N,x=c+S,A))===-1?h=It:(h=N[y]||It,N[y]=void 0,A--),qr(e,p,h,i,o,s,a,l,u,d),v=p.__e,(f=p.ref)&&h.ref!=f&&(h.ref&&Gr(h.ref,null,p),d.push(f,p.__c||v,p)),v!=null&&(b==null&&(b=v),C=!(_=h===It||h.__v===null)&&y===x,_?y==-1&&S--:y!==x&&(y===x+1?(S++,C=!0):y>x?A>T-x?(S+=y-x,C=!0):S--:S=y<x&&y==x-1?y-x:0),x=c+S,C=C||y==c&&!_,typeof p.type!="function"||y===x&&h.__k!==p.__k?typeof p.type=="function"||C?p.__d!==void 0?(l=p.__d,p.__d=void 0):l=v.nextSibling:l=Qo(e,v,l):l=Xo(p,l,e),typeof n.type=="function"&&(n.__d=l)));for(n.__e=b,c=I;c--;)N[c]!=null&&(typeof n.type=="function"&&N[c].__e!=null&&N[c].__e==n.__d&&(n.__d=N[c].__e.nextSibling),rs(N[c],N[c]))}function Xo(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t=typeof r.type=="function"?Xo(r,t,n):Qo(n,r.__e,t));return t}function Be(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ln(e)?e.some(function(n){Be(n,t)}):t.push(e)),t}function Qo(e,t,n){return n==null||n.parentNode!==e?e.insertBefore(t,null):t==n&&t.parentNode!=null||e.insertBefore(t,n),t.nextSibling}function uu(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(l===null||l&&i==l.key&&o===l.type)return n;if(r>(l!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&i==l.key&&o===l.type)return a;a++}}return-1}function du(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||jn(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||jn(e,o,t[o],n[o],r)}function Jo(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||lu.test(t)?n:n+"px"}function jn(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Jo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Jo(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?ts:es,o):e.removeEventListener(t,o?ts:es,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function es(e){return this.l[e.type+!1](E.event?E.event(e):e)}function ts(e){return this.l[e.type+!0](E.event?E.event(e):e)}function qr(e,t,n,r,i,o,s,a,l,u){var d,c,f,h,p,v,b,x,y,_,C,S,N,I,A,T=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(d=E.__b)&&d(t);try{e:if(typeof T=="function"){if(x=t.props,y=(d=T.contextType)&&r[d.__c],_=d?y?y.props.value:d.__:r,n.__c?b=(c=t.__c=n.__c).__=c.__E:("prototype"in T&&T.prototype.render?t.__c=c=new T(x,_):(t.__c=c=new ke(x,_),c.constructor=T,c.render=pu),y&&y.sub(c),c.props=x,c.state||(c.state={}),c.context=_,c.__n=r,f=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),T.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Re({},c.__s)),Re(c.__s,T.getDerivedStateFromProps(x,c.__s))),h=c.props,p=c.state,c.__v=t,f)T.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(T.getDerivedStateFromProps==null&&x!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,_),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,_)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(K){K&&(K.__=t)}),C=0;C<c._sb.length;C++)c.__h.push(c._sb[C]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,_),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,p,v)})}if(c.context=_,c.props=x,c.__P=e,c.__e=!1,S=E.__r,N=0,"prototype"in T&&T.prototype.render){for(c.state=c.__s,c.__d=!1,S&&S(t),d=c.render(c.props,c.state,c.context),I=0;I<c._sb.length;I++)c.__h.push(c._sb[I]);c._sb=[]}else do c.__d=!1,S&&S(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++N<25);c.state=c.__s,c.getChildContext!=null&&(r=Re(Re({},r),c.getChildContext())),f||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(h,p)),Zo(e,Ln(A=d!=null&&d.type===Q&&d.key==null?d.props.children:d)?A:[A],t,n,r,i,o,s,a,l,u),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),b&&(c.__E=c.__=null)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=fu(n.__e,t,n,r,i,o,s,l,u);(d=E.diffed)&&d(t)}catch(K){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),E.__e(K,t,n)}}function ns(e,t,n){for(var r=0;r<n.length;r++)Gr(n[r],n[++r],n[++r]);E.__c&&E.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){E.__e(o,i.__v)}})}function fu(e,t,n,r,i,o,s,a,l){var u,d,c,f=n.props,h=t.props,p=t.type,v=0;if(p==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((u=o[v])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,o[v]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),o=null,a=!1}if(p===null)f===h||a&&e.data===h||(e.data=h);else{if(o=o&&xe.call(e.childNodes),d=(f=n.props||It).dangerouslySetInnerHTML,c=h.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},v=0;v<e.attributes.length;v++)f[e.attributes[v].name]=e.attributes[v].value;(c||d)&&(c&&(d&&c.__html==d.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(du(e,h,f,i,a),c)t.__k=[];else if(Zo(e,Ln(v=t.props.children)?v:[v],t,n,r,i&&p!=="foreignObject",o,s,o?o[0]:n.__k&&Rn(n,0),a,l),o!=null)for(v=o.length;v--;)o[v]!=null&&qo(o[v]);a||("value"in h&&(v=h.value)!==void 0&&(v!==e.value||p==="progress"&&!v||p==="option"&&v!==f.value)&&jn(e,"value",v,f.value,!1),"checked"in h&&(v=h.checked)!==void 0&&v!==e.checked&&jn(e,"checked",v,f.checked,!1))}return e}function Gr(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){E.__e(r,n)}}function rs(e,t,n){var r,i;if(E.unmount&&E.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Gr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){E.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&rs(r[i],t,n||typeof e.type!="function");n||e.__e==null||qo(e.__e),e.__=e.__e=e.__d=void 0}function pu(e,t,n){return this.constructor(e,n)}function Dt(e,t,n){var r,i,o,s;E.__&&E.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],qr(t,e=(!r&&n||t).__k=O(Q,null,[e]),i||It,It,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?xe.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),ns(o,e,s)}function is(e,t){Dt(e,t,is)}function hu(e,t,n){var r,i,o,s,a=Re({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?xe.call(arguments,2):n),on(e.type,a,r||e.key,i||e.ref,null)}function Ee(e,t){var n={__c:t="__cC"+Wo++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(a){a.__e=!0,Kr(a)})},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}xe=Ko.slice,E={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},jo=0,Uo=function(e){return e!=null&&e.constructor===void 0},ke.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Re({},this.state),typeof e=="function"&&(e=e(Re({},n),this.props)),e&&Re(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Kr(this))},ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Kr(this))},ke.prototype.render=Q,ht=[],Ho=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wr=function(e,t){return e.__v.__b-t.__v.__b},Bn.__r=0,Wo=0;var Yr=class extends Error{constructor(t){super(t[0].message);cu(this,"issues");this.name="ValiError",this.issues=t}};function os(e,t){return{...e,_parse(n,r){return e._parse(t(n),r)}}}function sn(e){return{issues:e}}function qe(e){return{output:e}}function vu(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 mu(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 Ge(e,t,n,r){if(!t||!t.length||n!=null&&n.skipPipe)return qe(e);let i,o,s=e;for(const a of t){const l=a._parse(s);if(l.issues){i=i||mu(n,r);for(const u of l.issues){const d=vu(i,u);o?o.push(d):o=[d]}if(i.abortEarly||i.abortPipeEarly)break}else s=l.output}return o?sn(o):qe(s)}function Ye(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function ss(e){return typeof e=="function"?e():e}function an(e,t,n,r){return sn([{validation:e,message:ss(t),input:n,requirement:r}])}function gu(e,t,n){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,s]=Ye(t,n);return[e,o,s]}const[r,i]=Ye(e,t);return[void 0,r,i]}function vt(e,t,n,r,i,o){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:ss(r),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function as(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return Ge(t,this.pipe,n,"any")}}}function cs(e,t,n){const[r="Invalid type",i]=Ye(t,n);return{type:"array",async:!1,item:e,message:r,pipe:i,_parse(o,s){if(!Array.isArray(o))return vt(s,"type","array",this.message,o);let a;const l=[];for(let u=0;u<o.length;u++){const d=o[u],c=this.item._parse(d,s);if(c.issues){const f={type:"array",input:o,key:u,value:d};for(const h of c.issues)h.path?h.path.unshift(f):h.path=[f],a==null||a.push(h);if(a||(a=c.issues),s!=null&&s.abortEarly)break}else l.push(c.output)}return a?sn(a):Ge(l,this.pipe,s,"array")}}}function yu(e,t){const[n="Invalid type",r]=Ye(e,t);return{type:"boolean",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="boolean"?vt(o,"type","boolean",this.message,i):Ge(i,this.pipe,o,"boolean")}}}function bu(e,t){const[n="Invalid type",r]=Ye(e,t);return{type:"number",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="number"||isNaN(i)?vt(o,"type","number",this.message,i):Ge(i,this.pipe,o,"number")}}}function Ze(e,t,n,r){const[i,o="Invalid type",s]=gu(t,n,r);let a;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:s,_parse(l,u){if(!l||typeof l!="object")return vt(u,"type","object",this.message,l);a=a||Object.entries(this.entries);let d;const c={};for(const[f,h]of a){const p=l[f],v=h._parse(p,u);if(v.issues){const b={type:"object",input:l,key:f,value:p};for(const x of v.issues)x.path?x.path.unshift(b):x.path=[b],d==null||d.push(x);if(d||(d=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||f in l)&&(c[f]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in l)if(!(f in this.entries)){const h=l[f],p=this.rest._parse(h,u);if(p.issues){const v={type:"object",input:l,key:f,value:h};for(const b of p.issues)b.path?b.path.unshift(v):b.path=[v],d==null||d.push(b);if(d||(d=p.issues),u!=null&&u.abortEarly)break}else c[f]=p.output}}return d?sn(d):Ge(c,this.pipe,u,"object")}}}function wu(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(n,r){return this.options.includes(n)?qe(n):vt(r,"type","picklist",this.message,n)}}}function $e(e,t){const[n="Invalid type",r]=Ye(e,t);return{type:"string",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="string"?vt(o,"type","string",this.message,i):Ge(i,this.pipe,o,"string")}}}function _u(e,t,n,r){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=Ye(n,r);return[e,t,s,a]}const[i,o]=Ye(t,n);return[$e(),e,i,o]}var xu=["__proto__","prototype","constructor"];function ls(e,t,n,r){const[i,o,s="Invalid type",a]=_u(e,t,n,r);return{type:"record",async:!1,key:i,value:o,message:s,pipe:a,_parse(l,u){if(!l||typeof l!="object")return vt(u,"type","record",this.message,l);let d;const c={};for(const[f,h]of Object.entries(l))if(!xu.includes(f)){let p;const v=this.key._parse(f,{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){p={type:"record",input:l,key:f,value:h};for(const x of v.issues)x.path=[p],d==null||d.push(x);if(d||(d=v.issues),u!=null&&u.abortEarly)break}const b=this.value._parse(h,u);if(b.issues){p=p||{type:"record",input:l,key:f,value:h};for(const x of b.issues)x.path?x.path.unshift(p):x.path=[p],d==null||d.push(x);if(d||(d=b.issues),u!=null&&u.abortEarly)break}!v.issues&&!b.issues&&(c[v.output]=b.output)}return d?sn(d):Ge(c,this.pipe,u,"record")}}}function cn(e,t,n){const r=e._parse(t,n);if(r.issues)throw new Yr(r.issues);return r.output}async function ku(e,t,n){const r=await e._parse(t,n);if(r.issues)throw new Yr(r.issues);return r.output}function us(e,t,n){return{...e,_parse(r,i){const o=e._parse(r,i);if(o.issues)return o;const s=t(o.output);return n&&!Array.isArray(n)?n._parse(s,i):Ge(s,n,i,typeof s)}}}var Su=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Cu(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Su,_parse(t){return this.requirement.test(t)?qe(t):an(this.type,this.message,t,this.requirement)}}}function $u(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(n){return n.length>this.requirement?an(this.type,this.message,n,this.requirement):qe(n)}}}function ds(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(n){return n.length<this.requirement?an(this.type,this.message,n,this.requirement):qe(n)}}}function Au(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(n){return this.requirement.test(n)?qe(n):an(this.type,this.message,n,this.requirement)}}}function Pu(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)?qe(t):an(this.type,this.message,t,this.requirement)}}}var Eu=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function Xe(e,t){if(!e)throw new Error(t)}function Zr(e,t){return t in e}function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be.apply(this,arguments)}var je,q,Xr,fs,Nt=0,ps=[],Un=[],hs=E.__b,vs=E.__r,ms=E.diffed,gs=E.__c,ys=E.unmount;function mt(e,t){E.__h&&E.__h(q,e,Nt||t),Nt=0;var n=q.__H||(q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Un}),n.__[e]}function ie(e){return Nt=1,zn(xs,e)}function zn(e,t,n){var r=mt(je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):xs(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=q,!q.u)){var i=function(a,l,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!o||o.call(this,a,l,u);var c=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(c=!0)}}),!(!c&&r.__c.props===a)&&(!o||o.call(this,a,l,u))};q.u=!0;var o=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(a,l,u){if(this.__e){var d=o;o=void 0,i(a,l,u),o=d}s&&s.call(this,a,l,u)},q.shouldComponentUpdate=i}return r.__N||r.__}function W(e,t){var n=mt(je++,3);!E.__s&&Jr(n.__H,t)&&(n.__=e,n.i=t,q.__H.__h.push(n))}function Ae(e,t){var n=mt(je++,4);!E.__s&&Jr(n.__H,t)&&(n.__=e,n.i=t,q.__h.push(n))}function j(e){return Nt=5,se(function(){return{current:e}},[])}function bs(e,t,n){Nt=6,Ae(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function se(e,t){var n=mt(je++,7);return Jr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Nt=8,se(function(){return e},t)}function fe(e){var t=q.context[e.__c],n=mt(je++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(q)),t.props.value):e.__}function ws(e,t){E.useDebugValue&&E.useDebugValue(t?t(e):e)}function Tu(e){var t=mt(je++,10),n=ie();return t.__=e,q.componentDidCatch||(q.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Hn(){var e=mt(je++,11);if(!e.__){for(var t=q.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Vu(){for(var e;e=ps.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Wn),e.__H.__h.forEach(Qr),e.__H.__h=[]}catch(t){e.__H.__h=[],E.__e(t,e.__v)}}E.__b=function(e){q=null,hs&&hs(e)},E.__r=function(e){vs&&vs(e),je=0;var t=(q=e.__c).__H;t&&(Xr===q?(t.__h=[],q.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Un,n.__N=n.i=void 0})):(t.__h.forEach(Wn),t.__h.forEach(Qr),t.__h=[],je=0)),Xr=q},E.diffed=function(e){ms&&ms(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ps.push(t)!==1&&fs===E.requestAnimationFrame||((fs=E.requestAnimationFrame)||Mu)(Vu)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Un&&(n.__=n.__V),n.i=void 0,n.__V=Un})),Xr=q=null},E.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Wn),n.__h=n.__h.filter(function(r){return!r.__||Qr(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],E.__e(r,n.__v)}}),gs&&gs(e,t)},E.unmount=function(e){ys&&ys(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Wn(r)}catch(i){t=i}}),n.__H=void 0,t&&E.__e(t,n.__v))};var _s=typeof requestAnimationFrame=="function";function Mu(e){var t,n=function(){clearTimeout(r),_s&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);_s&&(t=requestAnimationFrame(n))}function Wn(e){var t=q,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),q=t}function Qr(e){var t=q;e.__c=e.__(),q=t}function Jr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function xs(e,t){return typeof t=="function"?t(e):t}function ks(e,t){for(var n in t)e[n]=t[n];return e}function ei(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function ti(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Kn(e){this.props=e}function Ss(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:ei(this.props,i)}function r(i){return this.shouldComponentUpdate=n,O(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Kn.prototype=new ke).isPureReactComponent=!0,Kn.prototype.shouldComponentUpdate=function(e,t){return ei(this.props,e)||ei(this.state,t)};var Cs=E.__b;E.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Cs&&Cs(e)};var Ou=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function pe(e){function t(n){var r=ks({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Ou,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $s=function(e,t){return e==null?null:Be(Be(e).map(t))},Oe={map:$s,forEach:$s,count:function(e){return e?Be(e).length:0},only:function(e){var t=Be(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Be},Fu=E.__e;E.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Fu(e,t,n,r)};var As=E.unmount;function Ps(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ks({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Ps(r,t,n)})),e}function Es(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Es(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Lt(){this.__u=0,this.t=null,this.__b=null}function Ts(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ni(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return O(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Rt(){this.u=null,this.o=null}E.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),As&&As(e)},(Lt.prototype=new ke).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Ts(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Es(u,u.__c.__P,u.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Lt.prototype.componentWillUnmount=function(){this.t=[]},Lt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ps(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&O(Q,null,e.fallback);return i&&(i.__h=null),[O(Q,null,t.__a?null:e.children),i]};var Vs=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Iu(e){return this.getChildContext=function(){return e.context},e.children}function Du(e){var t=this,n=e.i;t.componentWillUnmount=function(){Dt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Dt(O(Iu,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ms(e,t){var n=O(Du,{__v:e,i:t});return n.containerInfo=t,n}(Rt.prototype=new ke).__a=function(e){var t=this,n=Ts(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Vs(t,e,r)):i()};n?n(o):o()}},Rt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Be(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Rt.prototype.componentDidUpdate=Rt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Vs(e,n,t)})};var Os=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Nu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Lu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ru=/[A-Z0-9]/g,Bu=typeof document<"u",ju=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Fs(e,t,n){return t.__k==null&&(t.textContent=""),Dt(e,t),typeof n=="function"&&n(),e?e.__c:null}function Is(e,t,n){return is(e,t),typeof n=="function"&&n(),e?e.__c:null}ke.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ke.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ds=E.event;function Uu(){}function zu(){return this.cancelBubble}function Hu(){return this.defaultPrevented}E.event=function(e){return Ds&&(e=Ds(e)),e.persist=Uu,e.isPropagationStopped=zu,e.isDefaultPrevented=Hu,e.nativeEvent=e};var ri,Wu={enumerable:!1,configurable:!0,get:function(){return this.class}},Ns=E.vnode;E.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var o in n){var s=n[o];if(!(o==="value"&&"defaultValue"in n&&s==null||Bu&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===!0?s="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||ju(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":Lu.test(o)?o=a:r.indexOf("-")===-1&&Nu.test(o)?o=o.replace(Ru,"-$&").toLowerCase():s===null&&(s=void 0):a=o="oninput",a==="oninput"&&i[o=a]&&(o="oninputCapture"),i[o]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Be(n.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Be(n.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Wu)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=Os,Ns&&Ns(e)};var Ls=E.__r;E.__r=function(e){Ls&&Ls(e),ri=e.__c};var Rs=E.diffed;E.diffed=function(e){Rs&&Rs(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),ri=null};var Bs={ReactCurrentDispatcher:{current:{readContext:function(e){return ri.__n[e.__c].props.value}}}},Ku="17.0.2";function js(e){return O.bind(null,e)}function Qe(e){return!!e&&e.$$typeof===Os}function Je(e){return Qe(e)?hu.apply(null,arguments):e}function Us(e){return!!e.__k&&(Dt(null,e),!0)}function zs(e){return e&&(e.base||e.nodeType===1&&e)||null}var Hs=function(e,t){return e(t)},qn=function(e,t){return e(t)},Ws=Q;function ii(e){e()}function Ks(e){return e}function qs(){return[!1,ii]}var Gn=Ae;function Gs(e,t){var n=t(),r=ie({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ae(function(){i.__=n,i.v=t,ti(i.__,t())||o({h:i})},[e,n,t]),W(function(){return ti(i.__,i.v())||o({h:i}),e(function(){ti(i.__,i.v())||o({h:i})})},[e]),n}var Te={useState:ie,useId:Hn,useReducer:zn,useEffect:W,useLayoutEffect:Ae,useInsertionEffect:Gn,useTransition:qs,useDeferredValue:Ks,useSyncExternalStore:Gs,startTransition:ii,useRef:j,useImperativeHandle:bs,useMemo:se,useCallback:ae,useContext:fe,useDebugValue:ws,version:"17.0.2",Children:Oe,render:Fs,hydrate:Is,unmountComponentAtNode:Us,createPortal:Ms,createElement:O,createContext:Ee,createFactory:js,cloneElement:Je,createRef:Go,Fragment:Q,isValidElement:Qe,findDOMNode:zs,Component:ke,PureComponent:Kn,memo:Ss,forwardRef:pe,flushSync:qn,unstable_batchedUpdates:Hs,StrictMode:Ws,Suspense:Lt,SuspenseList:Rt,lazy:ni,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bs};const qu=Object.freeze(Object.defineProperty({__proto__:null,Children:Oe,Component:ke,Fragment:Q,PureComponent:Kn,StrictMode:Ws,Suspense:Lt,SuspenseList:Rt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bs,cloneElement:Je,createContext:Ee,createElement:O,createFactory:js,createPortal:Ms,createRef:Go,default:Te,findDOMNode:zs,flushSync:qn,forwardRef:pe,hydrate:Is,isValidElement:Qe,lazy:ni,memo:Ss,render:Fs,startTransition:ii,unmountComponentAtNode:Us,unstable_batchedUpdates:Hs,useCallback:ae,useContext:fe,useDebugValue:ws,useDeferredValue:Ks,useEffect:W,useErrorBoundary:Tu,useId:Hn,useImperativeHandle:bs,useInsertionEffect:Gn,useLayoutEffect:Ae,useMemo:se,useReducer:zn,useRef:j,useState:ie,useSyncExternalStore:Gs,useTransition:qs,version:Ku},Symbol.toStringTag,{value:"Module"}));function Bt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Gu(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ys(...e){return t=>e.forEach(n=>Gu(n,t))}function ln(...e){return ae(Ys(...e),e)}function Yu(e,t=[]){let n=[];function r(o,s){const a=Ee(s),l=n.length;n=[...n,s];function u(c){const{scope:f,children:h,...p}=c,v=(f==null?void 0:f[e][l])||a,b=se(()=>p,Object.values(p));return O(v.Provider,{value:b},h)}function d(c,f){const h=(f==null?void 0:f[e][l])||a,p=fe(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>Ee(s));return function(a){const l=(a==null?void 0:a[e])||o;return se(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,Zu(i,...t)]}function Zu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...a,...c}},{});return se(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const oi=globalThis!=null&&globalThis.document?Ae:()=>{},Xu=qu["useId".toString()]||(()=>{});let Qu=0;function si(e){const[t,n]=ie(Xu());return oi(()=>{e||n(r=>r??String(Qu++))},[e]),e||(t?`radix-${t}`:"")}function gt(e){const t=j(e);return W(()=>{t.current=e}),se(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Ju({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=ed({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=gt(n),l=ae(u=>{if(o){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else i(u)},[o,e,i,a]);return[s,l]}function ed({defaultProp:e,onChange:t}){const n=ie(e),[r]=n,i=j(r),o=gt(t);return W(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const ai=pe((e,t)=>{const{children:n,...r}=e,i=Oe.toArray(n),o=i.find(nd);if(o){const s=o.props.children,a=i.map(l=>l===o?Oe.count(s)>1?Oe.only(null):Qe(s)?s.props.children:null:l);return O(ci,be({},r,{ref:t}),Qe(s)?Je(s,void 0,a):null)}return O(ci,be({},r,{ref:t}),n)});ai.displayName="Slot";const ci=pe((e,t)=>{const{children:n,...r}=e;return Qe(n)?Je(n,{...rd(r,n.props),ref:t?Ys(t,n.ref):n.ref}):Oe.count(n)>1?Oe.only(null):null});ci.displayName="SlotClone";const td=({children:e})=>O(Q,null,e);function nd(e){return Qe(e)&&e.type===td}function rd(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const li=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=pe((r,i)=>{const{asChild:o,...s}=r,a=o?ai:t;return W(()=>{window[Symbol.for("radix-ui")]=!0},[]),O(a,be({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function id(e,t){e&&qn(()=>e.dispatchEvent(t))}function od(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e);W(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ui="dismissableLayer.update",sd="dismissableLayer.pointerDownOutside",ad="dismissableLayer.focusOutside";let Zs;const cd=Ee({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ld=pe((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...u}=e,d=fe(cd),[c,f]=ie(null),h=(n=c==null?void 0:c.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,p]=ie({}),v=ln(t,A=>f(A)),b=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(x),_=c?b.indexOf(c):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,S=_>=y,N=ud(A=>{const T=A.target,K=[...d.branches].some(J=>J.contains(T));!S||K||(o==null||o(A),a==null||a(A),A.defaultPrevented||l==null||l())},h),I=dd(A=>{const T=A.target;[...d.branches].some(J=>J.contains(T))||(s==null||s(A),a==null||a(A),A.defaultPrevented||l==null||l())},h);return od(A=>{_===d.layers.size-1&&(i==null||i(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},h),W(()=>{if(c)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Zs=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(c)),d.layers.add(c),Xs(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Zs)}},[c,h,r,d]),W(()=>()=>{c&&(d.layers.delete(c),d.layersWithOutsidePointerEventsDisabled.delete(c),Xs())},[c,d]),W(()=>{const A=()=>p({});return document.addEventListener(ui,A),()=>document.removeEventListener(ui,A)},[]),O(li.div,be({},u,{ref:v,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:Bt(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Bt(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Bt(e.onPointerDownCapture,N.onPointerDownCapture)}))});function ud(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e),r=j(!1),i=j(()=>{});return W(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){Qs(sd,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dd(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e),r=j(!1);return W(()=>{const i=o=>{o.target&&!r.current&&Qs(ad,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xs(){const e=new CustomEvent(ui);document.dispatchEvent(e)}function Qs(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?id(i,o):i.dispatchEvent(o)}const di="focusScope.autoFocusOnMount",fi="focusScope.autoFocusOnUnmount",Js={bubbles:!1,cancelable:!0},fd=pe((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=ie(null),u=gt(i),d=gt(o),c=j(null),f=ln(t,v=>l(v)),h=j({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W(()=>{if(r){let v=function(_){if(h.paused||!a)return;const C=_.target;a.contains(C)?c.current=C:et(c.current,{select:!0})},b=function(_){if(h.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||et(c.current,{select:!0}))},x=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&et(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,h.paused]),W(()=>{if(a){na.add(h);const v=document.activeElement;if(!a.contains(v)){const x=new CustomEvent(di,Js);a.addEventListener(di,u),a.dispatchEvent(x),x.defaultPrevented||(pd(yd(ea(a)),{select:!0}),document.activeElement===v&&et(a))}return()=>{a.removeEventListener(di,u),setTimeout(()=>{const x=new CustomEvent(fi,Js);a.addEventListener(fi,d),a.dispatchEvent(x),x.defaultPrevented||et(v??document.body,{select:!0}),a.removeEventListener(fi,d),na.remove(h)},0)}}},[a,u,d,h]);const p=ae(v=>{if(!n&&!r||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(b&&x){const y=v.currentTarget,[_,C]=hd(y);_&&C?!v.shiftKey&&x===C?(v.preventDefault(),n&&et(_,{select:!0})):v.shiftKey&&x===_&&(v.preventDefault(),n&&et(C,{select:!0})):x===y&&v.preventDefault()}},[n,r,h.paused]);return O(li.div,be({tabIndex:-1},s,{ref:f,onKeyDown:p}))});function pd(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(et(r,{select:t}),document.activeElement!==n)return}function hd(e){const t=ea(e),n=ta(t,e),r=ta(t.reverse(),e);return[n,r]}function ea(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ta(e,t){for(const n of e)if(!vd(n,{upTo:t}))return n}function vd(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 md(e){return e instanceof HTMLInputElement&&"select"in e}function et(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&md(e)&&t&&e.select()}}const na=gd();function gd(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ra(e,t),e.unshift(t)},remove(t){var n;e=ra(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ra(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yd(e){return e.filter(t=>t.tagName!=="A")}function bd(e,t){return zn((n,r)=>{const i=t[n][r];return i??n},e)}const pi=e=>{const{present:t,children:n}=e,r=wd(t),i=typeof n=="function"?n({present:r.isPresent}):Oe.only(n),o=ln(r.ref,i.ref);return typeof n=="function"||r.isPresent?Je(i,{ref:o}):null};pi.displayName="Presence";function wd(e){const[t,n]=ie(),r=j({}),i=j(e),o=j("none"),s=e?"mounted":"unmounted",[a,l]=bd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W(()=>{const u=Yn(r.current);o.current=a==="mounted"?u:"none"},[a]),oi(()=>{const u=r.current,d=i.current;if(d!==e){const f=o.current,h=Yn(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),oi(()=>{if(t){const u=c=>{const h=Yn(r.current).includes(c.animationName);c.target===t&&h&&qn(()=>l("ANIMATION_END"))},d=c=>{c.target===t&&(o.current=Yn(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:ae(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Yn(e){return(e==null?void 0:e.animationName)||"none"}let hi=0;function _d(){W(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:ia()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:ia()),hi++,()=>{hi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),hi--}},[])}function ia(){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 Fe=function(){return Fe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Fe.apply(this,arguments)};function oa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function xd(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Zn="right-scroll-bar-position",Xn="width-before-scroll-bar",kd="with-scroll-bars-hidden",Sd="--removed-body-scroll-bar-size";function Cd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $d(e,t){var n=ie(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Ad(e,t){return $d(t||null,function(n){return e.forEach(function(r){return Cd(r,n)})})}function Pd(e){return e}function Ed(e,t){t===void 0&&(t=Pd);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var l=function(){var d=s;s=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return i}function Td(e){e===void 0&&(e={});var t=Ed(null);return t.options=Fe({async:!0,ssr:!1},e),t}var sa=function(e){var t=e.sideCar,n=oa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return O(r,Fe({},n))};sa.isSideCarExport=!0;function Vd(e,t){return e.useMedium(t),sa}var aa=Td(),vi=function(){},Qn=pe(function(e,t){var n=j(null),r=ie({onScrollCapture:vi,onWheelCapture:vi,onTouchMoveCapture:vi}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,v=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,y=oa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,C=Ad([n,t]),S=Fe(Fe({},y),i);return O(Q,null,d&&O(_,{sideCar:aa,removeScrollBar:u,shards:c,noIsolation:h,inert:p,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),s?Je(Oe.only(a),Fe(Fe({},S),{ref:C})):O(x,Fe({},S,{className:l,ref:C}),a))});Qn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qn.classNames={fullWidth:Xn,zeroRight:Zn};var ca,Md=function(){if(ca)return ca;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Od(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Md();return t&&e.setAttribute("nonce",t),e}function Fd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Id(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Dd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Od())&&(Fd(t,n),Id(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Nd=function(){var e=Dd();return function(t,n){W(function(){return e.add(t),function(){e.remove()}},[t&&n])}},la=function(){var e=Nd(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Ld={left:0,top:0,right:0,gap:0},mi=function(e){return parseInt(e||"",10)||0},Rd=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[mi(n),mi(r),mi(i)]},Bd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ld;var t=Rd(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jd=la(),Ud=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(kd,` {
1
+ var dy=Object.defineProperty;var fy=(pt,xe,E)=>xe in pt?dy(pt,xe,{enumerable:!0,configurable:!0,writable:!0,value:E}):pt[xe]=E;var lu=(pt,xe,E)=>(fy(pt,typeof xe!="symbol"?xe+"":xe,E),E);(function(){"use strict";var pt=e=>e,xe,E,jo,Uo,ht,zo,Ho,Wr,Wo,It={},Ko=[],uu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ln=Array.isArray;function Re(e,t){for(var n in t)e[n]=t[n];return e}function qo(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?xe.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return on(e,s,r,i,null)}function on(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++jo};return i==null&&E.vnode!=null&&E.vnode(o),o}function Go(){return{current:null}}function Q(e){return e.children}function ke(e,t){this.props=e,this.context=t}function Rn(e,t){if(t==null)return e.__?Rn(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Rn(e):null}function Yo(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Yo(e)}}function Kr(e){(!e.__d&&(e.__d=!0)&&ht.push(e)&&!Bn.__r++||zo!==E.debounceRendering)&&((zo=E.debounceRendering)||Ho)(Bn)}function Bn(){var e,t,n,r,i,o,s,a,l;for(ht.sort(Wr);e=ht.shift();)e.__d&&(t=ht.length,r=void 0,i=void 0,o=void 0,a=(s=(n=e).__v).__e,(l=n.__P)&&(r=[],i=[],(o=Re({},s)).__v=s.__v+1,qr(l,s,o,n.__n,l.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??Rn(s),s.__h,i),ns(r,s,i),s.__e!=a&&Yo(s)),ht.length>t&&ht.sort(Wr));Bn.__r=0}function Zo(e,t,n,r,i,o,s,a,l,u,d){var c,f,h,p,m,b,x,y,_,C,S=0,N=r&&r.__k||Ko,I=N.length,A=I,T=t.length;for(n.__k=[],c=0;c<T;c++)(p=n.__k[c]=(p=t[c])==null||typeof p=="boolean"||typeof p=="function"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?on(null,p,null,null,p):Ln(p)?on(Q,{children:p},null,null,null):p.__b>0?on(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null&&(p.__=n,p.__b=n.__b+1,(y=du(p,N,x=c+S,A))===-1?h=It:(h=N[y]||It,N[y]=void 0,A--),qr(e,p,h,i,o,s,a,l,u,d),m=p.__e,(f=p.ref)&&h.ref!=f&&(h.ref&&Gr(h.ref,null,p),d.push(f,p.__c||m,p)),m!=null&&(b==null&&(b=m),C=!(_=h===It||h.__v===null)&&y===x,_?y==-1&&S--:y!==x&&(y===x+1?(S++,C=!0):y>x?A>T-x?(S+=y-x,C=!0):S--:S=y<x&&y==x-1?y-x:0),x=c+S,C=C||y==c&&!_,typeof p.type!="function"||y===x&&h.__k!==p.__k?typeof p.type=="function"||C?p.__d!==void 0?(l=p.__d,p.__d=void 0):l=m.nextSibling:l=Qo(e,m,l):l=Xo(p,l,e),typeof n.type=="function"&&(n.__d=l)));for(n.__e=b,c=I;c--;)N[c]!=null&&(typeof n.type=="function"&&N[c].__e!=null&&N[c].__e==n.__d&&(n.__d=N[c].__e.nextSibling),rs(N[c],N[c]))}function Xo(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t=typeof r.type=="function"?Xo(r,t,n):Qo(n,r.__e,t));return t}function Be(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ln(e)?e.some(function(n){Be(n,t)}):t.push(e)),t}function Qo(e,t,n){return n==null||n.parentNode!==e?e.insertBefore(t,null):t==n&&t.parentNode!=null||e.insertBefore(t,n),t.nextSibling}function du(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(l===null||l&&i==l.key&&o===l.type)return n;if(r>(l!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&i==l.key&&o===l.type)return a;a++}}return-1}function fu(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||jn(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||jn(e,o,t[o],n[o],r)}function Jo(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||uu.test(t)?n:n+"px"}function jn(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Jo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Jo(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?ts:es,o):e.removeEventListener(t,o?ts:es,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function es(e){return this.l[e.type+!1](E.event?E.event(e):e)}function ts(e){return this.l[e.type+!0](E.event?E.event(e):e)}function qr(e,t,n,r,i,o,s,a,l,u){var d,c,f,h,p,m,b,x,y,_,C,S,N,I,A,T=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(d=E.__b)&&d(t);try{e:if(typeof T=="function"){if(x=t.props,y=(d=T.contextType)&&r[d.__c],_=d?y?y.props.value:d.__:r,n.__c?b=(c=t.__c=n.__c).__=c.__E:("prototype"in T&&T.prototype.render?t.__c=c=new T(x,_):(t.__c=c=new ke(x,_),c.constructor=T,c.render=hu),y&&y.sub(c),c.props=x,c.state||(c.state={}),c.context=_,c.__n=r,f=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),T.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Re({},c.__s)),Re(c.__s,T.getDerivedStateFromProps(x,c.__s))),h=c.props,p=c.state,c.__v=t,f)T.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(T.getDerivedStateFromProps==null&&x!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,_),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,_)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(K){K&&(K.__=t)}),C=0;C<c._sb.length;C++)c.__h.push(c._sb[C]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,_),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,p,m)})}if(c.context=_,c.props=x,c.__P=e,c.__e=!1,S=E.__r,N=0,"prototype"in T&&T.prototype.render){for(c.state=c.__s,c.__d=!1,S&&S(t),d=c.render(c.props,c.state,c.context),I=0;I<c._sb.length;I++)c.__h.push(c._sb[I]);c._sb=[]}else do c.__d=!1,S&&S(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++N<25);c.state=c.__s,c.getChildContext!=null&&(r=Re(Re({},r),c.getChildContext())),f||c.getSnapshotBeforeUpdate==null||(m=c.getSnapshotBeforeUpdate(h,p)),Zo(e,Ln(A=d!=null&&d.type===Q&&d.key==null?d.props.children:d)?A:[A],t,n,r,i,o,s,a,l,u),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),b&&(c.__E=c.__=null)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=pu(n.__e,t,n,r,i,o,s,l,u);(d=E.diffed)&&d(t)}catch(K){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),E.__e(K,t,n)}}function ns(e,t,n){for(var r=0;r<n.length;r++)Gr(n[r],n[++r],n[++r]);E.__c&&E.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){E.__e(o,i.__v)}})}function pu(e,t,n,r,i,o,s,a,l){var u,d,c,f=n.props,h=t.props,p=t.type,m=0;if(p==="svg"&&(i=!0),o!=null){for(;m<o.length;m++)if((u=o[m])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,o[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),o=null,a=!1}if(p===null)f===h||a&&e.data===h||(e.data=h);else{if(o=o&&xe.call(e.childNodes),d=(f=n.props||It).dangerouslySetInnerHTML,c=h.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},m=0;m<e.attributes.length;m++)f[e.attributes[m].name]=e.attributes[m].value;(c||d)&&(c&&(d&&c.__html==d.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(fu(e,h,f,i,a),c)t.__k=[];else if(Zo(e,Ln(m=t.props.children)?m:[m],t,n,r,i&&p!=="foreignObject",o,s,o?o[0]:n.__k&&Rn(n,0),a,l),o!=null)for(m=o.length;m--;)o[m]!=null&&qo(o[m]);a||("value"in h&&(m=h.value)!==void 0&&(m!==e.value||p==="progress"&&!m||p==="option"&&m!==f.value)&&jn(e,"value",m,f.value,!1),"checked"in h&&(m=h.checked)!==void 0&&m!==e.checked&&jn(e,"checked",m,f.checked,!1))}return e}function Gr(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){E.__e(r,n)}}function rs(e,t,n){var r,i;if(E.unmount&&E.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Gr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){E.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&rs(r[i],t,n||typeof e.type!="function");n||e.__e==null||qo(e.__e),e.__=e.__e=e.__d=void 0}function hu(e,t,n){return this.constructor(e,n)}function Dt(e,t,n){var r,i,o,s;E.__&&E.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],qr(t,e=(!r&&n||t).__k=O(Q,null,[e]),i||It,It,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?xe.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),ns(o,e,s)}function is(e,t){Dt(e,t,is)}function mu(e,t,n){var r,i,o,s,a=Re({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?xe.call(arguments,2):n),on(e.type,a,r||e.key,i||e.ref,null)}function Ee(e,t){var n={__c:t="__cC"+Wo++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(a){a.__e=!0,Kr(a)})},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}xe=Ko.slice,E={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},jo=0,Uo=function(e){return e!=null&&e.constructor===void 0},ke.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Re({},this.state),typeof e=="function"&&(e=e(Re({},n),this.props)),e&&Re(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Kr(this))},ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Kr(this))},ke.prototype.render=Q,ht=[],Ho=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wr=function(e,t){return e.__v.__b-t.__v.__b},Bn.__r=0,Wo=0;var Yr=class extends Error{constructor(t){super(t[0].message);lu(this,"issues");this.name="ValiError",this.issues=t}};function os(e,t){return{...e,_parse(n,r){return e._parse(t(n),r)}}}function sn(e){return{issues:e}}function qe(e){return{output:e}}function vu(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 gu(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 Ge(e,t,n,r){if(!t||!t.length||n!=null&&n.skipPipe)return qe(e);let i,o,s=e;for(const a of t){const l=a._parse(s);if(l.issues){i=i||gu(n,r);for(const u of l.issues){const d=vu(i,u);o?o.push(d):o=[d]}if(i.abortEarly||i.abortPipeEarly)break}else s=l.output}return o?sn(o):qe(s)}function Ye(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function ss(e){return typeof e=="function"?e():e}function an(e,t,n,r){return sn([{validation:e,message:ss(t),input:n,requirement:r}])}function yu(e,t,n){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,s]=Ye(t,n);return[e,o,s]}const[r,i]=Ye(e,t);return[void 0,r,i]}function mt(e,t,n,r,i,o){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:ss(r),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function as(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return Ge(t,this.pipe,n,"any")}}}function cs(e,t,n){const[r="Invalid type",i]=Ye(t,n);return{type:"array",async:!1,item:e,message:r,pipe:i,_parse(o,s){if(!Array.isArray(o))return mt(s,"type","array",this.message,o);let a;const l=[];for(let u=0;u<o.length;u++){const d=o[u],c=this.item._parse(d,s);if(c.issues){const f={type:"array",input:o,key:u,value:d};for(const h of c.issues)h.path?h.path.unshift(f):h.path=[f],a==null||a.push(h);if(a||(a=c.issues),s!=null&&s.abortEarly)break}else l.push(c.output)}return a?sn(a):Ge(l,this.pipe,s,"array")}}}function bu(e,t){const[n="Invalid type",r]=Ye(e,t);return{type:"boolean",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="boolean"?mt(o,"type","boolean",this.message,i):Ge(i,this.pipe,o,"boolean")}}}function wu(e,t){const[n="Invalid type",r]=Ye(e,t);return{type:"number",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="number"||isNaN(i)?mt(o,"type","number",this.message,i):Ge(i,this.pipe,o,"number")}}}function Ze(e,t,n,r){const[i,o="Invalid type",s]=yu(t,n,r);let a;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:s,_parse(l,u){if(!l||typeof l!="object")return mt(u,"type","object",this.message,l);a=a||Object.entries(this.entries);let d;const c={};for(const[f,h]of a){const p=l[f],m=h._parse(p,u);if(m.issues){const b={type:"object",input:l,key:f,value:p};for(const x of m.issues)x.path?x.path.unshift(b):x.path=[b],d==null||d.push(x);if(d||(d=m.issues),u!=null&&u.abortEarly)break}else(m.output!==void 0||f in l)&&(c[f]=m.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in l)if(!(f in this.entries)){const h=l[f],p=this.rest._parse(h,u);if(p.issues){const m={type:"object",input:l,key:f,value:h};for(const b of p.issues)b.path?b.path.unshift(m):b.path=[m],d==null||d.push(b);if(d||(d=p.issues),u!=null&&u.abortEarly)break}else c[f]=p.output}}return d?sn(d):Ge(c,this.pipe,u,"object")}}}function _u(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(n,r){return this.options.includes(n)?qe(n):mt(r,"type","picklist",this.message,n)}}}function $e(e,t){const[n="Invalid type",r]=Ye(e,t);return{type:"string",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="string"?mt(o,"type","string",this.message,i):Ge(i,this.pipe,o,"string")}}}function xu(e,t,n,r){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=Ye(n,r);return[e,t,s,a]}const[i,o]=Ye(t,n);return[$e(),e,i,o]}var ku=["__proto__","prototype","constructor"];function ls(e,t,n,r){const[i,o,s="Invalid type",a]=xu(e,t,n,r);return{type:"record",async:!1,key:i,value:o,message:s,pipe:a,_parse(l,u){if(!l||typeof l!="object")return mt(u,"type","record",this.message,l);let d;const c={};for(const[f,h]of Object.entries(l))if(!ku.includes(f)){let p;const m=this.key._parse(f,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(m.issues){p={type:"record",input:l,key:f,value:h};for(const x of m.issues)x.path=[p],d==null||d.push(x);if(d||(d=m.issues),u!=null&&u.abortEarly)break}const b=this.value._parse(h,u);if(b.issues){p=p||{type:"record",input:l,key:f,value:h};for(const x of b.issues)x.path?x.path.unshift(p):x.path=[p],d==null||d.push(x);if(d||(d=b.issues),u!=null&&u.abortEarly)break}!m.issues&&!b.issues&&(c[m.output]=b.output)}return d?sn(d):Ge(c,this.pipe,u,"record")}}}function cn(e,t,n){const r=e._parse(t,n);if(r.issues)throw new Yr(r.issues);return r.output}async function Su(e,t,n){const r=await e._parse(t,n);if(r.issues)throw new Yr(r.issues);return r.output}function us(e,t,n){return{...e,_parse(r,i){const o=e._parse(r,i);if(o.issues)return o;const s=t(o.output);return n&&!Array.isArray(n)?n._parse(s,i):Ge(s,n,i,typeof s)}}}var Cu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function $u(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Cu,_parse(t){return this.requirement.test(t)?qe(t):an(this.type,this.message,t,this.requirement)}}}function Au(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(n){return n.length>this.requirement?an(this.type,this.message,n,this.requirement):qe(n)}}}function ds(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(n){return n.length<this.requirement?an(this.type,this.message,n,this.requirement):qe(n)}}}function Pu(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(n){return this.requirement.test(n)?qe(n):an(this.type,this.message,n,this.requirement)}}}function Eu(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)?qe(t):an(this.type,this.message,t,this.requirement)}}}var Tu=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function Xe(e,t){if(!e)throw new Error(t)}function Zr(e,t){return t in e}function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be.apply(this,arguments)}var je,q,Xr,fs,Nt=0,ps=[],Un=[],hs=E.__b,ms=E.__r,vs=E.diffed,gs=E.__c,ys=E.unmount;function vt(e,t){E.__h&&E.__h(q,e,Nt||t),Nt=0;var n=q.__H||(q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Un}),n.__[e]}function ie(e){return Nt=1,zn(xs,e)}function zn(e,t,n){var r=vt(je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):xs(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=q,!q.u)){var i=function(a,l,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!o||o.call(this,a,l,u);var c=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(c=!0)}}),!(!c&&r.__c.props===a)&&(!o||o.call(this,a,l,u))};q.u=!0;var o=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(a,l,u){if(this.__e){var d=o;o=void 0,i(a,l,u),o=d}s&&s.call(this,a,l,u)},q.shouldComponentUpdate=i}return r.__N||r.__}function W(e,t){var n=vt(je++,3);!E.__s&&Jr(n.__H,t)&&(n.__=e,n.i=t,q.__H.__h.push(n))}function Ae(e,t){var n=vt(je++,4);!E.__s&&Jr(n.__H,t)&&(n.__=e,n.i=t,q.__h.push(n))}function j(e){return Nt=5,se(function(){return{current:e}},[])}function bs(e,t,n){Nt=6,Ae(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function se(e,t){var n=vt(je++,7);return Jr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Nt=8,se(function(){return e},t)}function fe(e){var t=q.context[e.__c],n=vt(je++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(q)),t.props.value):e.__}function ws(e,t){E.useDebugValue&&E.useDebugValue(t?t(e):e)}function Vu(e){var t=vt(je++,10),n=ie();return t.__=e,q.componentDidCatch||(q.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Hn(){var e=vt(je++,11);if(!e.__){for(var t=q.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Mu(){for(var e;e=ps.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Wn),e.__H.__h.forEach(Qr),e.__H.__h=[]}catch(t){e.__H.__h=[],E.__e(t,e.__v)}}E.__b=function(e){q=null,hs&&hs(e)},E.__r=function(e){ms&&ms(e),je=0;var t=(q=e.__c).__H;t&&(Xr===q?(t.__h=[],q.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Un,n.__N=n.i=void 0})):(t.__h.forEach(Wn),t.__h.forEach(Qr),t.__h=[],je=0)),Xr=q},E.diffed=function(e){vs&&vs(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ps.push(t)!==1&&fs===E.requestAnimationFrame||((fs=E.requestAnimationFrame)||Ou)(Mu)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Un&&(n.__=n.__V),n.i=void 0,n.__V=Un})),Xr=q=null},E.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Wn),n.__h=n.__h.filter(function(r){return!r.__||Qr(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],E.__e(r,n.__v)}}),gs&&gs(e,t)},E.unmount=function(e){ys&&ys(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Wn(r)}catch(i){t=i}}),n.__H=void 0,t&&E.__e(t,n.__v))};var _s=typeof requestAnimationFrame=="function";function Ou(e){var t,n=function(){clearTimeout(r),_s&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);_s&&(t=requestAnimationFrame(n))}function Wn(e){var t=q,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),q=t}function Qr(e){var t=q;e.__c=e.__(),q=t}function Jr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function xs(e,t){return typeof t=="function"?t(e):t}function ks(e,t){for(var n in t)e[n]=t[n];return e}function ei(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function ti(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Kn(e){this.props=e}function Ss(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:ei(this.props,i)}function r(i){return this.shouldComponentUpdate=n,O(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Kn.prototype=new ke).isPureReactComponent=!0,Kn.prototype.shouldComponentUpdate=function(e,t){return ei(this.props,e)||ei(this.state,t)};var Cs=E.__b;E.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Cs&&Cs(e)};var Fu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function pe(e){function t(n){var r=ks({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Fu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $s=function(e,t){return e==null?null:Be(Be(e).map(t))},Oe={map:$s,forEach:$s,count:function(e){return e?Be(e).length:0},only:function(e){var t=Be(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Be},Iu=E.__e;E.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Iu(e,t,n,r)};var As=E.unmount;function Ps(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ks({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Ps(r,t,n)})),e}function Es(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Es(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Lt(){this.__u=0,this.t=null,this.__b=null}function Ts(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ni(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return O(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Rt(){this.u=null,this.o=null}E.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),As&&As(e)},(Lt.prototype=new ke).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Ts(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Es(u,u.__c.__P,u.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Lt.prototype.componentWillUnmount=function(){this.t=[]},Lt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ps(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&O(Q,null,e.fallback);return i&&(i.__h=null),[O(Q,null,t.__a?null:e.children),i]};var Vs=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Du(e){return this.getChildContext=function(){return e.context},e.children}function Nu(e){var t=this,n=e.i;t.componentWillUnmount=function(){Dt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Dt(O(Du,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ms(e,t){var n=O(Nu,{__v:e,i:t});return n.containerInfo=t,n}(Rt.prototype=new ke).__a=function(e){var t=this,n=Ts(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Vs(t,e,r)):i()};n?n(o):o()}},Rt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Be(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Rt.prototype.componentDidUpdate=Rt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Vs(e,n,t)})};var Os=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Lu=/^(?: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]/,Ru=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Bu=/[A-Z0-9]/g,ju=typeof document<"u",Uu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Fs(e,t,n){return t.__k==null&&(t.textContent=""),Dt(e,t),typeof n=="function"&&n(),e?e.__c:null}function Is(e,t,n){return is(e,t),typeof n=="function"&&n(),e?e.__c:null}ke.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ke.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ds=E.event;function zu(){}function Hu(){return this.cancelBubble}function Wu(){return this.defaultPrevented}E.event=function(e){return Ds&&(e=Ds(e)),e.persist=zu,e.isPropagationStopped=Hu,e.isDefaultPrevented=Wu,e.nativeEvent=e};var ri,Ku={enumerable:!1,configurable:!0,get:function(){return this.class}},Ns=E.vnode;E.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var o in n){var s=n[o];if(!(o==="value"&&"defaultValue"in n&&s==null||ju&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===!0?s="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Uu(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":Ru.test(o)?o=a:r.indexOf("-")===-1&&Lu.test(o)?o=o.replace(Bu,"-$&").toLowerCase():s===null&&(s=void 0):a=o="oninput",a==="oninput"&&i[o=a]&&(o="oninputCapture"),i[o]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Be(n.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Be(n.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Ku)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=Os,Ns&&Ns(e)};var Ls=E.__r;E.__r=function(e){Ls&&Ls(e),ri=e.__c};var Rs=E.diffed;E.diffed=function(e){Rs&&Rs(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),ri=null};var Bs={ReactCurrentDispatcher:{current:{readContext:function(e){return ri.__n[e.__c].props.value}}}},qu="17.0.2";function js(e){return O.bind(null,e)}function Qe(e){return!!e&&e.$$typeof===Os}function Je(e){return Qe(e)?mu.apply(null,arguments):e}function Us(e){return!!e.__k&&(Dt(null,e),!0)}function zs(e){return e&&(e.base||e.nodeType===1&&e)||null}var Hs=function(e,t){return e(t)},qn=function(e,t){return e(t)},Ws=Q;function ii(e){e()}function Ks(e){return e}function qs(){return[!1,ii]}var Gn=Ae;function Gs(e,t){var n=t(),r=ie({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ae(function(){i.__=n,i.v=t,ti(i.__,t())||o({h:i})},[e,n,t]),W(function(){return ti(i.__,i.v())||o({h:i}),e(function(){ti(i.__,i.v())||o({h:i})})},[e]),n}var Te={useState:ie,useId:Hn,useReducer:zn,useEffect:W,useLayoutEffect:Ae,useInsertionEffect:Gn,useTransition:qs,useDeferredValue:Ks,useSyncExternalStore:Gs,startTransition:ii,useRef:j,useImperativeHandle:bs,useMemo:se,useCallback:ae,useContext:fe,useDebugValue:ws,version:"17.0.2",Children:Oe,render:Fs,hydrate:Is,unmountComponentAtNode:Us,createPortal:Ms,createElement:O,createContext:Ee,createFactory:js,cloneElement:Je,createRef:Go,Fragment:Q,isValidElement:Qe,findDOMNode:zs,Component:ke,PureComponent:Kn,memo:Ss,forwardRef:pe,flushSync:qn,unstable_batchedUpdates:Hs,StrictMode:Ws,Suspense:Lt,SuspenseList:Rt,lazy:ni,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bs};const Gu=Object.freeze(Object.defineProperty({__proto__:null,Children:Oe,Component:ke,Fragment:Q,PureComponent:Kn,StrictMode:Ws,Suspense:Lt,SuspenseList:Rt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bs,cloneElement:Je,createContext:Ee,createElement:O,createFactory:js,createPortal:Ms,createRef:Go,default:Te,findDOMNode:zs,flushSync:qn,forwardRef:pe,hydrate:Is,isValidElement:Qe,lazy:ni,memo:Ss,render:Fs,startTransition:ii,unmountComponentAtNode:Us,unstable_batchedUpdates:Hs,useCallback:ae,useContext:fe,useDebugValue:ws,useDeferredValue:Ks,useEffect:W,useErrorBoundary:Vu,useId:Hn,useImperativeHandle:bs,useInsertionEffect:Gn,useLayoutEffect:Ae,useMemo:se,useReducer:zn,useRef:j,useState:ie,useSyncExternalStore:Gs,useTransition:qs,version:qu},Symbol.toStringTag,{value:"Module"}));function Bt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Yu(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ys(...e){return t=>e.forEach(n=>Yu(n,t))}function ln(...e){return ae(Ys(...e),e)}function Zu(e,t=[]){let n=[];function r(o,s){const a=Ee(s),l=n.length;n=[...n,s];function u(c){const{scope:f,children:h,...p}=c,m=(f==null?void 0:f[e][l])||a,b=se(()=>p,Object.values(p));return O(m.Provider,{value:b},h)}function d(c,f){const h=(f==null?void 0:f[e][l])||a,p=fe(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>Ee(s));return function(a){const l=(a==null?void 0:a[e])||o;return se(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,Xu(i,...t)]}function Xu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...a,...c}},{});return se(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const oi=globalThis!=null&&globalThis.document?Ae:()=>{},Qu=Gu["useId".toString()]||(()=>{});let Ju=0;function si(e){const[t,n]=ie(Qu());return oi(()=>{e||n(r=>r??String(Ju++))},[e]),e||(t?`radix-${t}`:"")}function gt(e){const t=j(e);return W(()=>{t.current=e}),se(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ed({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=td({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=gt(n),l=ae(u=>{if(o){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else i(u)},[o,e,i,a]);return[s,l]}function td({defaultProp:e,onChange:t}){const n=ie(e),[r]=n,i=j(r),o=gt(t);return W(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const ai=pe((e,t)=>{const{children:n,...r}=e,i=Oe.toArray(n),o=i.find(rd);if(o){const s=o.props.children,a=i.map(l=>l===o?Oe.count(s)>1?Oe.only(null):Qe(s)?s.props.children:null:l);return O(ci,be({},r,{ref:t}),Qe(s)?Je(s,void 0,a):null)}return O(ci,be({},r,{ref:t}),n)});ai.displayName="Slot";const ci=pe((e,t)=>{const{children:n,...r}=e;return Qe(n)?Je(n,{...id(r,n.props),ref:t?Ys(t,n.ref):n.ref}):Oe.count(n)>1?Oe.only(null):null});ci.displayName="SlotClone";const nd=({children:e})=>O(Q,null,e);function rd(e){return Qe(e)&&e.type===nd}function id(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const li=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=pe((r,i)=>{const{asChild:o,...s}=r,a=o?ai:t;return W(()=>{window[Symbol.for("radix-ui")]=!0},[]),O(a,be({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function od(e,t){e&&qn(()=>e.dispatchEvent(t))}function sd(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e);W(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ui="dismissableLayer.update",ad="dismissableLayer.pointerDownOutside",cd="dismissableLayer.focusOutside";let Zs;const ld=Ee({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ud=pe((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...u}=e,d=fe(ld),[c,f]=ie(null),h=(n=c==null?void 0:c.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,p]=ie({}),m=ln(t,A=>f(A)),b=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(x),_=c?b.indexOf(c):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,S=_>=y,N=dd(A=>{const T=A.target,K=[...d.branches].some(J=>J.contains(T));!S||K||(o==null||o(A),a==null||a(A),A.defaultPrevented||l==null||l())},h),I=fd(A=>{const T=A.target;[...d.branches].some(J=>J.contains(T))||(s==null||s(A),a==null||a(A),A.defaultPrevented||l==null||l())},h);return sd(A=>{_===d.layers.size-1&&(i==null||i(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},h),W(()=>{if(c)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Zs=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(c)),d.layers.add(c),Xs(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Zs)}},[c,h,r,d]),W(()=>()=>{c&&(d.layers.delete(c),d.layersWithOutsidePointerEventsDisabled.delete(c),Xs())},[c,d]),W(()=>{const A=()=>p({});return document.addEventListener(ui,A),()=>document.removeEventListener(ui,A)},[]),O(li.div,be({},u,{ref:m,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:Bt(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Bt(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Bt(e.onPointerDownCapture,N.onPointerDownCapture)}))});function dd(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e),r=j(!1),i=j(()=>{});return W(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){Qs(ad,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fd(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e),r=j(!1);return W(()=>{const i=o=>{o.target&&!r.current&&Qs(cd,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xs(){const e=new CustomEvent(ui);document.dispatchEvent(e)}function Qs(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?od(i,o):i.dispatchEvent(o)}const di="focusScope.autoFocusOnMount",fi="focusScope.autoFocusOnUnmount",Js={bubbles:!1,cancelable:!0},pd=pe((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=ie(null),u=gt(i),d=gt(o),c=j(null),f=ln(t,m=>l(m)),h=j({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W(()=>{if(r){let m=function(_){if(h.paused||!a)return;const C=_.target;a.contains(C)?c.current=C:et(c.current,{select:!0})},b=function(_){if(h.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||et(c.current,{select:!0}))},x=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&et(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,h.paused]),W(()=>{if(a){na.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(di,Js);a.addEventListener(di,u),a.dispatchEvent(x),x.defaultPrevented||(hd(bd(ea(a)),{select:!0}),document.activeElement===m&&et(a))}return()=>{a.removeEventListener(di,u),setTimeout(()=>{const x=new CustomEvent(fi,Js);a.addEventListener(fi,d),a.dispatchEvent(x),x.defaultPrevented||et(m??document.body,{select:!0}),a.removeEventListener(fi,d),na.remove(h)},0)}}},[a,u,d,h]);const p=ae(m=>{if(!n&&!r||h.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(b&&x){const y=m.currentTarget,[_,C]=md(y);_&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&et(_,{select:!0})):m.shiftKey&&x===_&&(m.preventDefault(),n&&et(C,{select:!0})):x===y&&m.preventDefault()}},[n,r,h.paused]);return O(li.div,be({tabIndex:-1},s,{ref:f,onKeyDown:p}))});function hd(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(et(r,{select:t}),document.activeElement!==n)return}function md(e){const t=ea(e),n=ta(t,e),r=ta(t.reverse(),e);return[n,r]}function ea(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ta(e,t){for(const n of e)if(!vd(n,{upTo:t}))return n}function vd(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 gd(e){return e instanceof HTMLInputElement&&"select"in e}function et(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gd(e)&&t&&e.select()}}const na=yd();function yd(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ra(e,t),e.unshift(t)},remove(t){var n;e=ra(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ra(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function bd(e){return e.filter(t=>t.tagName!=="A")}function wd(e,t){return zn((n,r)=>{const i=t[n][r];return i??n},e)}const pi=e=>{const{present:t,children:n}=e,r=_d(t),i=typeof n=="function"?n({present:r.isPresent}):Oe.only(n),o=ln(r.ref,i.ref);return typeof n=="function"||r.isPresent?Je(i,{ref:o}):null};pi.displayName="Presence";function _d(e){const[t,n]=ie(),r=j({}),i=j(e),o=j("none"),s=e?"mounted":"unmounted",[a,l]=wd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W(()=>{const u=Yn(r.current);o.current=a==="mounted"?u:"none"},[a]),oi(()=>{const u=r.current,d=i.current;if(d!==e){const f=o.current,h=Yn(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),oi(()=>{if(t){const u=c=>{const h=Yn(r.current).includes(c.animationName);c.target===t&&h&&qn(()=>l("ANIMATION_END"))},d=c=>{c.target===t&&(o.current=Yn(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:ae(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Yn(e){return(e==null?void 0:e.animationName)||"none"}let hi=0;function xd(){W(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:ia()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:ia()),hi++,()=>{hi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),hi--}},[])}function ia(){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 Fe=function(){return Fe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Fe.apply(this,arguments)};function oa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function kd(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Zn="right-scroll-bar-position",Xn="width-before-scroll-bar",Sd="with-scroll-bars-hidden",Cd="--removed-body-scroll-bar-size";function $d(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ad(e,t){var n=ie(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function Pd(e,t){return Ad(t||null,function(n){return e.forEach(function(r){return $d(r,n)})})}function Ed(e){return e}function Td(e,t){t===void 0&&(t=Ed);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var l=function(){var d=s;s=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return i}function Vd(e){e===void 0&&(e={});var t=Td(null);return t.options=Fe({async:!0,ssr:!1},e),t}var sa=function(e){var t=e.sideCar,n=oa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return O(r,Fe({},n))};sa.isSideCarExport=!0;function Md(e,t){return e.useMedium(t),sa}var aa=Vd(),mi=function(){},Qn=pe(function(e,t){var n=j(null),r=ie({onScrollCapture:mi,onWheelCapture:mi,onTouchMoveCapture:mi}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,y=oa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,C=Pd([n,t]),S=Fe(Fe({},y),i);return O(Q,null,d&&O(_,{sideCar:aa,removeScrollBar:u,shards:c,noIsolation:h,inert:p,setCallbacks:o,allowPinchZoom:!!m,lockRef:n}),s?Je(Oe.only(a),Fe(Fe({},S),{ref:C})):O(x,Fe({},S,{className:l,ref:C}),a))});Qn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qn.classNames={fullWidth:Xn,zeroRight:Zn};var ca,Od=function(){if(ca)return ca;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Fd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Od();return t&&e.setAttribute("nonce",t),e}function Id(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Dd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Nd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fd())&&(Id(t,n),Dd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ld=function(){var e=Nd();return function(t,n){W(function(){return e.add(t),function(){e.remove()}},[t&&n])}},la=function(){var e=Ld(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Rd={left:0,top:0,right:0,gap:0},vi=function(e){return parseInt(e||"",10)||0},Bd=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[vi(n),vi(r),vi(i)]},jd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Rd;var t=Bd(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ud=la(),zd=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(Sd,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(a,"px ").concat(r,`;
5
5
  }
@@ -33,12 +33,12 @@ var uy=Object.defineProperty;var dy=(pt,xe,E)=>xe in pt?uy(pt,xe,{enumerable:!0,
33
33
  }
34
34
 
35
35
  body {
36
- `).concat(Sd,": ").concat(a,`px;
36
+ `).concat(Cd,": ").concat(a,`px;
37
37
  }
38
- `)},zd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=se(function(){return Bd(i)},[i]);return O(jd,{styles:Ud(o,!t,i,n?"":"!important")})},gi=!1;if(typeof window<"u")try{var Jn=Object.defineProperty({},"passive",{get:function(){return gi=!0,!0}});window.addEventListener("test",Jn,Jn),window.removeEventListener("test",Jn,Jn)}catch{gi=!1}var jt=gi?{passive:!1}:!1,Hd=function(e){return e.tagName==="TEXTAREA"},ua=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hd(e)&&n[t]==="visible")},Wd=function(e){return ua(e,"overflowY")},Kd=function(e){return ua(e,"overflowX")},da=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=fa(e,n);if(r){var i=pa(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},qd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Gd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},fa=function(e,t){return e==="v"?Wd(t):Kd(t)},pa=function(e,t){return e==="v"?qd(t):Gd(t)},Yd=function(e,t){return e==="h"&&t==="rtl"?-1:1},Zd=function(e,t,n,r,i){var o=Yd(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,l=t.contains(a),u=!1,d=s>0,c=0,f=0;do{var h=pa(e,a),p=h[0],v=h[1],b=h[2],x=v-b-o*p;(p||x)&&fa(e,a)&&(c+=x,f+=p),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(i&&c===0||!i&&s>c)||!d&&(i&&f===0||!i&&-s>f))&&(u=!0),u},er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ha=function(e){return[e.deltaX,e.deltaY]},va=function(e){return e&&"current"in e?e.current:e},Xd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qd=function(e){return`
38
+ `)},Hd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=se(function(){return jd(i)},[i]);return O(Ud,{styles:zd(o,!t,i,n?"":"!important")})},gi=!1;if(typeof window<"u")try{var Jn=Object.defineProperty({},"passive",{get:function(){return gi=!0,!0}});window.addEventListener("test",Jn,Jn),window.removeEventListener("test",Jn,Jn)}catch{gi=!1}var jt=gi?{passive:!1}:!1,Wd=function(e){return e.tagName==="TEXTAREA"},ua=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wd(e)&&n[t]==="visible")},Kd=function(e){return ua(e,"overflowY")},qd=function(e){return ua(e,"overflowX")},da=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=fa(e,n);if(r){var i=pa(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Gd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Yd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},fa=function(e,t){return e==="v"?Kd(t):qd(t)},pa=function(e,t){return e==="v"?Gd(t):Yd(t)},Zd=function(e,t){return e==="h"&&t==="rtl"?-1:1},Xd=function(e,t,n,r,i){var o=Zd(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,l=t.contains(a),u=!1,d=s>0,c=0,f=0;do{var h=pa(e,a),p=h[0],m=h[1],b=h[2],x=m-b-o*p;(p||x)&&fa(e,a)&&(c+=x,f+=p),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(i&&c===0||!i&&s>c)||!d&&(i&&f===0||!i&&-s>f))&&(u=!0),u},er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ha=function(e){return[e.deltaX,e.deltaY]},ma=function(e){return e&&"current"in e?e.current:e},Qd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Jd=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},Jd=0,Ut=[];function ef(e){var t=j([]),n=j([0,0]),r=j(),i=ie(Jd++)[0],o=ie(function(){return la()})[0],s=j(e);W(function(){s.current=e},[e]),W(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=xd([e.lockRef.current],(e.shards||[]).map(va),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=ae(function(v,b){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var x=er(v),y=n.current,_="deltaX"in v?v.deltaX:y[0]-x[0],C="deltaY"in v?v.deltaY:y[1]-x[1],S,N=v.target,I=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in v&&I==="h"&&N.type==="range")return!1;var A=da(I,N);if(!A)return!0;if(A?S=I:(S=I==="v"?"h":"v",A=da(I,N)),!A)return!1;if(!r.current&&"changedTouches"in v&&(_||C)&&(r.current=S),!S)return!0;var T=r.current||S;return Zd(T,b,v,T==="h"?_:C,!0)},[]),l=ae(function(v){var b=v;if(!(!Ut.length||Ut[Ut.length-1]!==o)){var x="deltaY"in b?ha(b):er(b),y=t.current.filter(function(S){return S.name===b.type&&S.target===b.target&&Xd(S.delta,x)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var _=(s.current.shards||[]).map(va).filter(Boolean).filter(function(S){return S.contains(b.target)}),C=_.length>0?a(b,_[0]):!s.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=ae(function(v,b,x,y){var _={name:v,delta:b,target:x,should:y};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),d=ae(function(v){n.current=er(v),r.current=void 0},[]),c=ae(function(v){u(v.type,ha(v),v.target,a(v,e.lockRef.current))},[]),f=ae(function(v){u(v.type,er(v),v.target,a(v,e.lockRef.current))},[]);W(function(){return Ut.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",l,jt),document.addEventListener("touchmove",l,jt),document.addEventListener("touchstart",d,jt),function(){Ut=Ut.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,jt),document.removeEventListener("touchmove",l,jt),document.removeEventListener("touchstart",d,jt)}},[]);var h=e.removeScrollBar,p=e.inert;return O(Q,null,p?O(o,{styles:Qd(i)}):null,h?O(zd,{gapMode:"margin"}):null)}const tf=Vd(aa,ef);var ma=pe(function(e,t){return O(Qn,Fe({},e,{ref:t,sideCar:tf}))});ma.classNames=Qn.classNames;const nf=ma;var rf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zt=new WeakMap,tr=new WeakMap,nr={},yi=0,ga=function(e){return e&&(e.host||ga(e.parentNode))},of=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ga(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},sf=function(e,t,n,r){var i=of(t,Array.isArray(e)?e:[e]);nr[n]||(nr[n]=new WeakMap);var o=nr[n],s=[],a=new Set,l=new Set(i),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};i.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(f){if(a.has(f))d(f);else{var h=f.getAttribute(r),p=h!==null&&h!=="false",v=(zt.get(f)||0)+1,b=(o.get(f)||0)+1;zt.set(f,v),o.set(f,b),s.push(f),v===1&&p&&tr.set(f,!0),b===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return d(t),a.clear(),yi++,function(){s.forEach(function(c){var f=zt.get(c)-1,h=o.get(c)-1;zt.set(c,f),o.set(c,h),f||(tr.has(c)||c.removeAttribute(r),tr.delete(c)),h||c.removeAttribute(n)}),yi--,yi||(zt=new WeakMap,zt=new WeakMap,tr=new WeakMap,nr={})}},af=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||rf(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),sf(r,i,n,"aria-hidden")):function(){return null}};const ya="Dialog",[ba,py]=Yu(ya),[cf,Ht]=ba(ya),lf=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=j(null),l=j(null),[u=!1,d]=Ju({prop:r,defaultProp:i,onChange:o});return O(cf,{scope:t,triggerRef:a,contentRef:l,contentId:si(),titleId:si(),descriptionId:si(),open:u,onOpenChange:d,onOpenToggle:ae(()=>d(c=>!c),[d]),modal:s},n)},uf="DialogPortal",[hy,wa]=ba(uf,{forceMount:void 0}),bi="DialogOverlay",df=pe((e,t)=>{const n=wa(bi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(bi,e.__scopeDialog);return o.modal?O(pi,{present:r||o.open},O(ff,be({},i,{ref:t}))):null}),ff=pe((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ht(bi,n);return O(nf,{as:ai,allowPinchZoom:!0,shards:[i.contentRef]},O(li.div,be({"data-state":xa(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),un="DialogContent",pf=pe((e,t)=>{const n=wa(un,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(un,e.__scopeDialog);return O(pi,{present:r||o.open},o.modal?O(hf,be({},i,{ref:t})):O(vf,be({},i,{ref:t})))}),hf=pe((e,t)=>{const n=Ht(un,e.__scopeDialog),r=j(null),i=ln(t,n.contentRef,r);return W(()=>{const o=r.current;if(o)return af(o)},[]),O(_a,be({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bt(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Bt(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Bt(e.onFocusOutside,o=>o.preventDefault())}))}),vf=pe((e,t)=>{const n=Ht(un,e.__scopeDialog),r=j(!1),i=j(!1);return O(_a,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),_a=pe((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Ht(un,n),l=j(null),u=ln(t,l);return _d(),O(Q,null,O(fd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},O(ld,be({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":xa(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function xa(e){return e?"open":"closed"}const mf=lf,gf=df,yf=pf,ka=Ee({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rr=Ee({}),wi=Ee(null),ir=typeof document<"u",_i=ir?Ae:W,xi=Ee({strict:!1});function bf(e,t,n,r){const{visualElement:i}=fe(rr),o=fe(xi),s=fe(wi),a=fe(ka).reducedMotion,l=j();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;Gn(()=>{u&&u.update(n,s)});const d=j(!!window.HandoffAppearAnimations);return _i(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),W(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function Sa(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function wf(e,t,n){return ae(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Sa(n)&&(n.current=r))},[t])}function dn(e){return typeof e=="string"||Array.isArray(e)}function or(e){return typeof e=="object"&&typeof e.start=="function"}const ki=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Si=["initial",...ki];function sr(e){return or(e.animate)||Si.some(t=>dn(e[t]))}function Ca(e){return!!(sr(e)||e.variants)}function _f(e,t){if(sr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||dn(n)?n:void 0,animate:dn(r)?r:void 0}}return e.inherit!==!1?t:{}}function xf(e){const{initial:t,animate:n}=_f(e,fe(rr));return se(()=>({initial:t,animate:n}),[$a(t),$a(n)])}function $a(e){return Array.isArray(e)?e.join(" "):e}const Aa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},fn={};for(const e in Aa)fn[e]={isEnabled:t=>Aa[e].some(n=>!!t[n])};function Ci(e){for(const t in e)fn[t]={...fn[t],...e[t]}}const Pa=Ee({}),kf=Ee({}),Sf=Symbol.for("motionComponentSymbol");function Cf({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Ci(e);function o(a,l){let u;const d={...fe(ka),...a,layoutId:$f(a)},{isStatic:c}=d,f=xf(a),h=r(a,c);if(!c&&ir){f.visualElement=bf(i,h,d,t);const p=fe(kf),v=fe(xi).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,v,e,p))}return O(rr.Provider,{value:f},u&&f.visualElement?O(u,{visualElement:f.visualElement,...d}):null,n(i,a,wf(h,f.visualElement,l),h,c,f.visualElement))}const s=pe(o);return s[Sf]=i,s}function $f({layoutId:e}){const t=fe(Pa).id;return t&&e!==void 0?t+"-"+e:e}function Af(e){function t(r,i={}){return Cf(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Pf=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $i(e){return typeof e!="string"||e.includes("-")?!1:!!(Pf.indexOf(e)>-1||/[A-Z]/.test(e))}const Ef={},pn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yt=new Set(pn);function Ea(e,{layout:t,layoutId:n}){return yt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ef[e]||e==="opacity")}const Se=e=>!!(e&&e.getVelocity),Tf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vf=pn.length;function Mf(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<Vf;s++){const a=pn[s];if(e[a]!==void 0){const l=Tf[a]||a;o+=`${l}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const Ta=e=>t=>typeof t=="string"&&t.startsWith(e),Va=Ta("--"),Ai=Ta("var(--"),Of=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Ff=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wt=(e,t,n)=>Math.min(Math.max(n,e),t),bt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},hn={...bt,transform:e=>Wt(0,1,e)},ar={...bt,default:1},vn=e=>Math.round(e*1e5)/1e5,cr=/(-)?([\d]*\.?[\d])+/g,Ma=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,If=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function mn(e){return typeof e=="string"}const gn=e=>({test:t=>mn(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tt=gn("deg"),Kt=gn("%"),D=gn("px"),Df=gn("vh"),Nf=gn("vw"),Oa={...Kt,parse:e=>Kt.parse(e)/100,transform:e=>Kt.transform(e*100)},Fa={...bt,transform:Math.round},Ia={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,size:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:ar,scaleX:ar,scaleY:ar,scaleZ:ar,skew:tt,skewX:tt,skewY:tt,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:hn,originX:Oa,originY:Oa,originZ:D,zIndex:Fa,fillOpacity:hn,strokeOpacity:hn,numOctaves:Fa};function Pi(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let l=!1,u=!1,d=!0;for(const c in t){const f=t[c];if(Va(c)){o[c]=f;continue}const h=Ia[c],p=Ff(f,h);if(yt.has(c)){if(l=!0,s[c]=p,!d)continue;f!==(h.default||0)&&(d=!1)}else c.startsWith("origin")?(u=!0,a[c]=p):i[c]=p}if(t.transform||(l||r?i.transform=Mf(e.transform,n,d,r):i.transform&&(i.transform="none")),u){const{originX:c="50%",originY:f="50%",originZ:h=0}=a;i.transformOrigin=`${c} ${f} ${h}`}}const Ei=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Da(e,t,n){for(const r in t)!Se(t[r])&&!Ea(r,n)&&(e[r]=t[r])}function Lf({transformTemplate:e},t,n){return se(()=>{const r=Ei();return Pi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Rf(e,t,n){const r=e.style||{},i={};return Da(i,r,e),Object.assign(i,Lf(e,t,n)),e.transformValues?e.transformValues(i):i}function Bf(e,t,n){const r={},i=Rf(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const jf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function lr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||jf.has(e)}let Na=e=>!lr(e);function Uf(e){e&&(Na=t=>t.startsWith("on")?!lr(t):e(t))}try{Uf(require("@emotion/is-prop-valid").default)}catch{}function zf(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Na(i)||n===!0&&lr(i)||!t&&!lr(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function La(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function Hf(e,t,n){const r=La(t,e.x,e.width),i=La(n,e.y,e.height);return`${r} ${i}`}const Wf={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kf={offset:"strokeDashoffset",array:"strokeDasharray"};function qf(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Wf:Kf;e[o.offset]=D.transform(-r);const s=D.transform(t),a=D.transform(n);e[o.array]=`${s} ${a}`}function Ti(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},d,c,f){if(Pi(e,u,d,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:v}=e;h.transform&&(v&&(p.transform=h.transform),delete h.transform),v&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Hf(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&qf(h,s,a,l,!1)}const Ra=()=>({...Ei(),attrs:{}}),Vi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gf(e,t,n,r){const i=se(()=>{const o=Ra();return Ti(o,t,{enableHardwareAcceleration:!1},Vi(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Da(o,e.style,e),i.style={...o,...i.style}}return i}function Yf(e=!1){return(n,r,i,{latestValues:o},s)=>{const l=($i(n)?Gf:Bf)(r,o,s,n),d={...zf(r,typeof n=="string",e),...l,ref:i},{children:c}=r,f=se(()=>Se(c)?c.get():c,[c]);return O(n,{...d,children:f})}}const Mi=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Ba(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const ja=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ua(e,t,n,r){Ba(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ja.has(i)?i:Mi(i),t.attrs[i])}function Oi(e,t){const{style:n}=e,r={};for(const i in n)(Se(n[i])||t.style&&Se(t.style[i])||Ea(i,e))&&(r[i]=n[i]);return r}function za(e,t){const n=Oi(e,t);for(const r in e)if(Se(e[r])||Se(t[r])){const i=pn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Fi(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function Ha(e){const t=j(null);return t.current===null&&(t.current=e()),t.current}const ur=e=>Array.isArray(e),Zf=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Xf=e=>ur(e)?e[e.length-1]||0:e;function Qf(e){const t=Se(e)?e.get():e;return Zf(t)?t.toValue():t}function Jf({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:ep(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Wa=e=>(t,n)=>{const r=fe(rr),i=fe(wi),o=()=>Jf(e,t,r,i);return n?o():Ha(o)};function ep(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Qf(o[f]);let{initial:s,animate:a}=e;const l=sr(e),u=Ca(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const c=d?a:s;return c&&typeof c!="boolean"&&!or(c)&&(Array.isArray(c)?c:[c]).forEach(h=>{const p=Fi(e,h);if(!p)return;const{transitionEnd:v,transition:b,...x}=p;for(const y in x){let _=x[y];if(Array.isArray(_)){const C=d?_.length-1:0;_=_[C]}_!==null&&(i[y]=_)}for(const y in v)i[y]=v[y]}),i}const he=e=>e;class Ka{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function tp(e){let t=new Ka,n=new Ka,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,d=!1)=>{const c=d&&i,f=c?t:n;return u&&s.add(l),f.add(l)&&c&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u<r;u++){const d=t.order[u];d(l),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(l))}};return a}const dr=["prepare","read","update","preRender","render","postRender"],np=40;function rp(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=dr.reduce((c,f)=>(c[f]=tp(()=>n=!0),c),{}),s=c=>o[c].process(i),a=()=>{const c=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(c-i.timestamp,np),1),i.timestamp=c,i.isProcessing=!0,dr.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:dr.reduce((c,f)=>{const h=o[f];return c[f]=(p,v=!1,b=!1)=>(n||l(),h.schedule(p,v,b)),c},{}),cancel:c=>dr.forEach(f=>o[f].cancel(c)),state:i,steps:o}}const{schedule:ve,cancel:fr,state:yn,steps:vy}=rp(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),ip={useVisualState:Wa({scrapeMotionValuesFromProps:za,createRenderState:Ra,onMount:(e,t,{renderState:n,latestValues:r})=>{ve.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ve.render(()=>{Ti(n,r,{enableHardwareAcceleration:!1},Vi(t.tagName),e.transformTemplate),Ua(t,n)})}})},op={useVisualState:Wa({scrapeMotionValuesFromProps:Oi,createRenderState:Ei})};function sp(e,{forwardMotionProps:t=!1},n,r){return{...$i(e)?ip:op,preloadedFeatures:n,useRender:Yf(t),createVisualElement:r,Component:e}}function wt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ap=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function qa(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const cp=e=>t=>ap(t)&&e(t,qa(t));function pr(e,t,n,r){return wt(e,t,cp(n),r)}const lp=(e,t)=>n=>t(e(n)),_t=(...e)=>e.reduce(lp);function Ga(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Ya=Ga("dragHorizontal"),Za=Ga("dragVertical");function up(e){let t=!1;if(e==="y")t=Za();else if(e==="x")t=Ya();else{const n=Ya(),r=Za();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Xa(){const e=up(!0);return e?(e(),!1):!0}class qt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Qa(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||Xa())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&ve.update(()=>a[r](o,s))};return pr(e.current,n,i,{passive:!e.getProps()[r]})}class dp extends qt{mount(){this.unmount=_t(Qa(this.node,!0),Qa(this.node,!1))}unmount(){}}class fp extends qt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_t(wt(this.node.current,"focus",()=>this.onFocus()),wt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ja=(e,t)=>t?e===t?!0:Ja(e,t.parentElement):!1;function Ii(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,qa(n))}class pp extends qt{constructor(){super(...arguments),this.removeStartListeners=he,this.removeEndListeners=he,this.removeAccessibleListeners=he,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=pr(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();ve.update(()=>{Ja(this.node.current,a.target)?u&&u(a,l):d&&d(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=pr(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_t(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ii("up",(l,u)=>{const{onTap:d}=this.node.getProps();d&&ve.update(()=>d(l,u))})};this.removeEndListeners(),this.removeEndListeners=wt(this.node.current,"keyup",s),Ii("down",(a,l)=>{this.startPress(a,l)})},n=wt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ii("cancel",(o,s)=>this.cancelPress(o,s))},i=wt(this.node.current,"blur",r);this.removeAccessibleListeners=_t(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ve.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Xa()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ve.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=pr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=wt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_t(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Di=new WeakMap,Ni=new WeakMap,hp=e=>{const t=Di.get(e.target);t&&t(e)},vp=e=>{e.forEach(hp)};function mp({root:e,...t}){const n=e||document;Ni.has(n)||Ni.set(n,{});const r=Ni.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(vp,{root:e,...t})),r[i]}function gp(e,t,n){const r=mp(t);return Di.set(e,n),r.observe(e),()=>{Di.delete(e),r.unobserve(e)}}const yp={some:0,all:1};class bp extends qt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:yp[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return gp(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(wp(t,n))&&this.startObserver()}unmount(){}}function wp({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _p={inView:{Feature:bp},tap:{Feature:pp},focus:{Feature:fp},hover:{Feature:dp}};function ec(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function xp(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function kp(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function hr(e,t,n){const r=e.getProps();return Fi(r,t,n!==void 0?n:r.custom,xp(e),kp(e))}const Sp="data-"+Mi("framerAppearId");let bn=he,Ie=he;process.env.NODE_ENV!=="production"&&(bn=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ie=(e,t)=>{if(!e)throw new Error(t)});const xt=e=>e*1e3,nt=e=>e/1e3,Cp={current:!1},tc=e=>Array.isArray(e)&&typeof e[0]=="number";function nc(e){return!!(!e||typeof e=="string"&&rc[e]||tc(e)||Array.isArray(e)&&e.every(nc))}const wn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wn([0,.65,.55,1]),circOut:wn([.55,0,1,.45]),backIn:wn([.31,.01,.66,-.59]),backOut:wn([.33,1.53,.69,.99])};function ic(e){if(e)return tc(e)?wn(e):Array.isArray(e)?e.map(ic):rc[e]}function $p(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=ic(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function Ap(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const oc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pp=1e-7,Ep=12;function Tp(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=oc(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>Pp&&++a<Ep);return s}function _n(e,t,n,r){if(e===t&&n===r)return he;const i=o=>Tp(o,0,1,e,n);return o=>o===0||o===1?o:oc(i(o),t,r)}const Vp=_n(.42,0,1,1),Mp=_n(0,0,.58,1),sc=_n(.42,0,.58,1),Op=e=>Array.isArray(e)&&typeof e[0]!="number",ac=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cc=e=>t=>1-e(1-t),lc=e=>1-Math.sin(Math.acos(e)),uc=cc(lc),Fp=ac(uc),dc=_n(.33,1.53,.69,.99),Li=cc(dc),Ip=ac(Li),fc={linear:he,easeIn:Vp,easeInOut:sc,easeOut:Mp,circIn:lc,circInOut:Fp,circOut:uc,backIn:Li,backInOut:Ip,backOut:dc,anticipate:e=>(e*=2)<1?.5*Li(e):.5*(2-Math.pow(2,-10*(e-1)))},pc=e=>{if(Array.isArray(e)){Ie(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return _n(t,n,r,i)}else if(typeof e=="string")return Ie(fc[e]!==void 0,`Invalid easing type '${e}'`),fc[e];return e},Ri=(e,t)=>n=>!!(mn(n)&&If.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),hc=(e,t,n)=>r=>{if(!mn(r))return r;const[i,o,s,a]=r.match(cr);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Dp=e=>Wt(0,255,e),Bi={...bt,transform:e=>Math.round(Dp(e))},kt={test:Ri("rgb","red"),parse:hc("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bi.transform(e)+", "+Bi.transform(t)+", "+Bi.transform(n)+", "+vn(hn.transform(r))+")"};function Np(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const ji={test:Ri("#"),parse:Np,transform:kt.transform},Gt={test:Ri("hsl","hue"),parse:hc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kt.transform(vn(t))+", "+Kt.transform(vn(n))+", "+vn(hn.transform(r))+")"},ge={test:e=>kt.test(e)||ji.test(e)||Gt.test(e),parse:e=>kt.test(e)?kt.parse(e):Gt.test(e)?Gt.parse(e):ji.parse(e),transform:e=>mn(e)?e:e.hasOwnProperty("red")?kt.transform(e):Gt.transform(e)},vr=(e,t,n)=>-n*e+n*t+e;function Ui(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Lp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ui(l,a,e+1/3),o=Ui(l,a,e),s=Ui(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const zi=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Rp=[ji,kt,Gt],Bp=e=>Rp.find(t=>t.test(e));function vc(e){const t=Bp(e);Ie(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Gt&&(n=Lp(n)),n}const mc=(e,t)=>{const n=vc(e),r=vc(t),i={...n};return o=>(i.red=zi(n.red,r.red,o),i.green=zi(n.green,r.green,o),i.blue=zi(n.blue,r.blue,o),i.alpha=vr(n.alpha,r.alpha,o),kt.transform(i))};function jp(e){var t,n;return isNaN(e)&&mn(e)&&(((t=e.match(cr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Ma))===null||n===void 0?void 0:n.length)||0)>0}const gc={regex:Of,countKey:"Vars",token:"${v}",parse:he},yc={regex:Ma,countKey:"Colors",token:"${c}",parse:ge.parse},bc={regex:cr,countKey:"Numbers",token:"${n}",parse:bt.parse};function Hi(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function mr(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Hi(n,gc),Hi(n,yc),Hi(n,bc),n}function wc(e){return mr(e).values}function _c(e){const{values:t,numColors:n,numVars:r,tokenised:i}=mr(e),o=t.length;return s=>{let a=i;for(let l=0;l<o;l++)l<r?a=a.replace(gc.token,s[l]):l<r+n?a=a.replace(yc.token,ge.transform(s[l])):a=a.replace(bc.token,vn(s[l]));return a}}const Up=e=>typeof e=="number"?0:e;function zp(e){const t=wc(e);return _c(e)(t.map(Up))}const Yt={test:jp,parse:wc,createTransformer:_c,getAnimatableNone:zp},xc=(e,t)=>n=>`${n>0?t:e}`;function kc(e,t){return typeof e=="number"?n=>vr(e,t,n):ge.test(e)?mc(e,t):e.startsWith("var(")?xc(e,t):Cc(e,t)}const Sc=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>kc(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},Hp=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=kc(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},Cc=(e,t)=>{const n=Yt.createTransformer(t),r=mr(e),i=mr(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?_t(Sc(r.values,i.values),n):(bn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),xc(e,t))},$c=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ac=(e,t)=>n=>vr(e,t,n);function Wp(e){return typeof e=="number"?Ac:typeof e=="string"?ge.test(e)?mc:Cc:Array.isArray(e)?Sc:typeof e=="object"?Hp:Ac}function Kp(e,t,n){const r=[],i=n||Wp(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||he:t;a=_t(l,a)}r.push(a)}return r}function Pc(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ie(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Kp(t,r,i),a=s.length,l=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const c=$c(e[d],e[d+1],u);return s[d](c)};return n?u=>l(Wt(e[0],e[o-1],u)):l}function qp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=$c(0,t,r);e.push(vr(n,1,i))}}function Gp(e){const t=[0];return qp(t,e.length-1),t}function Yp(e,t){return e.map(n=>n*t)}function Zp(e,t){return e.map(()=>t||sc).splice(0,e.length-1)}function gr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Op(r)?r.map(pc):pc(r),o={done:!1,value:t[0]},s=Yp(n&&n.length===t.length?n:Gp(t),e),a=Pc(s,t,{ease:Array.isArray(i)?i:Zp(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}function Ec(e,t){return t?e*(1e3/t):0}const Xp=5;function Tc(e,t,n){const r=Math.max(t-Xp,0);return Ec(n-e(r),t-r)}const Wi=.001,Qp=.01,Vc=10,Jp=.05,eh=1;function th({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;bn(e<=xt(Vc),"Spring duration must be 10 seconds or less");let s=1-t;s=Wt(Jp,eh,s),e=Wt(Qp,Vc,nt(e)),s<1?(i=u=>{const d=u*s,c=d*e,f=d-n,h=Ki(u,s),p=Math.exp(-c);return Wi-f/h*p},o=u=>{const c=u*s*e,f=c*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-c),v=Ki(Math.pow(u,2),s);return(-i(u)+Wi>0?-1:1)*((f-h)*p)/v}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-Wi+d*c},o=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=rh(i,o,a);if(e=xt(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const nh=12;function rh(e,t,n){let r=n;for(let i=1;i<nh;i++)r=r-e(r)/t(r);return r}function Ki(e,t){return e*Math.sqrt(1-t*t)}const ih=["duration","bounce"],oh=["stiffness","damping","mass"];function Mc(e,t){return t.some(n=>e[n]!==void 0)}function sh(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Mc(e,oh)&&Mc(e,ih)){const n=th(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Oc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:d,duration:c,isResolvedFromDuration:f}=sh(r),h=d?-nt(d):0,p=l/(2*Math.sqrt(a*u)),v=o-i,b=nt(Math.sqrt(a/u)),x=Math.abs(v)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let y;if(p<1){const _=Ki(b,p);y=C=>{const S=Math.exp(-p*b*C);return o-S*((h+p*b*v)/_*Math.sin(_*C)+v*Math.cos(_*C))}}else if(p===1)y=_=>o-Math.exp(-b*_)*(v+(h+b*v)*_);else{const _=b*Math.sqrt(p*p-1);y=C=>{const S=Math.exp(-p*b*C),N=Math.min(_*C,300);return o-S*((h+p*b*v)*Math.sinh(N)+_*v*Math.cosh(N))/_}}return{calculatedDuration:f&&c||null,next:_=>{const C=y(_);if(f)s.done=_>=c;else{let S=h;_!==0&&(p<1?S=Tc(y,_,C):S=0);const N=Math.abs(S)<=n,I=Math.abs(o-C)<=t;s.done=N&&I}return s.value=s.done?o:C,s}}}function Fc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:d}){const c=e[0],f={done:!1,value:c},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let v=n*t;const b=c+v,x=s===void 0?b:s(b);x!==b&&(v=x-c);const y=A=>-v*Math.exp(-A/r),_=A=>x+y(A),C=A=>{const T=y(A),K=_(A);f.done=Math.abs(T)<=u,f.value=f.done?x:K};let S,N;const I=A=>{h(f.value)&&(S=A,N=Oc({keyframes:[f.value,p(f.value)],velocity:Tc(_,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return I(0),{calculatedDuration:null,next:A=>{let T=!1;return!N&&S===void 0&&(T=!0,C(A),I(A)),S!==void 0&&A>S?N.next(A-S):(!T&&C(A),f)}}}const ah=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ve.update(t,!0),stop:()=>fr(t),now:()=>yn.isProcessing?yn.timestamp:performance.now()}},Ic=2e4;function Dc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ic;)t+=n,r=e.next(t);return t>=Ic?1/0:t}const ch={decay:Fc,inertia:Fc,tween:gr,keyframes:gr,spring:Oc};function yr({autoplay:e=!0,delay:t=0,driver:n=ah,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:d,onUpdate:c,...f}){let h=1,p=!1,v,b;const x=()=>{b=new Promise(Y=>{v=Y})};x();let y;const _=ch[i]||gr;let C;_!==gr&&typeof r[0]!="number"&&(C=Pc([0,100],r,{clamp:!1}),r=[0,100]);const S=_({...f,keyframes:r});let N;a==="mirror"&&(N=_({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let I="idle",A=null,T=null,K=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=Dc(S));const{calculatedDuration:J}=S;let U=1/0,R=1/0;J!==null&&(U=J+s,R=U*(o+1)-s);let B=0;const z=Y=>{if(T===null)return;h>0&&(T=Math.min(T,Y)),h<0&&(T=Math.min(Y-R/h,T)),A!==null?B=A:B=Math.round(Y-T)*h;const ft=B-t*(h>=0?1:-1),In=h>=0?ft<0:ft>R;B=Math.max(ft,0),I==="finished"&&A===null&&(B=R);let jr=B,Dn=S;if(o){const Ot=B/U;let Ft=Math.floor(Ot),Ke=Ot%1;!Ke&&Ot>=1&&(Ke=1),Ke===1&&Ft--,Ft=Math.min(Ft,o+1);const Nn=!!(Ft%2);Nn&&(a==="reverse"?(Ke=1-Ke,s&&(Ke-=s/U)):a==="mirror"&&(Dn=N));let zr=Wt(0,1,Ke);B>R&&(zr=a==="reverse"&&Nn?1:0),jr=zr*U}const Mt=In?{done:!1,value:r[0]}:Dn.next(jr);C&&(Mt.value=C(Mt.value));let{done:nn}=Mt;!In&&J!==null&&(nn=h>=0?B>=R:B<=0);const Ur=A===null&&(I==="finished"||I==="running"&&nn);return c&&c(Mt.value),Ur&&We(),Mt},ne=()=>{y&&y.stop(),y=void 0},de=()=>{I="idle",ne(),v(),x(),T=K=null},We=()=>{I="finished",d&&d(),ne(),v()},dt=()=>{if(p)return;y||(y=n(z));const Y=y.now();l&&l(),A!==null?T=Y-A:(!T||I==="finished")&&(T=Y),I==="finished"&&x(),K=T,A=null,I="running",y.start()};e&&dt();const Vt={then(Y,ft){return b.then(Y,ft)},get time(){return nt(B)},set time(Y){Y=xt(Y),B=Y,A!==null||!y||h===0?A=Y:T=y.now()-Y/h},get duration(){const Y=S.calculatedDuration===null?Dc(S):S.calculatedDuration;return nt(Y)},get speed(){return h},set speed(Y){Y===h||!y||(h=Y,Vt.time=nt(B))},get state(){return I},play:dt,pause:()=>{I="paused",A=B},stop:()=>{p=!0,I!=="idle"&&(I="idle",u&&u(),de())},cancel:()=>{K!==null&&z(K),de()},complete:()=>{I="finished"},sample:Y=>(T=0,z(Y))};return Vt}function lh(e){let t;return()=>(t===void 0&&(t=e()),t)}const uh=lh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),dh=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),br=10,fh=2e4,ph=(e,t)=>t.type==="spring"||e==="backgroundColor"||!nc(t.ease);function hh(e,t,{onUpdate:n,onComplete:r,...i}){if(!(uh()&&dh.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(y=>{a=y})};u();let{keyframes:d,duration:c=300,ease:f,times:h}=i;if(ph(t,i)){const y=yr({...i,repeat:0,delay:0});let _={done:!1,value:d[0]};const C=[];let S=0;for(;!_.done&&S<fh;)_=y.sample(S),C.push(_.value),S+=br;h=void 0,d=C,c=S-br,f="linear"}const p=$p(e.owner.current,t,d,{...i,duration:c,ease:f,times:h});i.syncStart&&(p.startTime=yn.isProcessing?yn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const v=()=>p.cancel(),b=()=>{ve.update(v),a(),u()};return p.onfinish=()=>{e.set(Ap(d,i)),r&&r(),b()},{then(y,_){return l.then(y,_)},attachTimeline(y){return p.timeline=y,p.onfinish=null,he},get time(){return nt(p.currentTime||0)},set time(y){p.currentTime=xt(y)},get speed(){return p.playbackRate},set speed(y){p.playbackRate=y},get duration(){return nt(c)},play:()=>{s||(p.play(),fr(v))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:y}=p;if(y){const _=yr({...i,autoplay:!1});e.setWithVelocity(_.sample(y-br).value,_.sample(y).value,br)}b()},complete:()=>p.finish(),cancel:b}}function vh({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:he,pause:he,stop:he,then:o=>(o(),Promise.resolve()),cancel:he,complete:he});return t?yr({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const mh={type:"spring",stiffness:500,damping:25,restSpeed:10},gh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),yh={type:"keyframes",duration:.8},bh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wh=(e,{keyframes:t})=>t.length>2?yh:yt.has(e)?e.startsWith("scale")?gh(t[1]):mh:bh,qi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Yt.test(t)||t==="0")&&!t.startsWith("url(")),_h=new Set(["brightness","contrast","saturate","opacity"]);function xh(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(cr)||[];if(!r)return e;const i=n.replace(r,"");let o=_h.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const kh=/([a-z-]*)\(.*?\)/g,Gi={...Yt,getAnimatableNone:e=>{const t=e.match(kh);return t?t.map(xh).join(" "):e}},Sh={...Ia,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:Gi,WebkitFilter:Gi},Yi=e=>Sh[e];function Nc(e,t){let n=Yi(e);return n!==Gi&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Lc=e=>/^0[^.\s]+$/.test(e);function Ch(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Lc(e)}function $h(e,t,n,r){const i=qi(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),Ch(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const d=l[u];o[d]=Nc(t,a)}return o}function Ah({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}function Ph(e,t){return e[t]||e.default||e}const Eh=(e,t,n,r={})=>i=>{const o=Ph(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-xt(s);const l=$h(t,e,n,o),u=l[0],d=l[l.length-1],c=qi(e,u),f=qi(e,d);bn(c===f,`You are trying to animate ${e} from "${u}" to "${d}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${d} via the \`style\` property.`);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Ah(o)||(h={...h,...wh(e,h)}),h.duration&&(h.duration=xt(h.duration)),h.repeatDelay&&(h.repeatDelay=xt(h.repeatDelay)),!c||!f||Cp.current||o.type===!1)return vh(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=hh(t,e,h);if(p)return p}return yr(h)};function wr(e){return!!(Se(e)&&e.add)}const Rc=e=>/^\-?\d*\.?\d+$/.test(e);function Th(e,t){e.indexOf(t)===-1&&e.push(t)}function Vh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Bc{constructor(){this.subscriptions=[]}add(t){return Th(this.subscriptions,t),()=>Vh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const jc=new Set;function Zi(e,t,n){e||jc.has(t)||(console.warn(t),n&&console.warn(n),jc.add(t))}const Mh=e=>!isNaN(parseFloat(e));class Oh{constructor(t,n={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=yn;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,ve.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ve.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Mh(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&Zi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Bc);const r=this.events[t].add(n);return t==="change"?()=>{r(),ve.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ec(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xn(e,t){return new Oh(e,t)}const Uc=e=>t=>t.test(e),zc=[bt,D,Kt,tt,Nf,Df,{test:e=>e==="auto",parse:e=>e}],kn=e=>zc.find(Uc(e)),Fh=[...zc,ge,Yt],Ih=e=>Fh.find(Uc(e));function Dh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xn(n))}function Nh(e,t){const n=hr(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=Xf(o[s]);Dh(e,s,a)}}function Lh(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=t[l];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),d!=null&&(typeof d=="string"&&(Rc(d)||Lc(d))?d=parseFloat(d):!Ih(d)&&Yt.test(u)&&(d=Nc(l,u)),e.addValue(l,xn(d,{owner:e})),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function Rh(e,t){return t?(t[e]||t.default||t).from:void 0}function Bh(e,t,n){const r={};for(const i in e){const o=Rh(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function jh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c),h=a[c];if(!f||h===void 0||d&&jh(d,c))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const b=e.getProps()[Sp];b&&(p.elapsed=window.HandoffAppearAnimations(b,c,f,ve),p.syncStart=!0)}f.start(Eh(c,f,h,e.shouldReduceMotion&&yt.has(c)?{type:!1}:p));const v=f.animation;wr(l)&&(l.add(c),v.then(()=>l.remove(c))),u.push(v)}return s&&Promise.all(u).then(()=>{s&&Nh(e,s)}),u}function Xi(e,t,n={}){const r=hr(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Hc(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:c}=i;return Uh(e,t,u+l,d,c,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function Uh(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(zh).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Xi(u,t,{...o,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function zh(e,t){return e.sortNodePosition(t)}function Hh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Xi(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Xi(e,t,n);else{const i=typeof t=="function"?hr(e,t,n.custom):t;r=Promise.all(Hc(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Wh=[...ki].reverse(),Kh=ki.length;function qh(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Hh(e,n,r)))}function Gh(e){let t=qh(e);const n=Zh();let r=!0;const i=(l,u)=>{const d=hr(e,u);if(d){const{transition:c,transitionEnd:f,...h}=d;l={...l,...h,...f}}return l};function o(l){t=l(e)}function s(l,u){const d=e.getProps(),c=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},v=1/0;for(let x=0;x<Kh;x++){const y=Wh[x],_=n[y],C=d[y]!==void 0?d[y]:c[y],S=dn(C),N=y===u?_.isActive:null;N===!1&&(v=x);let I=C===c[y]&&C!==d[y]&&S;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),_.protectedKeys={...p},!_.isActive&&N===null||!C&&!_.prevProp||or(C)||typeof C=="boolean")continue;const A=Yh(_.prevProp,C);let T=A||y===u&&_.isActive&&!I&&S||x>v&&S;const K=Array.isArray(C)?C:[C];let J=K.reduce(i,{});N===!1&&(J={});const{prevResolvedValues:U={}}=_,R={...U,...J},B=z=>{T=!0,h.delete(z),_.needsAnimating[z]=!0};for(const z in R){const ne=J[z],de=U[z];p.hasOwnProperty(z)||(ne!==de?ur(ne)&&ur(de)?!ec(ne,de)||A?B(z):_.protectedKeys[z]=!0:ne!==void 0?B(z):h.add(z):ne!==void 0&&h.has(z)?B(z):_.protectedKeys[z]=!0)}_.prevProp=C,_.prevResolvedValues=J,_.isActive&&(p={...p,...J}),r&&e.blockInitialAnimation&&(T=!1),T&&!I&&f.push(...K.map(z=>({animation:z,options:{type:y,...l}})))}if(h.size){const x={};h.forEach(y=>{const _=e.getBaseTarget(y);_!==void 0&&(x[y]=_)}),f.push({animation:x})}let b=!!f.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(f):Promise.resolve()}function a(l,u,d){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const f=s(d,l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function Yh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ec(t,e):!1}function St(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Zh(){return{animate:St(!0),whileInView:St(),whileHover:St(),whileTap:St(),whileDrag:St(),whileFocus:St(),exit:St()}}class Xh extends qt{constructor(t){super(t),t.animationState||(t.animationState=Gh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),or(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Qh=0;class Jh extends qt{constructor(){super(...arguments),this.id=Qh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const ev={animation:{Feature:Xh},exit:{Feature:Jh}},Wc=()=>({min:0,max:0}),Kc=()=>({x:Wc(),y:Wc()});function tv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nv(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function rv(e,t){return tv(nv(e.getBoundingClientRect(),t))}const iv=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function ov(e){const t=iv.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const sv=4;function Qi(e,t,n=1){Ie(n<=sv,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=ov(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Rc(s)?parseFloat(s):s}else return Ai(i)?Qi(i,t,n+1):i}function av(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Ai(o))return;const s=Qi(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Ai(o))continue;const s=Qi(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const cv=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),qc=e=>cv.has(e),lv=e=>Object.keys(e).some(qc),_r=e=>e===bt||e===D,Gc=(e,t)=>parseFloat(e.split(", ")[t]),Yc=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Gc(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?Gc(o[1],e):0}},uv=new Set(["x","y","z"]),dv=pn.filter(e=>!uv.has(e));function fv(e){const t=[];return dv.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Zt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Yc(4,13),y:Yc(5,14)};Zt.translateX=Zt.x,Zt.translateY=Zt.y;const pv=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=Zt[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=Zt[u](l,o)}),e},hv=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(qc);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],c=kn(d);const f=t[l];let h;if(ur(f)){const p=f.length,v=f[0]===null?1:0;d=f[v],c=kn(d);for(let b=v;b<p&&f[b]!==null;b++)h?Ie(kn(f[b])===h,"All keyframes must be of the same type"):(h=kn(f[b]),Ie(h===c||_r(c)&&_r(h),"Keyframes must be of the same dimension as the current value"))}else h=kn(f);if(c!==h)if(_r(c)&&_r(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?t[l]=parseFloat(f):Array.isArray(f)&&h===D&&(t[l]=f.map(parseFloat))}else c!=null&&c.transform&&(h!=null&&h.transform)&&(d===0||f===0)?d===0?u.set(h.transform(d)):t[l]=c.transform(f):(s||(o=fv(e),s=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:t[l],u.jump(f))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=pv(t,e,a);return o.length&&o.forEach(([d,c])=>{e.getValue(d).set(c)}),e.render(),ir&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function vv(e,t,n,r){return lv(t)?hv(e,t,n,r):{target:t,transitionEnd:r}}const mv=(e,t,n,r)=>{const i=av(e,t,r);return t=i.target,r=i.transitionEnd,vv(e,t,n,r)},Ji={current:null},Zc={current:!1};function gv(){if(Zc.current=!0,!!ir)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ji.current=e.matches;e.addListener(t),t()}else Ji.current=!1}function yv(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(Se(o))e.addValue(i,o),wr(r)&&r.add(i),process.env.NODE_ENV==="development"&&Zi(o.version==="10.16.5",`Attempting to mix Framer Motion versions ${o.version} with 10.16.5 may not work as expected.`);else if(Se(s))e.addValue(i,xn(o,{owner:e})),wr(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,xn(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Xc=new WeakMap,Qc=Object.keys(fn),bv=Qc.length,Jc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],wv=Si.length;class _v{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ve.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=sr(n),this.isVariantNode=Ca(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const c in d){const f=d[c];a[c]!==void 0&&Se(f)&&(f.set(a[c],!1),wr(u)&&u.add(c))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Xc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Zc.current||gv(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ji.current,process.env.NODE_ENV!=="production"&&Zi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Xc.delete(this.current),this.projection&&this.projection.unmount(),fr(this.notifyUpdate),fr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=yt.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ve.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?bn(!1,l):Ie(!1,l)}for(let l=0;l<bv;l++){const u=Qc[l],{isEnabled:d,Feature:c,ProjectionNode:f,MeasureLayout:h}=fn[u];f&&(s=f),d(n)&&(!this.features[u]&&c&&(this.features[u]=new c(this)),h&&(a=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:d,dragConstraints:c,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!d||c&&Sa(c),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Kc()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Jc.length;r++){const i=Jc[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=yv(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<wv;r++){const i=Si[r],o=this.props[i];(dn(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=xn(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Fi(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Se(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class el extends _v{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=Bh(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){Lh(this,r,s);const a=mv(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function xv(e){return window.getComputedStyle(e)}class kv extends el{readValueFromInstance(t,n){if(yt.has(n)){const r=Yi(n);return r&&r.default||0}else{const r=xv(t),i=(Va(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return rv(t,n)}build(t,n,r,i){Pi(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Oi(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Se(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Ba(t,n,r,i)}}class Sv extends el{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yt.has(n)){const r=Yi(n);return r&&r.default||0}return n=ja.has(n)?n:Mi(n),t.getAttribute(n)}measureInstanceViewportBox(){return Kc()}scrapeMotionValuesFromProps(t,n){return za(t,n)}build(t,n,r,i){Ti(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Ua(t,n,r,i)}mount(t){this.isSVGTag=Vi(t.tagName),super.mount(t)}}const Cv=(e,t)=>$i(e)?new Sv(t,{enableHardwareAcceleration:!1}):new kv(t,{enableHardwareAcceleration:!0}),xr=Af(sp);function tl(){const e=j(!1);return _i(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function $v(){const e=tl(),[t,n]=ie(0),r=ae(()=>{e.current&&n(t+1)},[t]);return[ae(()=>ve.postRender(r),[r]),t]}class Av extends ke{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Pv({children:e,isPresent:t}){const n=Hn(),r=j(null),i=j({width:0,height:0,top:0,left:0});return Gn(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
41
+ `)},ef=0,Ut=[];function tf(e){var t=j([]),n=j([0,0]),r=j(),i=ie(ef++)[0],o=ie(function(){return la()})[0],s=j(e);W(function(){s.current=e},[e]),W(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=kd([e.lockRef.current],(e.shards||[]).map(ma),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=ae(function(m,b){if("touches"in m&&m.touches.length===2)return!s.current.allowPinchZoom;var x=er(m),y=n.current,_="deltaX"in m?m.deltaX:y[0]-x[0],C="deltaY"in m?m.deltaY:y[1]-x[1],S,N=m.target,I=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in m&&I==="h"&&N.type==="range")return!1;var A=da(I,N);if(!A)return!0;if(A?S=I:(S=I==="v"?"h":"v",A=da(I,N)),!A)return!1;if(!r.current&&"changedTouches"in m&&(_||C)&&(r.current=S),!S)return!0;var T=r.current||S;return Xd(T,b,m,T==="h"?_:C,!0)},[]),l=ae(function(m){var b=m;if(!(!Ut.length||Ut[Ut.length-1]!==o)){var x="deltaY"in b?ha(b):er(b),y=t.current.filter(function(S){return S.name===b.type&&S.target===b.target&&Qd(S.delta,x)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var _=(s.current.shards||[]).map(ma).filter(Boolean).filter(function(S){return S.contains(b.target)}),C=_.length>0?a(b,_[0]):!s.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=ae(function(m,b,x,y){var _={name:m,delta:b,target:x,should:y};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),d=ae(function(m){n.current=er(m),r.current=void 0},[]),c=ae(function(m){u(m.type,ha(m),m.target,a(m,e.lockRef.current))},[]),f=ae(function(m){u(m.type,er(m),m.target,a(m,e.lockRef.current))},[]);W(function(){return Ut.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",l,jt),document.addEventListener("touchmove",l,jt),document.addEventListener("touchstart",d,jt),function(){Ut=Ut.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,jt),document.removeEventListener("touchmove",l,jt),document.removeEventListener("touchstart",d,jt)}},[]);var h=e.removeScrollBar,p=e.inert;return O(Q,null,p?O(o,{styles:Jd(i)}):null,h?O(Hd,{gapMode:"margin"}):null)}const nf=Md(aa,tf);var va=pe(function(e,t){return O(Qn,Fe({},e,{ref:t,sideCar:nf}))});va.classNames=Qn.classNames;const rf=va;var of=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zt=new WeakMap,tr=new WeakMap,nr={},yi=0,ga=function(e){return e&&(e.host||ga(e.parentNode))},sf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ga(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},af=function(e,t,n,r){var i=sf(t,Array.isArray(e)?e:[e]);nr[n]||(nr[n]=new WeakMap);var o=nr[n],s=[],a=new Set,l=new Set(i),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};i.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(f){if(a.has(f))d(f);else{var h=f.getAttribute(r),p=h!==null&&h!=="false",m=(zt.get(f)||0)+1,b=(o.get(f)||0)+1;zt.set(f,m),o.set(f,b),s.push(f),m===1&&p&&tr.set(f,!0),b===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return d(t),a.clear(),yi++,function(){s.forEach(function(c){var f=zt.get(c)-1,h=o.get(c)-1;zt.set(c,f),o.set(c,h),f||(tr.has(c)||c.removeAttribute(r),tr.delete(c)),h||c.removeAttribute(n)}),yi--,yi||(zt=new WeakMap,zt=new WeakMap,tr=new WeakMap,nr={})}},cf=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||of(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),af(r,i,n,"aria-hidden")):function(){return null}};const ya="Dialog",[ba,hy]=Zu(ya),[lf,Ht]=ba(ya),uf=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=j(null),l=j(null),[u=!1,d]=ed({prop:r,defaultProp:i,onChange:o});return O(lf,{scope:t,triggerRef:a,contentRef:l,contentId:si(),titleId:si(),descriptionId:si(),open:u,onOpenChange:d,onOpenToggle:ae(()=>d(c=>!c),[d]),modal:s},n)},df="DialogPortal",[my,wa]=ba(df,{forceMount:void 0}),bi="DialogOverlay",ff=pe((e,t)=>{const n=wa(bi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(bi,e.__scopeDialog);return o.modal?O(pi,{present:r||o.open},O(pf,be({},i,{ref:t}))):null}),pf=pe((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ht(bi,n);return O(rf,{as:ai,allowPinchZoom:!0,shards:[i.contentRef]},O(li.div,be({"data-state":xa(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),un="DialogContent",hf=pe((e,t)=>{const n=wa(un,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(un,e.__scopeDialog);return O(pi,{present:r||o.open},o.modal?O(mf,be({},i,{ref:t})):O(vf,be({},i,{ref:t})))}),mf=pe((e,t)=>{const n=Ht(un,e.__scopeDialog),r=j(null),i=ln(t,n.contentRef,r);return W(()=>{const o=r.current;if(o)return cf(o)},[]),O(_a,be({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bt(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Bt(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Bt(e.onFocusOutside,o=>o.preventDefault())}))}),vf=pe((e,t)=>{const n=Ht(un,e.__scopeDialog),r=j(!1),i=j(!1);return O(_a,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),_a=pe((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Ht(un,n),l=j(null),u=ln(t,l);return xd(),O(Q,null,O(pd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},O(ud,be({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":xa(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function xa(e){return e?"open":"closed"}const gf=uf,yf=ff,bf=hf,ka=Ee({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rr=Ee({}),wi=Ee(null),ir=typeof document<"u",_i=ir?Ae:W,xi=Ee({strict:!1});function wf(e,t,n,r){const{visualElement:i}=fe(rr),o=fe(xi),s=fe(wi),a=fe(ka).reducedMotion,l=j();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;Gn(()=>{u&&u.update(n,s)});const d=j(!!window.HandoffAppearAnimations);return _i(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),W(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function Sa(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _f(e,t,n){return ae(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Sa(n)&&(n.current=r))},[t])}function dn(e){return typeof e=="string"||Array.isArray(e)}function or(e){return typeof e=="object"&&typeof e.start=="function"}const ki=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Si=["initial",...ki];function sr(e){return or(e.animate)||Si.some(t=>dn(e[t]))}function Ca(e){return!!(sr(e)||e.variants)}function xf(e,t){if(sr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||dn(n)?n:void 0,animate:dn(r)?r:void 0}}return e.inherit!==!1?t:{}}function kf(e){const{initial:t,animate:n}=xf(e,fe(rr));return se(()=>({initial:t,animate:n}),[$a(t),$a(n)])}function $a(e){return Array.isArray(e)?e.join(" "):e}const Aa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},fn={};for(const e in Aa)fn[e]={isEnabled:t=>Aa[e].some(n=>!!t[n])};function Ci(e){for(const t in e)fn[t]={...fn[t],...e[t]}}const Pa=Ee({}),Sf=Ee({}),Cf=Symbol.for("motionComponentSymbol");function $f({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Ci(e);function o(a,l){let u;const d={...fe(ka),...a,layoutId:Af(a)},{isStatic:c}=d,f=kf(a),h=r(a,c);if(!c&&ir){f.visualElement=wf(i,h,d,t);const p=fe(Sf),m=fe(xi).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,m,e,p))}return O(rr.Provider,{value:f},u&&f.visualElement?O(u,{visualElement:f.visualElement,...d}):null,n(i,a,_f(h,f.visualElement,l),h,c,f.visualElement))}const s=pe(o);return s[Cf]=i,s}function Af({layoutId:e}){const t=fe(Pa).id;return t&&e!==void 0?t+"-"+e:e}function Pf(e){function t(r,i={}){return $f(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Ef=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $i(e){return typeof e!="string"||e.includes("-")?!1:!!(Ef.indexOf(e)>-1||/[A-Z]/.test(e))}const Tf={},pn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yt=new Set(pn);function Ea(e,{layout:t,layoutId:n}){return yt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Tf[e]||e==="opacity")}const Se=e=>!!(e&&e.getVelocity),Vf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mf=pn.length;function Of(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<Mf;s++){const a=pn[s];if(e[a]!==void 0){const l=Vf[a]||a;o+=`${l}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const Ta=e=>t=>typeof t=="string"&&t.startsWith(e),Va=Ta("--"),Ai=Ta("var(--"),Ff=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,If=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wt=(e,t,n)=>Math.min(Math.max(n,e),t),bt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},hn={...bt,transform:e=>Wt(0,1,e)},ar={...bt,default:1},mn=e=>Math.round(e*1e5)/1e5,cr=/(-)?([\d]*\.?[\d])+/g,Ma=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Df=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vn(e){return typeof e=="string"}const gn=e=>({test:t=>vn(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tt=gn("deg"),Kt=gn("%"),D=gn("px"),Nf=gn("vh"),Lf=gn("vw"),Oa={...Kt,parse:e=>Kt.parse(e)/100,transform:e=>Kt.transform(e*100)},Fa={...bt,transform:Math.round},Ia={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,size:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:ar,scaleX:ar,scaleY:ar,scaleZ:ar,skew:tt,skewX:tt,skewY:tt,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:hn,originX:Oa,originY:Oa,originZ:D,zIndex:Fa,fillOpacity:hn,strokeOpacity:hn,numOctaves:Fa};function Pi(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let l=!1,u=!1,d=!0;for(const c in t){const f=t[c];if(Va(c)){o[c]=f;continue}const h=Ia[c],p=If(f,h);if(yt.has(c)){if(l=!0,s[c]=p,!d)continue;f!==(h.default||0)&&(d=!1)}else c.startsWith("origin")?(u=!0,a[c]=p):i[c]=p}if(t.transform||(l||r?i.transform=Of(e.transform,n,d,r):i.transform&&(i.transform="none")),u){const{originX:c="50%",originY:f="50%",originZ:h=0}=a;i.transformOrigin=`${c} ${f} ${h}`}}const Ei=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Da(e,t,n){for(const r in t)!Se(t[r])&&!Ea(r,n)&&(e[r]=t[r])}function Rf({transformTemplate:e},t,n){return se(()=>{const r=Ei();return Pi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Bf(e,t,n){const r=e.style||{},i={};return Da(i,r,e),Object.assign(i,Rf(e,t,n)),e.transformValues?e.transformValues(i):i}function jf(e,t,n){const r={},i=Bf(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const Uf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function lr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Uf.has(e)}let Na=e=>!lr(e);function zf(e){e&&(Na=t=>t.startsWith("on")?!lr(t):e(t))}try{zf(require("@emotion/is-prop-valid").default)}catch{}function Hf(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Na(i)||n===!0&&lr(i)||!t&&!lr(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function La(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function Wf(e,t,n){const r=La(t,e.x,e.width),i=La(n,e.y,e.height);return`${r} ${i}`}const Kf={offset:"stroke-dashoffset",array:"stroke-dasharray"},qf={offset:"strokeDashoffset",array:"strokeDasharray"};function Gf(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Kf:qf;e[o.offset]=D.transform(-r);const s=D.transform(t),a=D.transform(n);e[o.array]=`${s} ${a}`}function Ti(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},d,c,f){if(Pi(e,u,d,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Wf(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&Gf(h,s,a,l,!1)}const Ra=()=>({...Ei(),attrs:{}}),Vi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Yf(e,t,n,r){const i=se(()=>{const o=Ra();return Ti(o,t,{enableHardwareAcceleration:!1},Vi(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Da(o,e.style,e),i.style={...o,...i.style}}return i}function Zf(e=!1){return(n,r,i,{latestValues:o},s)=>{const l=($i(n)?Yf:jf)(r,o,s,n),d={...Hf(r,typeof n=="string",e),...l,ref:i},{children:c}=r,f=se(()=>Se(c)?c.get():c,[c]);return O(n,{...d,children:f})}}const Mi=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Ba(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const ja=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ua(e,t,n,r){Ba(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ja.has(i)?i:Mi(i),t.attrs[i])}function Oi(e,t){const{style:n}=e,r={};for(const i in n)(Se(n[i])||t.style&&Se(t.style[i])||Ea(i,e))&&(r[i]=n[i]);return r}function za(e,t){const n=Oi(e,t);for(const r in e)if(Se(e[r])||Se(t[r])){const i=pn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Fi(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function Ha(e){const t=j(null);return t.current===null&&(t.current=e()),t.current}const ur=e=>Array.isArray(e),Xf=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Qf=e=>ur(e)?e[e.length-1]||0:e;function Jf(e){const t=Se(e)?e.get():e;return Xf(t)?t.toValue():t}function ep({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:tp(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Wa=e=>(t,n)=>{const r=fe(rr),i=fe(wi),o=()=>ep(e,t,r,i);return n?o():Ha(o)};function tp(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Jf(o[f]);let{initial:s,animate:a}=e;const l=sr(e),u=Ca(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const c=d?a:s;return c&&typeof c!="boolean"&&!or(c)&&(Array.isArray(c)?c:[c]).forEach(h=>{const p=Fi(e,h);if(!p)return;const{transitionEnd:m,transition:b,...x}=p;for(const y in x){let _=x[y];if(Array.isArray(_)){const C=d?_.length-1:0;_=_[C]}_!==null&&(i[y]=_)}for(const y in m)i[y]=m[y]}),i}const he=e=>e;class Ka{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function np(e){let t=new Ka,n=new Ka,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,d=!1)=>{const c=d&&i,f=c?t:n;return u&&s.add(l),f.add(l)&&c&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u<r;u++){const d=t.order[u];d(l),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(l))}};return a}const dr=["prepare","read","update","preRender","render","postRender"],rp=40;function ip(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=dr.reduce((c,f)=>(c[f]=np(()=>n=!0),c),{}),s=c=>o[c].process(i),a=()=>{const c=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(c-i.timestamp,rp),1),i.timestamp=c,i.isProcessing=!0,dr.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:dr.reduce((c,f)=>{const h=o[f];return c[f]=(p,m=!1,b=!1)=>(n||l(),h.schedule(p,m,b)),c},{}),cancel:c=>dr.forEach(f=>o[f].cancel(c)),state:i,steps:o}}const{schedule:me,cancel:fr,state:yn,steps:vy}=ip(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),op={useVisualState:Wa({scrapeMotionValuesFromProps:za,createRenderState:Ra,onMount:(e,t,{renderState:n,latestValues:r})=>{me.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),me.render(()=>{Ti(n,r,{enableHardwareAcceleration:!1},Vi(t.tagName),e.transformTemplate),Ua(t,n)})}})},sp={useVisualState:Wa({scrapeMotionValuesFromProps:Oi,createRenderState:Ei})};function ap(e,{forwardMotionProps:t=!1},n,r){return{...$i(e)?op:sp,preloadedFeatures:n,useRender:Zf(t),createVisualElement:r,Component:e}}function wt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const cp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function qa(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const lp=e=>t=>cp(t)&&e(t,qa(t));function pr(e,t,n,r){return wt(e,t,lp(n),r)}const up=(e,t)=>n=>t(e(n)),_t=(...e)=>e.reduce(up);function Ga(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Ya=Ga("dragHorizontal"),Za=Ga("dragVertical");function dp(e){let t=!1;if(e==="y")t=Za();else if(e==="x")t=Ya();else{const n=Ya(),r=Za();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Xa(){const e=dp(!0);return e?(e(),!1):!0}class qt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Qa(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||Xa())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&me.update(()=>a[r](o,s))};return pr(e.current,n,i,{passive:!e.getProps()[r]})}class fp extends qt{mount(){this.unmount=_t(Qa(this.node,!0),Qa(this.node,!1))}unmount(){}}class pp extends qt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_t(wt(this.node.current,"focus",()=>this.onFocus()),wt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ja=(e,t)=>t?e===t?!0:Ja(e,t.parentElement):!1;function Ii(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,qa(n))}class hp extends qt{constructor(){super(...arguments),this.removeStartListeners=he,this.removeEndListeners=he,this.removeAccessibleListeners=he,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=pr(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();me.update(()=>{Ja(this.node.current,a.target)?u&&u(a,l):d&&d(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=pr(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_t(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ii("up",(l,u)=>{const{onTap:d}=this.node.getProps();d&&me.update(()=>d(l,u))})};this.removeEndListeners(),this.removeEndListeners=wt(this.node.current,"keyup",s),Ii("down",(a,l)=>{this.startPress(a,l)})},n=wt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ii("cancel",(o,s)=>this.cancelPress(o,s))},i=wt(this.node.current,"blur",r);this.removeAccessibleListeners=_t(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&me.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Xa()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&me.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=pr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=wt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_t(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Di=new WeakMap,Ni=new WeakMap,mp=e=>{const t=Di.get(e.target);t&&t(e)},vp=e=>{e.forEach(mp)};function gp({root:e,...t}){const n=e||document;Ni.has(n)||Ni.set(n,{});const r=Ni.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(vp,{root:e,...t})),r[i]}function yp(e,t,n){const r=gp(t);return Di.set(e,n),r.observe(e),()=>{Di.delete(e),r.unobserve(e)}}const bp={some:0,all:1};class wp extends qt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:bp[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return yp(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_p(t,n))&&this.startObserver()}unmount(){}}function _p({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xp={inView:{Feature:wp},tap:{Feature:hp},focus:{Feature:pp},hover:{Feature:fp}};function ec(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function kp(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Sp(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function hr(e,t,n){const r=e.getProps();return Fi(r,t,n!==void 0?n:r.custom,kp(e),Sp(e))}const Cp="data-"+Mi("framerAppearId");let bn=he,Ie=he;process.env.NODE_ENV!=="production"&&(bn=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ie=(e,t)=>{if(!e)throw new Error(t)});const xt=e=>e*1e3,nt=e=>e/1e3,$p={current:!1},tc=e=>Array.isArray(e)&&typeof e[0]=="number";function nc(e){return!!(!e||typeof e=="string"&&rc[e]||tc(e)||Array.isArray(e)&&e.every(nc))}const wn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wn([0,.65,.55,1]),circOut:wn([.55,0,1,.45]),backIn:wn([.31,.01,.66,-.59]),backOut:wn([.33,1.53,.69,.99])};function ic(e){if(e)return tc(e)?wn(e):Array.isArray(e)?e.map(ic):rc[e]}function Ap(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=ic(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function Pp(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const oc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ep=1e-7,Tp=12;function Vp(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=oc(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>Ep&&++a<Tp);return s}function _n(e,t,n,r){if(e===t&&n===r)return he;const i=o=>Vp(o,0,1,e,n);return o=>o===0||o===1?o:oc(i(o),t,r)}const Mp=_n(.42,0,1,1),Op=_n(0,0,.58,1),sc=_n(.42,0,.58,1),Fp=e=>Array.isArray(e)&&typeof e[0]!="number",ac=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cc=e=>t=>1-e(1-t),lc=e=>1-Math.sin(Math.acos(e)),uc=cc(lc),Ip=ac(uc),dc=_n(.33,1.53,.69,.99),Li=cc(dc),Dp=ac(Li),fc={linear:he,easeIn:Mp,easeInOut:sc,easeOut:Op,circIn:lc,circInOut:Ip,circOut:uc,backIn:Li,backInOut:Dp,backOut:dc,anticipate:e=>(e*=2)<1?.5*Li(e):.5*(2-Math.pow(2,-10*(e-1)))},pc=e=>{if(Array.isArray(e)){Ie(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return _n(t,n,r,i)}else if(typeof e=="string")return Ie(fc[e]!==void 0,`Invalid easing type '${e}'`),fc[e];return e},Ri=(e,t)=>n=>!!(vn(n)&&Df.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),hc=(e,t,n)=>r=>{if(!vn(r))return r;const[i,o,s,a]=r.match(cr);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Np=e=>Wt(0,255,e),Bi={...bt,transform:e=>Math.round(Np(e))},kt={test:Ri("rgb","red"),parse:hc("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bi.transform(e)+", "+Bi.transform(t)+", "+Bi.transform(n)+", "+mn(hn.transform(r))+")"};function Lp(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const ji={test:Ri("#"),parse:Lp,transform:kt.transform},Gt={test:Ri("hsl","hue"),parse:hc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kt.transform(mn(t))+", "+Kt.transform(mn(n))+", "+mn(hn.transform(r))+")"},ge={test:e=>kt.test(e)||ji.test(e)||Gt.test(e),parse:e=>kt.test(e)?kt.parse(e):Gt.test(e)?Gt.parse(e):ji.parse(e),transform:e=>vn(e)?e:e.hasOwnProperty("red")?kt.transform(e):Gt.transform(e)},mr=(e,t,n)=>-n*e+n*t+e;function Ui(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Rp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ui(l,a,e+1/3),o=Ui(l,a,e),s=Ui(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const zi=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Bp=[ji,kt,Gt],jp=e=>Bp.find(t=>t.test(e));function mc(e){const t=jp(e);Ie(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Gt&&(n=Rp(n)),n}const vc=(e,t)=>{const n=mc(e),r=mc(t),i={...n};return o=>(i.red=zi(n.red,r.red,o),i.green=zi(n.green,r.green,o),i.blue=zi(n.blue,r.blue,o),i.alpha=mr(n.alpha,r.alpha,o),kt.transform(i))};function Up(e){var t,n;return isNaN(e)&&vn(e)&&(((t=e.match(cr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Ma))===null||n===void 0?void 0:n.length)||0)>0}const gc={regex:Ff,countKey:"Vars",token:"${v}",parse:he},yc={regex:Ma,countKey:"Colors",token:"${c}",parse:ge.parse},bc={regex:cr,countKey:"Numbers",token:"${n}",parse:bt.parse};function Hi(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function vr(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Hi(n,gc),Hi(n,yc),Hi(n,bc),n}function wc(e){return vr(e).values}function _c(e){const{values:t,numColors:n,numVars:r,tokenised:i}=vr(e),o=t.length;return s=>{let a=i;for(let l=0;l<o;l++)l<r?a=a.replace(gc.token,s[l]):l<r+n?a=a.replace(yc.token,ge.transform(s[l])):a=a.replace(bc.token,mn(s[l]));return a}}const zp=e=>typeof e=="number"?0:e;function Hp(e){const t=wc(e);return _c(e)(t.map(zp))}const Yt={test:Up,parse:wc,createTransformer:_c,getAnimatableNone:Hp},xc=(e,t)=>n=>`${n>0?t:e}`;function kc(e,t){return typeof e=="number"?n=>mr(e,t,n):ge.test(e)?vc(e,t):e.startsWith("var(")?xc(e,t):Cc(e,t)}const Sc=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>kc(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},Wp=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=kc(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},Cc=(e,t)=>{const n=Yt.createTransformer(t),r=vr(e),i=vr(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?_t(Sc(r.values,i.values),n):(bn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),xc(e,t))},$c=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ac=(e,t)=>n=>mr(e,t,n);function Kp(e){return typeof e=="number"?Ac:typeof e=="string"?ge.test(e)?vc:Cc:Array.isArray(e)?Sc:typeof e=="object"?Wp:Ac}function qp(e,t,n){const r=[],i=n||Kp(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||he:t;a=_t(l,a)}r.push(a)}return r}function Pc(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ie(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=qp(t,r,i),a=s.length,l=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const c=$c(e[d],e[d+1],u);return s[d](c)};return n?u=>l(Wt(e[0],e[o-1],u)):l}function Gp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=$c(0,t,r);e.push(mr(n,1,i))}}function Yp(e){const t=[0];return Gp(t,e.length-1),t}function Zp(e,t){return e.map(n=>n*t)}function Xp(e,t){return e.map(()=>t||sc).splice(0,e.length-1)}function gr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Fp(r)?r.map(pc):pc(r),o={done:!1,value:t[0]},s=Zp(n&&n.length===t.length?n:Yp(t),e),a=Pc(s,t,{ease:Array.isArray(i)?i:Xp(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}function Ec(e,t){return t?e*(1e3/t):0}const Qp=5;function Tc(e,t,n){const r=Math.max(t-Qp,0);return Ec(n-e(r),t-r)}const Wi=.001,Jp=.01,Vc=10,eh=.05,th=1;function nh({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;bn(e<=xt(Vc),"Spring duration must be 10 seconds or less");let s=1-t;s=Wt(eh,th,s),e=Wt(Jp,Vc,nt(e)),s<1?(i=u=>{const d=u*s,c=d*e,f=d-n,h=Ki(u,s),p=Math.exp(-c);return Wi-f/h*p},o=u=>{const c=u*s*e,f=c*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-c),m=Ki(Math.pow(u,2),s);return(-i(u)+Wi>0?-1:1)*((f-h)*p)/m}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-Wi+d*c},o=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=ih(i,o,a);if(e=xt(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const rh=12;function ih(e,t,n){let r=n;for(let i=1;i<rh;i++)r=r-e(r)/t(r);return r}function Ki(e,t){return e*Math.sqrt(1-t*t)}const oh=["duration","bounce"],sh=["stiffness","damping","mass"];function Mc(e,t){return t.some(n=>e[n]!==void 0)}function ah(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Mc(e,sh)&&Mc(e,oh)){const n=nh(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Oc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:d,duration:c,isResolvedFromDuration:f}=ah(r),h=d?-nt(d):0,p=l/(2*Math.sqrt(a*u)),m=o-i,b=nt(Math.sqrt(a/u)),x=Math.abs(m)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let y;if(p<1){const _=Ki(b,p);y=C=>{const S=Math.exp(-p*b*C);return o-S*((h+p*b*m)/_*Math.sin(_*C)+m*Math.cos(_*C))}}else if(p===1)y=_=>o-Math.exp(-b*_)*(m+(h+b*m)*_);else{const _=b*Math.sqrt(p*p-1);y=C=>{const S=Math.exp(-p*b*C),N=Math.min(_*C,300);return o-S*((h+p*b*m)*Math.sinh(N)+_*m*Math.cosh(N))/_}}return{calculatedDuration:f&&c||null,next:_=>{const C=y(_);if(f)s.done=_>=c;else{let S=h;_!==0&&(p<1?S=Tc(y,_,C):S=0);const N=Math.abs(S)<=n,I=Math.abs(o-C)<=t;s.done=N&&I}return s.value=s.done?o:C,s}}}function Fc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:d}){const c=e[0],f={done:!1,value:c},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*t;const b=c+m,x=s===void 0?b:s(b);x!==b&&(m=x-c);const y=A=>-m*Math.exp(-A/r),_=A=>x+y(A),C=A=>{const T=y(A),K=_(A);f.done=Math.abs(T)<=u,f.value=f.done?x:K};let S,N;const I=A=>{h(f.value)&&(S=A,N=Oc({keyframes:[f.value,p(f.value)],velocity:Tc(_,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return I(0),{calculatedDuration:null,next:A=>{let T=!1;return!N&&S===void 0&&(T=!0,C(A),I(A)),S!==void 0&&A>S?N.next(A-S):(!T&&C(A),f)}}}const ch=e=>{const t=({timestamp:n})=>e(n);return{start:()=>me.update(t,!0),stop:()=>fr(t),now:()=>yn.isProcessing?yn.timestamp:performance.now()}},Ic=2e4;function Dc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ic;)t+=n,r=e.next(t);return t>=Ic?1/0:t}const lh={decay:Fc,inertia:Fc,tween:gr,keyframes:gr,spring:Oc};function yr({autoplay:e=!0,delay:t=0,driver:n=ch,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:d,onUpdate:c,...f}){let h=1,p=!1,m,b;const x=()=>{b=new Promise(Y=>{m=Y})};x();let y;const _=lh[i]||gr;let C;_!==gr&&typeof r[0]!="number"&&(C=Pc([0,100],r,{clamp:!1}),r=[0,100]);const S=_({...f,keyframes:r});let N;a==="mirror"&&(N=_({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let I="idle",A=null,T=null,K=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=Dc(S));const{calculatedDuration:J}=S;let U=1/0,R=1/0;J!==null&&(U=J+s,R=U*(o+1)-s);let B=0;const z=Y=>{if(T===null)return;h>0&&(T=Math.min(T,Y)),h<0&&(T=Math.min(Y-R/h,T)),A!==null?B=A:B=Math.round(Y-T)*h;const ft=B-t*(h>=0?1:-1),In=h>=0?ft<0:ft>R;B=Math.max(ft,0),I==="finished"&&A===null&&(B=R);let jr=B,Dn=S;if(o){const Ot=B/U;let Ft=Math.floor(Ot),Ke=Ot%1;!Ke&&Ot>=1&&(Ke=1),Ke===1&&Ft--,Ft=Math.min(Ft,o+1);const Nn=!!(Ft%2);Nn&&(a==="reverse"?(Ke=1-Ke,s&&(Ke-=s/U)):a==="mirror"&&(Dn=N));let zr=Wt(0,1,Ke);B>R&&(zr=a==="reverse"&&Nn?1:0),jr=zr*U}const Mt=In?{done:!1,value:r[0]}:Dn.next(jr);C&&(Mt.value=C(Mt.value));let{done:nn}=Mt;!In&&J!==null&&(nn=h>=0?B>=R:B<=0);const Ur=A===null&&(I==="finished"||I==="running"&&nn);return c&&c(Mt.value),Ur&&We(),Mt},ne=()=>{y&&y.stop(),y=void 0},de=()=>{I="idle",ne(),m(),x(),T=K=null},We=()=>{I="finished",d&&d(),ne(),m()},dt=()=>{if(p)return;y||(y=n(z));const Y=y.now();l&&l(),A!==null?T=Y-A:(!T||I==="finished")&&(T=Y),I==="finished"&&x(),K=T,A=null,I="running",y.start()};e&&dt();const Vt={then(Y,ft){return b.then(Y,ft)},get time(){return nt(B)},set time(Y){Y=xt(Y),B=Y,A!==null||!y||h===0?A=Y:T=y.now()-Y/h},get duration(){const Y=S.calculatedDuration===null?Dc(S):S.calculatedDuration;return nt(Y)},get speed(){return h},set speed(Y){Y===h||!y||(h=Y,Vt.time=nt(B))},get state(){return I},play:dt,pause:()=>{I="paused",A=B},stop:()=>{p=!0,I!=="idle"&&(I="idle",u&&u(),de())},cancel:()=>{K!==null&&z(K),de()},complete:()=>{I="finished"},sample:Y=>(T=0,z(Y))};return Vt}function uh(e){let t;return()=>(t===void 0&&(t=e()),t)}const dh=uh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fh=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),br=10,ph=2e4,hh=(e,t)=>t.type==="spring"||e==="backgroundColor"||!nc(t.ease);function mh(e,t,{onUpdate:n,onComplete:r,...i}){if(!(dh()&&fh.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(y=>{a=y})};u();let{keyframes:d,duration:c=300,ease:f,times:h}=i;if(hh(t,i)){const y=yr({...i,repeat:0,delay:0});let _={done:!1,value:d[0]};const C=[];let S=0;for(;!_.done&&S<ph;)_=y.sample(S),C.push(_.value),S+=br;h=void 0,d=C,c=S-br,f="linear"}const p=Ap(e.owner.current,t,d,{...i,duration:c,ease:f,times:h});i.syncStart&&(p.startTime=yn.isProcessing?yn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const m=()=>p.cancel(),b=()=>{me.update(m),a(),u()};return p.onfinish=()=>{e.set(Pp(d,i)),r&&r(),b()},{then(y,_){return l.then(y,_)},attachTimeline(y){return p.timeline=y,p.onfinish=null,he},get time(){return nt(p.currentTime||0)},set time(y){p.currentTime=xt(y)},get speed(){return p.playbackRate},set speed(y){p.playbackRate=y},get duration(){return nt(c)},play:()=>{s||(p.play(),fr(m))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:y}=p;if(y){const _=yr({...i,autoplay:!1});e.setWithVelocity(_.sample(y-br).value,_.sample(y).value,br)}b()},complete:()=>p.finish(),cancel:b}}function vh({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:he,pause:he,stop:he,then:o=>(o(),Promise.resolve()),cancel:he,complete:he});return t?yr({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const gh={type:"spring",stiffness:500,damping:25,restSpeed:10},yh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bh={type:"keyframes",duration:.8},wh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_h=(e,{keyframes:t})=>t.length>2?bh:yt.has(e)?e.startsWith("scale")?yh(t[1]):gh:wh,qi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Yt.test(t)||t==="0")&&!t.startsWith("url(")),xh=new Set(["brightness","contrast","saturate","opacity"]);function kh(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(cr)||[];if(!r)return e;const i=n.replace(r,"");let o=xh.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Sh=/([a-z-]*)\(.*?\)/g,Gi={...Yt,getAnimatableNone:e=>{const t=e.match(Sh);return t?t.map(kh).join(" "):e}},Ch={...Ia,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:Gi,WebkitFilter:Gi},Yi=e=>Ch[e];function Nc(e,t){let n=Yi(e);return n!==Gi&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Lc=e=>/^0[^.\s]+$/.test(e);function $h(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Lc(e)}function Ah(e,t,n,r){const i=qi(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),$h(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const d=l[u];o[d]=Nc(t,a)}return o}function Ph({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}function Eh(e,t){return e[t]||e.default||e}const Th=(e,t,n,r={})=>i=>{const o=Eh(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-xt(s);const l=Ah(t,e,n,o),u=l[0],d=l[l.length-1],c=qi(e,u),f=qi(e,d);bn(c===f,`You are trying to animate ${e} from "${u}" to "${d}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${d} via the \`style\` property.`);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Ph(o)||(h={...h,..._h(e,h)}),h.duration&&(h.duration=xt(h.duration)),h.repeatDelay&&(h.repeatDelay=xt(h.repeatDelay)),!c||!f||$p.current||o.type===!1)return vh(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=mh(t,e,h);if(p)return p}return yr(h)};function wr(e){return!!(Se(e)&&e.add)}const Rc=e=>/^\-?\d*\.?\d+$/.test(e);function Vh(e,t){e.indexOf(t)===-1&&e.push(t)}function Mh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Bc{constructor(){this.subscriptions=[]}add(t){return Vh(this.subscriptions,t),()=>Mh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const jc=new Set;function Zi(e,t,n){e||jc.has(t)||(console.warn(t),n&&console.warn(n),jc.add(t))}const Oh=e=>!isNaN(parseFloat(e));class Fh{constructor(t,n={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=yn;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,me.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>me.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Oh(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&Zi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Bc);const r=this.events[t].add(n);return t==="change"?()=>{r(),me.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ec(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xn(e,t){return new Fh(e,t)}const Uc=e=>t=>t.test(e),zc=[bt,D,Kt,tt,Lf,Nf,{test:e=>e==="auto",parse:e=>e}],kn=e=>zc.find(Uc(e)),Ih=[...zc,ge,Yt],Dh=e=>Ih.find(Uc(e));function Nh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xn(n))}function Lh(e,t){const n=hr(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=Qf(o[s]);Nh(e,s,a)}}function Rh(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=t[l];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),d!=null&&(typeof d=="string"&&(Rc(d)||Lc(d))?d=parseFloat(d):!Dh(d)&&Yt.test(u)&&(d=Nc(l,u)),e.addValue(l,xn(d,{owner:e})),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function Bh(e,t){return t?(t[e]||t.default||t).from:void 0}function jh(e,t,n){const r={};for(const i in e){const o=Bh(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function Uh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c),h=a[c];if(!f||h===void 0||d&&Uh(d,c))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const b=e.getProps()[Cp];b&&(p.elapsed=window.HandoffAppearAnimations(b,c,f,me),p.syncStart=!0)}f.start(Th(c,f,h,e.shouldReduceMotion&&yt.has(c)?{type:!1}:p));const m=f.animation;wr(l)&&(l.add(c),m.then(()=>l.remove(c))),u.push(m)}return s&&Promise.all(u).then(()=>{s&&Lh(e,s)}),u}function Xi(e,t,n={}){const r=hr(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Hc(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:c}=i;return zh(e,t,u+l,d,c,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function zh(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(Hh).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Xi(u,t,{...o,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function Hh(e,t){return e.sortNodePosition(t)}function Wh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Xi(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Xi(e,t,n);else{const i=typeof t=="function"?hr(e,t,n.custom):t;r=Promise.all(Hc(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Kh=[...ki].reverse(),qh=ki.length;function Gh(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Wh(e,n,r)))}function Yh(e){let t=Gh(e);const n=Xh();let r=!0;const i=(l,u)=>{const d=hr(e,u);if(d){const{transition:c,transitionEnd:f,...h}=d;l={...l,...h,...f}}return l};function o(l){t=l(e)}function s(l,u){const d=e.getProps(),c=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},m=1/0;for(let x=0;x<qh;x++){const y=Kh[x],_=n[y],C=d[y]!==void 0?d[y]:c[y],S=dn(C),N=y===u?_.isActive:null;N===!1&&(m=x);let I=C===c[y]&&C!==d[y]&&S;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),_.protectedKeys={...p},!_.isActive&&N===null||!C&&!_.prevProp||or(C)||typeof C=="boolean")continue;const A=Zh(_.prevProp,C);let T=A||y===u&&_.isActive&&!I&&S||x>m&&S;const K=Array.isArray(C)?C:[C];let J=K.reduce(i,{});N===!1&&(J={});const{prevResolvedValues:U={}}=_,R={...U,...J},B=z=>{T=!0,h.delete(z),_.needsAnimating[z]=!0};for(const z in R){const ne=J[z],de=U[z];p.hasOwnProperty(z)||(ne!==de?ur(ne)&&ur(de)?!ec(ne,de)||A?B(z):_.protectedKeys[z]=!0:ne!==void 0?B(z):h.add(z):ne!==void 0&&h.has(z)?B(z):_.protectedKeys[z]=!0)}_.prevProp=C,_.prevResolvedValues=J,_.isActive&&(p={...p,...J}),r&&e.blockInitialAnimation&&(T=!1),T&&!I&&f.push(...K.map(z=>({animation:z,options:{type:y,...l}})))}if(h.size){const x={};h.forEach(y=>{const _=e.getBaseTarget(y);_!==void 0&&(x[y]=_)}),f.push({animation:x})}let b=!!f.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(f):Promise.resolve()}function a(l,u,d){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const f=s(d,l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function Zh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ec(t,e):!1}function St(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Xh(){return{animate:St(!0),whileInView:St(),whileHover:St(),whileTap:St(),whileDrag:St(),whileFocus:St(),exit:St()}}class Qh extends qt{constructor(t){super(t),t.animationState||(t.animationState=Yh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),or(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Jh=0;class em extends qt{constructor(){super(...arguments),this.id=Jh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const tm={animation:{Feature:Qh},exit:{Feature:em}},Wc=()=>({min:0,max:0}),Kc=()=>({x:Wc(),y:Wc()});function nm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function rm(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function im(e,t){return nm(rm(e.getBoundingClientRect(),t))}const om=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function sm(e){const t=om.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const am=4;function Qi(e,t,n=1){Ie(n<=am,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=sm(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Rc(s)?parseFloat(s):s}else return Ai(i)?Qi(i,t,n+1):i}function cm(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Ai(o))return;const s=Qi(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Ai(o))continue;const s=Qi(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const lm=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),qc=e=>lm.has(e),um=e=>Object.keys(e).some(qc),_r=e=>e===bt||e===D,Gc=(e,t)=>parseFloat(e.split(", ")[t]),Yc=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Gc(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?Gc(o[1],e):0}},dm=new Set(["x","y","z"]),fm=pn.filter(e=>!dm.has(e));function pm(e){const t=[];return fm.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Zt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Yc(4,13),y:Yc(5,14)};Zt.translateX=Zt.x,Zt.translateY=Zt.y;const hm=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=Zt[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=Zt[u](l,o)}),e},mm=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(qc);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],c=kn(d);const f=t[l];let h;if(ur(f)){const p=f.length,m=f[0]===null?1:0;d=f[m],c=kn(d);for(let b=m;b<p&&f[b]!==null;b++)h?Ie(kn(f[b])===h,"All keyframes must be of the same type"):(h=kn(f[b]),Ie(h===c||_r(c)&&_r(h),"Keyframes must be of the same dimension as the current value"))}else h=kn(f);if(c!==h)if(_r(c)&&_r(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?t[l]=parseFloat(f):Array.isArray(f)&&h===D&&(t[l]=f.map(parseFloat))}else c!=null&&c.transform&&(h!=null&&h.transform)&&(d===0||f===0)?d===0?u.set(h.transform(d)):t[l]=c.transform(f):(s||(o=pm(e),s=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:t[l],u.jump(f))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=hm(t,e,a);return o.length&&o.forEach(([d,c])=>{e.getValue(d).set(c)}),e.render(),ir&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function vm(e,t,n,r){return um(t)?mm(e,t,n,r):{target:t,transitionEnd:r}}const gm=(e,t,n,r)=>{const i=cm(e,t,r);return t=i.target,r=i.transitionEnd,vm(e,t,n,r)},Ji={current:null},Zc={current:!1};function ym(){if(Zc.current=!0,!!ir)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ji.current=e.matches;e.addListener(t),t()}else Ji.current=!1}function bm(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(Se(o))e.addValue(i,o),wr(r)&&r.add(i),process.env.NODE_ENV==="development"&&Zi(o.version==="10.16.5",`Attempting to mix Framer Motion versions ${o.version} with 10.16.5 may not work as expected.`);else if(Se(s))e.addValue(i,xn(o,{owner:e})),wr(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,xn(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Xc=new WeakMap,Qc=Object.keys(fn),wm=Qc.length,Jc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],_m=Si.length;class xm{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>me.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=sr(n),this.isVariantNode=Ca(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const c in d){const f=d[c];a[c]!==void 0&&Se(f)&&(f.set(a[c],!1),wr(u)&&u.add(c))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Xc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Zc.current||ym(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ji.current,process.env.NODE_ENV!=="production"&&Zi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Xc.delete(this.current),this.projection&&this.projection.unmount(),fr(this.notifyUpdate),fr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=yt.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&me.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?bn(!1,l):Ie(!1,l)}for(let l=0;l<wm;l++){const u=Qc[l],{isEnabled:d,Feature:c,ProjectionNode:f,MeasureLayout:h}=fn[u];f&&(s=f),d(n)&&(!this.features[u]&&c&&(this.features[u]=new c(this)),h&&(a=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:d,dragConstraints:c,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!d||c&&Sa(c),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Kc()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Jc.length;r++){const i=Jc[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=bm(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<_m;r++){const i=Si[r],o=this.props[i];(dn(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=xn(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Fi(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Se(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class el extends xm{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=jh(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){Rh(this,r,s);const a=gm(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function km(e){return window.getComputedStyle(e)}class Sm extends el{readValueFromInstance(t,n){if(yt.has(n)){const r=Yi(n);return r&&r.default||0}else{const r=km(t),i=(Va(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return im(t,n)}build(t,n,r,i){Pi(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Oi(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Se(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Ba(t,n,r,i)}}class Cm extends el{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yt.has(n)){const r=Yi(n);return r&&r.default||0}return n=ja.has(n)?n:Mi(n),t.getAttribute(n)}measureInstanceViewportBox(){return Kc()}scrapeMotionValuesFromProps(t,n){return za(t,n)}build(t,n,r,i){Ti(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Ua(t,n,r,i)}mount(t){this.isSVGTag=Vi(t.tagName),super.mount(t)}}const $m=(e,t)=>$i(e)?new Cm(t,{enableHardwareAcceleration:!1}):new Sm(t,{enableHardwareAcceleration:!0}),xr=Pf(ap);function tl(){const e=j(!1);return _i(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Am(){const e=tl(),[t,n]=ie(0),r=ae(()=>{e.current&&n(t+1)},[t]);return[ae(()=>me.postRender(r),[r]),t]}class Pm extends ke{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Em({children:e,isPresent:t}){const n=Hn(),r=j(null),i=j({width:0,height:0,top:0,left:0});return Gn(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
42
42
  [data-motion-pop-id="${n}"] {
43
43
  position: absolute !important;
44
44
  width: ${o}px !important;
@@ -46,8 +46,8 @@ var uy=Object.defineProperty;var dy=(pt,xe,E)=>xe in pt?uy(pt,xe,{enumerable:!0,
46
46
  top: ${a}px !important;
47
47
  left: ${l}px !important;
48
48
  }
49
- `),()=>{document.head.removeChild(u)}},[t]),O(Av,{isPresent:t,childRef:r,sizeRef:i},Je(e,{ref:r}))}const eo=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Ha(Ev),l=Hn(),u=se(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:d=>{a.set(d,!0);for(const c of a.values())if(!c)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[n]);return se(()=>{a.forEach((d,c)=>a.set(c,!1))},[n]),W(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=O(Pv,{isPresent:n},e)),O(wi.Provider,{value:u},e)};function Ev(){return new Map}function Tv(e){return W(()=>()=>e(),[])}const Ct=e=>e.key||"";function Vv(e,t){e.forEach(n=>{const r=Ct(n);t.set(r,n)})}function Mv(e){const t=[];return Oe.forEach(e,n=>{Qe(n)&&t.push(n)}),t}const nl=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Ie(!i,"Replace exitBeforeEnter with mode='wait'");const a=fe(Pa).forceRender||$v()[0],l=tl(),u=Mv(e);let d=u;const c=j(new Map).current,f=j(d),h=j(new Map).current,p=j(!0);if(_i(()=>{p.current=!1,Vv(u,h),f.current=d}),Tv(()=>{p.current=!0,h.clear(),c.clear()}),p.current)return O(Q,null,d.map(y=>O(eo,{key:Ct(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},y)));d=[...d];const v=f.current.map(Ct),b=u.map(Ct),x=v.length;for(let y=0;y<x;y++){const _=v[y];b.indexOf(_)===-1&&!c.has(_)&&c.set(_,void 0)}return s==="wait"&&c.size&&(d=[]),c.forEach((y,_)=>{if(b.indexOf(_)!==-1)return;const C=h.get(_);if(!C)return;const S=v.indexOf(_);let N=y;if(!N){const I=()=>{c.delete(_);const A=Array.from(h.keys()).filter(T=>!b.includes(T));if(A.forEach(T=>h.delete(T)),f.current=u.filter(T=>{const K=Ct(T);return K===_||A.includes(K)}),!c.size){if(l.current===!1)return;a(),r&&r()}};N=O(eo,{key:Ct(C),isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:s},C),c.set(_,N)}d.splice(S,0,N)}),d=d.map(y=>{const _=y.key;return c.has(_)?y:O(eo,{key:Ct(y),isPresent:!0,presenceAffectsLayout:o,mode:s},y)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),O(Q,null,c.size?d:d.map(y=>Je(y)))};function Ov({children:e,features:t,strict:n=!1}){const[,r]=ie(!to(t)),i=j(void 0);if(!to(t)){const{renderer:o,...s}=t;i.current=o,Ci(s)}return W(()=>{to(t)&&t().then(({renderer:o,...s})=>{Ci(s),i.current=o,r(!0)})},[]),O(xi.Provider,{value:{renderer:i.current,strict:n}},e)}function to(e){return typeof e=="function"}const Fv={renderer:Cv,...ev,..._p},we=Symbol.for("@ts-pattern/matcher"),rl=Symbol.for("@ts-pattern/isVariadic"),kr="@ts-pattern/anonymous-select-key",no=e=>!!(e&&typeof e=="object"),Sr=e=>e&&!!e[we],ce=(e,t,n)=>{if(Sr(e)){const r=e[we](),{matched:i,selections:o}=r.match(t);return i&&o&&Object.keys(o).forEach(s=>n(s,o[s])),i}if(no(e)){if(!no(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],o=[];for(const s of e.keys()){const a=e[s];Sr(a)&&a[rl]?o.push(a):o.length?i.push(a):r.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+i.length)return!1;const s=t.slice(0,r.length),a=i.length===0?[]:t.slice(-i.length),l=t.slice(r.length,i.length===0?1/0:-i.length);return r.every((u,d)=>ce(u,s[d],n))&&i.every((u,d)=>ce(u,a[d],n))&&(o.length===0||ce(o[0],l,n))}return e.length===t.length&&e.every((s,a)=>ce(s,t[a],n))}return Object.keys(e).every(r=>{const i=e[r];return(r in t||Sr(o=i)&&o[we]().matcherType==="optional")&&ce(i,t[r],n);var o})}return Object.is(t,e)},Ce=e=>{var t,n,r;return no(e)?Sr(e)?(t=(n=(r=e[we]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?Sn(e,Ce):Sn(Object.values(e),Ce):[]},Sn=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function Iv(...e){if(e.length===1){const[t]=e;return n=>ce(t,n,()=>{})}if(e.length===2){const[t,n]=e;return ce(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function me(e){return Object.assign(e,{optional:()=>io(e),and:t=>X(e,t),or:t=>il(e,t),select:t=>t===void 0?Cn(e):Cn(t,e)})}function ro(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[rl]:!0})}}))(e),{optional:()=>ro(io(e)),select:t=>ro(t===void 0?Cn(e):Cn(t,e))})}function io(e){return me({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return t===void 0?(Ce(e).forEach(i=>r(i,void 0)),{matched:!0,selections:n}):{matched:ce(e,t,r),selections:n}},getSelectionKeys:()=>Ce(e),matcherType:"optional"})})}const Dv=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},Nv=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function X(...e){return me({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return{matched:e.every(i=>ce(i,t,r)),selections:n}},getSelectionKeys:()=>Sn(e,Ce),matcherType:"and"})})}function il(...e){return me({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return Sn(e,Ce).forEach(i=>r(i,void 0)),{matched:e.some(i=>ce(i,t,r)),selections:n}},getSelectionKeys:()=>Sn(e,Ce),matcherType:"or"})})}function H(e){return{[we]:()=>({match:t=>({matched:!!e(t)})})}}function Cn(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return me({[we]:()=>({match:r=>{let i={[t??kr]:r};return{matched:n===void 0||ce(n,r,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??kr].concat(n===void 0?[]:Ce(n))})})}function De(e){return typeof e=="number"}function $t(e){return typeof e=="string"}function rt(e){return typeof e=="bigint"}const ol=me(H(function(e){return!0})),Lv=ol,At=e=>Object.assign(me(e),{startsWith:t=>{return At(X(e,(n=t,H(r=>$t(r)&&r.startsWith(n)))));var n},endsWith:t=>{return At(X(e,(n=t,H(r=>$t(r)&&r.endsWith(n)))));var n},minLength:t=>At(X(e,(n=>H(r=>$t(r)&&r.length>=n))(t))),maxLength:t=>At(X(e,(n=>H(r=>$t(r)&&r.length<=n))(t))),includes:t=>{return At(X(e,(n=t,H(r=>$t(r)&&r.includes(n)))));var n},regex:t=>{return At(X(e,(n=t,H(r=>$t(r)&&!!r.match(n)))));var n}}),Rv=At(H($t)),Ne=e=>Object.assign(me(e),{between:(t,n)=>Ne(X(e,((r,i)=>H(o=>De(o)&&r<=o&&i>=o))(t,n))),lt:t=>Ne(X(e,(n=>H(r=>De(r)&&r<n))(t))),gt:t=>Ne(X(e,(n=>H(r=>De(r)&&r>n))(t))),lte:t=>Ne(X(e,(n=>H(r=>De(r)&&r<=n))(t))),gte:t=>Ne(X(e,(n=>H(r=>De(r)&&r>=n))(t))),int:()=>Ne(X(e,H(t=>De(t)&&Number.isInteger(t)))),finite:()=>Ne(X(e,H(t=>De(t)&&Number.isFinite(t)))),positive:()=>Ne(X(e,H(t=>De(t)&&t>0))),negative:()=>Ne(X(e,H(t=>De(t)&&t<0)))}),Bv=Ne(H(De)),it=e=>Object.assign(me(e),{between:(t,n)=>it(X(e,((r,i)=>H(o=>rt(o)&&r<=o&&i>=o))(t,n))),lt:t=>it(X(e,(n=>H(r=>rt(r)&&r<n))(t))),gt:t=>it(X(e,(n=>H(r=>rt(r)&&r>n))(t))),lte:t=>it(X(e,(n=>H(r=>rt(r)&&r<=n))(t))),gte:t=>it(X(e,(n=>H(r=>rt(r)&&r>=n))(t))),positive:()=>it(X(e,H(t=>rt(t)&&t>0))),negative:()=>it(X(e,H(t=>rt(t)&&t<0)))}),jv=it(H(rt)),Uv=me(H(function(e){return typeof e=="boolean"})),zv=me(H(function(e){return typeof e=="symbol"})),Hv=me(H(function(e){return e==null}));var _e={__proto__:null,matcher:we,optional:io,array:function(...e){return ro({[we]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return Ce(n).forEach(o=>{r[o]=[]}),{matched:!0,selections:r};const i=(o,s)=>{r[o]=(r[o]||[]).concat([s])};return{matched:t.every(o=>ce(n,o,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ce(e[0])})})},set:function(...e){return me({[we]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(o,s)=>{n[o]=(n[o]||[]).concat([s])},i=e[0];return{matched:Dv(t,o=>ce(i,o,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ce(e[0])})})},map:function(...e){return me({[we]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(a,l)=>{n[a]=(n[a]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,s]=e;return{matched:Nv(t,(a,l)=>{const u=ce(o,l,r),d=ce(s,a,r);return u&&d}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ce(e[0]),...Ce(e[1])]})})},intersection:X,union:il,not:function(e){return me({[we]:()=>({match:t=>({matched:!ce(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:H,select:Cn,any:ol,_:Lv,string:Rv,number:Bv,bigint:jv,boolean:Uv,symbol:zv,nullish:Hv,instanceOf:function(e){return me(H(function(t){return n=>n instanceof t}(e)))},shape:function(e){return me(H(Iv(e)))}};const oo={matched:!1,value:void 0};function Ue(e){return new Cr(e,oo)}class Cr{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,s={};const a=(u,d)=>{o=!0,s[u]=d},l=!r.some(u=>ce(u,this.input,a))||i&&!i(this.input)?oo:{matched:!0,value:n(o?kr in s?s[kr]:s:this.input,this.input)};return new Cr(this.input,l)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new Cr(this.input,r?{matched:!0,value:n(this.input,this.input)}:oo)}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 sl="isdk",so=44,Wv={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"};function $r(){throw new Error("Cycle detected")}var Kv=Symbol.for("preact-signals");function ao(){if(Xt>1)Xt--;else{for(var e,t=!1;$n!==void 0;){var n=$n;for($n=void 0,co++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&cl(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(co=0,Xt--,t)throw e}}var ee=void 0,$n=void 0,Xt=0,co=0,Ar=0;function al(e){if(ee!==void 0){var t=e.n;if(t===void 0||t.t!==ee)return t={i:0,S:e,p:ee.s,n:void 0,t:ee,e:void 0,x:void 0,r:t},ee.s!==void 0&&(ee.s.n=t),ee.s=t,e.n=t,32&ee.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=ee.s,t.n=void 0,ee.s.n=t,ee.s=t),t}}function le(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}le.prototype.brand=Kv,le.prototype.h=function(){return!0},le.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)},le.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},le.prototype.subscribe=function(e){var t=this;return uo(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})},le.prototype.valueOf=function(){return this.value},le.prototype.toString=function(){return this.value+""},le.prototype.toJSON=function(){return this.value},le.prototype.peek=function(){return this.v},Object.defineProperty(le.prototype,"value",{get:function(){var e=al(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(ee instanceof st&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){co>100&&$r(),this.v=e,this.i++,Ar++,Xt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ao()}}}});function ot(e){return new le(e)}function cl(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 ll(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ul(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function st(e){le.call(this,void 0),this.x=e,this.s=void 0,this.g=Ar-1,this.f=4}(st.prototype=new le).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ar))return!0;if(this.g=Ar,this.f|=1,this.i>0&&!cl(this))return this.f&=-2,!0;var e=ee;try{ll(this),ee=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return ee=e,ul(this),this.f&=-2,!0},st.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)}le.prototype.S.call(this,e)},st.prototype.U=function(e){if(this.t!==void 0&&(le.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)}},st.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},st.prototype.peek=function(){if(this.h()||$r(),16&this.f)throw this.v;return this.v},Object.defineProperty(st.prototype,"value",{get:function(){1&this.f&&$r();var e=al(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function qv(e){return new st(e)}function dl(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Xt++;var n=ee;ee=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,lo(e),r}finally{ee=n,ao()}}}function lo(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,dl(e)}function Gv(e){if(ee!==this)throw new Error("Out-of-order effect");ul(this),ee=e,this.f&=-2,8&this.f&&lo(this),ao()}function An(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}An.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()}},An.prototype.S=function(){1&this.f&&$r(),this.f|=1,this.f&=-9,dl(this),ll(this),Xt++;var e=ee;return ee=this,Gv.bind(this,e)},An.prototype.N=function(){2&this.f||(this.f|=2,this.o=$n,$n=this)},An.prototype.d=function(){this.f|=8,1&this.f||lo(this)};function uo(e){var t=new An(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var fo;function Qt(e,t){E[e]=t.bind(null,E[e]||function(){})}function Pr(e){fo&&fo(),fo=e&&e.S()}function fl(e){var t=this,n=e.data,r=Zv(n);r.value=n;var i=se(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Uo(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},qv(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}fl.displayName="_st",Object.defineProperties(le.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:fl},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Qt("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof le&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)}),Qt("__r",function(e,t){Pr();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return uo(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Pr(n),e(t)}),Qt("__e",function(e,t,n,r){Pr(),e(t,n,r)}),Qt("diffed",function(e,t){Pr();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in r)&&(a.d(),o[s]=void 0)}else n.U=o={};for(var l in r){var u=o[l],d=r[l];u===void 0?(u=Yv(n,l,d,i),o[l]=u):u.o(d,i)}}}e(t)});function Yv(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,o=ot(n);return{o:function(s,a){o.value=s,r=a},d:uo(function(){var s=o.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}Qt("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),Qt("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),ke.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Zv(e){return se(function(){return ot(e)},[])}const po=(e,t)=>t.some(n=>e instanceof n);let pl,hl;function Xv(){return pl||(pl=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Qv(){return hl||(hl=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ho=new WeakMap,vo=new WeakMap,Er=new WeakMap;function Jv(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{n(Pt(e.result)),i()},s=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",s)});return Er.set(t,e),t}function em(e){if(ho.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{n(),i()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});ho.set(e,t)}let mo={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return ho.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Pt(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function vl(e){mo=e(mo)}function tm(e){return Qv().includes(e)?function(...t){return e.apply(go(this),t),Pt(this.request)}:function(...t){return Pt(e.apply(go(this),t))}}function nm(e){return typeof e=="function"?tm(e):(e instanceof IDBTransaction&&em(e),po(e,Xv())?new Proxy(e,mo):e)}function Pt(e){if(e instanceof IDBRequest)return Jv(e);if(vo.has(e))return vo.get(e);const t=nm(e);return t!==e&&(vo.set(e,t),Er.set(t,e)),t}const go=e=>Er.get(e);function rm(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Pt(s);return r&&s.addEventListener("upgradeneeded",l=>{r(Pt(s.result),l.oldVersion,l.newVersion,Pt(s.transaction),l)}),n&&s.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const im=["get","getKey","getAll","getAllKeys","count"],om=["put","add","delete","clear"],yo=new Map;function ml(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(yo.get(t))return yo.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=om.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||im.includes(n)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(a.shift())),(await Promise.all([u[n](...a),i&&l.done]))[0]};return yo.set(t,o),o}vl(e=>({...e,get:(t,n,r)=>ml(t,n)||e.get(t,n,r),has:(t,n)=>!!ml(t,n)||e.has(t,n)}));const sm=["continue","continuePrimaryKey","advance"],gl={},bo=new WeakMap,yl=new WeakMap,am={get(e,t){if(!sm.includes(t))return e[t];let n=gl[t];return n||(n=gl[t]=function(...r){bo.set(this,yl.get(this)[t](...r))}),n}};async function*cm(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,am);for(yl.set(n,t),Er.set(n,go(t));t;)yield n,t=await(bo.get(n)||t.continue()),bo.delete(n)}function bl(e,t){return t===Symbol.asyncIterator&&po(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&po(e,[IDBIndex,IDBObjectStore])}vl(e=>({...e,get(t,n,r){return bl(t,n)?cm:e.get(t,n,r)},has(t,n){return bl(t,n)||e.has(t,n)}}));const Pn=e=>Ue(e).with(_e.number.lte(1e3),()=>`${Math.round(e)}KB`).with(_e.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),wl=e=>{const t=e.find(n=>n.isHead);if(!t)throw new Error("No head node found");return t},lm=e=>Object.entries(e).reduce((n,[r,i])=>(n[r]=i.value,n),{}),wo=e=>t=>t?t.type===e:!1;class En extends Error{constructor(){super("Aborted")}}function um(e,t=300){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}}const _l=typeof window>"u"?void 0:rm("inploi-chatbot",2,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Tn={getStateData:async(e,t)=>{var r;const n=xl({...e,flowKeys:t});return(r=await _l)==null?void 0:r.get("state",n)},setStateData:um(async e=>{var n;const t=xl(e);return(n=await _l)==null?void 0:n.put("state",e.data,t)},1e3)},Tr=(e,t,n,r=0)=>{if(!t.nextId)return n(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const i=e.find(u=>u.id===t.nextId);if(i===void 0)return{stepsMade:r,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,s=e.find(u=>u.id===o),a=t.type.includes("question")?1:0;if(s){const u=a+Math.max(Tr(e,i,n,r+a).remainingSteps,Tr(e,s,n,r+a).remainingSteps);return n(t.id,{stepsMade:r,remainingSteps:u}),{stepsMade:r,remainingSteps:u}}const l=a+Tr(e,i,n,r+a).remainingSteps;return n(t.id,{stepsMade:r,remainingSteps:l}),{stepsMade:r,remainingSteps:l}},dm=e=>{const t={},n=e.find(r=>r.isHead);return n&&Tr(e,n,(r,i)=>{t[r]=i}),t},xl=e=>[...e.flowKeys,e.id,e.version].join("/"),at=ot({state:"idle"}),Vn=e=>{const{state:t,flow:n}=at.value;if(t!=="loaded")return;Xe(n,"No flow to update");const r=e(n.data);n.data=r,at.value={state:t,flow:n},Tn.setStateData(n)},L={current$:at,viewState$:ot("maximised"),inputHeight$:ot(53),startFlow:async({flow:e,context:t,flowKeys:n,title:r})=>{const o={data:await Tn.getStateData(e,n)??kl(),startedAt:new Date,nodeIdToProgress:dm(e.nodes),flowKeys:n,id:e.id,version:e.version,nodes:e.nodes,context:t,title:r};at.value={state:"loaded",flow:o},Tn.setStateData(o)},cancelCurrentFlow:()=>{at.value={state:"idle"}},markAsFinished:()=>Vn(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Vn(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=at.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const n=kl();at.value={state:e,flow:{...t,data:n,startedAt:new Date}},Tn.setStateData(t)},addMessage:(e,t)=>{const n={...e,groupId:t};return Vn(r=>(r.messages.push(n),r))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:n}=at.value;Xe(t==="loaded","Application not loaded");const r=n.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));n.data.messages=r,Tn.setStateData(n)},setSubmission:(e,t)=>Vn(n=>(t===null?delete n.submissions[e]:n.submissions[e]=t,n)),setInput:e=>Vn(t=>({...t,currentInput:e??null}))},fm=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),kl=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:fm()});var pm=0;function g(e,t,n,r,i,o){var s,a,l={};for(a in t)a=="ref"?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--pm,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return E.vnode&&E.vnode(u),u}const hm=({message:e})=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:[g("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:[g("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"}),g("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"}),g("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),g("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),g("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),g("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),g("path",{d:"M38 56h19"})]}),g("div",{class:"flex flex-col gap-2 text-center",children:[g("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&g("p",{class:"text-neutral-9 text-sm",children:e})]})]}),vm=e=>g("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[g("title",{children:"Loading"}),g("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)}}"}),g("g",{id:"s1",transform:"translate(12,0)",children:g("g",{id:"s2",transform:"scale(0,0)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s3",transform:"translate(12,12)",children:g("g",{id:"s4",transform:"scale(1,1)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s5",transform:"translate(12,0)",children:g("g",{id:"s6",transform:"scale(0,0)",children:g("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"})})}),g("g",{id:"s7",transform:"translate(12,0)",children:g("g",{id:"s8",transform:"scale(0,0)",children:g("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"})})})]}),Sl=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(vm,{class:"text-neutral-6 h-8 w-8"})});function Cl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Cl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ct(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Cl(e))&&(r&&(r+=" "),r+=t);return r}const mm=e=>{const n=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-n,r))*100)}%`},Vr=({class:e,children:t,...n})=>g("button",{class:ct("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),...n,children:g("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})}),gm=()=>{if(L.current$.value.state!=="loaded")return null;const e=L.current$.value.flow.nodeIdToProgress,t=L.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const n=e[t];if(n===void 0)return null;const r=100*(n.stepsMade/(n.remainingSteps+n.stepsMade));return g("div",{style:{width:mm(r)},class:"bg-accent-9 h-[2px] transition-all duration-1000"})},ym=({children:e})=>{const t=L.viewState$;return g(Q,{children:g("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:[g("div",{class:"flex h-[var(--header-height)] gap-2",children:[g("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),g("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:g("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),g("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?g(Q,{children:[g(Vr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:g("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),g(Vr,{"aria-label":"Close application",onClick:L.cancelCurrentFlow,children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):g(Q,{children:[L.current$.value.state==="loaded"&&g(Vr,{"aria-label":"Restart",onClick:()=>{L.restart()},children:[g("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"}),g("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),g(Vr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),g(gm,{})]})})},bm=ni(()=>Promise.resolve().then(()=>sy).then(e=>e.ChatbotBody)),wm=({children:e})=>g(Ov,{features:Fv,children:e}),_m={closed:{y:"calc(100% + 1rem)",height:so},maximised:{y:0,height:"75vh"},minimised:{y:0,height:so}},xm=({logger:e,apiClient:t,analytics:n})=>{const{state:r,flow:i,error:o}=L.current$.value,s=L.viewState$.value,a=r!=="idle"&&s==="maximised",l=j(null);return g(wm,{children:g(mf,{open:a,modal:a,children:g(nl,{children:[g(gf,{forceMount:!0,asChild:!0,children:a&&g(xr.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-overlay fixed inset-0"})},"bg"),g(yf,{forceMount:!0,asChild:!0,children:g(xr.div,{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",variants:_m,initial:"closed",animate:Ue({state:r,view:s}).with({state:"idle"},()=>"closed").with({state:_e.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${so}px`},class:"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",children:g("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[g(ym,{children:i==null?void 0:i.title}),(()=>{if(s!=="maximised")return null;switch(r){case"idle":return null;case"loading":return g(Sl,{},"loading");case"loaded":return g(Lt,{fallback:g(Sl,{},"loading"),children:g(bm,{analytics:n,apiClient:t,logger:e})});case"error":return g(hm,{message:o});default:Eu(r)}})()]})},"content")})]})})})},_o=Ze({id:os($e(),String),version:bu(),nodes:cs(as())}),km=Ze({flow:_o}),Sm=Ze({company:Ze({name:$e()}),flow:_o,job:Ze({id:os($e(),String),title:$e()})}),Cm=Ze({flow:_o,title:$e(),flowKeys:cs($e()),context:ls($e(),as())}),$m=`#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%;--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 .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-\\[2px\\]{bottom:2px}#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 .top-\\[-2px\\]{top:-2px}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left: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-\\[2px\\]{height:2px}#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-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-0{--tw-translate-y: 0px;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 .translate-y-8{--tw-translate-y: 2rem;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 .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 .scale-0{--tw-scale-x: 0;--tw-scale-y: 0;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}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#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-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-8{border-color:var(--i-color-n-8)}#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-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#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-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-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-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-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 .opacity-0{opacity:0}#isdk .opacity-100{opacity:1}#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-\\[inset_0px_-6px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\,inset_0px_1px_1px_oklch\\(100_0_0\\/\\.3\\)\\]{--tw-shadow: inset 0px -6px 2px -1px oklch(100 0 0/.45),inset 0px 1px 1px oklch(100 0 0/.3);--tw-shadow-colored: inset 0px -6px 2px -1px var(--tw-shadow-color), inset 0px 1px 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{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));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-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 .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#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 .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 .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#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 .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#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\\: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\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#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\\:shadow-\\[inset_0px_0px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\,inset_0px_3px_1px_\\.5px_oklch\\(0_0_0\\/\\.08\\)\\]:active{--tw-shadow: inset 0px 0px 2px -1px oklch(100 0 0/.45),inset 0px 3px 1px .5px oklch(0 0 0/.08);--tw-shadow-colored: inset 0px 0px 2px -1px var(--tw-shadow-color), inset 0px 3px 1px .5px 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 .active\\:outline-neutral-10:active{outline-color:var(--i-color-n-10)}#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 .group:active .group-active\\:bottom-0{bottom:0}#isdk .group:active .group-active\\:top-0{top:0}#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-7{--tw-ring-color: var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-2{--tw-ring-offset-width: 2px}@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}}
50
- `,Am=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(sl);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=sl,t}});var Pm=["1","2","3","4","5","6","7","8","9","10","11","12"],Em={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]}},Tm=(e,t=1,n)=>r=>{const[i,o]=Em[n][r];return"oklch("+i+"% "+o*t+" "+e+")"},xo=e=>{const t=Tm(e.hue,e.chroma,e.mode);return Object.fromEntries(Pm.map(n=>[e.prefix+n,e.transform(t(n))]))},ko=e=>e,Vm=e=>{const t=Object.keys(e).flatMap(n=>{const r=e[n];return typeof r=="object"&&r!==null?Object.keys(r).map(i=>{const o=r[i];return[`${String(n)}.${i}`,o]}):[[n,r]]});return Object.fromEntries(t)},Mr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),So=(e,...t)=>{if(!t.length)return e;const n=t.shift();if(Mr(e)&&Mr(n))for(const r in n){const i=n[r];if(Mr(i)){e[r]||Object.assign(e,{[r]:{}});const o=e[r];Mr(o)&&So(o,i)}else Object.assign(e,{[r]:n[r]})}return So(e,...t)},Mm=e=>{function t(n,r){const i=[e.prefix,r.toString().replace(/\./g,"-")].join("");return n==="declaration"?`--${i}`:`var(--${i})`}return t},Om=()=>({core:e=>({semantic:t=>({component:n=>({from:r=>{const{theme:i,getToken:o}=r,s=f=>o("reference",f.toString()),a=e({theme:i}),l=t({theme:i,core:s,raw:{core:a}}),u=n({theme:i,core:s,semantic:s,raw:{core:a,semantic:l}}),d=Vm(So(a,l,u)),c=([f,h],p)=>{const v=[p,f].filter(Boolean).join(".");return typeof h=="object"?Object.entries(h).flatMap(b=>c(b,v)):[[r.getToken("declaration",v),h]]};return{values:d,declarations:Object.fromEntries(Object.entries(d).flatMap(f=>c(f))),ref:f=>o("reference",f.toString())}}})})})});const[Co,$o,$l]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Fm=Om().core(({theme:e})=>({color:{black:Co,white:$o,lowest:e.mode==="light"?$o:Co,highest:e.mode==="light"?Co:$o,...xo({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:ko}),...xo({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:ko}),...xo({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:ko})},typography:{}})).semantic(({core:e,raw:t,theme:n})=>{const r=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:r("n-8",n.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:$l,"bg-hover":r("n-10",.4),"bg-active":r("n-10",.5)}}}).component(({raw:e,theme:t,semantic:n,core:r})=>{const i=(o,s)=>e.core.color[o].replace(")",` / ${s})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":n("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":$l,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":r(t.mode==="dark"?"color.a-9":"color.a-10")}}}),Im=Mm({prefix:"i-"}),Dm=e=>{const t=Fm.from({theme:e,getToken:Im}),n=Object.entries(t.declarations).map(([r,i])=>`${r}: ${i};`);return`#isdk {
49
+ `),()=>{document.head.removeChild(u)}},[t]),O(Pm,{isPresent:t,childRef:r,sizeRef:i},Je(e,{ref:r}))}const eo=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Ha(Tm),l=Hn(),u=se(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:d=>{a.set(d,!0);for(const c of a.values())if(!c)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[n]);return se(()=>{a.forEach((d,c)=>a.set(c,!1))},[n]),W(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=O(Em,{isPresent:n},e)),O(wi.Provider,{value:u},e)};function Tm(){return new Map}function Vm(e){return W(()=>()=>e(),[])}const Ct=e=>e.key||"";function Mm(e,t){e.forEach(n=>{const r=Ct(n);t.set(r,n)})}function Om(e){const t=[];return Oe.forEach(e,n=>{Qe(n)&&t.push(n)}),t}const nl=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Ie(!i,"Replace exitBeforeEnter with mode='wait'");const a=fe(Pa).forceRender||Am()[0],l=tl(),u=Om(e);let d=u;const c=j(new Map).current,f=j(d),h=j(new Map).current,p=j(!0);if(_i(()=>{p.current=!1,Mm(u,h),f.current=d}),Vm(()=>{p.current=!0,h.clear(),c.clear()}),p.current)return O(Q,null,d.map(y=>O(eo,{key:Ct(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},y)));d=[...d];const m=f.current.map(Ct),b=u.map(Ct),x=m.length;for(let y=0;y<x;y++){const _=m[y];b.indexOf(_)===-1&&!c.has(_)&&c.set(_,void 0)}return s==="wait"&&c.size&&(d=[]),c.forEach((y,_)=>{if(b.indexOf(_)!==-1)return;const C=h.get(_);if(!C)return;const S=m.indexOf(_);let N=y;if(!N){const I=()=>{c.delete(_);const A=Array.from(h.keys()).filter(T=>!b.includes(T));if(A.forEach(T=>h.delete(T)),f.current=u.filter(T=>{const K=Ct(T);return K===_||A.includes(K)}),!c.size){if(l.current===!1)return;a(),r&&r()}};N=O(eo,{key:Ct(C),isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:s},C),c.set(_,N)}d.splice(S,0,N)}),d=d.map(y=>{const _=y.key;return c.has(_)?y:O(eo,{key:Ct(y),isPresent:!0,presenceAffectsLayout:o,mode:s},y)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),O(Q,null,c.size?d:d.map(y=>Je(y)))};function Fm({children:e,features:t,strict:n=!1}){const[,r]=ie(!to(t)),i=j(void 0);if(!to(t)){const{renderer:o,...s}=t;i.current=o,Ci(s)}return W(()=>{to(t)&&t().then(({renderer:o,...s})=>{Ci(s),i.current=o,r(!0)})},[]),O(xi.Provider,{value:{renderer:i.current,strict:n}},e)}function to(e){return typeof e=="function"}const Im={renderer:$m,...tm,...xp},we=Symbol.for("@ts-pattern/matcher"),rl=Symbol.for("@ts-pattern/isVariadic"),kr="@ts-pattern/anonymous-select-key",no=e=>!!(e&&typeof e=="object"),Sr=e=>e&&!!e[we],ce=(e,t,n)=>{if(Sr(e)){const r=e[we](),{matched:i,selections:o}=r.match(t);return i&&o&&Object.keys(o).forEach(s=>n(s,o[s])),i}if(no(e)){if(!no(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],o=[];for(const s of e.keys()){const a=e[s];Sr(a)&&a[rl]?o.push(a):o.length?i.push(a):r.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+i.length)return!1;const s=t.slice(0,r.length),a=i.length===0?[]:t.slice(-i.length),l=t.slice(r.length,i.length===0?1/0:-i.length);return r.every((u,d)=>ce(u,s[d],n))&&i.every((u,d)=>ce(u,a[d],n))&&(o.length===0||ce(o[0],l,n))}return e.length===t.length&&e.every((s,a)=>ce(s,t[a],n))}return Object.keys(e).every(r=>{const i=e[r];return(r in t||Sr(o=i)&&o[we]().matcherType==="optional")&&ce(i,t[r],n);var o})}return Object.is(t,e)},Ce=e=>{var t,n,r;return no(e)?Sr(e)?(t=(n=(r=e[we]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?Sn(e,Ce):Sn(Object.values(e),Ce):[]},Sn=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function Dm(...e){if(e.length===1){const[t]=e;return n=>ce(t,n,()=>{})}if(e.length===2){const[t,n]=e;return ce(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ve(e){return Object.assign(e,{optional:()=>io(e),and:t=>X(e,t),or:t=>il(e,t),select:t=>t===void 0?Cn(e):Cn(t,e)})}function ro(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[rl]:!0})}}))(e),{optional:()=>ro(io(e)),select:t=>ro(t===void 0?Cn(e):Cn(t,e))})}function io(e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return t===void 0?(Ce(e).forEach(i=>r(i,void 0)),{matched:!0,selections:n}):{matched:ce(e,t,r),selections:n}},getSelectionKeys:()=>Ce(e),matcherType:"optional"})})}const Nm=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},Lm=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function X(...e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return{matched:e.every(i=>ce(i,t,r)),selections:n}},getSelectionKeys:()=>Sn(e,Ce),matcherType:"and"})})}function il(...e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return Sn(e,Ce).forEach(i=>r(i,void 0)),{matched:e.some(i=>ce(i,t,r)),selections:n}},getSelectionKeys:()=>Sn(e,Ce),matcherType:"or"})})}function H(e){return{[we]:()=>({match:t=>({matched:!!e(t)})})}}function Cn(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ve({[we]:()=>({match:r=>{let i={[t??kr]:r};return{matched:n===void 0||ce(n,r,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??kr].concat(n===void 0?[]:Ce(n))})})}function De(e){return typeof e=="number"}function $t(e){return typeof e=="string"}function rt(e){return typeof e=="bigint"}const ol=ve(H(function(e){return!0})),Rm=ol,At=e=>Object.assign(ve(e),{startsWith:t=>{return At(X(e,(n=t,H(r=>$t(r)&&r.startsWith(n)))));var n},endsWith:t=>{return At(X(e,(n=t,H(r=>$t(r)&&r.endsWith(n)))));var n},minLength:t=>At(X(e,(n=>H(r=>$t(r)&&r.length>=n))(t))),maxLength:t=>At(X(e,(n=>H(r=>$t(r)&&r.length<=n))(t))),includes:t=>{return At(X(e,(n=t,H(r=>$t(r)&&r.includes(n)))));var n},regex:t=>{return At(X(e,(n=t,H(r=>$t(r)&&!!r.match(n)))));var n}}),Bm=At(H($t)),Ne=e=>Object.assign(ve(e),{between:(t,n)=>Ne(X(e,((r,i)=>H(o=>De(o)&&r<=o&&i>=o))(t,n))),lt:t=>Ne(X(e,(n=>H(r=>De(r)&&r<n))(t))),gt:t=>Ne(X(e,(n=>H(r=>De(r)&&r>n))(t))),lte:t=>Ne(X(e,(n=>H(r=>De(r)&&r<=n))(t))),gte:t=>Ne(X(e,(n=>H(r=>De(r)&&r>=n))(t))),int:()=>Ne(X(e,H(t=>De(t)&&Number.isInteger(t)))),finite:()=>Ne(X(e,H(t=>De(t)&&Number.isFinite(t)))),positive:()=>Ne(X(e,H(t=>De(t)&&t>0))),negative:()=>Ne(X(e,H(t=>De(t)&&t<0)))}),jm=Ne(H(De)),it=e=>Object.assign(ve(e),{between:(t,n)=>it(X(e,((r,i)=>H(o=>rt(o)&&r<=o&&i>=o))(t,n))),lt:t=>it(X(e,(n=>H(r=>rt(r)&&r<n))(t))),gt:t=>it(X(e,(n=>H(r=>rt(r)&&r>n))(t))),lte:t=>it(X(e,(n=>H(r=>rt(r)&&r<=n))(t))),gte:t=>it(X(e,(n=>H(r=>rt(r)&&r>=n))(t))),positive:()=>it(X(e,H(t=>rt(t)&&t>0))),negative:()=>it(X(e,H(t=>rt(t)&&t<0)))}),Um=it(H(rt)),zm=ve(H(function(e){return typeof e=="boolean"})),Hm=ve(H(function(e){return typeof e=="symbol"})),Wm=ve(H(function(e){return e==null}));var _e={__proto__:null,matcher:we,optional:io,array:function(...e){return ro({[we]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return Ce(n).forEach(o=>{r[o]=[]}),{matched:!0,selections:r};const i=(o,s)=>{r[o]=(r[o]||[]).concat([s])};return{matched:t.every(o=>ce(n,o,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ce(e[0])})})},set:function(...e){return ve({[we]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(o,s)=>{n[o]=(n[o]||[]).concat([s])},i=e[0];return{matched:Nm(t,o=>ce(i,o,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ce(e[0])})})},map:function(...e){return ve({[we]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(a,l)=>{n[a]=(n[a]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,s]=e;return{matched:Lm(t,(a,l)=>{const u=ce(o,l,r),d=ce(s,a,r);return u&&d}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ce(e[0]),...Ce(e[1])]})})},intersection:X,union:il,not:function(e){return ve({[we]:()=>({match:t=>({matched:!ce(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:H,select:Cn,any:ol,_:Rm,string:Bm,number:jm,bigint:Um,boolean:zm,symbol:Hm,nullish:Wm,instanceOf:function(e){return ve(H(function(t){return n=>n instanceof t}(e)))},shape:function(e){return ve(H(Dm(e)))}};const oo={matched:!1,value:void 0};function Ue(e){return new Cr(e,oo)}class Cr{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,s={};const a=(u,d)=>{o=!0,s[u]=d},l=!r.some(u=>ce(u,this.input,a))||i&&!i(this.input)?oo:{matched:!0,value:n(o?kr in s?s[kr]:s:this.input,this.input)};return new Cr(this.input,l)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new Cr(this.input,r?{matched:!0,value:n(this.input,this.input)}:oo)}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 sl="isdk",so=44,Km={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"};function $r(){throw new Error("Cycle detected")}var qm=Symbol.for("preact-signals");function ao(){if(Xt>1)Xt--;else{for(var e,t=!1;$n!==void 0;){var n=$n;for($n=void 0,co++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&cl(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(co=0,Xt--,t)throw e}}var ee=void 0,$n=void 0,Xt=0,co=0,Ar=0;function al(e){if(ee!==void 0){var t=e.n;if(t===void 0||t.t!==ee)return t={i:0,S:e,p:ee.s,n:void 0,t:ee,e:void 0,x:void 0,r:t},ee.s!==void 0&&(ee.s.n=t),ee.s=t,e.n=t,32&ee.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=ee.s,t.n=void 0,ee.s.n=t,ee.s=t),t}}function le(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}le.prototype.brand=qm,le.prototype.h=function(){return!0},le.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)},le.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},le.prototype.subscribe=function(e){var t=this;return uo(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})},le.prototype.valueOf=function(){return this.value},le.prototype.toString=function(){return this.value+""},le.prototype.toJSON=function(){return this.value},le.prototype.peek=function(){return this.v},Object.defineProperty(le.prototype,"value",{get:function(){var e=al(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(ee instanceof st&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){co>100&&$r(),this.v=e,this.i++,Ar++,Xt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ao()}}}});function ot(e){return new le(e)}function cl(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 ll(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ul(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function st(e){le.call(this,void 0),this.x=e,this.s=void 0,this.g=Ar-1,this.f=4}(st.prototype=new le).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ar))return!0;if(this.g=Ar,this.f|=1,this.i>0&&!cl(this))return this.f&=-2,!0;var e=ee;try{ll(this),ee=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return ee=e,ul(this),this.f&=-2,!0},st.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)}le.prototype.S.call(this,e)},st.prototype.U=function(e){if(this.t!==void 0&&(le.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)}},st.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},st.prototype.peek=function(){if(this.h()||$r(),16&this.f)throw this.v;return this.v},Object.defineProperty(st.prototype,"value",{get:function(){1&this.f&&$r();var e=al(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Gm(e){return new st(e)}function dl(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Xt++;var n=ee;ee=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,lo(e),r}finally{ee=n,ao()}}}function lo(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,dl(e)}function Ym(e){if(ee!==this)throw new Error("Out-of-order effect");ul(this),ee=e,this.f&=-2,8&this.f&&lo(this),ao()}function An(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}An.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()}},An.prototype.S=function(){1&this.f&&$r(),this.f|=1,this.f&=-9,dl(this),ll(this),Xt++;var e=ee;return ee=this,Ym.bind(this,e)},An.prototype.N=function(){2&this.f||(this.f|=2,this.o=$n,$n=this)},An.prototype.d=function(){this.f|=8,1&this.f||lo(this)};function uo(e){var t=new An(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var fo;function Qt(e,t){E[e]=t.bind(null,E[e]||function(){})}function Pr(e){fo&&fo(),fo=e&&e.S()}function fl(e){var t=this,n=e.data,r=Xm(n);r.value=n;var i=se(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Uo(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},Gm(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}fl.displayName="_st",Object.defineProperties(le.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:fl},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Qt("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof le&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)}),Qt("__r",function(e,t){Pr();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return uo(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Pr(n),e(t)}),Qt("__e",function(e,t,n,r){Pr(),e(t,n,r)}),Qt("diffed",function(e,t){Pr();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in r)&&(a.d(),o[s]=void 0)}else n.U=o={};for(var l in r){var u=o[l],d=r[l];u===void 0?(u=Zm(n,l,d,i),o[l]=u):u.o(d,i)}}}e(t)});function Zm(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,o=ot(n);return{o:function(s,a){o.value=s,r=a},d:uo(function(){var s=o.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}Qt("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),Qt("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),ke.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Xm(e){return se(function(){return ot(e)},[])}const po=(e,t)=>t.some(n=>e instanceof n);let pl,hl;function Qm(){return pl||(pl=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Jm(){return hl||(hl=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ho=new WeakMap,mo=new WeakMap,Er=new WeakMap;function ev(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{n(Pt(e.result)),i()},s=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",s)});return Er.set(t,e),t}function tv(e){if(ho.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{n(),i()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});ho.set(e,t)}let vo={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return ho.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Pt(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function ml(e){vo=e(vo)}function nv(e){return Jm().includes(e)?function(...t){return e.apply(go(this),t),Pt(this.request)}:function(...t){return Pt(e.apply(go(this),t))}}function rv(e){return typeof e=="function"?nv(e):(e instanceof IDBTransaction&&tv(e),po(e,Qm())?new Proxy(e,vo):e)}function Pt(e){if(e instanceof IDBRequest)return ev(e);if(mo.has(e))return mo.get(e);const t=rv(e);return t!==e&&(mo.set(e,t),Er.set(t,e)),t}const go=e=>Er.get(e);function iv(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Pt(s);return r&&s.addEventListener("upgradeneeded",l=>{r(Pt(s.result),l.oldVersion,l.newVersion,Pt(s.transaction),l)}),n&&s.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const ov=["get","getKey","getAll","getAllKeys","count"],sv=["put","add","delete","clear"],yo=new Map;function vl(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(yo.get(t))return yo.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=sv.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||ov.includes(n)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(a.shift())),(await Promise.all([u[n](...a),i&&l.done]))[0]};return yo.set(t,o),o}ml(e=>({...e,get:(t,n,r)=>vl(t,n)||e.get(t,n,r),has:(t,n)=>!!vl(t,n)||e.has(t,n)}));const av=["continue","continuePrimaryKey","advance"],gl={},bo=new WeakMap,yl=new WeakMap,cv={get(e,t){if(!av.includes(t))return e[t];let n=gl[t];return n||(n=gl[t]=function(...r){bo.set(this,yl.get(this)[t](...r))}),n}};async function*lv(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,cv);for(yl.set(n,t),Er.set(n,go(t));t;)yield n,t=await(bo.get(n)||t.continue()),bo.delete(n)}function bl(e,t){return t===Symbol.asyncIterator&&po(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&po(e,[IDBIndex,IDBObjectStore])}ml(e=>({...e,get(t,n,r){return bl(t,n)?lv:e.get(t,n,r)},has(t,n){return bl(t,n)||e.has(t,n)}}));const Pn=e=>Ue(e).with(_e.number.lte(1e3),()=>`${Math.round(e)}KB`).with(_e.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),wl=e=>{const t=e.find(n=>n.isHead);if(!t)throw new Error("No head node found");return t},uv=e=>Object.entries(e).reduce((n,[r,i])=>(n[r]=i.value,n),{}),wo=e=>t=>t?t.type===e:!1;class En extends Error{constructor(){super("Aborted")}}function dv(e,t=300){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}}const _l=typeof window>"u"?void 0:iv("inploi-chatbot",2,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Tn={getStateData:async(e,t)=>{var r;const n=xl({...e,flowKeys:t});return(r=await _l)==null?void 0:r.get("state",n)},setStateData:dv(async e=>{var n;const t=xl(e);return(n=await _l)==null?void 0:n.put("state",e.data,t)},1e3)},Tr=(e,t,n,r=0)=>{if(!t.nextId)return n(t.id,{stepsMade:r,remainingSteps:0}),{stepsMade:r,remainingSteps:0};const i=e.find(u=>u.id===t.nextId);if(i===void 0)return{stepsMade:r,remainingSteps:0};const o=t.type==="if-block"?t.branchId:void 0,s=e.find(u=>u.id===o),a=t.type.includes("question")?1:0;if(s){const u=a+Math.max(Tr(e,i,n,r+a).remainingSteps,Tr(e,s,n,r+a).remainingSteps);return n(t.id,{stepsMade:r,remainingSteps:u}),{stepsMade:r,remainingSteps:u}}const l=a+Tr(e,i,n,r+a).remainingSteps;return n(t.id,{stepsMade:r,remainingSteps:l}),{stepsMade:r,remainingSteps:l}},fv=e=>{const t={},n=e.find(r=>r.isHead);return n&&Tr(e,n,(r,i)=>{t[r]=i}),t},xl=e=>[...e.flowKeys,e.id,e.version].join("/"),at=ot({state:"idle"}),Vn=e=>{const{state:t,flow:n}=at.value;if(t!=="loaded")return;Xe(n,"No flow to update");const r=e(n.data);n.data=r,at.value={state:t,flow:n},Tn.setStateData(n)},L={current$:at,viewState$:ot("maximised"),inputHeight$:ot(53),startFlow:async({flow:e,context:t,flowKeys:n,title:r})=>{const o={data:await Tn.getStateData(e,n)??kl(),startedAt:new Date,nodeIdToProgress:fv(e.nodes),flowKeys:n,id:e.id,version:e.version,nodes:e.nodes,context:t,title:r};at.value={state:"loaded",flow:o},Tn.setStateData(o)},cancelCurrentFlow:()=>{at.value={state:"idle"}},markAsFinished:()=>Vn(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Vn(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=at.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const n=kl();at.value={state:e,flow:{...t,data:n,startedAt:new Date}},Tn.setStateData(t)},addMessage:(e,t)=>{const n={...e,groupId:t};return Vn(r=>(r.messages.push(n),r))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:n}=at.value;Xe(t==="loaded","Application not loaded");const r=n.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));n.data.messages=r,Tn.setStateData(n)},setSubmission:(e,t)=>Vn(n=>(t===null?delete n.submissions[e]:n.submissions[e]=t,n)),setInput:e=>Vn(t=>({...t,currentInput:e??null}))},pv=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),kl=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:pv()});var hv=0;function g(e,t,n,r,i,o){var s,a,l={};for(a in t)a=="ref"?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--hv,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return E.vnode&&E.vnode(u),u}const mv=({message:e})=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:[g("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:[g("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"}),g("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"}),g("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),g("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),g("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),g("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),g("path",{d:"M38 56h19"})]}),g("div",{class:"flex flex-col gap-2 text-center",children:[g("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&g("p",{class:"text-neutral-9 text-sm",children:e})]})]}),vv=e=>g("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[g("title",{children:"Loading"}),g("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)}}"}),g("g",{id:"s1",transform:"translate(12,0)",children:g("g",{id:"s2",transform:"scale(0,0)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s3",transform:"translate(12,12)",children:g("g",{id:"s4",transform:"scale(1,1)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s5",transform:"translate(12,0)",children:g("g",{id:"s6",transform:"scale(0,0)",children:g("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"})})}),g("g",{id:"s7",transform:"translate(12,0)",children:g("g",{id:"s8",transform:"scale(0,0)",children:g("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"})})})]}),Sl=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(vv,{class:"text-neutral-6 h-8 w-8"})});function Cl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Cl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ct(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Cl(e))&&(r&&(r+=" "),r+=t);return r}const gv=e=>{const n=e/100,r=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-n,r))*100)}%`},Vr=({class:e,children:t,...n})=>g("button",{class:ct("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),...n,children:g("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})}),yv=()=>{if(L.current$.value.state!=="loaded")return null;const e=L.current$.value.flow.nodeIdToProgress,t=L.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const n=e[t];if(n===void 0)return null;const r=100*(n.stepsMade/(n.remainingSteps+n.stepsMade));return g("div",{style:{width:gv(r)},class:"bg-accent-9 h-[2px] transition-all duration-1000"})},bv=({children:e})=>{const t=L.viewState$;return g(Q,{children:g("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:[g("div",{class:"flex h-[var(--header-height)] gap-2",children:[g("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),g("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:g("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),g("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?g(Q,{children:[g(Vr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:g("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),g(Vr,{"aria-label":"Close application",onClick:L.cancelCurrentFlow,children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):g(Q,{children:[L.current$.value.state==="loaded"&&g(Vr,{"aria-label":"Restart",onClick:()=>{L.restart()},children:[g("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"}),g("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),g(Vr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),g(yv,{})]})})},wv=ni(()=>Promise.resolve().then(()=>ay).then(e=>e.ChatbotBody)),_v=({children:e})=>g(Fm,{features:Im,children:e}),xv={closed:{y:"calc(100% + 1rem)",height:so},maximised:{y:0,height:"75vh"},minimised:{y:0,height:so}},kv=({logger:e,apiClient:t,analytics:n})=>{const{state:r,flow:i,error:o}=L.current$.value,s=L.viewState$.value,a=r!=="idle"&&s==="maximised",l=j(null);return g(_v,{children:g(gf,{open:a,modal:a,children:g(nl,{children:[g(yf,{forceMount:!0,asChild:!0,children:a&&g(xr.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-overlay fixed inset-0"})},"bg"),g(bf,{forceMount:!0,asChild:!0,children:g(xr.div,{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",variants:xv,initial:"closed",animate:Ue({state:r,view:s}).with({state:"idle"},()=>"closed").with({state:_e.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${so}px`},class:"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",children:g("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[g(bv,{children:i==null?void 0:i.title}),(()=>{if(s!=="maximised")return null;switch(r){case"idle":return null;case"loading":return g(Sl,{},"loading");case"loaded":return g(Lt,{fallback:g(Sl,{},"loading"),children:g(wv,{analytics:n,apiClient:t,logger:e})});case"error":return g(mv,{message:o});default:Tu(r)}})()]})},"content")})]})})})},_o=Ze({id:os($e(),String),version:wu(),nodes:cs(as())}),Sv=Ze({flow:_o}),Cv=Ze({company:Ze({name:$e()}),flow:_o,job:Ze({id:os($e(),String),title:$e()})}),$v=Ze({flow:_o,title:$e(),flowKeys:cs($e()),context:ls($e(),as())}),Av=`#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%;--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 .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-\\[2px\\]{bottom:2px}#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 .top-\\[-2px\\]{top:-2px}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left: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-\\[2px\\]{height:2px}#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-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-0{--tw-translate-y: 0px;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 .translate-y-8{--tw-translate-y: 2rem;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 .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 .scale-0{--tw-scale-x: 0;--tw-scale-y: 0;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}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#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-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-8{border-color:var(--i-color-n-8)}#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-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#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-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-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-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-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 .opacity-0{opacity:0}#isdk .opacity-100{opacity:1}#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-\\[inset_0px_-6px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\,inset_0px_1px_1px_oklch\\(100_0_0\\/\\.3\\)\\]{--tw-shadow: inset 0px -6px 2px -1px oklch(100 0 0/.45),inset 0px 1px 1px oklch(100 0 0/.3);--tw-shadow-colored: inset 0px -6px 2px -1px var(--tw-shadow-color), inset 0px 1px 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{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));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-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 .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#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 .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 .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#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 .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#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\\: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\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#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\\:shadow-\\[inset_0px_0px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\,inset_0px_3px_1px_\\.5px_oklch\\(0_0_0\\/\\.08\\)\\]:active{--tw-shadow: inset 0px 0px 2px -1px oklch(100 0 0/.45),inset 0px 3px 1px .5px oklch(0 0 0/.08);--tw-shadow-colored: inset 0px 0px 2px -1px var(--tw-shadow-color), inset 0px 3px 1px .5px 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 .active\\:outline-neutral-10:active{outline-color:var(--i-color-n-10)}#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 .group:active .group-active\\:bottom-0{bottom:0}#isdk .group:active .group-active\\:top-0{top:0}#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-7{--tw-ring-color: var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-2{--tw-ring-offset-width: 2px}@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}}
50
+ `,Pv=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(sl);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=sl,t}});var Ev=["1","2","3","4","5","6","7","8","9","10","11","12"],Tv={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]}},Vv=(e,t=1,n)=>r=>{const[i,o]=Tv[n][r];return"oklch("+i+"% "+o*t+" "+e+")"},xo=e=>{const t=Vv(e.hue,e.chroma,e.mode);return Object.fromEntries(Ev.map(n=>[e.prefix+n,e.transform(t(n))]))},ko=e=>e,Mv=e=>{const t=Object.keys(e).flatMap(n=>{const r=e[n];return typeof r=="object"&&r!==null?Object.keys(r).map(i=>{const o=r[i];return[`${String(n)}.${i}`,o]}):[[n,r]]});return Object.fromEntries(t)},Mr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),So=(e,...t)=>{if(!t.length)return e;const n=t.shift();if(Mr(e)&&Mr(n))for(const r in n){const i=n[r];if(Mr(i)){e[r]||Object.assign(e,{[r]:{}});const o=e[r];Mr(o)&&So(o,i)}else Object.assign(e,{[r]:n[r]})}return So(e,...t)},Ov=e=>{function t(n,r){const i=[e.prefix,r.toString().replace(/\./g,"-")].join("");return n==="declaration"?`--${i}`:`var(--${i})`}return t},Fv=()=>({core:e=>({semantic:t=>({component:n=>({from:r=>{const{theme:i,getToken:o}=r,s=f=>o("reference",f.toString()),a=e({theme:i}),l=t({theme:i,core:s,raw:{core:a}}),u=n({theme:i,core:s,semantic:s,raw:{core:a,semantic:l}}),d=Mv(So(a,l,u)),c=([f,h],p)=>{const m=[p,f].filter(Boolean).join(".");return typeof h=="object"?Object.entries(h).flatMap(b=>c(b,m)):[[r.getToken("declaration",m),h]]};return{values:d,declarations:Object.fromEntries(Object.entries(d).flatMap(f=>c(f))),ref:f=>o("reference",f.toString())}}})})})});const[Co,$o,$l]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Iv=Fv().core(({theme:e})=>({color:{black:Co,white:$o,lowest:e.mode==="light"?$o:Co,highest:e.mode==="light"?Co:$o,...xo({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:ko}),...xo({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:ko}),...xo({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:ko})},typography:{}})).semantic(({core:e,raw:t,theme:n})=>{const r=(i,o)=>t.core.color[i].replace(")",` / ${o})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:r("n-8",n.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:$l,"bg-hover":r("n-10",.4),"bg-active":r("n-10",.5)}}}).component(({raw:e,theme:t,semantic:n,core:r})=>{const i=(o,s)=>e.core.color[o].replace(")",` / ${s})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":n("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":$l,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":r(t.mode==="dark"?"color.a-9":"color.a-10")}}}),Dv=Ov({prefix:"i-"}),Nv=e=>{const t=Iv.from({theme:e,getToken:Dv}),n=Object.entries(t.declarations).map(([r,i])=>`${r}: ${i};`);return`#isdk {
51
51
  ${n.concat(n).join(`
52
52
  `)}
53
- }`},Nm=({_internal_domManager:e=Am(),theme:t})=>pt(({apiClient:n,logger:r,analytics:i})=>{let o=!1;const s=()=>{if(typeof window>"u")return;const a=[O("style",{id:"inploi-chatbot-styles"},$m),O("style",{id:"inploi-chatbot-theme"},Dm(t))],l=e.getOrCreateChatbotElement();Dt(O(Q,{},[a,O(xm,{apiClient:n,logger:r,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;s(),r.info("Chatbot plugin prepared")}catch(a){r.error("Error preparing chatbot plugin",a)}},fetchFlowByJobId:async a=>n.fetch(`/flow/job/${a}`).then(l=>{const u=cn(Sm,l);return{context:{job_id:u.job.id,flow_id:u.flow.id},flow:u.flow,title:`Applying for “${u.job.title}”`,flowKeys:[u.job.id]}}),fetchFlowById:async a=>n.fetch(`/flow/id/${a}`).then(l=>{const u=cn(km,l);return{flow:u.flow,context:{flow_id:u.flow.id},title:"Chatbot",flowKeys:[]}}),open:async a=>{if(!(typeof window>"u"))try{L.cancelCurrentFlow(),L.viewState$.value="maximised",o||s(),a instanceof Promise?(L.current$.value={state:"loading"},a.then(async l=>{const u=cn(Cm,l);L.startFlow(u)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";L.current$.value={state:"error",error:u}})):L.startFlow(a)}catch(l){r.error("Error starting flow",l)}},startApplication:void 0,closeApplication:void 0,close:async()=>{typeof window>"u"||(L.cancelCurrentFlow(),r.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=Nm;const Al=({node:e,nodes:t,stopWhen:n})=>{if((n==null?void 0:n(e))===!0)return e;const r=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(r)return Al({node:r,nodes:t,stopWhen:n})},Lm=({childNode:e,nodes:t})=>{const r=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(a=>a.id===i.branchId);if(!o)return!1;const s=Al({node:o,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(r!=null&&r.nextId)return t.find(i=>i.id===r.nextId)},Rm=({flow:e,analytics:t,logger:n,context:r,apiClient:i,getSubmissions:o,chatService:s,onFlowEnd:a,onInterpret:l})=>{let u=new AbortController;const d=async(c,f)=>{const h=o();l==null||l(c,f);try{await Bm({analytics:t,logger:n,apiClient:i,context:r,node:c,submissions:h,chat:{sendMessage:async p=>s.send({groupId:c.id,message:p,signal:u.signal}),userInput:async p=>s.input({input:p,signal:u.signal})},next:p=>{const v=p?e.find(b=>b.id===p):Lm({childNode:c,nodes:e});return v?d(v,c):a==null?void 0:a(c)},end:()=>a==null?void 0:a(c)})}catch(p){if(p instanceof En)return;throw p}};return{interpret:async c=>{const f=e.find(h=>h.id===c)??wl(e);return d(f)},undo:c=>{let f=1;const h=e.find(v=>v.id===c[c.length-1]);for(let v=c.length-2;v>0;v--){const b=c[v],x=e.find(y=>y.id===b);if(!x||(f++,x.type.startsWith("question-")))break}u.abort(),u=new AbortController;const p=e.find(v=>v.id===c[c.length-f]);return Xe(p,"Undo failed: new start node not found"),d(p,h),{removed:f}},abort:()=>{u.abort()}}};async function Bm(e){return await Ue(e).with({node:{type:"text"}},Hm).with({node:{type:"image"}},Wm).with({node:{type:"question-text"}},Km).with({node:{type:"question-enum"}},Gm).with({node:{type:"question-number"}},qm).with({node:{type:"question-boolean"}},Ym).with({node:{type:"question-file"}},Qm).with({node:{type:"question-address"}},Xm).with({node:{type:"end-flow"}},Jm).with({node:{type:"if-block"}},zm).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},Um).with({node:{type:"integration-application-submit"}},jm).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function jm({chat:e,next:t,node:n,logger:r,apiClient:i,submissions:o,context:s,analytics:a}){await e.userInput({type:"submit",key:void 0,config:{label:"Submit my application"}}),await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const{anonymous_id:l,session_id:u}=a.getSessionInfo(),d=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:n.data.integrationId,anonymous_id:l,session_id:u,submissions:lm(o||{})})}).catch(c=>c);await Ue(d).with({ats_data:{redirect_url:_e.string}},async c=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const f=new URL(c.ats_data.redirect_url);l&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",l),await e.sendMessage({type:"link",href:f.toString(),text:"Finalise application on partner"}),t(n.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Application submitted"}),t(n.nextId)}).otherwise(async c=>{r.error(c),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function Um({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({type:"link",href:n.data.href,text:Et(n.data.cta,r)}),t(n.nextId)}async function zm({submissions:e,next:t,node:n}){const r=eg(n,e)?n.branchId:n.nextId;t(r)}async function Hm({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.text,r)}),t(n.nextId)}async function Wm({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"image",url:n.data.url,height:n.data.height,width:n.data.width}),t(n.nextId)}async function Km({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:n.data.format}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(n.nextId)}async function qm({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:"text"}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(n.nextId)}async function Gm({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"multiple-choice",config:n.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:n.data.options.filter(o=>i.value.includes(o.value)).map(o=>o.label).join(", ")}),t(n.nextId)}async function Ym({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.question,r)});const o=(await e.userInput({key:n.data.key,type:"boolean",config:{optional:n.data.optional,labels:{true:n.data.trueLabel,false:n.data.falseLabel}}})).value;o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:{true:n.data.trueLabel,false:n.data.falseLabel}[o]}),t(n.nextId)}const Zm=document.createElement("div"),Pl={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"]},El=Object.keys(Pl);async function Xm({chat:e,next:t,node:n,logger:r}){if(El.every(p=>n.data.keys[p]===null))return t(n.nextId);const{google:i}=window;await e.sendMessage({author:"bot",type:"text",text:n.data.question});const o=async p=>{const v=[{label:"Postcode",key:n.data.keys.postcode,optional:!1,defaultValue:p.postcode},{label:"Line 1",key:n.data.keys.line1,optional:!1,defaultValue:p.line1},{label:"Line 2",key:n.data.keys.line2,optional:!0,defaultValue:p.line2},{label:"Line 3",key:n.data.keys.line3,optional:!0,defaultValue:p.line3},{label:"City",key:n.data.keys.city,optional:!1,defaultValue:p.city},{label:"State/County/Province",key:n.data.keys.state,optional:!0,defaultValue:p.state},{label:"Country",key:n.data.keys.country,optional:!1,defaultValue:p.country}];for(const b of v){if(b.key===null)continue;await e.sendMessage({author:"bot",type:"text",text:b.label});const{value:x}=await e.userInput({type:"text",key:b.key,config:{format:"text",optional:b.optional,defaultValue:b.defaultValue}});x===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:x})}};if(!Zr(window,"google")||!Zr(window.google,"maps")||!Zr(window.google.maps,"places"))return r.warn("Google maps not available, falling back to manual input."),r.info("If you’d like to use the address autocomplete, please insert the google maps API snippet in your website and make sure it has access to the *places* library."),await o({}),t(n.nextId);const s=new i.maps.places.AutocompleteService,a=new i.maps.places.PlacesService(Zm),{value:l}=await e.userInput({type:"text",key:"_internal-address-search",config:{format:"text",optional:!1,placeholder:"Search for your address"}});if(l===null)return t(n.id);await e.sendMessage({author:"user",type:"text",text:`Search for “${l}”`});const{predictions:u}=await s.getPlacePredictions({input:l}),{value:[d]}=await e.userInput({type:"multiple-choice",key:void 0,config:{options:u.slice(0,4).map(p=>({label:p.description,value:p.place_id})).concat({label:"None of these",value:"none"}),maxSelected:1,minSelected:1}});if(!d||d==="none")return t(n.id);const c=await new Promise((p,v)=>a.getDetails({placeId:d,fields:["address_components"]},(b,x)=>x!==i.maps.places.PlacesServiceStatus.OK?v(x):b===null?v("ZERO_RESULTS"):p({ok:!0,place:b}))).catch(async p=>(r.error("Failed to get address details",p),{ok:!1}));if(c.ok===!1)return await e.sendMessage({type:"system",variant:"error",text:"Failed to get address details"}),await o({}),t(n.id);const f=c.place.address_components,h=f?El.reduce((p,v)=>{const b=Pl[v],x=f.filter(y=>y.types.some(_=>b.includes(_))).map(y=>y.long_name).join(", ");return x&&(p[v]=x),p},{}):{};return await e.sendMessage({author:"bot",type:"text",text:"Please confirm or adjust your address:"}),await o(h),t(n.nextId)}async function Qm({node:e,chat:t,next:n,submissions:r}){await t.sendMessage({author:"bot",type:"text",text:Et(e.data.question,r)});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.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const o of i.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});n(e.nextId)}async function Jm({chat:e,end:t,node:n}){await e.sendMessage({type:"system",variant:"info",text:n.data.systemMessage}),t()}const Tl=_e.union(_e.string,_e.array(_e.string),null),eg=(e,t)=>{const n=t==null?void 0:t[e.data.compareKey];return n?Ue({...e.data,answer:n}).with({compare:"equals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r===n.value.toString():!1).with({compare:"notEquals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r!==n.value.toString():!1).with({compare:"contains",answer:{value:Tl}},({compareValue:r,answer:i})=>i.value!==null&&i.value.includes(r)).with({compare:"notContains",answer:{value:Tl}},({compareValue:r,answer:i})=>i.value===null||!i.value.includes(r)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},Et=(e,t)=>{const n=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(n,(r,i,o="")=>{i=i.trim();const s=t==null?void 0:t[i];if(!s)return o;switch(s.type){case"boolean":return s.value==="true"?"true":"false";case"file":return s.value?s.value.map(a=>`${a.name} (${Pn(a.sizeKb)})`).join(", "):"no files";case"multiple-choice":return s.value.join(", ");default:return s.value||o}})},Or=({class:e,...t})=>g("button",{class:ct("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:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[g("title",{children:"Send"}),g("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),g("path",{d:"M8 4V13"})]})}),tg=25,Ao=ot({instant:()=>{},smooth:()=>{}}),Ve={onSubmitSuccessFn$:ot(()=>{}),isBotTyping$:ot(!1),scrollToEnd:{instant:()=>Ao.value.instant(),smooth:()=>Ao.value.smooth()}},ng=()=>{const e=j(null);Ae(()=>{Ao.value={instant:()=>{var n;return(n=e.current)==null?void 0:n.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*1.5&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=se(()=>({send:async({message:n,signal:r,groupId:i})=>{if(await Ue(n).with({author:"bot",type:"text"},async o=>{if(r!=null&&r.aborted)throw new En;Ve.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*tg;await new Promise(a=>setTimeout(a,s,{signal:r})),Ve.isBotTyping$.value=!1}).otherwise(async()=>{}),r!=null&&r.aborted)throw new En;L.addMessage(n,i)},input:async({input:n,signal:r})=>{if(r!=null&&r.aborted)throw new En;return L.setInput(n),await new Promise(i=>{const o=s=>{if(r!=null&&r.aborted)throw new En;L.setInput(void 0),n.key&&L.setSubmission(n.key,s),i(s)};Ve.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}},Fr=({class:e,...t})=>g("button",{type:"button",class:ct("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:[g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[g("title",{children:"Skip"}),g("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),g("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Po=()=>{const e=j(null);return W(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Vl=["true","false"],rg=wu(Vl),ig="answer",og=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{const r=Po();return n(),g("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const o=Ue(i).with({nativeEvent:{submitter:_e.select(_e.union(_e.instanceOf(HTMLButtonElement),_e.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=cn(rg,o);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:Vl.map((i,o)=>g("button",{ref:o===0?r:null,type:"submit",name:ig,value:i,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 flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:g("p",{class:"truncate text-center text-base",children:e.config.labels[i]})}))}),e.config.optional&&g("div",{class:"px-2 pb-2",children:g(Fr,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Eo=({error:e,onAnimationComplete:t})=>(Ae(()=>{e&&t()},[e,t]),e?g("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[g("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),g("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),g("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),g("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null),sg=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>r.result?t(r.result.toString()):n("No result from reader"),r.onerror=n}),ag=e=>e.reduce((t,n)=>t+n.sizeKb,0),cg=wo("file"),Ml=3,lg=({file:e,class:t,...n})=>{const r=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${r}$`),"");return g("div",{class:ct("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...n,children:[g("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[g("span",{class:"block truncate",children:i}),g("span",{children:[".",r]})]}),g("p",{"aria-label":"File size",class:"text-accent-11",children:Pn(e.sizeKb)})]})},Ol=({class:e,...t})=>g("li",{class:ct("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),ug=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},dg=({allowedExtensions:e,files:t})=>{const n=e.map(r=>r.toLowerCase());return t.every(r=>n.includes(ug(r.name).toLowerCase()))},fg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var c;const r=(c=L.current$.value.flow)==null?void 0:c.data.submissions[e.key],[i,o]=ie(cg(r)&&r.value!==null?r.value:[]),[s,a]=ie(),l=i.length-Ml,u=ag(i),d=Po();return g("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),a(void 0),i.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!dg({allowedExtensions:e.config.extensions,files:i})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${Pn(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(i)),children:[g("div",{class:"flex items-center gap-2",children:[g("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[i.length>0?g(Q,{children:[g("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,Ml).map(f=>{const h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return g(Ol,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:p}),g("span",{children:[".",h]})]})}),l>0?g(Ol,{children:["+",l," file",l!==1?"s":""]}):null]}),g("p",{class:"text-neutral-11 text-xs",children:[Pn(u)," ",i.length>1?"total":""]})]}):g("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[g("header",{class:"flex flex-col items-center gap-0",children:[g("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:g("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"})}),g("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?g("p",{class:"text-neutral-10 text-xs",children:["(max ",Pn(e.config.fileSizeLimitKib),")"]}):null]}),g("aside",{class:"flex flex-col items-center gap-2",children:[g("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),g("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>g("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:f.replace(".","")}))})]})]}),g("input",{id:"dropzone-file",onInput:async f=>{Xe(f.target instanceof HTMLInputElement);const h=f.target.files?Array.from(f.target.files):[],p=await Promise.allSettled(h.map(async b=>{const x=await sg(b);return{name:b.name,data:x,sizeKb:b.size/1e3}}));if(p.some(({status:b})=>b==="rejected"))return a({type:"invalid",message:"Invalid file"});const v=p.map(b=>b.status==="fulfilled"?b.value:null).filter(Boolean);o(v)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),g("div",{class:"flex h-full flex-col items-center gap-2",children:[g(Or,{disabled:i.length===0}),e.config.optional&&g(Fr,{onClick:()=>t(null)})]})]}),s&&g(Eo,{onAnimationComplete:n,error:s})]})};var Mn=e=>e.type==="checkbox",Jt=e=>e instanceof Date,ye=e=>e==null;const Fl=e=>typeof e=="object";var oe=e=>!ye(e)&&!Array.isArray(e)&&Fl(e)&&!Jt(e),pg=e=>oe(e)&&e.target?Mn(e.target)?e.target.checked:e.target.value:e,hg=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vg=(e,t)=>e.has(hg(t)),mg=e=>{const t=e.constructor&&e.constructor.prototype;return oe(t)&&t.hasOwnProperty("isPrototypeOf")},To=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ze(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(To&&(e instanceof Blob||e instanceof FileList))&&(n||oe(e)))if(t=n?[]:{},!n&&!mg(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=ze(e[r]));else return e;return t}var On=e=>Array.isArray(e)?e.filter(Boolean):[],te=e=>e===void 0,V=(e,t,n)=>{if(!t||!oe(e))return n;const r=On(t.split(/[,[\].]+?/)).reduce((i,o)=>ye(i)?i:i[o],e);return te(r)||r===e?te(e[t])?n:e[t]:r},lt=e=>typeof e=="boolean";const Il={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Me={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},He={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};Te.createContext(null);var gg=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Me.all&&(t._proxyFormState[s]=!r||Me.all),n&&(n[s]=!0),e[s]}});return i},Pe=e=>oe(e)&&!Object.keys(e).length,yg=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Pe(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Me.all))},Vo=e=>Array.isArray(e)?e:[e];function bg(e){const t=Te.useRef(e);t.current=e,Te.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Le=e=>typeof e=="string",wg=(e,t,n,r,i)=>Le(e)?(r&&t.watch.add(e),V(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),V(n,o))):(r&&(t.watchAll=!0),n),Mo=e=>/^\w*$/.test(e),Dl=e=>On(e.replace(/["|']|\]/g,"").split(/\.|\[/));function G(e,t,n){let r=-1;const i=Mo(t)?[t]:Dl(t),o=i.length,s=o-1;for(;++r<o;){const a=i[r];let l=n;if(r!==s){const u=e[a];l=oe(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}e[a]=l,e=e[a]}return e}var Nl=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Ll=e=>({isOnSubmit:!e||e===Me.onSubmit,isOnBlur:e===Me.onBlur,isOnChange:e===Me.onChange,isOnAll:e===Me.all,isOnTouch:e===Me.onTouched}),Rl=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ir=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=V(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break}else oe(a)&&Ir(a,t)}}};var _g=(e,t,n)=>{const r=On(V(e,n));return G(r,"root",t[n]),G(e,n,r),e},Oo=e=>e.type==="file",ut=e=>typeof e=="function",Dr=e=>{if(!To)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Nr=e=>Le(e),Fo=e=>e.type==="radio",Lr=e=>e instanceof RegExp;const Bl={value:!1,isValid:!1},jl={value:!0,isValid:!0};var Ul=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!te(e[0].attributes.value)?te(e[0].value)||e[0].value===""?jl:{value:e[0].value,isValid:!0}:jl:Bl}return Bl};const zl={isValid:!1,value:null};var Hl=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,zl):zl;function Wl(e,t,n="validate"){if(Nr(e)||Array.isArray(e)&&e.every(Nr)||lt(e)&&!e)return{type:n,message:Nr(e)?e:"",ref:t}}var en=e=>oe(e)&&!Lr(e)?e:{value:e,message:""},Kl=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:d,max:c,pattern:f,validate:h,name:p,valueAsNumber:v,mount:b,disabled:x}=e._f,y=V(t,p);if(!b||x)return{};const _=s?s[0]:o,C=U=>{r&&_.reportValidity&&(_.setCustomValidity(lt(U)?"":U||""),_.reportValidity())},S={},N=Fo(o),I=Mn(o),A=N||I,T=(v||Oo(o))&&te(o.value)&&te(y)||Dr(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,K=Nl.bind(null,p,n,S),J=(U,R,B,z=He.maxLength,ne=He.minLength)=>{const de=U?R:B;S[p]={type:U?z:ne,message:de,ref:o,...K(U?z:ne,de)}};if(i?!Array.isArray(y)||!y.length:a&&(!A&&(T||ye(y))||lt(y)&&!y||I&&!Ul(s).isValid||N&&!Hl(s).isValid)){const{value:U,message:R}=Nr(a)?{value:!!a,message:a}:en(a);if(U&&(S[p]={type:He.required,message:R,ref:_,...K(He.required,R)},!n))return C(R),S}if(!T&&(!ye(d)||!ye(c))){let U,R;const B=en(c),z=en(d);if(!ye(y)&&!isNaN(y)){const ne=o.valueAsNumber||y&&+y;ye(B.value)||(U=ne>B.value),ye(z.value)||(R=ne<z.value)}else{const ne=o.valueAsDate||new Date(y),de=Vt=>new Date(new Date().toDateString()+" "+Vt),We=o.type=="time",dt=o.type=="week";Le(B.value)&&y&&(U=We?de(y)>de(B.value):dt?y>B.value:ne>new Date(B.value)),Le(z.value)&&y&&(R=We?de(y)<de(z.value):dt?y<z.value:ne<new Date(z.value))}if((U||R)&&(J(!!U,B.message,z.message,He.max,He.min),!n))return C(S[p].message),S}if((l||u)&&!T&&(Le(y)||i&&Array.isArray(y))){const U=en(l),R=en(u),B=!ye(U.value)&&y.length>+U.value,z=!ye(R.value)&&y.length<+R.value;if((B||z)&&(J(B,U.message,R.message),!n))return C(S[p].message),S}if(f&&!T&&Le(y)){const{value:U,message:R}=en(f);if(Lr(U)&&!y.match(U)&&(S[p]={type:He.pattern,message:R,ref:o,...K(He.pattern,R)},!n))return C(R),S}if(h){if(ut(h)){const U=await h(y,t),R=Wl(U,_);if(R&&(S[p]={...R,...K(He.validate,R.message)},!n))return C(R.message),S}else if(oe(h)){let U={};for(const R in h){if(!Pe(U)&&!n)break;const B=Wl(await h[R](y,t),_,R);B&&(U={...B,...K(R,B.message)},C(B.message),n&&(S[p]=U))}if(!Pe(U)&&(S[p]={ref:_,...U},!n))return S}}return C(!0),S};function xg(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=te(e)?r++:e[t[r++]];return e}function kg(e){for(const t in e)if(e.hasOwnProperty(t)&&!te(e[t]))return!1;return!0}function ue(e,t){const n=Array.isArray(t)?t:Mo(t)?[t]:Dl(t),r=n.length===1?e:xg(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(oe(r)&&Pe(r)||Array.isArray(r)&&kg(r))&&ue(e,n.slice(0,-1)),e}function Io(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Rr=e=>ye(e)||!Fl(e);function Tt(e,t){if(Rr(e)||Rr(t))return e===t;if(Jt(e)&&Jt(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Jt(o)&&Jt(s)||oe(o)&&oe(s)||Array.isArray(o)&&Array.isArray(s)?!Tt(o,s):o!==s)return!1}}return!0}var ql=e=>e.type==="select-multiple",Sg=e=>Fo(e)||Mn(e),Do=e=>Dr(e)&&e.isConnected,Gl=e=>{for(const t in e)if(ut(e[t]))return!0;return!1};function Br(e,t={}){const n=Array.isArray(e);if(oe(e)||n)for(const r in e)Array.isArray(e[r])||oe(e[r])&&!Gl(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Br(e[r],t[r])):ye(e[r])||(t[r]=!0);return t}function Yl(e,t,n){const r=Array.isArray(e);if(oe(e)||r)for(const i in e)Array.isArray(e[i])||oe(e[i])&&!Gl(e[i])?te(t)||Rr(n[i])?n[i]=Array.isArray(e[i])?Br(e[i],[]):{...Br(e[i])}:Yl(e[i],ye(t)?{}:t[i],n[i]):n[i]=!Tt(e[i],t[i]);return n}var No=(e,t)=>Yl(e,t,Br(t)),Zl=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>te(e)?e:t?e===""?NaN:e&&+e:n&&Le(e)?new Date(e):r?r(e):e;function Lo(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Oo(t)?t.files:Fo(t)?Hl(e.refs).value:ql(t)?[...t.selectedOptions].map(({value:n})=>n):Mn(t)?Ul(e.refs).value:Zl(te(t.value)?e.ref.value:t.value,e)}var Cg=(e,t,n,r)=>{const i={};for(const o of e){const s=V(t,o);s&&G(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Fn=e=>te(e)?e:Lr(e)?e.source:oe(e)?Lr(e.value)?e.value.source:e.value:e,$g=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Xl(e,t,n){const r=V(e,n);if(r||Mo(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=V(t,o),a=V(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var Ag=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Pg=(e,t)=>!On(V(e,t)).length&&ue(e,t);const Eg={mode:Me.onSubmit,reValidateMode:Me.onChange,shouldFocusError:!0};function Tg(e={},t){let n={...Eg,...e},r={submitCount:0,isDirty:!1,isLoading:ut(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=oe(n.defaultValues)||oe(n.values)?ze(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:ze(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Io(),array:Io(),state:Io()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=Ll(n.mode),v=Ll(n.reValidateMode),b=n.criteriaMode===Me.all,x=m=>w=>{clearTimeout(d),d=setTimeout(m,w)},y=async m=>{if(c.isValid||m){const w=n.resolver?Pe((await T()).errors):await J(i,!0);w!==r.isValid&&f.state.next({isValid:w})}},_=m=>c.isValidating&&f.state.next({isValidating:m}),C=(m,w=[],k,M,P=!0,$=!0)=>{if(M&&k){if(a.action=!0,$&&Array.isArray(V(i,m))){const F=k(V(i,m),M.argA,M.argB);P&&G(i,m,F)}if($&&Array.isArray(V(r.errors,m))){const F=k(V(r.errors,m),M.argA,M.argB);P&&G(r.errors,m,F),Pg(r.errors,m)}if(c.touchedFields&&$&&Array.isArray(V(r.touchedFields,m))){const F=k(V(r.touchedFields,m),M.argA,M.argB);P&&G(r.touchedFields,m,F)}c.dirtyFields&&(r.dirtyFields=No(o,s)),f.state.next({name:m,isDirty:R(m,w),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else G(s,m,w)},S=(m,w)=>{G(r.errors,m,w),f.state.next({errors:r.errors})},N=(m,w,k,M)=>{const P=V(i,m);if(P){const $=V(s,m,te(k)?V(o,m):k);te($)||M&&M.defaultChecked||w?G(s,m,w?$:Lo(P._f)):ne(m,$),a.mount&&y()}},I=(m,w,k,M,P)=>{let $=!1,F=!1;const Z={name:m};if(!k||M){c.isDirty&&(F=r.isDirty,r.isDirty=Z.isDirty=R(),$=F!==Z.isDirty);const re=Tt(V(o,m),w);F=V(r.dirtyFields,m),re?ue(r.dirtyFields,m):G(r.dirtyFields,m,!0),Z.dirtyFields=r.dirtyFields,$=$||c.dirtyFields&&F!==!re}if(k){const re=V(r.touchedFields,m);re||(G(r.touchedFields,m,k),Z.touchedFields=r.touchedFields,$=$||c.touchedFields&&re!==k)}return $&&P&&f.state.next(Z),$?Z:{}},A=(m,w,k,M)=>{const P=V(r.errors,m),$=c.isValid&&lt(w)&&r.isValid!==w;if(e.delayError&&k?(u=x(()=>S(m,k)),u(e.delayError)):(clearTimeout(d),u=null,k?G(r.errors,m,k):ue(r.errors,m)),(k?!Tt(P,k):P)||!Pe(M)||$){const F={...M,...$&&lt(w)?{isValid:w}:{},errors:r.errors,name:m};r={...r,...F},f.state.next(F)}_(!1)},T=async m=>n.resolver(s,n.context,Cg(m||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),K=async m=>{const{errors:w}=await T(m);if(m)for(const k of m){const M=V(w,k);M?G(r.errors,k,M):ue(r.errors,k)}else r.errors=w;return w},J=async(m,w,k={valid:!0})=>{for(const M in m){const P=m[M];if(P){const{_f:$,...F}=P;if($){const Z=l.array.has($.name),re=await Kl(P,s,b,n.shouldUseNativeValidation&&!w,Z);if(re[$.name]&&(k.valid=!1,w))break;!w&&(V(re,$.name)?Z?_g(r.errors,re,$.name):G(r.errors,$.name,re[$.name]):ue(r.errors,$.name))}F&&await J(F,w,k)}}return k.valid},U=()=>{for(const m of l.unMount){const w=V(i,m);w&&(w._f.refs?w._f.refs.every(k=>!Do(k)):!Do(w._f.ref))&&nn(m)}l.unMount=new Set},R=(m,w)=>(m&&w&&G(s,m,w),!Tt(ft(),o)),B=(m,w,k)=>wg(m,l,{...a.mount?s:te(w)?o:Le(m)?{[m]:w}:w},k,w),z=m=>On(V(a.mount?s:o,m,e.shouldUnregister?V(o,m,[]):[])),ne=(m,w,k={})=>{const M=V(i,m);let P=w;if(M){const $=M._f;$&&(!$.disabled&&G(s,m,Zl(w,$)),P=Dr($.ref)&&ye(w)?"":w,ql($.ref)?[...$.ref.options].forEach(F=>F.selected=P.includes(F.value)):$.refs?Mn($.ref)?$.refs.length>1?$.refs.forEach(F=>(!F.defaultChecked||!F.disabled)&&(F.checked=Array.isArray(P)?!!P.find(Z=>Z===F.value):P===F.value)):$.refs[0]&&($.refs[0].checked=!!P):$.refs.forEach(F=>F.checked=F.value===P):Oo($.ref)?$.ref.value="":($.ref.value=P,$.ref.type||f.values.next({name:m,values:{...s}})))}(k.shouldDirty||k.shouldTouch)&&I(m,P,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&Y(m)},de=(m,w,k)=>{for(const M in w){const P=w[M],$=`${m}.${M}`,F=V(i,$);(l.array.has(m)||!Rr(P)||F&&!F._f)&&!Jt(P)?de($,P,k):ne($,P,k)}},We=(m,w,k={})=>{const M=V(i,m),P=l.array.has(m),$=ze(w);G(s,m,$),P?(f.array.next({name:m,values:{...s}}),(c.isDirty||c.dirtyFields)&&k.shouldDirty&&f.state.next({name:m,dirtyFields:No(o,s),isDirty:R(m,$)})):M&&!M._f&&!ye($)?de(m,$,k):ne(m,$,k),Rl(m,l)&&f.state.next({...r}),f.values.next({name:m,values:{...s}}),!a.mount&&t()},dt=async m=>{const w=m.target;let k=w.name,M=!0;const P=V(i,k),$=()=>w.type?Lo(P._f):pg(m),F=Z=>{M=Number.isNaN(Z)||Z===V(s,k,Z)};if(P){let Z,re;const Hr=$(),rn=m.type===Il.BLUR||m.type===Il.FOCUS_OUT,ay=!$g(P._f)&&!n.resolver&&!V(r.errors,k)&&!P._f.deps||Ag(rn,V(r.touchedFields,k),r.isSubmitted,v,p),Ro=Rl(k,l,rn);G(s,k,Hr),rn?(P._f.onBlur&&P._f.onBlur(m),u&&u(0)):P._f.onChange&&P._f.onChange(m);const Bo=I(k,Hr,rn,!1),cy=!Pe(Bo)||Ro;if(!rn&&f.values.next({name:k,type:m.type,values:{...s}}),ay)return c.isValid&&y(),cy&&f.state.next({name:k,...Ro?{}:Bo});if(!rn&&Ro&&f.state.next({...r}),_(!0),n.resolver){const{errors:su}=await T([k]);if(F(Hr),M){const ly=Xl(r.errors,i,k),au=Xl(su,i,ly.name||k);Z=au.error,k=au.name,re=Pe(su)}}else Z=(await Kl(P,s,b,n.shouldUseNativeValidation))[k],F(Hr),M&&(Z?re=!1:c.isValid&&(re=await J(i,!0)));M&&(P._f.deps&&Y(P._f.deps),A(k,re,Z,Bo))}},Vt=(m,w)=>{if(V(r.errors,w)&&m.focus)return m.focus(),1},Y=async(m,w={})=>{let k,M;const P=Vo(m);if(_(!0),n.resolver){const $=await K(te(m)?m:P);k=Pe($),M=m?!P.some(F=>V($,F)):k}else m?(M=(await Promise.all(P.map(async $=>{const F=V(i,$);return await J(F&&F._f?{[$]:F}:F)}))).every(Boolean),!(!M&&!r.isValid)&&y()):M=k=await J(i);return f.state.next({...!Le(m)||c.isValid&&k!==r.isValid?{}:{name:m},...n.resolver||!m?{isValid:k}:{},errors:r.errors,isValidating:!1}),w.shouldFocus&&!M&&Ir(i,Vt,m?P:l.mount),M},ft=m=>{const w={...o,...a.mount?s:{}};return te(m)?w:Le(m)?V(w,m):m.map(k=>V(w,k))},In=(m,w)=>({invalid:!!V((w||r).errors,m),isDirty:!!V((w||r).dirtyFields,m),isTouched:!!V((w||r).touchedFields,m),error:V((w||r).errors,m)}),jr=m=>{m&&Vo(m).forEach(w=>ue(r.errors,w)),f.state.next({errors:m?r.errors:{}})},Dn=(m,w,k)=>{const M=(V(i,m,{_f:{}})._f||{}).ref;G(r.errors,m,{...w,ref:M}),f.state.next({name:m,errors:r.errors,isValid:!1}),k&&k.shouldFocus&&M&&M.focus&&M.focus()},Mt=(m,w)=>ut(m)?f.values.subscribe({next:k=>m(B(void 0,w),k)}):B(m,w,!0),nn=(m,w={})=>{for(const k of m?Vo(m):l.mount)l.mount.delete(k),l.array.delete(k),w.keepValue||(ue(i,k),ue(s,k)),!w.keepError&&ue(r.errors,k),!w.keepDirty&&ue(r.dirtyFields,k),!w.keepTouched&&ue(r.touchedFields,k),!n.shouldUnregister&&!w.keepDefaultValue&&ue(o,k);f.values.next({values:{...s}}),f.state.next({...r,...w.keepDirty?{isDirty:R()}:{}}),!w.keepIsValid&&y()},Ur=({disabled:m,name:w,field:k,fields:M,value:P})=>{if(lt(m)){const $=m?void 0:te(P)?Lo(k?k._f:V(M,w)._f):P;G(s,w,$),I(w,$,!1,!1,!0)}},Ot=(m,w={})=>{let k=V(i,m);const M=lt(w.disabled);return G(i,m,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:m}},name:m,mount:!0,...w}}),l.mount.add(m),k?Ur({field:k,disabled:w.disabled,name:m}):N(m,!0,w.value),{...M?{disabled:w.disabled}:{},...n.progressive?{required:!!w.required,min:Fn(w.min),max:Fn(w.max),minLength:Fn(w.minLength),maxLength:Fn(w.maxLength),pattern:Fn(w.pattern)}:{},name:m,onChange:dt,onBlur:dt,ref:P=>{if(P){Ot(m,w),k=V(i,m);const $=te(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,F=Sg($),Z=k._f.refs||[];if(F?Z.find(re=>re===$):$===k._f.ref)return;G(i,m,{_f:{...k._f,...F?{refs:[...Z.filter(Do),$,...Array.isArray(V(o,m))?[{}]:[]],ref:{type:$.type,name:m}}:{ref:$}}}),N(m,!1,void 0,$)}else k=V(i,m,{}),k._f&&(k._f.mount=!1),(n.shouldUnregister||w.shouldUnregister)&&!(vg(l.array,m)&&a.action)&&l.unMount.add(m)}}},Ft=()=>n.shouldFocusError&&Ir(i,Vt,l.mount),Ke=m=>{lt(m)&&(f.state.next({disabled:m}),Ir(i,w=>{w.disabled=m},0,!1))},Nn=(m,w)=>async k=>{k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let M=ze(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:$}=await T();r.errors=P,M=$}else await J(i);ue(r.errors,"root"),Pe(r.errors)?(f.state.next({errors:{}}),await m(M,k)):(w&&await w({...r.errors},k),Ft(),setTimeout(Ft)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Pe(r.errors),submitCount:r.submitCount+1,errors:r.errors})},zr=(m,w={})=>{V(i,m)&&(te(w.defaultValue)?We(m,V(o,m)):(We(m,w.defaultValue),G(o,m,w.defaultValue)),w.keepTouched||ue(r.touchedFields,m),w.keepDirty||(ue(r.dirtyFields,m),r.isDirty=w.defaultValue?R(m,V(o,m)):R()),w.keepError||(ue(r.errors,m),c.isValid&&y()),f.state.next({...r}))},iu=(m,w={})=>{const k=m?ze(m):o,M=ze(k),P=m&&!Pe(m)?M:o;if(w.keepDefaultValues||(o=k),!w.keepValues){if(w.keepDirtyValues||h)for(const $ of l.mount)V(r.dirtyFields,$)?G(P,$,V(s,$)):We($,V(P,$));else{if(To&&te(m))for(const $ of l.mount){const F=V(i,$);if(F&&F._f){const Z=Array.isArray(F._f.refs)?F._f.refs[0]:F._f.ref;if(Dr(Z)){const re=Z.closest("form");if(re){re.reset();break}}}}i={}}s=e.shouldUnregister?w.keepDefaultValues?ze(o):{}:ze(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!c.isValid||!!w.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:w.keepSubmitCount?r.submitCount:0,isDirty:w.keepDirty?r.isDirty:!!(w.keepDefaultValues&&!Tt(m,o)),isSubmitted:w.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:w.keepDirtyValues?r.dirtyFields:w.keepDefaultValues&&m?No(o,m):{},touchedFields:w.keepTouched?r.touchedFields:{},errors:w.keepErrors?r.errors:{},isSubmitSuccessful:w.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ou=(m,w)=>iu(ut(m)?m(s):m,w);return{control:{register:Ot,unregister:nn,getFieldState:In,handleSubmit:Nn,setError:Dn,_executeSchema:T,_getWatch:B,_getDirty:R,_updateValid:y,_removeUnmounted:U,_updateFieldArray:C,_updateDisabledField:Ur,_getFieldArray:z,_reset:iu,_resetDefaultValues:()=>ut(n.defaultValues)&&n.defaultValues().then(m=>{ou(m,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:m=>{r={...r,...m}},_disableForm:Ke,_subjects:f,_proxyFormState:c,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(m){a=m},get _defaultValues(){return o},get _names(){return l},set _names(m){l=m},get _formState(){return r},set _formState(m){r=m},get _options(){return n},set _options(m){n={...n,...m}}},trigger:Y,register:Ot,handleSubmit:Nn,watch:Mt,setValue:We,getValues:ft,reset:ou,resetField:zr,clearErrors:jr,unregister:nn,setError:Dn,setFocus:(m,w={})=>{const k=V(i,m),M=k&&k._f;if(M){const P=M.refs?M.refs[0]:M.ref;P.focus&&(P.focus(),w.shouldSelect&&P.select())}},getFieldState:In}}function Ql(e={}){const t=Te.useRef(),n=Te.useRef(),[r,i]=Te.useState({isDirty:!1,isValidating:!1,isLoading:ut(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:ut(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Tg(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,bg({subject:o._subjects.state,next:s=>{yg(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Te.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Te.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),Te.useEffect(()=>{e.values&&!Tt(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values):o._resetDefaultValues()},[e.values,o]),Te.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=gg(r,o),t.current}var Jl=function(e,t,n){if(e&&"reportValidity"in e){var r=V(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Vg=function(e,t){var n=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Jl(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return Jl(s,i,e)})};for(var r in t.fields)n(r)},Mg=function(e,t){t.shouldUseNativeValidation&&Vg(e,t);var n={};for(var r in e){var i=V(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Fg(t.names||Object.keys(e),r)){var s=Object.assign({},Og(V(n,r)));G(s,"root",o),G(n,r,s)}else G(n,r,o)}return n},Og=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Fg=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},Ig=function(e,t){for(var n={};e.issues.length;){var r=e.issues[0];if(r.path){var i=r.path.map(function(a){return a.key}).join(".");if(n[i]||(n[i]={message:r.message,type:r.validation}),t){var o=n[i].types,s=o&&o[r.validation];n[i]=Nl(i,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},eu=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(s,a){try{var l=function(){function u(c){return{values:n.raw?r:c,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return n.mode==="sync"?u(cn(e,r,d)):Promise.resolve(ku(e,r,d)).then(u)}()}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(s instanceof Yr)return{values:{},errors:Mg(Ig(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const Dg=27,Ng=12,Lg=10,Rg=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},Bg=wo("multiple-choice"),jg=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return eu(Ze({checked:us(ls(yu()),n=>Object.entries(n).filter(([r,i])=>i).map(([r,i])=>r),[$u(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),ds(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Ug=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var u,d;const r=e.key?(u=L.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,i=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,{register:o,handleSubmit:s,formState:{errors:a}}=Ql({defaultValues:{checked:i?{}:Bg(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:jg(e.config)}),l=Po();return g("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:c=>{i&&Rg(c.currentTarget)},onSubmit:s(c=>{const f=c.checked;t(f)}),children:[g("div",{class:"flex items-center gap-1",children:[g("ul",{style:{maxHeight:6.5*Dg+5*Ng+2*Lg},class:ct("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{"justify-center":e.config.options.length===1}),children:e.config.options.map((c,f)=>{const h=`checked.${c.value}`,{ref:p,...v}=o(h);return g("li",{class:"relative",children:[g("input",{autoFocus:f===0,ref:b=>{b&&f===0&&(l.current=b),p(b)},id:h,...v,class:"peer sr-only h-full",type:"checkbox"}),g("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",htmlFor:h,children:c.label})]},c.value)})}),g("div",{class:"flex flex-col items-center gap-2",children:[!i&&g(Or,{}),e.config.minSelected===0&&g(Fr,{type:"button",onClick:()=>t([])})]})]}),g("div",{class:"px-1",children:g(Eo,{onAnimationComplete:n,error:(d=a.checked)==null?void 0:d.root})})]})},zg=({input:e,onSubmitSuccess:t})=>g("div",{class:"flex flex-col items-center py-3",children:g("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 group flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white shadow-[inset_0px_-6px_2px_-1px_oklch(100_0_0/.45),inset_0px_1px_1px_oklch(100_0_0/.3)] outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:shadow-[inset_0px_0px_2px_-1px_oklch(100_0_0/.45),inset_0px_3px_1px_.5px_oklch(0_0_0/.08)] active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:g("span",{class:"relative bottom-[2px] top-[-2px] flex items-center gap-1.5 transition-all duration-300 group-active:bottom-0 group-active:top-0",children:[g("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),g("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:[g("path",{d:"M4 8L8 4L12 8"}),g("path",{d:"M8 4V13"})]})]})})}),tn={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"},Hg=$e(tn.phone,[Au(/^\+?[0-9 -]+$/,tn.phone)]),Wg={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Kg=wo("text"),qg=e=>eu(Ze({text:{email:$e(tn.email,[Cu(tn.email)]),phone:us(Hg,t=>t.replace(/[^0-9]/g,"")),text:$e([ds(1,tn.empty)]),url:$e([Pu(tn.url)])}[e.format]})),Gg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var c;const r=e.key?(c=L.current$.value.flow)==null?void 0:c.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:o,handleSubmit:s,formState:{errors:a}}=Ql({defaultValues:{text:i||(Kg(r)?r.value:"")},resolver:qg(e.config)}),{ref:l,...u}=o("text",{required:!e.config.optional}),d=j();return Ae(()=>{d.current&&(d.current.focus(),d.current.select())},[]),g(Q,{children:g("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(f=>{t(f.text)}),children:[g("div",{class:"flex items-center gap-2",children:[g("div",{class:"relative min-w-0 flex-grow",children:[g("input",{id:"chat-input",...u,...Wg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(d.current=f),l(f)},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&&g(Fr,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),g(Or,{})]}),g(Eo,{onAnimationComplete:n,error:a.text})]})})},Yg=()=>{var i;const e=(i=L.current$.value.flow)==null?void 0:i.data.currentInput,t=j(null),n=ae(()=>{t.current&&(L.inputHeight$.value=t.current.getBoundingClientRect().height)},[]);W(()=>{n()},[e==null?void 0:e.type,n]);const r=o=>s=>Ve.onSubmitSuccessFn$.value({type:o,value:s});return g(xr.div,{initial:{height:0},animate:{height:L.inputHeight$.value},exit:{height:0,opacity:0},onAnimationStart:Ve.scrollToEnd.smooth,onAnimationComplete:Ve.scrollToEnd.smooth,class:"bg-statusbar absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:g("div",{ref:t,class:"border-divider border-t",children:Ue({input:e,onHeightChange:n}).with({input:_e.nullish},()=>g("div",{class:"flex items-center gap-2 p-2.5",children:[g("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}),g(Or,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},o=>g(Gg,{onSubmitSuccess:r(o.input.type),...o})).with({input:{type:"multiple-choice"}},o=>g(Ug,{onSubmitSuccess:r(o.input.type),...o})).with({input:{type:"boolean"}},o=>g(og,{onSubmitSuccess:r(o.input.type),...o})).with({input:{type:"file"}},o=>g(fg,{onSubmitSuccess:r(o.input.type),...o})).with({input:{type:"submit"}},o=>g(zg,{onSubmitSuccess:r(o.input.type),...o})).exhaustive()})})},tu=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,nu=ct,ru=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return nu(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],c=o==null?void 0:o[u];if(d===null)return null;const f=tu(d)||tu(c);return i[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...h}=d;return Object.entries(h).every(p=>{let[v,b]=p;return Array.isArray(b)?b.includes({...o,...a}[v]):{...o,...a}[v]===b})?[...u,c,f]:u},[]);return nu(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Zg=ru("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"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),Xg={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},Qg=({children:e,className:t,transitionState:n,side:r,...i})=>g(xr.p,{variants:Xg,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:Zg({className:t,side:r,transitionState:n}),...i,children:e}),Jg=({className:e,...t})=>(W(()=>{Ve.scrollToEnd.smooth()}),g("div",{"aria-hidden":!0,children:Ve.isBotTyping$.value===!0?g("div",{"aria-label":"Typing…",class:ct("flex gap-1 p-4",e),...t,children:Array.from({length:3},(n,r)=>g("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}):void 0})),ey={bot:"left",user:"right"},ty=ru("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]"}}}),ny=({lastSentMessageFooter:e})=>{var n;const t=((n=L.current$.value.flow)==null?void 0:n.data.messages)??[];return W(()=>{Ve.scrollToEnd.smooth()},[t.length]),g("ol",{"aria-label":"Chat messages",class:"flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[g(nl,{initial:!1,children:t.map((r,i)=>g(Q,{children:g("li",{class:"flex",children:Ue(r).with({type:"system"},o=>g("p",{class:ty({variant:o.variant}),children:o.text})).with({type:"text",author:_e.union("bot","user")},o=>{const s=o.author==="user"&&!t.slice(i+1).some(a=>a.type==="text"&&a.author==="user");return g(Qg,{side:ey[o.author],children:[o.text,s?e:null]},i)}).with({type:"link"},o=>g("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:g("a",{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:o.href,children:[o.text,g("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g("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"})})]})})).with({type:"image"},o=>g("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>g(lg,{class:o.author==="bot"?"":"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).exhaustive()})},i))}),g(Jg,{},"typing")]})},ry=({logger:e,apiClient:t,analytics:n})=>{const{flow:r}=L.current$.value;Xe(r,"Flow is required to exist to show chatbot body");const i=L.viewState$.value,{chatRef:o,chatService:s}=ng(),[a,l]=ie();return Ae(()=>{i==="maximised"&&Ve.scrollToEnd.instant()},[i]),Ae(()=>{const{state:u,flow:d}=L.current$.peek();if(u!=="loaded")throw new Error(Wv.invalid_state);let c=d.data.nodeHistory.at(-1);if(Ve.scrollToEnd.instant(),L.setInput(void 0),d.data.isFinished)return;c===void 0?(c=wl(r.nodes).id,L.setCurrentNodeId(c),n.log({event:"FLOW_START",properties:{flow_id:r.id,flow_version:r.version,flow_session_id:d.data.flowSessionId}})):L.removeMessagesSentByNodeIds([c]);const{interpret:f,abort:h,undo:p}=Rm({context:r.context,analytics:n,apiClient:t,logger:e,flow:r.nodes,chatService:s,getSubmissions:()=>{var v;return(v=L.current$.peek().flow)==null?void 0:v.data.submissions},onInterpret:(v,b)=>{const x=L.current$.peek().flow;Xe(x),b&&(x.data.sequence=x.data.sequence+1,n.log({event:"FLOW_NODE",properties:{flow_id:r.id,flow_version:r.version,from_node_id:b.id,to_node_id:v.id,sequence:x.data.sequence,flow_session_id:x.data.flowSessionId},customProperties:r.context})),L.setCurrentNodeId(v.id)},onFlowEnd:async()=>{L.markAsFinished();const v=L.current$.peek().flow;Xe(v),n.log({event:"FLOW_END",properties:{flow_id:r.id,flow_version:r.version,flow_session_id:v.data.flowSessionId},customProperties:r.context})}});return l(()=>p),f(c),h},[n,t,s,e,r]),g(Q,{children:[g("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:L.inputHeight$.value},children:g(ny,{lastSentMessageFooter:r.data.isFinished||!a?null:g(oy,{undoFn:a})})}),g(Yg,{})]})},iy=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"):[],oy=({undoFn:e})=>g("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:g("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}=L.current$.peek();Xe(t);const{removed:n}=e(t.data.nodeHistory),r=t.data.nodeHistory.splice(-n);r.length!==0&&(L.removeMessagesSentByNodeIds(r),L.setInput(void 0),r.pop(),r.map(i=>t.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(iy).forEach(i=>delete t.data.submissions[i]),L.current$.value={...L.current$.value})},children:"Undo"})}),sy=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:ry},Symbol.toStringTag,{value:"Module"}))})();
53
+ }`},Lv=({_internal_domManager:e=Pv(),theme:t})=>pt(({apiClient:n,logger:r,analytics:i})=>{let o=!1;const s=()=>{if(typeof window>"u")return;const a=[O("style",{id:"inploi-chatbot-styles"},Av),O("style",{id:"inploi-chatbot-theme"},Nv(t))],l=e.getOrCreateChatbotElement();Dt(O(Q,{},[a,O(kv,{apiClient:n,logger:r,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;s(),r.info("Chatbot plugin prepared")}catch(a){r.error("Error preparing chatbot plugin",a)}},fetchFlowByJobId:async a=>n.fetch(`/flow/job/${a}`).then(l=>{const u=cn(Cv,l);return{context:{job_id:u.job.id,flow_id:u.flow.id},flow:u.flow,title:`Applying for “${u.job.title}”`,flowKeys:[u.job.id]}}),fetchFlowById:async a=>n.fetch(`/flow/id/${a}`).then(l=>{const u=cn(Sv,l);return{flow:u.flow,context:{flow_id:u.flow.id},title:"Chatbot",flowKeys:[]}}),open:async a=>{if(!(typeof window>"u"))try{L.cancelCurrentFlow(),L.viewState$.value="maximised",o||s(),a instanceof Promise?(L.current$.value={state:"loading"},a.then(async l=>{const u=cn($v,l);L.startFlow(u)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";L.current$.value={state:"error",error:u}})):L.startFlow(a)}catch(l){r.error("Error starting flow",l)}},startApplication:void 0,closeApplication:void 0,close:async()=>{typeof window>"u"||(L.cancelCurrentFlow(),r.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=Lv;const Al=({node:e,nodes:t,stopWhen:n})=>{if((n==null?void 0:n(e))===!0)return e;const r=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(r)return Al({node:r,nodes:t,stopWhen:n})},Rv=({childNode:e,nodes:t})=>{const r=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(a=>a.id===i.branchId);if(!o)return!1;const s=Al({node:o,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(r!=null&&r.nextId)return t.find(i=>i.id===r.nextId)},Bv=({flow:e,analytics:t,logger:n,context:r,apiClient:i,getSubmissions:o,chatService:s,onFlowEnd:a,onInterpret:l})=>{let u=new AbortController;const d=async(c,f)=>{const h=o();l==null||l(c,f);try{await jv({analytics:t,logger:n,apiClient:i,context:r,node:c,submissions:h,chat:{sendMessage:async p=>s.send({groupId:c.id,message:p,signal:u.signal}),userInput:async p=>s.input({input:p,signal:u.signal})},next:p=>{const m=p?e.find(b=>b.id===p):Rv({childNode:c,nodes:e});return m?d(m,c):a==null?void 0:a(c)},end:()=>a==null?void 0:a(c)})}catch(p){if(p instanceof En)return;throw p}};return{interpret:async c=>{const f=e.find(h=>h.id===c)??wl(e);return d(f)},undo:c=>{let f=1;const h=e.find(m=>m.id===c[c.length-1]);for(let m=c.length-2;m>0;m--){const b=c[m],x=e.find(y=>y.id===b);if(!x||(f++,x.type.startsWith("question-")))break}u.abort(),u=new AbortController;const p=e.find(m=>m.id===c[c.length-f]);return Xe(p,"Undo failed: new start node not found"),d(p,h),{removed:f}},abort:()=>{u.abort()}}};async function jv(e){return await Ue(e).with({node:{type:"text"}},Wv).with({node:{type:"image"}},Kv).with({node:{type:"question-text"}},qv).with({node:{type:"question-enum"}},Yv).with({node:{type:"question-number"}},Gv).with({node:{type:"question-boolean"}},Zv).with({node:{type:"question-file"}},Jv).with({node:{type:"question-address"}},Qv).with({node:{type:"end-flow"}},eg).with({node:{type:"if-block"}},Hv).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},zv).with({node:{type:"integration-application-submit"}},Uv).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function Uv({chat:e,next:t,node:n,logger:r,apiClient:i,submissions:o,context:s,analytics:a}){await e.userInput({type:"submit",key:void 0,config:{label:"Submit my application"}}),await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const{anonymous_id:l,session_id:u}=a.getSessionInfo(),d=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:n.data.integrationId,anonymous_id:l,session_id:u,submissions:uv(o||{})})}).catch(c=>c);await Ue(d).with({ats_data:{redirect_url:_e.string}},async c=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const f=new URL(c.ats_data.redirect_url);l&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",l),await e.sendMessage({type:"link",href:f.toString(),text:"Finalise application on partner"}),t(n.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Application submitted"}),t(n.nextId)}).otherwise(async c=>{r.error(c),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function zv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({type:"link",href:n.data.href,text:Et(n.data.cta,r)}),t(n.nextId)}async function Hv({submissions:e,next:t,node:n}){const r=tg(n,e)?n.branchId:n.nextId;t(r)}async function Wv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.text,r)}),t(n.nextId)}async function Kv({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"image",url:n.data.url,height:n.data.height,width:n.data.width}),t(n.nextId)}async function qv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:n.data.format}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(n.nextId)}async function Gv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:"text"}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(n.nextId)}async function Yv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"multiple-choice",config:n.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:n.data.options.filter(o=>i.value.includes(o.value)).map(o=>o.label).join(", ")}),t(n.nextId)}async function Zv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:Et(n.data.question,r)});const o=(await e.userInput({key:n.data.key,type:"boolean",config:{optional:n.data.optional,labels:{true:n.data.trueLabel,false:n.data.falseLabel}}})).value;o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:{true:n.data.trueLabel,false:n.data.falseLabel}[o]}),t(n.nextId)}const Xv=document.createElement("div"),Pl={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"]},El=Object.keys(Pl);async function Qv({chat:e,next:t,node:n,logger:r}){if(El.every(p=>n.data.keys[p]===null))return t(n.nextId);const{google:i}=window;await e.sendMessage({author:"bot",type:"text",text:n.data.question});const o=async p=>{const m=[{label:"Postcode",key:n.data.keys.postcode,optional:!1,defaultValue:p.postcode},{label:"Line 1",key:n.data.keys.line1,optional:!1,defaultValue:p.line1},{label:"Line 2",key:n.data.keys.line2,optional:!0,defaultValue:p.line2},{label:"Line 3",key:n.data.keys.line3,optional:!0,defaultValue:p.line3},{label:"City",key:n.data.keys.city,optional:!1,defaultValue:p.city},{label:"State/County/Province",key:n.data.keys.state,optional:!0,defaultValue:p.state},{label:"Country",key:n.data.keys.country,optional:!1,defaultValue:p.country}];for(const b of m){if(b.key===null)continue;await e.sendMessage({author:"bot",type:"text",text:b.label});const{value:x}=await e.userInput({type:"text",key:b.key,config:{format:"text",optional:b.optional,defaultValue:b.defaultValue}});x===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:x})}};if(!Zr(window,"google")||!Zr(window.google,"maps")||!Zr(window.google.maps,"places"))return r.warn("Google maps not available, falling back to manual input."),r.info("If you’d like to use the address autocomplete, please insert the google maps API snippet in your website and make sure it has access to the *places* library."),await o({}),t(n.nextId);const s=new i.maps.places.AutocompleteService,a=new i.maps.places.PlacesService(Xv),{value:l}=await e.userInput({type:"text",key:"_internal-address-search",config:{format:"text",optional:!1,placeholder:"Search for your address"}});if(l===null)return t(n.id);await e.sendMessage({author:"user",type:"text",text:`Search for “${l}”`});const{predictions:u}=await s.getPlacePredictions({input:l}),{value:[d]}=await e.userInput({type:"multiple-choice",key:void 0,config:{options:u.slice(0,4).map(p=>({label:p.description,value:p.place_id})).concat({label:"None of these",value:"none"}),maxSelected:1,minSelected:1}});if(!d||d==="none")return t(n.id);const c=await new Promise((p,m)=>a.getDetails({placeId:d,fields:["address_components"]},(b,x)=>x!==i.maps.places.PlacesServiceStatus.OK?m(x):b===null?m("ZERO_RESULTS"):p({ok:!0,place:b}))).catch(async p=>(r.error("Failed to get address details",p),{ok:!1}));if(c.ok===!1)return await e.sendMessage({type:"system",variant:"error",text:"Failed to get address details"}),await o({}),t(n.id);const f=c.place.address_components,h=f?El.reduce((p,m)=>{const b=Pl[m],x=f.filter(y=>y.types.some(_=>b.includes(_))).map(y=>y.long_name).join(", ");return x&&(p[m]=x),p},{}):{};return await e.sendMessage({author:"bot",type:"text",text:"Please confirm or adjust your address:"}),await o(h),t(n.nextId)}async function Jv({node:e,chat:t,next:n,submissions:r}){await t.sendMessage({author:"bot",type:"text",text:Et(e.data.question,r)});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.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const o of i.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});n(e.nextId)}async function eg({chat:e,end:t,node:n}){await e.sendMessage({type:"system",variant:"info",text:n.data.systemMessage}),t()}const Tl=_e.union(_e.string,_e.array(_e.string),null),tg=(e,t)=>{const n=t==null?void 0:t[e.data.compareKey];return n?Ue({...e.data,answer:n}).with({compare:"equals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r===n.value.toString():!1).with({compare:"notEquals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r!==n.value.toString():!1).with({compare:"contains",answer:{value:Tl}},({compareValue:r,answer:i})=>i.value!==null&&i.value.includes(r)).with({compare:"notContains",answer:{value:Tl}},({compareValue:r,answer:i})=>i.value===null||!i.value.includes(r)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},Et=(e,t)=>{const n=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(n,(r,i,o="")=>{i=i.trim();const s=t==null?void 0:t[i];if(!s)return o;switch(s.type){case"boolean":return s.value==="true"?"true":"false";case"file":return s.value?s.value.map(a=>`${a.name} (${Pn(a.sizeKb)})`).join(", "):"no files";case"multiple-choice":return s.value.join(", ");default:return s.value||o}})},Or=({class:e,...t})=>g("button",{class:ct("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:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[g("title",{children:"Send"}),g("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),g("path",{d:"M8 4V13"})]})}),ng=25,Ao=ot({instant:()=>{},smooth:()=>{}}),Ve={onSubmitSuccessFn$:ot(()=>{}),isBotTyping$:ot(!1),scrollToEnd:{instant:()=>Ao.value.instant(),smooth:()=>Ao.value.smooth()}},rg=()=>{const e=j(null);Ae(()=>{Ao.value={instant:()=>{var n;return(n=e.current)==null?void 0:n.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*1.5&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=se(()=>({send:async({message:n,signal:r,groupId:i})=>{if(await Ue(n).with({author:"bot",type:"text"},async o=>{if(r!=null&&r.aborted)throw new En;Ve.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*ng;await new Promise(a=>setTimeout(a,s,{signal:r})),Ve.isBotTyping$.value=!1}).otherwise(async()=>{}),r!=null&&r.aborted)throw new En;L.addMessage(n,i)},input:async({input:n,signal:r})=>{if(r!=null&&r.aborted)throw new En;return L.setInput(n),await new Promise(i=>{const o=s=>{if(r!=null&&r.aborted)throw new En;L.setInput(void 0),n.key&&L.setSubmission(n.key,s),i(s)};Ve.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}},Fr=({class:e,...t})=>g("button",{type:"button",class:ct("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:[g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[g("title",{children:"Skip"}),g("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),g("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Po=()=>{const e=j(null);return W(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Vl=["true","false"],ig=_u(Vl),og="answer",sg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{const r=Po();return n(),g("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const o=Ue(i).with({nativeEvent:{submitter:_e.select(_e.union(_e.instanceOf(HTMLButtonElement),_e.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=cn(ig,o);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:Vl.map((i,o)=>g("button",{ref:o===0?r:null,type:"submit",name:og,value:i,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 flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:g("p",{class:"truncate text-center text-base",children:e.config.labels[i]})}))}),e.config.optional&&g("div",{class:"px-2 pb-2",children:g(Fr,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Eo=({error:e,onAnimationComplete:t})=>(Ae(()=>{e&&t()},[e,t]),e?g("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[g("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),g("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),g("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),g("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null),ag=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>r.result?t(r.result.toString()):n("No result from reader"),r.onerror=n}),cg=e=>e.reduce((t,n)=>t+n.sizeKb,0),lg=wo("file"),Ml=3,ug=({file:e,class:t,...n})=>{const r=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${r}$`),"");return g("div",{class:ct("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...n,children:[g("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[g("span",{class:"block truncate",children:i}),g("span",{children:[".",r]})]}),g("p",{"aria-label":"File size",class:"text-accent-11",children:Pn(e.sizeKb)})]})},Ol=({class:e,...t})=>g("li",{class:ct("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Fl=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},dg=({allowedExtensions:e,files:t})=>{const n=e.map(r=>r.toLowerCase());return t.every(r=>n.includes(Fl(r.name).toLowerCase()))},fg=(e,t)=>{const n=Fl(e);return`${e.replace(new RegExp(`${n}$`),"").slice(0,t)}${n}`},pg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var c;const r=(c=L.current$.value.flow)==null?void 0:c.data.submissions[e.key],[i,o]=ie(lg(r)&&r.value!==null?r.value:[]),[s,a]=ie(),l=i.length-Ml,u=cg(i),d=Po();return g("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),a(void 0),i.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!dg({allowedExtensions:e.config.extensions,files:i})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${Pn(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(i)),children:[g("div",{class:"flex items-center gap-2",children:[g("label",{ref:d,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[i.length>0?g(Q,{children:[g("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,Ml).map(f=>{const h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return g(Ol,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:p}),g("span",{children:[".",h]})]})}),l>0?g(Ol,{children:["+",l," file",l!==1?"s":""]}):null]}),g("p",{class:"text-neutral-11 text-xs",children:[Pn(u)," ",i.length>1?"total":""]})]}):g("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[g("header",{class:"flex flex-col items-center gap-0",children:[g("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:g("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"})}),g("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?g("p",{class:"text-neutral-10 text-xs",children:["(max ",Pn(e.config.fileSizeLimitKib),")"]}):null]}),g("aside",{class:"flex flex-col items-center gap-2",children:[g("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),g("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>g("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:f.replace(".","")}))})]})]}),g("input",{id:"dropzone-file",onInput:async f=>{Xe(f.target instanceof HTMLInputElement);const h=f.target.files?Array.from(f.target.files):[],p=await Promise.allSettled(h.map(async b=>{const x=await ag(b);return{name:fg(b.name,42),data:x,sizeKb:b.size/1e3}}));if(p.some(({status:b})=>b==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=p.map(b=>b.status==="fulfilled"?b.value:null).filter(Boolean);o(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),g("div",{class:"flex h-full flex-col items-center gap-2",children:[g(Or,{disabled:i.length===0}),e.config.optional&&g(Fr,{onClick:()=>t(null)})]})]}),s&&g(Eo,{onAnimationComplete:n,error:s})]})};var Mn=e=>e.type==="checkbox",Jt=e=>e instanceof Date,ye=e=>e==null;const Il=e=>typeof e=="object";var oe=e=>!ye(e)&&!Array.isArray(e)&&Il(e)&&!Jt(e),hg=e=>oe(e)&&e.target?Mn(e.target)?e.target.checked:e.target.value:e,mg=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vg=(e,t)=>e.has(mg(t)),gg=e=>{const t=e.constructor&&e.constructor.prototype;return oe(t)&&t.hasOwnProperty("isPrototypeOf")},To=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ze(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(To&&(e instanceof Blob||e instanceof FileList))&&(n||oe(e)))if(t=n?[]:{},!n&&!gg(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=ze(e[r]));else return e;return t}var On=e=>Array.isArray(e)?e.filter(Boolean):[],te=e=>e===void 0,V=(e,t,n)=>{if(!t||!oe(e))return n;const r=On(t.split(/[,[\].]+?/)).reduce((i,o)=>ye(i)?i:i[o],e);return te(r)||r===e?te(e[t])?n:e[t]:r},lt=e=>typeof e=="boolean";const Dl={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Me={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},He={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};Te.createContext(null);var yg=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Me.all&&(t._proxyFormState[s]=!r||Me.all),n&&(n[s]=!0),e[s]}});return i},Pe=e=>oe(e)&&!Object.keys(e).length,bg=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Pe(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Me.all))},Vo=e=>Array.isArray(e)?e:[e];function wg(e){const t=Te.useRef(e);t.current=e,Te.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Le=e=>typeof e=="string",_g=(e,t,n,r,i)=>Le(e)?(r&&t.watch.add(e),V(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),V(n,o))):(r&&(t.watchAll=!0),n),Mo=e=>/^\w*$/.test(e),Nl=e=>On(e.replace(/["|']|\]/g,"").split(/\.|\[/));function G(e,t,n){let r=-1;const i=Mo(t)?[t]:Nl(t),o=i.length,s=o-1;for(;++r<o;){const a=i[r];let l=n;if(r!==s){const u=e[a];l=oe(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}e[a]=l,e=e[a]}return e}var Ll=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Rl=e=>({isOnSubmit:!e||e===Me.onSubmit,isOnBlur:e===Me.onBlur,isOnChange:e===Me.onChange,isOnAll:e===Me.all,isOnTouch:e===Me.onTouched}),Bl=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ir=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=V(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break}else oe(a)&&Ir(a,t)}}};var xg=(e,t,n)=>{const r=On(V(e,n));return G(r,"root",t[n]),G(e,n,r),e},Oo=e=>e.type==="file",ut=e=>typeof e=="function",Dr=e=>{if(!To)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Nr=e=>Le(e),Fo=e=>e.type==="radio",Lr=e=>e instanceof RegExp;const jl={value:!1,isValid:!1},Ul={value:!0,isValid:!0};var zl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!te(e[0].attributes.value)?te(e[0].value)||e[0].value===""?Ul:{value:e[0].value,isValid:!0}:Ul:jl}return jl};const Hl={isValid:!1,value:null};var Wl=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Hl):Hl;function Kl(e,t,n="validate"){if(Nr(e)||Array.isArray(e)&&e.every(Nr)||lt(e)&&!e)return{type:n,message:Nr(e)?e:"",ref:t}}var en=e=>oe(e)&&!Lr(e)?e:{value:e,message:""},ql=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:d,max:c,pattern:f,validate:h,name:p,valueAsNumber:m,mount:b,disabled:x}=e._f,y=V(t,p);if(!b||x)return{};const _=s?s[0]:o,C=U=>{r&&_.reportValidity&&(_.setCustomValidity(lt(U)?"":U||""),_.reportValidity())},S={},N=Fo(o),I=Mn(o),A=N||I,T=(m||Oo(o))&&te(o.value)&&te(y)||Dr(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,K=Ll.bind(null,p,n,S),J=(U,R,B,z=He.maxLength,ne=He.minLength)=>{const de=U?R:B;S[p]={type:U?z:ne,message:de,ref:o,...K(U?z:ne,de)}};if(i?!Array.isArray(y)||!y.length:a&&(!A&&(T||ye(y))||lt(y)&&!y||I&&!zl(s).isValid||N&&!Wl(s).isValid)){const{value:U,message:R}=Nr(a)?{value:!!a,message:a}:en(a);if(U&&(S[p]={type:He.required,message:R,ref:_,...K(He.required,R)},!n))return C(R),S}if(!T&&(!ye(d)||!ye(c))){let U,R;const B=en(c),z=en(d);if(!ye(y)&&!isNaN(y)){const ne=o.valueAsNumber||y&&+y;ye(B.value)||(U=ne>B.value),ye(z.value)||(R=ne<z.value)}else{const ne=o.valueAsDate||new Date(y),de=Vt=>new Date(new Date().toDateString()+" "+Vt),We=o.type=="time",dt=o.type=="week";Le(B.value)&&y&&(U=We?de(y)>de(B.value):dt?y>B.value:ne>new Date(B.value)),Le(z.value)&&y&&(R=We?de(y)<de(z.value):dt?y<z.value:ne<new Date(z.value))}if((U||R)&&(J(!!U,B.message,z.message,He.max,He.min),!n))return C(S[p].message),S}if((l||u)&&!T&&(Le(y)||i&&Array.isArray(y))){const U=en(l),R=en(u),B=!ye(U.value)&&y.length>+U.value,z=!ye(R.value)&&y.length<+R.value;if((B||z)&&(J(B,U.message,R.message),!n))return C(S[p].message),S}if(f&&!T&&Le(y)){const{value:U,message:R}=en(f);if(Lr(U)&&!y.match(U)&&(S[p]={type:He.pattern,message:R,ref:o,...K(He.pattern,R)},!n))return C(R),S}if(h){if(ut(h)){const U=await h(y,t),R=Kl(U,_);if(R&&(S[p]={...R,...K(He.validate,R.message)},!n))return C(R.message),S}else if(oe(h)){let U={};for(const R in h){if(!Pe(U)&&!n)break;const B=Kl(await h[R](y,t),_,R);B&&(U={...B,...K(R,B.message)},C(B.message),n&&(S[p]=U))}if(!Pe(U)&&(S[p]={ref:_,...U},!n))return S}}return C(!0),S};function kg(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=te(e)?r++:e[t[r++]];return e}function Sg(e){for(const t in e)if(e.hasOwnProperty(t)&&!te(e[t]))return!1;return!0}function ue(e,t){const n=Array.isArray(t)?t:Mo(t)?[t]:Nl(t),r=n.length===1?e:kg(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(oe(r)&&Pe(r)||Array.isArray(r)&&Sg(r))&&ue(e,n.slice(0,-1)),e}function Io(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Rr=e=>ye(e)||!Il(e);function Tt(e,t){if(Rr(e)||Rr(t))return e===t;if(Jt(e)&&Jt(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Jt(o)&&Jt(s)||oe(o)&&oe(s)||Array.isArray(o)&&Array.isArray(s)?!Tt(o,s):o!==s)return!1}}return!0}var Gl=e=>e.type==="select-multiple",Cg=e=>Fo(e)||Mn(e),Do=e=>Dr(e)&&e.isConnected,Yl=e=>{for(const t in e)if(ut(e[t]))return!0;return!1};function Br(e,t={}){const n=Array.isArray(e);if(oe(e)||n)for(const r in e)Array.isArray(e[r])||oe(e[r])&&!Yl(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Br(e[r],t[r])):ye(e[r])||(t[r]=!0);return t}function Zl(e,t,n){const r=Array.isArray(e);if(oe(e)||r)for(const i in e)Array.isArray(e[i])||oe(e[i])&&!Yl(e[i])?te(t)||Rr(n[i])?n[i]=Array.isArray(e[i])?Br(e[i],[]):{...Br(e[i])}:Zl(e[i],ye(t)?{}:t[i],n[i]):n[i]=!Tt(e[i],t[i]);return n}var No=(e,t)=>Zl(e,t,Br(t)),Xl=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>te(e)?e:t?e===""?NaN:e&&+e:n&&Le(e)?new Date(e):r?r(e):e;function Lo(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Oo(t)?t.files:Fo(t)?Wl(e.refs).value:Gl(t)?[...t.selectedOptions].map(({value:n})=>n):Mn(t)?zl(e.refs).value:Xl(te(t.value)?e.ref.value:t.value,e)}var $g=(e,t,n,r)=>{const i={};for(const o of e){const s=V(t,o);s&&G(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Fn=e=>te(e)?e:Lr(e)?e.source:oe(e)?Lr(e.value)?e.value.source:e.value:e,Ag=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ql(e,t,n){const r=V(e,n);if(r||Mo(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=V(t,o),a=V(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var Pg=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Eg=(e,t)=>!On(V(e,t)).length&&ue(e,t);const Tg={mode:Me.onSubmit,reValidateMode:Me.onChange,shouldFocusError:!0};function Vg(e={},t){let n={...Tg,...e},r={submitCount:0,isDirty:!1,isLoading:ut(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=oe(n.defaultValues)||oe(n.values)?ze(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:ze(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Io(),array:Io(),state:Io()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=Rl(n.mode),m=Rl(n.reValidateMode),b=n.criteriaMode===Me.all,x=v=>w=>{clearTimeout(d),d=setTimeout(v,w)},y=async v=>{if(c.isValid||v){const w=n.resolver?Pe((await T()).errors):await J(i,!0);w!==r.isValid&&f.state.next({isValid:w})}},_=v=>c.isValidating&&f.state.next({isValidating:v}),C=(v,w=[],k,M,P=!0,$=!0)=>{if(M&&k){if(a.action=!0,$&&Array.isArray(V(i,v))){const F=k(V(i,v),M.argA,M.argB);P&&G(i,v,F)}if($&&Array.isArray(V(r.errors,v))){const F=k(V(r.errors,v),M.argA,M.argB);P&&G(r.errors,v,F),Eg(r.errors,v)}if(c.touchedFields&&$&&Array.isArray(V(r.touchedFields,v))){const F=k(V(r.touchedFields,v),M.argA,M.argB);P&&G(r.touchedFields,v,F)}c.dirtyFields&&(r.dirtyFields=No(o,s)),f.state.next({name:v,isDirty:R(v,w),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else G(s,v,w)},S=(v,w)=>{G(r.errors,v,w),f.state.next({errors:r.errors})},N=(v,w,k,M)=>{const P=V(i,v);if(P){const $=V(s,v,te(k)?V(o,v):k);te($)||M&&M.defaultChecked||w?G(s,v,w?$:Lo(P._f)):ne(v,$),a.mount&&y()}},I=(v,w,k,M,P)=>{let $=!1,F=!1;const Z={name:v};if(!k||M){c.isDirty&&(F=r.isDirty,r.isDirty=Z.isDirty=R(),$=F!==Z.isDirty);const re=Tt(V(o,v),w);F=V(r.dirtyFields,v),re?ue(r.dirtyFields,v):G(r.dirtyFields,v,!0),Z.dirtyFields=r.dirtyFields,$=$||c.dirtyFields&&F!==!re}if(k){const re=V(r.touchedFields,v);re||(G(r.touchedFields,v,k),Z.touchedFields=r.touchedFields,$=$||c.touchedFields&&re!==k)}return $&&P&&f.state.next(Z),$?Z:{}},A=(v,w,k,M)=>{const P=V(r.errors,v),$=c.isValid&&lt(w)&&r.isValid!==w;if(e.delayError&&k?(u=x(()=>S(v,k)),u(e.delayError)):(clearTimeout(d),u=null,k?G(r.errors,v,k):ue(r.errors,v)),(k?!Tt(P,k):P)||!Pe(M)||$){const F={...M,...$&&lt(w)?{isValid:w}:{},errors:r.errors,name:v};r={...r,...F},f.state.next(F)}_(!1)},T=async v=>n.resolver(s,n.context,$g(v||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),K=async v=>{const{errors:w}=await T(v);if(v)for(const k of v){const M=V(w,k);M?G(r.errors,k,M):ue(r.errors,k)}else r.errors=w;return w},J=async(v,w,k={valid:!0})=>{for(const M in v){const P=v[M];if(P){const{_f:$,...F}=P;if($){const Z=l.array.has($.name),re=await ql(P,s,b,n.shouldUseNativeValidation&&!w,Z);if(re[$.name]&&(k.valid=!1,w))break;!w&&(V(re,$.name)?Z?xg(r.errors,re,$.name):G(r.errors,$.name,re[$.name]):ue(r.errors,$.name))}F&&await J(F,w,k)}}return k.valid},U=()=>{for(const v of l.unMount){const w=V(i,v);w&&(w._f.refs?w._f.refs.every(k=>!Do(k)):!Do(w._f.ref))&&nn(v)}l.unMount=new Set},R=(v,w)=>(v&&w&&G(s,v,w),!Tt(ft(),o)),B=(v,w,k)=>_g(v,l,{...a.mount?s:te(w)?o:Le(v)?{[v]:w}:w},k,w),z=v=>On(V(a.mount?s:o,v,e.shouldUnregister?V(o,v,[]):[])),ne=(v,w,k={})=>{const M=V(i,v);let P=w;if(M){const $=M._f;$&&(!$.disabled&&G(s,v,Xl(w,$)),P=Dr($.ref)&&ye(w)?"":w,Gl($.ref)?[...$.ref.options].forEach(F=>F.selected=P.includes(F.value)):$.refs?Mn($.ref)?$.refs.length>1?$.refs.forEach(F=>(!F.defaultChecked||!F.disabled)&&(F.checked=Array.isArray(P)?!!P.find(Z=>Z===F.value):P===F.value)):$.refs[0]&&($.refs[0].checked=!!P):$.refs.forEach(F=>F.checked=F.value===P):Oo($.ref)?$.ref.value="":($.ref.value=P,$.ref.type||f.values.next({name:v,values:{...s}})))}(k.shouldDirty||k.shouldTouch)&&I(v,P,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&Y(v)},de=(v,w,k)=>{for(const M in w){const P=w[M],$=`${v}.${M}`,F=V(i,$);(l.array.has(v)||!Rr(P)||F&&!F._f)&&!Jt(P)?de($,P,k):ne($,P,k)}},We=(v,w,k={})=>{const M=V(i,v),P=l.array.has(v),$=ze(w);G(s,v,$),P?(f.array.next({name:v,values:{...s}}),(c.isDirty||c.dirtyFields)&&k.shouldDirty&&f.state.next({name:v,dirtyFields:No(o,s),isDirty:R(v,$)})):M&&!M._f&&!ye($)?de(v,$,k):ne(v,$,k),Bl(v,l)&&f.state.next({...r}),f.values.next({name:v,values:{...s}}),!a.mount&&t()},dt=async v=>{const w=v.target;let k=w.name,M=!0;const P=V(i,k),$=()=>w.type?Lo(P._f):hg(v),F=Z=>{M=Number.isNaN(Z)||Z===V(s,k,Z)};if(P){let Z,re;const Hr=$(),rn=v.type===Dl.BLUR||v.type===Dl.FOCUS_OUT,cy=!Ag(P._f)&&!n.resolver&&!V(r.errors,k)&&!P._f.deps||Pg(rn,V(r.touchedFields,k),r.isSubmitted,m,p),Ro=Bl(k,l,rn);G(s,k,Hr),rn?(P._f.onBlur&&P._f.onBlur(v),u&&u(0)):P._f.onChange&&P._f.onChange(v);const Bo=I(k,Hr,rn,!1),ly=!Pe(Bo)||Ro;if(!rn&&f.values.next({name:k,type:v.type,values:{...s}}),cy)return c.isValid&&y(),ly&&f.state.next({name:k,...Ro?{}:Bo});if(!rn&&Ro&&f.state.next({...r}),_(!0),n.resolver){const{errors:au}=await T([k]);if(F(Hr),M){const uy=Ql(r.errors,i,k),cu=Ql(au,i,uy.name||k);Z=cu.error,k=cu.name,re=Pe(au)}}else Z=(await ql(P,s,b,n.shouldUseNativeValidation))[k],F(Hr),M&&(Z?re=!1:c.isValid&&(re=await J(i,!0)));M&&(P._f.deps&&Y(P._f.deps),A(k,re,Z,Bo))}},Vt=(v,w)=>{if(V(r.errors,w)&&v.focus)return v.focus(),1},Y=async(v,w={})=>{let k,M;const P=Vo(v);if(_(!0),n.resolver){const $=await K(te(v)?v:P);k=Pe($),M=v?!P.some(F=>V($,F)):k}else v?(M=(await Promise.all(P.map(async $=>{const F=V(i,$);return await J(F&&F._f?{[$]:F}:F)}))).every(Boolean),!(!M&&!r.isValid)&&y()):M=k=await J(i);return f.state.next({...!Le(v)||c.isValid&&k!==r.isValid?{}:{name:v},...n.resolver||!v?{isValid:k}:{},errors:r.errors,isValidating:!1}),w.shouldFocus&&!M&&Ir(i,Vt,v?P:l.mount),M},ft=v=>{const w={...o,...a.mount?s:{}};return te(v)?w:Le(v)?V(w,v):v.map(k=>V(w,k))},In=(v,w)=>({invalid:!!V((w||r).errors,v),isDirty:!!V((w||r).dirtyFields,v),isTouched:!!V((w||r).touchedFields,v),error:V((w||r).errors,v)}),jr=v=>{v&&Vo(v).forEach(w=>ue(r.errors,w)),f.state.next({errors:v?r.errors:{}})},Dn=(v,w,k)=>{const M=(V(i,v,{_f:{}})._f||{}).ref;G(r.errors,v,{...w,ref:M}),f.state.next({name:v,errors:r.errors,isValid:!1}),k&&k.shouldFocus&&M&&M.focus&&M.focus()},Mt=(v,w)=>ut(v)?f.values.subscribe({next:k=>v(B(void 0,w),k)}):B(v,w,!0),nn=(v,w={})=>{for(const k of v?Vo(v):l.mount)l.mount.delete(k),l.array.delete(k),w.keepValue||(ue(i,k),ue(s,k)),!w.keepError&&ue(r.errors,k),!w.keepDirty&&ue(r.dirtyFields,k),!w.keepTouched&&ue(r.touchedFields,k),!n.shouldUnregister&&!w.keepDefaultValue&&ue(o,k);f.values.next({values:{...s}}),f.state.next({...r,...w.keepDirty?{isDirty:R()}:{}}),!w.keepIsValid&&y()},Ur=({disabled:v,name:w,field:k,fields:M,value:P})=>{if(lt(v)){const $=v?void 0:te(P)?Lo(k?k._f:V(M,w)._f):P;G(s,w,$),I(w,$,!1,!1,!0)}},Ot=(v,w={})=>{let k=V(i,v);const M=lt(w.disabled);return G(i,v,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:v}},name:v,mount:!0,...w}}),l.mount.add(v),k?Ur({field:k,disabled:w.disabled,name:v}):N(v,!0,w.value),{...M?{disabled:w.disabled}:{},...n.progressive?{required:!!w.required,min:Fn(w.min),max:Fn(w.max),minLength:Fn(w.minLength),maxLength:Fn(w.maxLength),pattern:Fn(w.pattern)}:{},name:v,onChange:dt,onBlur:dt,ref:P=>{if(P){Ot(v,w),k=V(i,v);const $=te(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,F=Cg($),Z=k._f.refs||[];if(F?Z.find(re=>re===$):$===k._f.ref)return;G(i,v,{_f:{...k._f,...F?{refs:[...Z.filter(Do),$,...Array.isArray(V(o,v))?[{}]:[]],ref:{type:$.type,name:v}}:{ref:$}}}),N(v,!1,void 0,$)}else k=V(i,v,{}),k._f&&(k._f.mount=!1),(n.shouldUnregister||w.shouldUnregister)&&!(vg(l.array,v)&&a.action)&&l.unMount.add(v)}}},Ft=()=>n.shouldFocusError&&Ir(i,Vt,l.mount),Ke=v=>{lt(v)&&(f.state.next({disabled:v}),Ir(i,w=>{w.disabled=v},0,!1))},Nn=(v,w)=>async k=>{k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let M=ze(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:$}=await T();r.errors=P,M=$}else await J(i);ue(r.errors,"root"),Pe(r.errors)?(f.state.next({errors:{}}),await v(M,k)):(w&&await w({...r.errors},k),Ft(),setTimeout(Ft)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Pe(r.errors),submitCount:r.submitCount+1,errors:r.errors})},zr=(v,w={})=>{V(i,v)&&(te(w.defaultValue)?We(v,V(o,v)):(We(v,w.defaultValue),G(o,v,w.defaultValue)),w.keepTouched||ue(r.touchedFields,v),w.keepDirty||(ue(r.dirtyFields,v),r.isDirty=w.defaultValue?R(v,V(o,v)):R()),w.keepError||(ue(r.errors,v),c.isValid&&y()),f.state.next({...r}))},ou=(v,w={})=>{const k=v?ze(v):o,M=ze(k),P=v&&!Pe(v)?M:o;if(w.keepDefaultValues||(o=k),!w.keepValues){if(w.keepDirtyValues||h)for(const $ of l.mount)V(r.dirtyFields,$)?G(P,$,V(s,$)):We($,V(P,$));else{if(To&&te(v))for(const $ of l.mount){const F=V(i,$);if(F&&F._f){const Z=Array.isArray(F._f.refs)?F._f.refs[0]:F._f.ref;if(Dr(Z)){const re=Z.closest("form");if(re){re.reset();break}}}}i={}}s=e.shouldUnregister?w.keepDefaultValues?ze(o):{}:ze(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!c.isValid||!!w.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:w.keepSubmitCount?r.submitCount:0,isDirty:w.keepDirty?r.isDirty:!!(w.keepDefaultValues&&!Tt(v,o)),isSubmitted:w.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:w.keepDirtyValues?r.dirtyFields:w.keepDefaultValues&&v?No(o,v):{},touchedFields:w.keepTouched?r.touchedFields:{},errors:w.keepErrors?r.errors:{},isSubmitSuccessful:w.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},su=(v,w)=>ou(ut(v)?v(s):v,w);return{control:{register:Ot,unregister:nn,getFieldState:In,handleSubmit:Nn,setError:Dn,_executeSchema:T,_getWatch:B,_getDirty:R,_updateValid:y,_removeUnmounted:U,_updateFieldArray:C,_updateDisabledField:Ur,_getFieldArray:z,_reset:ou,_resetDefaultValues:()=>ut(n.defaultValues)&&n.defaultValues().then(v=>{su(v,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:v=>{r={...r,...v}},_disableForm:Ke,_subjects:f,_proxyFormState:c,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(v){a=v},get _defaultValues(){return o},get _names(){return l},set _names(v){l=v},get _formState(){return r},set _formState(v){r=v},get _options(){return n},set _options(v){n={...n,...v}}},trigger:Y,register:Ot,handleSubmit:Nn,watch:Mt,setValue:We,getValues:ft,reset:su,resetField:zr,clearErrors:jr,unregister:nn,setError:Dn,setFocus:(v,w={})=>{const k=V(i,v),M=k&&k._f;if(M){const P=M.refs?M.refs[0]:M.ref;P.focus&&(P.focus(),w.shouldSelect&&P.select())}},getFieldState:In}}function Jl(e={}){const t=Te.useRef(),n=Te.useRef(),[r,i]=Te.useState({isDirty:!1,isValidating:!1,isLoading:ut(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:ut(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Vg(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,wg({subject:o._subjects.state,next:s=>{bg(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Te.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Te.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),Te.useEffect(()=>{e.values&&!Tt(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values):o._resetDefaultValues()},[e.values,o]),Te.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=yg(r,o),t.current}var eu=function(e,t,n){if(e&&"reportValidity"in e){var r=V(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Mg=function(e,t){var n=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?eu(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return eu(s,i,e)})};for(var r in t.fields)n(r)},Og=function(e,t){t.shouldUseNativeValidation&&Mg(e,t);var n={};for(var r in e){var i=V(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Ig(t.names||Object.keys(e),r)){var s=Object.assign({},Fg(V(n,r)));G(s,"root",o),G(n,r,s)}else G(n,r,o)}return n},Fg=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Ig=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},Dg=function(e,t){for(var n={};e.issues.length;){var r=e.issues[0];if(r.path){var i=r.path.map(function(a){return a.key}).join(".");if(n[i]||(n[i]={message:r.message,type:r.validation}),t){var o=n[i].types,s=o&&o[r.validation];n[i]=Ll(i,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},tu=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(s,a){try{var l=function(){function u(c){return{values:n.raw?r:c,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return n.mode==="sync"?u(cn(e,r,d)):Promise.resolve(Su(e,r,d)).then(u)}()}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(s instanceof Yr)return{values:{},errors:Og(Dg(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const Ng=27,Lg=12,Rg=10,Bg=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},jg=wo("multiple-choice"),Ug=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return tu(Ze({checked:us(ls(bu()),n=>Object.entries(n).filter(([r,i])=>i).map(([r,i])=>r),[Au(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),ds(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},zg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var u,d;const r=e.key?(u=L.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,i=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,{register:o,handleSubmit:s,formState:{errors:a}}=Jl({defaultValues:{checked:i?{}:jg(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:Ug(e.config)}),l=Po();return g("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:c=>{i&&Bg(c.currentTarget)},onSubmit:s(c=>{const f=c.checked;t(f)}),children:[g("div",{class:"flex items-center gap-1",children:[g("ul",{style:{maxHeight:6.5*Ng+5*Lg+2*Rg},class:ct("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{"justify-center":e.config.options.length===1}),children:e.config.options.map((c,f)=>{const h=`checked.${c.value}`,{ref:p,...m}=o(h);return g("li",{class:"relative",children:[g("input",{autoFocus:f===0,ref:b=>{b&&f===0&&(l.current=b),p(b)},id:h,...m,class:"peer sr-only h-full",type:"checkbox"}),g("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",htmlFor:h,children:c.label})]},c.value)})}),g("div",{class:"flex flex-col items-center gap-2",children:[!i&&g(Or,{}),e.config.minSelected===0&&g(Fr,{type:"button",onClick:()=>t([])})]})]}),g("div",{class:"px-1",children:g(Eo,{onAnimationComplete:n,error:(d=a.checked)==null?void 0:d.root})})]})},Hg=({input:e,onSubmitSuccess:t})=>g("div",{class:"flex flex-col items-center py-3",children:g("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 group flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white shadow-[inset_0px_-6px_2px_-1px_oklch(100_0_0/.45),inset_0px_1px_1px_oklch(100_0_0/.3)] outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:shadow-[inset_0px_0px_2px_-1px_oklch(100_0_0/.45),inset_0px_3px_1px_.5px_oklch(0_0_0/.08)] active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:g("span",{class:"relative bottom-[2px] top-[-2px] flex items-center gap-1.5 transition-all duration-300 group-active:bottom-0 group-active:top-0",children:[g("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),g("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:[g("path",{d:"M4 8L8 4L12 8"}),g("path",{d:"M8 4V13"})]})]})})}),tn={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"},Wg=$e(tn.phone,[Pu(/^\+?[0-9 -]+$/,tn.phone)]),Kg={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},qg=wo("text"),Gg=e=>tu(Ze({text:{email:$e(tn.email,[$u(tn.email)]),phone:us(Wg,t=>t.replace(/[^0-9]/g,"")),text:$e([ds(1,tn.empty)]),url:$e([Eu(tn.url)])}[e.format]})),Yg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var c;const r=e.key?(c=L.current$.value.flow)==null?void 0:c.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:o,handleSubmit:s,formState:{errors:a}}=Jl({defaultValues:{text:i||(qg(r)?r.value:"")},resolver:Gg(e.config)}),{ref:l,...u}=o("text",{required:!e.config.optional}),d=j();return Ae(()=>{d.current&&(d.current.focus(),d.current.select())},[]),g(Q,{children:g("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(f=>{t(f.text)}),children:[g("div",{class:"flex items-center gap-2",children:[g("div",{class:"relative min-w-0 flex-grow",children:[g("input",{id:"chat-input",...u,...Kg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(d.current=f),l(f)},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&&g(Fr,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),g(Or,{})]}),g(Eo,{onAnimationComplete:n,error:a.text})]})})},Zg=()=>{var i;const e=(i=L.current$.value.flow)==null?void 0:i.data.currentInput,t=j(null),n=ae(()=>{t.current&&(L.inputHeight$.value=t.current.getBoundingClientRect().height)},[]);W(()=>{n()},[e==null?void 0:e.type,n]);const r=o=>s=>Ve.onSubmitSuccessFn$.value({type:o,value:s});return g(xr.div,{initial:{height:0},animate:{height:L.inputHeight$.value},exit:{height:0,opacity:0},onAnimationStart:Ve.scrollToEnd.smooth,onAnimationComplete:Ve.scrollToEnd.smooth,class:"bg-statusbar absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:g("div",{ref:t,class:"border-divider border-t",children:Ue({input:e,onHeightChange:n}).with({input:_e.nullish},()=>g("div",{class:"flex items-center gap-2 p-2.5",children:[g("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}),g(Or,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},o=>g(Yg,{onSubmitSuccess:r(o.input.type),...o})).with({input:{type:"multiple-choice"}},o=>g(zg,{onSubmitSuccess:r(o.input.type),...o})).with({input:{type:"boolean"}},o=>g(sg,{onSubmitSuccess:r(o.input.type),...o})).with({input:{type:"file"}},o=>g(pg,{onSubmitSuccess:r(o.input.type),...o})).with({input:{type:"submit"}},o=>g(Hg,{onSubmitSuccess:r(o.input.type),...o})).exhaustive()})})},nu=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,ru=ct,iu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ru(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],c=o==null?void 0:o[u];if(d===null)return null;const f=nu(d)||nu(c);return i[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...h}=d;return Object.entries(h).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...o,...a}[m]):{...o,...a}[m]===b})?[...u,c,f]:u},[]);return ru(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Xg=iu("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"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),Qg={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},Jg=({children:e,className:t,transitionState:n,side:r,...i})=>g(xr.p,{variants:Qg,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:Xg({className:t,side:r,transitionState:n}),...i,children:e}),ey=({className:e,...t})=>(W(()=>{Ve.scrollToEnd.smooth()}),g("div",{"aria-hidden":!0,children:Ve.isBotTyping$.value===!0?g("div",{"aria-label":"Typing…",class:ct("flex gap-1 p-4",e),...t,children:Array.from({length:3},(n,r)=>g("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}):void 0})),ty={bot:"left",user:"right"},ny=iu("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]"}}}),ry=({lastSentMessageFooter:e})=>{var n;const t=((n=L.current$.value.flow)==null?void 0:n.data.messages)??[];return W(()=>{Ve.scrollToEnd.smooth()},[t.length]),g("ol",{"aria-label":"Chat messages",class:"flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[g(nl,{initial:!1,children:t.map((r,i)=>g(Q,{children:g("li",{class:"flex",children:Ue(r).with({type:"system"},o=>g("p",{class:ny({variant:o.variant}),children:o.text})).with({type:"text",author:_e.union("bot","user")},o=>{const s=o.author==="user"&&!t.slice(i+1).some(a=>a.type==="text"&&a.author==="user");return g(Jg,{side:ty[o.author],children:[o.text,s?e:null]},i)}).with({type:"link"},o=>g("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:g("a",{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:o.href,children:[o.text,g("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g("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"})})]})})).with({type:"image"},o=>g("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:o.url,style:{aspectRatio:o.width/o.height}})).with({type:"file"},o=>g(ug,{class:o.author==="bot"?"":"ml-auto",file:{name:o.fileName,sizeKb:o.fileSizeKb}})).exhaustive()})},i))}),g(ey,{},"typing")]})},iy=({logger:e,apiClient:t,analytics:n})=>{const{flow:r}=L.current$.value;Xe(r,"Flow is required to exist to show chatbot body");const i=L.viewState$.value,{chatRef:o,chatService:s}=rg(),[a,l]=ie();return Ae(()=>{i==="maximised"&&Ve.scrollToEnd.instant()},[i]),Ae(()=>{const{state:u,flow:d}=L.current$.peek();if(u!=="loaded")throw new Error(Km.invalid_state);let c=d.data.nodeHistory.at(-1);if(Ve.scrollToEnd.instant(),L.setInput(void 0),d.data.isFinished)return;c===void 0?(c=wl(r.nodes).id,L.setCurrentNodeId(c),n.log({event:"FLOW_START",properties:{flow_id:r.id,flow_version:r.version,flow_session_id:d.data.flowSessionId}})):L.removeMessagesSentByNodeIds([c]);const{interpret:f,abort:h,undo:p}=Bv({context:r.context,analytics:n,apiClient:t,logger:e,flow:r.nodes,chatService:s,getSubmissions:()=>{var m;return(m=L.current$.peek().flow)==null?void 0:m.data.submissions},onInterpret:(m,b)=>{const x=L.current$.peek().flow;Xe(x),b&&(x.data.sequence=x.data.sequence+1,n.log({event:"FLOW_NODE",properties:{flow_id:r.id,flow_version:r.version,from_node_id:b.id,to_node_id:m.id,sequence:x.data.sequence,flow_session_id:x.data.flowSessionId},customProperties:r.context})),L.setCurrentNodeId(m.id)},onFlowEnd:async()=>{L.markAsFinished();const m=L.current$.peek().flow;Xe(m),n.log({event:"FLOW_END",properties:{flow_id:r.id,flow_version:r.version,flow_session_id:m.data.flowSessionId},customProperties:r.context})}});return l(()=>p),f(c),h},[n,t,s,e,r]),g(Q,{children:[g("div",{ref:o,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:L.inputHeight$.value},children:g(ry,{lastSentMessageFooter:r.data.isFinished||!a?null:g(sy,{undoFn:a})})}),g(Zg,{})]})},oy=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"):[],sy=({undoFn:e})=>g("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:g("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}=L.current$.peek();Xe(t);const{removed:n}=e(t.data.nodeHistory),r=t.data.nodeHistory.splice(-n);r.length!==0&&(L.removeMessagesSentByNodeIds(r),L.setInput(void 0),r.pop(),r.map(i=>t.nodes.find(o=>o.id===i)).filter(Boolean).flatMap(oy).forEach(i=>delete t.data.submissions[i]),L.current$.value={...L.current$.value})},children:"Undo"})}),ay=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:iy},Symbol.toStringTag,{value:"Module"}))})();